From cbb72d0dde605d90bd8a5983b79ec8681a1b980e Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Wed, 7 Feb 2024 10:28:53 +0100 Subject: [PATCH 01/78] phy: remove transmit buffer --- apps/examples/du/du_example.cpp | 1 - apps/examples/du/fapi_factory.cpp | 2 - apps/examples/du/fapi_factory.h | 2 - apps/examples/du/phy_factory.cpp | 6 - apps/gnb/gnb_appconfig_translators.cpp | 16 - .../phy/phy_fapi_adaptor_factory.h | 3 - .../upper/channel_processors/pdsch_encoder.h | 8 +- .../channel_processors/pdsch_processor.h | 4 - include/srsran/phy/upper/downlink_processor.h | 4 +- include/srsran/phy/upper/tx_buffer.h | 49 -- include/srsran/phy/upper/tx_buffer_pool.h | 135 ---- include/srsran/phy/upper/unique_tx_buffer.h | 95 --- include/srsran/phy/upper/upper_phy.h | 3 - .../srsran/phy/upper/upper_phy_factories.h | 3 - lib/du/adapters/fapi_factory.cpp | 2 - lib/du/adapters/fapi_factory.h | 1 - lib/du/du_impl.cpp | 1 - lib/du/du_low_impl.h | 1 - .../phy/fapi_to_phy_translator.cpp | 34 +- lib/fapi_adaptor/phy/fapi_to_phy_translator.h | 5 - lib/fapi_adaptor/phy/messages/pdsch.cpp | 5 - .../phy/phy_fapi_adaptor_factory_impl.cpp | 1 - .../phy/phy_fapi_adaptor_impl.cpp | 1 - lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.h | 2 - lib/phy/upper/CMakeLists.txt | 1 - .../channel_processor_factories.cpp | 3 +- .../pdsch_codeblock_processor.cpp | 115 ++-- .../pdsch_codeblock_processor.h | 8 +- .../pdsch_encoder_hw_impl.cpp | 1 - .../pdsch_encoder_hw_impl.h | 5 +- .../channel_processors/pdsch_encoder_impl.cpp | 18 +- .../channel_processors/pdsch_encoder_impl.h | 7 +- .../pdsch_processor_concurrent_impl.cpp | 28 +- .../pdsch_processor_concurrent_impl.h | 4 - .../pdsch_processor_impl.cpp | 10 +- .../channel_processors/pdsch_processor_impl.h | 10 +- .../pdsch_processor_lite_impl.cpp | 26 +- .../pdsch_processor_lite_impl.h | 14 +- .../channel_processors/pdsch_processor_pool.h | 6 +- ...ownlink_processor_single_executor_impl.cpp | 6 +- .../downlink_processor_single_executor_impl.h | 3 +- lib/phy/upper/tx_buffer_codeblock_pool.h | 98 --- lib/phy/upper/tx_buffer_impl.h | 205 ------- lib/phy/upper/tx_buffer_pool_impl.cpp | 191 ------ lib/phy/upper/tx_buffer_pool_impl.h | 89 --- lib/phy/upper/upper_phy_factories.cpp | 5 +- lib/phy/upper/upper_phy_impl.cpp | 8 - lib/phy/upper/upper_phy_impl.h | 8 - .../pdsch_processor_benchmark.cpp | 36 +- .../phy/fapi_to_phy_translator_test.cpp | 17 - .../phy/messages/dl_pdsch_pdu_test.cpp | 1 - tests/unittests/phy/upper/CMakeLists.txt | 4 - .../channel_processors/pdsch_encoder_test.cpp | 25 +- .../pdsch_encoder_test_doubles.h | 5 +- .../pdsch_processor_test_doubles.h | 2 - .../pdsch_processor_unittest.cpp | 6 +- .../pdsch_processor_validator_test.cpp | 8 +- .../pdsch_processor_vectortest.cpp | 24 +- .../phy/upper/downlink_processor_test.cpp | 25 +- .../upper/downlink_processor_test_doubles.h | 4 +- .../phy/upper/tx_buffer_pool_test.cpp | 575 ------------------ .../phy/upper/tx_buffer_pool_test_doubles.h | 62 -- .../phy/upper/tx_buffer_test_doubles.h | 76 --- 63 files changed, 118 insertions(+), 2005 deletions(-) delete mode 100644 include/srsran/phy/upper/tx_buffer.h delete mode 100644 include/srsran/phy/upper/tx_buffer_pool.h delete mode 100644 include/srsran/phy/upper/unique_tx_buffer.h delete mode 100644 lib/phy/upper/tx_buffer_codeblock_pool.h delete mode 100644 lib/phy/upper/tx_buffer_impl.h delete mode 100644 lib/phy/upper/tx_buffer_pool_impl.cpp delete mode 100644 lib/phy/upper/tx_buffer_pool_impl.h delete mode 100644 tests/unittests/phy/upper/tx_buffer_pool_test.cpp delete mode 100644 tests/unittests/phy/upper/tx_buffer_pool_test_doubles.h delete mode 100644 tests/unittests/phy/upper/tx_buffer_test_doubles.h diff --git a/apps/examples/du/du_example.cpp b/apps/examples/du/du_example.cpp index 83dda7026d..88c283303e 100644 --- a/apps/examples/du/du_example.cpp +++ b/apps/examples/du/du_example.cpp @@ -719,7 +719,6 @@ int main(int argc, char** argv) generate_carrier_config_tlv(), std::move(std::get>(pm_tools)), std::move(std::get>(uci_part2_tools)), - upper->get_tx_buffer_pool(), {0}); report_error_if_not(phy_adaptor, "Unable to create PHY adaptor."); upper->set_rx_results_notifier(phy_adaptor->get_rx_results_notifier()); diff --git a/apps/examples/du/fapi_factory.cpp b/apps/examples/du/fapi_factory.cpp index 9d7421102f..327ae2eabf 100644 --- a/apps/examples/du/fapi_factory.cpp +++ b/apps/examples/du/fapi_factory.cpp @@ -29,7 +29,6 @@ srsran::build_phy_fapi_adaptor(unsigned const fapi::carrier_config& carrier_cfg, std::unique_ptr pm_repo, std::unique_ptr part2_repo, - tx_buffer_pool& buffer_pool, std::vector prach_ports) { std::unique_ptr adaptor_factory = create_phy_fapi_adaptor_factory(); @@ -50,7 +49,6 @@ srsran::build_phy_fapi_adaptor(unsigned phy_fapi_dependencies.dl_processor_pool = &dl_processor_pool; phy_fapi_dependencies.dl_rg_pool = &dl_rg_pool; phy_fapi_dependencies.dl_pdu_validator = &dl_pdu_validator; - phy_fapi_dependencies.buffer_pool = &buffer_pool; phy_fapi_dependencies.ul_request_processor = &ul_request_processor; phy_fapi_dependencies.ul_rg_pool = &ul_rg_pool; phy_fapi_dependencies.ul_pdu_repository = &ul_pdu_repository; diff --git a/apps/examples/du/fapi_factory.h b/apps/examples/du/fapi_factory.h index b205934fd3..b4403d02fc 100644 --- a/apps/examples/du/fapi_factory.h +++ b/apps/examples/du/fapi_factory.h @@ -16,7 +16,6 @@ namespace srsran { class task_executor; -class tx_buffer_pool; std::unique_ptr build_phy_fapi_adaptor(unsigned sector_id, @@ -33,7 +32,6 @@ build_phy_fapi_adaptor(unsigned const fapi::carrier_config& carrier_cfg, std::unique_ptr pm_repo, std::unique_ptr part2_repo, - tx_buffer_pool& buffer_pool, std::vector prach_ports); std::unique_ptr diff --git a/apps/examples/du/phy_factory.cpp b/apps/examples/du/phy_factory.cpp index f12f949bac..7379d095b8 100644 --- a/apps/examples/du/phy_factory.cpp +++ b/apps/examples/du/phy_factory.cpp @@ -77,12 +77,6 @@ std::unique_ptr srsran::create_upper_phy(const upper_phy_params& upper_config.dl_bw_rb = bw_rb; upper_config.ul_bw_rb = bw_rb; - upper_config.tx_buffer_config.nof_buffers = upper_config.nof_ul_rg; - upper_config.tx_buffer_config.nof_codeblocks = 128; - upper_config.tx_buffer_config.max_codeblock_size = ldpc::MAX_CODEBLOCK_SIZE; - upper_config.tx_buffer_config.expire_timeout_slots = 100 * nof_slots_per_subframe; - upper_config.tx_buffer_config.external_soft_bits = false; - upper_config.rx_buffer_config.nof_buffers = upper_config.nof_dl_rg; upper_config.rx_buffer_config.nof_codeblocks = 128; upper_config.rx_buffer_config.max_codeblock_size = ldpc::MAX_CODEBLOCK_SIZE; diff --git a/apps/gnb/gnb_appconfig_translators.cpp b/apps/gnb/gnb_appconfig_translators.cpp index 0ad6db5249..52c97445a2 100644 --- a/apps/gnb/gnb_appconfig_translators.cpp +++ b/apps/gnb/gnb_appconfig_translators.cpp @@ -1571,8 +1571,6 @@ std::vector srsran::generate_du_low_config(const gnb_appconfig unsigned nof_slots_per_system_frame = NOF_SFNS * nof_slots_per_frame; // Assume the PUSCH HARQ softbuffer expiration time is 100ms. const unsigned expire_pusch_harq_timeout_slots = 100 * nof_slots_per_subframe; - // Assume the PDSCH HARQ buffer expiration time is twice the maximum number of HARQ processes. - const unsigned expire_pdsch_harq_timeout_slots = 2 * max_harq_process; // Assume the maximum number of active PUSCH and PDSCH HARQ processes is twice the maximum number of users per slot // for the maximum number of HARQ processes. const unsigned nof_buffers = 2 * max_nof_users_slot * max_harq_process; @@ -1580,20 +1578,12 @@ std::vector srsran::generate_du_low_config(const gnb_appconfig const unsigned max_nof_pusch_cb_slot = (pusch_constants::MAX_NRE_PER_RB * bw_rb * get_bits_per_symbol(modulation_scheme::QAM256)) / ldpc::MAX_MESSAGE_SIZE; - // Deduce the maximum number of codeblocks that can be scheduled for PDSCH in one slot. - const unsigned max_nof_pdsch_cb_slot = (pusch_constants::MAX_NRE_PER_RB * bw_rb * - get_bits_per_symbol(modulation_scheme::QAM256) * cell.nof_antennas_dl) / - ldpc::MAX_MESSAGE_SIZE; // Assume the minimum number of codeblocks per softbuffer. const unsigned min_cb_softbuffer = 2; // Assume that the maximum number of receive codeblocks is equal to the number of HARQ processes times the maximum // number of codeblocks per slot. const unsigned max_rx_nof_codeblocks = std::max(max_harq_process * max_nof_pusch_cb_slot, min_cb_softbuffer * nof_buffers); - // Assume that the maximum number of transmit codeblocks is equal to the number of HARQ processes times the maximum - // number of codeblocks per slot. - const unsigned max_tx_nof_codeblocks = - std::max(expire_pdsch_harq_timeout_slots * max_nof_pdsch_cb_slot, min_cb_softbuffer * nof_buffers); // Determine processing pipelines depth. Make sure the number of slots per system frame is divisible by the pipeline // depths. @@ -1663,12 +1653,6 @@ std::vector srsran::generate_du_low_config(const gnb_appconfig cfg.dl_bw_rb = bw_rb; cfg.ul_bw_rb = bw_rb; - cfg.tx_buffer_config.nof_buffers = nof_buffers; - cfg.tx_buffer_config.nof_codeblocks = max_tx_nof_codeblocks; - cfg.tx_buffer_config.max_codeblock_size = ldpc::MAX_CODEBLOCK_SIZE; - cfg.tx_buffer_config.expire_timeout_slots = expire_pdsch_harq_timeout_slots; - cfg.tx_buffer_config.external_soft_bits = false; - cfg.rx_buffer_config.nof_buffers = nof_buffers; cfg.rx_buffer_config.nof_codeblocks = max_rx_nof_codeblocks; cfg.rx_buffer_config.max_codeblock_size = ldpc::MAX_CODEBLOCK_SIZE; diff --git a/include/srsran/fapi_adaptor/phy/phy_fapi_adaptor_factory.h b/include/srsran/fapi_adaptor/phy/phy_fapi_adaptor_factory.h index c9602cf908..d3d7814eb6 100644 --- a/include/srsran/fapi_adaptor/phy/phy_fapi_adaptor_factory.h +++ b/include/srsran/fapi_adaptor/phy/phy_fapi_adaptor_factory.h @@ -14,7 +14,6 @@ #include "srsran/fapi_adaptor/phy/phy_fapi_adaptor.h" #include "srsran/fapi_adaptor/precoding_matrix_repository.h" #include "srsran/fapi_adaptor/uci_part2_correspondence_repository.h" -#include "srsran/phy/upper/tx_buffer_pool.h" #include "srsran/ran/subcarrier_spacing.h" #include "srsran/support/executors/task_executor.h" #include @@ -58,8 +57,6 @@ struct phy_fapi_adaptor_factory_dependencies { resource_grid_pool* dl_rg_pool; /// Downlink PDU validator. const downlink_pdu_validator* dl_pdu_validator; - /// Transmit buffer pool. - tx_buffer_pool* buffer_pool; /// Uplink request processor. uplink_request_processor* ul_request_processor; /// Uplink resource grid pool. diff --git a/include/srsran/phy/upper/channel_processors/pdsch_encoder.h b/include/srsran/phy/upper/channel_processors/pdsch_encoder.h index 7f7d234fd3..98bda602f8 100644 --- a/include/srsran/phy/upper/channel_processors/pdsch_encoder.h +++ b/include/srsran/phy/upper/channel_processors/pdsch_encoder.h @@ -35,8 +35,6 @@ class pdsch_encoder /// Collects PDSCH encoder parameters. struct configuration { - /// Set to \c true if it is a new transmission. - bool new_data; /// Code base graph. ldpc_base_graph_type base_graph; /// Redundancy version, values in {0, 1, 2, 3}. @@ -58,13 +56,9 @@ class pdsch_encoder /// block segmentation (see TS38.212 Section 7.2.3), codeblock encoding (see TS38.212 Section 7.2.4) and rate matching /// (see TS38.212 Section 7.2.5), and codeblock concatenation (see TS38.212 Section 7.2.6) into the PDSCH codeword. /// \param[out] codeword Final PDSCH codeword. - /// \param[in,out] rm_buffer Rate matching buffer. /// \param[in] transport_block Transport block to be transmitted. /// \param[in] cfg PDSCH configuration parameters. - virtual void encode(span codeword, - tx_buffer& rm_buffer, - span transport_block, - const configuration& cfg) = 0; + virtual void encode(span codeword, span transport_block, const configuration& cfg) = 0; }; } // namespace srsran diff --git a/include/srsran/phy/upper/channel_processors/pdsch_processor.h b/include/srsran/phy/upper/channel_processors/pdsch_processor.h index 663841cef3..9a22655ab3 100644 --- a/include/srsran/phy/upper/channel_processors/pdsch_processor.h +++ b/include/srsran/phy/upper/channel_processors/pdsch_processor.h @@ -48,8 +48,6 @@ class pdsch_processor modulation_scheme modulation; /// Redundancy version index. unsigned rv; - /// Set to true if it is the first transmission of the data. - bool new_data; }; /// \brief Describes the PDSCH processing parameters. @@ -149,14 +147,12 @@ class pdsch_processor /// \brief Processes a PDSCH transmission. /// \param[out] mapper Resource grid mapper interface. - /// \param[in] rm_buffer Rate match buffer. /// \param[out] notifier PDSCH processor notifier. /// \param[in] data The codewords to transmit. /// \param[in] pdu Necessary parameters to process the PDSCH transmission. /// \remark The number of transport blocks must be equal to the number of codewords in \c pdu. /// \remark The size of each transport block is determined by data[TB index].size() virtual void process(resource_grid_mapper& mapper, - unique_tx_buffer rm_buffer, pdsch_processor_notifier& notifier, static_vector, MAX_NOF_TRANSPORT_BLOCKS> data, const pdu_t& pdu) = 0; diff --git a/include/srsran/phy/upper/downlink_processor.h b/include/srsran/phy/upper/downlink_processor.h index 967e19fa07..f3b7de8591 100644 --- a/include/srsran/phy/upper/downlink_processor.h +++ b/include/srsran/phy/upper/downlink_processor.h @@ -44,11 +44,9 @@ class downlink_processor /// \brief Process the given PDSCH PDU and its related data, which it is given in data parameter. /// - /// \param[in,out] rm_buffer Rate matcher buffer. /// \param[in] data Contains the PDSCH transport blocks. /// \param[in] pdu PDSCH PDU to process. - virtual void process_pdsch(unique_tx_buffer rm_buffer, - const static_vector, pdsch_processor::MAX_NOF_TRANSPORT_BLOCKS>& data, + virtual void process_pdsch(const static_vector, pdsch_processor::MAX_NOF_TRANSPORT_BLOCKS>& data, const pdsch_processor::pdu_t& pdu) = 0; /// \brief Process the given SSB PDU. diff --git a/include/srsran/phy/upper/tx_buffer.h b/include/srsran/phy/upper/tx_buffer.h deleted file mode 100644 index 35c373cd79..0000000000 --- a/include/srsran/phy/upper/tx_buffer.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * - * Copyright 2021-2024 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. - * - */ - -#pragma once - -#include "srsran/adt/span.h" -#include "srsran/phy/upper/log_likelihood_ratio.h" - -namespace srsran { - -/// \brief Describes a PDSCH rate matcher buffer. -/// -/// The aim is to provide the physical layer shared channel FEC with a persistent storage of the rate matcher buffer -/// among transmissions for a given user and HARQ process. -/// -class tx_buffer -{ -public: - /// Default destructor. - virtual ~tx_buffer() = default; - - /// Gets the number of codeblocks. - virtual unsigned get_nof_codeblocks() const = 0; - - /// \brief Gets the codeblock absolute identifier. - /// - /// The absolute codeblock identifier refers to the codeblock identifier within the common codeblock memory pool. It - /// is available for decoders which use external memory. - /// - /// \param[in] codeblock_id Codeblock identifier. - /// \remark The codeblock identifier must not exceed get_max_nof_codeblocks()-1. - virtual unsigned get_absolute_codeblock_id(unsigned codeblock_id) const = 0; - - /// \brief Gets an encoded read-write codeblock. - /// \param[in] codeblock_id Codeblock identifier. - /// \param[in] codeblock_size Codeblock size. - /// \return A view of the codeblock bits. - /// \remark The codeblock identifier must not exceed get_max_nof_codeblocks()-1. - virtual bit_buffer get_codeblock(unsigned codeblock_id, unsigned codeblock_size) = 0; -}; - -} // namespace srsran diff --git a/include/srsran/phy/upper/tx_buffer_pool.h b/include/srsran/phy/upper/tx_buffer_pool.h deleted file mode 100644 index d97b1c6a25..0000000000 --- a/include/srsran/phy/upper/tx_buffer_pool.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * - * Copyright 2021-2024 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. - * - */ - -#pragma once - -#include "srsran/phy/upper/trx_buffer_identifier.h" -#include "srsran/ran/slot_point.h" -#include - -namespace srsran { - -class unique_tx_buffer; - -/// \brief Describes a transmitter buffer pool interface. -/// -/// The purpose of this interface is to provide the physical layer shared channel encoder with transmitter rate match -/// buffers. -/// -/// Transmitter buffers are selected from a pool of resources using a given trx_buffer_identifier and remain -/// persistent until the identifier is reused or expires. -/// -/// Each sector is expected to create its unique pool for the purpose of resource management. -/// -/// The implementation of this interface might not thread-safe, reserve() and run_slot() must be called from the same -/// thread. -class tx_buffer_pool -{ -public: - /// Default destructor. - virtual ~tx_buffer_pool() = default; - - /// \brief Reserves and retrieves a transmit buffer for a given identifier and number of codeblocks. - /// - /// This function reserves a transmit buffer for a given identifier. It ensures that reserved buffers retain their - /// data values. - /// - /// The reserved buffers remain in use until one of the following occurs: - /// - A buffer reservation is made with the same identifier but a different number of codeblocks. - /// - The buffer reservation expires (e.g., through the execution of run_slot()). - /// - /// The transmit buffer pool neither initializes nor modifies the contents of the reserved transmit buffer. The - /// modules using the buffer are responsible for initializing and modifying its contents before new transmissions. - /// - /// It is expected that the pool logs in \c PHY channel the context and the reason of a failed reservation. Possible - /// reservation failures are: - /// - Insufficient number of buffers, \ref tx_buffer_pool_config::nof_buffers buffers are reserved with different - /// identifiers; - /// - Insufficient number of codeblocks, \ref tx_buffer_pool_config::max_nof_codeblocks codeblocks are currently - /// assigned to buffers; - /// - A buffer with the same identifier is locked; - /// - No buffer is found with the same identifier while the reservation is not marked as new data; - /// - The number of codeblocks for a retransmission is different than the previous reservation; or - /// - The pool operation has stopped. - /// - /// \param[in] slot Slot context in which the reservation takes place. - /// \param[in] id Identifier for the buffer transmission. - /// \param[in] nof_codeblocks Number of codeblocks to reserve. - /// \param[in] new_data Set to true if the transmission is for new data. - /// \return A valid unique transmit buffer if the reservation was successful; otherwise, an invalid unique transmit - /// buffer. - virtual unique_tx_buffer - reserve(const slot_point& slot, trx_buffer_identifier id, unsigned nof_codeblocks, bool new_data) = 0; - - /// \brief Reserves and retrieves a transmit buffer without an identifier. - /// - /// This reservation method is specifically designed for system information, and the buffer resources will be - /// automatically released once the buffer is unlocked. - /// - /// The transmit buffer pool does not initialize or modify the contents of the transmit buffers. Modules using these - /// transmit buffers are responsible for initializing and modifying their contents before new transmissions. - /// - /// It is expected that the pool logs in \c PHY channel the context and the reason of a failed reservation. Possible - /// reservation failures are: - /// - Insufficient number of buffers, \ref tx_buffer_pool_config::nof_buffers buffers are reserved with different - /// identifiers; - /// - Insufficient number of codeblocks, \ref tx_buffer_pool_config::max_nof_codeblocks codeblocks are currently - /// assigned to buffers; or - /// - The pool operation has stopped. - /// - /// \param[in] slot Slot context. - /// \param[in] nof_codeblocks Number of codeblocks to reserve. - /// \return A valid unique transmit buffer if the reservation was successful; otherwise, an invalid unique buffer. - virtual unique_tx_buffer reserve(const slot_point& slot, unsigned nof_codeblocks) = 0; - - /// \brief Runs internal state machines and releases expired buffers. - /// \param[in] slot Current slot. - virtual void run_slot(const slot_point& slot) = 0; -}; - -/// Transmit buffer pool controller interface. -class tx_buffer_pool_controller -{ -public: - /// \brief Default destructor. - /// - /// An assertion is triggered if any buffer is still locked. This prevents that unique buffers lose the reference to - /// the actual buffers. - virtual ~tx_buffer_pool_controller() = default; - - /// Gets the actual buffer pool. - virtual tx_buffer_pool& get_pool() = 0; - - /// \brief Stops the buffer pool. - /// - /// It waits for all buffers to be unlocked. - virtual void stop() = 0; -}; - -/// Buffer pool configuration. -struct tx_buffer_pool_config { - /// \brief Maximum codeblock size. - /// - /// Set to \c ldpc::MAX_CODEBLOCK_SIZE by default. - unsigned max_codeblock_size; - /// Number of transmit buffers available in the pool. - unsigned nof_buffers; - /// Number of codeblocks available in the pool for all the transmit buffers. - unsigned nof_codeblocks; - /// Buffer lifetime as a number of slots. - unsigned expire_timeout_slots; - /// Set to true to indicate that soft bits are not stored in the buffer. - bool external_soft_bits; -}; - -/// Creates a transmit buffer pool. -std::unique_ptr create_tx_buffer_pool(const tx_buffer_pool_config& config); - -} // namespace srsran diff --git a/include/srsran/phy/upper/unique_tx_buffer.h b/include/srsran/phy/upper/unique_tx_buffer.h deleted file mode 100644 index 6a24042614..0000000000 --- a/include/srsran/phy/upper/unique_tx_buffer.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * - * Copyright 2021-2024 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. - * - */ - -#pragma once -#include "srsran/phy/upper/tx_buffer.h" - -namespace srsran { - -/// \brief Wraps a transmit buffer instance and locks it inside a scope. -/// -/// The locking mechanism ensures the buffer is locked as in the pool as long as it is being used within a scope. -class unique_tx_buffer -{ -public: - /// Public interface required for locking and unlocking the internal buffer. - class callback : public tx_buffer - { - public: - /// Locks the buffer. - virtual void lock() = 0; - - /// Unlocks the buffer. - virtual void unlock() = 0; - }; - - /// Default constructor - creates an invalid buffer. - unique_tx_buffer() = default; - - /// Builds a unique transmit buffer from a reference. It locks the internal buffer. - explicit unique_tx_buffer(callback& buffer_) : ptr(&buffer_) - { - if (ptr != nullptr) { - ptr->lock(); - } - } - - /// Destructor - it releases the buffer. - ~unique_tx_buffer() - { - if (ptr != nullptr) { - ptr->unlock(); - ptr = nullptr; - } - } - - /// Copy constructor is deleted to prevent the unique buffer from being shared across multiple scopes. - unique_tx_buffer(const unique_tx_buffer& other) = delete; - - /// Move constructor moves the buffer to a different scope. - unique_tx_buffer(unique_tx_buffer&& other) noexcept - { - srsran_assert(other.is_valid(), "Trying to move an invalid buffer."); - ptr = other.ptr; - other.ptr = nullptr; - }; - - /// Move assignment moves the buffer to a different scope. - unique_tx_buffer& operator=(unique_tx_buffer&& other) noexcept - { - // Unlocks current buffer if it is valid. - if (ptr != nullptr) { - ptr->unlock(); - ptr = nullptr; - } - - // Swap pointers. - std::swap(ptr, other.ptr); - return *this; - } - - /// Gets the actual transmit buffer. - tx_buffer& get() - { - srsran_assert(is_valid(), "Invalid buffer."); - return *ptr; - } - tx_buffer& operator*() { return get(); } - tx_buffer& operator->() { return get(); } - - /// Returns true if the unique buffer contains a valid buffer. - bool is_valid() const { return ptr != nullptr; } - -private: - /// Underlying pointer to the actual buffer. Set to nullptr for an invalid buffer. - callback* ptr = nullptr; -}; - -} // namespace srsran diff --git a/include/srsran/phy/upper/upper_phy.h b/include/srsran/phy/upper/upper_phy.h index cb69eb0dd0..b1eb7e489a 100644 --- a/include/srsran/phy/upper/upper_phy.h +++ b/include/srsran/phy/upper/upper_phy.h @@ -51,9 +51,6 @@ class upper_phy /// \brief Returns the downlink resource grid pool of this upper PHY. virtual resource_grid_pool& get_downlink_resource_grid_pool() = 0; - /// \brief Returns the transmit buffer pool. - virtual tx_buffer_pool& get_tx_buffer_pool() = 0; - /// \brief Returns the uplink resource grid pool of this upper PHY. virtual resource_grid_pool& get_uplink_resource_grid_pool() = 0; diff --git a/include/srsran/phy/upper/upper_phy_factories.h b/include/srsran/phy/upper/upper_phy_factories.h index 47465781f0..8f4ab6aaed 100644 --- a/include/srsran/phy/upper/upper_phy_factories.h +++ b/include/srsran/phy/upper/upper_phy_factories.h @@ -10,7 +10,6 @@ #pragma once -#include "tx_buffer_pool.h" #include "srsran/phy/support/support_factories.h" #include "srsran/phy/upper/channel_coding/channel_coding_factories.h" #include "srsran/phy/upper/channel_processors/channel_processor_factories.h" @@ -289,8 +288,6 @@ struct upper_phy_config { unsigned nof_slots_request_headroom; /// List of active subcarrier spacing, indexed by numerology. std::array active_scs; - /// Transmit buffer pool configuration. - tx_buffer_pool_config tx_buffer_config; /// Receive buffer pool configuration. rx_buffer_pool_config rx_buffer_config; /// Upper PHY resource grid gateway. diff --git a/lib/du/adapters/fapi_factory.cpp b/lib/du/adapters/fapi_factory.cpp index 9729697415..3e8bcfb078 100644 --- a/lib/du/adapters/fapi_factory.cpp +++ b/lib/du/adapters/fapi_factory.cpp @@ -32,7 +32,6 @@ srsran::build_phy_fapi_adaptor(unsigned sect const fapi::carrier_config& carrier_cfg, std::unique_ptr pm_repo, std::unique_ptr part2_repo, - tx_buffer_pool& buffer_pool, std::vector prach_ports) { std::unique_ptr adaptor_factory = create_phy_fapi_adaptor_factory(); @@ -52,7 +51,6 @@ srsran::build_phy_fapi_adaptor(unsigned sect phy_fapi_dependencies.dl_processor_pool = &dl_processor_pool; phy_fapi_dependencies.dl_rg_pool = &dl_rg_pool; phy_fapi_dependencies.dl_pdu_validator = &dl_pdu_validator; - phy_fapi_dependencies.buffer_pool = &buffer_pool; phy_fapi_dependencies.ul_request_processor = &ul_request_processor; phy_fapi_dependencies.ul_rg_pool = &ul_rg_pool; phy_fapi_dependencies.ul_pdu_repository = &ul_pdu_repository; diff --git a/lib/du/adapters/fapi_factory.h b/lib/du/adapters/fapi_factory.h index eab203482e..e79fc83d4b 100644 --- a/lib/du/adapters/fapi_factory.h +++ b/lib/du/adapters/fapi_factory.h @@ -36,7 +36,6 @@ build_phy_fapi_adaptor(unsigned const fapi::carrier_config& carrier_cfg, std::unique_ptr pm_repo, std::unique_ptr part2_repo, - tx_buffer_pool& buffer_pool, std::vector prach_ports); std::unique_ptr diff --git a/lib/du/du_impl.cpp b/lib/du/du_impl.cpp index 82c9fe853c..20083478cd 100644 --- a/lib/du/du_impl.cpp +++ b/lib/du/du_impl.cpp @@ -127,7 +127,6 @@ du_impl::du_impl(const du_config& du_cfg) : generate_carrier_config_tlv(du_cell), std::move(std::get>(pm_tools)), std::move(std::get>(uci_part2_tools)), - du_lo->get_tx_buffer_pool(), du_cfg.fapi.prach_ports); report_error_if_not(du_low_adaptor, "Unable to create PHY adaptor."); diff --git a/lib/du/du_low_impl.h b/lib/du/du_low_impl.h index c26a1b7c0c..c0b5328f66 100644 --- a/lib/du/du_low_impl.h +++ b/lib/du/du_low_impl.h @@ -24,7 +24,6 @@ class du_low_impl final : public upper_phy upper_phy_timing_handler& get_timing_handler() override { return phy_up->get_timing_handler(); } downlink_processor_pool& get_downlink_processor_pool() override { return phy_up->get_downlink_processor_pool(); } resource_grid_pool& get_downlink_resource_grid_pool() override { return phy_up->get_downlink_resource_grid_pool(); } - tx_buffer_pool& get_tx_buffer_pool() override { return phy_up->get_tx_buffer_pool(); } resource_grid_pool& get_uplink_resource_grid_pool() override { return phy_up->get_uplink_resource_grid_pool(); } uplink_request_processor& get_uplink_request_processor() override { return phy_up->get_uplink_request_processor(); } uplink_slot_pdu_repository& get_uplink_slot_pdu_repository() override diff --git a/lib/fapi_adaptor/phy/fapi_to_phy_translator.cpp b/lib/fapi_adaptor/phy/fapi_to_phy_translator.cpp index f6805cc48a..d1831ff745 100644 --- a/lib/fapi_adaptor/phy/fapi_to_phy_translator.cpp +++ b/lib/fapi_adaptor/phy/fapi_to_phy_translator.cpp @@ -21,7 +21,6 @@ #include "srsran/phy/support/prach_buffer_context.h" #include "srsran/phy/support/resource_grid_pool.h" #include "srsran/phy/upper/downlink_processor.h" -#include "srsran/phy/upper/unique_tx_buffer.h" #include "srsran/phy/upper/uplink_request_processor.h" #include "srsran/phy/upper/uplink_slot_pdu_repository.h" @@ -37,8 +36,7 @@ class downlink_processor_dummy : public downlink_processor { srslog::fetch_basic_logger("FAPI").warning("Could not enqueue PDCCH PDU in the downlink processor"); } - void process_pdsch(unique_tx_buffer rm_buffer, - const static_vector, pdsch_processor::MAX_NOF_TRANSPORT_BLOCKS>& data, + void process_pdsch(const static_vector, pdsch_processor::MAX_NOF_TRANSPORT_BLOCKS>& data, const pdsch_processor::pdu_t& pdu) override { srslog::fetch_basic_logger("FAPI").warning("Could not enqueue PDSCH PDU in the downlink processor"); @@ -77,7 +75,6 @@ fapi_to_phy_translator::fapi_to_phy_translator(const fapi_to_phy_translator_conf nof_slots_request_headroom(config.nof_slots_request_headroom), logger(*dependencies.logger), dl_pdu_validator(*dependencies.dl_pdu_validator), - buffer_pool(*dependencies.buffer_pool), ul_request_processor(*dependencies.ul_request_processor), ul_rg_pool(*dependencies.ul_rg_pool), ul_pdu_validator(*dependencies.ul_pdu_validator), @@ -612,32 +609,8 @@ void fapi_to_phy_translator::tx_data_request(const fapi::tx_data_request_message const fapi::tx_data_req_pdu& pdu = msg.pdus[i]; data.emplace_back(pdu.tlv_custom.payload, pdu.tlv_custom.length.value()); - // Get PDSCH transmission configuration. - const pdsch_processor::pdu_t& pdsch_config = pdsch_repository.pdus[i]; - - // Calculate number of codeblocks. - unsigned nof_cb = ldpc::compute_nof_codeblocks(pdu.tlv_custom.length.to_bits(), pdsch_config.ldpc_base_graph); - - // Prepare buffer identifier. - trx_buffer_identifier id(pdsch_config.rnti, - (pdsch_config.context.has_value()) ? pdsch_config.context->get_h_id() : 0); - - // Extract new data flag. - bool new_data = pdsch_config.codewords.front().new_data; - - // Get transmit buffer. - unique_tx_buffer buffer = (pdsch_config.context.has_value()) - ? buffer_pool.reserve(pdsch_config.slot, id, nof_cb, new_data) - : buffer_pool.reserve(pdsch_config.slot, nof_cb); - - // Check the soft buffer is valid. - if (!buffer.is_valid()) { - logger.warning("No PDSCH buffer available for {}.", id); - return; - } - // Process PDSCH. - controller->process_pdsch(std::move(buffer), data, pdsch_repository.pdus[i]); + controller->process_pdsch(data, pdsch_repository.pdus[i]); } slot_controller_mngr.release_controller(slot); @@ -645,9 +618,6 @@ void fapi_to_phy_translator::tx_data_request(const fapi::tx_data_request_message // All the PDSCH PDUs have been processed. Clear the repository. pdsch_repository.clear(); - // Run PDSCH buffer housekeeping. - buffer_pool.run_slot(slot); - l1_tracer << trace_event("tx_data_request", tp); } diff --git a/lib/fapi_adaptor/phy/fapi_to_phy_translator.h b/lib/fapi_adaptor/phy/fapi_to_phy_translator.h index 6253e3a66e..f3b172aae8 100644 --- a/lib/fapi_adaptor/phy/fapi_to_phy_translator.h +++ b/lib/fapi_adaptor/phy/fapi_to_phy_translator.h @@ -16,7 +16,6 @@ #include "srsran/fapi_adaptor/precoding_matrix_repository.h" #include "srsran/fapi_adaptor/uci_part2_correspondence_repository.h" #include "srsran/phy/upper/channel_processors/pdsch_processor.h" -#include "srsran/phy/upper/tx_buffer_pool.h" #include "srsran/support/executors/task_executor.h" #include @@ -60,8 +59,6 @@ struct fapi_to_phy_translator_dependencies { resource_grid_pool* dl_rg_pool; /// Downlink PDU validator. const downlink_pdu_validator* dl_pdu_validator; - /// Transmit buffer pool. - tx_buffer_pool* buffer_pool; /// Uplink request processor. uplink_request_processor* ul_request_processor; /// Uplink resource grid pool. @@ -248,8 +245,6 @@ class fapi_to_phy_translator : public fapi::slot_message_gateway srslog::basic_logger& logger; /// Downlink PDU validator. const downlink_pdu_validator& dl_pdu_validator; - /// PDSCH buffer pool. - tx_buffer_pool& buffer_pool; /// Uplink request processor. uplink_request_processor& ul_request_processor; /// Uplink resource grid pool. diff --git a/lib/fapi_adaptor/phy/messages/pdsch.cpp b/lib/fapi_adaptor/phy/messages/pdsch.cpp index 156349744f..1af4eb6fe7 100644 --- a/lib/fapi_adaptor/phy/messages/pdsch.cpp +++ b/lib/fapi_adaptor/phy/messages/pdsch.cpp @@ -38,11 +38,6 @@ static void fill_codewords(pdsch_processor::pdu_t& proc_pdu, const fapi::dl_pdsc pdsch_processor::codeword_description codeword_descr; codeword_descr.modulation = static_cast(cw.qam_mod_order); codeword_descr.rv = cw.rv_index; - if (fapi_pdu.context.has_value()) { - codeword_descr.new_data = fapi_pdu.context->is_new_data(); - } else { - codeword_descr.new_data = true; - } proc_pdu.codewords.push_back(codeword_descr); } } diff --git a/lib/fapi_adaptor/phy/phy_fapi_adaptor_factory_impl.cpp b/lib/fapi_adaptor/phy/phy_fapi_adaptor_factory_impl.cpp index f155a386f0..04a1c2529e 100644 --- a/lib/fapi_adaptor/phy/phy_fapi_adaptor_factory_impl.cpp +++ b/lib/fapi_adaptor/phy/phy_fapi_adaptor_factory_impl.cpp @@ -32,7 +32,6 @@ phy_fapi_adaptor_factory_impl::create(const phy_fapi_adaptor_factory_config& co adaptor_dependencies.dl_processor_pool = dependencies.dl_processor_pool; adaptor_dependencies.dl_rg_pool = dependencies.dl_rg_pool; adaptor_dependencies.dl_pdu_validator = dependencies.dl_pdu_validator; - adaptor_dependencies.buffer_pool = dependencies.buffer_pool; adaptor_dependencies.ul_request_processor = dependencies.ul_request_processor; adaptor_dependencies.ul_rg_pool = dependencies.ul_rg_pool; adaptor_dependencies.ul_pdu_repository = dependencies.ul_pdu_repository; diff --git a/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.cpp b/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.cpp index d2b532af75..749509a7e1 100644 --- a/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.cpp +++ b/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.cpp @@ -39,7 +39,6 @@ generate_fapi_to_phy_translator_dependencies(phy_fapi_adaptor_impl_dependencies& fapi_dependencies.dl_processor_pool = dependencies.dl_processor_pool; fapi_dependencies.dl_rg_pool = dependencies.dl_rg_pool; fapi_dependencies.dl_pdu_validator = dependencies.dl_pdu_validator; - fapi_dependencies.buffer_pool = dependencies.buffer_pool; fapi_dependencies.ul_request_processor = dependencies.ul_request_processor; fapi_dependencies.ul_rg_pool = dependencies.ul_rg_pool; fapi_dependencies.ul_pdu_repository = dependencies.ul_pdu_repository; diff --git a/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.h b/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.h index cbfb489d4b..5b0464ac5f 100644 --- a/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.h +++ b/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.h @@ -53,8 +53,6 @@ struct phy_fapi_adaptor_impl_dependencies { resource_grid_pool* dl_rg_pool; /// Downlink PDU validator. const downlink_pdu_validator* dl_pdu_validator; - /// Transmit buffer pool. - tx_buffer_pool* buffer_pool; /// Uplink request processor. uplink_request_processor* ul_request_processor; /// Uplink resource grid pool. diff --git a/lib/phy/upper/CMakeLists.txt b/lib/phy/upper/CMakeLists.txt index d44022b717..dba547b241 100644 --- a/lib/phy/upper/CMakeLists.txt +++ b/lib/phy/upper/CMakeLists.txt @@ -40,7 +40,6 @@ add_library(log_likelihood_ratio log_likelihood_ratio.cpp) add_library(srsran_upper_phy_support rb_allocation.cpp rx_buffer_pool_impl.cpp - tx_buffer_pool_impl.cpp vrb_to_prb_mapper.cpp ) diff --git a/lib/phy/upper/channel_processors/channel_processor_factories.cpp b/lib/phy/upper/channel_processors/channel_processor_factories.cpp index 7b154e7d2a..0a674b9f76 100644 --- a/lib/phy/upper/channel_processors/channel_processor_factories.cpp +++ b/lib/phy/upper/channel_processors/channel_processor_factories.cpp @@ -1100,7 +1100,6 @@ class logging_pdsch_processor_decorator : public pdsch_processor, private pdsch_ } void process(resource_grid_mapper& mapper, - unique_tx_buffer rm_buffer, pdsch_processor_notifier& notifier_, static_vector, MAX_NOF_TRANSPORT_BLOCKS> data_, const pdu_t& pdu_) override @@ -1110,7 +1109,7 @@ class logging_pdsch_processor_decorator : public pdsch_processor, private pdsch_ pdu = pdu_; start = std::chrono::steady_clock::now(); - processor->process(mapper, std::move(rm_buffer), *this, data_, pdu); + processor->process(mapper, *this, data_, pdu); } private: diff --git a/lib/phy/upper/channel_processors/pdsch_codeblock_processor.cpp b/lib/phy/upper/channel_processors/pdsch_codeblock_processor.cpp index 4c655ef16d..909f3b6fed 100644 --- a/lib/phy/upper/channel_processors/pdsch_codeblock_processor.cpp +++ b/lib/phy/upper/channel_processors/pdsch_codeblock_processor.cpp @@ -12,8 +12,8 @@ using namespace srsran; -pdsch_codeblock_processor::result -pdsch_codeblock_processor::process(bit_buffer rm_buffer, span data, const configuration& config) +pdsch_codeblock_processor::result pdsch_codeblock_processor::process(span data, + const configuration& config) { using namespace units::literals; @@ -45,73 +45,74 @@ pdsch_codeblock_processor::process(bit_buffer rm_buffer, span dat unsigned bits_per_symbol = get_bits_per_symbol(modulation); srsran_assert(bits_per_symbol >= 1, "Number of bits per resource element must be greater than or equal to 1."); - if (config.new_data) { - // Copy codeblock data. - { - bit_buffer message = cb_data.first(config.cb_info_size.value()); - srsvec::copy_offset(message, data, config.tb_offset.value()); - nof_used_bits += units::bits(config.cb_info_size); - } - - // Append transport block CRC if applicable. - if ((config.tb_offset + config.cb_info_size) == tbs) { - constexpr units::bits MAX_BITS_CRC16{3824}; - crc_calculator& tb_crc = (tbs <= MAX_BITS_CRC16) ? *crc16 : *crc24a; - units::bits nof_tb_crc_bits = units::bits(get_crc_size(tb_crc.get_generator_poly())); - - crc_calculator_checksum_t tb_checksum = tb_crc.calculate_byte(data); - for (unsigned i_checksum_byte = 0, i_checksum_byte_end = nof_tb_crc_bits.truncate_to_bytes().value(); - i_checksum_byte != i_checksum_byte_end; - ++i_checksum_byte) { - // Extract byte from the CRC. - unsigned tb_crc_byte = (tb_checksum >> (nof_tb_crc_bits.value() - (i_checksum_byte + 1) * 8)) & 0xffUL; - // Insert the byte at the end of the bit buffer. - cb_data.insert(tb_crc_byte, nof_used_bits.value(), 8); - // Increment the number of bits. - nof_used_bits += 8_bits; - } - - // Insert zero padding bits. - for (units::bits nof_used_bits_end = nof_used_bits + config.zero_pad; nof_used_bits != nof_used_bits_end;) { - // Calculate the number of zeros to pad, no more than a byte at a time. - units::bits nof_zeros = std::min(8_bits, nof_used_bits_end - nof_used_bits); - // Insert the zeros at the end of the bit buffer. - cb_data.insert(0UL, nof_used_bits.value(), nof_zeros.value()); - // Increment the number of bits. - nof_used_bits += nof_zeros; - } - } + // Copy codeblock data. + { + bit_buffer message = cb_data.first(config.cb_info_size.value()); + srsvec::copy_offset(message, data, config.tb_offset.value()); + nof_used_bits += units::bits(config.cb_info_size); + } - // Append codeblock CRC if applicable. - if (config.has_cb_crc) { - crc_calculator& cb_crc = *crc24b; - - crc_calculator_checksum_t cb_checksum = cb_crc.calculate(cb_data.first(nof_used_bits.value())); - for (unsigned i_checksum_byte = 0, i_checksum_byte_end = 3; i_checksum_byte != i_checksum_byte_end; - ++i_checksum_byte) { - // Extract byte from the CRC. - unsigned cb_crc_byte = (cb_checksum >> (24 - (i_checksum_byte + 1) * 8)) & 0xffUL; - // Insert the byte at the end of the bit buffer. - cb_data.insert(cb_crc_byte, nof_used_bits.value(), 8); - // Increment the number of bits. - nof_used_bits += 8_bits; - } + // Append transport block CRC if applicable. + if ((config.tb_offset + config.cb_info_size) == tbs) { + constexpr units::bits MAX_BITS_CRC16{3824}; + crc_calculator& tb_crc = (tbs <= MAX_BITS_CRC16) ? *crc16 : *crc24a; + units::bits nof_tb_crc_bits = units::bits(get_crc_size(tb_crc.get_generator_poly())); + + crc_calculator_checksum_t tb_checksum = tb_crc.calculate_byte(data); + for (unsigned i_checksum_byte = 0, i_checksum_byte_end = nof_tb_crc_bits.truncate_to_bytes().value(); + i_checksum_byte != i_checksum_byte_end; + ++i_checksum_byte) { + // Extract byte from the CRC. + unsigned tb_crc_byte = (tb_checksum >> (nof_tb_crc_bits.value() - (i_checksum_byte + 1) * 8)) & 0xffUL; + // Insert the byte at the end of the bit buffer. + cb_data.insert(tb_crc_byte, nof_used_bits.value(), 8); + // Increment the number of bits. + nof_used_bits += 8_bits; } - // Append filler bits as zeros. - while (nof_used_bits != config.cb_size) { + // Insert zero padding bits. + for (units::bits nof_used_bits_end = nof_used_bits + config.zero_pad; nof_used_bits != nof_used_bits_end;) { // Calculate the number of zeros to pad, no more than a byte at a time. - units::bits nof_zeros = std::min(8_bits, units::bits(config.cb_size) - nof_used_bits); + units::bits nof_zeros = std::min(8_bits, nof_used_bits_end - nof_used_bits); // Insert the zeros at the end of the bit buffer. cb_data.insert(0UL, nof_used_bits.value(), nof_zeros.value()); // Increment the number of bits. nof_used_bits += nof_zeros; } + } + + // Append codeblock CRC if applicable. + if (config.has_cb_crc) { + crc_calculator& cb_crc = *crc24b; + + crc_calculator_checksum_t cb_checksum = cb_crc.calculate(cb_data.first(nof_used_bits.value())); + for (unsigned i_checksum_byte = 0, i_checksum_byte_end = 3; i_checksum_byte != i_checksum_byte_end; + ++i_checksum_byte) { + // Extract byte from the CRC. + unsigned cb_crc_byte = (cb_checksum >> (24 - (i_checksum_byte + 1) * 8)) & 0xffUL; + // Insert the byte at the end of the bit buffer. + cb_data.insert(cb_crc_byte, nof_used_bits.value(), 8); + // Increment the number of bits. + nof_used_bits += 8_bits; + } + } - // Encode the segment into a codeblock. - encoder->encode(rm_buffer, cb_data, config.metadata.tb_common); + // Append filler bits as zeros. + while (nof_used_bits != config.cb_size) { + // Calculate the number of zeros to pad, no more than a byte at a time. + units::bits nof_zeros = std::min(8_bits, units::bits(config.cb_size) - nof_used_bits); + // Insert the zeros at the end of the bit buffer. + cb_data.insert(0UL, nof_used_bits.value(), nof_zeros.value()); + // Increment the number of bits. + nof_used_bits += nof_zeros; } + // Prepare rate matching buffer. + rm_buffer.resize(config.metadata.cb_specific.full_length); + + // Encode the segment into a codeblock. + encoder->encode(rm_buffer, cb_data, config.metadata.tb_common); + // Rate match the codeblock. temp_packed_bits.resize(rm_length); rate_matcher->rate_match(temp_packed_bits, rm_buffer, config.metadata); diff --git a/lib/phy/upper/channel_processors/pdsch_codeblock_processor.h b/lib/phy/upper/channel_processors/pdsch_codeblock_processor.h index 6244daa0c6..048953819c 100644 --- a/lib/phy/upper/channel_processors/pdsch_codeblock_processor.h +++ b/lib/phy/upper/channel_processors/pdsch_codeblock_processor.h @@ -52,8 +52,6 @@ class pdsch_codeblock_processor codeblock_metadata metadata; /// Set to true if codeblock CRC is applicable. bool has_cb_crc; - /// Set to true if it belongs to a new PDSCH transmission. - bool new_data; /// Scrambling pseudo-random generator initial state. pseudo_random_generator::state_s c_init; }; @@ -99,12 +97,10 @@ class pdsch_codeblock_processor /// The PDSCH codeblock processing includes transport and code block CRC attachment if applicable, LDPC encoding, /// rate matching, bit packing, scrambling and modulation. /// - /// \param[in] rm_buffer Buffer for storing temporary, full-length codeblocks, between the LDPC encoder and the LDPC - /// rate matcher. /// \param[in] data Original transport block data without CRC. /// \param[in] config Required parameters for processing a codeblock. /// \return A struct with the results. - result process(bit_buffer rm_buffer, span data, const configuration& config); + result process(span data, const configuration& config); /// Gets the QAM modulation scaling, as per TS38.211 Section 5.1. float get_scaling(modulation_scheme modulation) @@ -141,6 +137,8 @@ class pdsch_codeblock_processor static_bit_buffer temp_packed_bits; /// Buffer for storing the codeblock symbols. std::array temp_cb_symbols; + /// Temporary rate match buffer. + static_bit_buffer rm_buffer; }; } // namespace srsran diff --git a/lib/phy/upper/channel_processors/pdsch_encoder_hw_impl.cpp b/lib/phy/upper/channel_processors/pdsch_encoder_hw_impl.cpp index 5ab813d806..41e0a2c6f8 100644 --- a/lib/phy/upper/channel_processors/pdsch_encoder_hw_impl.cpp +++ b/lib/phy/upper/channel_processors/pdsch_encoder_hw_impl.cpp @@ -20,7 +20,6 @@ using namespace srsran::ldpc; static constexpr units::bits SEG_CRC_LENGTH{24}; void pdsch_encoder_hw_impl::encode(span codeword, - tx_buffer& softbuffer, span transport_block, const configuration& config) { diff --git a/lib/phy/upper/channel_processors/pdsch_encoder_hw_impl.h b/lib/phy/upper/channel_processors/pdsch_encoder_hw_impl.h index bc811f5598..1beae875d0 100644 --- a/lib/phy/upper/channel_processors/pdsch_encoder_hw_impl.h +++ b/lib/phy/upper/channel_processors/pdsch_encoder_hw_impl.h @@ -73,10 +73,7 @@ class pdsch_encoder_hw_impl : public pdsch_encoder } // See interface for the documentation. - void encode(span codeword, - tx_buffer& softbuffer, - span transport_block, - const configuration& config) override; + void encode(span codeword, span transport_block, const configuration& config) override; private: /// Defines if the PDSCH encoder operates in CB mode (true) or TB mode (false). diff --git a/lib/phy/upper/channel_processors/pdsch_encoder_impl.cpp b/lib/phy/upper/channel_processors/pdsch_encoder_impl.cpp index 445cfa2607..cf342afc87 100644 --- a/lib/phy/upper/channel_processors/pdsch_encoder_impl.cpp +++ b/lib/phy/upper/channel_processors/pdsch_encoder_impl.cpp @@ -9,13 +9,11 @@ */ #include "pdsch_encoder_impl.h" -#include "srsran/phy/upper/tx_buffer.h" #include "srsran/srsvec/bit.h" using namespace srsran; void pdsch_encoder_impl::encode(span codeword, - tx_buffer& buffer, span transport_block, const configuration& config) { @@ -33,24 +31,16 @@ void pdsch_encoder_impl::encode(span codeword, // Segmentation (it includes CRC attachment for the entire transport block and each individual segment). segmenter->segment(d_segments, transport_block, segmenter_cfg); - // Make sure the number of codeblocks match the number of segments. - srsran_assert(buffer.get_nof_codeblocks() == d_segments.size(), - "The number of codeblocks in the buffer (i.e., {}) are not equal to the number of segments (i.e., {}).", - buffer.get_nof_codeblocks(), - d_segments.size()); - unsigned offset = 0; for (unsigned i_cb = 0, i_cb_end = d_segments.size(); i_cb != i_cb_end; ++i_cb) { // Select segment description. const described_segment& descr_seg = d_segments[i_cb]; - // Get rate matching buffer from the buffer. - bit_buffer rm_buffer = buffer.get_codeblock(i_cb, descr_seg.get_metadata().cb_specific.full_length); + // Prepare rate matching buffer. + rm_buffer.resize(descr_seg.get_metadata().cb_specific.full_length); - if (config.new_data) { - // Encode the segment into a codeblock. - encoder->encode(rm_buffer, descr_seg.get_data(), descr_seg.get_metadata().tb_common); - } + // Encode the segment into a codeblock. + encoder->encode(rm_buffer, descr_seg.get_data(), descr_seg.get_metadata().tb_common); // Select the correct chunk of the output codeword. unsigned rm_length = descr_seg.get_metadata().cb_specific.rm_length; diff --git a/lib/phy/upper/channel_processors/pdsch_encoder_impl.h b/lib/phy/upper/channel_processors/pdsch_encoder_impl.h index 6afe1c586b..bfabd44ad3 100644 --- a/lib/phy/upper/channel_processors/pdsch_encoder_impl.h +++ b/lib/phy/upper/channel_processors/pdsch_encoder_impl.h @@ -41,10 +41,7 @@ class pdsch_encoder_impl : public pdsch_encoder } // See interface for the documentation. - void encode(span codeword, - tx_buffer& rm_buffer, - span transport_block, - const configuration& config) override; + void encode(span codeword, span transport_block, const configuration& config) override; private: /// Pointer to an LDPC segmenter. @@ -62,6 +59,8 @@ class pdsch_encoder_impl : public pdsch_encoder static constexpr units::bits MAX_CB_LENGTH{3 * MAX_SEG_LENGTH.value()}; /// Buffer for storing temporary encoded and packed codeblock. static_bit_buffer codeblock_packed; + /// Temporary rate match buffer. + static_bit_buffer rm_buffer; }; } // namespace srsran diff --git a/lib/phy/upper/channel_processors/pdsch_processor_concurrent_impl.cpp b/lib/phy/upper/channel_processors/pdsch_processor_concurrent_impl.cpp index c5944d35c7..9a1bd8126b 100644 --- a/lib/phy/upper/channel_processors/pdsch_processor_concurrent_impl.cpp +++ b/lib/phy/upper/channel_processors/pdsch_processor_concurrent_impl.cpp @@ -12,20 +12,17 @@ #include "pdsch_processor_validator_impl.h" #include "srsran/instrumentation/traces/du_traces.h" #include "srsran/phy/support/resource_grid_mapper.h" -#include "srsran/phy/upper/tx_buffer.h" -#include "srsran/phy/upper/unique_tx_buffer.h" #include "srsran/support/event_tracing.h" using namespace srsran; void pdsch_processor_concurrent_impl::process(resource_grid_mapper& mapper_, - unique_tx_buffer rm_buffer_, pdsch_processor_notifier& notifier_, static_vector, MAX_NOF_TRANSPORT_BLOCKS> data_, const pdsch_processor::pdu_t& pdu_) { // Saves inputs. - save_inputs(mapper_, std::move(rm_buffer_), notifier_, data_, pdu_); + save_inputs(mapper_, notifier_, data_, pdu_); // Makes sure the PDU is valid. pdsch_processor_validator_impl::assert_pdu(config); @@ -44,7 +41,6 @@ void pdsch_processor_concurrent_impl::process(resource_grid_mapper& } void pdsch_processor_concurrent_impl::save_inputs(resource_grid_mapper& mapper_, - unique_tx_buffer rm_buffer_, pdsch_processor_notifier& notifier_, static_vector, MAX_NOF_TRANSPORT_BLOCKS> data_, const pdsch_processor::pdu_t& pdu) @@ -52,14 +48,10 @@ void pdsch_processor_concurrent_impl::save_inputs(resource_grid_mapper& mapp using namespace units::literals; // Save process parameter inputs. - mapper = &mapper_; - notifier = ¬ifier_; - data = data_.front(); - config = pdu; - unique_rm_buffer = std::move(rm_buffer_); - - // verify buffer is valid. - srsran_assert(unique_rm_buffer.is_valid(), "Invalid buffer."); + mapper = &mapper_; + notifier = ¬ifier_; + data = data_.front(); + config = pdu; // Codeword index is fix. static constexpr unsigned i_cw = 0; @@ -279,19 +271,14 @@ void pdsch_processor_concurrent_impl::fork_cb_batches() cb_config.cb_size = segment_length; cb_config.zero_pad = zero_pad; cb_config.metadata = cb_metadata; - cb_config.new_data = config.codewords.front().new_data; cb_config.c_init = scrambling_state; // Update codeblock specific metadata fields. cb_config.metadata.cb_specific.cw_offset = cw_offset[absolute_i_cb].value(); cb_config.metadata.cb_specific.rm_length = rm_length[absolute_i_cb].value(); - // Get rate matching buffer. - bit_buffer rm_buffer = - unique_rm_buffer.get().get_codeblock(absolute_i_cb, cb_config.metadata.cb_specific.full_length); - // Process codeblock. - pdsch_codeblock_processor::result result = cb_processor.process(rm_buffer, data, cb_config); + pdsch_codeblock_processor::result result = cb_processor.process(data, cb_config); // Build resource grid mapper adaptor. resource_grid_mapper::symbol_buffer_adapter buffer(result.cb_symbols); @@ -305,9 +292,6 @@ void pdsch_processor_concurrent_impl::fork_cb_batches() // Decrement code block batch counter. if (cb_batch_counter.fetch_sub(1) == 1) { - // Unlock buffer. - unique_rm_buffer = unique_tx_buffer(); - // Decrement asynchronous task counter. if (async_task_counter.fetch_sub(1) == 1) { // Notify end of the processing. diff --git a/lib/phy/upper/channel_processors/pdsch_processor_concurrent_impl.h b/lib/phy/upper/channel_processors/pdsch_processor_concurrent_impl.h index 9ccbf186cd..62baadaf28 100644 --- a/lib/phy/upper/channel_processors/pdsch_processor_concurrent_impl.h +++ b/lib/phy/upper/channel_processors/pdsch_processor_concurrent_impl.h @@ -14,7 +14,6 @@ #include "srsran/phy/upper/channel_processors/pdsch_processor.h" #include "srsran/phy/upper/sequence_generators/pseudo_random_generator.h" #include "srsran/phy/upper/signal_processors/dmrs_pdsch_processor.h" -#include "srsran/phy/upper/unique_tx_buffer.h" #include "srsran/support/executors/task_executor.h" #include "srsran/support/memory_pool/concurrent_thread_local_object_pool.h" @@ -53,7 +52,6 @@ class pdsch_processor_concurrent_impl : public pdsch_processor // See interface for documentation. void process(resource_grid_mapper& mapper, - unique_tx_buffer rm_buffer, pdsch_processor_notifier& notifier, static_vector, MAX_NOF_TRANSPORT_BLOCKS> data, const pdu_t& pdu) override; @@ -69,7 +67,6 @@ class pdsch_processor_concurrent_impl : public pdsch_processor /// Saves process() parameters for future uses during an asynchronous execution. void save_inputs(resource_grid_mapper& mapper, - unique_tx_buffer rm_buffer, pdsch_processor_notifier& notifier, static_vector, MAX_NOF_TRANSPORT_BLOCKS> data, const pdu_t& pdu); @@ -93,7 +90,6 @@ class pdsch_processor_concurrent_impl : public pdsch_processor pdsch_processor_notifier* notifier; span data; pdsch_processor::pdu_t config; - unique_tx_buffer unique_rm_buffer; /// Transport block size of the current transmission. units::bits tbs; diff --git a/lib/phy/upper/channel_processors/pdsch_processor_impl.cpp b/lib/phy/upper/channel_processors/pdsch_processor_impl.cpp index 7bb8563290..7bccc2800a 100644 --- a/lib/phy/upper/channel_processors/pdsch_processor_impl.cpp +++ b/lib/phy/upper/channel_processors/pdsch_processor_impl.cpp @@ -10,14 +10,12 @@ #include "pdsch_processor_impl.h" #include "pdsch_processor_validator_impl.h" -#include "srsran/phy/upper/unique_tx_buffer.h" #include "srsran/srsvec/bit.h" #include "srsran/srsvec/copy.h" using namespace srsran; void pdsch_processor_impl::process(resource_grid_mapper& mapper, - unique_tx_buffer rm_buffer, pdsch_processor_notifier& notifier, static_vector, MAX_NOF_TRANSPORT_BLOCKS> data, const pdsch_processor::pdu_t& pdu) @@ -47,7 +45,7 @@ void pdsch_processor_impl::process(resource_grid_mapper& // Encode each codeword. for (unsigned codeword_id = 0; codeword_id != nof_codewords; ++codeword_id) { unsigned nof_layers_cw = (codeword_id == 0) ? nof_layers_cw0 : nof_layers_cw1; - const bit_buffer& codeword = encode(*rm_buffer, data[codeword_id], codeword_id, nof_layers_cw, nof_re_pdsch, pdu); + const bit_buffer& codeword = encode(data[codeword_id], codeword_id, nof_layers_cw, nof_re_pdsch, pdu); codewords.emplace_back(codeword); } @@ -86,8 +84,7 @@ unsigned pdsch_processor_impl::compute_nof_data_re(const pdu_t& pdu) return nof_grid_re - nof_reserved_re; } -const bit_buffer& pdsch_processor_impl::encode(tx_buffer& rm_buffer, - span data, +const bit_buffer& pdsch_processor_impl::encode(span data, unsigned codeword_id, unsigned nof_layers, unsigned Nre, @@ -100,7 +97,6 @@ const bit_buffer& pdsch_processor_impl::encode(tx_buffer& rm_buffer, // Prepare encoder configuration. pdsch_encoder::configuration encoder_config; - encoder_config.new_data = pdu.codewords[codeword_id].new_data; encoder_config.base_graph = pdu.ldpc_base_graph; encoder_config.rv = rv; encoder_config.mod = modulation; @@ -112,7 +108,7 @@ const bit_buffer& pdsch_processor_impl::encode(tx_buffer& rm_buffer, span codeword = tmp_codeword.first(Nre * nof_layers * get_bits_per_symbol(modulation)); // Encode codeword. - encoder->encode(codeword, rm_buffer, data, encoder_config); + encoder->encode(codeword, data, encoder_config); // Pack encoded bits. temp_packed_codewords[codeword_id].resize(codeword.size()); diff --git a/lib/phy/upper/channel_processors/pdsch_processor_impl.h b/lib/phy/upper/channel_processors/pdsch_processor_impl.h index 62c27c7aac..2c16ff663b 100644 --- a/lib/phy/upper/channel_processors/pdsch_processor_impl.h +++ b/lib/phy/upper/channel_processors/pdsch_processor_impl.h @@ -35,7 +35,6 @@ class pdsch_processor_impl : public pdsch_processor // See interface for documentation. void process(resource_grid_mapper& mapper, - unique_tx_buffer rm_buffer, pdsch_processor_notifier& notifier, static_vector, MAX_NOF_TRANSPORT_BLOCKS> data, const pdu_t& pdu) override; @@ -51,19 +50,14 @@ class pdsch_processor_impl : public pdsch_processor /// \brief Encodes a codeword as per TS 38.212 section 7.2. /// - /// \param[in,out] rm_buffer Rate matcher buffer. /// \param[in] data Provides the data to transmit as packed bits. /// \param[in] codeword_id Indicates the codeword identifier. /// \param[in] nof_layers Indicates the number of layers the codeword is mapped on to. /// \param[in] Nre Indicates the number of resource elements used for PDSCH mapping. /// \param[in] pdu Provides the PDSCH processor PDU. /// \return A view of the encoded codeword. - const bit_buffer& encode(tx_buffer& rm_buffer, - span data, - unsigned codeword_id, - unsigned nof_layers, - unsigned Nre, - const pdu_t& pdu); + const bit_buffer& + encode(span data, unsigned codeword_id, unsigned nof_layers, unsigned Nre, const pdu_t& pdu); /// \brief Modulates a PDSCH transmission as per TS 38.211 section 7.3.1. /// \param[out] mapper Resource grid mapping interface. diff --git a/lib/phy/upper/channel_processors/pdsch_processor_lite_impl.cpp b/lib/phy/upper/channel_processors/pdsch_processor_lite_impl.cpp index e1b65fe47d..125a0c42cd 100644 --- a/lib/phy/upper/channel_processors/pdsch_processor_lite_impl.cpp +++ b/lib/phy/upper/channel_processors/pdsch_processor_lite_impl.cpp @@ -11,8 +11,6 @@ #include "pdsch_processor_lite_impl.h" #include "pdsch_processor_validator_impl.h" #include "srsran/phy/support/resource_grid_mapper.h" -#include "srsran/phy/upper/tx_buffer.h" -#include "srsran/phy/upper/unique_tx_buffer.h" #include "srsran/ran/dmrs.h" using namespace srsran; @@ -47,14 +45,10 @@ static unsigned compute_nof_data_re(const pdsch_processor::pdu_t& pdu) return nof_grid_re - nof_reserved_re; } -void pdsch_block_processor::configure_new_transmission(unique_tx_buffer rm_buffer_, - span data, +void pdsch_block_processor::configure_new_transmission(span data, unsigned i_cw, const pdsch_processor::pdu_t& pdu) { - new_data = pdu.codewords.front().new_data; - unique_rm_buffer = std::move(rm_buffer_); - // The number of layers is equal to the number of ports. unsigned nof_layers = pdu.precoding.get_nof_layers(); @@ -104,14 +98,10 @@ void pdsch_block_processor::new_codeblock() unsigned nof_symbols = rm_length / get_bits_per_symbol(modulation); // Resize internal buffer to match data from the encoder to the rate matcher (all segments have the same length). - bit_buffer rm_buffer = - unique_rm_buffer.get().get_codeblock(next_i_cb, descr_seg.get_metadata().cb_specific.full_length); + rm_buffer.resize(descr_seg.get_metadata().cb_specific.full_length); - // Encode only if it is a new transmission. - if (new_data) { - // Encode the segment into a codeblock. - encoder.encode(rm_buffer, descr_seg.get_data(), descr_seg.get_metadata().tb_common); - } + // Encode the segment into a codeblock. + encoder.encode(rm_buffer, descr_seg.get_data(), descr_seg.get_metadata().tb_common); // Rate match the codeblock. temp_codeblock.resize(rm_length); @@ -126,11 +116,6 @@ void pdsch_block_processor::new_codeblock() // Increment codeblock counter. ++next_i_cb; - - // Unlock buffer if all the codeblocks have been processed. - if (next_i_cb == d_segments.size()) { - unique_rm_buffer = unique_tx_buffer(); - } } span pdsch_block_processor::pop_symbols(unsigned block_size) @@ -175,7 +160,6 @@ bool pdsch_block_processor::empty() const } void pdsch_processor_lite_impl::process(resource_grid_mapper& mapper, - unique_tx_buffer rm_buffer, pdsch_processor_notifier& notifier, static_vector, MAX_NOF_TRANSPORT_BLOCKS> data, const pdu_t& pdu) @@ -183,7 +167,7 @@ void pdsch_processor_lite_impl::process(resource_grid_mapper& pdsch_processor_validator_impl::assert_pdu(pdu); // Configure new transmission. - subprocessor.configure_new_transmission(std::move(rm_buffer), data[0], 0, pdu); + subprocessor.configure_new_transmission(data[0], 0, pdu); // Get the PRB allocation mask. const bounded_bitset prb_allocation_mask = pdu.freq_alloc.get_prb_mask(pdu.bwp_start_rb, pdu.bwp_size_rb); diff --git a/lib/phy/upper/channel_processors/pdsch_processor_lite_impl.h b/lib/phy/upper/channel_processors/pdsch_processor_lite_impl.h index cf68c07592..6e8bb3be37 100644 --- a/lib/phy/upper/channel_processors/pdsch_processor_lite_impl.h +++ b/lib/phy/upper/channel_processors/pdsch_processor_lite_impl.h @@ -18,7 +18,6 @@ #include "srsran/phy/upper/channel_processors/pdsch_processor.h" #include "srsran/phy/upper/sequence_generators/pseudo_random_generator.h" #include "srsran/phy/upper/signal_processors/dmrs_pdsch_processor.h" -#include "srsran/phy/upper/unique_tx_buffer.h" #include "srsran/ran/pdsch/pdsch_constants.h" #include "srsran/srsvec/bit.h" @@ -38,14 +37,10 @@ class pdsch_block_processor : public resource_grid_mapper::symbol_buffer } /// \brief Configures a new transmission. - /// \param[in,out] rm_buffer Rate matcher buffer. /// \param[in] data Transport block data. /// \param[in] i_cw Codeword index. /// \param[in] pdu PDSCH transmission parameters. - void configure_new_transmission(unique_tx_buffer rm_buffer, - span data, - unsigned i_cw, - const pdsch_processor::pdu_t& pdu); + void configure_new_transmission(span data, unsigned i_cw, const pdsch_processor::pdu_t& pdu); // See interface for documentation. unsigned get_max_block_size() const override; @@ -78,14 +73,12 @@ class pdsch_block_processor : public resource_grid_mapper::symbol_buffer static_bit_buffer temp_codeblock; /// Current transmission modulation. modulation_scheme modulation; - /// Set to true if it is a new transmission. - bool new_data; /// Current codeblock index. unsigned next_i_cb = 0; /// Temporary storage of codeblock symbols. + static_bit_buffer rm_buffer; + /// Temporary storage of codeblock symbols. std::array temp_codeblock_symbols; - /// Rate matching soft buffer. - unique_tx_buffer unique_rm_buffer; /// Current view of the codeblock modulated symbols. span codeblock_symbols; @@ -119,7 +112,6 @@ class pdsch_processor_lite_impl : public pdsch_processor // See interface for documentation. void process(resource_grid_mapper& mapper, - unique_tx_buffer rm_buffer, pdsch_processor_notifier& notifier, static_vector, MAX_NOF_TRANSPORT_BLOCKS> data, const pdu_t& pdu) override; diff --git a/lib/phy/upper/channel_processors/pdsch_processor_pool.h b/lib/phy/upper/channel_processors/pdsch_processor_pool.h index 11e9654834..142a7aa92e 100644 --- a/lib/phy/upper/channel_processors/pdsch_processor_pool.h +++ b/lib/phy/upper/channel_processors/pdsch_processor_pool.h @@ -45,7 +45,6 @@ class pdsch_processor_wrapper : private pdsch_processor, private pdsch_processor // See pdsch_processor interface for documentation. void process(resource_grid_mapper& mapper, - unique_tx_buffer rm_buffer, pdsch_processor_notifier& notifier_, static_vector, pdsch_processor::MAX_NOF_TRANSPORT_BLOCKS> data, const pdsch_processor::pdu_t& pdu) override @@ -54,7 +53,7 @@ class pdsch_processor_wrapper : private pdsch_processor, private pdsch_processor notifier = ¬ifier_; // Process. - processor->process(mapper, std::move(rm_buffer), *this, data, pdu); + processor->process(mapper, *this, data, pdu); } private: @@ -99,7 +98,6 @@ class pdsch_processor_pool : public pdsch_processor } void process(resource_grid_mapper& mapper, - unique_tx_buffer rm_buffer, pdsch_processor_notifier& notifier, static_vector, MAX_NOF_TRANSPORT_BLOCKS> data, const pdu_t& pdu) override @@ -115,7 +113,7 @@ class pdsch_processor_pool : public pdsch_processor } // Process PDSCH. - processors[index.value()].process(mapper, std::move(rm_buffer), notifier, data, pdu); + processors[index.value()].process(mapper, notifier, data, pdu); } private: diff --git a/lib/phy/upper/downlink_processor_single_executor_impl.cpp b/lib/phy/upper/downlink_processor_single_executor_impl.cpp index e3d1c442b4..de8fd438b1 100644 --- a/lib/phy/upper/downlink_processor_single_executor_impl.cpp +++ b/lib/phy/upper/downlink_processor_single_executor_impl.cpp @@ -13,7 +13,6 @@ #include "srsran/phy/support/resource_grid_mapper.h" #include "srsran/phy/upper/channel_processors/channel_processor_formatters.h" #include "srsran/phy/upper/signal_processors/signal_processor_formatters.h" -#include "srsran/phy/upper/unique_tx_buffer.h" #include "srsran/phy/upper/upper_phy_rg_gateway.h" #include "srsran/support/executors/task_executor.h" @@ -85,7 +84,6 @@ void downlink_processor_single_executor_impl::process_pdcch(const pdcch_processo } void downlink_processor_single_executor_impl::process_pdsch( - unique_tx_buffer rm_buffer, const static_vector, pdsch_processor::MAX_NOF_TRANSPORT_BLOCKS>& data, const pdsch_processor::pdu_t& pdu) { @@ -104,13 +102,13 @@ void downlink_processor_single_executor_impl::process_pdsch( } // Try to enqueue the PDU processing task. - bool enqueued = executor.execute([this, sb = std::move(rm_buffer), data, pdu]() mutable { + bool enqueued = executor.execute([this, data, pdu]() mutable { trace_point process_pdsch_tp = l1_tracer.now(); // Do not execute if the grid is not available. if (current_grid != nullptr) { resource_grid_mapper& mapper = current_grid->get_mapper(); - pdsch_proc->process(mapper, std::move(sb), pdsch_notifier, data, pdu); + pdsch_proc->process(mapper, pdsch_notifier, data, pdu); l1_tracer << trace_event("process_pdsch", process_pdsch_tp); } else { diff --git a/lib/phy/upper/downlink_processor_single_executor_impl.h b/lib/phy/upper/downlink_processor_single_executor_impl.h index 613214388f..ad74503eef 100644 --- a/lib/phy/upper/downlink_processor_single_executor_impl.h +++ b/lib/phy/upper/downlink_processor_single_executor_impl.h @@ -75,8 +75,7 @@ class downlink_processor_single_executor_impl : public downlink_processor, priva void process_pdcch(const pdcch_processor::pdu_t& pdu) override; // See interface for documentation. - void process_pdsch(unique_tx_buffer rm_buffer, - const static_vector, pdsch_processor::MAX_NOF_TRANSPORT_BLOCKS>& data, + void process_pdsch(const static_vector, pdsch_processor::MAX_NOF_TRANSPORT_BLOCKS>& data, const pdsch_processor::pdu_t& pdu) override; // See interface for documentation. diff --git a/lib/phy/upper/tx_buffer_codeblock_pool.h b/lib/phy/upper/tx_buffer_codeblock_pool.h deleted file mode 100644 index 2d3c63d37d..0000000000 --- a/lib/phy/upper/tx_buffer_codeblock_pool.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * - * Copyright 2021-2024 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. - * - */ - -#pragma once - -#include "srsran/adt/bit_buffer.h" -#include "srsran/adt/concurrent_queue.h" -#include "srsran/adt/optional.h" -#include "srsran/support/srsran_assert.h" -#include -#include - -namespace srsran { - -/// Manages a transmit codeblock buffer pool. -class tx_buffer_codeblock_pool -{ -private: - /// Codeblock identifier list type. - using codeblock_identifier_list = - concurrent_queue; - - /// Stores all codeblock entries. - std::vector data; - /// List containing the free codeblocks identifiers. - codeblock_identifier_list free_list; - -public: - /// Default CB identifier for unreserved codeblocks. - static constexpr unsigned UNRESERVED_CB_ID = UINT32_MAX; - - /// \brief Creates a transmit buffer codeblock pool. - /// \param[in] nof_codeblocks The maximum number of codeblocks. - /// \param[in] max_codeblock_size The maximum codeblock size. - /// \param[in] external_data Set to true to indicate that bits are not stored in the buffer. - tx_buffer_codeblock_pool(unsigned nof_codeblocks, unsigned max_codeblock_size, bool external_data) : - free_list(nof_codeblocks) - { - data.resize(nof_codeblocks); - unsigned cb_id = 0; - for (dynamic_bit_buffer& e : data) { - e.resize(external_data ? 0 : max_codeblock_size); - while (!free_list.try_push(cb_id++)) { - } - } - } - - /// \brief Reserves a codeblock buffer. - /// \return The codeblock identifier in the pool if it is reserved successfully. Otherwise, \c UNRESERVED_CB_ID - optional reserve() - { - // Try to get an available codeblock. - return free_list.try_pop(); - } - - /// \brief Frees a codeblock buffer. - /// \param[in] cb_id Codeblock identifier in the pool. - void free(unsigned cb_id) - { - // Skip if the codeblock identifier is equal to the unreserved identifier. - if (cb_id == UNRESERVED_CB_ID) { - return; - } - - // Push codeblock identifier back in the pool. - while (!free_list.try_push(cb_id)) { - } - } - - /// \brief Gets a read-write codeblock bit buffer. - /// \param[in] cb_id Codeblock identifier. - /// \return A bit buffer with the codeblock buffer. - bit_buffer& get_data(unsigned cb_id) - { - srsran_assert( - cb_id < data.size(), "Codeblock identifier (i.e., {}) exceeds the pool size (i.e., {}).", cb_id, data.size()); - return data[cb_id]; - } - - /// \brief Gets a read-only codeblock bit buffer. - /// \param[in] cb_id Codeblock identifier. - /// \return A bit buffer with the codeblock buffer. - const bit_buffer& get_data(unsigned cb_id) const - { - srsran_assert( - cb_id < data.size(), "Codeblock identifier (i.e., {}) exceeds the pool size (i.e., {}).", cb_id, data.size()); - return data[cb_id]; - } -}; - -} // namespace srsran diff --git a/lib/phy/upper/tx_buffer_impl.h b/lib/phy/upper/tx_buffer_impl.h deleted file mode 100644 index ab9663feeb..0000000000 --- a/lib/phy/upper/tx_buffer_impl.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - * - * Copyright 2021-2024 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. - * - */ - -#pragma once - -#include "tx_buffer_codeblock_pool.h" -#include "srsran/adt/bit_buffer.h" -#include "srsran/adt/optional.h" -#include "srsran/adt/span.h" -#include "srsran/adt/static_vector.h" -#include "srsran/phy/upper/log_likelihood_ratio.h" -#include "srsran/phy/upper/tx_buffer_pool.h" -#include "srsran/phy/upper/unique_tx_buffer.h" -#include "srsran/ran/sch/sch_constants.h" -#include "srsran/support/srsran_assert.h" -#include -#include - -namespace srsran { - -enum class tx_buffer_status : uint8_t { successful = 0, already_in_use, insufficient_cb }; - -/// Implements a transmiter buffer interface. -class tx_buffer_impl : public unique_tx_buffer::callback -{ -private: - /// Internal buffer states. - enum class state : uint8_t { - /// \brief The buffer has not been configured with any codeblock. - /// - /// It is available for being reserved. - available, - /// \brief The buffer is reserved with a number of codeblocks. - /// - /// It allows: - /// -\c expire: called when the buffer context has expired, it transitions to \c available. - /// -\c reserve: makes a new reservation. - reserved, - /// \brief The buffer is reserved and locked in a context. It does not accept new reservations or retransmissions, - /// and prevents the buffer from expiring. - /// - /// It allows: - /// - \c unlock: a transmission did not match the CRC, it transitions to \c reserved; and - /// - \c release: a transmission matched the CRC and the buffer releases all its resources, it transitions to \c - /// available. - locked - }; - - /// Current buffer state. - std::atomic current_state = {state::available}; - /// Reference to the codeblock pool. - tx_buffer_codeblock_pool& codeblock_pool; - /// Stores codeblocks CRCs. - static_vector crc; - /// Stores codeblock identifiers. - static_vector codeblock_ids; - - /// Frees reserved codeblocks. The codeblocks are returned to the pool. - void free() - { - // Free all codeblocks. - for (unsigned cb_id : codeblock_ids) { - codeblock_pool.free(cb_id); - } - - // Indicate the buffer is available by clearing the codeblocks identifiers. - codeblock_ids.clear(); - } - -public: - /// \brief Creates a receive buffer. - /// \param pool Codeblock buffer pool. - explicit tx_buffer_impl(tx_buffer_codeblock_pool& pool) : codeblock_pool(pool) - { - // Do nothing. - } - - /// Copy constructor - creates another buffer with the same codeblock pool. - tx_buffer_impl(const tx_buffer_impl& other) noexcept : codeblock_pool(other.codeblock_pool) {} - - /// Move constructor - creates another buffer with the same codeblock pool. - tx_buffer_impl(tx_buffer_impl&& other) noexcept : codeblock_pool(other.codeblock_pool) {} - - /// \brief Reserves a number of codeblocks from the pool. - /// \param nof_codeblocks Number of codeblocks to reserve. - /// \return The reservation status. - tx_buffer_status reserve(unsigned nof_codeblocks) - { - // It cannot reserve resources if it is locked. - if (current_state.load() == state::locked) { - return tx_buffer_status::already_in_use; - } - - // If the current number of codeblocks is larger than required, free the excess of codeblocks. - while (codeblock_ids.size() > nof_codeblocks) { - // Get the codeblock identifier at the back and remove from the list. - unsigned cb_id = codeblock_ids.back(); - codeblock_ids.pop_back(); - - // Free the codeblock. - codeblock_pool.free(cb_id); - } - - // If the current number of codeblocks is less than required, reserve the remaining codeblocks. - while (codeblock_ids.size() < nof_codeblocks) { - // Reserve codeblock. - optional cb_id = codeblock_pool.reserve(); - - // Free the entire buffer if one codeblock cannot be reserved. - if (!cb_id.has_value()) { - free(); - current_state = state::available; - return tx_buffer_status::insufficient_cb; - } - - // Append the codeblock identifier to the list. - codeblock_ids.push_back(cb_id.value()); - } - - // Resize CRCs. - crc.resize(nof_codeblocks); - - current_state = state::reserved; - - return tx_buffer_status::successful; - } - - // See interface for documentation. - unsigned get_nof_codeblocks() const override { return crc.size(); } - - // See interface for documentation. - unsigned get_absolute_codeblock_id(unsigned codeblock_id) const override - { - srsran_assert(codeblock_id < codeblock_ids.size(), - "Codeblock index ({}) is out of range ({}).", - codeblock_id, - codeblock_ids.size()); - return codeblock_ids[codeblock_id]; - } - - // See interface for documentation. - bit_buffer get_codeblock(unsigned codeblock_id, unsigned codeblock_size) override - { - srsran_assert(codeblock_id < codeblock_ids.size(), - "Codeblock index (i.e., {}) exceeds the number of buffers (i.e., {}).", - codeblock_id, - codeblock_ids.size()); - unsigned cb_id = codeblock_ids[codeblock_id]; - unsigned cb_max_size = codeblock_pool.get_data(cb_id).size(); - srsran_assert( - codeblock_size <= cb_max_size, "Codeblock size {} exceeds maximum size {}.", codeblock_size, cb_max_size); - return codeblock_pool.get_data(cb_id).first(codeblock_size); - } - - // See interface for documentation. - void lock() override - { - state previous_state = current_state.exchange(state::locked); - srsran_assert(previous_state == state::reserved, "Failed to lock. Invalid state."); - } - - // See interface for documentation. - void unlock() override - { - state previous_state = current_state.exchange(state::reserved); - srsran_assert(previous_state == state::locked, "Failed to unlock. Invalid state."); - } - - /// Returns true if the buffer is free. - bool is_free() const { return current_state == state::available; } - - /// Returns true if the buffer is locked. - bool is_locked() const { return current_state == state::locked; } - - /// \brief Expires the buffer. - /// - /// The buffer pool shall use this method when the buffer expires. The buffer frees the reserved codeblocks if it is - /// not blocked. - /// - /// \return \c true if the buffer is not locked. - bool expire() - { - state expected_state = state::reserved; - bool from_reserved = current_state.compare_exchange_weak(expected_state, state::available); - - // The buffer cannot be freed if it is locked. - if (!from_reserved) { - return false; - } - - // Release resources. - free(); - - return true; - } -}; - -} // namespace srsran diff --git a/lib/phy/upper/tx_buffer_pool_impl.cpp b/lib/phy/upper/tx_buffer_pool_impl.cpp deleted file mode 100644 index 77dfc8a798..0000000000 --- a/lib/phy/upper/tx_buffer_pool_impl.cpp +++ /dev/null @@ -1,191 +0,0 @@ -/* - * - * Copyright 2021-2024 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 "tx_buffer_pool_impl.h" -#include "tx_buffer_impl.h" -#include "srsran/phy/upper/trx_buffer_identifier.h" -#include "srsran/phy/upper/tx_buffer_pool.h" -#include "srsran/phy/upper/unique_tx_buffer.h" -#include "srsran/ran/slot_point.h" -#include -#include -#include -#include - -using namespace srsran; - -unique_tx_buffer -tx_buffer_pool_impl::reserve(const slot_point& slot, trx_buffer_identifier id, unsigned nof_codeblocks, bool new_data) -{ - // No more reservations are allowed if the pool is stopped. - if (stopped.load(std::memory_order_acquire)) { - return unique_tx_buffer(); - } - - // Try to find the HARQ identifier. - auto id_found = std::find(identifiers.begin(), identifiers.end(), id); - - // Find an available buffer if no buffer was found with the same identifier if new data is true, otherwise return an - // invalid buffer. - if (id_found == identifiers.end()) { - if (new_data) { - id_found = std::find(identifiers.begin(), identifiers.end(), trx_buffer_identifier::invalid()); - } else { - logger.warning(slot.sfn(), - slot.slot_index(), - "DL HARQ {}: failed to reserve, identifier for retransmissions not found.", - id); - return unique_tx_buffer(); - } - } - - // Report warning and return invalid buffer if no available buffer has been found. - if (id_found == identifiers.end()) { - logger.warning( - slot.sfn(), slot.slot_index(), "DL HARQ {}: failed to reserve, insufficient buffers in the pool.", id); - return unique_tx_buffer(); - } - - // Get buffer index within the pool. - unsigned i_buffer = id_found - identifiers.begin(); - - // Get reference to the buffer. - tx_buffer_impl& buffer = buffers[i_buffer]; - - // Make sure that the codeblocks do not change for retransmissions. - if (!new_data && nof_codeblocks != buffer.get_nof_codeblocks()) { - logger.warning(slot.sfn(), - slot.slot_index(), - "DL HARQ {}: failed to reserve, number of codeblocks for retransmissions do not match.", - id); - return unique_tx_buffer(); - } - - // Reserve codeblocks. - tx_buffer_status status = buffer.reserve(nof_codeblocks); - - // Report warning and return invalid buffer if the reservation is not successful. - if (status != tx_buffer_status::successful) { - logger.warning(slot.sfn(), - slot.slot_index(), - "DL HARQ {}: failed to reserve, {}.", - id, - (status == tx_buffer_status::already_in_use) ? "HARQ already in use" : "insufficient CBs"); - return unique_tx_buffer(); - } - - // Update identifier and expiration. - identifiers[i_buffer] = id; - expirations[i_buffer] = slot + expire_timeout_slots; - - // Create buffer. - return unique_tx_buffer(buffer); -} - -unique_tx_buffer tx_buffer_pool_impl::reserve(const slot_point& slot, unsigned nof_codeblocks) -{ - // No more reservations are allowed if the pool is stopped. - if (stopped) { - return unique_tx_buffer(); - } - - // Find an available buffer if no buffer was found with the same identifier. - auto id_found = std::find(identifiers.begin(), identifiers.end(), trx_buffer_identifier::invalid()); - - // Report warning and return invalid buffer if no available buffer has been found. - if (id_found == identifiers.end()) { - logger.warning( - slot.sfn(), slot.slot_index(), "DL HARQ invalid: failed to reserve, insufficient buffers in the pool."); - return unique_tx_buffer(); - } - - // Get buffer index within the pool. - unsigned i_buffer = id_found - identifiers.begin(); - - // Get reference to the buffer. - tx_buffer_impl& buffer = buffers[i_buffer]; - - // Reserve codeblocks. - tx_buffer_status status = buffer.reserve(nof_codeblocks); - - // Report warning and return invalid buffer if the reservation is not successful. - if (status != tx_buffer_status::successful) { - logger.warning(slot.sfn(), - slot.slot_index(), - "DL HARQ invalid: failed to reserve, {}.", - (status == tx_buffer_status::already_in_use) ? "HARQ already in use" : "insufficient CBs"); - return unique_tx_buffer(); - } - - // Update identifier and expiration. - identifiers[i_buffer] = trx_buffer_identifier::unknown(); - expirations[i_buffer] = slot + expire_timeout_slots; - - // Create buffer. - return unique_tx_buffer(buffer); -} - -void tx_buffer_pool_impl::run_slot(const slot_point& slot) -{ - // Predicate for finding available buffers. - auto pred = [](trx_buffer_identifier id) { return id != trx_buffer_identifier::invalid(); }; - - // Iterate over all the buffers that are currently reserved. - for (auto it = std::find_if(identifiers.begin(), identifiers.end(), pred); it != identifiers.end(); - it = std::find_if(++it, identifiers.end(), pred)) { - // Calculate buffer index. - unsigned i_buffer = it - identifiers.begin(); - - // Get reference to the buffer. - tx_buffer_impl& buffer = buffers[i_buffer]; - - // Determines whether the buffer is free. - bool is_free = buffer.is_free(); - - // A buffer is expired if the expiration slot is lower than or equal to the current slot. - if ((expirations[i_buffer] != null_expiration) && (expirations[i_buffer] <= slot)) { - // Try to expire the buffer. - is_free = buffer.expire(); - - // If the buffer is not available, increase the expiration time and continue to the next buffer. - if (!is_free) { - expirations[i_buffer] = slot + expire_timeout_slots; - } - } - - // Clear identifier and expiration. - if (is_free) { - identifiers[i_buffer] = trx_buffer_identifier::invalid(); - expirations[i_buffer] = null_expiration; - } - } -} -tx_buffer_pool& tx_buffer_pool_impl::get_pool() -{ - return *this; -} - -void tx_buffer_pool_impl::stop() -{ - // Signals the stop of the pool. No more reservation are allowed after this point. - stopped.store(true, std::memory_order_release); - - // Makes sure all buffers are unlocked. - for (const auto& buffer : buffers) { - while (buffer.is_locked()) { - std::this_thread::sleep_for(std::chrono::microseconds(10)); - } - } -} - -std::unique_ptr srsran::create_tx_buffer_pool(const tx_buffer_pool_config& config) -{ - return std::make_unique(config); -} diff --git a/lib/phy/upper/tx_buffer_pool_impl.h b/lib/phy/upper/tx_buffer_pool_impl.h deleted file mode 100644 index e9356b61d6..0000000000 --- a/lib/phy/upper/tx_buffer_pool_impl.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * - * Copyright 2021-2024 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. - * - */ - -#pragma once - -#include "tx_buffer_codeblock_pool.h" -#include "tx_buffer_impl.h" -#include "srsran/phy/upper/trx_buffer_identifier.h" -#include "srsran/phy/upper/tx_buffer_pool.h" -#include "srsran/phy/upper/unique_tx_buffer.h" -#include "srsran/ran/slot_point.h" -#include "srsran/srslog/logger.h" -#include "srsran/srslog/srslog.h" -#include -#include - -namespace srsran { - -/// Implements a PDSCH rate matcher buffer pool. -class tx_buffer_pool_impl : public tx_buffer_pool_controller, private tx_buffer_pool -{ -private: - /// No expiration time value. - const slot_point null_expiration = slot_point(); - - /// Set to true when the buffer pool stopped. - std::atomic stopped = {false}; - /// Code block buffer pool. - tx_buffer_codeblock_pool codeblock_pool; - /// Actual buffer pool. - std::vector buffers; - /// \brief List of buffer identifiers. - /// - /// Maps buffer identifiers to buffers. Each position indicates the buffer identifier assign to each of the buffers. - /// Buffers with \c trx_buffer_identifier::invalid() identifier are not reserved. - std::vector identifiers; - /// Tracks expiration times. - std::vector expirations; - - /// Indicates the lifetime of a buffer reservation as a number of slots. - unsigned expire_timeout_slots; - /// Logger. - srslog::basic_logger& logger; - - // See interface for documentation. - unique_tx_buffer - reserve(const slot_point& slot, trx_buffer_identifier id, unsigned nof_codeblocks, bool new_data) override; - - // See interface for documentation. - unique_tx_buffer reserve(const slot_point& slot, unsigned nof_codeblocks) override; - - // See interface for documentation. - void run_slot(const slot_point& slot) override; - -public: - /// \brief Creates a generic receiver buffer pool. - /// \param[in] config Provides the pool required parameters. - tx_buffer_pool_impl(const tx_buffer_pool_config& config) : - codeblock_pool(config.nof_codeblocks, config.max_codeblock_size, config.external_soft_bits), - buffers(config.nof_buffers, tx_buffer_impl(codeblock_pool)), - identifiers(config.nof_buffers, trx_buffer_identifier::invalid()), - expirations(config.nof_buffers, null_expiration), - expire_timeout_slots(config.expire_timeout_slots), - logger(srslog::fetch_basic_logger("PHY", true)) - { - } - - // See tx_buffer_pool_controller interface for documentation. - ~tx_buffer_pool_impl() override - { - srsran_assert(std::none_of(buffers.begin(), buffers.end(), [](const auto& buffer) { return buffer.is_locked(); }), - "A buffer is still locked."); - } - - // See tx_buffer_pool_controller interface for documentation. - tx_buffer_pool& get_pool() override; - - // See tx_buffer_pool_controller interface for documentation. - void stop() override; -}; - -} // namespace srsran diff --git a/lib/phy/upper/upper_phy_factories.cpp b/lib/phy/upper/upper_phy_factories.cpp index ac815a9900..3ae8c4d0e4 100644 --- a/lib/phy/upper/upper_phy_factories.cpp +++ b/lib/phy/upper/upper_phy_factories.cpp @@ -553,11 +553,8 @@ class upper_phy_factory_impl : public upper_phy_factory phy_config.dl_processor_pool = create_downlink_processor_pool(downlink_proc_factory, config); report_fatal_error_if_not(phy_config.dl_processor_pool, "Invalid downlink processor pool."); - phy_config.tx_buf_pool = create_tx_buffer_pool(config.tx_buffer_config); - report_fatal_error_if_not(phy_config.tx_buf_pool, "Invalid transmit buffer processor pool."); - phy_config.rx_buf_pool = create_rx_buffer_pool(config.rx_buffer_config); - report_fatal_error_if_not(phy_config.tx_buf_pool, "Invalid receive buffer processor pool."); + report_fatal_error_if_not(phy_config.rx_buf_pool, "Invalid receive buffer processor pool."); phy_config.ul_processor_pool = create_ul_processor_pool(*ul_processor_fact, config); report_fatal_error_if_not(phy_config.ul_processor_pool, "Invalid uplink processor pool."); diff --git a/lib/phy/upper/upper_phy_impl.cpp b/lib/phy/upper/upper_phy_impl.cpp index 923e893c0d..ebcebe2d22 100644 --- a/lib/phy/upper/upper_phy_impl.cpp +++ b/lib/phy/upper/upper_phy_impl.cpp @@ -30,7 +30,6 @@ static upper_phy_timing_notifier_dummy notifier_dummy; upper_phy_impl::upper_phy_impl(upper_phy_impl_config&& config) : logger(srslog::fetch_basic_logger("Upper PHY", true)), sector_id(config.sector_id), - tx_buf_pool(std::move(config.tx_buf_pool)), rx_buf_pool(std::move(config.rx_buf_pool)), dl_rg_pool(std::move(config.dl_rg_pool)), ul_rg_pool(std::move(config.ul_rg_pool)), @@ -53,7 +52,6 @@ upper_phy_impl::upper_phy_impl(upper_phy_impl_config&& config) : srsran_assert(ul_rg_pool, "Invalid uplink resource grid pool"); srsran_assert(ul_processor_pool, "Invalid uplink processor pool"); srsran_assert(prach_pool, "Invalid PRACH buffer pool"); - srsran_assert(tx_buf_pool, "Invalid transmit buffer pool"); srsran_assert(rx_buf_pool, "Invalid receive buffer pool"); srsran_assert(dl_pdu_validator, "Invalid downlink PDU validator"); srsran_assert(ul_pdu_validator, "Invalid uplink PDU validator"); @@ -134,13 +132,7 @@ const downlink_pdu_validator& upper_phy_impl::get_downlink_pdu_validator() const return *dl_pdu_validator; } -tx_buffer_pool& upper_phy_impl::get_tx_buffer_pool() -{ - return tx_buf_pool->get_pool(); -} - void upper_phy_impl::stop() { - tx_buf_pool->stop(); rx_buf_pool->stop(); } diff --git a/lib/phy/upper/upper_phy_impl.h b/lib/phy/upper/upper_phy_impl.h index c6d1ac65b8..72009d2a78 100644 --- a/lib/phy/upper/upper_phy_impl.h +++ b/lib/phy/upper/upper_phy_impl.h @@ -19,7 +19,6 @@ #include "srsran/phy/support/resource_grid_pool.h" #include "srsran/phy/upper/downlink_processor.h" #include "srsran/phy/upper/rx_buffer_pool.h" -#include "srsran/phy/upper/tx_buffer_pool.h" #include "srsran/phy/upper/uplink_processor.h" #include "srsran/phy/upper/upper_phy.h" #include "srsran/phy/upper/upper_phy_timing_handler.h" @@ -47,8 +46,6 @@ struct upper_phy_impl_config { std::unique_ptr ul_rg_pool; /// PRACH buffer pool. std::unique_ptr prach_pool; - /// Transmit buffer pool. - std::unique_ptr tx_buf_pool; /// Receive buffer pool. std::unique_ptr rx_buf_pool; /// Symbol request notifier. @@ -114,9 +111,6 @@ class upper_phy_impl : public upper_phy // See interface for documentation. resource_grid_pool& get_downlink_resource_grid_pool() override; - // See interface for documentation. - tx_buffer_pool& get_tx_buffer_pool() override; - // See interface for documentation. resource_grid_pool& get_uplink_resource_grid_pool() override; @@ -145,8 +139,6 @@ class upper_phy_impl : public upper_phy srslog::basic_logger& logger; /// Base station sector identifier. const unsigned sector_id; - /// Transmit buffer pool. - std::unique_ptr tx_buf_pool; /// Receive buffer pool. std::unique_ptr rx_buf_pool; /// Downlink resource grid pool. diff --git a/tests/benchmarks/phy/upper/channel_processors/pdsch_processor_benchmark.cpp b/tests/benchmarks/phy/upper/channel_processors/pdsch_processor_benchmark.cpp index e75905d208..89f0fab04d 100644 --- a/tests/benchmarks/phy/upper/channel_processors/pdsch_processor_benchmark.cpp +++ b/tests/benchmarks/phy/upper/channel_processors/pdsch_processor_benchmark.cpp @@ -11,9 +11,6 @@ #include "../../../../unittests/phy/upper/channel_processors/pdsch_processor_test_doubles.h" #include "srsran/phy/support/support_factories.h" #include "srsran/phy/upper/channel_processors/channel_processor_factories.h" -#include "srsran/phy/upper/tx_buffer_pool.h" -#include "srsran/phy/upper/unique_tx_buffer.h" -#include "srsran/ran/pdsch/pdsch_constants.h" #include "srsran/ran/precoding/precoding_codebooks.h" #include "srsran/ran/sch/tbs_calculator.h" #include "srsran/support/benchmark_utils.h" @@ -87,7 +84,6 @@ static dmrs_type dmrs = dmrs_typ static unsigned nof_cdm_groups_without_data = 2; static bounded_bitset dmrs_symbol_mask = {false, false, true, false, false, false, false, true, false, false, false, true, false, false}; -static bool new_data = true; static unsigned nof_pdsch_processor_concurrent_threads = 4; static std::unique_ptr> worker_pool = nullptr; static std::unique_ptr> executor = nullptr; @@ -285,7 +281,6 @@ static void usage(const char* prog) fmt::print("\t-R Repetitions [Default {}]\n", nof_repetitions); fmt::print("\t-B Batch size [Default {}]\n", batch_size_per_thread); fmt::print("\t-T Number of threads [Default {}, max. {}]\n", nof_threads, max_nof_threads); - fmt::print("\t-N New data, set to 0 for false [Default {}]\n", new_data); fmt::print("\t-D LDPC encoder type. [Default {}]\n", ldpc_encoder_type); fmt::print("\t-t PDSCH processor type (generic, concurrent:nof_threads). [Default {}]\n", pdsch_processor_type); fmt::print("\t-P Benchmark profile. [Default {}]\n", selected_profile_name); @@ -337,7 +332,7 @@ static std::string capture_eal_args(int* argc, char*** argv) static int parse_args(int argc, char** argv) { int opt = 0; - while ((opt = getopt(argc, argv, "R:N:T:B:D:P:m:t:xyz:h")) != -1) { + while ((opt = getopt(argc, argv, "R:T:B:D:P:m:t:xyz:h")) != -1) { switch (opt) { case 'R': nof_repetitions = std::strtol(optarg, nullptr, 10); @@ -348,9 +343,6 @@ static int parse_args(int argc, char** argv) case 'B': batch_size_per_thread = std::strtol(optarg, nullptr, 10); break; - case 'N': - new_data = (std::strtol(optarg, nullptr, 10) > 0); - break; case 'D': ldpc_encoder_type = std::string(optarg); break; @@ -444,7 +436,7 @@ static std::vector generate_test_cases(const test_profile& profi nof_prb, 0, profile.cp, - {pdsch_processor::codeword_description{mcs.modulation, i_rv, new_data}}, + {pdsch_processor::codeword_description{mcs.modulation, i_rv}}, 0, pdsch_processor::pdu_t::CRB0, dmrs_symbol_mask, @@ -671,19 +663,6 @@ static void thread_process(pdsch_processor& proc, const pdsch_processor::pdu_t& create_resource_grid(config.precoding.get_nof_ports(), MAX_NSYMB_PER_SLOT, MAX_RB * NRE); TESTASSERT(grid); - // Compute the number of codeblocks. - unsigned nof_codeblocks = ldpc::compute_nof_codeblocks(units::bytes(data.size()).to_bits(), config.ldpc_base_graph); - - tx_buffer_pool_config buffer_pool_config; - buffer_pool_config.max_codeblock_size = ldpc::MAX_CODEBLOCK_SIZE; - buffer_pool_config.nof_buffers = 1; - buffer_pool_config.nof_codeblocks = pdsch_constants::CODEWORD_MAX_SIZE.value() / ldpc::MAX_MESSAGE_SIZE; - buffer_pool_config.expire_timeout_slots = 0; - buffer_pool_config.external_soft_bits = false; - std::shared_ptr buffer_pool = create_tx_buffer_pool(buffer_pool_config); - - trx_buffer_identifier buffer_id(0, 0); - // Notify finish count. { std::unique_lock lock(mutex_finish_count); @@ -711,17 +690,14 @@ static void thread_process(pdsch_processor& proc, const pdsch_processor::pdu_t& // Reset any notification. notifier.reset(); - unique_tx_buffer rm_buffer = buffer_pool->get_pool().reserve(config.slot, buffer_id, nof_codeblocks, true); - // Process PDU. if (worker_pool) { - bool success = - worker_pool->push_task([&proc, &grid, sb = std::move(rm_buffer), ¬ifier, &data, &config]() mutable { - proc.process(grid->get_mapper(), std::move(sb), notifier, {data}, config); - }); + bool success = worker_pool->push_task([&proc, &grid, ¬ifier, &data, &config]() mutable { + proc.process(grid->get_mapper(), notifier, {data}, config); + }); (void)success; } else { - proc.process(grid->get_mapper(), std::move(rm_buffer), notifier, {data}, config); + proc.process(grid->get_mapper(), notifier, {data}, config); } // Wait for the processor to finish. diff --git a/tests/unittests/fapi_adaptor/phy/fapi_to_phy_translator_test.cpp b/tests/unittests/fapi_adaptor/phy/fapi_to_phy_translator_test.cpp index 0667c5d96a..417ba5252b 100644 --- a/tests/unittests/fapi_adaptor/phy/fapi_to_phy_translator_test.cpp +++ b/tests/unittests/fapi_adaptor/phy/fapi_to_phy_translator_test.cpp @@ -12,7 +12,6 @@ #include "../../fapi/validators/helpers.h" #include "../../phy/support/resource_grid_test_doubles.h" #include "../../phy/upper/downlink_processor_test_doubles.h" -#include "../../phy/upper/tx_buffer_pool_test_doubles.h" #include "../../phy/upper/uplink_request_processor_test_doubles.h" #include "srsran/fapi_adaptor/precoding_matrix_table_generator.h" #include "srsran/fapi_adaptor/uci_part2_correspondence_generator.h" @@ -117,14 +116,12 @@ class fapi_to_phy_translator_fixture : public ::testing::Test uplink_pdu_validator_dummy ul_pdu_validator; slot_error_message_notifier_spy error_notifier_spy; manual_task_worker worker; - tx_buffer_pool_spy buffer_pool_spy; fapi_to_phy_translator_config config = {sector_id, headroom_in_slots, scs, scs, &prach_cfg, &carrier_cfg, {0}}; fapi_to_phy_translator_dependencies dependencies = { &srslog::fetch_basic_logger("FAPI"), &dl_processor_pool, &rg_pool, &dl_pdu_validator, - &buffer_pool_spy, &ul_request_processor, &rg_pool, &pdu_repo, @@ -146,14 +143,6 @@ TEST_F(fapi_to_phy_translator_fixture, downlink_processor_is_not_configured_on_n { ASSERT_FALSE(dl_processor_pool.processor(slot).has_configure_resource_grid_method_been_called()); ASSERT_FALSE(grid.has_set_all_zero_method_been_called()); - - // Assert that the transmit buffer pool did not run the slot. - auto& run_slot_entries = buffer_pool_spy.get_run_slot_entries(); - ASSERT_TRUE(run_slot_entries.empty()); - - // Assert that no buffer reservation was done. - auto& reserve_buffer_entries = buffer_pool_spy.get_reserve_entries(); - ASSERT_TRUE(reserve_buffer_entries.empty()); ASSERT_FALSE(error_notifier_spy.has_on_error_indication_been_called()); } @@ -172,12 +161,6 @@ TEST_F(fapi_to_phy_translator_fixture, downlink_processor_is_configured_on_new_d // Assert that the downlink processor is configured. ASSERT_TRUE(dl_processor_pool.processor(slot).has_configure_resource_grid_method_been_called()); - // Assert that the transmit buffer pool did not run the slot. - auto& run_slot_entries = buffer_pool_spy.get_run_slot_entries(); - ASSERT_TRUE(run_slot_entries.empty()); - - // Assert that the resource grid has not been set to zero. - ASSERT_FALSE(grid.has_set_all_zero_method_been_called()); ASSERT_FALSE(error_notifier_spy.has_on_error_indication_been_called()); } diff --git a/tests/unittests/fapi_adaptor/phy/messages/dl_pdsch_pdu_test.cpp b/tests/unittests/fapi_adaptor/phy/messages/dl_pdsch_pdu_test.cpp index c01cf96545..f2e62797b0 100644 --- a/tests/unittests/fapi_adaptor/phy/messages/dl_pdsch_pdu_test.cpp +++ b/tests/unittests/fapi_adaptor/phy/messages/dl_pdsch_pdu_test.cpp @@ -261,7 +261,6 @@ static void pdsch_conversion_test() // Codeword. TESTASSERT_EQ(static_cast(qam_mod), proc_pdu.codewords[0].modulation); TESTASSERT_EQ(rv_index, proc_pdu.codewords[0].rv); - TESTASSERT_EQ(true, proc_pdu.codewords[0].new_data); TESTASSERT_EQ(nid_pdsch, proc_pdu.n_id); diff --git a/tests/unittests/phy/upper/CMakeLists.txt b/tests/unittests/phy/upper/CMakeLists.txt index 6931fa77d4..8315e6518b 100644 --- a/tests/unittests/phy/upper/CMakeLists.txt +++ b/tests/unittests/phy/upper/CMakeLists.txt @@ -38,10 +38,6 @@ add_executable(rx_buffer_pool_test rx_buffer_pool_test.cpp) target_link_libraries(rx_buffer_pool_test srsran_upper_phy_support srslog gtest srsran_support) gtest_discover_tests(rx_buffer_pool_test) -add_executable(tx_buffer_pool_test tx_buffer_pool_test.cpp) -target_link_libraries(tx_buffer_pool_test srsran_upper_phy_support srslog gtest srsran_support) -gtest_discover_tests(tx_buffer_pool_test) - add_executable(uplink_processor_test uplink_processor_test.cpp) target_link_libraries(uplink_processor_test srsran_uplink_processor srslog gtest gtest_main) gtest_discover_tests(uplink_processor_test) diff --git a/tests/unittests/phy/upper/channel_processors/pdsch_encoder_test.cpp b/tests/unittests/phy/upper/channel_processors/pdsch_encoder_test.cpp index 712de91db0..a674bb143f 100644 --- a/tests/unittests/phy/upper/channel_processors/pdsch_encoder_test.cpp +++ b/tests/unittests/phy/upper/channel_processors/pdsch_encoder_test.cpp @@ -10,10 +10,6 @@ #include "pdsch_encoder_test_data.h" #include "srsran/phy/upper/channel_processors/channel_processor_factories.h" -#include "srsran/phy/upper/tx_buffer_pool.h" -#include "srsran/phy/upper/unique_tx_buffer.h" -#include "srsran/ran/pdsch/pdsch_constants.h" -#include "srsran/support/math_utils.h" #include "srsran/support/srsran_test.h" #ifdef HWACC_PDSCH_ENABLED #include "srsran/hal/dpdk/bbdev/bbdev_acc.h" @@ -221,16 +217,6 @@ int main(int argc, char** argv) std::unique_ptr pdsch_encoder = pdsch_enc_factory->create(); TESTASSERT(pdsch_encoder); - tx_buffer_pool_config buffer_pool_config; - buffer_pool_config.max_codeblock_size = ldpc::MAX_CODEBLOCK_SIZE; - buffer_pool_config.nof_buffers = 1; - buffer_pool_config.nof_codeblocks = pdsch_constants::CODEWORD_MAX_SIZE.value() / ldpc::MAX_MESSAGE_SIZE; - buffer_pool_config.expire_timeout_slots = 0; - buffer_pool_config.external_soft_bits = false; - std::shared_ptr rm_buffer_pool = create_tx_buffer_pool(buffer_pool_config); - - trx_buffer_identifier buffer_id(0, 0); - for (const test_case_t& test_case : pdsch_encoder_test_data) { // Load the TB. std::vector transport_block = test_case.transport_block.read(); @@ -245,13 +231,7 @@ int main(int argc, char** argv) TESTASSERT_EQ(cw_length, expected_codeword.size(), "Wrong codeword length."); static_vector codeword(cw_length); - unsigned nof_codeblocks = - ldpc::compute_nof_codeblocks(units::bits(transport_block.size() * 8), test_case.config.base_graph); - - unique_tx_buffer rm_buffer = rm_buffer_pool->get_pool().reserve(slot_point(), buffer_id, nof_codeblocks, true); - pdsch_encoder::configuration config; - config.new_data = true; config.base_graph = test_case.config.base_graph; config.rv = test_case.config.rv; config.mod = test_case.config.mod; @@ -260,14 +240,13 @@ int main(int argc, char** argv) config.nof_ch_symbols = test_case.config.nof_ch_symbols; // Encode the TB. - pdsch_encoder->encode(codeword, rm_buffer.get(), transport_block, config); + pdsch_encoder->encode(codeword, transport_block, config); // Assert encoded data. TESTASSERT_EQ(span(codeword), span(expected_codeword)); // Repeat test reusing the buffer. - config.new_data = false; - pdsch_encoder->encode(codeword, rm_buffer.get(), transport_block, config); + pdsch_encoder->encode(codeword, transport_block, config); TESTASSERT_EQ(span(codeword), span(expected_codeword)); } } diff --git a/tests/unittests/phy/upper/channel_processors/pdsch_encoder_test_doubles.h b/tests/unittests/phy/upper/channel_processors/pdsch_encoder_test_doubles.h index 9d318ee8db..03bb576a75 100644 --- a/tests/unittests/phy/upper/channel_processors/pdsch_encoder_test_doubles.h +++ b/tests/unittests/phy/upper/channel_processors/pdsch_encoder_test_doubles.h @@ -19,10 +19,7 @@ class pdsch_encoder_spy : public pdsch_encoder std::mt19937 rgen; public: - void encode(span codeword, - tx_buffer& rm_buffer, - span transport_block, - const configuration& cfg) override + void encode(span codeword, span transport_block, const configuration& cfg) override { // Generate new entry. entry_t entry = {}; entry.config = cfg; diff --git a/tests/unittests/phy/upper/channel_processors/pdsch_processor_test_doubles.h b/tests/unittests/phy/upper/channel_processors/pdsch_processor_test_doubles.h index fab1435560..33072c4a88 100644 --- a/tests/unittests/phy/upper/channel_processors/pdsch_processor_test_doubles.h +++ b/tests/unittests/phy/upper/channel_processors/pdsch_processor_test_doubles.h @@ -11,7 +11,6 @@ #pragma once #include "srsran/phy/upper/channel_processors/pdsch_processor.h" -#include "srsran/phy/upper/unique_tx_buffer.h" #include namespace srsran { @@ -23,7 +22,6 @@ class pdsch_processor_spy : public pdsch_processor public: void process(resource_grid_mapper& mapper, - unique_tx_buffer rm_buffer, pdsch_processor_notifier& notifier, static_vector, MAX_NOF_TRANSPORT_BLOCKS> data, const pdu_t& pdu) override diff --git a/tests/unittests/phy/upper/channel_processors/pdsch_processor_unittest.cpp b/tests/unittests/phy/upper/channel_processors/pdsch_processor_unittest.cpp index 3c946ac442..b0475a8008 100644 --- a/tests/unittests/phy/upper/channel_processors/pdsch_processor_unittest.cpp +++ b/tests/unittests/phy/upper/channel_processors/pdsch_processor_unittest.cpp @@ -10,7 +10,6 @@ #include "../../support/resource_grid_test_doubles.h" #include "../signal_processors/dmrs_pdsch_processor_test_doubles.h" -#include "../tx_buffer_test_doubles.h" #include "pdsch_encoder_test_doubles.h" #include "pdsch_modulator_test_doubles.h" #include "pdsch_processor_test_doubles.h" @@ -202,11 +201,8 @@ TEST_P(PdschProcessorFixture, UnitTest) dmrs_spy->reset(); notifier.reset(); - tx_buffer_spy rm_buffer_spy(0, 0); - unique_tx_buffer rm_buffer(rm_buffer_spy); - // Process PDU. - pdsch->process(mapper_dummy, std::move(rm_buffer), notifier, data, pdu); + pdsch->process(mapper_dummy, notifier, data, pdu); // Wait for the processor to finish. notifier.wait_for_finished(); diff --git a/tests/unittests/phy/upper/channel_processors/pdsch_processor_validator_test.cpp b/tests/unittests/phy/upper/channel_processors/pdsch_processor_validator_test.cpp index ae714cb979..207f9f4253 100644 --- a/tests/unittests/phy/upper/channel_processors/pdsch_processor_validator_test.cpp +++ b/tests/unittests/phy/upper/channel_processors/pdsch_processor_validator_test.cpp @@ -10,7 +10,6 @@ #include "../../support/resource_grid_mapper_test_doubles.h" #include "../rx_buffer_test_doubles.h" -#include "../tx_buffer_test_doubles.h" #include "pdsch_processor_test_doubles.h" #include "srsran/phy/support/support_factories.h" #include "srsran/phy/upper/channel_processors/channel_processor_factories.h" @@ -270,16 +269,11 @@ TEST_P(pdschProcessorFixture, pdschProcessorValidatorDeathTest) // Prepare receive data. std::vector data; - // Prepare buffer. - tx_buffer_spy rm_buffer_spy(ldpc::MAX_CODEBLOCK_SIZE, 0); - unique_tx_buffer rm_buffer(rm_buffer_spy); - pdsch_processor_notifier_spy notifier_spy; // Process pdsch PDU. #ifdef ASSERTS_ENABLED - ASSERT_DEATH({ pdsch_proc->process(*mapper, std::move(rm_buffer), notifier_spy, {data}, param.get_pdu()); }, - param.expr); + ASSERT_DEATH({ pdsch_proc->process(*mapper, notifier_spy, {data}, param.get_pdu()); }, param.expr); #endif // ASSERTS_ENABLED } diff --git a/tests/unittests/phy/upper/channel_processors/pdsch_processor_vectortest.cpp b/tests/unittests/phy/upper/channel_processors/pdsch_processor_vectortest.cpp index 338f1ea569..8de081b76e 100644 --- a/tests/unittests/phy/upper/channel_processors/pdsch_processor_vectortest.cpp +++ b/tests/unittests/phy/upper/channel_processors/pdsch_processor_vectortest.cpp @@ -14,8 +14,6 @@ #include "srsran/phy/support/support_factories.h" #include "srsran/phy/upper/channel_processors/channel_processor_factories.h" #include "srsran/phy/upper/channel_processors/channel_processor_formatters.h" -#include "srsran/phy/upper/tx_buffer_pool.h" -#include "srsran/phy/upper/unique_tx_buffer.h" #include "srsran/ran/pdsch/pdsch_constants.h" #include "srsran/support/executors/task_worker_pool.h" #include "srsran/support/math_utils.h" @@ -257,8 +255,6 @@ class PdschProcessorFixture : public ::testing::TestWithParam pdsch_proc; // PDSCH validator. std::unique_ptr pdu_validator; - // PDSCH rate matcher buffer pool. - std::unique_ptr rm_buffer_pool; // Worker pool. std::unique_ptr> worker_pool; std::unique_ptr> executor; @@ -284,16 +280,6 @@ class PdschProcessorFixture : public ::testing::TestWithParamcreate_validator(); ASSERT_NE(pdu_validator, nullptr) << "Cannot create PDSCH validator"; - - // Create buffer pool. - tx_buffer_pool_config buffer_pool_config; - buffer_pool_config.max_codeblock_size = ldpc::MAX_CODEBLOCK_SIZE; - buffer_pool_config.nof_buffers = 1; - buffer_pool_config.nof_codeblocks = pdsch_constants::CODEWORD_MAX_SIZE.value() / ldpc::MAX_MESSAGE_SIZE; - buffer_pool_config.expire_timeout_slots = 0; - buffer_pool_config.external_soft_bits = false; - rm_buffer_pool = create_tx_buffer_pool(buffer_pool_config); - ASSERT_NE(rm_buffer_pool, nullptr) << "Cannot create buffer pool"; } void TearDown() override @@ -311,7 +297,6 @@ TEST_P(PdschProcessorFixture, PdschProcessorVectortest) const test_case_t& test_case = std::get<1>(param); const test_case_context& context = test_case.context; pdsch_processor::pdu_t config = context.pdu; - config.codewords.front().new_data = true; unsigned max_symb = context.rg_nof_symb; unsigned max_prb = context.rg_nof_rb; @@ -332,15 +317,8 @@ TEST_P(PdschProcessorFixture, PdschProcessorVectortest) // Make sure the configuration is valid. ASSERT_TRUE(pdu_validator->is_valid(config)); - trx_buffer_identifier buffer_id(0, 0); - - unsigned nof_codeblocks = - ldpc::compute_nof_codeblocks(units::bits(transport_block.size() * 8), config.ldpc_base_graph); - - unique_tx_buffer rm_buffer = rm_buffer_pool->get_pool().reserve(slot_point(), buffer_id, nof_codeblocks, true); - // Process PDSCH. - pdsch_proc->process(*mapper, std::move(rm_buffer), notifier_spy, transport_blocks, config); + pdsch_proc->process(*mapper, notifier_spy, transport_blocks, config); // Waits for the processor to finish. notifier_spy.wait_for_finished(); diff --git a/tests/unittests/phy/upper/downlink_processor_test.cpp b/tests/unittests/phy/upper/downlink_processor_test.cpp index b5b5f9fd32..1e7e580ce5 100644 --- a/tests/unittests/phy/upper/downlink_processor_test.cpp +++ b/tests/unittests/phy/upper/downlink_processor_test.cpp @@ -15,9 +15,7 @@ #include "channel_processors/pdsch_processor_test_doubles.h" #include "channel_processors/ssb_processor_test_doubles.h" #include "signal_processors/nzp_csi_rs_generator_test_doubles.h" -#include "tx_buffer_test_doubles.h" #include "upper_phy_rg_gateway_test_doubles.h" -#include "srsran/phy/upper/unique_tx_buffer.h" #include "srsran/ran/precoding/precoding_codebooks.h" #include "srsran/support/executors/manual_task_worker.h" #include "gtest/gtest.h" @@ -28,7 +26,6 @@ static srslog::basic_logger& logger = srslog::fetch_basic_logger("PHY"); TEST(downlinkProcessorTest, worksInOrder) { - tx_buffer_spy rm_buffer_spy; upper_phy_rg_gateway_fto gw; manual_task_worker executor(10); @@ -70,8 +67,7 @@ TEST(downlinkProcessorTest, worksInOrder) ASSERT_TRUE(pdcch_ref.is_process_called()); std::vector data = {1, 2, 3, 4}; - unique_tx_buffer rm_buffer(rm_buffer_spy); - dl_processor->process_pdsch(std::move(rm_buffer), {data}, {}); + dl_processor->process_pdsch({data}, {}); ASSERT_TRUE(pdsch_ref.is_process_called()); dl_processor->process_nzp_csi_rs({}); @@ -86,7 +82,6 @@ TEST(downlinkProcessorTest, worksInOrder) TEST(downlinkProcessorTest, finishIsCalledBeforeProcessingPdus) { - tx_buffer_spy buffer_spy; upper_phy_rg_gateway_fto gw; manual_task_worker_always_enqueue_tasks executor(10); @@ -119,8 +114,7 @@ TEST(downlinkProcessorTest, finishIsCalledBeforeProcessingPdus) pdu.dci.precoding = precoding_configuration::make_wideband(make_single_port()); dl_processor->process_pdcch(pdu); std::vector data = {1, 2, 3, 4}; - unique_tx_buffer rm_buffer(buffer_spy); - dl_processor->process_pdsch(std::move(rm_buffer), {data}, {}); + dl_processor->process_pdsch({data}, {}); dl_processor->process_nzp_csi_rs({}); ASSERT_FALSE(pdcch_ref.is_process_called()); @@ -145,7 +139,6 @@ TEST(downlinkProcessorTest, finishIsCalledBeforeProcessingPdus) TEST(downlinkProcessorTest, processPduAfterFinishProcessingPdusDoesNothing) { - tx_buffer_spy rm_buffer_spy; upper_phy_rg_gateway_fto gw; manual_task_worker executor(10); @@ -178,8 +171,7 @@ TEST(downlinkProcessorTest, processPduAfterFinishProcessingPdusDoesNothing) pdu.dci.precoding = precoding_configuration::make_wideband(make_single_port()); dl_processor->process_pdcch(pdu); std::vector data = {1, 2, 3, 4}; - unique_tx_buffer rm_buffer(rm_buffer_spy); - dl_processor->process_pdsch(std::move(rm_buffer), {data}, {}); + dl_processor->process_pdsch({data}, {}); dl_processor->finish_processing_pdus(); ASSERT_TRUE(pdcch_ref.is_process_called()); @@ -194,7 +186,6 @@ TEST(downlinkProcessorTest, processPduAfterFinishProcessingPdusDoesNothing) TEST(downlinkProcessorTest, processPduBeforeConfigureDoesNothing) { - tx_buffer_spy rm_buffer_spy; upper_phy_rg_gateway_fto gw; manual_task_worker executor(10); @@ -222,8 +213,7 @@ TEST(downlinkProcessorTest, processPduBeforeConfigureDoesNothing) std::vector data = {1, 2, 3, 4}; dl_processor->process_pdcch(pdu); - unique_tx_buffer rm_buffer(rm_buffer_spy); - dl_processor->process_pdsch(std::move(rm_buffer), {data}, {}); + dl_processor->process_pdsch({data}, {}); dl_processor->process_nzp_csi_rs({}); ASSERT_FALSE(pdcch_ref.is_process_called()); @@ -261,7 +251,6 @@ TEST(downlinkProcessorTest, finishBeforeConfigureDeath) TEST(downlinkProcessorTest, twoConsecutiveSlots) { - tx_buffer_spy rm_buffer_spy; upper_phy_rg_gateway_fto gw; manual_task_worker executor(10); @@ -284,8 +273,7 @@ TEST(downlinkProcessorTest, twoConsecutiveSlots) pdu.dci.precoding = precoding_configuration::make_wideband(make_single_port()); dl_processor->process_pdcch(pdu); std::vector data = {1, 2, 3, 4}; - unique_tx_buffer rm_buffer(rm_buffer_spy); - dl_processor->process_pdsch(std::move(rm_buffer), {data}, {}); + dl_processor->process_pdsch({data}, {}); dl_processor->process_nzp_csi_rs({}); ASSERT_TRUE(!gw.sent); @@ -300,8 +288,7 @@ TEST(downlinkProcessorTest, twoConsecutiveSlots) dl_processor->process_ssb({}); dl_processor->process_pdcch(pdu); - unique_tx_buffer rm_buffer2(rm_buffer_spy); - dl_processor->process_pdsch(std::move(rm_buffer2), {data}, {}); + dl_processor->process_pdsch({data}, {}); dl_processor->process_nzp_csi_rs({}); ASSERT_FALSE(gw.sent); diff --git a/tests/unittests/phy/upper/downlink_processor_test_doubles.h b/tests/unittests/phy/upper/downlink_processor_test_doubles.h index a598283428..0f1683ec74 100644 --- a/tests/unittests/phy/upper/downlink_processor_test_doubles.h +++ b/tests/unittests/phy/upper/downlink_processor_test_doubles.h @@ -11,7 +11,6 @@ #pragma once #include "srsran/phy/upper/downlink_processor.h" -#include "srsran/phy/upper/unique_tx_buffer.h" namespace srsran { @@ -36,8 +35,7 @@ class downlink_processor_spy : public downlink_processor void process_pdcch(const pdcch_processor::pdu_t& pdu) override {} - void process_pdsch(unique_tx_buffer rm_buffer, - const static_vector, pdsch_processor::MAX_NOF_TRANSPORT_BLOCKS>& data, + void process_pdsch(const static_vector, pdsch_processor::MAX_NOF_TRANSPORT_BLOCKS>& data, const pdsch_processor::pdu_t& pdu) override { } diff --git a/tests/unittests/phy/upper/tx_buffer_pool_test.cpp b/tests/unittests/phy/upper/tx_buffer_pool_test.cpp deleted file mode 100644 index 94160f23a0..0000000000 --- a/tests/unittests/phy/upper/tx_buffer_pool_test.cpp +++ /dev/null @@ -1,575 +0,0 @@ -/* - * - * Copyright 2021-2023 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 "srsran/phy/upper/log_likelihood_ratio.h" -#include "srsran/phy/upper/tx_buffer_pool.h" -#include "srsran/phy/upper/unique_tx_buffer.h" -#include "srsran/support/executors/task_worker.h" -#include "srsran/support/executors/task_worker_pool.h" -#include - -using namespace srsran; - -namespace srsran { - -bool operator==(span left, span right) -{ - return std::equal(left.begin(), left.end(), right.begin(), right.end()); -} - -} // namespace srsran - -// Tests that the pool returns nullptr when the limit of buffers is reached. -TEST(tx_buffer_pool, buffer_limit) -{ - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = 16; - pool_config.nof_buffers = 4; - pool_config.nof_codeblocks = 4; - pool_config.expire_timeout_slots = 10; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - // Create as many buffers as the limit is set. - std::vector buffers; - for (unsigned rnti = 0; rnti != pool_config.nof_buffers; ++rnti) { - trx_buffer_identifier buffer_id(rnti, 0); - - // Reserve buffer, it shall not fail. - buffers.emplace_back(pool->get_pool().reserve(slot, buffer_id, 1, true)); - ASSERT_TRUE(buffers.back().is_valid()); - } - - // Create one more buffer. No buffers are available. It must fail to reserve. - trx_buffer_identifier buffer_id(static_cast(pool_config.nof_buffers), 0); - ASSERT_FALSE(pool->get_pool().reserve(slot, buffer_id, 1, true).is_valid()); -} - -// Tests that the pool returns nullptr when the limit of codeblocks is reached. -TEST(tx_buffer_pool, codeblock_limit) -{ - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = 16; - pool_config.nof_buffers = 2; - pool_config.nof_codeblocks = 1; - pool_config.expire_timeout_slots = 10; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - // Reserve buffer with all the codeblocks, it shall not fail. - trx_buffer_identifier buffer_id0(0x1234, 0x3); - unique_tx_buffer buffer = pool->get_pool().reserve(slot, buffer_id0, pool_config.nof_codeblocks, true); - ASSERT_TRUE(buffer.is_valid()); - - // Create one more buffer. No codeblocks are available. It must fail to reserve. - trx_buffer_identifier buffer_id1(0x1234, buffer_id0.get_harq() + 1); - ASSERT_FALSE(pool->get_pool().reserve(slot, buffer_id1, pool_config.nof_codeblocks, true).is_valid()); -} - -// Tests that the pool frees reserved buffer. -TEST(tx_buffer_pool, buffer_free) -{ - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = 16; - pool_config.nof_buffers = 1; - pool_config.nof_codeblocks = 1; - pool_config.expire_timeout_slots = 10; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - // Reserve buffer with all the codeblocks, it shall not fail. - trx_buffer_identifier buffer_id0(0x1234, 0x3); - unique_tx_buffer buffer = pool->get_pool().reserve(slot, buffer_id0, pool_config.nof_codeblocks, true); - ASSERT_TRUE(buffer.is_valid()); - - // Unlock buffer. It is still reserved. - buffer = unique_tx_buffer(); - - // Reserve buffer with the same identifier. It shall not fail. - buffer = pool->get_pool().reserve(slot, buffer_id0, pool_config.nof_codeblocks, false); - ASSERT_TRUE(buffer.is_valid()); - - // Reserve buffer with a different identifier. It shall fail. - trx_buffer_identifier buffer_id1(0x1234, buffer_id0.get_harq() + 1); - ASSERT_FALSE(pool->get_pool().reserve(slot, buffer_id1, pool_config.nof_codeblocks, true).is_valid()); - - // Free the first buffer identifier. - buffer = unique_tx_buffer(); - - // Run slot for clearing the buffer. - pool->get_pool().run_slot(slot); - - // Reserve buffer with all the codeblocks, it shall not fail. - buffer = pool->get_pool().reserve(slot, buffer_id0, pool_config.nof_codeblocks, true); - ASSERT_TRUE(buffer.is_valid()); -} - -// Tests that the pool expires buffers after the last reserved slot. -TEST(tx_buffer_pool, buffer_expire) -{ - unsigned delay = 3; - - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = 16; - pool_config.nof_buffers = 1; - pool_config.nof_codeblocks = 1; - pool_config.expire_timeout_slots = 4; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - // Reserve buffer with all the codeblocks, it shall not fail. - trx_buffer_identifier buffer_id0(0x1234, 0x3); - ASSERT_TRUE(pool->get_pool().reserve(slot, buffer_id0, pool_config.nof_codeblocks, true).is_valid()); - - // Run slot and reserve the same buffer. - slot += delay; - pool->get_pool().run_slot(slot); - ASSERT_TRUE(pool->get_pool().reserve(slot, buffer_id0, pool_config.nof_codeblocks, true).is_valid()); - - // Run for each slot until it expires. - do { - // Try to reserve another buffer. As there are no buffers available it shall fail. - trx_buffer_identifier buffer_id1(0x1234, buffer_id0.get_harq() + 1); - ASSERT_FALSE(pool->get_pool().reserve(slot, buffer_id1, pool_config.nof_codeblocks, true).is_valid()); - ++slot; - pool->get_pool().run_slot(slot); - } while (slot.system_slot() < pool_config.expire_timeout_slots + delay); - - // After the first buffer expired, buffer reservation shall not fail. - trx_buffer_identifier buffer_id2(0x1234, buffer_id0.get_harq() + 2); - ASSERT_TRUE(pool->get_pool().reserve(slot, buffer_id2, pool_config.nof_codeblocks, true).is_valid()); -} - -// Tests that the pool renews buffer expiration if they are locked. -TEST(tx_buffer_pool, buffer_renew_expire) -{ - unsigned expire_timeout_slots = 4; - - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = 16; - pool_config.nof_buffers = 2; - pool_config.nof_codeblocks = 1; - pool_config.expire_timeout_slots = expire_timeout_slots; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - // Reserve buffer with all the codeblocks, it shall not fail. - trx_buffer_identifier buffer_id0(0x1234, 0x3); - unique_tx_buffer buffer = pool->get_pool().reserve(slot, buffer_id0, pool_config.nof_codeblocks, true); - ASSERT_TRUE(buffer.is_valid()); - - // Advance slots. As the buffer is locked, the expiration shall be renewed. - slot += expire_timeout_slots; - pool->get_pool().run_slot(slot); - - // Try to get the same buffer. It must fail as the buffer is locked. - unique_tx_buffer locked_buffer = pool->get_pool().reserve(slot, buffer_id0, pool_config.nof_codeblocks, true); - ASSERT_FALSE(locked_buffer.is_valid()); - - // Unlock buffer. - buffer = unique_tx_buffer(); - - // Run for each slot until it expires. - do { - // Try to reserve another buffer. As there are no buffers available it shall fail. - trx_buffer_identifier buffer_id1(0x1234, buffer_id0.get_harq() + 1); - unique_tx_buffer invalid_buffer = pool->get_pool().reserve(slot, buffer_id1, pool_config.nof_codeblocks, true); - ASSERT_FALSE(invalid_buffer.is_valid()); - ++slot; - pool->get_pool().run_slot(slot); - } while (slot.system_slot() < pool_config.expire_timeout_slots + expire_timeout_slots); - - // After the first buffer expired, buffer reservation shall not fail. - trx_buffer_identifier buffer_id2(0x1234, buffer_id0.get_harq() + 2); - ASSERT_TRUE(pool->get_pool().reserve(slot, buffer_id2, pool_config.nof_codeblocks, true).is_valid()); -} - -// Tests that the pool renews buffer expiration if they are locked. -TEST(tx_buffer_pool, buffer_resize) -{ - static constexpr unsigned nof_codeblocks = 4; - - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = 16; - pool_config.nof_buffers = 1; - pool_config.nof_codeblocks = nof_codeblocks; - pool_config.expire_timeout_slots = 4; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - // Reserve buffer with nof_codeblocks - 1 codeblocks, it shall not fail. - trx_buffer_identifier buffer_id0(0x1234, 0x3); - unique_tx_buffer buffer = pool->get_pool().reserve(slot, buffer_id0, nof_codeblocks, true); - ASSERT_TRUE(buffer.is_valid()); - - // Check the number of codeblock matches. - ASSERT_EQ(buffer.get().get_nof_codeblocks(), nof_codeblocks); - - // Unlock the buffer. - buffer = unique_tx_buffer(); - - // Reserve the same buffer with more codeblocks. - buffer = pool->get_pool().reserve(slot, buffer_id0, nof_codeblocks - 1, true); - - // Check the number of codeblock matches. - ASSERT_EQ(buffer.get().get_nof_codeblocks(), nof_codeblocks - 1); -} - -// Tests that the pool returns an invalid buffer upon a retransmission with an incorrect number of CBs. -TEST(tx_buffer_pool, buffer_resize_false_retransmission) -{ - static constexpr unsigned nof_codeblocks = 4; - - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = 16; - pool_config.nof_buffers = 1; - pool_config.nof_codeblocks = nof_codeblocks; - pool_config.expire_timeout_slots = 4; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - // Reserve buffer with nof_codeblocks - 1 codeblocks, it shall not fail. - trx_buffer_identifier buffer_id0(0x1234, 0x3); - unique_tx_buffer buffer = pool->get_pool().reserve(slot, buffer_id0, nof_codeblocks, true); - ASSERT_TRUE(buffer.is_valid()); - - // Check the number of codeblock matches. - ASSERT_EQ(buffer.get().get_nof_codeblocks(), nof_codeblocks); - - // Unlock the buffer. - buffer = unique_tx_buffer(); - - // Reserve the same buffer with less codeblocks, the buffer shall be invalid. - ASSERT_FALSE(pool->get_pool().reserve(slot, buffer_id0, nof_codeblocks - 1, false).is_valid()); -} - -// Tests that the pool returns an invalid buffer upon a retransmission without a previous reservation. -TEST(tx_buffer_pool, fresh_false_retransmission) -{ - static constexpr unsigned nof_codeblocks = 4; - - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = 16; - pool_config.nof_buffers = 1; - pool_config.nof_codeblocks = nof_codeblocks; - pool_config.expire_timeout_slots = 4; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - // Reserve buffer as retransmission without a previous reservation, the buffer shall be invalid. - trx_buffer_identifier buffer_id0(0x1234, 0x3); - unique_tx_buffer buffer = pool->get_pool().reserve(slot, buffer_id0, nof_codeblocks, false); - ASSERT_FALSE(buffer.is_valid()); -} - -// Tests that the pool renews buffer expiration if they are locked. -TEST(tx_buffer_pool, reserve_no_id) -{ - static constexpr unsigned nof_codeblocks = 4; - - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = 16; - pool_config.nof_buffers = 2; - pool_config.nof_codeblocks = pool_config.nof_buffers * nof_codeblocks; - pool_config.expire_timeout_slots = 4; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - // Reserve more codeblocks than configured, it shall fail. - ASSERT_FALSE(pool->get_pool().reserve(slot, pool_config.nof_codeblocks + 1).is_valid()); - - // Reserve first buffer, it shall not fail. - unique_tx_buffer buffer0 = pool->get_pool().reserve(slot, nof_codeblocks); - ASSERT_TRUE(buffer0.is_valid()); - - // Reserve second buffer, it shall not fail. - unique_tx_buffer buffer1 = pool->get_pool().reserve(slot, nof_codeblocks); - ASSERT_TRUE(buffer1.is_valid()); - - // Reserve a third non-existent buffer, it shall fail. - unique_tx_buffer buffer2 = pool->get_pool().reserve(slot, nof_codeblocks); - ASSERT_FALSE(buffer2.is_valid()); -} - -// Tests buffer soft bits contents persists between retransmissions. -TEST(tx_buffer_pool, buffer_contents) -{ - unsigned nof_cb_x_buffer = 2; - unsigned cb_size = 16; - // Data size cannot be larger than cb_size / 3 (recall that 1/3 is the maximum coding rate). - unsigned data_size = 5; - - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = cb_size; - pool_config.nof_buffers = 4; - pool_config.nof_codeblocks = pool_config.nof_buffers * nof_cb_x_buffer; - pool_config.expire_timeout_slots = 10; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - // Create as many buffers as the limit is set. - trx_buffer_identifier buffer_id(0x1234, 0x3); - - // Temporal storage of buffer codeblock information. - std::vector> cb_soft_bits; - std::vector cb_data_bits; - - // Note: two buffers with the same identifier cannot be simultaneously in scope. - { - // Reserve buffer, it shall not fail. - unique_tx_buffer rm_buffer = pool->get_pool().reserve(slot, buffer_id, nof_cb_x_buffer, true); - ASSERT_TRUE(rm_buffer.is_valid()); - - // For each codeblock... - for (unsigned cb_id = 0; cb_id != nof_cb_x_buffer; ++cb_id) { - // Get codeblock soft and data bits. - bit_buffer data_buffer = rm_buffer.get().get_codeblock(cb_id, data_size); - - cb_data_bits.emplace_back(data_buffer); - - // Make sure size matches. - ASSERT_TRUE(data_buffer.size() == data_size); - - // Write data in codeblock. - for (unsigned bit_idx = 0; bit_idx != data_size; ++bit_idx) { - data_buffer.insert(bit_idx & 1U, bit_idx, 1); - } - } - } - - // Reserve buffer, it shall not fail. - unique_tx_buffer buffer = pool->get_pool().reserve(slot, buffer_id, nof_cb_x_buffer, true); - ASSERT_TRUE(buffer.is_valid()); - - // For each codeblock... - for (unsigned cb_id = 0; cb_id != nof_cb_x_buffer; ++cb_id) { - // Get codeblock soft bits. - bit_buffer data_buffer0 = cb_data_bits[cb_id]; - bit_buffer data_buffer1 = buffer.get().get_codeblock(cb_id, data_size); - - // Make sure absolute codeblock indexes match. - ASSERT_EQ(buffer.get().get_absolute_codeblock_id(cb_id), cb_id); - - // Make sure the data pointers match. - ASSERT_TRUE(data_buffer0.get_buffer().data() == data_buffer1.get_buffer().data()); - - // Validate data persists in the codeblock. - for (unsigned bit_idx = 0; bit_idx != data_size; ++bit_idx) { - ASSERT_EQ(data_buffer0.extract(bit_idx, 1), bit_idx & 1U); - } - } -} - -// Tests buffer pool fails to reserve after stopping. -TEST(tx_buffer_pool, reserve_after_stop) -{ - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = 1; - pool_config.nof_buffers = 4; - pool_config.nof_codeblocks = pool_config.nof_buffers; - pool_config.expire_timeout_slots = 10; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - // Stop the pool operation. - pool->stop(); - - // Try to reserve with identifier, the buffer shall be invalid. - ASSERT_FALSE( - pool->get_pool().reserve(slot, trx_buffer_identifier(0, 0), pool_config.nof_codeblocks, true).is_valid()); - - // Try to reserve without identifier, the buffer shall be invalid. - ASSERT_FALSE(pool->get_pool().reserve(slot, pool_config.nof_codeblocks).is_valid()); -} - -// Tests buffer pool waits to stop. -TEST(tx_buffer_pool, wait_to_stop) -{ - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = 1; - pool_config.nof_buffers = 4; - pool_config.nof_codeblocks = pool_config.nof_buffers; - pool_config.expire_timeout_slots = 10; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - // Try to reserve a buffer. - unique_tx_buffer buffer = - pool->get_pool().reserve(slot, trx_buffer_identifier(0, 0), pool_config.nof_codeblocks, true); - - // Create asynchronous task for unlocking the buffer. - std::thread async_unlock([&buffer]() { - std::this_thread::sleep_for(std::chrono::milliseconds(1)); - buffer = unique_tx_buffer(); - }); - - // Stop the pool operation. - pool->stop(); - - // Make sure the asynchronous thread joined. - async_unlock.join(); - - // The buffer must be invalid. - ASSERT_FALSE(buffer.is_valid()); -} - -TEST(tx_buffer_pool, concurrent) -{ - unsigned nof_repetitions = 100; - unsigned nof_release_threads = 4; - unsigned max_nof_buffers = 16; - unsigned nof_cb_x_buffer = 8; - unsigned cb_size = 16; - - task_worker_pool release_worker_pool( - nof_release_threads, nof_repetitions * max_nof_buffers, "release"); - - // Create pool configuration for the test. - tx_buffer_pool_config pool_config; - pool_config.max_codeblock_size = cb_size; - pool_config.nof_buffers = max_nof_buffers; - pool_config.nof_codeblocks = max_nof_buffers * nof_cb_x_buffer; - pool_config.expire_timeout_slots = 10; - pool_config.external_soft_bits = false; - - // Current slot. - slot_point slot(0, 0); - - // Create buffer pool. - std::unique_ptr pool = create_tx_buffer_pool(pool_config); - ASSERT_TRUE(pool); - - for (unsigned i_repetition = 0; i_repetition != nof_repetitions; ++i_repetition) { - for (unsigned i_buffer = 0; i_buffer != max_nof_buffers; ++i_buffer) { - // Reserve buffer. - unique_tx_buffer buffer = - pool->get_pool().reserve(slot, trx_buffer_identifier(0x1234, i_buffer), nof_cb_x_buffer, true); - - // The reservation should be successful for the first time. - ASSERT_TRUE((i_repetition > 0) || buffer.is_valid()); - - // Release or unlock buffer asynchronously in the worker pool. - if (buffer.is_valid()) { - ASSERT_TRUE( - release_worker_pool.push_task([buffer2 = std::move(buffer)]() mutable { buffer2 = unique_tx_buffer(); })); - } - } - - // Process housekeeping asynchronously. - pool->get_pool().run_slot(slot++); - } - - // Wait for tasks to finish. - release_worker_pool.wait_pending_tasks(); - - // Stop workers before destroying them. - release_worker_pool.stop(); -} - -int main(int argc, char** argv) -{ - testing::InitGoogleTest(&argc, argv); - - // Make sure logger is enabled and use /dev/null as sink. - srslog::set_default_sink(*srslog::create_file_sink("/dev/null")); - srslog::init(); - srslog::basic_logger& logger = srslog::fetch_basic_logger("PHY", true); - logger.set_level(srslog::basic_levels::debug); - - int ret = RUN_ALL_TESTS(); - - srslog::flush(); - - return ret; -} diff --git a/tests/unittests/phy/upper/tx_buffer_pool_test_doubles.h b/tests/unittests/phy/upper/tx_buffer_pool_test_doubles.h deleted file mode 100644 index f84f5fc0d1..0000000000 --- a/tests/unittests/phy/upper/tx_buffer_pool_test_doubles.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * Copyright 2021-2024 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. - * - */ - -#pragma once -#include "tx_buffer_test_doubles.h" -#include "srsran/phy/upper/tx_buffer_pool.h" - -namespace srsran { - -class tx_buffer_pool_spy : public tx_buffer_pool -{ - struct reserve_entry { - slot_point slot; - trx_buffer_identifier id; - unsigned nof_codeblocks; - optional new_data; - }; - -public: - unique_tx_buffer - reserve(const slot_point& slot, trx_buffer_identifier id, unsigned nof_codeblocks, bool new_data) override - { - reserve_entries.emplace_back(); - reserve_entry& entry = reserve_entries.back(); - entry.slot = slot; - entry.id = id; - entry.nof_codeblocks = nof_codeblocks; - entry.new_data = new_data; - return unique_tx_buffer(rm_buffer_spy); - } - - unique_tx_buffer reserve(const slot_point& slot, unsigned nof_codeblocks) override - { - reserve_entries.emplace_back(); - reserve_entry& entry = reserve_entries.back(); - entry.slot = slot; - entry.id = trx_buffer_identifier::invalid(); - entry.nof_codeblocks = nof_codeblocks; - entry.new_data = nullopt; - return unique_tx_buffer(rm_buffer_spy); - } - - void run_slot(const slot_point& slot) override { run_slot_entries.emplace_back(slot); } - - const std::vector& get_reserve_entries() const { return reserve_entries; } - - const std::vector& get_run_slot_entries() const { return run_slot_entries; } - -private: - std::vector reserve_entries; - std::vector run_slot_entries; - tx_buffer_spy rm_buffer_spy; -}; - -} // namespace srsran \ No newline at end of file diff --git a/tests/unittests/phy/upper/tx_buffer_test_doubles.h b/tests/unittests/phy/upper/tx_buffer_test_doubles.h deleted file mode 100644 index a5e386f9e0..0000000000 --- a/tests/unittests/phy/upper/tx_buffer_test_doubles.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * - * Copyright 2021-2024 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. - * - */ - -#pragma once - -#include "srsran/adt/tensor.h" -#include "srsran/phy/upper/unique_tx_buffer.h" - -namespace srsran { - -/// Implements a lockable transmit buffer spy. -class tx_buffer_spy : public unique_tx_buffer::callback -{ -public: - /// Default constructor - creates a buffer without any storage. - tx_buffer_spy() = default; - - /// Constructs a transmit buffer that can store a maximum number of codeblocks of a certain size. - tx_buffer_spy(unsigned max_codeblock_size, unsigned nof_codeblocks) : data({max_codeblock_size, nof_codeblocks}) {} - - // See interface for documentation. - unsigned get_nof_codeblocks() const override - { - ++const_count; - return data.size(); - } - - // See interface for documentation. - bit_buffer get_codeblock(unsigned codeblock_id, unsigned data_size) override - { - ++count; - data[codeblock_id].resize(data_size); - return data[codeblock_id]; - } - - // See interface for documentation. - unsigned get_absolute_codeblock_id(unsigned codeblock_id) const override - { - ++const_count; - return codeblock_id; - } - - // See interface for documentation. - void lock() override { locked = true; } - - // See interface for documentation. - void unlock() override { locked = false; } - - /// Clears all counters. - void clear() - { - count = 0; - const_count = 0; - } - - /// Get the total number of times the methods have been called. - unsigned get_total_count() const { return count + const_count; } - - /// Returns true if the buffer is locked. - bool is_locked() const { return locked; } - -private: - unsigned count = 0; - mutable unsigned const_count = 0; - bool locked = false; - std::vector data; -}; - -} // namespace srsran \ No newline at end of file From 4ba4c458e69cb9780fe5ee4ab5c776895ee42a62 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 9 Feb 2024 15:14:11 +0100 Subject: [PATCH 02/78] phy: fix compilation --- include/srsran/phy/upper/upper_phy.h | 1 - .../pdsch_encoder_hwacc_benchmark.cpp | 24 ++----------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/include/srsran/phy/upper/upper_phy.h b/include/srsran/phy/upper/upper_phy.h index b1eb7e489a..1a4a765a5b 100644 --- a/include/srsran/phy/upper/upper_phy.h +++ b/include/srsran/phy/upper/upper_phy.h @@ -22,7 +22,6 @@ class upper_phy_rx_symbol_handler; class upper_phy_timing_handler; class upper_phy_timing_notifier; class uplink_slot_pdu_repository; -class tx_buffer_pool; /// \brief Upper PHY interface. /// diff --git a/tests/benchmarks/phy/upper/channel_processors/pdsch_encoder_hwacc_benchmark.cpp b/tests/benchmarks/phy/upper/channel_processors/pdsch_encoder_hwacc_benchmark.cpp index 0e17e15e04..435bce2c5f 100644 --- a/tests/benchmarks/phy/upper/channel_processors/pdsch_encoder_hwacc_benchmark.cpp +++ b/tests/benchmarks/phy/upper/channel_processors/pdsch_encoder_hwacc_benchmark.cpp @@ -15,8 +15,6 @@ /// one. #include "srsran/phy/upper/channel_processors/channel_processor_factories.h" -#include "srsran/phy/upper/tx_buffer_pool.h" -#include "srsran/phy/upper/unique_tx_buffer.h" #include "srsran/ran/pdsch/pdsch_constants.h" #include "srsran/ran/sch/tbs_calculator.h" #include "srsran/support/srsran_test.h" @@ -258,7 +256,6 @@ static std::vector generate_test_cases(const test_profile& profi // Build the PDSCH encoder configuration. pdsch_encoder::configuration config; - config.new_data = true; config.base_graph = get_ldpc_base_graph(mcs.get_normalised_target_code_rate(), units::bits(tbs)); config.rv = 0; config.mod = mcs.modulation; @@ -329,16 +326,6 @@ int main(int argc, char** argv) std::unique_ptr hwacc_encoder = hwacc_pdsch_enc_factory->create(); TESTASSERT(hwacc_encoder); - tx_buffer_pool_config softbuffer_pool_config; - softbuffer_pool_config.max_codeblock_size = ldpc::MAX_CODEBLOCK_SIZE; - softbuffer_pool_config.nof_buffers = 1; - softbuffer_pool_config.nof_codeblocks = pdsch_constants::CODEWORD_MAX_SIZE.value() / ldpc::MAX_MESSAGE_SIZE; - softbuffer_pool_config.expire_timeout_slots = 0; - softbuffer_pool_config.external_soft_bits = false; - std::shared_ptr softbuffer_pool = create_tx_buffer_pool(softbuffer_pool_config); - - trx_buffer_identifier softbuffer_id(0, 0); - // Generate the test cases. std::vector test_case_set = generate_test_cases(selected_profile); @@ -354,8 +341,6 @@ int main(int argc, char** argv) // Get the number of PRB. unsigned nof_prb = std::get<3>(test_case); - unsigned nof_codeblocks = ldpc::compute_nof_codeblocks(units::bits(tbs), cfg.base_graph); - // Create transport block. std::vector data(tbs / 8); std::generate(data.begin(), data.end(), [&rgen]() { return static_cast(rgen() & 0xff); }); @@ -366,14 +351,9 @@ int main(int argc, char** argv) // Call the hardware-accelerator PDSCH encoder function. uint64_t total_hwacc_time = 0; - // Reserve softbuffer. - unique_tx_buffer softbuffer = - softbuffer_pool->get_pool().reserve(slot_point(), softbuffer_id, nof_codeblocks, true); - TESTASSERT(softbuffer.is_valid()); - // Encode the TB. uint64_t hwacc_start_time = get_current_time(); - hwacc_encoder->encode(codeword, softbuffer.get(), data, cfg); + hwacc_encoder->encode(codeword, data, cfg); uint64_t hwacc_op_time = get_current_time() - hwacc_start_time; total_hwacc_time += hwacc_op_time; @@ -384,7 +364,7 @@ int main(int argc, char** argv) // Encode the TB. uint64_t gen_start_time = get_current_time(); - gen_encoder->encode(codeword, softbuffer.get(), data, cfg); + gen_encoder->encode(codeword, data, cfg); uint64_t gen_op_time = get_current_time() - gen_start_time; total_gen_time += gen_op_time; From f43725576a0f4cea5b620490ff3e75df702c1e82 Mon Sep 17 00:00:00 2001 From: Pavel Harbanau Date: Mon, 12 Feb 2024 11:53:06 +0000 Subject: [PATCH 03/78] ofh: fix assertion when PRACH start symbol is non-zero --- lib/ofh/support/prach_context_repository.h | 2 ++ tests/unittests/ofh/receiver/helpers.h | 8 +++++- ...ata_flow_uplane_uplink_prach_impl_test.cpp | 1 + ...h_uplane_prach_data_flow_notifier_test.cpp | 3 +++ ...ane_prach_symbol_data_flow_writer_test.cpp | 27 +++++++++++++++++++ 5 files changed, 40 insertions(+), 1 deletion(-) diff --git a/lib/ofh/support/prach_context_repository.h b/lib/ofh/support/prach_context_repository.h index 4621acc6ed..6c0462fd27 100644 --- a/lib/ofh/support/prach_context_repository.h +++ b/lib/ofh/support/prach_context_repository.h @@ -105,6 +105,8 @@ class prach_context /// Writes the given IQ buffer corresponding to the given symbol and port. void write_iq(unsigned port, unsigned symbol, unsigned re_start, span iq_buffer) { + symbol -= context_info.context.start_symbol; + srsran_assert(context_info.buffer, "No valid PRACH buffer in the context"); srsran_assert(symbol < nof_symbols, "Invalid symbol index"); diff --git a/tests/unittests/ofh/receiver/helpers.h b/tests/unittests/ofh/receiver/helpers.h index 640588591b..0087a9bcf8 100644 --- a/tests/unittests/ofh/receiver/helpers.h +++ b/tests/unittests/ofh/receiver/helpers.h @@ -23,10 +23,11 @@ class prach_buffer_dummy : public prach_buffer { unsigned nof_symbols; static_vector buffer; + mutable bool symbol_out_of_bounds; public: prach_buffer_dummy(unsigned nof_symbols_, bool long_format = true) : - nof_symbols((nof_symbols_ == 0) ? 1 : nof_symbols_), buffer(long_format ? 839 : 139) + nof_symbols((nof_symbols_ == 0) ? 1 : nof_symbols_), buffer(long_format ? 839 : 139), symbol_out_of_bounds(false) { } @@ -48,8 +49,13 @@ class prach_buffer_dummy : public prach_buffer span get_symbol(unsigned i_port, unsigned i_td_occasion, unsigned i_fd_occasion, unsigned i_symbol) const override { + if (i_symbol >= nof_symbols) { + symbol_out_of_bounds = true; + } return buffer; } + + bool correct_symbols_requested() const { return !symbol_out_of_bounds; } }; /// Spy implementation of the resource grid writer that returns if the functions were called. diff --git a/tests/unittests/ofh/receiver/ofh_data_flow_uplane_uplink_prach_impl_test.cpp b/tests/unittests/ofh/receiver/ofh_data_flow_uplane_uplink_prach_impl_test.cpp index c8b4c92ec6..7d88cb1e56 100644 --- a/tests/unittests/ofh/receiver/ofh_data_flow_uplane_uplink_prach_impl_test.cpp +++ b/tests/unittests/ofh/receiver/ofh_data_flow_uplane_uplink_prach_impl_test.cpp @@ -84,6 +84,7 @@ class data_flow_uplane_uplink_prach_impl_fixture : public ::testing::TestWithPar buffer_context.nof_td_occasions = 1; buffer_context.nof_fd_occasions = 1; buffer_context.pusch_scs = srsran::subcarrier_spacing::kHz30; + buffer_context.start_symbol = 0; repo->add(buffer_context, buffer); diff --git a/tests/unittests/ofh/receiver/ofh_uplane_prach_data_flow_notifier_test.cpp b/tests/unittests/ofh/receiver/ofh_uplane_prach_data_flow_notifier_test.cpp index d72225f1b5..e3d8fa9f70 100644 --- a/tests/unittests/ofh/receiver/ofh_uplane_prach_data_flow_notifier_test.cpp +++ b/tests/unittests/ofh/receiver/ofh_uplane_prach_data_flow_notifier_test.cpp @@ -45,6 +45,7 @@ TEST(ofh_uplane_prach_data_flow_notifier, unwritten_buffer_does_not_notify) context.nof_td_occasions = 1; context.nof_fd_occasions = 1; context.pusch_scs = srsran::subcarrier_spacing::kHz30; + context.start_symbol = 0; repo->add(context, buffer); sender.notify_prach(slot); @@ -70,6 +71,7 @@ TEST(ofh_uplane_prach_data_flow_notifier, completed_long_prach_buffer_triggers_n context.nof_td_occasions = 1; context.nof_fd_occasions = 1; context.pusch_scs = srsran::subcarrier_spacing::kHz30; + context.start_symbol = 0; static_vector samples(839); repo->add(context, buffer); @@ -103,6 +105,7 @@ TEST(ofh_uplane_prach_data_flow_notifier, completed_short_prach_buffer_triggers_ context.nof_td_occasions = 1; context.nof_fd_occasions = 1; context.pusch_scs = srsran::subcarrier_spacing::kHz30; + context.start_symbol = 0; static_vector samples(139); repo->add(context, buffer); diff --git a/tests/unittests/ofh/receiver/ofh_uplane_prach_symbol_data_flow_writer_test.cpp b/tests/unittests/ofh/receiver/ofh_uplane_prach_symbol_data_flow_writer_test.cpp index 99b49db14b..40e7777fc3 100644 --- a/tests/unittests/ofh/receiver/ofh_uplane_prach_symbol_data_flow_writer_test.cpp +++ b/tests/unittests/ofh/receiver/ofh_uplane_prach_symbol_data_flow_writer_test.cpp @@ -46,6 +46,7 @@ class ofh_uplane_prach_symbol_data_flow_writer_fixture : public ::testing::TestW buffer_context.nof_td_occasions = 1; buffer_context.nof_fd_occasions = 1; buffer_context.pusch_scs = srsran::subcarrier_spacing::kHz30; + buffer_context.start_symbol = 0; repo->add(buffer_context, buffer); @@ -212,6 +213,32 @@ TEST_P(ofh_uplane_prach_symbol_data_flow_writer_fixture, decoded_prbs_in_one_pac } } +TEST_P(ofh_uplane_prach_symbol_data_flow_writer_fixture, decoded_prbs_with_start_symbol_offset_passes) +{ + buffer = prach_buffer_dummy(nof_symbols, is_long_preamble(buffer_context.format)); + // Offset the start symbol. + buffer_context.start_symbol = 2; + repo->add(buffer_context, buffer); + + auto& section = results.sections.back(); + section.nof_prbs = (format == prach_format_type::zero) ? 72 : 12; + section.start_prb = 0; + + for (unsigned symbol_id = 0; symbol_id != nof_symbols; ++symbol_id) { + results.params.symbol_id = symbol_id + buffer_context.start_symbol; + writer.write_to_prach_buffer(prach_eaxc[0], results); + } + ASSERT_TRUE(buffer.correct_symbols_requested()); + + prach_context context = repo->get(slot); + ASSERT_FALSE(context.empty()); + + for (unsigned i = 0; i != nof_symbols; ++i) { + const auto& sym_data = context.get_symbol_re_written(i); + ASSERT_TRUE(std::all_of(sym_data.begin(), sym_data.end(), [](const auto& port) { return port.all(); })); + } +} + TEST_P(ofh_uplane_prach_symbol_data_flow_writer_fixture, prach_in_three_message_first_message) { auto results_cp = results; From 09a8dce3fe71af7db8765ef7f094bdf11419d83f Mon Sep 17 00:00:00 2001 From: asaezper Date: Mon, 12 Feb 2024 09:49:48 +0100 Subject: [PATCH 04/78] ci: fix disable current scheduled pipeline --- .gitlab-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 72ea60b1e1..577666b49b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -432,8 +432,14 @@ disable current schedule: stage: .post extends: .enable-schedule-by-description rules: - - if: $GRADUATION_BRANCH + - if: $CI_DESCRIPTION =~ /Nightly Build Unit Tests/ + when: always + - if: $CI_DESCRIPTION =~ /Nightly E2E Tests/ when: always + - if: $CI_DESCRIPTION =~ /Alternative OSs/ + when: always + - if: $CI_DESCRIPTION =~ /Weekly/ + when: always interruptible: false variables: ENABLE: "false" From 267395191652a02dc35de9ef4823a1350b8a5104 Mon Sep 17 00:00:00 2001 From: asaezper Date: Mon, 12 Feb 2024 11:26:31 +0100 Subject: [PATCH 05/78] ci,e2e: iperf retry on fwork error --- .gitlab/ci/e2e/.env | 2 +- tests/e2e/tests/attach_detach.py | 1 + tests/e2e/tests/iperf.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab/ci/e2e/.env b/.gitlab/ci/e2e/.env index 1366e4e99e..9abba8731c 100644 --- a/.gitlab/ci/e2e/.env +++ b/.gitlab/ci/e2e/.env @@ -1,6 +1,6 @@ SRSGNB_REGISTRY_URI=registry.gitlab.com/softwareradiosystems/srsgnb RETINA_REGISTRY_PREFIX=registry.gitlab.com/softwareradiosystems/ci/retina -RETINA_VERSION=0.41.18 +RETINA_VERSION=0.41.20 AMARISOFT_VERSION=2023-03-17 SRSUE_VERSION=23.11 OPEN5GS_VERSION=2.6.1 diff --git a/tests/e2e/tests/attach_detach.py b/tests/e2e/tests/attach_detach.py index d54a9d3926..4d26e59ea1 100644 --- a/tests/e2e/tests/attach_detach.py +++ b/tests/e2e/tests/attach_detach.py @@ -51,6 +51,7 @@ ), ) @mark.zmq +@mark.flaky(reruns=3, only_rerun=["failed to start"]) # pylint: disable=too-many-arguments def test_zmq( retina_manager: RetinaTestManager, diff --git a/tests/e2e/tests/iperf.py b/tests/e2e/tests/iperf.py index d5d78dc422..e569d66844 100644 --- a/tests/e2e/tests/iperf.py +++ b/tests/e2e/tests/iperf.py @@ -476,6 +476,7 @@ def test_zmq_smoke( ), ) @mark.zmq +@mark.flaky(reruns=3, only_rerun=["failed to start", "iperf did not achieve the expected data rate"]) # pylint: disable=too-many-arguments def test_zmq( retina_manager: RetinaTestManager, From 431c19890d86b73764b149bf5da77c0cfc36345f Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Tue, 6 Feb 2024 17:13:13 +0100 Subject: [PATCH 06/78] uhd: Fix unitialized value --- lib/radio/uhd/radio_uhd_impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/radio/uhd/radio_uhd_impl.h b/lib/radio/uhd/radio_uhd_impl.h index 1b1964ac67..a6c4e8d96c 100644 --- a/lib/radio/uhd/radio_uhd_impl.h +++ b/lib/radio/uhd/radio_uhd_impl.h @@ -27,11 +27,11 @@ class radio_session_uhd_impl : public radio_session, private radio_management_pl /// Wait at most 1s for external clock locking. static constexpr int CLOCK_TIMEOUT_MS = 1000; /// Enumerates possible UHD session states. - enum class states { UNINITIALIZED, SUCCESSFUL_INIT, STOP }; + enum class states { UNINITIALIZED = 0, SUCCESSFUL_INIT, STOP }; /// Maps ports to stream and channel indexes. using port_to_stream_channel = std::pair; /// Indicates the current state. - std::atomic state; + std::atomic state = {states::UNINITIALIZED}; /// Wraps the UHD device functions. radio_uhd_device device; /// Indexes the transmitter port indexes into stream and channel index as first and second. From ab9d1fba9c10a547761540a55a8c0a98ae660301 Mon Sep 17 00:00:00 2001 From: Alejandro Leal Date: Mon, 5 Feb 2024 13:15:54 +0100 Subject: [PATCH 07/78] ofh: support one section in the OFH User-Plane decoder --- .../ofh_uplane_message_decoder_properties.h | 7 ++-- .../ofh_uplane_message_decoder_impl.cpp | 10 ++++++ ...plane_packet_decoder_dynamic_impl_test.cpp | 30 +++++++++++++++++ ...uplane_packet_decoder_static_impl_test.cpp | 32 +++++++++++++++++++ 4 files changed, 77 insertions(+), 2 deletions(-) diff --git a/include/srsran/ofh/serdes/ofh_uplane_message_decoder_properties.h b/include/srsran/ofh/serdes/ofh_uplane_message_decoder_properties.h index f1ca73a3de..93786dcae2 100644 --- a/include/srsran/ofh/serdes/ofh_uplane_message_decoder_properties.h +++ b/include/srsran/ofh/serdes/ofh_uplane_message_decoder_properties.h @@ -20,7 +20,7 @@ namespace srsran { namespace ofh { /// Maximum number of supported sections. -static constexpr unsigned MAX_NOF_SUPPORTED_SECTIONS = 2U; +static constexpr unsigned MAX_NOF_SUPPORTED_SECTIONS = 1U; /// Open Fronthaul User-Plane section parameters. struct uplane_section_params { @@ -47,10 +47,13 @@ struct uplane_section_params { /// Open Fronthaul User-Plane message decoder results. struct uplane_message_decoder_results { + /// Maximum number of sections supported by this result. + static constexpr unsigned RESULTS_MAX_NOF_SUPPORTED_SECTIONS = 2U; + /// Open Fronthaul User-Plane message parameters. uplane_message_params params; /// User-Plane message sections. - static_vector sections; + static_vector sections; }; } // namespace ofh diff --git a/lib/ofh/serdes/ofh_uplane_message_decoder_impl.cpp b/lib/ofh/serdes/ofh_uplane_message_decoder_impl.cpp index 2ead4b7e00..d4de8beccc 100644 --- a/lib/ofh/serdes/ofh_uplane_message_decoder_impl.cpp +++ b/lib/ofh/serdes/ofh_uplane_message_decoder_impl.cpp @@ -120,6 +120,16 @@ bool uplane_message_decoder_impl::decode_all_sections(uplane_message_decoder_res if (!decode_section(results, deserializer)) { break; } + + if (results.sections.full()) { + logger.info("Dropped received Open Fronthaul message as this deserializer only supports '{}' section for slot " + "'{}' and symbol '{}'", + MAX_NOF_SUPPORTED_SECTIONS, + results.params.slot, + results.params.symbol_id); + + return false; + } } bool is_result_valid = !results.sections.empty(); diff --git a/tests/unittests/ofh/serdes/ofh_uplane_packet_decoder_dynamic_impl_test.cpp b/tests/unittests/ofh/serdes/ofh_uplane_packet_decoder_dynamic_impl_test.cpp index 8f7edc785a..3d3b4f0e3b 100644 --- a/tests/unittests/ofh/serdes/ofh_uplane_packet_decoder_dynamic_impl_test.cpp +++ b/tests/unittests/ofh/serdes/ofh_uplane_packet_decoder_dynamic_impl_test.cpp @@ -379,3 +379,33 @@ TEST(ofh_uplane_packet_decoder_dynamic_impl, if_message_contains_one_valid_secti ASSERT_EQ(ru_nof_prbs, results.sections.front().nof_prbs); ASSERT_EQ(1, results.sections.size()); } + +TEST(ofh_uplane_packet_decoder_dynamic_impl, message_containing_more_than_one_section_should_fail_to_decode) +{ + std::vector packet = { + 0x10, 0x02, 0x40, 0x42, 0x00, 0x70, 0x24, 0x00, 0x91, 0x00, 0x00, 0x01, 0x7c, 0x01, 0x7c, 0x01, 0x86, 0x01, 0x86, + 0x01, 0x90, 0x01, 0x90, 0x01, 0x9a, 0x01, 0x9a, 0x01, 0xa4, 0x01, 0x86, 0x01, 0x86, 0x01, 0x90, 0x01, 0x90, 0x01, + 0x9a, 0x01, 0x9a, 0x01, 0xa4, 0x01, 0x86, 0x01, 0x86, 0x01, 0x90, 0x01, 0x90, 0x01, 0x9a, 0x01, 0x9a, 0x01, 0xa4, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x02, 0x40, 0x42, 0x00, 0x70, 0x24, 0x00, 0x91, 0x00, 0x00, 0x01, 0x7c, 0x01, 0x7c, 0x01, 0x86, 0x01, 0x86, 0x01, + 0x90, 0x01, 0x90, 0x01, 0x9a, 0x01, 0x9a, 0x01, 0xa4, 0x01, 0x86, 0x01, 0x86, 0x01, 0x90, 0x01, 0x90, 0x01, 0x9a, + 0x01, 0x9a, 0x01, 0xa4, 0x01, 0x86, 0x01, 0x86, 0x01, 0x90, 0x01, 0x90, 0x01, 0x9a, 0x01, 0x9a, 0x01, 0xa4, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + const unsigned ru_nof_prbs = 2; + + uplane_message_decoder_dynamic_compression_impl decoder(srslog::fetch_basic_logger("TEST"), + subcarrier_spacing::kHz30, + get_nsymb_per_slot(cyclic_prefix::NORMAL), + ru_nof_prbs, + std::make_unique()); + + uplane_message_decoder_results results; + bool decode_result = decoder.decode(results, packet); + + ASSERT_FALSE(decode_result); +} diff --git a/tests/unittests/ofh/serdes/ofh_uplane_packet_decoder_static_impl_test.cpp b/tests/unittests/ofh/serdes/ofh_uplane_packet_decoder_static_impl_test.cpp index 4b984feafe..825cb2d106 100644 --- a/tests/unittests/ofh/serdes/ofh_uplane_packet_decoder_static_impl_test.cpp +++ b/tests/unittests/ofh/serdes/ofh_uplane_packet_decoder_static_impl_test.cpp @@ -478,3 +478,35 @@ TEST(ofh_uplane_packet_decoder_static_impl, return_invalid_slot_point_on_packet_ ASSERT_FALSE(slot.get_slot().valid()); } + +TEST(ofh_uplane_packet_decoder_static_impl, message_containing_more_than_one_section_should_fail_to_decode) +{ + std::vector packet = { + 0x10, 0x02, 0x40, 0x42, 0x00, 0x70, 0x24, 0x00, 0x91, 0x00, 0x00, 0x01, 0x7c, 0x01, 0x7c, 0x01, 0x86, 0x01, 0x86, + 0x01, 0x90, 0x01, 0x90, 0x01, 0x9a, 0x01, 0x9a, 0x01, 0xa4, 0x01, 0x86, 0x01, 0x86, 0x01, 0x90, 0x01, 0x90, 0x01, + 0x9a, 0x01, 0x9a, 0x01, 0xa4, 0x01, 0x86, 0x01, 0x86, 0x01, 0x90, 0x01, 0x90, 0x01, 0x9a, 0x01, 0x9a, 0x01, 0xa4, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x02, 0x40, 0x42, 0x00, 0x70, 0x24, 0x00, 0x91, 0x00, 0x00, 0x01, 0x7c, 0x01, 0x7c, 0x01, 0x86, 0x01, 0x86, 0x01, + 0x90, 0x01, 0x90, 0x01, 0x9a, 0x01, 0x9a, 0x01, 0xa4, 0x01, 0x86, 0x01, 0x86, 0x01, 0x90, 0x01, 0x90, 0x01, 0x9a, + 0x01, 0x9a, 0x01, 0xa4, 0x01, 0x86, 0x01, 0x86, 0x01, 0x90, 0x01, 0x90, 0x01, 0x9a, 0x01, 0x9a, 0x01, 0xa4, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + const unsigned ru_nof_prbs = 2; + + uplane_message_decoder_static_compression_impl decoder(srslog::fetch_basic_logger("TEST"), + subcarrier_spacing::kHz30, + get_nsymb_per_slot(cyclic_prefix::NORMAL), + ru_nof_prbs, + std::make_unique(), + {compression_type::BFP, 9}, + {compression_type::BFP, 9}); + + uplane_message_decoder_results results; + bool decode_result = decoder.decode(results, packet); + + ASSERT_FALSE(decode_result); +} From 2f2c8602fe6f11a2a347177507dd01c35b816e9c Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 5 Feb 2024 15:45:21 +0100 Subject: [PATCH 08/78] phy: rearange precoding buffer --- lib/phy/support/resource_grid_mapper_impl.cpp | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/lib/phy/support/resource_grid_mapper_impl.cpp b/lib/phy/support/resource_grid_mapper_impl.cpp index cbeaa4dcff..e021363f8a 100644 --- a/lib/phy/support/resource_grid_mapper_impl.cpp +++ b/lib/phy/support/resource_grid_mapper_impl.cpp @@ -33,6 +33,7 @@ static const re_prb_mask& get_re_mask_type_1(unsigned cdm_group_id) // Optimized mapping for PDSCH DM-RS Type 1 mapped on contiguous RBs. It derives the CDM group ID of the input symbols // from the RE allocation pattern. static void map_dmrs_type1_contiguous(resource_grid_writer& writer, + precoding_buffer_type& precoding_buffer, const re_buffer_reader& input, const re_pattern& pattern, const precoding_configuration& precoding, @@ -58,9 +59,10 @@ static void map_dmrs_type1_contiguous(resource_grid_writer& writer, unsigned nof_re_symbol = nof_dmrs_re_prb * pattern.prb_mask.count(); - // Temporary intermediate buffer for storing precoded symbols. - static_re_buffer precoding_buffer(nof_precoding_ports, - nof_re_symbol); + if ((nof_re_symbol != precoding_buffer.get_nof_re()) || (nof_precoding_ports != precoding_buffer.get_nof_slices())) { + // Resize the output buffer if the input dimensions don't match. + precoding_buffer.resize(nof_precoding_ports, nof_re_symbol); + } unsigned first_prb = pattern.prb_mask.find_lowest(true); unsigned prb_end = pattern.prb_mask.find_highest(true) + 1; @@ -165,12 +167,15 @@ void resource_grid_mapper_impl::map(const re_buffer_reader& input, precoding.get_nof_ports(), nof_ports); + // Temporary intermediate buffer for storing precoded symbols. + precoding_buffer_type precoding_buffer; + bool is_dmrs_type1 = pattern.prb_mask.is_contiguous(true) && (pattern.re_mask == get_re_mask_type_1(0) || pattern.re_mask == get_re_mask_type_1(1)); if (is_dmrs_type1) { // Optimized contiguous DM-RS Type 1 mapping. - map_dmrs_type1_contiguous(writer, input, pattern, precoding, *precoder); + map_dmrs_type1_contiguous(writer, precoding_buffer, input, pattern, precoding, *precoder); return; } @@ -196,9 +201,10 @@ void resource_grid_mapper_impl::map(const re_buffer_reader& input, // Number of RE to be allocated for each OFDM symbol in the pattern. unsigned nof_re_symbol = symbol_re_mask.count(); - // Temporary intermediate buffer for storing precoded symbols. - static_re_buffer precoding_buffer(nof_precoding_ports, - nof_re_symbol); + if ((nof_re_symbol != precoding_buffer.get_nof_re()) || (nof_precoding_ports != precoding_buffer.get_nof_slices())) { + // Resize the output buffer if the input dimensions don't match. + precoding_buffer.resize(nof_precoding_ports, nof_re_symbol); + } // Counter for the number of RE read from the input and mapped to the grid. unsigned i_re_buffer = 0; @@ -278,6 +284,9 @@ void resource_grid_mapper_impl::map(symbol_buffer& buffer, const precoding_configuration& precoding, unsigned re_skip) { + // Temporary intermediate buffer for storing precoded symbols. + precoding_buffer_type precoding_buffer; + // The number of layers is equal to the number of ports. unsigned nof_layers = precoding.get_nof_layers(); @@ -390,8 +399,8 @@ void resource_grid_mapper_impl::map(symbol_buffer& buffer, // Prepare destination of the modulation buffer. span block = buffer.pop_symbols(nof_symbols_block); - // Prepare precoding result buffer. - precoding_buffer_type precoding_buffer(nof_antennas, nof_re_block); + // Prepare buffers. + precoding_buffer.resize(nof_antennas, nof_re_block); // Layer map and precoding. precoder->apply_layer_map_and_precoding(precoding_buffer, block, prg_weights); From 24df6fcf63bea2bb0955f95ff0aaace9c5bb148b Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 12 Feb 2024 11:15:42 +0100 Subject: [PATCH 09/78] ru: fix dummy RU for TSAN --- lib/ru/dummy/ru_dummy_sector.h | 157 +++++++++++++++++++-------------- 1 file changed, 91 insertions(+), 66 deletions(-) diff --git a/lib/ru/dummy/ru_dummy_sector.h b/lib/ru/dummy/ru_dummy_sector.h index 2a246df04d..59b8e6700e 100644 --- a/lib/ru/dummy/ru_dummy_sector.h +++ b/lib/ru/dummy/ru_dummy_sector.h @@ -13,13 +13,14 @@ #include "ru_dummy_rx_prach_buffer.h" #include "ru_dummy_rx_resource_grid.h" #include "srsran/adt/circular_array.h" -#include "srsran/adt/ring_buffer.h" +#include "srsran/phy/constants.h" #include "srsran/phy/support/prach_buffer_context.h" #include "srsran/phy/support/resource_grid_context.h" #include "srsran/ran/cyclic_prefix.h" #include "srsran/ran/slot_point.h" #include "srsran/ru/ru_downlink_plane.h" #include "srsran/ru/ru_uplink_plane.h" +#include "srsran/srslog/logger.h" #include #include @@ -48,20 +49,16 @@ class ru_dummy_sector : public ru_uplink_plane_handler, public ru_downlink_plane symbol_notifier(symbol_notifier_), rx_symbols_resource_grid(sector_id, rx_rg_nof_prb * NRE, MAX_NSYMB_PER_SLOT, rx_rg_nof_ports), rx_symbols_prach_buffer(sector_id, rx_prach_nof_ports), - dl_data_margin(dl_data_margin_), - ul_request(max_nof_request), - prach_request(max_nof_request) + dl_data_margin(dl_data_margin_) { } - ru_dummy_sector(ru_dummy_sector&& other) : + ru_dummy_sector(ru_dummy_sector&& other) noexcept : logger(other.logger), symbol_notifier(other.symbol_notifier), rx_symbols_resource_grid(std::move(other.rx_symbols_resource_grid)), rx_symbols_prach_buffer(std::move(other.rx_symbols_prach_buffer)), - dl_data_margin(other.dl_data_margin), - ul_request(max_nof_request), - prach_request(max_nof_request) + dl_data_margin(other.dl_data_margin) { } @@ -82,86 +79,110 @@ class ru_dummy_sector : public ru_uplink_plane_handler, public ru_downlink_plane // See ru_uplink_plane_handler interface for documentation. void handle_prach_occasion(const prach_buffer_context& context, prach_buffer& buffer) override { - prach_request.push(context); + std::lock_guard lock(prach_request_mutex); + prach_buffer_context prev_context = std::exchange(prach_request[context.slot.system_slot()], context); + + // Detect if there is an unhandled request from a different slot. + if (prev_context.slot.valid()) { + logger.warning(context.slot.sfn(), + context.slot.slot_index(), + "Real-time failure in RU: received late PRACH request from slot {} in sector {}.", + prev_context.slot, + prev_context.sector); + } } // See ru_uplink_plane_handler interface for documentation. void handle_new_uplink_slot(const resource_grid_context& context, resource_grid& grid) override { - ul_request.push(context); + std::lock_guard lock(ul_request_mutex); + resource_grid_context prev_context = std::exchange(ul_request[context.slot.system_slot()], context); + + // Detect if there is an unhandled request from a different slot. + if (prev_context.slot.valid()) { + logger.warning(context.slot.sfn(), + context.slot.slot_index(), + "Real-time failure in RU: received late UL request from slot {} in sector {}.", + prev_context.slot, + prev_context.sector); + } } /// Notifies a new slot boundary. void new_slot_boundary(slot_point slot) { - // Set logger context. - logger.set_context(slot.sfn(), slot.slot_index()); - - // Discard DL requests that are late. + // Process DL request for this slot. slot_point current_dl_slot = slot + dl_data_margin; - resource_grid_context prev_context = {slot_point(), 0}; + resource_grid_context context = {slot_point(), 0}; { std::lock_guard lock(dl_request_mutex); - prev_context = std::exchange(dl_request[current_dl_slot.system_slot()], prev_context); + context = std::exchange(dl_request[current_dl_slot.system_slot()], context); } - // Notify with a warning message if the previous saved context do not match with the current slot. - if (prev_context.slot.valid() && (prev_context.slot != current_dl_slot)) { - logger.warning("Real-time failure in RU: received late DL request from slot {} in sector {}.", - prev_context.slot, - prev_context.sector); + // Notify with a warning message if the DL previous saved context do not match with the current slot. + if (context.slot.valid() && (context.slot != current_dl_slot)) { + logger.warning(current_dl_slot.sfn(), + current_dl_slot.slot_index(), + "Real-time failure in RU: detected late DL request from slot {} in sector {}.", + context.slot, + context.sector); } - // Discard UL requests that are late. - while (!ul_request.empty() && (ul_request.top().slot < slot)) { - // Notify with a warning message. - logger.warning(slot.sfn(), - slot.slot_index(), - "Real-time failure in RU: received late UL request from slot {} in sector {}.", - ul_request.top().slot, - ul_request.top().sector); - - // Pop UL request slot. - ul_request.pop(); + // Process UL request for this slot. + resource_grid_context ul_context = {slot_point(), 0}; + { + std::lock_guard lock(ul_request_mutex); + ul_context = std::exchange(ul_request[slot.system_slot()], ul_context); } - // Process UL request if the UL request list is not empty and the next matches the current slot. - if (!ul_request.empty() && (ul_request.top().slot == slot)) { - // Prepare receive symbol context. - const resource_grid_context& request_context = ul_request.top(); - ru_uplink_rx_symbol_context context; - context.slot = request_context.slot; - context.sector = request_context.sector; - context.symbol_id = MAX_NSYMB_PER_SLOT - 1; - - // Notify received resource grid. - symbol_notifier.on_new_uplink_symbol(context, rx_symbols_resource_grid); - - // Pop UL request slot. - ul_request.pop(); + // Check if the UL context from the request list is valid. + if (ul_context.slot.valid()) { + if (ul_context.slot == slot) { + // Prepare receive symbol context. + ru_uplink_rx_symbol_context rx_context; + rx_context.slot = ul_context.slot; + rx_context.sector = ul_context.sector; + rx_context.symbol_id = MAX_NSYMB_PER_SLOT - 1; + + // Notify received resource grid. + symbol_notifier.on_new_uplink_symbol(rx_context, rx_symbols_resource_grid); + } else { + // Notify with a warning message if the UL previous saved context do not match with the current slot. + logger.warning(slot.sfn(), + slot.slot_index(), + "Real-time failure in RU: detected late UL request from slot {} in sector {}.", + ul_context.slot, + ul_context.sector); + } } - // Discard PRACH requests that are late. - while (!prach_request.empty() && (prach_request.top().slot < slot)) { - // Notify with a warning message. - logger.warning(slot.sfn(), - slot.slot_index(), - "Real-time failure in RU: received late PRACH request from slot {} in sector {}.", - prach_request.top().slot, - prach_request.top().sector); - - // Pop UL request slot. - prach_request.pop(); + // Process PRACH request for this slot. + prach_buffer_context prach_context{}; + { + std::lock_guard lock(prach_request_mutex); + prach_context = std::exchange(prach_request[slot.system_slot()], prach_context); } - // Process PRACH request if the PRACH request list is not empty and the next matches the current slot. - if (!prach_request.empty() && (prach_request.top().slot == slot)) { - // Notify received PRACH buffer. - symbol_notifier.on_new_prach_window_data(prach_request.top(), - rx_symbols_prach_buffer.get_buffer(prach_request.top())); - // Pop UL request slot. - prach_request.pop(); + // Check if the UL context from the request list is valid. + if (prach_context.slot.valid()) { + if (prach_context.slot == slot) { + // Prepare receive symbol context. + ru_uplink_rx_symbol_context rx_context; + rx_context.slot = prach_context.slot; + rx_context.sector = prach_context.sector; + rx_context.symbol_id = MAX_NSYMB_PER_SLOT - 1; + + // Notify received resource grid. + symbol_notifier.on_new_uplink_symbol(rx_context, rx_symbols_resource_grid); + } else { + // Notify with a warning message if the UL previous saved context do not match with the current slot. + logger.warning(slot.sfn(), + slot.slot_index(), + "Real-time failure in RU: detected late PRACH request from slot {} in sector {}.", + prach_context.slot, + prach_context.sector); + } } } @@ -180,9 +201,13 @@ class ru_dummy_sector : public ru_uplink_plane_handler, public ru_downlink_plane /// Downlink request margin. unsigned dl_data_margin; /// Buffer containing the UL requests slots. - ring_buffer ul_request; + circular_array ul_request; + /// Protects the circular buffer containing the UL requests. + std::mutex ul_request_mutex; /// Buffer containing the PRACH requests slots. - ring_buffer prach_request; + circular_array prach_request; + /// Protects the circular buffer containing the PRACH requests. + std::mutex prach_request_mutex; /// Circular buffer containing the DL requests indexed by system slot. circular_array dl_request; /// Protects the circular buffer containing the DL requests. From 1948490e03deafafa5266e7e240417c4a45b02bf Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 12 Feb 2024 12:09:00 +0100 Subject: [PATCH 10/78] ru: fix dummy RU PRACH --- lib/ru/dummy/ru_dummy_sector.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/ru/dummy/ru_dummy_sector.h b/lib/ru/dummy/ru_dummy_sector.h index 59b8e6700e..e1b2a97dbf 100644 --- a/lib/ru/dummy/ru_dummy_sector.h +++ b/lib/ru/dummy/ru_dummy_sector.h @@ -167,14 +167,8 @@ class ru_dummy_sector : public ru_uplink_plane_handler, public ru_downlink_plane // Check if the UL context from the request list is valid. if (prach_context.slot.valid()) { if (prach_context.slot == slot) { - // Prepare receive symbol context. - ru_uplink_rx_symbol_context rx_context; - rx_context.slot = prach_context.slot; - rx_context.sector = prach_context.sector; - rx_context.symbol_id = MAX_NSYMB_PER_SLOT - 1; - - // Notify received resource grid. - symbol_notifier.on_new_uplink_symbol(rx_context, rx_symbols_resource_grid); + // Notify received PRACH buffer. + symbol_notifier.on_new_prach_window_data(prach_context, rx_symbols_prach_buffer.get_buffer(prach_context)); } else { // Notify with a warning message if the UL previous saved context do not match with the current slot. logger.warning(slot.sfn(), From 470fe93592fc73825be9fa336bed5e8c54754728 Mon Sep 17 00:00:00 2001 From: Fabian Eckermann Date: Mon, 12 Feb 2024 09:58:06 +0100 Subject: [PATCH 11/78] cu_cp,rrc: Improve logging --- lib/rrc/ue/procedures/rrc_reestablishment_procedure.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rrc/ue/procedures/rrc_reestablishment_procedure.cpp b/lib/rrc/ue/procedures/rrc_reestablishment_procedure.cpp index 67f118db12..9620fdc563 100644 --- a/lib/rrc/ue/procedures/rrc_reestablishment_procedure.cpp +++ b/lib/rrc/ue/procedures/rrc_reestablishment_procedure.cpp @@ -56,6 +56,7 @@ void rrc_reestablishment_procedure::operator()(coro_context>& c // Verify if we are in conditions for a Reestablishment, or should opt for a RRC Setup. if (is_reestablishment_rejected()) { CORO_AWAIT(handle_rrc_reestablishment_fallback()); + logger.log_debug("\"{}\" for old_ue={} finalized", name(), reestablishment_context.ue_index); CORO_EARLY_RETURN(); } @@ -64,6 +65,7 @@ void rrc_reestablishment_procedure::operator()(coro_context>& c cu_cp_notifier.on_ue_transfer_required(context.ue_index, reestablishment_context.ue_index)); if (not context_transfer_success) { CORO_AWAIT(handle_rrc_reestablishment_fallback()); + logger.log_debug("\"{}\" for old_ue={} finalized", name(), reestablishment_context.ue_index); CORO_EARLY_RETURN(); } From cf4beba800f7570b9cea494f0d90df1d4e6b01f8 Mon Sep 17 00:00:00 2001 From: Fabian Eckermann Date: Mon, 12 Feb 2024 09:58:27 +0100 Subject: [PATCH 12/78] cu_cp,ngap: Fix logging --- lib/ngap/procedures/ng_setup_procedure.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ngap/procedures/ng_setup_procedure.cpp b/lib/ngap/procedures/ng_setup_procedure.cpp index b216ea3be0..035f11f2b4 100644 --- a/lib/ngap/procedures/ng_setup_procedure.cpp +++ b/lib/ngap/procedures/ng_setup_procedure.cpp @@ -77,14 +77,17 @@ bool ng_setup_procedure::retry_required() } const asn1::ngap::ng_setup_fail_s& ng_fail = transaction_sink.failure(); + logger.warning("\"{}\" failed. AMF NGAP cause: \"{}\"", name(), get_cause_str(ng_fail->cause)); + if (not ng_fail->time_to_wait_present) { // AMF didn't command a waiting time. - logger.debug("\"{}\": Stopping procedure. Cause: AMF did not set any retry waiting time", name()); + logger.warning("\"{}\": Stopping procedure. Cause: AMF did not set any retry waiting time", name()); return false; } if (ng_setup_retry_no++ >= max_setup_retries) { // Number of retries exceeded, or there is no time to wait. - logger.warning("Reached maximum number of NG Setup connection retries ({})", max_setup_retries); + logger.warning("\"{}\": Stopping procedure. Cause: Reached maximum number of NG Setup connection retries ({})", + max_setup_retries); return false; } @@ -106,10 +109,7 @@ ngap_ng_setup_result ng_setup_procedure::create_ng_setup_result() } } else { - const asn1::ngap::ng_setup_fail_s& ng_fail = transaction_sink.failure(); - logger.warning("\"{}\" failed. AMF NGAP cause: \"{}\"", name(), get_cause_str(ng_fail->cause)); - - fill_ngap_ng_setup_result(res, ng_fail); + fill_ngap_ng_setup_result(res, transaction_sink.failure()); } return res; From 7bf5408d5b60d22128c7b0e645ee2781d6e0b706 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 9 Feb 2024 14:58:27 +0100 Subject: [PATCH 13/78] phy: optimize LDPC decoder --- .../upper/channel_coding/ldpc/ldpc_decoder_impl.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/phy/upper/channel_coding/ldpc/ldpc_decoder_impl.cpp b/lib/phy/upper/channel_coding/ldpc/ldpc_decoder_impl.cpp index d7126b9bfb..783800ef72 100644 --- a/lib/phy/upper/channel_coding/ldpc/ldpc_decoder_impl.cpp +++ b/lib/phy/upper/channel_coding/ldpc/ldpc_decoder_impl.cpp @@ -162,7 +162,17 @@ void ldpc_decoder_impl::load_soft_bits(span llrs) void ldpc_decoder_impl::update_variable_to_check_messages(unsigned check_node) { - for (unsigned i_node = 0; i_node != bg_N_high_rate; ++i_node) { + // Retrieve list of variable nodes connected to this check node. + const BG_adjacency_row_t& current_var_indices = current_graph->get_adjacency_row(check_node); + + // Find first NO_EDGE in current_var_indices. + const auto* this_var_index_end = std::find(current_var_indices.begin(), current_var_indices.end(), NO_EDGE); + + // Iterate all variable nodes connected to this check node. + for (BG_adjacency_row_t::const_iterator this_var_index = current_var_indices.cbegin(); + this_var_index != this_var_index_end; + ++this_var_index) { + unsigned i_node = std::min(*this_var_index, bg_N_high_rate); span soft = get_soft_bits(i_node); span c2v = get_check_to_var(check_node, i_node); span v2c = get_var_to_check(i_node, 0); From 9cfae78ff56b60f1ea8acdfa8ffa9644013714ec Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 12 Feb 2024 16:02:19 +0100 Subject: [PATCH 14/78] phy: review LDPC decoder --- lib/phy/upper/channel_coding/ldpc/ldpc_decoder_impl.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/phy/upper/channel_coding/ldpc/ldpc_decoder_impl.cpp b/lib/phy/upper/channel_coding/ldpc/ldpc_decoder_impl.cpp index 783800ef72..e644fe8d73 100644 --- a/lib/phy/upper/channel_coding/ldpc/ldpc_decoder_impl.cpp +++ b/lib/phy/upper/channel_coding/ldpc/ldpc_decoder_impl.cpp @@ -166,13 +166,16 @@ void ldpc_decoder_impl::update_variable_to_check_messages(unsigned check_node) const BG_adjacency_row_t& current_var_indices = current_graph->get_adjacency_row(check_node); // Find first NO_EDGE in current_var_indices. - const auto* this_var_index_end = std::find(current_var_indices.begin(), current_var_indices.end(), NO_EDGE); + const auto* this_var_index_end = + std::find_if(current_var_indices.cbegin(), current_var_indices.cend(), [this](auto& element) { + return (element == NO_EDGE) || (element >= bg_N_high_rate); + }); // Iterate all variable nodes connected to this check node. for (BG_adjacency_row_t::const_iterator this_var_index = current_var_indices.cbegin(); this_var_index != this_var_index_end; ++this_var_index) { - unsigned i_node = std::min(*this_var_index, bg_N_high_rate); + unsigned i_node = *this_var_index; span soft = get_soft_bits(i_node); span c2v = get_check_to_var(check_node, i_node); span v2c = get_var_to_check(i_node, 0); From 2020633a4c9a72a5cd5d455600d4c3dc6cb43fdd Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Fri, 9 Feb 2024 17:04:02 +0100 Subject: [PATCH 15/78] cu-cp: move unit test checking whether a UE needs to be rejected due to an empty container to cu_cp_connectivity_test --- tests/unittests/cu_cp/CMakeLists.txt | 18 +++-- .../cu_cp/cu_cp_connectivity_test.cpp | 70 ++++++++++++++++--- tests/unittests/cu_cp/cu_cp_test.cpp | 58 --------------- .../cu_cp/cu_cp_test_environment.cpp | 14 ++++ .../unittests/cu_cp/cu_cp_test_environment.h | 3 + 5 files changed, 89 insertions(+), 74 deletions(-) diff --git a/tests/unittests/cu_cp/CMakeLists.txt b/tests/unittests/cu_cp/CMakeLists.txt index a3e3af0374..940968a6f8 100644 --- a/tests/unittests/cu_cp/CMakeLists.txt +++ b/tests/unittests/cu_cp/CMakeLists.txt @@ -29,12 +29,20 @@ add_library(cu_cp_test_helpers target_include_directories(cu_cp_test_helpers PRIVATE ${CMAKE_SOURCE_DIR}) target_link_libraries(cu_cp_test_helpers srsran_cu_cp srsran_support srslog f1ap_test_helpers e1ap_test_helpers f1ap_asn1 ngap_asn1 e1ap_asn1) -add_executable(cu_cp_connectivity_test cu_cp_connectivity_test.cpp) -target_link_libraries(cu_cp_connectivity_test cu_cp_test_helpers ngap_test_helpers rrc_ue_test_helpers gtest gtest_main) -gtest_discover_tests(cu_cp_connectivity_test) -add_executable(cu_cp_test cu_cp_test.cpp) -target_link_libraries(cu_cp_test cu_cp_test_helpers f1ap_cu_test_helpers ngap_test_helpers rrc_ue_test_helpers srsran_cu_cp srsran_support srslog f1ap_asn1 ngap_asn1 gtest gtest_main) +add_executable(cu_cp_test cu_cp_test.cpp cu_cp_connectivity_test.cpp) +target_link_libraries(cu_cp_test + cu_cp_test_helpers + f1ap_cu_test_helpers + ngap_test_helpers + rrc_ue_test_helpers + srsran_cu_cp + srsran_support + srslog + f1ap_asn1 + ngap_asn1 + gtest + gtest_main) target_include_directories(cu_cp_test PRIVATE ${CMAKE_SOURCE_DIR}) gtest_discover_tests(cu_cp_test) diff --git a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp index 215057ddad..06e7b410b0 100644 --- a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp +++ b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp @@ -27,17 +27,6 @@ class cu_cp_connectivity_test : public cu_cp_test_environment, public ::testing: { public: cu_cp_connectivity_test() : cu_cp_test_environment(cu_cp_test_env_params{8, 8, create_mock_amf()}) {} - - void run_ng_setup() - { - ngap_message ng_setup_resp = generate_ng_setup_response(); - get_amf().enqueue_next_tx_pdu(ng_setup_resp); - EXPECT_TRUE(get_cu_cp().start()); - ngap_message ngap_pdu; - EXPECT_TRUE(get_amf().try_pop_rx_pdu(ngap_pdu)) << "CU-CP did not send the NG Setup Request to the AMF"; - EXPECT_TRUE(is_pdu_type(ngap_pdu, asn1::ngap::ngap_elem_procs_o::init_msg_c::types::ng_setup_request)) - << "CU-CP did not setup the AMF connection"; - } }; //----------------------------------------------------------------------------------// @@ -354,3 +343,62 @@ TEST_F(cu_cp_connectivity_test, when_e1_is_not_setup_then_new_ues_are_rejected) ngap_message ngap_pdu; ASSERT_FALSE(this->get_amf().try_pop_rx_pdu(ngap_pdu)); } + +TEST_F(cu_cp_connectivity_test, when_initial_ul_rrc_message_has_no_rrc_container_then_ue_is_rejected) +{ + // Run NG setup to completion. + run_ng_setup(); + + // Setup DU. + auto ret = connect_new_du(); + ASSERT_TRUE(ret.has_value()); + unsigned du_idx = ret.value(); + ASSERT_TRUE(this->run_f1_setup(du_idx)); + + // Setup CU-UP. + ret = connect_new_cu_up(); + ASSERT_TRUE(ret.has_value()); + unsigned cu_up_idx = ret.value(); + ASSERT_TRUE(this->run_f1_setup(cu_up_idx)); + + // Send Initial UL RRC Message without DU-to-CU-RRC container. + gnb_du_ue_f1ap_id_t du_ue_f1ap_id = int_to_gnb_du_ue_f1ap_id(0); + rnti_t crnti = to_rnti(0x4601); + f1ap_message init_rrc_msg = generate_init_ul_rrc_message_transfer(du_ue_f1ap_id, crnti); + init_rrc_msg.pdu.init_msg().value.init_ul_rrc_msg_transfer()->du_to_cu_rrc_container_present = false; + get_du(du_idx).push_tx_pdu(init_rrc_msg); + + // Verify CU-CP sends a UE Context Release command over SRB0. + f1ap_message f1ap_pdu; + ASSERT_TRUE(this->wait_for_f1ap_tx_pdu(du_idx, f1ap_pdu)); + ASSERT_EQ(f1ap_pdu.pdu.type(), asn1::f1ap::f1ap_pdu_c::types_opts::options::init_msg); + ASSERT_EQ(f1ap_pdu.pdu.init_msg().value.type().value, + asn1::f1ap::f1ap_elem_procs_o::init_msg_c::types_opts::ue_context_release_cmd); + const auto& ue_rel = f1ap_pdu.pdu.init_msg().value.ue_context_release_cmd(); + ASSERT_TRUE(ue_rel->rrc_container_present); + // check that the SRB ID is set if the RRC Container is included + ASSERT_TRUE(ue_rel->srb_id_present); + ASSERT_EQ(ue_rel->srb_id, 0); + + // Verify that the UE Context Release command contains an RRC Reject. + asn1::rrc_nr::dl_ccch_msg_s ccch; + { + asn1::cbit_ref bref{f1ap_pdu.pdu.init_msg().value.ue_context_release_cmd()->rrc_container}; + ASSERT_EQ(ccch.unpack(bref), asn1::SRSASN_SUCCESS); + } + ASSERT_EQ(ccch.msg.c1().type().value, asn1::rrc_nr::dl_ccch_msg_type_c::c1_c_::types_opts::rrc_reject); + + // Verify UE is not removed until UE Context Release Complete. + auto report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); + ASSERT_EQ(report.ue_metrics.ues.size(), 1); + ASSERT_EQ(report.ue_metrics.ues[0].rnti, to_rnti(0x4601)); + + // Send F1AP UE Context Release Complete. + auto rel_complete = + generate_ue_context_release_complete(int_to_gnb_cu_ue_f1ap_id(ue_rel->gnb_cu_ue_f1ap_id), du_ue_f1ap_id); + get_du(du_idx).push_tx_pdu(rel_complete); + + // Verify UE is removed. + report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); + ASSERT_TRUE(report.ue_metrics.ues.empty()); +} diff --git a/tests/unittests/cu_cp/cu_cp_test.cpp b/tests/unittests/cu_cp/cu_cp_test.cpp index edcfc751e7..b055aeee71 100644 --- a/tests/unittests/cu_cp/cu_cp_test.cpp +++ b/tests/unittests/cu_cp/cu_cp_test.cpp @@ -20,64 +20,6 @@ using namespace srsran; using namespace srs_cu_cp; using namespace asn1::f1ap; -////////////////////////////////////////////////////////////////////////////////////// -/* AMF connection handling */ -////////////////////////////////////////////////////////////////////////////////////// - -/// Test the UE rejection if DU can't serve the UE -TEST_F(cu_cp_test, when_du_sends_empty_du_to_cu_container_then_ue_is_rejected) -{ - // Connect AMF by injecting a ng_setup_response - ngap_message ngap_msg = generate_ng_setup_response(); - cu_cp_obj->get_ngap_message_handler().handle_message(ngap_msg); - - ASSERT_TRUE(cu_cp_obj->amf_is_connected()); - - // Connect DU (note that this creates a DU processor, but the DU is only connected after the F1Setup procedure) - this->f1c_gw.request_new_du_connection(); - // Connect CU-UP - this->e1ap_gw.request_new_cu_up_connection(); - - // Generate F1SetupRequest - f1ap_message f1setup_msg = generate_f1_setup_request(); - - du_index_t du_index = uint_to_du_index(0); - - // Pass message to CU-CP - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(f1setup_msg); - - { - gnb_cu_ue_f1ap_id_t cu_ue_id = int_to_gnb_cu_ue_f1ap_id(0); - gnb_du_ue_f1ap_id_t du_ue_id = int_to_gnb_du_ue_f1ap_id(41255); - rnti_t crnti = to_rnti(0x4601); - - // Inject Initial UL RRC message with empty DU-to-CU container - f1ap_message init_ul_rrc_msg = generate_init_ul_rrc_message_transfer_without_du_to_cu_container(du_ue_id, crnti); - test_logger.info("Injecting Initial UL RRC message without DU to CU container"); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); - - // check that the UE Context Release Command with RRC Container was sent to the DU - span last_f1ap_msgs = f1c_gw.last_tx_pdus(0); - ASSERT_FALSE(last_f1ap_msgs.empty()); - ASSERT_EQ(last_f1ap_msgs.back().pdu.type(), asn1::f1ap::f1ap_pdu_c::types_opts::options::init_msg); - ASSERT_EQ(last_f1ap_msgs.back().pdu.init_msg().value.type().value, - asn1::f1ap::f1ap_elem_procs_o::init_msg_c::types_opts::ue_context_release_cmd); - ASSERT_TRUE(last_f1ap_msgs.back().pdu.init_msg().value.ue_context_release_cmd()->rrc_container_present); - // check that the SRB ID is set if the RRC Container is included - ASSERT_TRUE(last_f1ap_msgs.back().pdu.init_msg().value.ue_context_release_cmd()->srb_id_present); - ASSERT_EQ(last_f1ap_msgs.back().pdu.init_msg().value.ue_context_release_cmd()->srb_id, 0); - - // Inject UE Context Release Complete message - f1ap_message ue_context_release_complete_msg = generate_ue_context_release_complete(cu_ue_id, du_ue_id); - test_logger.info("Injecting UE Context Release Complete message"); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message( - ue_context_release_complete_msg); - } - - // check that UE has not been added - ASSERT_EQ(cu_cp_obj->get_connected_dus().get_nof_ues(), 0U); -} - ////////////////////////////////////////////////////////////////////////////////////// /* Paging handling */ ////////////////////////////////////////////////////////////////////////////////////// diff --git a/tests/unittests/cu_cp/cu_cp_test_environment.cpp b/tests/unittests/cu_cp/cu_cp_test_environment.cpp index f9826cce89..73ae325d4e 100644 --- a/tests/unittests/cu_cp/cu_cp_test_environment.cpp +++ b/tests/unittests/cu_cp/cu_cp_test_environment.cpp @@ -12,6 +12,7 @@ #include "tests/unittests/cu_cp/test_doubles/mock_cu_up.h" #include "tests/unittests/e1ap/common/e1ap_cu_cp_test_messages.h" #include "tests/unittests/f1ap/common/f1ap_cu_test_messages.h" +#include "tests/unittests/ngap/ngap_test_messages.h" #include "srsran/asn1/f1ap/f1ap_pdu_contents_ue.h" #include "srsran/asn1/rrc_nr/msg_common.h" #include "srsran/cu_cp/cu_cp_configuration_helpers.h" @@ -19,6 +20,7 @@ #include "srsran/cu_cp/cu_cp_types.h" #include "srsran/e1ap/common/e1ap_message.h" #include "srsran/f1ap/common/f1ap_message.h" +#include "srsran/ngap/ngap_message.h" #include "srsran/support/executors/task_worker.h" using namespace srsran; @@ -142,6 +144,18 @@ bool cu_cp_test_environment::wait_for_f1ap_tx_pdu(unsigned du_idx, f1ap_message& }); } +void cu_cp_test_environment::run_ng_setup() +{ + ngap_message ng_setup_resp = srs_cu_cp::generate_ng_setup_response(); + get_amf().enqueue_next_tx_pdu(ng_setup_resp); + report_fatal_error_if_not(get_cu_cp().start(), "Failed to start CU-CP"); + + ngap_message ngap_pdu; + report_fatal_error_if_not(get_amf().try_pop_rx_pdu(ngap_pdu), "CU-CP did not send the NG Setup Request to the AMF"); + report_fatal_error_if_not(is_pdu_type(ngap_pdu, asn1::ngap::ngap_elem_procs_o::init_msg_c::types::ng_setup_request), + "CU-CP did not setup the AMF connection"); +} + optional cu_cp_test_environment::connect_new_du() { auto du_stub = create_mock_du({get_cu_cp().get_connected_dus()}); diff --git a/tests/unittests/cu_cp/cu_cp_test_environment.h b/tests/unittests/cu_cp/cu_cp_test_environment.h index e43449e94c..d5e3ed5d31 100644 --- a/tests/unittests/cu_cp/cu_cp_test_environment.h +++ b/tests/unittests/cu_cp/cu_cp_test_environment.h @@ -42,6 +42,9 @@ class cu_cp_test_environment mock_du& get_du(size_t du_index) { return *dus.at(du_index); } mock_cu_up& get_cu_up(size_t cu_up_index) { return *cu_ups.at(cu_up_index); } + /// Start CU-CP connection to AMF and run NG setup procedure to completion. + void run_ng_setup(); + /// Establish a TNL connection between a DU and the CU-CP. optional connect_new_du(); /// Drop TNL connection between a DU and the CU-CP. From 5b0016413405463e2a8308b76f67f3fd5771a180 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Fri, 9 Feb 2024 18:59:15 +0100 Subject: [PATCH 16/78] cu-cp: extend cu-cp metrics to report connected DUs --- include/srsran/cu_cp/cu_cp.h | 4 -- include/srsran/cu_cp/cu_cp_metrics_handler.h | 21 ++++++---- include/srsran/cu_cp/du_repository.h | 8 ---- include/srsran/cu_cp/ue_manager.h | 4 +- lib/cu_cp/cu_cp_impl.cpp | 7 +--- lib/cu_cp/cu_cp_impl.h | 1 - lib/cu_cp/du_processor/du_metrics_handler.h | 39 +++++++++++++++++++ lib/cu_cp/du_processor/du_processor_impl.cpp | 11 ++++++ lib/cu_cp/du_processor/du_processor_impl.h | 5 ++- .../du_processor_impl_interface.h | 2 + .../du_processor/du_processor_repository.cpp | 23 +++++------ .../du_processor/du_processor_repository.h | 13 ++++--- .../metrics_handler/metrics_handler_impl.cpp | 18 ++++++--- .../metrics_handler/metrics_handler_impl.h | 15 ++++--- lib/cu_cp/ue_manager/ue_manager_impl.cpp | 12 +++--- lib/cu_cp/ue_manager/ue_manager_impl.h | 6 +-- lib/cu_cp/ue_manager/ue_metrics_handler.h | 2 +- .../du_high_cu/cu_du_test.cpp | 4 +- .../cu_cp/cu_cp_connectivity_test.cpp | 18 ++++----- tests/unittests/cu_cp/cu_cp_test.cpp | 8 ++-- tests/unittests/cu_cp/cu_cp_test_helpers.cpp | 5 +-- .../metrics_handler/metrics_handler_test.cpp | 26 +++++++------ 22 files changed, 154 insertions(+), 98 deletions(-) create mode 100644 lib/cu_cp/du_processor/du_metrics_handler.h diff --git a/include/srsran/cu_cp/cu_cp.h b/include/srsran/cu_cp/cu_cp.h index ef0cc1b751..ba7144ecf9 100644 --- a/include/srsran/cu_cp/cu_cp.h +++ b/include/srsran/cu_cp/cu_cp.h @@ -43,10 +43,6 @@ class cu_cp_cu_up_connection_interface public: virtual ~cu_cp_cu_up_connection_interface() = default; - /// \brief Get the number of CU-UPs connected to the CU-CP. - /// \return The number of CU-UPs. - virtual size_t get_nof_cu_ups() const = 0; - /// \brief Get the E1AP message handler interface of the CU-UP processor object. /// \param[in] cu_up_index The index of the CU-UP processor object. /// \return The E1AP message handler interface of the CU-UP processor object. diff --git a/include/srsran/cu_cp/cu_cp_metrics_handler.h b/include/srsran/cu_cp/cu_cp_metrics_handler.h index c6439705e0..13d5509f91 100644 --- a/include/srsran/cu_cp/cu_cp_metrics_handler.h +++ b/include/srsran/cu_cp/cu_cp_metrics_handler.h @@ -10,6 +10,7 @@ #pragma once +#include "srsran/ran/nr_cgi.h" #include "srsran/ran/pci.h" #include "srsran/ran/rnti.h" #include @@ -18,18 +19,22 @@ namespace srsran { namespace srs_cu_cp { -struct ue_metrics_report { - struct ue_context { +/// CU-CP Metrics report. +struct metrics_report { + struct ue_info { rnti_t rnti; pci_t pci; }; + struct cell_info { + nr_cell_global_id_t cgi; + pci_t pci; + }; + struct du_info { + std::vector cells; + }; - std::vector ues; -}; - -/// CU-CP Metrics report. -struct metrics_report { - ue_metrics_report ue_metrics; + std::vector ues; + std::vector dus; }; /// Interface used by the CU-CP to report metrics. diff --git a/include/srsran/cu_cp/du_repository.h b/include/srsran/cu_cp/du_repository.h index 8a741c4e75..9147227a95 100644 --- a/include/srsran/cu_cp/du_repository.h +++ b/include/srsran/cu_cp/du_repository.h @@ -54,14 +54,6 @@ class du_repository public: virtual ~du_repository() = default; - /// \brief Get the number of DUs connected to the CU-CP. - /// \return The number of DUs. - virtual size_t get_nof_dus() const = 0; - - /// \brief Get the number of UEs connected to the all DUs of the CU-CP. - /// \return The number of UEs. - virtual size_t get_nof_ues() const = 0; - /// \brief Handles the start of a new DU connection. /// /// \param f1ap_tx_pdu_notifier Notifier that the CU-CP will use to push F1AP Tx messages to the DU. Once this diff --git a/include/srsran/cu_cp/ue_manager.h b/include/srsran/cu_cp/ue_manager.h index 051d0c6034..a000545488 100644 --- a/include/srsran/cu_cp/ue_manager.h +++ b/include/srsran/cu_cp/ue_manager.h @@ -57,10 +57,10 @@ class du_ue : public ue_base virtual rrc_ue_measurement_notifier& get_rrc_ue_measurement_notifier() = 0; /// \brief Get the PCI of the UE. - virtual pci_t get_pci() = 0; + virtual pci_t get_pci() const = 0; /// \brief Get the C-RNTI of the UE. - virtual rnti_t get_c_rnti() = 0; + virtual rnti_t get_c_rnti() const = 0; /// \brief Get the DU index of the UE. virtual du_index_t get_du_index() = 0; diff --git a/lib/cu_cp/cu_cp_impl.cpp b/lib/cu_cp/cu_cp_impl.cpp index 03cf719125..16eb51ee69 100644 --- a/lib/cu_cp/cu_cp_impl.cpp +++ b/lib/cu_cp/cu_cp_impl.cpp @@ -54,7 +54,7 @@ cu_cp_impl::cu_cp_impl(const cu_cp_configuration& config_) : cu_up_db(cu_up_repository_config{cfg, e1ap_ev_notifier, srslog::fetch_basic_logger("CU-CP")}), routine_mng(ue_mng.get_task_sched()), controller(routine_mng, cfg.ngap_config, ngap_adapter, cu_up_db), - metrics_hdlr(std::make_unique(*cfg.cu_cp_executor, *cfg.timers, ue_mng)) + metrics_hdlr(std::make_unique(*cfg.cu_cp_executor, *cfg.timers, ue_mng, du_db)) { assert_cu_cp_configuration_valid(cfg); @@ -142,11 +142,6 @@ void cu_cp_impl::stop() logger.info("CU-CP stopped successfully."); } -size_t cu_cp_impl::get_nof_cu_ups() const -{ - return cu_up_db.get_nof_cu_ups(); -} - e1ap_message_handler& cu_cp_impl::get_e1ap_message_handler(cu_up_index_t cu_up_index) { return cu_up_db.get_cu_up(cu_up_index).get_e1ap_message_handler(); diff --git a/lib/cu_cp/cu_cp_impl.h b/lib/cu_cp/cu_cp_impl.h index df0baa61e0..582f03e092 100644 --- a/lib/cu_cp/cu_cp_impl.h +++ b/lib/cu_cp/cu_cp_impl.h @@ -47,7 +47,6 @@ class cu_cp_impl final : public cu_cp_interface, void stop() override; // CU-CP CU-UP interface - size_t get_nof_cu_ups() const override; e1ap_message_handler& get_e1ap_message_handler(cu_up_index_t cu_up_index) override; // NGAP interface diff --git a/lib/cu_cp/du_processor/du_metrics_handler.h b/lib/cu_cp/du_processor/du_metrics_handler.h new file mode 100644 index 0000000000..a5cc892d1b --- /dev/null +++ b/lib/cu_cp/du_processor/du_metrics_handler.h @@ -0,0 +1,39 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/cu_cp/cu_cp_metrics_handler.h" + +namespace srsran { +namespace srs_cu_cp { + +/// Interface used to capture the DU metrics from a single CU-CP DU. +class du_metrics_handler +{ +public: + virtual ~du_metrics_handler() = default; + + /// \brief Handle new request for UE metrics. + virtual metrics_report::du_info handle_du_metrics_report_request() const = 0; +}; + +/// Interface used to capture the DU metrics from all the connected DUs to the CU-CP. +class du_repository_metrics_handler +{ +public: + virtual ~du_repository_metrics_handler() = default; + + /// \brief Handle new request for UE metrics. + virtual std::vector handle_du_metrics_report_request() const = 0; +}; + +} // namespace srs_cu_cp +} // namespace srsran \ No newline at end of file diff --git a/lib/cu_cp/du_processor/du_processor_impl.cpp b/lib/cu_cp/du_processor/du_processor_impl.cpp index c5d84633e4..cf1ee60485 100644 --- a/lib/cu_cp/du_processor/du_processor_impl.cpp +++ b/lib/cu_cp/du_processor/du_processor_impl.cpp @@ -590,3 +590,14 @@ du_processor_impl::handle_ngap_handover_request(const ngap_handover_request& req { return routine_mng->start_inter_cu_handover_target_routine(request, cu_cp_notifier); } + +metrics_report::du_info du_processor_impl::handle_du_metrics_report_request() const +{ + metrics_report::du_info report; + for (const auto& cell : cell_db) { + report.cells.emplace_back(); + report.cells.back().cgi = cell.second.cgi; + report.cells.back().pci = cell.second.pci; + } + return report; +} diff --git a/lib/cu_cp/du_processor/du_processor_impl.h b/lib/cu_cp/du_processor/du_processor_impl.h index c75b31a8a5..33d42b2cbb 100644 --- a/lib/cu_cp/du_processor/du_processor_impl.h +++ b/lib/cu_cp/du_processor/du_processor_impl.h @@ -27,7 +27,7 @@ namespace srsran { namespace srs_cu_cp { -class du_processor_impl : public du_processor_impl_interface, public du_setup_handler +class du_processor_impl : public du_processor_impl_interface, public du_setup_handler, public du_metrics_handler { public: du_processor_impl(const du_processor_config_t& du_processor_config_, @@ -102,6 +102,8 @@ class du_processor_impl : public du_processor_impl_interface, public du_setup_ha task_sched.schedule_async_task(ue_index, std::move(task)); } + metrics_report::du_info handle_du_metrics_report_request() const override; + unique_timer make_unique_timer() override { return task_sched.make_unique_timer(); } timer_manager& get_timer_manager() override { return task_sched.get_timer_manager(); } @@ -121,6 +123,7 @@ class du_processor_impl : public du_processor_impl_interface, public du_setup_ha { return f1ap_ue_context_notifier; } + du_metrics_handler& get_metrics_handler() override { return *this; } private: /// \brief Create RRC UE object for given UE. diff --git a/lib/cu_cp/du_processor/du_processor_impl_interface.h b/lib/cu_cp/du_processor/du_processor_impl_interface.h index fed93853a5..12a46798bd 100644 --- a/lib/cu_cp/du_processor/du_processor_impl_interface.h +++ b/lib/cu_cp/du_processor/du_processor_impl_interface.h @@ -10,6 +10,7 @@ #pragma once +#include "du_metrics_handler.h" #include "srsran/adt/optional.h" #include "srsran/adt/static_vector.h" #include "srsran/e1ap/cu_cp/e1ap_cu_cp_bearer_context_update.h" @@ -445,6 +446,7 @@ class du_processor_impl_interface : public du_processor_f1ap_interface, virtual du_processor_statistics_handler& get_du_processor_statistics_handler() = 0; virtual du_processor_mobility_handler& get_du_processor_mobility_handler() = 0; virtual du_processor_f1ap_ue_context_notifier& get_du_processor_f1ap_ue_context_notifier() = 0; + virtual du_metrics_handler& get_metrics_handler() = 0; }; } // namespace srs_cu_cp diff --git a/lib/cu_cp/du_processor/du_processor_repository.cpp b/lib/cu_cp/du_processor/du_processor_repository.cpp index 4891f6b56f..9b806bc09e 100644 --- a/lib/cu_cp/du_processor/du_processor_repository.cpp +++ b/lib/cu_cp/du_processor/du_processor_repository.cpp @@ -180,20 +180,6 @@ du_index_t du_processor_repository::find_du(pci_t pci) return index; } -size_t du_processor_repository::get_nof_dus() const -{ - return du_db.size(); -} - -size_t du_processor_repository::get_nof_ues() const -{ - size_t nof_ues = 0; - for (auto& du : du_db) { - nof_ues += du.second.du_processor->get_nof_ues(); - } - return nof_ues; -} - du_handler& du_processor_repository::get_du(du_index_t du_index) { srsran_assert(du_index != du_index_t::invalid, "Invalid du_index={}", du_index); @@ -266,3 +252,12 @@ void du_processor_repository::handle_inactivity_notification(du_index_t // Forward message to DU processor du_db.at(du_index).du_processor->handle_inactivity_notification(msg); } + +std::vector du_processor_repository::handle_du_metrics_report_request() const +{ + std::vector du_reports; + for (auto& du : du_db) { + du_reports.emplace_back(du.second.du_processor->get_metrics_handler().handle_du_metrics_report_request()); + } + return du_reports; +} diff --git a/lib/cu_cp/du_processor/du_processor_repository.h b/lib/cu_cp/du_processor/du_processor_repository.h index 3c1b22ccfc..f3c503d648 100644 --- a/lib/cu_cp/du_processor/du_processor_repository.h +++ b/lib/cu_cp/du_processor/du_processor_repository.h @@ -16,6 +16,7 @@ #include "../cu_cp_controller/cu_cp_controller.h" #include "../cu_cp_impl_interface.h" #include "../task_schedulers/du_task_scheduler.h" +#include "du_metrics_handler.h" #include "srsran/cu_cp/cu_cp_types.h" #include "srsran/cu_cp/ue_manager.h" #include "srsran/support/async/async_task.h" @@ -44,7 +45,9 @@ struct du_repository_config { srslog::basic_logger& logger; }; -class du_processor_repository : public du_repository, public du_repository_ngap_handler +class du_processor_repository : public du_repository, + public du_repository_ngap_handler, + public du_repository_metrics_handler { public: explicit du_processor_repository(du_repository_config cfg_); @@ -53,10 +56,8 @@ class du_processor_repository : public du_repository, public du_repository_ngap_ // DU interface std::unique_ptr - handle_new_du_connection(std::unique_ptr f1ap_tx_pdu_notifier) override; - void handle_du_remove_request(du_index_t du_index) override; - size_t get_nof_dus() const override; - size_t get_nof_ues() const override; + handle_new_du_connection(std::unique_ptr f1ap_tx_pdu_notifier) override; + void handle_du_remove_request(du_index_t du_index) override; du_handler& get_du(du_index_t du_index) override; du_index_t find_du(pci_t pci) override; @@ -69,6 +70,8 @@ class du_processor_repository : public du_repository, public du_repository_ngap_ void handle_inactivity_notification(du_index_t du_index, const cu_cp_inactivity_notification& msg); + std::vector handle_du_metrics_report_request() const override; + private: struct du_context final : public du_handler { // CU-CP handler of DU processor events. diff --git a/lib/cu_cp/metrics_handler/metrics_handler_impl.cpp b/lib/cu_cp/metrics_handler/metrics_handler_impl.cpp index c85783facd..b874d93877 100644 --- a/lib/cu_cp/metrics_handler/metrics_handler_impl.cpp +++ b/lib/cu_cp/metrics_handler/metrics_handler_impl.cpp @@ -16,10 +16,15 @@ using namespace srsran; using namespace srs_cu_cp; -metrics_handler_impl::metrics_handler_impl(task_executor& cu_cp_exec_, - timer_manager& timers_, - ue_metrics_handler& ue_handler_) : - cu_cp_exec(cu_cp_exec_), timers(timers_), ue_handler(ue_handler_), logger(srslog::fetch_basic_logger("CU-CP")) +metrics_handler_impl::metrics_handler_impl(task_executor& cu_cp_exec_, + timer_manager& timers_, + ue_metrics_handler& ue_handler_, + du_repository_metrics_handler& du_handler_) : + cu_cp_exec(cu_cp_exec_), + timers(timers_), + ue_handler(ue_handler_), + du_handler(du_handler_), + logger(srslog::fetch_basic_logger("CU-CP")) { } @@ -80,9 +85,10 @@ metrics_report metrics_handler_impl::create_report() { metrics_report report; - report.ue_metrics = ue_handler.handle_ue_metrics_report_request(); + report.ues = ue_handler.handle_ue_metrics_report_request(); + report.dus = du_handler.handle_du_metrics_report_request(); - // TODO: Get metrics of connected remote nodes. + // TODO: Get metrics of connected CU-CP/AMF nodes. return report; } diff --git a/lib/cu_cp/metrics_handler/metrics_handler_impl.h b/lib/cu_cp/metrics_handler/metrics_handler_impl.h index bc931b8e33..60199758e2 100644 --- a/lib/cu_cp/metrics_handler/metrics_handler_impl.h +++ b/lib/cu_cp/metrics_handler/metrics_handler_impl.h @@ -10,6 +10,7 @@ #pragma once +#include "../du_processor/du_metrics_handler.h" #include "../ue_manager/ue_metrics_handler.h" #include "srsran/cu_cp/cu_cp_metrics_handler.h" #include "srsran/cu_cp/du_repository.h" @@ -22,7 +23,10 @@ namespace srs_cu_cp { class metrics_handler_impl final : public metrics_handler { public: - metrics_handler_impl(task_executor& cu_cp_exec_, timer_manager& timers, ue_metrics_handler& ue_handler_); + metrics_handler_impl(task_executor& cu_cp_exec_, + timer_manager& timers, + ue_metrics_handler& ue_handler_, + du_repository_metrics_handler& du_handler_); std::unique_ptr create_periodic_report_session(const periodic_metric_report_request& request) override; @@ -43,10 +47,11 @@ class metrics_handler_impl final : public metrics_handler void request_session_reconfiguration(unsigned session_id, const periodic_metric_report_request& request); void request_session_deletion(unsigned session_id); - task_executor& cu_cp_exec; - timer_manager& timers; - ue_metrics_handler& ue_handler; - srslog::basic_logger& logger; + task_executor& cu_cp_exec; + timer_manager& timers; + ue_metrics_handler& ue_handler; + du_repository_metrics_handler& du_handler; + srslog::basic_logger& logger; // Member variables to manage pool of sessions. std::mutex mutex; diff --git a/lib/cu_cp/ue_manager/ue_manager_impl.cpp b/lib/cu_cp/ue_manager/ue_manager_impl.cpp index 3abe614d70..66e33ab01c 100644 --- a/lib/cu_cp/ue_manager/ue_manager_impl.cpp +++ b/lib/cu_cp/ue_manager/ue_manager_impl.cpp @@ -183,14 +183,14 @@ ngap_ue* ue_manager::find_ngap_ue(ue_index_t ue_index) return nullptr; } -ue_metrics_report ue_manager::handle_ue_metrics_report_request() +std::vector ue_manager::handle_ue_metrics_report_request() const { - ue_metrics_report report; - report.ues.reserve(ues.size()); + std::vector report; + report.reserve(ues.size()); - for (auto& ue : ues) { - report.ues.emplace_back(); - ue_metrics_report::ue_context& ue_report = report.ues.back(); + for (const auto& ue : ues) { + report.emplace_back(); + metrics_report::ue_info& ue_report = report.back(); ue_report.rnti = ue.second.get_c_rnti(); ue_report.pci = ue.second.get_pci(); diff --git a/lib/cu_cp/ue_manager/ue_manager_impl.h b/lib/cu_cp/ue_manager/ue_manager_impl.h index 1af9ff3d07..140f981b5e 100644 --- a/lib/cu_cp/ue_manager/ue_manager_impl.h +++ b/lib/cu_cp/ue_manager/ue_manager_impl.h @@ -99,10 +99,10 @@ class cu_cp_ue : public du_ue, public ngap_ue, public rrc_ue_task_scheduler rrc_ue_measurement_notifier& get_rrc_ue_measurement_notifier() override { return rrc_ue_cu_cp_ev_notifier; } /// \brief Get the PCI of the UE. - pci_t get_pci() override { return pci; }; + pci_t get_pci() const override { return pci; }; /// \brief Get the C-RNTI of the UE. - rnti_t get_c_rnti() override { return c_rnti; } + rnti_t get_c_rnti() const override { return c_rnti; } /// \brief Get the DU index of the UE. du_index_t get_du_index() override { return du_index; } @@ -338,7 +338,7 @@ class ue_manager : public du_processor_ue_manager, public ngap_ue_manager, publi return ues.at(ue_index).get_rrc_ue_cu_cp_adapter(); } - ue_metrics_report handle_ue_metrics_report_request() override; + std::vector handle_ue_metrics_report_request() const override; ue_task_scheduler_manager& get_task_sched() { return ue_task_scheds; } diff --git a/lib/cu_cp/ue_manager/ue_metrics_handler.h b/lib/cu_cp/ue_manager/ue_metrics_handler.h index 0e81f6c2db..dd7357f812 100644 --- a/lib/cu_cp/ue_manager/ue_metrics_handler.h +++ b/lib/cu_cp/ue_manager/ue_metrics_handler.h @@ -22,7 +22,7 @@ class ue_metrics_handler virtual ~ue_metrics_handler() = default; /// \brief Handle new request for UE metrics. - virtual ue_metrics_report handle_ue_metrics_report_request() = 0; + virtual std::vector handle_ue_metrics_report_request() const = 0; }; } // namespace srs_cu_cp diff --git a/tests/integrationtests/du_high_cu/cu_du_test.cpp b/tests/integrationtests/du_high_cu/cu_du_test.cpp index 8d9d8448d9..e3b22f1ae1 100644 --- a/tests/integrationtests/du_high_cu/cu_du_test.cpp +++ b/tests/integrationtests/du_high_cu/cu_du_test.cpp @@ -102,5 +102,7 @@ class cu_du_test : public ::testing::Test TEST_F(cu_du_test, when_f1setup_successful_then_du_connected) { // check that DU has been added - ASSERT_EQ(cu_cp_obj->get_connected_dus().get_nof_dus(), 1); + auto report = cu_cp_obj->get_metrics_handler().request_metrics_report(); + ASSERT_EQ(report.dus.size(), 1); + ASSERT_EQ(report.dus[0].cells.size(), 1); } diff --git a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp index 06e7b410b0..ec6d8b6aaa 100644 --- a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp +++ b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp @@ -249,7 +249,7 @@ TEST_F(cu_cp_connectivity_test, when_ng_f1_e1_are_setup_then_ues_can_attach) // Check no UEs. auto report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); - ASSERT_TRUE(report.ue_metrics.ues.empty()); + ASSERT_TRUE(report.ues.empty()); // Create UE by sending Initial UL RRC Message. gnb_du_ue_f1ap_id_t du_ue_f1ap_id = int_to_gnb_du_ue_f1ap_id(0); @@ -275,8 +275,8 @@ TEST_F(cu_cp_connectivity_test, when_ng_f1_e1_are_setup_then_ues_can_attach) // Check UE is created. report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); - ASSERT_EQ(report.ue_metrics.ues.size(), 1); - ASSERT_EQ(report.ue_metrics.ues[0].rnti, crnti); + ASSERT_EQ(report.ues.size(), 1); + ASSERT_EQ(report.ues[0].rnti, crnti); // AMF still not notified of UE attach. ngap_message ngap_pdu; @@ -327,8 +327,8 @@ TEST_F(cu_cp_connectivity_test, when_e1_is_not_setup_then_new_ues_are_rejected) // Check UE is created and is only destroyed when F1AP UE context release complete is received. auto report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); - ASSERT_EQ(report.ue_metrics.ues.size(), 1); - ASSERT_EQ(report.ue_metrics.ues[0].rnti, crnti); + ASSERT_EQ(report.ues.size(), 1); + ASSERT_EQ(report.ues[0].rnti, crnti); // Send F1AP UE Context Release Complete. auto rel_complete = @@ -337,7 +337,7 @@ TEST_F(cu_cp_connectivity_test, when_e1_is_not_setup_then_new_ues_are_rejected) // Verify UE is removed. report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); - ASSERT_TRUE(report.ue_metrics.ues.empty()); + ASSERT_TRUE(report.ues.empty()); // Verify no NGAP PDU was sent when a UE is rejected. ngap_message ngap_pdu; @@ -390,8 +390,8 @@ TEST_F(cu_cp_connectivity_test, when_initial_ul_rrc_message_has_no_rrc_container // Verify UE is not removed until UE Context Release Complete. auto report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); - ASSERT_EQ(report.ue_metrics.ues.size(), 1); - ASSERT_EQ(report.ue_metrics.ues[0].rnti, to_rnti(0x4601)); + ASSERT_EQ(report.ues.size(), 1); + ASSERT_EQ(report.ues[0].rnti, to_rnti(0x4601)); // Send F1AP UE Context Release Complete. auto rel_complete = @@ -400,5 +400,5 @@ TEST_F(cu_cp_connectivity_test, when_initial_ul_rrc_message_has_no_rrc_container // Verify UE is removed. report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); - ASSERT_TRUE(report.ue_metrics.ues.empty()); + ASSERT_TRUE(report.ues.empty()); } diff --git a/tests/unittests/cu_cp/cu_cp_test.cpp b/tests/unittests/cu_cp/cu_cp_test.cpp index b055aeee71..626cbc6dc0 100644 --- a/tests/unittests/cu_cp/cu_cp_test.cpp +++ b/tests/unittests/cu_cp/cu_cp_test.cpp @@ -347,7 +347,7 @@ TEST_F( // Attach UE attach_ue(du_ue_id, cu_ue_id, crnti, du_index); - ASSERT_EQ(cu_cp_obj->get_connected_dus().get_nof_ues(), 1U); + ASSERT_EQ(cu_cp_obj->get_metrics_handler().request_metrics_report().ues.size(), 1); // Inject UE Context Release Request cu_cp_obj->get_connected_dus() @@ -371,7 +371,7 @@ TEST_F( .handle_message(generate_ue_context_release_complete(cu_ue_id, du_ue_id)); // Check that the UE was removed - ASSERT_EQ(cu_cp_obj->get_connected_dus().get_nof_ues(), 0); + ASSERT_EQ(cu_cp_obj->get_metrics_handler().request_metrics_report().ues.size(), 0); } ////////////////////////////////////////////////////////////////////////////////////// @@ -424,7 +424,7 @@ TEST_F(cu_cp_test, when_reestablishment_fails_then_ue_released) } // check that UE has been added as new UE (old ue is not released, this is covered by ngap unittests) - ASSERT_EQ(cu_cp_obj->get_connected_dus().get_nof_ues(), 2U); + ASSERT_EQ(cu_cp_obj->get_metrics_handler().request_metrics_report().ues.size(), 2); } TEST_F(cu_cp_test, when_old_ue_not_fully_attached_then_reestablishment_rejected) @@ -472,7 +472,7 @@ TEST_F(cu_cp_test, when_old_ue_not_fully_attached_then_reestablishment_rejected) } // check that UE has been added as new UE (old ue is not released, this is covered by ngap unittests) - ASSERT_EQ(cu_cp_obj->get_connected_dus().get_nof_ues(), 2U); + ASSERT_EQ(cu_cp_obj->get_metrics_handler().request_metrics_report().ues.size(), 2); } TEST_F(cu_cp_test, when_reestablishment_successful_then_ue_attached) diff --git a/tests/unittests/cu_cp/cu_cp_test_helpers.cpp b/tests/unittests/cu_cp/cu_cp_test_helpers.cpp index 0d0f5149f5..e247a3397f 100644 --- a/tests/unittests/cu_cp/cu_cp_test_helpers.cpp +++ b/tests/unittests/cu_cp/cu_cp_test_helpers.cpp @@ -239,14 +239,13 @@ void cu_cp_test::test_e1ap_attach() void cu_cp_test::test_du_attach(du_index_t du_index, unsigned gnb_du_id, unsigned nrcell_id, pci_t pci) { // Store current number of DUs. - size_t nof_dus = cu_cp_obj->get_connected_dus().get_nof_dus(); + size_t nof_dus = f1c_gw.nof_connections(); // Create a new DU connection to the CU-CP, creating a new DU processor in the CU-CP in the process. f1c_gw.request_new_du_connection(); size_t expected_nof_dus = nof_dus + 1; ASSERT_EQ(f1c_gw.nof_connections(), expected_nof_dus); - ASSERT_EQ(cu_cp_obj->get_connected_dus().get_nof_dus(), expected_nof_dus); // Pass F1SetupRequest to the CU-CP f1ap_message f1setup_msg = generate_f1_setup_request(gnb_du_id, nrcell_id, pci); @@ -275,7 +274,7 @@ void cu_cp_test::test_preamble_ue_creation(du_index_t du_index, // Attach UE attach_ue(du_ue_id, cu_ue_id, crnti, du_index); - ASSERT_EQ(cu_cp_obj->get_connected_dus().get_nof_ues(), 1U); + ASSERT_EQ(cu_cp_obj->get_metrics_handler().request_metrics_report().ues.size(), 1); authenticate_ue(amf_ue_id, ran_ue_id, du_index, du_ue_id, cu_ue_id); diff --git a/tests/unittests/cu_cp/metrics_handler/metrics_handler_test.cpp b/tests/unittests/cu_cp/metrics_handler/metrics_handler_test.cpp index 88805732ea..ba3392611d 100644 --- a/tests/unittests/cu_cp/metrics_handler/metrics_handler_test.cpp +++ b/tests/unittests/cu_cp/metrics_handler/metrics_handler_test.cpp @@ -15,12 +15,14 @@ using namespace srsran; using namespace srs_cu_cp; -class dummy_ue_metrics_handler : public ue_metrics_handler +class dummy_ue_metrics_handler : public ue_metrics_handler, public du_repository_metrics_handler { public: - ue_metrics_report next_metrics; + metrics_report next_metrics; - ue_metrics_report handle_ue_metrics_report_request() override { return next_metrics; } + std::vector handle_ue_metrics_report_request() const override { return next_metrics.ues; } + + std::vector handle_du_metrics_report_request() const override { return next_metrics.dus; } }; class dummy_metrics_notifier : public metrics_report_notifier @@ -35,35 +37,37 @@ TEST(metrics_handler_test, get_periodic_metrics_report_while_session_is_active) { manual_task_worker worker{16}; timer_manager timers{2}; - dummy_ue_metrics_handler ue_metrics; - metrics_handler_impl metrics{worker, timers, ue_metrics}; + dummy_ue_metrics_handler metrics_hdlr; + metrics_handler_impl metrics{worker, timers, metrics_hdlr, metrics_hdlr}; std::chrono::milliseconds period{5}; dummy_metrics_notifier metrics_notifier; auto session = metrics.create_periodic_report_session(periodic_metric_report_request{period, &metrics_notifier}); // First report. - ue_metrics.next_metrics.ues.emplace_back(ue_metrics_report::ue_context{to_rnti(1), pci_t{2}}); + metrics_hdlr.next_metrics.ues.emplace_back(metrics_report::ue_info{to_rnti(1), pci_t{2}}); + metrics_hdlr.next_metrics.dus.emplace_back(metrics_report::du_info{ + {metrics_report::cell_info{nr_cell_global_id_t{001, 01, "00101", "00f110", 0x22}, pci_t{2}}}}); for (unsigned i = 0; i != period.count(); ++i) { ASSERT_FALSE(metrics_notifier.last_metrics_report.has_value()); timers.tick(); worker.run_pending_tasks(); } ASSERT_TRUE(metrics_notifier.last_metrics_report.has_value()); - ASSERT_EQ(metrics_notifier.last_metrics_report->ue_metrics.ues.size(), 1); - ASSERT_EQ(metrics_notifier.last_metrics_report->ue_metrics.ues[0].rnti, ue_metrics.next_metrics.ues[0].rnti); - ASSERT_EQ(metrics_notifier.last_metrics_report->ue_metrics.ues[0].pci, ue_metrics.next_metrics.ues[0].pci); + ASSERT_EQ(metrics_notifier.last_metrics_report->ues.size(), 1); + ASSERT_EQ(metrics_notifier.last_metrics_report->ues[0].rnti, metrics_hdlr.next_metrics.ues[0].rnti); + ASSERT_EQ(metrics_notifier.last_metrics_report->ues[0].pci, metrics_hdlr.next_metrics.ues[0].pci); // Second report. metrics_notifier.last_metrics_report.reset(); - ue_metrics.next_metrics.ues.emplace_back(ue_metrics_report::ue_context{to_rnti(2), pci_t{3}}); + metrics_hdlr.next_metrics.ues.emplace_back(metrics_report::ue_info{to_rnti(2), pci_t{3}}); for (unsigned i = 0; i != period.count(); ++i) { ASSERT_FALSE(metrics_notifier.last_metrics_report.has_value()); timers.tick(); worker.run_pending_tasks(); } ASSERT_TRUE(metrics_notifier.last_metrics_report.has_value()); - ASSERT_EQ(metrics_notifier.last_metrics_report->ue_metrics.ues.size(), 2); + ASSERT_EQ(metrics_notifier.last_metrics_report->ues.size(), 2); // Destroy session. metrics_notifier.last_metrics_report.reset(); From cc93d24ae655f8a3be97da4026d74c183d59f82b Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 12 Feb 2024 09:58:22 +0100 Subject: [PATCH 17/78] cu-cp: remove redundant cu-up handling interface of the cu-cp --- apps/gnb/gnb.cpp | 10 ++-- include/srsran/cu_cp/cu_cp.h | 31 ++++------ include/srsran/cu_cp/cu_up_repository.h | 12 ---- include/srsran/ran/gnb_du_id.h | 14 +++++ .../cu_cp_controller/cu_cp_controller.cpp | 9 +-- lib/cu_cp/cu_cp_controller/cu_cp_controller.h | 14 +++-- lib/cu_cp/cu_cp_impl.cpp | 5 -- lib/cu_cp/cu_cp_impl.h | 15 ++--- .../cu_up_processor/cu_up_processor_impl.h | 1 - .../cu_up_processor_repository.cpp | 16 ------ .../cu_up_processor_repository.h | 13 ++--- .../du_high_cu/cu_du_test.cpp | 4 +- .../du_high_cu/du_high_cu_test_simulator.cpp | 5 +- .../cu_cp/cu_cp_connectivity_test.cpp | 6 +- tests/unittests/cu_cp/cu_cp_test.cpp | 56 +++++++++++-------- .../cu_cp/cu_cp_test_environment.cpp | 6 +- tests/unittests/cu_cp/cu_cp_test_helpers.cpp | 42 +++++++------- .../inter_du_handover_routine_test.cpp | 36 +++++------- 18 files changed, 127 insertions(+), 168 deletions(-) create mode 100644 include/srsran/ran/gnb_du_id.h diff --git a/apps/gnb/gnb.cpp b/apps/gnb/gnb.cpp index 641351b4c5..a71d3fb0ea 100644 --- a/apps/gnb/gnb.cpp +++ b/apps/gnb/gnb.cpp @@ -443,21 +443,21 @@ int main(int argc, char** argv) std::unique_ptr cu_cp_obj = create_cu_cp(cu_cp_cfg); // Connect NGAP adpter to CU-CP to pass NGAP messages. - ngap_adapter->connect_cu_cp(cu_cp_obj->get_cu_cp_ngap_connection_interface().get_ngap_message_handler(), - cu_cp_obj->get_cu_cp_ngap_connection_interface().get_ngap_event_handler()); + ngap_adapter->connect_cu_cp(cu_cp_obj->get_ng_interface().get_ngap_message_handler(), + cu_cp_obj->get_ng_interface().get_ngap_event_handler()); // Connect E1AP to CU-CP. - e1ap_gw.attach_cu_cp(cu_cp_obj->get_connected_cu_ups()); + e1ap_gw.attach_cu_cp(cu_cp_obj->get_cu_ups()); // Connect F1-C to CU-CP. - f1c_gw.attach_cu_cp(cu_cp_obj->get_connected_dus()); + f1c_gw.attach_cu_cp(cu_cp_obj->get_dus()); // start CU-CP gnb_logger.info("Starting CU-CP..."); cu_cp_obj->start(); gnb_logger.info("CU-CP started successfully"); - if (not cu_cp_obj->get_cu_cp_ngap_connection_interface().amf_is_connected()) { + if (not cu_cp_obj->get_ng_interface().amf_is_connected()) { report_error("CU-CP failed to connect to AMF"); } diff --git a/include/srsran/cu_cp/cu_cp.h b/include/srsran/cu_cp/cu_cp.h index ba7144ecf9..95bdad7ddb 100644 --- a/include/srsran/cu_cp/cu_cp.h +++ b/include/srsran/cu_cp/cu_cp.h @@ -20,10 +20,11 @@ namespace srsran { namespace srs_cu_cp { -class cu_cp_ngap_connection_interface +/// \brief Component of the CU-CP responsible for handling events and messages going through the NG interface. +class cu_cp_ng_interface { public: - virtual ~cu_cp_ngap_connection_interface() = default; + virtual ~cu_cp_ng_interface() = default; /// \brief Get the NG message handler interface. /// \return The NG message handler interface. @@ -38,39 +39,27 @@ class cu_cp_ngap_connection_interface virtual bool amf_is_connected() = 0; }; -class cu_cp_cu_up_connection_interface -{ -public: - virtual ~cu_cp_cu_up_connection_interface() = default; - - /// \brief Get the E1AP message handler interface of the CU-UP processor object. - /// \param[in] cu_up_index The index of the CU-UP processor object. - /// \return The E1AP message handler interface of the CU-UP processor object. - virtual e1ap_message_handler& get_e1ap_message_handler(const cu_up_index_t cu_up_index) = 0; -}; - class cu_cp_interface { public: virtual ~cu_cp_interface() = default; /// \brief Get repository of handlers for the DUs currently connected to the CU-CP. - virtual du_repository& get_connected_dus() = 0; + virtual du_repository& get_dus() = 0; /// \brief Get repository of handlers for the CU-UPs currently connected to the CU-CP. - virtual cu_up_repository& get_connected_cu_ups() = 0; + virtual cu_up_repository& get_cu_ups() = 0; /// \brief Get handler of the NG interface of the CU-CP. - virtual cu_cp_ngap_connection_interface& get_cu_cp_ngap_connection_interface() = 0; - - /// \brief Get handler of the E1 interface of the CU-CP. - virtual cu_cp_cu_up_connection_interface& get_cu_cp_cu_up_connection_interface() = 0; + virtual cu_cp_ng_interface& get_ng_interface() = 0; /// \brief Get the metrics handler interface of the CU-CP. virtual metrics_handler& get_metrics_handler() = 0; - /// \brief Initiate NG Setup Procedure and wait for AMF response. - /// \return Returns true if the connection to the AMF was successful. False, otherwise. + /// \brief Initiate AMF TNL connection and run NG Setup Procedure. + /// + /// This function blocks until the procedure is complete. + /// \return Returns true if the connection to the AMF and NG setup procedure were successful. False, otherwise. virtual bool start() = 0; /// \brief Stop the CU-CP operation. diff --git a/include/srsran/cu_cp/cu_up_repository.h b/include/srsran/cu_cp/cu_up_repository.h index 3c8df3d0ed..4d04374162 100644 --- a/include/srsran/cu_cp/cu_up_repository.h +++ b/include/srsran/cu_cp/cu_up_repository.h @@ -25,14 +25,6 @@ class cu_up_handler /// \return The E1AP message handler interface of the CU-UP processor object. virtual e1ap_message_handler& get_e1ap_message_handler() = 0; - /// \brief Get the E1AP bearer context manager interface. - /// \return The E1AP bearer context manager interface of the CU-UP processor object. - virtual e1ap_bearer_context_manager& get_e1ap_bearer_context_manager() = 0; - - /// \brief Get the E1AP bearer context removal interface. - /// \return The E1AP bearer context removal interface of the CU-UP processor object. - virtual e1ap_bearer_context_removal_handler& get_e1ap_bearer_context_removal_handler() = 0; - /// \brief Update the index of an UE. virtual void update_ue_index(ue_index_t ue_index, ue_index_t old_ue_index) = 0; }; @@ -43,10 +35,6 @@ class cu_up_repository public: virtual ~cu_up_repository() = default; - /// \brief Get the number of CU-UPs connected to the CU-CP. - /// \return The number of CU-UPs. - virtual size_t get_nof_cu_ups() const = 0; - /// \brief Handles the start of a new CU-UP connection. /// /// \param e1ap_tx_pdu_notifier Notifier that the CU-CP will use to push E1AP Tx messages to the CU-UP. Once this diff --git a/include/srsran/ran/gnb_du_id.h b/include/srsran/ran/gnb_du_id.h new file mode 100644 index 0000000000..9110b7e5f3 --- /dev/null +++ b/include/srsran/ran/gnb_du_id.h @@ -0,0 +1,14 @@ +/* + * + * Copyright 2021-2024 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 SRSRAN_GNB_DU_ID_H +#define SRSRAN_GNB_DU_ID_H + +#endif // SRSRAN_GNB_DU_ID_H diff --git a/lib/cu_cp/cu_cp_controller/cu_cp_controller.cpp b/lib/cu_cp/cu_cp_controller/cu_cp_controller.cpp index 1648b97181..3233ff0353 100644 --- a/lib/cu_cp/cu_cp_controller/cu_cp_controller.cpp +++ b/lib/cu_cp/cu_cp_controller/cu_cp_controller.cpp @@ -9,14 +9,15 @@ */ #include "cu_cp_controller.h" +#include "../cu_up_processor/cu_up_processor_repository.h" using namespace srsran; using namespace srs_cu_cp; -cu_cp_controller::cu_cp_controller(cu_cp_routine_manager& routine_manager_, - const ngap_configuration& ngap_cfg_, - cu_cp_ngap_control_notifier& ngap_ctrl_notif_, - const cu_up_repository& cu_ups_) : +cu_cp_controller::cu_cp_controller(cu_cp_routine_manager& routine_manager_, + const ngap_configuration& ngap_cfg_, + cu_cp_ngap_control_notifier& ngap_ctrl_notif_, + const cu_up_processor_repository& cu_ups_) : amf_mng(routine_manager_, ngap_cfg_, ngap_ctrl_notif_), cu_ups(cu_ups_) { } diff --git a/lib/cu_cp/cu_cp_controller/cu_cp_controller.h b/lib/cu_cp/cu_cp_controller/cu_cp_controller.h index 514a9f7a60..40bdfa1f15 100644 --- a/lib/cu_cp/cu_cp_controller/cu_cp_controller.h +++ b/lib/cu_cp/cu_cp_controller/cu_cp_controller.h @@ -18,6 +18,8 @@ namespace srsran { namespace srs_cu_cp { +class cu_up_processor_repository; + /// \brief Entity responsible for managing the CU-CP connections to remote nodes and determining whether the CU-CP /// is in a state to accept new connections. /// @@ -29,10 +31,10 @@ namespace srs_cu_cp { class cu_cp_controller { public: - cu_cp_controller(cu_cp_routine_manager& routine_manager_, - const ngap_configuration& ngap_cfg_, - cu_cp_ngap_control_notifier& ngap_ctrl_notif_, - const cu_up_repository& cu_ups_); + cu_cp_controller(cu_cp_routine_manager& routine_manager_, + const ngap_configuration& ngap_cfg_, + cu_cp_ngap_control_notifier& ngap_ctrl_notif_, + const cu_up_processor_repository& cu_ups_); amf_connection_manager& amf_connection_handler() { return amf_mng; } @@ -42,8 +44,8 @@ class cu_cp_controller bool request_ue_setup() const; private: - amf_connection_manager amf_mng; - const cu_up_repository& cu_ups; + amf_connection_manager amf_mng; + const cu_up_processor_repository& cu_ups; }; } // namespace srs_cu_cp diff --git a/lib/cu_cp/cu_cp_impl.cpp b/lib/cu_cp/cu_cp_impl.cpp index 16eb51ee69..c5c5872343 100644 --- a/lib/cu_cp/cu_cp_impl.cpp +++ b/lib/cu_cp/cu_cp_impl.cpp @@ -142,11 +142,6 @@ void cu_cp_impl::stop() logger.info("CU-CP stopped successfully."); } -e1ap_message_handler& cu_cp_impl::get_e1ap_message_handler(cu_up_index_t cu_up_index) -{ - return cu_up_db.get_cu_up(cu_up_index).get_e1ap_message_handler(); -} - ngap_message_handler& cu_cp_impl::get_ngap_message_handler() { return *ngap_entity; diff --git a/lib/cu_cp/cu_cp_impl.h b/lib/cu_cp/cu_cp_impl.h index 582f03e092..e41f2357d9 100644 --- a/lib/cu_cp/cu_cp_impl.h +++ b/lib/cu_cp/cu_cp_impl.h @@ -34,10 +34,7 @@ namespace srsran { namespace srs_cu_cp { -class cu_cp_impl final : public cu_cp_interface, - public cu_cp_impl_interface, - public cu_cp_ngap_connection_interface, - public cu_cp_cu_up_connection_interface +class cu_cp_impl final : public cu_cp_interface, public cu_cp_impl_interface, public cu_cp_ng_interface { public: explicit cu_cp_impl(const cu_cp_configuration& config_); @@ -46,9 +43,6 @@ class cu_cp_impl final : public cu_cp_interface, bool start() override; void stop() override; - // CU-CP CU-UP interface - e1ap_message_handler& get_e1ap_message_handler(cu_up_index_t cu_up_index) override; - // NGAP interface ngap_message_handler& get_ngap_message_handler() override; ngap_event_handler& get_ngap_event_handler() override; @@ -82,11 +76,10 @@ class cu_cp_impl final : public cu_cp_interface, metrics_handler& get_metrics_handler() override { return *metrics_hdlr; } // cu_cp interface - du_repository& get_connected_dus() override { return du_db; } - cu_up_repository& get_connected_cu_ups() override { return cu_up_db; } - cu_cp_cu_up_connection_interface& get_cu_cp_cu_up_connection_interface() override { return *this; } + du_repository& get_dus() override { return du_db; } + cu_up_repository& get_cu_ups() override { return cu_up_db; } cu_cp_e1ap_handler& get_cu_cp_e1ap_handler() override { return *this; } - cu_cp_ngap_connection_interface& get_cu_cp_ngap_connection_interface() override { return *this; } + cu_cp_ng_interface& get_ng_interface() override { return *this; } cu_cp_rrc_ue_interface& get_cu_cp_rrc_ue_interface() override { return *this; } cu_cp_measurement_handler& get_cu_cp_measurement_handler() override { return *this; } cu_cp_measurement_config_handler& get_cu_cp_measurement_config_handler() override { return *this; } diff --git a/lib/cu_cp/cu_up_processor/cu_up_processor_impl.h b/lib/cu_cp/cu_up_processor/cu_up_processor_impl.h index 403a27e2ed..81fd93a339 100644 --- a/lib/cu_cp/cu_up_processor/cu_up_processor_impl.h +++ b/lib/cu_cp/cu_up_processor/cu_up_processor_impl.h @@ -32,7 +32,6 @@ class cu_up_processor_impl : public cu_up_processor_impl_interface e1ap_cu_cp_notifier& e1ap_cu_cp_notif_, cu_up_task_scheduler& task_sched_, task_executor& ctrl_exec_); - ~cu_up_processor_impl() = default; // message handlers void handle_cu_up_e1_setup_request(const cu_up_e1_setup_request& msg) override; diff --git a/lib/cu_cp/cu_up_processor/cu_up_processor_repository.cpp b/lib/cu_cp/cu_up_processor/cu_up_processor_repository.cpp index 107265955b..601f540d68 100644 --- a/lib/cu_cp/cu_up_processor/cu_up_processor_repository.cpp +++ b/lib/cu_cp/cu_up_processor/cu_up_processor_repository.cpp @@ -161,11 +161,6 @@ cu_up_processor_impl_interface& cu_up_processor_repository::find_cu_up(cu_up_ind return *cu_up_db.at(cu_up_index).cu_up_processor; } -size_t cu_up_processor_repository::get_nof_cu_ups() const -{ - return cu_up_db.size(); -} - cu_up_handler& cu_up_processor_repository::get_cu_up(cu_up_index_t cu_up_index) { srsran_assert(cu_up_index != cu_up_index_t::invalid, "Invalid cu_up_index={}", cu_up_index); @@ -178,17 +173,6 @@ e1ap_message_handler& cu_up_processor_repository::cu_up_context::get_e1ap_messag return cu_up_processor->get_e1ap_message_handler(); } -e1ap_bearer_context_manager& cu_up_processor_repository::cu_up_context::get_e1ap_bearer_context_manager() -{ - return cu_up_processor->get_e1ap_bearer_context_manager(); -} - -e1ap_bearer_context_removal_handler& -cu_up_processor_repository::cu_up_context::get_e1ap_bearer_context_removal_handler() -{ - return cu_up_processor->get_e1ap_bearer_context_removal_handler(); -} - void cu_up_processor_repository::cu_up_context::update_ue_index(ue_index_t ue_index, ue_index_t old_ue_index) { return cu_up_processor->update_ue_index(ue_index, old_ue_index); diff --git a/lib/cu_cp/cu_up_processor/cu_up_processor_repository.h b/lib/cu_cp/cu_up_processor/cu_up_processor_repository.h index 4950777c49..4bd9a41a95 100644 --- a/lib/cu_cp/cu_up_processor/cu_up_processor_repository.h +++ b/lib/cu_cp/cu_up_processor/cu_up_processor_repository.h @@ -36,9 +36,10 @@ class cu_up_processor_repository : public cu_up_repository // CU-UP interface std::unique_ptr - handle_new_cu_up_connection(std::unique_ptr e1ap_tx_pdu_notifier) override; - void handle_cu_up_remove_request(cu_up_index_t cu_up_index) override; - size_t get_nof_cu_ups() const override; + handle_new_cu_up_connection(std::unique_ptr e1ap_tx_pdu_notifier) override; + void handle_cu_up_remove_request(cu_up_index_t cu_up_index) override; + + size_t get_nof_cu_ups() const { return cu_up_db.size(); } cu_up_handler& get_cu_up(cu_up_index_t cu_up_index) override; @@ -49,10 +50,8 @@ class cu_up_processor_repository : public cu_up_repository /// Notifier used by the CU-CP to push E1AP Tx messages to the respective CU-UP. std::unique_ptr e1ap_tx_pdu_notifier; - e1ap_message_handler& get_e1ap_message_handler() override; - e1ap_bearer_context_manager& get_e1ap_bearer_context_manager() override; - e1ap_bearer_context_removal_handler& get_e1ap_bearer_context_removal_handler() override; - void update_ue_index(ue_index_t ue_index, ue_index_t old_ue_index) override; + e1ap_message_handler& get_e1ap_message_handler() override; + void update_ue_index(ue_index_t ue_index, ue_index_t old_ue_index) override; }; /// \brief Find a CU-UP object. diff --git a/tests/integrationtests/du_high_cu/cu_du_test.cpp b/tests/integrationtests/du_high_cu/cu_du_test.cpp index e3b22f1ae1..59351b954c 100644 --- a/tests/integrationtests/du_high_cu/cu_du_test.cpp +++ b/tests/integrationtests/du_high_cu/cu_du_test.cpp @@ -59,14 +59,14 @@ class cu_du_test : public ::testing::Test cu_cp_obj = create_cu_cp(cu_cfg); // Create AMF response to NG Setup. - amf->attach_cu_cp_pdu_handler(cu_cp_obj->get_cu_cp_ngap_connection_interface().get_ngap_message_handler()); + amf->attach_cu_cp_pdu_handler(cu_cp_obj->get_ng_interface().get_ngap_message_handler()); amf->enqueue_next_tx_pdu(srs_cu_cp::generate_ng_setup_response()); // Start CU-CP. cu_cp_obj->start(); // Attach F1-C gateway to CU-CP. - f1c_gw.attach_cu_cp_du_repo(cu_cp_obj->get_connected_dus()); + f1c_gw.attach_cu_cp_du_repo(cu_cp_obj->get_dus()); // create and start DU phy_dummy phy; diff --git a/tests/integrationtests/du_high_cu/du_high_cu_test_simulator.cpp b/tests/integrationtests/du_high_cu/du_high_cu_test_simulator.cpp index 686e760f80..c69ad4338a 100644 --- a/tests/integrationtests/du_high_cu/du_high_cu_test_simulator.cpp +++ b/tests/integrationtests/du_high_cu/du_high_cu_test_simulator.cpp @@ -109,11 +109,10 @@ du_high_cu_test_simulator::du_high_cu_test_simulator(const du_high_cu_cp_test_si cu_cp_inst->start(); // Connect AMF by injecting a ng_setup_response - cu_cp_inst->get_cu_cp_ngap_connection_interface().get_ngap_message_handler().handle_message( - srs_cu_cp::generate_ng_setup_response()); + cu_cp_inst->get_ng_interface().get_ngap_message_handler().handle_message(srs_cu_cp::generate_ng_setup_response()); // Connect F1-C to CU-CP. - f1c_gw.attach_cu_cp_du_repo(cu_cp_inst->get_connected_dus()); + f1c_gw.attach_cu_cp_du_repo(cu_cp_inst->get_dus()); } du_high_cu_test_simulator::~du_high_cu_test_simulator() diff --git a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp index ec6d8b6aaa..eab6afcf20 100644 --- a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp +++ b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp @@ -39,7 +39,7 @@ TEST_F(cu_cp_connectivity_test, when_cu_cp_is_created_then_it_is_not_connected_t ASSERT_FALSE(get_amf().try_pop_rx_pdu(ngap_pdu)) << "The CU-CP should not send a message to the NG interface before being started"; - ASSERT_FALSE(get_cu_cp().get_cu_cp_ngap_connection_interface().amf_is_connected()); + ASSERT_FALSE(get_cu_cp().get_ng_interface().amf_is_connected()); } TEST_F(cu_cp_connectivity_test, when_cu_cp_starts_then_it_initiates_ng_setup_procedure_and_blocks_waiting_for_response) @@ -56,7 +56,7 @@ TEST_F(cu_cp_connectivity_test, when_cu_cp_starts_then_it_initiates_ng_setup_pro ASSERT_TRUE(is_pdu_type(ngap_pdu, asn1::ngap::ngap_elem_procs_o::init_msg_c::types::ng_setup_request)) << "CU-CP did not setup the AMF connection"; - ASSERT_TRUE(get_cu_cp().get_cu_cp_ngap_connection_interface().amf_is_connected()); + ASSERT_TRUE(get_cu_cp().get_ng_interface().amf_is_connected()); } TEST_F(cu_cp_connectivity_test, when_ng_setup_fails_then_cu_cp_is_not_in_amf_connected_state) @@ -73,7 +73,7 @@ TEST_F(cu_cp_connectivity_test, when_ng_setup_fails_then_cu_cp_is_not_in_amf_con ASSERT_TRUE(is_pdu_type(ngap_pdu, asn1::ngap::ngap_elem_procs_o::init_msg_c::types::ng_setup_request)) << "CU-CP did not setup the AMF connection"; - ASSERT_FALSE(get_cu_cp().get_cu_cp_ngap_connection_interface().amf_is_connected()); + ASSERT_FALSE(get_cu_cp().get_ng_interface().amf_is_connected()); } //----------------------------------------------------------------------------------// diff --git a/tests/unittests/cu_cp/cu_cp_test.cpp b/tests/unittests/cu_cp/cu_cp_test.cpp index 626cbc6dc0..eb3b06fc48 100644 --- a/tests/unittests/cu_cp/cu_cp_test.cpp +++ b/tests/unittests/cu_cp/cu_cp_test.cpp @@ -47,7 +47,7 @@ TEST_F(cu_cp_test, when_valid_paging_message_received_then_paging_is_sent_to_du) // Generate F1SetupRequest f1ap_message f1setup_msg = generate_f1_setup_request(); // Pass message to CU-CP - cu_cp_obj->get_connected_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); + cu_cp_obj->get_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); // Generate Paging ngap_message paging_msg = generate_valid_minimal_paging_message(); @@ -66,7 +66,7 @@ TEST_F(cu_cp_test, when_valid_paging_message_with_optional_values_received_then_ // Generate F1SetupRequest f1ap_message f1setup_msg = generate_f1_setup_request(); // Pass message to CU-CP - cu_cp_obj->get_connected_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); + cu_cp_obj->get_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); // Generate Paging ngap_message paging_msg = generate_valid_paging_message(); @@ -85,7 +85,7 @@ TEST_F(cu_cp_test, when_no_du_for_tac_exists_then_paging_is_not_sent_to_du) // Generate F1SetupRequest f1ap_message f1setup_msg = generate_f1_setup_request(); // Pass message to CU-CP - cu_cp_obj->get_connected_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); + cu_cp_obj->get_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); // Generate Paging with unknown tac ngap_message paging_msg = generate_valid_minimal_paging_message(); @@ -105,7 +105,7 @@ TEST_F(cu_cp_test, when_assist_data_for_paging_for_unknown_tac_is_included_then_ // Generate F1SetupRequest f1ap_message f1setup_msg = generate_f1_setup_request(); // Pass message to CU-CP - cu_cp_obj->get_connected_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); + cu_cp_obj->get_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); // Generate Paging with unknown tac but assist data for paging ngap_message paging_msg = generate_valid_paging_message(); @@ -125,7 +125,7 @@ TEST_F(cu_cp_test, when_invalid_paging_message_received_then_paging_is_not_sent_ // Generate F1SetupRequest f1ap_message f1setup_msg = generate_f1_setup_request(); // Pass message to CU-CP - cu_cp_obj->get_connected_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); + cu_cp_obj->get_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); // Generate Paging ngap_message paging_msg = generate_invalid_paging_message(); @@ -288,7 +288,7 @@ TEST_F(cu_cp_test, generate_valid_pdu_session_resource_setup_request_message(amf_ue_id, ran_ue_id, uint_to_pdu_session_id(1))); // Inject F1AP UE Context Release Complete - cu_cp_obj->get_connected_dus() + cu_cp_obj->get_dus() .get_du(uint_to_du_index(0)) .get_f1ap_message_handler() .handle_message(generate_ue_context_release_complete(cu_ue_id, du_ue_id)); @@ -317,7 +317,7 @@ TEST_F(cu_cp_test, when_du_initiated_ue_context_release_received_then_ue_context test_preamble_ue_creation(du_index, du_ue_id, cu_ue_id, pci, crnti, amf_ue_id, ran_ue_id); // Inject UE Context Release Request - cu_cp_obj->get_connected_dus() + cu_cp_obj->get_dus() .get_du(uint_to_du_index(0)) .get_f1ap_message_handler() .handle_message(generate_ue_context_release_request(cu_ue_id, du_ue_id)); @@ -350,7 +350,7 @@ TEST_F( ASSERT_EQ(cu_cp_obj->get_metrics_handler().request_metrics_report().ues.size(), 1); // Inject UE Context Release Request - cu_cp_obj->get_connected_dus() + cu_cp_obj->get_dus() .get_du(uint_to_du_index(0)) .get_f1ap_message_handler() .handle_message(generate_ue_context_release_request(cu_ue_id, du_ue_id)); @@ -365,7 +365,7 @@ TEST_F( asn1::f1ap::f1ap_elem_procs_o::init_msg_c::types_opts::ue_context_release_cmd); // Inject UE Context Release Complete - cu_cp_obj->get_connected_dus() + cu_cp_obj->get_dus() .get_du(uint_to_du_index(0)) .get_f1ap_message_handler() .handle_message(generate_ue_context_release_complete(cu_ue_id, du_ue_id)); @@ -406,13 +406,13 @@ TEST_F(cu_cp_test, when_reestablishment_fails_then_ue_released) // Inject Initial UL RRC message test_logger.info("Injecting Initial UL RRC message"); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); // Inject UL RRC message containing RRC Setup Complete f1ap_message ul_rrc_msg = generate_ul_rrc_message_transfer(cu_ue_id_2, du_ue_id_2, srb_id_t::srb1, generate_rrc_setup_complete()); test_logger.info("Injecting UL RRC message (RRC Setup Complete)"); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); // check that the UE Context Release Request was sent to the AMF ASSERT_EQ(ngap_amf_notifier.last_ngap_msgs.back().pdu.type(), @@ -454,13 +454,13 @@ TEST_F(cu_cp_test, when_old_ue_not_fully_attached_then_reestablishment_rejected) // Inject Initial UL RRC message test_logger.info("Injecting Initial UL RRC message (RRC Reestablishment Request)"); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); // Inject UL RRC message containing RRC Setup Complete f1ap_message ul_rrc_msg = generate_ul_rrc_message_transfer(cu_ue_id_2, du_ue_id_2, srb_id_t::srb1, generate_rrc_setup_complete()); test_logger.info("Injecting UL RRC message (RRC Setup Complete)"); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); // check that the UE Context Release Request was sent to the AMF ASSERT_EQ(ngap_amf_notifier.last_ngap_msgs.back().pdu.type(), @@ -506,13 +506,13 @@ TEST_F(cu_cp_test, when_reestablishment_successful_then_ue_attached) // Inject Initial UL RRC message test_logger.info("Injecting Initial UL RRC message (RRC Reestablishment Request)"); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); // Inject UL RRC message containing RRC Reestablishment Complete f1ap_message ul_rrc_msg = generate_ul_rrc_message_transfer(cu_ue_id_2, du_ue_id_2, srb_id_t::srb1, make_byte_buffer("00001800df0061cd")); test_logger.info("Injecting UL RRC message (RRC Reestablishment Complete)"); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); // check that the Bearer Context Modification Request Message was sent to the CU-UP ASSERT_EQ(e1ap_gw.last_tx_pdus(0).back().pdu.type(), asn1::e1ap::e1ap_pdu_c::types_opts::options::init_msg); @@ -522,8 +522,9 @@ TEST_F(cu_cp_test, when_reestablishment_successful_then_ue_attached) // Inject Bearer Context Modification Response e1ap_message bearer_context_mod_resp = generate_bearer_context_modification_response(cu_cp_ue_e1ap_id, cu_up_ue_e1ap_id); - cu_cp_obj->get_cu_cp_cu_up_connection_interface() - .get_e1ap_message_handler(uint_to_cu_up_index(0)) + cu_cp_obj->get_cu_ups() + .get_cu_up(uint_to_cu_up_index(0)) + .get_e1ap_message_handler() .handle_message(bearer_context_mod_resp); // check that the UE Context Modification Request Message was sent to the DU @@ -533,7 +534,7 @@ TEST_F(cu_cp_test, when_reestablishment_successful_then_ue_attached) // Inject UE Context Modification Response f1ap_message ue_context_mod_resp = generate_ue_context_modification_response(cu_ue_id_2, du_ue_id_2); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ue_context_mod_resp); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ue_context_mod_resp); // check that the Bearer Context Modification was sent to the CU-UP ASSERT_EQ(e1ap_gw.last_tx_pdus(0).back().pdu.type(), asn1::e1ap::e1ap_pdu_c::types_opts::options::init_msg); @@ -541,8 +542,9 @@ TEST_F(cu_cp_test, when_reestablishment_successful_then_ue_attached) asn1::e1ap::e1ap_elem_procs_o::init_msg_c::types_opts::bearer_context_mod_request); // Inject Bearer Context Modification Response - cu_cp_obj->get_cu_cp_cu_up_connection_interface() - .get_e1ap_message_handler(uint_to_cu_up_index(0)) + cu_cp_obj->get_cu_ups() + .get_cu_up(uint_to_cu_up_index(0)) + .get_e1ap_message_handler() .handle_message(bearer_context_mod_resp); // check that the RRC Reconfiguration was sent to the DU @@ -579,7 +581,10 @@ TEST_F(cu_cp_test, when_handover_request_received_then_handover_notify_is_sent) // Inject E1AP Bearer Context Setup Response e1ap_message bearer_ctxt_setup_resp = generate_bearer_context_setup_response(int_to_gnb_cu_cp_ue_e1ap_id(0), int_to_gnb_cu_up_ue_e1ap_id(0)); - cu_cp_obj->get_e1ap_message_handler(uint_to_cu_up_index(0)).handle_message(bearer_ctxt_setup_resp); + cu_cp_obj->get_cu_ups() + .get_cu_up(uint_to_cu_up_index(0)) + .get_e1ap_message_handler() + .handle_message(bearer_ctxt_setup_resp); // Check that the UE Context Setup Request Message was sent to the DU ASSERT_EQ(f1c_gw.last_tx_pdus(0).back().pdu.type(), asn1::f1ap::f1ap_pdu_c::types_opts::options::init_msg); @@ -590,7 +595,7 @@ TEST_F(cu_cp_test, when_handover_request_received_then_handover_notify_is_sent) // Inject F1AP UE Context Setup Response f1ap_message ue_ctxt_setup_resp = generate_ue_context_setup_response(int_to_gnb_cu_ue_f1ap_id(0), int_to_gnb_du_ue_f1ap_id(0)); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ue_ctxt_setup_resp); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ue_ctxt_setup_resp); // Check that the Bearer Context Modification Request Message was sent to the CU-UP ASSERT_EQ(e1ap_gw.last_tx_pdus(0).back().pdu.type(), asn1::e1ap::e1ap_pdu_c::types_opts::options::init_msg); @@ -601,7 +606,10 @@ TEST_F(cu_cp_test, when_handover_request_received_then_handover_notify_is_sent) // Inject E1AP Bearer Context Modification Response e1ap_message bearer_ctxt_mod_resp = generate_bearer_context_modification_response(int_to_gnb_cu_cp_ue_e1ap_id(0), int_to_gnb_cu_up_ue_e1ap_id(0)); - cu_cp_obj->get_e1ap_message_handler(uint_to_cu_up_index(0)).handle_message(bearer_ctxt_mod_resp); + cu_cp_obj->get_cu_ups() + .get_cu_up(uint_to_cu_up_index(0)) + .get_e1ap_message_handler() + .handle_message(bearer_ctxt_mod_resp); // Check that the Handover Request Ack was sent to the AMF ASSERT_EQ(ngap_amf_notifier.last_ngap_msgs.back().pdu.type(), @@ -614,7 +622,7 @@ TEST_F(cu_cp_test, when_handover_request_received_then_handover_notify_is_sent) // Inject RRC Reconfiguration Complete with transaction_id=0 f1ap_message rrc_recfg_complete = generate_ul_rrc_message_transfer( int_to_gnb_cu_ue_f1ap_id(0), int_to_gnb_du_ue_f1ap_id(0), srb_id_t::srb1, make_byte_buffer("800008004e17dae3")); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(rrc_recfg_complete); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(rrc_recfg_complete); // Check that the Handover Notify was sent to the AMF ASSERT_EQ(ngap_amf_notifier.last_ngap_msgs.back().pdu.type(), asn1::ngap::ngap_pdu_c::types_opts::options::init_msg); diff --git a/tests/unittests/cu_cp/cu_cp_test_environment.cpp b/tests/unittests/cu_cp/cu_cp_test_environment.cpp index 73ae325d4e..22dd6f0d92 100644 --- a/tests/unittests/cu_cp/cu_cp_test_environment.cpp +++ b/tests/unittests/cu_cp/cu_cp_test_environment.cpp @@ -70,7 +70,7 @@ cu_cp_test_environment::cu_cp_test_environment(cu_cp_test_env_params params_) : cu_cp = create_cu_cp(cfg); // Pass CU-CP PDU handler to AMF. - amf_stub->attach_cu_cp_pdu_handler(cu_cp->get_cu_cp_ngap_connection_interface().get_ngap_message_handler()); + amf_stub->attach_cu_cp_pdu_handler(cu_cp->get_ng_interface().get_ngap_message_handler()); } cu_cp_test_environment::~cu_cp_test_environment() @@ -158,7 +158,7 @@ void cu_cp_test_environment::run_ng_setup() optional cu_cp_test_environment::connect_new_du() { - auto du_stub = create_mock_du({get_cu_cp().get_connected_dus()}); + auto du_stub = create_mock_du({get_cu_cp().get_dus()}); if (not du_stub) { return nullopt; } @@ -189,7 +189,7 @@ bool cu_cp_test_environment::run_f1_setup(unsigned du_idx) optional cu_cp_test_environment::connect_new_cu_up() { - auto cu_up_obj = create_mock_cu_up(get_cu_cp().get_connected_cu_ups()); + auto cu_up_obj = create_mock_cu_up(get_cu_cp().get_cu_ups()); if (not cu_up_obj) { return nullopt; } diff --git a/tests/unittests/cu_cp/cu_cp_test_helpers.cpp b/tests/unittests/cu_cp/cu_cp_test_helpers.cpp index e247a3397f..f0f7b697a5 100644 --- a/tests/unittests/cu_cp/cu_cp_test_helpers.cpp +++ b/tests/unittests/cu_cp/cu_cp_test_helpers.cpp @@ -134,10 +134,10 @@ cu_cp_test::cu_cp_test() cu_cp_obj->start(); // Attach F1-C gateway to CU-CP - f1c_gw.attach_cu_cp_du_repo(cu_cp_obj->get_connected_dus()); + f1c_gw.attach_cu_cp_du_repo(cu_cp_obj->get_dus()); // Attach E1AP gateway to CU-CP - e1ap_gw.attach_cu_cp_cu_up_repo(cu_cp_obj->get_connected_cu_ups()); + e1ap_gw.attach_cu_cp_cu_up_repo(cu_cp_obj->get_cu_ups()); } cu_cp_test::~cu_cp_test() @@ -155,13 +155,13 @@ void cu_cp_test::attach_ue(gnb_du_ue_f1ap_id_t du_ue_id, // Inject Initial UL RRC message f1ap_message init_ul_rrc_msg = generate_init_ul_rrc_message_transfer(du_ue_id, crnti); test_logger.info("Injecting Initial UL RRC message"); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); // Inject UL RRC message containing RRC Setup Complete f1ap_message ul_rrc_msg = generate_ul_rrc_message_transfer(cu_ue_id, du_ue_id, srb_id_t::srb1, generate_rrc_setup_complete()); test_logger.info("Injecting UL RRC message (RRC Setup Complete)"); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); } void cu_cp_test::authenticate_ue(amf_ue_id_t amf_ue_id, @@ -180,7 +180,7 @@ void cu_cp_test::authenticate_ue(amf_ue_id_t amf_ue_id, du_ue_id, srb_id_t::srb1, make_byte_buffer("00013a0abf002b96882dac46355c4f34464ddaf7b43fde37ae8000000000")); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); // Inject DL NAS Transport message (ue security mode command) dl_nas_transport = generate_downlink_nas_transport_message(amf_ue_id, ran_ue_id); @@ -193,7 +193,7 @@ void cu_cp_test::authenticate_ue(amf_ue_id_t amf_ue_id, srb_id_t::srb1, make_byte_buffer("00023a1cbf0243241cb5003f002f3b80048290a1b283800000f8b880103f0020bc800680807888787f800008192a3b4" "c080080170170700c0080a980808000000000")); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); } void cu_cp_test::setup_security(amf_ue_id_t amf_ue_id, @@ -209,7 +209,7 @@ void cu_cp_test::setup_security(amf_ue_id_t amf_ue_id, // Inject Security Mode Complete f1ap_message ul_rrc_msg_transfer = generate_ul_rrc_message_transfer(cu_ue_id, du_ue_id, srb_id_t::srb1, make_byte_buffer("00032a00fd5ec7ff")); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); } void cu_cp_test::test_amf_connection() @@ -226,14 +226,10 @@ void cu_cp_test::test_e1ap_attach() // Create a new CU-UP connection to the CU-CP, creating a new CU-UP processor in the CU-CP in the process. e1ap_gw.request_new_cu_up_connection(); ASSERT_EQ(e1ap_gw.nof_connections(), 1U); - ASSERT_EQ(cu_cp_obj->get_connected_cu_ups().get_nof_cu_ups(), 1U); // Pass E1SetupRequest to the CU-CP e1ap_message e1setup_msg = generate_valid_cu_up_e1_setup_request(); - cu_cp_obj->get_connected_cu_ups() - .get_cu_up(uint_to_cu_up_index(0)) - .get_e1ap_message_handler() - .handle_message(e1setup_msg); + cu_cp_obj->get_cu_ups().get_cu_up(uint_to_cu_up_index(0)).get_e1ap_message_handler().handle_message(e1setup_msg); } void cu_cp_test::test_du_attach(du_index_t du_index, unsigned gnb_du_id, unsigned nrcell_id, pci_t pci) @@ -249,7 +245,7 @@ void cu_cp_test::test_du_attach(du_index_t du_index, unsigned gnb_du_id, unsigne // Pass F1SetupRequest to the CU-CP f1ap_message f1setup_msg = generate_f1_setup_request(gnb_du_id, nrcell_id, pci); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(f1setup_msg); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(f1setup_msg); } void cu_cp_test::test_preamble_all_connected(du_index_t du_index, pci_t pci) @@ -297,7 +293,7 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, // Inject Registration Complete f1ap_message ul_rrc_msg_transfer = generate_ul_rrc_message_transfer( cu_ue_id, du_ue_id, srb_id_t::srb1, make_byte_buffer("00043a053f015362c51680bf00218003fe6db7")); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); // Inject PDU Session Establishment Request ul_rrc_msg_transfer = generate_ul_rrc_message_transfer( @@ -306,7 +302,7 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, srb_id_t::srb1, make_byte_buffer("00053a253f011ffa9203013f0033808018970080e0ffffc9d8bd8013404010880080000840830000000041830000000" "00000800001800005000006000006800008800900c092838339b939b0b837002c98dcab")); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); // Inject Configuration Update Command ngap_message dl_nas_transport_msg = generate_downlink_nas_transport_message( @@ -333,7 +329,7 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, make_byte_buffer("00064c821930680ce811d1968097e340e1480005824c5c00060fc2c00637fe002e00131401a0000000880058d006007" "a071e439f0000240400e0300000000100186c0000700809df0000000000000103a0002000012cb2800281c50f000700" "0f00000004008010240a00126cc3c6")); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); // check that the Bearer Context Setup was sent to the CU-UP ASSERT_EQ(e1ap_gw.last_tx_pdus(0).back().pdu.type(), asn1::e1ap::e1ap_pdu_c::types_opts::options::init_msg); @@ -342,8 +338,9 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, // Inject Bearer Context Setup Response e1ap_message bearer_context_setup_resp = generate_bearer_context_setup_response(cu_cp_ue_e1ap_id, cu_up_ue_e1ap_id); - cu_cp_obj->get_cu_cp_cu_up_connection_interface() - .get_e1ap_message_handler(uint_to_cu_up_index(0)) + cu_cp_obj->get_cu_ups() + .get_cu_up(uint_to_cu_up_index(0)) + .get_e1ap_message_handler() .handle_message(bearer_context_setup_resp); // check that the UE Context Modification Request was sent to the DU @@ -353,7 +350,7 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, // Inject UE Context Modification Response f1ap_message ue_context_mod_resp = generate_ue_context_modification_response(cu_ue_id, du_ue_id); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ue_context_mod_resp); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ue_context_mod_resp); // check that the Bearer Context Modification was sent to the CU-UP ASSERT_EQ(e1ap_gw.last_tx_pdus(0).back().pdu.type(), asn1::e1ap::e1ap_pdu_c::types_opts::options::init_msg); @@ -363,8 +360,9 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, // Inject Bearer Context Modification Response e1ap_message bearer_context_mod_resp = generate_bearer_context_modification_response(cu_cp_ue_e1ap_id, cu_up_ue_e1ap_id); - cu_cp_obj->get_cu_cp_cu_up_connection_interface() - .get_e1ap_message_handler(uint_to_cu_up_index(0)) + cu_cp_obj->get_cu_ups() + .get_cu_up(uint_to_cu_up_index(0)) + .get_e1ap_message_handler() .handle_message(bearer_context_mod_resp); // check that the RRC Reconfiguration was sent to the DU @@ -375,7 +373,7 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, // Inject RRC Reconfiguration Complete ul_rrc_msg_transfer = generate_ul_rrc_message_transfer(cu_ue_id, du_ue_id, srb_id_t::srb1, make_byte_buffer("00070e00cc6fcda5")); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); // check that the PDU Session Resource Setup Response was sent to the AMF ASSERT_EQ(ngap_amf_notifier.last_ngap_msgs.back().pdu.type(), diff --git a/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp b/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp index dd0fbe66cd..9fc31cef25 100644 --- a/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp +++ b/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp @@ -59,20 +59,20 @@ class inter_du_handover_routine_test : public mobility_test srb_id_t::srb1, make_byte_buffer("000800410004015f741fe0804bf183fcaa6e9699")); test_logger.info("Injecting UL RRC message (RRC Measurement Report)"); - cu_cp_obj->get_connected_dus().get_du(source_du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); + cu_cp_obj->get_dus().get_du(source_du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); } /// \brief Start the inter-DU handover procedure. void start_procedure(const cu_cp_inter_du_handover_request& msg) { // Not needed anymore - t = cu_cp_obj->get_connected_dus() + t = cu_cp_obj->get_dus() .get_du(source_du_index) .get_mobility_handler() .handle_inter_du_handover_request( msg, - cu_cp_obj->get_connected_dus().get_du(target_du_index).get_f1ap_ue_context_notifier(), - cu_cp_obj->get_connected_dus().get_du(target_du_index).get_du_processor_ue_context_notifier()); + cu_cp_obj->get_dus().get_du(target_du_index).get_f1ap_ue_context_notifier(), + cu_cp_obj->get_dus().get_du(target_du_index).get_du_processor_ue_context_notifier()); t_launcher.emplace(t); } @@ -81,10 +81,7 @@ class inter_du_handover_routine_test : public mobility_test { f1ap_message ue_context_setup_fail = generate_ue_context_setup_failure(int_to_gnb_cu_ue_f1ap_id(0), int_to_gnb_du_ue_f1ap_id(0)); - cu_cp_obj->get_connected_dus() - .get_du(target_du_index) - .get_f1ap_message_handler() - .handle_message(ue_context_setup_fail); + cu_cp_obj->get_dus().get_du(target_du_index).get_f1ap_message_handler().handle_message(ue_context_setup_fail); } /// \brief Inject UE Context Setup Response. @@ -103,10 +100,7 @@ class inter_du_handover_routine_test : public mobility_test "38ffd294a5294f28160000219760000000000005000001456aa28023800c00041000710804e20070101084000e21009c200e040220" "8001c420138401c0c042100038840270c038200882000710804e18004000000410c04080c100e0d0000e388000000400800100c001" "0120044014c00004620090e3800c")); - cu_cp_obj->get_connected_dus() - .get_du(target_du_index) - .get_f1ap_message_handler() - .handle_message(ue_context_setup_fail); + cu_cp_obj->get_dus().get_du(target_du_index).get_f1ap_message_handler().handle_message(ue_context_setup_fail); } /// \brief Inject Bearer Context Modification Failure. @@ -114,7 +108,7 @@ class inter_du_handover_routine_test : public mobility_test { e1ap_message bearer_context_modification_fail = generate_bearer_context_modification_failure(int_to_gnb_cu_cp_ue_e1ap_id(0), int_to_gnb_cu_up_ue_e1ap_id(0)); - cu_cp_obj->get_connected_cu_ups() + cu_cp_obj->get_cu_ups() .get_cu_up(uint_to_cu_up_index(0)) .get_e1ap_message_handler() .handle_message(bearer_context_modification_fail); @@ -125,7 +119,7 @@ class inter_du_handover_routine_test : public mobility_test { e1ap_message bearer_context_modification_resp = generate_bearer_context_modification_response(int_to_gnb_cu_cp_ue_e1ap_id(0), int_to_gnb_cu_up_ue_e1ap_id(0)); - cu_cp_obj->get_connected_cu_ups() + cu_cp_obj->get_cu_ups() .get_cu_up(uint_to_cu_up_index(0)) .get_e1ap_message_handler() .handle_message(bearer_context_modification_resp); @@ -136,7 +130,7 @@ class inter_du_handover_routine_test : public mobility_test { e1ap_message bearer_context_release_complete = generate_bearer_context_release_complete(int_to_gnb_cu_cp_ue_e1ap_id(0), int_to_gnb_cu_up_ue_e1ap_id(0)); - cu_cp_obj->get_connected_cu_ups() + cu_cp_obj->get_cu_ups() .get_cu_up(uint_to_cu_up_index(0)) .get_e1ap_message_handler() .handle_message(bearer_context_release_complete); @@ -147,10 +141,7 @@ class inter_du_handover_routine_test : public mobility_test { f1ap_message rrc_recfg_complete = generate_ul_rrc_message_transfer( int_to_gnb_cu_ue_f1ap_id(0), int_to_gnb_du_ue_f1ap_id(0), srb_id_t::srb1, make_byte_buffer("8000080035c41efd")); - cu_cp_obj->get_connected_dus() - .get_du(target_du_index) - .get_f1ap_message_handler() - .handle_message(rrc_recfg_complete); + cu_cp_obj->get_dus().get_du(target_du_index).get_f1ap_message_handler().handle_message(rrc_recfg_complete); } /// \brief Inject UE Context Release Complete. @@ -158,8 +149,7 @@ class inter_du_handover_routine_test : public mobility_test { f1ap_message ue_context_release_complete = generate_ue_context_release_complete(int_to_gnb_cu_ue_f1ap_id(0), int_to_gnb_du_ue_f1ap_id(0)); - cu_cp_obj->get_connected_dus().get_du(du_index).get_f1ap_message_handler().handle_message( - ue_context_release_complete); + cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ue_context_release_complete); } bool procedure_ready() const { return t.ready(); } @@ -178,11 +168,11 @@ class inter_du_handover_routine_test : public mobility_test size_t get_nof_ues_in_target_du() { - return cu_cp_obj->get_connected_dus().get_du(target_du_index).get_f1ap_statistics_handler().get_nof_ues(); + return cu_cp_obj->get_dus().get_du(target_du_index).get_f1ap_statistics_handler().get_nof_ues(); } size_t get_nof_ues_in_source_du() { - return cu_cp_obj->get_connected_dus().get_du(source_du_index).get_f1ap_statistics_handler().get_nof_ues(); + return cu_cp_obj->get_dus().get_du(source_du_index).get_f1ap_statistics_handler().get_nof_ues(); } private: From 62990f303d68226c9a8bca63fc31c87e42643b52 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 12 Feb 2024 11:13:15 +0100 Subject: [PATCH 18/78] cu-cp: add gNB-DU-Id in CU-CP metrics --- include/srsran/cu_cp/cu_cp_metrics_handler.h | 9 +++++- include/srsran/cu_cp/du_processor_context.h | 6 ++-- include/srsran/cu_cp/ue_manager.h | 8 +++-- include/srsran/f1ap/cu_cp/du_setup_notifier.h | 5 ++-- include/srsran/ran/gnb_du_id.h | 17 +++++++++-- lib/cu_cp/du_processor/du_processor_impl.cpp | 9 +++--- lib/cu_cp/ue_manager/ue_manager_impl.cpp | 9 +++--- lib/cu_cp/ue_manager/ue_manager_impl.h | 21 +++++++------ .../cu_cp/procedures/f1_setup_procedure.cpp | 2 +- .../cu_cp/cu_cp_connectivity_test.cpp | 26 +++++++++++++++- tests/unittests/cu_cp/cu_cp_test_helpers.cpp | 4 +-- tests/unittests/cu_cp/cu_cp_test_helpers.h | 2 +- .../ue_context_release_routine_test.cpp | 2 +- .../cu_cp/du_processor_test_messages.cpp | 6 ++-- .../cu_cp/du_processor_test_messages.h | 2 +- .../metrics_handler/metrics_handler_test.cpp | 5 ++-- .../handover_reconfiguration_routine_test.cpp | 4 +-- .../inter_du_handover_routine_test.cpp | 2 +- .../cu_cp/ue_manager/ue_manager_test.cpp | 30 +++++++++---------- .../ue_manager/ue_manager_test_helpers.cpp | 4 +-- .../ue_manager/ue_manager_test_helpers.h | 2 +- .../f1ap/common/f1ap_cu_test_messages.cpp | 4 +-- .../f1ap/common/f1ap_cu_test_messages.h | 3 +- tests/unittests/f1ap/cu_cp/f1ap_cu_test.cpp | 2 +- tests/unittests/ngap/ngap_test_helpers.cpp | 4 +-- 25 files changed, 119 insertions(+), 69 deletions(-) diff --git a/include/srsran/cu_cp/cu_cp_metrics_handler.h b/include/srsran/cu_cp/cu_cp_metrics_handler.h index 13d5509f91..f39cfc3e36 100644 --- a/include/srsran/cu_cp/cu_cp_metrics_handler.h +++ b/include/srsran/cu_cp/cu_cp_metrics_handler.h @@ -10,6 +10,7 @@ #pragma once +#include "srsran/ran/gnb_du_id.h" #include "srsran/ran/nr_cgi.h" #include "srsran/ran/pci.h" #include "srsran/ran/rnti.h" @@ -22,14 +23,20 @@ namespace srs_cu_cp { /// CU-CP Metrics report. struct metrics_report { struct ue_info { + /// Current C-RNTI of the UE. rnti_t rnti; - pci_t pci; + /// ID of the DU the UE is connected to. + gnb_du_id_t du_id; + /// PCI of the UE's PCell. + pci_t pci; }; struct cell_info { nr_cell_global_id_t cgi; pci_t pci; }; struct du_info { + /// ID of the DU the UE is connected to. + gnb_du_id_t id; std::vector cells; }; diff --git a/include/srsran/cu_cp/du_processor_context.h b/include/srsran/cu_cp/du_processor_context.h index b7866bbc5b..3e8a314725 100644 --- a/include/srsran/cu_cp/du_processor_context.h +++ b/include/srsran/cu_cp/du_processor_context.h @@ -36,9 +36,9 @@ struct du_cell_context { }; struct du_processor_context { - du_index_t du_index = du_index_t::invalid; /// Index assisgned by CU-CP - uint64_t id; /// the gNB-DU-ID - std::string name = "none"; /// gNB-DU-Name + du_index_t du_index = du_index_t::invalid; /// Index assisgned by CU-CP + gnb_du_id_t id = gnb_du_id_t::invalid; /// the gNB-DU-ID + std::string name = "none"; /// gNB-DU-Name }; } // namespace srs_cu_cp diff --git a/include/srsran/cu_cp/ue_manager.h b/include/srsran/cu_cp/ue_manager.h index a000545488..69adc6574f 100644 --- a/include/srsran/cu_cp/ue_manager.h +++ b/include/srsran/cu_cp/ue_manager.h @@ -13,6 +13,7 @@ #include "srsran/cu_cp/cu_cp_types.h" #include "srsran/ngap/ngap.h" #include "srsran/ngap/ngap_types.h" +#include "srsran/ran/gnb_du_id.h" #include "srsran/rrc/rrc_ue.h" namespace srsran { @@ -68,8 +69,8 @@ class du_ue : public ue_base /// \brief Get the PCell index of the UE. virtual du_cell_index_t get_pcell_index() = 0; - /// \brief Update a UE with PCI and/or C-RNTI. - virtual void update_du_ue(pci_t pci_, rnti_t c_rnti_) = 0; + /// \brief Update a UE with DU-Id, PCI and/or C-RNTI. + virtual void update_du_ue(gnb_du_id_t du_id_, pci_t pci_, rnti_t c_rnti_) = 0; /// \brief Set the PCell infox of the UE. /// \param[in] pcell_index PCell index of the UE. @@ -131,10 +132,11 @@ class du_processor_ue_manager : public common_ue_manager /// \brief Add PCI and C-RNTI to a UE for the given UE index. If the UE can't be found or if a UE with the UE index /// was already setup, nulltpr is returned. /// \param[in] ue_index Index of the UE to add the notifiers to. + /// \param[in] du_id gNB-DU Id of the DU to which UE connected to. /// \param[in] pci PCI of the cell that the UE is connected to. /// \param[in] rnti RNTI of the UE to be added. /// \return Pointer to the newly added DU UE if successful, nullptr otherwise. - virtual du_ue* add_ue(ue_index_t ue_index, pci_t pci, rnti_t rnti) = 0; + virtual du_ue* add_ue(ue_index_t ue_index, gnb_du_id_t du_id, pci_t pci, rnti_t rnti) = 0; /// \brief Find the DU UE with the given UE index. /// \param[in] ue_index Index of the UE to be found. diff --git a/include/srsran/f1ap/cu_cp/du_setup_notifier.h b/include/srsran/f1ap/cu_cp/du_setup_notifier.h index c1e14f300e..90947d905a 100644 --- a/include/srsran/f1ap/cu_cp/du_setup_notifier.h +++ b/include/srsran/f1ap/cu_cp/du_setup_notifier.h @@ -14,6 +14,7 @@ #include "srsran/cu_cp/cu_cp_types.h" #include "srsran/ran/cause.h" #include "srsran/ran/crit_diagnostics.h" +#include "srsran/ran/gnb_du_id.h" #include "srsran/ran/nr_cgi.h" #include "srsran/ran/pci.h" #include @@ -24,8 +25,8 @@ namespace srsran { namespace srs_cu_cp { struct du_setup_request { - uint64_t gnb_du_id; - optional gnb_du_name; + gnb_du_id_t gnb_du_id; + std::string gnb_du_name; std::vector gnb_du_served_cells_list; uint8_t gnb_du_rrc_version; // TODO: Add optional fields diff --git a/include/srsran/ran/gnb_du_id.h b/include/srsran/ran/gnb_du_id.h index 9110b7e5f3..52efc388d9 100644 --- a/include/srsran/ran/gnb_du_id.h +++ b/include/srsran/ran/gnb_du_id.h @@ -8,7 +8,18 @@ * */ -#ifndef SRSRAN_GNB_DU_ID_H -#define SRSRAN_GNB_DU_ID_H +#pragma once -#endif // SRSRAN_GNB_DU_ID_H +#include + +namespace srsran { + +/// Global NodeB DU ID as per TS 38.473. +enum class gnb_du_id_t : uint64_t { min = 0, max = 68719476735, invalid = max + 1 }; + +inline gnb_du_id_t int_to_gnb_du_id(uint64_t id) +{ + return static_cast(id); +} + +} // namespace srsran \ No newline at end of file diff --git a/lib/cu_cp/du_processor/du_processor_impl.cpp b/lib/cu_cp/du_processor/du_processor_impl.cpp index cf1ee60485..81566e4203 100644 --- a/lib/cu_cp/du_processor/du_processor_impl.cpp +++ b/lib/cu_cp/du_processor/du_processor_impl.cpp @@ -79,10 +79,8 @@ du_setup_result du_processor_impl::handle_du_setup_request(const du_setup_reques du_setup_result res; // Set DU context - context.id = request.gnb_du_id; - if (request.gnb_du_name.has_value()) { - context.name = request.gnb_du_name.value(); - } + context.id = request.gnb_du_id; + context.name = request.gnb_du_name; // Check if CU-CP is in a state to accept a new DU connection. if (not cfg.du_setup_notif->on_du_setup_request(request)) { @@ -271,7 +269,7 @@ ue_creation_complete_message du_processor_impl::handle_ue_creation_request(const } // Create new UE context - du_ue* ue = ue_manager.add_ue(msg.ue_index, pci, msg.c_rnti); + du_ue* ue = ue_manager.add_ue(msg.ue_index, context.id, pci, msg.c_rnti); if (ue == nullptr) { logger.warning("ue={}: Could not create UE context", msg.ue_index); return ue_creation_complete_msg; @@ -594,6 +592,7 @@ du_processor_impl::handle_ngap_handover_request(const ngap_handover_request& req metrics_report::du_info du_processor_impl::handle_du_metrics_report_request() const { metrics_report::du_info report; + report.id = context.id; for (const auto& cell : cell_db) { report.cells.emplace_back(); report.cells.back().cgi = cell.second.cgi; diff --git a/lib/cu_cp/ue_manager/ue_manager_impl.cpp b/lib/cu_cp/ue_manager/ue_manager_impl.cpp index 66e33ab01c..b5d39c868e 100644 --- a/lib/cu_cp/ue_manager/ue_manager_impl.cpp +++ b/lib/cu_cp/ue_manager/ue_manager_impl.cpp @@ -108,7 +108,7 @@ du_ue* ue_manager::find_ue(ue_index_t ue_index) return nullptr; } -du_ue* ue_manager::add_ue(ue_index_t ue_index, pci_t pci, rnti_t rnti) +du_ue* ue_manager::add_ue(ue_index_t ue_index, gnb_du_id_t du_id, pci_t pci, rnti_t rnti) { srsran_assert(ue_index != ue_index_t::invalid, "Invalid ue_index={}", ue_index); srsran_assert(pci != INVALID_PCI, "Invalid pci={}", pci); @@ -127,7 +127,7 @@ du_ue* ue_manager::add_ue(ue_index_t ue_index, pci_t pci, rnti_t rnti) } auto& ue = ues.at(ue_index); - ue.update_du_ue(pci, rnti); + ue.update_du_ue(du_id, pci, rnti); // Add PCI and RNTI to lookup. pci_rnti_to_ue_index.emplace(std::make_tuple(pci, rnti), ue_index); @@ -192,8 +192,9 @@ std::vector ue_manager::handle_ue_metrics_report_reques report.emplace_back(); metrics_report::ue_info& ue_report = report.back(); - ue_report.rnti = ue.second.get_c_rnti(); - ue_report.pci = ue.second.get_pci(); + ue_report.rnti = ue.second.get_c_rnti(); + ue_report.du_id = ue.second.get_du_id(); + ue_report.pci = ue.second.get_pci(); } return report; diff --git a/lib/cu_cp/ue_manager/ue_manager_impl.h b/lib/cu_cp/ue_manager/ue_manager_impl.h index 140f981b5e..1f4fdc1a78 100644 --- a/lib/cu_cp/ue_manager/ue_manager_impl.h +++ b/lib/cu_cp/ue_manager/ue_manager_impl.h @@ -37,7 +37,7 @@ struct ngap_ue_t { } }; -class cu_cp_ue : public du_ue, public ngap_ue, public rrc_ue_task_scheduler +class cu_cp_ue final : public du_ue, public ngap_ue, public rrc_ue_task_scheduler { public: cu_cp_ue(const ue_index_t ue_index_, @@ -104,6 +104,8 @@ class cu_cp_ue : public du_ue, public ngap_ue, public rrc_ue_task_scheduler /// \brief Get the C-RNTI of the UE. rnti_t get_c_rnti() const override { return c_rnti; } + gnb_du_id_t get_du_id() const { return du_id; } + /// \brief Get the DU index of the UE. du_index_t get_du_index() override { return du_index; } @@ -111,8 +113,14 @@ class cu_cp_ue : public du_ue, public ngap_ue, public rrc_ue_task_scheduler du_cell_index_t get_pcell_index() override { return pcell_index; } /// \brief Update a UE with PCI and/or C-RNTI. - void update_du_ue(pci_t pci_ = INVALID_PCI, rnti_t c_rnti_ = rnti_t::INVALID_RNTI) override + void update_du_ue(gnb_du_id_t du_id_ = gnb_du_id_t::invalid, + pci_t pci_ = INVALID_PCI, + rnti_t c_rnti_ = rnti_t::INVALID_RNTI) override { + if (du_id_ != gnb_du_id_t::invalid) { + du_id = du_id_; + } + if (pci_ != INVALID_PCI) { pci = pci_; } @@ -194,6 +202,7 @@ class cu_cp_ue : public du_ue, public ngap_ue, public rrc_ue_task_scheduler // du ue context du_index_t du_index = du_index_t::invalid; + gnb_du_id_t du_id = gnb_du_id_t::invalid; du_cell_index_t pcell_index = du_cell_index_t::invalid; pci_t pci = INVALID_PCI; rnti_t c_rnti = rnti_t::INVALID_RNTI; @@ -250,13 +259,7 @@ class ue_manager : public du_processor_ue_manager, public ngap_ue_manager, publi /// \return Pointer to the UE if found, nullptr otherwise. du_ue* find_ue(ue_index_t ue_index) override; - /// \brief Add PCI and C-RNTI to a UE for the given UE index. If the UE can't be found or if a UE with the UE - /// index was already setup, nulltpr is returned. - /// \param[in] ue_index Index of the UE to add the notifiers to. - /// \param[in] pci PCI of the cell that the UE is connected to. - /// \param[in] rnti RNTI of the UE to be added. - /// \return Pointer to the newly added DU UE if successful, nullptr otherwise. - du_ue* add_ue(ue_index_t ue_index, pci_t pci, rnti_t rnti) override; + du_ue* add_ue(ue_index_t ue_index, gnb_du_id_t du_id, pci_t pci, rnti_t rnti) override; /// \brief Find the UE with the given UE index, thats DU context is set up. /// \param[in] ue_index Index of the UE to be found. diff --git a/lib/f1ap/cu_cp/procedures/f1_setup_procedure.cpp b/lib/f1ap/cu_cp/procedures/f1_setup_procedure.cpp index da6460e7ed..f6d79acbbf 100644 --- a/lib/f1ap/cu_cp/procedures/f1_setup_procedure.cpp +++ b/lib/f1ap/cu_cp/procedures/f1_setup_procedure.cpp @@ -40,7 +40,7 @@ du_setup_request srsran::srs_cu_cp::create_du_setup_request(const asn1::f1ap::f1 du_setup_request request; // GNB DU ID - request.gnb_du_id = asn1_request->gnb_du_id; + request.gnb_du_id = static_cast(asn1_request->gnb_du_id); // GNB DU name if (asn1_request->gnb_du_name_present) { diff --git a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp index eab6afcf20..2afbe40cb7 100644 --- a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp +++ b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp @@ -85,13 +85,24 @@ TEST_F(cu_cp_connectivity_test, when_new_f1_setup_request_is_received_and_ng_is_ // Run NG setup to completion. run_ng_setup(); + // Verify no DUs detected. + auto report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); + ASSERT_TRUE(report.dus.empty()); + // Establish TNL connection between DU and CU-CP. auto ret = connect_new_du(); ASSERT_TRUE(ret.has_value()); unsigned du_idx = *ret; + // Verify that DU was created but without gNB-DU-Id yet, as that value will come in the F1 Setup Request. + report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); + ASSERT_EQ(report.dus.size(), 1); + ASSERT_EQ(report.dus[0].id, gnb_du_id_t::invalid); + ASSERT_TRUE(report.dus[0].cells.empty()); + // Send F1 Setup Request. - get_du(du_idx).push_tx_pdu(generate_f1_setup_request()); + gnb_du_id_t du_id = int_to_gnb_du_id(0x55); + get_du(du_idx).push_tx_pdu(generate_f1_setup_request(du_id)); // Ensure the F1 Setup Response is received and correct. f1ap_message f1ap_pdu; @@ -100,6 +111,12 @@ TEST_F(cu_cp_connectivity_test, when_new_f1_setup_request_is_received_and_ng_is_ ASSERT_EQ(f1ap_pdu.pdu.type().value, asn1::f1ap::f1ap_pdu_c::types_opts::successful_outcome); ASSERT_EQ(f1ap_pdu.pdu.successful_outcome().value.type().value, asn1::f1ap::f1ap_elem_procs_o::successful_outcome_c::types_opts::f1_setup_resp); + + // Verify DU has assigned DU id. + report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); + ASSERT_EQ(report.dus.size(), 1); + ASSERT_EQ(report.dus[0].id, du_id); + ASSERT_EQ(report.dus[0].cells.size(), 1); } TEST_F(cu_cp_connectivity_test, when_max_nof_dus_connected_reached_then_cu_cp_rejects_new_du_connections) @@ -111,6 +128,10 @@ TEST_F(cu_cp_connectivity_test, when_max_nof_dus_connected_reached_then_cu_cp_re auto ret = connect_new_du(); ASSERT_FALSE(ret.has_value()); + + // Verify that no DUs are created. + auto report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); + ASSERT_EQ(report.dus.size(), this->get_test_env_params().max_nof_dus); } TEST_F( @@ -277,6 +298,8 @@ TEST_F(cu_cp_connectivity_test, when_ng_f1_e1_are_setup_then_ues_can_attach) report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); ASSERT_EQ(report.ues.size(), 1); ASSERT_EQ(report.ues[0].rnti, crnti); + ASSERT_EQ(report.ues[0].du_id, report.dus[0].id); + ASSERT_EQ(report.ues[0].pci, report.dus[0].cells[0].pci); // AMF still not notified of UE attach. ngap_message ngap_pdu; @@ -288,6 +311,7 @@ TEST_F(cu_cp_connectivity_test, when_ng_f1_e1_are_setup_then_ues_can_attach) test_logger.info("Injecting UL RRC message (RRC Setup Complete)"); get_du(du_idx).push_tx_pdu(ul_rrc_msg); + // Verify AMF is notified of UE attach. ASSERT_TRUE(this->wait_for_ngap_tx_pdu(ngap_pdu)); ASSERT_TRUE(is_pdu_type(ngap_pdu, asn1::ngap::ngap_elem_procs_o::init_msg_c::types::types_opts::init_ue_msg)); } diff --git a/tests/unittests/cu_cp/cu_cp_test_helpers.cpp b/tests/unittests/cu_cp/cu_cp_test_helpers.cpp index f0f7b697a5..ba811db933 100644 --- a/tests/unittests/cu_cp/cu_cp_test_helpers.cpp +++ b/tests/unittests/cu_cp/cu_cp_test_helpers.cpp @@ -232,7 +232,7 @@ void cu_cp_test::test_e1ap_attach() cu_cp_obj->get_cu_ups().get_cu_up(uint_to_cu_up_index(0)).get_e1ap_message_handler().handle_message(e1setup_msg); } -void cu_cp_test::test_du_attach(du_index_t du_index, unsigned gnb_du_id, unsigned nrcell_id, pci_t pci) +void cu_cp_test::test_du_attach(du_index_t du_index, gnb_du_id_t gnb_du_id, unsigned nrcell_id, pci_t pci) { // Store current number of DUs. size_t nof_dus = f1c_gw.nof_connections(); @@ -254,7 +254,7 @@ void cu_cp_test::test_preamble_all_connected(du_index_t du_index, pci_t pci) test_e1ap_attach(); - test_du_attach(du_index, 0x11, 6576, pci); + test_du_attach(du_index, int_to_gnb_du_id(0x11), 6576, pci); } void cu_cp_test::test_preamble_ue_creation(du_index_t du_index, diff --git a/tests/unittests/cu_cp/cu_cp_test_helpers.h b/tests/unittests/cu_cp/cu_cp_test_helpers.h index 6998cdbef4..2327a79698 100644 --- a/tests/unittests/cu_cp/cu_cp_test_helpers.h +++ b/tests/unittests/cu_cp/cu_cp_test_helpers.h @@ -34,7 +34,7 @@ class cu_cp_test : public ::testing::Test void test_amf_connection(); void test_e1ap_attach(); - void test_du_attach(du_index_t du_index, unsigned gnb_du_id, unsigned nrcell_id, pci_t pci); + void test_du_attach(du_index_t du_index, gnb_du_id_t gnb_du_id, unsigned nrcell_id, pci_t pci); void attach_ue(gnb_du_ue_f1ap_id_t du_ue_id, gnb_cu_ue_f1ap_id_t cu_ue_id, rnti_t crnti, du_index_t du_index); void authenticate_ue(amf_ue_id_t amf_ue_id, diff --git a/tests/unittests/cu_cp/du_processor/ue_context_release_routine_test.cpp b/tests/unittests/cu_cp/du_processor/ue_context_release_routine_test.cpp index 62c3dce3b2..586052be7e 100644 --- a/tests/unittests/cu_cp/du_processor/ue_context_release_routine_test.cpp +++ b/tests/unittests/cu_cp/du_processor/ue_context_release_routine_test.cpp @@ -33,7 +33,7 @@ class ue_context_release_test : public du_processor_routine_manager_test ue_index_t add_ue(pci_t pci, rnti_t c_rnti) { ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index_t::min); - du_ue* ue = ue_mng.add_ue(ue_index, pci, c_rnti); + du_ue* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), pci, c_rnti); // Set parameters from creation message ue->set_pcell_index(du_cell_index_t::min); ue->set_rrc_ue_notifier(rrc_ue_ctrl_notifier); diff --git a/tests/unittests/cu_cp/du_processor_test_messages.cpp b/tests/unittests/cu_cp/du_processor_test_messages.cpp index c3588f7df3..8836b7839e 100644 --- a/tests/unittests/cu_cp/du_processor_test_messages.cpp +++ b/tests/unittests/cu_cp/du_processor_test_messages.cpp @@ -22,7 +22,7 @@ using namespace srsran; using namespace srs_cu_cp; void srsran::srs_cu_cp::generate_valid_f1_setup_request(du_setup_request& setup_request, - unsigned gnb_du_id, + gnb_du_id_t gnb_du_id, unsigned nrcell_id, pci_t pci) { @@ -32,7 +32,7 @@ void srsran::srs_cu_cp::generate_valid_f1_setup_request(du_setup_request& setup_ void srsran::srs_cu_cp::generate_f1_setup_request_base(du_setup_request& setup_request) { - f1ap_message f1setup_msg = generate_f1_setup_request(0x11, 6576, 0); + f1ap_message f1setup_msg = generate_f1_setup_request(int_to_gnb_du_id(0x11), 6576, 0); f1setup_msg.pdu.init_msg().value.f1_setup_request()->gnb_du_served_cells_list_present = false; f1setup_msg.pdu.init_msg().value.f1_setup_request()->gnb_du_served_cells_list.clear(); setup_request = create_du_setup_request(f1setup_msg.pdu.init_msg().value.f1_setup_request()); @@ -56,7 +56,7 @@ f1ap_message srsran::srs_cu_cp::create_f1_setup_request_with_too_many_cells(cons void srsran::srs_cu_cp::generate_f1_setup_request_with_too_many_cells(du_setup_request& setup_request) { - f1ap_message f1setup_msg = generate_f1_setup_request(0x11, 6576, 0); + f1ap_message f1setup_msg = generate_f1_setup_request(int_to_gnb_du_id(0x11), 6576, 0); auto& f1_setup_req = f1setup_msg.pdu.init_msg().value.f1_setup_request(); f1_setup_req->gnb_du_served_cells_list.clear(); diff --git a/tests/unittests/cu_cp/du_processor_test_messages.h b/tests/unittests/cu_cp/du_processor_test_messages.h index 8c85c1ca42..1cf92a93fd 100644 --- a/tests/unittests/cu_cp/du_processor_test_messages.h +++ b/tests/unittests/cu_cp/du_processor_test_messages.h @@ -20,7 +20,7 @@ namespace srs_cu_cp { /// \brief Generate a valid dummy F1 Setup Request. void generate_valid_f1_setup_request(du_setup_request& setup_request, - unsigned gnb_du_id = 0x11, + gnb_du_id_t gnb_du_id = int_to_gnb_du_id(0x11), unsigned nrcell_id = 6576, pci_t pci = 0); diff --git a/tests/unittests/cu_cp/metrics_handler/metrics_handler_test.cpp b/tests/unittests/cu_cp/metrics_handler/metrics_handler_test.cpp index ba3392611d..aabfa93013 100644 --- a/tests/unittests/cu_cp/metrics_handler/metrics_handler_test.cpp +++ b/tests/unittests/cu_cp/metrics_handler/metrics_handler_test.cpp @@ -45,8 +45,9 @@ TEST(metrics_handler_test, get_periodic_metrics_report_while_session_is_active) auto session = metrics.create_periodic_report_session(periodic_metric_report_request{period, &metrics_notifier}); // First report. - metrics_hdlr.next_metrics.ues.emplace_back(metrics_report::ue_info{to_rnti(1), pci_t{2}}); + metrics_hdlr.next_metrics.ues.emplace_back(metrics_report::ue_info{to_rnti(1), int_to_gnb_du_id(0), pci_t{2}}); metrics_hdlr.next_metrics.dus.emplace_back(metrics_report::du_info{ + int_to_gnb_du_id(0), {metrics_report::cell_info{nr_cell_global_id_t{001, 01, "00101", "00f110", 0x22}, pci_t{2}}}}); for (unsigned i = 0; i != period.count(); ++i) { ASSERT_FALSE(metrics_notifier.last_metrics_report.has_value()); @@ -60,7 +61,7 @@ TEST(metrics_handler_test, get_periodic_metrics_report_while_session_is_active) // Second report. metrics_notifier.last_metrics_report.reset(); - metrics_hdlr.next_metrics.ues.emplace_back(metrics_report::ue_info{to_rnti(2), pci_t{3}}); + metrics_hdlr.next_metrics.ues.emplace_back(metrics_report::ue_info{to_rnti(2), int_to_gnb_du_id(0), pci_t{3}}); for (unsigned i = 0; i != period.count(); ++i) { ASSERT_FALSE(metrics_notifier.last_metrics_report.has_value()); timers.tick(); diff --git a/tests/unittests/cu_cp/mobility/handover_reconfiguration_routine_test.cpp b/tests/unittests/cu_cp/mobility/handover_reconfiguration_routine_test.cpp index e03cdfacf3..88410909bd 100644 --- a/tests/unittests/cu_cp/mobility/handover_reconfiguration_routine_test.cpp +++ b/tests/unittests/cu_cp/mobility/handover_reconfiguration_routine_test.cpp @@ -26,13 +26,13 @@ class handover_reconfiguration_routine_test : public mobility_test void create_ues(bool procedure_outcome, unsigned transaction_id_) { ue_index_t source_ue_index = get_ue_manager()->allocate_new_ue_index(source_du_index); - source_ue = get_ue_manager()->add_ue(source_ue_index, source_pci, source_rnti); + source_ue = get_ue_manager()->add_ue(source_ue_index, int_to_gnb_du_id(0), source_pci, source_rnti); ASSERT_NE(source_ue, nullptr); source_rrc_ue_notifier.set_transaction_id(transaction_id_); source_ue->set_rrc_ue_notifier(source_rrc_ue_notifier); ue_index_t target_ue_index = get_ue_manager()->allocate_new_ue_index(target_du_index); - target_ue = get_ue_manager()->add_ue(target_ue_index, target_pci, target_rnti); + target_ue = get_ue_manager()->add_ue(target_ue_index, int_to_gnb_du_id(0), target_pci, target_rnti); ASSERT_NE(target_ue, nullptr); target_rrc_ue_notifier.set_rrc_reconfiguration_outcome(procedure_outcome); target_ue->set_rrc_ue_notifier(target_rrc_ue_notifier); diff --git a/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp b/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp index 9fc31cef25..969a05161b 100644 --- a/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp +++ b/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp @@ -181,7 +181,7 @@ class inter_du_handover_routine_test : public mobility_test // target DU parameters. du_index_t target_du_index = uint_to_du_index(1); - unsigned target_du_id = 0x22; + gnb_du_id_t target_du_id = int_to_gnb_du_id(0x22); nr_cell_id_t target_nrcell_id = 34; nr_cell_global_id_t target_cgi = {001, 01, "00101", "00f110", 0x22}; unsigned target_pci = 2; diff --git a/tests/unittests/cu_cp/ue_manager/ue_manager_test.cpp b/tests/unittests/cu_cp/ue_manager/ue_manager_test.cpp index 8b3b52054f..10e91a97a5 100644 --- a/tests/unittests/cu_cp/ue_manager/ue_manager_test.cpp +++ b/tests/unittests/cu_cp/ue_manager/ue_manager_test.cpp @@ -63,7 +63,7 @@ TEST_F(ue_manager_test, when_rnti_valid_then_ue_added) ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); rnti_t rnti = to_rnti(0x4601); - auto* ue = ue_mng.add_ue(ue_index, MIN_PCI, rnti); + auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // check that the UE has been created ASSERT_NE(ue, nullptr); @@ -92,7 +92,7 @@ TEST_F(ue_manager_test, when_ue_index_invalid_then_ue_not_found) ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); rnti_t rnti = to_rnti(0x4601); - auto* ue = ue_mng.add_ue(ue_index, MIN_PCI, rnti); + auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // check that the UE has been created ASSERT_NE(ue, nullptr); @@ -108,12 +108,12 @@ TEST_F(ue_manager_test, when_rnti_already_exits_then_ue_not_added) ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); rnti_t rnti = to_rnti(0x4601); - ue_mng.add_ue(ue_index, MIN_PCI, rnti); + ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // check that the number of DU UEs is 1 ASSERT_EQ(ue_mng.get_nof_du_ues(du_index), 1U); - auto* ue2 = ue_mng.add_ue(ue_index, MIN_PCI, rnti); + auto* ue2 = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // check that the UE has not been added ASSERT_EQ(ue2, nullptr); @@ -127,7 +127,7 @@ TEST_F(ue_manager_test, when_ue_exists_then_removal_successful) ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); rnti_t rnti = to_rnti(0x4601); - auto* ue = ue_mng.add_ue(ue_index, MIN_PCI, rnti); + auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); ue_mng.remove_ue(ue->get_ue_index()); @@ -145,7 +145,7 @@ TEST_F(ue_manager_test, when_ngap_ue_context_exists_then_du_ue_removal_successfu ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); rnti_t rnti = to_rnti(0x4601); - auto* ue = ue_mng.add_ue(ue_index, MIN_PCI, rnti); + auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // add a NGAP context auto* ue_ngap = @@ -172,7 +172,7 @@ TEST_F(ue_manager_test, when_multiple_ues_added_then_ues_exist) it++) { rnti_t rnti = to_rnti(it); ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); - auto* ue = ue_mng.add_ue(ue_index, MIN_PCI, rnti); + auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // check that the UE has been created ASSERT_NE(ue, nullptr); @@ -214,7 +214,7 @@ TEST_F(ue_manager_test, when_more_than_max_ues_added_then_ue_not_created) it++) { rnti_t rnti = to_rnti(it); ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); - auto* ue = ue_mng.add_ue(ue_index, MIN_PCI, rnti); + auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // check that the UE has been created ASSERT_NE(ue, nullptr); @@ -267,7 +267,7 @@ TEST_F(ue_manager_test, when_ue_not_created_then_ngap_ue_not_added) /// Test successful creation of a NGAP UE TEST_F(ue_manager_test, when_ue_created_then_then_ngap_ue_added) { - ue_index_t ue_index = create_ue(uint_to_du_index(0), MIN_PCI, to_rnti(0x4601)); + ue_index_t ue_index = create_ue(uint_to_du_index(0), int_to_gnb_du_id(0), MIN_PCI, to_rnti(0x4601)); auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); @@ -285,7 +285,7 @@ TEST_F(ue_manager_test, when_ue_created_then_then_ngap_ue_added) /// Test finding invalid UE index TEST_F(ue_manager_test, when_ue_index_invalid_then_ngap_ue_not_found) { - ue_index_t ue_index = create_ue(uint_to_du_index(0), MIN_PCI, to_rnti(0x4601)); + ue_index_t ue_index = create_ue(uint_to_du_index(0), int_to_gnb_du_id(0), MIN_PCI, to_rnti(0x4601)); auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); @@ -299,7 +299,7 @@ TEST_F(ue_manager_test, when_ue_index_invalid_then_ngap_ue_not_found) /// Test duplicate UE creation TEST_F(ue_manager_test, when_ngap_context_already_exits_then_ue_not_added) { - ue_index_t ue_index = create_ue(uint_to_du_index(0), MIN_PCI, to_rnti(0x4601)); + ue_index_t ue_index = create_ue(uint_to_du_index(0), int_to_gnb_du_id(0), MIN_PCI, to_rnti(0x4601)); auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); @@ -320,7 +320,7 @@ TEST_F(ue_manager_test, when_ngap_context_already_exits_then_ue_not_added) TEST_F(ue_manager_test, when_du_ue_context_exists_then_ngap_ue_removal_successful) { du_index_t du_index = uint_to_du_index(0); - ue_index_t ue_index = create_ue(du_index, MIN_PCI, to_rnti(0x4601)); + ue_index_t ue_index = create_ue(du_index, int_to_gnb_du_id(0), MIN_PCI, to_rnti(0x4601)); auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); @@ -335,7 +335,7 @@ TEST_F(ue_manager_test, when_ngap_ue_exists_then_removal_successful) { du_index_t du_index = uint_to_du_index(0); - ue_index_t ue_index = create_ue(du_index, MIN_PCI, to_rnti(0x4601)); + ue_index_t ue_index = create_ue(du_index, int_to_gnb_du_id(0), MIN_PCI, to_rnti(0x4601)); auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); @@ -360,7 +360,7 @@ TEST_F(ue_manager_test, when_multiple_ngap_ues_added_then_ues_exist) for (unsigned it = to_value(rnti_t::MIN_CRNTI); it < unsigned(to_value(rnti_t::MIN_CRNTI) + MAX_NOF_UES_PER_DU); it++) { - ue_index_t ue_index = create_ue(uint_to_du_index(du_idx), MIN_PCI, to_rnti(du_offset + it)); + ue_index_t ue_index = create_ue(uint_to_du_index(du_idx), int_to_gnb_du_id(0), MIN_PCI, to_rnti(du_offset + it)); auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); // check that the UE has been created @@ -395,7 +395,7 @@ TEST_F(ue_manager_test, when_more_than_max_ues_added_then_ngap_ue_not_created) for (unsigned it = to_value(rnti_t::MIN_CRNTI); it < unsigned(to_value(rnti_t::MIN_CRNTI) + MAX_NOF_UES_PER_DU); it++) { - ue_index_t ue_index = create_ue(uint_to_du_index(du_idx), MIN_PCI, to_rnti(du_offset + it)); + ue_index_t ue_index = create_ue(uint_to_du_index(du_idx), int_to_gnb_du_id(0), MIN_PCI, to_rnti(du_offset + it)); auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); // check that the UE has been created diff --git a/tests/unittests/cu_cp/ue_manager/ue_manager_test_helpers.cpp b/tests/unittests/cu_cp/ue_manager/ue_manager_test_helpers.cpp index d6ebfa3176..79a68aeb3d 100644 --- a/tests/unittests/cu_cp/ue_manager/ue_manager_test_helpers.cpp +++ b/tests/unittests/cu_cp/ue_manager/ue_manager_test_helpers.cpp @@ -30,10 +30,10 @@ ue_manager_test::~ue_manager_test() srslog::flush(); } -ue_index_t ue_manager_test::create_ue(du_index_t du_index, pci_t pci, rnti_t rnti) +ue_index_t ue_manager_test::create_ue(du_index_t du_index, gnb_du_id_t du_id, pci_t pci, rnti_t rnti) { ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); - auto* ue = ue_mng.add_ue(ue_index, pci, rnti); + auto* ue = ue_mng.add_ue(ue_index, du_id, pci, rnti); if (ue == nullptr) { test_logger.error("Failed to create UE with pci={} and rnti={}", pci, rnti); return ue_index_t::invalid; diff --git a/tests/unittests/cu_cp/ue_manager/ue_manager_test_helpers.h b/tests/unittests/cu_cp/ue_manager/ue_manager_test_helpers.h index 1000d2e88b..fd8c7fc386 100644 --- a/tests/unittests/cu_cp/ue_manager/ue_manager_test_helpers.h +++ b/tests/unittests/cu_cp/ue_manager/ue_manager_test_helpers.h @@ -28,7 +28,7 @@ class ue_manager_test : public ::testing::Test ue_manager_test(); ~ue_manager_test() override; - ue_index_t create_ue(du_index_t du_index, pci_t pci, rnti_t rnti); + ue_index_t create_ue(du_index_t du_index, gnb_du_id_t du_id, pci_t pci, rnti_t rnti); srslog::basic_logger& test_logger = srslog::fetch_basic_logger("TEST"); srslog::basic_logger& ue_mng_logger = srslog::fetch_basic_logger("CU-UEMNG"); diff --git a/tests/unittests/f1ap/common/f1ap_cu_test_messages.cpp b/tests/unittests/f1ap/common/f1ap_cu_test_messages.cpp index 1125bdee62..bf034f1f64 100644 --- a/tests/unittests/f1ap/common/f1ap_cu_test_messages.cpp +++ b/tests/unittests/f1ap/common/f1ap_cu_test_messages.cpp @@ -53,7 +53,7 @@ asn1::f1ap::gnb_du_served_cells_item_s srsran::srs_cu_cp::generate_served_cells_ return served_cells_item; } -f1ap_message srsran::srs_cu_cp::generate_f1_setup_request(unsigned gnb_du_id, unsigned nrcell_id, pci_t pci) +f1ap_message srsran::srs_cu_cp::generate_f1_setup_request(gnb_du_id_t gnb_du_id, unsigned nrcell_id, pci_t pci) { f1ap_message msg; msg.pdu.set_init_msg(); @@ -61,7 +61,7 @@ f1ap_message srsran::srs_cu_cp::generate_f1_setup_request(unsigned gnb_du_id, un auto& setup_req = msg.pdu.init_msg().value.f1_setup_request(); setup_req->transaction_id = 99; - setup_req->gnb_du_id = gnb_du_id; + setup_req->gnb_du_id = (uint64_t)gnb_du_id; setup_req->gnb_du_name_present = true; setup_req->gnb_du_name.from_string("srsDU"); setup_req->gnb_du_rrc_version.latest_rrc_version.from_number(1); diff --git a/tests/unittests/f1ap/common/f1ap_cu_test_messages.h b/tests/unittests/f1ap/common/f1ap_cu_test_messages.h index 72054f0294..30ef2cfaa2 100644 --- a/tests/unittests/f1ap/common/f1ap_cu_test_messages.h +++ b/tests/unittests/f1ap/common/f1ap_cu_test_messages.h @@ -22,7 +22,8 @@ namespace srs_cu_cp { asn1::f1ap::gnb_du_served_cells_item_s generate_served_cells_item(unsigned nrcell_id, pci_t nrpci); /// \brief Generates dummy F1AP SETUP REQUEST message. -f1ap_message generate_f1_setup_request(unsigned gnb_du_id = 0x11, unsigned nrcell_id = 6576, pci_t pci = 0); +f1ap_message +generate_f1_setup_request(gnb_du_id_t gnb_du_id = int_to_gnb_du_id(0x11), unsigned nrcell_id = 6576, pci_t pci = 0); /// \brief Generates dummy F1AP Initial UL RRC Transfer message without DU to CU container. f1ap_message generate_init_ul_rrc_message_transfer_without_du_to_cu_container(gnb_du_ue_f1ap_id_t du_ue_id, diff --git a/tests/unittests/f1ap/cu_cp/f1ap_cu_test.cpp b/tests/unittests/f1ap/cu_cp/f1ap_cu_test.cpp index 3e975cb21d..adaef7a685 100644 --- a/tests/unittests/f1ap/cu_cp/f1ap_cu_test.cpp +++ b/tests/unittests/f1ap/cu_cp/f1ap_cu_test.cpp @@ -127,7 +127,7 @@ TEST_F(f1ap_cu_test, when_f1_setup_request_valid_then_connect_du) f1ap->handle_message(f1setup_msg); // Check if F1SetupRequest was forwarded to DU processor - ASSERT_EQ(du_processor_notifier.last_f1_setup_request_msg.gnb_du_id, 0x11U); + ASSERT_EQ(du_processor_notifier.last_f1_setup_request_msg.gnb_du_id, int_to_gnb_du_id(0x11U)); // Check the F1 Tx PDU is indeed the F1 Setup response ASSERT_EQ(asn1::f1ap::f1ap_pdu_c::types_opts::options::successful_outcome, diff --git a/tests/unittests/ngap/ngap_test_helpers.cpp b/tests/unittests/ngap/ngap_test_helpers.cpp index 42ae52c6d2..e95321cca5 100644 --- a/tests/unittests/ngap/ngap_test_helpers.cpp +++ b/tests/unittests/ngap/ngap_test_helpers.cpp @@ -53,7 +53,7 @@ ue_index_t ngap_test::create_ue(rnti_t rnti) { // Create UE in UE manager ue_index_t ue_index = ue_mng.allocate_new_ue_index(uint_to_du_index(0)); - auto* ue = ue_mng.add_ue(ue_index, MIN_PCI, rnti); + auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); if (ue == nullptr) { test_logger.error("Failed to create UE with pci={} and rnti={}", MIN_PCI, rnti_t::MIN_CRNTI); return ue_index_t::invalid; @@ -81,7 +81,7 @@ ue_index_t ngap_test::create_ue_without_init_ue_message(rnti_t rnti) { // Create UE in UE manager ue_index_t ue_index = ue_mng.allocate_new_ue_index(uint_to_du_index(0)); - auto* ue = ue_mng.add_ue(ue_index, MIN_PCI, rnti); + auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); if (ue == nullptr) { test_logger.error("Failed to create UE with pci={} and rnti={}", MIN_PCI, rnti_t::MIN_CRNTI); return ue_index_t::invalid; From f9f3f53ceafc5dafd1c6e10cd0c32f133fae0c2d Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 12 Feb 2024 12:39:48 +0100 Subject: [PATCH 19/78] cu-cp: remove redundant f1ap metrics interface --- include/srsran/cu_cp/cu_cp_metrics_handler.h | 2 +- include/srsran/cu_cp/du_repository.h | 4 ---- .../du_processor/du_processor_repository.cpp | 5 ----- lib/cu_cp/du_processor/du_processor_repository.h | 1 - .../metrics_handler/metrics_handler_impl.cpp | 4 ++-- lib/cu_cp/metrics_handler/metrics_handler_impl.h | 4 ++-- .../mobility/inter_du_handover_routine_test.cpp | 15 ++++++++------- 7 files changed, 13 insertions(+), 22 deletions(-) diff --git a/include/srsran/cu_cp/cu_cp_metrics_handler.h b/include/srsran/cu_cp/cu_cp_metrics_handler.h index f39cfc3e36..8840723e25 100644 --- a/include/srsran/cu_cp/cu_cp_metrics_handler.h +++ b/include/srsran/cu_cp/cu_cp_metrics_handler.h @@ -92,7 +92,7 @@ class metrics_handler /// /// Note: Given its blocking nature, avoid calling this method in contexts other than unit tests. /// \return The metrics report. - virtual metrics_report request_metrics_report() = 0; + virtual metrics_report request_metrics_report() const = 0; }; } // namespace srs_cu_cp diff --git a/include/srsran/cu_cp/du_repository.h b/include/srsran/cu_cp/du_repository.h index 9147227a95..ee146380d2 100644 --- a/include/srsran/cu_cp/du_repository.h +++ b/include/srsran/cu_cp/du_repository.h @@ -31,10 +31,6 @@ class du_handler /// \return The F1AP message handler interface of the DU processor object. virtual f1ap_message_handler& get_f1ap_message_handler() = 0; - /// \brief Get the F1AP statistics handler interface of the DU processor object. - /// \return The F1AP statistics handler interface of the DU processor object. - virtual f1ap_statistics_handler& get_f1ap_statistics_handler() = 0; - /// \brief Get the mobility handler. virtual du_processor_mobility_handler& get_mobility_handler() = 0; diff --git a/lib/cu_cp/du_processor/du_processor_repository.cpp b/lib/cu_cp/du_processor/du_processor_repository.cpp index 9b806bc09e..9008bcb6e0 100644 --- a/lib/cu_cp/du_processor/du_processor_repository.cpp +++ b/lib/cu_cp/du_processor/du_processor_repository.cpp @@ -187,11 +187,6 @@ du_handler& du_processor_repository::get_du(du_index_t du_index) return du_db.at(du_index); } -f1ap_statistics_handler& du_processor_repository::du_context::get_f1ap_statistics_handler() -{ - return du_processor->get_f1ap_statistics_handler(); -} - f1ap_message_handler& du_processor_repository::du_context::get_f1ap_message_handler() { return du_processor->get_f1ap_message_handler(); diff --git a/lib/cu_cp/du_processor/du_processor_repository.h b/lib/cu_cp/du_processor/du_processor_repository.h index f3c503d648..90c6deda21 100644 --- a/lib/cu_cp/du_processor/du_processor_repository.h +++ b/lib/cu_cp/du_processor/du_processor_repository.h @@ -85,7 +85,6 @@ class du_processor_repository : public du_repository, /// Notifier used by the CU-CP to push F1AP Tx messages to the respective DU. std::unique_ptr f1ap_tx_pdu_notifier; - f1ap_statistics_handler& get_f1ap_statistics_handler() override; f1ap_message_handler& get_f1ap_message_handler() override; du_processor_mobility_handler& get_mobility_handler() override; du_processor_ue_task_handler& get_du_processor_ue_task_handler() override; diff --git a/lib/cu_cp/metrics_handler/metrics_handler_impl.cpp b/lib/cu_cp/metrics_handler/metrics_handler_impl.cpp index b874d93877..3e54d8f20b 100644 --- a/lib/cu_cp/metrics_handler/metrics_handler_impl.cpp +++ b/lib/cu_cp/metrics_handler/metrics_handler_impl.cpp @@ -66,7 +66,7 @@ metrics_handler_impl::create_periodic_report_session(const periodic_metric_repor return std::make_unique(*this, session_id); } -metrics_report metrics_handler_impl::request_metrics_report() +metrics_report metrics_handler_impl::request_metrics_report() const { metrics_report report; @@ -81,7 +81,7 @@ metrics_report metrics_handler_impl::request_metrics_report() return report; } -metrics_report metrics_handler_impl::create_report() +metrics_report metrics_handler_impl::create_report() const { metrics_report report; diff --git a/lib/cu_cp/metrics_handler/metrics_handler_impl.h b/lib/cu_cp/metrics_handler/metrics_handler_impl.h index 60199758e2..44b8917f8f 100644 --- a/lib/cu_cp/metrics_handler/metrics_handler_impl.h +++ b/lib/cu_cp/metrics_handler/metrics_handler_impl.h @@ -31,7 +31,7 @@ class metrics_handler_impl final : public metrics_handler std::unique_ptr create_periodic_report_session(const periodic_metric_report_request& request) override; - metrics_report request_metrics_report() override; + metrics_report request_metrics_report() const override; private: /// Context of a periodic metric report session @@ -41,7 +41,7 @@ class metrics_handler_impl final : public metrics_handler }; // Generate new metrics report. - metrics_report create_report(); + metrics_report create_report() const; unsigned create_periodic_session(const periodic_metric_report_request& request); void request_session_reconfiguration(unsigned session_id, const periodic_metric_report_request& request); diff --git a/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp b/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp index 969a05161b..83267f3ee2 100644 --- a/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp +++ b/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp @@ -166,16 +166,17 @@ class inter_du_handover_routine_test : public mobility_test nr_cell_global_id_t get_target_cgi() { return target_cgi; } - size_t get_nof_ues_in_target_du() - { - return cu_cp_obj->get_dus().get_du(target_du_index).get_f1ap_statistics_handler().get_nof_ues(); - } - size_t get_nof_ues_in_source_du() + size_t get_nof_ues_in_target_du() const { return nof_du_ues(target_du_index); } + size_t get_nof_ues_in_source_du() const { return nof_du_ues(source_du_index); } + +private: + size_t nof_du_ues(du_index_t idx) const { - return cu_cp_obj->get_dus().get_du(source_du_index).get_f1ap_statistics_handler().get_nof_ues(); + const metrics_report report = cu_cp_obj->get_metrics_handler().request_metrics_report(); + gnb_du_id_t du_id = report.dus.at((size_t)idx).id; + return std::count_if(report.ues.begin(), report.ues.end(), [du_id](const auto& u) { return u.du_id == du_id; }); } -private: // source DU parameters. du_index_t source_du_index = uint_to_du_index(0); From 7a98d3fb2e8b0b4ce6bd101d952bd4cb5f8aa71a Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 12 Feb 2024 12:59:41 +0100 Subject: [PATCH 20/78] cu-cp: rename e1 and f1c interfaces of the cu-cp --- .../adapters/e1ap_gateway_local_connector.cpp | 2 +- .../adapters/e1ap_gateway_local_connector.h | 6 +-- .../adapters/f1c_gateway_local_connector.cpp | 2 +- .../adapters/f1c_gateway_local_connector.h | 8 ++-- apps/gnb/gnb.cpp | 12 ++--- include/srsran/cu_cp/cu_cp.h | 47 ++++++------------- ...{cu_up_repository.h => cu_cp_e1_handler.h} | 8 ++-- .../{du_repository.h => cu_cp_f1c_handler.h} | 8 ++-- include/srsran/cu_cp/cu_cp_factory.h | 2 +- include/srsran/cu_cp/cu_cp_ng_handler.h | 40 ++++++++++++++++ lib/cu_cp/adapters/f1ap_adapters.h | 4 +- lib/cu_cp/cu_cp_controller/cu_cp_controller.h | 2 +- lib/cu_cp/cu_cp_factory.cpp | 2 +- lib/cu_cp/cu_cp_impl.h | 8 ++-- .../cu_up_processor_repository.cpp | 4 +- .../cu_up_processor_repository.h | 4 +- .../du_processor/du_processor_repository.cpp | 4 +- .../du_processor/du_processor_repository.h | 2 +- .../metrics_handler/metrics_handler_impl.h | 2 +- .../mobility_manager_impl.cpp | 2 +- .../mobility_manager/mobility_manager_impl.h | 6 +-- .../du_high_cu/cu_du_test.cpp | 10 ++-- .../du_high_cu/du_high_cu_test_simulator.cpp | 4 +- .../du_high_cu/du_high_cu_test_simulator.h | 4 +- .../f1ap/f1c_test_local_gateway.h | 8 ++-- .../cu_cp/cu_cp_connectivity_test.cpp | 6 +-- tests/unittests/cu_cp/cu_cp_test.cpp | 44 ++++++++--------- .../cu_cp/cu_cp_test_environment.cpp | 10 ++-- .../unittests/cu_cp/cu_cp_test_environment.h | 10 ++-- tests/unittests/cu_cp/cu_cp_test_helpers.cpp | 32 ++++++------- .../inter_du_handover_routine_test.cpp | 29 +++++++----- .../unittests/cu_cp/test_doubles/dummy_du.cpp | 2 +- tests/unittests/cu_cp/test_doubles/dummy_du.h | 4 +- .../cu_cp/test_doubles/mock_cu_up.cpp | 6 +-- .../unittests/cu_cp/test_doubles/mock_cu_up.h | 4 +- .../unittests/cu_cp/test_doubles/mock_du.cpp | 4 +- tests/unittests/cu_cp/test_doubles/mock_du.h | 4 +- tests/unittests/e1ap/common/test_helpers.h | 10 ++-- .../e1ap/cu_cp/e1ap_cu_cp_test_helpers.h | 2 +- .../e1ap/cu_cp/e1ap_test_local_gateway.h | 8 ++-- .../f1ap/cu_cp/f1ap_cu_test_helpers.h | 6 +-- 41 files changed, 207 insertions(+), 175 deletions(-) rename include/srsran/cu_cp/{cu_up_repository.h => cu_cp_e1_handler.h} (89%) rename include/srsran/cu_cp/{du_repository.h => cu_cp_f1c_handler.h} (92%) create mode 100644 include/srsran/cu_cp/cu_cp_ng_handler.h diff --git a/apps/gnb/adapters/e1ap_gateway_local_connector.cpp b/apps/gnb/adapters/e1ap_gateway_local_connector.cpp index 5bd64f2e14..ccc843b54a 100644 --- a/apps/gnb/adapters/e1ap_gateway_local_connector.cpp +++ b/apps/gnb/adapters/e1ap_gateway_local_connector.cpp @@ -60,7 +60,7 @@ e1ap_gateway_local_connector::e1ap_gateway_local_connector(dlt_pcap& e1ap_pcap_w { } -void e1ap_gateway_local_connector::attach_cu_cp(srs_cu_cp::cu_up_repository& cu_cp_cu_up_mng_) +void e1ap_gateway_local_connector::attach_cu_cp(srs_cu_cp::cu_cp_e1_handler& cu_cp_cu_up_mng_) { cu_cp_cu_up_mng = &cu_cp_cu_up_mng_; } diff --git a/apps/gnb/adapters/e1ap_gateway_local_connector.h b/apps/gnb/adapters/e1ap_gateway_local_connector.h index f69ae1f5fd..55000cd2d4 100644 --- a/apps/gnb/adapters/e1ap_gateway_local_connector.h +++ b/apps/gnb/adapters/e1ap_gateway_local_connector.h @@ -10,7 +10,7 @@ #pragma once -#include "srsran/cu_cp/cu_up_repository.h" +#include "srsran/cu_cp/cu_cp_e1_handler.h" #include "srsran/e1ap/cu_up/e1ap_connection_client.h" namespace srsran { @@ -23,7 +23,7 @@ class e1ap_gateway_local_connector final : public srs_cu_up::e1ap_connection_cli public: explicit e1ap_gateway_local_connector(dlt_pcap& e1ap_pcap_writer_); - void attach_cu_cp(srs_cu_cp::cu_up_repository& cu_cp_du_mng_); + void attach_cu_cp(srs_cu_cp::cu_cp_e1_handler& cu_cp_du_mng_); // CU-UP interface. std::unique_ptr @@ -31,7 +31,7 @@ class e1ap_gateway_local_connector final : public srs_cu_up::e1ap_connection_cli private: dlt_pcap& e1ap_pcap_writer; - srs_cu_cp::cu_up_repository* cu_cp_cu_up_mng = nullptr; + srs_cu_cp::cu_cp_e1_handler* cu_cp_cu_up_mng = nullptr; }; } // namespace srsran diff --git a/apps/gnb/adapters/f1c_gateway_local_connector.cpp b/apps/gnb/adapters/f1c_gateway_local_connector.cpp index 7733763ec8..6e37366b93 100644 --- a/apps/gnb/adapters/f1c_gateway_local_connector.cpp +++ b/apps/gnb/adapters/f1c_gateway_local_connector.cpp @@ -59,7 +59,7 @@ f1c_gateway_local_connector::f1c_gateway_local_connector(dlt_pcap& f1ap_pcap_wri { } -void f1c_gateway_local_connector::attach_cu_cp(srs_cu_cp::du_repository& cu_cp_du_mng_) +void f1c_gateway_local_connector::attach_cu_cp(srs_cu_cp::cu_cp_f1c_handler& cu_cp_du_mng_) { cu_cp_du_mng = &cu_cp_du_mng_; } diff --git a/apps/gnb/adapters/f1c_gateway_local_connector.h b/apps/gnb/adapters/f1c_gateway_local_connector.h index 04441765a9..c097304775 100644 --- a/apps/gnb/adapters/f1c_gateway_local_connector.h +++ b/apps/gnb/adapters/f1c_gateway_local_connector.h @@ -10,7 +10,7 @@ #pragma once -#include "srsran/cu_cp/du_repository.h" +#include "srsran/cu_cp/cu_cp_f1c_handler.h" #include "srsran/f1ap/du/f1c_connection_client.h" namespace srsran { @@ -23,15 +23,15 @@ class f1c_gateway_local_connector final : public srs_du::f1c_connection_client public: explicit f1c_gateway_local_connector(dlt_pcap& f1ap_pcap_writer_); - void attach_cu_cp(srs_cu_cp::du_repository& cu_cp_du_mng_); + void attach_cu_cp(srs_cu_cp::cu_cp_f1c_handler& cu_cp_du_mng_); // DU interface. std::unique_ptr handle_du_connection_request(std::unique_ptr du_rx_pdu_notifier) override; private: - dlt_pcap& f1ap_pcap_writer; - srs_cu_cp::du_repository* cu_cp_du_mng = nullptr; + dlt_pcap& f1ap_pcap_writer; + srs_cu_cp::cu_cp_f1c_handler* cu_cp_du_mng = nullptr; }; } // namespace srsran diff --git a/apps/gnb/gnb.cpp b/apps/gnb/gnb.cpp index a71d3fb0ea..b7ba195c8b 100644 --- a/apps/gnb/gnb.cpp +++ b/apps/gnb/gnb.cpp @@ -440,24 +440,24 @@ int main(int argc, char** argv) cu_cp_cfg.timers = cu_timers; // create CU-CP. - std::unique_ptr cu_cp_obj = create_cu_cp(cu_cp_cfg); + std::unique_ptr cu_cp_obj = create_cu_cp(cu_cp_cfg); // Connect NGAP adpter to CU-CP to pass NGAP messages. - ngap_adapter->connect_cu_cp(cu_cp_obj->get_ng_interface().get_ngap_message_handler(), - cu_cp_obj->get_ng_interface().get_ngap_event_handler()); + ngap_adapter->connect_cu_cp(cu_cp_obj->get_ng_handler().get_ngap_message_handler(), + cu_cp_obj->get_ng_handler().get_ngap_event_handler()); // Connect E1AP to CU-CP. - e1ap_gw.attach_cu_cp(cu_cp_obj->get_cu_ups()); + e1ap_gw.attach_cu_cp(cu_cp_obj->get_e1_handler()); // Connect F1-C to CU-CP. - f1c_gw.attach_cu_cp(cu_cp_obj->get_dus()); + f1c_gw.attach_cu_cp(cu_cp_obj->get_f1c_handler()); // start CU-CP gnb_logger.info("Starting CU-CP..."); cu_cp_obj->start(); gnb_logger.info("CU-CP started successfully"); - if (not cu_cp_obj->get_ng_interface().amf_is_connected()) { + if (not cu_cp_obj->get_ng_handler().amf_is_connected()) { report_error("CU-CP failed to connect to AMF"); } diff --git a/include/srsran/cu_cp/cu_cp.h b/include/srsran/cu_cp/cu_cp.h index 95bdad7ddb..24d3c97d71 100644 --- a/include/srsran/cu_cp/cu_cp.h +++ b/include/srsran/cu_cp/cu_cp.h @@ -10,55 +10,36 @@ #pragma once -#include "cu_cp_metrics_handler.h" -#include "cu_cp_types.h" -#include "srsran/cu_cp/cu_up_repository.h" -#include "srsran/cu_cp/du_repository.h" -#include "srsran/e1ap/common/e1ap_common.h" -#include "srsran/ngap/ngap.h" +#include "srsran/cu_cp/cu_cp_e1_handler.h" +#include "srsran/cu_cp/cu_cp_f1c_handler.h" +#include "srsran/cu_cp/cu_cp_metrics_handler.h" +#include "srsran/cu_cp/cu_cp_ng_handler.h" +#include "srsran/cu_cp/cu_cp_types.h" namespace srsran { namespace srs_cu_cp { -/// \brief Component of the CU-CP responsible for handling events and messages going through the NG interface. -class cu_cp_ng_interface +/// \brief Public interface for a CU-CP instance. +class cu_cp { public: - virtual ~cu_cp_ng_interface() = default; + virtual ~cu_cp() = default; - /// \brief Get the NG message handler interface. - /// \return The NG message handler interface. - virtual ngap_message_handler& get_ngap_message_handler() = 0; + /// \brief Get handler of the F1-C interface of the CU-CP. + virtual cu_cp_f1c_handler& get_f1c_handler() = 0; - /// \brief Get the NG event handler interface. - /// \return The NG event handler interface. - virtual ngap_event_handler& get_ngap_event_handler() = 0; - - /// \brief Get the state of the AMF connection. - /// \return True if AMF is connected, false otherwise. - virtual bool amf_is_connected() = 0; -}; - -class cu_cp_interface -{ -public: - virtual ~cu_cp_interface() = default; - - /// \brief Get repository of handlers for the DUs currently connected to the CU-CP. - virtual du_repository& get_dus() = 0; - - /// \brief Get repository of handlers for the CU-UPs currently connected to the CU-CP. - virtual cu_up_repository& get_cu_ups() = 0; + /// \brief Get handler of the E1 interface of the CU-CP. + virtual cu_cp_e1_handler& get_e1_handler() = 0; /// \brief Get handler of the NG interface of the CU-CP. - virtual cu_cp_ng_interface& get_ng_interface() = 0; + virtual cu_cp_ng_handler& get_ng_handler() = 0; /// \brief Get the metrics handler interface of the CU-CP. virtual metrics_handler& get_metrics_handler() = 0; /// \brief Initiate AMF TNL connection and run NG Setup Procedure. /// - /// This function blocks until the procedure is complete. + /// This function blocks until the procedure is complete. Once completed, the CU-CP is in operational state. /// \return Returns true if the connection to the AMF and NG setup procedure were successful. False, otherwise. virtual bool start() = 0; diff --git a/include/srsran/cu_cp/cu_up_repository.h b/include/srsran/cu_cp/cu_cp_e1_handler.h similarity index 89% rename from include/srsran/cu_cp/cu_up_repository.h rename to include/srsran/cu_cp/cu_cp_e1_handler.h index 4d04374162..3fdc71c00f 100644 --- a/include/srsran/cu_cp/cu_up_repository.h +++ b/include/srsran/cu_cp/cu_cp_e1_handler.h @@ -29,11 +29,13 @@ class cu_up_handler virtual void update_ue_index(ue_index_t ue_index, ue_index_t old_ue_index) = 0; }; -/// Interface used to access and interact with the context of the CU-UPs currently connected to the CU-CP. -class cu_up_repository +/// \brief Handler of the E1 interface of the CU-CP. +/// +/// This interface is used to forward E1AP messages or CU-UP connection updates to the CU-CP. +class cu_cp_e1_handler { public: - virtual ~cu_up_repository() = default; + virtual ~cu_cp_e1_handler() = default; /// \brief Handles the start of a new CU-UP connection. /// diff --git a/include/srsran/cu_cp/du_repository.h b/include/srsran/cu_cp/cu_cp_f1c_handler.h similarity index 92% rename from include/srsran/cu_cp/du_repository.h rename to include/srsran/cu_cp/cu_cp_f1c_handler.h index ee146380d2..5b38206b57 100644 --- a/include/srsran/cu_cp/du_repository.h +++ b/include/srsran/cu_cp/cu_cp_f1c_handler.h @@ -44,11 +44,13 @@ class du_handler virtual du_processor_ue_context_notifier& get_du_processor_ue_context_notifier() = 0; }; -/// Interface used to access and interact with the context of the DUs currently connected to the CU-CP. -class du_repository +/// \brief Handler of the F1-C interface of the CU-CP. +/// +/// This interface is used to forward F1AP messages or DU connection updates to the CU-CP. +class cu_cp_f1c_handler { public: - virtual ~du_repository() = default; + virtual ~cu_cp_f1c_handler() = default; /// \brief Handles the start of a new DU connection. /// diff --git a/include/srsran/cu_cp/cu_cp_factory.h b/include/srsran/cu_cp/cu_cp_factory.h index f9b223d957..655638990e 100644 --- a/include/srsran/cu_cp/cu_cp_factory.h +++ b/include/srsran/cu_cp/cu_cp_factory.h @@ -17,6 +17,6 @@ namespace srsran { /// Creates an instance of an CU-CP. -std::unique_ptr create_cu_cp(const srs_cu_cp::cu_cp_configuration& cfg_); +std::unique_ptr create_cu_cp(const srs_cu_cp::cu_cp_configuration& cfg_); } // namespace srsran diff --git a/include/srsran/cu_cp/cu_cp_ng_handler.h b/include/srsran/cu_cp/cu_cp_ng_handler.h new file mode 100644 index 0000000000..08c4ab1694 --- /dev/null +++ b/include/srsran/cu_cp/cu_cp_ng_handler.h @@ -0,0 +1,40 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/ngap/ngap.h" + +namespace srsran { +namespace srs_cu_cp { + +/// \brief Handler of the NG interface of the CU-CP. +/// +/// This interface is used to forward NGAP messages or TNL connection updates to the CU-CP. +class cu_cp_ng_handler +{ +public: + virtual ~cu_cp_ng_handler() = default; + + /// \brief Get the NG message handler interface. + /// \return The NG message handler interface. + virtual ngap_message_handler& get_ngap_message_handler() = 0; + + /// \brief Get the NG event handler interface. + /// \return The NG event handler interface. + virtual ngap_event_handler& get_ngap_event_handler() = 0; + + /// \brief Get the state of the AMF connection. + /// \return True if AMF is connected, false otherwise. + virtual bool amf_is_connected() = 0; +}; + +} // namespace srs_cu_cp +} // namespace srsran \ No newline at end of file diff --git a/lib/cu_cp/adapters/f1ap_adapters.h b/lib/cu_cp/adapters/f1ap_adapters.h index 1cc7c6daac..7d2244ba0f 100644 --- a/lib/cu_cp/adapters/f1ap_adapters.h +++ b/lib/cu_cp/adapters/f1ap_adapters.h @@ -41,7 +41,7 @@ class f1ap_cu_cp_adapter : public f1ap_ue_removal_notifier class f1ap_du_repository_adapter : public f1ap_du_management_notifier { public: - void connect_du_repository(du_repository& du_handler_) { du_handler = &du_handler_; } + void connect_du_repository(cu_cp_f1c_handler& du_handler_) { du_handler = &du_handler_; } void on_du_remove_request_received(const du_index_t du_index) override { @@ -50,7 +50,7 @@ class f1ap_du_repository_adapter : public f1ap_du_management_notifier } private: - du_repository* du_handler = nullptr; + cu_cp_f1c_handler* du_handler = nullptr; }; /// Adapter between F1AP and DU processor diff --git a/lib/cu_cp/cu_cp_controller/cu_cp_controller.h b/lib/cu_cp/cu_cp_controller/cu_cp_controller.h index 40bdfa1f15..c36000a930 100644 --- a/lib/cu_cp/cu_cp_controller/cu_cp_controller.h +++ b/lib/cu_cp/cu_cp_controller/cu_cp_controller.h @@ -13,7 +13,7 @@ #include "amf_connection_manager.h" #include "node_connection_notifier.h" #include "srsran/cu_cp/cu_cp_configuration.h" -#include "srsran/cu_cp/cu_up_repository.h" +#include "srsran/cu_cp/cu_cp_e1_handler.h" namespace srsran { namespace srs_cu_cp { diff --git a/lib/cu_cp/cu_cp_factory.cpp b/lib/cu_cp/cu_cp_factory.cpp index 61340bccc5..ebdcb156d5 100644 --- a/lib/cu_cp/cu_cp_factory.cpp +++ b/lib/cu_cp/cu_cp_factory.cpp @@ -14,7 +14,7 @@ using namespace srsran; -std::unique_ptr srsran::create_cu_cp(const srs_cu_cp::cu_cp_configuration& cfg_) +std::unique_ptr srsran::create_cu_cp(const srs_cu_cp::cu_cp_configuration& cfg_) { return std::make_unique(cfg_); } \ No newline at end of file diff --git a/lib/cu_cp/cu_cp_impl.h b/lib/cu_cp/cu_cp_impl.h index e41f2357d9..a818b9dbf8 100644 --- a/lib/cu_cp/cu_cp_impl.h +++ b/lib/cu_cp/cu_cp_impl.h @@ -34,7 +34,7 @@ namespace srsran { namespace srs_cu_cp { -class cu_cp_impl final : public cu_cp_interface, public cu_cp_impl_interface, public cu_cp_ng_interface +class cu_cp_impl final : public cu_cp, public cu_cp_impl_interface, public cu_cp_ng_handler { public: explicit cu_cp_impl(const cu_cp_configuration& config_); @@ -76,10 +76,10 @@ class cu_cp_impl final : public cu_cp_interface, public cu_cp_impl_interface, pu metrics_handler& get_metrics_handler() override { return *metrics_hdlr; } // cu_cp interface - du_repository& get_dus() override { return du_db; } - cu_up_repository& get_cu_ups() override { return cu_up_db; } + cu_cp_f1c_handler& get_f1c_handler() override { return du_db; } + cu_cp_e1_handler& get_e1_handler() override { return cu_up_db; } cu_cp_e1ap_handler& get_cu_cp_e1ap_handler() override { return *this; } - cu_cp_ng_interface& get_ng_interface() override { return *this; } + cu_cp_ng_handler& get_ng_handler() override { return *this; } cu_cp_rrc_ue_interface& get_cu_cp_rrc_ue_interface() override { return *this; } cu_cp_measurement_handler& get_cu_cp_measurement_handler() override { return *this; } cu_cp_measurement_config_handler& get_cu_cp_measurement_config_handler() override { return *this; } diff --git a/lib/cu_cp/cu_up_processor/cu_up_processor_repository.cpp b/lib/cu_cp/cu_up_processor/cu_up_processor_repository.cpp index 601f540d68..4fd02f0053 100644 --- a/lib/cu_cp/cu_up_processor/cu_up_processor_repository.cpp +++ b/lib/cu_cp/cu_up_processor/cu_up_processor_repository.cpp @@ -22,7 +22,7 @@ namespace { class e1ap_rx_pdu_notifier final : public e1ap_message_notifier { public: - e1ap_rx_pdu_notifier(cu_up_repository& parent_, cu_up_index_t cu_up_index_) : + e1ap_rx_pdu_notifier(cu_cp_e1_handler& parent_, cu_up_index_t cu_up_index_) : parent(&parent_), cu_up_index(cu_up_index_), cached_msg_handler(parent->get_cu_up(cu_up_index).get_e1ap_message_handler()) @@ -43,7 +43,7 @@ class e1ap_rx_pdu_notifier final : public e1ap_message_notifier void on_new_message(const e1ap_message& msg) override { cached_msg_handler.handle_message(msg); } private: - cu_up_repository* parent; + cu_cp_e1_handler* parent; cu_up_index_t cu_up_index; e1ap_message_handler& cached_msg_handler; }; diff --git a/lib/cu_cp/cu_up_processor/cu_up_processor_repository.h b/lib/cu_cp/cu_up_processor/cu_up_processor_repository.h index 4bd9a41a95..2b67df12f5 100644 --- a/lib/cu_cp/cu_up_processor/cu_up_processor_repository.h +++ b/lib/cu_cp/cu_up_processor/cu_up_processor_repository.h @@ -13,8 +13,8 @@ #include "../adapters/e1ap_adapters.h" #include "../cu_cp_impl_interface.h" #include "../task_schedulers/cu_up_task_scheduler.h" +#include "srsran/cu_cp/cu_cp_e1_handler.h" #include "srsran/cu_cp/cu_cp_types.h" -#include "srsran/cu_cp/cu_up_repository.h" #include "srsran/support/async/async_task.h" #include @@ -29,7 +29,7 @@ struct cu_up_repository_config { srslog::basic_logger& logger; }; -class cu_up_processor_repository : public cu_up_repository +class cu_up_processor_repository : public cu_cp_e1_handler { public: explicit cu_up_processor_repository(cu_up_repository_config cfg_); diff --git a/lib/cu_cp/du_processor/du_processor_repository.cpp b/lib/cu_cp/du_processor/du_processor_repository.cpp index 9008bcb6e0..66f390a970 100644 --- a/lib/cu_cp/du_processor/du_processor_repository.cpp +++ b/lib/cu_cp/du_processor/du_processor_repository.cpp @@ -23,7 +23,7 @@ namespace { class f1ap_rx_pdu_notifier final : public f1ap_message_notifier { public: - f1ap_rx_pdu_notifier(du_repository& parent_, du_index_t du_index_) : + f1ap_rx_pdu_notifier(cu_cp_f1c_handler& parent_, du_index_t du_index_) : parent(&parent_), du_index(du_index_), cached_msg_handler(parent->get_du(du_index).get_f1ap_message_handler()) { } @@ -38,7 +38,7 @@ class f1ap_rx_pdu_notifier final : public f1ap_message_notifier void on_new_message(const f1ap_message& msg) override { cached_msg_handler.handle_message(msg); } private: - du_repository* parent; + cu_cp_f1c_handler* parent; du_index_t du_index; f1ap_message_handler& cached_msg_handler; }; diff --git a/lib/cu_cp/du_processor/du_processor_repository.h b/lib/cu_cp/du_processor/du_processor_repository.h index 90c6deda21..e599a09ff3 100644 --- a/lib/cu_cp/du_processor/du_processor_repository.h +++ b/lib/cu_cp/du_processor/du_processor_repository.h @@ -45,7 +45,7 @@ struct du_repository_config { srslog::basic_logger& logger; }; -class du_processor_repository : public du_repository, +class du_processor_repository : public cu_cp_f1c_handler, public du_repository_ngap_handler, public du_repository_metrics_handler { diff --git a/lib/cu_cp/metrics_handler/metrics_handler_impl.h b/lib/cu_cp/metrics_handler/metrics_handler_impl.h index 44b8917f8f..b3500cafea 100644 --- a/lib/cu_cp/metrics_handler/metrics_handler_impl.h +++ b/lib/cu_cp/metrics_handler/metrics_handler_impl.h @@ -12,8 +12,8 @@ #include "../du_processor/du_metrics_handler.h" #include "../ue_manager/ue_metrics_handler.h" +#include "srsran/cu_cp/cu_cp_f1c_handler.h" #include "srsran/cu_cp/cu_cp_metrics_handler.h" -#include "srsran/cu_cp/du_repository.h" #include "srsran/support/executors/task_executor.h" #include "srsran/support/timers.h" diff --git a/lib/cu_cp/mobility_manager/mobility_manager_impl.cpp b/lib/cu_cp/mobility_manager/mobility_manager_impl.cpp index 4c6b2c1321..3145d90c1a 100644 --- a/lib/cu_cp/mobility_manager/mobility_manager_impl.cpp +++ b/lib/cu_cp/mobility_manager/mobility_manager_impl.cpp @@ -15,7 +15,7 @@ using namespace srsran; using namespace srs_cu_cp; mobility_manager::mobility_manager(const mobility_manager_cfg& cfg_, - du_repository& du_db_, + cu_cp_f1c_handler& du_db_, du_processor_ue_manager& ue_mng_) : cfg(cfg_), du_db(du_db_), ue_mng(ue_mng_), logger(srslog::fetch_basic_logger("CU-CP")) { diff --git a/lib/cu_cp/mobility_manager/mobility_manager_impl.h b/lib/cu_cp/mobility_manager/mobility_manager_impl.h index 2ea9cd9629..b68e6e5227 100644 --- a/lib/cu_cp/mobility_manager/mobility_manager_impl.h +++ b/lib/cu_cp/mobility_manager/mobility_manager_impl.h @@ -10,8 +10,8 @@ #pragma once +#include "srsran/cu_cp/cu_cp_f1c_handler.h" #include "srsran/cu_cp/cu_cp_types.h" -#include "srsran/cu_cp/du_repository.h" #include "srsran/cu_cp/mobility_manager_config.h" #include "srsran/cu_cp/ue_manager.h" @@ -32,7 +32,7 @@ class mobility_manager_measurement_handler class mobility_manager final : public mobility_manager_measurement_handler { public: - mobility_manager(const mobility_manager_cfg& cfg, du_repository& du_db_, du_processor_ue_manager& ue_mng_); + mobility_manager(const mobility_manager_cfg& cfg, cu_cp_f1c_handler& du_db_, du_processor_ue_manager& ue_mng_); ~mobility_manager() = default; void handle_neighbor_better_than_spcell(ue_index_t ue_index, pci_t neighbor_pci) override; @@ -47,7 +47,7 @@ class mobility_manager final : public mobility_manager_measurement_handler mobility_manager_cfg cfg; - du_repository& du_db; + cu_cp_f1c_handler& du_db; du_processor_ue_manager& ue_mng; srslog::basic_logger& logger; diff --git a/tests/integrationtests/du_high_cu/cu_du_test.cpp b/tests/integrationtests/du_high_cu/cu_du_test.cpp index 59351b954c..60eb599a2e 100644 --- a/tests/integrationtests/du_high_cu/cu_du_test.cpp +++ b/tests/integrationtests/du_high_cu/cu_du_test.cpp @@ -59,14 +59,14 @@ class cu_du_test : public ::testing::Test cu_cp_obj = create_cu_cp(cu_cfg); // Create AMF response to NG Setup. - amf->attach_cu_cp_pdu_handler(cu_cp_obj->get_ng_interface().get_ngap_message_handler()); + amf->attach_cu_cp_pdu_handler(cu_cp_obj->get_ng_handler().get_ngap_message_handler()); amf->enqueue_next_tx_pdu(srs_cu_cp::generate_ng_setup_response()); // Start CU-CP. cu_cp_obj->start(); // Attach F1-C gateway to CU-CP. - f1c_gw.attach_cu_cp_du_repo(cu_cp_obj->get_dus()); + f1c_gw.attach_cu_cp_du_repo(cu_cp_obj->get_f1c_handler()); // create and start DU phy_dummy phy; @@ -93,9 +93,9 @@ class cu_du_test : public ::testing::Test srslog::basic_logger& test_logger = srslog::fetch_basic_logger("TEST"); f1c_test_local_gateway f1c_gw{}; - std::unique_ptr amf{srs_cu_cp::create_mock_amf()}; - std::unique_ptr cu_cp_obj; - std::unique_ptr du_obj; + std::unique_ptr amf{srs_cu_cp::create_mock_amf()}; + std::unique_ptr cu_cp_obj; + std::unique_ptr du_obj; }; /// Test the f1 setup procedure was successful diff --git a/tests/integrationtests/du_high_cu/du_high_cu_test_simulator.cpp b/tests/integrationtests/du_high_cu/du_high_cu_test_simulator.cpp index c69ad4338a..6d70b059a5 100644 --- a/tests/integrationtests/du_high_cu/du_high_cu_test_simulator.cpp +++ b/tests/integrationtests/du_high_cu/du_high_cu_test_simulator.cpp @@ -109,10 +109,10 @@ du_high_cu_test_simulator::du_high_cu_test_simulator(const du_high_cu_cp_test_si cu_cp_inst->start(); // Connect AMF by injecting a ng_setup_response - cu_cp_inst->get_ng_interface().get_ngap_message_handler().handle_message(srs_cu_cp::generate_ng_setup_response()); + cu_cp_inst->get_ng_handler().get_ngap_message_handler().handle_message(srs_cu_cp::generate_ng_setup_response()); // Connect F1-C to CU-CP. - f1c_gw.attach_cu_cp_du_repo(cu_cp_inst->get_dus()); + f1c_gw.attach_cu_cp_du_repo(cu_cp_inst->get_f1c_handler()); } du_high_cu_test_simulator::~du_high_cu_test_simulator() diff --git a/tests/integrationtests/du_high_cu/du_high_cu_test_simulator.h b/tests/integrationtests/du_high_cu/du_high_cu_test_simulator.h index e6530e7138..46ce69fefb 100644 --- a/tests/integrationtests/du_high_cu/du_high_cu_test_simulator.h +++ b/tests/integrationtests/du_high_cu/du_high_cu_test_simulator.h @@ -80,8 +80,8 @@ class du_high_cu_test_simulator srs_cu_cp::dummy_ngap_amf_notifier ngap_amf_notifier; f1c_test_local_gateway f1c_gw; - std::unique_ptr cu_cp_inst; - std::vector> dus; + std::unique_ptr cu_cp_inst; + std::vector> dus; }; } // namespace srsran diff --git a/tests/test_doubles/f1ap/f1c_test_local_gateway.h b/tests/test_doubles/f1ap/f1c_test_local_gateway.h index 68e6a619c6..fc9916d587 100644 --- a/tests/test_doubles/f1ap/f1c_test_local_gateway.h +++ b/tests/test_doubles/f1ap/f1c_test_local_gateway.h @@ -10,7 +10,7 @@ #pragma once -#include "srsran/cu_cp/du_repository.h" +#include "srsran/cu_cp/cu_cp_f1c_handler.h" #include "srsran/f1ap/common/f1ap_message.h" #include "srsran/f1ap/du/f1c_connection_client.h" @@ -55,9 +55,9 @@ class f1c_test_local_gateway : public srs_du::f1c_connection_client { public: f1c_test_local_gateway() = default; - explicit f1c_test_local_gateway(srs_cu_cp::du_repository& cu_cp_du_mng_) : cu_cp_du_mng(&cu_cp_du_mng_) {} + explicit f1c_test_local_gateway(srs_cu_cp::cu_cp_f1c_handler& cu_cp_du_mng_) : cu_cp_du_mng(&cu_cp_du_mng_) {} - void attach_cu_cp_du_repo(srs_cu_cp::du_repository& cu_cp_du_mng_) { cu_cp_du_mng = &cu_cp_du_mng_; } + void attach_cu_cp_du_repo(srs_cu_cp::cu_cp_f1c_handler& cu_cp_du_mng_) { cu_cp_du_mng = &cu_cp_du_mng_; } std::unique_ptr handle_du_connection_request(std::unique_ptr du_rx_pdu_notifier) override @@ -100,7 +100,7 @@ class f1c_test_local_gateway : public srs_du::f1c_connection_client std::vector last_du_rx_pdus; }; - srs_cu_cp::du_repository* cu_cp_du_mng = nullptr; + srs_cu_cp::cu_cp_f1c_handler* cu_cp_du_mng = nullptr; std::vector> connections; }; diff --git a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp index 2afbe40cb7..96c360fd0b 100644 --- a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp +++ b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp @@ -39,7 +39,7 @@ TEST_F(cu_cp_connectivity_test, when_cu_cp_is_created_then_it_is_not_connected_t ASSERT_FALSE(get_amf().try_pop_rx_pdu(ngap_pdu)) << "The CU-CP should not send a message to the NG interface before being started"; - ASSERT_FALSE(get_cu_cp().get_ng_interface().amf_is_connected()); + ASSERT_FALSE(get_cu_cp().get_ng_handler().amf_is_connected()); } TEST_F(cu_cp_connectivity_test, when_cu_cp_starts_then_it_initiates_ng_setup_procedure_and_blocks_waiting_for_response) @@ -56,7 +56,7 @@ TEST_F(cu_cp_connectivity_test, when_cu_cp_starts_then_it_initiates_ng_setup_pro ASSERT_TRUE(is_pdu_type(ngap_pdu, asn1::ngap::ngap_elem_procs_o::init_msg_c::types::ng_setup_request)) << "CU-CP did not setup the AMF connection"; - ASSERT_TRUE(get_cu_cp().get_ng_interface().amf_is_connected()); + ASSERT_TRUE(get_cu_cp().get_ng_handler().amf_is_connected()); } TEST_F(cu_cp_connectivity_test, when_ng_setup_fails_then_cu_cp_is_not_in_amf_connected_state) @@ -73,7 +73,7 @@ TEST_F(cu_cp_connectivity_test, when_ng_setup_fails_then_cu_cp_is_not_in_amf_con ASSERT_TRUE(is_pdu_type(ngap_pdu, asn1::ngap::ngap_elem_procs_o::init_msg_c::types::ng_setup_request)) << "CU-CP did not setup the AMF connection"; - ASSERT_FALSE(get_cu_cp().get_ng_interface().amf_is_connected()); + ASSERT_FALSE(get_cu_cp().get_ng_handler().amf_is_connected()); } //----------------------------------------------------------------------------------// diff --git a/tests/unittests/cu_cp/cu_cp_test.cpp b/tests/unittests/cu_cp/cu_cp_test.cpp index eb3b06fc48..bdc7ce040e 100644 --- a/tests/unittests/cu_cp/cu_cp_test.cpp +++ b/tests/unittests/cu_cp/cu_cp_test.cpp @@ -47,7 +47,7 @@ TEST_F(cu_cp_test, when_valid_paging_message_received_then_paging_is_sent_to_du) // Generate F1SetupRequest f1ap_message f1setup_msg = generate_f1_setup_request(); // Pass message to CU-CP - cu_cp_obj->get_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); + cu_cp_obj->get_f1c_handler().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); // Generate Paging ngap_message paging_msg = generate_valid_minimal_paging_message(); @@ -66,7 +66,7 @@ TEST_F(cu_cp_test, when_valid_paging_message_with_optional_values_received_then_ // Generate F1SetupRequest f1ap_message f1setup_msg = generate_f1_setup_request(); // Pass message to CU-CP - cu_cp_obj->get_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); + cu_cp_obj->get_f1c_handler().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); // Generate Paging ngap_message paging_msg = generate_valid_paging_message(); @@ -85,7 +85,7 @@ TEST_F(cu_cp_test, when_no_du_for_tac_exists_then_paging_is_not_sent_to_du) // Generate F1SetupRequest f1ap_message f1setup_msg = generate_f1_setup_request(); // Pass message to CU-CP - cu_cp_obj->get_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); + cu_cp_obj->get_f1c_handler().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); // Generate Paging with unknown tac ngap_message paging_msg = generate_valid_minimal_paging_message(); @@ -105,7 +105,7 @@ TEST_F(cu_cp_test, when_assist_data_for_paging_for_unknown_tac_is_included_then_ // Generate F1SetupRequest f1ap_message f1setup_msg = generate_f1_setup_request(); // Pass message to CU-CP - cu_cp_obj->get_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); + cu_cp_obj->get_f1c_handler().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); // Generate Paging with unknown tac but assist data for paging ngap_message paging_msg = generate_valid_paging_message(); @@ -125,7 +125,7 @@ TEST_F(cu_cp_test, when_invalid_paging_message_received_then_paging_is_not_sent_ // Generate F1SetupRequest f1ap_message f1setup_msg = generate_f1_setup_request(); // Pass message to CU-CP - cu_cp_obj->get_dus().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); + cu_cp_obj->get_f1c_handler().get_du(uint_to_du_index(0)).get_f1ap_message_handler().handle_message(f1setup_msg); // Generate Paging ngap_message paging_msg = generate_invalid_paging_message(); @@ -288,7 +288,7 @@ TEST_F(cu_cp_test, generate_valid_pdu_session_resource_setup_request_message(amf_ue_id, ran_ue_id, uint_to_pdu_session_id(1))); // Inject F1AP UE Context Release Complete - cu_cp_obj->get_dus() + cu_cp_obj->get_f1c_handler() .get_du(uint_to_du_index(0)) .get_f1ap_message_handler() .handle_message(generate_ue_context_release_complete(cu_ue_id, du_ue_id)); @@ -317,7 +317,7 @@ TEST_F(cu_cp_test, when_du_initiated_ue_context_release_received_then_ue_context test_preamble_ue_creation(du_index, du_ue_id, cu_ue_id, pci, crnti, amf_ue_id, ran_ue_id); // Inject UE Context Release Request - cu_cp_obj->get_dus() + cu_cp_obj->get_f1c_handler() .get_du(uint_to_du_index(0)) .get_f1ap_message_handler() .handle_message(generate_ue_context_release_request(cu_ue_id, du_ue_id)); @@ -350,7 +350,7 @@ TEST_F( ASSERT_EQ(cu_cp_obj->get_metrics_handler().request_metrics_report().ues.size(), 1); // Inject UE Context Release Request - cu_cp_obj->get_dus() + cu_cp_obj->get_f1c_handler() .get_du(uint_to_du_index(0)) .get_f1ap_message_handler() .handle_message(generate_ue_context_release_request(cu_ue_id, du_ue_id)); @@ -365,7 +365,7 @@ TEST_F( asn1::f1ap::f1ap_elem_procs_o::init_msg_c::types_opts::ue_context_release_cmd); // Inject UE Context Release Complete - cu_cp_obj->get_dus() + cu_cp_obj->get_f1c_handler() .get_du(uint_to_du_index(0)) .get_f1ap_message_handler() .handle_message(generate_ue_context_release_complete(cu_ue_id, du_ue_id)); @@ -406,13 +406,13 @@ TEST_F(cu_cp_test, when_reestablishment_fails_then_ue_released) // Inject Initial UL RRC message test_logger.info("Injecting Initial UL RRC message"); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); // Inject UL RRC message containing RRC Setup Complete f1ap_message ul_rrc_msg = generate_ul_rrc_message_transfer(cu_ue_id_2, du_ue_id_2, srb_id_t::srb1, generate_rrc_setup_complete()); test_logger.info("Injecting UL RRC message (RRC Setup Complete)"); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); // check that the UE Context Release Request was sent to the AMF ASSERT_EQ(ngap_amf_notifier.last_ngap_msgs.back().pdu.type(), @@ -454,13 +454,13 @@ TEST_F(cu_cp_test, when_old_ue_not_fully_attached_then_reestablishment_rejected) // Inject Initial UL RRC message test_logger.info("Injecting Initial UL RRC message (RRC Reestablishment Request)"); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); // Inject UL RRC message containing RRC Setup Complete f1ap_message ul_rrc_msg = generate_ul_rrc_message_transfer(cu_ue_id_2, du_ue_id_2, srb_id_t::srb1, generate_rrc_setup_complete()); test_logger.info("Injecting UL RRC message (RRC Setup Complete)"); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); // check that the UE Context Release Request was sent to the AMF ASSERT_EQ(ngap_amf_notifier.last_ngap_msgs.back().pdu.type(), @@ -506,13 +506,13 @@ TEST_F(cu_cp_test, when_reestablishment_successful_then_ue_attached) // Inject Initial UL RRC message test_logger.info("Injecting Initial UL RRC message (RRC Reestablishment Request)"); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); // Inject UL RRC message containing RRC Reestablishment Complete f1ap_message ul_rrc_msg = generate_ul_rrc_message_transfer(cu_ue_id_2, du_ue_id_2, srb_id_t::srb1, make_byte_buffer("00001800df0061cd")); test_logger.info("Injecting UL RRC message (RRC Reestablishment Complete)"); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); // check that the Bearer Context Modification Request Message was sent to the CU-UP ASSERT_EQ(e1ap_gw.last_tx_pdus(0).back().pdu.type(), asn1::e1ap::e1ap_pdu_c::types_opts::options::init_msg); @@ -522,7 +522,7 @@ TEST_F(cu_cp_test, when_reestablishment_successful_then_ue_attached) // Inject Bearer Context Modification Response e1ap_message bearer_context_mod_resp = generate_bearer_context_modification_response(cu_cp_ue_e1ap_id, cu_up_ue_e1ap_id); - cu_cp_obj->get_cu_ups() + cu_cp_obj->get_e1_handler() .get_cu_up(uint_to_cu_up_index(0)) .get_e1ap_message_handler() .handle_message(bearer_context_mod_resp); @@ -534,7 +534,7 @@ TEST_F(cu_cp_test, when_reestablishment_successful_then_ue_attached) // Inject UE Context Modification Response f1ap_message ue_context_mod_resp = generate_ue_context_modification_response(cu_ue_id_2, du_ue_id_2); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ue_context_mod_resp); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ue_context_mod_resp); // check that the Bearer Context Modification was sent to the CU-UP ASSERT_EQ(e1ap_gw.last_tx_pdus(0).back().pdu.type(), asn1::e1ap::e1ap_pdu_c::types_opts::options::init_msg); @@ -542,7 +542,7 @@ TEST_F(cu_cp_test, when_reestablishment_successful_then_ue_attached) asn1::e1ap::e1ap_elem_procs_o::init_msg_c::types_opts::bearer_context_mod_request); // Inject Bearer Context Modification Response - cu_cp_obj->get_cu_ups() + cu_cp_obj->get_e1_handler() .get_cu_up(uint_to_cu_up_index(0)) .get_e1ap_message_handler() .handle_message(bearer_context_mod_resp); @@ -581,7 +581,7 @@ TEST_F(cu_cp_test, when_handover_request_received_then_handover_notify_is_sent) // Inject E1AP Bearer Context Setup Response e1ap_message bearer_ctxt_setup_resp = generate_bearer_context_setup_response(int_to_gnb_cu_cp_ue_e1ap_id(0), int_to_gnb_cu_up_ue_e1ap_id(0)); - cu_cp_obj->get_cu_ups() + cu_cp_obj->get_e1_handler() .get_cu_up(uint_to_cu_up_index(0)) .get_e1ap_message_handler() .handle_message(bearer_ctxt_setup_resp); @@ -595,7 +595,7 @@ TEST_F(cu_cp_test, when_handover_request_received_then_handover_notify_is_sent) // Inject F1AP UE Context Setup Response f1ap_message ue_ctxt_setup_resp = generate_ue_context_setup_response(int_to_gnb_cu_ue_f1ap_id(0), int_to_gnb_du_ue_f1ap_id(0)); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ue_ctxt_setup_resp); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ue_ctxt_setup_resp); // Check that the Bearer Context Modification Request Message was sent to the CU-UP ASSERT_EQ(e1ap_gw.last_tx_pdus(0).back().pdu.type(), asn1::e1ap::e1ap_pdu_c::types_opts::options::init_msg); @@ -606,7 +606,7 @@ TEST_F(cu_cp_test, when_handover_request_received_then_handover_notify_is_sent) // Inject E1AP Bearer Context Modification Response e1ap_message bearer_ctxt_mod_resp = generate_bearer_context_modification_response(int_to_gnb_cu_cp_ue_e1ap_id(0), int_to_gnb_cu_up_ue_e1ap_id(0)); - cu_cp_obj->get_cu_ups() + cu_cp_obj->get_e1_handler() .get_cu_up(uint_to_cu_up_index(0)) .get_e1ap_message_handler() .handle_message(bearer_ctxt_mod_resp); @@ -622,7 +622,7 @@ TEST_F(cu_cp_test, when_handover_request_received_then_handover_notify_is_sent) // Inject RRC Reconfiguration Complete with transaction_id=0 f1ap_message rrc_recfg_complete = generate_ul_rrc_message_transfer( int_to_gnb_cu_ue_f1ap_id(0), int_to_gnb_du_ue_f1ap_id(0), srb_id_t::srb1, make_byte_buffer("800008004e17dae3")); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(rrc_recfg_complete); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(rrc_recfg_complete); // Check that the Handover Notify was sent to the AMF ASSERT_EQ(ngap_amf_notifier.last_ngap_msgs.back().pdu.type(), asn1::ngap::ngap_pdu_c::types_opts::options::init_msg); diff --git a/tests/unittests/cu_cp/cu_cp_test_environment.cpp b/tests/unittests/cu_cp/cu_cp_test_environment.cpp index 22dd6f0d92..a8facd6a34 100644 --- a/tests/unittests/cu_cp/cu_cp_test_environment.cpp +++ b/tests/unittests/cu_cp/cu_cp_test_environment.cpp @@ -67,17 +67,17 @@ cu_cp_test_environment::cu_cp_test_environment(cu_cp_test_env_params params_) : cfg.ue_config.max_nof_supported_ues = params.max_nof_dus * MAX_NOF_UES_PER_DU; // create CU-CP instance. - cu_cp = create_cu_cp(cfg); + cu_cp_inst = create_cu_cp(cfg); // Pass CU-CP PDU handler to AMF. - amf_stub->attach_cu_cp_pdu_handler(cu_cp->get_ng_interface().get_ngap_message_handler()); + amf_stub->attach_cu_cp_pdu_handler(cu_cp_inst->get_ng_handler().get_ngap_message_handler()); } cu_cp_test_environment::~cu_cp_test_environment() { dus.clear(); cu_ups.clear(); - cu_cp->stop(); + cu_cp_inst->stop(); cu_cp_workers->stop(); } @@ -158,7 +158,7 @@ void cu_cp_test_environment::run_ng_setup() optional cu_cp_test_environment::connect_new_du() { - auto du_stub = create_mock_du({get_cu_cp().get_dus()}); + auto du_stub = create_mock_du({get_cu_cp().get_f1c_handler()}); if (not du_stub) { return nullopt; } @@ -189,7 +189,7 @@ bool cu_cp_test_environment::run_f1_setup(unsigned du_idx) optional cu_cp_test_environment::connect_new_cu_up() { - auto cu_up_obj = create_mock_cu_up(get_cu_cp().get_cu_ups()); + auto cu_up_obj = create_mock_cu_up(get_cu_cp().get_e1_handler()); if (not cu_up_obj) { return nullopt; } diff --git a/tests/unittests/cu_cp/cu_cp_test_environment.h b/tests/unittests/cu_cp/cu_cp_test_environment.h index d5e3ed5d31..ef8f307c16 100644 --- a/tests/unittests/cu_cp/cu_cp_test_environment.h +++ b/tests/unittests/cu_cp/cu_cp_test_environment.h @@ -37,10 +37,10 @@ class cu_cp_test_environment srslog::basic_logger& test_logger = srslog::fetch_basic_logger("TEST"); srslog::basic_logger& cu_cp_logger = srslog::fetch_basic_logger("CU-CP"); - cu_cp_interface& get_cu_cp() { return *cu_cp; } - mock_amf& get_amf() { return *amf_stub; } - mock_du& get_du(size_t du_index) { return *dus.at(du_index); } - mock_cu_up& get_cu_up(size_t cu_up_index) { return *cu_ups.at(cu_up_index); } + cu_cp& get_cu_cp() { return *cu_cp_inst; } + mock_amf& get_amf() { return *amf_stub; } + mock_du& get_du(size_t du_index) { return *dus.at(du_index); } + mock_cu_up& get_cu_up(size_t cu_up_index) { return *cu_ups.at(cu_up_index); } /// Start CU-CP connection to AMF and run NG setup procedure to completion. void run_ng_setup(); @@ -106,7 +106,7 @@ class cu_cp_test_environment unsigned next_du_idx = 0; /// CU-CP instance. - std::unique_ptr cu_cp; + std::unique_ptr cu_cp_inst; }; } // namespace srs_cu_cp diff --git a/tests/unittests/cu_cp/cu_cp_test_helpers.cpp b/tests/unittests/cu_cp/cu_cp_test_helpers.cpp index ba811db933..031f306b73 100644 --- a/tests/unittests/cu_cp/cu_cp_test_helpers.cpp +++ b/tests/unittests/cu_cp/cu_cp_test_helpers.cpp @@ -134,10 +134,10 @@ cu_cp_test::cu_cp_test() cu_cp_obj->start(); // Attach F1-C gateway to CU-CP - f1c_gw.attach_cu_cp_du_repo(cu_cp_obj->get_dus()); + f1c_gw.attach_cu_cp_du_repo(cu_cp_obj->get_f1c_handler()); // Attach E1AP gateway to CU-CP - e1ap_gw.attach_cu_cp_cu_up_repo(cu_cp_obj->get_cu_ups()); + e1ap_gw.attach_cu_cp_cu_up_repo(cu_cp_obj->get_e1_handler()); } cu_cp_test::~cu_cp_test() @@ -155,13 +155,13 @@ void cu_cp_test::attach_ue(gnb_du_ue_f1ap_id_t du_ue_id, // Inject Initial UL RRC message f1ap_message init_ul_rrc_msg = generate_init_ul_rrc_message_transfer(du_ue_id, crnti); test_logger.info("Injecting Initial UL RRC message"); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(init_ul_rrc_msg); // Inject UL RRC message containing RRC Setup Complete f1ap_message ul_rrc_msg = generate_ul_rrc_message_transfer(cu_ue_id, du_ue_id, srb_id_t::srb1, generate_rrc_setup_complete()); test_logger.info("Injecting UL RRC message (RRC Setup Complete)"); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); } void cu_cp_test::authenticate_ue(amf_ue_id_t amf_ue_id, @@ -180,7 +180,7 @@ void cu_cp_test::authenticate_ue(amf_ue_id_t amf_ue_id, du_ue_id, srb_id_t::srb1, make_byte_buffer("00013a0abf002b96882dac46355c4f34464ddaf7b43fde37ae8000000000")); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); // Inject DL NAS Transport message (ue security mode command) dl_nas_transport = generate_downlink_nas_transport_message(amf_ue_id, ran_ue_id); @@ -193,7 +193,7 @@ void cu_cp_test::authenticate_ue(amf_ue_id_t amf_ue_id, srb_id_t::srb1, make_byte_buffer("00023a1cbf0243241cb5003f002f3b80048290a1b283800000f8b880103f0020bc800680807888787f800008192a3b4" "c080080170170700c0080a980808000000000")); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); } void cu_cp_test::setup_security(amf_ue_id_t amf_ue_id, @@ -209,7 +209,7 @@ void cu_cp_test::setup_security(amf_ue_id_t amf_ue_id, // Inject Security Mode Complete f1ap_message ul_rrc_msg_transfer = generate_ul_rrc_message_transfer(cu_ue_id, du_ue_id, srb_id_t::srb1, make_byte_buffer("00032a00fd5ec7ff")); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); } void cu_cp_test::test_amf_connection() @@ -229,7 +229,7 @@ void cu_cp_test::test_e1ap_attach() // Pass E1SetupRequest to the CU-CP e1ap_message e1setup_msg = generate_valid_cu_up_e1_setup_request(); - cu_cp_obj->get_cu_ups().get_cu_up(uint_to_cu_up_index(0)).get_e1ap_message_handler().handle_message(e1setup_msg); + cu_cp_obj->get_e1_handler().get_cu_up(uint_to_cu_up_index(0)).get_e1ap_message_handler().handle_message(e1setup_msg); } void cu_cp_test::test_du_attach(du_index_t du_index, gnb_du_id_t gnb_du_id, unsigned nrcell_id, pci_t pci) @@ -245,7 +245,7 @@ void cu_cp_test::test_du_attach(du_index_t du_index, gnb_du_id_t gnb_du_id, unsi // Pass F1SetupRequest to the CU-CP f1ap_message f1setup_msg = generate_f1_setup_request(gnb_du_id, nrcell_id, pci); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(f1setup_msg); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(f1setup_msg); } void cu_cp_test::test_preamble_all_connected(du_index_t du_index, pci_t pci) @@ -293,7 +293,7 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, // Inject Registration Complete f1ap_message ul_rrc_msg_transfer = generate_ul_rrc_message_transfer( cu_ue_id, du_ue_id, srb_id_t::srb1, make_byte_buffer("00043a053f015362c51680bf00218003fe6db7")); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); // Inject PDU Session Establishment Request ul_rrc_msg_transfer = generate_ul_rrc_message_transfer( @@ -302,7 +302,7 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, srb_id_t::srb1, make_byte_buffer("00053a253f011ffa9203013f0033808018970080e0ffffc9d8bd8013404010880080000840830000000041830000000" "00000800001800005000006000006800008800900c092838339b939b0b837002c98dcab")); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); // Inject Configuration Update Command ngap_message dl_nas_transport_msg = generate_downlink_nas_transport_message( @@ -329,7 +329,7 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, make_byte_buffer("00064c821930680ce811d1968097e340e1480005824c5c00060fc2c00637fe002e00131401a0000000880058d006007" "a071e439f0000240400e0300000000100186c0000700809df0000000000000103a0002000012cb2800281c50f000700" "0f00000004008010240a00126cc3c6")); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); // check that the Bearer Context Setup was sent to the CU-UP ASSERT_EQ(e1ap_gw.last_tx_pdus(0).back().pdu.type(), asn1::e1ap::e1ap_pdu_c::types_opts::options::init_msg); @@ -338,7 +338,7 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, // Inject Bearer Context Setup Response e1ap_message bearer_context_setup_resp = generate_bearer_context_setup_response(cu_cp_ue_e1ap_id, cu_up_ue_e1ap_id); - cu_cp_obj->get_cu_ups() + cu_cp_obj->get_e1_handler() .get_cu_up(uint_to_cu_up_index(0)) .get_e1ap_message_handler() .handle_message(bearer_context_setup_resp); @@ -350,7 +350,7 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, // Inject UE Context Modification Response f1ap_message ue_context_mod_resp = generate_ue_context_modification_response(cu_ue_id, du_ue_id); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ue_context_mod_resp); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ue_context_mod_resp); // check that the Bearer Context Modification was sent to the CU-UP ASSERT_EQ(e1ap_gw.last_tx_pdus(0).back().pdu.type(), asn1::e1ap::e1ap_pdu_c::types_opts::options::init_msg); @@ -360,7 +360,7 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, // Inject Bearer Context Modification Response e1ap_message bearer_context_mod_resp = generate_bearer_context_modification_response(cu_cp_ue_e1ap_id, cu_up_ue_e1ap_id); - cu_cp_obj->get_cu_ups() + cu_cp_obj->get_e1_handler() .get_cu_up(uint_to_cu_up_index(0)) .get_e1ap_message_handler() .handle_message(bearer_context_mod_resp); @@ -373,7 +373,7 @@ void cu_cp_test::test_preamble_ue_full_attach(du_index_t du_index, // Inject RRC Reconfiguration Complete ul_rrc_msg_transfer = generate_ul_rrc_message_transfer(cu_ue_id, du_ue_id, srb_id_t::srb1, make_byte_buffer("00070e00cc6fcda5")); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg_transfer); // check that the PDU Session Resource Setup Response was sent to the AMF ASSERT_EQ(ngap_amf_notifier.last_ngap_msgs.back().pdu.type(), diff --git a/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp b/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp index 83267f3ee2..38c039793d 100644 --- a/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp +++ b/tests/unittests/cu_cp/mobility/inter_du_handover_routine_test.cpp @@ -59,20 +59,20 @@ class inter_du_handover_routine_test : public mobility_test srb_id_t::srb1, make_byte_buffer("000800410004015f741fe0804bf183fcaa6e9699")); test_logger.info("Injecting UL RRC message (RRC Measurement Report)"); - cu_cp_obj->get_dus().get_du(source_du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); + cu_cp_obj->get_f1c_handler().get_du(source_du_index).get_f1ap_message_handler().handle_message(ul_rrc_msg); } /// \brief Start the inter-DU handover procedure. void start_procedure(const cu_cp_inter_du_handover_request& msg) { // Not needed anymore - t = cu_cp_obj->get_dus() + t = cu_cp_obj->get_f1c_handler() .get_du(source_du_index) .get_mobility_handler() .handle_inter_du_handover_request( msg, - cu_cp_obj->get_dus().get_du(target_du_index).get_f1ap_ue_context_notifier(), - cu_cp_obj->get_dus().get_du(target_du_index).get_du_processor_ue_context_notifier()); + cu_cp_obj->get_f1c_handler().get_du(target_du_index).get_f1ap_ue_context_notifier(), + cu_cp_obj->get_f1c_handler().get_du(target_du_index).get_du_processor_ue_context_notifier()); t_launcher.emplace(t); } @@ -81,7 +81,10 @@ class inter_du_handover_routine_test : public mobility_test { f1ap_message ue_context_setup_fail = generate_ue_context_setup_failure(int_to_gnb_cu_ue_f1ap_id(0), int_to_gnb_du_ue_f1ap_id(0)); - cu_cp_obj->get_dus().get_du(target_du_index).get_f1ap_message_handler().handle_message(ue_context_setup_fail); + cu_cp_obj->get_f1c_handler() + .get_du(target_du_index) + .get_f1ap_message_handler() + .handle_message(ue_context_setup_fail); } /// \brief Inject UE Context Setup Response. @@ -100,7 +103,10 @@ class inter_du_handover_routine_test : public mobility_test "38ffd294a5294f28160000219760000000000005000001456aa28023800c00041000710804e20070101084000e21009c200e040220" "8001c420138401c0c042100038840270c038200882000710804e18004000000410c04080c100e0d0000e388000000400800100c001" "0120044014c00004620090e3800c")); - cu_cp_obj->get_dus().get_du(target_du_index).get_f1ap_message_handler().handle_message(ue_context_setup_fail); + cu_cp_obj->get_f1c_handler() + .get_du(target_du_index) + .get_f1ap_message_handler() + .handle_message(ue_context_setup_fail); } /// \brief Inject Bearer Context Modification Failure. @@ -108,7 +114,7 @@ class inter_du_handover_routine_test : public mobility_test { e1ap_message bearer_context_modification_fail = generate_bearer_context_modification_failure(int_to_gnb_cu_cp_ue_e1ap_id(0), int_to_gnb_cu_up_ue_e1ap_id(0)); - cu_cp_obj->get_cu_ups() + cu_cp_obj->get_e1_handler() .get_cu_up(uint_to_cu_up_index(0)) .get_e1ap_message_handler() .handle_message(bearer_context_modification_fail); @@ -119,7 +125,7 @@ class inter_du_handover_routine_test : public mobility_test { e1ap_message bearer_context_modification_resp = generate_bearer_context_modification_response(int_to_gnb_cu_cp_ue_e1ap_id(0), int_to_gnb_cu_up_ue_e1ap_id(0)); - cu_cp_obj->get_cu_ups() + cu_cp_obj->get_e1_handler() .get_cu_up(uint_to_cu_up_index(0)) .get_e1ap_message_handler() .handle_message(bearer_context_modification_resp); @@ -130,7 +136,7 @@ class inter_du_handover_routine_test : public mobility_test { e1ap_message bearer_context_release_complete = generate_bearer_context_release_complete(int_to_gnb_cu_cp_ue_e1ap_id(0), int_to_gnb_cu_up_ue_e1ap_id(0)); - cu_cp_obj->get_cu_ups() + cu_cp_obj->get_e1_handler() .get_cu_up(uint_to_cu_up_index(0)) .get_e1ap_message_handler() .handle_message(bearer_context_release_complete); @@ -141,7 +147,7 @@ class inter_du_handover_routine_test : public mobility_test { f1ap_message rrc_recfg_complete = generate_ul_rrc_message_transfer( int_to_gnb_cu_ue_f1ap_id(0), int_to_gnb_du_ue_f1ap_id(0), srb_id_t::srb1, make_byte_buffer("8000080035c41efd")); - cu_cp_obj->get_dus().get_du(target_du_index).get_f1ap_message_handler().handle_message(rrc_recfg_complete); + cu_cp_obj->get_f1c_handler().get_du(target_du_index).get_f1ap_message_handler().handle_message(rrc_recfg_complete); } /// \brief Inject UE Context Release Complete. @@ -149,7 +155,8 @@ class inter_du_handover_routine_test : public mobility_test { f1ap_message ue_context_release_complete = generate_ue_context_release_complete(int_to_gnb_cu_ue_f1ap_id(0), int_to_gnb_du_ue_f1ap_id(0)); - cu_cp_obj->get_dus().get_du(du_index).get_f1ap_message_handler().handle_message(ue_context_release_complete); + cu_cp_obj->get_f1c_handler().get_du(du_index).get_f1ap_message_handler().handle_message( + ue_context_release_complete); } bool procedure_ready() const { return t.ready(); } diff --git a/tests/unittests/cu_cp/test_doubles/dummy_du.cpp b/tests/unittests/cu_cp/test_doubles/dummy_du.cpp index db7ff39584..d8c95e7acb 100644 --- a/tests/unittests/cu_cp/test_doubles/dummy_du.cpp +++ b/tests/unittests/cu_cp/test_doubles/dummy_du.cpp @@ -10,7 +10,7 @@ #include "dummy_du.h" #include "srsran/adt/concurrent_queue.h" -#include "srsran/cu_cp/du_repository.h" +#include "srsran/cu_cp/cu_cp_f1c_handler.h" #include "srsran/f1ap/common/f1ap_message.h" #include "srsran/support/error_handling.h" diff --git a/tests/unittests/cu_cp/test_doubles/dummy_du.h b/tests/unittests/cu_cp/test_doubles/dummy_du.h index c752fdbaaa..9be82fe1c4 100644 --- a/tests/unittests/cu_cp/test_doubles/dummy_du.h +++ b/tests/unittests/cu_cp/test_doubles/dummy_du.h @@ -18,7 +18,7 @@ struct f1ap_message; namespace srs_cu_cp { -class du_repository; +class cu_cp_f1c_handler; class du_test_stub { @@ -31,7 +31,7 @@ class du_test_stub }; struct du_stub_params { - du_repository& cu_cp_f1c_itf; + cu_cp_f1c_handler& cu_cp_f1c_itf; }; /// Creates an emulator of a DU from the perspective of the CU-CP. diff --git a/tests/unittests/cu_cp/test_doubles/mock_cu_up.cpp b/tests/unittests/cu_cp/test_doubles/mock_cu_up.cpp index 2298df0a24..928910bf79 100644 --- a/tests/unittests/cu_cp/test_doubles/mock_cu_up.cpp +++ b/tests/unittests/cu_cp/test_doubles/mock_cu_up.cpp @@ -22,7 +22,7 @@ namespace { class synchronized_mock_cu_up : public mock_cu_up { public: - synchronized_mock_cu_up(cu_up_repository& cu_cp_e1_handler_) : cu_cp_node(&cu_cp_e1_handler_) + synchronized_mock_cu_up(cu_cp_e1_handler& cu_cp_e1_handler_) : cu_cp_node(&cu_cp_e1_handler_) { tx_pdu_notifier = cu_cp_node->handle_new_cu_up_connection(std::make_unique(*this)); } @@ -76,7 +76,7 @@ class synchronized_mock_cu_up : public mock_cu_up report_fatal_error_if_not(rx_pdus.push_blocking(rx_pdu), "queue is full"); } - cu_up_repository* cu_cp_node = nullptr; + cu_cp_e1_handler* cu_cp_node = nullptr; rx_pdu_queue rx_pdus{1024}; @@ -86,7 +86,7 @@ class synchronized_mock_cu_up : public mock_cu_up } // namespace -std::unique_ptr srsran::srs_cu_cp::create_mock_cu_up(cu_up_repository& cu_cp_e1_handler) +std::unique_ptr srsran::srs_cu_cp::create_mock_cu_up(cu_cp_e1_handler& cu_cp_e1_handler) { auto ptr = std::make_unique(cu_cp_e1_handler); if (not ptr->connected()) { diff --git a/tests/unittests/cu_cp/test_doubles/mock_cu_up.h b/tests/unittests/cu_cp/test_doubles/mock_cu_up.h index 6292c6c0d0..942333f33f 100644 --- a/tests/unittests/cu_cp/test_doubles/mock_cu_up.h +++ b/tests/unittests/cu_cp/test_doubles/mock_cu_up.h @@ -11,7 +11,7 @@ #pragma once #include "srsran/adt/concurrent_queue.h" -#include "srsran/cu_cp/cu_up_repository.h" +#include "srsran/cu_cp/cu_cp_e1_handler.h" #include "srsran/e1ap/common/e1ap_message.h" namespace srsran { @@ -34,7 +34,7 @@ class mock_cu_up }; /// Create a mock of the CU-UP for CU-CP testing. -std::unique_ptr create_mock_cu_up(cu_up_repository& cu_cp_e1_handler); +std::unique_ptr create_mock_cu_up(cu_cp_e1_handler& cu_cp_e1_handler); } // namespace srs_cu_cp } // namespace srsran \ No newline at end of file diff --git a/tests/unittests/cu_cp/test_doubles/mock_du.cpp b/tests/unittests/cu_cp/test_doubles/mock_du.cpp index 3935173cda..e1ade015e6 100644 --- a/tests/unittests/cu_cp/test_doubles/mock_du.cpp +++ b/tests/unittests/cu_cp/test_doubles/mock_du.cpp @@ -10,7 +10,7 @@ #include "mock_du.h" #include "srsran/adt/concurrent_queue.h" -#include "srsran/cu_cp/du_repository.h" +#include "srsran/cu_cp/cu_cp_f1c_handler.h" #include "srsran/f1ap/common/f1ap_message.h" #include "srsran/support/error_handling.h" @@ -56,7 +56,7 @@ class synchronized_mock_du final : public mock_du report_fatal_error_if_not(rx_pdus.push_blocking(msg), "queue is full"); } - du_repository& cu_cp_f1c; + cu_cp_f1c_handler& cu_cp_f1c; std::unique_ptr tx_pdu_notifier; concurrent_queue handle_cu_up_connection_request(std::unique_ptr cu_up_rx_pdu_notifier) override @@ -102,7 +102,7 @@ class e1ap_test_local_gateway : public srs_cu_up::e1ap_connection_client std::vector last_cu_up_rx_pdus; }; - srs_cu_cp::cu_up_repository* cu_cp_cu_up_mng = nullptr; + srs_cu_cp::cu_cp_e1_handler* cu_cp_cu_up_mng = nullptr; std::vector> connections; }; diff --git a/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h b/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h index 589ad9fd9c..bc840b44e6 100644 --- a/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h +++ b/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h @@ -37,7 +37,7 @@ class dummy_cu_cp_f1c_gateway public: dummy_cu_cp_f1c_gateway() : logger(srslog::fetch_basic_logger("TEST")) {} - void attach_cu_cp_du_repo(srs_cu_cp::du_repository& cu_cp_du_mng_) + void attach_cu_cp_du_repo(srs_cu_cp::cu_cp_f1c_handler& cu_cp_du_mng_) { local_f1c_gw.attach_cu_cp_du_repo(cu_cp_du_mng_); } @@ -196,7 +196,7 @@ class dummy_f1ap_du_processor_notifier : public srs_cu_cp::f1ap_du_processor_not class dummy_f1ap_du_management_notifier : public f1ap_du_management_notifier { public: - void attach_handler(du_repository* handler_) { handler = handler_; }; + void attach_handler(cu_cp_f1c_handler* handler_) { handler = handler_; }; void on_du_remove_request_received(du_index_t idx) override { @@ -213,7 +213,7 @@ class dummy_f1ap_du_management_notifier : public f1ap_du_management_notifier private: srslog::basic_logger& logger = srslog::fetch_basic_logger("TEST"); - du_repository* handler = nullptr; + cu_cp_f1c_handler* handler = nullptr; }; class dummy_f1ap_task_scheduler : public f1ap_task_scheduler From 414a01e369eb34b3fb1b4fbc4c3c5f27aab52d42 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 12 Feb 2024 14:31:00 +0100 Subject: [PATCH 21/78] cu-cp: fix comments in cu-cp interface --- include/srsran/cu_cp/cu_cp_metrics_handler.h | 2 +- lib/cu_cp/du_processor/du_metrics_handler.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/srsran/cu_cp/cu_cp_metrics_handler.h b/include/srsran/cu_cp/cu_cp_metrics_handler.h index 8840723e25..ca52772e4d 100644 --- a/include/srsran/cu_cp/cu_cp_metrics_handler.h +++ b/include/srsran/cu_cp/cu_cp_metrics_handler.h @@ -35,7 +35,7 @@ struct metrics_report { pci_t pci; }; struct du_info { - /// ID of the DU the UE is connected to. + /// ID of the DU connected to the CU-CP. gnb_du_id_t id; std::vector cells; }; diff --git a/lib/cu_cp/du_processor/du_metrics_handler.h b/lib/cu_cp/du_processor/du_metrics_handler.h index a5cc892d1b..da45e8b597 100644 --- a/lib/cu_cp/du_processor/du_metrics_handler.h +++ b/lib/cu_cp/du_processor/du_metrics_handler.h @@ -21,7 +21,7 @@ class du_metrics_handler public: virtual ~du_metrics_handler() = default; - /// \brief Handle new request for UE metrics. + /// \brief Handle new request for metrics relative to a connected DU. virtual metrics_report::du_info handle_du_metrics_report_request() const = 0; }; @@ -31,9 +31,9 @@ class du_repository_metrics_handler public: virtual ~du_repository_metrics_handler() = default; - /// \brief Handle new request for UE metrics. + /// \brief Handle new metrics request for all the DU nodes connected to the CU-CP. virtual std::vector handle_du_metrics_report_request() const = 0; }; } // namespace srs_cu_cp -} // namespace srsran \ No newline at end of file +} // namespace srsran From efa390ebd063b9e409c1cee7a579b26a02cffe8e Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 5 Feb 2024 18:29:35 +0100 Subject: [PATCH 22/78] phy: initial PUSCH TPMI selection --- .../ran/precoding/precoding_weight_matrix.h | 15 ++ include/srsran/ran/pusch/pusch_tpmi_select.h | 69 ++++++ include/srsran/ran/srs/srs_channel_matrix.h | 228 ++++++++++++++++++ .../ran/srs/srs_channel_matrix_formatters.h | 54 +++++ include/srsran/ran/srs/srs_constants.h | 25 ++ lib/ran/CMakeLists.txt | 1 + lib/ran/pusch/pusch_tpmi_select.cpp | 71 ++++++ tests/unittests/ran/CMakeLists.txt | 4 + .../ran/pusch/pusch_tpmi_select_test.cpp | 123 ++++++++++ .../ran/pusch/pusch_tpmi_select_test_data.h | 128 ++++++++++ 10 files changed, 718 insertions(+) create mode 100644 include/srsran/ran/pusch/pusch_tpmi_select.h create mode 100644 include/srsran/ran/srs/srs_channel_matrix.h create mode 100644 include/srsran/ran/srs/srs_channel_matrix_formatters.h create mode 100644 include/srsran/ran/srs/srs_constants.h create mode 100644 lib/ran/pusch/pusch_tpmi_select.cpp create mode 100644 tests/unittests/ran/pusch/pusch_tpmi_select_test.cpp create mode 100644 tests/unittests/ran/pusch/pusch_tpmi_select_test_data.h diff --git a/include/srsran/ran/precoding/precoding_weight_matrix.h b/include/srsran/ran/precoding/precoding_weight_matrix.h index 28d507a299..6d0b06252b 100644 --- a/include/srsran/ran/precoding/precoding_weight_matrix.h +++ b/include/srsran/ran/precoding/precoding_weight_matrix.h @@ -51,6 +51,21 @@ class precoding_weight_matrix srsvec::zero(data.get_data()); } + /// \brief Constructs a weight matrix with the desired number of layers and ports. + /// + /// Creates a precoding weight matrix with the specified dimensions, and sets its contents to the provided weight + /// values. + /// + /// \param[in] weights Precoding weight list, arranged by i) layer and ii) antenna port. + /// \param[in] nof_layers Number of layers. + /// \param[in] nof_ports Number of ports. + /// \remark An assertion is triggered if the number of layers exceeds \ref precoding_constants::MAX_NOF_LAYERS. + /// \remark An assertion is triggered if the number of ports exceeds \ref precoding_constants::MAX_NOF_PORTS. + precoding_weight_matrix(const std::initializer_list& weights, unsigned nof_layers, unsigned nof_ports) : + precoding_weight_matrix(span(weights.begin(), weights.end()), nof_layers, nof_ports) + { + } + /// \brief Constructs a weight matrix with the desired number of layers and ports. /// /// Creates a precoding weight matrix with the specified dimensions, and sets its contents to the provided weight diff --git a/include/srsran/ran/pusch/pusch_tpmi_select.h b/include/srsran/ran/pusch/pusch_tpmi_select.h new file mode 100644 index 0000000000..cee595cf33 --- /dev/null +++ b/include/srsran/ran/pusch/pusch_tpmi_select.h @@ -0,0 +1,69 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/adt/interval.h" +#include "srsran/adt/optional.h" +#include "srsran/adt/static_vector.h" +#include "srsran/ran/pusch/pusch_constants.h" +#include "srsran/ran/srs/srs_channel_matrix.h" +#include "srsran/support/srsran_assert.h" + +namespace srsran { + +/// PUSCH Transmit Precoding Matrix Indication (TPMI) information. +class pusch_tpmi_select_info +{ +public: + struct tpmi_info { + /// Most suitable Transmit Precoding Matrix Indicator. + unsigned tpmi; + /// Average Signal to Interference Noise Ratio (SINR) in decibels. + float sinr_dB; + }; + + /// Gets the maximum number of layers. + unsigned get_max_nof_layers() const { return info.size(); } + + /// Determines if the information is valid. + bool is_valid() const { return !info.empty(); } + + /// \brief Get TPMI information for a number of layers. + /// + /// \remark An assertion is triggered if the number of layers is out-of-range. + const tpmi_info& get_tpmi_select(unsigned nof_layers) const + { + interval nof_layers_range(1, get_max_nof_layers()); + srsran_assert(nof_layers_range.contains(nof_layers), + "The number of layers (i.e., {}) is out-of-range {}", + nof_layers, + nof_layers_range); + + return info[nof_layers - 1]; + } + + /// Constructs a PUSCH TPMI information from an initializer list. + pusch_tpmi_select_info(const std::initializer_list& info_) : info(info_.begin(), info_.end()) {} + +private: + /// TPMI information for each number of layers. + static_vector info; +}; + +/// \brief Selects the Transmit Precoding Matrix Indicator (TPMI) for each possible number of layers supported by the +/// channel topology. +/// +/// \param[in] channel Channel coefficient matrix. +/// \param[in] noise_variance Noise variance. +/// \return The TPMI information given the channel coefficients and noise variance. +pusch_tpmi_select_info get_tpmi_select_info(const srs_channel_matrix& channel, float noise_variance); + +} // namespace srsran diff --git a/include/srsran/ran/srs/srs_channel_matrix.h b/include/srsran/ran/srs/srs_channel_matrix.h new file mode 100644 index 0000000000..cb642ff501 --- /dev/null +++ b/include/srsran/ran/srs/srs_channel_matrix.h @@ -0,0 +1,228 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/adt/complex.h" +#include "srsran/adt/tensor.h" +#include "srsran/ran/srs/srs_constants.h" +#include "srsran/srsvec/copy.h" +#include "srsran/srsvec/sc_prod.h" +#include + +namespace srsran { + +/// Sounding Reference Signals (SRS) channel matrix, consisting of complex coefficients arranged by i) receive ports and +/// ii) transmit ports. +class srs_channel_matrix +{ +public: + /// Channel matrix dimensions. + enum class dims : unsigned { rx_port = 0, tx_port, all }; + + /// Default constructor - constructs a channel matrix with no coefficients. + srs_channel_matrix() = default; + + /// \brief Constructs a channel matrix with the desired number of transmit and receive ports. + /// \param[in] nof_rx_ports Number of receive ports. + /// \param[in] nof_tx_ports Number of transmit ports. + /// \remark An assertion is triggered if the number of receive ports exceeds \ref srs_constants::max_nof_rx_ports. + /// \remark An assertion is triggered if the number of transmit ports exceeds \ref srs_constants::max_nof_tx_ports. + srs_channel_matrix(unsigned nof_rx_ports, unsigned nof_tx_ports) : data({nof_rx_ports, nof_tx_ports}) + { + srsran_assert(nof_rx_ports <= srs_constants::max_nof_rx_ports, + "The number of receive ports (i.e., {}) exceeds the maximum (i.e., {}).", + nof_rx_ports, + srs_constants::max_nof_rx_ports); + srsran_assert(nof_tx_ports <= srs_constants::max_nof_tx_ports, + "The number of transmit ports (i.e., {}) exceeds the maximum (i.e., {}).", + nof_rx_ports, + srs_constants::max_nof_rx_ports); + } + + /// \brief Constructs a channel matrix with the desired number of layers and ports. + /// + /// Creates a channel matrix with the specified dimensions, and sets its contents to the provided coefficients + /// values. + /// + /// \param[in] coefficients Channel coefficient list, arranged by i) receive port and ii) transmit port. + /// \param[in] nof_rx_ports Number of receive ports. + /// \param[in] nof_tx_ports Number of transmit ports. + /// \remark An assertion is triggered if the number of receive ports exceeds \ref srs_constants::max_nof_rx_ports. + /// \remark An assertion is triggered if the number of transmit ports exceeds \ref srs_constants::max_nof_tx_ports. + srs_channel_matrix(const std::initializer_list& coefficients, unsigned nof_rx_ports, unsigned nof_tx_ports) : + srs_channel_matrix(span(coefficients.begin(), coefficients.end()), nof_rx_ports, nof_tx_ports) + { + } + + /// \brief Constructs a channel matrix with the desired number of layers and ports. + /// + /// Creates a channel matrix with the specified dimensions, and sets its contents to the provided coefficients + /// values. + /// + /// \param[in] coefficients Channel coefficient list, arranged by i) receive port and ii) transmit port. + /// \param[in] nof_rx_ports Number of receive ports. + /// \param[in] nof_tx_ports Number of transmit ports. + /// \remark An assertion is triggered if the number of receive ports exceeds \ref srs_constants::max_nof_rx_ports. + /// \remark An assertion is triggered if the number of transmit ports exceeds \ref srs_constants::max_nof_tx_ports. + srs_channel_matrix(span coefficients, unsigned nof_rx_ports, unsigned nof_tx_ports) : + data({nof_rx_ports, nof_tx_ports}) + { + srsran_assert(coefficients.size() == nof_rx_ports * nof_tx_ports, + "The number of coefficients, i.e., {}, does not match the specified matrix dimensions, i.e., {} " + "transmit ports, {} receive ports.", + coefficients.size(), + nof_tx_ports, + nof_rx_ports); + + srsran_assert(nof_rx_ports <= srs_constants::max_nof_rx_ports, + "The number of receive ports (i.e., {}) exceeds the maximum (i.e., {}).", + nof_rx_ports, + srs_constants::max_nof_rx_ports); + srsran_assert(nof_tx_ports <= srs_constants::max_nof_tx_ports, + "The number of transmit ports (i.e., {}) exceeds the maximum (i.e., {}).", + nof_tx_ports, + srs_constants::max_nof_tx_ports); + + // Copy the weights into the tensor. + srsvec::copy(data.get_view(dims::all)>({}), coefficients); + } + + /// Copy constructor. + srs_channel_matrix(const srs_channel_matrix& other) : data({other.get_nof_rx_ports(), other.get_nof_tx_ports()}) + { + // Copy the weights into the tensor. + srsvec::copy(data.get_view(dims::all)>({}), + other.data.get_view(dims::all)>({})); + } + + /// \brief Overload assigment operator. + /// \param[in] other channel matrix to copy. + srs_channel_matrix& operator=(const srs_channel_matrix& other) + { + if (this == &other) { + return *this; + } + + // Resize the tensor. + resize(other.get_nof_rx_ports(), other.get_nof_tx_ports()); + // Copy the weights into the tensor. + srsvec::copy(data.get_view(dims::all)>({}), + other.data.get_view(dims::all)>({})); + return *this; + } + + /// \brief Overload equality comparison operator. + /// \param[in] other channel matrix to compare against. + /// \return \c true if both channel matrices are exactly the same, \c false otherwise. + bool operator==(const srs_channel_matrix& other) const + { + unsigned nof_rx_ports = get_nof_rx_ports(); + unsigned nof_tx_ports = get_nof_tx_ports(); + + if (nof_rx_ports != other.get_nof_rx_ports()) { + return false; + } + if (nof_tx_ports != other.get_nof_tx_ports()) { + return false; + } + + for (unsigned i_layer = 0; i_layer != nof_rx_ports; ++i_layer) { + for (unsigned i_port = 0; i_port != nof_tx_ports; ++i_port) { + if (get_coefficient(i_layer, i_port) != other.get_coefficient(i_layer, i_port)) { + return false; + } + } + } + + return true; + } + + /// Overload inequality comparison operator. + bool operator!=(const srs_channel_matrix& other) const { return !(*this == other); } + + /// Gets the current number of receive ports. + unsigned get_nof_rx_ports() const { return data.get_dimension_size(dims::rx_port); } + + /// Gets the current number of transmit ports. + unsigned get_nof_tx_ports() const { return data.get_dimension_size(dims::tx_port); } + + /// \brief Gets a channel coefficient from the matrix. + /// + /// \param[in] i_rx_port Receive port identifier. + /// \param[in] i_tx_port Transmit port identifier. + /// \return The channel coefficient for the given transmit and receive port. + cf_t get_coefficient(unsigned i_rx_port, unsigned i_tx_port) const + { + srsran_assert(i_rx_port < get_nof_rx_ports(), + "The receive port identifier (i.e., {}) exceeds the maximum (i.e., {}).", + i_rx_port, + get_nof_rx_ports() - 1); + srsran_assert(i_tx_port < get_nof_tx_ports(), + "The transmit port identifier (i.e., {}) exceeds the maximum (i.e., {}).", + i_tx_port, + get_nof_tx_ports() - 1); + return data[{i_rx_port, i_tx_port}]; + } + + /// \brief Sets a channel coefficient in the matrix to a specified value. + /// + /// \param[in] coefficient Channel coefficient to set. + /// \param[in] i_rx_port Receive port identifier. + /// \param[in] i_tx_port Transmit port identifier. + void set_coefficient(cf_t coefficient, unsigned i_rx_port, unsigned i_tx_port) + { + srsran_assert(i_rx_port < get_nof_rx_ports(), + "The receive port identifier (i.e., {}) exceeds the maximum (i.e., {}).", + i_rx_port, + get_nof_rx_ports() - 1); + srsran_assert(i_tx_port < get_nof_tx_ports(), + "The transmit port identifier (i.e., {}) exceeds the maximum (i.e., {}).", + i_tx_port, + get_nof_tx_ports() - 1); + data[{i_rx_port, i_tx_port}] = coefficient; + } + + /// Scales all the coefficients by a scaling factor. + srs_channel_matrix& operator*=(float scale) + { + srsvec::sc_prod(data.get_data(), scale, data.get_data()); + return *this; + } + +private: + /// \brief Resizes the number of coefficients to a desired number of layers and ports. + /// \param[in] nof_rx_ports Number of receive ports. + /// \param[in] nof_tx_ports Number of transmit ports. + /// \remark An assertion is triggered if the number of receive ports exceeds \ref srs_constants::max_nof_rx_ports. + /// \remark An assertion is triggered if the number of transmit ports exceeds \ref srs_constants::max_nof_tx_ports. + void resize(unsigned nof_rx_ports, unsigned nof_tx_ports) + { + srsran_assert(nof_rx_ports <= srs_constants::max_nof_rx_ports, + "The number of receive ports (i.e., {}) exceeds the maximum (i.e., {}).", + nof_rx_ports, + srs_constants::max_nof_rx_ports); + srsran_assert(nof_tx_ports <= srs_constants::max_nof_tx_ports, + "The number of transmit ports (i.e., {}) exceeds the maximum (i.e., {}).", + nof_tx_ports, + srs_constants::max_nof_tx_ports); + + data.resize({nof_rx_ports, nof_tx_ports}); + } + + /// Internal data storage. + static_tensor(dims::all), + cf_t, + srs_constants::max_nof_rx_ports * srs_constants::max_nof_tx_ports, + dims> + data; +}; + +} // namespace srsran diff --git a/include/srsran/ran/srs/srs_channel_matrix_formatters.h b/include/srsran/ran/srs/srs_channel_matrix_formatters.h new file mode 100644 index 0000000000..99238c9c24 --- /dev/null +++ b/include/srsran/ran/srs/srs_channel_matrix_formatters.h @@ -0,0 +1,54 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once +#include "srsran/ran/srs/srs_channel_matrix.h" +#include "srsran/support/format_utils.h" + +namespace fmt { + +/// \brief Custom formatter for \c srs_channel_matrix +template <> +struct formatter { + /// Default constructor. + formatter() = default; + + template + auto parse(ParseContext& ctx) -> decltype(ctx.begin()) + { + return ctx.begin(); + } + + template + auto format(const srsran::srs_channel_matrix& matrix, FormatContext& ctx) + -> decltype(std::declval().out()) + { + unsigned nof_rx_ports = matrix.get_nof_rx_ports(); + unsigned nof_tx_ports = matrix.get_nof_tx_ports(); + + format_to(ctx.out(), "["); + for (unsigned i_rx_port = 0; i_rx_port != nof_rx_ports; ++i_rx_port) { + if (i_rx_port != 0) { + format_to(ctx.out(), ";"); + } + for (unsigned i_tx_port = 0; i_tx_port != nof_tx_ports; ++i_tx_port) { + if (i_tx_port != 0) { + format_to(ctx.out(), ","); + } + format_to(ctx.out(), "{:+.2f}", matrix.get_coefficient(i_rx_port, i_tx_port)); + } + } + format_to(ctx.out(), "]"); + + return ctx.out(); + } +}; + +} // namespace fmt diff --git a/include/srsran/ran/srs/srs_constants.h b/include/srsran/ran/srs/srs_constants.h new file mode 100644 index 0000000000..9d781336e1 --- /dev/null +++ b/include/srsran/ran/srs/srs_constants.h @@ -0,0 +1,25 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +namespace srsran { + +namespace srs_constants { + +/// Maximum number of transmit ports that be transmitted Sounding Reference Signals (SRS). +static constexpr unsigned max_nof_tx_ports = 4; + +/// Maximum number of receive ports that can be used to receive Sounding Reference Signals (SRS). +static constexpr unsigned max_nof_rx_ports = 4; + +} // namespace srs_constants + +} // namespace srsran diff --git a/lib/ran/CMakeLists.txt b/lib/ran/CMakeLists.txt index 2b92327598..c39f90a36a 100644 --- a/lib/ran/CMakeLists.txt +++ b/lib/ran/CMakeLists.txt @@ -30,6 +30,7 @@ add_library(srsran_ran prach/prach_helper.cpp precoding/precoding_codebooks.cpp pusch/pusch_mcs.cpp + pusch/pusch_tpmi_select.cpp pusch/pusch_uci_beta_offset.cpp pusch/ulsch_info.cpp uci/uci_part2_size_calculator.cpp diff --git a/lib/ran/pusch/pusch_tpmi_select.cpp b/lib/ran/pusch/pusch_tpmi_select.cpp new file mode 100644 index 0000000000..adc75f6563 --- /dev/null +++ b/lib/ran/pusch/pusch_tpmi_select.cpp @@ -0,0 +1,71 @@ +/* + * + * Copyright 2021-2024 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 "srsran/ran/pusch/pusch_tpmi_select.h" +#include "srsran/ran/precoding/precoding_weight_matrix.h" +#include "srsran/support/math_utils.h" + +using namespace srsran; + +static constexpr cf_t sqrt1_2 = M_SQRT1_2; + +static constexpr cf_t sqrt1_2j = 1I * M_SQRT1_2; + +static std::array codebook_1layer_2port = { + {precoding_weight_matrix({sqrt1_2, 0}, 1, 2), + precoding_weight_matrix({0, sqrt1_2}, 1, 2), + precoding_weight_matrix({sqrt1_2, sqrt1_2}, 1, 2), + precoding_weight_matrix({sqrt1_2, -sqrt1_2}, 1, 2), + precoding_weight_matrix({sqrt1_2, sqrt1_2j}, 1, 2), + precoding_weight_matrix({sqrt1_2, -sqrt1_2j}, 1, 2)}}; + +static pusch_tpmi_select_info get_tpmi_select_info_1x2(const srs_channel_matrix& channel, float noise_variance) +{ + float best_sinr = -INFINITY; + unsigned best_tpmi = 0; + + // Iterate possible TPMI. + for (unsigned tpmi = 0, tpmi_end = codebook_1layer_2port.size(); tpmi != tpmi_end; ++tpmi) { + // Select precoding matrix. + const precoding_weight_matrix& w = codebook_1layer_2port[tpmi]; + cf_t w_p0 = w.get_coefficient(0, 0); + cf_t w_p1 = w.get_coefficient(0, 1); + + cf_t h_00 = channel.get_coefficient(0, 0); + cf_t h_01 = channel.get_coefficient(0, 1); + + cf_t wh = w_p0 * h_00 + w_p1 * h_01; + float whhw = wh.real() * wh.real() + wh.imag() * wh.imag(); + + // den = NoiseVar * inv((W' * H')* H * W + (NoiseVar * eye(NLayers))); %#ok + + float sinr = whhw / noise_variance; + if (sinr > best_sinr) { + best_sinr = sinr; + best_tpmi = tpmi; + } + } + + return {{best_tpmi, convert_power_to_dB(best_sinr)}}; +} + +pusch_tpmi_select_info srsran::get_tpmi_select_info(const srs_channel_matrix& channel, float noise_variance) +{ + unsigned nof_tx_ports = channel.get_nof_tx_ports(); + unsigned nof_rx_ports = channel.get_nof_rx_ports(); + + // Two transmit, one receive ports. + if ((nof_tx_ports == 2) && (nof_rx_ports == 1)) { + return get_tpmi_select_info_1x2(channel, noise_variance); + } + + // Return invalid information. + return {}; +} \ No newline at end of file diff --git a/tests/unittests/ran/CMakeLists.txt b/tests/unittests/ran/CMakeLists.txt index 326e6c9554..88ac9992a3 100644 --- a/tests/unittests/ran/CMakeLists.txt +++ b/tests/unittests/ran/CMakeLists.txt @@ -81,6 +81,10 @@ add_executable(pusch_mcs_table_test pusch/pusch_mcs_table_test.cpp) target_link_libraries(pusch_mcs_table_test srsran_ran srslog gtest gtest_main) add_test(pusch_mcs_table_test pusch_mcs_table_test) +add_executable(pusch_tpmi_select_test pusch/pusch_tpmi_select_test.cpp) +target_link_libraries(pusch_tpmi_select_test srsran_ran srslog gtest gtest_main) +add_test(pusch_tpmi_select_test pusch_tpmi_select_test) + add_executable(ulsch_info_test pusch/ulsch_info_test.cpp) target_link_libraries(ulsch_info_test srsran_ran srslog gtest gtest_main) add_test_vector(ulsch_info_test none "") diff --git a/tests/unittests/ran/pusch/pusch_tpmi_select_test.cpp b/tests/unittests/ran/pusch/pusch_tpmi_select_test.cpp new file mode 100644 index 0000000000..ba5965866d --- /dev/null +++ b/tests/unittests/ran/pusch/pusch_tpmi_select_test.cpp @@ -0,0 +1,123 @@ +/* + * + * Copyright 2021-2024 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 "pusch_tpmi_select_test_data.h" +#include "srsran/ran/pusch/pusch_tpmi_select.h" +#include "srsran/ran/srs/srs_channel_matrix_formatters.h" +#include +#include +#include + +namespace fmt { + +/// \brief Custom formatter for \c pusch_tpmi_select_info +template <> +struct formatter { + /// Default constructor. + formatter() = default; + + template + auto parse(ParseContext& ctx) -> decltype(ctx.begin()) + { + return ctx.begin(); + } + + template + auto format(const srsran::pusch_tpmi_select_info& info, FormatContext& ctx) + -> decltype(std::declval().out()) + { + unsigned max_nof_layers = info.get_max_nof_layers(); + + format_to(ctx.out(), "["); + for (unsigned nof_layers = 1; nof_layers <= max_nof_layers; ++nof_layers) { + if (nof_layers != 1) { + format_to(ctx.out(), ","); + } + + auto layer_info = info.get_tpmi_select(nof_layers); + + format_to(ctx.out(), "{{{}, {:+.1f}dB}}", layer_info.tpmi, layer_info.sinr_dB); + } + + format_to(ctx.out(), "]"); + + return ctx.out(); + } +}; + +} // namespace fmt + +namespace srsran { + +std::ostream& operator<<(std::ostream& os, const test_case_t& test_case) +{ + fmt::print(os, + "channel={}; noise_variance={}; info={};", + test_case.channel_matrix, + test_case.noise_variance, + test_case.info); + return os; +} + +std::ostream& operator<<(std::ostream& os, const pusch_tpmi_select_info& info) +{ + fmt::print(os, "{}", info); + return os; +} + +bool operator==(const pusch_tpmi_select_info& left, const pusch_tpmi_select_info& right) +{ + // Extract maximum number of layers. + unsigned max_nof_layers = left.get_max_nof_layers(); + if (max_nof_layers != right.get_max_nof_layers()) { + return false; + } + + // Iterate all number of layers. + for (unsigned nof_layers = 1; nof_layers <= max_nof_layers; ++nof_layers) { + auto layer_info_left = left.get_tpmi_select(nof_layers); + auto layer_info_right = right.get_tpmi_select(nof_layers); + + if (layer_info_left.tpmi != layer_info_right.tpmi) { + return false; + } + + if (std::abs(layer_info_left.sinr_dB - layer_info_right.sinr_dB) > 1.0F) { + return false; + } + } + + return true; +} + +} // namespace srsran + +using namespace srsran; + +class PuschTpmiSelectFixture : public ::testing::TestWithParam +{}; + +TEST_P(PuschTpmiSelectFixture, VectorTest) +{ + // Get combined parameter. + const test_case_t& test_case = GetParam(); + + if ((test_case.channel_matrix.get_nof_rx_ports() > 1) || (test_case.channel_matrix.get_nof_tx_ports() > 2)) { + GTEST_SKIP(); + } + + // Get UL-SCH information parameters. + pusch_tpmi_select_info info = get_tpmi_select_info(test_case.channel_matrix, test_case.noise_variance); + + // Compare with expected. + ASSERT_EQ(info, test_case.info); +} + +INSTANTIATE_TEST_SUITE_P(UlschInfo, PuschTpmiSelectFixture, ::testing::ValuesIn(pusch_tpmi_select_test_data)); \ No newline at end of file diff --git a/tests/unittests/ran/pusch/pusch_tpmi_select_test_data.h b/tests/unittests/ran/pusch/pusch_tpmi_select_test_data.h new file mode 100644 index 0000000000..d6422c9541 --- /dev/null +++ b/tests/unittests/ran/pusch/pusch_tpmi_select_test_data.h @@ -0,0 +1,128 @@ +/* + * + * Copyright 2021-2023 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. + * + */ + +#pragma once + +// This file was generated using the following MATLAB class on 05-02-2024 (seed 0): +// + "srsTPMISelectUnittest.m" + +#include "srsran/ran/pusch/pusch_tpmi_select.h" +#include "srsran/ran/srs/srs_channel_matrix.h" + +namespace srsran { + +struct test_case_t { + srs_channel_matrix channel_matrix; + float noise_variance; + pusch_tpmi_select_info info; +}; + +static const std::vector pusch_tpmi_select_test_data = { + // clang-format off +{srs_channel_matrix({+0.538-2.259I, +1.834+0.862I}, 1, 2), 1.9904, {{5, 6.721121},}}, +{srs_channel_matrix({-1.308+0.343I, -0.434+3.578I}, 1, 2), 0.15523, {{4, 18.860710},}}, +{srs_channel_matrix({-1.350+0.725I, +3.035-0.063I}, 1, 2), 0.96758, {{3, 10.110059},}}, +{srs_channel_matrix({-0.205+1.490I, -0.124+1.409I}, 1, 2), 0.17958, {{2, 13.746798},}}, +{srs_channel_matrix({+0.671+0.717I, -1.207+1.630I}, 1, 2), 1.683, {{5, 4.272519},}}, +{srs_channel_matrix({+1.035-0.303I, +0.727+0.294I}, 1, 2), 7.6653, {{2, -6.937425},}}, +{srs_channel_matrix({+0.888-1.069I, -1.147-0.809I}, 1, 2), 10.1264, {{4, -4.147666},}}, +{srs_channel_matrix({+1.438-0.755I, +0.325+1.370I}, 1, 2), 14.6286, {{5, -5.093284},}}, +{srs_channel_matrix({-0.102+0.319I, -0.241+0.313I}, 1, 2), 7.2845, {{2, -14.494137},}}, +{srs_channel_matrix({-0.030+0.628I, -0.165+1.093I}, 1, 2), 1.2223, {{2, 0.888649},}}, +{srs_channel_matrix({-0.864-1.214I, +0.077-1.114I}, 1, 2), 3.0245, {{2, -0.009346},}}, +{srs_channel_matrix({+1.533+0.371I, -0.770-0.226I}, 1, 2), 1.2421, {{3, 3.574097},}}, +{srs_channel_matrix({-1.089+0.553I, +0.033+1.101I}, 1, 2), 0.18049, {{4, 11.532158},}}, +{srs_channel_matrix({+0.086-0.742I, -1.492-1.062I}, 1, 2), 0.7535, {{4, 6.217135},}}, +{srs_channel_matrix({-0.616-0.192I, +0.748+0.889I}, 1, 2), 4.5595, {{3, -4.787585},}}, +{srs_channel_matrix({-1.402+0.488I, -1.422-0.177I}, 1, 2), 4.5388, {{2, -0.508140},}}, +{srs_channel_matrix({+1.419-0.804I, +0.292+0.697I, +0.198+0.835I, +1.588-0.244I}, 2, 2), 2.4579, {{5, 1.461981},{1, -1.769549},}}, +{srs_channel_matrix({-1.166+2.585I, -1.148-0.667I, +0.105+0.187I, +0.722-0.082I}, 2, 2), 19.2438, {{3, -5.359049},{0, -8.704529},}}, +{srs_channel_matrix({-0.439+0.100I, -1.795-0.545I, +0.840+0.304I, -0.888-0.600I}, 2, 2), 1.8437, {{2, 3.793230},{1, -1.381617},}}, +{srs_channel_matrix({+0.739-0.840I, +1.712+1.355I, -0.194-1.072I, -2.138+0.961I}, 2, 2), 2.6894, {{5, 5.675573},{1, -0.127439},}}, +{srs_channel_matrix({+1.437+2.908I, -1.961+0.825I, -0.198+1.379I, -1.208-1.058I}, 2, 2), 3.9818, {{5, 5.877500},{0, -1.128085},}}, +{srs_channel_matrix({-0.272-2.052I, +1.098-0.354I, -0.278-0.824I, +0.702-1.577I}, 2, 2), 0.60834, {{2, 11.062479}, {1, 4.810719},}}, +{srs_channel_matrix({+0.282+0.350I, +0.033-0.299I, -1.334+0.023I, +1.127-0.262I}, 2, 2), 11.1938, {{5, -6.496824},{0, -11.256090},}}, +{srs_channel_matrix({-0.286-0.534I, -0.831-2.003I, -0.979+0.964I, -1.156+0.520I}, 2, 2), 3.0904, {{4, 4.036525},{0, -3.047601},}}, +{srs_channel_matrix({-0.035-0.715I, -0.798+1.351I, +1.019-0.225I, -0.133-0.589I}, 2, 2), 3.9371, {{5, -0.388925},{0, -5.971891},}}, +{srs_channel_matrix({-0.848+0.308I, -1.120-1.257I, +2.526-0.865I, +1.655-0.177I}, 2, 2), 0.85554, {{3, 11.018067}, {1, 4.222248},}}, +{srs_channel_matrix({-1.332+0.391I, -2.330+0.452I, -1.449-0.130I, +0.334+0.184I}, 2, 2), 5.2824, {{2, 0.622089},{0, -3.412172},}}, +{srs_channel_matrix({+0.862-0.335I, -1.362+0.553I, +0.455+1.039I, -0.849-1.118I}, 2, 2), 0.31804, {{5, 12.881381},{1, -0.090114},}}, +{srs_channel_matrix({+0.660-0.303I, -0.068+0.023I, -0.195+0.051I, -0.218+0.826I}, 2, 2), 0.99725, {{3, -1.167051},{0, -4.904117},}}, +{srs_channel_matrix({+0.467-1.030I, -0.210+0.949I, +0.625+0.307I, +0.183+0.135I}, 2, 2), 2.0588, {{5, -0.202222},{0, -4.954878},}}, +{srs_channel_matrix({+0.261-0.532I, -0.941+1.682I, -0.162-0.876I, -0.146-0.484I}, 2, 2), 7.6775, {{5, -4.163022},{0, -7.803920},}}, +{srs_channel_matrix({-1.174-0.249I, -0.192-1.064I, -0.274+1.603I, +1.530+1.235I}, 2, 2), 3.5766, {{3, 2.421687},{0, -2.226541},}}, +{srs_channel_matrix({-1.506-0.948I, -0.445-0.741I, -0.156-0.508I, +0.276-0.321I, -0.261+0.012I, +0.443-3.029I, +0.392-0.457I, -1.251+1.242I}, 4, 2), 15.3432, {{2, -1.647274},{0, -5.581959},}}, +{srs_channel_matrix({+0.934+0.041I, +0.350-0.734I, -0.029-0.031I, +0.182+0.232I, -1.565+0.426I, -0.085-0.373I, +1.604-0.236I, +0.098+2.024I}, 4, 2), 14.2321, {{3, -3.526674},{0, -7.109971},}}, +{srs_channel_matrix({+2.229+0.472I, +0.338-1.213I, +1.000+0.066I, -1.664+0.652I, -0.590+0.327I, -0.278+1.083I, +0.423+1.006I, -1.670-0.651I}, 4, 2), 1.5568, {{5, 9.125793},{0, 3.495892},}}, +{srs_channel_matrix({-0.944+1.250I, -1.322+0.930I, +0.925+0.240I, +0.000-0.690I, -0.055-0.652I, +0.911+1.192I, +0.595-1.612I, +0.350-0.024I}, 4, 2), 7.7488, {{4, 0.762089},{1, -4.385994},}}, +{srs_channel_matrix({+1.020+0.080I, +0.862-0.948I, +0.001+0.411I, -0.071+0.677I, -2.486+0.858I, +0.581-0.691I, -2.192+0.449I, -2.319+0.101I}, 4, 2), 0.11899, {{5, 20.774681},{0, 15.551061},}}, +{srs_channel_matrix({+0.536-0.383I, +0.898+0.649I, -0.132+0.826I, -0.147-1.015I, +1.008-0.471I, -2.124+0.137I, -0.505-0.292I, -1.271+0.302I}, 4, 2), 2.0206, {{3, 5.397915},{0, 1.208681},}}, +{srs_channel_matrix({-0.930-0.021I, -0.177-0.561I, -2.132+2.178I, +1.145+1.138I, -0.629-2.497I, -1.204+0.441I, -0.254-1.398I, -1.429-0.255I}, 4, 2), 2.6132, {{5, 8.656211},{1, 2.963929},}}, +{srs_channel_matrix({+0.748+0.323I, -0.273-0.784I, +1.576-1.805I, -0.481+1.859I, +0.328-0.605I, +0.665+0.103I, +0.085+0.563I, +0.881+0.114I}, 4, 2), 7.2026, {{3, 0.300607},{0, -3.592447},}}, +{srs_channel_matrix({-0.468-0.284I, -0.125-0.087I, +1.479-1.469I, -0.861+0.192I, +0.785-0.822I, +0.309-0.094I, -0.234+0.336I, -1.057-0.905I}, 4, 2), 5.3694, {{5, 0.662797},{0, -4.016587},}}, +{srs_channel_matrix({+0.350+1.878I, -1.836+0.941I, +1.036+0.787I, +2.424-0.876I, +0.959+0.320I, -0.316-0.558I, +0.429-0.311I, -1.036-0.570I}, 4, 2), 7.9187, {{4, 2.151205},{0, -2.364794},}}, +{srs_channel_matrix({-0.909-1.483I, -0.210-1.020I, -1.699-0.447I, +0.608+0.110I, -0.118+1.129I, +0.699-0.290I, +0.270+1.262I, +0.494+0.475I}, 4, 2), 0.13833, {{4, 17.622018},{1, 11.883528},}}, +{srs_channel_matrix({+0.127-1.097I, -0.657-0.493I, -1.481-0.181I, +0.155+0.046I, +0.819-0.064I, -0.293+0.611I, -0.541+0.109I, -0.309+1.814I}, 4, 2), 1.9538, {{2, 4.388034},{1, 0.568394},}}, +{srs_channel_matrix({+1.804-1.441I, -0.723+0.402I, +0.527+1.470I, -0.260-0.327I, +0.600+0.812I, +0.594+0.546I, -2.186-1.052I, -1.327+0.397I}, 4, 2), 4.1255, {{5, 4.941982},{1, -0.039744},}}, +{srs_channel_matrix({+1.516+0.613I, -0.033-0.055I, +1.636-1.119I, -0.425-0.626I, +0.589+0.250I, -0.063-0.993I, -2.022+0.975I, -0.982-0.641I}, 4, 2), 0.3743, {{3, 14.256197}, {1, 9.925905},}}, +{srs_channel_matrix({-1.080-0.373I, +0.199+0.815I, -1.521+0.799I, -0.724+0.120I, -0.593+0.571I, +0.401+0.413I, +0.942-0.987I, +0.300+0.760I}, 4, 2), 6.2666, {{3, -0.172373},{1, -4.533946},}}, +{srs_channel_matrix({-0.604-0.238I, +0.177+0.230I, -0.308+0.440I, -0.132-0.617I, +0.595+0.275I, +1.047+0.601I, -0.198+0.092I, +0.328+1.730I}, 4, 2), 5.7712, {{3, -1.355727},{0, -5.813710},}}, +{srs_channel_matrix({-0.737-0.080I, -1.750+0.898I, +0.910+0.184I, +0.867+0.291I}, 1, 4), 2.6449, {{14, 2.380825},}}, +{srs_channel_matrix({+0.440-1.854I, +0.102-1.141I, +2.787-1.093I, -1.167-0.434I}, 1, 4), 3.4836, {{16, 4.487145},}}, +{srs_channel_matrix({-0.219+1.778I, +0.541+1.223I, +0.389-1.283I, +0.751-2.329I}, 1, 4), 1.5722, {{14, 8.488748},}}, +{srs_channel_matrix({-1.836-0.069I, +0.067-0.507I, +0.035+0.236I, +2.227+0.246I}, 1, 4), 2.8395, {{27, 2.225421},}}, +{srs_channel_matrix({-0.609-1.032I, -1.223+1.331I, +0.317-0.419I, -1.343-0.140I}, 1, 4), 1.6254, {{19, 5.103215},}}, +{srs_channel_matrix({-0.300+0.629I, +1.029-0.213I, -0.345-0.866I, +1.013-1.043I}, 1, 4), 3.7232, {{24, -2.281627},}}, +{srs_channel_matrix({-0.438+1.144I, -0.409-0.532I, +0.984+0.973I, -0.298-0.522I}, 1, 4), 0.92312, {{20, 4.977579},}}, +{srs_channel_matrix({+0.971+0.951I, -0.414-0.432I, -0.438+0.649I, +2.003-0.360I}, 1, 4), 0.79094, {{23, 8.085299},}}, +{srs_channel_matrix({+1.416+0.047I, -1.605+1.746I, +1.029+0.155I, +1.458-1.237I}, 1, 4), 6.9927, {{25, -1.039307},}}, +{srs_channel_matrix({-0.333-0.577I, +0.714+0.144I, +0.317-1.639I, +0.414-0.760I}, 1, 4), 8.6553, {{24, -4.758370},}}, +{srs_channel_matrix({+0.520-0.690I, -0.014-0.667I, -1.156+0.864I, -0.010+0.113I}, 1, 4), 0.317, {{18, 8.241568},}}, +{srs_channel_matrix({+0.884+1.171I, +0.180+0.476I, +0.551+1.412I, +0.683+0.023I}, 1, 4), 3.1919, {{12, 0.634324},}}, +{srs_channel_matrix({+1.701+0.150I, -0.510+1.405I, -0.003+1.034I, +0.920+0.292I}, 1, 4), 6.0777, {{22, -2.455675},}}, +{srs_channel_matrix({+0.567+0.213I, -1.383+0.880I, +0.244+2.039I, +0.808+0.924I}, 1, 4), 2.3549, {{13, 3.020281},}}, +{srs_channel_matrix({+0.642+1.225I, +0.425-0.044I, -1.315+0.582I, -0.416-1.007I}, 1, 4), 2.5783, {{27, 0.760560},}}, +{srs_channel_matrix({+0.600-0.940I, -1.362-0.038I, +0.348-1.896I, -0.182-2.128I}, 1, 4), 6.872, {{16, 0.213123},}}, +{srs_channel_matrix({-0.991+0.093I, -1.173-0.378I, -1.725-1.483I, +0.288-0.044I, -1.594+0.961I, +0.110+1.738I, +0.787-0.430I, -0.002-1.627I}, 2, 4), 2.4797, {{24, 5.197610},{20, 0.186947},}}, +{srs_channel_matrix({+0.376+0.318I, -0.227+0.138I, -1.149-0.711I, +2.024+0.777I, -2.360+0.622I, -0.510+0.647I, -1.322-0.426I, -0.636+1.049I}, 2, 4), 0.29465, {{27, 14.044752}, {10, 8.625050},}}, +{srs_channel_matrix({+2.509+0.555I, +1.063-0.557I, +1.157-0.895I, +0.053-0.409I, -1.288-0.161I, -0.371+0.409I, -0.758-0.953I, -0.564+0.317I}, 2, 4), 2.5256, {{14, 6.008590},{10, -0.503156},}}, +{srs_channel_matrix({+1.324-0.893I, -0.213+1.909I, -0.134+0.122I, -1.171+1.047I, -1.385-0.227I, +0.311-0.163I, -0.249+0.690I, +0.504+0.556I}, 2, 4), 9.9904, {{13, -2.271692},{11, -6.442332},}}, +{srs_channel_matrix({-1.533+0.439I, -1.098-0.090I, -1.416+1.021I, +0.060-0.874I, -0.411+0.415I, -0.368+0.348I, -1.361+0.349I, +0.780-0.729I}, 2, 4), 2.2387, {{12, 5.167847},{12, -0.439300},}}, +{srs_channel_matrix({-0.515-3.232I, -0.896-1.087I, -1.203-1.426I, +1.038-1.014I, -0.846-0.213I, -0.173-0.325I, -1.209+1.944I, -0.297-0.572I}, 2, 4), 5.2674, {{13, 4.869396},{15, -1.373769},}}, +{srs_channel_matrix({-1.569+1.460I, -0.477+2.050I, -1.338+0.121I, +0.030-0.990I, +0.853+1.198I, +0.404-0.593I, -0.701-0.470I, -1.631+0.886I}, 2, 4), 19.8562, {{21, -3.125471},{13, -7.925554},}}, +{srs_channel_matrix({-1.957+0.810I, +0.421+0.173I, +0.401-0.506I, +0.095-1.193I, +0.497+0.647I, +1.082-0.354I, +0.970+0.046I, -0.569-0.793I}, 2, 4), 8.9317, {{17, -1.874603},{12, -6.904876},}}, +{srs_channel_matrix({+0.172+0.498I, -0.062+2.789I, +1.199+0.728I, +0.802-0.773I, +1.053+0.837I, -0.749-1.128I, -0.936-1.424I, -1.269+0.717I}, 2, 4), 4.8305, {{18, 4.384766},{16, -1.026578},}}, +{srs_channel_matrix({+0.316-1.541I, +1.407-0.203I, +0.401-0.500I, +0.930+0.383I, -1.606+0.412I, +0.662+0.405I, +2.139-0.364I, +0.541-0.599I}, 2, 4), 10.6215, {{21, -2.455953},{12, -6.737523},}}, +{srs_channel_matrix({+0.854+0.161I, -1.853-0.268I, -0.207-0.410I, +0.270-0.711I, -0.653+0.061I, +0.477-1.846I, -0.071-0.398I, -0.938-0.544I}, 2, 4), 9.4968, {{22, -3.176380}, {8, -6.338377},}}, +{srs_channel_matrix({+0.653+0.541I, -0.734-1.263I, +0.541+1.110I, +0.976-0.990I, -0.157-1.829I, +0.278+1.384I, +0.640-0.063I, -0.081+0.449I}, 2, 4), 4.023, {{25, 2.764149},{21, -2.556165},}}, +{srs_channel_matrix({-1.021+1.147I, -3.073+0.598I, +0.626-1.281I, -0.287-2.203I, -0.197-0.571I, +0.406+0.214I, -1.419+0.942I, -0.729+0.094I}, 2, 4), 9.633, {{25, 1.312246},{21, -4.520607},}}, +{srs_channel_matrix({+0.306-0.462I, -1.172-0.410I, -0.961-0.504I, -0.654+1.233I, -1.229+0.610I, -0.271+0.059I, -0.900-1.467I, -0.286-1.626I}, 2, 4), 11.1156, {{22, -3.914039},{10, -7.170668},}}, +{srs_channel_matrix({+2.605-0.449I, +0.972-0.084I, +0.257-1.992I, -0.974+0.841I, -1.146-0.415I, +0.548+1.912I, +1.565-0.391I, -1.693+0.409I}, 2, 4), 8.1144, {{23, 1.459961},{10, -3.440890},}}, +{srs_channel_matrix({-0.625+1.196I, -1.169+0.120I, +0.393-1.037I, +1.302-0.857I, -0.594-0.170I, +0.436-0.192I, -0.504-0.866I, +0.102+0.181I}, 2, 4), 1.2928, {{27, 4.767162},{21, -0.505018},}}, +{srs_channel_matrix({-0.251+0.540I, -0.205-0.092I, -2.202-0.760I, -0.775-0.694I, -1.393+1.281I, -0.386-0.810I, +0.526-1.237I, +1.523+0.215I, +1.798+2.011I, -0.117+0.026I, -0.320+0.308I, +0.818-0.938I, +0.490+1.674I, +0.765+0.125I, +0.778+0.530I, -1.480-0.952I}, 4, 4), 0.91942, {{13, 12.328757}, {20, 7.065233}, {6, 4.488540}, {3, 0.803254},}}, +{srs_channel_matrix({+0.389-0.699I, -1.156+0.833I, +0.040-0.695I, -0.451-0.462I, +0.109+0.884I, -0.251+0.436I, -0.190+0.897I, -1.033+0.505I, -0.323-0.401I, +0.767-0.514I, +1.745+0.796I, -1.161-0.671I, +2.377+1.187I, +1.526+0.791I, +0.169+0.288I, -0.301+0.003I}, 4, 4), 1.9677, {{13, 5.706799},{11, 2.835869},{2, -0.185431},{0, -1.776047},}}, +{srs_channel_matrix({+3.527+1.769I, -0.112+1.511I, -1.557+0.164I, +1.915-0.283I, +0.610+1.152I, -0.648-1.147I, +2.617+0.674I, +0.551-0.669I, +0.294-0.400I, -0.778-0.672I, -1.065+0.576I, -1.768-0.778I, -0.423-1.064I, -1.053+0.553I, +0.648-0.423I, -0.318+0.362I}, 4, 4), 4.1582, {{17, 5.955043},{11, 2.239470},{2, -0.289404},{0, -2.073018},}}, +{srs_channel_matrix({+0.270-1.323I, -2.564+0.128I, +0.466-1.442I, +1.854+1.303I, +1.039+1.410I, +0.911-1.663I, -0.240+1.944I, +0.181-1.085I, +0.244+0.227I, +0.096+1.099I, -0.830+0.147I, -0.352+2.296I, -0.175+2.753I, -0.481+0.138I, +0.837-1.907I, +2.538-0.365I}, 4, 4), 7.3959, {{23, 4.624214},{19, 0.892043},{5, -2.032019},{3, -4.024456},}}, +{srs_channel_matrix({-0.765+0.067I, -1.128-0.187I, +0.078+0.292I, +2.107+0.988I, -0.716+0.393I, -0.281+0.195I, +1.166+0.280I, +1.213+0.051I, +0.486-0.774I, +1.026+0.787I, +0.871+1.409I, -0.382-0.534I, +0.429+1.928I, -0.299-0.176I, -0.900-0.244I, +0.635-0.898I}, 4, 4), 9.0082, {{26, 0.319062},{11, -3.932389}, {2, -6.367418}, {2, -8.503519},}}, +{srs_channel_matrix({-0.953-1.634I, +0.354+0.761I, +1.597+1.193I, +0.527+1.632I, +0.854-1.532I, +1.342-1.337I, -2.500-1.474I, -0.168-0.042I, +0.353-0.616I, +0.717+1.314I, -1.305-1.455I, -1.006-1.742I, +0.791+0.205I, -0.117+1.193I, +0.553-0.803I, -0.961-1.266I}, 4, 4), 4.6986, {{27, 6.537971},{10, 1.141677},{2, -1.575251},{2, -3.747263},}}, +{srs_channel_matrix({-1.636+0.491I, +0.017-0.586I, +0.828+0.745I, +0.218-0.828I, -1.909+0.575I, -0.537+0.282I, -0.302+1.139I, +1.814-0.426I, +0.915+0.636I, -0.057+0.793I, +1.309-0.898I, -1.045+0.156I, -0.348+1.597I, +1.413+0.112I, +1.502-0.309I, +0.730+0.457I}, 4, 4), 4.4293, {{13, 5.887188},{15, 0.572613},{4, -2.557978},{2, -5.054490},}}, +{srs_channel_matrix({+0.443-0.871I, -0.135-0.498I, -0.018-0.107I, +0.461-0.688I, +1.362+0.332I, +0.452+2.365I, +1.648-0.482I, -2.028+0.647I, -0.449-1.034I, +0.236+1.340I, -0.835-0.969I, -1.276+0.209I, +0.617-0.619I, +0.613+0.512I, +0.289+0.011I, +0.395-0.044I}, 4, 4), 0.56976, {{17, 12.293614}, {12, 8.270981}, {1, 4.459924}, {0, 1.953526},}}, +{srs_channel_matrix({-0.630-0.296I, -0.047-1.497I, +2.683-0.905I, -1.147-0.404I, +0.553-0.726I, -1.076-0.866I, +1.031-0.422I, +0.328-0.943I, +0.652+1.342I, -0.279-0.988I, +0.245+1.818I, +1.473-0.374I, -2.275-1.452I, -1.633-0.619I, +0.415+0.935I, -0.655+1.056I}, 4, 4), 2.6368, {{15, 7.441655}, {8, 3.113279}, {4, 0.890923},{0, -1.480045},}}, +{srs_channel_matrix({+0.287+0.385I, +0.633+0.696I, -1.459-0.113I, -0.582-0.039I, -1.830+0.088I, -0.449-0.790I, +0.949+1.423I, +0.717+0.006I, +2.288+0.686I, +0.167-0.855I, -2.156-1.075I, +1.689-0.091I, +1.282-0.253I, -0.583+1.195I, +0.223+0.606I, +0.779+0.541I}, 4, 4), 8.7451, {{19, 1.494477},{17, -2.830749}, {1, -5.088718}, {0, -6.925003},}}, +{srs_channel_matrix({-0.968+0.036I, +0.202-0.365I, -0.348+1.771I, +1.290+0.221I, +1.341+2.730I, -0.581-0.296I, +0.875+0.564I, +1.395+1.583I, +0.321+2.729I, +1.623+0.304I, +1.062-0.790I, +0.214+0.803I, +0.877-1.320I, +0.194-0.274I, -0.415+0.272I, +0.358+1.490I}, 4, 4), 0.91006, {{17, 13.281404}, {17, 8.476553}, {4, 4.225631}, {0, 1.656617},}}, +{srs_channel_matrix({-0.028-0.473I, +0.924+2.184I, -0.321+0.810I, +0.661+0.716I, +1.915-1.006I, +0.157+0.434I, -0.301+0.520I, -0.500-1.092I, +0.716-0.226I, +1.337-0.405I, +2.126+0.528I, +0.054-1.007I, +0.163+1.089I, -0.633+1.785I, +1.612-0.304I, -0.075-0.009I}, 4, 4), 1.5814, {{12, 8.147412},{13, 5.225459}, {2, 2.002600}, {2, 0.145322},}}, +{srs_channel_matrix({+1.203-0.365I, +0.522+0.117I, +0.397+0.174I, -0.483-0.216I, -0.231-0.153I, +0.613+0.034I, +1.683+0.458I, +0.568+1.282I, -1.206+0.620I, +0.433-0.287I, -0.092+0.598I, -0.244-0.246I, -0.219-1.781I, -0.880-2.347I, -0.321-1.714I, -0.784-0.237I}, 4, 4), 5.2039, {{26, 2.932870},{11, -1.400166}, {2, -4.287798}, {0, -5.979855},}}, +{srs_channel_matrix({-0.720+0.494I, +0.041+0.991I, -0.659+1.077I, -0.631+0.777I, +0.610-2.260I, +0.782-0.564I, +2.437+0.901I, +0.302+0.395I, +0.058+0.005I, -0.574+0.437I, -0.195+1.130I, -0.051+0.154I, -1.756-0.759I, -0.257-0.180I, +0.750-0.208I, -0.571+0.897I}, 4, 4), 2.0757, {{21, 7.773821}, {7, 3.413658},{5, -1.082223},{2, -2.531567},}}, +{srs_channel_matrix({+0.548-0.292I, +0.148+0.458I, -0.362+1.755I, +0.061+0.931I, +0.217+0.825I, -1.398-0.815I, +0.179-0.534I, +0.928+0.243I, -0.110-0.101I, +1.572-1.625I, +0.560-1.514I, -0.420+1.026I, -0.154-0.758I, -0.275+2.078I, +0.241-2.222I, +0.755+0.449I}, 4, 4), 3.0085, {{21, 6.119198},{11, 2.208475},{2, -0.886681},{0, -3.051977},}}, +{srs_channel_matrix({-0.756-0.364I, +0.404+0.150I, -0.794-1.945I, +0.860+1.524I, +0.067+0.546I, -1.639+2.010I, -2.425+1.417I, -0.284+0.011I, +1.146-0.939I, +0.181-1.739I, +0.054+0.017I, +0.688+0.219I, -1.393+1.046I, +1.425-0.951I, -0.894+0.795I, +0.038+0.071I}, 4, 4), 7.6688, {{16, 2.329630},{18, -1.891056}, {6, -3.833947}, {0, -5.730489},}}, + // clang-format on +}; + +} // namespace srsran From 580b1dcc5a6320203517f93a9720187116b841a2 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 12 Feb 2024 15:04:52 +0100 Subject: [PATCH 23/78] ran: review PUSCH TPMI selection related --- .../ran/precoding/precoding_weight_matrix.h | 2 +- include/srsran/ran/pusch/pusch_tpmi_select.h | 8 +- include/srsran/ran/srs/srs_channel_matrix.h | 43 ++-- include/srsran/ran/srs/srs_constants.h | 2 +- lib/ran/pusch/pusch_tpmi_select.cpp | 16 +- tests/unittests/ran/CMakeLists.txt | 2 +- .../ran/pusch/pusch_tpmi_select_test_data.h | 194 +++++++++--------- 7 files changed, 137 insertions(+), 130 deletions(-) diff --git a/include/srsran/ran/precoding/precoding_weight_matrix.h b/include/srsran/ran/precoding/precoding_weight_matrix.h index 6d0b06252b..0bbfa7ad53 100644 --- a/include/srsran/ran/precoding/precoding_weight_matrix.h +++ b/include/srsran/ran/precoding/precoding_weight_matrix.h @@ -51,7 +51,7 @@ class precoding_weight_matrix srsvec::zero(data.get_data()); } - /// \brief Constructs a weight matrix with the desired number of layers and ports. + /// \brief Constructs a precoding weight matrix with the desired number of layers and ports. /// /// Creates a precoding weight matrix with the specified dimensions, and sets its contents to the provided weight /// values. diff --git a/include/srsran/ran/pusch/pusch_tpmi_select.h b/include/srsran/ran/pusch/pusch_tpmi_select.h index cee595cf33..a87fd89572 100644 --- a/include/srsran/ran/pusch/pusch_tpmi_select.h +++ b/include/srsran/ran/pusch/pusch_tpmi_select.h @@ -26,7 +26,7 @@ class pusch_tpmi_select_info struct tpmi_info { /// Most suitable Transmit Precoding Matrix Indicator. unsigned tpmi; - /// Average Signal to Interference Noise Ratio (SINR) in decibels. + /// Average Signal-to-Interference-plus-Noise Ratio (SINR) in decibels. float sinr_dB; }; @@ -36,9 +36,9 @@ class pusch_tpmi_select_info /// Determines if the information is valid. bool is_valid() const { return !info.empty(); } - /// \brief Get TPMI information for a number of layers. + /// \brief Gets the TPMI information for a number of layers. /// - /// \remark An assertion is triggered if the number of layers is out-of-range. + /// \remark An assertion is triggered if the number of layers is out of range. const tpmi_info& get_tpmi_select(unsigned nof_layers) const { interval nof_layers_range(1, get_max_nof_layers()); @@ -62,7 +62,7 @@ class pusch_tpmi_select_info /// channel topology. /// /// \param[in] channel Channel coefficient matrix. -/// \param[in] noise_variance Noise variance. +/// \param[in] noise_variance Linear noise variance. /// \return The TPMI information given the channel coefficients and noise variance. pusch_tpmi_select_info get_tpmi_select_info(const srs_channel_matrix& channel, float noise_variance); diff --git a/include/srsran/ran/srs/srs_channel_matrix.h b/include/srsran/ran/srs/srs_channel_matrix.h index cb642ff501..be50419024 100644 --- a/include/srsran/ran/srs/srs_channel_matrix.h +++ b/include/srsran/ran/srs/srs_channel_matrix.h @@ -11,21 +11,26 @@ #pragma once #include "srsran/adt/complex.h" +#include "srsran/adt/span.h" #include "srsran/adt/tensor.h" #include "srsran/ran/srs/srs_constants.h" #include "srsran/srsvec/copy.h" #include "srsran/srsvec/sc_prod.h" +#include "srsran/support/srsran_assert.h" +#include #include namespace srsran { -/// Sounding Reference Signals (SRS) channel matrix, consisting of complex coefficients arranged by i) receive ports and -/// ii) transmit ports. +/// \brief SRS-based estimated channel matrix. +/// +/// Wideband channel matrix estimated from the Sounding Reference Signals (SRS). The complex channel coefficients are +/// arranged by i) receive ports and ii) transmit ports. class srs_channel_matrix { public: /// Channel matrix dimensions. - enum class dims : unsigned { rx_port = 0, tx_port, all }; + enum class dims : uint8_t { rx_port = 0, tx_port, all }; /// Default constructor - constructs a channel matrix with no coefficients. srs_channel_matrix() = default; @@ -47,7 +52,7 @@ class srs_channel_matrix srs_constants::max_nof_rx_ports); } - /// \brief Constructs a channel matrix with the desired number of layers and ports. + /// \brief Constructs a channel matrix with the desired number of receive and transmit ports. /// /// Creates a channel matrix with the specified dimensions, and sets its contents to the provided coefficients /// values. @@ -62,7 +67,7 @@ class srs_channel_matrix { } - /// \brief Constructs a channel matrix with the desired number of layers and ports. + /// \brief Constructs a channel matrix with the desired number of receive and transmit ports. /// /// Creates a channel matrix with the specified dimensions, and sets its contents to the provided coefficients /// values. @@ -103,8 +108,8 @@ class srs_channel_matrix other.data.get_view(dims::all)>({})); } - /// \brief Overload assigment operator. - /// \param[in] other channel matrix to copy. + /// \brief Overload assignment operator. + /// \param[in] other Channel matrix to copy. srs_channel_matrix& operator=(const srs_channel_matrix& other) { if (this == &other) { @@ -120,7 +125,7 @@ class srs_channel_matrix } /// \brief Overload equality comparison operator. - /// \param[in] other channel matrix to compare against. + /// \param[in] other Channel matrix to compare against. /// \return \c true if both channel matrices are exactly the same, \c false otherwise. bool operator==(const srs_channel_matrix& other) const { @@ -156,17 +161,17 @@ class srs_channel_matrix /// \brief Gets a channel coefficient from the matrix. /// - /// \param[in] i_rx_port Receive port identifier. - /// \param[in] i_tx_port Transmit port identifier. - /// \return The channel coefficient for the given transmit and receive port. + /// \param[in] i_rx_port Receive port index. + /// \param[in] i_tx_port Transmit port index. + /// \return The channel coefficient for the given transmit and receive ports. cf_t get_coefficient(unsigned i_rx_port, unsigned i_tx_port) const { srsran_assert(i_rx_port < get_nof_rx_ports(), - "The receive port identifier (i.e., {}) exceeds the maximum (i.e., {}).", + "The receive port index (i.e., {}) exceeds the maximum (i.e., {}).", i_rx_port, get_nof_rx_ports() - 1); srsran_assert(i_tx_port < get_nof_tx_ports(), - "The transmit port identifier (i.e., {}) exceeds the maximum (i.e., {}).", + "The transmit port index (i.e., {}) exceeds the maximum (i.e., {}).", i_tx_port, get_nof_tx_ports() - 1); return data[{i_rx_port, i_tx_port}]; @@ -175,16 +180,16 @@ class srs_channel_matrix /// \brief Sets a channel coefficient in the matrix to a specified value. /// /// \param[in] coefficient Channel coefficient to set. - /// \param[in] i_rx_port Receive port identifier. - /// \param[in] i_tx_port Transmit port identifier. + /// \param[in] i_rx_port Receive port index. + /// \param[in] i_tx_port Transmit port index. void set_coefficient(cf_t coefficient, unsigned i_rx_port, unsigned i_tx_port) { srsran_assert(i_rx_port < get_nof_rx_ports(), - "The receive port identifier (i.e., {}) exceeds the maximum (i.e., {}).", + "The receive port index (i.e., {}) exceeds the maximum (i.e., {}).", i_rx_port, get_nof_rx_ports() - 1); srsran_assert(i_tx_port < get_nof_tx_ports(), - "The transmit port identifier (i.e., {}) exceeds the maximum (i.e., {}).", + "The transmit port index (i.e., {}) exceeds the maximum (i.e., {}).", i_tx_port, get_nof_tx_ports() - 1); data[{i_rx_port, i_tx_port}] = coefficient; @@ -198,9 +203,9 @@ class srs_channel_matrix } private: - /// \brief Resizes the number of coefficients to a desired number of layers and ports. + /// \brief Resizes the number of coefficients to a desired number of receive and transmit ports. /// \param[in] nof_rx_ports Number of receive ports. - /// \param[in] nof_tx_ports Number of transmit ports. + /// \param[in] nof_tx_ports Number of transmit ports. /// \remark An assertion is triggered if the number of receive ports exceeds \ref srs_constants::max_nof_rx_ports. /// \remark An assertion is triggered if the number of transmit ports exceeds \ref srs_constants::max_nof_tx_ports. void resize(unsigned nof_rx_ports, unsigned nof_tx_ports) diff --git a/include/srsran/ran/srs/srs_constants.h b/include/srsran/ran/srs/srs_constants.h index 9d781336e1..425f77a4c5 100644 --- a/include/srsran/ran/srs/srs_constants.h +++ b/include/srsran/ran/srs/srs_constants.h @@ -14,7 +14,7 @@ namespace srsran { namespace srs_constants { -/// Maximum number of transmit ports that be transmitted Sounding Reference Signals (SRS). +/// Maximum number of transmit ports that can transmit Sounding Reference Signals (SRS). static constexpr unsigned max_nof_tx_ports = 4; /// Maximum number of receive ports that can be used to receive Sounding Reference Signals (SRS). diff --git a/lib/ran/pusch/pusch_tpmi_select.cpp b/lib/ran/pusch/pusch_tpmi_select.cpp index adc75f6563..d3853fd601 100644 --- a/lib/ran/pusch/pusch_tpmi_select.cpp +++ b/lib/ran/pusch/pusch_tpmi_select.cpp @@ -9,14 +9,18 @@ */ #include "srsran/ran/pusch/pusch_tpmi_select.h" +#include "srsran/adt/complex.h" #include "srsran/ran/precoding/precoding_weight_matrix.h" +#include "srsran/ran/srs/srs_channel_matrix.h" #include "srsran/support/math_utils.h" +#include +#include using namespace srsran; -static constexpr cf_t sqrt1_2 = M_SQRT1_2; +static constexpr cf_t sqrt1_2(M_SQRT1_2, 0); -static constexpr cf_t sqrt1_2j = 1I * M_SQRT1_2; +static constexpr cf_t sqrt1_2j(0, M_SQRT1_2); static std::array codebook_1layer_2port = { {precoding_weight_matrix({sqrt1_2, 0}, 1, 2), @@ -28,10 +32,10 @@ static std::array codebook_1layer_2port = { static pusch_tpmi_select_info get_tpmi_select_info_1x2(const srs_channel_matrix& channel, float noise_variance) { - float best_sinr = -INFINITY; + float best_sinr = -std::numeric_limits::infinity(); unsigned best_tpmi = 0; - // Iterate possible TPMI. + // Iterate possible TPMIs. for (unsigned tpmi = 0, tpmi_end = codebook_1layer_2port.size(); tpmi != tpmi_end; ++tpmi) { // Select precoding matrix. const precoding_weight_matrix& w = codebook_1layer_2port[tpmi]; @@ -42,9 +46,7 @@ static pusch_tpmi_select_info get_tpmi_select_info_1x2(const srs_channel_matrix& cf_t h_01 = channel.get_coefficient(0, 1); cf_t wh = w_p0 * h_00 + w_p1 * h_01; - float whhw = wh.real() * wh.real() + wh.imag() * wh.imag(); - - // den = NoiseVar * inv((W' * H')* H * W + (NoiseVar * eye(NLayers))); %#ok + float whhw = abs_sq(wh); float sinr = whhw / noise_variance; if (sinr > best_sinr) { diff --git a/tests/unittests/ran/CMakeLists.txt b/tests/unittests/ran/CMakeLists.txt index 88ac9992a3..fd257f41b7 100644 --- a/tests/unittests/ran/CMakeLists.txt +++ b/tests/unittests/ran/CMakeLists.txt @@ -83,7 +83,7 @@ add_test(pusch_mcs_table_test pusch_mcs_table_test) add_executable(pusch_tpmi_select_test pusch/pusch_tpmi_select_test.cpp) target_link_libraries(pusch_tpmi_select_test srsran_ran srslog gtest gtest_main) -add_test(pusch_tpmi_select_test pusch_tpmi_select_test) +add_test_vector(pusch_tpmi_select_test none "") add_executable(ulsch_info_test pusch/ulsch_info_test.cpp) target_link_libraries(ulsch_info_test srsran_ran srslog gtest gtest_main) diff --git a/tests/unittests/ran/pusch/pusch_tpmi_select_test_data.h b/tests/unittests/ran/pusch/pusch_tpmi_select_test_data.h index d6422c9541..461f21ffa8 100644 --- a/tests/unittests/ran/pusch/pusch_tpmi_select_test_data.h +++ b/tests/unittests/ran/pusch/pusch_tpmi_select_test_data.h @@ -10,7 +10,7 @@ #pragma once -// This file was generated using the following MATLAB class on 05-02-2024 (seed 0): +// This file was generated using the following MATLAB class on 12-02-2024 (seed 0): // + "srsTPMISelectUnittest.m" #include "srsran/ran/pusch/pusch_tpmi_select.h" @@ -26,102 +26,102 @@ struct test_case_t { static const std::vector pusch_tpmi_select_test_data = { // clang-format off -{srs_channel_matrix({+0.538-2.259I, +1.834+0.862I}, 1, 2), 1.9904, {{5, 6.721121},}}, -{srs_channel_matrix({-1.308+0.343I, -0.434+3.578I}, 1, 2), 0.15523, {{4, 18.860710},}}, -{srs_channel_matrix({-1.350+0.725I, +3.035-0.063I}, 1, 2), 0.96758, {{3, 10.110059},}}, -{srs_channel_matrix({-0.205+1.490I, -0.124+1.409I}, 1, 2), 0.17958, {{2, 13.746798},}}, -{srs_channel_matrix({+0.671+0.717I, -1.207+1.630I}, 1, 2), 1.683, {{5, 4.272519},}}, -{srs_channel_matrix({+1.035-0.303I, +0.727+0.294I}, 1, 2), 7.6653, {{2, -6.937425},}}, -{srs_channel_matrix({+0.888-1.069I, -1.147-0.809I}, 1, 2), 10.1264, {{4, -4.147666},}}, -{srs_channel_matrix({+1.438-0.755I, +0.325+1.370I}, 1, 2), 14.6286, {{5, -5.093284},}}, -{srs_channel_matrix({-0.102+0.319I, -0.241+0.313I}, 1, 2), 7.2845, {{2, -14.494137},}}, -{srs_channel_matrix({-0.030+0.628I, -0.165+1.093I}, 1, 2), 1.2223, {{2, 0.888649},}}, -{srs_channel_matrix({-0.864-1.214I, +0.077-1.114I}, 1, 2), 3.0245, {{2, -0.009346},}}, -{srs_channel_matrix({+1.533+0.371I, -0.770-0.226I}, 1, 2), 1.2421, {{3, 3.574097},}}, -{srs_channel_matrix({-1.089+0.553I, +0.033+1.101I}, 1, 2), 0.18049, {{4, 11.532158},}}, -{srs_channel_matrix({+0.086-0.742I, -1.492-1.062I}, 1, 2), 0.7535, {{4, 6.217135},}}, -{srs_channel_matrix({-0.616-0.192I, +0.748+0.889I}, 1, 2), 4.5595, {{3, -4.787585},}}, -{srs_channel_matrix({-1.402+0.488I, -1.422-0.177I}, 1, 2), 4.5388, {{2, -0.508140},}}, -{srs_channel_matrix({+1.419-0.804I, +0.292+0.697I, +0.198+0.835I, +1.588-0.244I}, 2, 2), 2.4579, {{5, 1.461981},{1, -1.769549},}}, -{srs_channel_matrix({-1.166+2.585I, -1.148-0.667I, +0.105+0.187I, +0.722-0.082I}, 2, 2), 19.2438, {{3, -5.359049},{0, -8.704529},}}, -{srs_channel_matrix({-0.439+0.100I, -1.795-0.545I, +0.840+0.304I, -0.888-0.600I}, 2, 2), 1.8437, {{2, 3.793230},{1, -1.381617},}}, -{srs_channel_matrix({+0.739-0.840I, +1.712+1.355I, -0.194-1.072I, -2.138+0.961I}, 2, 2), 2.6894, {{5, 5.675573},{1, -0.127439},}}, -{srs_channel_matrix({+1.437+2.908I, -1.961+0.825I, -0.198+1.379I, -1.208-1.058I}, 2, 2), 3.9818, {{5, 5.877500},{0, -1.128085},}}, -{srs_channel_matrix({-0.272-2.052I, +1.098-0.354I, -0.278-0.824I, +0.702-1.577I}, 2, 2), 0.60834, {{2, 11.062479}, {1, 4.810719},}}, -{srs_channel_matrix({+0.282+0.350I, +0.033-0.299I, -1.334+0.023I, +1.127-0.262I}, 2, 2), 11.1938, {{5, -6.496824},{0, -11.256090},}}, -{srs_channel_matrix({-0.286-0.534I, -0.831-2.003I, -0.979+0.964I, -1.156+0.520I}, 2, 2), 3.0904, {{4, 4.036525},{0, -3.047601},}}, -{srs_channel_matrix({-0.035-0.715I, -0.798+1.351I, +1.019-0.225I, -0.133-0.589I}, 2, 2), 3.9371, {{5, -0.388925},{0, -5.971891},}}, -{srs_channel_matrix({-0.848+0.308I, -1.120-1.257I, +2.526-0.865I, +1.655-0.177I}, 2, 2), 0.85554, {{3, 11.018067}, {1, 4.222248},}}, -{srs_channel_matrix({-1.332+0.391I, -2.330+0.452I, -1.449-0.130I, +0.334+0.184I}, 2, 2), 5.2824, {{2, 0.622089},{0, -3.412172},}}, -{srs_channel_matrix({+0.862-0.335I, -1.362+0.553I, +0.455+1.039I, -0.849-1.118I}, 2, 2), 0.31804, {{5, 12.881381},{1, -0.090114},}}, -{srs_channel_matrix({+0.660-0.303I, -0.068+0.023I, -0.195+0.051I, -0.218+0.826I}, 2, 2), 0.99725, {{3, -1.167051},{0, -4.904117},}}, -{srs_channel_matrix({+0.467-1.030I, -0.210+0.949I, +0.625+0.307I, +0.183+0.135I}, 2, 2), 2.0588, {{5, -0.202222},{0, -4.954878},}}, -{srs_channel_matrix({+0.261-0.532I, -0.941+1.682I, -0.162-0.876I, -0.146-0.484I}, 2, 2), 7.6775, {{5, -4.163022},{0, -7.803920},}}, -{srs_channel_matrix({-1.174-0.249I, -0.192-1.064I, -0.274+1.603I, +1.530+1.235I}, 2, 2), 3.5766, {{3, 2.421687},{0, -2.226541},}}, -{srs_channel_matrix({-1.506-0.948I, -0.445-0.741I, -0.156-0.508I, +0.276-0.321I, -0.261+0.012I, +0.443-3.029I, +0.392-0.457I, -1.251+1.242I}, 4, 2), 15.3432, {{2, -1.647274},{0, -5.581959},}}, -{srs_channel_matrix({+0.934+0.041I, +0.350-0.734I, -0.029-0.031I, +0.182+0.232I, -1.565+0.426I, -0.085-0.373I, +1.604-0.236I, +0.098+2.024I}, 4, 2), 14.2321, {{3, -3.526674},{0, -7.109971},}}, -{srs_channel_matrix({+2.229+0.472I, +0.338-1.213I, +1.000+0.066I, -1.664+0.652I, -0.590+0.327I, -0.278+1.083I, +0.423+1.006I, -1.670-0.651I}, 4, 2), 1.5568, {{5, 9.125793},{0, 3.495892},}}, -{srs_channel_matrix({-0.944+1.250I, -1.322+0.930I, +0.925+0.240I, +0.000-0.690I, -0.055-0.652I, +0.911+1.192I, +0.595-1.612I, +0.350-0.024I}, 4, 2), 7.7488, {{4, 0.762089},{1, -4.385994},}}, -{srs_channel_matrix({+1.020+0.080I, +0.862-0.948I, +0.001+0.411I, -0.071+0.677I, -2.486+0.858I, +0.581-0.691I, -2.192+0.449I, -2.319+0.101I}, 4, 2), 0.11899, {{5, 20.774681},{0, 15.551061},}}, -{srs_channel_matrix({+0.536-0.383I, +0.898+0.649I, -0.132+0.826I, -0.147-1.015I, +1.008-0.471I, -2.124+0.137I, -0.505-0.292I, -1.271+0.302I}, 4, 2), 2.0206, {{3, 5.397915},{0, 1.208681},}}, -{srs_channel_matrix({-0.930-0.021I, -0.177-0.561I, -2.132+2.178I, +1.145+1.138I, -0.629-2.497I, -1.204+0.441I, -0.254-1.398I, -1.429-0.255I}, 4, 2), 2.6132, {{5, 8.656211},{1, 2.963929},}}, -{srs_channel_matrix({+0.748+0.323I, -0.273-0.784I, +1.576-1.805I, -0.481+1.859I, +0.328-0.605I, +0.665+0.103I, +0.085+0.563I, +0.881+0.114I}, 4, 2), 7.2026, {{3, 0.300607},{0, -3.592447},}}, -{srs_channel_matrix({-0.468-0.284I, -0.125-0.087I, +1.479-1.469I, -0.861+0.192I, +0.785-0.822I, +0.309-0.094I, -0.234+0.336I, -1.057-0.905I}, 4, 2), 5.3694, {{5, 0.662797},{0, -4.016587},}}, -{srs_channel_matrix({+0.350+1.878I, -1.836+0.941I, +1.036+0.787I, +2.424-0.876I, +0.959+0.320I, -0.316-0.558I, +0.429-0.311I, -1.036-0.570I}, 4, 2), 7.9187, {{4, 2.151205},{0, -2.364794},}}, -{srs_channel_matrix({-0.909-1.483I, -0.210-1.020I, -1.699-0.447I, +0.608+0.110I, -0.118+1.129I, +0.699-0.290I, +0.270+1.262I, +0.494+0.475I}, 4, 2), 0.13833, {{4, 17.622018},{1, 11.883528},}}, -{srs_channel_matrix({+0.127-1.097I, -0.657-0.493I, -1.481-0.181I, +0.155+0.046I, +0.819-0.064I, -0.293+0.611I, -0.541+0.109I, -0.309+1.814I}, 4, 2), 1.9538, {{2, 4.388034},{1, 0.568394},}}, -{srs_channel_matrix({+1.804-1.441I, -0.723+0.402I, +0.527+1.470I, -0.260-0.327I, +0.600+0.812I, +0.594+0.546I, -2.186-1.052I, -1.327+0.397I}, 4, 2), 4.1255, {{5, 4.941982},{1, -0.039744},}}, -{srs_channel_matrix({+1.516+0.613I, -0.033-0.055I, +1.636-1.119I, -0.425-0.626I, +0.589+0.250I, -0.063-0.993I, -2.022+0.975I, -0.982-0.641I}, 4, 2), 0.3743, {{3, 14.256197}, {1, 9.925905},}}, -{srs_channel_matrix({-1.080-0.373I, +0.199+0.815I, -1.521+0.799I, -0.724+0.120I, -0.593+0.571I, +0.401+0.413I, +0.942-0.987I, +0.300+0.760I}, 4, 2), 6.2666, {{3, -0.172373},{1, -4.533946},}}, -{srs_channel_matrix({-0.604-0.238I, +0.177+0.230I, -0.308+0.440I, -0.132-0.617I, +0.595+0.275I, +1.047+0.601I, -0.198+0.092I, +0.328+1.730I}, 4, 2), 5.7712, {{3, -1.355727},{0, -5.813710},}}, -{srs_channel_matrix({-0.737-0.080I, -1.750+0.898I, +0.910+0.184I, +0.867+0.291I}, 1, 4), 2.6449, {{14, 2.380825},}}, -{srs_channel_matrix({+0.440-1.854I, +0.102-1.141I, +2.787-1.093I, -1.167-0.434I}, 1, 4), 3.4836, {{16, 4.487145},}}, -{srs_channel_matrix({-0.219+1.778I, +0.541+1.223I, +0.389-1.283I, +0.751-2.329I}, 1, 4), 1.5722, {{14, 8.488748},}}, -{srs_channel_matrix({-1.836-0.069I, +0.067-0.507I, +0.035+0.236I, +2.227+0.246I}, 1, 4), 2.8395, {{27, 2.225421},}}, -{srs_channel_matrix({-0.609-1.032I, -1.223+1.331I, +0.317-0.419I, -1.343-0.140I}, 1, 4), 1.6254, {{19, 5.103215},}}, -{srs_channel_matrix({-0.300+0.629I, +1.029-0.213I, -0.345-0.866I, +1.013-1.043I}, 1, 4), 3.7232, {{24, -2.281627},}}, -{srs_channel_matrix({-0.438+1.144I, -0.409-0.532I, +0.984+0.973I, -0.298-0.522I}, 1, 4), 0.92312, {{20, 4.977579},}}, -{srs_channel_matrix({+0.971+0.951I, -0.414-0.432I, -0.438+0.649I, +2.003-0.360I}, 1, 4), 0.79094, {{23, 8.085299},}}, -{srs_channel_matrix({+1.416+0.047I, -1.605+1.746I, +1.029+0.155I, +1.458-1.237I}, 1, 4), 6.9927, {{25, -1.039307},}}, -{srs_channel_matrix({-0.333-0.577I, +0.714+0.144I, +0.317-1.639I, +0.414-0.760I}, 1, 4), 8.6553, {{24, -4.758370},}}, -{srs_channel_matrix({+0.520-0.690I, -0.014-0.667I, -1.156+0.864I, -0.010+0.113I}, 1, 4), 0.317, {{18, 8.241568},}}, -{srs_channel_matrix({+0.884+1.171I, +0.180+0.476I, +0.551+1.412I, +0.683+0.023I}, 1, 4), 3.1919, {{12, 0.634324},}}, -{srs_channel_matrix({+1.701+0.150I, -0.510+1.405I, -0.003+1.034I, +0.920+0.292I}, 1, 4), 6.0777, {{22, -2.455675},}}, -{srs_channel_matrix({+0.567+0.213I, -1.383+0.880I, +0.244+2.039I, +0.808+0.924I}, 1, 4), 2.3549, {{13, 3.020281},}}, -{srs_channel_matrix({+0.642+1.225I, +0.425-0.044I, -1.315+0.582I, -0.416-1.007I}, 1, 4), 2.5783, {{27, 0.760560},}}, -{srs_channel_matrix({+0.600-0.940I, -1.362-0.038I, +0.348-1.896I, -0.182-2.128I}, 1, 4), 6.872, {{16, 0.213123},}}, -{srs_channel_matrix({-0.991+0.093I, -1.173-0.378I, -1.725-1.483I, +0.288-0.044I, -1.594+0.961I, +0.110+1.738I, +0.787-0.430I, -0.002-1.627I}, 2, 4), 2.4797, {{24, 5.197610},{20, 0.186947},}}, -{srs_channel_matrix({+0.376+0.318I, -0.227+0.138I, -1.149-0.711I, +2.024+0.777I, -2.360+0.622I, -0.510+0.647I, -1.322-0.426I, -0.636+1.049I}, 2, 4), 0.29465, {{27, 14.044752}, {10, 8.625050},}}, -{srs_channel_matrix({+2.509+0.555I, +1.063-0.557I, +1.157-0.895I, +0.053-0.409I, -1.288-0.161I, -0.371+0.409I, -0.758-0.953I, -0.564+0.317I}, 2, 4), 2.5256, {{14, 6.008590},{10, -0.503156},}}, -{srs_channel_matrix({+1.324-0.893I, -0.213+1.909I, -0.134+0.122I, -1.171+1.047I, -1.385-0.227I, +0.311-0.163I, -0.249+0.690I, +0.504+0.556I}, 2, 4), 9.9904, {{13, -2.271692},{11, -6.442332},}}, -{srs_channel_matrix({-1.533+0.439I, -1.098-0.090I, -1.416+1.021I, +0.060-0.874I, -0.411+0.415I, -0.368+0.348I, -1.361+0.349I, +0.780-0.729I}, 2, 4), 2.2387, {{12, 5.167847},{12, -0.439300},}}, -{srs_channel_matrix({-0.515-3.232I, -0.896-1.087I, -1.203-1.426I, +1.038-1.014I, -0.846-0.213I, -0.173-0.325I, -1.209+1.944I, -0.297-0.572I}, 2, 4), 5.2674, {{13, 4.869396},{15, -1.373769},}}, -{srs_channel_matrix({-1.569+1.460I, -0.477+2.050I, -1.338+0.121I, +0.030-0.990I, +0.853+1.198I, +0.404-0.593I, -0.701-0.470I, -1.631+0.886I}, 2, 4), 19.8562, {{21, -3.125471},{13, -7.925554},}}, -{srs_channel_matrix({-1.957+0.810I, +0.421+0.173I, +0.401-0.506I, +0.095-1.193I, +0.497+0.647I, +1.082-0.354I, +0.970+0.046I, -0.569-0.793I}, 2, 4), 8.9317, {{17, -1.874603},{12, -6.904876},}}, -{srs_channel_matrix({+0.172+0.498I, -0.062+2.789I, +1.199+0.728I, +0.802-0.773I, +1.053+0.837I, -0.749-1.128I, -0.936-1.424I, -1.269+0.717I}, 2, 4), 4.8305, {{18, 4.384766},{16, -1.026578},}}, -{srs_channel_matrix({+0.316-1.541I, +1.407-0.203I, +0.401-0.500I, +0.930+0.383I, -1.606+0.412I, +0.662+0.405I, +2.139-0.364I, +0.541-0.599I}, 2, 4), 10.6215, {{21, -2.455953},{12, -6.737523},}}, -{srs_channel_matrix({+0.854+0.161I, -1.853-0.268I, -0.207-0.410I, +0.270-0.711I, -0.653+0.061I, +0.477-1.846I, -0.071-0.398I, -0.938-0.544I}, 2, 4), 9.4968, {{22, -3.176380}, {8, -6.338377},}}, -{srs_channel_matrix({+0.653+0.541I, -0.734-1.263I, +0.541+1.110I, +0.976-0.990I, -0.157-1.829I, +0.278+1.384I, +0.640-0.063I, -0.081+0.449I}, 2, 4), 4.023, {{25, 2.764149},{21, -2.556165},}}, -{srs_channel_matrix({-1.021+1.147I, -3.073+0.598I, +0.626-1.281I, -0.287-2.203I, -0.197-0.571I, +0.406+0.214I, -1.419+0.942I, -0.729+0.094I}, 2, 4), 9.633, {{25, 1.312246},{21, -4.520607},}}, -{srs_channel_matrix({+0.306-0.462I, -1.172-0.410I, -0.961-0.504I, -0.654+1.233I, -1.229+0.610I, -0.271+0.059I, -0.900-1.467I, -0.286-1.626I}, 2, 4), 11.1156, {{22, -3.914039},{10, -7.170668},}}, -{srs_channel_matrix({+2.605-0.449I, +0.972-0.084I, +0.257-1.992I, -0.974+0.841I, -1.146-0.415I, +0.548+1.912I, +1.565-0.391I, -1.693+0.409I}, 2, 4), 8.1144, {{23, 1.459961},{10, -3.440890},}}, -{srs_channel_matrix({-0.625+1.196I, -1.169+0.120I, +0.393-1.037I, +1.302-0.857I, -0.594-0.170I, +0.436-0.192I, -0.504-0.866I, +0.102+0.181I}, 2, 4), 1.2928, {{27, 4.767162},{21, -0.505018},}}, -{srs_channel_matrix({-0.251+0.540I, -0.205-0.092I, -2.202-0.760I, -0.775-0.694I, -1.393+1.281I, -0.386-0.810I, +0.526-1.237I, +1.523+0.215I, +1.798+2.011I, -0.117+0.026I, -0.320+0.308I, +0.818-0.938I, +0.490+1.674I, +0.765+0.125I, +0.778+0.530I, -1.480-0.952I}, 4, 4), 0.91942, {{13, 12.328757}, {20, 7.065233}, {6, 4.488540}, {3, 0.803254},}}, -{srs_channel_matrix({+0.389-0.699I, -1.156+0.833I, +0.040-0.695I, -0.451-0.462I, +0.109+0.884I, -0.251+0.436I, -0.190+0.897I, -1.033+0.505I, -0.323-0.401I, +0.767-0.514I, +1.745+0.796I, -1.161-0.671I, +2.377+1.187I, +1.526+0.791I, +0.169+0.288I, -0.301+0.003I}, 4, 4), 1.9677, {{13, 5.706799},{11, 2.835869},{2, -0.185431},{0, -1.776047},}}, -{srs_channel_matrix({+3.527+1.769I, -0.112+1.511I, -1.557+0.164I, +1.915-0.283I, +0.610+1.152I, -0.648-1.147I, +2.617+0.674I, +0.551-0.669I, +0.294-0.400I, -0.778-0.672I, -1.065+0.576I, -1.768-0.778I, -0.423-1.064I, -1.053+0.553I, +0.648-0.423I, -0.318+0.362I}, 4, 4), 4.1582, {{17, 5.955043},{11, 2.239470},{2, -0.289404},{0, -2.073018},}}, -{srs_channel_matrix({+0.270-1.323I, -2.564+0.128I, +0.466-1.442I, +1.854+1.303I, +1.039+1.410I, +0.911-1.663I, -0.240+1.944I, +0.181-1.085I, +0.244+0.227I, +0.096+1.099I, -0.830+0.147I, -0.352+2.296I, -0.175+2.753I, -0.481+0.138I, +0.837-1.907I, +2.538-0.365I}, 4, 4), 7.3959, {{23, 4.624214},{19, 0.892043},{5, -2.032019},{3, -4.024456},}}, -{srs_channel_matrix({-0.765+0.067I, -1.128-0.187I, +0.078+0.292I, +2.107+0.988I, -0.716+0.393I, -0.281+0.195I, +1.166+0.280I, +1.213+0.051I, +0.486-0.774I, +1.026+0.787I, +0.871+1.409I, -0.382-0.534I, +0.429+1.928I, -0.299-0.176I, -0.900-0.244I, +0.635-0.898I}, 4, 4), 9.0082, {{26, 0.319062},{11, -3.932389}, {2, -6.367418}, {2, -8.503519},}}, -{srs_channel_matrix({-0.953-1.634I, +0.354+0.761I, +1.597+1.193I, +0.527+1.632I, +0.854-1.532I, +1.342-1.337I, -2.500-1.474I, -0.168-0.042I, +0.353-0.616I, +0.717+1.314I, -1.305-1.455I, -1.006-1.742I, +0.791+0.205I, -0.117+1.193I, +0.553-0.803I, -0.961-1.266I}, 4, 4), 4.6986, {{27, 6.537971},{10, 1.141677},{2, -1.575251},{2, -3.747263},}}, -{srs_channel_matrix({-1.636+0.491I, +0.017-0.586I, +0.828+0.745I, +0.218-0.828I, -1.909+0.575I, -0.537+0.282I, -0.302+1.139I, +1.814-0.426I, +0.915+0.636I, -0.057+0.793I, +1.309-0.898I, -1.045+0.156I, -0.348+1.597I, +1.413+0.112I, +1.502-0.309I, +0.730+0.457I}, 4, 4), 4.4293, {{13, 5.887188},{15, 0.572613},{4, -2.557978},{2, -5.054490},}}, -{srs_channel_matrix({+0.443-0.871I, -0.135-0.498I, -0.018-0.107I, +0.461-0.688I, +1.362+0.332I, +0.452+2.365I, +1.648-0.482I, -2.028+0.647I, -0.449-1.034I, +0.236+1.340I, -0.835-0.969I, -1.276+0.209I, +0.617-0.619I, +0.613+0.512I, +0.289+0.011I, +0.395-0.044I}, 4, 4), 0.56976, {{17, 12.293614}, {12, 8.270981}, {1, 4.459924}, {0, 1.953526},}}, -{srs_channel_matrix({-0.630-0.296I, -0.047-1.497I, +2.683-0.905I, -1.147-0.404I, +0.553-0.726I, -1.076-0.866I, +1.031-0.422I, +0.328-0.943I, +0.652+1.342I, -0.279-0.988I, +0.245+1.818I, +1.473-0.374I, -2.275-1.452I, -1.633-0.619I, +0.415+0.935I, -0.655+1.056I}, 4, 4), 2.6368, {{15, 7.441655}, {8, 3.113279}, {4, 0.890923},{0, -1.480045},}}, -{srs_channel_matrix({+0.287+0.385I, +0.633+0.696I, -1.459-0.113I, -0.582-0.039I, -1.830+0.088I, -0.449-0.790I, +0.949+1.423I, +0.717+0.006I, +2.288+0.686I, +0.167-0.855I, -2.156-1.075I, +1.689-0.091I, +1.282-0.253I, -0.583+1.195I, +0.223+0.606I, +0.779+0.541I}, 4, 4), 8.7451, {{19, 1.494477},{17, -2.830749}, {1, -5.088718}, {0, -6.925003},}}, -{srs_channel_matrix({-0.968+0.036I, +0.202-0.365I, -0.348+1.771I, +1.290+0.221I, +1.341+2.730I, -0.581-0.296I, +0.875+0.564I, +1.395+1.583I, +0.321+2.729I, +1.623+0.304I, +1.062-0.790I, +0.214+0.803I, +0.877-1.320I, +0.194-0.274I, -0.415+0.272I, +0.358+1.490I}, 4, 4), 0.91006, {{17, 13.281404}, {17, 8.476553}, {4, 4.225631}, {0, 1.656617},}}, -{srs_channel_matrix({-0.028-0.473I, +0.924+2.184I, -0.321+0.810I, +0.661+0.716I, +1.915-1.006I, +0.157+0.434I, -0.301+0.520I, -0.500-1.092I, +0.716-0.226I, +1.337-0.405I, +2.126+0.528I, +0.054-1.007I, +0.163+1.089I, -0.633+1.785I, +1.612-0.304I, -0.075-0.009I}, 4, 4), 1.5814, {{12, 8.147412},{13, 5.225459}, {2, 2.002600}, {2, 0.145322},}}, -{srs_channel_matrix({+1.203-0.365I, +0.522+0.117I, +0.397+0.174I, -0.483-0.216I, -0.231-0.153I, +0.613+0.034I, +1.683+0.458I, +0.568+1.282I, -1.206+0.620I, +0.433-0.287I, -0.092+0.598I, -0.244-0.246I, -0.219-1.781I, -0.880-2.347I, -0.321-1.714I, -0.784-0.237I}, 4, 4), 5.2039, {{26, 2.932870},{11, -1.400166}, {2, -4.287798}, {0, -5.979855},}}, -{srs_channel_matrix({-0.720+0.494I, +0.041+0.991I, -0.659+1.077I, -0.631+0.777I, +0.610-2.260I, +0.782-0.564I, +2.437+0.901I, +0.302+0.395I, +0.058+0.005I, -0.574+0.437I, -0.195+1.130I, -0.051+0.154I, -1.756-0.759I, -0.257-0.180I, +0.750-0.208I, -0.571+0.897I}, 4, 4), 2.0757, {{21, 7.773821}, {7, 3.413658},{5, -1.082223},{2, -2.531567},}}, -{srs_channel_matrix({+0.548-0.292I, +0.148+0.458I, -0.362+1.755I, +0.061+0.931I, +0.217+0.825I, -1.398-0.815I, +0.179-0.534I, +0.928+0.243I, -0.110-0.101I, +1.572-1.625I, +0.560-1.514I, -0.420+1.026I, -0.154-0.758I, -0.275+2.078I, +0.241-2.222I, +0.755+0.449I}, 4, 4), 3.0085, {{21, 6.119198},{11, 2.208475},{2, -0.886681},{0, -3.051977},}}, -{srs_channel_matrix({-0.756-0.364I, +0.404+0.150I, -0.794-1.945I, +0.860+1.524I, +0.067+0.546I, -1.639+2.010I, -2.425+1.417I, -0.284+0.011I, +1.146-0.939I, +0.181-1.739I, +0.054+0.017I, +0.688+0.219I, -1.393+1.046I, +1.425-0.951I, -0.894+0.795I, +0.038+0.071I}, 4, 4), 7.6688, {{16, 2.329630},{18, -1.891056}, {6, -3.833947}, {0, -5.730489},}}, +{srs_channel_matrix({cf_t(0.537667,-2.258847), cf_t(1.833885,0.862173)}, 1, 2), 1.9904, {{5, 6.721121},}}, +{srs_channel_matrix({cf_t(-1.307688,0.342624), cf_t(-0.433592,3.578397)}, 1, 2), 0.15523, {{4, 18.860710},}}, +{srs_channel_matrix({cf_t(-1.349887,0.725404), cf_t(3.034923,-0.063055)}, 1, 2), 0.96758, {{3, 10.110059},}}, +{srs_channel_matrix({cf_t(-0.204966,1.489698), cf_t(-0.124144,1.409034)}, 1, 2), 0.17958, {{2, 13.746798},}}, +{srs_channel_matrix({cf_t(0.671497,0.717239), cf_t(-1.207487,1.630235)}, 1, 2), 1.683, {{5, 4.272519},}}, +{srs_channel_matrix({cf_t(1.034693,-0.303441), cf_t(0.726885,0.293871)}, 1, 2), 7.6653, {{2, -6.937425},}}, +{srs_channel_matrix({cf_t(0.888396,-1.068870), cf_t(-1.147070,-0.809499)}, 1, 2), 10.1264, {{4, -4.147666},}}, +{srs_channel_matrix({cf_t(1.438380,-0.754928), cf_t(0.325191,1.370299)}, 1, 2), 14.6286, {{5, -5.093284},}}, +{srs_channel_matrix({cf_t(-0.102242,0.319207), cf_t(-0.241447,0.312859)}, 1, 2), 7.2845, {{2, -14.494137},}}, +{srs_channel_matrix({cf_t(-0.030051,0.627707), cf_t(-0.164879,1.093266)}, 1, 2), 1.2223, {{2, 0.888649},}}, +{srs_channel_matrix({cf_t(-0.863653,-1.214117), cf_t(0.077359,-1.113501)}, 1, 2), 3.0245, {{2, -0.009346},}}, +{srs_channel_matrix({cf_t(1.532630,0.371379), cf_t(-0.769666,-0.225584)}, 1, 2), 1.2421, {{3, 3.574097},}}, +{srs_channel_matrix({cf_t(-1.089064,0.552527), cf_t(0.032557,1.100610)}, 1, 2), 0.18049, {{4, 11.532158},}}, +{srs_channel_matrix({cf_t(0.085931,-0.742302), cf_t(-1.491590,-1.061582)}, 1, 2), 0.7535, {{4, 6.217135},}}, +{srs_channel_matrix({cf_t(-0.615602,-0.192419), cf_t(0.748077,0.888610)}, 1, 2), 4.5595, {{3, -4.787585},}}, +{srs_channel_matrix({cf_t(-1.402269,0.488194), cf_t(-1.422376,-0.177375)}, 1, 2), 4.5388, {{2, -0.508140},}}, +{srs_channel_matrix({cf_t(1.419310,-0.804466), cf_t(0.291584,0.696624), cf_t(0.197811,0.835088), cf_t(1.587699,-0.243715)}, 2, 2), 2.4579, {{5, 1.461981},{1, -1.769549},}}, +{srs_channel_matrix({cf_t(-1.165844,2.585491), cf_t(-1.147953,-0.666891), cf_t(0.104875,0.187331), cf_t(0.722254,-0.082494)}, 2, 2), 19.2438, {{3, -5.359049},{0, -8.704529},}}, +{srs_channel_matrix({cf_t(-0.438966,0.100093), cf_t(-1.794679,-0.544529), cf_t(0.840376,0.303521), cf_t(-0.888032,-0.600327)}, 2, 2), 1.8437, {{2, 3.793230},{1, -1.381617},}}, +{srs_channel_matrix({cf_t(0.739363,-0.839589), cf_t(1.711888,1.354594), cf_t(-0.194124,-1.072155), cf_t(-2.138355,0.960954)}, 2, 2), 2.6894, {{5, 5.675573},{1, -0.127439},}}, +{srs_channel_matrix({cf_t(1.436697,2.908008), cf_t(-1.960900,0.825219), cf_t(-0.197698,1.378972), cf_t(-1.207845,-1.058180)}, 2, 2), 3.9818, {{5, 5.877500},{0, -1.128085},}}, +{srs_channel_matrix({cf_t(-0.272469,-2.051816), cf_t(1.098425,-0.353850), cf_t(-0.277872,-0.823587), cf_t(0.701541,-1.577057)}, 2, 2), 0.60834, {{2, 11.062479}, {1, 4.810719},}}, +{srs_channel_matrix({cf_t(0.281984,0.350179), cf_t(0.033480,-0.299066), cf_t(-1.333678,0.022890), cf_t(1.127492,-0.261995)}, 2, 2), 11.1938, {{5, -6.496824},{0, -11.256090},}}, +{srs_channel_matrix({cf_t(-0.285651,-0.533557), cf_t(-0.831367,-2.002636), cf_t(-0.979206,0.964229), cf_t(-1.156402,0.520060)}, 2, 2), 3.0904, {{4, 4.036525},{0, -3.047601},}}, +{srs_channel_matrix({cf_t(-0.034771,-0.714530), cf_t(-0.798164,1.351386), cf_t(1.018685,-0.224771), cf_t(-0.133217,-0.589029)}, 2, 2), 3.9371, {{5, -0.388925},{0, -5.971891},}}, +{srs_channel_matrix({cf_t(-0.847926,0.307535), cf_t(-1.120128,-1.257118), cf_t(2.526000,-0.865468), cf_t(1.655498,-0.176534)}, 2, 2), 0.85554, {{3, 11.018067}, {1, 4.222248},}}, +{srs_channel_matrix({cf_t(-1.332004,0.391354), cf_t(-2.329867,0.451679), cf_t(-1.449097,-0.130285), cf_t(0.333511,0.183689)}, 2, 2), 5.2824, {{2, 0.622089},{0, -3.412172},}}, +{srs_channel_matrix({cf_t(0.862022,-0.334887), cf_t(-1.361694,0.552783), cf_t(0.455030,1.039091), cf_t(-0.848709,-1.117639)}, 2, 2), 0.31804, {{5, 12.881381},{1, -0.090114},}}, +{srs_channel_matrix({cf_t(0.660143,-0.303108), cf_t(-0.067866,0.023046), cf_t(-0.195221,0.051290), cf_t(-0.217606,0.826063)}, 2, 2), 0.99725, {{3, -1.167051},{0, -4.904117},}}, +{srs_channel_matrix({cf_t(0.466914,-1.029768), cf_t(-0.209713,0.949222), cf_t(0.625190,0.307062), cf_t(0.183227,0.135175)}, 2, 2), 2.0588, {{5, -0.202222},{0, -4.954878},}}, +{srs_channel_matrix({cf_t(0.261406,-0.532011), cf_t(-0.941486,1.682104), cf_t(-0.162338,-0.875729), cf_t(-0.146055,-0.483815)}, 2, 2), 7.6775, {{5, -4.163022},{0, -7.803920},}}, +{srs_channel_matrix({cf_t(-1.174212,-0.249025), cf_t(-0.192240,-1.064213), cf_t(-0.274070,1.603457), cf_t(1.530073,1.234679)}, 2, 2), 3.5766, {{3, 2.421687},{0, -2.226541},}}, +{srs_channel_matrix({cf_t(-1.506160,-0.947961), cf_t(-0.444628,-0.741106), cf_t(-0.155941,-0.507818), cf_t(0.276068,-0.320576), cf_t(-0.261164,0.012469), cf_t(0.443422,-3.029177), cf_t(0.391894,-0.457015), cf_t(-1.250679,1.242448)}, 4, 2), 15.3432, {{2, -1.647274},{0, -5.581959},}}, +{srs_channel_matrix({cf_t(0.933728,0.041374), cf_t(0.350321,-0.734169), cf_t(-0.029006,-0.030814), cf_t(0.182452,0.232347), cf_t(-1.565056,0.426388), cf_t(-0.084539,-0.372809), cf_t(1.603946,-0.236455), cf_t(0.098348,2.023691)}, 4, 2), 14.2321, {{3, -3.526674},{0, -7.109971},}}, +{srs_channel_matrix({cf_t(2.229446,0.471634), cf_t(0.337564,-1.212847), cf_t(1.000061,0.066190), cf_t(-1.664164,0.652356), cf_t(-0.590035,0.327060), cf_t(-0.278064,1.082634), cf_t(0.422716,1.006077), cf_t(-1.670201,-0.650908)}, 4, 2), 1.5568, {{5, 9.125793},{0, 3.495892},}}, +{srs_channel_matrix({cf_t(-0.944378,1.250251), cf_t(-1.321789,0.929789), cf_t(0.924826,0.239763), cf_t(0.000050,-0.690361), cf_t(-0.054919,-0.651554), cf_t(0.911127,1.192102), cf_t(0.594584,-1.611830), cf_t(0.350201,-0.024462)}, 4, 2), 7.7488, {{4, 0.762089},{1, -4.385994},}}, +{srs_channel_matrix({cf_t(1.020498,0.079934), cf_t(0.861716,-0.948481), cf_t(0.001162,0.411491), cf_t(-0.070837,0.676978), cf_t(-2.486284,0.857733), cf_t(0.581172,-0.691159), cf_t(-2.192435,0.449378), cf_t(-2.319280,0.100633)}, 4, 2), 0.11899, {{5, 20.774681},{0, 15.551061},}}, +{srs_channel_matrix({cf_t(0.536157,-0.382585), cf_t(0.897888,0.648679), cf_t(-0.131938,0.825727), cf_t(-0.147201,-1.014944), cf_t(1.007773,-0.471070), cf_t(-2.123655,0.137025), cf_t(-0.504586,-0.291863), cf_t(-1.270594,0.301819)}, 4, 2), 2.0206, {{3, 5.397915},{0, 1.208681},}}, +{srs_channel_matrix({cf_t(-0.929962,-0.020858), cf_t(-0.176830,-0.560665), cf_t(-2.132095,2.177779), cf_t(1.145362,1.138465), cf_t(-0.629091,-2.496887), cf_t(-1.203850,0.441327), cf_t(-0.253945,-1.398138), cf_t(-1.428647,-0.255055)}, 4, 2), 2.6132, {{5, 8.656211},{1, 2.963929},}}, +{srs_channel_matrix({cf_t(0.747734,0.323213), cf_t(-0.273047,-0.784146), cf_t(1.576300,-1.805373), cf_t(-0.480937,1.858593), cf_t(0.327512,-0.604530), cf_t(0.664734,0.103360), cf_t(0.085189,0.563167), cf_t(0.880953,0.113597)}, 4, 2), 7.2026, {{3, 0.300607},{0, -3.592447},}}, +{srs_channel_matrix({cf_t(-0.467715,-0.284141), cf_t(-0.124890,-0.086690), cf_t(1.478958,-1.469395), cf_t(-0.860816,0.192182), cf_t(0.784668,-0.822293), cf_t(0.308623,-0.094241), cf_t(-0.233860,0.336213), cf_t(-1.056973,-0.904654)}, 4, 2), 5.3694, {{5, 0.662797},{0, -4.016587},}}, +{srs_channel_matrix({cf_t(0.350063,1.877865), cf_t(-1.835859,0.940704), cf_t(1.035976,0.787346), cf_t(2.424461,-0.875874), cf_t(0.959401,0.319949), cf_t(-0.315772,-0.558294), cf_t(0.428623,-0.311429), cf_t(-1.035985,-0.570010)}, 4, 2), 7.9187, {{4, 2.151205},{0, -2.364794},}}, +{srs_channel_matrix({cf_t(-0.908746,-1.483121), cf_t(-0.209897,-1.020264), cf_t(-1.698864,-0.446995), cf_t(0.607601,0.109659), cf_t(-0.117798,1.128736), cf_t(0.699160,-0.289963), cf_t(0.269649,1.261551), cf_t(0.494287,0.475425)}, 4, 2), 0.13833, {{4, 17.622018},{1, 11.883528},}}, +{srs_channel_matrix({cf_t(0.126947,-1.096593), cf_t(-0.656816,-0.493010), cf_t(-1.481399,-0.180739), cf_t(0.155489,0.045841), cf_t(0.818551,-0.063783), cf_t(-0.292588,0.611335), cf_t(-0.540786,0.109318), cf_t(-0.308642,1.814015)}, 4, 2), 1.9538, {{2, 4.388034},{1, 0.568394},}}, +{srs_channel_matrix({cf_t(1.804494,-1.441014), cf_t(-0.723121,0.401844), cf_t(0.526547,1.470201), cf_t(-0.260251,-0.326814), cf_t(0.600143,0.812323), cf_t(0.593931,0.545540), cf_t(-2.186022,-1.051632), cf_t(-1.327043,0.397467)}, 4, 2), 4.1255, {{5, 4.941982},{1, -0.039744},}}, +{srs_channel_matrix({cf_t(1.516267,0.612511), cf_t(-0.032567,-0.054886), cf_t(1.636000,-1.118732), cf_t(-0.425058,-0.626379), cf_t(0.589433,0.249518), cf_t(-0.062791,-0.993019), cf_t(-2.021959,0.974950), cf_t(-0.982132,-0.640710)}, 4, 2), 0.3743, {{3, 14.256197}, {1, 9.925905},}}, +{srs_channel_matrix({cf_t(-1.079866,-0.373071), cf_t(0.199189,0.815489), cf_t(-1.521027,0.798887), cf_t(-0.723631,0.120205), cf_t(-0.593250,0.571248), cf_t(0.401336,0.412796), cf_t(0.942133,-0.986962), cf_t(0.300486,0.759568)}, 4, 2), 6.2666, {{3, -0.172373},{1, -4.533946},}}, +{srs_channel_matrix({cf_t(-0.603918,-0.238302), cf_t(0.176947,0.229597), cf_t(-0.307503,0.439998), cf_t(-0.131820,-0.616866), cf_t(0.595358,0.274837), cf_t(1.046833,0.601102), cf_t(-0.197959,0.092308), cf_t(0.327678,1.729841)}, 4, 2), 5.7712, {{3, -1.355727},{0, -5.813710},}}, +{srs_channel_matrix({cf_t(-0.737060,-0.079893), cf_t(-1.749879,0.898476), cf_t(0.910483,0.183703), cf_t(0.867083,0.290790)}, 1, 4), 2.6449, {{14, 2.380825},}}, +{srs_channel_matrix({cf_t(0.439952,-1.854299), cf_t(0.101662,-1.140681), cf_t(2.787335,-1.093343), cf_t(-1.166665,-0.433609)}, 1, 4), 3.4836, {{16, 4.487145},}}, +{srs_channel_matrix({cf_t(-0.218534,1.778256), cf_t(0.541334,1.223063), cf_t(0.389266,-1.283256), cf_t(0.751229,-2.328955)}, 1, 4), 1.5722, {{14, 8.488748},}}, +{srs_channel_matrix({cf_t(-1.835639,-0.069214), cf_t(0.066757,-0.507323), cf_t(0.035479,0.235810), cf_t(2.227168,0.245805)}, 1, 4), 2.8395, {{27, 2.225421},}}, +{srs_channel_matrix({cf_t(-0.608581,-1.032184), cf_t(-1.222593,1.331216), cf_t(0.316500,-0.418903), cf_t(-1.342869,-0.140322)}, 1, 4), 1.6254, {{19, 5.103215},}}, +{srs_channel_matrix({cf_t(-0.300111,0.629335), cf_t(1.029366,-0.213015), cf_t(-0.345066,-0.865697), cf_t(1.012802,-1.043108)}, 1, 4), 3.7232, {{24, -2.281627},}}, +{srs_channel_matrix({cf_t(-0.438141,1.143679), cf_t(-0.408674,-0.531620), cf_t(0.983545,0.972566), cf_t(-0.297697,-0.522250)}, 1, 4), 0.92312, {{20, 4.977579},}}, +{srs_channel_matrix({cf_t(0.970738,0.950993), cf_t(-0.413972,-0.432004), cf_t(-0.438271,0.648941), cf_t(2.003391,-0.360076)}, 1, 4), 0.79094, {{23, 8.085299},}}, +{srs_channel_matrix({cf_t(1.415849,0.047471), cf_t(-1.604516,1.746257), cf_t(1.028853,0.155388), cf_t(1.457968,-1.237120)}, 1, 4), 6.9927, {{25, -1.039307},}}, +{srs_channel_matrix({cf_t(-0.333407,-0.577086), cf_t(0.713543,0.144002), cf_t(0.317408,-1.638666), cf_t(0.413610,-0.760090)}, 1, 4), 8.6553, {{24, -4.758370},}}, +{srs_channel_matrix({cf_t(0.519729,-0.689811), cf_t(-0.014160,-0.666699), cf_t(-1.155529,0.864149), cf_t(-0.009525,0.113419)}, 1, 4), 0.317, {{18, 8.241568},}}, +{srs_channel_matrix({cf_t(0.883970,1.170609), cf_t(0.180258,0.475861), cf_t(0.550855,1.412233), cf_t(0.682964,0.022608)}, 1, 4), 3.1919, {{12, 0.634324},}}, +{srs_channel_matrix({cf_t(1.701335,0.149809), cf_t(-0.509712,1.404933), cf_t(-0.002855,1.034122), cf_t(0.919867,0.291570)}, 1, 4), 6.0777, {{22, -2.455675},}}, +{srs_channel_matrix({cf_t(0.566696,0.213042), cf_t(-1.382621,0.879677), cf_t(0.244475,2.038876), cf_t(0.808439,0.923932)}, 1, 4), 2.3549, {{13, 3.020281},}}, +{srs_channel_matrix({cf_t(0.641662,1.224688), cf_t(0.425485,-0.043584), cf_t(-1.314724,0.582423), cf_t(-0.416411,-1.006500)}, 1, 4), 2.5783, {{27, 0.760560},}}, +{srs_channel_matrix({cf_t(0.600292,-0.939535), cf_t(-1.361515,-0.037533), cf_t(0.347593,-1.896304), cf_t(-0.181843,-2.127977)}, 1, 4), 6.872, {{16, 0.213123},}}, +{srs_channel_matrix({cf_t(-0.990532,0.093109), cf_t(-1.173032,-0.378157), cf_t(-1.725428,-1.482676), cf_t(0.288228,-0.043819), cf_t(-1.594184,0.960825), cf_t(0.110219,1.738245), cf_t(0.787067,-0.430206), cf_t(-0.002227,-1.627323)}, 2, 4), 2.4797, {{24, 5.197610},{20, 0.186947},}}, +{srs_channel_matrix({cf_t(0.376266,0.317851), cf_t(-0.226950,0.138048), cf_t(-1.148912,-0.710735), cf_t(2.024333,0.777004), cf_t(-2.359524,0.622394), cf_t(-0.509972,0.647381), cf_t(-1.321626,-0.425632), cf_t(-0.636128,1.048581)}, 2, 4), 0.29465, {{27, 14.044752}, {10, 8.625050},}}, +{srs_channel_matrix({cf_t(2.508772,0.555139), cf_t(1.063460,-0.556778), cf_t(1.156922,-0.895113), cf_t(0.052979,-0.409328), cf_t(-1.288386,-0.160887), cf_t(-0.371221,0.409334), cf_t(-0.757792,-0.952636), cf_t(-0.563969,0.317317)}, 2, 4), 2.5256, {{14, 6.008590},{10, -0.503156},}}, +{srs_channel_matrix({cf_t(1.324385,-0.892661), cf_t(-0.213170,1.908512), cf_t(-0.134479,0.122231), cf_t(-1.171356,1.047033), cf_t(-1.385263,-0.226920), cf_t(0.310508,-0.162502), cf_t(-0.249489,0.690052), cf_t(0.503744,0.555757)}, 2, 4), 9.9904, {{13, -2.271692},{11, -6.442332},}}, +{srs_channel_matrix({cf_t(-1.532693,0.439411), cf_t(-1.097868,-0.089622), cf_t(-1.415773,1.021180), cf_t(0.059571,-0.873979), cf_t(-0.411251,0.414700), cf_t(-0.368011,0.348441), cf_t(-1.360963,0.349254), cf_t(0.779567,-0.729247)}, 2, 4), 2.2387, {{12, 5.167847},{12, -0.439300},}}, +{srs_channel_matrix({cf_t(-0.514882,-3.232038), cf_t(-0.896446,-1.086959), cf_t(-1.203268,-1.426436), cf_t(1.037816,-1.014451), cf_t(-0.845944,-0.213267), cf_t(-0.172914,-0.325348), cf_t(-1.208652,1.944398), cf_t(-0.297127,-0.571773)}, 2, 4), 5.2674, {{13, 4.869396},{15, -1.373769},}}, +{srs_channel_matrix({cf_t(-1.569315,1.460013), cf_t(-0.477383,2.050043), cf_t(-1.337977,0.120501), cf_t(0.030299,-0.989902), cf_t(0.853087,1.197771), cf_t(0.404253,-0.592656), cf_t(-0.700620,-0.469809), cf_t(-1.630543,0.886377)}, 2, 4), 19.8562, {{21, -3.125471},{13, -7.925554},}}, +{srs_channel_matrix({cf_t(-1.956754,0.809972), cf_t(0.420684,0.173247), cf_t(0.400738,-0.505543), cf_t(0.095142,-1.193306), cf_t(0.496684,0.646971), cf_t(1.082241,-0.353623), cf_t(0.970448,0.046435), cf_t(-0.568570,-0.792948)}, 2, 4), 8.9317, {{17, -1.874603},{12, -6.904876},}}, +{srs_channel_matrix({cf_t(0.171586,0.497981), cf_t(-0.062139,2.789081), cf_t(1.199028,0.727572), cf_t(0.801704,-0.773064), cf_t(1.053305,0.836634), cf_t(-0.748877,-1.128330), cf_t(-0.936326,-1.424470), cf_t(-1.269087,0.717442)}, 2, 4), 4.8305, {{18, 4.384766},{16, -1.026578},}}, +{srs_channel_matrix({cf_t(0.315986,-1.540877), cf_t(1.406535,-0.203143), cf_t(0.401125,-0.499965), cf_t(0.929660,0.383024), cf_t(-1.605802,0.412035), cf_t(0.661536,0.405493), cf_t(2.138502,-0.363781), cf_t(0.541139,-0.599272)}, 2, 4), 10.6215, {{21, -2.455953},{12, -6.737523},}}, +{srs_channel_matrix({cf_t(0.853541,0.161364), cf_t(-1.853008,-0.268183), cf_t(-0.207303,-0.409873), cf_t(0.270378,-0.711323), cf_t(-0.652771,0.061445), cf_t(0.477227,-1.846129), cf_t(-0.071320,-0.398333), cf_t(-0.938301,-0.543548)}, 2, 4), 9.4968, {{22, -3.176380}, {8, -6.338377},}}, +{srs_channel_matrix({cf_t(0.652699,0.540870), cf_t(-0.734271,-1.262565), cf_t(0.540633,1.110424), cf_t(0.975841,-0.989563), cf_t(-0.156870,-1.828836), cf_t(0.277799,1.384499), cf_t(0.639517,-0.062727), cf_t(-0.080978,0.448921)}, 2, 4), 4.023, {{25, 2.764149},{21, -2.556165},}}, +{srs_channel_matrix({cf_t(-1.020583,1.147328), cf_t(-3.072989,0.597865), cf_t(0.626279,-1.281281), cf_t(-0.286685,-2.203264), cf_t(-0.197343,-0.571246), cf_t(0.405605,0.213996), cf_t(-1.419348,0.942377), cf_t(-0.729445,0.093725)}, 2, 4), 9.633, {{25, 1.312246},{21, -4.520607},}}, +{srs_channel_matrix({cf_t(0.306158,-0.462422), cf_t(-1.172335,-0.409785), cf_t(-0.960967,-0.503539), cf_t(-0.653735,1.233297), cf_t(-1.229394,0.610305), cf_t(-0.270965,0.059072), cf_t(-0.899950,-1.466947), cf_t(-0.285686,-1.625803)}, 2, 4), 11.1156, {{22, -3.914039},{10, -7.170668},}}, +{srs_channel_matrix({cf_t(2.605196,-0.449397), cf_t(0.972375,-0.084292), cf_t(0.256981,-1.991997), cf_t(-0.974240,0.841246), cf_t(-1.146364,-0.414659), cf_t(0.547640,1.912181), cf_t(1.565084,-0.390899), cf_t(-1.693344,0.409182)}, 2, 4), 8.1144, {{23, 1.459961},{10, -3.440890},}}, +{srs_channel_matrix({cf_t(-0.624864,1.196251), cf_t(-1.168723,0.120283), cf_t(0.392575,-1.036843), cf_t(1.301840,-0.857103), cf_t(-0.593642,-0.169874), cf_t(0.436375,-0.191668), cf_t(-0.504362,-0.865815), cf_t(0.102108,0.180664)}, 2, 4), 1.2928, {{27, 4.767162},{21, -0.505018},}}, +{srs_channel_matrix({cf_t(-0.251169,0.540364), cf_t(-0.204570,-0.091539), cf_t(-2.201522,-0.760252), cf_t(-0.774513,-0.693595), cf_t(-1.393273,1.281458), cf_t(-0.386235,-0.809738), cf_t(0.525586,-1.236818), cf_t(1.523269,0.214686), cf_t(1.798494,2.010772), cf_t(-0.116884,0.025554), cf_t(-0.320196,0.308299), cf_t(0.817516,-0.938247), cf_t(0.490159,1.674216), cf_t(0.765251,0.124988), cf_t(0.778279,0.530101), cf_t(-1.480305,-0.952068)}, 4, 4), 0.91942, {{13, 12.328757}, {20, 7.065233}, {6, 4.488540}, {3, 0.803254},}}, +{srs_channel_matrix({cf_t(0.389146,-0.698654), cf_t(-1.156001,0.832771), cf_t(0.039740,-0.694605), cf_t(-0.450599,-0.461883), cf_t(0.109248,0.883617), cf_t(-0.250553,0.435944), cf_t(-0.189902,0.896747), cf_t(-1.032914,0.504732), cf_t(-0.323292,-0.400897), cf_t(0.766527,-0.513848), cf_t(1.744673,0.796368), cf_t(-1.160520,-0.671190), cf_t(2.377412,1.186659), cf_t(1.526078,0.790702), cf_t(0.168508,0.287721), cf_t(-0.301207,0.003226)}, 4, 4), 1.9677, {{13, 5.706799},{11, 2.835869},{2, -0.185431},{0, -1.776047},}}, +{srs_channel_matrix({cf_t(3.526678,1.768992), cf_t(-0.112437,1.510582), cf_t(-1.556594,0.164010), cf_t(1.915102,-0.282764), cf_t(0.609846,1.152166), cf_t(-0.647912,-1.146508), cf_t(2.617335,0.673699), cf_t(0.550950,-0.669113), cf_t(0.294204,-0.400323), cf_t(-0.777844,-0.671802), cf_t(-1.064930,0.575629), cf_t(-1.768414,-0.778094), cf_t(-0.422920,-1.063561), cf_t(-1.053102,0.552978), cf_t(0.647755,-0.423429), cf_t(-0.317628,0.361587)}, 4, 4), 4.1582, {{17, 5.955043},{11, 2.239470},{2, -0.289404},{0, -2.073018},}}, +{srs_channel_matrix({cf_t(0.269541,-1.323334), cf_t(-2.564449,0.128340), cf_t(0.465864,-1.442379), cf_t(1.853561,1.302508), cf_t(1.039289,1.409912), cf_t(0.910897,-1.662543), cf_t(-0.239731,1.943684), cf_t(0.180998,-1.084698), cf_t(0.244250,0.226819), cf_t(0.096393,1.098929), cf_t(-0.830468,0.147189), cf_t(-0.352252,2.295666), cf_t(-0.174775,2.752558), cf_t(-0.480653,0.138318), cf_t(0.836837,-1.907066), cf_t(2.538349,-0.364993)}, 4, 4), 7.3959, {{23, 4.624214},{19, 0.892043},{5, -2.032019},{3, -4.024456},}}, +{srs_channel_matrix({cf_t(-0.764753,0.067454), cf_t(-1.127695,-0.187121), cf_t(0.078189,0.291727), cf_t(2.106630,0.987695), cf_t(-0.715847,0.392935), cf_t(-0.280516,0.194551), cf_t(1.166475,0.279785), cf_t(1.212821,0.051220), cf_t(0.485541,-0.774466), cf_t(1.026016,0.786782), cf_t(0.870726,1.408907), cf_t(-0.381758,-0.534099), cf_t(0.428893,1.927758), cf_t(-0.299131,-0.176248), cf_t(-0.899869,-0.243750), cf_t(0.634745,-0.897601)}, 4, 4), 9.0082, {{26, 0.319062},{11, -3.932389}, {2, -6.367418}, {2, -8.503519},}}, +{srs_channel_matrix({cf_t(-0.952975,-1.633802), cf_t(0.353905,0.761200), cf_t(1.597026,1.193307), cf_t(0.527470,1.632057), cf_t(0.854202,-1.532190), cf_t(1.341847,-1.336852), cf_t(-2.499533,-1.473846), cf_t(-0.167559,-0.041663), cf_t(0.353015,-0.615507), cf_t(0.717254,1.314155), cf_t(-1.304852,-1.455067), cf_t(-1.005869,-1.742349), cf_t(0.790683,0.205305), cf_t(-0.116571,1.192930), cf_t(0.553090,-0.802823), cf_t(-0.960645,-1.265636)}, 4, 4), 4.6986, {{27, 6.537971},{10, 1.141677},{2, -1.575251},{2, -3.747263},}}, +{srs_channel_matrix({cf_t(-1.636447,0.490752), cf_t(0.017344,-0.586126), cf_t(0.828387,0.744900), cf_t(0.217738,-0.828155), cf_t(-1.909245,0.574521), cf_t(-0.536822,0.281841), cf_t(-0.302032,1.139306), cf_t(1.813582,-0.425868), cf_t(0.914852,0.636140), cf_t(-0.057081,0.793178), cf_t(1.309362,-0.898377), cf_t(-1.044736,0.156245), cf_t(-0.348267,1.597254), cf_t(1.412561,0.112440), cf_t(1.502383,-0.308625), cf_t(0.730376,0.456660)}, 4, 4), 4.4293, {{13, 5.887188},{15, 0.572613},{4, -2.557978},{2, -5.054490},}}, +{srs_channel_matrix({cf_t(0.443144,-0.870563), cf_t(-0.134765,-0.497688), cf_t(-0.018328,-0.106672), cf_t(0.460789,-0.687829), cf_t(1.362315,0.331881), cf_t(0.451875,2.365225), cf_t(1.648384,-0.482231), cf_t(-2.028362,0.647448), cf_t(-0.449257,-1.034425), cf_t(0.235993,1.339555), cf_t(-0.835173,-0.969140), cf_t(-1.275955,0.208716), cf_t(0.617035,-0.618593), cf_t(0.612702,0.512016), cf_t(0.289381,0.011354), cf_t(0.395316,-0.043989)}, 4, 4), 0.56976, {{17, 12.293614}, {12, 8.270981}, {1, 4.459924}, {0, 1.953526},}}, +{srs_channel_matrix({cf_t(-0.630046,-0.296348), cf_t(-0.046879,-1.496919), cf_t(2.683026,-0.904834), cf_t(-1.146691,-0.404182), cf_t(0.552999,-0.725798), cf_t(-1.076458,-0.866485), cf_t(1.030640,-0.421847), cf_t(0.327530,-0.942666), cf_t(0.652125,1.341884), cf_t(-0.278861,-0.988435), cf_t(0.245192,1.817943), cf_t(1.472513,-0.374437), cf_t(-2.275102,-1.451741), cf_t(-1.633291,-0.618682), cf_t(0.415469,0.934501), cf_t(-0.654769,1.055929)}, 4, 4), 2.6368, {{15, 7.441655}, {8, 3.113279}, {4, 0.890923},{0, -1.480045},}}, +{srs_channel_matrix({cf_t(0.287400,0.384707), cf_t(0.632906,0.696367), cf_t(-1.459042,-0.112716), cf_t(-0.581710,-0.038824), cf_t(-1.830149,0.088089), cf_t(-0.449103,-0.789656), cf_t(0.949275,1.422961), cf_t(0.717441,0.006332), cf_t(2.287829,0.686481), cf_t(0.166728,-0.854934), cf_t(-2.156491,-1.075235), cf_t(1.689399,-0.090967), cf_t(1.282281,-0.252772), cf_t(-0.582631,1.194824), cf_t(0.222614,0.606064), cf_t(0.779451,0.540514)}, 4, 4), 8.7451, {{19, 1.494477},{17, -2.830749}, {1, -5.088718}, {0, -6.925003},}}, +{srs_channel_matrix({cf_t(-0.967694,0.036223), cf_t(0.202051,-0.364631), cf_t(-0.347878,1.771020), cf_t(1.290088,0.221273), cf_t(1.341154,2.730378), cf_t(-0.580798,-0.296165), cf_t(0.875136,0.564296), cf_t(1.395450,1.582621), cf_t(0.320985,2.729230), cf_t(1.623382,0.303564), cf_t(1.062433,-0.790258), cf_t(0.214105,0.803380), cf_t(0.876803,-1.319903), cf_t(0.194407,-0.273846), cf_t(-0.414892,0.271867), cf_t(0.358459,1.489554)}, 4, 4), 0.91006, {{17, 13.281404}, {17, 8.476553}, {4, 4.225631}, {0, 1.656617},}}, +{srs_channel_matrix({cf_t(-0.027561,-0.473237), cf_t(0.923931,2.184241), cf_t(-0.321280,0.809881), cf_t(0.661125,0.716343), cf_t(1.915294,-1.005571), cf_t(0.156760,0.433987), cf_t(-0.300536,0.520144), cf_t(-0.500035,-1.092245), cf_t(0.716471,-0.225794), cf_t(1.337289,-0.404922), cf_t(2.125680,0.527859), cf_t(0.054046,-1.006963), cf_t(0.163036,1.089027), cf_t(-0.632707,1.784875), cf_t(1.611991,-0.303755), cf_t(-0.075449,-0.008697)}, 4, 4), 1.5814, {{12, 8.147412},{13, 5.225459}, {2, 2.002600}, {2, 0.145322},}}, +{srs_channel_matrix({cf_t(1.203252,-0.364963), cf_t(0.522018,0.117271), cf_t(0.397046,0.174340), cf_t(-0.482811,-0.215656), cf_t(-0.231497,-0.152611), cf_t(0.613385,0.033688), cf_t(1.682851,0.458282), cf_t(0.568394,1.281631), cf_t(-1.206029,0.620090), cf_t(0.433060,-0.286674), cf_t(-0.092121,0.598016), cf_t(-0.244055,-0.245533), cf_t(-0.219189,-1.780737), cf_t(-0.879767,-2.347239), cf_t(-0.320804,-1.713595), cf_t(-0.784415,-0.237127)}, 4, 4), 5.2039, {{26, 2.932870},{11, -1.400166}, {2, -4.287798}, {0, -5.979855},}}, +{srs_channel_matrix({cf_t(-0.720160,0.494233), cf_t(0.040657,0.991440), cf_t(-0.658981,1.077140), cf_t(-0.630515,0.776842), cf_t(0.609625,-2.259840), cf_t(0.782335,-0.564377), cf_t(2.436584,0.901491), cf_t(0.302407,0.394676), cf_t(0.058320,0.004854), cf_t(-0.574134,0.436919), cf_t(-0.195212,1.130073), cf_t(-0.050531,0.153771), cf_t(-1.755775,-0.758627), cf_t(-0.257358,-0.180163), cf_t(0.749542,-0.207790), cf_t(-0.570764,0.896745)}, 4, 4), 2.0757, {{21, 7.773821}, {7, 3.413658},{5, -1.082223},{2, -2.531567},}}, +{srs_channel_matrix({cf_t(0.547520,-0.291910), cf_t(0.147835,0.458445), cf_t(-0.362267,1.755289), cf_t(0.061141,0.931491), cf_t(0.216706,0.825264), cf_t(-1.398122,-0.814807), cf_t(0.178870,-0.534204), cf_t(0.927584,0.242552), cf_t(-0.110178,-0.100648), cf_t(1.572398,-1.625048), cf_t(0.560491,-1.514423), cf_t(-0.420345,1.026189), cf_t(-0.153945,-0.758127), cf_t(-0.275199,2.078345), cf_t(0.241120,-2.221987), cf_t(0.754686,0.448764)}, 4, 4), 3.0085, {{21, 6.119198},{11, 2.208475},{2, -0.886681},{0, -3.051977},}}, +{srs_channel_matrix({cf_t(-0.756239,-0.363569), cf_t(0.404325,0.149556), cf_t(-0.793853,-1.944518), cf_t(0.859783,1.523895), cf_t(0.066869,0.545810), cf_t(-1.639387,2.009927), cf_t(-2.424750,1.416671), cf_t(-0.283830,0.011481), cf_t(1.145806,-0.939049), cf_t(0.181169,-1.738908), cf_t(0.054250,0.016971), cf_t(0.687754,0.219159), cf_t(-1.393407,1.045821), cf_t(1.425366,-0.950983), cf_t(-0.893851,0.794797), cf_t(0.037765,0.071430)}, 4, 4), 7.6688, {{16, 2.329630},{18, -1.891056}, {6, -3.833947}, {0, -5.730489},}}, // clang-format on }; From 649b1c459bbf6ef0c8a312d1eb9cfc68dc8c5ba6 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 12 Feb 2024 16:33:02 +0100 Subject: [PATCH 24/78] ran: make array const --- lib/ran/pusch/pusch_tpmi_select.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ran/pusch/pusch_tpmi_select.cpp b/lib/ran/pusch/pusch_tpmi_select.cpp index d3853fd601..4b742aea95 100644 --- a/lib/ran/pusch/pusch_tpmi_select.cpp +++ b/lib/ran/pusch/pusch_tpmi_select.cpp @@ -22,7 +22,7 @@ static constexpr cf_t sqrt1_2(M_SQRT1_2, 0); static constexpr cf_t sqrt1_2j(0, M_SQRT1_2); -static std::array codebook_1layer_2port = { +static const std::array codebook_1layer_2port = { {precoding_weight_matrix({sqrt1_2, 0}, 1, 2), precoding_weight_matrix({0, sqrt1_2}, 1, 2), precoding_weight_matrix({sqrt1_2, sqrt1_2}, 1, 2), From cc1ba32373cbc6733fe67459ff45f79c27fc5d2d Mon Sep 17 00:00:00 2001 From: Robert Falkenberg Date: Mon, 12 Feb 2024 10:20:14 +0100 Subject: [PATCH 25/78] io_broker: extend logging --- lib/support/network/io_broker_epoll.cpp | 29 ++++++++++++++++--------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/lib/support/network/io_broker_epoll.cpp b/lib/support/network/io_broker_epoll.cpp index 2452b6d409..1aca4b6981 100644 --- a/lib/support/network/io_broker_epoll.cpp +++ b/lib/support/network/io_broker_epoll.cpp @@ -19,21 +19,22 @@ io_broker_epoll::io_broker_epoll(io_broker_config config) : logger(srslog::fetch // Init epoll socket epoll_fd = ::epoll_create1(0); if (epoll_fd == -1) { - report_fatal_error("Failed to create an epoll file descriptor: {}", strerror(errno)); + report_fatal_error("IO broker: failed to create epoll file descriptor. error={}", strerror(errno)); } // register event to handle stop event_fd = ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK); if (event_fd == -1) { - report_fatal_error("Failed to create a file descriptor for event notification: {}", strerror(errno)); + report_fatal_error("IO broker: failed to create file descriptor for event notification. error={}", strerror(errno)); } bool success = register_fd(event_fd, [](int fd) { // do nothing }); if (!success) { - report_fatal_error("Failed to register event file descriptor at IO broker. event_fd={}", event_fd); + report_fatal_error("IO broker: failed to register event file descriptor. event_fd={}", event_fd); } + logger.debug("IO broker: starting event loop"); // start thread to handle epoll events thread = unique_thread(config.thread_name, config.thread_prio, config.cpu_mask, [this]() { while (running) { @@ -52,15 +53,17 @@ io_broker_epoll::~io_broker_epoll() uint64_t tmp = 1; ssize_t ret = ::write(event_fd, &tmp, sizeof(tmp)); if (ret == -1) { - logger.error("Error writing to event_fd={}: {}", event_fd, strerror(errno)); + logger.error("IO broker: failed to write stop event. event_fd={} error={}", event_fd, strerror(errno)); } } + logger.debug("IO broker: joining event loop"); // wait for completion if (thread.running()) { thread.join(); } + logger.debug("IO broker: closing epoll file descriptor. epoll_fd={}", epoll_fd); std::lock_guard lock(event_handler_mutex); event_handler.clear(); close(epoll_fd); @@ -77,25 +80,26 @@ void io_broker_epoll::thread_loop() // handle event if (nof_events == -1) { - logger.error("epoll_wait failed: {}", strerror(errno)); + logger.error("IO broker: epoll_wait failed. error={}", strerror(errno)); /// TODO: shall we raise a fatal error here? return; } if (nof_events == 0) { - logger.error("epoll_wait time out. timeout_ms={}", epoll_timeout_ms); + logger.error("IO broker: epoll_wait time out. timeout_ms={}", epoll_timeout_ms); return; } + logger.debug("IO broker: handling events. nof_events={}", nof_events); for (int i = 0; i < nof_events; ++i) { int fd = events[i].data.fd; if ((events[i].events & EPOLLERR) || (events[i].events & EPOLLHUP) || (!(events[i].events & EPOLLIN))) { ///< An error has occured on this fd, or the socket is not ready for reading /// TODO: add notifier for events - logger.error("epoll error event. fd={} events={}", fd, uint32_t(events[i].events)); + logger.error("IO broker: epoll error event. fd={} events={}", fd, uint32_t(events[i].events)); close(fd); bool success = unregister_fd(fd); if (!success) { - logger.error("Failed to unregister file descriptor from IO broker. fd={}", fd); + logger.error("IO broker: failed to unregister file descriptor. fd={}", fd); } return; } @@ -103,7 +107,10 @@ void io_broker_epoll::thread_loop() std::lock_guard lock(event_handler_mutex); const auto& it = event_handler.find(fd); if (it != event_handler.end()) { + logger.debug("IO broker: handling event. fd={}", fd); it->second->handle_event(fd, events[i]); + } else { + logger.error("IO broker: could not find event handler. fd={}", fd); } } } @@ -116,13 +123,14 @@ bool io_broker_epoll::register_fd(int fd, recv_callback_t handler) ev.data.fd = fd; ev.events = EPOLLIN; if (::epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &ev) == -1) { - logger.error("epoll_ctl failed to register fd={}: {}", fd, strerror(errno)); + logger.error("IO broker: failed to register file descriptor. fd={} error={}", fd, strerror(errno)); return false; } std::lock_guard lock(event_handler_mutex); event_handler.insert({fd, std::make_unique(handler)}); + logger.debug("IO broker: registered file descriptor. fd={}", fd); return true; } @@ -133,12 +141,13 @@ bool io_broker_epoll::unregister_fd(int fd) ev.data.fd = fd; ev.events = EPOLLIN; if (::epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, &ev) == -1) { - logger.error("epoll_ctl failed to unregister fd={}: {}", fd, strerror(errno)); + logger.error("IO broker: failed to unregister file descriptor. fd={} error={}", fd, strerror(errno)); return false; } std::lock_guard lock(event_handler_mutex); event_handler.erase(fd); + logger.debug("IO broker: unregistered file descriptor. fd={}", fd); return true; } From 5429d1be2a8a2f57511e9c6ba4c973faecbf5b58 Mon Sep 17 00:00:00 2001 From: Robert Falkenberg Date: Mon, 12 Feb 2024 14:07:52 +0100 Subject: [PATCH 26/78] io_broker: pass config as const reference --- lib/support/network/io_broker_epoll.cpp | 2 +- lib/support/network/io_broker_epoll.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/support/network/io_broker_epoll.cpp b/lib/support/network/io_broker_epoll.cpp index 1aca4b6981..3017cab59a 100644 --- a/lib/support/network/io_broker_epoll.cpp +++ b/lib/support/network/io_broker_epoll.cpp @@ -14,7 +14,7 @@ using namespace srsran; -io_broker_epoll::io_broker_epoll(io_broker_config config) : logger(srslog::fetch_basic_logger("IO-EPOLL")) +io_broker_epoll::io_broker_epoll(const io_broker_config& config) : logger(srslog::fetch_basic_logger("IO-EPOLL")) { // Init epoll socket epoll_fd = ::epoll_create1(0); diff --git a/lib/support/network/io_broker_epoll.h b/lib/support/network/io_broker_epoll.h index 71c17aaf4c..a6cecf7264 100644 --- a/lib/support/network/io_broker_epoll.h +++ b/lib/support/network/io_broker_epoll.h @@ -11,7 +11,6 @@ #pragma once #include "epoll_helper.h" -#include "srsran/srslog/srslog.h" #include "srsran/support/io/io_broker.h" #include #include @@ -22,7 +21,7 @@ namespace srsran { class io_broker_epoll : public io_broker { public: - explicit io_broker_epoll(io_broker_config config); + explicit io_broker_epoll(const io_broker_config& config); ~io_broker_epoll(); SRSRAN_NODISCARD bool register_fd(int fd, recv_callback_t handler) override; From 1eebf5ed5e913e4bb7cb7dca3fdf85e511093edb Mon Sep 17 00:00:00 2001 From: Robert Falkenberg Date: Mon, 12 Feb 2024 11:06:52 +0100 Subject: [PATCH 27/78] io_broker: not close faulty file descriptor before unregistering from epoll... ...otherwise this triggers an infinite loop of error events. --- lib/support/network/io_broker_epoll.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/support/network/io_broker_epoll.cpp b/lib/support/network/io_broker_epoll.cpp index 3017cab59a..736682170f 100644 --- a/lib/support/network/io_broker_epoll.cpp +++ b/lib/support/network/io_broker_epoll.cpp @@ -96,7 +96,6 @@ void io_broker_epoll::thread_loop() ///< An error has occured on this fd, or the socket is not ready for reading /// TODO: add notifier for events logger.error("IO broker: epoll error event. fd={} events={}", fd, uint32_t(events[i].events)); - close(fd); bool success = unregister_fd(fd); if (!success) { logger.error("IO broker: failed to unregister file descriptor. fd={}", fd); From 07a9bf7b242fb8a5b34b9f7a83cf79a94bc26f36 Mon Sep 17 00:00:00 2001 From: Robert Falkenberg Date: Mon, 12 Feb 2024 13:58:36 +0100 Subject: [PATCH 28/78] io_broker: extend logging of epoll events --- lib/support/network/io_broker_epoll.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/support/network/io_broker_epoll.cpp b/lib/support/network/io_broker_epoll.cpp index 736682170f..7b8f9f328d 100644 --- a/lib/support/network/io_broker_epoll.cpp +++ b/lib/support/network/io_broker_epoll.cpp @@ -93,9 +93,17 @@ void io_broker_epoll::thread_loop() for (int i = 0; i < nof_events; ++i) { int fd = events[i].data.fd; if ((events[i].events & EPOLLERR) || (events[i].events & EPOLLHUP) || (!(events[i].events & EPOLLIN))) { - ///< An error has occured on this fd, or the socket is not ready for reading - /// TODO: add notifier for events - logger.error("IO broker: epoll error event. fd={} events={}", fd, uint32_t(events[i].events)); + // An error or hang up happend on this file descriptor, or the socket is not ready for reading + // TODO: add notifier for these events and let the subscriber decide on further actions (e.g. unregister fd) + if (events[i].events & EPOLLHUP) { + // Note: some container environments hang up stdin (fd=0) in case of non-interactive sessions + logger.warning("IO broker: hang up on file descriptor. fd={} events={:#x}", fd, uint32_t(events[i].events)); + } else if (events[i].events & EPOLLERR) { + logger.error("IO broker: error on file descriptor. fd={} events={:#x}", fd, uint32_t(events[i].events)); + } else { + logger.error("IO broker: unhandled epoll event. fd={} events={:#x}", fd, uint32_t(events[i].events)); + } + // Unregister the faulty file descriptor from epoll bool success = unregister_fd(fd); if (!success) { logger.error("IO broker: failed to unregister file descriptor. fd={}", fd); From a8e224e14acd83e13702878aeff4640e4e79f650 Mon Sep 17 00:00:00 2001 From: Robert Falkenberg Date: Tue, 13 Feb 2024 06:58:35 +0100 Subject: [PATCH 29/78] io_broker: refine logging --- lib/support/network/io_broker_epoll.cpp | 34 ++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/support/network/io_broker_epoll.cpp b/lib/support/network/io_broker_epoll.cpp index 7b8f9f328d..ba2194875c 100644 --- a/lib/support/network/io_broker_epoll.cpp +++ b/lib/support/network/io_broker_epoll.cpp @@ -34,7 +34,7 @@ io_broker_epoll::io_broker_epoll(const io_broker_config& config) : logger(srslog report_fatal_error("IO broker: failed to register event file descriptor. event_fd={}", event_fd); } - logger.debug("IO broker: starting event loop"); + logger.debug("Starting event loop"); // start thread to handle epoll events thread = unique_thread(config.thread_name, config.thread_prio, config.cpu_mask, [this]() { while (running) { @@ -53,17 +53,17 @@ io_broker_epoll::~io_broker_epoll() uint64_t tmp = 1; ssize_t ret = ::write(event_fd, &tmp, sizeof(tmp)); if (ret == -1) { - logger.error("IO broker: failed to write stop event. event_fd={} error={}", event_fd, strerror(errno)); + logger.error("Failed to write stop event. event_fd={} error={}", event_fd, strerror(errno)); } } - logger.debug("IO broker: joining event loop"); + logger.debug("Joining event loop"); // wait for completion if (thread.running()) { thread.join(); } - logger.debug("IO broker: closing epoll file descriptor. epoll_fd={}", epoll_fd); + logger.debug("Closing epoll file descriptor. epoll_fd={}", epoll_fd); std::lock_guard lock(event_handler_mutex); event_handler.clear(); close(epoll_fd); @@ -80,16 +80,16 @@ void io_broker_epoll::thread_loop() // handle event if (nof_events == -1) { - logger.error("IO broker: epoll_wait failed. error={}", strerror(errno)); + logger.error("epoll_wait failed. error={}", strerror(errno)); /// TODO: shall we raise a fatal error here? return; } if (nof_events == 0) { - logger.error("IO broker: epoll_wait time out. timeout_ms={}", epoll_timeout_ms); + logger.error("epoll_wait time out. timeout_ms={}", epoll_timeout_ms); return; } - logger.debug("IO broker: handling events. nof_events={}", nof_events); + logger.debug("Handling events. nof_events={}", nof_events); for (int i = 0; i < nof_events; ++i) { int fd = events[i].data.fd; if ((events[i].events & EPOLLERR) || (events[i].events & EPOLLHUP) || (!(events[i].events & EPOLLIN))) { @@ -97,16 +97,16 @@ void io_broker_epoll::thread_loop() // TODO: add notifier for these events and let the subscriber decide on further actions (e.g. unregister fd) if (events[i].events & EPOLLHUP) { // Note: some container environments hang up stdin (fd=0) in case of non-interactive sessions - logger.warning("IO broker: hang up on file descriptor. fd={} events={:#x}", fd, uint32_t(events[i].events)); + logger.warning("Hang up on file descriptor. fd={} events={:#x}", fd, uint32_t(events[i].events)); } else if (events[i].events & EPOLLERR) { - logger.error("IO broker: error on file descriptor. fd={} events={:#x}", fd, uint32_t(events[i].events)); + logger.error("Error on file descriptor. fd={} events={:#x}", fd, uint32_t(events[i].events)); } else { - logger.error("IO broker: unhandled epoll event. fd={} events={:#x}", fd, uint32_t(events[i].events)); + logger.error("Unhandled epoll event. fd={} events={:#x}", fd, uint32_t(events[i].events)); } // Unregister the faulty file descriptor from epoll bool success = unregister_fd(fd); if (!success) { - logger.error("IO broker: failed to unregister file descriptor. fd={}", fd); + logger.error("Failed to unregister file descriptor. fd={}", fd); } return; } @@ -114,10 +114,10 @@ void io_broker_epoll::thread_loop() std::lock_guard lock(event_handler_mutex); const auto& it = event_handler.find(fd); if (it != event_handler.end()) { - logger.debug("IO broker: handling event. fd={}", fd); + logger.debug("Handling event. fd={}", fd); it->second->handle_event(fd, events[i]); } else { - logger.error("IO broker: could not find event handler. fd={}", fd); + logger.error("Could not find event handler. fd={}", fd); } } } @@ -130,14 +130,14 @@ bool io_broker_epoll::register_fd(int fd, recv_callback_t handler) ev.data.fd = fd; ev.events = EPOLLIN; if (::epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &ev) == -1) { - logger.error("IO broker: failed to register file descriptor. fd={} error={}", fd, strerror(errno)); + logger.error("Failed to register file descriptor. fd={} error={}", fd, strerror(errno)); return false; } std::lock_guard lock(event_handler_mutex); event_handler.insert({fd, std::make_unique(handler)}); - logger.debug("IO broker: registered file descriptor. fd={}", fd); + logger.debug("Registered file descriptor. fd={}", fd); return true; } @@ -148,13 +148,13 @@ bool io_broker_epoll::unregister_fd(int fd) ev.data.fd = fd; ev.events = EPOLLIN; if (::epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, &ev) == -1) { - logger.error("IO broker: failed to unregister file descriptor. fd={} error={}", fd, strerror(errno)); + logger.error("Failed to unregister file descriptor. fd={} error={}", fd, strerror(errno)); return false; } std::lock_guard lock(event_handler_mutex); event_handler.erase(fd); - logger.debug("IO broker: unregistered file descriptor. fd={}", fd); + logger.debug("Unregistered file descriptor. fd={}", fd); return true; } From 78bb8d99ae8e22503903faf6db4ab75463689b3e Mon Sep 17 00:00:00 2001 From: Piotr Gawlowicz Date: Mon, 12 Feb 2024 11:05:13 +0100 Subject: [PATCH 30/78] readme: add link to tutorials in readme file --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index a4cf2db24c..6f5a219cc9 100644 --- a/README.md +++ b/README.md @@ -75,3 +75,8 @@ cmake ../ make make test ``` + +How to deploy a 5G network? +---------------------------------------------- + +Check our [tutorials](https://docs.srsran.com/projects/project/en/latest/tutorials/source/index.html) that describe how to set up an end-to-end 5G SA system with srsRAN Project. \ No newline at end of file From 9a5883fcec8240033d7057c0a8a788f5ed345a8a Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Tue, 13 Feb 2024 11:31:44 +0100 Subject: [PATCH 31/78] asn1: use forward declaratations to reduce rrc_nr asn1 header sizes --- apps/examples/du/du_example.cpp | 3 +- include/srsran/asn1/asn1_utils.h | 1 - include/srsran/asn1/rrc_nr/bcch_bch_msg.h | 132 + include/srsran/asn1/rrc_nr/bcch_dl_sch_msg.h | 124 + include/srsran/asn1/rrc_nr/bwp_cfg.h | 10488 ++++++ .../srsran/asn1/rrc_nr/cell_group_config.h | 621 +- include/srsran/asn1/rrc_nr/dl_ccch_msg.h | 124 + .../{msg_common.h => dl_ccch_msg_ies.h} | 1847 +- include/srsran/asn1/rrc_nr/dl_dcch_msg.h | 7024 +--- include/srsran/asn1/rrc_nr/dl_dcch_msg_ies.h | 6895 ++++ .../srsran/asn1/rrc_nr/nr_sidelink_preconf.h | 2 +- include/srsran/asn1/rrc_nr/nr_ue_variables.h | 3 +- .../srsran/asn1/rrc_nr/pc5_rrc_definitions.h | 36 +- include/srsran/asn1/rrc_nr/pcch_msg.h | 109 + include/srsran/asn1/rrc_nr/pcch_msg_ies.h | 138 + include/srsran/asn1/rrc_nr/radio_bearer_cfg.h | 753 + include/srsran/asn1/rrc_nr/rrc_nr.h | 7962 +--- include/srsran/asn1/rrc_nr/serving_cell.h | 11609 +----- include/srsran/asn1/rrc_nr/sys_info.h | 4601 +++ include/srsran/asn1/rrc_nr/ue_cap.h | 353 + include/srsran/asn1/rrc_nr/ul_ccch1_msg.h | 136 + include/srsran/asn1/rrc_nr/ul_ccch_msg.h | 146 + include/srsran/asn1/rrc_nr/ul_ccch_msg_ies.h | 335 + include/srsran/asn1/rrc_nr/ul_dcch_msg.h | 7670 +--- include/srsran/asn1/rrc_nr/ul_dcch_msg_ies.h | 9167 +++++ lib/asn1/CMakeLists.txt | 7 +- lib/asn1/asn1_utils.cpp | 1 + lib/asn1/rrc_nr/CMakeLists.txt | 36 + lib/asn1/rrc_nr/bcch_bch_msg.cpp | 213 + lib/asn1/rrc_nr/bcch_dl_sch_msg.cpp | 212 + lib/asn1/rrc_nr/bwp_cfg.cpp | 28094 ++++++++++++++ lib/asn1/rrc_nr/cell_group_config.cpp | 1234 +- lib/asn1/rrc_nr/common.cpp | 141 +- lib/asn1/rrc_nr/dl_ccch_msg.cpp | 228 + .../{msg_common.cpp => dl_ccch_msg_ies.cpp} | 7028 +--- lib/asn1/rrc_nr/dl_dcch_msg.cpp | 17475 +-------- lib/asn1/rrc_nr/dl_dcch_msg_ies.cpp | 17456 +++++++++ lib/asn1/rrc_nr/nr_sidelink_preconf.cpp | 2 - lib/asn1/rrc_nr/nr_ue_variables.cpp | 2 - lib/asn1/rrc_nr/pc5_rrc_definitions.cpp | 138 - lib/asn1/rrc_nr/pcch_msg.cpp | 186 + lib/asn1/rrc_nr/pcch_msg_ies.cpp | 325 + lib/asn1/rrc_nr/radio_bearer_cfg.cpp | 1694 + lib/asn1/rrc_nr/rrc_nr.cpp | 24552 ++---------- lib/asn1/rrc_nr/serving_cell.cpp | 31353 ++-------------- lib/asn1/rrc_nr/sys_info.cpp | 11291 ++++++ lib/asn1/rrc_nr/ue_cap.cpp | 1943 +- lib/asn1/rrc_nr/ul_ccch1_msg.cpp | 261 + lib/asn1/rrc_nr/ul_ccch_msg.cpp | 241 + lib/asn1/rrc_nr/ul_ccch_msg_ies.cpp | 651 + lib/asn1/rrc_nr/ul_dcch_msg.cpp | 19687 +--------- lib/asn1/rrc_nr/ul_dcch_msg_ies.cpp | 22751 +++++++++++ .../converters/f1ap_configuration_helpers.cpp | 1 + lib/mac/mac_dl/paging_pdu_assembler.cpp | 2 +- .../rrc_reestablishment_procedure.cpp | 1 + .../rrc_security_mode_command_procedure.h | 2 +- lib/rrc/ue/procedures/rrc_setup_procedure.cpp | 1 + lib/rrc/ue/procedures/rrc_setup_procedure.h | 1 - lib/rrc/ue/procedures/rrc_ue_event_manager.h | 2 +- lib/rrc/ue/rrc_asn1_converters.h | 1 - .../rrc_measurement_types_asn1_converters.h | 1 - lib/rrc/ue/rrc_ue_context.cpp | 1 + lib/rrc/ue/rrc_ue_context.h | 3 +- lib/rrc/ue/rrc_ue_helpers.cpp | 8 +- lib/rrc/ue/rrc_ue_impl.cpp | 1 + lib/rrc/ue/rrc_ue_message_handlers.cpp | 2 + lib/rrc/ue/rrc_ue_message_senders.cpp | 2 + .../cu_cp/cu_cp_connectivity_test.cpp | 3 +- .../cu_cp/cu_cp_test_environment.cpp | 3 +- tests/unittests/du_manager/sib_test.cpp | 4 +- tests/unittests/rrc/rrc_ue_test_helpers.h | 1 + tests/unittests/rrc/rrc_ue_test_messages.cpp | 2 + tests/unittests/rrc/rrc_ue_test_messages.h | 2 +- 73 files changed, 128734 insertions(+), 128791 deletions(-) create mode 100644 include/srsran/asn1/rrc_nr/bcch_bch_msg.h create mode 100644 include/srsran/asn1/rrc_nr/bcch_dl_sch_msg.h create mode 100644 include/srsran/asn1/rrc_nr/bwp_cfg.h create mode 100644 include/srsran/asn1/rrc_nr/dl_ccch_msg.h rename include/srsran/asn1/rrc_nr/{msg_common.h => dl_ccch_msg_ies.h} (70%) create mode 100644 include/srsran/asn1/rrc_nr/dl_dcch_msg_ies.h create mode 100644 include/srsran/asn1/rrc_nr/pcch_msg.h create mode 100644 include/srsran/asn1/rrc_nr/pcch_msg_ies.h create mode 100644 include/srsran/asn1/rrc_nr/radio_bearer_cfg.h create mode 100644 include/srsran/asn1/rrc_nr/sys_info.h create mode 100644 include/srsran/asn1/rrc_nr/ul_ccch1_msg.h create mode 100644 include/srsran/asn1/rrc_nr/ul_ccch_msg.h create mode 100644 include/srsran/asn1/rrc_nr/ul_ccch_msg_ies.h create mode 100644 include/srsran/asn1/rrc_nr/ul_dcch_msg_ies.h create mode 100644 lib/asn1/rrc_nr/CMakeLists.txt create mode 100644 lib/asn1/rrc_nr/bcch_bch_msg.cpp create mode 100644 lib/asn1/rrc_nr/bcch_dl_sch_msg.cpp create mode 100644 lib/asn1/rrc_nr/bwp_cfg.cpp create mode 100644 lib/asn1/rrc_nr/dl_ccch_msg.cpp rename lib/asn1/rrc_nr/{msg_common.cpp => dl_ccch_msg_ies.cpp} (71%) create mode 100644 lib/asn1/rrc_nr/dl_dcch_msg_ies.cpp create mode 100644 lib/asn1/rrc_nr/pcch_msg.cpp create mode 100644 lib/asn1/rrc_nr/pcch_msg_ies.cpp create mode 100644 lib/asn1/rrc_nr/radio_bearer_cfg.cpp create mode 100644 lib/asn1/rrc_nr/sys_info.cpp create mode 100644 lib/asn1/rrc_nr/ul_ccch1_msg.cpp create mode 100644 lib/asn1/rrc_nr/ul_ccch_msg.cpp create mode 100644 lib/asn1/rrc_nr/ul_ccch_msg_ies.cpp create mode 100644 lib/asn1/rrc_nr/ul_dcch_msg_ies.cpp diff --git a/apps/examples/du/du_example.cpp b/apps/examples/du/du_example.cpp index 88c283303e..ae501a61d8 100644 --- a/apps/examples/du/du_example.cpp +++ b/apps/examples/du/du_example.cpp @@ -14,7 +14,8 @@ #include "radio_notifier_sample.h" #include "srsran/asn1/f1ap/common.h" #include "srsran/asn1/f1ap/f1ap_pdu_contents.h" -#include "srsran/asn1/rrc_nr/msg_common.h" +#include "srsran/asn1/rrc_nr/dl_ccch_msg.h" +#include "srsran/asn1/rrc_nr/dl_dcch_msg_ies.h" #include "srsran/du/du_cell_config_helpers.h" #include "srsran/du_high/du_high_factory.h" #include "srsran/f1ap/common/f1ap_message.h" diff --git a/include/srsran/asn1/asn1_utils.h b/include/srsran/asn1/asn1_utils.h index 27b35697a8..b0b131759f 100644 --- a/include/srsran/asn1/asn1_utils.h +++ b/include/srsran/asn1/asn1_utils.h @@ -11,7 +11,6 @@ #pragma once #include "srsran/adt/any.h" -#include "srsran/adt/bounded_bitset.h" #include "srsran/adt/byte_buffer.h" #include "srsran/adt/span.h" #include "srsran/srslog/srslog.h" diff --git a/include/srsran/asn1/rrc_nr/bcch_bch_msg.h b/include/srsran/asn1/rrc_nr/bcch_bch_msg.h new file mode 100644 index 0000000000..9188ff7b55 --- /dev/null +++ b/include/srsran/asn1/rrc_nr/bcch_bch_msg.h @@ -0,0 +1,132 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "srsran/asn1/asn1_utils.h" + +namespace asn1 { +namespace rrc_nr { + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// PDCCH-ConfigSIB1 ::= SEQUENCE +struct pdcch_cfg_sib1_s { + uint8_t coreset_zero = 0; + uint8_t search_space_zero = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MIB ::= SEQUENCE +struct mib_s { + struct sub_carrier_spacing_common_opts { + enum options { scs15or60, scs30or120, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using sub_carrier_spacing_common_e_ = enumerated; + struct dmrs_type_a_position_opts { + enum options { pos2, pos3, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using dmrs_type_a_position_e_ = enumerated; + struct cell_barred_opts { + enum options { barred, not_barred, nulltype } value; + + const char* to_string() const; + }; + using cell_barred_e_ = enumerated; + struct intra_freq_resel_opts { + enum options { allowed, not_allowed, nulltype } value; + + const char* to_string() const; + }; + using intra_freq_resel_e_ = enumerated; + + // member variables + fixed_bitstring<6> sys_frame_num; + sub_carrier_spacing_common_e_ sub_carrier_spacing_common; + uint8_t ssb_subcarrier_offset = 0; + dmrs_type_a_position_e_ dmrs_type_a_position; + pdcch_cfg_sib1_s pdcch_cfg_sib1; + cell_barred_e_ cell_barred; + intra_freq_resel_e_ intra_freq_resel; + fixed_bitstring<1> spare; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BCCH-BCH-MessageType ::= CHOICE +struct bcch_bch_msg_type_c { + struct types_opts { + enum options { mib, msg_class_ext, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + bcch_bch_msg_type_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 + mib_s& mib() + { + assert_choice_type(types::mib, type_, "BCCH-BCH-MessageType"); + return c; + } + const mib_s& mib() const + { + assert_choice_type(types::mib, type_, "BCCH-BCH-MessageType"); + return c; + } + mib_s& set_mib(); + void set_msg_class_ext(); + +private: + types type_; + mib_s c; +}; + +// BCCH-BCH-Message ::= SEQUENCE +struct bcch_bch_msg_s { + bcch_bch_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; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/bcch_dl_sch_msg.h b/include/srsran/asn1/rrc_nr/bcch_dl_sch_msg.h new file mode 100644 index 0000000000..82c6f6ccb2 --- /dev/null +++ b/include/srsran/asn1/rrc_nr/bcch_dl_sch_msg.h @@ -0,0 +1,124 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "srsran/asn1/asn1_utils.h" + +namespace asn1 { +namespace rrc_nr { + +struct sys_info_s; +struct sib1_s; + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// BCCH-DL-SCH-MessageType ::= CHOICE +struct bcch_dl_sch_msg_type_c { + struct c1_c_ { + struct types_opts { + enum options { sys_info, sib_type1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // 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 + sys_info_s& sys_info() + { + assert_choice_type(types::sys_info, type_, "c1"); + return c.get(); + } + sib1_s& sib_type1() + { + assert_choice_type(types::sib_type1, type_, "c1"); + return c.get(); + } + const sys_info_s& sys_info() const + { + assert_choice_type(types::sys_info, type_, "c1"); + return c.get(); + } + const sib1_s& sib_type1() const + { + assert_choice_type(types::sib_type1, type_, "c1"); + return c.get(); + } + sys_info_s& set_sys_info(); + sib1_s& set_sib_type1(); + + private: + types type_; + choice_buffer_ptr c; + }; + struct types_opts { + enum options { c1, msg_class_ext, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + bcch_dl_sch_msg_type_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 + c1_c_& c1() + { + assert_choice_type(types::c1, type_, "BCCH-DL-SCH-MessageType"); + return c; + } + const c1_c_& c1() const + { + assert_choice_type(types::c1, type_, "BCCH-DL-SCH-MessageType"); + return c; + } + c1_c_& set_c1(); + void set_msg_class_ext(); + +private: + types type_; + c1_c_ c; +}; + +// BCCH-DL-SCH-Message ::= SEQUENCE +struct bcch_dl_sch_msg_s { + bcch_dl_sch_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; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/bwp_cfg.h b/include/srsran/asn1/rrc_nr/bwp_cfg.h new file mode 100644 index 0000000000..1fd0756f58 --- /dev/null +++ b/include/srsran/asn1/rrc_nr/bwp_cfg.h @@ -0,0 +1,10488 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "common.h" + +namespace asn1 { +namespace rrc_nr { + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// MsgA-DMRS-Config-r16 ::= SEQUENCE +struct msg_a_dmrs_cfg_r16_s { + struct msg_a_dmrs_add_position_r16_opts { + enum options { pos0, pos1, pos3, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using msg_a_dmrs_add_position_r16_e_ = enumerated; + + // member variables + bool msg_a_dmrs_add_position_r16_present = false; + bool msg_a_max_len_r16_present = false; + bool msg_a_pusch_dmrs_cdm_group_r16_present = false; + bool msg_a_pusch_nrof_ports_r16_present = false; + bool msg_a_scrambling_id0_r16_present = false; + bool msg_a_scrambling_id1_r16_present = false; + msg_a_dmrs_add_position_r16_e_ msg_a_dmrs_add_position_r16; + uint8_t msg_a_pusch_dmrs_cdm_group_r16 = 0; + uint8_t msg_a_pusch_nrof_ports_r16 = 0; + uint32_t msg_a_scrambling_id0_r16 = 0; + uint32_t msg_a_scrambling_id1_r16 = 0; + + // 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pwr_ramp_step_high_prio_e_ = enumerated; + struct scaling_factor_bi_opts { + enum options { zero, dot25, dot5, dot75, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using scaling_factor_bi_e_ = enumerated; + + // 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; +}; + +// MsgA-PUSCH-Resource-r16 ::= SEQUENCE +struct msg_a_pusch_res_r16_s { + struct nrof_msg_a_po_per_slot_r16_opts { + enum options { one, two, three, six, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using nrof_msg_a_po_per_slot_r16_e_ = enumerated; + struct map_type_msg_a_pusch_r16_opts { + enum options { type_a, type_b, nulltype } value; + + const char* to_string() const; + }; + using map_type_msg_a_pusch_r16_e_ = enumerated; + struct nrof_msg_a_po_fdm_r16_opts { + enum options { one, two, four, eight, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using nrof_msg_a_po_fdm_r16_e_ = enumerated; + struct msg_a_alpha_r16_opts { + enum options { alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using msg_a_alpha_r16_e_ = enumerated; + + // member variables + bool ext = false; + bool msg_a_pusch_time_domain_alloc_r16_present = false; + bool start_symbol_and_len_msg_a_po_r16_present = false; + bool map_type_msg_a_pusch_r16_present = false; + bool guard_period_msg_a_pusch_r16_present = false; + bool msg_a_intra_slot_freq_hop_r16_present = false; + bool msg_a_hop_bits_r16_present = false; + bool msg_a_alpha_r16_present = false; + bool interlace_idx_first_po_msg_a_pusch_r16_present = false; + bool nrof_interlaces_per_msg_a_po_r16_present = false; + uint8_t msg_a_mcs_r16 = 0; + uint8_t nrof_slots_msg_a_pusch_r16 = 1; + nrof_msg_a_po_per_slot_r16_e_ nrof_msg_a_po_per_slot_r16; + uint8_t msg_a_pusch_time_domain_offset_r16 = 1; + uint8_t msg_a_pusch_time_domain_alloc_r16 = 1; + uint8_t start_symbol_and_len_msg_a_po_r16 = 0; + map_type_msg_a_pusch_r16_e_ map_type_msg_a_pusch_r16; + uint8_t guard_period_msg_a_pusch_r16 = 0; + uint8_t guard_band_msg_a_pusch_r16 = 0; + uint16_t freq_start_msg_a_pusch_r16 = 0; + uint8_t nrof_prbs_per_msg_a_po_r16 = 1; + nrof_msg_a_po_fdm_r16_e_ nrof_msg_a_po_fdm_r16; + fixed_bitstring<2> msg_a_hop_bits_r16; + msg_a_dmrs_cfg_r16_s msg_a_dmrs_cfg_r16; + uint8_t nrof_dmrs_seqs_r16 = 1; + msg_a_alpha_r16_e_ msg_a_alpha_r16; + uint8_t interlace_idx_first_po_msg_a_pusch_r16 = 1; + uint8_t nrof_interlaces_per_msg_a_po_r16 = 1; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NSAG-List-r17 ::= SEQUENCE (SIZE (1..8)) OF BIT STRING (SIZE (8)) +using nsag_list_r17_l = bounded_array, 8>; + +// RA-PrioritizationSliceInfo-r17 ::= SEQUENCE +struct ra_prioritization_slice_info_r17_s { + using nsag_id_list_r17_l_ = bounded_array, 8>; + + // member variables + bool ext = false; + nsag_id_list_r17_l_ nsag_id_list_r17; + ra_prioritization_s ra_prioritization_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FeatureCombination-r17 ::= SEQUENCE +struct feature_combination_r17_s { + bool red_cap_r17_present = false; + bool small_data_r17_present = false; + bool msg3_repeats_r17_present = false; + bool spare4_present = false; + bool spare3_present = false; + bool spare2_present = false; + bool spare1_present = false; + nsag_list_r17_l nsag_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MsgA-PUSCH-Config-r16 ::= SEQUENCE +struct msg_a_pusch_cfg_r16_s { + struct msg_a_transform_precoder_r16_opts { + enum options { enabled, disabled, nulltype } value; + + const char* to_string() const; + }; + using msg_a_transform_precoder_r16_e_ = enumerated; + + // member variables + bool msg_a_pusch_res_group_a_r16_present = false; + bool msg_a_pusch_res_group_b_r16_present = false; + bool msg_a_transform_precoder_r16_present = false; + bool msg_a_data_scrambling_idx_r16_present = false; + bool msg_a_delta_preamb_r16_present = false; + msg_a_pusch_res_r16_s msg_a_pusch_res_group_a_r16; + msg_a_pusch_res_r16_s msg_a_pusch_res_group_b_r16; + msg_a_transform_precoder_r16_e_ msg_a_transform_precoder_r16; + uint16_t msg_a_data_scrambling_idx_r16 = 0; + int8_t msg_a_delta_preamb_r16 = -1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RA-PrioritizationSliceInfoList-r17 ::= SEQUENCE (SIZE (1..8)) OF RA-PrioritizationSliceInfo-r17 +using ra_prioritization_slice_info_list_r17_l = dyn_array; + +// FeatureCombinationPreambles-r17 ::= SEQUENCE +struct feature_combination_preambs_r17_s { + struct group_bcfg_r17_s_ { + struct ra_size_group_a_r17_opts { + enum options { + b56, + b144, + b208, + b256, + b282, + b480, + b640, + b800, + b1000, + b72, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using ra_size_group_a_r17_e_ = enumerated; + struct msg_pwr_offset_group_b_r17_opts { + enum options { minusinfinity, db0, db5, db8, db10, db12, db15, db18, nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using msg_pwr_offset_group_b_r17_e_ = enumerated; + + // member variables + ra_size_group_a_r17_e_ ra_size_group_a_r17; + msg_pwr_offset_group_b_r17_e_ msg_pwr_offset_group_b_r17; + uint8_t nof_ra_preambs_group_a_r17 = 1; + }; + + // member variables + bool ext = false; + bool ssb_shared_ro_mask_idx_r17_present = false; + bool group_bcfg_r17_present = false; + bool separate_msg_a_pusch_cfg_r17_present = false; + bool msg_a_rsrp_thres_r17_present = false; + bool rsrp_thres_ssb_r17_present = false; + bool delta_preamb_r17_present = false; + feature_combination_r17_s feature_combination_r17; + uint8_t start_preamb_for_this_partition_r17 = 0; + uint8_t nof_preambs_per_ssb_for_this_partition_r17 = 1; + uint8_t ssb_shared_ro_mask_idx_r17 = 1; + group_bcfg_r17_s_ group_bcfg_r17; + msg_a_pusch_cfg_r16_s separate_msg_a_pusch_cfg_r17; + uint8_t msg_a_rsrp_thres_r17 = 0; + uint8_t rsrp_thres_ssb_r17 = 0; + int8_t delta_preamb_r17 = -1; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// GroupB-ConfiguredTwoStepRA-r16 ::= SEQUENCE +struct group_b_cfg_two_step_ra_r16_s { + struct ra_msg_a_size_group_a_opts { + enum options { + b56, + b144, + b208, + b256, + b282, + b480, + b640, + b800, + b1000, + b72, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using ra_msg_a_size_group_a_e_ = enumerated; + struct msg_pwr_offset_group_b_opts { + enum options { minusinfinity, db0, db5, db8, db10, db12, db15, db18, nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using msg_pwr_offset_group_b_e_ = enumerated; + + // member variables + ra_msg_a_size_group_a_e_ ra_msg_a_size_group_a; + msg_pwr_offset_group_b_e_ msg_pwr_offset_group_b; + uint8_t nof_ra_preambs_group_a = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RA-PrioritizationForSlicing-r17 ::= SEQUENCE +struct ra_prioritization_for_slicing_r17_s { + bool ext = false; + ra_prioritization_slice_info_list_r17_l ra_prioritization_slice_info_list_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RACH-ConfigGenericTwoStepRA-r16 ::= SEQUENCE +struct rach_cfg_generic_two_step_ra_r16_s { + struct msg_a_ro_fdm_r16_opts { + enum options { one, two, four, eight, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using msg_a_ro_fdm_r16_e_ = enumerated; + struct msg_a_preamb_pwr_ramp_step_r16_opts { + enum options { db0, db2, db4, db6, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using msg_a_preamb_pwr_ramp_step_r16_e_ = enumerated; + struct msg_b_resp_win_r16_opts { + enum options { sl1, sl2, sl4, sl8, sl10, sl20, sl40, sl80, sl160, sl320, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using msg_b_resp_win_r16_e_ = enumerated; + struct preamb_trans_max_r16_opts { + enum options { n3, n4, n5, n6, n7, n8, n10, n20, n50, n100, n200, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preamb_trans_max_r16_e_ = enumerated; + struct msg_b_resp_win_v1700_opts { + enum options { sl240, sl640, sl960, sl1280, sl1920, sl2560, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using msg_b_resp_win_v1700_e_ = enumerated; + + // member variables + bool ext = false; + bool msg_a_prach_cfg_idx_r16_present = false; + bool msg_a_ro_fdm_r16_present = false; + bool msg_a_ro_freq_start_r16_present = false; + bool msg_a_zero_correlation_zone_cfg_r16_present = false; + bool msg_a_preamb_pwr_ramp_step_r16_present = false; + bool msg_a_preamb_rx_target_pwr_r16_present = false; + bool msg_b_resp_win_r16_present = false; + bool preamb_trans_max_r16_present = false; + uint16_t msg_a_prach_cfg_idx_r16 = 0; + msg_a_ro_fdm_r16_e_ msg_a_ro_fdm_r16; + uint16_t msg_a_ro_freq_start_r16 = 0; + uint8_t msg_a_zero_correlation_zone_cfg_r16 = 0; + msg_a_preamb_pwr_ramp_step_r16_e_ msg_a_preamb_pwr_ramp_step_r16; + int16_t msg_a_preamb_rx_target_pwr_r16 = -202; + msg_b_resp_win_r16_e_ msg_b_resp_win_r16; + preamb_trans_max_r16_e_ preamb_trans_max_r16; + // ... + // group 0 + bool msg_b_resp_win_v1700_present = false; + msg_b_resp_win_v1700_e_ msg_b_resp_win_v1700; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RACH-ConfigCommonTwoStepRA-r16 ::= SEQUENCE +struct rach_cfg_common_two_step_ra_r16_s { + struct msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_ { + struct one_eighth_opts { + enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using one_eighth_e_ = enumerated; + struct one_fourth_opts { + enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using one_fourth_e_ = enumerated; + struct one_half_opts { + enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using one_half_e_ = enumerated; + struct one_opts { + enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using one_e_ = enumerated; + struct two_opts { + enum options { n4, n8, n12, n16, n20, n24, n28, n32, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using two_e_ = enumerated; + struct types_opts { + enum options { one_eighth, one_fourth, one_half, one, two, four, eight, sixteen, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using types = enumerated; + + // choice methods + msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_() = default; + msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_( + const msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_& other); + msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_& + operator=(const msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_& other); + ~msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_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 + one_eighth_e_& one_eighth() + { + assert_choice_type(types::one_eighth, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + one_fourth_e_& one_fourth() + { + assert_choice_type(types::one_fourth, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + one_half_e_& one_half() + { + assert_choice_type(types::one_half, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + one_e_& one() + { + assert_choice_type(types::one, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + two_e_& two() + { + assert_choice_type(types::two, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + uint8_t& four() + { + assert_choice_type(types::four, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + uint8_t& eight() + { + assert_choice_type(types::eight, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + uint8_t& sixteen() + { + assert_choice_type(types::sixteen, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + const one_eighth_e_& one_eighth() const + { + assert_choice_type(types::one_eighth, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + const one_fourth_e_& one_fourth() const + { + assert_choice_type(types::one_fourth, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + const one_half_e_& one_half() const + { + assert_choice_type(types::one_half, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + const one_e_& one() const + { + assert_choice_type(types::one, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + const two_e_& two() const + { + assert_choice_type(types::two, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + const uint8_t& four() const + { + assert_choice_type(types::four, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + const uint8_t& eight() const + { + assert_choice_type(types::eight, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + const uint8_t& sixteen() const + { + assert_choice_type(types::sixteen, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + return c.get(); + } + one_eighth_e_& set_one_eighth(); + one_fourth_e_& set_one_fourth(); + one_half_e_& set_one_half(); + one_e_& set_one(); + two_e_& set_two(); + uint8_t& set_four(); + uint8_t& set_eight(); + uint8_t& set_sixteen(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct msg_a_prach_root_seq_idx_r16_c_ { + struct types_opts { + enum options { l839, l139, l571, l1151, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + msg_a_prach_root_seq_idx_r16_c_() = default; + msg_a_prach_root_seq_idx_r16_c_(const msg_a_prach_root_seq_idx_r16_c_& other); + msg_a_prach_root_seq_idx_r16_c_& operator=(const msg_a_prach_root_seq_idx_r16_c_& other); + ~msg_a_prach_root_seq_idx_r16_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& l839() + { + assert_choice_type(types::l839, type_, "msgA-PRACH-RootSequenceIndex-r16"); + return c.get(); + } + uint8_t& l139() + { + assert_choice_type(types::l139, type_, "msgA-PRACH-RootSequenceIndex-r16"); + return c.get(); + } + uint16_t& l571() + { + assert_choice_type(types::l571, type_, "msgA-PRACH-RootSequenceIndex-r16"); + return c.get(); + } + uint16_t& l1151() + { + assert_choice_type(types::l1151, type_, "msgA-PRACH-RootSequenceIndex-r16"); + return c.get(); + } + const uint16_t& l839() const + { + assert_choice_type(types::l839, type_, "msgA-PRACH-RootSequenceIndex-r16"); + return c.get(); + } + const uint8_t& l139() const + { + assert_choice_type(types::l139, type_, "msgA-PRACH-RootSequenceIndex-r16"); + return c.get(); + } + const uint16_t& l571() const + { + assert_choice_type(types::l571, type_, "msgA-PRACH-RootSequenceIndex-r16"); + return c.get(); + } + const uint16_t& l1151() const + { + assert_choice_type(types::l1151, type_, "msgA-PRACH-RootSequenceIndex-r16"); + return c.get(); + } + uint16_t& set_l839(); + uint8_t& set_l139(); + uint16_t& set_l571(); + uint16_t& set_l1151(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct msg_a_trans_max_r16_opts { + enum options { n1, n2, n4, n6, n8, n10, n20, n50, n100, n200, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using msg_a_trans_max_r16_e_ = enumerated; + struct msg_a_restricted_set_cfg_r16_opts { + enum options { unrestricted_set, restricted_set_type_a, restricted_set_type_b, nulltype } value; + + const char* to_string() const; + }; + using msg_a_restricted_set_cfg_r16_e_ = enumerated; + struct ra_prioritization_for_access_id_two_step_r16_s_ { + ra_prioritization_s ra_prioritization_r16; + fixed_bitstring<2> ra_prioritization_for_ai_r16; + }; + struct ra_contention_resolution_timer_r16_opts { + enum options { sf8, sf16, sf24, sf32, sf40, sf48, sf56, sf64, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ra_contention_resolution_timer_r16_e_ = enumerated; + using feature_combination_preambs_list_r17_l_ = dyn_array; + + // member variables + bool ext = false; + bool msg_a_total_nof_ra_preambs_r16_present = false; + bool msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_present = false; + bool msg_a_cb_preambs_per_ssb_per_shared_ro_r16_present = false; + bool msg_a_ssb_shared_ro_mask_idx_r16_present = false; + bool group_b_cfg_two_step_ra_r16_present = false; + bool msg_a_prach_root_seq_idx_r16_present = false; + bool msg_a_trans_max_r16_present = false; + bool msg_a_rsrp_thres_r16_present = false; + bool msg_a_rsrp_thres_ssb_r16_present = false; + bool msg_a_subcarrier_spacing_r16_present = false; + bool msg_a_restricted_set_cfg_r16_present = false; + bool ra_prioritization_for_access_id_two_step_r16_present = false; + bool ra_contention_resolution_timer_r16_present = false; + rach_cfg_generic_two_step_ra_r16_s rach_cfg_generic_two_step_ra_r16; + uint8_t msg_a_total_nof_ra_preambs_r16 = 1; + msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_ msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16; + uint8_t msg_a_cb_preambs_per_ssb_per_shared_ro_r16 = 1; + uint8_t msg_a_ssb_shared_ro_mask_idx_r16 = 1; + group_b_cfg_two_step_ra_r16_s group_b_cfg_two_step_ra_r16; + msg_a_prach_root_seq_idx_r16_c_ msg_a_prach_root_seq_idx_r16; + msg_a_trans_max_r16_e_ msg_a_trans_max_r16; + uint8_t msg_a_rsrp_thres_r16 = 0; + uint8_t msg_a_rsrp_thres_ssb_r16 = 0; + subcarrier_spacing_e msg_a_subcarrier_spacing_r16; + msg_a_restricted_set_cfg_r16_e_ msg_a_restricted_set_cfg_r16; + ra_prioritization_for_access_id_two_step_r16_s_ ra_prioritization_for_access_id_two_step_r16; + ra_contention_resolution_timer_r16_e_ ra_contention_resolution_timer_r16; + // ... + // group 0 + copy_ptr ra_prioritization_for_slicing_two_step_r17; + copy_ptr feature_combination_preambs_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RACH-ConfigGeneric ::= SEQUENCE +struct rach_cfg_generic_s { + struct msg1_fdm_opts { + enum options { one, two, four, eight, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using msg1_fdm_e_ = enumerated; + struct preamb_trans_max_opts { + enum options { n3, n4, n5, n6, n7, n8, n10, n20, n50, n100, n200, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preamb_trans_max_e_ = enumerated; + struct pwr_ramp_step_opts { + enum options { db0, db2, db4, db6, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pwr_ramp_step_e_ = enumerated; + struct ra_resp_win_opts { + enum options { sl1, sl2, sl4, sl8, sl10, sl20, sl40, sl80, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ra_resp_win_e_ = enumerated; + struct prach_cfg_period_scaling_iab_r16_opts { + enum options { scf1, scf2, scf4, scf8, scf16, scf32, scf64, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using prach_cfg_period_scaling_iab_r16_e_ = enumerated; + struct ra_resp_win_v1610_opts { + enum options { sl60, sl160, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ra_resp_win_v1610_e_ = enumerated; + struct ra_resp_win_v1700_opts { + enum options { sl240, sl320, sl640, sl960, sl1280, sl1920, sl2560, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using ra_resp_win_v1700_e_ = enumerated; + + // member variables + bool ext = false; + uint16_t prach_cfg_idx = 0; + msg1_fdm_e_ msg1_fdm; + uint16_t msg1_freq_start = 0; + uint8_t zero_correlation_zone_cfg = 0; + int16_t preamb_rx_target_pwr = -202; + preamb_trans_max_e_ preamb_trans_max; + pwr_ramp_step_e_ pwr_ramp_step; + ra_resp_win_e_ ra_resp_win; + // ... + // group 0 + bool prach_cfg_period_scaling_iab_r16_present = false; + bool prach_cfg_frame_offset_iab_r16_present = false; + bool prach_cfg_s_offset_iab_r16_present = false; + bool ra_resp_win_v1610_present = false; + bool prach_cfg_idx_v1610_present = false; + prach_cfg_period_scaling_iab_r16_e_ prach_cfg_period_scaling_iab_r16; + uint8_t prach_cfg_frame_offset_iab_r16 = 0; + uint8_t prach_cfg_s_offset_iab_r16 = 0; + ra_resp_win_v1610_e_ ra_resp_win_v1610; + uint16_t prach_cfg_idx_v1610 = 256; + // group 1 + bool ra_resp_win_v1700_present = false; + ra_resp_win_v1700_e_ ra_resp_win_v1700; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MsgA-ConfigCommon-r16 ::= SEQUENCE +struct msg_a_cfg_common_r16_s { + bool msg_a_pusch_cfg_r16_present = false; + rach_cfg_common_two_step_ra_r16_s rach_cfg_common_two_step_ra_r16; + msg_a_pusch_cfg_r16_s msg_a_pusch_cfg_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-TimeDomainResourceAllocation ::= SEQUENCE +struct pdsch_time_domain_res_alloc_s { + struct map_type_opts { + enum options { type_a, type_b, nulltype } value; + + const char* to_string() const; + }; + using map_type_e_ = enumerated; + + // member variables + bool k0_present = false; + uint8_t k0 = 0; + map_type_e_ map_type; + uint8_t start_symbol_and_len = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-TimeDomainResourceAllocation-r16 ::= SEQUENCE +struct pdsch_time_domain_res_alloc_r16_s { + struct map_type_r16_opts { + enum options { type_a, type_b, nulltype } value; + + const char* to_string() const; + }; + using map_type_r16_e_ = enumerated; + struct repeat_num_r16_opts { + enum options { n2, n3, n4, n5, n6, n7, n8, n16, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using repeat_num_r16_e_ = enumerated; + struct repeat_num_v1730_opts { + enum options { n2, n3, n4, n5, n6, n7, n8, n16, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using repeat_num_v1730_e_ = enumerated; + + // member variables + bool ext = false; + bool k0_r16_present = false; + bool repeat_num_r16_present = false; + uint8_t k0_r16 = 0; + map_type_r16_e_ map_type_r16; + uint8_t start_symbol_and_len_r16 = 0; + repeat_num_r16_e_ repeat_num_r16; + // ... + // group 0 + bool k0_v1710_present = false; + uint8_t k0_v1710 = 33; + // group 1 + bool repeat_num_v1730_present = false; + repeat_num_v1730_e_ repeat_num_v1730; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-TimeDomainResourceAllocation ::= SEQUENCE +struct pusch_time_domain_res_alloc_s { + struct map_type_opts { + enum options { type_a, type_b, nulltype } value; + + const char* to_string() const; + }; + using map_type_e_ = enumerated; + + // member variables + bool k2_present = false; + uint8_t k2 = 0; + map_type_e_ map_type; + uint8_t start_symbol_and_len = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RACH-ConfigCommon ::= SEQUENCE +struct rach_cfg_common_s { + struct ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_ { + struct one_eighth_opts { + enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using one_eighth_e_ = enumerated; + struct one_fourth_opts { + enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using one_fourth_e_ = enumerated; + struct one_half_opts { + enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using one_half_e_ = enumerated; + struct one_opts { + enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using one_e_ = enumerated; + struct two_opts { + enum options { n4, n8, n12, n16, n20, n24, n28, n32, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using two_e_ = enumerated; + struct types_opts { + enum options { one_eighth, one_fourth, one_half, one, two, four, eight, sixteen, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using types = enumerated; + + // choice methods + ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_() = default; + ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_(const ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_& other); + ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_& + operator=(const ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_& other); + ~ssb_per_rach_occasion_and_cb_preambs_per_ssb_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 + one_eighth_e_& one_eighth() + { + assert_choice_type(types::one_eighth, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + one_fourth_e_& one_fourth() + { + assert_choice_type(types::one_fourth, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + one_half_e_& one_half() + { + assert_choice_type(types::one_half, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + one_e_& one() + { + assert_choice_type(types::one, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + two_e_& two() + { + assert_choice_type(types::two, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + uint8_t& four() + { + assert_choice_type(types::four, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + uint8_t& eight() + { + assert_choice_type(types::eight, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + uint8_t& sixteen() + { + assert_choice_type(types::sixteen, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + const one_eighth_e_& one_eighth() const + { + assert_choice_type(types::one_eighth, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + const one_fourth_e_& one_fourth() const + { + assert_choice_type(types::one_fourth, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + const one_half_e_& one_half() const + { + assert_choice_type(types::one_half, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + const one_e_& one() const + { + assert_choice_type(types::one, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + const two_e_& two() const + { + assert_choice_type(types::two, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + const uint8_t& four() const + { + assert_choice_type(types::four, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + const uint8_t& eight() const + { + assert_choice_type(types::eight, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + const uint8_t& sixteen() const + { + assert_choice_type(types::sixteen, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + return c.get(); + } + one_eighth_e_& set_one_eighth(); + one_fourth_e_& set_one_fourth(); + one_half_e_& set_one_half(); + one_e_& set_one(); + two_e_& set_two(); + uint8_t& set_four(); + uint8_t& set_eight(); + uint8_t& set_sixteen(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct group_bcfg_s_ { + struct ra_msg3_size_group_a_opts { + enum options { + b56, + b144, + b208, + b256, + b282, + b480, + b640, + b800, + b1000, + b72, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using ra_msg3_size_group_a_e_ = enumerated; + struct msg_pwr_offset_group_b_opts { + enum options { minusinfinity, db0, db5, db8, db10, db12, db15, db18, nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using msg_pwr_offset_group_b_e_ = enumerated; + + // member variables + ra_msg3_size_group_a_e_ ra_msg3_size_group_a; + msg_pwr_offset_group_b_e_ msg_pwr_offset_group_b; + uint8_t nof_ra_preambs_group_a = 1; + }; + struct ra_contention_resolution_timer_opts { + enum options { sf8, sf16, sf24, sf32, sf40, sf48, sf56, sf64, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ra_contention_resolution_timer_e_ = enumerated; + struct prach_root_seq_idx_c_ { + struct types_opts { + enum options { l839, l139, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + prach_root_seq_idx_c_() = default; + prach_root_seq_idx_c_(const prach_root_seq_idx_c_& other); + prach_root_seq_idx_c_& operator=(const prach_root_seq_idx_c_& other); + ~prach_root_seq_idx_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& l839() + { + assert_choice_type(types::l839, type_, "prach-RootSequenceIndex"); + return c.get(); + } + uint8_t& l139() + { + assert_choice_type(types::l139, type_, "prach-RootSequenceIndex"); + return c.get(); + } + const uint16_t& l839() const + { + assert_choice_type(types::l839, type_, "prach-RootSequenceIndex"); + return c.get(); + } + const uint8_t& l139() const + { + assert_choice_type(types::l139, type_, "prach-RootSequenceIndex"); + return c.get(); + } + uint16_t& set_l839(); + uint8_t& set_l139(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct restricted_set_cfg_opts { + enum options { unrestricted_set, restricted_set_type_a, restricted_set_type_b, nulltype } value; + + const char* to_string() const; + }; + using restricted_set_cfg_e_ = enumerated; + struct ra_prioritization_for_access_id_r16_s_ { + ra_prioritization_s ra_prioritization_r16; + fixed_bitstring<2> ra_prioritization_for_ai_r16; + }; + struct prach_root_seq_idx_r16_c_ { + struct types_opts { + enum options { l571, l1151, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + prach_root_seq_idx_r16_c_() = default; + prach_root_seq_idx_r16_c_(const prach_root_seq_idx_r16_c_& other); + prach_root_seq_idx_r16_c_& operator=(const prach_root_seq_idx_r16_c_& other); + ~prach_root_seq_idx_r16_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& l571() + { + assert_choice_type(types::l571, type_, "prach-RootSequenceIndex-r16"); + return c.get(); + } + uint16_t& l1151() + { + assert_choice_type(types::l1151, type_, "prach-RootSequenceIndex-r16"); + return c.get(); + } + const uint16_t& l571() const + { + assert_choice_type(types::l571, type_, "prach-RootSequenceIndex-r16"); + return c.get(); + } + const uint16_t& l1151() const + { + assert_choice_type(types::l1151, type_, "prach-RootSequenceIndex-r16"); + return c.get(); + } + uint16_t& set_l571(); + uint16_t& set_l1151(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + using feature_combination_preambs_list_r17_l_ = dyn_array; + + // member variables + bool ext = false; + bool total_nof_ra_preambs_present = false; + bool ssb_per_rach_occasion_and_cb_preambs_per_ssb_present = false; + bool group_bcfg_present = false; + bool rsrp_thres_ssb_present = false; + bool rsrp_thres_ssb_sul_present = false; + bool msg1_subcarrier_spacing_present = false; + bool msg3_transform_precoder_present = false; + rach_cfg_generic_s rach_cfg_generic; + uint8_t total_nof_ra_preambs = 1; + ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_ ssb_per_rach_occasion_and_cb_preambs_per_ssb; + group_bcfg_s_ group_bcfg; + ra_contention_resolution_timer_e_ ra_contention_resolution_timer; + uint8_t rsrp_thres_ssb = 0; + uint8_t rsrp_thres_ssb_sul = 0; + prach_root_seq_idx_c_ prach_root_seq_idx; + subcarrier_spacing_e msg1_subcarrier_spacing; + restricted_set_cfg_e_ restricted_set_cfg; + // ... + // group 0 + copy_ptr ra_prioritization_for_access_id_r16; + copy_ptr prach_root_seq_idx_r16; + // group 1 + copy_ptr ra_prioritization_for_slicing_r17; + copy_ptr feature_combination_preambs_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AdditionalRACH-Config-r17 ::= SEQUENCE +struct add_rach_cfg_r17_s { + bool ext = false; + bool rach_cfg_common_r17_present = false; + bool msg_a_cfg_common_r17_present = false; + rach_cfg_common_s rach_cfg_common_r17; + msg_a_cfg_common_r16_s msg_a_cfg_common_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ControlResourceSet ::= SEQUENCE +struct coreset_s { + struct cce_reg_map_type_c_ { + struct interleaved_s_ { + struct reg_bundle_size_opts { + enum options { n2, n3, n6, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using reg_bundle_size_e_ = enumerated; + struct interleaver_size_opts { + enum options { n2, n3, n6, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using interleaver_size_e_ = enumerated; + + // member variables + bool shift_idx_present = false; + reg_bundle_size_e_ reg_bundle_size; + interleaver_size_e_ interleaver_size; + uint16_t shift_idx = 0; + }; + struct types_opts { + enum options { interleaved, non_interleaved, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + cce_reg_map_type_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 + interleaved_s_& interleaved() + { + assert_choice_type(types::interleaved, type_, "cce-REG-MappingType"); + return c; + } + const interleaved_s_& interleaved() const + { + assert_choice_type(types::interleaved, type_, "cce-REG-MappingType"); + return c; + } + interleaved_s_& set_interleaved(); + void set_non_interleaved(); + + private: + types type_; + interleaved_s_ c; + }; + struct precoder_granularity_opts { + enum options { same_as_reg_bundle, all_contiguous_rbs, nulltype } value; + + const char* to_string() const; + }; + using precoder_granularity_e_ = enumerated; + using tci_states_pdcch_to_add_list_l_ = dyn_array; + using tci_states_pdcch_to_release_list_l_ = dyn_array; + + // member variables + bool ext = false; + bool tci_present_in_dci_present = false; + bool pdcch_dmrs_scrambling_id_present = false; + uint8_t coreset_id = 0; + fixed_bitstring<45> freq_domain_res; + uint8_t dur = 1; + cce_reg_map_type_c_ cce_reg_map_type; + precoder_granularity_e_ precoder_granularity; + tci_states_pdcch_to_add_list_l_ tci_states_pdcch_to_add_list; + tci_states_pdcch_to_release_list_l_ tci_states_pdcch_to_release_list; + uint32_t pdcch_dmrs_scrambling_id = 0; + // ... + // group 0 + bool rb_offset_r16_present = false; + bool tci_present_dci_1_2_r16_present = false; + bool coreset_pool_idx_r16_present = false; + bool coreset_id_v1610_present = false; + uint8_t rb_offset_r16 = 0; + uint8_t tci_present_dci_1_2_r16 = 1; + uint8_t coreset_pool_idx_r16 = 0; + uint8_t coreset_id_v1610 = 12; + // group 1 + bool follow_unified_tci_state_r17_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-TimeDomainResourceAllocationList ::= SEQUENCE (SIZE (1..16)) OF PDSCH-TimeDomainResourceAllocation +using pdsch_time_domain_res_alloc_list_l = dyn_array; + +// PDSCH-TimeDomainResourceAllocationList-r16 ::= SEQUENCE (SIZE (1..16)) OF PDSCH-TimeDomainResourceAllocation-r16 +using pdsch_time_domain_res_alloc_list_r16_l = dyn_array; + +// PUSCH-TimeDomainResourceAllocationList ::= SEQUENCE (SIZE (1..16)) OF PUSCH-TimeDomainResourceAllocation +using pusch_time_domain_res_alloc_list_l = dyn_array; + +// 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // 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(types::one_slot, type_, "symbolsInResourceBlock"); + return c.get>(); + } + fixed_bitstring<28>& two_slots() + { + assert_choice_type(types::two_slots, type_, "symbolsInResourceBlock"); + return c.get>(); + } + const fixed_bitstring<14>& one_slot() const + { + assert_choice_type(types::one_slot, type_, "symbolsInResourceBlock"); + return c.get>(); + } + const fixed_bitstring<28>& two_slots() const + { + assert_choice_type(types::two_slots, type_, "symbolsInResourceBlock"); + return c.get>(); + } + fixed_bitstring<14>& set_one_slot(); + fixed_bitstring<28>& set_two_slots(); + + 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // 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(types::n2, type_, "periodicityAndPattern"); + return c.get>(); + } + fixed_bitstring<4>& n4() + { + assert_choice_type(types::n4, type_, "periodicityAndPattern"); + return c.get>(); + } + fixed_bitstring<5>& n5() + { + assert_choice_type(types::n5, type_, "periodicityAndPattern"); + return c.get>(); + } + fixed_bitstring<8>& n8() + { + assert_choice_type(types::n8, type_, "periodicityAndPattern"); + return c.get>(); + } + fixed_bitstring<10>& n10() + { + assert_choice_type(types::n10, type_, "periodicityAndPattern"); + return c.get>(); + } + fixed_bitstring<20>& n20() + { + assert_choice_type(types::n20, type_, "periodicityAndPattern"); + return c.get>(); + } + fixed_bitstring<40>& n40() + { + assert_choice_type(types::n40, type_, "periodicityAndPattern"); + return c.get>(); + } + const fixed_bitstring<2>& n2() const + { + assert_choice_type(types::n2, type_, "periodicityAndPattern"); + return c.get>(); + } + const fixed_bitstring<4>& n4() const + { + assert_choice_type(types::n4, type_, "periodicityAndPattern"); + return c.get>(); + } + const fixed_bitstring<5>& n5() const + { + assert_choice_type(types::n5, type_, "periodicityAndPattern"); + return c.get>(); + } + const fixed_bitstring<8>& n8() const + { + assert_choice_type(types::n8, type_, "periodicityAndPattern"); + return c.get>(); + } + const fixed_bitstring<10>& n10() const + { + assert_choice_type(types::n10, type_, "periodicityAndPattern"); + return c.get>(); + } + const fixed_bitstring<20>& n20() const + { + assert_choice_type(types::n20, type_, "periodicityAndPattern"); + return c.get>(); + } + const fixed_bitstring<40>& n40() const + { + assert_choice_type(types::n40, type_, "periodicityAndPattern"); + return c.get>(); + } + fixed_bitstring<2>& set_n2(); + fixed_bitstring<4>& set_n4(); + fixed_bitstring<5>& set_n5(); + fixed_bitstring<8>& set_n8(); + fixed_bitstring<10>& set_n10(); + fixed_bitstring<20>& set_n20(); + fixed_bitstring<40>& set_n40(); + + private: + types type_; + choice_buffer_t> c; + + void destroy_(); + }; + + // 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 { bitmaps, coreset, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::bitmaps, type_, "patternType"); + return c.get(); + } + uint8_t& coreset() + { + assert_choice_type(types::coreset, type_, "patternType"); + return c.get(); + } + const bitmaps_s_& bitmaps() const + { + assert_choice_type(types::bitmaps, type_, "patternType"); + return c.get(); + } + const uint8_t& coreset() const + { + assert_choice_type(types::coreset, type_, "patternType"); + return c.get(); + } + bitmaps_s_& set_bitmaps(); + uint8_t& set_coreset(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct dummy_opts { + enum options { dyn, semi_static, nulltype } value; + + const char* to_string() const; + }; + using dummy_e_ = enumerated; + + // 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; + // ... + // group 0 + bool coreset_r16_present = false; + uint8_t coreset_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SearchSpace ::= SEQUENCE +struct search_space_s { + struct monitoring_slot_periodicity_and_offset_c_ { + struct types_opts { + enum options { + sl1, + sl2, + sl4, + sl5, + sl8, + sl10, + sl16, + sl20, + sl40, + sl80, + sl160, + sl320, + sl640, + sl1280, + sl2560, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + monitoring_slot_periodicity_and_offset_c_() = default; + monitoring_slot_periodicity_and_offset_c_(const monitoring_slot_periodicity_and_offset_c_& other); + monitoring_slot_periodicity_and_offset_c_& operator=(const monitoring_slot_periodicity_and_offset_c_& other); + ~monitoring_slot_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& sl2() + { + assert_choice_type(types::sl2, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl4() + { + assert_choice_type(types::sl4, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl5() + { + assert_choice_type(types::sl5, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl8() + { + assert_choice_type(types::sl8, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl10() + { + assert_choice_type(types::sl10, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl16() + { + assert_choice_type(types::sl16, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl20() + { + assert_choice_type(types::sl20, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl40() + { + assert_choice_type(types::sl40, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl80() + { + assert_choice_type(types::sl80, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint8_t& sl160() + { + assert_choice_type(types::sl160, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint16_t& sl320() + { + assert_choice_type(types::sl320, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint16_t& sl640() + { + assert_choice_type(types::sl640, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint16_t& sl1280() + { + assert_choice_type(types::sl1280, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + uint16_t& sl2560() + { + assert_choice_type(types::sl2560, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl2() const + { + assert_choice_type(types::sl2, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl4() const + { + assert_choice_type(types::sl4, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl5() const + { + assert_choice_type(types::sl5, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl8() const + { + assert_choice_type(types::sl8, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl10() const + { + assert_choice_type(types::sl10, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl16() const + { + assert_choice_type(types::sl16, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl20() const + { + assert_choice_type(types::sl20, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl40() const + { + assert_choice_type(types::sl40, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl80() const + { + assert_choice_type(types::sl80, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint8_t& sl160() const + { + assert_choice_type(types::sl160, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint16_t& sl320() const + { + assert_choice_type(types::sl320, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint16_t& sl640() const + { + assert_choice_type(types::sl640, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint16_t& sl1280() const + { + assert_choice_type(types::sl1280, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + const uint16_t& sl2560() const + { + assert_choice_type(types::sl2560, type_, "monitoringSlotPeriodicityAndOffset"); + return c.get(); + } + void set_sl1(); + uint8_t& set_sl2(); + uint8_t& set_sl4(); + uint8_t& set_sl5(); + uint8_t& set_sl8(); + uint8_t& set_sl10(); + uint8_t& set_sl16(); + uint8_t& set_sl20(); + uint8_t& set_sl40(); + uint8_t& set_sl80(); + uint8_t& set_sl160(); + uint16_t& set_sl320(); + uint16_t& set_sl640(); + uint16_t& set_sl1280(); + uint16_t& set_sl2560(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct nrof_candidates_s_ { + struct aggregation_level1_opts { + enum options { n0, n1, n2, n3, n4, n5, n6, n8, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level1_e_ = enumerated; + struct aggregation_level2_opts { + enum options { n0, n1, n2, n3, n4, n5, n6, n8, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level2_e_ = enumerated; + struct aggregation_level4_opts { + enum options { n0, n1, n2, n3, n4, n5, n6, n8, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level4_e_ = enumerated; + struct aggregation_level8_opts { + enum options { n0, n1, n2, n3, n4, n5, n6, n8, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level8_e_ = enumerated; + struct aggregation_level16_opts { + enum options { n0, n1, n2, n3, n4, n5, n6, n8, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level16_e_ = enumerated; + + // member variables + aggregation_level1_e_ aggregation_level1; + aggregation_level2_e_ aggregation_level2; + aggregation_level4_e_ aggregation_level4; + aggregation_level8_e_ aggregation_level8; + aggregation_level16_e_ aggregation_level16; + }; + struct search_space_type_c_ { + struct common_s_ { + struct dci_format0_0_and_format1_0_s_ { + bool ext = false; + // ... + }; + struct dci_format2_0_s_ { + struct nrof_candidates_sfi_s_ { + struct aggregation_level1_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level1_e_ = enumerated; + struct aggregation_level2_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level2_e_ = enumerated; + struct aggregation_level4_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level4_e_ = enumerated; + struct aggregation_level8_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level8_e_ = enumerated; + struct aggregation_level16_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level16_e_ = enumerated; + + // member variables + bool aggregation_level1_present = false; + bool aggregation_level2_present = false; + bool aggregation_level4_present = false; + bool aggregation_level8_present = false; + bool aggregation_level16_present = false; + aggregation_level1_e_ aggregation_level1; + aggregation_level2_e_ aggregation_level2; + aggregation_level4_e_ aggregation_level4; + aggregation_level8_e_ aggregation_level8; + aggregation_level16_e_ aggregation_level16; + }; + + // member variables + bool ext = false; + nrof_candidates_sfi_s_ nrof_candidates_sfi; + // ... + }; + struct dci_format2_1_s_ { + bool ext = false; + // ... + }; + struct dci_format2_2_s_ { + bool ext = false; + // ... + }; + struct dci_format2_3_s_ { + struct dummy1_opts { + enum options { sl1, sl2, sl4, sl5, sl8, sl10, sl16, sl20, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using dummy1_e_ = enumerated; + struct dummy2_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using dummy2_e_ = enumerated; + + // member variables + bool ext = false; + bool dummy1_present = false; + dummy1_e_ dummy1; + dummy2_e_ dummy2; + // ... + }; + + // member variables + bool dci_format0_0_and_format1_0_present = false; + bool dci_format2_0_present = false; + bool dci_format2_1_present = false; + bool dci_format2_2_present = false; + bool dci_format2_3_present = false; + dci_format0_0_and_format1_0_s_ dci_format0_0_and_format1_0; + dci_format2_0_s_ dci_format2_0; + dci_format2_1_s_ dci_format2_1; + dci_format2_2_s_ dci_format2_2; + dci_format2_3_s_ dci_format2_3; + }; + struct ue_specific_s_ { + struct dci_formats_opts { + enum options { formats0_neg0_and_neg1_neg0, formats0_neg1_and_neg1_neg1, nulltype } value; + + const char* to_string() const; + }; + using dci_formats_e_ = enumerated; + struct dci_formats_sl_r16_opts { + enum options { + formats0_neg0_and_neg1_neg0, + formats0_neg1_and_neg1_neg1, + formats3_neg0, + formats3_neg1, + formats3_neg0_and_neg3_neg1, + nulltype + } value; + + const char* to_string() const; + }; + using dci_formats_sl_r16_e_ = enumerated; + struct dci_formats_ext_r16_opts { + enum options { + formats0_neg2_and_neg1_neg2, + formats0_neg1_and_neg1_neg1_and_neg0_neg2_and_neg1_neg2, + nulltype + } value; + + const char* to_string() const; + }; + using dci_formats_ext_r16_e_ = enumerated; + + // member variables + bool ext = false; + dci_formats_e_ dci_formats; + // ... + // group 0 + bool dci_formats_mt_r16_present = false; + bool dci_formats_sl_r16_present = false; + bool dci_formats_ext_r16_present = false; + dci_formats_sl_r16_e_ dci_formats_sl_r16; + dci_formats_ext_r16_e_ dci_formats_ext_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + }; + struct types_opts { + enum options { common, ue_specific, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + search_space_type_c_() = default; + search_space_type_c_(const search_space_type_c_& other); + search_space_type_c_& operator=(const search_space_type_c_& other); + ~search_space_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 + common_s_& common() + { + assert_choice_type(types::common, type_, "searchSpaceType"); + return c.get(); + } + ue_specific_s_& ue_specific() + { + assert_choice_type(types::ue_specific, type_, "searchSpaceType"); + return c.get(); + } + const common_s_& common() const + { + assert_choice_type(types::common, type_, "searchSpaceType"); + return c.get(); + } + const ue_specific_s_& ue_specific() const + { + assert_choice_type(types::ue_specific, type_, "searchSpaceType"); + return c.get(); + } + common_s_& set_common(); + ue_specific_s_& set_ue_specific(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool coreset_id_present = false; + bool monitoring_slot_periodicity_and_offset_present = false; + bool dur_present = false; + bool monitoring_symbols_within_slot_present = false; + bool nrof_candidates_present = false; + bool search_space_type_present = false; + uint8_t search_space_id = 0; + uint8_t coreset_id = 0; + monitoring_slot_periodicity_and_offset_c_ monitoring_slot_periodicity_and_offset; + uint16_t dur = 2; + fixed_bitstring<14> monitoring_symbols_within_slot; + nrof_candidates_s_ nrof_candidates; + search_space_type_c_ search_space_type; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SearchSpaceExt-r16 ::= SEQUENCE +struct search_space_ext_r16_s { + struct search_space_type_r16_s_ { + struct common_r16_s_ { + struct dci_format2_4_r16_s_ { + struct nrof_candidates_ci_r16_s_ { + struct aggregation_level1_r16_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level1_r16_e_ = enumerated; + struct aggregation_level2_r16_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level2_r16_e_ = enumerated; + struct aggregation_level4_r16_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level4_r16_e_ = enumerated; + struct aggregation_level8_r16_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level8_r16_e_ = enumerated; + struct aggregation_level16_r16_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level16_r16_e_ = enumerated; + + // member variables + bool aggregation_level1_r16_present = false; + bool aggregation_level2_r16_present = false; + bool aggregation_level4_r16_present = false; + bool aggregation_level8_r16_present = false; + bool aggregation_level16_r16_present = false; + aggregation_level1_r16_e_ aggregation_level1_r16; + aggregation_level2_r16_e_ aggregation_level2_r16; + aggregation_level4_r16_e_ aggregation_level4_r16; + aggregation_level8_r16_e_ aggregation_level8_r16; + aggregation_level16_r16_e_ aggregation_level16_r16; + }; + + // member variables + bool ext = false; + nrof_candidates_ci_r16_s_ nrof_candidates_ci_r16; + // ... + }; + struct dci_format2_5_r16_s_ { + struct nrof_candidates_iab_r16_s_ { + struct aggregation_level1_r16_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level1_r16_e_ = enumerated; + struct aggregation_level2_r16_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level2_r16_e_ = enumerated; + struct aggregation_level4_r16_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level4_r16_e_ = enumerated; + struct aggregation_level8_r16_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level8_r16_e_ = enumerated; + struct aggregation_level16_r16_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level16_r16_e_ = enumerated; + + // member variables + bool aggregation_level1_r16_present = false; + bool aggregation_level2_r16_present = false; + bool aggregation_level4_r16_present = false; + bool aggregation_level8_r16_present = false; + bool aggregation_level16_r16_present = false; + aggregation_level1_r16_e_ aggregation_level1_r16; + aggregation_level2_r16_e_ aggregation_level2_r16; + aggregation_level4_r16_e_ aggregation_level4_r16; + aggregation_level8_r16_e_ aggregation_level8_r16; + aggregation_level16_r16_e_ aggregation_level16_r16; + }; + + // member variables + bool ext = false; + nrof_candidates_iab_r16_s_ nrof_candidates_iab_r16; + // ... + }; + struct dci_format2_6_r16_s_ { + bool ext = false; + // ... + }; + + // member variables + bool ext = false; + bool dci_format2_4_r16_present = false; + bool dci_format2_5_r16_present = false; + bool dci_format2_6_r16_present = false; + dci_format2_4_r16_s_ dci_format2_4_r16; + dci_format2_5_r16_s_ dci_format2_5_r16; + dci_format2_6_r16_s_ dci_format2_6_r16; + // ... + }; + + // member variables + common_r16_s_ common_r16; + }; + using search_space_group_id_list_r16_l_ = bounded_array; + + // member variables + bool coreset_id_r16_present = false; + bool search_space_type_r16_present = false; + bool freq_monitor_locations_r16_present = false; + uint8_t coreset_id_r16 = 0; + search_space_type_r16_s_ search_space_type_r16; + search_space_group_id_list_r16_l_ search_space_group_id_list_r16; + fixed_bitstring<5> freq_monitor_locations_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SearchSpaceExt-v1700 ::= SEQUENCE +struct search_space_ext_v1700_s { + struct monitoring_slot_periodicity_and_offset_v1710_c_ { + struct types_opts { + enum options { sl32, sl64, sl128, sl5120, sl10240, sl20480, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + monitoring_slot_periodicity_and_offset_v1710_c_() = default; + monitoring_slot_periodicity_and_offset_v1710_c_(const monitoring_slot_periodicity_and_offset_v1710_c_& other); + monitoring_slot_periodicity_and_offset_v1710_c_& + operator=(const monitoring_slot_periodicity_and_offset_v1710_c_& other); + ~monitoring_slot_periodicity_and_offset_v1710_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& sl32() + { + assert_choice_type(types::sl32, type_, "monitoringSlotPeriodicityAndOffset-v1710"); + return c.get(); + } + uint8_t& sl64() + { + assert_choice_type(types::sl64, type_, "monitoringSlotPeriodicityAndOffset-v1710"); + return c.get(); + } + uint8_t& sl128() + { + assert_choice_type(types::sl128, type_, "monitoringSlotPeriodicityAndOffset-v1710"); + return c.get(); + } + uint16_t& sl5120() + { + assert_choice_type(types::sl5120, type_, "monitoringSlotPeriodicityAndOffset-v1710"); + return c.get(); + } + uint16_t& sl10240() + { + assert_choice_type(types::sl10240, type_, "monitoringSlotPeriodicityAndOffset-v1710"); + return c.get(); + } + uint16_t& sl20480() + { + assert_choice_type(types::sl20480, type_, "monitoringSlotPeriodicityAndOffset-v1710"); + return c.get(); + } + const uint8_t& sl32() const + { + assert_choice_type(types::sl32, type_, "monitoringSlotPeriodicityAndOffset-v1710"); + return c.get(); + } + const uint8_t& sl64() const + { + assert_choice_type(types::sl64, type_, "monitoringSlotPeriodicityAndOffset-v1710"); + return c.get(); + } + const uint8_t& sl128() const + { + assert_choice_type(types::sl128, type_, "monitoringSlotPeriodicityAndOffset-v1710"); + return c.get(); + } + const uint16_t& sl5120() const + { + assert_choice_type(types::sl5120, type_, "monitoringSlotPeriodicityAndOffset-v1710"); + return c.get(); + } + const uint16_t& sl10240() const + { + assert_choice_type(types::sl10240, type_, "monitoringSlotPeriodicityAndOffset-v1710"); + return c.get(); + } + const uint16_t& sl20480() const + { + assert_choice_type(types::sl20480, type_, "monitoringSlotPeriodicityAndOffset-v1710"); + return c.get(); + } + uint8_t& set_sl32(); + uint8_t& set_sl64(); + uint8_t& set_sl128(); + uint16_t& set_sl5120(); + uint16_t& set_sl10240(); + uint16_t& set_sl20480(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct monitoring_slots_within_slot_group_r17_c_ { + struct types_opts { + enum options { slot_group_len4_r17, slot_group_len8_r17, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + monitoring_slots_within_slot_group_r17_c_() = default; + monitoring_slots_within_slot_group_r17_c_(const monitoring_slots_within_slot_group_r17_c_& other); + monitoring_slots_within_slot_group_r17_c_& operator=(const monitoring_slots_within_slot_group_r17_c_& other); + ~monitoring_slots_within_slot_group_r17_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>& slot_group_len4_r17() + { + assert_choice_type(types::slot_group_len4_r17, type_, "monitoringSlotsWithinSlotGroup-r17"); + return c.get>(); + } + fixed_bitstring<8>& slot_group_len8_r17() + { + assert_choice_type(types::slot_group_len8_r17, type_, "monitoringSlotsWithinSlotGroup-r17"); + return c.get>(); + } + const fixed_bitstring<4>& slot_group_len4_r17() const + { + assert_choice_type(types::slot_group_len4_r17, type_, "monitoringSlotsWithinSlotGroup-r17"); + return c.get>(); + } + const fixed_bitstring<8>& slot_group_len8_r17() const + { + assert_choice_type(types::slot_group_len8_r17, type_, "monitoringSlotsWithinSlotGroup-r17"); + return c.get>(); + } + fixed_bitstring<4>& set_slot_group_len4_r17(); + fixed_bitstring<8>& set_slot_group_len8_r17(); + + private: + types type_; + choice_buffer_t> c; + + void destroy_(); + }; + struct search_space_type_r17_s_ { + struct common_r17_s_ { + struct dci_format4_0_r17_s_ { + bool ext = false; + // ... + }; + struct dci_format4_1_r17_s_ { + bool ext = false; + // ... + }; + struct dci_format4_2_r17_s_ { + bool ext = false; + // ... + }; + struct dci_format4_1_and_format4_2_r17_s_ { + bool ext = false; + // ... + }; + struct dci_format2_7_r17_s_ { + struct nrof_candidates_pei_r17_s_ { + struct aggregation_level4_r17_opts { + enum options { n0, n1, n2, n3, n4, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level4_r17_e_ = enumerated; + struct aggregation_level8_r17_opts { + enum options { n0, n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level8_r17_e_ = enumerated; + struct aggregation_level16_r17_opts { + enum options { n0, n1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using aggregation_level16_r17_e_ = enumerated; + + // member variables + bool aggregation_level4_r17_present = false; + bool aggregation_level8_r17_present = false; + bool aggregation_level16_r17_present = false; + aggregation_level4_r17_e_ aggregation_level4_r17; + aggregation_level8_r17_e_ aggregation_level8_r17; + aggregation_level16_r17_e_ aggregation_level16_r17; + }; + + // member variables + bool ext = false; + nrof_candidates_pei_r17_s_ nrof_candidates_pei_r17; + // ... + }; + + // member variables + bool dci_format4_0_r17_present = false; + bool dci_format4_1_r17_present = false; + bool dci_format4_2_r17_present = false; + bool dci_format4_1_and_format4_2_r17_present = false; + bool dci_format2_7_r17_present = false; + dci_format4_0_r17_s_ dci_format4_0_r17; + dci_format4_1_r17_s_ dci_format4_1_r17; + dci_format4_2_r17_s_ dci_format4_2_r17; + dci_format4_1_and_format4_2_r17_s_ dci_format4_1_and_format4_2_r17; + dci_format2_7_r17_s_ dci_format2_7_r17; + }; + + // member variables + common_r17_s_ common_r17; + }; + using search_space_group_id_list_r17_l_ = bounded_array; + + // member variables + bool monitoring_slot_periodicity_and_offset_v1710_present = false; + bool monitoring_slots_within_slot_group_r17_present = false; + bool dur_r17_present = false; + bool search_space_type_r17_present = false; + bool search_space_linking_id_r17_present = false; + monitoring_slot_periodicity_and_offset_v1710_c_ monitoring_slot_periodicity_and_offset_v1710; + monitoring_slots_within_slot_group_r17_c_ monitoring_slots_within_slot_group_r17; + uint16_t dur_r17 = 4; + search_space_type_r17_s_ search_space_type_r17; + search_space_group_id_list_r17_l_ search_space_group_id_list_r17; + uint8_t search_space_linking_id_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AdditionalRACH-ConfigList-r17 ::= SEQUENCE (SIZE (1..256)) OF AdditionalRACH-Config-r17 +using add_rach_cfg_list_r17_l = dyn_array; + +// BWP ::= SEQUENCE +struct bwp_s { + bool cp_present = false; + uint16_t location_and_bw = 0; + subcarrier_spacing_e subcarrier_spacing; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NumberOfMsg3-Repetitions-r17 ::= ENUMERATED +struct nof_msg3_repeats_r17_opts { + enum options { n1, n2, n3, n4, n7, n8, n12, n16, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; +}; +using nof_msg3_repeats_r17_e = enumerated; + +// PDCCH-ConfigCommon ::= SEQUENCE +struct pdcch_cfg_common_s { + using common_search_space_list_l_ = dyn_array; + struct first_pdcch_monitoring_occasion_of_po_c_ { + using scs15_kh_zone_t_l_ = bounded_array; + using scs30_kh_zone_t_scs15_kh_zhalf_t_l_ = bounded_array; + using scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_ = bounded_array; + using scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_ = bounded_array; + using scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_ = + bounded_array; + using scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_ = bounded_array; + using scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_ = bounded_array; + using scs120_kh_zone_sixteenth_t_l_ = bounded_array; + struct types_opts { + enum options { + scs15_kh_zone_t, + scs30_kh_zone_t_scs15_kh_zhalf_t, + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, + scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, + scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, + scs120_kh_zone_sixteenth_t, + nulltype + } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + first_pdcch_monitoring_occasion_of_po_c_() = default; + first_pdcch_monitoring_occasion_of_po_c_(const first_pdcch_monitoring_occasion_of_po_c_& other); + first_pdcch_monitoring_occasion_of_po_c_& operator=(const first_pdcch_monitoring_occasion_of_po_c_& other); + ~first_pdcch_monitoring_occasion_of_po_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 + scs15_kh_zone_t_l_& scs15_kh_zone_t() + { + assert_choice_type(types::scs15_kh_zone_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + scs30_kh_zone_t_scs15_kh_zhalf_t_l_& scs30_kh_zone_t_scs15_kh_zhalf_t() + { + assert_choice_type(types::scs30_kh_zone_t_scs15_kh_zhalf_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() + { + assert_choice_type( + types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() + { + assert_choice_type(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() + { + assert_choice_type(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& + scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() + { + assert_choice_type(types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() + { + assert_choice_type( + types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + scs120_kh_zone_sixteenth_t_l_& scs120_kh_zone_sixteenth_t() + { + assert_choice_type(types::scs120_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs15_kh_zone_t_l_& scs15_kh_zone_t() const + { + assert_choice_type(types::scs15_kh_zone_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs30_kh_zone_t_scs15_kh_zhalf_t_l_& scs30_kh_zone_t_scs15_kh_zhalf_t() const + { + assert_choice_type(types::scs30_kh_zone_t_scs15_kh_zhalf_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() const + { + assert_choice_type( + types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() const + { + assert_choice_type(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() const + { + assert_choice_type(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& + scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() const + { + assert_choice_type(types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& + scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() const + { + assert_choice_type( + types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs120_kh_zone_sixteenth_t_l_& scs120_kh_zone_sixteenth_t() const + { + assert_choice_type(types::scs120_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + scs15_kh_zone_t_l_& set_scs15_kh_zone_t(); + scs30_kh_zone_t_scs15_kh_zhalf_t_l_& set_scs30_kh_zone_t_scs15_kh_zhalf_t(); + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& set_scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t(); + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& + set_scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t(); + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& + set_scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t(); + scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& + set_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t(); + scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& set_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t(); + scs120_kh_zone_sixteenth_t_l_& set_scs120_kh_zone_sixteenth_t(); + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + using common_search_space_list_ext_r16_l_ = dyn_array; + struct sdt_search_space_r17_c_ { + struct types_opts { + enum options { new_search_space, existing_search_space, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + sdt_search_space_r17_c_() = default; + sdt_search_space_r17_c_(const sdt_search_space_r17_c_& other); + sdt_search_space_r17_c_& operator=(const sdt_search_space_r17_c_& other); + ~sdt_search_space_r17_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 + search_space_s& new_search_space() + { + assert_choice_type(types::new_search_space, type_, "sdt-SearchSpace-r17"); + return c.get(); + } + uint8_t& existing_search_space() + { + assert_choice_type(types::existing_search_space, type_, "sdt-SearchSpace-r17"); + return c.get(); + } + const search_space_s& new_search_space() const + { + assert_choice_type(types::new_search_space, type_, "sdt-SearchSpace-r17"); + return c.get(); + } + const uint8_t& existing_search_space() const + { + assert_choice_type(types::existing_search_space, type_, "sdt-SearchSpace-r17"); + return c.get(); + } + search_space_s& set_new_search_space(); + uint8_t& set_existing_search_space(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + using common_search_space_list_ext2_r17_l_ = dyn_array; + struct first_pdcch_monitoring_occasion_of_po_v1710_c_ { + using scs480_kh_zone_eighth_t_l_ = bounded_array; + using scs480_kh_zone_sixteenth_t_l_ = bounded_array; + struct types_opts { + enum options { scs480_kh_zone_eighth_t, scs480_kh_zone_sixteenth_t, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + first_pdcch_monitoring_occasion_of_po_v1710_c_() = default; + first_pdcch_monitoring_occasion_of_po_v1710_c_(const first_pdcch_monitoring_occasion_of_po_v1710_c_& other); + first_pdcch_monitoring_occasion_of_po_v1710_c_& + operator=(const first_pdcch_monitoring_occasion_of_po_v1710_c_& other); + ~first_pdcch_monitoring_occasion_of_po_v1710_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 + scs480_kh_zone_eighth_t_l_& scs480_kh_zone_eighth_t() + { + assert_choice_type(types::scs480_kh_zone_eighth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); + return c.get(); + } + scs480_kh_zone_sixteenth_t_l_& scs480_kh_zone_sixteenth_t() + { + assert_choice_type(types::scs480_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); + return c.get(); + } + const scs480_kh_zone_eighth_t_l_& scs480_kh_zone_eighth_t() const + { + assert_choice_type(types::scs480_kh_zone_eighth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); + return c.get(); + } + const scs480_kh_zone_sixteenth_t_l_& scs480_kh_zone_sixteenth_t() const + { + assert_choice_type(types::scs480_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); + return c.get(); + } + scs480_kh_zone_eighth_t_l_& set_scs480_kh_zone_eighth_t(); + scs480_kh_zone_sixteenth_t_l_& set_scs480_kh_zone_sixteenth_t(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct pei_cfg_bwp_r17_s_ { + struct first_pdcch_monitoring_occasion_of_pei_o_r17_c_ { + using scs15_kh_zone_t_l_ = bounded_array; + using scs30_kh_zone_t_scs15_kh_zhalf_t_l_ = bounded_array; + using scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_ = bounded_array; + using scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_ = + bounded_array; + using scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_ = + bounded_array; + using scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_ = + bounded_array; + using scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_ = bounded_array; + using scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_ = bounded_array; + using scs480_kh_zone_eighth_t_l_ = bounded_array; + using scs480_kh_zone_sixteenth_t_l_ = bounded_array; + struct types_opts { + enum options { + scs15_kh_zone_t, + scs30_kh_zone_t_scs15_kh_zhalf_t, + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, + scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, + scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, + scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t, + scs480_kh_zone_eighth_t, + scs480_kh_zone_sixteenth_t, + nulltype + } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + first_pdcch_monitoring_occasion_of_pei_o_r17_c_() = default; + first_pdcch_monitoring_occasion_of_pei_o_r17_c_(const first_pdcch_monitoring_occasion_of_pei_o_r17_c_& other); + first_pdcch_monitoring_occasion_of_pei_o_r17_c_& + operator=(const first_pdcch_monitoring_occasion_of_pei_o_r17_c_& other); + ~first_pdcch_monitoring_occasion_of_pei_o_r17_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 + scs15_kh_zone_t_l_& scs15_kh_zone_t() + { + assert_choice_type(types::scs15_kh_zone_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + scs30_kh_zone_t_scs15_kh_zhalf_t_l_& scs30_kh_zone_t_scs15_kh_zhalf_t() + { + assert_choice_type(types::scs30_kh_zone_t_scs15_kh_zhalf_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() + { + assert_choice_type(types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, + type_, + "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() + { + assert_choice_type(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() + { + assert_choice_type( + types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& + scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() + { + assert_choice_type( + types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& + scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() + { + assert_choice_type(types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t() + { + assert_choice_type( + types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + scs480_kh_zone_eighth_t_l_& scs480_kh_zone_eighth_t() + { + assert_choice_type(types::scs480_kh_zone_eighth_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + scs480_kh_zone_sixteenth_t_l_& scs480_kh_zone_sixteenth_t() + { + assert_choice_type(types::scs480_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + const scs15_kh_zone_t_l_& scs15_kh_zone_t() const + { + assert_choice_type(types::scs15_kh_zone_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + const scs30_kh_zone_t_scs15_kh_zhalf_t_l_& scs30_kh_zone_t_scs15_kh_zhalf_t() const + { + assert_choice_type(types::scs30_kh_zone_t_scs15_kh_zhalf_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + const scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() const + { + assert_choice_type(types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, + type_, + "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + const scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() const + { + assert_choice_type(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + const scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() const + { + assert_choice_type( + types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + const scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& + scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() const + { + assert_choice_type( + types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + const scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& + scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() const + { + assert_choice_type(types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + const scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t() const + { + assert_choice_type( + types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + const scs480_kh_zone_eighth_t_l_& scs480_kh_zone_eighth_t() const + { + assert_choice_type(types::scs480_kh_zone_eighth_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + const scs480_kh_zone_sixteenth_t_l_& scs480_kh_zone_sixteenth_t() const + { + assert_choice_type(types::scs480_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + return c.get(); + } + scs15_kh_zone_t_l_& set_scs15_kh_zone_t(); + scs30_kh_zone_t_scs15_kh_zhalf_t_l_& set_scs30_kh_zone_t_scs15_kh_zhalf_t(); + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& + set_scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t(); + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& + set_scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t(); + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& + set_scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t(); + scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& + set_scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t(); + scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& + set_scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t(); + scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& set_scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t(); + scs480_kh_zone_eighth_t_l_& set_scs480_kh_zone_eighth_t(); + scs480_kh_zone_sixteenth_t_l_& set_scs480_kh_zone_sixteenth_t(); + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + + // member variables + uint8_t pei_search_space_r17 = 0; + first_pdcch_monitoring_occasion_of_pei_o_r17_c_ first_pdcch_monitoring_occasion_of_pei_o_r17; + }; + + // member variables + bool ext = false; + bool coreset_zero_present = false; + bool common_coreset_present = false; + bool search_space_zero_present = false; + bool search_space_sib1_present = false; + bool search_space_other_sys_info_present = false; + bool paging_search_space_present = false; + bool ra_search_space_present = false; + uint8_t coreset_zero = 0; + coreset_s common_coreset; + uint8_t search_space_zero = 0; + common_search_space_list_l_ common_search_space_list; + uint8_t search_space_sib1 = 0; + uint8_t search_space_other_sys_info = 0; + uint8_t paging_search_space = 0; + uint8_t ra_search_space = 0; + // ... + // group 0 + copy_ptr first_pdcch_monitoring_occasion_of_po; + // group 1 + copy_ptr common_search_space_list_ext_r16; + // group 2 + bool search_space_mcch_r17_present = false; + bool search_space_mtch_r17_present = false; + copy_ptr sdt_search_space_r17; + uint8_t search_space_mcch_r17 = 0; + uint8_t search_space_mtch_r17 = 0; + copy_ptr common_search_space_list_ext2_r17; + copy_ptr first_pdcch_monitoring_occasion_of_po_v1710; + copy_ptr pei_cfg_bwp_r17; + // group 3 + bool follow_unified_tci_state_v1720_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-ConfigCommon ::= SEQUENCE +struct pdsch_cfg_common_s { + bool ext = false; + pdsch_time_domain_res_alloc_list_l pdsch_time_domain_alloc_list; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigCommon ::= SEQUENCE +struct pucch_cfg_common_s { + struct pucch_group_hop_opts { + enum options { neither, enable, disable, nulltype } value; + + const char* to_string() const; + }; + using pucch_group_hop_e_ = enumerated; + struct intra_slot_fh_r17_opts { + enum options { from_lower_edge, from_upper_edge, nulltype } value; + + const char* to_string() const; + }; + using intra_slot_fh_r17_e_ = enumerated; + struct add_prb_offset_r17_opts { + enum options { n2, n3, n4, n6, n8, n9, n10, n12, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using add_prb_offset_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool pucch_res_common_present = false; + bool hop_id_present = false; + bool p0_nominal_present = false; + uint8_t pucch_res_common = 0; + pucch_group_hop_e_ pucch_group_hop; + uint16_t hop_id = 0; + int16_t p0_nominal = -202; + // ... + // group 0 + bool nrof_prbs_present = false; + bool intra_slot_fh_r17_present = false; + bool pucch_res_common_red_cap_r17_present = false; + bool add_prb_offset_r17_present = false; + uint8_t nrof_prbs = 1; + intra_slot_fh_r17_e_ intra_slot_fh_r17; + uint8_t pucch_res_common_red_cap_r17 = 0; + add_prb_offset_r17_e_ add_prb_offset_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-ConfigCommon ::= SEQUENCE +struct pusch_cfg_common_s { + bool ext = false; + bool group_hop_enabled_transform_precoding_present = false; + bool msg3_delta_preamb_present = false; + bool p0_nominal_with_grant_present = false; + pusch_time_domain_res_alloc_list_l pusch_time_domain_alloc_list; + int8_t msg3_delta_preamb = -1; + int16_t p0_nominal_with_grant = -202; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BWP-DownlinkCommon ::= SEQUENCE +struct bwp_dl_common_s { + bool ext = false; + bool pdcch_cfg_common_present = false; + bool pdsch_cfg_common_present = false; + bwp_s generic_params; + setup_release_c pdcch_cfg_common; + setup_release_c pdsch_cfg_common; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BWP-UplinkCommon ::= SEQUENCE +struct bwp_ul_common_s { + using nof_msg3_repeats_list_r17_l_ = std::array; + using mcs_msg3_repeats_r17_l_ = std::array; + + // member variables + bool ext = false; + bool rach_cfg_common_present = false; + bool pusch_cfg_common_present = false; + bool pucch_cfg_common_present = false; + bwp_s generic_params; + setup_release_c rach_cfg_common; + setup_release_c pusch_cfg_common; + setup_release_c pucch_cfg_common; + // ... + // group 0 + bool use_interlace_pucch_pusch_r16_present = false; + copy_ptr> rach_cfg_common_iab_r16; + copy_ptr> msg_a_cfg_common_r16; + // group 1 + bool enable_ra_prioritization_for_slicing_r17_present = false; + bool rsrp_thres_msg3_r17_present = false; + bool enable_ra_prioritization_for_slicing_r17 = false; + copy_ptr>> add_rach_cfg_list_r17; + uint8_t rsrp_thres_msg3_r17 = 0; + copy_ptr nof_msg3_repeats_list_r17; + copy_ptr mcs_msg3_repeats_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NonCellDefiningSSB-r17 ::= SEQUENCE +struct non_cell_defining_ssb_r17_s { + struct ssb_periodicity_r17_opts { + enum options { ms5, ms10, ms20, ms40, ms80, ms160, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ssb_periodicity_r17_e_ = enumerated; + struct ssb_time_offset_r17_opts { + enum options { ms5, ms10, ms15, ms20, ms40, ms80, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ssb_time_offset_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool ssb_periodicity_r17_present = false; + bool ssb_time_offset_r17_present = false; + uint32_t absolute_freq_ssb_r17 = 0; + ssb_periodicity_r17_e_ ssb_periodicity_r17; + ssb_time_offset_r17_e_ ssb_time_offset_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BFR-CSIRS-Resource ::= SEQUENCE +struct bfr_csi_rs_res_s { + using ra_occasion_list_l_ = dyn_array; + + // member variables + bool ext = 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; +}; + +// CSI-FrequencyOccupation ::= SEQUENCE +struct csi_freq_occupation_s { + bool ext = false; + uint16_t start_rb = 0; + uint16_t nrof_rbs = 24; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BeamLinkMonitoringRS-r17 ::= SEQUENCE +struct beam_link_monitoring_rs_r17_s { + struct detection_res_r17_c_ { + struct types_opts { + enum options { ssb_idx, csi_rs_idx, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + detection_res_r17_c_() = default; + detection_res_r17_c_(const detection_res_r17_c_& other); + detection_res_r17_c_& operator=(const detection_res_r17_c_& other); + ~detection_res_r17_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(types::ssb_idx, type_, "detectionResource-r17"); + return c.get(); + } + uint8_t& csi_rs_idx() + { + assert_choice_type(types::csi_rs_idx, type_, "detectionResource-r17"); + return c.get(); + } + const uint8_t& ssb_idx() const + { + assert_choice_type(types::ssb_idx, type_, "detectionResource-r17"); + return c.get(); + } + const uint8_t& csi_rs_idx() const + { + assert_choice_type(types::csi_rs_idx, type_, "detectionResource-r17"); + return c.get(); + } + uint8_t& set_ssb_idx(); + uint8_t& set_csi_rs_idx(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext = false; + uint8_t beam_link_monitoring_rs_id_r17 = 0; + detection_res_r17_c_ detection_res_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CI-ConfigurationPerServingCell-r16 ::= SEQUENCE +struct ci_cfg_per_serving_cell_r16_s { + struct ci_payload_size_r16_opts { + enum options { n1, n2, n4, n5, n7, n8, n10, n14, n16, n20, n28, n32, n35, n42, n56, n112, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ci_payload_size_r16_e_ = enumerated; + struct time_freq_region_r16_s_ { + struct time_dur_for_ci_r16_opts { + enum options { n2, n4, n7, n14, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using time_dur_for_ci_r16_e_ = enumerated; + struct time_granularity_for_ci_r16_opts { + enum options { n1, n2, n4, n7, n14, n28, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using time_granularity_for_ci_r16_e_ = enumerated; + + // member variables + bool ext = false; + bool time_dur_for_ci_r16_present = false; + time_dur_for_ci_r16_e_ time_dur_for_ci_r16; + time_granularity_for_ci_r16_e_ time_granularity_for_ci_r16; + uint16_t freq_region_for_ci_r16 = 0; + uint8_t delta_offset_r16 = 0; + // ... + }; + + // member variables + bool position_in_dci_for_sul_r16_present = false; + bool ul_cancellation_prio_v1610_present = false; + uint8_t serving_cell_id = 0; + uint8_t position_in_dci_r16 = 0; + uint8_t position_in_dci_for_sul_r16 = 0; + ci_payload_size_r16_e_ ci_payload_size_r16; + time_freq_region_r16_s_ time_freq_region_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // 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(types::row1, type_, "frequencyDomainAllocation"); + return c.get>(); + } + fixed_bitstring<12>& row2() + { + assert_choice_type(types::row2, type_, "frequencyDomainAllocation"); + return c.get>(); + } + fixed_bitstring<3>& row4() + { + assert_choice_type(types::row4, type_, "frequencyDomainAllocation"); + return c.get>(); + } + fixed_bitstring<6>& other() + { + assert_choice_type(types::other, type_, "frequencyDomainAllocation"); + return c.get>(); + } + const fixed_bitstring<4>& row1() const + { + assert_choice_type(types::row1, type_, "frequencyDomainAllocation"); + return c.get>(); + } + const fixed_bitstring<12>& row2() const + { + assert_choice_type(types::row2, type_, "frequencyDomainAllocation"); + return c.get>(); + } + const fixed_bitstring<3>& row4() const + { + assert_choice_type(types::row4, type_, "frequencyDomainAllocation"); + return c.get>(); + } + const fixed_bitstring<6>& other() const + { + assert_choice_type(types::other, type_, "frequencyDomainAllocation"); + return c.get>(); + } + fixed_bitstring<4>& set_row1(); + fixed_bitstring<12>& set_row2(); + fixed_bitstring<3>& set_row4(); + fixed_bitstring<6>& set_other(); + + private: + types type_; + choice_buffer_t> c; + + void destroy_(); + }; + struct nrof_ports_opts { + enum options { p1, p2, p4, p8, p12, p16, p24, p32, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using nrof_ports_e_ = enumerated; + struct cdm_type_opts { + enum options { no_cdm, fd_cdm2, cdm4_fd2_td2, cdm8_fd2_td4, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using cdm_type_e_ = enumerated; + struct density_c_ { + struct dot5_opts { + enum options { even_prbs, odd_prbs, nulltype } value; + + const char* to_string() const; + }; + using dot5_e_ = enumerated; + struct types_opts { + enum options { dot5, one, three, spare, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // 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(types::dot5, type_, "density"); + return c; + } + const dot5_e_& dot5() const + { + assert_choice_type(types::dot5, type_, "density"); + return c; + } + dot5_e_& set_dot5(); + void set_one(); + void set_three(); + void set_spare(); + + private: + types type_; + dot5_e_ c; + }; + + // 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; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CSI-ResourcePeriodicityAndOffset ::= CHOICE +struct csi_res_periodicity_and_offset_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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // 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_(); } + 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(types::slots4, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots5() + { + assert_choice_type(types::slots5, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots8() + { + assert_choice_type(types::slots8, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots10() + { + assert_choice_type(types::slots10, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots16() + { + assert_choice_type(types::slots16, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots20() + { + assert_choice_type(types::slots20, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots32() + { + assert_choice_type(types::slots32, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots40() + { + assert_choice_type(types::slots40, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots64() + { + assert_choice_type(types::slots64, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots80() + { + assert_choice_type(types::slots80, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint8_t& slots160() + { + assert_choice_type(types::slots160, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint16_t& slots320() + { + assert_choice_type(types::slots320, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint16_t& slots640() + { + assert_choice_type(types::slots640, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots4() const + { + assert_choice_type(types::slots4, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots5() const + { + assert_choice_type(types::slots5, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots8() const + { + assert_choice_type(types::slots8, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots10() const + { + assert_choice_type(types::slots10, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots16() const + { + assert_choice_type(types::slots16, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots20() const + { + assert_choice_type(types::slots20, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots32() const + { + assert_choice_type(types::slots32, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots40() const + { + assert_choice_type(types::slots40, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots64() const + { + assert_choice_type(types::slots64, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots80() const + { + assert_choice_type(types::slots80, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint8_t& slots160() const + { + assert_choice_type(types::slots160, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint16_t& slots320() const + { + assert_choice_type(types::slots320, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + const uint16_t& slots640() const + { + assert_choice_type(types::slots640, type_, "CSI-ResourcePeriodicityAndOffset"); + return c.get(); + } + uint8_t& set_slots4(); + uint8_t& set_slots5(); + uint8_t& set_slots8(); + uint8_t& set_slots10(); + uint8_t& set_slots16(); + uint8_t& set_slots20(); + uint8_t& set_slots32(); + uint8_t& set_slots40(); + uint8_t& set_slots64(); + uint8_t& set_slots80(); + uint8_t& set_slots160(); + uint16_t& set_slots320(); + uint16_t& set_slots640(); + +private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); +}; + +// CellGroupForSwitch-r16 ::= SEQUENCE (SIZE (1..16)) OF INTEGER (0..31) +using cell_group_for_switch_r16_l = bounded_array; + +// FDM-TDM-r16 ::= SEQUENCE +struct fdm_tdm_r16_s { + struct repeat_scheme_r16_opts { + enum options { fdm_scheme_a, fdm_scheme_b, tdm_scheme_a, nulltype } value; + + const char* to_string() const; + }; + using repeat_scheme_r16_e_ = enumerated; + + // member variables + bool start_symbol_offset_k_r16_present = false; + repeat_scheme_r16_e_ repeat_scheme_r16; + uint8_t start_symbol_offset_k_r16 = 0; + + // 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; +}; + +// MultiPDSCH-TDRA-r17 ::= SEQUENCE +struct multi_pdsch_tdra_r17_s { + using pdsch_tdra_list_r17_l_ = dyn_array; + + // member variables + bool ext = false; + pdsch_tdra_list_r17_l_ pdsch_tdra_list_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using res_elem_offset_e_ = enumerated; + struct max_nrof_ports_r16_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using max_nrof_ports_r16_e_ = enumerated; + + // 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; + // ... + // group 0 + bool max_nrof_ports_r16_present = false; + max_nrof_ports_r16_e_ max_nrof_ports_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::csi_rs, type_, "referenceSignal"); + return c.get(); + } + uint8_t& ssb() + { + assert_choice_type(types::ssb, type_, "referenceSignal"); + return c.get(); + } + const uint8_t& csi_rs() const + { + assert_choice_type(types::csi_rs, type_, "referenceSignal"); + return c.get(); + } + const uint8_t& ssb() const + { + assert_choice_type(types::ssb, type_, "referenceSignal"); + return c.get(); + } + uint8_t& set_csi_rs(); + uint8_t& set_ssb(); + + private: + 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; + + const char* to_string() const; + }; + using qcl_type_e_ = enumerated; + + // 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; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SlotBased-r16 ::= SEQUENCE +struct slot_based_r16_s { + struct tci_map_r16_opts { + enum options { cyclic_map, sequential_map, nulltype } value; + + const char* to_string() const; + }; + using tci_map_r16_e_ = enumerated; + + // member variables + tci_map_r16_e_ tci_map_r16; + uint8_t seq_offset_for_rv_r16 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SlotBased-v1630 ::= SEQUENCE +struct slot_based_v1630_s { + struct tci_map_r16_opts { + enum options { cyclic_map, sequential_map, nulltype } value; + + const char* to_string() const; + }; + using tci_map_r16_e_ = enumerated; + + // member variables + tci_map_r16_e_ tci_map_r16; + uint8_t seq_offset_for_rv_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BeamFailureDetectionSet-r17 ::= SEQUENCE +struct beam_fail_detection_set_r17_s { + using bfd_res_to_add_mod_list_r17_l_ = dyn_array; + using bfd_res_to_release_list_r17_l_ = dyn_array; + struct beam_fail_instance_max_count_r17_opts { + enum options { n1, n2, n3, n4, n5, n6, n8, n10, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using beam_fail_instance_max_count_r17_e_ = enumerated; + struct beam_fail_detection_timer_r17_opts { + enum options { pbfd1, pbfd2, pbfd3, pbfd4, pbfd5, pbfd6, pbfd8, pbfd10, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using beam_fail_detection_timer_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool beam_fail_instance_max_count_r17_present = false; + bool beam_fail_detection_timer_r17_present = false; + bfd_res_to_add_mod_list_r17_l_ bfd_res_to_add_mod_list_r17; + bfd_res_to_release_list_r17_l_ bfd_res_to_release_list_r17; + beam_fail_instance_max_count_r17_e_ beam_fail_instance_max_count_r17; + beam_fail_detection_timer_r17_e_ beam_fail_detection_timer_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DL-PPW-PeriodicityAndStartSlot-r17 ::= CHOICE +struct dl_ppw_periodicity_and_start_slot_r17_c { + struct scs15_c_ { + struct types_opts { + enum options { + n4, + n5, + n8, + n10, + n16, + n20, + n32, + n40, + n64, + n80, + n160, + n320, + n640, + n1280, + n2560, + n5120, + n10240, + // ... + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + scs15_c_() = default; + scs15_c_(const scs15_c_& other); + scs15_c_& operator=(const scs15_c_& other); + ~scs15_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& n4() + { + assert_choice_type(types::n4, type_, "scs15"); + return c.get(); + } + uint8_t& n5() + { + assert_choice_type(types::n5, type_, "scs15"); + return c.get(); + } + uint8_t& n8() + { + assert_choice_type(types::n8, type_, "scs15"); + return c.get(); + } + uint8_t& n10() + { + assert_choice_type(types::n10, type_, "scs15"); + return c.get(); + } + uint8_t& n16() + { + assert_choice_type(types::n16, type_, "scs15"); + return c.get(); + } + uint8_t& n20() + { + assert_choice_type(types::n20, type_, "scs15"); + return c.get(); + } + uint8_t& n32() + { + assert_choice_type(types::n32, type_, "scs15"); + return c.get(); + } + uint8_t& n40() + { + assert_choice_type(types::n40, type_, "scs15"); + return c.get(); + } + uint8_t& n64() + { + assert_choice_type(types::n64, type_, "scs15"); + return c.get(); + } + uint8_t& n80() + { + assert_choice_type(types::n80, type_, "scs15"); + return c.get(); + } + uint8_t& n160() + { + assert_choice_type(types::n160, type_, "scs15"); + return c.get(); + } + uint16_t& n320() + { + assert_choice_type(types::n320, type_, "scs15"); + return c.get(); + } + uint16_t& n640() + { + assert_choice_type(types::n640, type_, "scs15"); + return c.get(); + } + uint16_t& n1280() + { + assert_choice_type(types::n1280, type_, "scs15"); + return c.get(); + } + uint16_t& n2560() + { + assert_choice_type(types::n2560, type_, "scs15"); + return c.get(); + } + uint16_t& n5120() + { + assert_choice_type(types::n5120, type_, "scs15"); + return c.get(); + } + uint16_t& n10240() + { + assert_choice_type(types::n10240, type_, "scs15"); + return c.get(); + } + const uint8_t& n4() const + { + assert_choice_type(types::n4, type_, "scs15"); + return c.get(); + } + const uint8_t& n5() const + { + assert_choice_type(types::n5, type_, "scs15"); + return c.get(); + } + const uint8_t& n8() const + { + assert_choice_type(types::n8, type_, "scs15"); + return c.get(); + } + const uint8_t& n10() const + { + assert_choice_type(types::n10, type_, "scs15"); + return c.get(); + } + const uint8_t& n16() const + { + assert_choice_type(types::n16, type_, "scs15"); + return c.get(); + } + const uint8_t& n20() const + { + assert_choice_type(types::n20, type_, "scs15"); + return c.get(); + } + const uint8_t& n32() const + { + assert_choice_type(types::n32, type_, "scs15"); + return c.get(); + } + const uint8_t& n40() const + { + assert_choice_type(types::n40, type_, "scs15"); + return c.get(); + } + const uint8_t& n64() const + { + assert_choice_type(types::n64, type_, "scs15"); + return c.get(); + } + const uint8_t& n80() const + { + assert_choice_type(types::n80, type_, "scs15"); + return c.get(); + } + const uint8_t& n160() const + { + assert_choice_type(types::n160, type_, "scs15"); + return c.get(); + } + const uint16_t& n320() const + { + assert_choice_type(types::n320, type_, "scs15"); + return c.get(); + } + const uint16_t& n640() const + { + assert_choice_type(types::n640, type_, "scs15"); + return c.get(); + } + const uint16_t& n1280() const + { + assert_choice_type(types::n1280, type_, "scs15"); + return c.get(); + } + const uint16_t& n2560() const + { + assert_choice_type(types::n2560, type_, "scs15"); + return c.get(); + } + const uint16_t& n5120() const + { + assert_choice_type(types::n5120, type_, "scs15"); + return c.get(); + } + const uint16_t& n10240() const + { + assert_choice_type(types::n10240, type_, "scs15"); + return c.get(); + } + uint8_t& set_n4(); + uint8_t& set_n5(); + uint8_t& set_n8(); + uint8_t& set_n10(); + uint8_t& set_n16(); + uint8_t& set_n20(); + uint8_t& set_n32(); + uint8_t& set_n40(); + uint8_t& set_n64(); + uint8_t& set_n80(); + uint8_t& set_n160(); + uint16_t& set_n320(); + uint16_t& set_n640(); + uint16_t& set_n1280(); + uint16_t& set_n2560(); + uint16_t& set_n5120(); + uint16_t& set_n10240(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct scs30_c_ { + struct types_opts { + enum options { + n8, + n10, + n16, + n20, + n32, + n40, + n64, + n80, + n128, + n160, + n320, + n640, + n1280, + n2560, + n5120, + n10240, + n20480, + // ... + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + scs30_c_() = default; + scs30_c_(const scs30_c_& other); + scs30_c_& operator=(const scs30_c_& other); + ~scs30_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& n8() + { + assert_choice_type(types::n8, type_, "scs30"); + return c.get(); + } + uint8_t& n10() + { + assert_choice_type(types::n10, type_, "scs30"); + return c.get(); + } + uint8_t& n16() + { + assert_choice_type(types::n16, type_, "scs30"); + return c.get(); + } + uint8_t& n20() + { + assert_choice_type(types::n20, type_, "scs30"); + return c.get(); + } + uint8_t& n32() + { + assert_choice_type(types::n32, type_, "scs30"); + return c.get(); + } + uint8_t& n40() + { + assert_choice_type(types::n40, type_, "scs30"); + return c.get(); + } + uint8_t& n64() + { + assert_choice_type(types::n64, type_, "scs30"); + return c.get(); + } + uint8_t& n80() + { + assert_choice_type(types::n80, type_, "scs30"); + return c.get(); + } + uint8_t& n128() + { + assert_choice_type(types::n128, type_, "scs30"); + return c.get(); + } + uint8_t& n160() + { + assert_choice_type(types::n160, type_, "scs30"); + return c.get(); + } + uint16_t& n320() + { + assert_choice_type(types::n320, type_, "scs30"); + return c.get(); + } + uint16_t& n640() + { + assert_choice_type(types::n640, type_, "scs30"); + return c.get(); + } + uint16_t& n1280() + { + assert_choice_type(types::n1280, type_, "scs30"); + return c.get(); + } + uint16_t& n2560() + { + assert_choice_type(types::n2560, type_, "scs30"); + return c.get(); + } + uint16_t& n5120() + { + assert_choice_type(types::n5120, type_, "scs30"); + return c.get(); + } + uint16_t& n10240() + { + assert_choice_type(types::n10240, type_, "scs30"); + return c.get(); + } + uint16_t& n20480() + { + assert_choice_type(types::n20480, type_, "scs30"); + return c.get(); + } + const uint8_t& n8() const + { + assert_choice_type(types::n8, type_, "scs30"); + return c.get(); + } + const uint8_t& n10() const + { + assert_choice_type(types::n10, type_, "scs30"); + return c.get(); + } + const uint8_t& n16() const + { + assert_choice_type(types::n16, type_, "scs30"); + return c.get(); + } + const uint8_t& n20() const + { + assert_choice_type(types::n20, type_, "scs30"); + return c.get(); + } + const uint8_t& n32() const + { + assert_choice_type(types::n32, type_, "scs30"); + return c.get(); + } + const uint8_t& n40() const + { + assert_choice_type(types::n40, type_, "scs30"); + return c.get(); + } + const uint8_t& n64() const + { + assert_choice_type(types::n64, type_, "scs30"); + return c.get(); + } + const uint8_t& n80() const + { + assert_choice_type(types::n80, type_, "scs30"); + return c.get(); + } + const uint8_t& n128() const + { + assert_choice_type(types::n128, type_, "scs30"); + return c.get(); + } + const uint8_t& n160() const + { + assert_choice_type(types::n160, type_, "scs30"); + return c.get(); + } + const uint16_t& n320() const + { + assert_choice_type(types::n320, type_, "scs30"); + return c.get(); + } + const uint16_t& n640() const + { + assert_choice_type(types::n640, type_, "scs30"); + return c.get(); + } + const uint16_t& n1280() const + { + assert_choice_type(types::n1280, type_, "scs30"); + return c.get(); + } + const uint16_t& n2560() const + { + assert_choice_type(types::n2560, type_, "scs30"); + return c.get(); + } + const uint16_t& n5120() const + { + assert_choice_type(types::n5120, type_, "scs30"); + return c.get(); + } + const uint16_t& n10240() const + { + assert_choice_type(types::n10240, type_, "scs30"); + return c.get(); + } + const uint16_t& n20480() const + { + assert_choice_type(types::n20480, type_, "scs30"); + return c.get(); + } + uint8_t& set_n8(); + uint8_t& set_n10(); + uint8_t& set_n16(); + uint8_t& set_n20(); + uint8_t& set_n32(); + uint8_t& set_n40(); + uint8_t& set_n64(); + uint8_t& set_n80(); + uint8_t& set_n128(); + uint8_t& set_n160(); + uint16_t& set_n320(); + uint16_t& set_n640(); + uint16_t& set_n1280(); + uint16_t& set_n2560(); + uint16_t& set_n5120(); + uint16_t& set_n10240(); + uint16_t& set_n20480(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct scs60_c_ { + struct types_opts { + enum options { + n16, + n20, + n32, + n40, + n64, + n80, + n128, + n160, + n256, + n320, + n640, + n1280, + n2560, + n5120, + n10240, + n20480, + n40960, + // ... + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + scs60_c_() = default; + scs60_c_(const scs60_c_& other); + scs60_c_& operator=(const scs60_c_& other); + ~scs60_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& n16() + { + assert_choice_type(types::n16, type_, "scs60"); + return c.get(); + } + uint8_t& n20() + { + assert_choice_type(types::n20, type_, "scs60"); + return c.get(); + } + uint8_t& n32() + { + assert_choice_type(types::n32, type_, "scs60"); + return c.get(); + } + uint8_t& n40() + { + assert_choice_type(types::n40, type_, "scs60"); + return c.get(); + } + uint8_t& n64() + { + assert_choice_type(types::n64, type_, "scs60"); + return c.get(); + } + uint8_t& n80() + { + assert_choice_type(types::n80, type_, "scs60"); + return c.get(); + } + uint8_t& n128() + { + assert_choice_type(types::n128, type_, "scs60"); + return c.get(); + } + uint8_t& n160() + { + assert_choice_type(types::n160, type_, "scs60"); + return c.get(); + } + uint16_t& n256() + { + assert_choice_type(types::n256, type_, "scs60"); + return c.get(); + } + uint16_t& n320() + { + assert_choice_type(types::n320, type_, "scs60"); + return c.get(); + } + uint16_t& n640() + { + assert_choice_type(types::n640, type_, "scs60"); + return c.get(); + } + uint16_t& n1280() + { + assert_choice_type(types::n1280, type_, "scs60"); + return c.get(); + } + uint16_t& n2560() + { + assert_choice_type(types::n2560, type_, "scs60"); + return c.get(); + } + uint16_t& n5120() + { + assert_choice_type(types::n5120, type_, "scs60"); + return c.get(); + } + uint16_t& n10240() + { + assert_choice_type(types::n10240, type_, "scs60"); + return c.get(); + } + uint16_t& n20480() + { + assert_choice_type(types::n20480, type_, "scs60"); + return c.get(); + } + uint16_t& n40960() + { + assert_choice_type(types::n40960, type_, "scs60"); + return c.get(); + } + const uint8_t& n16() const + { + assert_choice_type(types::n16, type_, "scs60"); + return c.get(); + } + const uint8_t& n20() const + { + assert_choice_type(types::n20, type_, "scs60"); + return c.get(); + } + const uint8_t& n32() const + { + assert_choice_type(types::n32, type_, "scs60"); + return c.get(); + } + const uint8_t& n40() const + { + assert_choice_type(types::n40, type_, "scs60"); + return c.get(); + } + const uint8_t& n64() const + { + assert_choice_type(types::n64, type_, "scs60"); + return c.get(); + } + const uint8_t& n80() const + { + assert_choice_type(types::n80, type_, "scs60"); + return c.get(); + } + const uint8_t& n128() const + { + assert_choice_type(types::n128, type_, "scs60"); + return c.get(); + } + const uint8_t& n160() const + { + assert_choice_type(types::n160, type_, "scs60"); + return c.get(); + } + const uint16_t& n256() const + { + assert_choice_type(types::n256, type_, "scs60"); + return c.get(); + } + const uint16_t& n320() const + { + assert_choice_type(types::n320, type_, "scs60"); + return c.get(); + } + const uint16_t& n640() const + { + assert_choice_type(types::n640, type_, "scs60"); + return c.get(); + } + const uint16_t& n1280() const + { + assert_choice_type(types::n1280, type_, "scs60"); + return c.get(); + } + const uint16_t& n2560() const + { + assert_choice_type(types::n2560, type_, "scs60"); + return c.get(); + } + const uint16_t& n5120() const + { + assert_choice_type(types::n5120, type_, "scs60"); + return c.get(); + } + const uint16_t& n10240() const + { + assert_choice_type(types::n10240, type_, "scs60"); + return c.get(); + } + const uint16_t& n20480() const + { + assert_choice_type(types::n20480, type_, "scs60"); + return c.get(); + } + const uint16_t& n40960() const + { + assert_choice_type(types::n40960, type_, "scs60"); + return c.get(); + } + uint8_t& set_n16(); + uint8_t& set_n20(); + uint8_t& set_n32(); + uint8_t& set_n40(); + uint8_t& set_n64(); + uint8_t& set_n80(); + uint8_t& set_n128(); + uint8_t& set_n160(); + uint16_t& set_n256(); + uint16_t& set_n320(); + uint16_t& set_n640(); + uint16_t& set_n1280(); + uint16_t& set_n2560(); + uint16_t& set_n5120(); + uint16_t& set_n10240(); + uint16_t& set_n20480(); + uint16_t& set_n40960(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct scs120_c_ { + struct types_opts { + enum options { + n32, + n40, + n64, + n80, + n128, + n160, + n256, + n320, + n512, + n640, + n1280, + n2560, + n5120, + n10240, + n20480, + n40960, + n81920, + // ... + nulltype + } value; + typedef uint32_t number_type; + + const char* to_string() const; + uint32_t to_number() const; + }; + using types = enumerated; + + // choice methods + scs120_c_() = default; + scs120_c_(const scs120_c_& other); + scs120_c_& operator=(const scs120_c_& other); + ~scs120_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& n32() + { + assert_choice_type(types::n32, type_, "scs120"); + return c.get(); + } + uint8_t& n40() + { + assert_choice_type(types::n40, type_, "scs120"); + return c.get(); + } + uint8_t& n64() + { + assert_choice_type(types::n64, type_, "scs120"); + return c.get(); + } + uint8_t& n80() + { + assert_choice_type(types::n80, type_, "scs120"); + return c.get(); + } + uint8_t& n128() + { + assert_choice_type(types::n128, type_, "scs120"); + return c.get(); + } + uint8_t& n160() + { + assert_choice_type(types::n160, type_, "scs120"); + return c.get(); + } + uint16_t& n256() + { + assert_choice_type(types::n256, type_, "scs120"); + return c.get(); + } + uint16_t& n320() + { + assert_choice_type(types::n320, type_, "scs120"); + return c.get(); + } + uint16_t& n512() + { + assert_choice_type(types::n512, type_, "scs120"); + return c.get(); + } + uint16_t& n640() + { + assert_choice_type(types::n640, type_, "scs120"); + return c.get(); + } + uint16_t& n1280() + { + assert_choice_type(types::n1280, type_, "scs120"); + return c.get(); + } + uint16_t& n2560() + { + assert_choice_type(types::n2560, type_, "scs120"); + return c.get(); + } + uint16_t& n5120() + { + assert_choice_type(types::n5120, type_, "scs120"); + return c.get(); + } + uint16_t& n10240() + { + assert_choice_type(types::n10240, type_, "scs120"); + return c.get(); + } + uint16_t& n20480() + { + assert_choice_type(types::n20480, type_, "scs120"); + return c.get(); + } + uint16_t& n40960() + { + assert_choice_type(types::n40960, type_, "scs120"); + return c.get(); + } + uint32_t& n81920() + { + assert_choice_type(types::n81920, type_, "scs120"); + return c.get(); + } + const uint8_t& n32() const + { + assert_choice_type(types::n32, type_, "scs120"); + return c.get(); + } + const uint8_t& n40() const + { + assert_choice_type(types::n40, type_, "scs120"); + return c.get(); + } + const uint8_t& n64() const + { + assert_choice_type(types::n64, type_, "scs120"); + return c.get(); + } + const uint8_t& n80() const + { + assert_choice_type(types::n80, type_, "scs120"); + return c.get(); + } + const uint8_t& n128() const + { + assert_choice_type(types::n128, type_, "scs120"); + return c.get(); + } + const uint8_t& n160() const + { + assert_choice_type(types::n160, type_, "scs120"); + return c.get(); + } + const uint16_t& n256() const + { + assert_choice_type(types::n256, type_, "scs120"); + return c.get(); + } + const uint16_t& n320() const + { + assert_choice_type(types::n320, type_, "scs120"); + return c.get(); + } + const uint16_t& n512() const + { + assert_choice_type(types::n512, type_, "scs120"); + return c.get(); + } + const uint16_t& n640() const + { + assert_choice_type(types::n640, type_, "scs120"); + return c.get(); + } + const uint16_t& n1280() const + { + assert_choice_type(types::n1280, type_, "scs120"); + return c.get(); + } + const uint16_t& n2560() const + { + assert_choice_type(types::n2560, type_, "scs120"); + return c.get(); + } + const uint16_t& n5120() const + { + assert_choice_type(types::n5120, type_, "scs120"); + return c.get(); + } + const uint16_t& n10240() const + { + assert_choice_type(types::n10240, type_, "scs120"); + return c.get(); + } + const uint16_t& n20480() const + { + assert_choice_type(types::n20480, type_, "scs120"); + return c.get(); + } + const uint16_t& n40960() const + { + assert_choice_type(types::n40960, type_, "scs120"); + return c.get(); + } + const uint32_t& n81920() const + { + assert_choice_type(types::n81920, type_, "scs120"); + return c.get(); + } + uint8_t& set_n32(); + uint8_t& set_n40(); + uint8_t& set_n64(); + uint8_t& set_n80(); + uint8_t& set_n128(); + uint8_t& set_n160(); + uint16_t& set_n256(); + uint16_t& set_n320(); + uint16_t& set_n512(); + uint16_t& set_n640(); + uint16_t& set_n1280(); + uint16_t& set_n2560(); + uint16_t& set_n5120(); + uint16_t& set_n10240(); + uint16_t& set_n20480(); + uint16_t& set_n40960(); + uint32_t& set_n81920(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct types_opts { + enum options { scs15, scs30, scs60, scs120, /*...*/ nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + dl_ppw_periodicity_and_start_slot_r17_c() = default; + dl_ppw_periodicity_and_start_slot_r17_c(const dl_ppw_periodicity_and_start_slot_r17_c& other); + dl_ppw_periodicity_and_start_slot_r17_c& operator=(const dl_ppw_periodicity_and_start_slot_r17_c& other); + ~dl_ppw_periodicity_and_start_slot_r17_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 + scs15_c_& scs15() + { + assert_choice_type(types::scs15, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); + return c.get(); + } + scs30_c_& scs30() + { + assert_choice_type(types::scs30, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); + return c.get(); + } + scs60_c_& scs60() + { + assert_choice_type(types::scs60, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); + return c.get(); + } + scs120_c_& scs120() + { + assert_choice_type(types::scs120, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); + return c.get(); + } + const scs15_c_& scs15() const + { + assert_choice_type(types::scs15, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); + return c.get(); + } + const scs30_c_& scs30() const + { + assert_choice_type(types::scs30, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); + return c.get(); + } + const scs60_c_& scs60() const + { + assert_choice_type(types::scs60, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); + return c.get(); + } + const scs120_c_& scs120() const + { + assert_choice_type(types::scs120, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); + return c.get(); + } + scs15_c_& set_scs15(); + scs30_c_& set_scs30(); + scs60_c_& set_scs60(); + scs120_c_& set_scs120(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using dmrs_add_position_e_ = enumerated; + + // 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; + // ... + // group 0 + bool dmrs_dl_r16_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using time_freq_set_e_ = enumerated; + using int_cfg_per_serving_cell_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; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Dummy-TDRA-List ::= SEQUENCE (SIZE (1..16)) OF MultiPDSCH-TDRA-r17 +using dummy_tdra_list_l = dyn_array; + +// MinSchedulingOffsetK0-Values-r16 ::= SEQUENCE (SIZE (1..2)) OF INTEGER (0..16) +using min_sched_offset_k0_values_r16_l = bounded_array; + +// MinSchedulingOffsetK0-Values-r17 ::= SEQUENCE (SIZE (1..2)) OF INTEGER (0..64) +using min_sched_offset_k0_values_r17_l = bounded_array; + +// MultiPDSCH-TDRA-List-r17 ::= SEQUENCE (SIZE (1..64)) OF MultiPDSCH-TDRA-r17 +using multi_pdsch_tdra_list_r17_l = dyn_array; + +// 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; + // ... + // group 0 + bool tpc_idx_pucch_s_scell_r17_present = false; + bool tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present = false; + uint8_t tpc_idx_pucch_s_scell_r17 = 1; + uint8_t tpc_idx_pucch_s_scell_secondary_pucch_group_r17 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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_; } + 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(types::cell_level, type_, "RateMatchPatternGroup-item"); + return c.get(); + } + uint8_t& bwp_level() + { + assert_choice_type(types::bwp_level, type_, "RateMatchPatternGroup-item"); + return c.get(); + } + const uint8_t& cell_level() const + { + assert_choice_type(types::cell_level, type_, "RateMatchPatternGroup-item"); + return c.get(); + } + const uint8_t& bwp_level() const + { + assert_choice_type(types::bwp_level, type_, "RateMatchPatternGroup-item"); + return c.get(); + } + uint8_t& set_cell_level(); + uint8_t& set_bwp_level(); + +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; + +// RepetitionSchemeConfig-r16 ::= CHOICE +struct repeat_scheme_cfg_r16_c { + struct types_opts { + enum options { fdm_tdm_r16, slot_based_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + repeat_scheme_cfg_r16_c() = default; + repeat_scheme_cfg_r16_c(const repeat_scheme_cfg_r16_c& other); + repeat_scheme_cfg_r16_c& operator=(const repeat_scheme_cfg_r16_c& other); + ~repeat_scheme_cfg_r16_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 + setup_release_c& fdm_tdm_r16() + { + assert_choice_type(types::fdm_tdm_r16, type_, "RepetitionSchemeConfig-r16"); + return c.get>(); + } + setup_release_c& slot_based_r16() + { + assert_choice_type(types::slot_based_r16, type_, "RepetitionSchemeConfig-r16"); + return c.get>(); + } + const setup_release_c& fdm_tdm_r16() const + { + assert_choice_type(types::fdm_tdm_r16, type_, "RepetitionSchemeConfig-r16"); + return c.get>(); + } + const setup_release_c& slot_based_r16() const + { + assert_choice_type(types::slot_based_r16, type_, "RepetitionSchemeConfig-r16"); + return c.get>(); + } + setup_release_c& set_fdm_tdm_r16(); + setup_release_c& set_slot_based_r16(); + +private: + types type_; + choice_buffer_t, setup_release_c> c; + + void destroy_(); +}; + +// RepetitionSchemeConfig-v1630 ::= SEQUENCE +struct repeat_scheme_cfg_v1630_s { + setup_release_c slot_based_v1630; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using periodicity_e_ = enumerated; + struct pdsch_aggregation_factor_r16_opts { + enum options { n1, n2, n4, n8, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pdsch_aggregation_factor_r16_e_ = enumerated; + + // 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; + // ... + // group 0 + bool sps_cfg_idx_r16_present = false; + bool harq_proc_id_offset_r16_present = false; + bool periodicity_ext_r16_present = false; + bool harq_codebook_id_r16_present = false; + bool pdsch_aggregation_factor_r16_present = false; + uint8_t sps_cfg_idx_r16 = 0; + uint8_t harq_proc_id_offset_r16 = 0; + uint16_t periodicity_ext_r16 = 1; + uint8_t harq_codebook_id_r16 = 1; + pdsch_aggregation_factor_r16_e_ pdsch_aggregation_factor_r16; + // group 1 + bool sps_harq_deferral_r17_present = false; + bool n1_pucch_an_pucch_s_scell_r17_present = false; + bool periodicity_ext_r17_present = false; + bool nrof_harq_processes_v1710_present = false; + bool harq_proc_id_offset_v1700_present = false; + uint8_t sps_harq_deferral_r17 = 1; + uint8_t n1_pucch_an_pucch_s_scell_r17 = 0; + uint16_t periodicity_ext_r17 = 1; + uint8_t nrof_harq_processes_v1710 = 9; + uint8_t harq_proc_id_offset_v1700 = 16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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_3_present = false; + bool field_type_format2_3_present = false; + uint8_t start_bit_of_format2_3 = 1; + uint8_t field_type_format2_3 = 0; + // ... + // group 0 + bool start_bit_of_format2_3_sul_present = false; + uint8_t start_bit_of_format2_3_sul = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SearchSpaceSwitchConfig-r16 ::= SEQUENCE +struct search_space_switch_cfg_r16_s { + using cell_groups_for_switch_list_r16_l_ = dyn_array; + + // member variables + bool search_space_switch_delay_r16_present = false; + cell_groups_for_switch_list_r16_l_ cell_groups_for_switch_list_r16; + uint8_t search_space_switch_delay_r16 = 10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SearchSpaceSwitchConfig-r17 ::= SEQUENCE +struct search_space_switch_cfg_r17_s { + bool search_space_switch_timer_r17_present = false; + bool search_space_switch_delay_r17_present = false; + uint8_t search_space_switch_timer_r17 = 1; + uint8_t search_space_switch_delay_r17 = 10; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + // ... + // group 0 + bool add_pci_r17_present = false; + bool pathloss_ref_rs_id_r17_present = false; + bool ul_pwr_ctrl_r17_present = false; + uint8_t add_pci_r17 = 1; + uint8_t pathloss_ref_rs_id_r17 = 0; + uint8_t ul_pwr_ctrl_r17 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkCancellation-r16 ::= SEQUENCE +struct ul_cancellation_r16_s { + using ci_cfg_per_serving_cell_r16_l_ = dyn_array; + + // member variables + bool ext = false; + uint32_t ci_rnti_r16 = 0; + uint8_t dci_payload_size_for_ci_r16 = 0; + ci_cfg_per_serving_cell_r16_l_ ci_cfg_per_serving_cell_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BeamFailureDetection-r17 ::= SEQUENCE +struct beam_fail_detection_r17_s { + bool fail_detection_set1_r17_present = false; + bool fail_detection_set2_r17_present = false; + bool add_pci_r17_present = false; + beam_fail_detection_set_r17_s fail_detection_set1_r17; + beam_fail_detection_set_r17_s fail_detection_set2_r17; + uint8_t add_pci_r17 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CandidateBeamRS-r16 ::= SEQUENCE +struct candidate_beam_rs_r16_s { + struct candidate_beam_cfg_r16_c_ { + struct types_opts { + enum options { ssb_r16, csi_rs_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + candidate_beam_cfg_r16_c_() = default; + candidate_beam_cfg_r16_c_(const candidate_beam_cfg_r16_c_& other); + candidate_beam_cfg_r16_c_& operator=(const candidate_beam_cfg_r16_c_& other); + ~candidate_beam_cfg_r16_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_r16() + { + assert_choice_type(types::ssb_r16, type_, "candidateBeamConfig-r16"); + return c.get(); + } + uint8_t& csi_rs_r16() + { + assert_choice_type(types::csi_rs_r16, type_, "candidateBeamConfig-r16"); + return c.get(); + } + const uint8_t& ssb_r16() const + { + assert_choice_type(types::ssb_r16, type_, "candidateBeamConfig-r16"); + return c.get(); + } + const uint8_t& csi_rs_r16() const + { + assert_choice_type(types::csi_rs_r16, type_, "candidateBeamConfig-r16"); + return c.get(); + } + uint8_t& set_ssb_r16(); + uint8_t& set_csi_rs_r16(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool serving_cell_id_present = false; + candidate_beam_cfg_r16_c_ candidate_beam_cfg_r16; + uint8_t serving_cell_id = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DL-PPW-PreConfig-r17 ::= SEQUENCE +struct dl_ppw_pre_cfg_r17_s { + struct type_r17_opts { + enum options { type1_a, type1_b, type2, nulltype } value; + + const char* to_string() const; + }; + using type_r17_e_ = enumerated; + struct prio_r17_opts { + enum options { st1, st2, st3, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using prio_r17_e_ = enumerated; + + // member variables + bool type_r17_present = false; + bool prio_r17_present = false; + uint8_t dl_ppw_id_r17 = 0; + dl_ppw_periodicity_and_start_slot_r17_c dl_ppw_periodicity_and_start_slot_r17; + uint8_t len_r17 = 1; + type_r17_e_ type_r17; + prio_r17_e_ prio_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCCH-Config ::= SEQUENCE +struct pdcch_cfg_s { + using coreset_to_add_mod_list_l_ = dyn_array; + using coreset_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; + using coreset_to_add_mod_list_size_ext_v1610_l_ = dyn_array; + using coreset_to_release_list_size_ext_r16_l_ = bounded_array; + using search_spaces_to_add_mod_list_ext_r16_l_ = dyn_array; + struct monitoring_cap_cfg_r16_opts { + enum options { r15monitoringcap, r16monitoringcap, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using monitoring_cap_cfg_r16_e_ = enumerated; + using search_spaces_to_add_mod_list_ext_v1700_l_ = dyn_array; + using pdcch_skipping_dur_list_r17_l_ = bounded_array; + + // member variables + bool ext = false; + bool dl_preemption_present = false; + bool tpc_pusch_present = false; + bool tpc_pucch_present = false; + bool tpc_srs_present = false; + coreset_to_add_mod_list_l_ coreset_to_add_mod_list; + coreset_to_release_list_l_ coreset_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 monitoring_cap_cfg_r16_present = false; + copy_ptr coreset_to_add_mod_list_size_ext_v1610; + copy_ptr coreset_to_release_list_size_ext_r16; + copy_ptr search_spaces_to_add_mod_list_ext_r16; + copy_ptr> ul_cancellation_r16; + monitoring_cap_cfg_r16_e_ monitoring_cap_cfg_r16; + copy_ptr search_space_switch_cfg_r16; + // group 1 + bool monitoring_cap_cfg_v1710_present = false; + copy_ptr search_spaces_to_add_mod_list_ext_v1700; + copy_ptr search_space_switch_cfg_r17; + copy_ptr pdcch_skipping_dur_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using vrb_to_prb_interleaver_e_ = enumerated; + struct res_alloc_opts { + enum options { res_alloc_type0, res_alloc_type1, dyn_switch, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using res_alloc_e_ = enumerated; + struct pdsch_aggregation_factor_opts { + enum options { n2, n4, n8, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pdsch_aggregation_factor_e_ = enumerated; + 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using rbg_size_e_ = enumerated; + struct mcs_table_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using mcs_table_e_ = enumerated; + struct max_nrof_code_words_sched_by_dci_opts { + enum options { n1, n2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using max_nrof_code_words_sched_by_dci_e_ = enumerated; + struct prb_bundling_type_c_ { + struct static_bundling_s_ { + struct bundle_size_opts { + enum options { n4, wideband, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using bundle_size_e_ = enumerated; + + // member variables + bool bundle_size_present = false; + bundle_size_e_ bundle_size; + }; + struct dyn_bundling_s_ { + struct bundle_size_set1_opts { + enum options { n4, wideband, n2_wideband, n4_wideband, nulltype } value; + + const char* to_string() const; + }; + using bundle_size_set1_e_ = enumerated; + struct bundle_size_set2_opts { + enum options { n4, wideband, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using bundle_size_set2_e_ = enumerated; + + // 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 { static_bundling, dyn_bundling, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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_(); } + 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(types::static_bundling, type_, "prb-BundlingType"); + return c.get(); + } + dyn_bundling_s_& dyn_bundling() + { + assert_choice_type(types::dyn_bundling, type_, "prb-BundlingType"); + return c.get(); + } + const static_bundling_s_& static_bundling() const + { + assert_choice_type(types::static_bundling, type_, "prb-BundlingType"); + return c.get(); + } + const dyn_bundling_s_& dyn_bundling() const + { + assert_choice_type(types::dyn_bundling, type_, "prb-BundlingType"); + return c.get(); + } + static_bundling_s_& set_static_bundling(); + dyn_bundling_s_& set_dyn_bundling(); + + private: + 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; + using aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16_l_ = dyn_array; + using aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16_l_ = bounded_array; + struct mcs_table_dci_1_2_r16_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using mcs_table_dci_1_2_r16_e_ = enumerated; + struct prb_bundling_type_dci_1_2_r16_c_ { + struct static_bundling_r16_s_ { + struct bundle_size_r16_opts { + enum options { n4, wideband, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using bundle_size_r16_e_ = enumerated; + + // member variables + bool bundle_size_r16_present = false; + bundle_size_r16_e_ bundle_size_r16; + }; + struct dyn_bundling_r16_s_ { + struct bundle_size_set1_r16_opts { + enum options { n4, wideband, n2_wideband, n4_wideband, nulltype } value; + + const char* to_string() const; + }; + using bundle_size_set1_r16_e_ = enumerated; + struct bundle_size_set2_r16_opts { + enum options { n4, wideband, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using bundle_size_set2_r16_e_ = enumerated; + + // member variables + bool bundle_size_set1_r16_present = false; + bool bundle_size_set2_r16_present = false; + bundle_size_set1_r16_e_ bundle_size_set1_r16; + bundle_size_set2_r16_e_ bundle_size_set2_r16; + }; + struct types_opts { + enum options { static_bundling_r16, dyn_bundling_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + prb_bundling_type_dci_1_2_r16_c_() = default; + prb_bundling_type_dci_1_2_r16_c_(const prb_bundling_type_dci_1_2_r16_c_& other); + prb_bundling_type_dci_1_2_r16_c_& operator=(const prb_bundling_type_dci_1_2_r16_c_& other); + ~prb_bundling_type_dci_1_2_r16_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_r16_s_& static_bundling_r16() + { + assert_choice_type(types::static_bundling_r16, type_, "prb-BundlingTypeDCI-1-2-r16"); + return c.get(); + } + dyn_bundling_r16_s_& dyn_bundling_r16() + { + assert_choice_type(types::dyn_bundling_r16, type_, "prb-BundlingTypeDCI-1-2-r16"); + return c.get(); + } + const static_bundling_r16_s_& static_bundling_r16() const + { + assert_choice_type(types::static_bundling_r16, type_, "prb-BundlingTypeDCI-1-2-r16"); + return c.get(); + } + const dyn_bundling_r16_s_& dyn_bundling_r16() const + { + assert_choice_type(types::dyn_bundling_r16, type_, "prb-BundlingTypeDCI-1-2-r16"); + return c.get(); + } + static_bundling_r16_s_& set_static_bundling_r16(); + dyn_bundling_r16_s_& set_dyn_bundling_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct res_alloc_type1_granularity_dci_1_2_r16_opts { + enum options { n2, n4, n8, n16, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using res_alloc_type1_granularity_dci_1_2_r16_e_ = enumerated; + struct vrb_to_prb_interleaver_dci_1_2_r16_opts { + enum options { n2, n4, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using vrb_to_prb_interleaver_dci_1_2_r16_e_ = enumerated; + struct res_alloc_dci_1_2_r16_opts { + enum options { res_alloc_type0, res_alloc_type1, dyn_switch, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using res_alloc_dci_1_2_r16_e_ = enumerated; + struct dl_or_joint_tci_state_list_r17_c_ { + struct explicitlist_s_ { + using dl_or_joint_tci_state_to_add_mod_list_r17_l_ = dyn_array; + using dl_or_joint_tci_state_to_release_list_r17_l_ = dyn_array; + + // member variables + dl_or_joint_tci_state_to_add_mod_list_r17_l_ dl_or_joint_tci_state_to_add_mod_list_r17; + dl_or_joint_tci_state_to_release_list_r17_l_ dl_or_joint_tci_state_to_release_list_r17; + }; + struct types_opts { + enum options { explicitlist, unified_tci_state_ref_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + dl_or_joint_tci_state_list_r17_c_() = default; + dl_or_joint_tci_state_list_r17_c_(const dl_or_joint_tci_state_list_r17_c_& other); + dl_or_joint_tci_state_list_r17_c_& operator=(const dl_or_joint_tci_state_list_r17_c_& other); + ~dl_or_joint_tci_state_list_r17_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 + explicitlist_s_& explicitlist() + { + assert_choice_type(types::explicitlist, type_, "dl-OrJointTCI-StateList-r17"); + return c.get(); + } + serving_cell_and_bwp_id_r17_s& unified_tci_state_ref_r17() + { + assert_choice_type(types::unified_tci_state_ref_r17, type_, "dl-OrJointTCI-StateList-r17"); + return c.get(); + } + const explicitlist_s_& explicitlist() const + { + assert_choice_type(types::explicitlist, type_, "dl-OrJointTCI-StateList-r17"); + return c.get(); + } + const serving_cell_and_bwp_id_r17_s& unified_tci_state_ref_r17() const + { + assert_choice_type(types::unified_tci_state_ref_r17, type_, "dl-OrJointTCI-StateList-r17"); + return c.get(); + } + explicitlist_s_& set_explicitlist(); + serving_cell_and_bwp_id_r17_s& set_unified_tci_state_ref_r17(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct beam_app_time_r17_opts { + enum options { + n1, + n2, + n4, + n7, + n14, + n28, + n42, + n56, + n70, + n84, + n98, + n112, + n224, + n336, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using beam_app_time_r17_e_ = enumerated; + struct xoverhead_multicast_r17_opts { + enum options { xoh6, xoh12, xoh18, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using xoverhead_multicast_r17_e_ = enumerated; + + // 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 vrb_to_prb_interleaver_present = false; + bool pdsch_time_domain_alloc_list_present = false; + bool pdsch_aggregation_factor_present = false; + bool mcs_table_present = false; + bool max_nrof_code_words_sched_by_dci_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; + // ... + // group 0 + bool ant_ports_field_presence_dci_1_2_r16_present = false; + bool dmrs_seq_initization_dci_1_2_r16_present = false; + bool harq_process_num_size_dci_1_2_r16_present = false; + bool mcs_table_dci_1_2_r16_present = false; + bool nof_bits_for_rv_dci_1_2_r16_present = false; + bool prio_ind_dci_1_2_r16_present = false; + bool res_alloc_type1_granularity_dci_1_2_r16_present = false; + bool vrb_to_prb_interleaver_dci_1_2_r16_present = false; + bool ref_of_slivdci_1_2_r16_present = false; + bool res_alloc_dci_1_2_r16_present = false; + bool prio_ind_dci_1_1_r16_present = false; + bool data_scrambling_id_pdsch2_r16_present = false; + copy_ptr>> max_mimo_layers_r16; + copy_ptr, 1, 2>>> minimum_sched_offset_k0_r16; + copy_ptr + aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16; + copy_ptr + aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16; + copy_ptr> dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16; + copy_ptr> dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16; + uint8_t harq_process_num_size_dci_1_2_r16 = 0; + mcs_table_dci_1_2_r16_e_ mcs_table_dci_1_2_r16; + uint8_t nof_bits_for_rv_dci_1_2_r16 = 0; + copy_ptr>> + pdsch_time_domain_alloc_list_dci_1_2_r16; + copy_ptr prb_bundling_type_dci_1_2_r16; + copy_ptr rate_match_pattern_group1_dci_1_2_r16; + copy_ptr rate_match_pattern_group2_dci_1_2_r16; + res_alloc_type1_granularity_dci_1_2_r16_e_ res_alloc_type1_granularity_dci_1_2_r16; + vrb_to_prb_interleaver_dci_1_2_r16_e_ vrb_to_prb_interleaver_dci_1_2_r16; + res_alloc_dci_1_2_r16_e_ res_alloc_dci_1_2_r16; + uint16_t data_scrambling_id_pdsch2_r16 = 0; + copy_ptr>> pdsch_time_domain_alloc_list_r16; + copy_ptr> repeat_scheme_cfg_r16; + // group 1 + copy_ptr> repeat_scheme_cfg_v1630; + // group 2 + bool pdsch_harq_ack_one_shot_feedback_dci_1_2_r17_present = false; + bool pdsch_harq_ack_enh_type3_dci_1_2_r17_present = false; + bool pdsch_harq_ack_enh_type3_dci_field_1_2_r17_present = false; + bool pdsch_harq_ack_retx_dci_1_2_r17_present = false; + bool pucch_s_scell_dyn_dci_1_2_r17_present = false; + bool beam_app_time_r17_present = false; + bool dmrs_fd_occ_disabled_for_rank1_pdsch_r17_present = false; + bool harq_process_num_size_dci_1_2_v1700_present = false; + bool harq_process_num_size_dci_1_1_r17_present = false; + bool mcs_table_r17_present = false; + bool mcs_table_dci_1_2_r17_present = false; + bool xoverhead_multicast_r17_present = false; + bool prio_ind_dci_4_2_r17_present = false; + bool size_dci_4_2_r17_present = false; + copy_ptr dl_or_joint_tci_state_list_r17; + beam_app_time_r17_e_ beam_app_time_r17; + copy_ptr>> dummy; + copy_ptr, 1, 2>>> minimum_sched_offset_k0_r17; + uint8_t harq_process_num_size_dci_1_2_v1700 = 0; + uint8_t harq_process_num_size_dci_1_1_r17 = 5; + xoverhead_multicast_r17_e_ xoverhead_multicast_r17; + uint8_t size_dci_4_2_r17 = 20; + // group 3 + copy_ptr>> pdsch_time_domain_alloc_list_for_multi_pdsch_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + }; + using purpose_e_ = enumerated; + struct detection_res_c_ { + struct types_opts { + enum options { ssb_idx, csi_rs_idx, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::ssb_idx, type_, "detectionResource"); + return c.get(); + } + uint8_t& csi_rs_idx() + { + assert_choice_type(types::csi_rs_idx, type_, "detectionResource"); + return c.get(); + } + const uint8_t& ssb_idx() const + { + assert_choice_type(types::ssb_idx, type_, "detectionResource"); + return c.get(); + } + const uint8_t& csi_rs_idx() const + { + assert_choice_type(types::csi_rs_idx, type_, "detectionResource"); + return c.get(); + } + uint8_t& set_ssb_idx(); + uint8_t& set_csi_rs_idx(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext = false; + uint8_t radio_link_monitoring_rs_id = 0; + purpose_e_ purpose; + detection_res_c_ detection_res; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SPS-ConfigDeactivationState-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..7) +using sps_cfg_deactivation_state_r16_l = bounded_array; + +// SPS-ConfigMulticastToAddModList-r17 ::= SEQUENCE (SIZE (1..8)) OF SPS-Config +using sps_cfg_multicast_to_add_mod_list_r17_l = dyn_array; + +// SPS-ConfigMulticastToReleaseList-r17 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..7) +using sps_cfg_multicast_to_release_list_r17_l = bounded_array; + +// BeamFailureRecoveryRSConfig-r16 ::= SEQUENCE +struct beam_fail_recovery_rs_cfg_r16_s { + using candidate_beam_rs_list_r16_l_ = dyn_array; + using candidate_beam_rs_list2_r17_l_ = dyn_array; + + // member variables + bool ext = false; + bool rsrp_thres_bfr_r16_present = false; + uint8_t rsrp_thres_bfr_r16 = 0; + candidate_beam_rs_list_r16_l_ candidate_beam_rs_list_r16; + // ... + // group 0 + copy_ptr candidate_beam_rs_list2_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CFR-ConfigMulticast-r17 ::= SEQUENCE +struct cfr_cfg_multicast_r17_s { + bool location_and_bw_multicast_r17_present = false; + bool pdcch_cfg_multicast_r17_present = false; + bool pdsch_cfg_multicast_r17_present = false; + uint16_t location_and_bw_multicast_r17 = 0; + pdcch_cfg_s pdcch_cfg_multicast_r17; + pdsch_cfg_s pdsch_cfg_multicast_r17; + sps_cfg_multicast_to_add_mod_list_r17_l sps_cfg_multicast_to_add_mod_list_r17; + sps_cfg_multicast_to_release_list_r17_l sps_cfg_multicast_to_release_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DL-PPW-PreConfigToAddModList-r17 ::= SEQUENCE (SIZE (1..4)) OF DL-PPW-PreConfig-r17 +using dl_ppw_pre_cfg_to_add_mod_list_r17_l = dyn_array; + +// DL-PPW-PreConfigToReleaseList-r17 ::= SEQUENCE (SIZE (1..4)) OF INTEGER (0..15) +using dl_ppw_pre_cfg_to_release_list_r17_l = bounded_array; + +// 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using beam_fail_instance_max_count_e_ = enumerated; + struct beam_fail_detection_timer_opts { + enum options { pbfd1, pbfd2, pbfd3, pbfd4, pbfd5, pbfd6, pbfd8, pbfd10, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using beam_fail_detection_timer_e_ = enumerated; + + // member variables + bool ext = 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; + // ... + // group 0 + copy_ptr beam_fail_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SPS-ConfigDeactivationStateList-r16 ::= SEQUENCE (SIZE (1..16)) OF SPS-ConfigDeactivationState-r16 +using sps_cfg_deactivation_state_list_r16_l = dyn_array; + +// SPS-ConfigToAddModList-r16 ::= SEQUENCE (SIZE (1..8)) OF SPS-Config +using sps_cfg_to_add_mod_list_r16_l = dyn_array; + +// SPS-ConfigToReleaseList-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..7) +using sps_cfg_to_release_list_r16_l = bounded_array; + +// 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; + // ... + // group 0 + copy_ptr sps_cfg_to_add_mod_list_r16; + copy_ptr sps_cfg_to_release_list_r16; + copy_ptr sps_cfg_deactivation_state_list_r16; + copy_ptr> beam_fail_recovery_scell_cfg_r16; + copy_ptr> sl_pdcch_cfg_r16; + copy_ptr> sl_v2x_pdcch_cfg_r16; + // group 1 + bool pre_conf_gap_status_r17_present = false; + bool harq_feedback_enablingfor_sp_sactive_r17_present = false; + bool serving_cell_mo_r17_present = false; + fixed_bitstring<8> pre_conf_gap_status_r17; + copy_ptr> beam_fail_recovery_sp_cell_cfg_r17; + bool harq_feedback_enablingfor_sp_sactive_r17 = false; + copy_ptr> cfr_cfg_multicast_r17; + copy_ptr dl_ppw_pre_cfg_to_add_mod_list_r17; + copy_ptr dl_ppw_pre_cfg_to_release_list_r17; + copy_ptr non_cell_defining_ssb_r17; + uint8_t serving_cell_mo_r17 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BWP-DownlinkDedicatedSDT-r17 ::= SEQUENCE +struct bwp_dl_ded_sdt_r17_s { + bool ext = false; + bool pdcch_cfg_r17_present = false; + bool pdsch_cfg_r17_present = false; + setup_release_c pdcch_cfg_r17; + setup_release_c pdsch_cfg_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-PathlossReferenceRS-r16 ::= SEQUENCE +struct pucch_pathloss_ref_rs_r16_s { + struct ref_sig_r16_c_ { + struct types_opts { + enum options { ssb_idx_r16, csi_rs_idx_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + ref_sig_r16_c_() = default; + ref_sig_r16_c_(const ref_sig_r16_c_& other); + ref_sig_r16_c_& operator=(const ref_sig_r16_c_& other); + ~ref_sig_r16_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_r16() + { + assert_choice_type(types::ssb_idx_r16, type_, "referenceSignal-r16"); + return c.get(); + } + uint8_t& csi_rs_idx_r16() + { + assert_choice_type(types::csi_rs_idx_r16, type_, "referenceSignal-r16"); + return c.get(); + } + const uint8_t& ssb_idx_r16() const + { + assert_choice_type(types::ssb_idx_r16, type_, "referenceSignal-r16"); + return c.get(); + } + const uint8_t& csi_rs_idx_r16() const + { + assert_choice_type(types::csi_rs_idx_r16, type_, "referenceSignal-r16"); + return c.get(); + } + uint8_t& set_ssb_idx_r16(); + uint8_t& set_csi_rs_idx_r16(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t pucch_pathloss_ref_rs_id_r16 = 4; + ref_sig_r16_c_ ref_sig_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PathlossReferenceRS-Config ::= CHOICE +struct pathloss_ref_rs_cfg_c { + struct types_opts { + enum options { ssb_idx, csi_rs_idx, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + pathloss_ref_rs_cfg_c() = default; + pathloss_ref_rs_cfg_c(const pathloss_ref_rs_cfg_c& other); + pathloss_ref_rs_cfg_c& operator=(const pathloss_ref_rs_cfg_c& other); + ~pathloss_ref_rs_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() + { + assert_choice_type(types::ssb_idx, type_, "PathlossReferenceRS-Config"); + return c.get(); + } + uint8_t& csi_rs_idx() + { + assert_choice_type(types::csi_rs_idx, type_, "PathlossReferenceRS-Config"); + return c.get(); + } + const uint8_t& ssb_idx() const + { + assert_choice_type(types::ssb_idx, type_, "PathlossReferenceRS-Config"); + return c.get(); + } + const uint8_t& csi_rs_idx() const + { + assert_choice_type(types::csi_rs_idx, type_, "PathlossReferenceRS-Config"); + return c.get(); + } + uint8_t& set_ssb_idx(); + uint8_t& set_csi_rs_idx(); + +private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); +}; + +// Alpha ::= ENUMERATED +struct alpha_opts { + enum options { alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; +}; +using alpha_e = enumerated; + +// 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; +}; + +// BetaOffsetsCrossPri-r17 ::= SEQUENCE (SIZE (3)) OF INTEGER (0..31) +using beta_offsets_cross_pri_r17_l = std::array; + +// DMRS-UplinkTransformPrecoding-r16 ::= SEQUENCE +struct dmrs_ul_transform_precoding_r16_s { + bool pi2_bpsk_scrambling_id0_present = false; + bool pi2_bpsk_scrambling_id1_present = false; + uint32_t pi2_bpsk_scrambling_id0 = 0; + uint32_t pi2_bpsk_scrambling_id1 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using max_nrof_ports_e_ = enumerated; + struct res_elem_offset_opts { + enum options { offset01, offset10, offset11, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using res_elem_offset_e_ = enumerated; + struct ptrs_pwr_opts { + enum options { p00, p01, p10, p11, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using ptrs_pwr_e_ = enumerated; + + // 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; + }; + + // 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; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; +}; +using pucch_max_code_rate_e = enumerated; + +// 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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::ssb_idx, type_, "referenceSignal"); + return c.get(); + } + uint8_t& csi_rs_idx() + { + assert_choice_type(types::csi_rs_idx, type_, "referenceSignal"); + return c.get(); + } + const uint8_t& ssb_idx() const + { + assert_choice_type(types::ssb_idx, type_, "referenceSignal"); + return c.get(); + } + const uint8_t& csi_rs_idx() const + { + assert_choice_type(types::csi_rs_idx, type_, "referenceSignal"); + return c.get(); + } + uint8_t& set_ssb_idx(); + uint8_t& set_csi_rs_idx(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t pucch_pathloss_ref_rs_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; +}; + +// PUCCH-SRS ::= SEQUENCE +struct pucch_srs_s { + uint8_t res = 0; + uint8_t ul_bwp = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using occ_len_e_ = enumerated; + struct occ_idx_opts { + enum options { n0, n1, n2, n3, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using occ_idx_e_ = enumerated; + + // 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-Allocation-r16 ::= SEQUENCE +struct pusch_alloc_r16_s { + struct map_type_r16_opts { + enum options { type_a, type_b, nulltype } value; + + const char* to_string() const; + }; + using map_type_r16_e_ = enumerated; + struct nof_repeats_r16_opts { + enum options { n1, n2, n3, n4, n7, n8, n12, n16, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using nof_repeats_r16_e_ = enumerated; + struct nof_repeats_ext_r17_opts { + enum options { + n1, + n2, + n3, + n4, + n7, + n8, + n12, + n16, + n20, + n24, + n28, + n32, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using nof_repeats_ext_r17_e_ = enumerated; + struct nof_slots_t_bo_ms_r17_opts { + enum options { n1, n2, n4, n8, spare4, spare3, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using nof_slots_t_bo_ms_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool map_type_r16_present = false; + bool start_symbol_and_len_r16_present = false; + bool start_symbol_r16_present = false; + bool len_r16_present = false; + bool nof_repeats_r16_present = false; + map_type_r16_e_ map_type_r16; + uint8_t start_symbol_and_len_r16 = 0; + uint8_t start_symbol_r16 = 0; + uint8_t len_r16 = 1; + nof_repeats_r16_e_ nof_repeats_r16; + // ... + // group 0 + bool nof_repeats_ext_r17_present = false; + bool nof_slots_t_bo_ms_r17_present = false; + bool extended_k2_r17_present = false; + nof_repeats_ext_r17_e_ nof_repeats_ext_r17; + nof_slots_t_bo_ms_r17_e_ nof_slots_t_bo_ms_r17; + uint8_t extended_k2_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PathlossReferenceRS-r16 ::= SEQUENCE +struct pathloss_ref_rs_r16_s { + uint8_t srs_pathloss_ref_rs_id_r16 = 0; + pathloss_ref_rs_cfg_c pathloss_ref_rs_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PathlossReferenceRSs-v1610 ::= SEQUENCE (SIZE (1..60)) OF PUCCH-PathlossReferenceRS-r16 +using pathloss_ref_rss_v1610_l = dyn_array; + +// SPS-PUCCH-AN-r16 ::= SEQUENCE +struct sps_pucch_an_r16_s { + bool max_payload_size_r16_present = false; + uint8_t sps_pucch_an_res_id_r16 = 0; + uint16_t max_payload_size_r16 = 4; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BetaOffsetsCrossPriSelCG-r17 ::= CHOICE +struct beta_offsets_cross_pri_sel_cg_r17_c { + using dyn_r17_l_ = dyn_array; + struct types_opts { + enum options { dyn_r17, semi_static_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + beta_offsets_cross_pri_sel_cg_r17_c() = default; + beta_offsets_cross_pri_sel_cg_r17_c(const beta_offsets_cross_pri_sel_cg_r17_c& other); + beta_offsets_cross_pri_sel_cg_r17_c& operator=(const beta_offsets_cross_pri_sel_cg_r17_c& other); + ~beta_offsets_cross_pri_sel_cg_r17_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_r17_l_& dyn_r17() + { + assert_choice_type(types::dyn_r17, type_, "BetaOffsetsCrossPriSelCG-r17"); + return c.get(); + } + beta_offsets_cross_pri_r17_l& semi_static_r17() + { + assert_choice_type(types::semi_static_r17, type_, "BetaOffsetsCrossPriSelCG-r17"); + return c.get(); + } + const dyn_r17_l_& dyn_r17() const + { + assert_choice_type(types::dyn_r17, type_, "BetaOffsetsCrossPriSelCG-r17"); + return c.get(); + } + const beta_offsets_cross_pri_r17_l& semi_static_r17() const + { + assert_choice_type(types::semi_static_r17, type_, "BetaOffsetsCrossPriSelCG-r17"); + return c.get(); + } + dyn_r17_l_& set_dyn_r17(); + beta_offsets_cross_pri_r17_l& set_semi_static_r17(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// CG-COT-Sharing-r16 ::= CHOICE +struct cg_cot_sharing_r16_c { + struct cot_sharing_r16_s_ { + uint8_t dur_r16 = 1; + uint8_t offset_r16 = 1; + uint8_t ch_access_prio_r16 = 1; + }; + struct types_opts { + enum options { no_cot_sharing_r16, cot_sharing_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + cg_cot_sharing_r16_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 + cot_sharing_r16_s_& cot_sharing_r16() + { + assert_choice_type(types::cot_sharing_r16, type_, "CG-COT-Sharing-r16"); + return c; + } + const cot_sharing_r16_s_& cot_sharing_r16() const + { + assert_choice_type(types::cot_sharing_r16, type_, "CG-COT-Sharing-r16"); + return c; + } + void set_no_cot_sharing_r16(); + cot_sharing_r16_s_& set_cot_sharing_r16(); + +private: + types type_; + cot_sharing_r16_s_ c; +}; + +// CG-COT-Sharing-r17 ::= CHOICE +struct cg_cot_sharing_r17_c { + struct cot_sharing_r17_s_ { + uint16_t dur_r17 = 1; + uint16_t offset_r17 = 1; + }; + struct types_opts { + enum options { no_cot_sharing_r17, cot_sharing_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + cg_cot_sharing_r17_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 + cot_sharing_r17_s_& cot_sharing_r17() + { + assert_choice_type(types::cot_sharing_r17, type_, "CG-COT-Sharing-r17"); + return c; + } + const cot_sharing_r17_s_& cot_sharing_r17() const + { + assert_choice_type(types::cot_sharing_r17, type_, "CG-COT-Sharing-r17"); + return c; + } + void set_no_cot_sharing_r17(); + cot_sharing_r17_s_& set_cot_sharing_r17(); + +private: + types type_; + cot_sharing_r17_s_ c; +}; + +// CG-SDT-Configuration-r17 ::= SEQUENCE +struct cg_sdt_cfg_r17_s { + struct sdt_ssb_subset_r17_c_ { + struct types_opts { + enum options { short_bitmap_r17, medium_bitmap_r17, long_bitmap_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + sdt_ssb_subset_r17_c_() = default; + sdt_ssb_subset_r17_c_(const sdt_ssb_subset_r17_c_& other); + sdt_ssb_subset_r17_c_& operator=(const sdt_ssb_subset_r17_c_& other); + ~sdt_ssb_subset_r17_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_r17() + { + assert_choice_type(types::short_bitmap_r17, type_, "sdt-SSB-Subset-r17"); + return c.get>(); + } + fixed_bitstring<8>& medium_bitmap_r17() + { + assert_choice_type(types::medium_bitmap_r17, type_, "sdt-SSB-Subset-r17"); + return c.get>(); + } + fixed_bitstring<64>& long_bitmap_r17() + { + assert_choice_type(types::long_bitmap_r17, type_, "sdt-SSB-Subset-r17"); + return c.get>(); + } + const fixed_bitstring<4>& short_bitmap_r17() const + { + assert_choice_type(types::short_bitmap_r17, type_, "sdt-SSB-Subset-r17"); + return c.get>(); + } + const fixed_bitstring<8>& medium_bitmap_r17() const + { + assert_choice_type(types::medium_bitmap_r17, type_, "sdt-SSB-Subset-r17"); + return c.get>(); + } + const fixed_bitstring<64>& long_bitmap_r17() const + { + assert_choice_type(types::long_bitmap_r17, type_, "sdt-SSB-Subset-r17"); + return c.get>(); + } + fixed_bitstring<4>& set_short_bitmap_r17(); + fixed_bitstring<8>& set_medium_bitmap_r17(); + fixed_bitstring<64>& set_long_bitmap_r17(); + + private: + types type_; + choice_buffer_t> c; + + void destroy_(); + }; + struct sdt_ssb_per_cg_pusch_r17_opts { + enum options { one_eighth, one_fourth, half, one, two, four, eight, sixteen, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using sdt_ssb_per_cg_pusch_r17_e_ = enumerated; + struct sdt_alpha_r17_opts { + enum options { alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using sdt_alpha_r17_e_ = enumerated; + struct sdt_dmrs_ports_r17_c_ { + struct types_opts { + enum options { dmrs_type1_r17, dmrs_type2_r17, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + sdt_dmrs_ports_r17_c_() = default; + sdt_dmrs_ports_r17_c_(const sdt_dmrs_ports_r17_c_& other); + sdt_dmrs_ports_r17_c_& operator=(const sdt_dmrs_ports_r17_c_& other); + ~sdt_dmrs_ports_r17_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>& dmrs_type1_r17() + { + assert_choice_type(types::dmrs_type1_r17, type_, "sdt-DMRS-Ports-r17"); + return c.get>(); + } + fixed_bitstring<12>& dmrs_type2_r17() + { + assert_choice_type(types::dmrs_type2_r17, type_, "sdt-DMRS-Ports-r17"); + return c.get>(); + } + const fixed_bitstring<8>& dmrs_type1_r17() const + { + assert_choice_type(types::dmrs_type1_r17, type_, "sdt-DMRS-Ports-r17"); + return c.get>(); + } + const fixed_bitstring<12>& dmrs_type2_r17() const + { + assert_choice_type(types::dmrs_type2_r17, type_, "sdt-DMRS-Ports-r17"); + return c.get>(); + } + fixed_bitstring<8>& set_dmrs_type1_r17(); + fixed_bitstring<12>& set_dmrs_type2_r17(); + + private: + types type_; + choice_buffer_t> c; + + void destroy_(); + }; + + // member variables + bool cg_sdt_retx_timer_present = false; + bool sdt_ssb_subset_r17_present = false; + bool sdt_ssb_per_cg_pusch_r17_present = false; + bool sdt_p0_pusch_r17_present = false; + bool sdt_alpha_r17_present = false; + bool sdt_dmrs_ports_r17_present = false; + bool sdt_nrof_dmrs_seqs_r17_present = false; + uint8_t cg_sdt_retx_timer = 1; + sdt_ssb_subset_r17_c_ sdt_ssb_subset_r17; + sdt_ssb_per_cg_pusch_r17_e_ sdt_ssb_per_cg_pusch_r17; + int8_t sdt_p0_pusch_r17 = -16; + sdt_alpha_r17_e_ sdt_alpha_r17; + sdt_dmrs_ports_r17_c_ sdt_dmrs_ports_r17; + uint8_t sdt_nrof_dmrs_seqs_r17 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CG-StartingOffsets-r16 ::= SEQUENCE +struct cg_start_offsets_r16_s { + using cg_start_full_bw_inside_cot_r16_l_ = bounded_array; + using cg_start_full_bw_outside_cot_r16_l_ = bounded_array; + + // member variables + bool cg_start_partial_bw_inside_cot_r16_present = false; + bool cg_start_partial_bw_outside_cot_r16_present = false; + cg_start_full_bw_inside_cot_r16_l_ cg_start_full_bw_inside_cot_r16; + cg_start_full_bw_outside_cot_r16_l_ cg_start_full_bw_outside_cot_r16; + uint8_t cg_start_partial_bw_inside_cot_r16 = 0; + uint8_t cg_start_partial_bw_outside_cot_r16 = 0; + + // 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 dyn_l_ = dyn_array; + struct types_opts { + enum options { dyn, semi_static, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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 + dyn_l_& dyn() + { + assert_choice_type(types::dyn, type_, "CG-UCI-OnPUSCH"); + return c.get(); + } + beta_offsets_s& semi_static() + { + assert_choice_type(types::semi_static, type_, "CG-UCI-OnPUSCH"); + return c.get(); + } + const dyn_l_& dyn() const + { + assert_choice_type(types::dyn, type_, "CG-UCI-OnPUSCH"); + return c.get(); + } + const beta_offsets_s& semi_static() const + { + assert_choice_type(types::semi_static, type_, "CG-UCI-OnPUSCH"); + return c.get(); + } + dyn_l_& set_dyn(); + beta_offsets_s& set_semi_static(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// DL-DataToUL-ACK-DCI-1-2-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..15) +using dl_data_to_ul_ack_dci_1_2_r16_l = bounded_array; + +// DL-DataToUL-ACK-DCI-1-2-r17 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..127) +using dl_data_to_ul_ack_dci_1_2_r17_l = bounded_array; + +// DL-DataToUL-ACK-MulticastDCI-Format4-1-r17 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..15) +using dl_data_to_ul_ack_multicast_dci_format4_1_r17_l = bounded_array; + +// DL-DataToUL-ACK-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (-1..15) +using dl_data_to_ul_ack_r16_l = bounded_array; + +// DL-DataToUL-ACK-r17 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (-1..127) +using dl_data_to_ul_ack_r17_l = bounded_array; + +// DL-DataToUL-ACK-v1700 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (16..31) +using dl_data_to_ul_ack_v1700_l = bounded_array; + +// DMRS-BundlingPUCCH-Config-r17 ::= SEQUENCE +struct dmrs_bundling_pucch_cfg_r17_s { + struct pucch_freq_hop_interv_r17_opts { + enum options { s2, s4, s5, s10, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pucch_freq_hop_interv_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool pucch_dmrs_bundling_r17_present = false; + bool pucch_time_domain_win_len_r17_present = false; + bool pucch_win_restart_r17_present = false; + bool pucch_freq_hop_interv_r17_present = false; + uint8_t pucch_time_domain_win_len_r17 = 2; + pucch_freq_hop_interv_r17_e_ pucch_freq_hop_interv_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using dmrs_add_position_e_ = enumerated; + 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; + // ... + // group 0 + bool dmrs_ul_r16_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + }; + 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; + // ... + // group 0 + copy_ptr> dmrs_ul_transform_precoding_r16; + + // 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 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; +}; + +// DummyPathlossReferenceRS-v1710 ::= SEQUENCE +struct dummy_pathloss_ref_rs_v1710_s { + bool add_pci_r17_present = false; + uint8_t pusch_pathloss_ref_rs_id_r17 = 0; + uint8_t add_pci_r17 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; +}; + +// P0-PUSCH-Set-r16 ::= SEQUENCE +struct p0_pusch_set_r16_s { + using p0_list_r16_l_ = bounded_array; + + // member variables + bool ext = false; + uint8_t p0_pusch_set_id_r16 = 0; + p0_list_r16_l_ p0_list_r16; + // ... + + // 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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::ssb, type_, "PRACH-ResourceDedicatedBFR"); + return c.get(); + } + bfr_csi_rs_res_s& csi_rs() + { + assert_choice_type(types::csi_rs, type_, "PRACH-ResourceDedicatedBFR"); + return c.get(); + } + const bfr_ssb_res_s& ssb() const + { + assert_choice_type(types::ssb, type_, "PRACH-ResourceDedicatedBFR"); + return c.get(); + } + const bfr_csi_rs_res_s& csi_rs() const + { + assert_choice_type(types::csi_rs, type_, "PRACH-ResourceDedicatedBFR"); + return c.get(); + } + bfr_ssb_res_s& set_ssb(); + bfr_csi_rs_res_s& set_csi_rs(); + +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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using nrof_slots_e_ = enumerated; + + // 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-FormatConfigExt-r17 ::= SEQUENCE +struct pucch_format_cfg_ext_r17_s { + bool ext = false; + bool max_code_rate_lp_r17_present = false; + pucch_max_code_rate_e max_code_rate_lp_r17; + // ... + + // 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 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; + // ... + // group 0 + copy_ptr>> pathloss_ref_rss_v1610; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-PowerControlSetInfo-r17 ::= SEQUENCE +struct pucch_pwr_ctrl_set_info_r17_s { + struct pucch_closed_loop_idx_r17_opts { + enum options { i0, i1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pucch_closed_loop_idx_r17_e_ = enumerated; + + // member variables + uint8_t pucch_pwr_ctrl_set_info_id_r17 = 1; + uint8_t p0_pucch_id_r17 = 1; + pucch_closed_loop_idx_r17_e_ pucch_closed_loop_idx_r17; + uint8_t pucch_pathloss_ref_rs_id_r17 = 0; + + // 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // 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(types::format0, type_, "format"); + return c.get(); + } + pucch_format1_s& format1() + { + assert_choice_type(types::format1, type_, "format"); + return c.get(); + } + pucch_format2_s& format2() + { + assert_choice_type(types::format2, type_, "format"); + return c.get(); + } + pucch_format3_s& format3() + { + assert_choice_type(types::format3, type_, "format"); + return c.get(); + } + pucch_format4_s& format4() + { + assert_choice_type(types::format4, type_, "format"); + return c.get(); + } + const pucch_format0_s& format0() const + { + assert_choice_type(types::format0, type_, "format"); + return c.get(); + } + const pucch_format1_s& format1() const + { + assert_choice_type(types::format1, type_, "format"); + return c.get(); + } + const pucch_format2_s& format2() const + { + assert_choice_type(types::format2, type_, "format"); + return c.get(); + } + const pucch_format3_s& format3() const + { + assert_choice_type(types::format3, type_, "format"); + return c.get(); + } + const pucch_format4_s& format4() const + { + assert_choice_type(types::format4, type_, "format"); + return c.get(); + } + pucch_format0_s& set_format0(); + pucch_format1_s& set_format1(); + pucch_format2_s& set_format2(); + pucch_format3_s& set_format3(); + pucch_format4_s& set_format4(); + + 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-ResourceExt-v1610 ::= SEQUENCE +struct pucch_res_ext_v1610_s { + struct interlace_alloc_r16_s_ { + struct interlace0_r16_c_ { + struct types_opts { + enum options { scs15, scs30, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + interlace0_r16_c_() = default; + interlace0_r16_c_(const interlace0_r16_c_& other); + interlace0_r16_c_& operator=(const interlace0_r16_c_& other); + ~interlace0_r16_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& scs15() + { + assert_choice_type(types::scs15, type_, "interlace0-r16"); + return c.get(); + } + uint8_t& scs30() + { + assert_choice_type(types::scs30, type_, "interlace0-r16"); + return c.get(); + } + const uint8_t& scs15() const + { + assert_choice_type(types::scs15, type_, "interlace0-r16"); + return c.get(); + } + const uint8_t& scs30() const + { + assert_choice_type(types::scs30, type_, "interlace0-r16"); + return c.get(); + } + uint8_t& set_scs15(); + uint8_t& set_scs30(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t rb_set_idx_r16 = 0; + interlace0_r16_c_ interlace0_r16; + }; + struct format_v1610_c_ { + struct occ_v1610_s_ { + struct occ_len_v1610_opts { + enum options { n2, n4, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using occ_len_v1610_e_ = enumerated; + struct occ_idx_v1610_opts { + enum options { n0, n1, n2, n3, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using occ_idx_v1610_e_ = enumerated; + + // member variables + bool occ_len_v1610_present = false; + bool occ_idx_v1610_present = false; + occ_len_v1610_e_ occ_len_v1610; + occ_idx_v1610_e_ occ_idx_v1610; + }; + struct types_opts { + enum options { interlace1_v1610, occ_v1610, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + format_v1610_c_() = default; + format_v1610_c_(const format_v1610_c_& other); + format_v1610_c_& operator=(const format_v1610_c_& other); + ~format_v1610_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& interlace1_v1610() + { + assert_choice_type(types::interlace1_v1610, type_, "format-v1610"); + return c.get(); + } + occ_v1610_s_& occ_v1610() + { + assert_choice_type(types::occ_v1610, type_, "format-v1610"); + return c.get(); + } + const uint8_t& interlace1_v1610() const + { + assert_choice_type(types::interlace1_v1610, type_, "format-v1610"); + return c.get(); + } + const occ_v1610_s_& occ_v1610() const + { + assert_choice_type(types::occ_v1610, type_, "format-v1610"); + return c.get(); + } + uint8_t& set_interlace1_v1610(); + occ_v1610_s_& set_occ_v1610(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct format_v1700_s_ { + uint8_t nrof_prbs_r17 = 1; + }; + struct pucch_repeat_nrof_slots_r17_opts { + enum options { n1, n2, n4, n8, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pucch_repeat_nrof_slots_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool interlace_alloc_r16_present = false; + bool format_v1610_present = false; + interlace_alloc_r16_s_ interlace_alloc_r16; + format_v1610_c_ format_v1610; + // ... + // group 0 + bool pucch_repeat_nrof_slots_r17_present = false; + copy_ptr format_v1700; + pucch_repeat_nrof_slots_r17_e_ pucch_repeat_nrof_slots_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ResourceGroup-r16 ::= SEQUENCE +struct pucch_res_group_r16_s { + using res_per_group_list_r16_l_ = dyn_array; + + // member variables + uint8_t pucch_res_group_id_r16 = 0; + res_per_group_list_r16_l_ res_per_group_list_r16; + + // 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 types_opts { + enum options { ssb_idx, csi_rs_idx, srs, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::ssb_idx, type_, "referenceSignal"); + return c.get(); + } + uint8_t& csi_rs_idx() + { + assert_choice_type(types::csi_rs_idx, type_, "referenceSignal"); + return c.get(); + } + pucch_srs_s& srs() + { + assert_choice_type(types::srs, type_, "referenceSignal"); + return c.get(); + } + const uint8_t& ssb_idx() const + { + assert_choice_type(types::ssb_idx, type_, "referenceSignal"); + return c.get(); + } + const uint8_t& csi_rs_idx() const + { + assert_choice_type(types::csi_rs_idx, type_, "referenceSignal"); + return c.get(); + } + const pucch_srs_s& srs() const + { + assert_choice_type(types::srs, type_, "referenceSignal"); + return c.get(); + } + uint8_t& set_ssb_idx(); + uint8_t& set_csi_rs_idx(); + pucch_srs_s& set_srs(); + + 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using closed_loop_idx_e_ = enumerated; + + // 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; +}; + +// PUCCH-SpatialRelationInfoExt-r16 ::= SEQUENCE +struct pucch_spatial_relation_info_ext_r16_s { + bool ext = false; + bool pucch_spatial_relation_info_id_v1610_present = false; + bool pucch_pathloss_ref_rs_id_v1610_present = false; + uint8_t pucch_spatial_relation_info_id_v1610 = 9; + uint8_t pucch_pathloss_ref_rs_id_v1610 = 4; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-PathlossReferenceRS ::= SEQUENCE +struct pusch_pathloss_ref_rs_s { + struct ref_sig_c_ { + struct types_opts { + enum options { ssb_idx, csi_rs_idx, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::ssb_idx, type_, "referenceSignal"); + return c.get(); + } + uint8_t& csi_rs_idx() + { + assert_choice_type(types::csi_rs_idx, type_, "referenceSignal"); + return c.get(); + } + const uint8_t& ssb_idx() const + { + assert_choice_type(types::ssb_idx, type_, "referenceSignal"); + return c.get(); + } + const uint8_t& csi_rs_idx() const + { + assert_choice_type(types::csi_rs_idx, type_, "referenceSignal"); + return c.get(); + } + uint8_t& set_ssb_idx(); + uint8_t& set_csi_rs_idx(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t pusch_pathloss_ref_rs_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; +}; + +// PUSCH-PathlossReferenceRS-r16 ::= SEQUENCE +struct pusch_pathloss_ref_rs_r16_s { + struct ref_sig_r16_c_ { + struct types_opts { + enum options { ssb_idx_r16, csi_rs_idx_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + ref_sig_r16_c_() = default; + ref_sig_r16_c_(const ref_sig_r16_c_& other); + ref_sig_r16_c_& operator=(const ref_sig_r16_c_& other); + ~ref_sig_r16_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_r16() + { + assert_choice_type(types::ssb_idx_r16, type_, "referenceSignal-r16"); + return c.get(); + } + uint8_t& csi_rs_idx_r16() + { + assert_choice_type(types::csi_rs_idx_r16, type_, "referenceSignal-r16"); + return c.get(); + } + const uint8_t& ssb_idx_r16() const + { + assert_choice_type(types::ssb_idx_r16, type_, "referenceSignal-r16"); + return c.get(); + } + const uint8_t& csi_rs_idx_r16() const + { + assert_choice_type(types::csi_rs_idx_r16, type_, "referenceSignal-r16"); + return c.get(); + } + uint8_t& set_ssb_idx_r16(); + uint8_t& set_csi_rs_idx_r16(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + uint8_t pusch_pathloss_ref_rs_id_r16 = 4; + ref_sig_r16_c_ ref_sig_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-TimeDomainResourceAllocation-r16 ::= SEQUENCE +struct pusch_time_domain_res_alloc_r16_s { + using pusch_alloc_list_r16_l_ = dyn_array; + + // member variables + bool ext = false; + bool k2_r16_present = false; + uint8_t k2_r16 = 0; + pusch_alloc_list_r16_l_ pusch_alloc_list_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PathlossReferenceRSList-r16 ::= SEQUENCE (SIZE (1..64)) OF PathlossReferenceRS-r16 +using pathloss_ref_rs_list_r16_l = dyn_array; + +// SPS-PUCCH-AN-List-r16 ::= SEQUENCE (SIZE (1..4)) OF SPS-PUCCH-AN-r16 +using sps_pucch_an_list_r16_l = dyn_array; + +// 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using sri_pusch_closed_loop_idx_e_ = enumerated; + + // 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; + + // 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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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 + uint8_t& sl2() + { + assert_choice_type(types::sl2, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl4() + { + assert_choice_type(types::sl4, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl5() + { + assert_choice_type(types::sl5, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl8() + { + assert_choice_type(types::sl8, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl10() + { + assert_choice_type(types::sl10, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl16() + { + assert_choice_type(types::sl16, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl20() + { + assert_choice_type(types::sl20, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl40() + { + assert_choice_type(types::sl40, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl80() + { + assert_choice_type(types::sl80, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sl160() + { + assert_choice_type(types::sl160, type_, "periodicityAndOffset"); + return c.get(); + } + uint16_t& sl320() + { + assert_choice_type(types::sl320, type_, "periodicityAndOffset"); + return c.get(); + } + uint16_t& sl640() + { + assert_choice_type(types::sl640, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl2() const + { + assert_choice_type(types::sl2, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl4() const + { + assert_choice_type(types::sl4, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl5() const + { + assert_choice_type(types::sl5, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl8() const + { + assert_choice_type(types::sl8, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl10() const + { + assert_choice_type(types::sl10, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl16() const + { + assert_choice_type(types::sl16, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl20() const + { + assert_choice_type(types::sl20, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl40() const + { + assert_choice_type(types::sl40, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl80() const + { + assert_choice_type(types::sl80, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sl160() const + { + assert_choice_type(types::sl160, type_, "periodicityAndOffset"); + return c.get(); + } + const uint16_t& sl320() const + { + assert_choice_type(types::sl320, type_, "periodicityAndOffset"); + return c.get(); + } + const uint16_t& sl640() const + { + assert_choice_type(types::sl640, type_, "periodicityAndOffset"); + return c.get(); + } + void set_sym2(); + void set_sym6or7(); + void set_sl1(); + uint8_t& set_sl2(); + uint8_t& set_sl4(); + uint8_t& set_sl5(); + uint8_t& set_sl8(); + uint8_t& set_sl10(); + uint8_t& set_sl16(); + uint8_t& set_sl20(); + uint8_t& set_sl40(); + uint8_t& set_sl80(); + uint8_t& set_sl160(); + uint16_t& set_sl320(); + uint16_t& set_sl640(); + + private: + types type_; + pod_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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SchedulingRequestResourceConfigExt-v1610 ::= SEQUENCE +struct sched_request_res_cfg_ext_v1610_s { + struct phy_prio_idx_r16_opts { + enum options { p0, p1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using phy_prio_idx_r16_e_ = enumerated; + + // member variables + bool ext = false; + bool phy_prio_idx_r16_present = false; + phy_prio_idx_r16_e_ phy_prio_idx_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SchedulingRequestResourceConfigExt-v1700 ::= SEQUENCE +struct sched_request_res_cfg_ext_v1700_s { + struct periodicity_and_offset_r17_c_ { + struct types_opts { + enum options { sl1280, sl2560, sl5120, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + periodicity_and_offset_r17_c_() = default; + periodicity_and_offset_r17_c_(const periodicity_and_offset_r17_c_& other); + periodicity_and_offset_r17_c_& operator=(const periodicity_and_offset_r17_c_& other); + ~periodicity_and_offset_r17_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& sl1280() + { + assert_choice_type(types::sl1280, type_, "periodicityAndOffset-r17"); + return c.get(); + } + uint16_t& sl2560() + { + assert_choice_type(types::sl2560, type_, "periodicityAndOffset-r17"); + return c.get(); + } + uint16_t& sl5120() + { + assert_choice_type(types::sl5120, type_, "periodicityAndOffset-r17"); + return c.get(); + } + const uint16_t& sl1280() const + { + assert_choice_type(types::sl1280, type_, "periodicityAndOffset-r17"); + return c.get(); + } + const uint16_t& sl2560() const + { + assert_choice_type(types::sl2560, type_, "periodicityAndOffset-r17"); + return c.get(); + } + const uint16_t& sl5120() const + { + assert_choice_type(types::sl5120, type_, "periodicityAndOffset-r17"); + return c.get(); + } + uint16_t& set_sl1280(); + uint16_t& set_sl2560(); + uint16_t& set_sl5120(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool periodicity_and_offset_r17_present = false; + periodicity_and_offset_r17_c_ periodicity_and_offset_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UCI-OnPUSCH ::= SEQUENCE +struct uci_on_pusch_s { + struct beta_offsets_c_ { + using dyn_l_ = std::array; + struct types_opts { + enum options { dyn, semi_static, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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_(); } + 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_l_& dyn() + { + assert_choice_type(types::dyn, type_, "betaOffsets"); + return c.get(); + } + beta_offsets_s& semi_static() + { + assert_choice_type(types::semi_static, type_, "betaOffsets"); + return c.get(); + } + const dyn_l_& dyn() const + { + assert_choice_type(types::dyn, type_, "betaOffsets"); + return c.get(); + } + const beta_offsets_s& semi_static() const + { + assert_choice_type(types::semi_static, type_, "betaOffsets"); + return c.get(); + } + dyn_l_& set_dyn(); + beta_offsets_s& set_semi_static(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct scaling_opts { + enum options { f0p5, f0p65, f0p8, f1, nulltype } value; + + const char* to_string() const; + }; + using scaling_e_ = enumerated; + + // 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; +}; + +// UCI-OnPUSCH-DCI-0-2-r16 ::= SEQUENCE +struct uci_on_pusch_dci_0_2_r16_s { + struct beta_offsets_dci_0_2_r16_c_ { + struct dyn_dci_0_2_r16_c_ { + using one_bit_r16_l_ = std::array; + using two_bits_r16_l_ = std::array; + struct types_opts { + enum options { one_bit_r16, two_bits_r16, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + dyn_dci_0_2_r16_c_() = default; + dyn_dci_0_2_r16_c_(const dyn_dci_0_2_r16_c_& other); + dyn_dci_0_2_r16_c_& operator=(const dyn_dci_0_2_r16_c_& other); + ~dyn_dci_0_2_r16_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 + one_bit_r16_l_& one_bit_r16() + { + assert_choice_type(types::one_bit_r16, type_, "dynamicDCI-0-2-r16"); + return c.get(); + } + two_bits_r16_l_& two_bits_r16() + { + assert_choice_type(types::two_bits_r16, type_, "dynamicDCI-0-2-r16"); + return c.get(); + } + const one_bit_r16_l_& one_bit_r16() const + { + assert_choice_type(types::one_bit_r16, type_, "dynamicDCI-0-2-r16"); + return c.get(); + } + const two_bits_r16_l_& two_bits_r16() const + { + assert_choice_type(types::two_bits_r16, type_, "dynamicDCI-0-2-r16"); + return c.get(); + } + one_bit_r16_l_& set_one_bit_r16(); + two_bits_r16_l_& set_two_bits_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types_opts { + enum options { dyn_dci_0_2_r16, semi_static_dci_0_2_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + beta_offsets_dci_0_2_r16_c_() = default; + beta_offsets_dci_0_2_r16_c_(const beta_offsets_dci_0_2_r16_c_& other); + beta_offsets_dci_0_2_r16_c_& operator=(const beta_offsets_dci_0_2_r16_c_& other); + ~beta_offsets_dci_0_2_r16_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_dci_0_2_r16_c_& dyn_dci_0_2_r16() + { + assert_choice_type(types::dyn_dci_0_2_r16, type_, "betaOffsetsDCI-0-2-r16"); + return c.get(); + } + beta_offsets_s& semi_static_dci_0_2_r16() + { + assert_choice_type(types::semi_static_dci_0_2_r16, type_, "betaOffsetsDCI-0-2-r16"); + return c.get(); + } + const dyn_dci_0_2_r16_c_& dyn_dci_0_2_r16() const + { + assert_choice_type(types::dyn_dci_0_2_r16, type_, "betaOffsetsDCI-0-2-r16"); + return c.get(); + } + const beta_offsets_s& semi_static_dci_0_2_r16() const + { + assert_choice_type(types::semi_static_dci_0_2_r16, type_, "betaOffsetsDCI-0-2-r16"); + return c.get(); + } + dyn_dci_0_2_r16_c_& set_dyn_dci_0_2_r16(); + beta_offsets_s& set_semi_static_dci_0_2_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct scaling_dci_0_2_r16_opts { + enum options { f0p5, f0p65, f0p8, f1, nulltype } value; + + const char* to_string() const; + }; + using scaling_dci_0_2_r16_e_ = enumerated; + + // member variables + bool beta_offsets_dci_0_2_r16_present = false; + beta_offsets_dci_0_2_r16_c_ beta_offsets_dci_0_2_r16; + scaling_dci_0_2_r16_e_ scaling_dci_0_2_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-AccessConfigListDCI-1-1-r16 ::= SEQUENCE (SIZE (1..16)) OF INTEGER (0..15) +using ul_access_cfg_list_dci_1_1_r16_l = bounded_array; + +// UL-AccessConfigListDCI-1-1-r17 ::= SEQUENCE (SIZE (1..3)) OF INTEGER (0..2) +using ul_access_cfg_list_dci_1_1_r17_l = bounded_array; + +// UL-AccessConfigListDCI-1-2-r17 ::= SEQUENCE (SIZE (1..16)) OF INTEGER (0..15) +using ul_access_cfg_list_dci_1_2_r17_l = bounded_array; + +// BetaOffsetsCrossPriSel-r17 ::= CHOICE +struct beta_offsets_cross_pri_sel_r17_c { + using dyn_r17_l_ = std::array; + struct types_opts { + enum options { dyn_r17, semi_static_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + beta_offsets_cross_pri_sel_r17_c() = default; + beta_offsets_cross_pri_sel_r17_c(const beta_offsets_cross_pri_sel_r17_c& other); + beta_offsets_cross_pri_sel_r17_c& operator=(const beta_offsets_cross_pri_sel_r17_c& other); + ~beta_offsets_cross_pri_sel_r17_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_r17_l_& dyn_r17() + { + assert_choice_type(types::dyn_r17, type_, "BetaOffsetsCrossPriSel-r17"); + return c.get(); + } + beta_offsets_cross_pri_r17_l& semi_static_r17() + { + assert_choice_type(types::semi_static_r17, type_, "BetaOffsetsCrossPriSel-r17"); + return c.get(); + } + const dyn_r17_l_& dyn_r17() const + { + assert_choice_type(types::dyn_r17, type_, "BetaOffsetsCrossPriSel-r17"); + return c.get(); + } + const beta_offsets_cross_pri_r17_l& semi_static_r17() const + { + assert_choice_type(types::semi_static_r17, type_, "BetaOffsetsCrossPriSel-r17"); + return c.get(); + } + dyn_r17_l_& set_dyn_r17(); + beta_offsets_cross_pri_r17_l& set_semi_static_r17(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// BetaOffsetsCrossPriSelDCI-0-2-r17 ::= CHOICE +struct beta_offsets_cross_pri_sel_dci_0_2_r17_c { + struct dyn_dci_0_2_r17_c_ { + using one_bit_r17_l_ = std::array; + using two_bits_r17_l_ = std::array; + struct types_opts { + enum options { one_bit_r17, two_bits_r17, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + dyn_dci_0_2_r17_c_() = default; + dyn_dci_0_2_r17_c_(const dyn_dci_0_2_r17_c_& other); + dyn_dci_0_2_r17_c_& operator=(const dyn_dci_0_2_r17_c_& other); + ~dyn_dci_0_2_r17_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 + one_bit_r17_l_& one_bit_r17() + { + assert_choice_type(types::one_bit_r17, type_, "dynamicDCI-0-2-r17"); + return c.get(); + } + two_bits_r17_l_& two_bits_r17() + { + assert_choice_type(types::two_bits_r17, type_, "dynamicDCI-0-2-r17"); + return c.get(); + } + const one_bit_r17_l_& one_bit_r17() const + { + assert_choice_type(types::one_bit_r17, type_, "dynamicDCI-0-2-r17"); + return c.get(); + } + const two_bits_r17_l_& two_bits_r17() const + { + assert_choice_type(types::two_bits_r17, type_, "dynamicDCI-0-2-r17"); + return c.get(); + } + one_bit_r17_l_& set_one_bit_r17(); + two_bits_r17_l_& set_two_bits_r17(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types_opts { + enum options { dyn_dci_0_2_r17, semi_static_dci_0_2_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + beta_offsets_cross_pri_sel_dci_0_2_r17_c() = default; + beta_offsets_cross_pri_sel_dci_0_2_r17_c(const beta_offsets_cross_pri_sel_dci_0_2_r17_c& other); + beta_offsets_cross_pri_sel_dci_0_2_r17_c& operator=(const beta_offsets_cross_pri_sel_dci_0_2_r17_c& other); + ~beta_offsets_cross_pri_sel_dci_0_2_r17_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_dci_0_2_r17_c_& dyn_dci_0_2_r17() + { + assert_choice_type(types::dyn_dci_0_2_r17, type_, "BetaOffsetsCrossPriSelDCI-0-2-r17"); + return c.get(); + } + beta_offsets_cross_pri_r17_l& semi_static_dci_0_2_r17() + { + assert_choice_type(types::semi_static_dci_0_2_r17, type_, "BetaOffsetsCrossPriSelDCI-0-2-r17"); + return c.get(); + } + const dyn_dci_0_2_r17_c_& dyn_dci_0_2_r17() const + { + assert_choice_type(types::dyn_dci_0_2_r17, type_, "BetaOffsetsCrossPriSelDCI-0-2-r17"); + return c.get(); + } + const beta_offsets_cross_pri_r17_l& semi_static_dci_0_2_r17() const + { + assert_choice_type(types::semi_static_dci_0_2_r17, type_, "BetaOffsetsCrossPriSelDCI-0-2-r17"); + return c.get(); + } + dyn_dci_0_2_r17_c_& set_dyn_dci_0_2_r17(); + beta_offsets_cross_pri_r17_l& set_semi_static_dci_0_2_r17(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// CandidateBeamRSListExt-r16 ::= SEQUENCE (SIZE (1..48)) OF PRACH-ResourceDedicatedBFR +using candidate_beam_rs_list_ext_r16_l = dyn_array; + +// ConfiguredGrantConfig ::= SEQUENCE +struct cfg_grant_cfg_s { + struct freq_hop_opts { + enum options { intra_slot, inter_slot, nulltype } value; + + const char* to_string() const; + }; + using freq_hop_e_ = enumerated; + struct mcs_table_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using mcs_table_e_ = enumerated; + struct mcs_table_transform_precoder_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using mcs_table_transform_precoder_e_ = enumerated; + struct res_alloc_opts { + enum options { res_alloc_type0, res_alloc_type1, dyn_switch, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using res_alloc_e_ = enumerated; + struct pwr_ctrl_loop_to_use_opts { + enum options { n0, n1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pwr_ctrl_loop_to_use_e_ = enumerated; + struct transform_precoder_opts { + enum options { enabled, disabled, nulltype } value; + + const char* to_string() const; + }; + using transform_precoder_e_ = enumerated; + struct rep_k_opts { + enum options { n1, n2, n4, n8, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using rep_k_e_ = enumerated; + struct rep_k_rv_opts { + enum options { s1_neg0231, s2_neg0303, s3_neg0000, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using rep_k_rv_e_ = enumerated; + 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; + + const char* to_string() const; + }; + using periodicity_e_ = enumerated; + struct rrc_cfg_ul_grant_s_ { + struct pusch_rep_type_ind_r16_opts { + enum options { pusch_rep_type_a, pusch_rep_type_b, nulltype } value; + + const char* to_string() const; + }; + using pusch_rep_type_ind_r16_e_ = enumerated; + struct freq_hop_pusch_rep_type_b_r16_opts { + enum options { inter_repeat, inter_slot, nulltype } value; + + const char* to_string() const; + }; + using freq_hop_pusch_rep_type_b_r16_e_ = enumerated; + + // member variables + 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; + // ... + // group 0 + bool pusch_rep_type_ind_r16_present = false; + bool freq_hop_pusch_rep_type_b_r16_present = false; + bool time_ref_sfn_r16_present = false; + pusch_rep_type_ind_r16_e_ pusch_rep_type_ind_r16; + freq_hop_pusch_rep_type_b_r16_e_ freq_hop_pusch_rep_type_b_r16; + // group 1 + bool pathloss_ref_idx2_r17_present = false; + bool srs_res_ind2_r17_present = false; + bool precoding_and_nof_layers2_r17_present = false; + bool time_domain_alloc_v1710_present = false; + bool time_domain_offset_r17_present = false; + uint8_t pathloss_ref_idx2_r17 = 0; + uint8_t srs_res_ind2_r17 = 0; + uint8_t precoding_and_nof_layers2_r17 = 0; + uint8_t time_domain_alloc_v1710 = 16; + uint16_t time_domain_offset_r17 = 0; + copy_ptr cg_sdt_cfg_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + }; + struct cg_min_dfi_delay_r16_opts { + enum options { + sym7, + sym1x14, + sym2x14, + sym3x14, + sym4x14, + sym5x14, + sym6x14, + sym7x14, + sym8x14, + sym9x14, + sym10x14, + sym11x14, + sym12x14, + sym13x14, + sym14x14, + sym15x14, + sym16x14, + nulltype + } value; + + const char* to_string() const; + }; + using cg_min_dfi_delay_r16_e_ = enumerated; + using cg_cot_sharing_list_r16_l_ = dyn_array; + struct start_from_rv0_r16_opts { + enum options { on, off, nulltype } value; + + const char* to_string() const; + }; + using start_from_rv0_r16_e_ = enumerated; + struct phy_prio_idx_r16_opts { + enum options { p0, p1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using phy_prio_idx_r16_e_ = enumerated; + struct map_pattern_r17_opts { + enum options { cyclic_map, sequential_map, nulltype } value; + + const char* to_string() const; + }; + using map_pattern_r17_e_ = enumerated; + struct pwr_ctrl_loop_to_use2_r17_opts { + enum options { n0, n1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pwr_ctrl_loop_to_use2_r17_e_ = enumerated; + using cg_cot_sharing_list_r17_l_ = dyn_array; + struct rep_k_v1710_opts { + enum options { n12, n16, n24, n32, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using rep_k_v1710_e_ = enumerated; + + // 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 cfg_grant_timer_present = false; + bool rrc_cfg_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 cfg_grant_timer = 1; + rrc_cfg_ul_grant_s_ rrc_cfg_ul_grant; + // ... + // group 0 + bool cg_retx_timer_r16_present = false; + bool cg_min_dfi_delay_r16_present = false; + bool cg_nrof_pusch_in_slot_r16_present = false; + bool cg_nrof_slots_r16_present = false; + bool cg_uci_mux_r16_present = false; + bool cg_cot_sharing_offset_r16_present = false; + bool beta_offset_cg_uci_r16_present = false; + bool harq_proc_id_offset_r16_present = false; + bool harq_proc_id_offset2_r16_present = false; + bool cfg_grant_cfg_idx_r16_present = false; + bool cfg_grant_cfg_idx_mac_r16_present = false; + bool periodicity_ext_r16_present = false; + bool start_from_rv0_r16_present = false; + bool phy_prio_idx_r16_present = false; + bool autonomous_tx_r16_present = false; + uint8_t cg_retx_timer_r16 = 1; + cg_min_dfi_delay_r16_e_ cg_min_dfi_delay_r16; + uint8_t cg_nrof_pusch_in_slot_r16 = 1; + uint8_t cg_nrof_slots_r16 = 1; + copy_ptr cg_start_offsets_r16; + uint8_t cg_cot_sharing_offset_r16 = 1; + uint8_t beta_offset_cg_uci_r16 = 0; + copy_ptr cg_cot_sharing_list_r16; + uint8_t harq_proc_id_offset_r16 = 0; + uint8_t harq_proc_id_offset2_r16 = 0; + uint8_t cfg_grant_cfg_idx_r16 = 0; + uint8_t cfg_grant_cfg_idx_mac_r16 = 0; + uint16_t periodicity_ext_r16 = 1; + start_from_rv0_r16_e_ start_from_rv0_r16; + phy_prio_idx_r16_e_ phy_prio_idx_r16; + // group 1 + bool map_pattern_r17_present = false; + bool seq_offset_for_rv_r17_present = false; + bool p0_pusch_alpha2_r17_present = false; + bool pwr_ctrl_loop_to_use2_r17_present = false; + bool periodicity_ext_r17_present = false; + bool rep_k_v1710_present = false; + bool nrof_harq_processes_v1700_present = false; + bool harq_proc_id_offset2_v1700_present = false; + bool cfg_grant_timer_v1700_present = false; + bool cg_min_dfi_delay_v1710_present = false; + copy_ptr> cg_beta_offsets_cross_pri0_r17; + copy_ptr> cg_beta_offsets_cross_pri1_r17; + map_pattern_r17_e_ map_pattern_r17; + uint8_t seq_offset_for_rv_r17 = 0; + uint8_t p0_pusch_alpha2_r17 = 0; + pwr_ctrl_loop_to_use2_r17_e_ pwr_ctrl_loop_to_use2_r17; + copy_ptr cg_cot_sharing_list_r17; + uint16_t periodicity_ext_r17 = 1; + rep_k_v1710_e_ rep_k_v1710; + uint8_t nrof_harq_processes_v1700 = 17; + uint8_t harq_proc_id_offset2_v1700 = 16; + uint16_t cfg_grant_timer_v1700 = 33; + uint16_t cg_min_dfi_delay_v1710 = 238; + // group 2 + bool harq_proc_id_offset_v1730_present = false; + bool cg_nrof_slots_r17_present = false; + uint8_t harq_proc_id_offset_v1730 = 16; + uint16_t cg_nrof_slots_r17 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ConfiguredGrantConfigType2DeactivationState-r16 ::= SEQUENCE (SIZE (1..12)) OF INTEGER (0..11) +using cfg_grant_cfg_type2_deactivation_state_r16_l = bounded_array; + +// DMRS-BundlingPUSCH-Config-r17 ::= SEQUENCE +struct dmrs_bundling_pusch_cfg_r17_s { + struct pusch_freq_hop_interv_r17_opts { + enum options { s2, s4, s5, s6, s8, s10, s12, s14, s16, s20, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pusch_freq_hop_interv_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool pusch_dmrs_bundling_r17_present = false; + bool pusch_time_domain_win_len_r17_present = false; + bool pusch_win_restart_r17_present = false; + bool pusch_freq_hop_interv_r17_present = false; + uint8_t pusch_time_domain_win_len_r17 = 2; + pusch_freq_hop_interv_r17_e_ pusch_freq_hop_interv_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FrequencyHoppingOffsetListsDCI-0-2-r16 ::= SEQUENCE (SIZE (1..4)) OF INTEGER (1..274) +using freq_hop_offset_lists_dci_0_2_r16_l = bounded_array; + +// InvalidSymbolPattern-r16 ::= SEQUENCE +struct invalid_symbol_pattern_r16_s { + struct symbols_r16_c_ { + struct types_opts { + enum options { one_slot, two_slots, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + symbols_r16_c_() = default; + symbols_r16_c_(const symbols_r16_c_& other); + symbols_r16_c_& operator=(const symbols_r16_c_& other); + ~symbols_r16_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(types::one_slot, type_, "symbols-r16"); + return c.get>(); + } + fixed_bitstring<28>& two_slots() + { + assert_choice_type(types::two_slots, type_, "symbols-r16"); + return c.get>(); + } + const fixed_bitstring<14>& one_slot() const + { + assert_choice_type(types::one_slot, type_, "symbols-r16"); + return c.get>(); + } + const fixed_bitstring<28>& two_slots() const + { + assert_choice_type(types::two_slots, type_, "symbols-r16"); + return c.get>(); + } + fixed_bitstring<14>& set_one_slot(); + fixed_bitstring<28>& set_two_slots(); + + private: + types type_; + choice_buffer_t> c; + + void destroy_(); + }; + struct periodicity_and_pattern_r16_c_ { + struct types_opts { + enum options { n2, n4, n5, n8, n10, n20, n40, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + periodicity_and_pattern_r16_c_() = default; + periodicity_and_pattern_r16_c_(const periodicity_and_pattern_r16_c_& other); + periodicity_and_pattern_r16_c_& operator=(const periodicity_and_pattern_r16_c_& other); + ~periodicity_and_pattern_r16_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(types::n2, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + fixed_bitstring<4>& n4() + { + assert_choice_type(types::n4, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + fixed_bitstring<5>& n5() + { + assert_choice_type(types::n5, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + fixed_bitstring<8>& n8() + { + assert_choice_type(types::n8, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + fixed_bitstring<10>& n10() + { + assert_choice_type(types::n10, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + fixed_bitstring<20>& n20() + { + assert_choice_type(types::n20, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + fixed_bitstring<40>& n40() + { + assert_choice_type(types::n40, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + const fixed_bitstring<2>& n2() const + { + assert_choice_type(types::n2, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + const fixed_bitstring<4>& n4() const + { + assert_choice_type(types::n4, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + const fixed_bitstring<5>& n5() const + { + assert_choice_type(types::n5, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + const fixed_bitstring<8>& n8() const + { + assert_choice_type(types::n8, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + const fixed_bitstring<10>& n10() const + { + assert_choice_type(types::n10, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + const fixed_bitstring<20>& n20() const + { + assert_choice_type(types::n20, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + const fixed_bitstring<40>& n40() const + { + assert_choice_type(types::n40, type_, "periodicityAndPattern-r16"); + return c.get>(); + } + fixed_bitstring<2>& set_n2(); + fixed_bitstring<4>& set_n4(); + fixed_bitstring<5>& set_n5(); + fixed_bitstring<8>& set_n8(); + fixed_bitstring<10>& set_n10(); + fixed_bitstring<20>& set_n20(); + fixed_bitstring<40>& set_n40(); + + private: + types type_; + choice_buffer_t> c; + + void destroy_(); + }; + + // member variables + bool ext = false; + bool periodicity_and_pattern_r16_present = false; + symbols_r16_c_ symbols_r16; + periodicity_and_pattern_r16_c_ periodicity_and_pattern_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MPE-Resource-r17 ::= SEQUENCE +struct mpe_res_r17_s { + struct mpe_ref_sig_r17_c_ { + struct types_opts { + enum options { csi_rs_res_r17, ssb_res_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + mpe_ref_sig_r17_c_() = default; + mpe_ref_sig_r17_c_(const mpe_ref_sig_r17_c_& other); + mpe_ref_sig_r17_c_& operator=(const mpe_ref_sig_r17_c_& other); + ~mpe_ref_sig_r17_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_res_r17() + { + assert_choice_type(types::csi_rs_res_r17, type_, "mpe-ReferenceSignal-r17"); + return c.get(); + } + uint8_t& ssb_res_r17() + { + assert_choice_type(types::ssb_res_r17, type_, "mpe-ReferenceSignal-r17"); + return c.get(); + } + const uint8_t& csi_rs_res_r17() const + { + assert_choice_type(types::csi_rs_res_r17, type_, "mpe-ReferenceSignal-r17"); + return c.get(); + } + const uint8_t& ssb_res_r17() const + { + assert_choice_type(types::ssb_res_r17, type_, "mpe-ReferenceSignal-r17"); + return c.get(); + } + uint8_t& set_csi_rs_res_r17(); + uint8_t& set_ssb_res_r17(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool cell_r17_present = false; + bool add_pci_r17_present = false; + uint8_t mpe_res_id_r17 = 1; + uint8_t cell_r17 = 0; + uint8_t add_pci_r17 = 1; + mpe_ref_sig_r17_c_ mpe_ref_sig_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MinSchedulingOffsetK2-Values-r16 ::= SEQUENCE (SIZE (1..2)) OF INTEGER (0..16) +using min_sched_offset_k2_values_r16_l = bounded_array; + +// MinSchedulingOffsetK2-Values-r17 ::= SEQUENCE (SIZE (1..2)) OF INTEGER (0..64) +using min_sched_offset_k2_values_r17_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; + using res_to_add_mod_list_ext_v1610_l_ = dyn_array; + struct subslot_len_for_pucch_r16_c_ { + struct normal_cp_r16_opts { + enum options { n2, n7, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using normal_cp_r16_e_ = enumerated; + struct extended_cp_r16_opts { + enum options { n2, n6, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using extended_cp_r16_e_ = enumerated; + struct types_opts { + enum options { normal_cp_r16, extended_cp_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + subslot_len_for_pucch_r16_c_() = default; + subslot_len_for_pucch_r16_c_(const subslot_len_for_pucch_r16_c_& other); + subslot_len_for_pucch_r16_c_& operator=(const subslot_len_for_pucch_r16_c_& other); + ~subslot_len_for_pucch_r16_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 + normal_cp_r16_e_& normal_cp_r16() + { + assert_choice_type(types::normal_cp_r16, type_, "subslotLengthForPUCCH-r16"); + return c.get(); + } + extended_cp_r16_e_& extended_cp_r16() + { + assert_choice_type(types::extended_cp_r16, type_, "subslotLengthForPUCCH-r16"); + return c.get(); + } + const normal_cp_r16_e_& normal_cp_r16() const + { + assert_choice_type(types::normal_cp_r16, type_, "subslotLengthForPUCCH-r16"); + return c.get(); + } + const extended_cp_r16_e_& extended_cp_r16() const + { + assert_choice_type(types::extended_cp_r16, type_, "subslotLengthForPUCCH-r16"); + return c.get(); + } + normal_cp_r16_e_& set_normal_cp_r16(); + extended_cp_r16_e_& set_extended_cp_r16(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + using spatial_relation_info_to_add_mod_list_size_ext_v1610_l_ = dyn_array; + using spatial_relation_info_to_release_list_size_ext_v1610_l_ = dyn_array; + using spatial_relation_info_to_add_mod_list_ext_v1610_l_ = dyn_array; + using spatial_relation_info_to_release_list_ext_v1610_l_ = dyn_array; + using res_group_to_add_mod_list_r16_l_ = dyn_array; + using res_group_to_release_list_r16_l_ = bounded_array; + using sched_request_res_to_add_mod_list_ext_v1610_l_ = dyn_array; + struct map_pattern_r17_opts { + enum options { cyclic_map, sequential_map, nulltype } value; + + const char* to_string() const; + }; + using map_pattern_r17_e_ = enumerated; + using pwr_ctrl_set_info_to_add_mod_list_r17_l_ = dyn_array; + using pwr_ctrl_set_info_to_release_list_r17_l_ = bounded_array; + using sched_request_res_to_add_mod_list_ext_v1700_l_ = dyn_array; + + // member variables + bool ext = false; + bool format1_present = false; + bool format2_present = false; + bool format3_present = false; + bool format4_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 + bool nof_bits_for_pucch_res_ind_dci_1_2_r16_present = false; + bool dmrs_ul_transform_precoding_pucch_r16_present = false; + copy_ptr res_to_add_mod_list_ext_v1610; + copy_ptr, 1, 8>>> dl_data_to_ul_ack_r16; + copy_ptr, 1, 16>>> ul_access_cfg_list_dci_1_1_r16; + copy_ptr subslot_len_for_pucch_r16; + copy_ptr, 1, 8>>> dl_data_to_ul_ack_dci_1_2_r16; + uint8_t nof_bits_for_pucch_res_ind_dci_1_2_r16 = 0; + copy_ptr + spatial_relation_info_to_add_mod_list_size_ext_v1610; + copy_ptr + spatial_relation_info_to_release_list_size_ext_v1610; + copy_ptr spatial_relation_info_to_add_mod_list_ext_v1610; + copy_ptr spatial_relation_info_to_release_list_ext_v1610; + copy_ptr res_group_to_add_mod_list_r16; + copy_ptr res_group_to_release_list_r16; + copy_ptr>> sps_pucch_an_list_r16; + copy_ptr sched_request_res_to_add_mod_list_ext_v1610; + // group 1 + bool map_pattern_r17_present = false; + bool second_tpc_field_dci_1_1_r17_present = false; + bool second_tpc_field_dci_1_2_r17_present = false; + copy_ptr> format0_r17; + copy_ptr> format2_ext_r17; + copy_ptr> format3_ext_r17; + copy_ptr> format4_ext_r17; + copy_ptr, 1, 16>>> ul_access_cfg_list_dci_1_2_r17; + map_pattern_r17_e_ map_pattern_r17; + copy_ptr pwr_ctrl_set_info_to_add_mod_list_r17; + copy_ptr pwr_ctrl_set_info_to_release_list_r17; + copy_ptr, 1, 8>>> dl_data_to_ul_ack_r17; + copy_ptr, 1, 8>>> dl_data_to_ul_ack_dci_1_2_r17; + copy_ptr, 1, 3>>> ul_access_cfg_list_dci_1_1_r17; + copy_ptr sched_request_res_to_add_mod_list_ext_v1700; + copy_ptr> dmrs_bundling_pucch_cfg_r17; + copy_ptr, 1, 8>>> dl_data_to_ul_ack_v1700; + copy_ptr, 1, 8>>> dl_data_to_ul_ack_multicast_dci_format4_1_r17; + copy_ptr>> sps_pucch_an_list_multicast_r17; + + // 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 two_pusch_pc_adjustment_states_present = false; + bool delta_mcs_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; +}; + +// PUSCH-PowerControl-v1610 ::= SEQUENCE +struct pusch_pwr_ctrl_v1610_s { + using pathloss_ref_rs_to_add_mod_list_size_ext_v1610_l_ = dyn_array; + using pathloss_ref_rs_to_release_list_size_ext_v1610_l_ = dyn_array; + using p0_pusch_set_list_r16_l_ = dyn_array; + struct olpc_param_set_s_ { + bool olpc_param_set_dci_0_1_r16_present = false; + bool olpc_param_set_dci_0_2_r16_present = false; + uint8_t olpc_param_set_dci_0_1_r16 = 1; + uint8_t olpc_param_set_dci_0_2_r16 = 1; + }; + using sri_pusch_map_to_add_mod_list2_r17_l_ = dyn_array; + using sri_pusch_map_to_release_list2_r17_l_ = bounded_array; + using p0_pusch_set_list2_r17_l_ = dyn_array; + using dummy_l_ = dyn_array; + + // member variables + bool ext = false; + bool olpc_param_set_present = false; + pathloss_ref_rs_to_add_mod_list_size_ext_v1610_l_ pathloss_ref_rs_to_add_mod_list_size_ext_v1610; + pathloss_ref_rs_to_release_list_size_ext_v1610_l_ pathloss_ref_rs_to_release_list_size_ext_v1610; + p0_pusch_set_list_r16_l_ p0_pusch_set_list_r16; + olpc_param_set_s_ olpc_param_set; + // ... + // group 0 + copy_ptr sri_pusch_map_to_add_mod_list2_r17; + copy_ptr sri_pusch_map_to_release_list2_r17; + copy_ptr p0_pusch_set_list2_r17; + copy_ptr dummy; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUSCH-TimeDomainResourceAllocationList-r16 ::= SEQUENCE (SIZE (1..64)) OF PUSCH-TimeDomainResourceAllocation-r16 +using pusch_time_domain_res_alloc_list_r16_l = dyn_array; + +// SRS-PosResourceSet-r16 ::= SEQUENCE +struct srs_pos_res_set_r16_s { + using srs_pos_res_id_list_r16_l_ = bounded_array; + struct res_type_r16_c_ { + struct aperiodic_r16_s_ { + using aperiodic_srs_res_trigger_list_r16_l_ = bounded_array; + + // member variables + bool ext = false; + aperiodic_srs_res_trigger_list_r16_l_ aperiodic_srs_res_trigger_list_r16; + // ... + }; + struct semi_persistent_r16_s_ { + bool ext = false; + // ... + }; + struct periodic_r16_s_ { + bool ext = false; + // ... + }; + struct types_opts { + enum options { aperiodic_r16, semi_persistent_r16, periodic_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + res_type_r16_c_() = default; + res_type_r16_c_(const res_type_r16_c_& other); + res_type_r16_c_& operator=(const res_type_r16_c_& other); + ~res_type_r16_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_r16_s_& aperiodic_r16() + { + assert_choice_type(types::aperiodic_r16, type_, "resourceType-r16"); + return c.get(); + } + semi_persistent_r16_s_& semi_persistent_r16() + { + assert_choice_type(types::semi_persistent_r16, type_, "resourceType-r16"); + return c.get(); + } + periodic_r16_s_& periodic_r16() + { + assert_choice_type(types::periodic_r16, type_, "resourceType-r16"); + return c.get(); + } + const aperiodic_r16_s_& aperiodic_r16() const + { + assert_choice_type(types::aperiodic_r16, type_, "resourceType-r16"); + return c.get(); + } + const semi_persistent_r16_s_& semi_persistent_r16() const + { + assert_choice_type(types::semi_persistent_r16, type_, "resourceType-r16"); + return c.get(); + } + const periodic_r16_s_& periodic_r16() const + { + assert_choice_type(types::periodic_r16, type_, "resourceType-r16"); + return c.get(); + } + aperiodic_r16_s_& set_aperiodic_r16(); + semi_persistent_r16_s_& set_semi_persistent_r16(); + periodic_r16_s_& set_periodic_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct pathloss_ref_rs_pos_r16_c_ { + struct types_opts { + enum options { ssb_idx_serving_r16, ssb_ncell_r16, dl_prs_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + pathloss_ref_rs_pos_r16_c_() = default; + pathloss_ref_rs_pos_r16_c_(const pathloss_ref_rs_pos_r16_c_& other); + pathloss_ref_rs_pos_r16_c_& operator=(const pathloss_ref_rs_pos_r16_c_& other); + ~pathloss_ref_rs_pos_r16_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_serving_r16() + { + assert_choice_type(types::ssb_idx_serving_r16, type_, "pathlossReferenceRS-Pos-r16"); + return c.get(); + } + ssb_info_ncell_r16_s& ssb_ncell_r16() + { + assert_choice_type(types::ssb_ncell_r16, type_, "pathlossReferenceRS-Pos-r16"); + return c.get(); + } + dl_prs_info_r16_s& dl_prs_r16() + { + assert_choice_type(types::dl_prs_r16, type_, "pathlossReferenceRS-Pos-r16"); + return c.get(); + } + const uint8_t& ssb_idx_serving_r16() const + { + assert_choice_type(types::ssb_idx_serving_r16, type_, "pathlossReferenceRS-Pos-r16"); + return c.get(); + } + const ssb_info_ncell_r16_s& ssb_ncell_r16() const + { + assert_choice_type(types::ssb_ncell_r16, type_, "pathlossReferenceRS-Pos-r16"); + return c.get(); + } + const dl_prs_info_r16_s& dl_prs_r16() const + { + assert_choice_type(types::dl_prs_r16, type_, "pathlossReferenceRS-Pos-r16"); + return c.get(); + } + uint8_t& set_ssb_idx_serving_r16(); + ssb_info_ncell_r16_s& set_ssb_ncell_r16(); + dl_prs_info_r16_s& set_dl_prs_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext = false; + bool alpha_r16_present = false; + bool p0_r16_present = false; + bool pathloss_ref_rs_pos_r16_present = false; + uint8_t srs_pos_res_set_id_r16 = 0; + srs_pos_res_id_list_r16_l_ srs_pos_res_id_list_r16; + res_type_r16_c_ res_type_r16; + alpha_e alpha_r16; + int16_t p0_r16 = -202; + pathloss_ref_rs_pos_r16_c_ pathloss_ref_rs_pos_r16; + // ... + + // 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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::aperiodic, type_, "resourceType"); + return c.get(); + } + semi_persistent_s_& semi_persistent() + { + assert_choice_type(types::semi_persistent, type_, "resourceType"); + return c.get(); + } + periodic_s_& periodic() + { + assert_choice_type(types::periodic, type_, "resourceType"); + return c.get(); + } + const aperiodic_s_& aperiodic() const + { + assert_choice_type(types::aperiodic, type_, "resourceType"); + return c.get(); + } + const semi_persistent_s_& semi_persistent() const + { + assert_choice_type(types::semi_persistent, type_, "resourceType"); + return c.get(); + } + const periodic_s_& periodic() const + { + assert_choice_type(types::periodic, type_, "resourceType"); + return c.get(); + } + aperiodic_s_& set_aperiodic(); + semi_persistent_s_& set_semi_persistent(); + periodic_s_& set_periodic(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct usage_opts { + enum options { beam_management, codebook, non_codebook, ant_switching, nulltype } value; + + const char* to_string() const; + }; + using usage_e_ = enumerated; + struct srs_pwr_ctrl_adjustment_states_opts { + enum options { same_as_fci2, separate_closed_loop, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using srs_pwr_ctrl_adjustment_states_e_ = enumerated; + using available_slot_offset_list_r17_l_ = bounded_array; + + // member variables + bool ext = 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_cfg_c pathloss_ref_rs; + srs_pwr_ctrl_adjustment_states_e_ srs_pwr_ctrl_adjustment_states; + // ... + // group 0 + copy_ptr>> pathloss_ref_rs_list_r16; + // group 1 + bool usage_pdc_r17_present = false; + bool follow_unified_tci_state_srs_r17_present = false; + copy_ptr available_slot_offset_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UCI-OnPUSCH-ListDCI-0-1-r16 ::= SEQUENCE (SIZE (1..2)) OF UCI-OnPUSCH +using uci_on_pusch_list_dci_0_1_r16_l = dyn_array; + +// UCI-OnPUSCH-ListDCI-0-2-r16 ::= SEQUENCE (SIZE (1..2)) OF UCI-OnPUSCH-DCI-0-2-r16 +using uci_on_pusch_list_dci_0_2_r16_l = dyn_array; + +// UL-AccessConfigListDCI-0-1-r16 ::= SEQUENCE (SIZE (1..64)) OF INTEGER (0..63) +using ul_access_cfg_list_dci_0_1_r16_l = dyn_array; + +// UL-AccessConfigListDCI-0-1-r17 ::= SEQUENCE (SIZE (1..3)) OF INTEGER (0..2) +using ul_access_cfg_list_dci_0_1_r17_l = bounded_array; + +// UL-AccessConfigListDCI-0-2-r17 ::= SEQUENCE (SIZE (1..64)) OF INTEGER (0..63) +using ul_access_cfg_list_dci_0_2_r17_l = dyn_array; + +// 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; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using ssb_per_rach_occasion_e_ = enumerated; + struct beam_fail_recovery_timer_opts { + enum options { ms10, ms20, ms40, ms60, ms80, ms100, ms150, ms200, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using beam_fail_recovery_timer_e_ = enumerated; + + // 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 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; + // group 1 + copy_ptr ra_prioritization_two_step_r16; + copy_ptr>> candidate_beam_rs_list_ext_v1610; + // group 2 + bool sp_cell_bfr_cbra_r16_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ConfiguredGrantConfigToAddModList-r16 ::= SEQUENCE (SIZE (1..12)) OF ConfiguredGrantConfig +using cfg_grant_cfg_to_add_mod_list_r16_l = dyn_array; + +// ConfiguredGrantConfigToReleaseList-r16 ::= SEQUENCE (SIZE (1..12)) OF INTEGER (0..11) +using cfg_grant_cfg_to_release_list_r16_l = bounded_array; + +// ConfiguredGrantConfigType2DeactivationStateList-r16 ::= SEQUENCE (SIZE (1..16)) OF +// ConfiguredGrantConfigType2DeactivationState-r16 +using cfg_grant_cfg_type2_deactivation_state_list_r16_l = dyn_array; + +// LBT-FailureRecoveryConfig-r16 ::= SEQUENCE +struct lbt_fail_recovery_cfg_r16_s { + struct lbt_fail_instance_max_count_r16_opts { + enum options { n4, n8, n16, n32, n64, n128, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using lbt_fail_instance_max_count_r16_e_ = enumerated; + struct lbt_fail_detection_timer_r16_opts { + enum options { ms10, ms20, ms40, ms80, ms160, ms320, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using lbt_fail_detection_timer_r16_e_ = enumerated; + + // member variables + bool ext = false; + lbt_fail_instance_max_count_r16_e_ lbt_fail_instance_max_count_r16; + lbt_fail_detection_timer_r16_e_ lbt_fail_detection_timer_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PUCCH-ConfigurationList-r16 ::= SEQUENCE (SIZE (1..2)) OF PUCCH-Config +using pucch_cfg_list_r16_l = dyn_array; + +// PUSCH-Config ::= SEQUENCE +struct pusch_cfg_s { + struct tx_cfg_opts { + enum options { codebook, non_codebook, nulltype } value; + + const char* to_string() const; + }; + using tx_cfg_e_ = enumerated; + struct freq_hop_opts { + enum options { intra_slot, inter_slot, nulltype } value; + + const char* to_string() const; + }; + using freq_hop_e_ = enumerated; + using freq_hop_offset_lists_l_ = bounded_array; + struct res_alloc_opts { + enum options { res_alloc_type0, res_alloc_type1, dyn_switch, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using res_alloc_e_ = enumerated; + struct pusch_aggregation_factor_opts { + enum options { n2, n4, n8, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pusch_aggregation_factor_e_ = enumerated; + struct mcs_table_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using mcs_table_e_ = enumerated; + struct mcs_table_transform_precoder_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using mcs_table_transform_precoder_e_ = enumerated; + struct transform_precoder_opts { + enum options { enabled, disabled, nulltype } value; + + const char* to_string() const; + }; + using transform_precoder_e_ = enumerated; + struct codebook_subset_opts { + enum options { fully_and_partial_and_non_coherent, partial_and_non_coherent, non_coherent, nulltype } value; + + const char* to_string() const; + }; + using codebook_subset_e_ = enumerated; + struct freq_hop_dci_0_2_r16_c_ { + struct pusch_rep_type_a_opts { + enum options { intra_slot, inter_slot, nulltype } value; + + const char* to_string() const; + }; + using pusch_rep_type_a_e_ = enumerated; + struct pusch_rep_type_b_opts { + enum options { inter_repeat, inter_slot, nulltype } value; + + const char* to_string() const; + }; + using pusch_rep_type_b_e_ = enumerated; + struct types_opts { + enum options { pusch_rep_type_a, pusch_rep_type_b, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + freq_hop_dci_0_2_r16_c_() = default; + freq_hop_dci_0_2_r16_c_(const freq_hop_dci_0_2_r16_c_& other); + freq_hop_dci_0_2_r16_c_& operator=(const freq_hop_dci_0_2_r16_c_& other); + ~freq_hop_dci_0_2_r16_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 + pusch_rep_type_a_e_& pusch_rep_type_a() + { + assert_choice_type(types::pusch_rep_type_a, type_, "frequencyHoppingDCI-0-2-r16"); + return c.get(); + } + pusch_rep_type_b_e_& pusch_rep_type_b() + { + assert_choice_type(types::pusch_rep_type_b, type_, "frequencyHoppingDCI-0-2-r16"); + return c.get(); + } + const pusch_rep_type_a_e_& pusch_rep_type_a() const + { + assert_choice_type(types::pusch_rep_type_a, type_, "frequencyHoppingDCI-0-2-r16"); + return c.get(); + } + const pusch_rep_type_b_e_& pusch_rep_type_b() const + { + assert_choice_type(types::pusch_rep_type_b, type_, "frequencyHoppingDCI-0-2-r16"); + return c.get(); + } + pusch_rep_type_a_e_& set_pusch_rep_type_a(); + pusch_rep_type_b_e_& set_pusch_rep_type_b(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct codebook_subset_dci_0_2_r16_opts { + enum options { fully_and_partial_and_non_coherent, partial_and_non_coherent, non_coherent, nulltype } value; + + const char* to_string() const; + }; + using codebook_subset_dci_0_2_r16_e_ = enumerated; + struct mcs_table_dci_0_2_r16_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using mcs_table_dci_0_2_r16_e_ = enumerated; + struct mcs_table_transform_precoder_dci_0_2_r16_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using mcs_table_transform_precoder_dci_0_2_r16_e_ = enumerated; + struct pusch_rep_type_ind_dci_0_2_r16_opts { + enum options { pusch_rep_type_a, pusch_rep_type_b, nulltype } value; + + const char* to_string() const; + }; + using pusch_rep_type_ind_dci_0_2_r16_e_ = enumerated; + struct res_alloc_dci_0_2_r16_opts { + enum options { res_alloc_type0, res_alloc_type1, dyn_switch, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using res_alloc_dci_0_2_r16_e_ = enumerated; + struct res_alloc_type1_granularity_dci_0_2_r16_opts { + enum options { n2, n4, n8, n16, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using res_alloc_type1_granularity_dci_0_2_r16_e_ = enumerated; + struct pusch_rep_type_ind_dci_0_1_r16_opts { + enum options { pusch_rep_type_a, pusch_rep_type_b, nulltype } value; + + const char* to_string() const; + }; + using pusch_rep_type_ind_dci_0_1_r16_e_ = enumerated; + struct freq_hop_dci_0_1_r16_opts { + enum options { inter_repeat, inter_slot, nulltype } value; + + const char* to_string() const; + }; + using freq_hop_dci_0_1_r16_e_ = enumerated; + struct ul_full_pwr_tx_r16_opts { + enum options { fullpwr, fullpwr_mode1, fullpwr_mode2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ul_full_pwr_tx_r16_e_ = enumerated; + struct map_pattern_r17_opts { + enum options { cyclic_map, sequential_map, nulltype } value; + + const char* to_string() const; + }; + using map_pattern_r17_e_ = enumerated; + using mpe_res_pool_to_add_mod_list_r17_l_ = dyn_array; + using mpe_res_pool_to_release_list_r17_l_ = dyn_array; + + // 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 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; + // ... + // group 0 + bool harq_process_num_size_dci_0_2_r16_present = false; + bool dmrs_seq_initization_dci_0_2_r16_present = false; + bool nof_bits_for_rv_dci_0_2_r16_present = false; + bool ant_ports_field_presence_dci_0_2_r16_present = false; + bool codebook_subset_dci_0_2_r16_present = false; + bool invalid_symbol_pattern_ind_dci_0_2_r16_present = false; + bool max_rank_dci_0_2_r16_present = false; + bool mcs_table_dci_0_2_r16_present = false; + bool mcs_table_transform_precoder_dci_0_2_r16_present = false; + bool prio_ind_dci_0_2_r16_present = false; + bool pusch_rep_type_ind_dci_0_2_r16_present = false; + bool res_alloc_dci_0_2_r16_present = false; + bool res_alloc_type1_granularity_dci_0_2_r16_present = false; + bool invalid_symbol_pattern_ind_dci_0_1_r16_present = false; + bool prio_ind_dci_0_1_r16_present = false; + bool pusch_rep_type_ind_dci_0_1_r16_present = false; + bool freq_hop_dci_0_1_r16_present = false; + bool ul_full_pwr_tx_r16_present = false; + bool nof_invalid_symbols_for_dl_ul_switching_r16_present = false; + copy_ptr, 1, 2>>> minimum_sched_offset_k2_r16; + copy_ptr, 1, 64>>> ul_access_cfg_list_dci_0_1_r16; + uint8_t harq_process_num_size_dci_0_2_r16 = 0; + uint8_t nof_bits_for_rv_dci_0_2_r16 = 0; + copy_ptr> dmrs_ul_for_pusch_map_type_a_dci_0_2_r16; + copy_ptr> dmrs_ul_for_pusch_map_type_b_dci_0_2_r16; + copy_ptr freq_hop_dci_0_2_r16; + copy_ptr, 1, 4>>> freq_hop_offset_lists_dci_0_2_r16; + codebook_subset_dci_0_2_r16_e_ codebook_subset_dci_0_2_r16; + uint8_t max_rank_dci_0_2_r16 = 1; + mcs_table_dci_0_2_r16_e_ mcs_table_dci_0_2_r16; + mcs_table_transform_precoder_dci_0_2_r16_e_ mcs_table_transform_precoder_dci_0_2_r16; + pusch_rep_type_ind_dci_0_2_r16_e_ pusch_rep_type_ind_dci_0_2_r16; + res_alloc_dci_0_2_r16_e_ res_alloc_dci_0_2_r16; + res_alloc_type1_granularity_dci_0_2_r16_e_ res_alloc_type1_granularity_dci_0_2_r16; + copy_ptr>> uci_on_pusch_list_dci_0_2_r16; + copy_ptr>> + pusch_time_domain_alloc_list_dci_0_2_r16; + copy_ptr>> + pusch_time_domain_alloc_list_dci_0_1_r16; + pusch_rep_type_ind_dci_0_1_r16_e_ pusch_rep_type_ind_dci_0_1_r16; + freq_hop_dci_0_1_r16_e_ freq_hop_dci_0_1_r16; + copy_ptr>> uci_on_pusch_list_dci_0_1_r16; + copy_ptr invalid_symbol_pattern_r16; + copy_ptr> pusch_pwr_ctrl_v1610; + ul_full_pwr_tx_r16_e_ ul_full_pwr_tx_r16; + copy_ptr>> + pusch_time_domain_alloc_list_for_multi_pusch_r16; + uint8_t nof_invalid_symbols_for_dl_ul_switching_r16 = 1; + // group 1 + bool map_pattern_r17_present = false; + bool second_tpc_field_dci_0_1_r17_present = false; + bool second_tpc_field_dci_0_2_r17_present = false; + bool seq_offset_for_rv_r17_present = false; + bool available_slot_count_r17_present = false; + bool harq_process_num_size_dci_0_2_v1700_present = false; + bool harq_process_num_size_dci_0_1_r17_present = false; + copy_ptr, 1, 64>>> ul_access_cfg_list_dci_0_2_r17; + copy_ptr> beta_offsets_cross_pri0_r17; + copy_ptr> beta_offsets_cross_pri1_r17; + copy_ptr> beta_offsets_cross_pri0_dci_0_2_r17; + copy_ptr> beta_offsets_cross_pri1_dci_0_2_r17; + map_pattern_r17_e_ map_pattern_r17; + uint8_t seq_offset_for_rv_r17 = 0; + copy_ptr, 1, 3>>> ul_access_cfg_list_dci_0_1_r17; + copy_ptr, 1, 2>>> minimum_sched_offset_k2_r17; + copy_ptr> dmrs_bundling_pusch_cfg_r17; + uint8_t harq_process_num_size_dci_0_2_v1700 = 5; + uint8_t harq_process_num_size_dci_0_1_r17 = 5; + copy_ptr mpe_res_pool_to_add_mod_list_r17; + copy_ptr mpe_res_pool_to_release_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PathlossReferenceRS-r17 ::= SEQUENCE +struct pathloss_ref_rs_r17_s { + struct ref_sig_r17_c_ { + struct types_opts { + enum options { ssb_idx, csi_rs_idx, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + ref_sig_r17_c_() = default; + ref_sig_r17_c_(const ref_sig_r17_c_& other); + ref_sig_r17_c_& operator=(const ref_sig_r17_c_& other); + ~ref_sig_r17_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(types::ssb_idx, type_, "referenceSignal-r17"); + return c.get(); + } + uint8_t& csi_rs_idx() + { + assert_choice_type(types::csi_rs_idx, type_, "referenceSignal-r17"); + return c.get(); + } + const uint8_t& ssb_idx() const + { + assert_choice_type(types::ssb_idx, type_, "referenceSignal-r17"); + return c.get(); + } + const uint8_t& csi_rs_idx() const + { + assert_choice_type(types::csi_rs_idx, type_, "referenceSignal-r17"); + return c.get(); + } + uint8_t& set_ssb_idx(); + uint8_t& set_csi_rs_idx(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool add_pci_r17_present = false; + uint8_t pathloss_ref_rs_id_r17 = 0; + ref_sig_r17_c_ ref_sig_r17; + uint8_t add_pci_r17 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + using srs_res_set_to_add_mod_list_dci_0_2_r16_l_ = dyn_array; + using srs_res_set_to_release_list_dci_0_2_r16_l_ = bounded_array; + using srs_pos_res_set_to_release_list_r16_l_ = bounded_array; + using srs_pos_res_set_to_add_mod_list_r16_l_ = dyn_array; + using srs_pos_res_to_release_list_r16_l_ = dyn_array; + using srs_pos_res_to_add_mod_list_r16_l_ = dyn_array; + + // member variables + bool ext = 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; + // ... + // group 0 + bool srs_request_dci_1_2_r16_present = false; + bool srs_request_dci_0_2_r16_present = false; + uint8_t srs_request_dci_1_2_r16 = 1; + uint8_t srs_request_dci_0_2_r16 = 1; + copy_ptr srs_res_set_to_add_mod_list_dci_0_2_r16; + copy_ptr srs_res_set_to_release_list_dci_0_2_r16; + copy_ptr srs_pos_res_set_to_release_list_r16; + copy_ptr srs_pos_res_set_to_add_mod_list_r16; + copy_ptr srs_pos_res_to_release_list_r16; + copy_ptr srs_pos_res_to_add_mod_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TCI-UL-State-r17 ::= SEQUENCE +struct tci_ul_state_r17_s { + struct ref_sig_r17_c_ { + struct types_opts { + enum options { ssb_idx_r17, csi_rs_idx_r17, srs_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + ref_sig_r17_c_() = default; + ref_sig_r17_c_(const ref_sig_r17_c_& other); + ref_sig_r17_c_& operator=(const ref_sig_r17_c_& other); + ~ref_sig_r17_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_r17() + { + assert_choice_type(types::ssb_idx_r17, type_, "referenceSignal-r17"); + return c.get(); + } + uint8_t& csi_rs_idx_r17() + { + assert_choice_type(types::csi_rs_idx_r17, type_, "referenceSignal-r17"); + return c.get(); + } + uint8_t& srs_r17() + { + assert_choice_type(types::srs_r17, type_, "referenceSignal-r17"); + return c.get(); + } + const uint8_t& ssb_idx_r17() const + { + assert_choice_type(types::ssb_idx_r17, type_, "referenceSignal-r17"); + return c.get(); + } + const uint8_t& csi_rs_idx_r17() const + { + assert_choice_type(types::csi_rs_idx_r17, type_, "referenceSignal-r17"); + return c.get(); + } + const uint8_t& srs_r17() const + { + assert_choice_type(types::srs_r17, type_, "referenceSignal-r17"); + return c.get(); + } + uint8_t& set_ssb_idx_r17(); + uint8_t& set_csi_rs_idx_r17(); + uint8_t& set_srs_r17(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext = false; + bool serving_cell_id_r17_present = false; + bool bwp_id_r17_present = false; + bool add_pci_r17_present = false; + bool ul_pwr_ctrl_r17_present = false; + bool pathloss_ref_rs_id_r17_present = false; + uint8_t tci_ul_state_id_r17 = 0; + uint8_t serving_cell_id_r17 = 0; + uint8_t bwp_id_r17 = 0; + ref_sig_r17_c_ ref_sig_r17; + uint8_t add_pci_r17 = 1; + uint8_t ul_pwr_ctrl_r17 = 1; + uint8_t pathloss_ref_rs_id_r17 = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BWP-UplinkDedicated ::= SEQUENCE +struct bwp_ul_ded_s { + struct ul_tci_state_list_r17_c_ { + struct explicitlist_s_ { + using ul_tci_to_add_mod_list_r17_l_ = dyn_array; + using ul_tci_to_release_list_r17_l_ = dyn_array; + + // member variables + ul_tci_to_add_mod_list_r17_l_ ul_tci_to_add_mod_list_r17; + ul_tci_to_release_list_r17_l_ ul_tci_to_release_list_r17; + }; + struct types_opts { + enum options { explicitlist, unified_tci_state_ref_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + ul_tci_state_list_r17_c_() = default; + ul_tci_state_list_r17_c_(const ul_tci_state_list_r17_c_& other); + ul_tci_state_list_r17_c_& operator=(const ul_tci_state_list_r17_c_& other); + ~ul_tci_state_list_r17_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 + explicitlist_s_& explicitlist() + { + assert_choice_type(types::explicitlist, type_, "ul-TCI-StateList-r17"); + return c.get(); + } + serving_cell_and_bwp_id_r17_s& unified_tci_state_ref_r17() + { + assert_choice_type(types::unified_tci_state_ref_r17, type_, "ul-TCI-StateList-r17"); + return c.get(); + } + const explicitlist_s_& explicitlist() const + { + assert_choice_type(types::explicitlist, type_, "ul-TCI-StateList-r17"); + return c.get(); + } + const serving_cell_and_bwp_id_r17_s& unified_tci_state_ref_r17() const + { + assert_choice_type(types::unified_tci_state_ref_r17, type_, "ul-TCI-StateList-r17"); + return c.get(); + } + explicitlist_s_& set_explicitlist(); + serving_cell_and_bwp_id_r17_s& set_unified_tci_state_ref_r17(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + using pathloss_ref_rs_to_add_mod_list_r17_l_ = dyn_array; + using pathloss_ref_rs_to_release_list_r17_l_ = dyn_array; + + // member variables + bool ext = false; + bool pucch_cfg_present = false; + bool pusch_cfg_present = false; + bool cfg_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 cfg_grant_cfg; + setup_release_c srs_cfg; + setup_release_c beam_fail_recovery_cfg; + // ... + // group 0 + bool cp_ext_c2_r16_present = false; + bool cp_ext_c3_r16_present = false; + bool use_interlace_pucch_pusch_r16_present = false; + copy_ptr> sl_pucch_cfg_r16; + uint8_t cp_ext_c2_r16 = 1; + uint8_t cp_ext_c3_r16 = 1; + copy_ptr>> pucch_cfg_list_r16; + copy_ptr> lbt_fail_recovery_cfg_r16; + copy_ptr cfg_grant_cfg_to_add_mod_list_r16; + copy_ptr cfg_grant_cfg_to_release_list_r16; + copy_ptr cfg_grant_cfg_type2_deactivation_state_list_r16; + // group 1 + bool ul_pwr_ctrl_r17_present = false; + copy_ptr ul_tci_state_list_r17; + uint8_t ul_pwr_ctrl_r17 = 1; + copy_ptr>> pucch_cfg_list_multicast1_r17; + copy_ptr>> pucch_cfg_list_multicast2_r17; + // group 2 + copy_ptr> pucch_cfg_multicast1_r17; + copy_ptr> pucch_cfg_multicast2_r17; + // group 3 + copy_ptr pathloss_ref_rs_to_add_mod_list_r17; + copy_ptr pathloss_ref_rs_to_release_list_r17; + + // 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; +}; + +// BWP-UplinkDedicatedSDT-r17 ::= SEQUENCE +struct bwp_ul_ded_sdt_r17_s { + bool ext = false; + bool pusch_cfg_r17_present = false; + setup_release_c pusch_cfg_r17; + cfg_grant_cfg_to_add_mod_list_r16_l cfg_grant_cfg_to_add_mod_list_r17; + cfg_grant_cfg_to_release_list_r16_l cfg_grant_cfg_to_release_list_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/cell_group_config.h b/include/srsran/asn1/rrc_nr/cell_group_config.h index f4c8ffe8e9..3bd218612d 100644 --- a/include/srsran/asn1/rrc_nr/cell_group_config.h +++ b/include/srsran/asn1/rrc_nr/cell_group_config.h @@ -16,7 +16,7 @@ #pragma once -#include "dl_dcch_msg.h" +#include "ul_dcch_msg_ies.h" namespace asn1 { namespace rrc_nr { @@ -25,70 +25,6 @@ namespace rrc_nr { * Struct Definitions ******************************************************************************/ -// TA-Info-r17 ::= SEQUENCE -struct ta_info_r17_s { - bool ta_common_drift_r17_present = false; - bool ta_common_drift_variant_r17_present = false; - uint32_t ta_common_r17 = 0; - int32_t ta_common_drift_r17 = -257303; - uint16_t ta_common_drift_variant_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NTN-Config-r17 ::= SEQUENCE -struct ntn_cfg_r17_s { - struct ntn_ul_sync_validity_dur_r17_opts { - enum options { s5, s10, s15, s20, s25, s30, s35, s40, s45, s50, s55, s60, s120, s180, s240, s900, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using ntn_ul_sync_validity_dur_r17_e_ = enumerated; - struct ntn_polarization_dl_r17_opts { - enum options { rhcp, lhcp, linear, nulltype } value; - - const char* to_string() const; - }; - using ntn_polarization_dl_r17_e_ = enumerated; - struct ntn_polarization_ul_r17_opts { - enum options { rhcp, lhcp, linear, nulltype } value; - - const char* to_string() const; - }; - using ntn_polarization_ul_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool epoch_time_r17_present = false; - bool ntn_ul_sync_validity_dur_r17_present = false; - bool cell_specific_koffset_r17_present = false; - bool kmac_r17_present = false; - bool ta_info_r17_present = false; - bool ntn_polarization_dl_r17_present = false; - bool ntn_polarization_ul_r17_present = false; - bool ephemeris_info_r17_present = false; - bool ta_report_r17_present = false; - epoch_time_r17_s epoch_time_r17; - ntn_ul_sync_validity_dur_r17_e_ ntn_ul_sync_validity_dur_r17; - uint16_t cell_specific_koffset_r17 = 1; - uint16_t kmac_r17 = 1; - ta_info_r17_s ta_info_r17; - ntn_polarization_dl_r17_e_ ntn_polarization_dl_r17; - ntn_polarization_ul_r17_e_ ntn_polarization_ul_r17; - ephemeris_info_r17_c ephemeris_info_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // T-Reassembly ::= ENUMERATED struct t_reassembly_opts { enum options { @@ -1856,561 +1792,6 @@ struct d_cp_cfg_r16_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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using milli_seconds_e_ = enumerated; - struct types_opts { - enum options { sub_milli_seconds, milli_seconds, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::sub_milli_seconds, type_, "drx-onDurationTimer"); - return c.get(); - } - milli_seconds_e_& milli_seconds() - { - assert_choice_type(types::milli_seconds, type_, "drx-onDurationTimer"); - return c.get(); - } - const uint8_t& sub_milli_seconds() const - { - assert_choice_type(types::sub_milli_seconds, type_, "drx-onDurationTimer"); - return c.get(); - } - const milli_seconds_e_& milli_seconds() const - { - assert_choice_type(types::milli_seconds, type_, "drx-onDurationTimer"); - return c.get(); - } - uint8_t& set_sub_milli_seconds(); - milli_seconds_e_& set_milli_seconds(); - - 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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using drx_inactivity_timer_e_ = enumerated; - 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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using drx_retx_timer_dl_e_ = enumerated; - 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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using drx_retx_timer_ul_e_ = enumerated; - struct drx_long_cycle_start_offset_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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // 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_(); } - 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() - { - assert_choice_type(types::ms10, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms20() - { - assert_choice_type(types::ms20, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms32() - { - assert_choice_type(types::ms32, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms40() - { - assert_choice_type(types::ms40, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms60() - { - assert_choice_type(types::ms60, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms64() - { - assert_choice_type(types::ms64, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms70() - { - assert_choice_type(types::ms70, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms80() - { - assert_choice_type(types::ms80, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms128() - { - assert_choice_type(types::ms128, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms160() - { - assert_choice_type(types::ms160, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms256() - { - assert_choice_type(types::ms256, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms320() - { - assert_choice_type(types::ms320, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms512() - { - assert_choice_type(types::ms512, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms640() - { - assert_choice_type(types::ms640, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms1024() - { - assert_choice_type(types::ms1024, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms1280() - { - assert_choice_type(types::ms1280, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms2048() - { - assert_choice_type(types::ms2048, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms2560() - { - assert_choice_type(types::ms2560, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms5120() - { - assert_choice_type(types::ms5120, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms10240() - { - assert_choice_type(types::ms10240, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms10() const - { - assert_choice_type(types::ms10, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms20() const - { - assert_choice_type(types::ms20, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms32() const - { - assert_choice_type(types::ms32, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms40() const - { - assert_choice_type(types::ms40, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms60() const - { - assert_choice_type(types::ms60, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms64() const - { - assert_choice_type(types::ms64, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms70() const - { - assert_choice_type(types::ms70, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms80() const - { - assert_choice_type(types::ms80, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms128() const - { - assert_choice_type(types::ms128, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms160() const - { - assert_choice_type(types::ms160, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms256() const - { - assert_choice_type(types::ms256, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms320() const - { - assert_choice_type(types::ms320, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms512() const - { - assert_choice_type(types::ms512, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms640() const - { - assert_choice_type(types::ms640, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms1024() const - { - assert_choice_type(types::ms1024, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms1280() const - { - assert_choice_type(types::ms1280, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms2048() const - { - assert_choice_type(types::ms2048, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms2560() const - { - assert_choice_type(types::ms2560, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms5120() const - { - assert_choice_type(types::ms5120, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms10240() const - { - assert_choice_type(types::ms10240, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& set_ms10(); - uint8_t& set_ms20(); - uint8_t& set_ms32(); - uint8_t& set_ms40(); - uint8_t& set_ms60(); - uint8_t& set_ms64(); - uint8_t& set_ms70(); - uint8_t& set_ms80(); - uint8_t& set_ms128(); - uint8_t& set_ms160(); - uint16_t& set_ms256(); - uint16_t& set_ms320(); - uint16_t& set_ms512(); - uint16_t& set_ms640(); - uint16_t& set_ms1024(); - uint16_t& set_ms1280(); - uint16_t& set_ms2048(); - uint16_t& set_ms2560(); - uint16_t& set_ms5120(); - uint16_t& set_ms10240(); - - 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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using drx_short_cycle_e_ = enumerated; - - // member variables - drx_short_cycle_e_ drx_short_cycle; - uint8_t drx_short_cycle_timer = 1; - }; - - // 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // DRX-ConfigExt-v1700 ::= SEQUENCE struct drx_cfg_ext_v1700_s { uint16_t drx_harq_rtt_timer_dl_r17 = 0; diff --git a/include/srsran/asn1/rrc_nr/dl_ccch_msg.h b/include/srsran/asn1/rrc_nr/dl_ccch_msg.h new file mode 100644 index 0000000000..469925897f --- /dev/null +++ b/include/srsran/asn1/rrc_nr/dl_ccch_msg.h @@ -0,0 +1,124 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "srsran/asn1/asn1_utils.h" + +namespace asn1 { +namespace rrc_nr { + +struct rrc_reject_s; +struct rrc_setup_s; + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// 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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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 + rrc_reject_s& rrc_reject() + { + assert_choice_type(types::rrc_reject, type_, "c1"); + return c.get(); + } + rrc_setup_s& rrc_setup() + { + assert_choice_type(types::rrc_setup, type_, "c1"); + return c.get(); + } + const rrc_reject_s& rrc_reject() const + { + assert_choice_type(types::rrc_reject, type_, "c1"); + return c.get(); + } + const rrc_setup_s& rrc_setup() const + { + assert_choice_type(types::rrc_setup, type_, "c1"); + return c.get(); + } + rrc_reject_s& set_rrc_reject(); + rrc_setup_s& set_rrc_setup(); + void set_spare2(); + void set_spare1(); + + private: + types type_; + choice_buffer_ptr c; + }; + struct types_opts { + enum options { c1, msg_class_ext, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + dl_ccch_msg_type_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 + c1_c_& c1() + { + assert_choice_type(types::c1, type_, "DL-CCCH-MessageType"); + return c; + } + const c1_c_& c1() const + { + assert_choice_type(types::c1, type_, "DL-CCCH-MessageType"); + return c; + } + c1_c_& set_c1(); + void set_msg_class_ext(); + +private: + types type_; + c1_c_ c; +}; + +// 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; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/msg_common.h b/include/srsran/asn1/rrc_nr/dl_ccch_msg_ies.h similarity index 70% rename from include/srsran/asn1/rrc_nr/msg_common.h rename to include/srsran/asn1/rrc_nr/dl_ccch_msg_ies.h index 109dafd507..1dea70c0a8 100644 --- a/include/srsran/asn1/rrc_nr/msg_common.h +++ b/include/srsran/asn1/rrc_nr/dl_ccch_msg_ies.h @@ -16,6 +16,7 @@ #pragma once +#include "radio_bearer_cfg.h" #include "serving_cell.h" namespace asn1 { @@ -25,9 +26,6 @@ namespace rrc_nr { * Struct Definitions ******************************************************************************/ -// MultiFrequencyBandListNR ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..1024) -using multi_freq_band_list_nr_l = bounded_array; - // SL-MinMaxMCS-Config-r16 ::= SEQUENCE struct sl_min_max_mcs_cfg_r16_s { struct sl_mcs_table_r16_opts { @@ -2798,69 +2796,6 @@ struct t_poll_retx_opts { }; using t_poll_retx_e = enumerated; -// DiscardTimerExt-r16 ::= ENUMERATED -struct discard_timer_ext_r16_opts { - enum options { ms0dot5, ms1, ms2, ms4, ms6, ms8, spare2, spare1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; -}; -using discard_timer_ext_r16_e = enumerated; - -// DiscardTimerExt2-r17 ::= ENUMERATED -struct discard_timer_ext2_r17_opts { - enum options { ms2000, spare3, spare2, spare1, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; -}; -using discard_timer_ext2_r17_e = enumerated; - -// EthernetHeaderCompression-r16 ::= SEQUENCE -struct ethernet_hdr_compress_r16_s { - struct ehc_common_r16_s_ { - struct ehc_c_id_len_r16_opts { - enum options { bits7, bits15, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ehc_c_id_len_r16_e_ = enumerated; - - // member variables - bool ext = false; - ehc_c_id_len_r16_e_ ehc_c_id_len_r16; - // ... - }; - struct ehc_dl_r16_s_ { - bool ext = false; - bool drb_continue_ehc_dl_r16_present = false; - // ... - }; - struct ehc_ul_r16_s_ { - bool ext = false; - bool drb_continue_ehc_ul_r16_present = false; - uint16_t max_c_id_ehc_ul_r16 = 1; - // ... - }; - - // member variables - bool ehc_dl_r16_present = false; - bool ehc_ul_r16_present = false; - ehc_common_r16_s_ ehc_common_r16; - ehc_dl_r16_s_ ehc_dl_r16; - ehc_ul_r16_s_ ehc_ul_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // MAC-MainConfigSL-r16 ::= SEQUENCE struct mac_main_cfg_sl_r16_s { bool ext = false; @@ -3250,423 +3185,6 @@ struct sl_resel_cfg_r17_s { // SL-SyncConfigList-r16 ::= SEQUENCE (SIZE (1..16)) OF SL-SyncConfig-r16 using sl_sync_cfg_list_r16_l = dyn_array; -// 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; - - const char* to_string() const; - int32_t to_number() const; -}; -using ul_data_split_thres_e = enumerated; - -// UplinkDataCompression-r17 ::= CHOICE -struct ul_data_compress_r17_c { - struct new_setup_s_ { - struct buffer_size_r17_opts { - enum options { kbyte2, kbyte4, kbyte8, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using buffer_size_r17_e_ = enumerated; - struct dictionary_r17_opts { - enum options { sip_sdp, operator_value, nulltype } value; - - const char* to_string() const; - }; - using dictionary_r17_e_ = enumerated; - - // member variables - bool dictionary_r17_present = false; - buffer_size_r17_e_ buffer_size_r17; - dictionary_r17_e_ dictionary_r17; - }; - struct types_opts { - enum options { new_setup, drb_continue_udc, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - ul_data_compress_r17_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 - new_setup_s_& new_setup() - { - assert_choice_type(types::new_setup, type_, "UplinkDataCompression-r17"); - return c; - } - const new_setup_s_& new_setup() const - { - assert_choice_type(types::new_setup, type_, "UplinkDataCompression-r17"); - return c; - } - new_setup_s_& set_new_setup(); - void set_drb_continue_udc(); - -private: - types type_; - new_setup_s_ c; -}; - -// CipheringAlgorithm ::= ENUMERATED -struct ciphering_algorithm_opts { - enum options { nea0, nea1, nea2, nea3, spare4, spare3, spare2, spare1, /*...*/ nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; -}; -using ciphering_algorithm_e = enumerated; - -// IntegrityProtAlgorithm ::= ENUMERATED -struct integrity_prot_algorithm_opts { - enum options { nia0, nia1, nia2, nia3, spare4, spare3, spare2, spare1, /*...*/ nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; -}; -using integrity_prot_algorithm_e = enumerated; - -// 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; - - const char* to_string() const; - int16_t to_number() const; - }; - using discard_timer_e_ = enumerated; - struct pdcp_sn_size_ul_opts { - enum options { len12bits, len18bits, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pdcp_sn_size_ul_e_ = enumerated; - struct pdcp_sn_size_dl_opts { - enum options { len12bits, len18bits, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pdcp_sn_size_dl_e_ = enumerated; - 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; - }; - - // member variables - bool max_c_id_present = false; - bool drb_continue_rohc_present = false; - uint16_t max_c_id = 1; - profiles_s_ profiles; - }; - struct ul_only_rohc_s_ { - struct profiles_s_ { - bool profile0x0006 = false; - }; - - // member variables - bool max_c_id_present = false; - bool drb_continue_rohc_present = false; - uint16_t max_c_id = 1; - profiles_s_ profiles; - }; - struct types_opts { - enum options { not_used, rohc, ul_only_rohc, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::rohc, type_, "headerCompression"); - return c.get(); - } - ul_only_rohc_s_& ul_only_rohc() - { - assert_choice_type(types::ul_only_rohc, type_, "headerCompression"); - return c.get(); - } - const rohc_s_& rohc() const - { - assert_choice_type(types::rohc, type_, "headerCompression"); - return c.get(); - } - const ul_only_rohc_s_& ul_only_rohc() const - { - assert_choice_type(types::ul_only_rohc, type_, "headerCompression"); - return c.get(); - } - void set_not_used(); - rohc_s_& set_rohc(); - ul_only_rohc_s_& set_ul_only_rohc(); - - 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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t_reordering_e_ = enumerated; - struct more_than_two_rlc_drb_r16_s_ { - using dupl_state_r16_l_ = std::array; - - // member variables - bool split_secondary_path_r16_present = false; - bool dupl_state_r16_present = false; - uint8_t split_secondary_path_r16 = 1; - dupl_state_r16_l_ dupl_state_r16; - }; - - // 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; - // group 1 - copy_ptr> discard_timer_ext_r16; - copy_ptr more_than_two_rlc_drb_r16; - copy_ptr> ethernet_hdr_compress_r16; - // group 2 - bool survival_time_state_support_r17_present = false; - bool init_rx_deliv_r17_present = false; - copy_ptr> ul_data_compress_r17; - copy_ptr> discard_timer_ext2_r17; - fixed_bitstring<32> init_rx_deliv_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SDAP-Config ::= SEQUENCE -struct sdap_cfg_s { - struct sdap_hdr_dl_opts { - enum options { present, absent, nulltype } value; - - const char* to_string() const; - }; - using sdap_hdr_dl_e_ = enumerated; - struct sdap_hdr_ul_opts { - enum options { present, absent, nulltype } value; - - const char* to_string() const; - }; - using sdap_hdr_ul_e_ = enumerated; - using mapped_qos_flows_to_add_l_ = dyn_array; - using mapped_qos_flows_to_release_l_ = dyn_array; - - // member variables - bool ext = 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; -}; - // SL-DRX-Config-r17 ::= SEQUENCE struct sl_drx_cfg_r17_s { using sl_drx_cfg_uc_to_release_list_r17_l_ = bounded_array; @@ -4022,60 +3540,25 @@ struct sl_ue_sel_cfg_r16_s { void to_json(json_writer& j) const; }; -// TMGI-r17 ::= SEQUENCE -struct tmgi_r17_s { - struct plmn_id_r17_c_ { - struct types_opts { - enum options { plmn_idx, explicit_value, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - plmn_id_r17_c_() = default; - plmn_id_r17_c_(const plmn_id_r17_c_& other); - plmn_id_r17_c_& operator=(const plmn_id_r17_c_& other); - ~plmn_id_r17_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& plmn_idx() - { - assert_choice_type(types::plmn_idx, type_, "plmn-Id-r17"); - return c.get(); - } - plmn_id_s& explicit_value() - { - assert_choice_type(types::explicit_value, type_, "plmn-Id-r17"); - return c.get(); - } - const uint8_t& plmn_idx() const - { - assert_choice_type(types::plmn_idx, type_, "plmn-Id-r17"); - return c.get(); - } - const plmn_id_s& explicit_value() const - { - assert_choice_type(types::explicit_value, type_, "plmn-Id-r17"); - return c.get(); - } - uint8_t& set_plmn_idx(); - plmn_id_s& set_explicit_value(); - - private: - types type_; - choice_buffer_t c; +// SL-DiscConfig-r17 ::= SEQUENCE +struct sl_disc_cfg_r17_s { + bool sl_relay_ue_cfg_r17_present = false; + bool sl_remote_ue_cfg_r17_present = false; + setup_release_c sl_relay_ue_cfg_r17; + setup_release_c sl_remote_ue_cfg_r17; - 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 - plmn_id_r17_c_ plmn_id_r17; - fixed_octstring<3> service_id_r17; +// SL-MeasConfigInfo-r16 ::= SEQUENCE +struct sl_meas_cfg_info_r16_s { + bool ext = false; + uint8_t sl_dest_idx_r16 = 0; + sl_meas_cfg_r16_s sl_meas_cfg_r16; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -4083,131 +3566,15 @@ struct tmgi_r17_s { void to_json(json_writer& j) const; }; -// DRB-ToAddMod ::= SEQUENCE -struct drb_to_add_mod_s { - struct cn_assoc_c_ { - struct types_opts { - enum options { eps_bearer_id, sdap_cfg, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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_(); } - 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(types::eps_bearer_id, type_, "cnAssociation"); - return c.get(); - } - sdap_cfg_s& sdap_cfg() - { - assert_choice_type(types::sdap_cfg, type_, "cnAssociation"); - return c.get(); - } - const uint8_t& eps_bearer_id() const - { - assert_choice_type(types::eps_bearer_id, type_, "cnAssociation"); - return c.get(); - } - const sdap_cfg_s& sdap_cfg() const - { - assert_choice_type(types::sdap_cfg, type_, "cnAssociation"); - return c.get(); - } - uint8_t& set_eps_bearer_id(); - sdap_cfg_s& set_sdap_cfg(); - - private: - 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; - // ... - // group 0 - bool daps_cfg_r16_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MRB-ToAddMod-r17 ::= SEQUENCE -struct mrb_to_add_mod_r17_s { - bool ext = false; - bool mbs_session_id_r17_present = false; - bool mrb_id_new_r17_present = false; - bool reestablish_pdcp_r17_present = false; - bool recover_pdcp_r17_present = false; - bool pdcp_cfg_r17_present = false; - tmgi_r17_s mbs_session_id_r17; - uint16_t mrb_id_r17 = 1; - uint16_t mrb_id_new_r17 = 1; - pdcp_cfg_s pdcp_cfg_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-DiscConfig-r17 ::= SEQUENCE -struct sl_disc_cfg_r17_s { - bool sl_relay_ue_cfg_r17_present = false; - bool sl_remote_ue_cfg_r17_present = false; - setup_release_c sl_relay_ue_cfg_r17; - setup_release_c sl_remote_ue_cfg_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-MeasConfigInfo-r16 ::= SEQUENCE -struct sl_meas_cfg_info_r16_s { - bool ext = false; - uint8_t sl_dest_idx_r16 = 0; - sl_meas_cfg_r16_s sl_meas_cfg_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-PHY-MAC-RLC-Config-r16 ::= SEQUENCE -struct sl_phy_mac_rlc_cfg_r16_s { - using sl_freq_info_to_release_list_r16_l_ = bounded_array; - using sl_freq_info_to_add_mod_list_r16_l_ = dyn_array; - using sl_rlc_bearer_to_release_list_r16_l_ = dyn_array; - using sl_rlc_bearer_to_add_mod_list_r16_l_ = dyn_array; - struct sl_max_num_consecutive_dtx_r16_opts { - enum options { n1, n2, n3, n4, n6, n8, n16, n32, nulltype } value; - typedef uint8_t number_type; +// SL-PHY-MAC-RLC-Config-r16 ::= SEQUENCE +struct sl_phy_mac_rlc_cfg_r16_s { + using sl_freq_info_to_release_list_r16_l_ = bounded_array; + using sl_freq_info_to_add_mod_list_r16_l_ = dyn_array; + using sl_rlc_bearer_to_release_list_r16_l_ = dyn_array; + using sl_rlc_bearer_to_add_mod_list_r16_l_ = dyn_array; + struct sl_max_num_consecutive_dtx_r16_opts { + enum options { n1, n2, n3, n4, n6, n8, n16, n32, nulltype } value; + typedef uint8_t number_type; const char* to_string() const; uint8_t to_number() const; @@ -4345,51 +3712,6 @@ struct sl_srap_cfg_r17_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; - // ... - // group 0 - bool srb_id_v1700_present = false; - uint8_t srb_id_v1700 = 4; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - // ... - - // 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; - -// MRB-ToAddModList-r17 ::= SEQUENCE (SIZE (1..32)) OF MRB-ToAddMod-r17 -using mrb_to_add_mod_list_r17_l = dyn_array; - -// MRB-ToReleaseList-r17 ::= SEQUENCE (SIZE (1..32)) OF INTEGER (1..512) -using mrb_to_release_list_r17_l = bounded_array; - // SL-ConfigDedicatedNR-r16 ::= SEQUENCE struct sl_cfg_ded_nr_r16_s { using sl_radio_bearer_to_release_list_r16_l_ = dyn_array; @@ -4441,32 +3763,6 @@ struct sl_l2_remote_ue_cfg_r17_s { void to_json(json_writer& j) const; }; -// 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; - - const char* to_string() const; - }; - using key_to_use_e_ = enumerated; - - // 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; -}; - // RRCSetup-v1700-IEs ::= SEQUENCE struct rrc_setup_v1700_ies_s { bool sl_cfg_ded_nr_r17_present = false; @@ -4481,28 +3777,6 @@ struct rrc_setup_v1700_ies_s { void to_json(json_writer& j) const; }; -// RadioBearerConfig ::= SEQUENCE -struct radio_bearer_cfg_s { - bool ext = false; - bool srb3_to_release_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; - // ... - // group 0 - bool srb4_to_release_r17_present = false; - copy_ptr mrb_to_add_mod_list_r17; - copy_ptr mrb_to_release_list_r17; - copy_ptr srb4_to_add_mod_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // RRCReject-IEs ::= SEQUENCE struct rrc_reject_ies_s { bool wait_time_present = false; @@ -4621,1072 +3895,5 @@ 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; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::rrc_reject, type_, "c1"); - return c.get(); - } - rrc_setup_s& rrc_setup() - { - assert_choice_type(types::rrc_setup, type_, "c1"); - return c.get(); - } - const rrc_reject_s& rrc_reject() const - { - assert_choice_type(types::rrc_reject, type_, "c1"); - return c.get(); - } - const rrc_setup_s& rrc_setup() const - { - assert_choice_type(types::rrc_setup, type_, "c1"); - return c.get(); - } - rrc_reject_s& set_rrc_reject(); - rrc_setup_s& set_rrc_setup(); - void set_spare2(); - void set_spare1(); - - 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - dl_ccch_msg_type_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 - c1_c_& c1() - { - assert_choice_type(types::c1, type_, "DL-CCCH-MessageType"); - return c; - } - const c1_c_& c1() const - { - assert_choice_type(types::c1, type_, "DL-CCCH-MessageType"); - return c; - } - c1_c_& set_c1(); - void set_msg_class_ext(); - -private: - types type_; - c1_c_ c; -}; - -// 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; -}; - -// MUSIM-Starting-SFN-AndSubframe-r17 ::= SEQUENCE -struct mu_si_m_start_sfn_and_sf_r17_s { - uint16_t start_sfn_r17 = 0; - uint8_t start_sf_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MUSIM-GapInfo-r17 ::= SEQUENCE -struct mu_si_m_gap_info_r17_s { - struct musim_gap_len_r17_opts { - enum options { ms3, ms4, ms6, ms10, ms20, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using musim_gap_len_r17_e_ = enumerated; - struct musim_gap_repeat_and_offset_r17_c_ { - struct types_opts { - enum options { - ms20_r17, - ms40_r17, - ms80_r17, - ms160_r17, - ms320_r17, - ms640_r17, - ms1280_r17, - ms2560_r17, - ms5120_r17, - // ... - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - musim_gap_repeat_and_offset_r17_c_() = default; - musim_gap_repeat_and_offset_r17_c_(const musim_gap_repeat_and_offset_r17_c_& other); - musim_gap_repeat_and_offset_r17_c_& operator=(const musim_gap_repeat_and_offset_r17_c_& other); - ~musim_gap_repeat_and_offset_r17_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& ms20_r17() - { - assert_choice_type(types::ms20_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - uint8_t& ms40_r17() - { - assert_choice_type(types::ms40_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - uint8_t& ms80_r17() - { - assert_choice_type(types::ms80_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - uint8_t& ms160_r17() - { - assert_choice_type(types::ms160_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - uint16_t& ms320_r17() - { - assert_choice_type(types::ms320_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - uint16_t& ms640_r17() - { - assert_choice_type(types::ms640_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - uint16_t& ms1280_r17() - { - assert_choice_type(types::ms1280_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - uint16_t& ms2560_r17() - { - assert_choice_type(types::ms2560_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - uint16_t& ms5120_r17() - { - assert_choice_type(types::ms5120_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - const uint8_t& ms20_r17() const - { - assert_choice_type(types::ms20_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - const uint8_t& ms40_r17() const - { - assert_choice_type(types::ms40_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - const uint8_t& ms80_r17() const - { - assert_choice_type(types::ms80_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - const uint8_t& ms160_r17() const - { - assert_choice_type(types::ms160_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - const uint16_t& ms320_r17() const - { - assert_choice_type(types::ms320_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - const uint16_t& ms640_r17() const - { - assert_choice_type(types::ms640_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - const uint16_t& ms1280_r17() const - { - assert_choice_type(types::ms1280_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - const uint16_t& ms2560_r17() const - { - assert_choice_type(types::ms2560_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - const uint16_t& ms5120_r17() const - { - assert_choice_type(types::ms5120_r17, type_, "musim-GapRepetitionAndOffset-r17"); - return c.get(); - } - uint8_t& set_ms20_r17(); - uint8_t& set_ms40_r17(); - uint8_t& set_ms80_r17(); - uint8_t& set_ms160_r17(); - uint16_t& set_ms320_r17(); - uint16_t& set_ms640_r17(); - uint16_t& set_ms1280_r17(); - uint16_t& set_ms2560_r17(); - uint16_t& set_ms5120_r17(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool musim_start_sfn_and_sf_r17_present = false; - bool musim_gap_len_r17_present = false; - bool musim_gap_repeat_and_offset_r17_present = false; - mu_si_m_start_sfn_and_sf_r17_s musim_start_sfn_and_sf_r17; - musim_gap_len_r17_e_ musim_gap_len_r17; - musim_gap_repeat_and_offset_r17_c_ musim_gap_repeat_and_offset_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// IAB-IP-Address-r16 ::= CHOICE -struct iab_ip_address_r16_c { - struct types_opts { - enum options { ip_v4_address_r16, ip_v6_address_r16, ip_v6_prefix_r16, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - iab_ip_address_r16_c() = default; - iab_ip_address_r16_c(const iab_ip_address_r16_c& other); - iab_ip_address_r16_c& operator=(const iab_ip_address_r16_c& other); - ~iab_ip_address_r16_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<32>& ip_v4_address_r16() - { - assert_choice_type(types::ip_v4_address_r16, type_, "IAB-IP-Address-r16"); - return c.get>(); - } - fixed_bitstring<128>& ip_v6_address_r16() - { - assert_choice_type(types::ip_v6_address_r16, type_, "IAB-IP-Address-r16"); - return c.get>(); - } - fixed_bitstring<64>& ip_v6_prefix_r16() - { - assert_choice_type(types::ip_v6_prefix_r16, type_, "IAB-IP-Address-r16"); - return c.get>(); - } - const fixed_bitstring<32>& ip_v4_address_r16() const - { - assert_choice_type(types::ip_v4_address_r16, type_, "IAB-IP-Address-r16"); - return c.get>(); - } - const fixed_bitstring<128>& ip_v6_address_r16() const - { - assert_choice_type(types::ip_v6_address_r16, type_, "IAB-IP-Address-r16"); - return c.get>(); - } - const fixed_bitstring<64>& ip_v6_prefix_r16() const - { - assert_choice_type(types::ip_v6_prefix_r16, type_, "IAB-IP-Address-r16"); - return c.get>(); - } - fixed_bitstring<32>& set_ip_v4_address_r16(); - fixed_bitstring<128>& set_ip_v6_address_r16(); - fixed_bitstring<64>& set_ip_v6_prefix_r16(); - -private: - types type_; - choice_buffer_t> c; - - void destroy_(); -}; - -// MeasTriggerQuantity ::= CHOICE -struct meas_trigger_quant_c { - struct types_opts { - enum options { rsrp, rsrq, sinr, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::rsrp, type_, "MeasTriggerQuantity"); - return c.get(); - } - uint8_t& rsrq() - { - assert_choice_type(types::rsrq, type_, "MeasTriggerQuantity"); - return c.get(); - } - uint8_t& sinr() - { - assert_choice_type(types::sinr, type_, "MeasTriggerQuantity"); - return c.get(); - } - const uint8_t& rsrp() const - { - assert_choice_type(types::rsrp, type_, "MeasTriggerQuantity"); - return c.get(); - } - const uint8_t& rsrq() const - { - assert_choice_type(types::rsrq, type_, "MeasTriggerQuantity"); - return c.get(); - } - const uint8_t& sinr() const - { - assert_choice_type(types::sinr, type_, "MeasTriggerQuantity"); - return c.get(); - } - uint8_t& set_rsrp(); - uint8_t& set_rsrq(); - uint8_t& set_sinr(); - -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; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::rsrp, type_, "MeasTriggerQuantityOffset"); - return c.get(); - } - int8_t& rsrq() - { - assert_choice_type(types::rsrq, type_, "MeasTriggerQuantityOffset"); - return c.get(); - } - int8_t& sinr() - { - assert_choice_type(types::sinr, type_, "MeasTriggerQuantityOffset"); - return c.get(); - } - const int8_t& rsrp() const - { - assert_choice_type(types::rsrp, type_, "MeasTriggerQuantityOffset"); - return c.get(); - } - const int8_t& rsrq() const - { - assert_choice_type(types::rsrq, type_, "MeasTriggerQuantityOffset"); - return c.get(); - } - const int8_t& sinr() const - { - assert_choice_type(types::sinr, type_, "MeasTriggerQuantityOffset"); - return c.get(); - } - int8_t& set_rsrp(); - int8_t& set_rsrq(); - int8_t& set_sinr(); - -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; - - const char* to_string() const; -}; -using nr_rs_type_e = enumerated; - -// CGI-Info-Logging-r16 ::= SEQUENCE -struct cgi_info_logging_r16_s { - bool tac_r16_present = false; - plmn_id_s plmn_id_r16; - fixed_bitstring<36> cell_id_r16; - fixed_bitstring<24> tac_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CondTriggerConfig-r16 ::= SEQUENCE -struct cond_trigger_cfg_r16_s { - struct cond_event_id_c_ { - struct cond_event_a3_s_ { - meas_trigger_quant_offset_c a3_offset; - uint8_t hysteresis = 0; - time_to_trigger_e time_to_trigger; - }; - struct cond_event_a5_s_ { - meas_trigger_quant_c a5_thres1; - meas_trigger_quant_c a5_thres2; - uint8_t hysteresis = 0; - time_to_trigger_e time_to_trigger; - }; - struct cond_event_a4_r17_s_ { - meas_trigger_quant_c a4_thres_r17; - uint8_t hysteresis_r17 = 0; - time_to_trigger_e time_to_trigger_r17; - }; - struct cond_event_d1_r17_s_ { - uint16_t distance_thresh_from_ref1_r17 = 0; - uint16_t distance_thresh_from_ref2_r17 = 0; - dyn_octstring ref_location1_r17; - dyn_octstring ref_location2_r17; - uint16_t hysteresis_location_r17 = 0; - time_to_trigger_e time_to_trigger_r17; - }; - struct cond_event_t1_r17_s_ { - uint64_t t1_thres_r17 = 0; - uint16_t dur_r17 = 1; - }; - struct types_opts { - enum options { - cond_event_a3, - cond_event_a5, - /*...*/ cond_event_a4_r17, - cond_event_d1_r17, - cond_event_t1_r17, - nulltype - } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - cond_event_id_c_() = default; - cond_event_id_c_(const cond_event_id_c_& other); - cond_event_id_c_& operator=(const cond_event_id_c_& other); - ~cond_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 - cond_event_a3_s_& cond_event_a3() - { - assert_choice_type(types::cond_event_a3, type_, "condEventId"); - return c.get(); - } - cond_event_a5_s_& cond_event_a5() - { - assert_choice_type(types::cond_event_a5, type_, "condEventId"); - return c.get(); - } - cond_event_a4_r17_s_& cond_event_a4_r17() - { - assert_choice_type(types::cond_event_a4_r17, type_, "condEventId"); - return c.get(); - } - cond_event_d1_r17_s_& cond_event_d1_r17() - { - assert_choice_type(types::cond_event_d1_r17, type_, "condEventId"); - return c.get(); - } - cond_event_t1_r17_s_& cond_event_t1_r17() - { - assert_choice_type(types::cond_event_t1_r17, type_, "condEventId"); - return c.get(); - } - const cond_event_a3_s_& cond_event_a3() const - { - assert_choice_type(types::cond_event_a3, type_, "condEventId"); - return c.get(); - } - const cond_event_a5_s_& cond_event_a5() const - { - assert_choice_type(types::cond_event_a5, type_, "condEventId"); - return c.get(); - } - const cond_event_a4_r17_s_& cond_event_a4_r17() const - { - assert_choice_type(types::cond_event_a4_r17, type_, "condEventId"); - return c.get(); - } - const cond_event_d1_r17_s_& cond_event_d1_r17() const - { - assert_choice_type(types::cond_event_d1_r17, type_, "condEventId"); - return c.get(); - } - const cond_event_t1_r17_s_& cond_event_t1_r17() const - { - assert_choice_type(types::cond_event_t1_r17, type_, "condEventId"); - return c.get(); - } - cond_event_a3_s_& set_cond_event_a3(); - cond_event_a5_s_& set_cond_event_a5(); - cond_event_a4_r17_s_& set_cond_event_a4_r17(); - cond_event_d1_r17_s_& set_cond_event_d1_r17(); - cond_event_t1_r17_s_& set_cond_event_t1_r17(); - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - - // member variables - bool ext = false; - cond_event_id_c_ cond_event_id; - nr_rs_type_e rs_type_r16; - // ... - - // 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, utra_fdd_v1610, /*...*/ nulltype } value; - - const char* to_string() const; -}; -using rat_type_e = enumerated; - -// RxTxTimeDiff-r17 ::= SEQUENCE -struct rx_tx_time_diff_r17_s { - bool ext = false; - bool result_k5_r17_present = false; - uint16_t result_k5_r17 = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// TraceReference-r16 ::= SEQUENCE -struct trace_ref_r16_s { - plmn_id_s plmn_id_r16; - fixed_octstring<3> trace_id_r16; - - // 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; - - const char* to_string() const; -}; -using establishment_cause_e = enumerated; - -// InitialUE-Identity ::= CHOICE -struct init_ue_id_c { - struct types_opts { - enum options { ng_5_g_s_tmsi_part1, random_value, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using types = enumerated; - - // 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_5_g_s_tmsi_part1() - { - assert_choice_type(types::ng_5_g_s_tmsi_part1, type_, "InitialUE-Identity"); - return c.get>(); - } - fixed_bitstring<39>& random_value() - { - assert_choice_type(types::random_value, type_, "InitialUE-Identity"); - return c.get>(); - } - const fixed_bitstring<39>& ng_5_g_s_tmsi_part1() const - { - assert_choice_type(types::ng_5_g_s_tmsi_part1, type_, "InitialUE-Identity"); - return c.get>(); - } - const fixed_bitstring<39>& random_value() const - { - assert_choice_type(types::random_value, type_, "InitialUE-Identity"); - return c.get>(); - } - fixed_bitstring<39>& set_ng_5_g_s_tmsi_part1(); - fixed_bitstring<39>& set_random_value(); - -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; - - const char* to_string() const; -}; -using reest_cause_e = enumerated; - -// 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; - - const char* to_string() const; -}; -using resume_cause_e = enumerated; - -// RRC-PosSystemInfoRequest-r16-IEs ::= SEQUENCE -struct rrc_pos_sys_info_request_r16_ies_s { - fixed_bitstring<32> requested_pos_si_list; - fixed_bitstring<11> spare; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCReestablishmentRequest-IEs ::= SEQUENCE -struct rrc_reest_request_ies_s { - reestab_ue_id_s ue_id; - reest_cause_e reest_cause; - fixed_bitstring<1> spare; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCSetupRequest-IEs ::= SEQUENCE -struct rrc_setup_request_ies_s { - init_ue_id_c ue_id; - establishment_cause_e establishment_cause; - fixed_bitstring<1> spare; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCSystemInfoRequest-IEs ::= SEQUENCE -struct rrc_sys_info_request_ies_s { - fixed_bitstring<32> requested_si_list; - fixed_bitstring<12> spare; - - // 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 crit_exts_future_r16_c_ { - struct types_opts { - enum options { rrc_pos_sys_info_request_r16, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_future_r16_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 - rrc_pos_sys_info_request_r16_ies_s& rrc_pos_sys_info_request_r16() - { - assert_choice_type(types::rrc_pos_sys_info_request_r16, type_, "criticalExtensionsFuture-r16"); - return c; - } - const rrc_pos_sys_info_request_r16_ies_s& rrc_pos_sys_info_request_r16() const - { - assert_choice_type(types::rrc_pos_sys_info_request_r16, type_, "criticalExtensionsFuture-r16"); - return c; - } - rrc_pos_sys_info_request_r16_ies_s& set_rrc_pos_sys_info_request_r16(); - void set_crit_exts_future(); - - private: - types type_; - rrc_pos_sys_info_request_r16_ies_s c; - }; - struct types_opts { - enum options { rrc_sys_info_request, crit_exts_future_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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_sys_info_request_ies_s& rrc_sys_info_request() - { - assert_choice_type(types::rrc_sys_info_request, type_, "criticalExtensions"); - return c.get(); - } - crit_exts_future_r16_c_& crit_exts_future_r16() - { - assert_choice_type(types::crit_exts_future_r16, type_, "criticalExtensions"); - return c.get(); - } - const rrc_sys_info_request_ies_s& rrc_sys_info_request() const - { - assert_choice_type(types::rrc_sys_info_request, type_, "criticalExtensions"); - return c.get(); - } - const crit_exts_future_r16_c_& crit_exts_future_r16() const - { - assert_choice_type(types::crit_exts_future_r16, type_, "criticalExtensions"); - return c.get(); - } - rrc_sys_info_request_ies_s& set_rrc_sys_info_request(); - crit_exts_future_r16_c_& set_crit_exts_future_r16(); - - 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-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; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::rrc_setup_request, type_, "c1"); - return c.get(); - } - rrc_resume_request_s& rrc_resume_request() - { - assert_choice_type(types::rrc_resume_request, type_, "c1"); - return c.get(); - } - rrc_reest_request_s& rrc_reest_request() - { - assert_choice_type(types::rrc_reest_request, type_, "c1"); - return c.get(); - } - rrc_sys_info_request_s& rrc_sys_info_request() - { - assert_choice_type(types::rrc_sys_info_request, type_, "c1"); - return c.get(); - } - const rrc_setup_request_s& rrc_setup_request() const - { - assert_choice_type(types::rrc_setup_request, type_, "c1"); - return c.get(); - } - const rrc_resume_request_s& rrc_resume_request() const - { - assert_choice_type(types::rrc_resume_request, type_, "c1"); - return c.get(); - } - const rrc_reest_request_s& rrc_reest_request() const - { - assert_choice_type(types::rrc_reest_request, type_, "c1"); - return c.get(); - } - const rrc_sys_info_request_s& rrc_sys_info_request() const - { - assert_choice_type(types::rrc_sys_info_request, type_, "c1"); - return c.get(); - } - rrc_setup_request_s& set_rrc_setup_request(); - rrc_resume_request_s& set_rrc_resume_request(); - rrc_reest_request_s& set_rrc_reest_request(); - rrc_sys_info_request_s& set_rrc_sys_info_request(); - - 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - ul_ccch_msg_type_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 - c1_c_& c1() - { - assert_choice_type(types::c1, type_, "UL-CCCH-MessageType"); - return c; - } - const c1_c_& c1() const - { - assert_choice_type(types::c1, type_, "UL-CCCH-MessageType"); - return c; - } - c1_c_& set_c1(); - void set_msg_class_ext(); - -private: - types type_; - c1_c_ c; -}; - -// UL-CCCH-Message ::= SEQUENCE -struct ul_ccch_msg_s { - ul_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; -}; - } // namespace rrc_nr } // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/dl_dcch_msg.h b/include/srsran/asn1/rrc_nr/dl_dcch_msg.h index 49720bdd36..ecd4d7b844 100644 --- a/include/srsran/asn1/rrc_nr/dl_dcch_msg.h +++ b/include/srsran/asn1/rrc_nr/dl_dcch_msg.h @@ -16,6996 +16,28 @@ #pragma once -#include "msg_common.h" -#include "ue_cap.h" +#include "srsran/asn1/asn1_utils.h" namespace asn1 { namespace rrc_nr { -/******************************************************************************* - * Struct Definitions - ******************************************************************************/ - -// PCI-Range ::= SEQUENCE -struct pci_range_s { - struct range_opts { - enum options { - n4, - n8, - n12, - n16, - n24, - n32, - n48, - n64, - n84, - n96, - n128, - n168, - n252, - n504, - n1008, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using range_e_ = enumerated; - - // member variables - bool range_present = false; - uint16_t start = 0; - range_e_ range; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CellReselectionSubPriority ::= ENUMERATED -struct cell_resel_sub_prio_opts { - enum options { odot2, odot4, odot6, odot8, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; -}; -using cell_resel_sub_prio_e = enumerated; - -// EUTRA-Q-OffsetRange ::= ENUMERATED -struct eutra_q_offset_range_opts { - enum options { - db_neg24, - db_neg22, - db_neg20, - db_neg18, - db_neg16, - db_neg14, - db_neg12, - db_neg10, - db_neg8, - db_neg6, - db_neg5, - db_neg4, - db_neg3, - db_neg2, - db_neg1, - db0, - db1, - db2, - db3, - db4, - db5, - db6, - db8, - db10, - db12, - db14, - db16, - db18, - db20, - db22, - db24, - nulltype - } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; -}; -using eutra_q_offset_range_e = enumerated; - -// NSAG-IdentityInfo-r17 ::= SEQUENCE -struct nsag_id_info_r17_s { - bool tac_r17_present = false; - fixed_bitstring<8> nsag_id_r17; - fixed_bitstring<24> tac_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// Orbital-r17 ::= SEQUENCE -struct orbital_r17_s { - uint64_t semi_major_axis_r17 = 0; - uint32_t eccentricity_r17 = 0; - uint32_t periapsis_r17 = 0; - uint32_t longitude_r17 = 0; - int32_t inclination_r17 = -67108864; - uint32_t mean_anomaly_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PositionVelocity-r17 ::= SEQUENCE -struct position_velocity_r17_s { - int32_t position_x_r17 = -33554432; - int32_t position_y_r17 = -33554432; - int32_t position_z_r17 = -33554432; - int32_t velocity_vx_r17 = -131072; - int32_t velocity_vy_r17 = -131072; - int32_t velocity_vz_r17 = -131072; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// Q-OffsetRange ::= ENUMERATED -struct q_offset_range_opts { - enum options { - db_neg24, - db_neg22, - db_neg20, - db_neg18, - db_neg16, - db_neg14, - db_neg12, - db_neg10, - db_neg8, - db_neg6, - db_neg5, - db_neg4, - db_neg3, - db_neg2, - db_neg1, - db0, - db1, - db2, - db3, - db4, - db5, - db6, - db8, - db10, - db12, - db14, - db16, - db18, - db20, - db22, - db24, - nulltype - } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; -}; -using q_offset_range_e = enumerated; - -// SSB-PositionQCL-Relation-r16 ::= ENUMERATED -struct ssb_position_qcl_relation_r16_opts { - enum options { n1, n2, n4, n8, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; -}; -using ssb_position_qcl_relation_r16_e = enumerated; - -// SSB-PositionQCL-Relation-r17 ::= ENUMERATED -struct ssb_position_qcl_relation_r17_opts { - enum options { n32, n64, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; -}; -using ssb_position_qcl_relation_r17_e = enumerated; - -// EUTRA-PhysCellIdRange ::= SEQUENCE -struct eutra_pci_range_s { - struct range_opts { - enum options { - n4, - n8, - n12, - n16, - n24, - n32, - n48, - n64, - n84, - n96, - n128, - n168, - n252, - n504, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using range_e_ = enumerated; - - // member variables - bool range_present = false; - uint16_t start = 0; - range_e_ range; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// EphemerisInfo-r17 ::= CHOICE -struct ephemeris_info_r17_c { - struct types_opts { - enum options { position_velocity_r17, orbital_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - ephemeris_info_r17_c() = default; - ephemeris_info_r17_c(const ephemeris_info_r17_c& other); - ephemeris_info_r17_c& operator=(const ephemeris_info_r17_c& other); - ~ephemeris_info_r17_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 - position_velocity_r17_s& position_velocity_r17() - { - assert_choice_type(types::position_velocity_r17, type_, "EphemerisInfo-r17"); - return c.get(); - } - orbital_r17_s& orbital_r17() - { - assert_choice_type(types::orbital_r17, type_, "EphemerisInfo-r17"); - return c.get(); - } - const position_velocity_r17_s& position_velocity_r17() const - { - assert_choice_type(types::position_velocity_r17, type_, "EphemerisInfo-r17"); - return c.get(); - } - const orbital_r17_s& orbital_r17() const - { - assert_choice_type(types::orbital_r17, type_, "EphemerisInfo-r17"); - return c.get(); - } - position_velocity_r17_s& set_position_velocity_r17(); - orbital_r17_s& set_orbital_r17(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// EpochTime-r17 ::= SEQUENCE -struct epoch_time_r17_s { - uint16_t sfn_r17 = 0; - uint8_t sub_frame_nr_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SSB-MTC4-r17 ::= SEQUENCE -struct ssb_mtc4_r17_s { - using pci_list_r17_l_ = dyn_array; - - // member variables - pci_list_r17_l_ pci_list_r17; - uint8_t offset_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BeamMeasConfigIdle-NR-r16 ::= SEQUENCE -struct beam_meas_cfg_idle_nr_r16_s { - struct report_quant_rs_idxes_r16_opts { - enum options { rsrp, rsrq, both, nulltype } value; - - const char* to_string() const; - }; - using report_quant_rs_idxes_r16_e_ = enumerated; - - // member variables - report_quant_rs_idxes_r16_e_ report_quant_rs_idxes_r16; - uint8_t max_nrof_rs_idxes_to_report_r16 = 1; - bool include_beam_meass_r16 = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CellListEUTRA-r16 ::= SEQUENCE (SIZE (1..8)) OF EUTRA-PhysCellIdRange -using cell_list_eutra_r16_l = dyn_array; - -// CellListNR-r16 ::= SEQUENCE (SIZE (1..8)) OF PCI-Range -using cell_list_nr_r16_l = dyn_array; - -// EUTRA-AllowedMeasBandwidth ::= ENUMERATED -struct eutra_allowed_meas_bw_opts { - enum options { mbw6, mbw15, mbw25, mbw50, mbw75, mbw100, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; -}; -using eutra_allowed_meas_bw_e = enumerated; - -// SS-RSSI-Measurement ::= SEQUENCE -struct ss_rssi_meas_s { - bounded_bitstring<1, 80> meas_slots; - uint8_t end_symbol = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SSB-MTC ::= SEQUENCE -struct ssb_mtc_s { - struct periodicity_and_offset_c_ { - struct types_opts { - enum options { sf5, sf10, sf20, sf40, sf80, sf160, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // 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 - uint8_t& sf5() - { - assert_choice_type(types::sf5, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sf10() - { - assert_choice_type(types::sf10, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sf20() - { - assert_choice_type(types::sf20, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sf40() - { - assert_choice_type(types::sf40, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sf80() - { - assert_choice_type(types::sf80, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sf160() - { - assert_choice_type(types::sf160, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sf5() const - { - assert_choice_type(types::sf5, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sf10() const - { - assert_choice_type(types::sf10, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sf20() const - { - assert_choice_type(types::sf20, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sf40() const - { - assert_choice_type(types::sf40, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sf80() const - { - assert_choice_type(types::sf80, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sf160() const - { - assert_choice_type(types::sf160, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& set_sf5(); - uint8_t& set_sf10(); - uint8_t& set_sf20(); - uint8_t& set_sf40(); - uint8_t& set_sf80(); - uint8_t& set_sf160(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct dur_opts { - enum options { sf1, sf2, sf3, sf4, sf5, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using dur_e_ = enumerated; - - // member variables - periodicity_and_offset_c_ periodicity_and_offset; - dur_e_ dur; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SSB-MTC4List-r17 ::= SEQUENCE (SIZE (1..3)) OF SSB-MTC4-r17 -using ssb_mtc4_list_r17_l = dyn_array; - -// SSB-ToMeasure ::= CHOICE -struct ssb_to_measure_c { - struct types_opts { - enum options { short_bitmap, medium_bitmap, long_bitmap, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - ssb_to_measure_c() = default; - ssb_to_measure_c(const ssb_to_measure_c& other); - ssb_to_measure_c& operator=(const ssb_to_measure_c& other); - ~ssb_to_measure_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(types::short_bitmap, type_, "SSB-ToMeasure"); - return c.get>(); - } - fixed_bitstring<8>& medium_bitmap() - { - assert_choice_type(types::medium_bitmap, type_, "SSB-ToMeasure"); - return c.get>(); - } - fixed_bitstring<64>& long_bitmap() - { - assert_choice_type(types::long_bitmap, type_, "SSB-ToMeasure"); - return c.get>(); - } - const fixed_bitstring<4>& short_bitmap() const - { - assert_choice_type(types::short_bitmap, type_, "SSB-ToMeasure"); - return c.get>(); - } - const fixed_bitstring<8>& medium_bitmap() const - { - assert_choice_type(types::medium_bitmap, type_, "SSB-ToMeasure"); - return c.get>(); - } - const fixed_bitstring<64>& long_bitmap() const - { - assert_choice_type(types::long_bitmap, type_, "SSB-ToMeasure"); - return c.get>(); - } - fixed_bitstring<4>& set_short_bitmap(); - fixed_bitstring<8>& set_medium_bitmap(); - fixed_bitstring<64>& set_long_bitmap(); - -private: - types type_; - choice_buffer_t> c; - - void destroy_(); -}; - -// ThresholdNR ::= SEQUENCE -struct thres_nr_s { - bool thres_rsrp_present = false; - bool thres_rsrq_present = false; - bool thres_sinr_present = false; - uint8_t thres_rsrp = 0; - uint8_t thres_rsrq = 0; - uint8_t thres_sinr = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasIdleCarrierEUTRA-r16 ::= SEQUENCE -struct meas_idle_carrier_eutra_r16_s { - struct report_quantities_eutra_r16_opts { - enum options { rsrp, rsrq, both, nulltype } value; - - const char* to_string() const; - }; - using report_quantities_eutra_r16_e_ = enumerated; - struct quality_thres_eutra_r16_s_ { - bool idle_rsrp_thres_eutra_r16_present = false; - bool idle_rsrq_thres_eutra_r16_present = false; - uint8_t idle_rsrp_thres_eutra_r16 = 0; - int8_t idle_rsrq_thres_eutra_r16 = -30; - }; - - // member variables - bool ext = false; - bool quality_thres_eutra_r16_present = false; - uint32_t carrier_freq_eutra_r16 = 0; - eutra_allowed_meas_bw_e allowed_meas_bw_r16; - cell_list_eutra_r16_l meas_cell_list_eutra_r16; - report_quantities_eutra_r16_e_ report_quantities_eutra_r16; - quality_thres_eutra_r16_s_ quality_thres_eutra_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasIdleCarrierNR-r16 ::= SEQUENCE -struct meas_idle_carrier_nr_r16_s { - struct report_quantities_r16_opts { - enum options { rsrp, rsrq, both, nulltype } value; - - const char* to_string() const; - }; - using report_quantities_r16_e_ = enumerated; - struct quality_thres_r16_s_ { - bool idle_rsrp_thres_nr_r16_present = false; - bool idle_rsrq_thres_nr_r16_present = false; - uint8_t idle_rsrp_thres_nr_r16 = 0; - uint8_t idle_rsrq_thres_nr_r16 = 0; - }; - struct ssb_meas_cfg_r16_s_ { - bool nrof_ss_blocks_to_average_r16_present = false; - bool abs_thresh_ss_blocks_consolidation_r16_present = false; - bool smtc_r16_present = false; - bool ssb_to_measure_r16_present = false; - bool ss_rssi_meas_r16_present = false; - uint8_t nrof_ss_blocks_to_average_r16 = 2; - thres_nr_s abs_thresh_ss_blocks_consolidation_r16; - ssb_mtc_s smtc_r16; - ssb_to_measure_c ssb_to_measure_r16; - bool derive_ssb_idx_from_cell_r16 = false; - ss_rssi_meas_s ss_rssi_meas_r16; - }; - - // member variables - bool ext = false; - bool quality_thres_r16_present = false; - bool ssb_meas_cfg_r16_present = false; - bool beam_meas_cfg_idle_r16_present = false; - uint32_t carrier_freq_r16 = 0; - subcarrier_spacing_e ssb_subcarrier_spacing_r16; - multi_freq_band_list_nr_l freq_band_list; - cell_list_nr_r16_l meas_cell_list_nr_r16; - report_quantities_r16_e_ report_quantities_r16; - quality_thres_r16_s_ quality_thres_r16; - ssb_meas_cfg_r16_s_ ssb_meas_cfg_r16; - beam_meas_cfg_idle_nr_r16_s beam_meas_cfg_idle_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ReferenceTime-r16 ::= SEQUENCE -struct ref_time_r16_s { - uint32_t ref_days_r16 = 0; - uint32_t ref_seconds_r16 = 0; - uint16_t ref_milli_seconds_r16 = 0; - uint32_t ref_ten_nano_seconds_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ReferenceTimeInfo-r16 ::= SEQUENCE -struct ref_time_info_r16_s { - bool uncertainty_r16_present = false; - bool time_info_type_r16_present = false; - bool ref_sfn_r16_present = false; - ref_time_r16_s time_r16; - uint16_t uncertainty_r16 = 0; - uint16_t ref_sfn_r16 = 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-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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // 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(types::ms4, type_, "slotConfig"); - return c.get(); - } - uint8_t& ms5() - { - assert_choice_type(types::ms5, type_, "slotConfig"); - return c.get(); - } - uint8_t& ms10() - { - assert_choice_type(types::ms10, type_, "slotConfig"); - return c.get(); - } - uint8_t& ms20() - { - assert_choice_type(types::ms20, type_, "slotConfig"); - return c.get(); - } - uint16_t& ms40() - { - assert_choice_type(types::ms40, type_, "slotConfig"); - return c.get(); - } - const uint8_t& ms4() const - { - assert_choice_type(types::ms4, type_, "slotConfig"); - return c.get(); - } - const uint8_t& ms5() const - { - assert_choice_type(types::ms5, type_, "slotConfig"); - return c.get(); - } - const uint8_t& ms10() const - { - assert_choice_type(types::ms10, type_, "slotConfig"); - return c.get(); - } - const uint8_t& ms20() const - { - assert_choice_type(types::ms20, type_, "slotConfig"); - return c.get(); - } - const uint16_t& ms40() const - { - assert_choice_type(types::ms40, type_, "slotConfig"); - return c.get(); - } - uint8_t& set_ms4(); - uint8_t& set_ms5(); - uint8_t& set_ms10(); - uint8_t& set_ms20(); - uint16_t& set_ms40(); - - 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // 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(types::row1, type_, "frequencyDomainAllocation"); - return c.get>(); - } - fixed_bitstring<12>& row2() - { - assert_choice_type(types::row2, type_, "frequencyDomainAllocation"); - return c.get>(); - } - const fixed_bitstring<4>& row1() const - { - assert_choice_type(types::row1, type_, "frequencyDomainAllocation"); - return c.get>(); - } - const fixed_bitstring<12>& row2() const - { - assert_choice_type(types::row2, type_, "frequencyDomainAllocation"); - return c.get>(); - } - fixed_bitstring<4>& set_row1(); - fixed_bitstring<12>& set_row2(); - - private: - types type_; - choice_buffer_t> c; - - void destroy_(); - }; - struct slot_cfg_r17_c_ { - struct types_opts { - enum options { ms4, ms5, ms10, ms20, ms40, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - slot_cfg_r17_c_() = default; - slot_cfg_r17_c_(const slot_cfg_r17_c_& other); - slot_cfg_r17_c_& operator=(const slot_cfg_r17_c_& other); - ~slot_cfg_r17_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& ms4() - { - assert_choice_type(types::ms4, type_, "slotConfig-r17"); - return c.get(); - } - uint16_t& ms5() - { - assert_choice_type(types::ms5, type_, "slotConfig-r17"); - return c.get(); - } - uint16_t& ms10() - { - assert_choice_type(types::ms10, type_, "slotConfig-r17"); - return c.get(); - } - uint16_t& ms20() - { - assert_choice_type(types::ms20, type_, "slotConfig-r17"); - return c.get(); - } - uint16_t& ms40() - { - assert_choice_type(types::ms40, type_, "slotConfig-r17"); - return c.get(); - } - const uint16_t& ms4() const - { - assert_choice_type(types::ms4, type_, "slotConfig-r17"); - return c.get(); - } - const uint16_t& ms5() const - { - assert_choice_type(types::ms5, type_, "slotConfig-r17"); - return c.get(); - } - const uint16_t& ms10() const - { - assert_choice_type(types::ms10, type_, "slotConfig-r17"); - return c.get(); - } - const uint16_t& ms20() const - { - assert_choice_type(types::ms20, type_, "slotConfig-r17"); - return c.get(); - } - const uint16_t& ms40() const - { - assert_choice_type(types::ms40, type_, "slotConfig-r17"); - return c.get(); - } - uint16_t& set_ms4(); - uint16_t& set_ms5(); - uint16_t& set_ms10(); - uint16_t& set_ms20(); - uint16_t& set_ms40(); - - private: - types type_; - pod_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; - // ... - // group 0 - copy_ptr slot_cfg_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeighbourCellInfo-r17 ::= SEQUENCE -struct neighbour_cell_info_r17_s { - epoch_time_r17_s epoch_time_r17; - ephemeris_info_r17_c ephemeris_info_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RAN-VisibleParameters-r17 ::= SEQUENCE -struct ran_visible_params_r17_s { - struct ran_visible_periodicity_r17_opts { - enum options { ms120, ms240, ms480, ms640, ms1024, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using ran_visible_periodicity_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool ran_visible_periodicity_r17_present = false; - bool nof_buffer_level_entries_r17_present = false; - bool report_playout_delay_for_media_startup_r17_present = false; - ran_visible_periodicity_r17_e_ ran_visible_periodicity_r17; - uint8_t nof_buffer_level_entries_r17 = 1; - bool report_playout_delay_for_media_startup_r17 = false; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RSSI-PeriodicityAndOffset-r16 ::= CHOICE -struct rssi_periodicity_and_offset_r16_c { - struct types_opts { - enum options { sl10, sl20, sl40, sl80, sl160, sl320, s1640, /*...*/ nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - rssi_periodicity_and_offset_r16_c() = default; - rssi_periodicity_and_offset_r16_c(const rssi_periodicity_and_offset_r16_c& other); - rssi_periodicity_and_offset_r16_c& operator=(const rssi_periodicity_and_offset_r16_c& other); - ~rssi_periodicity_and_offset_r16_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& sl10() - { - assert_choice_type(types::sl10, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - uint8_t& sl20() - { - assert_choice_type(types::sl20, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - uint8_t& sl40() - { - assert_choice_type(types::sl40, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - uint8_t& sl80() - { - assert_choice_type(types::sl80, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - uint8_t& sl160() - { - assert_choice_type(types::sl160, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - uint16_t& sl320() - { - assert_choice_type(types::sl320, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - uint16_t& s1640() - { - assert_choice_type(types::s1640, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - const uint8_t& sl10() const - { - assert_choice_type(types::sl10, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - const uint8_t& sl20() const - { - assert_choice_type(types::sl20, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - const uint8_t& sl40() const - { - assert_choice_type(types::sl40, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - const uint8_t& sl80() const - { - assert_choice_type(types::sl80, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - const uint8_t& sl160() const - { - assert_choice_type(types::sl160, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - const uint16_t& sl320() const - { - assert_choice_type(types::sl320, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - const uint16_t& s1640() const - { - assert_choice_type(types::s1640, type_, "RSSI-PeriodicityAndOffset-r16"); - return c.get(); - } - uint8_t& set_sl10(); - uint8_t& set_sl20(); - uint8_t& set_sl40(); - uint8_t& set_sl80(); - uint8_t& set_sl160(); - uint16_t& set_sl320(); - uint16_t& set_s1640(); - -private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); -}; - -// SSB-PositionQCL-Cell-r17 ::= SEQUENCE -struct ssb_position_qcl_cell_r17_s { - uint16_t pci_r17 = 0; - ssb_position_qcl_relation_r17_e ssb_position_qcl_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SSB-PositionQCL-CellsToAddMod-r16 ::= SEQUENCE -struct ssb_position_qcl_cells_to_add_mod_r16_s { - uint16_t pci_r16 = 0; - ssb_position_qcl_relation_r16_e ssb_position_qcl_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BFD-RelaxationReportingConfig-r17 ::= SEQUENCE -struct bfd_relaxation_report_cfg_r17_s { - struct bfd_relaxtion_report_prohibit_timer_opts { - enum options { - s0, - s0dot5, - s1, - s2, - s5, - s10, - s20, - s30, - s60, - s90, - s120, - s300, - s600, - infinity, - spare2, - spare1, - nulltype - } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using bfd_relaxtion_report_prohibit_timer_e_ = enumerated; - - // member variables - bfd_relaxtion_report_prohibit_timer_e_ bfd_relaxtion_report_prohibit_timer; - - // 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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using nrof_prbs_e_ = enumerated; - - // 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using density_e_ = enumerated; - using csi_rs_res_list_mob_l_ = dyn_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; -}; - -// CandidateServingFreqListNR-r16 ::= SEQUENCE (SIZE (1..128)) OF INTEGER (0..3279165) -using candidate_serving_freq_list_nr_r16_l = dyn_array; - -// CondReconfigToAddMod-r16 ::= SEQUENCE -struct cond_recfg_to_add_mod_r16_s { - using cond_execution_cond_r16_l_ = bounded_array; - - // member variables - bool ext = false; - uint8_t cond_recfg_id_r16 = 1; - cond_execution_cond_r16_l_ cond_execution_cond_r16; - dyn_octstring cond_rrc_recfg_r16; - // ... - // group 0 - dyn_octstring cond_execution_cond_scg_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ExcessDelay-DRB-IdentityInfo-r17 ::= SEQUENCE -struct excess_delay_drb_id_info_r17_s { - using drb_id_list_l_ = bounded_array; - struct delay_thres_opts { - enum options { - ms0dot25, - ms0dot5, - ms1, - ms2, - ms4, - ms5, - ms10, - ms20, - ms30, - ms40, - ms50, - ms60, - ms70, - ms80, - ms90, - ms100, - ms150, - ms300, - ms500, - nulltype - } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using delay_thres_e_ = enumerated; - - // member variables - drb_id_list_l_ drb_id_list; - delay_thres_e_ delay_thres; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// IAB-IP-Usage-r16 ::= ENUMERATED -struct iab_ip_usage_r16_opts { - enum options { f1_c, f1_u, non_f1, spare, nulltype } value; - - const char* to_string() const; -}; -using iab_ip_usage_r16_e = enumerated; - -// MUSIM-Gap-r17 ::= SEQUENCE -struct mu_si_m_gap_r17_s { - uint8_t musim_gap_id_r17 = 0; - mu_si_m_gap_info_r17_s musim_gap_info_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MUSIM-GapAssistanceConfig-r17 ::= SEQUENCE -struct mu_si_m_gap_assist_cfg_r17_s { - struct musim_gap_prohibit_timer_r17_opts { - enum options { - s0, - s0dot1, - s0dot2, - s0dot3, - s0dot4, - s0dot5, - s1, - s2, - s3, - s4, - s5, - s6, - s7, - s8, - s9, - s10, - nulltype - } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using musim_gap_prohibit_timer_r17_e_ = enumerated; - - // member variables - musim_gap_prohibit_timer_r17_e_ musim_gap_prohibit_timer_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MUSIM-LeaveAssistanceConfig-r17 ::= SEQUENCE -struct mu_si_m_leave_assist_cfg_r17_s { - struct musim_leave_without_resp_timer_r17_opts { - enum options { ms10, ms20, ms40, ms60, ms80, ms100, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using musim_leave_without_resp_timer_r17_e_ = enumerated; - - // member variables - musim_leave_without_resp_timer_r17_e_ musim_leave_without_resp_timer_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasConfigAppLayer-r17 ::= SEQUENCE -struct meas_cfg_app_layer_r17_s { - struct service_type_r17_opts { - enum options { streaming, mtsi, vr, spare5, spare4, spare3, spare2, spare1, nulltype } value; - - const char* to_string() const; - }; - using service_type_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool service_type_r17_present = false; - bool pause_report_r17_present = false; - bool tx_of_session_start_stop_r17_present = false; - bool ran_visible_params_r17_present = false; - uint8_t meas_cfg_app_layer_id_r17 = 0; - bounded_octstring<1, 8000> meas_cfg_app_layer_container_r17; - service_type_r17_e_ service_type_r17; - bool pause_report_r17 = false; - bool tx_of_session_start_stop_r17 = false; - setup_release_c ran_visible_params_r17; - // ... - - // 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; - -// PropDelayDiffReportConfig-r17 ::= SEQUENCE -struct prop_delay_diff_report_cfg_r17_s { - struct thresh_prop_delay_diff_r17_opts { - enum options { - ms0dot5, - ms1, - ms2, - ms3, - ms4, - ms5, - ms6, - ms7, - ms8, - ms9, - ms10, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using thresh_prop_delay_diff_r17_e_ = enumerated; - using neigh_cell_info_list_r17_l_ = dyn_array; - - // member variables - bool thresh_prop_delay_diff_r17_present = false; - thresh_prop_delay_diff_r17_e_ thresh_prop_delay_diff_r17; - neigh_cell_info_list_r17_l_ neigh_cell_info_list_r17; - - // 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RLM-RelaxationReportingConfig-r17 ::= SEQUENCE -struct rlm_relaxation_report_cfg_r17_s { - struct rlm_relaxtion_report_prohibit_timer_opts { - enum options { - s0, - s0dot5, - s1, - s2, - s5, - s10, - s20, - s30, - s60, - s90, - s120, - s300, - s600, - infinity, - spare2, - spare1, - nulltype - } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using rlm_relaxtion_report_prohibit_timer_e_ = enumerated; - - // member variables - rlm_relaxtion_report_prohibit_timer_e_ rlm_relaxtion_report_prohibit_timer; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRM-MeasRelaxationReportingConfig-r17 ::= SEQUENCE -struct rrm_meas_relaxation_report_cfg_r17_s { - struct s_search_delta_p_stationary_r17_opts { - enum options { db2, db3, db6, db9, db12, db15, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using s_search_delta_p_stationary_r17_e_ = enumerated; - struct t_search_delta_p_stationary_r17_opts { - enum options { - s5, - s10, - s20, - s30, - s60, - s120, - s180, - s240, - s300, - spare7, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t_search_delta_p_stationary_r17_e_ = enumerated; - - // member variables - s_search_delta_p_stationary_r17_e_ s_search_delta_p_stationary_r17; - t_search_delta_p_stationary_r17_e_ t_search_delta_p_stationary_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RSSI-ResourceConfigCLI-r16 ::= SEQUENCE -struct rssi_res_cfg_cli_r16_s { - bool ext = false; - bool ref_serv_cell_idx_r16_present = false; - uint8_t rssi_res_id_r16 = 0; - subcarrier_spacing_e rssi_scs_r16; - uint16_t start_prb_r16 = 0; - uint16_t nrof_prbs_r16 = 4; - uint8_t start_position_r16 = 0; - uint8_t nrof_symbols_r16 = 1; - rssi_periodicity_and_offset_r16_c rssi_periodicity_and_offset_r16; - uint8_t ref_serv_cell_idx_r16 = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SCG-DeactivationPreferenceConfig-r17 ::= SEQUENCE -struct scg_deactivation_pref_cfg_r17_s { - struct scg_deactivation_pref_prohibit_timer_r17_opts { - enum options { s0, s1, s2, s4, s8, s10, s15, s30, s60, s120, s180, s240, s300, s600, s900, s1800, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using scg_deactivation_pref_prohibit_timer_r17_e_ = enumerated; - - // member variables - scg_deactivation_pref_prohibit_timer_r17_e_ scg_deactivation_pref_prohibit_timer_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-RemoteUE-ToAddMod-r17 ::= SEQUENCE -struct sl_remote_ue_to_add_mod_r17_s { - bool ext = false; - bool sl_srap_cfg_relay_r17_present = false; - fixed_bitstring<24> sl_l2_id_remote_r17; - sl_srap_cfg_r17_s sl_srap_cfg_relay_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SRS-ResourceConfigCLI-r16 ::= SEQUENCE -struct srs_res_cfg_cli_r16_s { - bool ext = false; - bool ref_serv_cell_idx_r16_present = false; - srs_res_s srs_res_r16; - subcarrier_spacing_e srs_scs_r16; - uint8_t ref_serv_cell_idx_r16 = 0; - uint8_t ref_bwp_r16 = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SSB-PositionQCL-CellList-r17 ::= SEQUENCE (SIZE (1..32)) OF SSB-PositionQCL-Cell-r17 -using ssb_position_qcl_cell_list_r17_l = dyn_array; - -// SSB-PositionQCL-CellsToAddModList-r16 ::= SEQUENCE (SIZE (1..32)) OF SSB-PositionQCL-CellsToAddMod-r16 -using ssb_position_qcl_cells_to_add_mod_list_r16_l = dyn_array; - -// SuccessHO-Config-r17 ::= SEQUENCE -struct success_ho_cfg_r17_s { - struct thres_percentage_t304_r17_opts { - enum options { p40, p60, p80, spare5, spare4, spare3, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using thres_percentage_t304_r17_e_ = enumerated; - struct thres_percentage_t310_r17_opts { - enum options { p40, p60, p80, spare5, spare4, spare3, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using thres_percentage_t310_r17_e_ = enumerated; - struct thres_percentage_t312_r17_opts { - enum options { p20, p40, p60, p80, spare4, spare3, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using thres_percentage_t312_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool thres_percentage_t304_r17_present = false; - bool thres_percentage_t310_r17_present = false; - bool thres_percentage_t312_r17_present = false; - bool source_daps_fail_report_r17_present = false; - thres_percentage_t304_r17_e_ thres_percentage_t304_r17; - thres_percentage_t310_r17_e_ thres_percentage_t310_r17; - thres_percentage_t312_r17_e_ thres_percentage_t312_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AppLayerMeasConfig-r17 ::= SEQUENCE -struct app_layer_meas_cfg_r17_s { - using meas_cfg_app_layer_to_add_mod_list_r17_l_ = dyn_array; - using meas_cfg_app_layer_to_release_list_r17_l_ = bounded_array; - - // member variables - bool ext = false; - bool rrc_seg_allowed_r17_present = false; - meas_cfg_app_layer_to_add_mod_list_r17_l_ meas_cfg_app_layer_to_add_mod_list_r17; - meas_cfg_app_layer_to_release_list_r17_l_ meas_cfg_app_layer_to_release_list_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BAP-RoutingID-r16 ::= SEQUENCE -struct bap_routing_id_r16_s { - fixed_bitstring<10> bap_address_r16; - fixed_bitstring<10> bap_path_id_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BT-NameList-r16 ::= SEQUENCE (SIZE (1..4)) OF OCTET STRING (SIZE (1..248)) -using bt_name_list_r16_l = bounded_array, 4>; - -// 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; - 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; - SRSASN_CODE unpack(cbit_ref& bref); - 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; -}; - -// CellsToAddModExt-v1710 ::= SEQUENCE -struct cells_to_add_mod_ext_v1710_s { - struct ntn_polarization_dl_r17_opts { - enum options { rhcp, lhcp, linear, nulltype } value; - - const char* to_string() const; - }; - using ntn_polarization_dl_r17_e_ = enumerated; - struct ntn_polarization_ul_r17_opts { - enum options { rhcp, lhcp, linear, nulltype } value; - - const char* to_string() const; - }; - using ntn_polarization_ul_r17_e_ = enumerated; - - // member variables - bool ntn_polarization_dl_r17_present = false; - bool ntn_polarization_ul_r17_present = false; - ntn_polarization_dl_r17_e_ ntn_polarization_dl_r17; - ntn_polarization_ul_r17_e_ ntn_polarization_ul_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CellsToAddModUTRA-FDD-r16 ::= SEQUENCE -struct cells_to_add_mod_utra_fdd_r16_s { - uint8_t cell_idx_utra_fdd_r16 = 1; - uint16_t pci_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CondReconfigToAddModList-r16 ::= SEQUENCE (SIZE (1..8)) OF CondReconfigToAddMod-r16 -using cond_recfg_to_add_mod_list_r16_l = dyn_array; - -// CondReconfigToRemoveList-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..8) -using cond_recfg_to_rem_list_r16_l = bounded_array; - -// DRX-PreferenceConfig-r16 ::= SEQUENCE -struct drx_pref_cfg_r16_s { - struct drx_pref_prohibit_timer_r16_opts { - enum options { s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s20, s30, spare2, spare1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using drx_pref_prohibit_timer_r16_e_ = enumerated; - - // member variables - drx_pref_prohibit_timer_r16_e_ drx_pref_prohibit_timer_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// IAB-IP-AddressConfiguration-r16 ::= SEQUENCE -struct iab_ip_address_cfg_r16_s { - bool ext = false; - bool iab_ip_address_r16_present = false; - bool iab_ip_usage_r16_present = false; - bool iab_donor_du_bap_address_r16_present = false; - uint8_t iab_ip_address_idx_r16 = 1; - iab_ip_address_r16_c iab_ip_address_r16; - iab_ip_usage_r16_e iab_ip_usage_r16; - fixed_bitstring<10> iab_donor_du_bap_address_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// IDC-AssistanceConfig-r16 ::= SEQUENCE -struct idc_assist_cfg_r16_s { - bool ext = false; - candidate_serving_freq_list_nr_r16_l candidate_serving_freq_list_nr_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MUSIM-GapConfig-r17 ::= SEQUENCE -struct mu_si_m_gap_cfg_r17_s { - using musim_gap_to_release_list_r17_l_ = bounded_array; - using musim_gap_to_add_mod_list_r17_l_ = dyn_array; - - // member variables - bool ext = false; - bool musim_aperiodic_gap_r17_present = false; - musim_gap_to_release_list_r17_l_ musim_gap_to_release_list_r17; - musim_gap_to_add_mod_list_r17_l_ musim_gap_to_add_mod_list_r17; - mu_si_m_gap_info_r17_s musim_aperiodic_gap_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MaxBW-PreferenceConfig-r16 ::= SEQUENCE -struct max_bw_pref_cfg_r16_s { - struct max_bw_pref_prohibit_timer_r16_opts { - enum options { s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s20, s30, spare2, spare1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using max_bw_pref_prohibit_timer_r16_e_ = enumerated; - - // member variables - max_bw_pref_prohibit_timer_r16_e_ max_bw_pref_prohibit_timer_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MaxCC-PreferenceConfig-r16 ::= SEQUENCE -struct max_cc_pref_cfg_r16_s { - struct max_cc_pref_prohibit_timer_r16_opts { - enum options { s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s20, s30, spare2, spare1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using max_cc_pref_prohibit_timer_r16_e_ = enumerated; - - // member variables - max_cc_pref_prohibit_timer_r16_e_ max_cc_pref_prohibit_timer_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MaxMIMO-LayerPreferenceConfig-r16 ::= SEQUENCE -struct max_mimo_layer_pref_cfg_r16_s { - struct max_mimo_layer_pref_prohibit_timer_r16_opts { - enum options { s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s20, s30, spare2, spare1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using max_mimo_layer_pref_prohibit_timer_r16_e_ = enumerated; - - // member variables - max_mimo_layer_pref_prohibit_timer_r16_e_ max_mimo_layer_pref_prohibit_timer_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasRSSI-ReportConfig-r16 ::= SEQUENCE -struct meas_rssi_report_cfg_r16_s { - bool ch_occupancy_thres_r16_present = false; - uint8_t ch_occupancy_thres_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; -}; - -// MeasReportQuantity-r16 ::= SEQUENCE -struct meas_report_quant_r16_s { - bool ext = false; - bool cbr_r16 = false; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasReportQuantityCLI-r16 ::= ENUMERATED -struct meas_report_quant_cli_r16_opts { - enum options { srs_rsrp, cli_rssi, nulltype } value; - - const char* to_string() const; -}; -using meas_report_quant_cli_r16_e = enumerated; - -// MeasReportQuantityUTRA-FDD-r16 ::= SEQUENCE -struct meas_report_quant_utra_fdd_r16_s { - bool cpich_rs_cp = false; - bool cpich_ec_n0 = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasTriggerQuantityCLI-r16 ::= CHOICE -struct meas_trigger_quant_cli_r16_c { - struct types_opts { - enum options { srs_rsrp_r16, cli_rssi_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - meas_trigger_quant_cli_r16_c() = default; - meas_trigger_quant_cli_r16_c(const meas_trigger_quant_cli_r16_c& other); - meas_trigger_quant_cli_r16_c& operator=(const meas_trigger_quant_cli_r16_c& other); - ~meas_trigger_quant_cli_r16_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& srs_rsrp_r16() - { - assert_choice_type(types::srs_rsrp_r16, type_, "MeasTriggerQuantityCLI-r16"); - return c.get(); - } - uint8_t& cli_rssi_r16() - { - assert_choice_type(types::cli_rssi_r16, type_, "MeasTriggerQuantityCLI-r16"); - return c.get(); - } - const uint8_t& srs_rsrp_r16() const - { - assert_choice_type(types::srs_rsrp_r16, type_, "MeasTriggerQuantityCLI-r16"); - return c.get(); - } - const uint8_t& cli_rssi_r16() const - { - assert_choice_type(types::cli_rssi_r16, type_, "MeasTriggerQuantityCLI-r16"); - return c.get(); - } - uint8_t& set_srs_rsrp_r16(); - uint8_t& set_cli_rssi_r16(); - -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; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::rsrp, type_, "MeasTriggerQuantityEUTRA"); - return c.get(); - } - uint8_t& rsrq() - { - assert_choice_type(types::rsrq, type_, "MeasTriggerQuantityEUTRA"); - return c.get(); - } - uint8_t& sinr() - { - assert_choice_type(types::sinr, type_, "MeasTriggerQuantityEUTRA"); - return c.get(); - } - const uint8_t& rsrp() const - { - assert_choice_type(types::rsrp, type_, "MeasTriggerQuantityEUTRA"); - return c.get(); - } - const uint8_t& rsrq() const - { - assert_choice_type(types::rsrq, type_, "MeasTriggerQuantityEUTRA"); - return c.get(); - } - const uint8_t& sinr() const - { - assert_choice_type(types::sinr, type_, "MeasTriggerQuantityEUTRA"); - return c.get(); - } - uint8_t& set_rsrp(); - uint8_t& set_rsrq(); - uint8_t& set_sinr(); - -private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); -}; - -// MeasTriggerQuantityUTRA-FDD-r16 ::= CHOICE -struct meas_trigger_quant_utra_fdd_r16_c { - struct types_opts { - enum options { utra_fdd_rs_cp_r16, utra_fdd_ec_n0_r16, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - meas_trigger_quant_utra_fdd_r16_c() = default; - meas_trigger_quant_utra_fdd_r16_c(const meas_trigger_quant_utra_fdd_r16_c& other); - meas_trigger_quant_utra_fdd_r16_c& operator=(const meas_trigger_quant_utra_fdd_r16_c& other); - ~meas_trigger_quant_utra_fdd_r16_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& utra_fdd_rs_cp_r16() - { - assert_choice_type(types::utra_fdd_rs_cp_r16, type_, "MeasTriggerQuantityUTRA-FDD-r16"); - return c.get(); - } - uint8_t& utra_fdd_ec_n0_r16() - { - assert_choice_type(types::utra_fdd_ec_n0_r16, type_, "MeasTriggerQuantityUTRA-FDD-r16"); - return c.get(); - } - const int8_t& utra_fdd_rs_cp_r16() const - { - assert_choice_type(types::utra_fdd_rs_cp_r16, type_, "MeasTriggerQuantityUTRA-FDD-r16"); - return c.get(); - } - const uint8_t& utra_fdd_ec_n0_r16() const - { - assert_choice_type(types::utra_fdd_ec_n0_r16, type_, "MeasTriggerQuantityUTRA-FDD-r16"); - return c.get(); - } - int8_t& set_utra_fdd_rs_cp_r16(); - uint8_t& set_utra_fdd_ec_n0_r16(); - -private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); -}; - -// MinSchedulingOffsetPreferenceConfig-r16 ::= SEQUENCE -struct min_sched_offset_pref_cfg_r16_s { - struct min_sched_offset_pref_prohibit_timer_r16_opts { - enum options { s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s20, s30, spare2, spare1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using min_sched_offset_pref_prohibit_timer_r16_e_ = enumerated; - - // member variables - min_sched_offset_pref_prohibit_timer_r16_e_ min_sched_offset_pref_prohibit_timer_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeedForGapNCSG-ConfigEUTRA-r17 ::= SEQUENCE -struct need_for_gap_ncsg_cfg_eutra_r17_s { - using requested_target_band_filt_ncsg_eutra_r17_l_ = dyn_array; - - // member variables - requested_target_band_filt_ncsg_eutra_r17_l_ requested_target_band_filt_ncsg_eutra_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeedForGapNCSG-ConfigNR-r17 ::= SEQUENCE -struct need_for_gap_ncsg_cfg_nr_r17_s { - using requested_target_band_filt_ncsg_nr_r17_l_ = dyn_array; - - // member variables - requested_target_band_filt_ncsg_nr_r17_l_ requested_target_band_filt_ncsg_nr_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// OtherConfig-v1700 ::= SEQUENCE -struct other_cfg_v1700_s { - bool ul_gap_fr2_pref_cfg_r17_present = false; - bool musim_gap_assist_cfg_r17_present = false; - bool musim_leave_assist_cfg_r17_present = false; - bool success_ho_cfg_r17_present = false; - bool max_bw_pref_cfg_fr2_2_r17_present = false; - bool max_mimo_layer_pref_cfg_fr2_2_r17_present = false; - bool min_sched_offset_pref_cfg_ext_r17_present = false; - bool rlm_relaxation_report_cfg_r17_present = false; - bool bfd_relaxation_report_cfg_r17_present = false; - bool scg_deactivation_pref_cfg_r17_present = false; - bool rrm_meas_relaxation_report_cfg_r17_present = false; - bool prop_delay_diff_report_cfg_r17_present = false; - setup_release_c musim_gap_assist_cfg_r17; - setup_release_c musim_leave_assist_cfg_r17; - setup_release_c success_ho_cfg_r17; - setup_release_c rlm_relaxation_report_cfg_r17; - setup_release_c bfd_relaxation_report_cfg_r17; - setup_release_c scg_deactivation_pref_cfg_r17; - setup_release_c rrm_meas_relaxation_report_cfg_r17; - setup_release_c prop_delay_diff_report_cfg_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RSSI-ResourceListConfigCLI-r16 ::= SEQUENCE (SIZE (1..64)) OF RSSI-ResourceConfigCLI-r16 -using rssi_res_list_cfg_cli_r16_l = dyn_array; - -// ReleasePreferenceConfig-r16 ::= SEQUENCE -struct release_pref_cfg_r16_s { - struct release_pref_prohibit_timer_r16_opts { - enum options { s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s20, s30, infinity, spare1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using release_pref_prohibit_timer_r16_e_ = enumerated; - - // member variables - bool connected_report_present = false; - release_pref_prohibit_timer_r16_e_ release_pref_prohibit_timer_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RxTxReportInterval-r17 ::= ENUMERATED -struct rx_tx_report_interv_r17_opts { - enum options { - ms80, - ms120, - ms160, - ms240, - ms320, - ms480, - ms640, - ms1024, - ms1280, - ms2048, - ms2560, - ms5120, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; -}; -using rx_tx_report_interv_r17_e = enumerated; - -// SL-L2RelayUE-Config-r17 ::= SEQUENCE -struct sl_l2_relay_ue_cfg_r17_s { - using sl_remote_ue_to_add_mod_list_r17_l_ = dyn_array; - using sl_remote_ue_to_release_list_r17_l_ = bounded_array, 32>; - - // member variables - bool ext = false; - sl_remote_ue_to_add_mod_list_r17_l_ sl_remote_ue_to_add_mod_list_r17; - sl_remote_ue_to_release_list_r17_l_ sl_remote_ue_to_release_list_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-TimeOffsetEUTRA-r16 ::= ENUMERATED -struct sl_time_offset_eutra_r16_opts { - enum options { - ms0, - ms0dot25, - ms0dot5, - ms0dot625, - ms0dot75, - ms1, - ms1dot25, - ms1dot5, - ms1dot75, - ms2, - ms2dot5, - ms3, - ms4, - ms5, - ms6, - ms8, - ms10, - ms20, - nulltype - } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; -}; -using sl_time_offset_eutra_r16_e = enumerated; - -// SRS-ResourceListConfigCLI-r16 ::= SEQUENCE (SIZE (1..32)) OF SRS-ResourceConfigCLI-r16 -using srs_res_list_cfg_cli_r16_l = dyn_array; - -// 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; - // ... - // group 0 - bool ssb_position_qcl_common_r16_present = false; - ssb_position_qcl_relation_r16_e ssb_position_qcl_common_r16; - copy_ptr ssb_position_qcl_cells_to_add_mod_list_r16; - copy_ptr ssb_position_qcl_cells_to_rem_list_r16; - // group 1 - bool derive_ssb_idx_from_cell_inter_r17_present = false; - bool ssb_position_qcl_common_r17_present = false; - uint8_t derive_ssb_idx_from_cell_inter_r17 = 0; - ssb_position_qcl_relation_r17_e ssb_position_qcl_common_r17; - copy_ptr>> ssb_position_qcl_cells_r17; - // group 2 - copy_ptr cca_cells_to_add_mod_list_r17; - copy_ptr cca_cells_to_rem_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SSB-MTC3-r16 ::= SEQUENCE -struct ssb_mtc3_r16_s { - struct periodicity_and_offset_r16_c_ { - struct types_opts { - enum options { - sf5_r16, - sf10_r16, - sf20_r16, - sf40_r16, - sf80_r16, - sf160_r16, - sf320_r16, - sf640_r16, - sf1280_r16, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - periodicity_and_offset_r16_c_() = default; - periodicity_and_offset_r16_c_(const periodicity_and_offset_r16_c_& other); - periodicity_and_offset_r16_c_& operator=(const periodicity_and_offset_r16_c_& other); - ~periodicity_and_offset_r16_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& sf5_r16() - { - assert_choice_type(types::sf5_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - uint8_t& sf10_r16() - { - assert_choice_type(types::sf10_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - uint8_t& sf20_r16() - { - assert_choice_type(types::sf20_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - uint8_t& sf40_r16() - { - assert_choice_type(types::sf40_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - uint8_t& sf80_r16() - { - assert_choice_type(types::sf80_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - uint8_t& sf160_r16() - { - assert_choice_type(types::sf160_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - uint16_t& sf320_r16() - { - assert_choice_type(types::sf320_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - uint16_t& sf640_r16() - { - assert_choice_type(types::sf640_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - uint16_t& sf1280_r16() - { - assert_choice_type(types::sf1280_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - const uint8_t& sf5_r16() const - { - assert_choice_type(types::sf5_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - const uint8_t& sf10_r16() const - { - assert_choice_type(types::sf10_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - const uint8_t& sf20_r16() const - { - assert_choice_type(types::sf20_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - const uint8_t& sf40_r16() const - { - assert_choice_type(types::sf40_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - const uint8_t& sf80_r16() const - { - assert_choice_type(types::sf80_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - const uint8_t& sf160_r16() const - { - assert_choice_type(types::sf160_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - const uint16_t& sf320_r16() const - { - assert_choice_type(types::sf320_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - const uint16_t& sf640_r16() const - { - assert_choice_type(types::sf640_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - const uint16_t& sf1280_r16() const - { - assert_choice_type(types::sf1280_r16, type_, "periodicityAndOffset-r16"); - return c.get(); - } - uint8_t& set_sf5_r16(); - uint8_t& set_sf10_r16(); - uint8_t& set_sf20_r16(); - uint8_t& set_sf40_r16(); - uint8_t& set_sf80_r16(); - uint8_t& set_sf160_r16(); - uint16_t& set_sf320_r16(); - uint16_t& set_sf640_r16(); - uint16_t& set_sf1280_r16(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct dur_r16_opts { - enum options { sf1, sf2, sf3, sf4, sf5, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using dur_r16_e_ = enumerated; - using pci_list_r16_l_ = dyn_array; - - // member variables - bool ssb_to_measure_r16_present = false; - periodicity_and_offset_r16_c_ periodicity_and_offset_r16; - dur_r16_e_ dur_r16; - pci_list_r16_l_ pci_list_r16; - setup_release_c ssb_to_measure_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// Sensor-NameList-r16 ::= SEQUENCE -struct sensor_name_list_r16_s { - bool meas_uncom_bar_pre_r16_present = false; - bool meas_ue_speed_present = false; - bool meas_ue_orientation_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-TxTEG-RequestUL-TDOA-Config-r17 ::= CHOICE -struct ue_tx_teg_request_ul_tdoa_cfg_r17_c { - struct periodic_report_r17_opts { - enum options { ms160, ms320, ms1280, ms2560, ms61440, ms81920, ms368640, ms737280, nulltype } value; - typedef uint32_t number_type; - - const char* to_string() const; - uint32_t to_number() const; - }; - using periodic_report_r17_e_ = enumerated; - struct types_opts { - enum options { one_shot_r17, periodic_report_r17, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - ue_tx_teg_request_ul_tdoa_cfg_r17_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 - periodic_report_r17_e_& periodic_report_r17() - { - assert_choice_type(types::periodic_report_r17, type_, "UE-TxTEG-RequestUL-TDOA-Config-r17"); - return c; - } - const periodic_report_r17_e_& periodic_report_r17() const - { - assert_choice_type(types::periodic_report_r17, type_, "UE-TxTEG-RequestUL-TDOA-Config-r17"); - return c; - } - void set_one_shot_r17(); - periodic_report_r17_e_& set_periodic_report_r17(); - -private: - types type_; - periodic_report_r17_e_ c; -}; - -// UL-DelayValueConfig-r16 ::= SEQUENCE -struct ul_delay_value_cfg_r16_s { - using delay_drb_list_r16_l_ = bounded_array; - - // member variables - delay_drb_list_r16_l_ delay_drb_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UL-ExcessDelayConfig-r17 ::= SEQUENCE -struct ul_excess_delay_cfg_r17_s { - using excess_delay_drb_list_r17_l_ = dyn_array; - - // member variables - excess_delay_drb_list_r17_l_ excess_delay_drb_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UL-GapFR2-Config-r17 ::= SEQUENCE -struct ul_gap_fr2_cfg_r17_s { - struct ugl_r17_opts { - enum options { ms0dot125, ms0dot25, ms0dot5, ms1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using ugl_r17_e_ = enumerated; - struct ugrp_r17_opts { - enum options { ms5, ms20, ms40, ms160, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ugrp_r17_e_ = enumerated; - - // member variables - bool ref_fr2_serv_cell_async_ca_r17_present = false; - uint8_t gap_offset_r17 = 0; - ugl_r17_e_ ugl_r17; - ugrp_r17_e_ ugrp_r17; - uint8_t ref_fr2_serv_cell_async_ca_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ValidityCellList ::= SEQUENCE (SIZE (1..8)) OF PCI-Range -using validity_cell_list_l = dyn_array; - -// WLAN-NameList-r16 ::= SEQUENCE (SIZE (1..4)) OF OCTET STRING (SIZE (1..32)) -using wlan_name_list_r16_l = bounded_array, 4>; - -// BAP-Config-r16 ::= SEQUENCE -struct bap_cfg_r16_s { - struct flow_ctrl_feedback_type_r16_opts { - enum options { per_bh_rlc_ch, per_routing_id, both, nulltype } value; - - const char* to_string() const; - }; - using flow_ctrl_feedback_type_r16_e_ = enumerated; - - // member variables - bool ext = false; - bool bap_address_r16_present = false; - bool default_ul_bap_routing_id_r16_present = false; - bool default_ul_bh_rlc_ch_r16_present = false; - bool flow_ctrl_feedback_type_r16_present = false; - fixed_bitstring<10> bap_address_r16; - bap_routing_id_r16_s default_ul_bap_routing_id_r16; - fixed_bitstring<16> default_ul_bh_rlc_ch_r16; - flow_ctrl_feedback_type_r16_e_ flow_ctrl_feedback_type_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CLI-EventTriggerConfig-r16 ::= SEQUENCE -struct cli_event_trigger_cfg_r16_s { - struct event_id_r16_c_ { - struct event_i1_r16_s_ { - meas_trigger_quant_cli_r16_c i1_thres_r16; - bool report_on_leave_r16 = false; - uint8_t hysteresis_r16 = 0; - time_to_trigger_e time_to_trigger_r16; - }; - struct types_opts { - enum options { event_i1_r16, /*...*/ nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - types type() const { return types::event_i1_r16; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - event_i1_r16_s_& event_i1_r16() { return c; } - const event_i1_r16_s_& event_i1_r16() const { return c; } - - private: - event_i1_r16_s_ c; - }; - struct report_amount_r16_opts { - enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using report_amount_r16_e_ = enumerated; - - // member variables - bool ext = false; - event_id_r16_c_ event_id_r16; - report_interv_e report_interv_r16; - report_amount_r16_e_ report_amount_r16; - uint8_t max_report_cli_r16 = 1; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CLI-PeriodicalReportConfig-r16 ::= SEQUENCE -struct cli_periodical_report_cfg_r16_s { - struct report_amount_r16_opts { - enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using report_amount_r16_e_ = enumerated; - - // member variables - bool ext = false; - report_interv_e report_interv_r16; - report_amount_r16_e_ report_amount_r16; - meas_report_quant_cli_r16_e report_quant_cli_r16; - uint8_t max_report_cli_r16 = 1; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CLI-ResourceConfig-r16 ::= SEQUENCE -struct cli_res_cfg_r16_s { - bool srs_res_cfg_r16_present = false; - bool rssi_res_cfg_r16_present = false; - setup_release_c> srs_res_cfg_r16; - setup_release_c> rssi_res_cfg_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CellsToAddModList ::= SEQUENCE (SIZE (1..32)) OF CellsToAddMod -using cells_to_add_mod_list_l = dyn_array; - -// CellsToAddModListExt-v1710 ::= SEQUENCE (SIZE (1..32)) OF CellsToAddModExt-v1710 -using cells_to_add_mod_list_ext_v1710_l = dyn_array; - -// CellsToAddModListUTRA-FDD-r16 ::= SEQUENCE (SIZE (1..32)) OF CellsToAddModUTRA-FDD-r16 -using cells_to_add_mod_list_utra_fdd_r16_l = dyn_array; - -// ConditionalReconfiguration-r16 ::= SEQUENCE -struct conditional_recfg_r16_s { - bool ext = false; - bool attempt_cond_recfg_r16_present = false; - cond_recfg_to_rem_list_r16_l cond_recfg_to_rem_list_r16; - cond_recfg_to_add_mod_list_r16_l cond_recfg_to_add_mod_list_r16; - // ... - - // 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; - -// EUTRA-ExcludedCell ::= SEQUENCE -struct eutra_excluded_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; -}; - -// 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_allowed_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_allowed_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_allowed_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_allowed_cell_list = false; - }; - struct event_x1_r17_s_ { - sl_meas_trigger_quant_r16_c x1_thres1_relay_r17; - meas_trigger_quant_c x1_thres2_r17; - bool report_on_leave_r17 = false; - uint8_t hysteresis_r17 = 0; - time_to_trigger_e time_to_trigger_r17; - bool use_allowed_cell_list_r17 = false; - }; - struct event_x2_r17_s_ { - sl_meas_trigger_quant_r16_c x2_thres_relay_r17; - bool report_on_leave_r17 = false; - uint8_t hysteresis_r17 = 0; - time_to_trigger_e time_to_trigger_r17; - }; - struct event_d1_r17_s_ { - uint16_t distance_thresh_from_ref1_r17 = 1; - uint16_t distance_thresh_from_ref2_r17 = 1; - dyn_octstring ref_location1_r17; - dyn_octstring ref_location2_r17; - bool report_on_leave_r17 = false; - uint16_t hysteresis_location_r17 = 0; - time_to_trigger_e time_to_trigger_r17; - }; - struct types_opts { - enum options { - event_a1, - event_a2, - event_a3, - event_a4, - event_a5, - event_a6, - // ... - event_x1_r17, - event_x2_r17, - event_d1_r17, - nulltype - } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::event_a1, type_, "eventId"); - return c.get(); - } - event_a2_s_& event_a2() - { - assert_choice_type(types::event_a2, type_, "eventId"); - return c.get(); - } - event_a3_s_& event_a3() - { - assert_choice_type(types::event_a3, type_, "eventId"); - return c.get(); - } - event_a4_s_& event_a4() - { - assert_choice_type(types::event_a4, type_, "eventId"); - return c.get(); - } - event_a5_s_& event_a5() - { - assert_choice_type(types::event_a5, type_, "eventId"); - return c.get(); - } - event_a6_s_& event_a6() - { - assert_choice_type(types::event_a6, type_, "eventId"); - return c.get(); - } - event_x1_r17_s_& event_x1_r17() - { - assert_choice_type(types::event_x1_r17, type_, "eventId"); - return c.get(); - } - event_x2_r17_s_& event_x2_r17() - { - assert_choice_type(types::event_x2_r17, type_, "eventId"); - return c.get(); - } - event_d1_r17_s_& event_d1_r17() - { - assert_choice_type(types::event_d1_r17, type_, "eventId"); - return c.get(); - } - const event_a1_s_& event_a1() const - { - assert_choice_type(types::event_a1, type_, "eventId"); - return c.get(); - } - const event_a2_s_& event_a2() const - { - assert_choice_type(types::event_a2, type_, "eventId"); - return c.get(); - } - const event_a3_s_& event_a3() const - { - assert_choice_type(types::event_a3, type_, "eventId"); - return c.get(); - } - const event_a4_s_& event_a4() const - { - assert_choice_type(types::event_a4, type_, "eventId"); - return c.get(); - } - const event_a5_s_& event_a5() const - { - assert_choice_type(types::event_a5, type_, "eventId"); - return c.get(); - } - const event_a6_s_& event_a6() const - { - assert_choice_type(types::event_a6, type_, "eventId"); - return c.get(); - } - const event_x1_r17_s_& event_x1_r17() const - { - assert_choice_type(types::event_x1_r17, type_, "eventId"); - return c.get(); - } - const event_x2_r17_s_& event_x2_r17() const - { - assert_choice_type(types::event_x2_r17, type_, "eventId"); - return c.get(); - } - const event_d1_r17_s_& event_d1_r17() const - { - assert_choice_type(types::event_d1_r17, type_, "eventId"); - return c.get(); - } - event_a1_s_& set_event_a1(); - event_a2_s_& set_event_a2(); - event_a3_s_& set_event_a3(); - event_a4_s_& set_event_a4(); - event_a5_s_& set_event_a5(); - event_a6_s_& set_event_a6(); - event_x1_r17_s_& set_event_x1_r17(); - event_x2_r17_s_& set_event_x2_r17(); - event_d1_r17_s_& set_event_d1_r17(); - - private: - 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; - - const char* to_string() const; - int8_t to_number() const; - }; - using report_amount_e_ = enumerated; - - // 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; - // ... - // group 0 - bool use_t312_r16_present = false; - bool include_common_location_info_r16_present = false; - copy_ptr meas_rssi_report_cfg_r16; - bool use_t312_r16 = false; - copy_ptr, 1, 4>>> include_bt_meas_r16; - copy_ptr, 1, 4>>> include_wlan_meas_r16; - copy_ptr> include_sensor_meas_r16; - // group 1 - bool coarse_location_request_r17_present = false; - copy_ptr report_quant_relay_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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 event_b1_utra_fdd_r16_s_ { - bool ext = false; - meas_trigger_quant_utra_fdd_r16_c b1_thres_utra_fdd_r16; - bool report_on_leave_r16 = false; - uint8_t hysteresis_r16 = 0; - time_to_trigger_e time_to_trigger_r16; - // ... - }; - struct event_b2_utra_fdd_r16_s_ { - bool ext = false; - meas_trigger_quant_c b2_thres1_r16; - meas_trigger_quant_utra_fdd_r16_c b2_thres2_utra_fdd_r16; - bool report_on_leave_r16 = false; - uint8_t hysteresis_r16 = 0; - time_to_trigger_e time_to_trigger_r16; - // ... - }; - struct event_y1_relay_r17_s_ { - bool ext = false; - meas_trigger_quant_c y1_thres1_r17; - sl_meas_trigger_quant_r16_c y1_thres2_relay_r17; - bool report_on_leave_r17 = false; - uint8_t hysteresis_r17 = 0; - time_to_trigger_e time_to_trigger_r17; - // ... - }; - struct event_y2_relay_r17_s_ { - bool ext = false; - sl_meas_trigger_quant_r16_c y2_thres_relay_r17; - bool report_on_leave_r17 = false; - uint8_t hysteresis_r17 = 0; - time_to_trigger_e time_to_trigger_r17; - // ... - }; - struct types_opts { - enum options { - event_b1, - event_b2, - // ... - event_b1_utra_fdd_r16, - event_b2_utra_fdd_r16, - event_y1_relay_r17, - event_y2_relay_r17, - nulltype - } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::event_b1, type_, "eventId"); - return c.get(); - } - event_b2_s_& event_b2() - { - assert_choice_type(types::event_b2, type_, "eventId"); - return c.get(); - } - event_b1_utra_fdd_r16_s_& event_b1_utra_fdd_r16() - { - assert_choice_type(types::event_b1_utra_fdd_r16, type_, "eventId"); - return c.get(); - } - event_b2_utra_fdd_r16_s_& event_b2_utra_fdd_r16() - { - assert_choice_type(types::event_b2_utra_fdd_r16, type_, "eventId"); - return c.get(); - } - event_y1_relay_r17_s_& event_y1_relay_r17() - { - assert_choice_type(types::event_y1_relay_r17, type_, "eventId"); - return c.get(); - } - event_y2_relay_r17_s_& event_y2_relay_r17() - { - assert_choice_type(types::event_y2_relay_r17, type_, "eventId"); - return c.get(); - } - const event_b1_s_& event_b1() const - { - assert_choice_type(types::event_b1, type_, "eventId"); - return c.get(); - } - const event_b2_s_& event_b2() const - { - assert_choice_type(types::event_b2, type_, "eventId"); - return c.get(); - } - const event_b1_utra_fdd_r16_s_& event_b1_utra_fdd_r16() const - { - assert_choice_type(types::event_b1_utra_fdd_r16, type_, "eventId"); - return c.get(); - } - const event_b2_utra_fdd_r16_s_& event_b2_utra_fdd_r16() const - { - assert_choice_type(types::event_b2_utra_fdd_r16, type_, "eventId"); - return c.get(); - } - const event_y1_relay_r17_s_& event_y1_relay_r17() const - { - assert_choice_type(types::event_y1_relay_r17, type_, "eventId"); - return c.get(); - } - const event_y2_relay_r17_s_& event_y2_relay_r17() const - { - assert_choice_type(types::event_y2_relay_r17, type_, "eventId"); - return c.get(); - } - event_b1_s_& set_event_b1(); - event_b2_s_& set_event_b2(); - event_b1_utra_fdd_r16_s_& set_event_b1_utra_fdd_r16(); - event_b2_utra_fdd_r16_s_& set_event_b2_utra_fdd_r16(); - event_y1_relay_r17_s_& set_event_y1_relay_r17(); - event_y2_relay_r17_s_& set_event_y2_relay_r17(); - - private: - 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; - - const char* to_string() const; - int8_t to_number() const; - }; - using report_amount_e_ = enumerated; - - // 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; - // ... - // group 0 - copy_ptr report_quant_utra_fdd_r16; - // group 1 - bool include_common_location_info_r16_present = false; - copy_ptr, 1, 4>>> include_bt_meas_r16; - copy_ptr, 1, 4>>> include_wlan_meas_r16; - copy_ptr> include_sensor_meas_r16; - // group 2 - copy_ptr report_quant_relay_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// EventTriggerConfigNR-SL-r16 ::= SEQUENCE -struct event_trigger_cfg_nr_sl_r16_s { - struct event_id_r16_c_ { - struct event_c1_s_ { - uint8_t c1_thres_r16 = 0; - uint8_t hysteresis_r16 = 0; - time_to_trigger_e time_to_trigger_r16; - }; - struct event_c2_r16_s_ { - uint8_t c2_thres_r16 = 0; - uint8_t hysteresis_r16 = 0; - time_to_trigger_e time_to_trigger_r16; - }; - struct types_opts { - enum options { event_c1, event_c2_r16, /*...*/ nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - event_id_r16_c_() = default; - event_id_r16_c_(const event_id_r16_c_& other); - event_id_r16_c_& operator=(const event_id_r16_c_& other); - ~event_id_r16_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_c1_s_& event_c1() - { - assert_choice_type(types::event_c1, type_, "eventId-r16"); - return c.get(); - } - event_c2_r16_s_& event_c2_r16() - { - assert_choice_type(types::event_c2_r16, type_, "eventId-r16"); - return c.get(); - } - const event_c1_s_& event_c1() const - { - assert_choice_type(types::event_c1, type_, "eventId-r16"); - return c.get(); - } - const event_c2_r16_s_& event_c2_r16() const - { - assert_choice_type(types::event_c2_r16, type_, "eventId-r16"); - return c.get(); - } - event_c1_s_& set_event_c1(); - event_c2_r16_s_& set_event_c2_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct report_amount_r16_opts { - enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using report_amount_r16_e_ = enumerated; - - // member variables - bool ext = false; - event_id_r16_c_ event_id_r16; - report_interv_e report_interv_r16; - report_amount_r16_e_ report_amount_r16; - meas_report_quant_r16_s report_quant_r16; - // ... - - // 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; -}; - -// IAB-IP-AddressConfigurationList-r16 ::= SEQUENCE -struct iab_ip_address_cfg_list_r16_s { - using iab_ip_address_to_add_mod_list_r16_l_ = dyn_array; - using iab_ip_address_to_release_list_r16_l_ = bounded_array; - - // member variables - bool ext = false; - iab_ip_address_to_add_mod_list_r16_l_ iab_ip_address_to_add_mod_list_r16; - iab_ip_address_to_release_list_r16_l_ iab_ip_address_to_release_list_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeedForGapsConfigNR-r16 ::= SEQUENCE -struct need_for_gaps_cfg_nr_r16_s { - using requested_target_band_filt_nr_r16_l_ = dyn_array; - - // member variables - requested_target_band_filt_nr_r16_l_ requested_target_band_filt_nr_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// OnDemandSIB-Request-r16 ::= SEQUENCE -struct on_demand_sib_request_r16_s { - struct on_demand_sib_request_prohibit_timer_r16_opts { - enum options { s0, s0dot5, s1, s2, s5, s10, s20, s30, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using on_demand_sib_request_prohibit_timer_r16_e_ = enumerated; - - // member variables - on_demand_sib_request_prohibit_timer_r16_e_ on_demand_sib_request_prohibit_timer_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// OtherConfig-v1610 ::= SEQUENCE -struct other_cfg_v1610_s { - bool idc_assist_cfg_r16_present = false; - bool drx_pref_cfg_r16_present = false; - bool max_bw_pref_cfg_r16_present = false; - bool max_cc_pref_cfg_r16_present = false; - bool max_mimo_layer_pref_cfg_r16_present = false; - bool min_sched_offset_pref_cfg_r16_present = false; - bool release_pref_cfg_r16_present = false; - bool ref_time_pref_report_r16_present = false; - bool bt_name_list_r16_present = false; - bool wlan_name_list_r16_present = false; - bool sensor_name_list_r16_present = false; - bool obtain_common_location_r16_present = false; - bool sl_assist_cfg_nr_r16_present = false; - setup_release_c idc_assist_cfg_r16; - setup_release_c drx_pref_cfg_r16; - setup_release_c max_bw_pref_cfg_r16; - setup_release_c max_cc_pref_cfg_r16; - setup_release_c max_mimo_layer_pref_cfg_r16; - setup_release_c min_sched_offset_pref_cfg_r16; - setup_release_c release_pref_cfg_r16; - setup_release_c, 1, 4>> bt_name_list_r16; - setup_release_c, 1, 4>> wlan_name_list_r16; - setup_release_c sensor_name_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PCI-RangeElement ::= SEQUENCE -struct pci_range_elem_s { - uint8_t pci_range_idx = 1; - 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; -}; - -// 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; - - const char* to_string() const; - int8_t to_number() const; - }; - using report_amount_e_ = enumerated; - - // 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_allowed_cell_list = false; - // ... - // group 0 - bool include_common_location_info_r16_present = false; - bool report_add_neigh_meas_r16_present = false; - copy_ptr meas_rssi_report_cfg_r16; - copy_ptr, 1, 4>>> include_bt_meas_r16; - copy_ptr, 1, 4>>> include_wlan_meas_r16; - copy_ptr> include_sensor_meas_r16; - copy_ptr> ul_delay_value_cfg_r16; - // group 1 - bool coarse_location_request_r17_present = false; - copy_ptr> ul_excess_delay_cfg_r17; - copy_ptr report_quant_relay_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - const char* to_string() const; - int8_t to_number() const; - }; - using report_amount_e_ = enumerated; - - // 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; - // ... - // group 0 - copy_ptr report_quant_utra_fdd_r16; - // group 1 - bool include_common_location_info_r16_present = false; - copy_ptr, 1, 4>>> include_bt_meas_r16; - copy_ptr, 1, 4>>> include_wlan_meas_r16; - copy_ptr> include_sensor_meas_r16; - // group 2 - copy_ptr report_quant_relay_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PeriodicalReportConfigNR-SL-r16 ::= SEQUENCE -struct periodical_report_cfg_nr_sl_r16_s { - struct report_amount_r16_opts { - enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using report_amount_r16_e_ = enumerated; - - // member variables - bool ext = false; - report_interv_e report_interv_r16; - report_amount_r16_e_ report_amount_r16; - meas_report_quant_r16_s report_quant_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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 - fixed_bitstring<24> tac; - ran_area_code_list_l_ ran_area_code_list; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RMTC-Config-r16 ::= SEQUENCE -struct rmtc_cfg_r16_s { - struct rmtc_periodicity_r16_opts { - enum options { ms40, ms80, ms160, ms320, ms640, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using rmtc_periodicity_r16_e_ = enumerated; - struct meas_dur_symbols_r16_opts { - enum options { sym1, sym14or12, sym28or24, sym42or36, sym70or60, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using meas_dur_symbols_r16_e_ = enumerated; - struct ref_scs_cp_r16_opts { - enum options { khz15, khz30, khz60_n_cp, khz60_e_cp, nulltype } value; - - const char* to_string() const; - }; - using ref_scs_cp_r16_e_ = enumerated; - struct rmtc_bw_r17_opts { - enum options { mhz100, mhz400, mhz800, mhz1600, mhz2000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using rmtc_bw_r17_e_ = enumerated; - struct meas_dur_symbols_v1700_opts { - enum options { sym140, sym560, sym1120, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using meas_dur_symbols_v1700_e_ = enumerated; - struct ref_scs_cp_v1700_opts { - enum options { khz120, khz480, khz960, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using ref_scs_cp_v1700_e_ = enumerated; - struct tci_state_info_r17_s_ { - bool ref_serv_cell_id_r17_present = false; - uint8_t tci_state_id_r17 = 0; - uint8_t ref_serv_cell_id_r17 = 0; - }; - - // member variables - bool ext = false; - bool rmtc_sf_offset_r16_present = false; - rmtc_periodicity_r16_e_ rmtc_periodicity_r16; - uint16_t rmtc_sf_offset_r16 = 0; - meas_dur_symbols_r16_e_ meas_dur_symbols_r16; - uint32_t rmtc_freq_r16 = 0; - ref_scs_cp_r16_e_ ref_scs_cp_r16; - // ... - // group 0 - bool rmtc_bw_r17_present = false; - bool meas_dur_symbols_v1700_present = false; - bool ref_scs_cp_v1700_present = false; - rmtc_bw_r17_e_ rmtc_bw_r17; - meas_dur_symbols_v1700_e_ meas_dur_symbols_v1700; - ref_scs_cp_v1700_e_ ref_scs_cp_v1700; - copy_ptr tci_state_info_r17; - // group 1 - bool ref_bwp_id_r17_present = false; - uint8_t ref_bwp_id_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCReconfiguration-v1700-IEs ::= SEQUENCE -struct rrc_recfg_v1700_ies_s { - bool other_cfg_v1700_present = false; - bool sl_l2_relay_ue_cfg_r17_present = false; - bool sl_l2_remote_ue_cfg_r17_present = false; - bool need_for_gap_ncsg_cfg_nr_r17_present = false; - bool need_for_gap_ncsg_cfg_eutra_r17_present = false; - bool musim_gap_cfg_r17_present = false; - bool ul_gap_fr2_cfg_r17_present = false; - bool scg_state_r17_present = false; - bool app_layer_meas_cfg_r17_present = false; - bool ue_tx_teg_request_ul_tdoa_cfg_r17_present = false; - bool non_crit_ext_present = false; - other_cfg_v1700_s other_cfg_v1700; - setup_release_c sl_l2_relay_ue_cfg_r17; - setup_release_c sl_l2_remote_ue_cfg_r17; - dyn_octstring ded_paging_delivery_r17; - setup_release_c need_for_gap_ncsg_cfg_nr_r17; - setup_release_c need_for_gap_ncsg_cfg_eutra_r17; - setup_release_c musim_gap_cfg_r17; - setup_release_c ul_gap_fr2_cfg_r17; - app_layer_meas_cfg_r17_s app_layer_meas_cfg_r17; - setup_release_c ue_tx_teg_request_ul_tdoa_cfg_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - // ... - // group 0 - bool use_autonomous_gaps_r16_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - // ... - // group 0 - bool use_autonomous_gaps_r16_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; -}; - -// RxTxPeriodical-r17 ::= SEQUENCE -struct rx_tx_periodical_r17_s { - struct report_amount_r17_opts { - enum options { r1, infinity, spare6, spare5, spare4, spare3, spare2, spare1, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using report_amount_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool rx_tx_report_interv_r17_present = false; - rx_tx_report_interv_r17_e rx_tx_report_interv_r17; - report_amount_r17_e_ report_amount_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-ConfigDedicatedEUTRA-Info-r16 ::= SEQUENCE -struct sl_cfg_ded_eutra_info_r16_s { - using sl_time_offset_eutra_list_r16_l_ = std::array; - - // member variables - bool sl_time_offset_eutra_list_r16_present = false; - dyn_octstring sl_cfg_ded_eutra_r16; - sl_time_offset_eutra_list_r16_l_ sl_time_offset_eutra_list_r16; - - // 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using periodicity_e_ = enumerated; - - // member variables - 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; -}; - -// SSB-MTC3List-r16 ::= SEQUENCE (SIZE (1..4)) OF SSB-MTC3-r16 -using ssb_mtc3_list_r16_l = dyn_array; - -// SliceInfoDedicated-r17 ::= SEQUENCE -struct slice_info_ded_r17_s { - bool nsag_cell_resel_prio_r17_present = false; - bool nsag_cell_resel_sub_prio_r17_present = false; - nsag_id_info_r17_s nsag_id_info_r17; - uint8_t nsag_cell_resel_prio_r17 = 0; - cell_resel_sub_prio_e nsag_cell_resel_sub_prio_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// T312-r16 ::= ENUMERATED -struct t312_r16_opts { - enum options { ms0, ms50, ms100, ms200, ms300, ms400, ms500, ms1000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; -}; -using t312_r16_e = enumerated; - -// T316-r16 ::= ENUMERATED -struct t316_r16_opts { - enum options { ms50, ms100, ms200, ms300, ms400, ms500, ms600, ms1000, ms1500, ms2000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; -}; -using t316_r16_e = enumerated; - -// TrackingAreaIdentity-r16 ::= SEQUENCE -struct tracking_area_id_r16_s { - plmn_id_s plmn_id_r16; - fixed_bitstring<24> tac_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// Tx-PoolMeasList-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..16) -using tx_pool_meas_list_r16_l = bounded_array; - -// UTRA-FDD-CellIndexList-r16 ::= SEQUENCE (SIZE (1..32)) OF INTEGER (1..32) -using utra_fdd_cell_idx_list_r16_l = bounded_array; - -// UTRA-FDD-Q-OffsetRange-r16 ::= ENUMERATED -struct utra_fdd_q_offset_range_r16_opts { - enum options { - db_neg24, - db_neg22, - db_neg20, - db_neg18, - db_neg16, - db_neg14, - db_neg12, - db_neg10, - db_neg8, - db_neg6, - db_neg5, - db_neg4, - db_neg3, - db_neg2, - db_neg1, - db0, - db1, - db2, - db3, - db4, - db5, - db6, - db8, - db10, - db12, - db14, - db16, - db18, - db20, - db22, - db24, - nulltype - } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; -}; -using utra_fdd_q_offset_range_r16_e = enumerated; - -// ValidityArea-r16 ::= SEQUENCE -struct validity_area_r16_s { - uint32_t carrier_freq_r16 = 0; - validity_cell_list_l validity_cell_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CellGlobalIdList-r16 ::= SEQUENCE (SIZE (1..32)) OF CGI-Info-Logging-r16 -using cell_global_id_list_r16_l = dyn_array; - -// MRDC-SecondaryCellGroupConfig ::= SEQUENCE -struct mrdc_secondary_cell_group_cfg_s { - struct mrdc_secondary_cell_group_c_ { - struct types_opts { - enum options { nr_scg, eutra_scg, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - 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 - dyn_octstring& nr_scg() - { - assert_choice_type(types::nr_scg, type_, "mrdc-SecondaryCellGroup"); - return c.get(); - } - dyn_octstring& eutra_scg() - { - assert_choice_type(types::eutra_scg, type_, "mrdc-SecondaryCellGroup"); - return c.get(); - } - const dyn_octstring& nr_scg() const - { - assert_choice_type(types::nr_scg, type_, "mrdc-SecondaryCellGroup"); - return c.get(); - } - const dyn_octstring& eutra_scg() const - { - assert_choice_type(types::eutra_scg, type_, "mrdc-SecondaryCellGroup"); - return c.get(); - } - dyn_octstring& set_nr_scg(); - dyn_octstring& set_eutra_scg(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - 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; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; -}; -using meas_gap_sharing_scheme_e = enumerated; - -// MeasObjectCLI-r16 ::= SEQUENCE -struct meas_obj_cli_r16_s { - bool ext = false; - cli_res_cfg_r16_s cli_res_cfg_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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 excluded_cells_to_add_mod_list_eutran_l_ = dyn_array; - - // member variables - bool ext = 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 excluded_cells_to_rem_list_eutran; - excluded_cells_to_add_mod_list_eutran_l_ excluded_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; - // ... - // group 0 - bool associated_meas_gap_r17_present = false; - uint8_t associated_meas_gap_r17 = 1; - - // 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 excluded_cells_to_add_mod_list_l_ = dyn_array; - using allowed_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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using meas_cycle_scell_e_ = enumerated; - struct meas_cycle_pscell_r17_opts { - enum options { ms160, ms256, ms320, ms512, ms640, ms1024, ms1280, spare1, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using meas_cycle_pscell_r17_e_ = enumerated; - - // 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; - 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 excluded_cells_to_rem_list; - excluded_cells_to_add_mod_list_l_ excluded_cells_to_add_mod_list; - pci_range_idx_list_l allowed_cells_to_rem_list; - allowed_cells_to_add_mod_list_l_ allowed_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; - // group 1 - copy_ptr smtc3list_r16; - copy_ptr> rmtc_cfg_r16; - copy_ptr> t312_r16; - // group 2 - bool associated_meas_gap_ssb_r17_present = false; - bool associated_meas_gap_csi_rs_r17_present = false; - bool meas_cycle_pscell_r17_present = false; - uint8_t associated_meas_gap_ssb_r17 = 1; - uint8_t associated_meas_gap_csi_rs_r17 = 1; - copy_ptr smtc4list_r17; - meas_cycle_pscell_r17_e_ meas_cycle_pscell_r17; - copy_ptr cells_to_add_mod_list_ext_v1710; - // group 3 - bool associated_meas_gap_ssb2_v1720_present = false; - bool associated_meas_gap_csi_rs2_v1720_present = false; - uint8_t associated_meas_gap_ssb2_v1720 = 1; - uint8_t associated_meas_gap_csi_rs2_v1720 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasObjectNR-SL-r16 ::= SEQUENCE -struct meas_obj_nr_sl_r16_s { - tx_pool_meas_list_r16_l tx_pool_meas_to_rem_list_r16; - tx_pool_meas_list_r16_l tx_pool_meas_to_add_mod_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasObjectRxTxDiff-r17 ::= SEQUENCE -struct meas_obj_rx_tx_diff_r17_s { - struct dl_ref_r17_c_ { - struct types_opts { - enum options { prs_ref_r17, csi_rs_ref_r17, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - dl_ref_r17_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 - void set_prs_ref_r17(); - void set_csi_rs_ref_r17(); - - private: - types type_; - }; - - // member variables - bool ext = false; - bool dl_ref_r17_present = false; - dl_ref_r17_c_ dl_ref_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasObjectUTRA-FDD-r16 ::= SEQUENCE -struct meas_obj_utra_fdd_r16_s { - bool ext = false; - bool utra_fdd_q_offset_range_r16_present = false; - uint16_t carrier_freq_r16 = 0; - utra_fdd_q_offset_range_r16_e utra_fdd_q_offset_range_r16; - utra_fdd_cell_idx_list_r16_l cells_to_rem_list_r16; - cells_to_add_mod_list_utra_fdd_r16_l cells_to_add_mod_list_r16; - // ... - - // 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; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using overheat_ind_prohibit_timer_e_ = enumerated; - - // 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; -}; - -// PosGapConfig-r17 ::= SEQUENCE -struct pos_gap_cfg_r17_s { - struct mgl_r17_opts { - enum options { ms1dot5, ms3, ms3dot5, ms4, ms5dot5, ms6, ms10, ms20, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using mgl_r17_e_ = enumerated; - struct mgrp_r17_opts { - enum options { ms20, ms40, ms80, ms160, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using mgrp_r17_e_ = enumerated; - struct mgta_r17_opts { - enum options { ms0, ms0dot25, ms0dot5, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using mgta_r17_e_ = enumerated; - struct gap_type_r17_opts { - enum options { per_ue, per_fr1, per_fr2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using gap_type_r17_e_ = enumerated; - - // member variables - bool ext = false; - uint8_t meas_pos_pre_cfg_gap_id_r17 = 1; - uint8_t gap_offset_r17 = 0; - mgl_r17_e_ mgl_r17; - mgrp_r17_e_ mgrp_r17; - mgta_r17_e_ mgta_r17; - gap_type_r17_e_ gap_type_r17; - // ... - - // 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; -}; - -// RRCReconfiguration-v1610-IEs ::= SEQUENCE -struct rrc_recfg_v1610_ies_s { - bool other_cfg_v1610_present = false; - bool bap_cfg_r16_present = false; - bool iab_ip_address_cfg_list_r16_present = false; - bool conditional_recfg_r16_present = false; - bool daps_source_release_r16_present = false; - bool t316_r16_present = false; - bool need_for_gaps_cfg_nr_r16_present = false; - bool on_demand_sib_request_r16_present = false; - bool sl_cfg_ded_nr_r16_present = false; - bool sl_cfg_ded_eutra_info_r16_present = false; - bool target_cell_smtc_scg_r16_present = false; - bool non_crit_ext_present = false; - other_cfg_v1610_s other_cfg_v1610; - setup_release_c bap_cfg_r16; - iab_ip_address_cfg_list_r16_s iab_ip_address_cfg_list_r16; - conditional_recfg_r16_s conditional_recfg_r16; - setup_release_c t316_r16; - setup_release_c need_for_gaps_cfg_nr_r16; - setup_release_c on_demand_sib_request_r16; - dyn_octstring ded_pos_sys_info_delivery_r16; - setup_release_c sl_cfg_ded_nr_r16; - setup_release_c sl_cfg_ded_eutra_info_r16; - ssb_mtc_s target_cell_smtc_scg_r16; - rrc_recfg_v1700_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; -}; - -// RRCRelease-v1710-IEs ::= SEQUENCE -struct rrc_release_v1710_ies_s { - bool no_last_cell_upd_r17_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; -}; - -// ReportConfigInterRAT ::= SEQUENCE -struct report_cfg_inter_rat_s { - struct report_type_c_ { - struct types_opts { - enum options { periodical, event_triggered, report_cgi, /*...*/ report_sftd, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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_inter_rat_s& periodical() - { - assert_choice_type(types::periodical, type_, "reportType"); - return c.get(); - } - event_trigger_cfg_inter_rat_s& event_triggered() - { - assert_choice_type(types::event_triggered, type_, "reportType"); - return c.get(); - } - report_cgi_eutra_s& report_cgi() - { - assert_choice_type(types::report_cgi, type_, "reportType"); - return c.get(); - } - report_sftd_eutra_s& report_sftd() - { - assert_choice_type(types::report_sftd, type_, "reportType"); - return c.get(); - } - const periodical_report_cfg_inter_rat_s& periodical() const - { - assert_choice_type(types::periodical, type_, "reportType"); - return c.get(); - } - const event_trigger_cfg_inter_rat_s& event_triggered() const - { - assert_choice_type(types::event_triggered, type_, "reportType"); - return c.get(); - } - const report_cgi_eutra_s& report_cgi() const - { - assert_choice_type(types::report_cgi, type_, "reportType"); - return c.get(); - } - const report_sftd_eutra_s& report_sftd() const - { - assert_choice_type(types::report_sftd, type_, "reportType"); - return c.get(); - } - periodical_report_cfg_inter_rat_s& set_periodical(); - event_trigger_cfg_inter_rat_s& set_event_triggered(); - report_cgi_eutra_s& set_report_cgi(); - report_sftd_eutra_s& set_report_sftd(); - - 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, - report_sftd, - cond_trigger_cfg_r16, - cli_periodical_r16, - cli_event_triggered_r16, - rx_tx_periodical_r17, - nulltype - } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::periodical, type_, "reportType"); - return c.get(); - } - event_trigger_cfg_s& event_triggered() - { - assert_choice_type(types::event_triggered, type_, "reportType"); - return c.get(); - } - report_cgi_s& report_cgi() - { - assert_choice_type(types::report_cgi, type_, "reportType"); - return c.get(); - } - report_sftd_nr_s& report_sftd() - { - assert_choice_type(types::report_sftd, type_, "reportType"); - return c.get(); - } - cond_trigger_cfg_r16_s& cond_trigger_cfg_r16() - { - assert_choice_type(types::cond_trigger_cfg_r16, type_, "reportType"); - return c.get(); - } - cli_periodical_report_cfg_r16_s& cli_periodical_r16() - { - assert_choice_type(types::cli_periodical_r16, type_, "reportType"); - return c.get(); - } - cli_event_trigger_cfg_r16_s& cli_event_triggered_r16() - { - assert_choice_type(types::cli_event_triggered_r16, type_, "reportType"); - return c.get(); - } - rx_tx_periodical_r17_s& rx_tx_periodical_r17() - { - assert_choice_type(types::rx_tx_periodical_r17, type_, "reportType"); - return c.get(); - } - const periodical_report_cfg_s& periodical() const - { - assert_choice_type(types::periodical, type_, "reportType"); - return c.get(); - } - const event_trigger_cfg_s& event_triggered() const - { - assert_choice_type(types::event_triggered, type_, "reportType"); - return c.get(); - } - const report_cgi_s& report_cgi() const - { - assert_choice_type(types::report_cgi, type_, "reportType"); - return c.get(); - } - const report_sftd_nr_s& report_sftd() const - { - assert_choice_type(types::report_sftd, type_, "reportType"); - return c.get(); - } - const cond_trigger_cfg_r16_s& cond_trigger_cfg_r16() const - { - assert_choice_type(types::cond_trigger_cfg_r16, type_, "reportType"); - return c.get(); - } - const cli_periodical_report_cfg_r16_s& cli_periodical_r16() const - { - assert_choice_type(types::cli_periodical_r16, type_, "reportType"); - return c.get(); - } - const cli_event_trigger_cfg_r16_s& cli_event_triggered_r16() const - { - assert_choice_type(types::cli_event_triggered_r16, type_, "reportType"); - return c.get(); - } - const rx_tx_periodical_r17_s& rx_tx_periodical_r17() const - { - assert_choice_type(types::rx_tx_periodical_r17, type_, "reportType"); - return c.get(); - } - periodical_report_cfg_s& set_periodical(); - event_trigger_cfg_s& set_event_triggered(); - report_cgi_s& set_report_cgi(); - report_sftd_nr_s& set_report_sftd(); - cond_trigger_cfg_r16_s& set_cond_trigger_cfg_r16(); - cli_periodical_report_cfg_r16_s& set_cli_periodical_r16(); - cli_event_trigger_cfg_r16_s& set_cli_event_triggered_r16(); - rx_tx_periodical_r17_s& set_rx_tx_periodical_r17(); - - 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-SL-r16 ::= SEQUENCE -struct report_cfg_nr_sl_r16_s { - struct report_type_r16_c_ { - struct types_opts { - enum options { periodical_r16, event_triggered_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - report_type_r16_c_() = default; - report_type_r16_c_(const report_type_r16_c_& other); - report_type_r16_c_& operator=(const report_type_r16_c_& other); - ~report_type_r16_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_nr_sl_r16_s& periodical_r16() - { - assert_choice_type(types::periodical_r16, type_, "reportType-r16"); - return c.get(); - } - event_trigger_cfg_nr_sl_r16_s& event_triggered_r16() - { - assert_choice_type(types::event_triggered_r16, type_, "reportType-r16"); - return c.get(); - } - const periodical_report_cfg_nr_sl_r16_s& periodical_r16() const - { - assert_choice_type(types::periodical_r16, type_, "reportType-r16"); - return c.get(); - } - const event_trigger_cfg_nr_sl_r16_s& event_triggered_r16() const - { - assert_choice_type(types::event_triggered_r16, type_, "reportType-r16"); - return c.get(); - } - periodical_report_cfg_nr_sl_r16_s& set_periodical_r16(); - event_trigger_cfg_nr_sl_r16_s& set_event_triggered_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - report_type_r16_c_ report_type_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SliceInfoListDedicated-r17 ::= SEQUENCE (SIZE (1..8)) OF SliceInfoDedicated-r17 -using slice_info_list_ded_r17_l = dyn_array; - -// TrackingAreaCodeList-r16 ::= SEQUENCE (SIZE (1..8)) OF BIT STRING (SIZE (24)) -using tac_list_r16_l = bounded_array, 8>; - -// TrackingAreaIdentityList-r16 ::= SEQUENCE (SIZE (1..8)) OF TrackingAreaIdentity-r16 -using tracking_area_id_list_r16_l = dyn_array; - -// ValidityAreaList-r16 ::= SEQUENCE (SIZE (1..8)) OF ValidityArea-r16 -using validity_area_list_r16_l = dyn_array; - -// AreaConfig-r16 ::= CHOICE -struct area_cfg_r16_c { - struct types_opts { - enum options { cell_global_id_list_r16, tac_list_r16, tracking_area_id_list_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - area_cfg_r16_c() = default; - area_cfg_r16_c(const area_cfg_r16_c& other); - area_cfg_r16_c& operator=(const area_cfg_r16_c& other); - ~area_cfg_r16_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_global_id_list_r16_l& cell_global_id_list_r16() - { - assert_choice_type(types::cell_global_id_list_r16, type_, "AreaConfig-r16"); - return c.get(); - } - tac_list_r16_l& tac_list_r16() - { - assert_choice_type(types::tac_list_r16, type_, "AreaConfig-r16"); - return c.get(); - } - tracking_area_id_list_r16_l& tracking_area_id_list_r16() - { - assert_choice_type(types::tracking_area_id_list_r16, type_, "AreaConfig-r16"); - return c.get(); - } - const cell_global_id_list_r16_l& cell_global_id_list_r16() const - { - assert_choice_type(types::cell_global_id_list_r16, type_, "AreaConfig-r16"); - return c.get(); - } - const tac_list_r16_l& tac_list_r16() const - { - assert_choice_type(types::tac_list_r16, type_, "AreaConfig-r16"); - return c.get(); - } - const tracking_area_id_list_r16_l& tracking_area_id_list_r16() const - { - assert_choice_type(types::tracking_area_id_list_r16, type_, "AreaConfig-r16"); - return c.get(); - } - cell_global_id_list_r16_l& set_cell_global_id_list_r16(); - tac_list_r16_l& set_tac_list_r16(); - tracking_area_id_list_r16_l& set_tracking_area_id_list_r16(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// FilterConfigCLI-r16 ::= SEQUENCE -struct filt_cfg_cli_r16_s { - bool filt_coef_srs_rsrp_r16_present = false; - bool filt_coef_cli_rssi_r16_present = false; - filt_coef_e filt_coef_srs_rsrp_r16; - filt_coef_e filt_coef_cli_rssi_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FreqPriorityDedicatedSlicing-r17 ::= SEQUENCE -struct freq_prio_ded_slicing_r17_s { - uint32_t dl_explicit_carrier_freq_r17 = 0; - slice_info_list_ded_r17_l slice_info_list_ded_r17; - - // 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; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using mgl_e_ = enumerated; - struct mgrp_opts { - enum options { ms20, ms40, ms80, ms160, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using mgrp_e_ = enumerated; - struct mgta_opts { - enum options { ms0, ms0dot25, ms0dot5, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using mgta_e_ = enumerated; - struct ref_serv_cell_ind_opts { - enum options { pcell, pscell, mcg_fr2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ref_serv_cell_ind_e_ = enumerated; - struct mgl_r16_opts { - enum options { ms10, ms20, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using mgl_r16_e_ = enumerated; - - // member variables - 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; - // group 1 - bool ref_fr2_serv_cell_async_ca_r16_present = false; - bool mgl_r16_present = false; - uint8_t ref_fr2_serv_cell_async_ca_r16 = 0; - mgl_r16_e_ mgl_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// GapConfig-r17 ::= SEQUENCE -struct gap_cfg_r17_s { - struct gap_type_r17_opts { - enum options { per_ue, per_fr1, per_fr2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using gap_type_r17_e_ = enumerated; - struct mgl_r17_opts { - enum options { ms1, ms1dot5, ms2, ms3, ms3dot5, ms4, ms5, ms5dot5, ms6, ms10, ms20, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using mgl_r17_e_ = enumerated; - struct mgrp_r17_opts { - enum options { ms20, ms40, ms80, ms160, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using mgrp_r17_e_ = enumerated; - struct mgta_r17_opts { - enum options { ms0, ms0dot25, ms0dot5, ms0dot75, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using mgta_r17_e_ = enumerated; - struct ref_serv_cell_ind_r17_opts { - enum options { pcell, pscell, mcg_fr2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ref_serv_cell_ind_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool ref_serv_cell_ind_r17_present = false; - bool ref_fr2_serv_cell_async_ca_r17_present = false; - bool pre_cfg_ind_r17_present = false; - bool ncsg_ind_r17_present = false; - bool gap_assoc_prs_r17_present = false; - bool gap_sharing_r17_present = false; - bool gap_prio_r17_present = false; - uint8_t meas_gap_id_r17 = 1; - gap_type_r17_e_ gap_type_r17; - uint8_t gap_offset_r17 = 0; - mgl_r17_e_ mgl_r17; - mgrp_r17_e_ mgrp_r17; - mgta_r17_e_ mgta_r17; - ref_serv_cell_ind_r17_e_ ref_serv_cell_ind_r17; - uint8_t ref_fr2_serv_cell_async_ca_r17 = 0; - meas_gap_sharing_scheme_e gap_sharing_r17; - uint8_t gap_prio_r17 = 1; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// InterFreqTargetInfo-r16 ::= SEQUENCE -struct inter_freq_target_info_r16_s { - using cell_list_r16_l_ = bounded_array; - - // member variables - uint32_t dl_carrier_freq_r16 = 0; - cell_list_r16_l_ cell_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; -}; - -// MeasIdleConfigDedicated-r16 ::= SEQUENCE -struct meas_idle_cfg_ded_r16_s { - using meas_idle_carrier_list_nr_r16_l_ = dyn_array; - using meas_idle_carrier_list_eutra_r16_l_ = dyn_array; - struct meas_idle_dur_r16_opts { - enum options { sec10, sec30, sec60, sec120, sec180, sec240, sec300, spare, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using meas_idle_dur_r16_e_ = enumerated; - - // member variables - bool ext = false; - meas_idle_carrier_list_nr_r16_l_ meas_idle_carrier_list_nr_r16; - meas_idle_carrier_list_eutra_r16_l_ meas_idle_carrier_list_eutra_r16; - meas_idle_dur_r16_e_ meas_idle_dur_r16; - validity_area_list_r16_l validity_area_list_r16; - // ... - - // 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 { - meas_obj_nr, - // ... - meas_obj_eutra, - meas_obj_utra_fdd_r16, - meas_obj_nr_sl_r16, - meas_obj_cli_r16, - meas_obj_rx_tx_diff_r17, - meas_obj_relay_r17, - nulltype - } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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_(); } - 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() - { - assert_choice_type(types::meas_obj_nr, type_, "measObject"); - return c.get(); - } - meas_obj_eutra_s& meas_obj_eutra() - { - assert_choice_type(types::meas_obj_eutra, type_, "measObject"); - return c.get(); - } - meas_obj_utra_fdd_r16_s& meas_obj_utra_fdd_r16() - { - assert_choice_type(types::meas_obj_utra_fdd_r16, type_, "measObject"); - return c.get(); - } - meas_obj_nr_sl_r16_s& meas_obj_nr_sl_r16() - { - assert_choice_type(types::meas_obj_nr_sl_r16, type_, "measObject"); - return c.get(); - } - meas_obj_cli_r16_s& meas_obj_cli_r16() - { - assert_choice_type(types::meas_obj_cli_r16, type_, "measObject"); - return c.get(); - } - meas_obj_rx_tx_diff_r17_s& meas_obj_rx_tx_diff_r17() - { - assert_choice_type(types::meas_obj_rx_tx_diff_r17, type_, "measObject"); - return c.get(); - } - sl_meas_obj_r16_s& meas_obj_relay_r17() - { - assert_choice_type(types::meas_obj_relay_r17, type_, "measObject"); - return c.get(); - } - const meas_obj_nr_s& meas_obj_nr() const - { - assert_choice_type(types::meas_obj_nr, type_, "measObject"); - return c.get(); - } - const meas_obj_eutra_s& meas_obj_eutra() const - { - assert_choice_type(types::meas_obj_eutra, type_, "measObject"); - return c.get(); - } - const meas_obj_utra_fdd_r16_s& meas_obj_utra_fdd_r16() const - { - assert_choice_type(types::meas_obj_utra_fdd_r16, type_, "measObject"); - return c.get(); - } - const meas_obj_nr_sl_r16_s& meas_obj_nr_sl_r16() const - { - assert_choice_type(types::meas_obj_nr_sl_r16, type_, "measObject"); - return c.get(); - } - const meas_obj_cli_r16_s& meas_obj_cli_r16() const - { - assert_choice_type(types::meas_obj_cli_r16, type_, "measObject"); - return c.get(); - } - const meas_obj_rx_tx_diff_r17_s& meas_obj_rx_tx_diff_r17() const - { - assert_choice_type(types::meas_obj_rx_tx_diff_r17, type_, "measObject"); - return c.get(); - } - const sl_meas_obj_r16_s& meas_obj_relay_r17() const - { - assert_choice_type(types::meas_obj_relay_r17, type_, "measObject"); - return c.get(); - } - meas_obj_nr_s& set_meas_obj_nr(); - meas_obj_eutra_s& set_meas_obj_eutra(); - meas_obj_utra_fdd_r16_s& set_meas_obj_utra_fdd_r16(); - meas_obj_nr_sl_r16_s& set_meas_obj_nr_sl_r16(); - meas_obj_cli_r16_s& set_meas_obj_cli_r16(); - meas_obj_rx_tx_diff_r17_s& set_meas_obj_rx_tx_diff_r17(); - sl_meas_obj_r16_s& set_meas_obj_relay_r17(); - - private: - types type_; - 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; - -// PosMeasGapPreConfigToAddModList-r17 ::= SEQUENCE (SIZE (1..16)) OF PosGapConfig-r17 -using pos_meas_gap_pre_cfg_to_add_mod_list_r17_l = dyn_array; - -// PosMeasGapPreConfigToReleaseList-r17 ::= SEQUENCE (SIZE (1..16)) OF INTEGER (1..16) -using pos_meas_gap_pre_cfg_to_release_list_r17_l = bounded_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; -}; - -// QuantityConfigUTRA-FDD-r16 ::= SEQUENCE -struct quant_cfg_utra_fdd_r16_s { - bool filt_coef_rs_cp_r16_present = false; - bool filt_coef_ec_no_r16_present = false; - filt_coef_e filt_coef_rs_cp_r16; - filt_coef_e filt_coef_ec_no_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCReconfiguration-v1560-IEs ::= SEQUENCE -struct rrc_recfg_v1560_ies_s { - bool mrdc_secondary_cell_group_cfg_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; - rrc_recfg_v1610_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; -}; - -// RRCRelease-v1650-IEs ::= SEQUENCE -struct rrc_release_v1650_ies_s { - bool mps_prio_ind_r16_present = false; - bool non_crit_ext_present = false; - rrc_release_v1710_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; -}; - -// RRCResume-v1700-IEs ::= SEQUENCE -struct rrc_resume_v1700_ies_s { - bool sl_cfg_ded_nr_r17_present = false; - bool sl_l2_remote_ue_cfg_r17_present = false; - bool need_for_gap_ncsg_cfg_nr_r17_present = false; - bool need_for_gap_ncsg_cfg_eutra_r17_present = false; - bool scg_state_r17_present = false; - bool app_layer_meas_cfg_r17_present = false; - bool non_crit_ext_present = false; - setup_release_c sl_cfg_ded_nr_r17; - setup_release_c sl_l2_remote_ue_cfg_r17; - setup_release_c need_for_gap_ncsg_cfg_nr_r17; - setup_release_c need_for_gap_ncsg_cfg_eutra_r17; - app_layer_meas_cfg_r17_s app_layer_meas_cfg_r17; - - // 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 { report_cfg_nr, /*...*/ report_cfg_inter_rat, report_cfg_nr_sl_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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_(); } - 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() - { - assert_choice_type(types::report_cfg_nr, type_, "reportConfig"); - return c.get(); - } - report_cfg_inter_rat_s& report_cfg_inter_rat() - { - assert_choice_type(types::report_cfg_inter_rat, type_, "reportConfig"); - return c.get(); - } - report_cfg_nr_sl_r16_s& report_cfg_nr_sl_r16() - { - assert_choice_type(types::report_cfg_nr_sl_r16, type_, "reportConfig"); - return c.get(); - } - const report_cfg_nr_s& report_cfg_nr() const - { - assert_choice_type(types::report_cfg_nr, type_, "reportConfig"); - return c.get(); - } - const report_cfg_inter_rat_s& report_cfg_inter_rat() const - { - assert_choice_type(types::report_cfg_inter_rat, type_, "reportConfig"); - return c.get(); - } - const report_cfg_nr_sl_r16_s& report_cfg_nr_sl_r16() const - { - assert_choice_type(types::report_cfg_nr_sl_r16, type_, "reportConfig"); - return c.get(); - } - report_cfg_nr_s& set_report_cfg_nr(); - report_cfg_inter_rat_s& set_report_cfg_inter_rat(); - report_cfg_nr_sl_r16_s& set_report_cfg_nr_sl_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // 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; -}; - -// AreaConfiguration-v1700 ::= SEQUENCE -struct area_cfg_v1700_s { - using inter_freq_target_list_r17_l_ = dyn_array; - - // member variables - bool area_cfg_r17_present = false; - area_cfg_r16_c area_cfg_r17; - inter_freq_target_list_r17_l_ inter_freq_target_list_r17; - - // 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; -}; - -// DLInformationTransfer-v1700-IEs ::= SEQUENCE -struct dl_info_transfer_v1700_ies_s { - struct ta_pdc_r17_opts { - enum options { activ, deactiv, nulltype } value; - - const char* to_string() const; - }; - using ta_pdc_r17_e_ = enumerated; - - // member variables - bool rx_tx_time_diff_gnb_r17_present = false; - bool ta_pdc_r17_present = false; - bool sib9_fallback_r17_present = false; - bool non_crit_ext_present = false; - dyn_octstring ded_info_f1c_r17; - rx_tx_time_diff_r17_s rx_tx_time_diff_gnb_r17; - ta_pdc_r17_e_ ta_pdc_r17; - - // 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; -}; - -// EventType-r16 ::= CHOICE -struct event_type_r16_c { - struct event_l1_s_ { - meas_trigger_quant_c l1_thres; - uint8_t hysteresis = 0; - time_to_trigger_e time_to_trigger; - }; - struct types_opts { - enum options { out_of_coverage, event_l1, /*...*/ nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - event_type_r16_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 - event_l1_s_& event_l1() - { - assert_choice_type(types::event_l1, type_, "EventType-r16"); - return c; - } - const event_l1_s_& event_l1() const - { - assert_choice_type(types::event_l1, type_, "EventType-r16"); - return c; - } - void set_out_of_coverage(); - event_l1_s_& set_event_l1(); - -private: - types type_; - event_l1_s_ c; -}; - -// ExtendedPagingCycle-r17 ::= ENUMERATED -struct extended_paging_cycle_r17_opts { - enum options { rf256, rf512, rf1024, spare1, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; -}; -using extended_paging_cycle_r17_e = enumerated; - -// FreqPriorityListDedicatedSlicing-r17 ::= SEQUENCE (SIZE (1..8)) OF FreqPriorityDedicatedSlicing-r17 -using freq_prio_list_ded_slicing_r17_l = dyn_array; - -// 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; - -// LoggingInterval-r16 ::= ENUMERATED -struct logging_interv_r16_opts { - enum options { - ms320, - ms640, - ms1280, - ms2560, - ms5120, - ms10240, - ms20480, - ms30720, - ms40960, - ms61440, - infinity, - nulltype - } value; - typedef int32_t number_type; - - const char* to_string() const; - int32_t to_number() const; -}; -using logging_interv_r16_e = enumerated; - -// MasterKeyUpdate ::= SEQUENCE -struct master_key_upd_s { - bool ext = 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 { - using gap_to_add_mod_list_r17_l_ = dyn_array; - using gap_to_release_list_r17_l_ = bounded_array; - - // member variables - bool ext = false; - bool gap_fr2_present = false; - setup_release_c gap_fr2; - // ... - // group 0 - copy_ptr> gap_fr1; - copy_ptr> gap_ue; - // group 1 - copy_ptr gap_to_add_mod_list_r17; - copy_ptr gap_to_release_list_r17; - copy_ptr pos_meas_gap_pre_cfg_to_add_mod_list_r17; - copy_ptr pos_meas_gap_pre_cfg_to_release_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using delay_budget_report_prohibit_timer_e_ = enumerated; - - // member variables - delay_budget_report_prohibit_timer_e_ delay_budget_report_prohibit_timer; - }; - struct types_opts { - enum options { release, setup, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::setup, type_, "delayBudgetReportingConfig"); - return c; - } - const setup_s_& setup() const - { - assert_choice_type(types::setup, type_, "delayBudgetReportingConfig"); - return c; - } - void set_release(); - setup_s_& set_setup(); - - private: - types type_; - setup_s_ c; - }; - - // member variables - 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; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - const char* to_string() const; - uint16_t to_number() const; -}; -using periodic_rnau_timer_value_e = enumerated; - -// QuantityConfig ::= SEQUENCE -struct quant_cfg_s { - using quant_cfg_nr_list_l_ = dyn_array; - - // member variables - bool ext = false; - quant_cfg_nr_list_l_ quant_cfg_nr_list; - // ... - // group 0 - copy_ptr quant_cfg_eutra; - // group 1 - copy_ptr quant_cfg_utra_fdd_r16; - copy_ptr quant_cfg_cli_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RAN-NotificationAreaInfo ::= CHOICE -struct ran_notif_area_info_c { - struct types_opts { - enum options { cell_list, ran_area_cfg_list, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::cell_list, type_, "RAN-NotificationAreaInfo"); - return c.get(); - } - plmn_ran_area_cfg_list_l& ran_area_cfg_list() - { - assert_choice_type(types::ran_area_cfg_list, type_, "RAN-NotificationAreaInfo"); - return c.get(); - } - const plmn_ran_area_cell_list_l& cell_list() const - { - assert_choice_type(types::cell_list, type_, "RAN-NotificationAreaInfo"); - return c.get(); - } - const plmn_ran_area_cfg_list_l& ran_area_cfg_list() const - { - assert_choice_type(types::ran_area_cfg_list, type_, "RAN-NotificationAreaInfo"); - return c.get(); - } - plmn_ran_area_cell_list_l& set_cell_list(); - plmn_ran_area_cfg_list_l& set_ran_area_cfg_list(); - -private: - 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; - rrc_recfg_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; -}; - -// RRCRelease-v1610-IEs ::= SEQUENCE -struct rrc_release_v1610_ies_s { - bool voice_fallback_ind_r16_present = false; - bool meas_idle_cfg_r16_present = false; - bool non_crit_ext_present = false; - setup_release_c meas_idle_cfg_r16; - rrc_release_v1650_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; -}; - -// RRCResume-v1610-IEs ::= SEQUENCE -struct rrc_resume_v1610_ies_s { - struct mrdc_secondary_cell_group_r16_c_ { - struct types_opts { - enum options { nr_scg_r16, eutra_scg_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - mrdc_secondary_cell_group_r16_c_() = default; - mrdc_secondary_cell_group_r16_c_(const mrdc_secondary_cell_group_r16_c_& other); - mrdc_secondary_cell_group_r16_c_& operator=(const mrdc_secondary_cell_group_r16_c_& other); - ~mrdc_secondary_cell_group_r16_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_r16() - { - assert_choice_type(types::nr_scg_r16, type_, "mrdc-SecondaryCellGroup-r16"); - return c.get(); - } - dyn_octstring& eutra_scg_r16() - { - assert_choice_type(types::eutra_scg_r16, type_, "mrdc-SecondaryCellGroup-r16"); - return c.get(); - } - const dyn_octstring& nr_scg_r16() const - { - assert_choice_type(types::nr_scg_r16, type_, "mrdc-SecondaryCellGroup-r16"); - return c.get(); - } - const dyn_octstring& eutra_scg_r16() const - { - assert_choice_type(types::eutra_scg_r16, type_, "mrdc-SecondaryCellGroup-r16"); - return c.get(); - } - dyn_octstring& set_nr_scg_r16(); - dyn_octstring& set_eutra_scg_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool idle_mode_meas_req_r16_present = false; - bool restore_mcg_scells_r16_present = false; - bool restore_scg_r16_present = false; - bool mrdc_secondary_cell_group_r16_present = false; - bool need_for_gaps_cfg_nr_r16_present = false; - bool non_crit_ext_present = false; - mrdc_secondary_cell_group_r16_c_ mrdc_secondary_cell_group_r16; - setup_release_c need_for_gaps_cfg_nr_r16; - rrc_resume_v1700_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; -}; - -// 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using cn_type_e_ = enumerated; - - // member variables - bool cn_type_present = false; - uint32_t eutra_freq = 0; - cn_type_e_ cn_type; - - // 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..64)) OF ReportConfigToAddMod -using report_cfg_to_add_mod_list_l = dyn_array; - -// ReportConfigToRemoveList ::= SEQUENCE (SIZE (1..64)) OF INTEGER (1..64) -using report_cfg_to_rem_list_l = dyn_array; - -// SDT-Config-r17 ::= SEQUENCE -struct sdt_cfg_r17_s { - using sdt_drb_list_r17_l_ = bounded_array; - struct sdt_drb_continue_rohc_r17_opts { - enum options { cell, rna, nulltype } value; - - const char* to_string() const; - }; - using sdt_drb_continue_rohc_r17_e_ = enumerated; - - // member variables - bool sdt_drb_list_r17_present = false; - bool sdt_srb2_ind_r17_present = false; - bool sdt_mac_phy_cg_cfg_r17_present = false; - bool sdt_drb_continue_rohc_r17_present = false; - sdt_drb_list_r17_l_ sdt_drb_list_r17; - setup_release_c sdt_mac_phy_cg_cfg_r17; - sdt_drb_continue_rohc_r17_e_ sdt_drb_continue_rohc_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UE-CapabilityRAT-Request ::= SEQUENCE -struct ue_cap_rat_request_s { - bool ext = false; - rat_type_e rat_type; - dyn_octstring cap_request_filt; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AreaConfiguration-r16 ::= SEQUENCE -struct area_cfg_r16_s { - using inter_freq_target_list_r16_l_ = dyn_array; - - // member variables - area_cfg_r16_c area_cfg_r16; - inter_freq_target_list_r16_l_ inter_freq_target_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using t320_e_ = enumerated; - - // member variables - bool ext = 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; - // ... - // group 0 - copy_ptr freq_prio_list_ded_slicing_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// DLInformationTransfer-v1610-IEs ::= SEQUENCE -struct dl_info_transfer_v1610_ies_s { - bool ref_time_info_r16_present = false; - bool non_crit_ext_present = false; - ref_time_info_r16_s ref_time_info_r16; - dl_info_transfer_v1700_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; -}; - -// DRB-CountMSB-InfoList ::= SEQUENCE (SIZE (1..29)) OF DRB-CountMSB-Info -using drb_count_msb_info_list_l = dyn_array; - -// LoggedEventTriggerConfig-r16 ::= SEQUENCE -struct logged_event_trigger_cfg_r16_s { - bool ext = false; - event_type_r16_c event_type_r16; - logging_interv_r16_e logging_interv_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// LoggedMeasurementConfiguration-v1700-IEs ::= SEQUENCE -struct logged_meas_cfg_v1700_ies_s { - bool sig_logged_meas_type_r17_present = false; - bool early_meas_ind_r17_present = false; - bool area_cfg_v1700_present = false; - bool non_crit_ext_present = false; - area_cfg_v1700_s area_cfg_v1700; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// LoggedPeriodicalReportConfig-r16 ::= SEQUENCE -struct logged_periodical_report_cfg_r16_s { - bool ext = false; - logging_interv_r16_e logging_interv_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// LoggingDuration-r16 ::= ENUMERATED -struct logging_dur_r16_opts { - enum options { min10, min20, min40, min60, min90, min120, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; -}; -using logging_dur_r16_e = enumerated; - -// MeasConfig ::= SEQUENCE -struct meas_cfg_s { - struct s_measure_cfg_c_ { - struct types_opts { - enum options { ssb_rsrp, csi_rsrp, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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_(); } - 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() - { - assert_choice_type(types::ssb_rsrp, type_, "s-MeasureConfig"); - return c.get(); - } - uint8_t& csi_rsrp() - { - assert_choice_type(types::csi_rsrp, type_, "s-MeasureConfig"); - return c.get(); - } - const uint8_t& ssb_rsrp() const - { - assert_choice_type(types::ssb_rsrp, type_, "s-MeasureConfig"); - return c.get(); - } - const uint8_t& csi_rsrp() const - { - assert_choice_type(types::csi_rsrp, type_, "s-MeasureConfig"); - return c.get(); - } - uint8_t& set_ssb_rsrp(); - uint8_t& set_csi_rsrp(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool ext = 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; - // ... - // group 0 - bool interfreq_cfg_no_gap_r16_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MobilityFromNRCommand-v1610-IEs ::= SEQUENCE -struct mob_from_nr_cmd_v1610_ies_s { - bool voice_fallback_ind_r16_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; -}; - -// PLMN-IdentityList2-r16 ::= SEQUENCE (SIZE (1..16)) OF PLMN-Identity -using plmn_id_list2_r16_l = dyn_array; - -// RRCReconfiguration-v1530-IEs ::= SEQUENCE -struct rrc_recfg_v1530_ies_s { - using ded_nas_msg_list_l_ = bounded_array; - - // member variables - bool full_cfg_present = false; - bool master_key_upd_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; -}; - -// RRCReestablishment-v1700-IEs ::= SEQUENCE -struct rrc_reest_v1700_ies_s { - bool sl_l2_remote_ue_cfg_r17_present = false; - bool non_crit_ext_present = false; - setup_release_c sl_l2_remote_ue_cfg_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - rrc_release_v1610_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; -}; - -// RRCResume-v1560-IEs ::= SEQUENCE -struct rrc_resume_v1560_ies_s { - bool sk_counter_present = false; - bool non_crit_ext_present = false; - dyn_octstring radio_bearer_cfg2; - uint32_t sk_counter = 0; - rrc_resume_v1610_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; -}; - -// RedirectedCarrierInfo ::= CHOICE -struct redirected_carrier_info_c { - struct types_opts { - enum options { nr, eutra, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::nr, type_, "RedirectedCarrierInfo"); - return c.get(); - } - redirected_carrier_info_eutra_s& eutra() - { - assert_choice_type(types::eutra, type_, "RedirectedCarrierInfo"); - return c.get(); - } - const carrier_info_nr_s& nr() const - { - assert_choice_type(types::nr, type_, "RedirectedCarrierInfo"); - return c.get(); - } - const redirected_carrier_info_eutra_s& eutra() const - { - assert_choice_type(types::eutra, type_, "RedirectedCarrierInfo"); - return c.get(); - } - carrier_info_nr_s& set_nr(); - redirected_carrier_info_eutra_s& set_eutra(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// SecurityConfigSMC ::= SEQUENCE -struct security_cfg_smc_s { - bool ext = false; - security_algorithm_cfg_s security_algorithm_cfg; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - // ... - // group 0 - bool sl_ue_id_remote_r17_present = false; - bool ran_extended_paging_cycle_r17_present = false; - uint32_t sl_ue_id_remote_r17 = 0; - copy_ptr> sdt_cfg_r17; - copy_ptr> srs_pos_rrc_inactive_r17; - extended_paging_cycle_r17_e ran_extended_paging_cycle_r17; - // group 1 - copy_ptr> ncd_ssb_red_cap_init_bwp_sdt_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - -// UEInformationRequest-v1700-IEs ::= SEQUENCE -struct ue_info_request_v1700_ies_s { - bool success_ho_report_req_r17_present = false; - bool coarse_location_request_r17_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; -}; - -// CounterCheck-IEs ::= SEQUENCE -struct counter_check_ies_s { - 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; -}; - -// DLDedicatedMessageSegment-r16-IEs ::= SEQUENCE -struct dl_ded_msg_segment_r16_ies_s { - struct rrc_msg_segment_type_r16_opts { - enum options { not_last_segment, last_segment, nulltype } value; - - const char* to_string() const; - }; - using rrc_msg_segment_type_r16_e_ = enumerated; - - // member variables - bool non_crit_ext_present = false; - uint8_t segment_num_r16 = 0; - dyn_octstring rrc_msg_segment_container_r16; - rrc_msg_segment_type_r16_e_ rrc_msg_segment_type_r16; - 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; -}; - -// DLInformationTransfer-IEs ::= SEQUENCE -struct dl_info_transfer_ies_s { - bool non_crit_ext_present = false; - dyn_octstring ded_nas_msg; - dyn_octstring late_non_crit_ext; - dl_info_transfer_v1610_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; -}; - -// DLInformationTransferMRDC-r16-IEs ::= SEQUENCE -struct dl_info_transfer_mrdc_r16_ies_s { - bool non_crit_ext_present = false; - dyn_octstring dl_dcch_msg_nr_r16; - dyn_octstring dl_dcch_msg_eutra_r16; - 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; -}; - -// LoggedMeasurementConfiguration-r16-IEs ::= SEQUENCE -struct logged_meas_cfg_r16_ies_s { - struct report_type_c_ { - struct types_opts { - enum options { periodical, event_triggered, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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 - logged_periodical_report_cfg_r16_s& periodical() - { - assert_choice_type(types::periodical, type_, "reportType"); - return c.get(); - } - logged_event_trigger_cfg_r16_s& event_triggered() - { - assert_choice_type(types::event_triggered, type_, "reportType"); - return c.get(); - } - const logged_periodical_report_cfg_r16_s& periodical() const - { - assert_choice_type(types::periodical, type_, "reportType"); - return c.get(); - } - const logged_event_trigger_cfg_r16_s& event_triggered() const - { - assert_choice_type(types::event_triggered, type_, "reportType"); - return c.get(); - } - logged_periodical_report_cfg_r16_s& set_periodical(); - logged_event_trigger_cfg_r16_s& set_event_triggered(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool area_cfg_r16_present = false; - bool bt_name_list_r16_present = false; - bool wlan_name_list_r16_present = false; - bool sensor_name_list_r16_present = false; - bool non_crit_ext_present = false; - trace_ref_r16_s trace_ref_r16; - fixed_octstring<2> trace_recording_session_ref_r16; - fixed_octstring<1> tce_id_r16; - fixed_bitstring<48> absolute_time_info_r16; - area_cfg_r16_s area_cfg_r16; - plmn_id_list2_r16_l plmn_id_list_r16; - setup_release_c, 1, 4>> bt_name_list_r16; - setup_release_c, 1, 4>> wlan_name_list_r16; - setup_release_c sensor_name_list_r16; - logging_dur_r16_e logging_dur_r16; - report_type_c_ report_type; - dyn_octstring late_non_crit_ext; - logged_meas_cfg_v1700_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; -}; - -// MobilityFromNRCommand-IEs ::= SEQUENCE -struct mob_from_nr_cmd_ies_s { - struct target_rat_type_opts { - enum options { eutra, utra_fdd_v1610, spare2, spare1, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using target_rat_type_e_ = enumerated; - - // member variables - 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; - mob_from_nr_cmd_v1610_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; -}; - -// RRCReconfiguration-IEs ::= SEQUENCE -struct rrc_recfg_ies_s { - bool radio_bearer_cfg_present = false; - bool meas_cfg_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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCReestablishment-IEs ::= SEQUENCE -struct rrc_reest_ies_s { - bool non_crit_ext_present = false; - uint8_t next_hop_chaining_count = 0; - dyn_octstring late_non_crit_ext; - rrc_reest_v1700_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; -}; - -// RRCRelease-IEs ::= SEQUENCE -struct rrc_release_ies_s { - struct depriorit_req_s_ { - struct depriorit_type_opts { - enum options { freq, nr, nulltype } value; - - const char* to_string() const; - }; - using depriorit_type_e_ = enumerated; - struct depriorit_timer_opts { - enum options { min5, min10, min15, min30, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using depriorit_timer_e_ = enumerated; - - // member variables - depriorit_type_e_ depriorit_type; - depriorit_timer_e_ depriorit_timer; - }; - - // 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 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCResume-IEs ::= SEQUENCE -struct rrc_resume_ies_s { - bool radio_bearer_cfg_present = false; - bool meas_cfg_present = false; - bool full_cfg_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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SecurityModeCommand-IEs ::= SEQUENCE -struct security_mode_cmd_ies_s { - 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UECapabilityEnquiry-IEs ::= SEQUENCE -struct ue_cap_enquiry_ies_s { - 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UEInformationRequest-r16-IEs ::= SEQUENCE -struct ue_info_request_r16_ies_s { - bool idle_mode_meas_req_r16_present = false; - bool log_meas_report_req_r16_present = false; - bool conn_est_fail_report_req_r16_present = false; - bool ra_report_req_r16_present = false; - bool rlf_report_req_r16_present = false; - bool mob_history_report_req_r16_present = false; - bool non_crit_ext_present = false; - dyn_octstring late_non_crit_ext; - ue_info_request_v1700_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; -}; - -// CounterCheck ::= SEQUENCE -struct counter_check_s { - struct crit_exts_c_ { - struct types_opts { - enum options { counter_check, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - counter_check_ies_s& counter_check() - { - assert_choice_type(types::counter_check, type_, "criticalExtensions"); - return c; - } - const counter_check_ies_s& counter_check() const - { - assert_choice_type(types::counter_check, type_, "criticalExtensions"); - return c; - } - counter_check_ies_s& set_counter_check(); - void set_crit_exts_future(); - - private: - types type_; - counter_check_ies_s c; - }; - - // 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; -}; - -// DLDedicatedMessageSegment-r16 ::= SEQUENCE -struct dl_ded_msg_segment_r16_s { - struct crit_exts_c_ { - struct types_opts { - enum options { dl_ded_msg_segment_r16, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - dl_ded_msg_segment_r16_ies_s& dl_ded_msg_segment_r16() - { - assert_choice_type(types::dl_ded_msg_segment_r16, type_, "criticalExtensions"); - return c; - } - const dl_ded_msg_segment_r16_ies_s& dl_ded_msg_segment_r16() const - { - assert_choice_type(types::dl_ded_msg_segment_r16, type_, "criticalExtensions"); - return c; - } - dl_ded_msg_segment_r16_ies_s& set_dl_ded_msg_segment_r16(); - void set_crit_exts_future(); - - private: - types type_; - dl_ded_msg_segment_r16_ies_s c; - }; - - // 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; -}; - -// DLInformationTransfer ::= SEQUENCE -struct dl_info_transfer_s { - struct crit_exts_c_ { - struct types_opts { - enum options { dl_info_transfer, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - dl_info_transfer_ies_s& dl_info_transfer() - { - assert_choice_type(types::dl_info_transfer, type_, "criticalExtensions"); - return c; - } - const dl_info_transfer_ies_s& dl_info_transfer() const - { - assert_choice_type(types::dl_info_transfer, type_, "criticalExtensions"); - return c; - } - dl_info_transfer_ies_s& set_dl_info_transfer(); - void set_crit_exts_future(); - - private: - types type_; - dl_info_transfer_ies_s c; - }; - - // 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; -}; - -// DLInformationTransferMRDC-r16 ::= SEQUENCE -struct dl_info_transfer_mrdc_r16_s { - struct crit_exts_c_ { - struct c1_c_ { - struct types_opts { - enum options { dl_info_transfer_mrdc_r16, spare3, spare2, spare1, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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 - dl_info_transfer_mrdc_r16_ies_s& dl_info_transfer_mrdc_r16() - { - assert_choice_type(types::dl_info_transfer_mrdc_r16, type_, "c1"); - return c; - } - const dl_info_transfer_mrdc_r16_ies_s& dl_info_transfer_mrdc_r16() const - { - assert_choice_type(types::dl_info_transfer_mrdc_r16, type_, "c1"); - return c; - } - dl_info_transfer_mrdc_r16_ies_s& set_dl_info_transfer_mrdc_r16(); - void set_spare3(); - void set_spare2(); - void set_spare1(); - - private: - types type_; - dl_info_transfer_mrdc_r16_ies_s c; - }; - struct types_opts { - enum options { c1, crit_exts_future, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - c1_c_& c1() - { - assert_choice_type(types::c1, type_, "criticalExtensions"); - return c; - } - const c1_c_& c1() const - { - assert_choice_type(types::c1, type_, "criticalExtensions"); - return c; - } - c1_c_& set_c1(); - void set_crit_exts_future(); - - private: - types type_; - c1_c_ c; - }; - - // 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; -}; - -// LoggedMeasurementConfiguration-r16 ::= SEQUENCE -struct logged_meas_cfg_r16_s { - struct crit_exts_c_ { - struct types_opts { - enum options { logged_meas_cfg_r16, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - logged_meas_cfg_r16_ies_s& logged_meas_cfg_r16() - { - assert_choice_type(types::logged_meas_cfg_r16, type_, "criticalExtensions"); - return c; - } - const logged_meas_cfg_r16_ies_s& logged_meas_cfg_r16() const - { - assert_choice_type(types::logged_meas_cfg_r16, type_, "criticalExtensions"); - return c; - } - logged_meas_cfg_r16_ies_s& set_logged_meas_cfg_r16(); - void set_crit_exts_future(); - - private: - types type_; - logged_meas_cfg_r16_ies_s c; - }; - - // 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; -}; - -// 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; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - mob_from_nr_cmd_ies_s& mob_from_nr_cmd() - { - assert_choice_type(types::mob_from_nr_cmd, type_, "criticalExtensions"); - return c; - } - const mob_from_nr_cmd_ies_s& mob_from_nr_cmd() const - { - assert_choice_type(types::mob_from_nr_cmd, type_, "criticalExtensions"); - return c; - } - mob_from_nr_cmd_ies_s& set_mob_from_nr_cmd(); - void set_crit_exts_future(); - - private: - types type_; - mob_from_nr_cmd_ies_s c; - }; - - // 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; -}; - -// RRCReconfiguration ::= SEQUENCE -struct rrc_recfg_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_recfg, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - rrc_recfg_ies_s& rrc_recfg() - { - assert_choice_type(types::rrc_recfg, type_, "criticalExtensions"); - return c; - } - const rrc_recfg_ies_s& rrc_recfg() const - { - assert_choice_type(types::rrc_recfg, type_, "criticalExtensions"); - return c; - } - rrc_recfg_ies_s& set_rrc_recfg(); - void set_crit_exts_future(); - - private: - types type_; - rrc_recfg_ies_s c; - }; - - // 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; -}; - -// RRCReestablishment ::= SEQUENCE -struct rrc_reest_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_reest, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - rrc_reest_ies_s& rrc_reest() - { - assert_choice_type(types::rrc_reest, type_, "criticalExtensions"); - return c; - } - const rrc_reest_ies_s& rrc_reest() const - { - assert_choice_type(types::rrc_reest, type_, "criticalExtensions"); - return c; - } - rrc_reest_ies_s& set_rrc_reest(); - void set_crit_exts_future(); - - private: - types type_; - rrc_reest_ies_s c; - }; - - // 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; -}; - -// RRCRelease ::= SEQUENCE -struct rrc_release_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_release, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - rrc_release_ies_s& rrc_release() - { - assert_choice_type(types::rrc_release, type_, "criticalExtensions"); - return c; - } - const rrc_release_ies_s& rrc_release() const - { - assert_choice_type(types::rrc_release, type_, "criticalExtensions"); - return c; - } - rrc_release_ies_s& set_rrc_release(); - void set_crit_exts_future(); - - private: - types type_; - rrc_release_ies_s c; - }; - - // 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; -}; - -// RRCResume ::= SEQUENCE -struct rrc_resume_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_resume, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - rrc_resume_ies_s& rrc_resume() - { - assert_choice_type(types::rrc_resume, type_, "criticalExtensions"); - return c; - } - const rrc_resume_ies_s& rrc_resume() const - { - assert_choice_type(types::rrc_resume, type_, "criticalExtensions"); - return c; - } - rrc_resume_ies_s& set_rrc_resume(); - void set_crit_exts_future(); - - private: - types type_; - rrc_resume_ies_s c; - }; - - // 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; -}; - -// SecurityModeCommand ::= SEQUENCE -struct security_mode_cmd_s { - struct crit_exts_c_ { - struct types_opts { - enum options { security_mode_cmd, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - security_mode_cmd_ies_s& security_mode_cmd() - { - assert_choice_type(types::security_mode_cmd, type_, "criticalExtensions"); - return c; - } - const security_mode_cmd_ies_s& security_mode_cmd() const - { - assert_choice_type(types::security_mode_cmd, type_, "criticalExtensions"); - return c; - } - security_mode_cmd_ies_s& set_security_mode_cmd(); - void set_crit_exts_future(); - - private: - types type_; - security_mode_cmd_ies_s c; - }; - - // 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; -}; - -// UECapabilityEnquiry ::= SEQUENCE -struct ue_cap_enquiry_s { - struct crit_exts_c_ { - struct types_opts { - enum options { ue_cap_enquiry, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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_enquiry_ies_s& ue_cap_enquiry() - { - assert_choice_type(types::ue_cap_enquiry, type_, "criticalExtensions"); - return c; - } - const ue_cap_enquiry_ies_s& ue_cap_enquiry() const - { - assert_choice_type(types::ue_cap_enquiry, type_, "criticalExtensions"); - return c; - } - ue_cap_enquiry_ies_s& set_ue_cap_enquiry(); - void set_crit_exts_future(); - - private: - types type_; - ue_cap_enquiry_ies_s c; - }; - - // 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; -}; +struct rrc_recfg_s; +struct rrc_resume_s; +struct rrc_release_s; +struct rrc_reest_s; +struct security_mode_cmd_s; +struct dl_info_transfer_s; +struct ue_cap_enquiry_s; +struct counter_check_s; +struct mob_from_nr_cmd_s; +struct dl_ded_msg_segment_r16_s; +struct ue_info_request_r16_s; +struct dl_info_transfer_mrdc_r16_s; +struct logged_meas_cfg_r16_s; -// UEInformationRequest-r16 ::= SEQUENCE -struct ue_info_request_r16_s { - struct crit_exts_c_ { - struct types_opts { - enum options { ue_info_request_r16, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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_info_request_r16_ies_s& ue_info_request_r16() - { - assert_choice_type(types::ue_info_request_r16, type_, "criticalExtensions"); - return c; - } - const ue_info_request_r16_ies_s& ue_info_request_r16() const - { - assert_choice_type(types::ue_info_request_r16, type_, "criticalExtensions"); - return c; - } - ue_info_request_r16_ies_s& set_ue_info_request_r16(); - void set_crit_exts_future(); - - private: - types type_; - ue_info_request_r16_ies_s c; - }; - - // 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; -}; +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ // DL-DCCH-MessageType ::= CHOICE struct dl_dcch_msg_type_c { @@ -7037,9 +69,6 @@ struct dl_dcch_msg_type_c { // 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; @@ -7194,23 +223,8 @@ struct dl_dcch_msg_type_c { void set_spare1(); private: - types type_; - choice_buffer_t - c; - - void destroy_(); + types type_; + choice_buffer_ptr c; }; struct types_opts { enum options { c1, msg_class_ext, nulltype } value; diff --git a/include/srsran/asn1/rrc_nr/dl_dcch_msg_ies.h b/include/srsran/asn1/rrc_nr/dl_dcch_msg_ies.h new file mode 100644 index 0000000000..8883c7396f --- /dev/null +++ b/include/srsran/asn1/rrc_nr/dl_dcch_msg_ies.h @@ -0,0 +1,6895 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "dl_ccch_msg_ies.h" +#include "sys_info.h" + +namespace asn1 { +namespace rrc_nr { + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// MUSIM-Starting-SFN-AndSubframe-r17 ::= SEQUENCE +struct mu_si_m_start_sfn_and_sf_r17_s { + uint16_t start_sfn_r17 = 0; + uint8_t start_sf_r17 = 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-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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // 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(types::ms4, type_, "slotConfig"); + return c.get(); + } + uint8_t& ms5() + { + assert_choice_type(types::ms5, type_, "slotConfig"); + return c.get(); + } + uint8_t& ms10() + { + assert_choice_type(types::ms10, type_, "slotConfig"); + return c.get(); + } + uint8_t& ms20() + { + assert_choice_type(types::ms20, type_, "slotConfig"); + return c.get(); + } + uint16_t& ms40() + { + assert_choice_type(types::ms40, type_, "slotConfig"); + return c.get(); + } + const uint8_t& ms4() const + { + assert_choice_type(types::ms4, type_, "slotConfig"); + return c.get(); + } + const uint8_t& ms5() const + { + assert_choice_type(types::ms5, type_, "slotConfig"); + return c.get(); + } + const uint8_t& ms10() const + { + assert_choice_type(types::ms10, type_, "slotConfig"); + return c.get(); + } + const uint8_t& ms20() const + { + assert_choice_type(types::ms20, type_, "slotConfig"); + return c.get(); + } + const uint16_t& ms40() const + { + assert_choice_type(types::ms40, type_, "slotConfig"); + return c.get(); + } + uint8_t& set_ms4(); + uint8_t& set_ms5(); + uint8_t& set_ms10(); + uint8_t& set_ms20(); + uint16_t& set_ms40(); + + 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // 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(types::row1, type_, "frequencyDomainAllocation"); + return c.get>(); + } + fixed_bitstring<12>& row2() + { + assert_choice_type(types::row2, type_, "frequencyDomainAllocation"); + return c.get>(); + } + const fixed_bitstring<4>& row1() const + { + assert_choice_type(types::row1, type_, "frequencyDomainAllocation"); + return c.get>(); + } + const fixed_bitstring<12>& row2() const + { + assert_choice_type(types::row2, type_, "frequencyDomainAllocation"); + return c.get>(); + } + fixed_bitstring<4>& set_row1(); + fixed_bitstring<12>& set_row2(); + + private: + types type_; + choice_buffer_t> c; + + void destroy_(); + }; + struct slot_cfg_r17_c_ { + struct types_opts { + enum options { ms4, ms5, ms10, ms20, ms40, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + slot_cfg_r17_c_() = default; + slot_cfg_r17_c_(const slot_cfg_r17_c_& other); + slot_cfg_r17_c_& operator=(const slot_cfg_r17_c_& other); + ~slot_cfg_r17_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& ms4() + { + assert_choice_type(types::ms4, type_, "slotConfig-r17"); + return c.get(); + } + uint16_t& ms5() + { + assert_choice_type(types::ms5, type_, "slotConfig-r17"); + return c.get(); + } + uint16_t& ms10() + { + assert_choice_type(types::ms10, type_, "slotConfig-r17"); + return c.get(); + } + uint16_t& ms20() + { + assert_choice_type(types::ms20, type_, "slotConfig-r17"); + return c.get(); + } + uint16_t& ms40() + { + assert_choice_type(types::ms40, type_, "slotConfig-r17"); + return c.get(); + } + const uint16_t& ms4() const + { + assert_choice_type(types::ms4, type_, "slotConfig-r17"); + return c.get(); + } + const uint16_t& ms5() const + { + assert_choice_type(types::ms5, type_, "slotConfig-r17"); + return c.get(); + } + const uint16_t& ms10() const + { + assert_choice_type(types::ms10, type_, "slotConfig-r17"); + return c.get(); + } + const uint16_t& ms20() const + { + assert_choice_type(types::ms20, type_, "slotConfig-r17"); + return c.get(); + } + const uint16_t& ms40() const + { + assert_choice_type(types::ms40, type_, "slotConfig-r17"); + return c.get(); + } + uint16_t& set_ms4(); + uint16_t& set_ms5(); + uint16_t& set_ms10(); + uint16_t& set_ms20(); + uint16_t& set_ms40(); + + private: + types type_; + pod_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; + // ... + // group 0 + copy_ptr slot_cfg_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MUSIM-GapInfo-r17 ::= SEQUENCE +struct mu_si_m_gap_info_r17_s { + struct musim_gap_len_r17_opts { + enum options { ms3, ms4, ms6, ms10, ms20, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using musim_gap_len_r17_e_ = enumerated; + struct musim_gap_repeat_and_offset_r17_c_ { + struct types_opts { + enum options { + ms20_r17, + ms40_r17, + ms80_r17, + ms160_r17, + ms320_r17, + ms640_r17, + ms1280_r17, + ms2560_r17, + ms5120_r17, + // ... + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + musim_gap_repeat_and_offset_r17_c_() = default; + musim_gap_repeat_and_offset_r17_c_(const musim_gap_repeat_and_offset_r17_c_& other); + musim_gap_repeat_and_offset_r17_c_& operator=(const musim_gap_repeat_and_offset_r17_c_& other); + ~musim_gap_repeat_and_offset_r17_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& ms20_r17() + { + assert_choice_type(types::ms20_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + uint8_t& ms40_r17() + { + assert_choice_type(types::ms40_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + uint8_t& ms80_r17() + { + assert_choice_type(types::ms80_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + uint8_t& ms160_r17() + { + assert_choice_type(types::ms160_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + uint16_t& ms320_r17() + { + assert_choice_type(types::ms320_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + uint16_t& ms640_r17() + { + assert_choice_type(types::ms640_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + uint16_t& ms1280_r17() + { + assert_choice_type(types::ms1280_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + uint16_t& ms2560_r17() + { + assert_choice_type(types::ms2560_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + uint16_t& ms5120_r17() + { + assert_choice_type(types::ms5120_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + const uint8_t& ms20_r17() const + { + assert_choice_type(types::ms20_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + const uint8_t& ms40_r17() const + { + assert_choice_type(types::ms40_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + const uint8_t& ms80_r17() const + { + assert_choice_type(types::ms80_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + const uint8_t& ms160_r17() const + { + assert_choice_type(types::ms160_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + const uint16_t& ms320_r17() const + { + assert_choice_type(types::ms320_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + const uint16_t& ms640_r17() const + { + assert_choice_type(types::ms640_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + const uint16_t& ms1280_r17() const + { + assert_choice_type(types::ms1280_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + const uint16_t& ms2560_r17() const + { + assert_choice_type(types::ms2560_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + const uint16_t& ms5120_r17() const + { + assert_choice_type(types::ms5120_r17, type_, "musim-GapRepetitionAndOffset-r17"); + return c.get(); + } + uint8_t& set_ms20_r17(); + uint8_t& set_ms40_r17(); + uint8_t& set_ms80_r17(); + uint8_t& set_ms160_r17(); + uint16_t& set_ms320_r17(); + uint16_t& set_ms640_r17(); + uint16_t& set_ms1280_r17(); + uint16_t& set_ms2560_r17(); + uint16_t& set_ms5120_r17(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool musim_start_sfn_and_sf_r17_present = false; + bool musim_gap_len_r17_present = false; + bool musim_gap_repeat_and_offset_r17_present = false; + mu_si_m_start_sfn_and_sf_r17_s musim_start_sfn_and_sf_r17; + musim_gap_len_r17_e_ musim_gap_len_r17; + musim_gap_repeat_and_offset_r17_c_ musim_gap_repeat_and_offset_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeighbourCellInfo-r17 ::= SEQUENCE +struct neighbour_cell_info_r17_s { + epoch_time_r17_s epoch_time_r17; + ephemeris_info_r17_c ephemeris_info_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RAN-VisibleParameters-r17 ::= SEQUENCE +struct ran_visible_params_r17_s { + struct ran_visible_periodicity_r17_opts { + enum options { ms120, ms240, ms480, ms640, ms1024, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using ran_visible_periodicity_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool ran_visible_periodicity_r17_present = false; + bool nof_buffer_level_entries_r17_present = false; + bool report_playout_delay_for_media_startup_r17_present = false; + ran_visible_periodicity_r17_e_ ran_visible_periodicity_r17; + uint8_t nof_buffer_level_entries_r17 = 1; + bool report_playout_delay_for_media_startup_r17 = false; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RSSI-PeriodicityAndOffset-r16 ::= CHOICE +struct rssi_periodicity_and_offset_r16_c { + struct types_opts { + enum options { sl10, sl20, sl40, sl80, sl160, sl320, s1640, /*...*/ nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + rssi_periodicity_and_offset_r16_c() = default; + rssi_periodicity_and_offset_r16_c(const rssi_periodicity_and_offset_r16_c& other); + rssi_periodicity_and_offset_r16_c& operator=(const rssi_periodicity_and_offset_r16_c& other); + ~rssi_periodicity_and_offset_r16_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& sl10() + { + assert_choice_type(types::sl10, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + uint8_t& sl20() + { + assert_choice_type(types::sl20, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + uint8_t& sl40() + { + assert_choice_type(types::sl40, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + uint8_t& sl80() + { + assert_choice_type(types::sl80, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + uint8_t& sl160() + { + assert_choice_type(types::sl160, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + uint16_t& sl320() + { + assert_choice_type(types::sl320, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + uint16_t& s1640() + { + assert_choice_type(types::s1640, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + const uint8_t& sl10() const + { + assert_choice_type(types::sl10, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + const uint8_t& sl20() const + { + assert_choice_type(types::sl20, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + const uint8_t& sl40() const + { + assert_choice_type(types::sl40, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + const uint8_t& sl80() const + { + assert_choice_type(types::sl80, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + const uint8_t& sl160() const + { + assert_choice_type(types::sl160, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + const uint16_t& sl320() const + { + assert_choice_type(types::sl320, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + const uint16_t& s1640() const + { + assert_choice_type(types::s1640, type_, "RSSI-PeriodicityAndOffset-r16"); + return c.get(); + } + uint8_t& set_sl10(); + uint8_t& set_sl20(); + uint8_t& set_sl40(); + uint8_t& set_sl80(); + uint8_t& set_sl160(); + uint16_t& set_sl320(); + uint16_t& set_s1640(); + +private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); +}; + +// SSB-PositionQCL-Cell-r17 ::= SEQUENCE +struct ssb_position_qcl_cell_r17_s { + uint16_t pci_r17 = 0; + ssb_position_qcl_relation_r17_e ssb_position_qcl_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SSB-PositionQCL-CellsToAddMod-r16 ::= SEQUENCE +struct ssb_position_qcl_cells_to_add_mod_r16_s { + uint16_t pci_r16 = 0; + ssb_position_qcl_relation_r16_e ssb_position_qcl_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BFD-RelaxationReportingConfig-r17 ::= SEQUENCE +struct bfd_relaxation_report_cfg_r17_s { + struct bfd_relaxtion_report_prohibit_timer_opts { + enum options { + s0, + s0dot5, + s1, + s2, + s5, + s10, + s20, + s30, + s60, + s90, + s120, + s300, + s600, + infinity, + spare2, + spare1, + nulltype + } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using bfd_relaxtion_report_prohibit_timer_e_ = enumerated; + + // member variables + bfd_relaxtion_report_prohibit_timer_e_ bfd_relaxtion_report_prohibit_timer; + + // 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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using nrof_prbs_e_ = enumerated; + + // 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using density_e_ = enumerated; + using csi_rs_res_list_mob_l_ = dyn_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; +}; + +// CandidateServingFreqListNR-r16 ::= SEQUENCE (SIZE (1..128)) OF INTEGER (0..3279165) +using candidate_serving_freq_list_nr_r16_l = dyn_array; + +// CondReconfigToAddMod-r16 ::= SEQUENCE +struct cond_recfg_to_add_mod_r16_s { + using cond_execution_cond_r16_l_ = bounded_array; + + // member variables + bool ext = false; + uint8_t cond_recfg_id_r16 = 1; + cond_execution_cond_r16_l_ cond_execution_cond_r16; + dyn_octstring cond_rrc_recfg_r16; + // ... + // group 0 + dyn_octstring cond_execution_cond_scg_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ExcessDelay-DRB-IdentityInfo-r17 ::= SEQUENCE +struct excess_delay_drb_id_info_r17_s { + using drb_id_list_l_ = bounded_array; + struct delay_thres_opts { + enum options { + ms0dot25, + ms0dot5, + ms1, + ms2, + ms4, + ms5, + ms10, + ms20, + ms30, + ms40, + ms50, + ms60, + ms70, + ms80, + ms90, + ms100, + ms150, + ms300, + ms500, + nulltype + } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using delay_thres_e_ = enumerated; + + // member variables + drb_id_list_l_ drb_id_list; + delay_thres_e_ delay_thres; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IAB-IP-Address-r16 ::= CHOICE +struct iab_ip_address_r16_c { + struct types_opts { + enum options { ip_v4_address_r16, ip_v6_address_r16, ip_v6_prefix_r16, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + iab_ip_address_r16_c() = default; + iab_ip_address_r16_c(const iab_ip_address_r16_c& other); + iab_ip_address_r16_c& operator=(const iab_ip_address_r16_c& other); + ~iab_ip_address_r16_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<32>& ip_v4_address_r16() + { + assert_choice_type(types::ip_v4_address_r16, type_, "IAB-IP-Address-r16"); + return c.get>(); + } + fixed_bitstring<128>& ip_v6_address_r16() + { + assert_choice_type(types::ip_v6_address_r16, type_, "IAB-IP-Address-r16"); + return c.get>(); + } + fixed_bitstring<64>& ip_v6_prefix_r16() + { + assert_choice_type(types::ip_v6_prefix_r16, type_, "IAB-IP-Address-r16"); + return c.get>(); + } + const fixed_bitstring<32>& ip_v4_address_r16() const + { + assert_choice_type(types::ip_v4_address_r16, type_, "IAB-IP-Address-r16"); + return c.get>(); + } + const fixed_bitstring<128>& ip_v6_address_r16() const + { + assert_choice_type(types::ip_v6_address_r16, type_, "IAB-IP-Address-r16"); + return c.get>(); + } + const fixed_bitstring<64>& ip_v6_prefix_r16() const + { + assert_choice_type(types::ip_v6_prefix_r16, type_, "IAB-IP-Address-r16"); + return c.get>(); + } + fixed_bitstring<32>& set_ip_v4_address_r16(); + fixed_bitstring<128>& set_ip_v6_address_r16(); + fixed_bitstring<64>& set_ip_v6_prefix_r16(); + +private: + types type_; + choice_buffer_t> c; + + void destroy_(); +}; + +// IAB-IP-Usage-r16 ::= ENUMERATED +struct iab_ip_usage_r16_opts { + enum options { f1_c, f1_u, non_f1, spare, nulltype } value; + + const char* to_string() const; +}; +using iab_ip_usage_r16_e = enumerated; + +// MUSIM-Gap-r17 ::= SEQUENCE +struct mu_si_m_gap_r17_s { + uint8_t musim_gap_id_r17 = 0; + mu_si_m_gap_info_r17_s musim_gap_info_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MUSIM-GapAssistanceConfig-r17 ::= SEQUENCE +struct mu_si_m_gap_assist_cfg_r17_s { + struct musim_gap_prohibit_timer_r17_opts { + enum options { + s0, + s0dot1, + s0dot2, + s0dot3, + s0dot4, + s0dot5, + s1, + s2, + s3, + s4, + s5, + s6, + s7, + s8, + s9, + s10, + nulltype + } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using musim_gap_prohibit_timer_r17_e_ = enumerated; + + // member variables + musim_gap_prohibit_timer_r17_e_ musim_gap_prohibit_timer_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MUSIM-LeaveAssistanceConfig-r17 ::= SEQUENCE +struct mu_si_m_leave_assist_cfg_r17_s { + struct musim_leave_without_resp_timer_r17_opts { + enum options { ms10, ms20, ms40, ms60, ms80, ms100, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using musim_leave_without_resp_timer_r17_e_ = enumerated; + + // member variables + musim_leave_without_resp_timer_r17_e_ musim_leave_without_resp_timer_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasConfigAppLayer-r17 ::= SEQUENCE +struct meas_cfg_app_layer_r17_s { + struct service_type_r17_opts { + enum options { streaming, mtsi, vr, spare5, spare4, spare3, spare2, spare1, nulltype } value; + + const char* to_string() const; + }; + using service_type_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool service_type_r17_present = false; + bool pause_report_r17_present = false; + bool tx_of_session_start_stop_r17_present = false; + bool ran_visible_params_r17_present = false; + uint8_t meas_cfg_app_layer_id_r17 = 0; + bounded_octstring<1, 8000> meas_cfg_app_layer_container_r17; + service_type_r17_e_ service_type_r17; + bool pause_report_r17 = false; + bool tx_of_session_start_stop_r17 = false; + setup_release_c ran_visible_params_r17; + // ... + + // 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; + +// PropDelayDiffReportConfig-r17 ::= SEQUENCE +struct prop_delay_diff_report_cfg_r17_s { + struct thresh_prop_delay_diff_r17_opts { + enum options { + ms0dot5, + ms1, + ms2, + ms3, + ms4, + ms5, + ms6, + ms7, + ms8, + ms9, + ms10, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using thresh_prop_delay_diff_r17_e_ = enumerated; + using neigh_cell_info_list_r17_l_ = dyn_array; + + // member variables + bool thresh_prop_delay_diff_r17_present = false; + thresh_prop_delay_diff_r17_e_ thresh_prop_delay_diff_r17; + neigh_cell_info_list_r17_l_ neigh_cell_info_list_r17; + + // 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RLM-RelaxationReportingConfig-r17 ::= SEQUENCE +struct rlm_relaxation_report_cfg_r17_s { + struct rlm_relaxtion_report_prohibit_timer_opts { + enum options { + s0, + s0dot5, + s1, + s2, + s5, + s10, + s20, + s30, + s60, + s90, + s120, + s300, + s600, + infinity, + spare2, + spare1, + nulltype + } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using rlm_relaxtion_report_prohibit_timer_e_ = enumerated; + + // member variables + rlm_relaxtion_report_prohibit_timer_e_ rlm_relaxtion_report_prohibit_timer; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRM-MeasRelaxationReportingConfig-r17 ::= SEQUENCE +struct rrm_meas_relaxation_report_cfg_r17_s { + struct s_search_delta_p_stationary_r17_opts { + enum options { db2, db3, db6, db9, db12, db15, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using s_search_delta_p_stationary_r17_e_ = enumerated; + struct t_search_delta_p_stationary_r17_opts { + enum options { + s5, + s10, + s20, + s30, + s60, + s120, + s180, + s240, + s300, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using t_search_delta_p_stationary_r17_e_ = enumerated; + + // member variables + s_search_delta_p_stationary_r17_e_ s_search_delta_p_stationary_r17; + t_search_delta_p_stationary_r17_e_ t_search_delta_p_stationary_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RSSI-ResourceConfigCLI-r16 ::= SEQUENCE +struct rssi_res_cfg_cli_r16_s { + bool ext = false; + bool ref_serv_cell_idx_r16_present = false; + uint8_t rssi_res_id_r16 = 0; + subcarrier_spacing_e rssi_scs_r16; + uint16_t start_prb_r16 = 0; + uint16_t nrof_prbs_r16 = 4; + uint8_t start_position_r16 = 0; + uint8_t nrof_symbols_r16 = 1; + rssi_periodicity_and_offset_r16_c rssi_periodicity_and_offset_r16; + uint8_t ref_serv_cell_idx_r16 = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SCG-DeactivationPreferenceConfig-r17 ::= SEQUENCE +struct scg_deactivation_pref_cfg_r17_s { + struct scg_deactivation_pref_prohibit_timer_r17_opts { + enum options { s0, s1, s2, s4, s8, s10, s15, s30, s60, s120, s180, s240, s300, s600, s900, s1800, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using scg_deactivation_pref_prohibit_timer_r17_e_ = enumerated; + + // member variables + scg_deactivation_pref_prohibit_timer_r17_e_ scg_deactivation_pref_prohibit_timer_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-RemoteUE-ToAddMod-r17 ::= SEQUENCE +struct sl_remote_ue_to_add_mod_r17_s { + bool ext = false; + bool sl_srap_cfg_relay_r17_present = false; + fixed_bitstring<24> sl_l2_id_remote_r17; + sl_srap_cfg_r17_s sl_srap_cfg_relay_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SRS-ResourceConfigCLI-r16 ::= SEQUENCE +struct srs_res_cfg_cli_r16_s { + bool ext = false; + bool ref_serv_cell_idx_r16_present = false; + srs_res_s srs_res_r16; + subcarrier_spacing_e srs_scs_r16; + uint8_t ref_serv_cell_idx_r16 = 0; + uint8_t ref_bwp_r16 = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SSB-PositionQCL-CellList-r17 ::= SEQUENCE (SIZE (1..32)) OF SSB-PositionQCL-Cell-r17 +using ssb_position_qcl_cell_list_r17_l = dyn_array; + +// SSB-PositionQCL-CellsToAddModList-r16 ::= SEQUENCE (SIZE (1..32)) OF SSB-PositionQCL-CellsToAddMod-r16 +using ssb_position_qcl_cells_to_add_mod_list_r16_l = dyn_array; + +// SuccessHO-Config-r17 ::= SEQUENCE +struct success_ho_cfg_r17_s { + struct thres_percentage_t304_r17_opts { + enum options { p40, p60, p80, spare5, spare4, spare3, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using thres_percentage_t304_r17_e_ = enumerated; + struct thres_percentage_t310_r17_opts { + enum options { p40, p60, p80, spare5, spare4, spare3, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using thres_percentage_t310_r17_e_ = enumerated; + struct thres_percentage_t312_r17_opts { + enum options { p20, p40, p60, p80, spare4, spare3, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using thres_percentage_t312_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool thres_percentage_t304_r17_present = false; + bool thres_percentage_t310_r17_present = false; + bool thres_percentage_t312_r17_present = false; + bool source_daps_fail_report_r17_present = false; + thres_percentage_t304_r17_e_ thres_percentage_t304_r17; + thres_percentage_t310_r17_e_ thres_percentage_t310_r17; + thres_percentage_t312_r17_e_ thres_percentage_t312_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AppLayerMeasConfig-r17 ::= SEQUENCE +struct app_layer_meas_cfg_r17_s { + using meas_cfg_app_layer_to_add_mod_list_r17_l_ = dyn_array; + using meas_cfg_app_layer_to_release_list_r17_l_ = bounded_array; + + // member variables + bool ext = false; + bool rrc_seg_allowed_r17_present = false; + meas_cfg_app_layer_to_add_mod_list_r17_l_ meas_cfg_app_layer_to_add_mod_list_r17; + meas_cfg_app_layer_to_release_list_r17_l_ meas_cfg_app_layer_to_release_list_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BAP-RoutingID-r16 ::= SEQUENCE +struct bap_routing_id_r16_s { + fixed_bitstring<10> bap_address_r16; + fixed_bitstring<10> bap_path_id_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BT-NameList-r16 ::= SEQUENCE (SIZE (1..4)) OF OCTET STRING (SIZE (1..248)) +using bt_name_list_r16_l = bounded_array, 4>; + +// 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; + 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; + SRSASN_CODE unpack(cbit_ref& bref); + 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; +}; + +// CellsToAddModExt-v1710 ::= SEQUENCE +struct cells_to_add_mod_ext_v1710_s { + struct ntn_polarization_dl_r17_opts { + enum options { rhcp, lhcp, linear, nulltype } value; + + const char* to_string() const; + }; + using ntn_polarization_dl_r17_e_ = enumerated; + struct ntn_polarization_ul_r17_opts { + enum options { rhcp, lhcp, linear, nulltype } value; + + const char* to_string() const; + }; + using ntn_polarization_ul_r17_e_ = enumerated; + + // member variables + bool ntn_polarization_dl_r17_present = false; + bool ntn_polarization_ul_r17_present = false; + ntn_polarization_dl_r17_e_ ntn_polarization_dl_r17; + ntn_polarization_ul_r17_e_ ntn_polarization_ul_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellsToAddModUTRA-FDD-r16 ::= SEQUENCE +struct cells_to_add_mod_utra_fdd_r16_s { + uint8_t cell_idx_utra_fdd_r16 = 1; + uint16_t pci_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CondReconfigToAddModList-r16 ::= SEQUENCE (SIZE (1..8)) OF CondReconfigToAddMod-r16 +using cond_recfg_to_add_mod_list_r16_l = dyn_array; + +// CondReconfigToRemoveList-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..8) +using cond_recfg_to_rem_list_r16_l = bounded_array; + +// DRX-PreferenceConfig-r16 ::= SEQUENCE +struct drx_pref_cfg_r16_s { + struct drx_pref_prohibit_timer_r16_opts { + enum options { s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s20, s30, spare2, spare1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using drx_pref_prohibit_timer_r16_e_ = enumerated; + + // member variables + drx_pref_prohibit_timer_r16_e_ drx_pref_prohibit_timer_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IAB-IP-AddressConfiguration-r16 ::= SEQUENCE +struct iab_ip_address_cfg_r16_s { + bool ext = false; + bool iab_ip_address_r16_present = false; + bool iab_ip_usage_r16_present = false; + bool iab_donor_du_bap_address_r16_present = false; + uint8_t iab_ip_address_idx_r16 = 1; + iab_ip_address_r16_c iab_ip_address_r16; + iab_ip_usage_r16_e iab_ip_usage_r16; + fixed_bitstring<10> iab_donor_du_bap_address_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IDC-AssistanceConfig-r16 ::= SEQUENCE +struct idc_assist_cfg_r16_s { + bool ext = false; + candidate_serving_freq_list_nr_r16_l candidate_serving_freq_list_nr_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MUSIM-GapConfig-r17 ::= SEQUENCE +struct mu_si_m_gap_cfg_r17_s { + using musim_gap_to_release_list_r17_l_ = bounded_array; + using musim_gap_to_add_mod_list_r17_l_ = dyn_array; + + // member variables + bool ext = false; + bool musim_aperiodic_gap_r17_present = false; + musim_gap_to_release_list_r17_l_ musim_gap_to_release_list_r17; + musim_gap_to_add_mod_list_r17_l_ musim_gap_to_add_mod_list_r17; + mu_si_m_gap_info_r17_s musim_aperiodic_gap_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MaxBW-PreferenceConfig-r16 ::= SEQUENCE +struct max_bw_pref_cfg_r16_s { + struct max_bw_pref_prohibit_timer_r16_opts { + enum options { s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s20, s30, spare2, spare1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using max_bw_pref_prohibit_timer_r16_e_ = enumerated; + + // member variables + max_bw_pref_prohibit_timer_r16_e_ max_bw_pref_prohibit_timer_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MaxCC-PreferenceConfig-r16 ::= SEQUENCE +struct max_cc_pref_cfg_r16_s { + struct max_cc_pref_prohibit_timer_r16_opts { + enum options { s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s20, s30, spare2, spare1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using max_cc_pref_prohibit_timer_r16_e_ = enumerated; + + // member variables + max_cc_pref_prohibit_timer_r16_e_ max_cc_pref_prohibit_timer_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MaxMIMO-LayerPreferenceConfig-r16 ::= SEQUENCE +struct max_mimo_layer_pref_cfg_r16_s { + struct max_mimo_layer_pref_prohibit_timer_r16_opts { + enum options { s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s20, s30, spare2, spare1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using max_mimo_layer_pref_prohibit_timer_r16_e_ = enumerated; + + // member variables + max_mimo_layer_pref_prohibit_timer_r16_e_ max_mimo_layer_pref_prohibit_timer_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasRSSI-ReportConfig-r16 ::= SEQUENCE +struct meas_rssi_report_cfg_r16_s { + bool ch_occupancy_thres_r16_present = false; + uint8_t ch_occupancy_thres_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; +}; + +// MeasReportQuantity-r16 ::= SEQUENCE +struct meas_report_quant_r16_s { + bool ext = false; + bool cbr_r16 = false; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasReportQuantityCLI-r16 ::= ENUMERATED +struct meas_report_quant_cli_r16_opts { + enum options { srs_rsrp, cli_rssi, nulltype } value; + + const char* to_string() const; +}; +using meas_report_quant_cli_r16_e = enumerated; + +// MeasReportQuantityUTRA-FDD-r16 ::= SEQUENCE +struct meas_report_quant_utra_fdd_r16_s { + bool cpich_rs_cp = false; + bool cpich_ec_n0 = 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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::rsrp, type_, "MeasTriggerQuantity"); + return c.get(); + } + uint8_t& rsrq() + { + assert_choice_type(types::rsrq, type_, "MeasTriggerQuantity"); + return c.get(); + } + uint8_t& sinr() + { + assert_choice_type(types::sinr, type_, "MeasTriggerQuantity"); + return c.get(); + } + const uint8_t& rsrp() const + { + assert_choice_type(types::rsrp, type_, "MeasTriggerQuantity"); + return c.get(); + } + const uint8_t& rsrq() const + { + assert_choice_type(types::rsrq, type_, "MeasTriggerQuantity"); + return c.get(); + } + const uint8_t& sinr() const + { + assert_choice_type(types::sinr, type_, "MeasTriggerQuantity"); + return c.get(); + } + uint8_t& set_rsrp(); + uint8_t& set_rsrq(); + uint8_t& set_sinr(); + +private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); +}; + +// MeasTriggerQuantityCLI-r16 ::= CHOICE +struct meas_trigger_quant_cli_r16_c { + struct types_opts { + enum options { srs_rsrp_r16, cli_rssi_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + meas_trigger_quant_cli_r16_c() = default; + meas_trigger_quant_cli_r16_c(const meas_trigger_quant_cli_r16_c& other); + meas_trigger_quant_cli_r16_c& operator=(const meas_trigger_quant_cli_r16_c& other); + ~meas_trigger_quant_cli_r16_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& srs_rsrp_r16() + { + assert_choice_type(types::srs_rsrp_r16, type_, "MeasTriggerQuantityCLI-r16"); + return c.get(); + } + uint8_t& cli_rssi_r16() + { + assert_choice_type(types::cli_rssi_r16, type_, "MeasTriggerQuantityCLI-r16"); + return c.get(); + } + const uint8_t& srs_rsrp_r16() const + { + assert_choice_type(types::srs_rsrp_r16, type_, "MeasTriggerQuantityCLI-r16"); + return c.get(); + } + const uint8_t& cli_rssi_r16() const + { + assert_choice_type(types::cli_rssi_r16, type_, "MeasTriggerQuantityCLI-r16"); + return c.get(); + } + uint8_t& set_srs_rsrp_r16(); + uint8_t& set_cli_rssi_r16(); + +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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::rsrp, type_, "MeasTriggerQuantityEUTRA"); + return c.get(); + } + uint8_t& rsrq() + { + assert_choice_type(types::rsrq, type_, "MeasTriggerQuantityEUTRA"); + return c.get(); + } + uint8_t& sinr() + { + assert_choice_type(types::sinr, type_, "MeasTriggerQuantityEUTRA"); + return c.get(); + } + const uint8_t& rsrp() const + { + assert_choice_type(types::rsrp, type_, "MeasTriggerQuantityEUTRA"); + return c.get(); + } + const uint8_t& rsrq() const + { + assert_choice_type(types::rsrq, type_, "MeasTriggerQuantityEUTRA"); + return c.get(); + } + const uint8_t& sinr() const + { + assert_choice_type(types::sinr, type_, "MeasTriggerQuantityEUTRA"); + return c.get(); + } + uint8_t& set_rsrp(); + uint8_t& set_rsrq(); + uint8_t& set_sinr(); + +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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::rsrp, type_, "MeasTriggerQuantityOffset"); + return c.get(); + } + int8_t& rsrq() + { + assert_choice_type(types::rsrq, type_, "MeasTriggerQuantityOffset"); + return c.get(); + } + int8_t& sinr() + { + assert_choice_type(types::sinr, type_, "MeasTriggerQuantityOffset"); + return c.get(); + } + const int8_t& rsrp() const + { + assert_choice_type(types::rsrp, type_, "MeasTriggerQuantityOffset"); + return c.get(); + } + const int8_t& rsrq() const + { + assert_choice_type(types::rsrq, type_, "MeasTriggerQuantityOffset"); + return c.get(); + } + const int8_t& sinr() const + { + assert_choice_type(types::sinr, type_, "MeasTriggerQuantityOffset"); + return c.get(); + } + int8_t& set_rsrp(); + int8_t& set_rsrq(); + int8_t& set_sinr(); + +private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); +}; + +// MeasTriggerQuantityUTRA-FDD-r16 ::= CHOICE +struct meas_trigger_quant_utra_fdd_r16_c { + struct types_opts { + enum options { utra_fdd_rs_cp_r16, utra_fdd_ec_n0_r16, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + meas_trigger_quant_utra_fdd_r16_c() = default; + meas_trigger_quant_utra_fdd_r16_c(const meas_trigger_quant_utra_fdd_r16_c& other); + meas_trigger_quant_utra_fdd_r16_c& operator=(const meas_trigger_quant_utra_fdd_r16_c& other); + ~meas_trigger_quant_utra_fdd_r16_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& utra_fdd_rs_cp_r16() + { + assert_choice_type(types::utra_fdd_rs_cp_r16, type_, "MeasTriggerQuantityUTRA-FDD-r16"); + return c.get(); + } + uint8_t& utra_fdd_ec_n0_r16() + { + assert_choice_type(types::utra_fdd_ec_n0_r16, type_, "MeasTriggerQuantityUTRA-FDD-r16"); + return c.get(); + } + const int8_t& utra_fdd_rs_cp_r16() const + { + assert_choice_type(types::utra_fdd_rs_cp_r16, type_, "MeasTriggerQuantityUTRA-FDD-r16"); + return c.get(); + } + const uint8_t& utra_fdd_ec_n0_r16() const + { + assert_choice_type(types::utra_fdd_ec_n0_r16, type_, "MeasTriggerQuantityUTRA-FDD-r16"); + return c.get(); + } + int8_t& set_utra_fdd_rs_cp_r16(); + uint8_t& set_utra_fdd_ec_n0_r16(); + +private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); +}; + +// MinSchedulingOffsetPreferenceConfig-r16 ::= SEQUENCE +struct min_sched_offset_pref_cfg_r16_s { + struct min_sched_offset_pref_prohibit_timer_r16_opts { + enum options { s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s20, s30, spare2, spare1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using min_sched_offset_pref_prohibit_timer_r16_e_ = enumerated; + + // member variables + min_sched_offset_pref_prohibit_timer_r16_e_ min_sched_offset_pref_prohibit_timer_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NR-RS-Type ::= ENUMERATED +struct nr_rs_type_opts { + enum options { ssb, csi_rs, nulltype } value; + + const char* to_string() const; +}; +using nr_rs_type_e = enumerated; + +// NeedForGapNCSG-ConfigEUTRA-r17 ::= SEQUENCE +struct need_for_gap_ncsg_cfg_eutra_r17_s { + using requested_target_band_filt_ncsg_eutra_r17_l_ = dyn_array; + + // member variables + requested_target_band_filt_ncsg_eutra_r17_l_ requested_target_band_filt_ncsg_eutra_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeedForGapNCSG-ConfigNR-r17 ::= SEQUENCE +struct need_for_gap_ncsg_cfg_nr_r17_s { + using requested_target_band_filt_ncsg_nr_r17_l_ = dyn_array; + + // member variables + requested_target_band_filt_ncsg_nr_r17_l_ requested_target_band_filt_ncsg_nr_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// OtherConfig-v1700 ::= SEQUENCE +struct other_cfg_v1700_s { + bool ul_gap_fr2_pref_cfg_r17_present = false; + bool musim_gap_assist_cfg_r17_present = false; + bool musim_leave_assist_cfg_r17_present = false; + bool success_ho_cfg_r17_present = false; + bool max_bw_pref_cfg_fr2_2_r17_present = false; + bool max_mimo_layer_pref_cfg_fr2_2_r17_present = false; + bool min_sched_offset_pref_cfg_ext_r17_present = false; + bool rlm_relaxation_report_cfg_r17_present = false; + bool bfd_relaxation_report_cfg_r17_present = false; + bool scg_deactivation_pref_cfg_r17_present = false; + bool rrm_meas_relaxation_report_cfg_r17_present = false; + bool prop_delay_diff_report_cfg_r17_present = false; + setup_release_c musim_gap_assist_cfg_r17; + setup_release_c musim_leave_assist_cfg_r17; + setup_release_c success_ho_cfg_r17; + setup_release_c rlm_relaxation_report_cfg_r17; + setup_release_c bfd_relaxation_report_cfg_r17; + setup_release_c scg_deactivation_pref_cfg_r17; + setup_release_c rrm_meas_relaxation_report_cfg_r17; + setup_release_c prop_delay_diff_report_cfg_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RSSI-ResourceListConfigCLI-r16 ::= SEQUENCE (SIZE (1..64)) OF RSSI-ResourceConfigCLI-r16 +using rssi_res_list_cfg_cli_r16_l = dyn_array; + +// ReleasePreferenceConfig-r16 ::= SEQUENCE +struct release_pref_cfg_r16_s { + struct release_pref_prohibit_timer_r16_opts { + enum options { s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s20, s30, infinity, spare1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using release_pref_prohibit_timer_r16_e_ = enumerated; + + // member variables + bool connected_report_present = false; + release_pref_prohibit_timer_r16_e_ release_pref_prohibit_timer_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RxTxReportInterval-r17 ::= ENUMERATED +struct rx_tx_report_interv_r17_opts { + enum options { + ms80, + ms120, + ms160, + ms240, + ms320, + ms480, + ms640, + ms1024, + ms1280, + ms2048, + ms2560, + ms5120, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; +}; +using rx_tx_report_interv_r17_e = enumerated; + +// SL-L2RelayUE-Config-r17 ::= SEQUENCE +struct sl_l2_relay_ue_cfg_r17_s { + using sl_remote_ue_to_add_mod_list_r17_l_ = dyn_array; + using sl_remote_ue_to_release_list_r17_l_ = bounded_array, 32>; + + // member variables + bool ext = false; + sl_remote_ue_to_add_mod_list_r17_l_ sl_remote_ue_to_add_mod_list_r17; + sl_remote_ue_to_release_list_r17_l_ sl_remote_ue_to_release_list_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TimeOffsetEUTRA-r16 ::= ENUMERATED +struct sl_time_offset_eutra_r16_opts { + enum options { + ms0, + ms0dot25, + ms0dot5, + ms0dot625, + ms0dot75, + ms1, + ms1dot25, + ms1dot5, + ms1dot75, + ms2, + ms2dot5, + ms3, + ms4, + ms5, + ms6, + ms8, + ms10, + ms20, + nulltype + } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; +}; +using sl_time_offset_eutra_r16_e = enumerated; + +// SRS-ResourceListConfigCLI-r16 ::= SEQUENCE (SIZE (1..32)) OF SRS-ResourceConfigCLI-r16 +using srs_res_list_cfg_cli_r16_l = dyn_array; + +// 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; + // ... + // group 0 + bool ssb_position_qcl_common_r16_present = false; + ssb_position_qcl_relation_r16_e ssb_position_qcl_common_r16; + copy_ptr ssb_position_qcl_cells_to_add_mod_list_r16; + copy_ptr ssb_position_qcl_cells_to_rem_list_r16; + // group 1 + bool derive_ssb_idx_from_cell_inter_r17_present = false; + bool ssb_position_qcl_common_r17_present = false; + uint8_t derive_ssb_idx_from_cell_inter_r17 = 0; + ssb_position_qcl_relation_r17_e ssb_position_qcl_common_r17; + copy_ptr>> ssb_position_qcl_cells_r17; + // group 2 + copy_ptr cca_cells_to_add_mod_list_r17; + copy_ptr cca_cells_to_rem_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SSB-MTC3-r16 ::= SEQUENCE +struct ssb_mtc3_r16_s { + struct periodicity_and_offset_r16_c_ { + struct types_opts { + enum options { + sf5_r16, + sf10_r16, + sf20_r16, + sf40_r16, + sf80_r16, + sf160_r16, + sf320_r16, + sf640_r16, + sf1280_r16, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + periodicity_and_offset_r16_c_() = default; + periodicity_and_offset_r16_c_(const periodicity_and_offset_r16_c_& other); + periodicity_and_offset_r16_c_& operator=(const periodicity_and_offset_r16_c_& other); + ~periodicity_and_offset_r16_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& sf5_r16() + { + assert_choice_type(types::sf5_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + uint8_t& sf10_r16() + { + assert_choice_type(types::sf10_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + uint8_t& sf20_r16() + { + assert_choice_type(types::sf20_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + uint8_t& sf40_r16() + { + assert_choice_type(types::sf40_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + uint8_t& sf80_r16() + { + assert_choice_type(types::sf80_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + uint8_t& sf160_r16() + { + assert_choice_type(types::sf160_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + uint16_t& sf320_r16() + { + assert_choice_type(types::sf320_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + uint16_t& sf640_r16() + { + assert_choice_type(types::sf640_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + uint16_t& sf1280_r16() + { + assert_choice_type(types::sf1280_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + const uint8_t& sf5_r16() const + { + assert_choice_type(types::sf5_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + const uint8_t& sf10_r16() const + { + assert_choice_type(types::sf10_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + const uint8_t& sf20_r16() const + { + assert_choice_type(types::sf20_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + const uint8_t& sf40_r16() const + { + assert_choice_type(types::sf40_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + const uint8_t& sf80_r16() const + { + assert_choice_type(types::sf80_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + const uint8_t& sf160_r16() const + { + assert_choice_type(types::sf160_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + const uint16_t& sf320_r16() const + { + assert_choice_type(types::sf320_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + const uint16_t& sf640_r16() const + { + assert_choice_type(types::sf640_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + const uint16_t& sf1280_r16() const + { + assert_choice_type(types::sf1280_r16, type_, "periodicityAndOffset-r16"); + return c.get(); + } + uint8_t& set_sf5_r16(); + uint8_t& set_sf10_r16(); + uint8_t& set_sf20_r16(); + uint8_t& set_sf40_r16(); + uint8_t& set_sf80_r16(); + uint8_t& set_sf160_r16(); + uint16_t& set_sf320_r16(); + uint16_t& set_sf640_r16(); + uint16_t& set_sf1280_r16(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct dur_r16_opts { + enum options { sf1, sf2, sf3, sf4, sf5, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using dur_r16_e_ = enumerated; + using pci_list_r16_l_ = dyn_array; + + // member variables + bool ssb_to_measure_r16_present = false; + periodicity_and_offset_r16_c_ periodicity_and_offset_r16; + dur_r16_e_ dur_r16; + pci_list_r16_l_ pci_list_r16; + setup_release_c ssb_to_measure_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Sensor-NameList-r16 ::= SEQUENCE +struct sensor_name_list_r16_s { + bool meas_uncom_bar_pre_r16_present = false; + bool meas_ue_speed_present = false; + bool meas_ue_orientation_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-TxTEG-RequestUL-TDOA-Config-r17 ::= CHOICE +struct ue_tx_teg_request_ul_tdoa_cfg_r17_c { + struct periodic_report_r17_opts { + enum options { ms160, ms320, ms1280, ms2560, ms61440, ms81920, ms368640, ms737280, nulltype } value; + typedef uint32_t number_type; + + const char* to_string() const; + uint32_t to_number() const; + }; + using periodic_report_r17_e_ = enumerated; + struct types_opts { + enum options { one_shot_r17, periodic_report_r17, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + ue_tx_teg_request_ul_tdoa_cfg_r17_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 + periodic_report_r17_e_& periodic_report_r17() + { + assert_choice_type(types::periodic_report_r17, type_, "UE-TxTEG-RequestUL-TDOA-Config-r17"); + return c; + } + const periodic_report_r17_e_& periodic_report_r17() const + { + assert_choice_type(types::periodic_report_r17, type_, "UE-TxTEG-RequestUL-TDOA-Config-r17"); + return c; + } + void set_one_shot_r17(); + periodic_report_r17_e_& set_periodic_report_r17(); + +private: + types type_; + periodic_report_r17_e_ c; +}; + +// UL-DelayValueConfig-r16 ::= SEQUENCE +struct ul_delay_value_cfg_r16_s { + using delay_drb_list_r16_l_ = bounded_array; + + // member variables + delay_drb_list_r16_l_ delay_drb_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-ExcessDelayConfig-r17 ::= SEQUENCE +struct ul_excess_delay_cfg_r17_s { + using excess_delay_drb_list_r17_l_ = dyn_array; + + // member variables + excess_delay_drb_list_r17_l_ excess_delay_drb_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-GapFR2-Config-r17 ::= SEQUENCE +struct ul_gap_fr2_cfg_r17_s { + struct ugl_r17_opts { + enum options { ms0dot125, ms0dot25, ms0dot5, ms1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using ugl_r17_e_ = enumerated; + struct ugrp_r17_opts { + enum options { ms5, ms20, ms40, ms160, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ugrp_r17_e_ = enumerated; + + // member variables + bool ref_fr2_serv_cell_async_ca_r17_present = false; + uint8_t gap_offset_r17 = 0; + ugl_r17_e_ ugl_r17; + ugrp_r17_e_ ugrp_r17; + uint8_t ref_fr2_serv_cell_async_ca_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ValidityCellList ::= SEQUENCE (SIZE (1..8)) OF PCI-Range +using validity_cell_list_l = dyn_array; + +// WLAN-NameList-r16 ::= SEQUENCE (SIZE (1..4)) OF OCTET STRING (SIZE (1..32)) +using wlan_name_list_r16_l = bounded_array, 4>; + +// BAP-Config-r16 ::= SEQUENCE +struct bap_cfg_r16_s { + struct flow_ctrl_feedback_type_r16_opts { + enum options { per_bh_rlc_ch, per_routing_id, both, nulltype } value; + + const char* to_string() const; + }; + using flow_ctrl_feedback_type_r16_e_ = enumerated; + + // member variables + bool ext = false; + bool bap_address_r16_present = false; + bool default_ul_bap_routing_id_r16_present = false; + bool default_ul_bh_rlc_ch_r16_present = false; + bool flow_ctrl_feedback_type_r16_present = false; + fixed_bitstring<10> bap_address_r16; + bap_routing_id_r16_s default_ul_bap_routing_id_r16; + fixed_bitstring<16> default_ul_bh_rlc_ch_r16; + flow_ctrl_feedback_type_r16_e_ flow_ctrl_feedback_type_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CGI-Info-Logging-r16 ::= SEQUENCE +struct cgi_info_logging_r16_s { + bool tac_r16_present = false; + plmn_id_s plmn_id_r16; + fixed_bitstring<36> cell_id_r16; + fixed_bitstring<24> tac_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CLI-EventTriggerConfig-r16 ::= SEQUENCE +struct cli_event_trigger_cfg_r16_s { + struct event_id_r16_c_ { + struct event_i1_r16_s_ { + meas_trigger_quant_cli_r16_c i1_thres_r16; + bool report_on_leave_r16 = false; + uint8_t hysteresis_r16 = 0; + time_to_trigger_e time_to_trigger_r16; + }; + struct types_opts { + enum options { event_i1_r16, /*...*/ nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + types type() const { return types::event_i1_r16; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + event_i1_r16_s_& event_i1_r16() { return c; } + const event_i1_r16_s_& event_i1_r16() const { return c; } + + private: + event_i1_r16_s_ c; + }; + struct report_amount_r16_opts { + enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using report_amount_r16_e_ = enumerated; + + // member variables + bool ext = false; + event_id_r16_c_ event_id_r16; + report_interv_e report_interv_r16; + report_amount_r16_e_ report_amount_r16; + uint8_t max_report_cli_r16 = 1; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CLI-PeriodicalReportConfig-r16 ::= SEQUENCE +struct cli_periodical_report_cfg_r16_s { + struct report_amount_r16_opts { + enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using report_amount_r16_e_ = enumerated; + + // member variables + bool ext = false; + report_interv_e report_interv_r16; + report_amount_r16_e_ report_amount_r16; + meas_report_quant_cli_r16_e report_quant_cli_r16; + uint8_t max_report_cli_r16 = 1; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CLI-ResourceConfig-r16 ::= SEQUENCE +struct cli_res_cfg_r16_s { + bool srs_res_cfg_r16_present = false; + bool rssi_res_cfg_r16_present = false; + setup_release_c> srs_res_cfg_r16; + setup_release_c> rssi_res_cfg_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellsToAddModList ::= SEQUENCE (SIZE (1..32)) OF CellsToAddMod +using cells_to_add_mod_list_l = dyn_array; + +// CellsToAddModListExt-v1710 ::= SEQUENCE (SIZE (1..32)) OF CellsToAddModExt-v1710 +using cells_to_add_mod_list_ext_v1710_l = dyn_array; + +// CellsToAddModListUTRA-FDD-r16 ::= SEQUENCE (SIZE (1..32)) OF CellsToAddModUTRA-FDD-r16 +using cells_to_add_mod_list_utra_fdd_r16_l = dyn_array; + +// CondTriggerConfig-r16 ::= SEQUENCE +struct cond_trigger_cfg_r16_s { + struct cond_event_id_c_ { + struct cond_event_a3_s_ { + meas_trigger_quant_offset_c a3_offset; + uint8_t hysteresis = 0; + time_to_trigger_e time_to_trigger; + }; + struct cond_event_a5_s_ { + meas_trigger_quant_c a5_thres1; + meas_trigger_quant_c a5_thres2; + uint8_t hysteresis = 0; + time_to_trigger_e time_to_trigger; + }; + struct cond_event_a4_r17_s_ { + meas_trigger_quant_c a4_thres_r17; + uint8_t hysteresis_r17 = 0; + time_to_trigger_e time_to_trigger_r17; + }; + struct cond_event_d1_r17_s_ { + uint16_t distance_thresh_from_ref1_r17 = 0; + uint16_t distance_thresh_from_ref2_r17 = 0; + dyn_octstring ref_location1_r17; + dyn_octstring ref_location2_r17; + uint16_t hysteresis_location_r17 = 0; + time_to_trigger_e time_to_trigger_r17; + }; + struct cond_event_t1_r17_s_ { + uint64_t t1_thres_r17 = 0; + uint16_t dur_r17 = 1; + }; + struct types_opts { + enum options { + cond_event_a3, + cond_event_a5, + /*...*/ cond_event_a4_r17, + cond_event_d1_r17, + cond_event_t1_r17, + nulltype + } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + cond_event_id_c_() = default; + cond_event_id_c_(const cond_event_id_c_& other); + cond_event_id_c_& operator=(const cond_event_id_c_& other); + ~cond_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 + cond_event_a3_s_& cond_event_a3() + { + assert_choice_type(types::cond_event_a3, type_, "condEventId"); + return c.get(); + } + cond_event_a5_s_& cond_event_a5() + { + assert_choice_type(types::cond_event_a5, type_, "condEventId"); + return c.get(); + } + cond_event_a4_r17_s_& cond_event_a4_r17() + { + assert_choice_type(types::cond_event_a4_r17, type_, "condEventId"); + return c.get(); + } + cond_event_d1_r17_s_& cond_event_d1_r17() + { + assert_choice_type(types::cond_event_d1_r17, type_, "condEventId"); + return c.get(); + } + cond_event_t1_r17_s_& cond_event_t1_r17() + { + assert_choice_type(types::cond_event_t1_r17, type_, "condEventId"); + return c.get(); + } + const cond_event_a3_s_& cond_event_a3() const + { + assert_choice_type(types::cond_event_a3, type_, "condEventId"); + return c.get(); + } + const cond_event_a5_s_& cond_event_a5() const + { + assert_choice_type(types::cond_event_a5, type_, "condEventId"); + return c.get(); + } + const cond_event_a4_r17_s_& cond_event_a4_r17() const + { + assert_choice_type(types::cond_event_a4_r17, type_, "condEventId"); + return c.get(); + } + const cond_event_d1_r17_s_& cond_event_d1_r17() const + { + assert_choice_type(types::cond_event_d1_r17, type_, "condEventId"); + return c.get(); + } + const cond_event_t1_r17_s_& cond_event_t1_r17() const + { + assert_choice_type(types::cond_event_t1_r17, type_, "condEventId"); + return c.get(); + } + cond_event_a3_s_& set_cond_event_a3(); + cond_event_a5_s_& set_cond_event_a5(); + cond_event_a4_r17_s_& set_cond_event_a4_r17(); + cond_event_d1_r17_s_& set_cond_event_d1_r17(); + cond_event_t1_r17_s_& set_cond_event_t1_r17(); + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + + // member variables + bool ext = false; + cond_event_id_c_ cond_event_id; + nr_rs_type_e rs_type_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ConditionalReconfiguration-r16 ::= SEQUENCE +struct conditional_recfg_r16_s { + bool ext = false; + bool attempt_cond_recfg_r16_present = false; + cond_recfg_to_rem_list_r16_l cond_recfg_to_rem_list_r16; + cond_recfg_to_add_mod_list_r16_l cond_recfg_to_add_mod_list_r16; + // ... + + // 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; + +// EUTRA-ExcludedCell ::= SEQUENCE +struct eutra_excluded_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; +}; + +// 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_allowed_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_allowed_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_allowed_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_allowed_cell_list = false; + }; + struct event_x1_r17_s_ { + sl_meas_trigger_quant_r16_c x1_thres1_relay_r17; + meas_trigger_quant_c x1_thres2_r17; + bool report_on_leave_r17 = false; + uint8_t hysteresis_r17 = 0; + time_to_trigger_e time_to_trigger_r17; + bool use_allowed_cell_list_r17 = false; + }; + struct event_x2_r17_s_ { + sl_meas_trigger_quant_r16_c x2_thres_relay_r17; + bool report_on_leave_r17 = false; + uint8_t hysteresis_r17 = 0; + time_to_trigger_e time_to_trigger_r17; + }; + struct event_d1_r17_s_ { + uint16_t distance_thresh_from_ref1_r17 = 1; + uint16_t distance_thresh_from_ref2_r17 = 1; + dyn_octstring ref_location1_r17; + dyn_octstring ref_location2_r17; + bool report_on_leave_r17 = false; + uint16_t hysteresis_location_r17 = 0; + time_to_trigger_e time_to_trigger_r17; + }; + struct types_opts { + enum options { + event_a1, + event_a2, + event_a3, + event_a4, + event_a5, + event_a6, + // ... + event_x1_r17, + event_x2_r17, + event_d1_r17, + nulltype + } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::event_a1, type_, "eventId"); + return c.get(); + } + event_a2_s_& event_a2() + { + assert_choice_type(types::event_a2, type_, "eventId"); + return c.get(); + } + event_a3_s_& event_a3() + { + assert_choice_type(types::event_a3, type_, "eventId"); + return c.get(); + } + event_a4_s_& event_a4() + { + assert_choice_type(types::event_a4, type_, "eventId"); + return c.get(); + } + event_a5_s_& event_a5() + { + assert_choice_type(types::event_a5, type_, "eventId"); + return c.get(); + } + event_a6_s_& event_a6() + { + assert_choice_type(types::event_a6, type_, "eventId"); + return c.get(); + } + event_x1_r17_s_& event_x1_r17() + { + assert_choice_type(types::event_x1_r17, type_, "eventId"); + return c.get(); + } + event_x2_r17_s_& event_x2_r17() + { + assert_choice_type(types::event_x2_r17, type_, "eventId"); + return c.get(); + } + event_d1_r17_s_& event_d1_r17() + { + assert_choice_type(types::event_d1_r17, type_, "eventId"); + return c.get(); + } + const event_a1_s_& event_a1() const + { + assert_choice_type(types::event_a1, type_, "eventId"); + return c.get(); + } + const event_a2_s_& event_a2() const + { + assert_choice_type(types::event_a2, type_, "eventId"); + return c.get(); + } + const event_a3_s_& event_a3() const + { + assert_choice_type(types::event_a3, type_, "eventId"); + return c.get(); + } + const event_a4_s_& event_a4() const + { + assert_choice_type(types::event_a4, type_, "eventId"); + return c.get(); + } + const event_a5_s_& event_a5() const + { + assert_choice_type(types::event_a5, type_, "eventId"); + return c.get(); + } + const event_a6_s_& event_a6() const + { + assert_choice_type(types::event_a6, type_, "eventId"); + return c.get(); + } + const event_x1_r17_s_& event_x1_r17() const + { + assert_choice_type(types::event_x1_r17, type_, "eventId"); + return c.get(); + } + const event_x2_r17_s_& event_x2_r17() const + { + assert_choice_type(types::event_x2_r17, type_, "eventId"); + return c.get(); + } + const event_d1_r17_s_& event_d1_r17() const + { + assert_choice_type(types::event_d1_r17, type_, "eventId"); + return c.get(); + } + event_a1_s_& set_event_a1(); + event_a2_s_& set_event_a2(); + event_a3_s_& set_event_a3(); + event_a4_s_& set_event_a4(); + event_a5_s_& set_event_a5(); + event_a6_s_& set_event_a6(); + event_x1_r17_s_& set_event_x1_r17(); + event_x2_r17_s_& set_event_x2_r17(); + event_d1_r17_s_& set_event_d1_r17(); + + private: + 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; + + const char* to_string() const; + int8_t to_number() const; + }; + using report_amount_e_ = enumerated; + + // 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; + // ... + // group 0 + bool use_t312_r16_present = false; + bool include_common_location_info_r16_present = false; + copy_ptr meas_rssi_report_cfg_r16; + bool use_t312_r16 = false; + copy_ptr, 1, 4>>> include_bt_meas_r16; + copy_ptr, 1, 4>>> include_wlan_meas_r16; + copy_ptr> include_sensor_meas_r16; + // group 1 + bool coarse_location_request_r17_present = false; + copy_ptr report_quant_relay_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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 event_b1_utra_fdd_r16_s_ { + bool ext = false; + meas_trigger_quant_utra_fdd_r16_c b1_thres_utra_fdd_r16; + bool report_on_leave_r16 = false; + uint8_t hysteresis_r16 = 0; + time_to_trigger_e time_to_trigger_r16; + // ... + }; + struct event_b2_utra_fdd_r16_s_ { + bool ext = false; + meas_trigger_quant_c b2_thres1_r16; + meas_trigger_quant_utra_fdd_r16_c b2_thres2_utra_fdd_r16; + bool report_on_leave_r16 = false; + uint8_t hysteresis_r16 = 0; + time_to_trigger_e time_to_trigger_r16; + // ... + }; + struct event_y1_relay_r17_s_ { + bool ext = false; + meas_trigger_quant_c y1_thres1_r17; + sl_meas_trigger_quant_r16_c y1_thres2_relay_r17; + bool report_on_leave_r17 = false; + uint8_t hysteresis_r17 = 0; + time_to_trigger_e time_to_trigger_r17; + // ... + }; + struct event_y2_relay_r17_s_ { + bool ext = false; + sl_meas_trigger_quant_r16_c y2_thres_relay_r17; + bool report_on_leave_r17 = false; + uint8_t hysteresis_r17 = 0; + time_to_trigger_e time_to_trigger_r17; + // ... + }; + struct types_opts { + enum options { + event_b1, + event_b2, + // ... + event_b1_utra_fdd_r16, + event_b2_utra_fdd_r16, + event_y1_relay_r17, + event_y2_relay_r17, + nulltype + } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::event_b1, type_, "eventId"); + return c.get(); + } + event_b2_s_& event_b2() + { + assert_choice_type(types::event_b2, type_, "eventId"); + return c.get(); + } + event_b1_utra_fdd_r16_s_& event_b1_utra_fdd_r16() + { + assert_choice_type(types::event_b1_utra_fdd_r16, type_, "eventId"); + return c.get(); + } + event_b2_utra_fdd_r16_s_& event_b2_utra_fdd_r16() + { + assert_choice_type(types::event_b2_utra_fdd_r16, type_, "eventId"); + return c.get(); + } + event_y1_relay_r17_s_& event_y1_relay_r17() + { + assert_choice_type(types::event_y1_relay_r17, type_, "eventId"); + return c.get(); + } + event_y2_relay_r17_s_& event_y2_relay_r17() + { + assert_choice_type(types::event_y2_relay_r17, type_, "eventId"); + return c.get(); + } + const event_b1_s_& event_b1() const + { + assert_choice_type(types::event_b1, type_, "eventId"); + return c.get(); + } + const event_b2_s_& event_b2() const + { + assert_choice_type(types::event_b2, type_, "eventId"); + return c.get(); + } + const event_b1_utra_fdd_r16_s_& event_b1_utra_fdd_r16() const + { + assert_choice_type(types::event_b1_utra_fdd_r16, type_, "eventId"); + return c.get(); + } + const event_b2_utra_fdd_r16_s_& event_b2_utra_fdd_r16() const + { + assert_choice_type(types::event_b2_utra_fdd_r16, type_, "eventId"); + return c.get(); + } + const event_y1_relay_r17_s_& event_y1_relay_r17() const + { + assert_choice_type(types::event_y1_relay_r17, type_, "eventId"); + return c.get(); + } + const event_y2_relay_r17_s_& event_y2_relay_r17() const + { + assert_choice_type(types::event_y2_relay_r17, type_, "eventId"); + return c.get(); + } + event_b1_s_& set_event_b1(); + event_b2_s_& set_event_b2(); + event_b1_utra_fdd_r16_s_& set_event_b1_utra_fdd_r16(); + event_b2_utra_fdd_r16_s_& set_event_b2_utra_fdd_r16(); + event_y1_relay_r17_s_& set_event_y1_relay_r17(); + event_y2_relay_r17_s_& set_event_y2_relay_r17(); + + private: + 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; + + const char* to_string() const; + int8_t to_number() const; + }; + using report_amount_e_ = enumerated; + + // 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; + // ... + // group 0 + copy_ptr report_quant_utra_fdd_r16; + // group 1 + bool include_common_location_info_r16_present = false; + copy_ptr, 1, 4>>> include_bt_meas_r16; + copy_ptr, 1, 4>>> include_wlan_meas_r16; + copy_ptr> include_sensor_meas_r16; + // group 2 + copy_ptr report_quant_relay_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EventTriggerConfigNR-SL-r16 ::= SEQUENCE +struct event_trigger_cfg_nr_sl_r16_s { + struct event_id_r16_c_ { + struct event_c1_s_ { + uint8_t c1_thres_r16 = 0; + uint8_t hysteresis_r16 = 0; + time_to_trigger_e time_to_trigger_r16; + }; + struct event_c2_r16_s_ { + uint8_t c2_thres_r16 = 0; + uint8_t hysteresis_r16 = 0; + time_to_trigger_e time_to_trigger_r16; + }; + struct types_opts { + enum options { event_c1, event_c2_r16, /*...*/ nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + event_id_r16_c_() = default; + event_id_r16_c_(const event_id_r16_c_& other); + event_id_r16_c_& operator=(const event_id_r16_c_& other); + ~event_id_r16_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_c1_s_& event_c1() + { + assert_choice_type(types::event_c1, type_, "eventId-r16"); + return c.get(); + } + event_c2_r16_s_& event_c2_r16() + { + assert_choice_type(types::event_c2_r16, type_, "eventId-r16"); + return c.get(); + } + const event_c1_s_& event_c1() const + { + assert_choice_type(types::event_c1, type_, "eventId-r16"); + return c.get(); + } + const event_c2_r16_s_& event_c2_r16() const + { + assert_choice_type(types::event_c2_r16, type_, "eventId-r16"); + return c.get(); + } + event_c1_s_& set_event_c1(); + event_c2_r16_s_& set_event_c2_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct report_amount_r16_opts { + enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using report_amount_r16_e_ = enumerated; + + // member variables + bool ext = false; + event_id_r16_c_ event_id_r16; + report_interv_e report_interv_r16; + report_amount_r16_e_ report_amount_r16; + meas_report_quant_r16_s report_quant_r16; + // ... + + // 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; +}; + +// IAB-IP-AddressConfigurationList-r16 ::= SEQUENCE +struct iab_ip_address_cfg_list_r16_s { + using iab_ip_address_to_add_mod_list_r16_l_ = dyn_array; + using iab_ip_address_to_release_list_r16_l_ = bounded_array; + + // member variables + bool ext = false; + iab_ip_address_to_add_mod_list_r16_l_ iab_ip_address_to_add_mod_list_r16; + iab_ip_address_to_release_list_r16_l_ iab_ip_address_to_release_list_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeedForGapsConfigNR-r16 ::= SEQUENCE +struct need_for_gaps_cfg_nr_r16_s { + using requested_target_band_filt_nr_r16_l_ = dyn_array; + + // member variables + requested_target_band_filt_nr_r16_l_ requested_target_band_filt_nr_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// OnDemandSIB-Request-r16 ::= SEQUENCE +struct on_demand_sib_request_r16_s { + struct on_demand_sib_request_prohibit_timer_r16_opts { + enum options { s0, s0dot5, s1, s2, s5, s10, s20, s30, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using on_demand_sib_request_prohibit_timer_r16_e_ = enumerated; + + // member variables + on_demand_sib_request_prohibit_timer_r16_e_ on_demand_sib_request_prohibit_timer_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// OtherConfig-v1610 ::= SEQUENCE +struct other_cfg_v1610_s { + bool idc_assist_cfg_r16_present = false; + bool drx_pref_cfg_r16_present = false; + bool max_bw_pref_cfg_r16_present = false; + bool max_cc_pref_cfg_r16_present = false; + bool max_mimo_layer_pref_cfg_r16_present = false; + bool min_sched_offset_pref_cfg_r16_present = false; + bool release_pref_cfg_r16_present = false; + bool ref_time_pref_report_r16_present = false; + bool bt_name_list_r16_present = false; + bool wlan_name_list_r16_present = false; + bool sensor_name_list_r16_present = false; + bool obtain_common_location_r16_present = false; + bool sl_assist_cfg_nr_r16_present = false; + setup_release_c idc_assist_cfg_r16; + setup_release_c drx_pref_cfg_r16; + setup_release_c max_bw_pref_cfg_r16; + setup_release_c max_cc_pref_cfg_r16; + setup_release_c max_mimo_layer_pref_cfg_r16; + setup_release_c min_sched_offset_pref_cfg_r16; + setup_release_c release_pref_cfg_r16; + setup_release_c, 1, 4>> bt_name_list_r16; + setup_release_c, 1, 4>> wlan_name_list_r16; + setup_release_c sensor_name_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PCI-RangeElement ::= SEQUENCE +struct pci_range_elem_s { + uint8_t pci_range_idx = 1; + 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; +}; + +// 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; + + const char* to_string() const; + int8_t to_number() const; + }; + using report_amount_e_ = enumerated; + + // 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_allowed_cell_list = false; + // ... + // group 0 + bool include_common_location_info_r16_present = false; + bool report_add_neigh_meas_r16_present = false; + copy_ptr meas_rssi_report_cfg_r16; + copy_ptr, 1, 4>>> include_bt_meas_r16; + copy_ptr, 1, 4>>> include_wlan_meas_r16; + copy_ptr> include_sensor_meas_r16; + copy_ptr> ul_delay_value_cfg_r16; + // group 1 + bool coarse_location_request_r17_present = false; + copy_ptr> ul_excess_delay_cfg_r17; + copy_ptr report_quant_relay_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + int8_t to_number() const; + }; + using report_amount_e_ = enumerated; + + // 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; + // ... + // group 0 + copy_ptr report_quant_utra_fdd_r16; + // group 1 + bool include_common_location_info_r16_present = false; + copy_ptr, 1, 4>>> include_bt_meas_r16; + copy_ptr, 1, 4>>> include_wlan_meas_r16; + copy_ptr> include_sensor_meas_r16; + // group 2 + copy_ptr report_quant_relay_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PeriodicalReportConfigNR-SL-r16 ::= SEQUENCE +struct periodical_report_cfg_nr_sl_r16_s { + struct report_amount_r16_opts { + enum options { r1, r2, r4, r8, r16, r32, r64, infinity, nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using report_amount_r16_e_ = enumerated; + + // member variables + bool ext = false; + report_interv_e report_interv_r16; + report_amount_r16_e_ report_amount_r16; + meas_report_quant_r16_s report_quant_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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 + fixed_bitstring<24> tac; + ran_area_code_list_l_ ran_area_code_list; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RMTC-Config-r16 ::= SEQUENCE +struct rmtc_cfg_r16_s { + struct rmtc_periodicity_r16_opts { + enum options { ms40, ms80, ms160, ms320, ms640, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using rmtc_periodicity_r16_e_ = enumerated; + struct meas_dur_symbols_r16_opts { + enum options { sym1, sym14or12, sym28or24, sym42or36, sym70or60, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using meas_dur_symbols_r16_e_ = enumerated; + struct ref_scs_cp_r16_opts { + enum options { khz15, khz30, khz60_n_cp, khz60_e_cp, nulltype } value; + + const char* to_string() const; + }; + using ref_scs_cp_r16_e_ = enumerated; + struct rmtc_bw_r17_opts { + enum options { mhz100, mhz400, mhz800, mhz1600, mhz2000, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using rmtc_bw_r17_e_ = enumerated; + struct meas_dur_symbols_v1700_opts { + enum options { sym140, sym560, sym1120, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using meas_dur_symbols_v1700_e_ = enumerated; + struct ref_scs_cp_v1700_opts { + enum options { khz120, khz480, khz960, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using ref_scs_cp_v1700_e_ = enumerated; + struct tci_state_info_r17_s_ { + bool ref_serv_cell_id_r17_present = false; + uint8_t tci_state_id_r17 = 0; + uint8_t ref_serv_cell_id_r17 = 0; + }; + + // member variables + bool ext = false; + bool rmtc_sf_offset_r16_present = false; + rmtc_periodicity_r16_e_ rmtc_periodicity_r16; + uint16_t rmtc_sf_offset_r16 = 0; + meas_dur_symbols_r16_e_ meas_dur_symbols_r16; + uint32_t rmtc_freq_r16 = 0; + ref_scs_cp_r16_e_ ref_scs_cp_r16; + // ... + // group 0 + bool rmtc_bw_r17_present = false; + bool meas_dur_symbols_v1700_present = false; + bool ref_scs_cp_v1700_present = false; + rmtc_bw_r17_e_ rmtc_bw_r17; + meas_dur_symbols_v1700_e_ meas_dur_symbols_v1700; + ref_scs_cp_v1700_e_ ref_scs_cp_v1700; + copy_ptr tci_state_info_r17; + // group 1 + bool ref_bwp_id_r17_present = false; + uint8_t ref_bwp_id_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCReconfiguration-v1700-IEs ::= SEQUENCE +struct rrc_recfg_v1700_ies_s { + bool other_cfg_v1700_present = false; + bool sl_l2_relay_ue_cfg_r17_present = false; + bool sl_l2_remote_ue_cfg_r17_present = false; + bool need_for_gap_ncsg_cfg_nr_r17_present = false; + bool need_for_gap_ncsg_cfg_eutra_r17_present = false; + bool musim_gap_cfg_r17_present = false; + bool ul_gap_fr2_cfg_r17_present = false; + bool scg_state_r17_present = false; + bool app_layer_meas_cfg_r17_present = false; + bool ue_tx_teg_request_ul_tdoa_cfg_r17_present = false; + bool non_crit_ext_present = false; + other_cfg_v1700_s other_cfg_v1700; + setup_release_c sl_l2_relay_ue_cfg_r17; + setup_release_c sl_l2_remote_ue_cfg_r17; + dyn_octstring ded_paging_delivery_r17; + setup_release_c need_for_gap_ncsg_cfg_nr_r17; + setup_release_c need_for_gap_ncsg_cfg_eutra_r17; + setup_release_c musim_gap_cfg_r17; + setup_release_c ul_gap_fr2_cfg_r17; + app_layer_meas_cfg_r17_s app_layer_meas_cfg_r17; + setup_release_c ue_tx_teg_request_ul_tdoa_cfg_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + // ... + // group 0 + bool use_autonomous_gaps_r16_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + // ... + // group 0 + bool use_autonomous_gaps_r16_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; +}; + +// RxTxPeriodical-r17 ::= SEQUENCE +struct rx_tx_periodical_r17_s { + struct report_amount_r17_opts { + enum options { r1, infinity, spare6, spare5, spare4, spare3, spare2, spare1, nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using report_amount_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool rx_tx_report_interv_r17_present = false; + rx_tx_report_interv_r17_e rx_tx_report_interv_r17; + report_amount_r17_e_ report_amount_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-ConfigDedicatedEUTRA-Info-r16 ::= SEQUENCE +struct sl_cfg_ded_eutra_info_r16_s { + using sl_time_offset_eutra_list_r16_l_ = std::array; + + // member variables + bool sl_time_offset_eutra_list_r16_present = false; + dyn_octstring sl_cfg_ded_eutra_r16; + sl_time_offset_eutra_list_r16_l_ sl_time_offset_eutra_list_r16; + + // 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using periodicity_e_ = enumerated; + + // member variables + 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; +}; + +// SSB-MTC3List-r16 ::= SEQUENCE (SIZE (1..4)) OF SSB-MTC3-r16 +using ssb_mtc3_list_r16_l = dyn_array; + +// SliceInfoDedicated-r17 ::= SEQUENCE +struct slice_info_ded_r17_s { + bool nsag_cell_resel_prio_r17_present = false; + bool nsag_cell_resel_sub_prio_r17_present = false; + nsag_id_info_r17_s nsag_id_info_r17; + uint8_t nsag_cell_resel_prio_r17 = 0; + cell_resel_sub_prio_e nsag_cell_resel_sub_prio_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// T312-r16 ::= ENUMERATED +struct t312_r16_opts { + enum options { ms0, ms50, ms100, ms200, ms300, ms400, ms500, ms1000, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; +}; +using t312_r16_e = enumerated; + +// T316-r16 ::= ENUMERATED +struct t316_r16_opts { + enum options { ms50, ms100, ms200, ms300, ms400, ms500, ms600, ms1000, ms1500, ms2000, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; +}; +using t316_r16_e = enumerated; + +// TrackingAreaIdentity-r16 ::= SEQUENCE +struct tracking_area_id_r16_s { + plmn_id_s plmn_id_r16; + fixed_bitstring<24> tac_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Tx-PoolMeasList-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..16) +using tx_pool_meas_list_r16_l = bounded_array; + +// UTRA-FDD-CellIndexList-r16 ::= SEQUENCE (SIZE (1..32)) OF INTEGER (1..32) +using utra_fdd_cell_idx_list_r16_l = bounded_array; + +// UTRA-FDD-Q-OffsetRange-r16 ::= ENUMERATED +struct utra_fdd_q_offset_range_r16_opts { + enum options { + db_neg24, + db_neg22, + db_neg20, + db_neg18, + db_neg16, + db_neg14, + db_neg12, + db_neg10, + db_neg8, + db_neg6, + db_neg5, + db_neg4, + db_neg3, + db_neg2, + db_neg1, + db0, + db1, + db2, + db3, + db4, + db5, + db6, + db8, + db10, + db12, + db14, + db16, + db18, + db20, + db22, + db24, + nulltype + } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; +}; +using utra_fdd_q_offset_range_r16_e = enumerated; + +// ValidityArea-r16 ::= SEQUENCE +struct validity_area_r16_s { + uint32_t carrier_freq_r16 = 0; + validity_cell_list_l validity_cell_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellGlobalIdList-r16 ::= SEQUENCE (SIZE (1..32)) OF CGI-Info-Logging-r16 +using cell_global_id_list_r16_l = dyn_array; + +// MRDC-SecondaryCellGroupConfig ::= SEQUENCE +struct mrdc_secondary_cell_group_cfg_s { + struct mrdc_secondary_cell_group_c_ { + struct types_opts { + enum options { nr_scg, eutra_scg, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + 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 + dyn_octstring& nr_scg() + { + assert_choice_type(types::nr_scg, type_, "mrdc-SecondaryCellGroup"); + return c.get(); + } + dyn_octstring& eutra_scg() + { + assert_choice_type(types::eutra_scg, type_, "mrdc-SecondaryCellGroup"); + return c.get(); + } + const dyn_octstring& nr_scg() const + { + assert_choice_type(types::nr_scg, type_, "mrdc-SecondaryCellGroup"); + return c.get(); + } + const dyn_octstring& eutra_scg() const + { + assert_choice_type(types::eutra_scg, type_, "mrdc-SecondaryCellGroup"); + return c.get(); + } + dyn_octstring& set_nr_scg(); + dyn_octstring& set_eutra_scg(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + 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; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; +}; +using meas_gap_sharing_scheme_e = enumerated; + +// MeasObjectCLI-r16 ::= SEQUENCE +struct meas_obj_cli_r16_s { + bool ext = false; + cli_res_cfg_r16_s cli_res_cfg_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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 excluded_cells_to_add_mod_list_eutran_l_ = dyn_array; + + // member variables + bool ext = 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 excluded_cells_to_rem_list_eutran; + excluded_cells_to_add_mod_list_eutran_l_ excluded_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; + // ... + // group 0 + bool associated_meas_gap_r17_present = false; + uint8_t associated_meas_gap_r17 = 1; + + // 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 excluded_cells_to_add_mod_list_l_ = dyn_array; + using allowed_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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using meas_cycle_scell_e_ = enumerated; + struct meas_cycle_pscell_r17_opts { + enum options { ms160, ms256, ms320, ms512, ms640, ms1024, ms1280, spare1, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using meas_cycle_pscell_r17_e_ = enumerated; + + // 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; + 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 excluded_cells_to_rem_list; + excluded_cells_to_add_mod_list_l_ excluded_cells_to_add_mod_list; + pci_range_idx_list_l allowed_cells_to_rem_list; + allowed_cells_to_add_mod_list_l_ allowed_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; + // group 1 + copy_ptr smtc3list_r16; + copy_ptr> rmtc_cfg_r16; + copy_ptr> t312_r16; + // group 2 + bool associated_meas_gap_ssb_r17_present = false; + bool associated_meas_gap_csi_rs_r17_present = false; + bool meas_cycle_pscell_r17_present = false; + uint8_t associated_meas_gap_ssb_r17 = 1; + uint8_t associated_meas_gap_csi_rs_r17 = 1; + copy_ptr smtc4list_r17; + meas_cycle_pscell_r17_e_ meas_cycle_pscell_r17; + copy_ptr cells_to_add_mod_list_ext_v1710; + // group 3 + bool associated_meas_gap_ssb2_v1720_present = false; + bool associated_meas_gap_csi_rs2_v1720_present = false; + uint8_t associated_meas_gap_ssb2_v1720 = 1; + uint8_t associated_meas_gap_csi_rs2_v1720 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectNR-SL-r16 ::= SEQUENCE +struct meas_obj_nr_sl_r16_s { + tx_pool_meas_list_r16_l tx_pool_meas_to_rem_list_r16; + tx_pool_meas_list_r16_l tx_pool_meas_to_add_mod_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectRxTxDiff-r17 ::= SEQUENCE +struct meas_obj_rx_tx_diff_r17_s { + struct dl_ref_r17_c_ { + struct types_opts { + enum options { prs_ref_r17, csi_rs_ref_r17, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + dl_ref_r17_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 + void set_prs_ref_r17(); + void set_csi_rs_ref_r17(); + + private: + types type_; + }; + + // member variables + bool ext = false; + bool dl_ref_r17_present = false; + dl_ref_r17_c_ dl_ref_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasObjectUTRA-FDD-r16 ::= SEQUENCE +struct meas_obj_utra_fdd_r16_s { + bool ext = false; + bool utra_fdd_q_offset_range_r16_present = false; + uint16_t carrier_freq_r16 = 0; + utra_fdd_q_offset_range_r16_e utra_fdd_q_offset_range_r16; + utra_fdd_cell_idx_list_r16_l cells_to_rem_list_r16; + cells_to_add_mod_list_utra_fdd_r16_l cells_to_add_mod_list_r16; + // ... + + // 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; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using overheat_ind_prohibit_timer_e_ = enumerated; + + // 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; +}; + +// PosGapConfig-r17 ::= SEQUENCE +struct pos_gap_cfg_r17_s { + struct mgl_r17_opts { + enum options { ms1dot5, ms3, ms3dot5, ms4, ms5dot5, ms6, ms10, ms20, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using mgl_r17_e_ = enumerated; + struct mgrp_r17_opts { + enum options { ms20, ms40, ms80, ms160, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using mgrp_r17_e_ = enumerated; + struct mgta_r17_opts { + enum options { ms0, ms0dot25, ms0dot5, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using mgta_r17_e_ = enumerated; + struct gap_type_r17_opts { + enum options { per_ue, per_fr1, per_fr2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using gap_type_r17_e_ = enumerated; + + // member variables + bool ext = false; + uint8_t meas_pos_pre_cfg_gap_id_r17 = 1; + uint8_t gap_offset_r17 = 0; + mgl_r17_e_ mgl_r17; + mgrp_r17_e_ mgrp_r17; + mgta_r17_e_ mgta_r17; + gap_type_r17_e_ gap_type_r17; + // ... + + // 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; +}; + +// RRCReconfiguration-v1610-IEs ::= SEQUENCE +struct rrc_recfg_v1610_ies_s { + bool other_cfg_v1610_present = false; + bool bap_cfg_r16_present = false; + bool iab_ip_address_cfg_list_r16_present = false; + bool conditional_recfg_r16_present = false; + bool daps_source_release_r16_present = false; + bool t316_r16_present = false; + bool need_for_gaps_cfg_nr_r16_present = false; + bool on_demand_sib_request_r16_present = false; + bool sl_cfg_ded_nr_r16_present = false; + bool sl_cfg_ded_eutra_info_r16_present = false; + bool target_cell_smtc_scg_r16_present = false; + bool non_crit_ext_present = false; + other_cfg_v1610_s other_cfg_v1610; + setup_release_c bap_cfg_r16; + iab_ip_address_cfg_list_r16_s iab_ip_address_cfg_list_r16; + conditional_recfg_r16_s conditional_recfg_r16; + setup_release_c t316_r16; + setup_release_c need_for_gaps_cfg_nr_r16; + setup_release_c on_demand_sib_request_r16; + dyn_octstring ded_pos_sys_info_delivery_r16; + setup_release_c sl_cfg_ded_nr_r16; + setup_release_c sl_cfg_ded_eutra_info_r16; + ssb_mtc_s target_cell_smtc_scg_r16; + rrc_recfg_v1700_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; +}; + +// RRCRelease-v1710-IEs ::= SEQUENCE +struct rrc_release_v1710_ies_s { + bool no_last_cell_upd_r17_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; +}; + +// ReportConfigInterRAT ::= SEQUENCE +struct report_cfg_inter_rat_s { + struct report_type_c_ { + struct types_opts { + enum options { periodical, event_triggered, report_cgi, /*...*/ report_sftd, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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_inter_rat_s& periodical() + { + assert_choice_type(types::periodical, type_, "reportType"); + return c.get(); + } + event_trigger_cfg_inter_rat_s& event_triggered() + { + assert_choice_type(types::event_triggered, type_, "reportType"); + return c.get(); + } + report_cgi_eutra_s& report_cgi() + { + assert_choice_type(types::report_cgi, type_, "reportType"); + return c.get(); + } + report_sftd_eutra_s& report_sftd() + { + assert_choice_type(types::report_sftd, type_, "reportType"); + return c.get(); + } + const periodical_report_cfg_inter_rat_s& periodical() const + { + assert_choice_type(types::periodical, type_, "reportType"); + return c.get(); + } + const event_trigger_cfg_inter_rat_s& event_triggered() const + { + assert_choice_type(types::event_triggered, type_, "reportType"); + return c.get(); + } + const report_cgi_eutra_s& report_cgi() const + { + assert_choice_type(types::report_cgi, type_, "reportType"); + return c.get(); + } + const report_sftd_eutra_s& report_sftd() const + { + assert_choice_type(types::report_sftd, type_, "reportType"); + return c.get(); + } + periodical_report_cfg_inter_rat_s& set_periodical(); + event_trigger_cfg_inter_rat_s& set_event_triggered(); + report_cgi_eutra_s& set_report_cgi(); + report_sftd_eutra_s& set_report_sftd(); + + 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, + report_sftd, + cond_trigger_cfg_r16, + cli_periodical_r16, + cli_event_triggered_r16, + rx_tx_periodical_r17, + nulltype + } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::periodical, type_, "reportType"); + return c.get(); + } + event_trigger_cfg_s& event_triggered() + { + assert_choice_type(types::event_triggered, type_, "reportType"); + return c.get(); + } + report_cgi_s& report_cgi() + { + assert_choice_type(types::report_cgi, type_, "reportType"); + return c.get(); + } + report_sftd_nr_s& report_sftd() + { + assert_choice_type(types::report_sftd, type_, "reportType"); + return c.get(); + } + cond_trigger_cfg_r16_s& cond_trigger_cfg_r16() + { + assert_choice_type(types::cond_trigger_cfg_r16, type_, "reportType"); + return c.get(); + } + cli_periodical_report_cfg_r16_s& cli_periodical_r16() + { + assert_choice_type(types::cli_periodical_r16, type_, "reportType"); + return c.get(); + } + cli_event_trigger_cfg_r16_s& cli_event_triggered_r16() + { + assert_choice_type(types::cli_event_triggered_r16, type_, "reportType"); + return c.get(); + } + rx_tx_periodical_r17_s& rx_tx_periodical_r17() + { + assert_choice_type(types::rx_tx_periodical_r17, type_, "reportType"); + return c.get(); + } + const periodical_report_cfg_s& periodical() const + { + assert_choice_type(types::periodical, type_, "reportType"); + return c.get(); + } + const event_trigger_cfg_s& event_triggered() const + { + assert_choice_type(types::event_triggered, type_, "reportType"); + return c.get(); + } + const report_cgi_s& report_cgi() const + { + assert_choice_type(types::report_cgi, type_, "reportType"); + return c.get(); + } + const report_sftd_nr_s& report_sftd() const + { + assert_choice_type(types::report_sftd, type_, "reportType"); + return c.get(); + } + const cond_trigger_cfg_r16_s& cond_trigger_cfg_r16() const + { + assert_choice_type(types::cond_trigger_cfg_r16, type_, "reportType"); + return c.get(); + } + const cli_periodical_report_cfg_r16_s& cli_periodical_r16() const + { + assert_choice_type(types::cli_periodical_r16, type_, "reportType"); + return c.get(); + } + const cli_event_trigger_cfg_r16_s& cli_event_triggered_r16() const + { + assert_choice_type(types::cli_event_triggered_r16, type_, "reportType"); + return c.get(); + } + const rx_tx_periodical_r17_s& rx_tx_periodical_r17() const + { + assert_choice_type(types::rx_tx_periodical_r17, type_, "reportType"); + return c.get(); + } + periodical_report_cfg_s& set_periodical(); + event_trigger_cfg_s& set_event_triggered(); + report_cgi_s& set_report_cgi(); + report_sftd_nr_s& set_report_sftd(); + cond_trigger_cfg_r16_s& set_cond_trigger_cfg_r16(); + cli_periodical_report_cfg_r16_s& set_cli_periodical_r16(); + cli_event_trigger_cfg_r16_s& set_cli_event_triggered_r16(); + rx_tx_periodical_r17_s& set_rx_tx_periodical_r17(); + + 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-SL-r16 ::= SEQUENCE +struct report_cfg_nr_sl_r16_s { + struct report_type_r16_c_ { + struct types_opts { + enum options { periodical_r16, event_triggered_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + report_type_r16_c_() = default; + report_type_r16_c_(const report_type_r16_c_& other); + report_type_r16_c_& operator=(const report_type_r16_c_& other); + ~report_type_r16_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_nr_sl_r16_s& periodical_r16() + { + assert_choice_type(types::periodical_r16, type_, "reportType-r16"); + return c.get(); + } + event_trigger_cfg_nr_sl_r16_s& event_triggered_r16() + { + assert_choice_type(types::event_triggered_r16, type_, "reportType-r16"); + return c.get(); + } + const periodical_report_cfg_nr_sl_r16_s& periodical_r16() const + { + assert_choice_type(types::periodical_r16, type_, "reportType-r16"); + return c.get(); + } + const event_trigger_cfg_nr_sl_r16_s& event_triggered_r16() const + { + assert_choice_type(types::event_triggered_r16, type_, "reportType-r16"); + return c.get(); + } + periodical_report_cfg_nr_sl_r16_s& set_periodical_r16(); + event_trigger_cfg_nr_sl_r16_s& set_event_triggered_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + report_type_r16_c_ report_type_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SliceInfoListDedicated-r17 ::= SEQUENCE (SIZE (1..8)) OF SliceInfoDedicated-r17 +using slice_info_list_ded_r17_l = dyn_array; + +// TrackingAreaCodeList-r16 ::= SEQUENCE (SIZE (1..8)) OF BIT STRING (SIZE (24)) +using tac_list_r16_l = bounded_array, 8>; + +// TrackingAreaIdentityList-r16 ::= SEQUENCE (SIZE (1..8)) OF TrackingAreaIdentity-r16 +using tracking_area_id_list_r16_l = dyn_array; + +// ValidityAreaList-r16 ::= SEQUENCE (SIZE (1..8)) OF ValidityArea-r16 +using validity_area_list_r16_l = dyn_array; + +// AreaConfig-r16 ::= CHOICE +struct area_cfg_r16_c { + struct types_opts { + enum options { cell_global_id_list_r16, tac_list_r16, tracking_area_id_list_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + area_cfg_r16_c() = default; + area_cfg_r16_c(const area_cfg_r16_c& other); + area_cfg_r16_c& operator=(const area_cfg_r16_c& other); + ~area_cfg_r16_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_global_id_list_r16_l& cell_global_id_list_r16() + { + assert_choice_type(types::cell_global_id_list_r16, type_, "AreaConfig-r16"); + return c.get(); + } + tac_list_r16_l& tac_list_r16() + { + assert_choice_type(types::tac_list_r16, type_, "AreaConfig-r16"); + return c.get(); + } + tracking_area_id_list_r16_l& tracking_area_id_list_r16() + { + assert_choice_type(types::tracking_area_id_list_r16, type_, "AreaConfig-r16"); + return c.get(); + } + const cell_global_id_list_r16_l& cell_global_id_list_r16() const + { + assert_choice_type(types::cell_global_id_list_r16, type_, "AreaConfig-r16"); + return c.get(); + } + const tac_list_r16_l& tac_list_r16() const + { + assert_choice_type(types::tac_list_r16, type_, "AreaConfig-r16"); + return c.get(); + } + const tracking_area_id_list_r16_l& tracking_area_id_list_r16() const + { + assert_choice_type(types::tracking_area_id_list_r16, type_, "AreaConfig-r16"); + return c.get(); + } + cell_global_id_list_r16_l& set_cell_global_id_list_r16(); + tac_list_r16_l& set_tac_list_r16(); + tracking_area_id_list_r16_l& set_tracking_area_id_list_r16(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// FilterConfigCLI-r16 ::= SEQUENCE +struct filt_cfg_cli_r16_s { + bool filt_coef_srs_rsrp_r16_present = false; + bool filt_coef_cli_rssi_r16_present = false; + filt_coef_e filt_coef_srs_rsrp_r16; + filt_coef_e filt_coef_cli_rssi_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqPriorityDedicatedSlicing-r17 ::= SEQUENCE +struct freq_prio_ded_slicing_r17_s { + uint32_t dl_explicit_carrier_freq_r17 = 0; + slice_info_list_ded_r17_l slice_info_list_ded_r17; + + // 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; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using mgl_e_ = enumerated; + struct mgrp_opts { + enum options { ms20, ms40, ms80, ms160, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using mgrp_e_ = enumerated; + struct mgta_opts { + enum options { ms0, ms0dot25, ms0dot5, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using mgta_e_ = enumerated; + struct ref_serv_cell_ind_opts { + enum options { pcell, pscell, mcg_fr2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ref_serv_cell_ind_e_ = enumerated; + struct mgl_r16_opts { + enum options { ms10, ms20, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using mgl_r16_e_ = enumerated; + + // member variables + 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; + // group 1 + bool ref_fr2_serv_cell_async_ca_r16_present = false; + bool mgl_r16_present = false; + uint8_t ref_fr2_serv_cell_async_ca_r16 = 0; + mgl_r16_e_ mgl_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// GapConfig-r17 ::= SEQUENCE +struct gap_cfg_r17_s { + struct gap_type_r17_opts { + enum options { per_ue, per_fr1, per_fr2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using gap_type_r17_e_ = enumerated; + struct mgl_r17_opts { + enum options { ms1, ms1dot5, ms2, ms3, ms3dot5, ms4, ms5, ms5dot5, ms6, ms10, ms20, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using mgl_r17_e_ = enumerated; + struct mgrp_r17_opts { + enum options { ms20, ms40, ms80, ms160, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using mgrp_r17_e_ = enumerated; + struct mgta_r17_opts { + enum options { ms0, ms0dot25, ms0dot5, ms0dot75, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using mgta_r17_e_ = enumerated; + struct ref_serv_cell_ind_r17_opts { + enum options { pcell, pscell, mcg_fr2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ref_serv_cell_ind_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool ref_serv_cell_ind_r17_present = false; + bool ref_fr2_serv_cell_async_ca_r17_present = false; + bool pre_cfg_ind_r17_present = false; + bool ncsg_ind_r17_present = false; + bool gap_assoc_prs_r17_present = false; + bool gap_sharing_r17_present = false; + bool gap_prio_r17_present = false; + uint8_t meas_gap_id_r17 = 1; + gap_type_r17_e_ gap_type_r17; + uint8_t gap_offset_r17 = 0; + mgl_r17_e_ mgl_r17; + mgrp_r17_e_ mgrp_r17; + mgta_r17_e_ mgta_r17; + ref_serv_cell_ind_r17_e_ ref_serv_cell_ind_r17; + uint8_t ref_fr2_serv_cell_async_ca_r17 = 0; + meas_gap_sharing_scheme_e gap_sharing_r17; + uint8_t gap_prio_r17 = 1; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqTargetInfo-r16 ::= SEQUENCE +struct inter_freq_target_info_r16_s { + using cell_list_r16_l_ = bounded_array; + + // member variables + uint32_t dl_carrier_freq_r16 = 0; + cell_list_r16_l_ cell_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; +}; + +// MeasIdleConfigDedicated-r16 ::= SEQUENCE +struct meas_idle_cfg_ded_r16_s { + using meas_idle_carrier_list_nr_r16_l_ = dyn_array; + using meas_idle_carrier_list_eutra_r16_l_ = dyn_array; + struct meas_idle_dur_r16_opts { + enum options { sec10, sec30, sec60, sec120, sec180, sec240, sec300, spare, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using meas_idle_dur_r16_e_ = enumerated; + + // member variables + bool ext = false; + meas_idle_carrier_list_nr_r16_l_ meas_idle_carrier_list_nr_r16; + meas_idle_carrier_list_eutra_r16_l_ meas_idle_carrier_list_eutra_r16; + meas_idle_dur_r16_e_ meas_idle_dur_r16; + validity_area_list_r16_l validity_area_list_r16; + // ... + + // 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 { + meas_obj_nr, + // ... + meas_obj_eutra, + meas_obj_utra_fdd_r16, + meas_obj_nr_sl_r16, + meas_obj_cli_r16, + meas_obj_rx_tx_diff_r17, + meas_obj_relay_r17, + nulltype + } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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_(); } + 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() + { + assert_choice_type(types::meas_obj_nr, type_, "measObject"); + return c.get(); + } + meas_obj_eutra_s& meas_obj_eutra() + { + assert_choice_type(types::meas_obj_eutra, type_, "measObject"); + return c.get(); + } + meas_obj_utra_fdd_r16_s& meas_obj_utra_fdd_r16() + { + assert_choice_type(types::meas_obj_utra_fdd_r16, type_, "measObject"); + return c.get(); + } + meas_obj_nr_sl_r16_s& meas_obj_nr_sl_r16() + { + assert_choice_type(types::meas_obj_nr_sl_r16, type_, "measObject"); + return c.get(); + } + meas_obj_cli_r16_s& meas_obj_cli_r16() + { + assert_choice_type(types::meas_obj_cli_r16, type_, "measObject"); + return c.get(); + } + meas_obj_rx_tx_diff_r17_s& meas_obj_rx_tx_diff_r17() + { + assert_choice_type(types::meas_obj_rx_tx_diff_r17, type_, "measObject"); + return c.get(); + } + sl_meas_obj_r16_s& meas_obj_relay_r17() + { + assert_choice_type(types::meas_obj_relay_r17, type_, "measObject"); + return c.get(); + } + const meas_obj_nr_s& meas_obj_nr() const + { + assert_choice_type(types::meas_obj_nr, type_, "measObject"); + return c.get(); + } + const meas_obj_eutra_s& meas_obj_eutra() const + { + assert_choice_type(types::meas_obj_eutra, type_, "measObject"); + return c.get(); + } + const meas_obj_utra_fdd_r16_s& meas_obj_utra_fdd_r16() const + { + assert_choice_type(types::meas_obj_utra_fdd_r16, type_, "measObject"); + return c.get(); + } + const meas_obj_nr_sl_r16_s& meas_obj_nr_sl_r16() const + { + assert_choice_type(types::meas_obj_nr_sl_r16, type_, "measObject"); + return c.get(); + } + const meas_obj_cli_r16_s& meas_obj_cli_r16() const + { + assert_choice_type(types::meas_obj_cli_r16, type_, "measObject"); + return c.get(); + } + const meas_obj_rx_tx_diff_r17_s& meas_obj_rx_tx_diff_r17() const + { + assert_choice_type(types::meas_obj_rx_tx_diff_r17, type_, "measObject"); + return c.get(); + } + const sl_meas_obj_r16_s& meas_obj_relay_r17() const + { + assert_choice_type(types::meas_obj_relay_r17, type_, "measObject"); + return c.get(); + } + meas_obj_nr_s& set_meas_obj_nr(); + meas_obj_eutra_s& set_meas_obj_eutra(); + meas_obj_utra_fdd_r16_s& set_meas_obj_utra_fdd_r16(); + meas_obj_nr_sl_r16_s& set_meas_obj_nr_sl_r16(); + meas_obj_cli_r16_s& set_meas_obj_cli_r16(); + meas_obj_rx_tx_diff_r17_s& set_meas_obj_rx_tx_diff_r17(); + sl_meas_obj_r16_s& set_meas_obj_relay_r17(); + + private: + types type_; + 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; + +// PosMeasGapPreConfigToAddModList-r17 ::= SEQUENCE (SIZE (1..16)) OF PosGapConfig-r17 +using pos_meas_gap_pre_cfg_to_add_mod_list_r17_l = dyn_array; + +// PosMeasGapPreConfigToReleaseList-r17 ::= SEQUENCE (SIZE (1..16)) OF INTEGER (1..16) +using pos_meas_gap_pre_cfg_to_release_list_r17_l = bounded_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; +}; + +// QuantityConfigUTRA-FDD-r16 ::= SEQUENCE +struct quant_cfg_utra_fdd_r16_s { + bool filt_coef_rs_cp_r16_present = false; + bool filt_coef_ec_no_r16_present = false; + filt_coef_e filt_coef_rs_cp_r16; + filt_coef_e filt_coef_ec_no_r16; + + // 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, utra_fdd_v1610, /*...*/ nulltype } value; + + const char* to_string() const; +}; +using rat_type_e = enumerated; + +// RRCReconfiguration-v1560-IEs ::= SEQUENCE +struct rrc_recfg_v1560_ies_s { + bool mrdc_secondary_cell_group_cfg_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; + rrc_recfg_v1610_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; +}; + +// RRCRelease-v1650-IEs ::= SEQUENCE +struct rrc_release_v1650_ies_s { + bool mps_prio_ind_r16_present = false; + bool non_crit_ext_present = false; + rrc_release_v1710_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; +}; + +// RRCResume-v1700-IEs ::= SEQUENCE +struct rrc_resume_v1700_ies_s { + bool sl_cfg_ded_nr_r17_present = false; + bool sl_l2_remote_ue_cfg_r17_present = false; + bool need_for_gap_ncsg_cfg_nr_r17_present = false; + bool need_for_gap_ncsg_cfg_eutra_r17_present = false; + bool scg_state_r17_present = false; + bool app_layer_meas_cfg_r17_present = false; + bool non_crit_ext_present = false; + setup_release_c sl_cfg_ded_nr_r17; + setup_release_c sl_l2_remote_ue_cfg_r17; + setup_release_c need_for_gap_ncsg_cfg_nr_r17; + setup_release_c need_for_gap_ncsg_cfg_eutra_r17; + app_layer_meas_cfg_r17_s app_layer_meas_cfg_r17; + + // 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 { report_cfg_nr, /*...*/ report_cfg_inter_rat, report_cfg_nr_sl_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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_(); } + 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() + { + assert_choice_type(types::report_cfg_nr, type_, "reportConfig"); + return c.get(); + } + report_cfg_inter_rat_s& report_cfg_inter_rat() + { + assert_choice_type(types::report_cfg_inter_rat, type_, "reportConfig"); + return c.get(); + } + report_cfg_nr_sl_r16_s& report_cfg_nr_sl_r16() + { + assert_choice_type(types::report_cfg_nr_sl_r16, type_, "reportConfig"); + return c.get(); + } + const report_cfg_nr_s& report_cfg_nr() const + { + assert_choice_type(types::report_cfg_nr, type_, "reportConfig"); + return c.get(); + } + const report_cfg_inter_rat_s& report_cfg_inter_rat() const + { + assert_choice_type(types::report_cfg_inter_rat, type_, "reportConfig"); + return c.get(); + } + const report_cfg_nr_sl_r16_s& report_cfg_nr_sl_r16() const + { + assert_choice_type(types::report_cfg_nr_sl_r16, type_, "reportConfig"); + return c.get(); + } + report_cfg_nr_s& set_report_cfg_nr(); + report_cfg_inter_rat_s& set_report_cfg_inter_rat(); + report_cfg_nr_sl_r16_s& set_report_cfg_nr_sl_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // 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; +}; + +// RxTxTimeDiff-r17 ::= SEQUENCE +struct rx_tx_time_diff_r17_s { + bool ext = false; + bool result_k5_r17_present = false; + uint16_t result_k5_r17 = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AreaConfiguration-v1700 ::= SEQUENCE +struct area_cfg_v1700_s { + using inter_freq_target_list_r17_l_ = dyn_array; + + // member variables + bool area_cfg_r17_present = false; + area_cfg_r16_c area_cfg_r17; + inter_freq_target_list_r17_l_ inter_freq_target_list_r17; + + // 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; +}; + +// DLInformationTransfer-v1700-IEs ::= SEQUENCE +struct dl_info_transfer_v1700_ies_s { + struct ta_pdc_r17_opts { + enum options { activ, deactiv, nulltype } value; + + const char* to_string() const; + }; + using ta_pdc_r17_e_ = enumerated; + + // member variables + bool rx_tx_time_diff_gnb_r17_present = false; + bool ta_pdc_r17_present = false; + bool sib9_fallback_r17_present = false; + bool non_crit_ext_present = false; + dyn_octstring ded_info_f1c_r17; + rx_tx_time_diff_r17_s rx_tx_time_diff_gnb_r17; + ta_pdc_r17_e_ ta_pdc_r17; + + // 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; +}; + +// EventType-r16 ::= CHOICE +struct event_type_r16_c { + struct event_l1_s_ { + meas_trigger_quant_c l1_thres; + uint8_t hysteresis = 0; + time_to_trigger_e time_to_trigger; + }; + struct types_opts { + enum options { out_of_coverage, event_l1, /*...*/ nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + event_type_r16_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 + event_l1_s_& event_l1() + { + assert_choice_type(types::event_l1, type_, "EventType-r16"); + return c; + } + const event_l1_s_& event_l1() const + { + assert_choice_type(types::event_l1, type_, "EventType-r16"); + return c; + } + void set_out_of_coverage(); + event_l1_s_& set_event_l1(); + +private: + types type_; + event_l1_s_ c; +}; + +// ExtendedPagingCycle-r17 ::= ENUMERATED +struct extended_paging_cycle_r17_opts { + enum options { rf256, rf512, rf1024, spare1, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; +}; +using extended_paging_cycle_r17_e = enumerated; + +// FreqPriorityListDedicatedSlicing-r17 ::= SEQUENCE (SIZE (1..8)) OF FreqPriorityDedicatedSlicing-r17 +using freq_prio_list_ded_slicing_r17_l = dyn_array; + +// 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; + +// LoggingInterval-r16 ::= ENUMERATED +struct logging_interv_r16_opts { + enum options { + ms320, + ms640, + ms1280, + ms2560, + ms5120, + ms10240, + ms20480, + ms30720, + ms40960, + ms61440, + infinity, + nulltype + } value; + typedef int32_t number_type; + + const char* to_string() const; + int32_t to_number() const; +}; +using logging_interv_r16_e = enumerated; + +// MasterKeyUpdate ::= SEQUENCE +struct master_key_upd_s { + bool ext = 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 { + using gap_to_add_mod_list_r17_l_ = dyn_array; + using gap_to_release_list_r17_l_ = bounded_array; + + // member variables + bool ext = false; + bool gap_fr2_present = false; + setup_release_c gap_fr2; + // ... + // group 0 + copy_ptr> gap_fr1; + copy_ptr> gap_ue; + // group 1 + copy_ptr gap_to_add_mod_list_r17; + copy_ptr gap_to_release_list_r17; + copy_ptr pos_meas_gap_pre_cfg_to_add_mod_list_r17; + copy_ptr pos_meas_gap_pre_cfg_to_release_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using delay_budget_report_prohibit_timer_e_ = enumerated; + + // member variables + delay_budget_report_prohibit_timer_e_ delay_budget_report_prohibit_timer; + }; + struct types_opts { + enum options { release, setup, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::setup, type_, "delayBudgetReportingConfig"); + return c; + } + const setup_s_& setup() const + { + assert_choice_type(types::setup, type_, "delayBudgetReportingConfig"); + return c; + } + void set_release(); + setup_s_& set_setup(); + + private: + types type_; + setup_s_ c; + }; + + // member variables + 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; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + uint16_t to_number() const; +}; +using periodic_rnau_timer_value_e = enumerated; + +// QuantityConfig ::= SEQUENCE +struct quant_cfg_s { + using quant_cfg_nr_list_l_ = dyn_array; + + // member variables + bool ext = false; + quant_cfg_nr_list_l_ quant_cfg_nr_list; + // ... + // group 0 + copy_ptr quant_cfg_eutra; + // group 1 + copy_ptr quant_cfg_utra_fdd_r16; + copy_ptr quant_cfg_cli_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RAN-NotificationAreaInfo ::= CHOICE +struct ran_notif_area_info_c { + struct types_opts { + enum options { cell_list, ran_area_cfg_list, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::cell_list, type_, "RAN-NotificationAreaInfo"); + return c.get(); + } + plmn_ran_area_cfg_list_l& ran_area_cfg_list() + { + assert_choice_type(types::ran_area_cfg_list, type_, "RAN-NotificationAreaInfo"); + return c.get(); + } + const plmn_ran_area_cell_list_l& cell_list() const + { + assert_choice_type(types::cell_list, type_, "RAN-NotificationAreaInfo"); + return c.get(); + } + const plmn_ran_area_cfg_list_l& ran_area_cfg_list() const + { + assert_choice_type(types::ran_area_cfg_list, type_, "RAN-NotificationAreaInfo"); + return c.get(); + } + plmn_ran_area_cell_list_l& set_cell_list(); + plmn_ran_area_cfg_list_l& set_ran_area_cfg_list(); + +private: + 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; + rrc_recfg_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; +}; + +// RRCRelease-v1610-IEs ::= SEQUENCE +struct rrc_release_v1610_ies_s { + bool voice_fallback_ind_r16_present = false; + bool meas_idle_cfg_r16_present = false; + bool non_crit_ext_present = false; + setup_release_c meas_idle_cfg_r16; + rrc_release_v1650_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; +}; + +// RRCResume-v1610-IEs ::= SEQUENCE +struct rrc_resume_v1610_ies_s { + struct mrdc_secondary_cell_group_r16_c_ { + struct types_opts { + enum options { nr_scg_r16, eutra_scg_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + mrdc_secondary_cell_group_r16_c_() = default; + mrdc_secondary_cell_group_r16_c_(const mrdc_secondary_cell_group_r16_c_& other); + mrdc_secondary_cell_group_r16_c_& operator=(const mrdc_secondary_cell_group_r16_c_& other); + ~mrdc_secondary_cell_group_r16_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_r16() + { + assert_choice_type(types::nr_scg_r16, type_, "mrdc-SecondaryCellGroup-r16"); + return c.get(); + } + dyn_octstring& eutra_scg_r16() + { + assert_choice_type(types::eutra_scg_r16, type_, "mrdc-SecondaryCellGroup-r16"); + return c.get(); + } + const dyn_octstring& nr_scg_r16() const + { + assert_choice_type(types::nr_scg_r16, type_, "mrdc-SecondaryCellGroup-r16"); + return c.get(); + } + const dyn_octstring& eutra_scg_r16() const + { + assert_choice_type(types::eutra_scg_r16, type_, "mrdc-SecondaryCellGroup-r16"); + return c.get(); + } + dyn_octstring& set_nr_scg_r16(); + dyn_octstring& set_eutra_scg_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool idle_mode_meas_req_r16_present = false; + bool restore_mcg_scells_r16_present = false; + bool restore_scg_r16_present = false; + bool mrdc_secondary_cell_group_r16_present = false; + bool need_for_gaps_cfg_nr_r16_present = false; + bool non_crit_ext_present = false; + mrdc_secondary_cell_group_r16_c_ mrdc_secondary_cell_group_r16; + setup_release_c need_for_gaps_cfg_nr_r16; + rrc_resume_v1700_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; +}; + +// 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using cn_type_e_ = enumerated; + + // member variables + bool cn_type_present = false; + uint32_t eutra_freq = 0; + cn_type_e_ cn_type; + + // 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..64)) OF ReportConfigToAddMod +using report_cfg_to_add_mod_list_l = dyn_array; + +// ReportConfigToRemoveList ::= SEQUENCE (SIZE (1..64)) OF INTEGER (1..64) +using report_cfg_to_rem_list_l = dyn_array; + +// SDT-Config-r17 ::= SEQUENCE +struct sdt_cfg_r17_s { + using sdt_drb_list_r17_l_ = bounded_array; + struct sdt_drb_continue_rohc_r17_opts { + enum options { cell, rna, nulltype } value; + + const char* to_string() const; + }; + using sdt_drb_continue_rohc_r17_e_ = enumerated; + + // member variables + bool sdt_drb_list_r17_present = false; + bool sdt_srb2_ind_r17_present = false; + bool sdt_mac_phy_cg_cfg_r17_present = false; + bool sdt_drb_continue_rohc_r17_present = false; + sdt_drb_list_r17_l_ sdt_drb_list_r17; + setup_release_c sdt_mac_phy_cg_cfg_r17; + sdt_drb_continue_rohc_r17_e_ sdt_drb_continue_rohc_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-CapabilityRAT-Request ::= SEQUENCE +struct ue_cap_rat_request_s { + bool ext = false; + rat_type_e rat_type; + dyn_octstring cap_request_filt; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AreaConfiguration-r16 ::= SEQUENCE +struct area_cfg_r16_s { + using inter_freq_target_list_r16_l_ = dyn_array; + + // member variables + area_cfg_r16_c area_cfg_r16; + inter_freq_target_list_r16_l_ inter_freq_target_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using t320_e_ = enumerated; + + // member variables + bool ext = 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; + // ... + // group 0 + copy_ptr freq_prio_list_ded_slicing_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DLInformationTransfer-v1610-IEs ::= SEQUENCE +struct dl_info_transfer_v1610_ies_s { + bool ref_time_info_r16_present = false; + bool non_crit_ext_present = false; + ref_time_info_r16_s ref_time_info_r16; + dl_info_transfer_v1700_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; +}; + +// DRB-CountMSB-InfoList ::= SEQUENCE (SIZE (1..29)) OF DRB-CountMSB-Info +using drb_count_msb_info_list_l = dyn_array; + +// LoggedEventTriggerConfig-r16 ::= SEQUENCE +struct logged_event_trigger_cfg_r16_s { + bool ext = false; + event_type_r16_c event_type_r16; + logging_interv_r16_e logging_interv_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LoggedMeasurementConfiguration-v1700-IEs ::= SEQUENCE +struct logged_meas_cfg_v1700_ies_s { + bool sig_logged_meas_type_r17_present = false; + bool early_meas_ind_r17_present = false; + bool area_cfg_v1700_present = false; + bool non_crit_ext_present = false; + area_cfg_v1700_s area_cfg_v1700; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LoggedPeriodicalReportConfig-r16 ::= SEQUENCE +struct logged_periodical_report_cfg_r16_s { + bool ext = false; + logging_interv_r16_e logging_interv_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LoggingDuration-r16 ::= ENUMERATED +struct logging_dur_r16_opts { + enum options { min10, min20, min40, min60, min90, min120, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; +}; +using logging_dur_r16_e = enumerated; + +// MeasConfig ::= SEQUENCE +struct meas_cfg_s { + struct s_measure_cfg_c_ { + struct types_opts { + enum options { ssb_rsrp, csi_rsrp, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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_(); } + 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() + { + assert_choice_type(types::ssb_rsrp, type_, "s-MeasureConfig"); + return c.get(); + } + uint8_t& csi_rsrp() + { + assert_choice_type(types::csi_rsrp, type_, "s-MeasureConfig"); + return c.get(); + } + const uint8_t& ssb_rsrp() const + { + assert_choice_type(types::ssb_rsrp, type_, "s-MeasureConfig"); + return c.get(); + } + const uint8_t& csi_rsrp() const + { + assert_choice_type(types::csi_rsrp, type_, "s-MeasureConfig"); + return c.get(); + } + uint8_t& set_ssb_rsrp(); + uint8_t& set_csi_rsrp(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext = 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; + // ... + // group 0 + bool interfreq_cfg_no_gap_r16_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityFromNRCommand-v1610-IEs ::= SEQUENCE +struct mob_from_nr_cmd_v1610_ies_s { + bool voice_fallback_ind_r16_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; +}; + +// PLMN-IdentityList2-r16 ::= SEQUENCE (SIZE (1..16)) OF PLMN-Identity +using plmn_id_list2_r16_l = dyn_array; + +// RRCReconfiguration-v1530-IEs ::= SEQUENCE +struct rrc_recfg_v1530_ies_s { + using ded_nas_msg_list_l_ = bounded_array; + + // member variables + bool full_cfg_present = false; + bool master_key_upd_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; +}; + +// RRCReestablishment-v1700-IEs ::= SEQUENCE +struct rrc_reest_v1700_ies_s { + bool sl_l2_remote_ue_cfg_r17_present = false; + bool non_crit_ext_present = false; + setup_release_c sl_l2_remote_ue_cfg_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + rrc_release_v1610_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; +}; + +// RRCResume-v1560-IEs ::= SEQUENCE +struct rrc_resume_v1560_ies_s { + bool sk_counter_present = false; + bool non_crit_ext_present = false; + dyn_octstring radio_bearer_cfg2; + uint32_t sk_counter = 0; + rrc_resume_v1610_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; +}; + +// RedirectedCarrierInfo ::= CHOICE +struct redirected_carrier_info_c { + struct types_opts { + enum options { nr, eutra, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::nr, type_, "RedirectedCarrierInfo"); + return c.get(); + } + redirected_carrier_info_eutra_s& eutra() + { + assert_choice_type(types::eutra, type_, "RedirectedCarrierInfo"); + return c.get(); + } + const carrier_info_nr_s& nr() const + { + assert_choice_type(types::nr, type_, "RedirectedCarrierInfo"); + return c.get(); + } + const redirected_carrier_info_eutra_s& eutra() const + { + assert_choice_type(types::eutra, type_, "RedirectedCarrierInfo"); + return c.get(); + } + carrier_info_nr_s& set_nr(); + redirected_carrier_info_eutra_s& set_eutra(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// SecurityConfigSMC ::= SEQUENCE +struct security_cfg_smc_s { + bool ext = false; + security_algorithm_cfg_s security_algorithm_cfg; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + // ... + // group 0 + bool sl_ue_id_remote_r17_present = false; + bool ran_extended_paging_cycle_r17_present = false; + uint32_t sl_ue_id_remote_r17 = 0; + copy_ptr> sdt_cfg_r17; + copy_ptr> srs_pos_rrc_inactive_r17; + extended_paging_cycle_r17_e ran_extended_paging_cycle_r17; + // group 1 + copy_ptr> ncd_ssb_red_cap_init_bwp_sdt_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TraceReference-r16 ::= SEQUENCE +struct trace_ref_r16_s { + plmn_id_s plmn_id_r16; + fixed_octstring<3> trace_id_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + +// UEInformationRequest-v1700-IEs ::= SEQUENCE +struct ue_info_request_v1700_ies_s { + bool success_ho_report_req_r17_present = false; + bool coarse_location_request_r17_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; +}; + +// CounterCheck-IEs ::= SEQUENCE +struct counter_check_ies_s { + 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; +}; + +// DLDedicatedMessageSegment-r16-IEs ::= SEQUENCE +struct dl_ded_msg_segment_r16_ies_s { + struct rrc_msg_segment_type_r16_opts { + enum options { not_last_segment, last_segment, nulltype } value; + + const char* to_string() const; + }; + using rrc_msg_segment_type_r16_e_ = enumerated; + + // member variables + bool non_crit_ext_present = false; + uint8_t segment_num_r16 = 0; + dyn_octstring rrc_msg_segment_container_r16; + rrc_msg_segment_type_r16_e_ rrc_msg_segment_type_r16; + 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; +}; + +// DLInformationTransfer-IEs ::= SEQUENCE +struct dl_info_transfer_ies_s { + bool non_crit_ext_present = false; + dyn_octstring ded_nas_msg; + dyn_octstring late_non_crit_ext; + dl_info_transfer_v1610_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; +}; + +// DLInformationTransferMRDC-r16-IEs ::= SEQUENCE +struct dl_info_transfer_mrdc_r16_ies_s { + bool non_crit_ext_present = false; + dyn_octstring dl_dcch_msg_nr_r16; + dyn_octstring dl_dcch_msg_eutra_r16; + 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; +}; + +// LoggedMeasurementConfiguration-r16-IEs ::= SEQUENCE +struct logged_meas_cfg_r16_ies_s { + struct report_type_c_ { + struct types_opts { + enum options { periodical, event_triggered, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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 + logged_periodical_report_cfg_r16_s& periodical() + { + assert_choice_type(types::periodical, type_, "reportType"); + return c.get(); + } + logged_event_trigger_cfg_r16_s& event_triggered() + { + assert_choice_type(types::event_triggered, type_, "reportType"); + return c.get(); + } + const logged_periodical_report_cfg_r16_s& periodical() const + { + assert_choice_type(types::periodical, type_, "reportType"); + return c.get(); + } + const logged_event_trigger_cfg_r16_s& event_triggered() const + { + assert_choice_type(types::event_triggered, type_, "reportType"); + return c.get(); + } + logged_periodical_report_cfg_r16_s& set_periodical(); + logged_event_trigger_cfg_r16_s& set_event_triggered(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool area_cfg_r16_present = false; + bool bt_name_list_r16_present = false; + bool wlan_name_list_r16_present = false; + bool sensor_name_list_r16_present = false; + bool non_crit_ext_present = false; + trace_ref_r16_s trace_ref_r16; + fixed_octstring<2> trace_recording_session_ref_r16; + fixed_octstring<1> tce_id_r16; + fixed_bitstring<48> absolute_time_info_r16; + area_cfg_r16_s area_cfg_r16; + plmn_id_list2_r16_l plmn_id_list_r16; + setup_release_c, 1, 4>> bt_name_list_r16; + setup_release_c, 1, 4>> wlan_name_list_r16; + setup_release_c sensor_name_list_r16; + logging_dur_r16_e logging_dur_r16; + report_type_c_ report_type; + dyn_octstring late_non_crit_ext; + logged_meas_cfg_v1700_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; +}; + +// MobilityFromNRCommand-IEs ::= SEQUENCE +struct mob_from_nr_cmd_ies_s { + struct target_rat_type_opts { + enum options { eutra, utra_fdd_v1610, spare2, spare1, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using target_rat_type_e_ = enumerated; + + // member variables + 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; + mob_from_nr_cmd_v1610_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; +}; + +// RRCReconfiguration-IEs ::= SEQUENCE +struct rrc_recfg_ies_s { + bool radio_bearer_cfg_present = false; + bool meas_cfg_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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCReestablishment-IEs ::= SEQUENCE +struct rrc_reest_ies_s { + bool non_crit_ext_present = false; + uint8_t next_hop_chaining_count = 0; + dyn_octstring late_non_crit_ext; + rrc_reest_v1700_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; +}; + +// RRCRelease-IEs ::= SEQUENCE +struct rrc_release_ies_s { + struct depriorit_req_s_ { + struct depriorit_type_opts { + enum options { freq, nr, nulltype } value; + + const char* to_string() const; + }; + using depriorit_type_e_ = enumerated; + struct depriorit_timer_opts { + enum options { min5, min10, min15, min30, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using depriorit_timer_e_ = enumerated; + + // member variables + depriorit_type_e_ depriorit_type; + depriorit_timer_e_ depriorit_timer; + }; + + // 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 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCResume-IEs ::= SEQUENCE +struct rrc_resume_ies_s { + bool radio_bearer_cfg_present = false; + bool meas_cfg_present = false; + bool full_cfg_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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeCommand-IEs ::= SEQUENCE +struct security_mode_cmd_ies_s { + 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UECapabilityEnquiry-IEs ::= SEQUENCE +struct ue_cap_enquiry_ies_s { + 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationRequest-r16-IEs ::= SEQUENCE +struct ue_info_request_r16_ies_s { + bool idle_mode_meas_req_r16_present = false; + bool log_meas_report_req_r16_present = false; + bool conn_est_fail_report_req_r16_present = false; + bool ra_report_req_r16_present = false; + bool rlf_report_req_r16_present = false; + bool mob_history_report_req_r16_present = false; + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + ue_info_request_v1700_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; +}; + +// CounterCheck ::= SEQUENCE +struct counter_check_s { + struct crit_exts_c_ { + struct types_opts { + enum options { counter_check, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + counter_check_ies_s& counter_check() + { + assert_choice_type(types::counter_check, type_, "criticalExtensions"); + return c; + } + const counter_check_ies_s& counter_check() const + { + assert_choice_type(types::counter_check, type_, "criticalExtensions"); + return c; + } + counter_check_ies_s& set_counter_check(); + void set_crit_exts_future(); + + private: + types type_; + counter_check_ies_s c; + }; + + // 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; +}; + +// DLDedicatedMessageSegment-r16 ::= SEQUENCE +struct dl_ded_msg_segment_r16_s { + struct crit_exts_c_ { + struct types_opts { + enum options { dl_ded_msg_segment_r16, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + dl_ded_msg_segment_r16_ies_s& dl_ded_msg_segment_r16() + { + assert_choice_type(types::dl_ded_msg_segment_r16, type_, "criticalExtensions"); + return c; + } + const dl_ded_msg_segment_r16_ies_s& dl_ded_msg_segment_r16() const + { + assert_choice_type(types::dl_ded_msg_segment_r16, type_, "criticalExtensions"); + return c; + } + dl_ded_msg_segment_r16_ies_s& set_dl_ded_msg_segment_r16(); + void set_crit_exts_future(); + + private: + types type_; + dl_ded_msg_segment_r16_ies_s c; + }; + + // 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; +}; + +// DLInformationTransfer ::= SEQUENCE +struct dl_info_transfer_s { + struct crit_exts_c_ { + struct types_opts { + enum options { dl_info_transfer, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + dl_info_transfer_ies_s& dl_info_transfer() + { + assert_choice_type(types::dl_info_transfer, type_, "criticalExtensions"); + return c; + } + const dl_info_transfer_ies_s& dl_info_transfer() const + { + assert_choice_type(types::dl_info_transfer, type_, "criticalExtensions"); + return c; + } + dl_info_transfer_ies_s& set_dl_info_transfer(); + void set_crit_exts_future(); + + private: + types type_; + dl_info_transfer_ies_s c; + }; + + // 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; +}; + +// DLInformationTransferMRDC-r16 ::= SEQUENCE +struct dl_info_transfer_mrdc_r16_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types_opts { + enum options { dl_info_transfer_mrdc_r16, spare3, spare2, spare1, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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 + dl_info_transfer_mrdc_r16_ies_s& dl_info_transfer_mrdc_r16() + { + assert_choice_type(types::dl_info_transfer_mrdc_r16, type_, "c1"); + return c; + } + const dl_info_transfer_mrdc_r16_ies_s& dl_info_transfer_mrdc_r16() const + { + assert_choice_type(types::dl_info_transfer_mrdc_r16, type_, "c1"); + return c; + } + dl_info_transfer_mrdc_r16_ies_s& set_dl_info_transfer_mrdc_r16(); + void set_spare3(); + void set_spare2(); + void set_spare1(); + + private: + types type_; + dl_info_transfer_mrdc_r16_ies_s c; + }; + struct types_opts { + enum options { c1, crit_exts_future, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + c1_c_& c1() + { + assert_choice_type(types::c1, type_, "criticalExtensions"); + return c; + } + const c1_c_& c1() const + { + assert_choice_type(types::c1, type_, "criticalExtensions"); + return c; + } + c1_c_& set_c1(); + void set_crit_exts_future(); + + private: + types type_; + c1_c_ c; + }; + + // 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; +}; + +// LoggedMeasurementConfiguration-r16 ::= SEQUENCE +struct logged_meas_cfg_r16_s { + struct crit_exts_c_ { + struct types_opts { + enum options { logged_meas_cfg_r16, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + logged_meas_cfg_r16_ies_s& logged_meas_cfg_r16() + { + assert_choice_type(types::logged_meas_cfg_r16, type_, "criticalExtensions"); + return c; + } + const logged_meas_cfg_r16_ies_s& logged_meas_cfg_r16() const + { + assert_choice_type(types::logged_meas_cfg_r16, type_, "criticalExtensions"); + return c; + } + logged_meas_cfg_r16_ies_s& set_logged_meas_cfg_r16(); + void set_crit_exts_future(); + + private: + types type_; + logged_meas_cfg_r16_ies_s c; + }; + + // 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; +}; + +// 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; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + mob_from_nr_cmd_ies_s& mob_from_nr_cmd() + { + assert_choice_type(types::mob_from_nr_cmd, type_, "criticalExtensions"); + return c; + } + const mob_from_nr_cmd_ies_s& mob_from_nr_cmd() const + { + assert_choice_type(types::mob_from_nr_cmd, type_, "criticalExtensions"); + return c; + } + mob_from_nr_cmd_ies_s& set_mob_from_nr_cmd(); + void set_crit_exts_future(); + + private: + types type_; + mob_from_nr_cmd_ies_s c; + }; + + // 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; +}; + +// RRCReconfiguration ::= SEQUENCE +struct rrc_recfg_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_recfg, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + rrc_recfg_ies_s& rrc_recfg() + { + assert_choice_type(types::rrc_recfg, type_, "criticalExtensions"); + return c; + } + const rrc_recfg_ies_s& rrc_recfg() const + { + assert_choice_type(types::rrc_recfg, type_, "criticalExtensions"); + return c; + } + rrc_recfg_ies_s& set_rrc_recfg(); + void set_crit_exts_future(); + + private: + types type_; + rrc_recfg_ies_s c; + }; + + // 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; +}; + +// RRCReestablishment ::= SEQUENCE +struct rrc_reest_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_reest, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + rrc_reest_ies_s& rrc_reest() + { + assert_choice_type(types::rrc_reest, type_, "criticalExtensions"); + return c; + } + const rrc_reest_ies_s& rrc_reest() const + { + assert_choice_type(types::rrc_reest, type_, "criticalExtensions"); + return c; + } + rrc_reest_ies_s& set_rrc_reest(); + void set_crit_exts_future(); + + private: + types type_; + rrc_reest_ies_s c; + }; + + // 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; +}; + +// RRCRelease ::= SEQUENCE +struct rrc_release_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_release, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + rrc_release_ies_s& rrc_release() + { + assert_choice_type(types::rrc_release, type_, "criticalExtensions"); + return c; + } + const rrc_release_ies_s& rrc_release() const + { + assert_choice_type(types::rrc_release, type_, "criticalExtensions"); + return c; + } + rrc_release_ies_s& set_rrc_release(); + void set_crit_exts_future(); + + private: + types type_; + rrc_release_ies_s c; + }; + + // 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; +}; + +// RRCResume ::= SEQUENCE +struct rrc_resume_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_resume, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + rrc_resume_ies_s& rrc_resume() + { + assert_choice_type(types::rrc_resume, type_, "criticalExtensions"); + return c; + } + const rrc_resume_ies_s& rrc_resume() const + { + assert_choice_type(types::rrc_resume, type_, "criticalExtensions"); + return c; + } + rrc_resume_ies_s& set_rrc_resume(); + void set_crit_exts_future(); + + private: + types type_; + rrc_resume_ies_s c; + }; + + // 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; +}; + +// SecurityModeCommand ::= SEQUENCE +struct security_mode_cmd_s { + struct crit_exts_c_ { + struct types_opts { + enum options { security_mode_cmd, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + security_mode_cmd_ies_s& security_mode_cmd() + { + assert_choice_type(types::security_mode_cmd, type_, "criticalExtensions"); + return c; + } + const security_mode_cmd_ies_s& security_mode_cmd() const + { + assert_choice_type(types::security_mode_cmd, type_, "criticalExtensions"); + return c; + } + security_mode_cmd_ies_s& set_security_mode_cmd(); + void set_crit_exts_future(); + + private: + types type_; + security_mode_cmd_ies_s c; + }; + + // 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; +}; + +// UECapabilityEnquiry ::= SEQUENCE +struct ue_cap_enquiry_s { + struct crit_exts_c_ { + struct types_opts { + enum options { ue_cap_enquiry, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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_enquiry_ies_s& ue_cap_enquiry() + { + assert_choice_type(types::ue_cap_enquiry, type_, "criticalExtensions"); + return c; + } + const ue_cap_enquiry_ies_s& ue_cap_enquiry() const + { + assert_choice_type(types::ue_cap_enquiry, type_, "criticalExtensions"); + return c; + } + ue_cap_enquiry_ies_s& set_ue_cap_enquiry(); + void set_crit_exts_future(); + + private: + types type_; + ue_cap_enquiry_ies_s c; + }; + + // 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; +}; + +// UEInformationRequest-r16 ::= SEQUENCE +struct ue_info_request_r16_s { + struct crit_exts_c_ { + struct types_opts { + enum options { ue_info_request_r16, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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_info_request_r16_ies_s& ue_info_request_r16() + { + assert_choice_type(types::ue_info_request_r16, type_, "criticalExtensions"); + return c; + } + const ue_info_request_r16_ies_s& ue_info_request_r16() const + { + assert_choice_type(types::ue_info_request_r16, type_, "criticalExtensions"); + return c; + } + ue_info_request_r16_ies_s& set_ue_info_request_r16(); + void set_crit_exts_future(); + + private: + types type_; + ue_info_request_r16_ies_s c; + }; + + // 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; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/nr_sidelink_preconf.h b/include/srsran/asn1/rrc_nr/nr_sidelink_preconf.h index 2b58d7f3c0..b3de0a12c9 100644 --- a/include/srsran/asn1/rrc_nr/nr_sidelink_preconf.h +++ b/include/srsran/asn1/rrc_nr/nr_sidelink_preconf.h @@ -16,7 +16,7 @@ #pragma once -#include "dl_dcch_msg.h" +#include "dl_ccch_msg_ies.h" namespace asn1 { namespace rrc_nr { diff --git a/include/srsran/asn1/rrc_nr/nr_ue_variables.h b/include/srsran/asn1/rrc_nr/nr_ue_variables.h index 797c585772..37fa3811c6 100644 --- a/include/srsran/asn1/rrc_nr/nr_ue_variables.h +++ b/include/srsran/asn1/rrc_nr/nr_ue_variables.h @@ -16,8 +16,7 @@ #pragma once -#include "dl_dcch_msg.h" -#include "ul_dcch_msg.h" +#include "ul_dcch_msg_ies.h" namespace asn1 { namespace rrc_nr { diff --git a/include/srsran/asn1/rrc_nr/pc5_rrc_definitions.h b/include/srsran/asn1/rrc_nr/pc5_rrc_definitions.h index 1bb41d1178..2dacc35f29 100644 --- a/include/srsran/asn1/rrc_nr/pc5_rrc_definitions.h +++ b/include/srsran/asn1/rrc_nr/pc5_rrc_definitions.h @@ -16,7 +16,7 @@ #pragma once -#include "ul_dcch_msg.h" +#include "ul_dcch_msg_ies.h" namespace asn1 { namespace rrc_nr { @@ -25,40 +25,6 @@ namespace rrc_nr { * Struct Definitions ******************************************************************************/ -// SNPN-AccessInfo-r17 ::= SEQUENCE -struct sn_pn_access_info_r17_s { - bool ext_ch_supported_r17_present = false; - bool ext_ch_without_cfg_allowed_r17_present = false; - bool onboarding_enabled_r17_present = false; - bool ims_emergency_support_for_sn_pn_r17_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CellAccessRelatedInfo ::= SEQUENCE -struct cell_access_related_info_s { - using snpn_access_info_list_r17_l_ = dyn_array; - - // member variables - bool ext = false; - bool cell_reserved_for_other_use_present = false; - plmn_id_info_list_l plmn_id_info_list; - // ... - // group 0 - bool cell_reserved_for_future_use_r16_present = false; - copy_ptr npn_id_info_list_r16; - // group 1 - copy_ptr snpn_access_info_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // BandCombinationParametersSidelinkNR-r16 ::= SEQUENCE (SIZE (1..32)) OF BandParametersSidelink-r16 using band_combination_params_sidelink_nr_r16_l = dyn_array; diff --git a/include/srsran/asn1/rrc_nr/pcch_msg.h b/include/srsran/asn1/rrc_nr/pcch_msg.h new file mode 100644 index 0000000000..e5227ba45b --- /dev/null +++ b/include/srsran/asn1/rrc_nr/pcch_msg.h @@ -0,0 +1,109 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "pcch_msg_ies.h" + +namespace asn1 { +namespace rrc_nr { + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// PCCH-MessageType ::= CHOICE +struct pcch_msg_type_c { + struct c1_c_ { + struct types_opts { + enum options { paging, spare1, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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 + paging_s& paging() + { + assert_choice_type(types::paging, type_, "c1"); + return c; + } + const paging_s& paging() const + { + assert_choice_type(types::paging, type_, "c1"); + return c; + } + paging_s& set_paging(); + void set_spare1(); + + private: + types type_; + paging_s c; + }; + struct types_opts { + enum options { c1, msg_class_ext, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + pcch_msg_type_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 + c1_c_& c1() + { + assert_choice_type(types::c1, type_, "PCCH-MessageType"); + return c; + } + const c1_c_& c1() const + { + assert_choice_type(types::c1, type_, "PCCH-MessageType"); + return c; + } + c1_c_& set_c1(); + void set_msg_class_ext(); + +private: + types type_; + c1_c_ c; +}; + +// 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; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/pcch_msg_ies.h b/include/srsran/asn1/rrc_nr/pcch_msg_ies.h new file mode 100644 index 0000000000..35974f12bd --- /dev/null +++ b/include/srsran/asn1/rrc_nr/pcch_msg_ies.h @@ -0,0 +1,138 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "radio_bearer_cfg.h" + +namespace asn1 { +namespace rrc_nr { + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// PagingRecord-v1700 ::= SEQUENCE +struct paging_record_v1700_s { + bool paging_cause_r17_present = false; + + // 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_5_g_s_tmsi, full_i_rnti, /*...*/ nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using types = enumerated; + + // 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_5_g_s_tmsi() + { + assert_choice_type(types::ng_5_g_s_tmsi, type_, "PagingUE-Identity"); + return c.get>(); + } + fixed_bitstring<40>& full_i_rnti() + { + assert_choice_type(types::full_i_rnti, type_, "PagingUE-Identity"); + return c.get>(); + } + const fixed_bitstring<48>& ng_5_g_s_tmsi() const + { + assert_choice_type(types::ng_5_g_s_tmsi, type_, "PagingUE-Identity"); + return c.get>(); + } + const fixed_bitstring<40>& full_i_rnti() const + { + assert_choice_type(types::full_i_rnti, type_, "PagingUE-Identity"); + return c.get>(); + } + fixed_bitstring<48>& set_ng_5_g_s_tmsi(); + fixed_bitstring<40>& set_full_i_rnti(); + +private: + types type_; + choice_buffer_t> c; + + void destroy_(); +}; + +// PagingGroupList-r17 ::= SEQUENCE (SIZE (1..32)) OF TMGI-r17 +using paging_group_list_r17_l = dyn_array; + +// 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-v1700 ::= SEQUENCE (SIZE (1..32)) OF PagingRecord-v1700 +using paging_record_list_v1700_l = dyn_array; + +// Paging-v1700-IEs ::= SEQUENCE +struct paging_v1700_ies_s { + bool non_crit_ext_present = false; + paging_record_list_v1700_l paging_record_list_v1700; + paging_group_list_r17_l paging_group_list_r17; + + // 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 non_crit_ext_present = false; + paging_record_list_l paging_record_list; + dyn_octstring late_non_crit_ext; + paging_v1700_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; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/radio_bearer_cfg.h b/include/srsran/asn1/rrc_nr/radio_bearer_cfg.h new file mode 100644 index 0000000000..a1a1b9fcd0 --- /dev/null +++ b/include/srsran/asn1/rrc_nr/radio_bearer_cfg.h @@ -0,0 +1,753 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "common.h" + +namespace asn1 { +namespace rrc_nr { + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// DiscardTimerExt-r16 ::= ENUMERATED +struct discard_timer_ext_r16_opts { + enum options { ms0dot5, ms1, ms2, ms4, ms6, ms8, spare2, spare1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; +}; +using discard_timer_ext_r16_e = enumerated; + +// DiscardTimerExt2-r17 ::= ENUMERATED +struct discard_timer_ext2_r17_opts { + enum options { ms2000, spare3, spare2, spare1, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; +}; +using discard_timer_ext2_r17_e = enumerated; + +// EthernetHeaderCompression-r16 ::= SEQUENCE +struct ethernet_hdr_compress_r16_s { + struct ehc_common_r16_s_ { + struct ehc_c_id_len_r16_opts { + enum options { bits7, bits15, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ehc_c_id_len_r16_e_ = enumerated; + + // member variables + bool ext = false; + ehc_c_id_len_r16_e_ ehc_c_id_len_r16; + // ... + }; + struct ehc_dl_r16_s_ { + bool ext = false; + bool drb_continue_ehc_dl_r16_present = false; + // ... + }; + struct ehc_ul_r16_s_ { + bool ext = false; + bool drb_continue_ehc_ul_r16_present = false; + uint16_t max_c_id_ehc_ul_r16 = 1; + // ... + }; + + // member variables + bool ehc_dl_r16_present = false; + bool ehc_ul_r16_present = false; + ehc_common_r16_s_ ehc_common_r16; + ehc_dl_r16_s_ ehc_dl_r16; + ehc_ul_r16_s_ ehc_ul_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + int32_t to_number() const; +}; +using ul_data_split_thres_e = enumerated; + +// UplinkDataCompression-r17 ::= CHOICE +struct ul_data_compress_r17_c { + struct new_setup_s_ { + struct buffer_size_r17_opts { + enum options { kbyte2, kbyte4, kbyte8, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using buffer_size_r17_e_ = enumerated; + struct dictionary_r17_opts { + enum options { sip_sdp, operator_value, nulltype } value; + + const char* to_string() const; + }; + using dictionary_r17_e_ = enumerated; + + // member variables + bool dictionary_r17_present = false; + buffer_size_r17_e_ buffer_size_r17; + dictionary_r17_e_ dictionary_r17; + }; + struct types_opts { + enum options { new_setup, drb_continue_udc, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + ul_data_compress_r17_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 + new_setup_s_& new_setup() + { + assert_choice_type(types::new_setup, type_, "UplinkDataCompression-r17"); + return c; + } + const new_setup_s_& new_setup() const + { + assert_choice_type(types::new_setup, type_, "UplinkDataCompression-r17"); + return c; + } + new_setup_s_& set_new_setup(); + void set_drb_continue_udc(); + +private: + types type_; + new_setup_s_ c; +}; + +// CipheringAlgorithm ::= ENUMERATED +struct ciphering_algorithm_opts { + enum options { nea0, nea1, nea2, nea3, spare4, spare3, spare2, spare1, /*...*/ nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; +}; +using ciphering_algorithm_e = enumerated; + +// IntegrityProtAlgorithm ::= ENUMERATED +struct integrity_prot_algorithm_opts { + enum options { nia0, nia1, nia2, nia3, spare4, spare3, spare2, spare1, /*...*/ nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; +}; +using integrity_prot_algorithm_e = enumerated; + +// 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; + + const char* to_string() const; + int16_t to_number() const; + }; + using discard_timer_e_ = enumerated; + struct pdcp_sn_size_ul_opts { + enum options { len12bits, len18bits, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pdcp_sn_size_ul_e_ = enumerated; + struct pdcp_sn_size_dl_opts { + enum options { len12bits, len18bits, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pdcp_sn_size_dl_e_ = enumerated; + 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; + }; + + // member variables + bool max_c_id_present = false; + bool drb_continue_rohc_present = false; + uint16_t max_c_id = 1; + profiles_s_ profiles; + }; + struct ul_only_rohc_s_ { + struct profiles_s_ { + bool profile0x0006 = false; + }; + + // member variables + bool max_c_id_present = false; + bool drb_continue_rohc_present = false; + uint16_t max_c_id = 1; + profiles_s_ profiles; + }; + struct types_opts { + enum options { not_used, rohc, ul_only_rohc, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::rohc, type_, "headerCompression"); + return c.get(); + } + ul_only_rohc_s_& ul_only_rohc() + { + assert_choice_type(types::ul_only_rohc, type_, "headerCompression"); + return c.get(); + } + const rohc_s_& rohc() const + { + assert_choice_type(types::rohc, type_, "headerCompression"); + return c.get(); + } + const ul_only_rohc_s_& ul_only_rohc() const + { + assert_choice_type(types::ul_only_rohc, type_, "headerCompression"); + return c.get(); + } + void set_not_used(); + rohc_s_& set_rohc(); + ul_only_rohc_s_& set_ul_only_rohc(); + + 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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using t_reordering_e_ = enumerated; + struct more_than_two_rlc_drb_r16_s_ { + using dupl_state_r16_l_ = std::array; + + // member variables + bool split_secondary_path_r16_present = false; + bool dupl_state_r16_present = false; + uint8_t split_secondary_path_r16 = 1; + dupl_state_r16_l_ dupl_state_r16; + }; + + // 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; + // group 1 + copy_ptr> discard_timer_ext_r16; + copy_ptr more_than_two_rlc_drb_r16; + copy_ptr> ethernet_hdr_compress_r16; + // group 2 + bool survival_time_state_support_r17_present = false; + bool init_rx_deliv_r17_present = false; + copy_ptr> ul_data_compress_r17; + copy_ptr> discard_timer_ext2_r17; + fixed_bitstring<32> init_rx_deliv_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SDAP-Config ::= SEQUENCE +struct sdap_cfg_s { + struct sdap_hdr_dl_opts { + enum options { present, absent, nulltype } value; + + const char* to_string() const; + }; + using sdap_hdr_dl_e_ = enumerated; + struct sdap_hdr_ul_opts { + enum options { present, absent, nulltype } value; + + const char* to_string() const; + }; + using sdap_hdr_ul_e_ = enumerated; + using mapped_qos_flows_to_add_l_ = dyn_array; + using mapped_qos_flows_to_release_l_ = dyn_array; + + // member variables + bool ext = 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; +}; + +// TMGI-r17 ::= SEQUENCE +struct tmgi_r17_s { + struct plmn_id_r17_c_ { + struct types_opts { + enum options { plmn_idx, explicit_value, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + plmn_id_r17_c_() = default; + plmn_id_r17_c_(const plmn_id_r17_c_& other); + plmn_id_r17_c_& operator=(const plmn_id_r17_c_& other); + ~plmn_id_r17_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& plmn_idx() + { + assert_choice_type(types::plmn_idx, type_, "plmn-Id-r17"); + return c.get(); + } + plmn_id_s& explicit_value() + { + assert_choice_type(types::explicit_value, type_, "plmn-Id-r17"); + return c.get(); + } + const uint8_t& plmn_idx() const + { + assert_choice_type(types::plmn_idx, type_, "plmn-Id-r17"); + return c.get(); + } + const plmn_id_s& explicit_value() const + { + assert_choice_type(types::explicit_value, type_, "plmn-Id-r17"); + return c.get(); + } + uint8_t& set_plmn_idx(); + plmn_id_s& set_explicit_value(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + plmn_id_r17_c_ plmn_id_r17; + fixed_octstring<3> service_id_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRB-ToAddMod ::= SEQUENCE +struct drb_to_add_mod_s { + struct cn_assoc_c_ { + struct types_opts { + enum options { eps_bearer_id, sdap_cfg, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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_(); } + 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(types::eps_bearer_id, type_, "cnAssociation"); + return c.get(); + } + sdap_cfg_s& sdap_cfg() + { + assert_choice_type(types::sdap_cfg, type_, "cnAssociation"); + return c.get(); + } + const uint8_t& eps_bearer_id() const + { + assert_choice_type(types::eps_bearer_id, type_, "cnAssociation"); + return c.get(); + } + const sdap_cfg_s& sdap_cfg() const + { + assert_choice_type(types::sdap_cfg, type_, "cnAssociation"); + return c.get(); + } + uint8_t& set_eps_bearer_id(); + sdap_cfg_s& set_sdap_cfg(); + + private: + 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; + // ... + // group 0 + bool daps_cfg_r16_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MRB-ToAddMod-r17 ::= SEQUENCE +struct mrb_to_add_mod_r17_s { + bool ext = false; + bool mbs_session_id_r17_present = false; + bool mrb_id_new_r17_present = false; + bool reestablish_pdcp_r17_present = false; + bool recover_pdcp_r17_present = false; + bool pdcp_cfg_r17_present = false; + tmgi_r17_s mbs_session_id_r17; + uint16_t mrb_id_r17 = 1; + uint16_t mrb_id_new_r17 = 1; + pdcp_cfg_s pdcp_cfg_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + // ... + // group 0 + bool srb_id_v1700_present = false; + uint8_t srb_id_v1700 = 4; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + // ... + + // 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; + +// MRB-ToAddModList-r17 ::= SEQUENCE (SIZE (1..32)) OF MRB-ToAddMod-r17 +using mrb_to_add_mod_list_r17_l = dyn_array; + +// MRB-ToReleaseList-r17 ::= SEQUENCE (SIZE (1..32)) OF INTEGER (1..512) +using mrb_to_release_list_r17_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; + + const char* to_string() const; + }; + using key_to_use_e_ = enumerated; + + // 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; +}; + +// RadioBearerConfig ::= SEQUENCE +struct radio_bearer_cfg_s { + bool ext = false; + bool srb3_to_release_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; + // ... + // group 0 + bool srb4_to_release_r17_present = false; + copy_ptr mrb_to_add_mod_list_r17; + copy_ptr mrb_to_release_list_r17; + copy_ptr srb4_to_add_mod_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/rrc_nr.h b/include/srsran/asn1/rrc_nr/rrc_nr.h index a6f88931dd..58baedb1ba 100644 --- a/include/srsran/asn1/rrc_nr/rrc_nr.h +++ b/include/srsran/asn1/rrc_nr/rrc_nr.h @@ -17,10 +17,7 @@ #pragma once #include "cell_group_config.h" -#include "dl_dcch_msg.h" #include "nr_sidelink_preconf.h" -#include "pc5_rrc_definitions.h" -#include "ul_dcch_msg.h" namespace asn1 { namespace rrc_nr { @@ -29,266 +26,67 @@ namespace rrc_nr { * Struct Definitions ******************************************************************************/ -// MIB ::= SEQUENCE -struct mib_s { - struct sub_carrier_spacing_common_opts { - enum options { scs15or60, scs30or120, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using sub_carrier_spacing_common_e_ = enumerated; - struct dmrs_type_a_position_opts { - enum options { pos2, pos3, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using dmrs_type_a_position_e_ = enumerated; - struct cell_barred_opts { - enum options { barred, not_barred, nulltype } value; - - const char* to_string() const; - }; - using cell_barred_e_ = enumerated; - struct intra_freq_resel_opts { - enum options { allowed, not_allowed, nulltype } value; - - const char* to_string() const; - }; - using intra_freq_resel_e_ = enumerated; - - // member variables - fixed_bitstring<6> sys_frame_num; - sub_carrier_spacing_common_e_ sub_carrier_spacing_common; - uint8_t ssb_subcarrier_offset = 0; - dmrs_type_a_position_e_ dmrs_type_a_position; - pdcch_cfg_sib1_s pdcch_cfg_sib1; - cell_barred_e_ cell_barred; - intra_freq_resel_e_ intra_freq_resel; - fixed_bitstring<1> spare; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BCCH-BCH-MessageType ::= CHOICE -struct bcch_bch_msg_type_c { - struct types_opts { - enum options { mib, msg_class_ext, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - bcch_bch_msg_type_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 - mib_s& mib() - { - assert_choice_type(types::mib, type_, "BCCH-BCH-MessageType"); - return c; - } - const mib_s& mib() const - { - assert_choice_type(types::mib, type_, "BCCH-BCH-MessageType"); - return c; - } - mib_s& set_mib(); - void set_msg_class_ext(); - -private: - types type_; - mib_s c; -}; - -// BCCH-BCH-Message ::= SEQUENCE -struct bcch_bch_msg_s { - bcch_bch_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; -}; - -// EUTRA-NS-PmaxValue ::= SEQUENCE -struct eutra_ns_pmax_value_s { - bool add_pmax_present = false; - bool add_spec_emission_present = false; - int8_t add_pmax = -30; - uint16_t add_spec_emission = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// EUTRA-NS-PmaxList ::= SEQUENCE (SIZE (1..8)) OF EUTRA-NS-PmaxValue -using eutra_ns_pmax_list_l = dyn_array; - -// SI-RequestResources ::= SEQUENCE -struct si_request_res_s { - bool ra_assoc_period_idx_present = false; - bool ra_ssb_occasion_mask_idx_present = false; - uint8_t ra_preamb_start_idx = 0; - uint8_t ra_assoc_period_idx = 0; - uint8_t ra_ssb_occasion_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; -}; - -// SIB-TypeInfo-v1700 ::= SEQUENCE -struct sib_type_info_v1700_s { - struct sib_type_r17_c_ { - struct type1_r17_opts { - enum options { - sib_type15, - sib_type16, - sib_type17, - sib_type18, - sib_type19, - sib_type20, - sib_type21, - spare9, - spare8, - spare7, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - // ... - nulltype - } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using type1_r17_e_ = enumerated; - struct type2_r17_s_ { - struct pos_sib_type_r17_opts { - enum options { - pos_sib_type1_neg9, - pos_sib_type1_neg10, - pos_sib_type2_neg24, - pos_sib_type2_neg25, - pos_sib_type6_neg4, - pos_sib_type6_neg5, - pos_sib_type6_neg6, - spare9, - spare8, - spare7, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - // ... - nulltype - } value; - - const char* to_string() const; +// MRB-PDCP-ConfigBroadcast-r17 ::= SEQUENCE +struct mrb_pdcp_cfg_broadcast_r17_s { + struct hdr_compress_r17_c_ { + struct rohc_s_ { + struct profiles_r17_s_ { + bool profile0x0000_r17 = false; + bool profile0x0001_r17 = false; + bool profile0x0002_r17 = false; }; - using pos_sib_type_r17_e_ = enumerated; // member variables - bool encrypted_r17_present = false; - bool gnss_id_r17_present = false; - bool sbas_id_r17_present = false; - pos_sib_type_r17_e_ pos_sib_type_r17; - gnss_id_r16_s gnss_id_r17; - sbas_id_r16_s sbas_id_r17; + bool max_c_id_r17_present = false; + uint8_t max_c_id_r17 = 1; + profiles_r17_s_ profiles_r17; }; struct types_opts { - enum options { type1_r17, type2_r17, nulltype } value; - typedef uint8_t number_type; + enum options { not_used, rohc, nulltype } value; const char* to_string() const; - uint8_t to_number() const; }; using types = enumerated; // choice methods - sib_type_r17_c_() = default; - sib_type_r17_c_(const sib_type_r17_c_& other); - sib_type_r17_c_& operator=(const sib_type_r17_c_& other); - ~sib_type_r17_c_() { destroy_(); } + hdr_compress_r17_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_r17_e_& type1_r17() - { - assert_choice_type(types::type1_r17, type_, "sibType-r17"); - return c.get(); - } - type2_r17_s_& type2_r17() - { - assert_choice_type(types::type2_r17, type_, "sibType-r17"); - return c.get(); - } - const type1_r17_e_& type1_r17() const + rohc_s_& rohc() { - assert_choice_type(types::type1_r17, type_, "sibType-r17"); - return c.get(); + assert_choice_type(types::rohc, type_, "headerCompression-r17"); + return c; } - const type2_r17_s_& type2_r17() const + const rohc_s_& rohc() const { - assert_choice_type(types::type2_r17, type_, "sibType-r17"); - return c.get(); + assert_choice_type(types::rohc, type_, "headerCompression-r17"); + return c; } - type1_r17_e_& set_type1_r17(); - type2_r17_s_& set_type2_r17(); + void set_not_used(); + rohc_s_& set_rohc(); private: - types type_; - choice_buffer_t c; + types type_; + rohc_s_ c; + }; + struct t_reordering_r17_opts { + enum options { ms1, ms10, ms40, ms160, ms500, ms1000, ms1250, ms2750, nulltype } value; + typedef uint16_t number_type; - void destroy_(); + const char* to_string() const; + uint16_t to_number() const; }; + using t_reordering_r17_e_ = enumerated; // member variables - bool value_tag_r17_present = false; - bool area_scope_r17_present = false; - sib_type_r17_c_ sib_type_r17; - uint8_t value_tag_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SliceCellListNR-r17 ::= SEQUENCE (SIZE (1..16)) OF PCI-Range -using slice_cell_list_nr_r17_l = dyn_array; - -// EUTRA-FreqNeighCellInfo ::= SEQUENCE -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 dummy; - uint8_t q_rx_lev_min_offset_cell = 1; - uint8_t q_qual_min_offset_cell = 1; + bool pdcp_sn_size_dl_r17_present = false; + bool t_reordering_r17_present = false; + hdr_compress_r17_c_ hdr_compress_r17; + t_reordering_r17_e_ t_reordering_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -296,10 +94,12 @@ struct eutra_freq_neigh_cell_info_s { void to_json(json_writer& j) const; }; -// EUTRA-MultiBandInfo ::= SEQUENCE -struct eutra_multi_band_info_s { - uint16_t eutra_freq_band_ind = 1; - eutra_ns_pmax_list_l eutra_ns_pmax_list; +// MRB-RLC-ConfigBroadcast-r17 ::= SEQUENCE +struct mrb_rlc_cfg_broadcast_r17_s { + bool sn_field_len_r17_present = false; + bool t_reassembly_r17_present = false; + uint8_t lc_ch_id_r17 = 1; + t_reassembly_e t_reassembly_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -307,17 +107,11 @@ struct eutra_multi_band_info_s { void to_json(json_writer& j) const; }; -// InterFreqNeighCellInfo ::= SEQUENCE -struct inter_freq_neigh_cell_info_s { - bool ext = false; - bool q_rx_lev_min_offset_cell_present = false; - bool q_rx_lev_min_offset_cell_sul_present = false; - bool q_qual_min_offset_cell_present = false; - uint16_t pci = 0; - q_offset_range_e q_offset_cell; - uint8_t q_rx_lev_min_offset_cell = 1; - uint8_t q_rx_lev_min_offset_cell_sul = 1; - uint8_t q_qual_min_offset_cell = 1; +// MRB-InfoBroadcast-r17 ::= SEQUENCE +struct mrb_info_broadcast_r17_s { + bool ext = false; + mrb_pdcp_cfg_broadcast_r17_s pdcp_cfg_r17; + mrb_rlc_cfg_broadcast_r17_s rlc_cfg_r17; // ... // sequence methods @@ -326,21 +120,14 @@ struct inter_freq_neigh_cell_info_s { void to_json(json_writer& j) const; }; -// InterFreqNeighCellInfo-v1610 ::= SEQUENCE -struct inter_freq_neigh_cell_info_v1610_s { - bool ssb_position_qcl_r16_present = false; - ssb_position_qcl_relation_r16_e ssb_position_qcl_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +// MRB-ListBroadcast-r17 ::= SEQUENCE (SIZE (1..4)) OF MRB-InfoBroadcast-r17 +using mrb_list_broadcast_r17_l = dyn_array; -// InterFreqNeighCellInfo-v1710 ::= SEQUENCE -struct inter_freq_neigh_cell_info_v1710_s { - bool ssb_position_qcl_r17_present = false; - ssb_position_qcl_relation_r17_e ssb_position_qcl_r17; +// MBS-NeighbourCell-r17 ::= SEQUENCE +struct mbs_neighbour_cell_r17_s { + bool carrier_freq_r17_present = false; + uint16_t pci_r17 = 0; + uint32_t carrier_freq_r17 = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -348,37 +135,19 @@ struct inter_freq_neigh_cell_info_v1710_s { void to_json(json_writer& j) const; }; -// SI-RequestConfig ::= SEQUENCE -struct si_request_cfg_s { - struct rach_occasions_si_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; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using ssb_per_rach_occasion_e_ = enumerated; - - // member variables - rach_cfg_generic_s rach_cfg_si; - ssb_per_rach_occasion_e_ ssb_per_rach_occasion; - }; - struct si_request_period_opts { - enum options { one, two, four, six, eight, ten, twelve, sixteen, nulltype } value; - - const char* to_string() const; - }; - using si_request_period_e_ = enumerated; - using si_request_res_l_ = dyn_array; - - // member variables - bool rach_occasions_si_present = false; - bool si_request_period_present = false; - rach_occasions_si_s_ rach_occasions_si; - si_request_period_e_ si_request_period; - si_request_res_l_ si_request_res; +// MBS-SessionInfo-r17 ::= SEQUENCE +struct mbs_session_info_r17_s { + bool mtch_sched_info_r17_present = false; + bool mtch_neighbour_cell_r17_present = false; + bool pdsch_cfg_idx_r17_present = false; + bool mtch_ssb_map_win_idx_r17_present = false; + tmgi_r17_s mbs_session_id_r17; + uint32_t g_rnti_r17 = 0; + mrb_list_broadcast_r17_l mrb_list_broadcast_r17; + uint8_t mtch_sched_info_r17 = 0; + fixed_bitstring<8> mtch_neighbour_cell_r17; + uint8_t pdsch_cfg_idx_r17 = 0; + uint8_t mtch_ssb_map_win_idx_r17 = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -386,237 +155,125 @@ struct si_request_cfg_s { void to_json(json_writer& j) const; }; -// SIB-Mapping-v1700 ::= SEQUENCE (SIZE (1..32)) OF SIB-TypeInfo-v1700 -using sib_map_v1700_l = dyn_array; - -// SliceInfo-r17 ::= SEQUENCE -struct slice_info_r17_s { - struct slice_cell_list_nr_r17_c_ { - struct types_opts { - enum options { slice_allowed_cell_list_nr_r17, slice_excluded_cell_list_nr_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - slice_cell_list_nr_r17_c_() = default; - slice_cell_list_nr_r17_c_(const slice_cell_list_nr_r17_c_& other); - slice_cell_list_nr_r17_c_& operator=(const slice_cell_list_nr_r17_c_& other); - ~slice_cell_list_nr_r17_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 - slice_cell_list_nr_r17_l& slice_allowed_cell_list_nr_r17() - { - assert_choice_type(types::slice_allowed_cell_list_nr_r17, type_, "sliceCellListNR-r17"); - return c.get(); - } - slice_cell_list_nr_r17_l& slice_excluded_cell_list_nr_r17() - { - assert_choice_type(types::slice_excluded_cell_list_nr_r17, type_, "sliceCellListNR-r17"); - return c.get(); - } - const slice_cell_list_nr_r17_l& slice_allowed_cell_list_nr_r17() const - { - assert_choice_type(types::slice_allowed_cell_list_nr_r17, type_, "sliceCellListNR-r17"); - return c.get(); - } - const slice_cell_list_nr_r17_l& slice_excluded_cell_list_nr_r17() const - { - assert_choice_type(types::slice_excluded_cell_list_nr_r17, type_, "sliceCellListNR-r17"); - return c.get(); - } - slice_cell_list_nr_r17_l& set_slice_allowed_cell_list_nr_r17(); - slice_cell_list_nr_r17_l& set_slice_excluded_cell_list_nr_r17(); - - private: - types type_; - choice_buffer_t c; +// MTCH-SSB-MappingWindowCycleOffset-r17 ::= CHOICE +struct mtch_ssb_map_win_cycle_offset_r17_c { + struct types_opts { + enum options { ms10, ms20, ms32, ms64, ms128, ms256, nulltype } value; + typedef uint16_t number_type; - void destroy_(); + const char* to_string() const; + uint16_t to_number() const; }; + using types = enumerated; - // member variables - bool nsag_cell_resel_prio_r17_present = false; - bool nsag_cell_resel_sub_prio_r17_present = false; - bool slice_cell_list_nr_r17_present = false; - nsag_id_info_r17_s nsag_id_info_r17; - uint8_t nsag_cell_resel_prio_r17 = 0; - cell_resel_sub_prio_e nsag_cell_resel_sub_prio_r17; - slice_cell_list_nr_r17_c_ slice_cell_list_nr_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// EUTRA-FreqExcludedCellList ::= SEQUENCE (SIZE (1..16)) OF EUTRA-PhysCellIdRange -using eutra_freq_excluded_cell_list_l = dyn_array; - -// EUTRA-FreqNeighCellList ::= SEQUENCE (SIZE (1..8)) OF EUTRA-FreqNeighCellInfo -using eutra_freq_neigh_cell_list_l = dyn_array; - -// EUTRA-FreqNeighHSDN-CellList-r17 ::= SEQUENCE (SIZE (1..8)) OF EUTRA-PhysCellIdRange -using eutra_freq_neigh_hsdn_cell_list_r17_l = dyn_array; - -// EUTRA-MultiBandInfoList ::= SEQUENCE (SIZE (1..8)) OF EUTRA-MultiBandInfo -using eutra_multi_band_info_list_l = dyn_array; - -// InterFreqAllowedCellList-r16 ::= SEQUENCE (SIZE (1..16)) OF PCI-Range -using inter_freq_allowed_cell_list_r16_l = dyn_array; - -// InterFreqCAG-CellListPerPLMN-r16 ::= SEQUENCE -struct inter_freq_cag_cell_list_per_plmn_r16_s { - using cag_cell_list_r16_l_ = dyn_array; - - // member variables - uint8_t plmn_id_idx_r16 = 1; - cag_cell_list_r16_l_ cag_cell_list_r16; - - // sequence methods + // choice methods + mtch_ssb_map_win_cycle_offset_r17_c() = default; + mtch_ssb_map_win_cycle_offset_r17_c(const mtch_ssb_map_win_cycle_offset_r17_c& other); + mtch_ssb_map_win_cycle_offset_r17_c& operator=(const mtch_ssb_map_win_cycle_offset_r17_c& other); + ~mtch_ssb_map_win_cycle_offset_r17_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; -}; - -// InterFreqExcludedCellList ::= SEQUENCE (SIZE (1..16)) OF PCI-Range -using inter_freq_excluded_cell_list_l = dyn_array; - -// InterFreqNeighCellList ::= SEQUENCE (SIZE (1..16)) OF InterFreqNeighCellInfo -using inter_freq_neigh_cell_list_l = dyn_array; - -// InterFreqNeighCellList-v1610 ::= SEQUENCE (SIZE (1..16)) OF InterFreqNeighCellInfo-v1610 -using inter_freq_neigh_cell_list_v1610_l = dyn_array; - -// InterFreqNeighCellList-v1710 ::= SEQUENCE (SIZE (1..16)) OF InterFreqNeighCellInfo-v1710 -using inter_freq_neigh_cell_list_v1710_l = dyn_array; - -// InterFreqNeighHSDN-CellList-r17 ::= SEQUENCE (SIZE (1..16)) OF PCI-Range -using inter_freq_neigh_hsdn_cell_list_r17_l = dyn_array; - -// MBS-FSAI-List-r17 ::= SEQUENCE (SIZE (1..64)) OF OCTET STRING (SIZE (3)) -using mbs_fsai_list_r17_l = dyn_array>; - -// PDSCH-ConfigPTM-r17 ::= SEQUENCE -struct pdsch_cfg_ptm_r17_s { - struct pdsch_aggregation_factor_r17_opts { - enum options { n2, n4, n8, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pdsch_aggregation_factor_r17_e_ = enumerated; - - // member variables - bool data_scrambling_id_pdsch_r17_present = false; - bool dmrs_scrambling_id0_r17_present = false; - bool pdsch_aggregation_factor_r17_present = false; - uint16_t data_scrambling_id_pdsch_r17 = 0; - uint32_t dmrs_scrambling_id0_r17 = 0; - pdsch_aggregation_factor_r17_e_ pdsch_aggregation_factor_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PosSIB-Type-r16 ::= SEQUENCE -struct pos_sib_type_r16_s { - struct pos_sib_type_r16_opts { - enum options { - pos_sib_type1_neg1, - pos_sib_type1_neg2, - pos_sib_type1_neg3, - pos_sib_type1_neg4, - pos_sib_type1_neg5, - pos_sib_type1_neg6, - pos_sib_type1_neg7, - pos_sib_type1_neg8, - pos_sib_type2_neg1, - pos_sib_type2_neg2, - pos_sib_type2_neg3, - pos_sib_type2_neg4, - pos_sib_type2_neg5, - pos_sib_type2_neg6, - pos_sib_type2_neg7, - pos_sib_type2_neg8, - pos_sib_type2_neg9, - pos_sib_type2_neg10, - pos_sib_type2_neg11, - pos_sib_type2_neg12, - pos_sib_type2_neg13, - pos_sib_type2_neg14, - pos_sib_type2_neg15, - pos_sib_type2_neg16, - pos_sib_type2_neg17, - pos_sib_type2_neg18, - pos_sib_type2_neg19, - pos_sib_type2_neg20, - pos_sib_type2_neg21, - pos_sib_type2_neg22, - pos_sib_type2_neg23, - pos_sib_type3_neg1, - pos_sib_type4_neg1, - pos_sib_type5_neg1, - pos_sib_type6_neg1, - pos_sib_type6_neg2, - pos_sib_type6_neg3, - // ... - nulltype - } value; - - const char* to_string() const; - }; - using pos_sib_type_r16_e_ = enumerated; + // getters + uint8_t& ms10() + { + assert_choice_type(types::ms10, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); + return c.get(); + } + uint8_t& ms20() + { + assert_choice_type(types::ms20, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); + return c.get(); + } + uint8_t& ms32() + { + assert_choice_type(types::ms32, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); + return c.get(); + } + uint8_t& ms64() + { + assert_choice_type(types::ms64, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); + return c.get(); + } + uint8_t& ms128() + { + assert_choice_type(types::ms128, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); + return c.get(); + } + uint16_t& ms256() + { + assert_choice_type(types::ms256, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); + return c.get(); + } + const uint8_t& ms10() const + { + assert_choice_type(types::ms10, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); + return c.get(); + } + const uint8_t& ms20() const + { + assert_choice_type(types::ms20, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); + return c.get(); + } + const uint8_t& ms32() const + { + assert_choice_type(types::ms32, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); + return c.get(); + } + const uint8_t& ms64() const + { + assert_choice_type(types::ms64, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); + return c.get(); + } + const uint8_t& ms128() const + { + assert_choice_type(types::ms128, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); + return c.get(); + } + const uint16_t& ms256() const + { + assert_choice_type(types::ms256, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); + return c.get(); + } + uint8_t& set_ms10(); + uint8_t& set_ms20(); + uint8_t& set_ms32(); + uint8_t& set_ms64(); + uint8_t& set_ms128(); + uint16_t& set_ms256(); - // member variables - bool encrypted_r16_present = false; - bool gnss_id_r16_present = false; - bool sbas_id_r16_present = false; - bool area_scope_r16_present = false; - gnss_id_r16_s gnss_id_r16; - sbas_id_r16_s sbas_id_r16; - pos_sib_type_r16_e_ pos_sib_type_r16; +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_(); }; -// SI-SchedulingInfo-v1740 ::= SEQUENCE -struct si_sched_info_v1740_s { - bool si_request_cfg_red_cap_r17_present = false; - si_request_cfg_s si_request_cfg_red_cap_r17; +// MBS-NeighbourCellList-r17 ::= SEQUENCE (SIZE (0..8)) OF MBS-NeighbourCell-r17 +using mbs_neighbour_cell_list_r17_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; -}; +// MBS-SessionInfoList-r17 ::= SEQUENCE (SIZE (1..1024)) OF MBS-SessionInfo-r17 +using mbs_session_info_list_r17_l = dyn_array; -// SSB-MTC2-LP-r16 ::= SEQUENCE -struct ssb_mtc2_lp_r16_s { - using pci_list_l_ = dyn_array; - struct periodicity_opts { - enum options { sf10, sf20, sf40, sf80, sf160, spare3, spare2, spare1, nulltype } value; - typedef uint8_t number_type; +// MTCH-SSB-MappingWindowList-r17 ::= SEQUENCE (SIZE (1..16)) OF MTCH-SSB-MappingWindowCycleOffset-r17 +using mtch_ssb_map_win_list_r17_l = dyn_array; - const char* to_string() const; - uint8_t to_number() const; - }; - using periodicity_e_ = enumerated; +// MBSBroadcastConfiguration-r17-IEs ::= SEQUENCE +struct mbs_broadcast_cfg_r17_ies_s { + using drx_cfg_ptm_list_r17_l_ = dyn_array; // member variables - pci_list_l_ pci_list; - periodicity_e_ periodicity; + bool mbs_neighbour_cell_list_r17_present = false; + bool pdsch_cfg_mtch_r17_present = false; + bool non_crit_ext_present = false; + mbs_session_info_list_r17_l mbs_session_info_list_r17; + mbs_neighbour_cell_list_r17_l mbs_neighbour_cell_list_r17; + drx_cfg_ptm_list_r17_l_ drx_cfg_ptm_list_r17; + pdsch_cfg_broadcast_r17_s pdsch_cfg_mtch_r17; + mtch_ssb_map_win_list_r17_l mtch_ssb_map_win_list_r17; + dyn_octstring late_non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -624,28 +281,44 @@ struct ssb_mtc2_lp_r16_s { void to_json(json_writer& j) const; }; -// SchedulingInfo2-r17 ::= SEQUENCE -struct sched_info2_r17_s { - struct si_broadcast_status_r17_opts { - enum options { broadcasting, not_broadcasting, nulltype } value; +// MBSBroadcastConfiguration-r17 ::= SEQUENCE +struct mbs_broadcast_cfg_r17_s { + struct crit_exts_c_ { + struct types_opts { + enum options { mbs_broadcast_cfg_r17, crit_exts_future, nulltype } value; - const char* to_string() const; - }; - using si_broadcast_status_r17_e_ = enumerated; - struct si_periodicity_r17_opts { - enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, nulltype } value; - typedef uint16_t number_type; + const char* to_string() const; + }; + using types = enumerated; - const char* to_string() const; - uint16_t to_number() const; + // choice methods + crit_exts_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 + mbs_broadcast_cfg_r17_ies_s& mbs_broadcast_cfg_r17() + { + assert_choice_type(types::mbs_broadcast_cfg_r17, type_, "criticalExtensions"); + return c; + } + const mbs_broadcast_cfg_r17_ies_s& mbs_broadcast_cfg_r17() const + { + assert_choice_type(types::mbs_broadcast_cfg_r17, type_, "criticalExtensions"); + return c; + } + mbs_broadcast_cfg_r17_ies_s& set_mbs_broadcast_cfg_r17(); + void set_crit_exts_future(); + + private: + types type_; + mbs_broadcast_cfg_r17_ies_s c; }; - using si_periodicity_r17_e_ = enumerated; // member variables - si_broadcast_status_r17_e_ si_broadcast_status_r17; - uint16_t si_win_position_r17 = 1; - si_periodicity_r17_e_ si_periodicity_r17; - sib_map_v1700_l sib_map_info_r17; + crit_exts_c_ crit_exts; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -653,97 +326,79 @@ struct sched_info2_r17_s { void to_json(json_writer& j) const; }; -// SliceInfoList-r17 ::= SEQUENCE (SIZE (1..8)) OF SliceInfo-r17 -using slice_info_list_r17_l = dyn_array; +// MCCH-MessageType-r17 ::= CHOICE +struct mcch_msg_type_r17_c { + struct c1_c_ { + struct types_opts { + enum options { mbs_broadcast_cfg_r17, spare1, nulltype } value; -// SpeedStateScaleFactors ::= SEQUENCE -struct speed_state_scale_factors_s { - struct sf_medium_opts { - enum options { odot25, odot5, odot75, ldot0, nulltype } value; - typedef float number_type; + const char* to_string() const; + }; + using types = enumerated; - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using sf_medium_e_ = enumerated; - struct sf_high_opts { - enum options { odot25, odot5, odot75, ldot0, nulltype } value; - typedef float number_type; + // 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 + mbs_broadcast_cfg_r17_s& mbs_broadcast_cfg_r17() + { + assert_choice_type(types::mbs_broadcast_cfg_r17, type_, "c1"); + return c; + } + const mbs_broadcast_cfg_r17_s& mbs_broadcast_cfg_r17() const + { + assert_choice_type(types::mbs_broadcast_cfg_r17, type_, "c1"); + return c; + } + mbs_broadcast_cfg_r17_s& set_mbs_broadcast_cfg_r17(); + void set_spare1(); - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; + private: + types type_; + mbs_broadcast_cfg_r17_s c; }; - using sf_high_e_ = enumerated; - - // member variables - sf_medium_e_ sf_medium; - sf_high_e_ sf_high; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UAC-BarringInfoSet-v1700 ::= SEQUENCE -struct uac_barr_info_set_v1700_s { - struct uac_barr_factor_for_ai3_r17_opts { - enum options { p00, p05, p10, p15, p20, p25, p30, p40, p50, p60, p70, p75, p80, p85, p90, p95, nulltype } value; - typedef float number_type; + struct types_opts { + enum options { c1, msg_class_ext, nulltype } value; + typedef uint8_t number_type; const char* to_string() const; - float to_number() const; - const char* to_number_string() const; + uint8_t to_number() const; }; - using uac_barr_factor_for_ai3_r17_e_ = enumerated; - - // member variables - bool uac_barr_factor_for_ai3_r17_present = false; - uac_barr_factor_for_ai3_r17_e_ uac_barr_factor_for_ai3_r17; + using types = enumerated; - // sequence methods + // choice methods + mcch_msg_type_r17_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; -}; - -// CarrierFreqEUTRA ::= SEQUENCE -struct carrier_freq_eutra_s { - struct thresh_x_q_s_ { - uint8_t thresh_x_high_q = 0; - uint8_t thresh_x_low_q = 0; - }; - - // member variables - bool cell_resel_prio_present = false; - bool cell_resel_sub_prio_present = false; - bool thresh_x_q_present = false; - uint32_t carrier_freq = 0; - eutra_multi_band_info_list_l eutra_multi_band_info_list; - eutra_freq_neigh_cell_list_l eutra_freq_neigh_cell_list; - eutra_freq_excluded_cell_list_l eutra_excluded_cell_list; - eutra_allowed_meas_bw_e allowed_meas_bw; - bool presence_ant_port1 = false; - uint8_t cell_resel_prio = 0; - cell_resel_sub_prio_e cell_resel_sub_prio; - uint8_t thresh_x_high = 0; - uint8_t thresh_x_low = 0; - int8_t q_rx_lev_min = -70; - int8_t q_qual_min = -34; - int8_t p_max_eutra = -30; - thresh_x_q_s_ thresh_x_q; + // getters + c1_c_& c1() + { + assert_choice_type(types::c1, type_, "MCCH-MessageType-r17"); + return c; + } + const c1_c_& c1() const + { + assert_choice_type(types::c1, type_, "MCCH-MessageType-r17"); + return c; + } + c1_c_& set_c1(); + void set_msg_class_ext(); - // 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_; + c1_c_ c; }; -// CarrierFreqEUTRA-v1610 ::= SEQUENCE -struct carrier_freq_eutra_v1610_s { - bool high_speed_eutra_carrier_r16_present = false; +// MCCH-Message-r17 ::= SEQUENCE +struct mcch_msg_r17_s { + mcch_msg_type_r17_c msg; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -751,9 +406,13 @@ struct carrier_freq_eutra_v1610_s { void to_json(json_writer& j) const; }; -// CarrierFreqEUTRA-v1700 ::= SEQUENCE -struct carrier_freq_eutra_v1700_s { - eutra_freq_neigh_hsdn_cell_list_r17_l eutra_freq_neigh_hsdn_cell_list_r17; +// AI-RNTI-r16 ::= INTEGER (0..65535) +using ai_rnti_r16 = integer; + +// PDCCH-BlindDetectionCA-MixedExt-r16 ::= SEQUENCE +struct pdcch_blind_detection_ca_mixed_ext_r16_s { + uint8_t pdcch_blind_detection_ca1_r16 = 1; + uint8_t pdcch_blind_detection_ca2_r16 = 1; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -761,10 +420,10 @@ struct carrier_freq_eutra_v1700_s { void to_json(json_writer& j) const; }; -// FreqPrioritySlicing-r17 ::= SEQUENCE -struct freq_prio_slicing_r17_s { - uint8_t dl_implicit_carrier_freq_r17 = 0; - slice_info_list_r17_l slice_info_list_r17; +// PDCCH-BlindDetectionCG-UE-MixedExt-r16 ::= SEQUENCE +struct pdcch_blind_detection_cg_ue_mixed_ext_r16_s { + uint8_t pdcch_blind_detection_cg_ue1_r16 = 0; + uint8_t pdcch_blind_detection_cg_ue2_r16 = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -772,63 +431,72 @@ struct freq_prio_slicing_r17_s { void to_json(json_writer& j) const; }; -// HRNN-r16 ::= SEQUENCE -struct hrnn_r16_s { - bounded_octstring<1, 48> hrnn_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +// PDCCH-BlindDetectionMixedList-r16 ::= SEQUENCE +struct pdcch_blind_detection_mixed_list_r16_s { + struct pdcch_blind_detection_ca_mixed_ext_r16_c_ { + struct types_opts { + enum options { + pdcch_blind_detection_ca_mixed_v16a0, + pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0, + nulltype + } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + pdcch_blind_detection_ca_mixed_ext_r16_c_() = default; + pdcch_blind_detection_ca_mixed_ext_r16_c_(const pdcch_blind_detection_ca_mixed_ext_r16_c_& other); + pdcch_blind_detection_ca_mixed_ext_r16_c_& operator=(const pdcch_blind_detection_ca_mixed_ext_r16_c_& other); + ~pdcch_blind_detection_ca_mixed_ext_r16_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 + pdcch_blind_detection_ca_mixed_ext_r16_s& pdcch_blind_detection_ca_mixed_v16a0() + { + assert_choice_type(types::pdcch_blind_detection_ca_mixed_v16a0, type_, "pdcch-BlindDetectionCA-MixedExt-r16"); + return c.get(); + } + pdcch_blind_detection_ca_mixed_ext_r16_s& pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0() + { + assert_choice_type( + types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0, type_, "pdcch-BlindDetectionCA-MixedExt-r16"); + return c.get(); + } + const pdcch_blind_detection_ca_mixed_ext_r16_s& pdcch_blind_detection_ca_mixed_v16a0() const + { + assert_choice_type(types::pdcch_blind_detection_ca_mixed_v16a0, type_, "pdcch-BlindDetectionCA-MixedExt-r16"); + return c.get(); + } + const pdcch_blind_detection_ca_mixed_ext_r16_s& pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0() const + { + assert_choice_type( + types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0, type_, "pdcch-BlindDetectionCA-MixedExt-r16"); + return c.get(); + } + pdcch_blind_detection_ca_mixed_ext_r16_s& set_pdcch_blind_detection_ca_mixed_v16a0(); + pdcch_blind_detection_ca_mixed_ext_r16_s& set_pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0(); + + private: + types type_; + choice_buffer_t c; -// InterFreqCarrierFreqInfo ::= SEQUENCE -struct inter_freq_carrier_freq_info_s { - struct thresh_x_q_s_ { - uint8_t thresh_x_high_q = 0; - uint8_t thresh_x_low_q = 0; + void destroy_(); + }; + struct pdcch_blind_detection_cg_ue_mixed_ext_r16_s_ { + pdcch_blind_detection_cg_ue_mixed_ext_r16_s pdcch_blind_detection_mcg_ue_mixed_v16a0; + pdcch_blind_detection_cg_ue_mixed_ext_r16_s pdcch_blind_detection_scg_ue_mixed_v16a0; }; // member variables - bool ext = false; - bool nrof_ss_blocks_to_average_present = false; - bool abs_thresh_ss_blocks_consolidation_present = false; - bool smtc_present = false; - bool ssb_to_measure_present = false; - bool ss_rssi_meas_present = false; - bool q_rx_lev_min_sul_present = false; - bool q_qual_min_present = false; - bool p_max_present = false; - bool t_resel_nr_sf_present = false; - bool thresh_x_q_present = false; - bool cell_resel_prio_present = false; - bool cell_resel_sub_prio_present = false; - bool q_offset_freq_present = false; - uint32_t dl_carrier_freq = 0; - multi_freq_band_list_nr_sib_l freq_band_list; - multi_freq_band_list_nr_sib_l freq_band_list_sul; - uint8_t nrof_ss_blocks_to_average = 2; - thres_nr_s abs_thresh_ss_blocks_consolidation; - ssb_mtc_s smtc; - subcarrier_spacing_e ssb_subcarrier_spacing; - ssb_to_measure_c ssb_to_measure; - bool derive_ssb_idx_from_cell = false; - ss_rssi_meas_s ss_rssi_meas; - int8_t q_rx_lev_min = -70; - int8_t q_rx_lev_min_sul = -70; - int8_t q_qual_min = -43; - int8_t p_max = -30; - uint8_t t_resel_nr = 0; - speed_state_scale_factors_s t_resel_nr_sf; - uint8_t thresh_x_high_p = 0; - uint8_t thresh_x_low_p = 0; - thresh_x_q_s_ thresh_x_q; - uint8_t cell_resel_prio = 0; - cell_resel_sub_prio_e cell_resel_sub_prio; - q_offset_range_e q_offset_freq; - inter_freq_neigh_cell_list_l inter_freq_neigh_cell_list; - inter_freq_excluded_cell_list_l inter_freq_excluded_cell_list; - // ... + bool pdcch_blind_detection_ca_mixed_ext_r16_present = false; + bool pdcch_blind_detection_cg_ue_mixed_ext_r16_present = false; + pdcch_blind_detection_ca_mixed_ext_r16_c_ pdcch_blind_detection_ca_mixed_ext_r16; + pdcch_blind_detection_cg_ue_mixed_ext_r16_s_ pdcch_blind_detection_cg_ue_mixed_ext_r16; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -836,18 +504,12 @@ struct inter_freq_carrier_freq_info_s { void to_json(json_writer& j) const; }; -// InterFreqCarrierFreqInfo-v1610 ::= SEQUENCE -struct inter_freq_carrier_freq_info_v1610_s { - using inter_freq_cag_cell_list_r16_l_ = dyn_array; +// CA-ParametersNR-v16a0 ::= SEQUENCE +struct ca_params_nr_v16a0_s { + using pdcch_blind_detection_mixed_list_r16_l_ = dyn_array; // member variables - bool smtc2_lp_r16_present = false; - bool ssb_position_qcl_common_r16_present = false; - inter_freq_neigh_cell_list_v1610_l inter_freq_neigh_cell_list_v1610; - ssb_mtc2_lp_r16_s smtc2_lp_r16; - inter_freq_allowed_cell_list_r16_l inter_freq_allowed_cell_list_r16; - ssb_position_qcl_relation_r16_e ssb_position_qcl_common_r16; - inter_freq_cag_cell_list_r16_l_ inter_freq_cag_cell_list_r16; + pdcch_blind_detection_mixed_list_r16_l_ pdcch_blind_detection_mixed_list_r16; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -855,14 +517,10 @@ struct inter_freq_carrier_freq_info_v1610_s { void to_json(json_writer& j) const; }; -// InterFreqCarrierFreqInfo-v1700 ::= SEQUENCE -struct inter_freq_carrier_freq_info_v1700_s { - bool high_speed_meas_inter_freq_r17_present = false; - bool red_cap_access_allowed_r17_present = false; - bool ssb_position_qcl_common_r17_present = false; - inter_freq_neigh_hsdn_cell_list_r17_l inter_freq_neigh_hsdn_cell_list_r17; - ssb_position_qcl_relation_r17_e ssb_position_qcl_common_r17; - inter_freq_neigh_cell_list_v1710_l inter_freq_neigh_cell_list_v1710; +// CA-ParametersNRDC-v16a0 ::= SEQUENCE +struct ca_params_nrdc_v16a0_s { + bool ca_params_nr_for_dc_v16a0_present = false; + ca_params_nr_v16a0_s ca_params_nr_for_dc_v16a0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -870,9 +528,12 @@ struct inter_freq_carrier_freq_info_v1700_s { void to_json(json_writer& j) const; }; -// InterFreqCarrierFreqInfo-v1720 ::= SEQUENCE -struct inter_freq_carrier_freq_info_v1720_s { - ssb_mtc4_list_r17_l smtc4list_r17; +// BandCombination-v16a0 ::= SEQUENCE +struct band_combination_v16a0_s { + bool ca_params_nr_v16a0_present = false; + bool ca_params_nrdc_v16a0_present = false; + ca_params_nr_v16a0_s ca_params_nr_v16a0; + ca_params_nrdc_v16a0_s ca_params_nrdc_v16a0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -880,9 +541,10 @@ struct inter_freq_carrier_freq_info_v1720_s { void to_json(json_writer& j) const; }; -// InterFreqCarrierFreqInfo-v1730 ::= SEQUENCE -struct inter_freq_carrier_freq_info_v1730_s { - bool ch_access_mode2_r17_present = false; +// BandCombination-UplinkTxSwitch-v16a0 ::= SEQUENCE +struct band_combination_ul_tx_switch_v16a0_s { + bool band_combination_v16a0_present = false; + band_combination_v16a0_s band_combination_v16a0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -890,18 +552,21 @@ struct inter_freq_carrier_freq_info_v1730_s { void to_json(json_writer& j) const; }; -// IntraFreqNeighCellInfo ::= SEQUENCE -struct intra_freq_neigh_cell_info_s { - bool ext = false; - bool q_rx_lev_min_offset_cell_present = false; - bool q_rx_lev_min_offset_cell_sul_present = false; - bool q_qual_min_offset_cell_present = false; - uint16_t pci = 0; - q_offset_range_e q_offset_cell; - uint8_t q_rx_lev_min_offset_cell = 1; - uint8_t q_rx_lev_min_offset_cell_sul = 1; - uint8_t q_qual_min_offset_cell = 1; - // ... +// BandCombinationList-UplinkTxSwitch-v16a0 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-UplinkTxSwitch-v16a0 +using band_combination_list_ul_tx_switch_v16a0_l = dyn_array; + +// BandCombinationList-v16a0 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v16a0 +using band_combination_list_v16a0_l = dyn_array; + +// CG-SDT-ConfigLCH-Restriction-r17 ::= SEQUENCE +struct cg_sdt_cfg_lch_restrict_r17_s { + using allowed_cg_list_r17_l_ = bounded_array; + + // member variables + bool cfg_grant_type1_allowed_r17_present = false; + bool allowed_cg_list_r17_present = false; + uint8_t lc_ch_id_r17 = 1; + allowed_cg_list_r17_l_ allowed_cg_list_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -909,10 +574,21 @@ struct intra_freq_neigh_cell_info_s { void to_json(json_writer& j) const; }; -// IntraFreqNeighCellInfo-v1610 ::= SEQUENCE -struct intra_freq_neigh_cell_info_v1610_s { - bool ssb_position_qcl_r16_present = false; - ssb_position_qcl_relation_r16_e ssb_position_qcl_r16; +// CellGrouping-r16 ::= SEQUENCE +struct cell_grouping_r16_s { + using mcg_r16_l_ = dyn_array; + using scg_r16_l_ = dyn_array; + struct mode_r16_opts { + enum options { sync, async, nulltype } value; + + const char* to_string() const; + }; + using mode_r16_e_ = enumerated; + + // member variables + mcg_r16_l_ mcg_r16; + scg_r16_l_ scg_r16; + mode_r16_e_ mode_r16; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -920,10 +596,16 @@ struct intra_freq_neigh_cell_info_v1610_s { void to_json(json_writer& j) const; }; -// IntraFreqNeighCellInfo-v1710 ::= SEQUENCE -struct intra_freq_neigh_cell_info_v1710_s { - bool ssb_position_qcl_r17_present = false; - ssb_position_qcl_relation_r17_e ssb_position_qcl_r17; +// CondReconfigExecCondSCG-r17 ::= SEQUENCE (SIZE (1..2)) OF INTEGER (1..64) +using cond_recfg_exec_cond_scg_r17_l = bounded_array; + +// MeasResultSCG-Failure ::= SEQUENCE +struct meas_result_scg_fail_s { + bool ext = false; + meas_result_list2_nr_l meas_result_per_mo_list; + // ... + // group 0 + copy_ptr location_info_r16; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -931,47 +613,20 @@ struct intra_freq_neigh_cell_info_v1710_s { void to_json(json_writer& j) const; }; -// LocationAndBandwidthBroadcast-r17 ::= CHOICE -struct location_and_bw_broadcast_r17_c { - struct types_opts { - enum options { same_as_sib1_cfg_location_and_bw, location_and_bw, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; +// Phy-ParametersCommon-v16a0 ::= SEQUENCE +struct phy_params_common_v16a0_s { + bool srs_periodicity_and_offset_ext_r16_present = false; - // choice methods - location_and_bw_broadcast_r17_c() = default; - 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 - uint16_t& location_and_bw() - { - assert_choice_type(types::location_and_bw, type_, "LocationAndBandwidthBroadcast-r17"); - return c; - } - const uint16_t& location_and_bw() const - { - assert_choice_type(types::location_and_bw, type_, "LocationAndBandwidthBroadcast-r17"); - return c; - } - void set_same_as_sib1_cfg_location_and_bw(); - uint16_t& set_location_and_bw(); - -private: - types type_; - uint16_t c; }; -// MBS-FSAI-InterFreq-r17 ::= SEQUENCE -struct mbs_fsai_inter_freq_r17_s { - uint32_t dl_carrier_freq_r17 = 0; - mbs_fsai_list_r17_l mbs_fsai_list_r17; +// Phy-Parameters-v16a0 ::= SEQUENCE +struct phy_params_v16a0_s { + bool phy_params_common_v16a0_present = false; + phy_params_common_v16a0_s phy_params_common_v16a0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -979,154 +634,20 @@ struct mbs_fsai_inter_freq_r17_s { void to_json(json_writer& j) const; }; -// MCCH-RepetitionPeriodAndOffset-r17 ::= CHOICE -struct mcch_repeat_period_and_offset_r17_c { - struct types_opts { - enum options { - rf1_r17, - rf2_r17, - rf4_r17, - rf8_r17, - rf16_r17, - rf32_r17, - rf64_r17, - rf128_r17, - rf256_r17, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; +// RF-Parameters-v15g0 ::= SEQUENCE +struct rf_params_v15g0_s { + band_combination_list_v15g0_l supported_band_combination_list_v15g0; - // choice methods - mcch_repeat_period_and_offset_r17_c() = default; - mcch_repeat_period_and_offset_r17_c(const mcch_repeat_period_and_offset_r17_c& other); - mcch_repeat_period_and_offset_r17_c& operator=(const mcch_repeat_period_and_offset_r17_c& other); - ~mcch_repeat_period_and_offset_r17_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& rf1_r17() - { - assert_choice_type(types::rf1_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - uint8_t& rf2_r17() - { - assert_choice_type(types::rf2_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - uint8_t& rf4_r17() - { - assert_choice_type(types::rf4_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - uint8_t& rf8_r17() - { - assert_choice_type(types::rf8_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - uint8_t& rf16_r17() - { - assert_choice_type(types::rf16_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - uint8_t& rf32_r17() - { - assert_choice_type(types::rf32_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - uint8_t& rf64_r17() - { - assert_choice_type(types::rf64_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - uint8_t& rf128_r17() - { - assert_choice_type(types::rf128_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - uint16_t& rf256_r17() - { - assert_choice_type(types::rf256_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - const uint8_t& rf1_r17() const - { - assert_choice_type(types::rf1_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - const uint8_t& rf2_r17() const - { - assert_choice_type(types::rf2_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - const uint8_t& rf4_r17() const - { - assert_choice_type(types::rf4_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - const uint8_t& rf8_r17() const - { - assert_choice_type(types::rf8_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - const uint8_t& rf16_r17() const - { - assert_choice_type(types::rf16_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - const uint8_t& rf32_r17() const - { - assert_choice_type(types::rf32_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - const uint8_t& rf64_r17() const - { - assert_choice_type(types::rf64_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - const uint8_t& rf128_r17() const - { - assert_choice_type(types::rf128_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - const uint16_t& rf256_r17() const - { - assert_choice_type(types::rf256_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); - return c.get(); - } - uint8_t& set_rf1_r17(); - uint8_t& set_rf2_r17(); - uint8_t& set_rf4_r17(); - uint8_t& set_rf8_r17(); - uint8_t& set_rf16_r17(); - uint8_t& set_rf32_r17(); - uint8_t& set_rf64_r17(); - uint8_t& set_rf128_r17(); - uint16_t& set_rf256_r17(); - -private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); }; -// NTN-NeighCellConfig-r17 ::= SEQUENCE -struct ntn_neigh_cell_cfg_r17_s { - bool ntn_cfg_r17_present = false; - bool carrier_freq_r17_present = false; - bool pci_r17_present = false; - ntn_cfg_r17_s ntn_cfg_r17; - uint32_t carrier_freq_r17 = 0; - uint16_t pci_r17 = 0; +// RF-Parameters-v16a0 ::= SEQUENCE +struct rf_params_v16a0_s { + band_combination_list_v16a0_l supported_band_combination_list_v16a0; + band_combination_list_ul_tx_switch_v16a0_l supported_band_combination_list_ul_tx_switch_v16a0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1134,37 +655,11 @@ struct ntn_neigh_cell_cfg_r17_s { void to_json(json_writer& j) const; }; -// PDSCH-ConfigBroadcast-r17 ::= SEQUENCE -struct pdsch_cfg_broadcast_r17_s { - using pdsch_cfg_list_r17_l_ = dyn_array; - using rate_match_pattern_to_add_mod_list_r17_l_ = dyn_array; - struct mcs_table_r17_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using mcs_table_r17_e_ = enumerated; - struct xoverhead_r17_opts { - enum options { xoh6, xoh12, xoh18, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using xoverhead_r17_e_ = enumerated; - - // member variables - bool lte_crs_to_match_around_r17_present = false; - bool mcs_table_r17_present = false; - bool xoverhead_r17_present = false; - pdsch_cfg_list_r17_l_ pdsch_cfg_list_r17; - pdsch_time_domain_res_alloc_list_r16_l pdsch_time_domain_alloc_list_r17; - rate_match_pattern_to_add_mod_list_r17_l_ rate_match_pattern_to_add_mod_list_r17; - rate_match_pattern_lte_crs_s lte_crs_to_match_around_r17; - mcs_table_r17_e_ mcs_table_r17; - xoverhead_r17_e_ xoverhead_r17; +// BandNR-v16c0 ::= SEQUENCE +struct band_nr_v16c0_s { + bool ext = false; + bool pusch_repeat_type_a_v16c0_present = false; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1172,36 +667,12 @@ struct pdsch_cfg_broadcast_r17_s { void to_json(json_writer& j) const; }; -// PosSIB-MappingInfo-r16 ::= SEQUENCE (SIZE (1..32)) OF PosSIB-Type-r16 -using pos_sib_map_info_r16_l = dyn_array; - -// RedCap-ConfigCommonSIB-r17 ::= SEQUENCE -struct red_cap_cfg_common_sib_r17_s { - struct cell_barred_red_cap_r17_s_ { - struct cell_barred_red_cap1_rx_r17_opts { - enum options { barred, not_barred, nulltype } value; - - const char* to_string() const; - }; - using cell_barred_red_cap1_rx_r17_e_ = enumerated; - struct cell_barred_red_cap2_rx_r17_opts { - enum options { barred, not_barred, nulltype } value; - - const char* to_string() const; - }; - using cell_barred_red_cap2_rx_r17_e_ = enumerated; - - // member variables - cell_barred_red_cap1_rx_r17_e_ cell_barred_red_cap1_rx_r17; - cell_barred_red_cap2_rx_r17_e_ cell_barred_red_cap2_rx_r17; - }; +// RF-Parameters-v16c0 ::= SEQUENCE +struct rf_params_v16c0_s { + using supported_band_list_nr_v16c0_l_ = dyn_array; // member variables - bool ext = false; - bool half_duplex_red_cap_allowed_r17_present = false; - bool cell_barred_red_cap_r17_present = false; - cell_barred_red_cap_r17_s_ cell_barred_red_cap_r17; - // ... + supported_band_list_nr_v16c0_l_ supported_band_list_nr_v16c0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1209,55 +680,21 @@ struct red_cap_cfg_common_sib_r17_s { void to_json(json_writer& j) const; }; -// SDT-ConfigCommonSIB-r17 ::= SEQUENCE -struct sdt_cfg_common_sib_r17_s { - struct sdt_lc_ch_sr_delay_timer_r17_opts { - enum options { sf20, sf40, sf64, sf128, sf512, sf1024, sf2560, spare1, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using sdt_lc_ch_sr_delay_timer_r17_e_ = enumerated; - struct sdt_data_volume_thres_r17_opts { - enum options { - byte32, - byte100, - byte200, - byte400, - byte600, - byte800, - byte1000, - byte2000, - byte4000, - byte8000, - byte9000, - byte10000, - byte12000, - byte24000, - byte48000, - byte96000, - nulltype - } value; - typedef uint32_t number_type; - - const char* to_string() const; - uint32_t to_number() const; - }; - using sdt_data_volume_thres_r17_e_ = enumerated; - struct t319a_r17_opts { +// CG-SDT-TA-ValidationConfig-r17 ::= SEQUENCE +struct cg_sdt_ta_validation_cfg_r17_s { + struct cg_sdt_rsrp_change_thres_r17_opts { enum options { - ms100, - ms200, - ms300, - ms400, - ms600, - ms1000, - ms2000, - ms3000, - ms4000, - spare7, - spare6, + db2, + db4, + db6, + db8, + db10, + db14, + db18, + db22, + db26, + db30, + db34, spare5, spare4, spare3, @@ -1265,20 +702,15 @@ struct sdt_cfg_common_sib_r17_s { spare1, nulltype } value; - typedef uint16_t number_type; + typedef uint8_t number_type; const char* to_string() const; - uint16_t to_number() const; + uint8_t to_number() const; }; - using t319a_r17_e_ = enumerated; + using cg_sdt_rsrp_change_thres_r17_e_ = enumerated; // member variables - bool sdt_rsrp_thres_r17_present = false; - bool sdt_lc_ch_sr_delay_timer_r17_present = false; - uint8_t sdt_rsrp_thres_r17 = 0; - sdt_lc_ch_sr_delay_timer_r17_e_ sdt_lc_ch_sr_delay_timer_r17; - sdt_data_volume_thres_r17_e_ sdt_data_volume_thres_r17; - t319a_r17_e_ t319a_r17; + cg_sdt_rsrp_change_thres_r17_e_ cg_sdt_rsrp_change_thres_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1286,14 +718,30 @@ struct sdt_cfg_common_sib_r17_s { void to_json(json_writer& j) const; }; -// SI-SchedulingInfo-v1700 ::= SEQUENCE -struct si_sched_info_v1700_s { - using sched_info_list2_r17_l_ = dyn_array; +// SDT-MAC-PHY-CG-Config-r17 ::= SEQUENCE +struct sdt_mac_phy_cg_cfg_r17_s { + using cg_sdt_cfg_lch_restrict_to_add_mod_list_r17_l_ = dyn_array; + using cg_sdt_cfg_lch_restrict_to_release_list_r17_l_ = bounded_array; // member variables - bool dummy_present = false; - sched_info_list2_r17_l_ sched_info_list2_r17; - si_request_cfg_s dummy; + bool ext = false; + bool cg_sdt_cfg_init_bwp_n_ul_r17_present = false; + bool cg_sdt_cfg_init_bwp_sul_r17_present = false; + bool cg_sdt_cfg_init_bwp_dl_r17_present = false; + bool cg_sdt_time_align_timer_r17_present = false; + bool cg_sdt_rsrp_thres_ssb_r17_present = false; + bool cg_sdt_ta_validation_cfg_r17_present = false; + bool cg_sdt_cs_rnti_r17_present = false; + cg_sdt_cfg_lch_restrict_to_add_mod_list_r17_l_ cg_sdt_cfg_lch_restrict_to_add_mod_list_r17; + cg_sdt_cfg_lch_restrict_to_release_list_r17_l_ cg_sdt_cfg_lch_restrict_to_release_list_r17; + setup_release_c cg_sdt_cfg_init_bwp_n_ul_r17; + setup_release_c cg_sdt_cfg_init_bwp_sul_r17; + bwp_dl_ded_sdt_r17_s cg_sdt_cfg_init_bwp_dl_r17; + time_align_timer_e cg_sdt_time_align_timer_r17; + uint8_t cg_sdt_rsrp_thres_ssb_r17 = 0; + setup_release_c cg_sdt_ta_validation_cfg_r17; + uint32_t cg_sdt_cs_rnti_r17 = 0; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1301,53 +749,47 @@ struct si_sched_info_v1700_s { void to_json(json_writer& j) const; }; -// SIB-TypeInfo ::= SEQUENCE -struct sib_type_info_s { - struct type_opts { - enum options { - sib_type2, - sib_type3, - sib_type4, - sib_type5, - sib_type6, - sib_type7, - sib_type8, - sib_type9, - sib_type10_v1610, - sib_type11_v1610, - sib_type12_v1610, - sib_type13_v1610, - sib_type14_v1610, - spare3, - spare2, - spare1, - // ... - nulltype - } value; +// SL-ConfigCommonNR-r16 ::= SEQUENCE +struct sl_cfg_common_nr_r16_s { + using sl_freq_info_list_r16_l_ = dyn_array; + using sl_radio_bearer_cfg_list_r16_l_ = dyn_array; + using sl_rlc_bearer_cfg_list_r16_l_ = dyn_array; + struct t400_r16_opts { + enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using t400_r16_e_ = enumerated; + struct sl_max_num_consecutive_dtx_r16_opts { + enum options { n1, n2, n3, n4, n6, n8, n16, n32, nulltype } value; typedef uint8_t number_type; const char* to_string() const; uint8_t to_number() const; }; - using type_e_ = enumerated; + using sl_max_num_consecutive_dtx_r16_e_ = enumerated; // member variables - bool value_tag_present = false; - bool area_scope_present = false; - type_e_ type; - uint8_t value_tag = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SIB1-v1740-IEs ::= SEQUENCE -struct sib1_v1740_ies_s { - bool si_sched_info_v1740_present = false; - bool non_crit_ext_present = false; - si_sched_info_v1740_s si_sched_info_v1740; + bool sl_ue_sel_cfg_r16_present = false; + bool sl_meas_cfg_common_r16_present = false; + bool sl_csi_acquisition_r16_present = false; + bool sl_offset_dfn_r16_present = false; + bool t400_r16_present = false; + bool sl_max_num_consecutive_dtx_r16_present = false; + bool sl_ssb_prio_nr_r16_present = false; + sl_freq_info_list_r16_l_ sl_freq_info_list_r16; + sl_ue_sel_cfg_r16_s sl_ue_sel_cfg_r16; + sl_nr_anchor_carrier_freq_list_r16_l sl_nr_anchor_carrier_freq_list_r16; + sl_eutra_anchor_carrier_freq_list_r16_l sl_eutra_anchor_carrier_freq_list_r16; + sl_radio_bearer_cfg_list_r16_l_ sl_radio_bearer_cfg_list_r16; + sl_rlc_bearer_cfg_list_r16_l_ sl_rlc_bearer_cfg_list_r16; + sl_meas_cfg_common_r16_s sl_meas_cfg_common_r16; + uint16_t sl_offset_dfn_r16 = 1; + t400_r16_e_ t400_r16; + sl_max_num_consecutive_dtx_r16_e_ sl_max_num_consecutive_dtx_r16; + uint8_t sl_ssb_prio_nr_r16 = 1; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1355,13 +797,10 @@ struct sib1_v1740_ies_s { void to_json(json_writer& j) const; }; -// UAC-BarringInfoSetList-v1700 ::= SEQUENCE (SIZE (1..8)) OF UAC-BarringInfoSet-v1700 -using uac_barr_info_set_list_v1700_l = dyn_array; - -// UAC-BarringPerCat ::= SEQUENCE -struct uac_barr_per_cat_s { - uint8_t access_category = 1; - uint8_t uac_barr_info_set_idx = 1; +// SL-DiscConfigCommon-r17 ::= SEQUENCE +struct sl_disc_cfg_common_r17_s { + sl_relay_ue_cfg_r17_s sl_relay_ue_cfg_common_r17; + sl_remote_ue_cfg_r17_s sl_remote_ue_cfg_common_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1369,192 +808,42 @@ struct uac_barr_per_cat_s { void to_json(json_writer& j) const; }; -// ApplicableDisasterInfo-r17 ::= CHOICE -struct applicable_disaster_info_r17_c { - using ded_plmns_r17_l_ = dyn_array; - struct types_opts { - enum options { no_disaster_roaming_r17, disaster_related_ind_r17, common_plmns_r17, ded_plmns_r17, nulltype } value; +// UE-TimersAndConstantsRemoteUE-r17 ::= SEQUENCE +struct ue_timers_and_consts_remote_ue_r17_s { + struct t300_remote_ue_r17_opts { + enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; + typedef uint16_t number_type; const char* to_string() const; + uint16_t to_number() const; }; - using types = enumerated; - - // choice methods - applicable_disaster_info_r17_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 - ded_plmns_r17_l_& ded_plmns_r17() - { - assert_choice_type(types::ded_plmns_r17, type_, "ApplicableDisasterInfo-r17"); - return c; - } - const ded_plmns_r17_l_& ded_plmns_r17() const - { - assert_choice_type(types::ded_plmns_r17, type_, "ApplicableDisasterInfo-r17"); - return c; - } - void set_no_disaster_roaming_r17(); - void set_disaster_related_ind_r17(); - void set_common_plmns_r17(); - ded_plmns_r17_l_& set_ded_plmns_r17(); - -private: - types type_; - ded_plmns_r17_l_ c; -}; - -// CFR-ConfigMCCH-MTCH-r17 ::= SEQUENCE -struct cfr_cfg_mcch_mtch_r17_s { - bool location_and_bw_broadcast_r17_present = false; - bool pdsch_cfg_mcch_r17_present = false; - bool common_coreset_ext_r17_present = false; - location_and_bw_broadcast_r17_c location_and_bw_broadcast_r17; - pdsch_cfg_broadcast_r17_s pdsch_cfg_mcch_r17; - coreset_s common_coreset_ext_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CarrierFreqListEUTRA ::= SEQUENCE (SIZE (1..8)) OF CarrierFreqEUTRA -using carrier_freq_list_eutra_l = dyn_array; - -// CarrierFreqListEUTRA-v1610 ::= SEQUENCE (SIZE (1..8)) OF CarrierFreqEUTRA-v1610 -using carrier_freq_list_eutra_v1610_l = dyn_array; - -// CarrierFreqListEUTRA-v1700 ::= SEQUENCE (SIZE (1..8)) OF CarrierFreqEUTRA-v1700 -using carrier_freq_list_eutra_v1700_l = dyn_array; - -// FreqPriorityListSlicing-r17 ::= SEQUENCE (SIZE (1..9)) OF FreqPrioritySlicing-r17 -using freq_prio_list_slicing_r17_l = dyn_array; - -// GIN-Element-r17 ::= SEQUENCE -struct gin_elem_r17_s { - using nid_list_r17_l_ = bounded_array, 24>; - - // member variables - plmn_id_s plmn_id_r17; - nid_list_r17_l_ nid_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// GINs-PerSNPN-r17 ::= SEQUENCE -struct gi_ns_per_sn_pn_r17_s { - bool supported_gi_ns_r17_present = false; - bounded_bitstring<1, 24> supported_gi_ns_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// HRNN-List-r16 ::= SEQUENCE (SIZE (1..12)) OF HRNN-r16 -using hrnn_list_r16_l = dyn_array; - -// InterFreqCarrierFreqList ::= SEQUENCE (SIZE (1..8)) OF InterFreqCarrierFreqInfo -using inter_freq_carrier_freq_list_l = dyn_array; - -// InterFreqCarrierFreqList-v1610 ::= SEQUENCE (SIZE (1..8)) OF InterFreqCarrierFreqInfo-v1610 -using inter_freq_carrier_freq_list_v1610_l = dyn_array; - -// InterFreqCarrierFreqList-v1700 ::= SEQUENCE (SIZE (1..8)) OF InterFreqCarrierFreqInfo-v1700 -using inter_freq_carrier_freq_list_v1700_l = dyn_array; - -// InterFreqCarrierFreqList-v1720 ::= SEQUENCE (SIZE (1..8)) OF InterFreqCarrierFreqInfo-v1720 -using inter_freq_carrier_freq_list_v1720_l = dyn_array; - -// InterFreqCarrierFreqList-v1730 ::= SEQUENCE (SIZE (1..8)) OF InterFreqCarrierFreqInfo-v1730 -using inter_freq_carrier_freq_list_v1730_l = dyn_array; - -// IntraFreqAllowedCellList-r16 ::= SEQUENCE (SIZE (1..16)) OF PCI-Range -using intra_freq_allowed_cell_list_r16_l = dyn_array; - -// IntraFreqCAG-CellListPerPLMN-r16 ::= SEQUENCE -struct intra_freq_cag_cell_list_per_plmn_r16_s { - using cag_cell_list_r16_l_ = dyn_array; - - // member variables - uint8_t plmn_id_idx_r16 = 1; - cag_cell_list_r16_l_ cag_cell_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// IntraFreqExcludedCellList ::= SEQUENCE (SIZE (1..16)) OF PCI-Range -using intra_freq_excluded_cell_list_l = dyn_array; - -// IntraFreqNeighCellList ::= SEQUENCE (SIZE (1..16)) OF IntraFreqNeighCellInfo -using intra_freq_neigh_cell_list_l = dyn_array; - -// IntraFreqNeighCellList-v1610 ::= SEQUENCE (SIZE (1..16)) OF IntraFreqNeighCellInfo-v1610 -using intra_freq_neigh_cell_list_v1610_l = dyn_array; - -// IntraFreqNeighCellList-v1710 ::= SEQUENCE (SIZE (1..16)) OF IntraFreqNeighCellInfo-v1710 -using intra_freq_neigh_cell_list_v1710_l = dyn_array; - -// IntraFreqNeighHSDN-CellList-r17 ::= SEQUENCE (SIZE (1..16)) OF PCI-Range -using intra_freq_neigh_hsdn_cell_list_r17_l = dyn_array; - -// MBS-FSAI-InterFreqList-r17 ::= SEQUENCE (SIZE (1..8)) OF MBS-FSAI-InterFreq-r17 -using mbs_fsai_inter_freq_list_r17_l = dyn_array; - -// MCCH-Config-r17 ::= SEQUENCE -struct mcch_cfg_r17_s { - struct mcch_win_dur_r17_opts { - enum options { sl2, sl4, sl8, sl10, sl20, sl40, sl80, sl160, nulltype } value; - typedef uint8_t number_type; + using t300_remote_ue_r17_e_ = enumerated; + struct t301_remote_ue_r17_opts { + enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; + typedef uint16_t number_type; const char* to_string() const; - uint8_t to_number() const; + uint16_t to_number() const; }; - using mcch_win_dur_r17_e_ = enumerated; - struct mcch_mod_period_r17_opts { - enum options { - rf2, - rf4, - rf8, - rf16, - rf32, - rf64, - rf128, - rf256, - rf512, - rf1024, - r2048, - rf4096, - rf8192, - rf16384, - rf32768, - rf65536, - nulltype - } value; - typedef uint32_t number_type; + using t301_remote_ue_r17_e_ = enumerated; + struct t319_remote_ue_r17_opts { + enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; + typedef uint16_t number_type; const char* to_string() const; - uint32_t to_number() const; + uint16_t to_number() const; }; - using mcch_mod_period_r17_e_ = enumerated; + using t319_remote_ue_r17_e_ = enumerated; // member variables - bool mcch_win_dur_r17_present = false; - mcch_repeat_period_and_offset_r17_c mcch_repeat_period_and_offset_r17; - uint8_t mcch_win_start_slot_r17 = 0; - mcch_win_dur_r17_e_ mcch_win_dur_r17; - mcch_mod_period_r17_e_ mcch_mod_period_r17; + bool ext = false; + bool t300_remote_ue_r17_present = false; + bool t301_remote_ue_r17_present = false; + bool t319_remote_ue_r17_present = false; + t300_remote_ue_r17_e_ t300_remote_ue_r17; + t301_remote_ue_r17_e_ t301_remote_ue_r17; + t319_remote_ue_r17_e_ t319_remote_ue_r17; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1562,16 +851,19 @@ struct mcch_cfg_r17_s { void to_json(json_writer& j) const; }; -// MeasIdleConfigSIB-r16 ::= SEQUENCE -struct meas_idle_cfg_sib_r16_s { - using meas_idle_carrier_list_nr_r16_l_ = dyn_array; - using meas_idle_carrier_list_eutra_r16_l_ = dyn_array; - - // member variables - bool ext = false; - meas_idle_carrier_list_nr_r16_l_ meas_idle_carrier_list_nr_r16; - meas_idle_carrier_list_eutra_r16_l_ meas_idle_carrier_list_eutra_r16; +// SIB12-IEs-r16 ::= SEQUENCE +struct sib12_ies_r16_s { + bool ext = false; + sl_cfg_common_nr_r16_s sl_cfg_common_nr_r16; + dyn_octstring late_non_crit_ext; // ... + // group 0 + bool sl_l2_u2_n_relay_r17_present = false; + bool sl_non_relay_discovery_r17_present = false; + bool sl_l3_u2_n_relay_discovery_r17_present = false; + copy_ptr sl_drx_cfg_common_gc_bc_r17; + copy_ptr sl_disc_cfg_common_r17; + copy_ptr sl_timers_and_consts_remote_ue_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1579,64 +871,177 @@ struct meas_idle_cfg_sib_r16_s { void to_json(json_writer& j) const; }; -// MobilityStateParameters ::= SEQUENCE -struct mob_state_params_s { - struct t_eval_opts { - enum options { s30, s60, s120, s180, s240, spare3, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using t_eval_e_ = enumerated; - struct t_hyst_normal_opts { - enum options { s30, s60, s120, s180, s240, spare3, spare2, spare1, nulltype } value; - typedef uint8_t number_type; +// TRS-ResourceSet-r17 ::= SEQUENCE +struct trs_res_set_r17_s { + struct pwr_ctrl_offset_ss_r17_opts { + enum options { db_neg3, db0, db3, db6, nulltype } value; + typedef int8_t number_type; const char* to_string() const; - uint8_t to_number() const; + int8_t to_number() const; }; - using t_hyst_normal_e_ = enumerated; + using pwr_ctrl_offset_ss_r17_e_ = enumerated; + struct scrambling_id_info_r17_c_ { + using scrambling_id_per_res_list_with2_r17_l_ = std::array; + using scrambling_id_per_res_list_with4_r17_l_ = std::array; + struct types_opts { + enum options { + scrambling_id_for_common_r17, + scrambling_id_per_res_list_with2_r17, + scrambling_id_per_res_list_with4_r17, + // ... + nulltype + } value; + typedef uint8_t number_type; - // member variables - t_eval_e_ t_eval; - t_hyst_normal_e_ t_hyst_normal; - uint8_t n_cell_change_medium = 1; - uint8_t n_cell_change_high = 1; + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; + // choice methods + scrambling_id_info_r17_c_() = default; + scrambling_id_info_r17_c_(const scrambling_id_info_r17_c_& other); + scrambling_id_info_r17_c_& operator=(const scrambling_id_info_r17_c_& other); + ~scrambling_id_info_r17_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& scrambling_id_for_common_r17() + { + assert_choice_type(types::scrambling_id_for_common_r17, type_, "scramblingID-Info-r17"); + return c.get(); + } + scrambling_id_per_res_list_with2_r17_l_& scrambling_id_per_res_list_with2_r17() + { + assert_choice_type(types::scrambling_id_per_res_list_with2_r17, type_, "scramblingID-Info-r17"); + return c.get(); + } + scrambling_id_per_res_list_with4_r17_l_& scrambling_id_per_res_list_with4_r17() + { + assert_choice_type(types::scrambling_id_per_res_list_with4_r17, type_, "scramblingID-Info-r17"); + return c.get(); + } + const uint16_t& scrambling_id_for_common_r17() const + { + assert_choice_type(types::scrambling_id_for_common_r17, type_, "scramblingID-Info-r17"); + return c.get(); + } + const scrambling_id_per_res_list_with2_r17_l_& scrambling_id_per_res_list_with2_r17() const + { + assert_choice_type(types::scrambling_id_per_res_list_with2_r17, type_, "scramblingID-Info-r17"); + return c.get(); + } + const scrambling_id_per_res_list_with4_r17_l_& scrambling_id_per_res_list_with4_r17() const + { + assert_choice_type(types::scrambling_id_per_res_list_with4_r17, type_, "scramblingID-Info-r17"); + return c.get(); + } + uint16_t& set_scrambling_id_for_common_r17(); + scrambling_id_per_res_list_with2_r17_l_& set_scrambling_id_per_res_list_with2_r17(); + scrambling_id_per_res_list_with4_r17_l_& set_scrambling_id_per_res_list_with4_r17(); -// NTN-NeighCellConfigList-r17 ::= SEQUENCE (SIZE (1..4)) OF NTN-NeighCellConfig-r17 -using ntn_neigh_cell_cfg_list_r17_l = dyn_array; + private: + types type_; + choice_buffer_t c; -// PosSchedulingInfo-r16 ::= SEQUENCE -struct pos_sched_info_r16_s { - struct pos_si_periodicity_r16_opts { - enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, nulltype } value; - typedef uint16_t number_type; + void destroy_(); + }; + struct periodicity_and_offset_r17_c_ { + struct types_opts { + enum options { slots10, slots20, slots40, slots80, nulltype } value; + typedef uint8_t number_type; - const char* to_string() const; - uint16_t to_number() const; + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + periodicity_and_offset_r17_c_() = default; + periodicity_and_offset_r17_c_(const periodicity_and_offset_r17_c_& other); + periodicity_and_offset_r17_c_& operator=(const periodicity_and_offset_r17_c_& other); + ~periodicity_and_offset_r17_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& slots10() + { + assert_choice_type(types::slots10, type_, "periodicityAndOffset-r17"); + return c.get(); + } + uint8_t& slots20() + { + assert_choice_type(types::slots20, type_, "periodicityAndOffset-r17"); + return c.get(); + } + uint8_t& slots40() + { + assert_choice_type(types::slots40, type_, "periodicityAndOffset-r17"); + return c.get(); + } + uint8_t& slots80() + { + assert_choice_type(types::slots80, type_, "periodicityAndOffset-r17"); + return c.get(); + } + const uint8_t& slots10() const + { + assert_choice_type(types::slots10, type_, "periodicityAndOffset-r17"); + return c.get(); + } + const uint8_t& slots20() const + { + assert_choice_type(types::slots20, type_, "periodicityAndOffset-r17"); + return c.get(); + } + const uint8_t& slots40() const + { + assert_choice_type(types::slots40, type_, "periodicityAndOffset-r17"); + return c.get(); + } + const uint8_t& slots80() const + { + assert_choice_type(types::slots80, type_, "periodicityAndOffset-r17"); + return c.get(); + } + uint8_t& set_slots10(); + uint8_t& set_slots20(); + uint8_t& set_slots40(); + uint8_t& set_slots80(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); }; - using pos_si_periodicity_r16_e_ = enumerated; - struct pos_si_broadcast_status_r16_opts { - enum options { broadcasting, not_broadcasting, nulltype } value; + struct nrof_res_r17_opts { + enum options { n2, n4, nulltype } value; + typedef uint8_t number_type; const char* to_string() const; + uint8_t to_number() const; }; - using pos_si_broadcast_status_r16_e_ = enumerated; + using nrof_res_r17_e_ = enumerated; // member variables - bool ext = false; - bool offset_to_si_used_r16_present = false; - pos_si_periodicity_r16_e_ pos_si_periodicity_r16; - pos_si_broadcast_status_r16_e_ pos_si_broadcast_status_r16; - pos_sib_map_info_r16_l pos_sib_map_info_r16; - // ... + pwr_ctrl_offset_ss_r17_e_ pwr_ctrl_offset_ss_r17; + scrambling_id_info_r17_c_ scrambling_id_info_r17; + uint8_t first_ofdm_symbol_in_time_domain_r17 = 0; + uint16_t start_rb_r17 = 0; + uint16_t nrof_rbs_r17 = 24; + uint8_t ssb_idx_r17 = 0; + periodicity_and_offset_r17_c_ periodicity_and_offset_r17; + fixed_bitstring<4> freq_domain_alloc_r17; + uint8_t ind_bit_id_r17 = 0; + nrof_res_r17_e_ nrof_res_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1644,62 +1049,43 @@ struct pos_sched_info_r16_s { void to_json(json_writer& j) const; }; -// RangeToBestCell ::= Q-OffsetRange -using range_to_best_cell_e = q_offset_range_e; - -// SIB-Mapping ::= SEQUENCE (SIZE (1..32)) OF SIB-TypeInfo -using sib_map_l = dyn_array; - -// SIB1-v1700-IEs ::= SEQUENCE -struct sib1_v1700_ies_s { - struct uac_barr_info_v1700_s_ { - uac_barr_info_set_list_v1700_l uac_barr_info_set_list_v1700; - }; - struct feature_priorities_r17_s_ { - bool red_cap_prio_r17_present = false; - bool slicing_prio_r17_present = false; - bool msg3_repeats_prio_r17_present = false; - bool sdt_prio_r17_present = false; - uint8_t red_cap_prio_r17 = 0; - uint8_t slicing_prio_r17 = 0; - uint8_t msg3_repeats_prio_r17 = 0; - uint8_t sdt_prio_r17 = 0; - }; - struct intra_freq_resel_red_cap_r17_opts { - enum options { allowed, not_allowed, nulltype } value; - - const char* to_string() const; - }; - using intra_freq_resel_red_cap_r17_e_ = enumerated; - struct cell_barred_ntn_r17_opts { - enum options { barred, not_barred, nulltype } value; +// SIB17-IEs-r17 ::= SEQUENCE +struct sib17_ies_r17_s { + using trs_res_set_cfg_r17_l_ = dyn_array; + struct validity_dur_r17_opts { + enum options { + t1, + t2, + t4, + t8, + t16, + t32, + t64, + t128, + t256, + t512, + infinity, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef int16_t number_type; const char* to_string() const; + int16_t to_number() const; }; - using cell_barred_ntn_r17_e_ = enumerated; + using validity_dur_r17_e_ = enumerated; // member variables - bool hsdn_cell_r17_present = false; - bool uac_barr_info_v1700_present = false; - bool sdt_cfg_common_r17_present = false; - bool red_cap_cfg_common_r17_present = false; - bool feature_priorities_r17_present = false; - bool si_sched_info_v1700_present = false; - bool hyper_sfn_r17_present = false; - bool edrx_allowed_idle_r17_present = false; - bool edrx_allowed_inactive_r17_present = false; - bool intra_freq_resel_red_cap_r17_present = false; - bool cell_barred_ntn_r17_present = false; - bool non_crit_ext_present = false; - uac_barr_info_v1700_s_ uac_barr_info_v1700; - sdt_cfg_common_sib_r17_s sdt_cfg_common_r17; - red_cap_cfg_common_sib_r17_s red_cap_cfg_common_r17; - feature_priorities_r17_s_ feature_priorities_r17; - si_sched_info_v1700_s si_sched_info_v1700; - fixed_bitstring<10> hyper_sfn_r17; - intra_freq_resel_red_cap_r17_e_ intra_freq_resel_red_cap_r17; - cell_barred_ntn_r17_e_ cell_barred_ntn_r17; - sib1_v1740_ies_s non_crit_ext; + bool ext = false; + bool validity_dur_r17_present = false; + trs_res_set_cfg_r17_l_ trs_res_set_cfg_r17; + validity_dur_r17_e_ validity_dur_r17; + dyn_octstring late_non_crit_ext; + // ... // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1707,31 +1093,10 @@ struct sib1_v1700_ies_s { void to_json(json_writer& j) const; }; -// UAC-AC1-SelectAssistInfo-r16 ::= ENUMERATED -struct uac_ac1_select_assist_info_r16_opts { - enum options { a, b, c, not_cfg, nulltype } value; - - const char* to_string() const; -}; -using uac_ac1_select_assist_info_r16_e = enumerated; - -// UAC-BarringPerCatList ::= SEQUENCE (SIZE (1..63)) OF UAC-BarringPerCat -using uac_barr_per_cat_list_l = dyn_array; - -// PosSI-SchedulingInfo-r16 ::= SEQUENCE -struct pos_si_sched_info_r16_s { - using pos_sched_info_list_r16_l_ = dyn_array; - - // member variables - bool ext = false; - bool pos_si_request_cfg_r16_present = false; - bool pos_si_request_cfg_sul_r16_present = false; - pos_sched_info_list_r16_l_ pos_sched_info_list_r16; - si_request_cfg_s pos_si_request_cfg_r16; - si_request_cfg_s pos_si_request_cfg_sul_r16; - // ... - // group 0 - copy_ptr pos_si_request_cfg_red_cap_r17; +// SL-ServingCellInfo-r17 ::= SEQUENCE +struct sl_serving_cell_info_r17_s { + uint16_t sl_pci_r17 = 0; + uint32_t sl_carrier_freq_nr_r17 = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1739,20 +1104,18 @@ struct pos_si_sched_info_r16_s { void to_json(json_writer& j) const; }; -// SIB1-v1630-IEs ::= SEQUENCE -struct sib1_v1630_ies_s { - struct uac_barr_info_v1630_s_ { - using uac_ac1_select_assist_info_r16_l_ = bounded_array; - - // member variables - uac_ac1_select_assist_info_r16_l_ uac_ac1_select_assist_info_r16; - }; +// SRS-PosConfig-r17 ::= SEQUENCE +struct srs_pos_cfg_r17_s { + using srs_pos_res_set_to_release_list_r17_l_ = bounded_array; + using srs_pos_res_set_to_add_mod_list_r17_l_ = dyn_array; + using srs_pos_res_to_release_list_r17_l_ = dyn_array; + using srs_pos_res_to_add_mod_list_r17_l_ = dyn_array; // member variables - bool uac_barr_info_v1630_present = false; - bool non_crit_ext_present = false; - uac_barr_info_v1630_s_ uac_barr_info_v1630; - sib1_v1700_ies_s non_crit_ext; + srs_pos_res_set_to_release_list_r17_l_ srs_pos_res_set_to_release_list_r17; + srs_pos_res_set_to_add_mod_list_r17_l_ srs_pos_res_set_to_add_mod_list_r17; + srs_pos_res_to_release_list_r17_l_ srs_pos_res_to_release_list_r17; + srs_pos_res_to_add_mod_list_r17_l_ srs_pos_res_to_add_mod_list_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1760,12 +1123,48 @@ struct sib1_v1630_ies_s { void to_json(json_writer& j) const; }; -// SIB10-r16 ::= SEQUENCE -struct sib10_r16_s { - bool ext = false; - hrnn_list_r16_l hrnn_list_r16; - dyn_octstring late_non_crit_ext; - // ... +// RSRP-ChangeThreshold-r17 ::= ENUMERATED +struct rsrp_change_thres_r17_opts { + enum options { + db4, + db6, + db8, + db10, + db14, + db18, + db22, + db26, + db30, + db34, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; +}; +using rsrp_change_thres_r17_e = enumerated; + +// SRS-PosRRC-InactiveConfig-r17 ::= SEQUENCE +struct srs_pos_rrc_inactive_cfg_r17_s { + bool srs_pos_cfg_n_ul_r17_present = false; + bool srs_pos_cfg_sul_r17_present = false; + bool bwp_n_ul_r17_present = false; + bool bwp_sul_r17_present = false; + bool inactive_pos_srs_time_align_timer_r17_present = false; + bool inactive_pos_srs_rsrp_change_thres_r17_present = false; + srs_pos_cfg_r17_s srs_pos_cfg_n_ul_r17; + srs_pos_cfg_r17_s srs_pos_cfg_sul_r17; + bwp_s bwp_n_ul_r17; + bwp_s bwp_sul_r17; + time_align_timer_e inactive_pos_srs_time_align_timer_r17; + rsrp_change_thres_r17_e inactive_pos_srs_rsrp_change_thres_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1773,33 +1172,33 @@ struct sib10_r16_s { void to_json(json_writer& j) const; }; -// SIB11-r16 ::= SEQUENCE -struct sib11_r16_s { - bool ext = false; - bool meas_idle_cfg_sib_r16_present = false; - meas_idle_cfg_sib_r16_s meas_idle_cfg_sib_r16; - 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; -}; - -// SIB12-r16 ::= SEQUENCE -struct sib12_r16_s { - struct segment_type_r16_opts { - enum options { not_last_segment, last_segment, nulltype } value; - - const char* to_string() 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; + }; + struct codebook_type_request_r16_s_ { + bool type1_single_panel_r16_present = false; + bool type1_multi_panel_r16_present = false; + bool type2_r16_present = false; + bool type2_port_sel_r16_present = false; }; - using segment_type_r16_e_ = enumerated; + using requested_cell_grouping_r16_l_ = dyn_array; // member variables - uint8_t segment_num_r16 = 0; - segment_type_r16_e_ segment_type_r16; - dyn_octstring segment_container_r16; + bool ext = false; + bool mrdc_request_present = false; + mrdc_request_s_ mrdc_request; + // ... + // group 0 + bool ul_tx_switch_request_r16_present = false; + copy_ptr codebook_type_request_r16; + // group 1 + copy_ptr requested_cell_grouping_r16; + // group 2 + bool fallback_group_five_request_r17_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1807,14 +1206,10 @@ struct sib12_r16_s { void to_json(json_writer& j) const; }; -// SIB13-r16 ::= SEQUENCE -struct sib13_r16_s { - bool ext = false; - dyn_octstring sl_v2x_cfg_common_r16; - dyn_octstring dummy; - dyn_octstring tdd_cfg_r16; - dyn_octstring late_non_crit_ext; - // ... +// UE-CapabilityRequestFilterNR-v1710 ::= SEQUENCE +struct ue_cap_request_filt_nr_v1710_s { + bool sidelink_request_r17_present = false; + bool non_crit_ext_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1822,12 +1217,11 @@ struct sib13_r16_s { void to_json(json_writer& j) const; }; -// SIB14-r16 ::= SEQUENCE -struct sib14_r16_s { - bool ext = false; - dyn_octstring sl_v2x_cfg_common_ext_r16; - dyn_octstring late_non_crit_ext; - // ... +// UE-CapabilityRequestFilterNR-v1540 ::= SEQUENCE +struct ue_cap_request_filt_nr_v1540_s { + bool srs_switching_time_request_present = false; + bool non_crit_ext_present = false; + ue_cap_request_filt_nr_v1710_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1835,17 +1229,11 @@ struct sib14_r16_s { void to_json(json_writer& j) const; }; -// SIB15-r17 ::= SEQUENCE -struct sib15_r17_s { - using common_plmns_with_disaster_condition_r17_l_ = dyn_array; - using applicable_disaster_info_list_r17_l_ = dyn_array; - - // member variables - bool ext = false; - common_plmns_with_disaster_condition_r17_l_ common_plmns_with_disaster_condition_r17; - applicable_disaster_info_list_r17_l_ applicable_disaster_info_list_r17; - dyn_octstring late_non_crit_ext; - // ... +// UE-CapabilityRequestFilterNR ::= SEQUENCE +struct ue_cap_request_filt_nr_s { + bool non_crit_ext_present = false; + freq_band_list_l freq_band_list_filt; + ue_cap_request_filt_nr_v1540_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1853,12 +1241,11 @@ struct sib15_r17_s { void to_json(json_writer& j) const; }; -// SIB16-r17 ::= SEQUENCE -struct sib16_r17_s { - bool ext = false; - freq_prio_list_slicing_r17_l freq_prio_list_slicing_r17; - dyn_octstring late_non_crit_ext; - // ... +// UE-NR-Capability-v16c0 ::= SEQUENCE +struct ue_nr_cap_v16c0_s { + bool rf_params_v16c0_present = false; + bool non_crit_ext_present = false; + rf_params_v16c0_s rf_params_v16c0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1866,19 +1253,14 @@ struct sib16_r17_s { void to_json(json_writer& j) const; }; -// SIB17-r17 ::= SEQUENCE -struct sib17_r17_s { - struct segment_type_r17_opts { - enum options { not_last_segment, last_segment, nulltype } value; - - const char* to_string() const; - }; - using segment_type_r17_e_ = enumerated; - - // member variables - uint8_t segment_num_r17 = 0; - segment_type_r17_e_ segment_type_r17; - dyn_octstring segment_container_r17; +// UE-NR-Capability-v16a0 ::= SEQUENCE +struct ue_nr_cap_v16a0_s { + bool phy_params_v16a0_present = false; + bool rf_params_v16a0_present = false; + bool non_crit_ext_present = false; + phy_params_v16a0_s phy_params_v16a0; + rf_params_v16a0_s rf_params_v16a0; + ue_nr_cap_v16c0_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1886,17 +1268,11 @@ struct sib17_r17_s { void to_json(json_writer& j) const; }; -// SIB18-r17 ::= SEQUENCE -struct sib18_r17_s { - using gin_elem_list_r17_l_ = dyn_array; - using gins_per_sn_pn_list_r17_l_ = dyn_array; - - // member variables - bool ext = false; - gin_elem_list_r17_l_ gin_elem_list_r17; - gins_per_sn_pn_list_r17_l_ gins_per_sn_pn_list_r17; - dyn_octstring late_non_crit_ext; - // ... +// UE-NR-Capability-v15j0 ::= SEQUENCE +struct ue_nr_cap_v15j0_s { + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + ue_nr_cap_v16a0_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1904,21 +1280,10 @@ struct sib18_r17_s { void to_json(json_writer& j) const; }; -// SIB19-r17 ::= SEQUENCE -struct sib19_r17_s { - bool ext = false; - bool ntn_cfg_r17_present = false; - bool t_service_r17_present = false; - bool distance_thresh_r17_present = false; - ntn_cfg_r17_s ntn_cfg_r17; - uint64_t t_service_r17 = 0; - dyn_octstring ref_location_r17; - uint16_t distance_thresh_r17 = 0; - ntn_neigh_cell_cfg_list_r17_l ntn_neigh_cell_cfg_list_r17; - dyn_octstring late_non_crit_ext; - // ... - // group 0 - copy_ptr ntn_neigh_cell_cfg_list_ext_v1720; +// NRDC-Parameters-v15c0 ::= SEQUENCE +struct nrdc_params_v15c0_s { + bool pdcp_dupl_split_srb_present = false; + bool pdcp_dupl_split_drb_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1926,252 +1291,12 @@ struct sib19_r17_s { void to_json(json_writer& j) const; }; -// SIB2 ::= SEQUENCE -struct sib2_s { - struct cell_resel_info_common_s_ { - struct q_hyst_opts { - enum options { - db0, - db1, - db2, - db3, - db4, - db5, - db6, - db8, - db10, - db12, - db14, - db16, - db18, - db20, - db22, - db24, - nulltype - } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using q_hyst_e_ = enumerated; - struct speed_state_resel_pars_s_ { - struct q_hyst_sf_s_ { - struct sf_medium_opts { - enum options { db_neg6, db_neg4, db_neg2, db0, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using sf_medium_e_ = enumerated; - struct sf_high_opts { - enum options { db_neg6, db_neg4, db_neg2, db0, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using sf_high_e_ = enumerated; - - // member variables - sf_medium_e_ sf_medium; - sf_high_e_ sf_high; - }; - - // member variables - mob_state_params_s mob_state_params; - q_hyst_sf_s_ q_hyst_sf; - }; - - // member variables - bool ext = false; - bool nrof_ss_blocks_to_average_present = false; - bool abs_thresh_ss_blocks_consolidation_present = false; - bool range_to_best_cell_present = false; - bool speed_state_resel_pars_present = false; - uint8_t nrof_ss_blocks_to_average = 2; - thres_nr_s abs_thresh_ss_blocks_consolidation; - range_to_best_cell_e range_to_best_cell; - q_hyst_e_ q_hyst; - speed_state_resel_pars_s_ speed_state_resel_pars; - // ... - }; - struct cell_resel_serving_freq_info_s_ { - bool ext = false; - bool s_non_intra_search_p_present = false; - bool s_non_intra_search_q_present = false; - bool thresh_serving_low_q_present = false; - bool cell_resel_sub_prio_present = false; - uint8_t s_non_intra_search_p = 0; - uint8_t s_non_intra_search_q = 0; - uint8_t thresh_serving_low_p = 0; - uint8_t thresh_serving_low_q = 0; - uint8_t cell_resel_prio = 0; - cell_resel_sub_prio_e cell_resel_sub_prio; - // ... - }; - struct intra_freq_cell_resel_info_s_ { - bool ext = false; - bool q_rx_lev_min_sul_present = false; - bool q_qual_min_present = false; - bool s_intra_search_q_present = false; - bool p_max_present = false; - bool smtc_present = false; - bool ss_rssi_meas_present = false; - bool ssb_to_measure_present = false; - int8_t q_rx_lev_min = -70; - int8_t q_rx_lev_min_sul = -70; - int8_t q_qual_min = -43; - uint8_t s_intra_search_p = 0; - uint8_t s_intra_search_q = 0; - uint8_t t_resel_nr = 0; - multi_freq_band_list_nr_sib_l freq_band_list; - multi_freq_band_list_nr_sib_l freq_band_list_sul; - int8_t p_max = -30; - ssb_mtc_s smtc; - ss_rssi_meas_s ss_rssi_meas; - ssb_to_measure_c ssb_to_measure; - bool derive_ssb_idx_from_cell = false; - // ... - // group 0 - copy_ptr t_resel_nr_sf; - // group 1 - bool ssb_position_qcl_common_r16_present = false; - copy_ptr smtc2_lp_r16; - ssb_position_qcl_relation_r16_e ssb_position_qcl_common_r16; - // group 2 - bool ssb_position_qcl_common_r17_present = false; - ssb_position_qcl_relation_r17_e ssb_position_qcl_common_r17; - // group 3 - copy_ptr smtc4list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - }; - struct relaxed_meas_r16_s_ { - struct low_mob_eval_r16_s_ { - struct s_search_delta_p_r16_opts { - enum options { db3, db6, db9, db12, db15, spare3, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using s_search_delta_p_r16_e_ = enumerated; - struct t_search_delta_p_r16_opts { - enum options { - s5, - s10, - s20, - s30, - s60, - s120, - s180, - s240, - s300, - spare7, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t_search_delta_p_r16_e_ = enumerated; - - // member variables - s_search_delta_p_r16_e_ s_search_delta_p_r16; - t_search_delta_p_r16_e_ t_search_delta_p_r16; - }; - struct cell_edge_eval_r16_s_ { - bool s_search_thres_q_r16_present = false; - uint8_t s_search_thres_p_r16 = 0; - uint8_t s_search_thres_q_r16 = 0; - }; - - // member variables - bool low_mob_eval_r16_present = false; - bool cell_edge_eval_r16_present = false; - bool combine_relaxed_meas_condition_r16_present = false; - bool high_prio_meas_relax_r16_present = false; - low_mob_eval_r16_s_ low_mob_eval_r16; - cell_edge_eval_r16_s_ cell_edge_eval_r16; - }; - struct relaxed_meas_r17_s_ { - struct stationary_mob_eval_r17_s_ { - struct s_search_delta_p_stationary_r17_opts { - enum options { db2, db3, db6, db9, db12, db15, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using s_search_delta_p_stationary_r17_e_ = enumerated; - struct t_search_delta_p_stationary_r17_opts { - enum options { - s5, - s10, - s20, - s30, - s60, - s120, - s180, - s240, - s300, - spare7, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t_search_delta_p_stationary_r17_e_ = enumerated; - - // member variables - s_search_delta_p_stationary_r17_e_ s_search_delta_p_stationary_r17; - t_search_delta_p_stationary_r17_e_ t_search_delta_p_stationary_r17; - }; - struct cell_edge_eval_while_stationary_r17_s_ { - bool s_search_thres_q2_r17_present = false; - uint8_t s_search_thres_p2_r17 = 0; - uint8_t s_search_thres_q2_r17 = 0; - }; - - // member variables - bool cell_edge_eval_while_stationary_r17_present = false; - bool combine_relaxed_meas_condition2_r17_present = false; - stationary_mob_eval_r17_s_ stationary_mob_eval_r17; - cell_edge_eval_while_stationary_r17_s_ cell_edge_eval_while_stationary_r17; - }; - - // member variables - bool ext = false; - cell_resel_info_common_s_ cell_resel_info_common; - cell_resel_serving_freq_info_s_ cell_resel_serving_freq_info; - intra_freq_cell_resel_info_s_ intra_freq_cell_resel_info; - // ... - // group 0 - copy_ptr relaxed_meas_r16; - // group 1 - bool cell_equivalent_size_r17_present = false; - uint8_t cell_equivalent_size_r17 = 2; - copy_ptr relaxed_meas_r17; +// UE-NR-Capability-v15g0 ::= SEQUENCE +struct ue_nr_cap_v15g0_s { + bool rf_params_v15g0_present = false; + bool non_crit_ext_present = false; + rf_params_v15g0_s rf_params_v15g0; + ue_nr_cap_v15j0_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -2179,14 +1304,13 @@ struct sib2_s { void to_json(json_writer& j) const; }; -// SIB20-r17 ::= SEQUENCE -struct sib20_r17_s { - bool ext = false; - bool cfr_cfg_mcch_mtch_r17_present = false; - mcch_cfg_r17_s mcch_cfg_r17; - cfr_cfg_mcch_mtch_r17_s cfr_cfg_mcch_mtch_r17; - dyn_octstring late_non_crit_ext; - // ... +// UE-NR-Capability-v15c0 ::= SEQUENCE +struct ue_nr_cap_v15c0_s { + bool nrdc_params_v15c0_present = false; + bool partial_fr2_fallback_rx_req_present = false; + bool non_crit_ext_present = false; + nrdc_params_v15c0_s nrdc_params_v15c0; + ue_nr_cap_v15g0_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -2194,13 +1318,10 @@ struct sib20_r17_s { void to_json(json_writer& j) const; }; -// SIB21-r17 ::= SEQUENCE -struct sib21_r17_s { - bool ext = false; - mbs_fsai_list_r17_l mbs_fsai_intra_freq_r17; - mbs_fsai_inter_freq_list_r17_l mbs_fsai_inter_freq_list_r17; - dyn_octstring late_non_crit_ext; - // ... +// UECapabilityEnquiry-v1610-IEs ::= SEQUENCE +struct ue_cap_enquiry_v1610_ies_s { + bool rrc_seg_allowed_r16_present = false; + bool non_crit_ext_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -2208,25 +1329,12 @@ struct sib21_r17_s { void to_json(json_writer& j) const; }; -// SIB3 ::= SEQUENCE -struct sib3_s { - using intra_freq_cag_cell_list_r16_l_ = dyn_array; - - // member variables - bool ext = false; - intra_freq_neigh_cell_list_l intra_freq_neigh_cell_list; - intra_freq_excluded_cell_list_l intra_freq_excluded_cell_list; - dyn_octstring late_non_crit_ext; - // ... - // group 0 - copy_ptr intra_freq_neigh_cell_list_v1610; - copy_ptr intra_freq_allowed_cell_list_r16; - copy_ptr intra_freq_cag_cell_list_r16; - // group 1 - copy_ptr intra_freq_neigh_hsdn_cell_list_r17; - copy_ptr intra_freq_neigh_cell_list_v1710; - // group 2 - bool ch_access_mode2_r17_present = false; +// 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; + ue_cap_enquiry_v1610_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -2234,20 +1342,19 @@ struct sib3_s { void to_json(json_writer& j) const; }; -// SIB4 ::= SEQUENCE -struct sib4_s { - bool ext = false; - inter_freq_carrier_freq_list_l inter_freq_carrier_freq_list; - dyn_octstring late_non_crit_ext; +// AS-Config ::= SEQUENCE +struct as_cfg_s { + bool ext = false; + dyn_octstring rrc_recfg; // ... // group 0 - copy_ptr inter_freq_carrier_freq_list_v1610; + dyn_octstring source_rb_sn_cfg; + dyn_octstring source_scg_nr_cfg; + dyn_octstring source_scg_eutra_cfg; // group 1 - copy_ptr inter_freq_carrier_freq_list_v1700; + bool source_scg_cfg_present = false; // group 2 - copy_ptr inter_freq_carrier_freq_list_v1720; - // group 3 - copy_ptr inter_freq_carrier_freq_list_v1730; + copy_ptr sdt_cfg_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -2255,20 +1362,11 @@ struct sib4_s { void to_json(json_writer& j) const; }; -// SIB5 ::= SEQUENCE -struct sib5_s { - bool ext = false; - bool t_resel_eutra_sf_present = false; - carrier_freq_list_eutra_l carrier_freq_list_eutra; - uint8_t t_resel_eutra = 0; - speed_state_scale_factors_s t_resel_eutra_sf; - dyn_octstring late_non_crit_ext; - // ... - // group 0 - copy_ptr carrier_freq_list_eutra_v1610; - // group 1 - bool idle_mode_meas_voice_fallback_r17_present = false; - copy_ptr carrier_freq_list_eutra_v1700; +// ReestabNCellInfo ::= SEQUENCE +struct reestab_ncell_info_s { + fixed_bitstring<36> cell_id; + fixed_bitstring<256> key_g_node_b_star; + fixed_bitstring<16> short_mac_i; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -2276,14 +1374,13 @@ struct sib5_s { void to_json(json_writer& j) const; }; -// SIB6 ::= SEQUENCE -struct sib6_s { - bool ext = false; - fixed_bitstring<16> msg_id; - fixed_bitstring<16> serial_num; - fixed_octstring<2> warning_type; - dyn_octstring late_non_crit_ext; - // ... +// ReestabNCellInfoList ::= SEQUENCE (SIZE (1..32)) OF ReestabNCellInfo +using reestab_ncell_info_list_l = dyn_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; @@ -2291,26 +1388,27 @@ struct sib6_s { void to_json(json_writer& j) const; }; -// SIB7 ::= SEQUENCE -struct sib7_s { - struct warning_msg_segment_type_opts { - enum options { not_last_segment, last_segment, nulltype } value; +// ConfigRestrictInfoDAPS-r16 ::= SEQUENCE +struct cfg_restrict_info_daps_r16_s { + struct pwr_coordination_r16_s_ { + struct ul_pwr_sharing_daps_mode_r16_opts { + enum options { semi_static_mode1, semi_static_mode2, dyn, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ul_pwr_sharing_daps_mode_r16_e_ = enumerated; - const char* to_string() const; + // member variables + int8_t p_daps_source_r16 = -30; + int8_t p_daps_target_r16 = -30; + ul_pwr_sharing_daps_mode_r16_e_ ul_pwr_sharing_daps_mode_r16; }; - using warning_msg_segment_type_e_ = enumerated; // member variables - bool ext = false; - bool data_coding_scheme_present = false; - fixed_bitstring<16> msg_id; - fixed_bitstring<16> serial_num; - warning_msg_segment_type_e_ warning_msg_segment_type; - uint8_t warning_msg_segment_num = 0; - dyn_octstring warning_msg_segment; - fixed_octstring<1> data_coding_scheme; - dyn_octstring late_non_crit_ext; - // ... + bool pwr_coordination_r16_present = false; + pwr_coordination_r16_s_ pwr_coordination_r16; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -2318,27 +1416,22 @@ struct sib7_s { void to_json(json_writer& j) const; }; -// SIB8 ::= SEQUENCE -struct sib8_s { - struct warning_msg_segment_type_opts { - enum options { not_last_segment, last_segment, nulltype } value; +// ConfigRestrictInfoDAPS-v1640 ::= SEQUENCE +struct cfg_restrict_info_daps_v1640_s { + uint16_t source_feature_set_per_dl_cc_r16 = 1; + uint16_t source_feature_set_per_ul_cc_r16 = 1; - const char* to_string() const; - }; - using warning_msg_segment_type_e_ = enumerated; + // 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 data_coding_scheme_present = false; - fixed_bitstring<16> msg_id; - fixed_bitstring<16> serial_num; - warning_msg_segment_type_e_ warning_msg_segment_type; - uint8_t warning_msg_segment_num = 0; - dyn_octstring warning_msg_segment; - fixed_octstring<1> data_coding_scheme; - dyn_octstring warning_area_coordinates_segment; - dyn_octstring late_non_crit_ext; - // ... +// ReestablishmentInfo ::= SEQUENCE +struct reest_info_s { + uint16_t source_pci = 0; + fixed_bitstring<16> target_cell_short_mac_i; + reestab_ncell_info_list_l add_reestab_info_list; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -2346,4386 +1439,33 @@ struct sib8_s { void to_json(json_writer& j) const; }; -// SIB9 ::= SEQUENCE -struct sib9_s { - struct time_info_s_ { - bool day_light_saving_time_present = false; - bool leap_seconds_present = false; - bool local_time_offset_present = false; - uint64_t time_info_utc = 0; - fixed_bitstring<2> day_light_saving_time; - int16_t leap_seconds = -127; - int8_t local_time_offset = -63; - }; - - // member variables - bool ext = false; - bool time_info_present = false; - time_info_s_ time_info; - dyn_octstring late_non_crit_ext; - // ... - // group 0 - copy_ptr ref_time_info_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SIBpos-r16 ::= SEQUENCE -struct sib_pos_r16_s { - bool ext = false; - dyn_octstring assist_data_sib_elem_r16; - 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; -}; - -// SchedulingInfo ::= SEQUENCE -struct sched_info_s { - struct si_broadcast_status_opts { - enum options { broadcasting, not_broadcasting, nulltype } value; - - const char* to_string() const; - }; - using si_broadcast_status_e_ = enumerated; - struct si_periodicity_opts { - enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using si_periodicity_e_ = enumerated; - - // member variables - si_broadcast_status_e_ si_broadcast_status; - si_periodicity_e_ si_periodicity; - sib_map_l sib_map_info; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UAC-BarringInfoSet ::= SEQUENCE -struct uac_barr_info_set_s { - struct uac_barr_factor_opts { - enum options { p00, p05, p10, p15, p20, p25, p30, p40, p50, p60, p70, p75, p80, p85, p90, p95, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using uac_barr_factor_e_ = enumerated; - struct uac_barr_time_opts { - enum options { s4, s8, s16, s32, s64, s128, s256, s512, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using uac_barr_time_e_ = enumerated; - - // member variables - uac_barr_factor_e_ uac_barr_factor; - uac_barr_time_e_ uac_barr_time; - fixed_bitstring<7> uac_barr_for_access_id; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UAC-BarringPerPLMN ::= SEQUENCE -struct uac_barr_per_plmn_s { - struct uac_ac_barr_list_type_c_ { - using uac_implicit_ac_barr_list_l_ = std::array; - struct types_opts { - enum options { uac_implicit_ac_barr_list, uac_explicit_ac_barr_list, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - uac_ac_barr_list_type_c_() = default; - uac_ac_barr_list_type_c_(const uac_ac_barr_list_type_c_& other); - uac_ac_barr_list_type_c_& operator=(const uac_ac_barr_list_type_c_& other); - ~uac_ac_barr_list_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 - uac_implicit_ac_barr_list_l_& uac_implicit_ac_barr_list() - { - assert_choice_type(types::uac_implicit_ac_barr_list, type_, "uac-ACBarringListType"); - return c.get(); - } - uac_barr_per_cat_list_l& uac_explicit_ac_barr_list() - { - assert_choice_type(types::uac_explicit_ac_barr_list, type_, "uac-ACBarringListType"); - return c.get(); - } - const uac_implicit_ac_barr_list_l_& uac_implicit_ac_barr_list() const - { - assert_choice_type(types::uac_implicit_ac_barr_list, type_, "uac-ACBarringListType"); - return c.get(); - } - const uac_barr_per_cat_list_l& uac_explicit_ac_barr_list() const - { - assert_choice_type(types::uac_explicit_ac_barr_list, type_, "uac-ACBarringListType"); - return c.get(); - } - uac_implicit_ac_barr_list_l_& set_uac_implicit_ac_barr_list(); - uac_barr_per_cat_list_l& set_uac_explicit_ac_barr_list(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool uac_ac_barr_list_type_present = false; - uint8_t plmn_id_idx = 1; - uac_ac_barr_list_type_c_ uac_ac_barr_list_type; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ConnEstFailureControl ::= SEQUENCE -struct conn_est_fail_ctrl_s { - struct conn_est_fail_count_opts { - enum options { n1, n2, n3, n4, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using conn_est_fail_count_e_ = enumerated; - struct conn_est_fail_offset_validity_opts { - enum options { s30, s60, s120, s240, s300, s420, s600, s900, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using conn_est_fail_offset_validity_e_ = enumerated; - - // member variables - bool conn_est_fail_offset_present = false; - conn_est_fail_count_e_ conn_est_fail_count; - conn_est_fail_offset_validity_e_ conn_est_fail_offset_validity; - uint8_t conn_est_fail_offset = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PosSystemInformation-r16-IEs ::= SEQUENCE -struct pos_sys_info_r16_ies_s { - struct pos_sib_type_and_info_r16_item_c_ { - struct types_opts { - enum options { - pos_sib1_1_r16, - pos_sib1_2_r16, - pos_sib1_3_r16, - pos_sib1_4_r16, - pos_sib1_5_r16, - pos_sib1_6_r16, - pos_sib1_7_r16, - pos_sib1_8_r16, - pos_sib2_1_r16, - pos_sib2_2_r16, - pos_sib2_3_r16, - pos_sib2_4_r16, - pos_sib2_5_r16, - pos_sib2_6_r16, - pos_sib2_7_r16, - pos_sib2_8_r16, - pos_sib2_9_r16, - pos_sib2_10_r16, - pos_sib2_11_r16, - pos_sib2_12_r16, - pos_sib2_13_r16, - pos_sib2_14_r16, - pos_sib2_15_r16, - pos_sib2_16_r16, - pos_sib2_17_r16, - pos_sib2_18_r16, - pos_sib2_19_r16, - pos_sib2_20_r16, - pos_sib2_21_r16, - pos_sib2_22_r16, - pos_sib2_23_r16, - pos_sib3_1_r16, - pos_sib4_1_r16, - pos_sib5_1_r16, - pos_sib6_1_r16, - pos_sib6_2_r16, - pos_sib6_3_r16, - // ... - pos_sib1_9_v1700, - pos_sib1_10_v1700, - pos_sib2_24_v1700, - pos_sib2_25_v1700, - pos_sib6_4_v1700, - pos_sib6_5_v1700, - pos_sib6_6_v1700, - nulltype - } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - pos_sib_type_and_info_r16_item_c_() = default; - pos_sib_type_and_info_r16_item_c_(const pos_sib_type_and_info_r16_item_c_& other); - pos_sib_type_and_info_r16_item_c_& operator=(const pos_sib_type_and_info_r16_item_c_& other); - ~pos_sib_type_and_info_r16_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 - sib_pos_r16_s& pos_sib1_1_r16() - { - assert_choice_type(types::pos_sib1_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib1_2_r16() - { - assert_choice_type(types::pos_sib1_2_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib1_3_r16() - { - assert_choice_type(types::pos_sib1_3_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib1_4_r16() - { - assert_choice_type(types::pos_sib1_4_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib1_5_r16() - { - assert_choice_type(types::pos_sib1_5_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib1_6_r16() - { - assert_choice_type(types::pos_sib1_6_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib1_7_r16() - { - assert_choice_type(types::pos_sib1_7_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib1_8_r16() - { - assert_choice_type(types::pos_sib1_8_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_1_r16() - { - assert_choice_type(types::pos_sib2_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_2_r16() - { - assert_choice_type(types::pos_sib2_2_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_3_r16() - { - assert_choice_type(types::pos_sib2_3_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_4_r16() - { - assert_choice_type(types::pos_sib2_4_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_5_r16() - { - assert_choice_type(types::pos_sib2_5_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_6_r16() - { - assert_choice_type(types::pos_sib2_6_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_7_r16() - { - assert_choice_type(types::pos_sib2_7_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_8_r16() - { - assert_choice_type(types::pos_sib2_8_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_9_r16() - { - assert_choice_type(types::pos_sib2_9_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_10_r16() - { - assert_choice_type(types::pos_sib2_10_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_11_r16() - { - assert_choice_type(types::pos_sib2_11_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_12_r16() - { - assert_choice_type(types::pos_sib2_12_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_13_r16() - { - assert_choice_type(types::pos_sib2_13_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_14_r16() - { - assert_choice_type(types::pos_sib2_14_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_15_r16() - { - assert_choice_type(types::pos_sib2_15_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_16_r16() - { - assert_choice_type(types::pos_sib2_16_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_17_r16() - { - assert_choice_type(types::pos_sib2_17_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_18_r16() - { - assert_choice_type(types::pos_sib2_18_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_19_r16() - { - assert_choice_type(types::pos_sib2_19_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_20_r16() - { - assert_choice_type(types::pos_sib2_20_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_21_r16() - { - assert_choice_type(types::pos_sib2_21_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_22_r16() - { - assert_choice_type(types::pos_sib2_22_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_23_r16() - { - assert_choice_type(types::pos_sib2_23_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib3_1_r16() - { - assert_choice_type(types::pos_sib3_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib4_1_r16() - { - assert_choice_type(types::pos_sib4_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib5_1_r16() - { - assert_choice_type(types::pos_sib5_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib6_1_r16() - { - assert_choice_type(types::pos_sib6_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib6_2_r16() - { - assert_choice_type(types::pos_sib6_2_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib6_3_r16() - { - assert_choice_type(types::pos_sib6_3_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib1_9_v1700() - { - assert_choice_type(types::pos_sib1_9_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib1_10_v1700() - { - assert_choice_type(types::pos_sib1_10_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_24_v1700() - { - assert_choice_type(types::pos_sib2_24_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib2_25_v1700() - { - assert_choice_type(types::pos_sib2_25_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib6_4_v1700() - { - assert_choice_type(types::pos_sib6_4_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib6_5_v1700() - { - assert_choice_type(types::pos_sib6_5_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& pos_sib6_6_v1700() - { - assert_choice_type(types::pos_sib6_6_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib1_1_r16() const - { - assert_choice_type(types::pos_sib1_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib1_2_r16() const - { - assert_choice_type(types::pos_sib1_2_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib1_3_r16() const - { - assert_choice_type(types::pos_sib1_3_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib1_4_r16() const - { - assert_choice_type(types::pos_sib1_4_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib1_5_r16() const - { - assert_choice_type(types::pos_sib1_5_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib1_6_r16() const - { - assert_choice_type(types::pos_sib1_6_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib1_7_r16() const - { - assert_choice_type(types::pos_sib1_7_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib1_8_r16() const - { - assert_choice_type(types::pos_sib1_8_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_1_r16() const - { - assert_choice_type(types::pos_sib2_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_2_r16() const - { - assert_choice_type(types::pos_sib2_2_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_3_r16() const - { - assert_choice_type(types::pos_sib2_3_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_4_r16() const - { - assert_choice_type(types::pos_sib2_4_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_5_r16() const - { - assert_choice_type(types::pos_sib2_5_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_6_r16() const - { - assert_choice_type(types::pos_sib2_6_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_7_r16() const - { - assert_choice_type(types::pos_sib2_7_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_8_r16() const - { - assert_choice_type(types::pos_sib2_8_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_9_r16() const - { - assert_choice_type(types::pos_sib2_9_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_10_r16() const - { - assert_choice_type(types::pos_sib2_10_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_11_r16() const - { - assert_choice_type(types::pos_sib2_11_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_12_r16() const - { - assert_choice_type(types::pos_sib2_12_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_13_r16() const - { - assert_choice_type(types::pos_sib2_13_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_14_r16() const - { - assert_choice_type(types::pos_sib2_14_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_15_r16() const - { - assert_choice_type(types::pos_sib2_15_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_16_r16() const - { - assert_choice_type(types::pos_sib2_16_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_17_r16() const - { - assert_choice_type(types::pos_sib2_17_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_18_r16() const - { - assert_choice_type(types::pos_sib2_18_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_19_r16() const - { - assert_choice_type(types::pos_sib2_19_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_20_r16() const - { - assert_choice_type(types::pos_sib2_20_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_21_r16() const - { - assert_choice_type(types::pos_sib2_21_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_22_r16() const - { - assert_choice_type(types::pos_sib2_22_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_23_r16() const - { - assert_choice_type(types::pos_sib2_23_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib3_1_r16() const - { - assert_choice_type(types::pos_sib3_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib4_1_r16() const - { - assert_choice_type(types::pos_sib4_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib5_1_r16() const - { - assert_choice_type(types::pos_sib5_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib6_1_r16() const - { - assert_choice_type(types::pos_sib6_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib6_2_r16() const - { - assert_choice_type(types::pos_sib6_2_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib6_3_r16() const - { - assert_choice_type(types::pos_sib6_3_r16, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib1_9_v1700() const - { - assert_choice_type(types::pos_sib1_9_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib1_10_v1700() const - { - assert_choice_type(types::pos_sib1_10_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_24_v1700() const - { - assert_choice_type(types::pos_sib2_24_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib2_25_v1700() const - { - assert_choice_type(types::pos_sib2_25_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib6_4_v1700() const - { - assert_choice_type(types::pos_sib6_4_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib6_5_v1700() const - { - assert_choice_type(types::pos_sib6_5_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - const sib_pos_r16_s& pos_sib6_6_v1700() const - { - assert_choice_type(types::pos_sib6_6_v1700, type_, "posSIB-TypeAndInfo-r16-item"); - return c.get(); - } - sib_pos_r16_s& set_pos_sib1_1_r16(); - sib_pos_r16_s& set_pos_sib1_2_r16(); - sib_pos_r16_s& set_pos_sib1_3_r16(); - sib_pos_r16_s& set_pos_sib1_4_r16(); - sib_pos_r16_s& set_pos_sib1_5_r16(); - sib_pos_r16_s& set_pos_sib1_6_r16(); - sib_pos_r16_s& set_pos_sib1_7_r16(); - sib_pos_r16_s& set_pos_sib1_8_r16(); - sib_pos_r16_s& set_pos_sib2_1_r16(); - sib_pos_r16_s& set_pos_sib2_2_r16(); - sib_pos_r16_s& set_pos_sib2_3_r16(); - sib_pos_r16_s& set_pos_sib2_4_r16(); - sib_pos_r16_s& set_pos_sib2_5_r16(); - sib_pos_r16_s& set_pos_sib2_6_r16(); - sib_pos_r16_s& set_pos_sib2_7_r16(); - sib_pos_r16_s& set_pos_sib2_8_r16(); - sib_pos_r16_s& set_pos_sib2_9_r16(); - sib_pos_r16_s& set_pos_sib2_10_r16(); - sib_pos_r16_s& set_pos_sib2_11_r16(); - sib_pos_r16_s& set_pos_sib2_12_r16(); - sib_pos_r16_s& set_pos_sib2_13_r16(); - sib_pos_r16_s& set_pos_sib2_14_r16(); - sib_pos_r16_s& set_pos_sib2_15_r16(); - sib_pos_r16_s& set_pos_sib2_16_r16(); - sib_pos_r16_s& set_pos_sib2_17_r16(); - sib_pos_r16_s& set_pos_sib2_18_r16(); - sib_pos_r16_s& set_pos_sib2_19_r16(); - sib_pos_r16_s& set_pos_sib2_20_r16(); - sib_pos_r16_s& set_pos_sib2_21_r16(); - sib_pos_r16_s& set_pos_sib2_22_r16(); - sib_pos_r16_s& set_pos_sib2_23_r16(); - sib_pos_r16_s& set_pos_sib3_1_r16(); - sib_pos_r16_s& set_pos_sib4_1_r16(); - sib_pos_r16_s& set_pos_sib5_1_r16(); - sib_pos_r16_s& set_pos_sib6_1_r16(); - sib_pos_r16_s& set_pos_sib6_2_r16(); - sib_pos_r16_s& set_pos_sib6_3_r16(); - sib_pos_r16_s& set_pos_sib1_9_v1700(); - sib_pos_r16_s& set_pos_sib1_10_v1700(); - sib_pos_r16_s& set_pos_sib2_24_v1700(); - sib_pos_r16_s& set_pos_sib2_25_v1700(); - sib_pos_r16_s& set_pos_sib6_4_v1700(); - sib_pos_r16_s& set_pos_sib6_5_v1700(); - sib_pos_r16_s& set_pos_sib6_6_v1700(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - using pos_sib_type_and_info_r16_l_ = dyn_array; - - // member variables - bool non_crit_ext_present = false; - pos_sib_type_and_info_r16_l_ pos_sib_type_and_info_r16; - 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; -}; - -// SI-SchedulingInfo ::= SEQUENCE -struct si_sched_info_s { - using sched_info_list_l_ = dyn_array; - struct si_win_len_opts { - enum options { s5, s10, s20, s40, s80, s160, s320, s640, s1280, s2560_v1710, s5120_v1710, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using si_win_len_e_ = enumerated; - - // member variables - bool ext = false; - bool si_request_cfg_present = false; - bool si_request_cfg_sul_present = false; - bool sys_info_area_id_present = false; - sched_info_list_l_ sched_info_list; - si_win_len_e_ si_win_len; - si_request_cfg_s si_request_cfg; - si_request_cfg_s si_request_cfg_sul; - fixed_bitstring<24> sys_info_area_id; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SIB1-v1610-IEs ::= SEQUENCE -struct sib1_v1610_ies_s { - bool idle_mode_meass_eutra_r16_present = false; - bool idle_mode_meass_nr_r16_present = false; - bool pos_si_sched_info_r16_present = false; - bool non_crit_ext_present = false; - pos_si_sched_info_r16_s pos_si_sched_info_r16; - sib1_v1630_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; -}; - -// SystemInformation-IEs ::= SEQUENCE -struct sys_info_ies_s { - struct sib_type_and_info_item_c_ { - struct types_opts { - enum options { - sib2, - sib3, - sib4, - sib5, - sib6, - sib7, - sib8, - sib9, - // ... - sib10_v1610, - sib11_v1610, - sib12_v1610, - sib13_v1610, - sib14_v1610, - sib15_v1700, - sib16_v1700, - sib17_v1700, - sib18_v1700, - sib19_v1700, - sib20_v1700, - sib21_v1700, - nulltype - } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - sib_type_and_info_item_c_() = default; - sib_type_and_info_item_c_(const sib_type_and_info_item_c_& other); - sib_type_and_info_item_c_& operator=(const sib_type_and_info_item_c_& other); - ~sib_type_and_info_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 - sib2_s& sib2() - { - assert_choice_type(types::sib2, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib3_s& sib3() - { - assert_choice_type(types::sib3, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib4_s& sib4() - { - assert_choice_type(types::sib4, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib5_s& sib5() - { - assert_choice_type(types::sib5, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib6_s& sib6() - { - assert_choice_type(types::sib6, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib7_s& sib7() - { - assert_choice_type(types::sib7, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib8_s& sib8() - { - assert_choice_type(types::sib8, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib9_s& sib9() - { - assert_choice_type(types::sib9, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib10_r16_s& sib10_v1610() - { - assert_choice_type(types::sib10_v1610, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib11_r16_s& sib11_v1610() - { - assert_choice_type(types::sib11_v1610, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib12_r16_s& sib12_v1610() - { - assert_choice_type(types::sib12_v1610, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib13_r16_s& sib13_v1610() - { - assert_choice_type(types::sib13_v1610, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib14_r16_s& sib14_v1610() - { - assert_choice_type(types::sib14_v1610, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib15_r17_s& sib15_v1700() - { - assert_choice_type(types::sib15_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib16_r17_s& sib16_v1700() - { - assert_choice_type(types::sib16_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib17_r17_s& sib17_v1700() - { - assert_choice_type(types::sib17_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib18_r17_s& sib18_v1700() - { - assert_choice_type(types::sib18_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib19_r17_s& sib19_v1700() - { - assert_choice_type(types::sib19_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib20_r17_s& sib20_v1700() - { - assert_choice_type(types::sib20_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib21_r17_s& sib21_v1700() - { - assert_choice_type(types::sib21_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib2_s& sib2() const - { - assert_choice_type(types::sib2, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib3_s& sib3() const - { - assert_choice_type(types::sib3, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib4_s& sib4() const - { - assert_choice_type(types::sib4, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib5_s& sib5() const - { - assert_choice_type(types::sib5, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib6_s& sib6() const - { - assert_choice_type(types::sib6, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib7_s& sib7() const - { - assert_choice_type(types::sib7, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib8_s& sib8() const - { - assert_choice_type(types::sib8, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib9_s& sib9() const - { - assert_choice_type(types::sib9, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib10_r16_s& sib10_v1610() const - { - assert_choice_type(types::sib10_v1610, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib11_r16_s& sib11_v1610() const - { - assert_choice_type(types::sib11_v1610, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib12_r16_s& sib12_v1610() const - { - assert_choice_type(types::sib12_v1610, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib13_r16_s& sib13_v1610() const - { - assert_choice_type(types::sib13_v1610, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib14_r16_s& sib14_v1610() const - { - assert_choice_type(types::sib14_v1610, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib15_r17_s& sib15_v1700() const - { - assert_choice_type(types::sib15_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib16_r17_s& sib16_v1700() const - { - assert_choice_type(types::sib16_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib17_r17_s& sib17_v1700() const - { - assert_choice_type(types::sib17_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib18_r17_s& sib18_v1700() const - { - assert_choice_type(types::sib18_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib19_r17_s& sib19_v1700() const - { - assert_choice_type(types::sib19_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib20_r17_s& sib20_v1700() const - { - assert_choice_type(types::sib20_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - const sib21_r17_s& sib21_v1700() const - { - assert_choice_type(types::sib21_v1700, type_, "sib-TypeAndInfo-item"); - return c.get(); - } - sib2_s& set_sib2(); - sib3_s& set_sib3(); - sib4_s& set_sib4(); - sib5_s& set_sib5(); - sib6_s& set_sib6(); - sib7_s& set_sib7(); - sib8_s& set_sib8(); - sib9_s& set_sib9(); - sib10_r16_s& set_sib10_v1610(); - sib11_r16_s& set_sib11_v1610(); - sib12_r16_s& set_sib12_v1610(); - sib13_r16_s& set_sib13_v1610(); - sib14_r16_s& set_sib14_v1610(); - sib15_r17_s& set_sib15_v1700(); - sib16_r17_s& set_sib16_v1700(); - sib17_r17_s& set_sib17_v1700(); - sib18_r17_s& set_sib18_v1700(); - sib19_r17_s& set_sib19_v1700(); - sib20_r17_s& set_sib20_v1700(); - sib21_r17_s& set_sib21_v1700(); - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - using sib_type_and_info_l_ = dyn_array; - - // member variables - bool non_crit_ext_present = false; - sib_type_and_info_l_ sib_type_and_info; - 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; -}; - -// UAC-AccessCategory1-SelectionAssistanceInfo ::= ENUMERATED -struct uac_access_category1_sel_assist_info_opts { - enum options { a, b, c, nulltype } value; - - const char* to_string() const; -}; -using uac_access_category1_sel_assist_info_e = enumerated; - -// UAC-BarringInfoSetList ::= SEQUENCE (SIZE (1..8)) OF UAC-BarringInfoSet -using uac_barr_info_set_list_l = dyn_array; - -// UAC-BarringPerPLMN-List ::= SEQUENCE (SIZE (1..12)) OF UAC-BarringPerPLMN -using uac_barr_per_plmn_list_l = dyn_array; - -// UE-TimersAndConstants ::= SEQUENCE -struct ue_timers_and_consts_s { - struct t300_opts { - enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t300_e_ = enumerated; - struct t301_opts { - enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t301_e_ = enumerated; - struct t310_opts { - enum options { ms0, ms50, ms100, ms200, ms500, ms1000, ms2000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t310_e_ = enumerated; - struct n310_opts { - enum options { n1, n2, n3, n4, n6, n8, n10, n20, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using n310_e_ = enumerated; - struct t311_opts { - enum options { ms1000, ms3000, ms5000, ms10000, ms15000, ms20000, ms30000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t311_e_ = enumerated; - struct n311_opts { - enum options { n1, n2, n3, n4, n5, n6, n8, n10, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using n311_e_ = enumerated; - struct t319_opts { - enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t319_e_ = enumerated; - - // member variables - bool ext = false; - t300_e_ t300; - t301_e_ t301; - t310_e_ t310; - n310_e_ n310; - t311_e_ t311; - n311_e_ n311; - t319_e_ t319; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SIB1 ::= SEQUENCE -struct sib1_s { - struct cell_sel_info_s_ { - bool q_rx_lev_min_offset_present = false; - bool q_rx_lev_min_sul_present = false; - bool q_qual_min_present = false; - bool q_qual_min_offset_present = false; - int8_t q_rx_lev_min = -70; - uint8_t q_rx_lev_min_offset = 1; - int8_t q_rx_lev_min_sul = -70; - int8_t q_qual_min = -43; - uint8_t q_qual_min_offset = 1; - }; - struct uac_barr_info_s_ { - struct uac_access_category1_sel_assist_info_c_ { - using individual_plmn_list_l_ = bounded_array; - struct types_opts { - enum options { plmn_common, individual_plmn_list, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - uac_access_category1_sel_assist_info_c_() = default; - uac_access_category1_sel_assist_info_c_(const uac_access_category1_sel_assist_info_c_& other); - uac_access_category1_sel_assist_info_c_& operator=(const uac_access_category1_sel_assist_info_c_& other); - ~uac_access_category1_sel_assist_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 - uac_access_category1_sel_assist_info_e& plmn_common() - { - assert_choice_type(types::plmn_common, type_, "uac-AccessCategory1-SelectionAssistanceInfo"); - return c.get(); - } - individual_plmn_list_l_& individual_plmn_list() - { - assert_choice_type(types::individual_plmn_list, type_, "uac-AccessCategory1-SelectionAssistanceInfo"); - return c.get(); - } - const uac_access_category1_sel_assist_info_e& plmn_common() const - { - assert_choice_type(types::plmn_common, type_, "uac-AccessCategory1-SelectionAssistanceInfo"); - return c.get(); - } - const individual_plmn_list_l_& individual_plmn_list() const - { - assert_choice_type(types::individual_plmn_list, type_, "uac-AccessCategory1-SelectionAssistanceInfo"); - return c.get(); - } - uac_access_category1_sel_assist_info_e& set_plmn_common(); - individual_plmn_list_l_& set_individual_plmn_list(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool uac_access_category1_sel_assist_info_present = false; - uac_barr_per_cat_list_l uac_barr_for_common; - uac_barr_per_plmn_list_l uac_barr_per_plmn_list; - uac_barr_info_set_list_l uac_barr_info_set_list; - uac_access_category1_sel_assist_info_c_ uac_access_category1_sel_assist_info; - }; - - // member variables - bool cell_sel_info_present = false; - bool conn_est_fail_ctrl_present = false; - bool si_sched_info_present = false; - bool serving_cell_cfg_common_present = false; - bool ims_emergency_support_present = false; - bool ecall_over_ims_support_present = false; - bool ue_timers_and_consts_present = false; - bool uac_barr_info_present = false; - bool use_full_resume_id_present = false; - bool non_crit_ext_present = false; - cell_sel_info_s_ cell_sel_info; - cell_access_related_info_s cell_access_related_info; - conn_est_fail_ctrl_s conn_est_fail_ctrl; - si_sched_info_s si_sched_info; - serving_cell_cfg_common_sib_s serving_cell_cfg_common; - ue_timers_and_consts_s ue_timers_and_consts; - uac_barr_info_s_ uac_barr_info; - dyn_octstring late_non_crit_ext; - sib1_v1610_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; -}; - -// SystemInformation ::= SEQUENCE -struct sys_info_s { - struct crit_exts_c_ { - struct crit_exts_future_r16_c_ { - struct types_opts { - enum options { pos_sys_info_r16, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_future_r16_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 - pos_sys_info_r16_ies_s& pos_sys_info_r16() - { - assert_choice_type(types::pos_sys_info_r16, type_, "criticalExtensionsFuture-r16"); - return c; - } - const pos_sys_info_r16_ies_s& pos_sys_info_r16() const - { - assert_choice_type(types::pos_sys_info_r16, type_, "criticalExtensionsFuture-r16"); - return c; - } - pos_sys_info_r16_ies_s& set_pos_sys_info_r16(); - void set_crit_exts_future(); - - private: - types type_; - pos_sys_info_r16_ies_s c; - }; - struct types_opts { - enum options { sys_info, crit_exts_future_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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 - sys_info_ies_s& sys_info() - { - assert_choice_type(types::sys_info, type_, "criticalExtensions"); - return c.get(); - } - crit_exts_future_r16_c_& crit_exts_future_r16() - { - assert_choice_type(types::crit_exts_future_r16, type_, "criticalExtensions"); - return c.get(); - } - const sys_info_ies_s& sys_info() const - { - assert_choice_type(types::sys_info, type_, "criticalExtensions"); - return c.get(); - } - const crit_exts_future_r16_c_& crit_exts_future_r16() const - { - assert_choice_type(types::crit_exts_future_r16, type_, "criticalExtensions"); - return c.get(); - } - sys_info_ies_s& set_sys_info(); - crit_exts_future_r16_c_& set_crit_exts_future_r16(); - - 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; -}; - -// BCCH-DL-SCH-MessageType ::= CHOICE -struct bcch_dl_sch_msg_type_c { - struct c1_c_ { - struct types_opts { - enum options { sys_info, sib_type1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // 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 - sys_info_s& sys_info() - { - assert_choice_type(types::sys_info, type_, "c1"); - return c.get(); - } - sib1_s& sib_type1() - { - assert_choice_type(types::sib_type1, type_, "c1"); - return c.get(); - } - const sys_info_s& sys_info() const - { - assert_choice_type(types::sys_info, type_, "c1"); - return c.get(); - } - const sib1_s& sib_type1() const - { - assert_choice_type(types::sib_type1, type_, "c1"); - return c.get(); - } - sys_info_s& set_sys_info(); - sib1_s& set_sib_type1(); - - 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - bcch_dl_sch_msg_type_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 - c1_c_& c1() - { - assert_choice_type(types::c1, type_, "BCCH-DL-SCH-MessageType"); - return c; - } - const c1_c_& c1() const - { - assert_choice_type(types::c1, type_, "BCCH-DL-SCH-MessageType"); - return c; - } - c1_c_& set_c1(); - void set_msg_class_ext(); - -private: - types type_; - c1_c_ c; -}; - -// BCCH-DL-SCH-Message ::= SEQUENCE -struct bcch_dl_sch_msg_s { - bcch_dl_sch_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; -}; - -// MRB-PDCP-ConfigBroadcast-r17 ::= SEQUENCE -struct mrb_pdcp_cfg_broadcast_r17_s { - struct hdr_compress_r17_c_ { - struct rohc_s_ { - struct profiles_r17_s_ { - bool profile0x0000_r17 = false; - bool profile0x0001_r17 = false; - bool profile0x0002_r17 = false; - }; - - // member variables - bool max_c_id_r17_present = false; - uint8_t max_c_id_r17 = 1; - profiles_r17_s_ profiles_r17; - }; - struct types_opts { - enum options { not_used, rohc, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - hdr_compress_r17_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 - rohc_s_& rohc() - { - assert_choice_type(types::rohc, type_, "headerCompression-r17"); - return c; - } - const rohc_s_& rohc() const - { - assert_choice_type(types::rohc, type_, "headerCompression-r17"); - return c; - } - void set_not_used(); - rohc_s_& set_rohc(); - - private: - types type_; - rohc_s_ c; - }; - struct t_reordering_r17_opts { - enum options { ms1, ms10, ms40, ms160, ms500, ms1000, ms1250, ms2750, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t_reordering_r17_e_ = enumerated; - - // member variables - bool pdcp_sn_size_dl_r17_present = false; - bool t_reordering_r17_present = false; - hdr_compress_r17_c_ hdr_compress_r17; - t_reordering_r17_e_ t_reordering_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MRB-RLC-ConfigBroadcast-r17 ::= SEQUENCE -struct mrb_rlc_cfg_broadcast_r17_s { - bool sn_field_len_r17_present = false; - bool t_reassembly_r17_present = false; - uint8_t lc_ch_id_r17 = 1; - t_reassembly_e t_reassembly_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MRB-InfoBroadcast-r17 ::= SEQUENCE -struct mrb_info_broadcast_r17_s { - bool ext = false; - mrb_pdcp_cfg_broadcast_r17_s pdcp_cfg_r17; - mrb_rlc_cfg_broadcast_r17_s rlc_cfg_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MRB-ListBroadcast-r17 ::= SEQUENCE (SIZE (1..4)) OF MRB-InfoBroadcast-r17 -using mrb_list_broadcast_r17_l = dyn_array; - -// MBS-NeighbourCell-r17 ::= SEQUENCE -struct mbs_neighbour_cell_r17_s { - bool carrier_freq_r17_present = false; - uint16_t pci_r17 = 0; - uint32_t carrier_freq_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MBS-SessionInfo-r17 ::= SEQUENCE -struct mbs_session_info_r17_s { - bool mtch_sched_info_r17_present = false; - bool mtch_neighbour_cell_r17_present = false; - bool pdsch_cfg_idx_r17_present = false; - bool mtch_ssb_map_win_idx_r17_present = false; - tmgi_r17_s mbs_session_id_r17; - uint32_t g_rnti_r17 = 0; - mrb_list_broadcast_r17_l mrb_list_broadcast_r17; - uint8_t mtch_sched_info_r17 = 0; - fixed_bitstring<8> mtch_neighbour_cell_r17; - uint8_t pdsch_cfg_idx_r17 = 0; - uint8_t mtch_ssb_map_win_idx_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MTCH-SSB-MappingWindowCycleOffset-r17 ::= CHOICE -struct mtch_ssb_map_win_cycle_offset_r17_c { - struct types_opts { - enum options { ms10, ms20, ms32, ms64, ms128, ms256, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - mtch_ssb_map_win_cycle_offset_r17_c() = default; - mtch_ssb_map_win_cycle_offset_r17_c(const mtch_ssb_map_win_cycle_offset_r17_c& other); - mtch_ssb_map_win_cycle_offset_r17_c& operator=(const mtch_ssb_map_win_cycle_offset_r17_c& other); - ~mtch_ssb_map_win_cycle_offset_r17_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() - { - assert_choice_type(types::ms10, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); - return c.get(); - } - uint8_t& ms20() - { - assert_choice_type(types::ms20, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); - return c.get(); - } - uint8_t& ms32() - { - assert_choice_type(types::ms32, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); - return c.get(); - } - uint8_t& ms64() - { - assert_choice_type(types::ms64, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); - return c.get(); - } - uint8_t& ms128() - { - assert_choice_type(types::ms128, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); - return c.get(); - } - uint16_t& ms256() - { - assert_choice_type(types::ms256, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); - return c.get(); - } - const uint8_t& ms10() const - { - assert_choice_type(types::ms10, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); - return c.get(); - } - const uint8_t& ms20() const - { - assert_choice_type(types::ms20, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); - return c.get(); - } - const uint8_t& ms32() const - { - assert_choice_type(types::ms32, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); - return c.get(); - } - const uint8_t& ms64() const - { - assert_choice_type(types::ms64, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); - return c.get(); - } - const uint8_t& ms128() const - { - assert_choice_type(types::ms128, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); - return c.get(); - } - const uint16_t& ms256() const - { - assert_choice_type(types::ms256, type_, "MTCH-SSB-MappingWindowCycleOffset-r17"); - return c.get(); - } - uint8_t& set_ms10(); - uint8_t& set_ms20(); - uint8_t& set_ms32(); - uint8_t& set_ms64(); - uint8_t& set_ms128(); - uint16_t& set_ms256(); - -private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); -}; - -// MBS-NeighbourCellList-r17 ::= SEQUENCE (SIZE (0..8)) OF MBS-NeighbourCell-r17 -using mbs_neighbour_cell_list_r17_l = dyn_array; - -// MBS-SessionInfoList-r17 ::= SEQUENCE (SIZE (1..1024)) OF MBS-SessionInfo-r17 -using mbs_session_info_list_r17_l = dyn_array; - -// MTCH-SSB-MappingWindowList-r17 ::= SEQUENCE (SIZE (1..16)) OF MTCH-SSB-MappingWindowCycleOffset-r17 -using mtch_ssb_map_win_list_r17_l = dyn_array; - -// MBSBroadcastConfiguration-r17-IEs ::= SEQUENCE -struct mbs_broadcast_cfg_r17_ies_s { - using drx_cfg_ptm_list_r17_l_ = dyn_array; - - // member variables - bool mbs_neighbour_cell_list_r17_present = false; - bool pdsch_cfg_mtch_r17_present = false; - bool non_crit_ext_present = false; - mbs_session_info_list_r17_l mbs_session_info_list_r17; - mbs_neighbour_cell_list_r17_l mbs_neighbour_cell_list_r17; - drx_cfg_ptm_list_r17_l_ drx_cfg_ptm_list_r17; - pdsch_cfg_broadcast_r17_s pdsch_cfg_mtch_r17; - mtch_ssb_map_win_list_r17_l mtch_ssb_map_win_list_r17; - 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; -}; - -// MBSBroadcastConfiguration-r17 ::= SEQUENCE -struct mbs_broadcast_cfg_r17_s { - struct crit_exts_c_ { - struct types_opts { - enum options { mbs_broadcast_cfg_r17, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - mbs_broadcast_cfg_r17_ies_s& mbs_broadcast_cfg_r17() - { - assert_choice_type(types::mbs_broadcast_cfg_r17, type_, "criticalExtensions"); - return c; - } - const mbs_broadcast_cfg_r17_ies_s& mbs_broadcast_cfg_r17() const - { - assert_choice_type(types::mbs_broadcast_cfg_r17, type_, "criticalExtensions"); - return c; - } - mbs_broadcast_cfg_r17_ies_s& set_mbs_broadcast_cfg_r17(); - void set_crit_exts_future(); - - private: - types type_; - mbs_broadcast_cfg_r17_ies_s c; - }; - - // 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; -}; - -// MCCH-MessageType-r17 ::= CHOICE -struct mcch_msg_type_r17_c { - struct c1_c_ { - struct types_opts { - enum options { mbs_broadcast_cfg_r17, spare1, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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 - mbs_broadcast_cfg_r17_s& mbs_broadcast_cfg_r17() - { - assert_choice_type(types::mbs_broadcast_cfg_r17, type_, "c1"); - return c; - } - const mbs_broadcast_cfg_r17_s& mbs_broadcast_cfg_r17() const - { - assert_choice_type(types::mbs_broadcast_cfg_r17, type_, "c1"); - return c; - } - mbs_broadcast_cfg_r17_s& set_mbs_broadcast_cfg_r17(); - void set_spare1(); - - private: - types type_; - mbs_broadcast_cfg_r17_s c; - }; - struct types_opts { - enum options { c1, msg_class_ext, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - mcch_msg_type_r17_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 - c1_c_& c1() - { - assert_choice_type(types::c1, type_, "MCCH-MessageType-r17"); - return c; - } - const c1_c_& c1() const - { - assert_choice_type(types::c1, type_, "MCCH-MessageType-r17"); - return c; - } - c1_c_& set_c1(); - void set_msg_class_ext(); - -private: - types type_; - c1_c_ c; -}; - -// MCCH-Message-r17 ::= SEQUENCE -struct mcch_msg_r17_s { - mcch_msg_type_r17_c msg; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PagingRecord-v1700 ::= SEQUENCE -struct paging_record_v1700_s { - bool paging_cause_r17_present = false; - - // 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_5_g_s_tmsi, full_i_rnti, /*...*/ nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using types = enumerated; - - // 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_5_g_s_tmsi() - { - assert_choice_type(types::ng_5_g_s_tmsi, type_, "PagingUE-Identity"); - return c.get>(); - } - fixed_bitstring<40>& full_i_rnti() - { - assert_choice_type(types::full_i_rnti, type_, "PagingUE-Identity"); - return c.get>(); - } - const fixed_bitstring<48>& ng_5_g_s_tmsi() const - { - assert_choice_type(types::ng_5_g_s_tmsi, type_, "PagingUE-Identity"); - return c.get>(); - } - const fixed_bitstring<40>& full_i_rnti() const - { - assert_choice_type(types::full_i_rnti, type_, "PagingUE-Identity"); - return c.get>(); - } - fixed_bitstring<48>& set_ng_5_g_s_tmsi(); - fixed_bitstring<40>& set_full_i_rnti(); - -private: - types type_; - choice_buffer_t> c; - - void destroy_(); -}; - -// PagingGroupList-r17 ::= SEQUENCE (SIZE (1..32)) OF TMGI-r17 -using paging_group_list_r17_l = dyn_array; - -// 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-v1700 ::= SEQUENCE (SIZE (1..32)) OF PagingRecord-v1700 -using paging_record_list_v1700_l = dyn_array; - -// Paging-v1700-IEs ::= SEQUENCE -struct paging_v1700_ies_s { - bool non_crit_ext_present = false; - paging_record_list_v1700_l paging_record_list_v1700; - paging_group_list_r17_l paging_group_list_r17; - - // 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 non_crit_ext_present = false; - paging_record_list_l paging_record_list; - dyn_octstring late_non_crit_ext; - paging_v1700_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; -}; - -// PCCH-MessageType ::= CHOICE -struct pcch_msg_type_c { - struct c1_c_ { - struct types_opts { - enum options { paging, spare1, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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 - paging_s& paging() - { - assert_choice_type(types::paging, type_, "c1"); - return c; - } - const paging_s& paging() const - { - assert_choice_type(types::paging, type_, "c1"); - return c; - } - paging_s& set_paging(); - void set_spare1(); - - private: - types type_; - paging_s c; - }; - struct types_opts { - enum options { c1, msg_class_ext, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - pcch_msg_type_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 - c1_c_& c1() - { - assert_choice_type(types::c1, type_, "PCCH-MessageType"); - return c; - } - const c1_c_& c1() const - { - assert_choice_type(types::c1, type_, "PCCH-MessageType"); - return c; - } - c1_c_& set_c1(); - void set_msg_class_ext(); - -private: - types type_; - c1_c_ c; -}; - -// 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; -}; - -// 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCResumeRequest1 ::= SEQUENCE -struct rrc_resume_request1_s { - rrc_resume_request1_ies_s rrc_resume_request1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // 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 - rrc_resume_request1_s& rrc_resume_request1() - { - assert_choice_type(types::rrc_resume_request1, type_, "c1"); - return c; - } - const rrc_resume_request1_s& rrc_resume_request1() const - { - assert_choice_type(types::rrc_resume_request1, type_, "c1"); - return c; - } - rrc_resume_request1_s& set_rrc_resume_request1(); - void set_spare3(); - void set_spare2(); - void set_spare1(); - - private: - types type_; - rrc_resume_request1_s c; - }; - struct types_opts { - enum options { c1, msg_class_ext, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - ul_ccch1_msg_type_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 - c1_c_& c1() - { - assert_choice_type(types::c1, type_, "UL-CCCH1-MessageType"); - return c; - } - const c1_c_& c1() const - { - assert_choice_type(types::c1, type_, "UL-CCCH1-MessageType"); - return c; - } - c1_c_& set_c1(); - void set_msg_class_ext(); - -private: - types type_; - c1_c_ c; -}; - -// UL-CCCH1-Message ::= SEQUENCE -struct ul_ccch1_msg_s { - ul_ccch1_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; -}; - -// MeasurementReportAppLayerList-r17 ::= SEQUENCE (SIZE (1..16)) OF MeasReportAppLayer-r17 -using meas_report_app_layer_list_r17_l = dyn_array; - -// MeasurementReportAppLayer-r17-IEs ::= SEQUENCE -struct meas_report_app_layer_r17_ies_s { - bool non_crit_ext_present = false; - meas_report_app_layer_list_r17_l meas_report_app_layer_list_r17; - 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; -}; - -// AI-RNTI-r16 ::= INTEGER (0..65535) -using ai_rnti_r16 = integer; - -// BWP-DownlinkDedicatedSDT-r17 ::= SEQUENCE -struct bwp_dl_ded_sdt_r17_s { - bool ext = false; - bool pdcch_cfg_r17_present = false; - bool pdsch_cfg_r17_present = false; - setup_release_c pdcch_cfg_r17; - setup_release_c pdsch_cfg_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BWP-UplinkDedicatedSDT-r17 ::= SEQUENCE -struct bwp_ul_ded_sdt_r17_s { - bool ext = false; - bool pusch_cfg_r17_present = false; - setup_release_c pusch_cfg_r17; - cfg_grant_cfg_to_add_mod_list_r16_l cfg_grant_cfg_to_add_mod_list_r17; - cfg_grant_cfg_to_release_list_r16_l cfg_grant_cfg_to_release_list_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PDCCH-BlindDetectionCA-MixedExt-r16 ::= SEQUENCE -struct pdcch_blind_detection_ca_mixed_ext_r16_s { - uint8_t pdcch_blind_detection_ca1_r16 = 1; - uint8_t pdcch_blind_detection_ca2_r16 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PDCCH-BlindDetectionCG-UE-MixedExt-r16 ::= SEQUENCE -struct pdcch_blind_detection_cg_ue_mixed_ext_r16_s { - uint8_t pdcch_blind_detection_cg_ue1_r16 = 0; - uint8_t pdcch_blind_detection_cg_ue2_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PDCCH-BlindDetectionMixedList-r16 ::= SEQUENCE -struct pdcch_blind_detection_mixed_list_r16_s { - struct pdcch_blind_detection_ca_mixed_ext_r16_c_ { - struct types_opts { - enum options { - pdcch_blind_detection_ca_mixed_v16a0, - pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0, - nulltype - } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - pdcch_blind_detection_ca_mixed_ext_r16_c_() = default; - pdcch_blind_detection_ca_mixed_ext_r16_c_(const pdcch_blind_detection_ca_mixed_ext_r16_c_& other); - pdcch_blind_detection_ca_mixed_ext_r16_c_& operator=(const pdcch_blind_detection_ca_mixed_ext_r16_c_& other); - ~pdcch_blind_detection_ca_mixed_ext_r16_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 - pdcch_blind_detection_ca_mixed_ext_r16_s& pdcch_blind_detection_ca_mixed_v16a0() - { - assert_choice_type(types::pdcch_blind_detection_ca_mixed_v16a0, type_, "pdcch-BlindDetectionCA-MixedExt-r16"); - return c.get(); - } - pdcch_blind_detection_ca_mixed_ext_r16_s& pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0() - { - assert_choice_type( - types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0, type_, "pdcch-BlindDetectionCA-MixedExt-r16"); - return c.get(); - } - const pdcch_blind_detection_ca_mixed_ext_r16_s& pdcch_blind_detection_ca_mixed_v16a0() const - { - assert_choice_type(types::pdcch_blind_detection_ca_mixed_v16a0, type_, "pdcch-BlindDetectionCA-MixedExt-r16"); - return c.get(); - } - const pdcch_blind_detection_ca_mixed_ext_r16_s& pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0() const - { - assert_choice_type( - types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0, type_, "pdcch-BlindDetectionCA-MixedExt-r16"); - return c.get(); - } - pdcch_blind_detection_ca_mixed_ext_r16_s& set_pdcch_blind_detection_ca_mixed_v16a0(); - pdcch_blind_detection_ca_mixed_ext_r16_s& set_pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct pdcch_blind_detection_cg_ue_mixed_ext_r16_s_ { - pdcch_blind_detection_cg_ue_mixed_ext_r16_s pdcch_blind_detection_mcg_ue_mixed_v16a0; - pdcch_blind_detection_cg_ue_mixed_ext_r16_s pdcch_blind_detection_scg_ue_mixed_v16a0; - }; - - // member variables - bool pdcch_blind_detection_ca_mixed_ext_r16_present = false; - bool pdcch_blind_detection_cg_ue_mixed_ext_r16_present = false; - pdcch_blind_detection_ca_mixed_ext_r16_c_ pdcch_blind_detection_ca_mixed_ext_r16; - pdcch_blind_detection_cg_ue_mixed_ext_r16_s_ pdcch_blind_detection_cg_ue_mixed_ext_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CA-ParametersNR-v16a0 ::= SEQUENCE -struct ca_params_nr_v16a0_s { - using pdcch_blind_detection_mixed_list_r16_l_ = dyn_array; - - // member variables - pdcch_blind_detection_mixed_list_r16_l_ pdcch_blind_detection_mixed_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CA-ParametersNRDC-v16a0 ::= SEQUENCE -struct ca_params_nrdc_v16a0_s { - bool ca_params_nr_for_dc_v16a0_present = false; - ca_params_nr_v16a0_s ca_params_nr_for_dc_v16a0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BandCombination-v16a0 ::= SEQUENCE -struct band_combination_v16a0_s { - bool ca_params_nr_v16a0_present = false; - bool ca_params_nrdc_v16a0_present = false; - ca_params_nr_v16a0_s ca_params_nr_v16a0; - ca_params_nrdc_v16a0_s ca_params_nrdc_v16a0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BandCombination-UplinkTxSwitch-v16a0 ::= SEQUENCE -struct band_combination_ul_tx_switch_v16a0_s { - bool band_combination_v16a0_present = false; - band_combination_v16a0_s band_combination_v16a0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BandCombinationList-UplinkTxSwitch-v16a0 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-UplinkTxSwitch-v16a0 -using band_combination_list_ul_tx_switch_v16a0_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; - -// BandCombinationList-v15g0 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v15g0 -using band_combination_list_v15g0_l = dyn_array; - -// BandCombinationList-v16a0 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v16a0 -using band_combination_list_v16a0_l = dyn_array; - -// CG-SDT-ConfigLCH-Restriction-r17 ::= SEQUENCE -struct cg_sdt_cfg_lch_restrict_r17_s { - using allowed_cg_list_r17_l_ = bounded_array; - - // member variables - bool cfg_grant_type1_allowed_r17_present = false; - bool allowed_cg_list_r17_present = false; - uint8_t lc_ch_id_r17 = 1; - allowed_cg_list_r17_l_ allowed_cg_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CellGrouping-r16 ::= SEQUENCE -struct cell_grouping_r16_s { - using mcg_r16_l_ = dyn_array; - using scg_r16_l_ = dyn_array; - struct mode_r16_opts { - enum options { sync, async, nulltype } value; - - const char* to_string() const; - }; - using mode_r16_e_ = enumerated; - - // member variables - mcg_r16_l_ mcg_r16; - scg_r16_l_ scg_r16; - mode_r16_e_ mode_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CondReconfigExecCondSCG-r17 ::= SEQUENCE (SIZE (1..2)) OF INTEGER (1..64) -using cond_recfg_exec_cond_scg_r17_l = bounded_array; - -// MeasAndMobParametersMRDC-XDD-Diff-v1560 ::= SEQUENCE -struct meas_and_mob_params_mrdc_xdd_diff_v1560_s { - bool sftd_meas_pscell_nedc_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasAndMobParametersMRDC-Common-v1730 ::= SEQUENCE -struct meas_and_mob_params_mrdc_common_v1730_s { - struct independent_gap_cfg_max_cc_r17_s_ { - bool fr1_only_r17_present = false; - bool fr2_only_r17_present = false; - bool fr1_and_fr2_r17_present = false; - uint8_t fr1_only_r17 = 1; - uint8_t fr2_only_r17 = 1; - uint8_t fr1_and_fr2_r17 = 1; - }; - - // member variables - independent_gap_cfg_max_cc_r17_s_ independent_gap_cfg_max_cc_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasAndMobParametersMRDC-v1730 ::= SEQUENCE -struct meas_and_mob_params_mrdc_v1730_s { - bool meas_and_mob_params_mrdc_common_v1730_present = false; - meas_and_mob_params_mrdc_common_v1730_s meas_and_mob_params_mrdc_common_v1730; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultCellListSFTD-EUTRA ::= SEQUENCE (SIZE (1..3)) OF MeasResultSFTD-EUTRA -using meas_result_cell_list_sftd_eutra_l = dyn_array; - -// MeasResultSCG-Failure ::= SEQUENCE -struct meas_result_scg_fail_s { - bool ext = false; - meas_result_list2_nr_l meas_result_per_mo_list; - // ... - // group 0 - copy_ptr location_info_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// Phy-ParametersCommon-v16a0 ::= SEQUENCE -struct phy_params_common_v16a0_s { - bool srs_periodicity_and_offset_ext_r16_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-Parameters-v16a0 ::= SEQUENCE -struct phy_params_v16a0_s { - bool phy_params_common_v16a0_present = false; - phy_params_common_v16a0_s phy_params_common_v16a0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NAICS-Capability-Entry ::= SEQUENCE -struct naics_cap_entry_s { - struct nof_aggr_prb_opts { - enum options { - n50, - n75, - n100, - n125, - n150, - n175, - n200, - n225, - n250, - n275, - n300, - n350, - n400, - n450, - n500, - spare, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using nof_aggr_prb_e_ = enumerated; - - // member variables - bool ext = false; - uint8_t nof_naics_capable_cc = 1; - nof_aggr_prb_e_ nof_aggr_prb; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// Phy-ParametersMRDC ::= SEQUENCE -struct phy_params_mrdc_s { - using naics_cap_list_l_ = dyn_array; - - // member variables - bool ext = false; - naics_cap_list_l_ naics_cap_list; - // ... - // group 0 - copy_ptr sp_cell_placement; - // group 1 - bool tdd_pcell_ul_tx_all_ul_sf_r16_present = false; - bool fdd_pcell_ul_tx_all_ul_sf_r16_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-v15g0 ::= SEQUENCE -struct rf_params_v15g0_s { - band_combination_list_v15g0_l supported_band_combination_list_v15g0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RF-Parameters-v16a0 ::= SEQUENCE -struct rf_params_v16a0_s { - band_combination_list_v16a0_l supported_band_combination_list_v16a0; - band_combination_list_ul_tx_switch_v16a0_l supported_band_combination_list_ul_tx_switch_v16a0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BandNR-v16c0 ::= SEQUENCE -struct band_nr_v16c0_s { - bool ext = false; - bool pusch_repeat_type_a_v16c0_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-v16c0 ::= SEQUENCE -struct rf_params_v16c0_s { - using supported_band_list_nr_v16c0_l_ = dyn_array; - - // member variables - supported_band_list_nr_v16c0_l_ supported_band_list_nr_v16c0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RF-ParametersMRDC ::= SEQUENCE -struct rf_params_mrdc_s { - struct supported_band_combination_list_nedc_only_v15a0_s_ { - 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; - }; - struct supported_band_combination_list_nedc_only_v1720_s_ { - band_combination_list_v1700_l supported_band_combination_list_v1700; - band_combination_list_v1720_l supported_band_combination_list_v1720; - }; - - // member variables - bool ext = false; - band_combination_list_l supported_band_combination_list; - freq_band_list_l applied_freq_band_list_filt; - // ... - // group 0 - bool srs_switching_time_requested_present = false; - 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; - // group 7 - copy_ptr supported_band_combination_list_v1610; - copy_ptr supported_band_combination_list_nedc_only_v1610; - copy_ptr supported_band_combination_list_ul_tx_switch_r16; - // group 8 - copy_ptr supported_band_combination_list_v1630; - copy_ptr supported_band_combination_list_nedc_only_v1630; - copy_ptr supported_band_combination_list_ul_tx_switch_v1630; - // group 9 - copy_ptr supported_band_combination_list_v1640; - copy_ptr supported_band_combination_list_nedc_only_v1640; - copy_ptr supported_band_combination_list_ul_tx_switch_v1640; - // group 10 - copy_ptr supported_band_combination_list_ul_tx_switch_v1670; - // group 11 - copy_ptr supported_band_combination_list_v1700; - copy_ptr supported_band_combination_list_ul_tx_switch_v1700; - // group 12 - copy_ptr supported_band_combination_list_v1720; - copy_ptr supported_band_combination_list_nedc_only_v1720; - copy_ptr supported_band_combination_list_ul_tx_switch_v1720; - // group 13 - copy_ptr supported_band_combination_list_v1730; - copy_ptr supported_band_combination_list_nedc_only_v1730; - copy_ptr supported_band_combination_list_ul_tx_switch_v1730; - // group 14 - copy_ptr supported_band_combination_list_v1740; - copy_ptr supported_band_combination_list_nedc_only_v1740; - copy_ptr supported_band_combination_list_ul_tx_switch_v1740; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RF-ParametersMRDC-v15g0 ::= SEQUENCE -struct rf_params_mrdc_v15g0_s { - band_combination_list_v15g0_l supported_band_combination_list_v15g0; - band_combination_list_v15g0_l supported_band_combination_list_nedc_only_v15g0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CG-SDT-TA-ValidationConfig-r17 ::= SEQUENCE -struct cg_sdt_ta_validation_cfg_r17_s { - struct cg_sdt_rsrp_change_thres_r17_opts { - enum options { - db2, - db4, - db6, - db8, - db10, - db14, - db18, - db22, - db26, - db30, - db34, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using cg_sdt_rsrp_change_thres_r17_e_ = enumerated; - - // member variables - cg_sdt_rsrp_change_thres_r17_e_ cg_sdt_rsrp_change_thres_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SDT-MAC-PHY-CG-Config-r17 ::= SEQUENCE -struct sdt_mac_phy_cg_cfg_r17_s { - using cg_sdt_cfg_lch_restrict_to_add_mod_list_r17_l_ = dyn_array; - using cg_sdt_cfg_lch_restrict_to_release_list_r17_l_ = bounded_array; - - // member variables - bool ext = false; - bool cg_sdt_cfg_init_bwp_n_ul_r17_present = false; - bool cg_sdt_cfg_init_bwp_sul_r17_present = false; - bool cg_sdt_cfg_init_bwp_dl_r17_present = false; - bool cg_sdt_time_align_timer_r17_present = false; - bool cg_sdt_rsrp_thres_ssb_r17_present = false; - bool cg_sdt_ta_validation_cfg_r17_present = false; - bool cg_sdt_cs_rnti_r17_present = false; - cg_sdt_cfg_lch_restrict_to_add_mod_list_r17_l_ cg_sdt_cfg_lch_restrict_to_add_mod_list_r17; - cg_sdt_cfg_lch_restrict_to_release_list_r17_l_ cg_sdt_cfg_lch_restrict_to_release_list_r17; - setup_release_c cg_sdt_cfg_init_bwp_n_ul_r17; - setup_release_c cg_sdt_cfg_init_bwp_sul_r17; - bwp_dl_ded_sdt_r17_s cg_sdt_cfg_init_bwp_dl_r17; - time_align_timer_e cg_sdt_time_align_timer_r17; - uint8_t cg_sdt_rsrp_thres_ssb_r17 = 0; - setup_release_c cg_sdt_ta_validation_cfg_r17; - uint32_t cg_sdt_cs_rnti_r17 = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-ConfigCommonNR-r16 ::= SEQUENCE -struct sl_cfg_common_nr_r16_s { - using sl_freq_info_list_r16_l_ = dyn_array; - using sl_radio_bearer_cfg_list_r16_l_ = dyn_array; - using sl_rlc_bearer_cfg_list_r16_l_ = dyn_array; - struct t400_r16_opts { - enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t400_r16_e_ = enumerated; - struct sl_max_num_consecutive_dtx_r16_opts { - enum options { n1, n2, n3, n4, n6, n8, n16, n32, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using sl_max_num_consecutive_dtx_r16_e_ = enumerated; - - // member variables - bool sl_ue_sel_cfg_r16_present = false; - bool sl_meas_cfg_common_r16_present = false; - bool sl_csi_acquisition_r16_present = false; - bool sl_offset_dfn_r16_present = false; - bool t400_r16_present = false; - bool sl_max_num_consecutive_dtx_r16_present = false; - bool sl_ssb_prio_nr_r16_present = false; - sl_freq_info_list_r16_l_ sl_freq_info_list_r16; - sl_ue_sel_cfg_r16_s sl_ue_sel_cfg_r16; - sl_nr_anchor_carrier_freq_list_r16_l sl_nr_anchor_carrier_freq_list_r16; - sl_eutra_anchor_carrier_freq_list_r16_l sl_eutra_anchor_carrier_freq_list_r16; - sl_radio_bearer_cfg_list_r16_l_ sl_radio_bearer_cfg_list_r16; - sl_rlc_bearer_cfg_list_r16_l_ sl_rlc_bearer_cfg_list_r16; - sl_meas_cfg_common_r16_s sl_meas_cfg_common_r16; - uint16_t sl_offset_dfn_r16 = 1; - t400_r16_e_ t400_r16; - sl_max_num_consecutive_dtx_r16_e_ sl_max_num_consecutive_dtx_r16; - uint8_t sl_ssb_prio_nr_r16 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-DiscConfigCommon-r17 ::= SEQUENCE -struct sl_disc_cfg_common_r17_s { - sl_relay_ue_cfg_r17_s sl_relay_ue_cfg_common_r17; - sl_remote_ue_cfg_r17_s sl_remote_ue_cfg_common_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UE-TimersAndConstantsRemoteUE-r17 ::= SEQUENCE -struct ue_timers_and_consts_remote_ue_r17_s { - struct t300_remote_ue_r17_opts { - enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t300_remote_ue_r17_e_ = enumerated; - struct t301_remote_ue_r17_opts { - enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t301_remote_ue_r17_e_ = enumerated; - struct t319_remote_ue_r17_opts { - enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using t319_remote_ue_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool t300_remote_ue_r17_present = false; - bool t301_remote_ue_r17_present = false; - bool t319_remote_ue_r17_present = false; - t300_remote_ue_r17_e_ t300_remote_ue_r17; - t301_remote_ue_r17_e_ t301_remote_ue_r17; - t319_remote_ue_r17_e_ t319_remote_ue_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SIB12-IEs-r16 ::= SEQUENCE -struct sib12_ies_r16_s { - bool ext = false; - sl_cfg_common_nr_r16_s sl_cfg_common_nr_r16; - dyn_octstring late_non_crit_ext; - // ... - // group 0 - bool sl_l2_u2_n_relay_r17_present = false; - bool sl_non_relay_discovery_r17_present = false; - bool sl_l3_u2_n_relay_discovery_r17_present = false; - copy_ptr sl_drx_cfg_common_gc_bc_r17; - copy_ptr sl_disc_cfg_common_r17; - copy_ptr sl_timers_and_consts_remote_ue_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// TRS-ResourceSet-r17 ::= SEQUENCE -struct trs_res_set_r17_s { - struct pwr_ctrl_offset_ss_r17_opts { - enum options { db_neg3, db0, db3, db6, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using pwr_ctrl_offset_ss_r17_e_ = enumerated; - struct scrambling_id_info_r17_c_ { - using scrambling_id_per_res_list_with2_r17_l_ = std::array; - using scrambling_id_per_res_list_with4_r17_l_ = std::array; - struct types_opts { - enum options { - scrambling_id_for_common_r17, - scrambling_id_per_res_list_with2_r17, - scrambling_id_per_res_list_with4_r17, - // ... - nulltype - } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - scrambling_id_info_r17_c_() = default; - scrambling_id_info_r17_c_(const scrambling_id_info_r17_c_& other); - scrambling_id_info_r17_c_& operator=(const scrambling_id_info_r17_c_& other); - ~scrambling_id_info_r17_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& scrambling_id_for_common_r17() - { - assert_choice_type(types::scrambling_id_for_common_r17, type_, "scramblingID-Info-r17"); - return c.get(); - } - scrambling_id_per_res_list_with2_r17_l_& scrambling_id_per_res_list_with2_r17() - { - assert_choice_type(types::scrambling_id_per_res_list_with2_r17, type_, "scramblingID-Info-r17"); - return c.get(); - } - scrambling_id_per_res_list_with4_r17_l_& scrambling_id_per_res_list_with4_r17() - { - assert_choice_type(types::scrambling_id_per_res_list_with4_r17, type_, "scramblingID-Info-r17"); - return c.get(); - } - const uint16_t& scrambling_id_for_common_r17() const - { - assert_choice_type(types::scrambling_id_for_common_r17, type_, "scramblingID-Info-r17"); - return c.get(); - } - const scrambling_id_per_res_list_with2_r17_l_& scrambling_id_per_res_list_with2_r17() const - { - assert_choice_type(types::scrambling_id_per_res_list_with2_r17, type_, "scramblingID-Info-r17"); - return c.get(); - } - const scrambling_id_per_res_list_with4_r17_l_& scrambling_id_per_res_list_with4_r17() const - { - assert_choice_type(types::scrambling_id_per_res_list_with4_r17, type_, "scramblingID-Info-r17"); - return c.get(); - } - uint16_t& set_scrambling_id_for_common_r17(); - scrambling_id_per_res_list_with2_r17_l_& set_scrambling_id_per_res_list_with2_r17(); - scrambling_id_per_res_list_with4_r17_l_& set_scrambling_id_per_res_list_with4_r17(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct periodicity_and_offset_r17_c_ { - struct types_opts { - enum options { slots10, slots20, slots40, slots80, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - periodicity_and_offset_r17_c_() = default; - periodicity_and_offset_r17_c_(const periodicity_and_offset_r17_c_& other); - periodicity_and_offset_r17_c_& operator=(const periodicity_and_offset_r17_c_& other); - ~periodicity_and_offset_r17_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& slots10() - { - assert_choice_type(types::slots10, type_, "periodicityAndOffset-r17"); - return c.get(); - } - uint8_t& slots20() - { - assert_choice_type(types::slots20, type_, "periodicityAndOffset-r17"); - return c.get(); - } - uint8_t& slots40() - { - assert_choice_type(types::slots40, type_, "periodicityAndOffset-r17"); - return c.get(); - } - uint8_t& slots80() - { - assert_choice_type(types::slots80, type_, "periodicityAndOffset-r17"); - return c.get(); - } - const uint8_t& slots10() const - { - assert_choice_type(types::slots10, type_, "periodicityAndOffset-r17"); - return c.get(); - } - const uint8_t& slots20() const - { - assert_choice_type(types::slots20, type_, "periodicityAndOffset-r17"); - return c.get(); - } - const uint8_t& slots40() const - { - assert_choice_type(types::slots40, type_, "periodicityAndOffset-r17"); - return c.get(); - } - const uint8_t& slots80() const - { - assert_choice_type(types::slots80, type_, "periodicityAndOffset-r17"); - return c.get(); - } - uint8_t& set_slots10(); - uint8_t& set_slots20(); - uint8_t& set_slots40(); - uint8_t& set_slots80(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct nrof_res_r17_opts { - enum options { n2, n4, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using nrof_res_r17_e_ = enumerated; - - // member variables - pwr_ctrl_offset_ss_r17_e_ pwr_ctrl_offset_ss_r17; - scrambling_id_info_r17_c_ scrambling_id_info_r17; - uint8_t first_ofdm_symbol_in_time_domain_r17 = 0; - uint16_t start_rb_r17 = 0; - uint16_t nrof_rbs_r17 = 24; - uint8_t ssb_idx_r17 = 0; - periodicity_and_offset_r17_c_ periodicity_and_offset_r17; - fixed_bitstring<4> freq_domain_alloc_r17; - uint8_t ind_bit_id_r17 = 0; - nrof_res_r17_e_ nrof_res_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SIB17-IEs-r17 ::= SEQUENCE -struct sib17_ies_r17_s { - using trs_res_set_cfg_r17_l_ = dyn_array; - struct validity_dur_r17_opts { - enum options { - t1, - t2, - t4, - t8, - t16, - t32, - t64, - t128, - t256, - t512, - infinity, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef int16_t number_type; - - const char* to_string() const; - int16_t to_number() const; - }; - using validity_dur_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool validity_dur_r17_present = false; - trs_res_set_cfg_r17_l_ trs_res_set_cfg_r17; - validity_dur_r17_e_ validity_dur_r17; - 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; -}; - -// SL-ServingCellInfo-r17 ::= SEQUENCE -struct sl_serving_cell_info_r17_s { - uint16_t sl_pci_r17 = 0; - uint32_t sl_carrier_freq_nr_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SRS-PosConfig-r17 ::= SEQUENCE -struct srs_pos_cfg_r17_s { - using srs_pos_res_set_to_release_list_r17_l_ = bounded_array; - using srs_pos_res_set_to_add_mod_list_r17_l_ = dyn_array; - using srs_pos_res_to_release_list_r17_l_ = dyn_array; - using srs_pos_res_to_add_mod_list_r17_l_ = dyn_array; - - // member variables - srs_pos_res_set_to_release_list_r17_l_ srs_pos_res_set_to_release_list_r17; - srs_pos_res_set_to_add_mod_list_r17_l_ srs_pos_res_set_to_add_mod_list_r17; - srs_pos_res_to_release_list_r17_l_ srs_pos_res_to_release_list_r17; - srs_pos_res_to_add_mod_list_r17_l_ srs_pos_res_to_add_mod_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RSRP-ChangeThreshold-r17 ::= ENUMERATED -struct rsrp_change_thres_r17_opts { - enum options { - db4, - db6, - db8, - db10, - db14, - db18, - db22, - db26, - db30, - db34, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; -}; -using rsrp_change_thres_r17_e = enumerated; - -// SRS-PosRRC-InactiveConfig-r17 ::= SEQUENCE -struct srs_pos_rrc_inactive_cfg_r17_s { - bool srs_pos_cfg_n_ul_r17_present = false; - bool srs_pos_cfg_sul_r17_present = false; - bool bwp_n_ul_r17_present = false; - bool bwp_sul_r17_present = false; - bool inactive_pos_srs_time_align_timer_r17_present = false; - bool inactive_pos_srs_rsrp_change_thres_r17_present = false; - srs_pos_cfg_r17_s srs_pos_cfg_n_ul_r17; - srs_pos_cfg_r17_s srs_pos_cfg_sul_r17; - bwp_s bwp_n_ul_r17; - bwp_s bwp_sul_r17; - time_align_timer_e inactive_pos_srs_time_align_timer_r17; - rsrp_change_thres_r17_e inactive_pos_srs_rsrp_change_thres_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - }; - struct codebook_type_request_r16_s_ { - bool type1_single_panel_r16_present = false; - bool type1_multi_panel_r16_present = false; - bool type2_r16_present = false; - bool type2_port_sel_r16_present = false; - }; - using requested_cell_grouping_r16_l_ = dyn_array; - - // member variables - bool ext = false; - bool mrdc_request_present = false; - mrdc_request_s_ mrdc_request; - // ... - // group 0 - bool ul_tx_switch_request_r16_present = false; - copy_ptr codebook_type_request_r16; - // group 1 - copy_ptr requested_cell_grouping_r16; - // group 2 - bool fallback_group_five_request_r17_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-CapabilityRequestFilterNR-v1710 ::= SEQUENCE -struct ue_cap_request_filt_nr_v1710_s { - bool sidelink_request_r17_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; -}; - -// UE-CapabilityRequestFilterNR-v1540 ::= SEQUENCE -struct ue_cap_request_filt_nr_v1540_s { - bool srs_switching_time_request_present = false; - bool non_crit_ext_present = false; - ue_cap_request_filt_nr_v1710_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-CapabilityRequestFilterNR ::= SEQUENCE -struct ue_cap_request_filt_nr_s { - bool non_crit_ext_present = false; - freq_band_list_l freq_band_list_filt; - ue_cap_request_filt_nr_v1540_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-MRDC-Capability-v1730 ::= SEQUENCE -struct ue_mrdc_cap_v1730_s { - bool meas_and_mob_params_mrdc_v1730_present = false; - bool non_crit_ext_present = false; - meas_and_mob_params_mrdc_v1730_s meas_and_mob_params_mrdc_v1730; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// GeneralParametersMRDC-v1610 ::= SEQUENCE -struct general_params_mrdc_v1610_s { - bool f1c_over_eutra_r16_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PDCP-ParametersMRDC-v1610 ::= SEQUENCE -struct pdcp_params_mrdc_v1610_s { - bool scg_drb_nr_iab_r16_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-Capability-v1700 ::= SEQUENCE -struct ue_mrdc_cap_v1700_s { - bool non_crit_ext_present = false; - meas_and_mob_params_mrdc_v1700_s meas_and_mob_params_mrdc_v1700; - ue_mrdc_cap_v1730_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-MRDC-Capability-v1610 ::= SEQUENCE -struct ue_mrdc_cap_v1610_s { - bool meas_and_mob_params_mrdc_v1610_present = false; - bool general_params_mrdc_v1610_present = false; - bool pdcp_params_mrdc_v1610_present = false; - bool non_crit_ext_present = false; - meas_and_mob_params_mrdc_v1610_s meas_and_mob_params_mrdc_v1610; - general_params_mrdc_v1610_s general_params_mrdc_v1610; - pdcp_params_mrdc_v1610_s pdcp_params_mrdc_v1610; - ue_mrdc_cap_v1700_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-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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PDCP-ParametersMRDC ::= SEQUENCE -struct pdcp_params_mrdc_s { - bool pdcp_dupl_split_srb_present = false; - bool pdcp_dupl_split_drb_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-Capability-v1560 ::= SEQUENCE -struct ue_mrdc_cap_v1560_s { - 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; - ue_mrdc_cap_v1610_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-MRDC-Capability ::= SEQUENCE -struct ue_mrdc_cap_s { - using feature_set_combinations_l_ = dyn_array; - - // member variables - bool meas_and_mob_params_mrdc_present = false; - bool phy_params_mrdc_v1530_present = false; - bool general_params_mrdc_present = false; - bool fdd_add_ue_mrdc_cap_present = false; - bool tdd_add_ue_mrdc_cap_present = false; - bool fr1_add_ue_mrdc_cap_present = false; - bool fr2_add_ue_mrdc_cap_present = false; - bool pdcp_params_mrdc_v1530_present = false; - bool non_crit_ext_present = false; - meas_and_mob_params_mrdc_s meas_and_mob_params_mrdc; - phy_params_mrdc_s phy_params_mrdc_v1530; - rf_params_mrdc_s rf_params_mrdc; - general_params_mrdc_xdd_diff_s general_params_mrdc; - ue_mrdc_cap_add_xdd_mode_s fdd_add_ue_mrdc_cap; - ue_mrdc_cap_add_xdd_mode_s tdd_add_ue_mrdc_cap; - ue_mrdc_cap_add_frx_mode_s fr1_add_ue_mrdc_cap; - ue_mrdc_cap_add_frx_mode_s fr2_add_ue_mrdc_cap; - 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; -}; - -// UE-MRDC-Capability-v15g0 ::= SEQUENCE -struct ue_mrdc_cap_v15g0_s { - bool rf_params_mrdc_v15g0_present = false; - bool non_crit_ext_present = false; - rf_params_mrdc_v15g0_s rf_params_mrdc_v15g0; - - // 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-v16c0 ::= SEQUENCE -struct ue_nr_cap_v16c0_s { - bool rf_params_v16c0_present = false; - bool non_crit_ext_present = false; - rf_params_v16c0_s rf_params_v16c0; - - // 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-v16a0 ::= SEQUENCE -struct ue_nr_cap_v16a0_s { - bool phy_params_v16a0_present = false; - bool rf_params_v16a0_present = false; - bool non_crit_ext_present = false; - phy_params_v16a0_s phy_params_v16a0; - rf_params_v16a0_s rf_params_v16a0; - ue_nr_cap_v16c0_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-NR-Capability-v15j0 ::= SEQUENCE -struct ue_nr_cap_v15j0_s { - bool non_crit_ext_present = false; - dyn_octstring late_non_crit_ext; - ue_nr_cap_v16a0_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-v15c0 ::= SEQUENCE -struct nrdc_params_v15c0_s { - bool pdcp_dupl_split_srb_present = false; - bool pdcp_dupl_split_drb_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-v15g0 ::= SEQUENCE -struct ue_nr_cap_v15g0_s { - bool rf_params_v15g0_present = false; - bool non_crit_ext_present = false; - rf_params_v15g0_s rf_params_v15g0; - ue_nr_cap_v15j0_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-NR-Capability-v15c0 ::= SEQUENCE -struct ue_nr_cap_v15c0_s { - bool nrdc_params_v15c0_present = false; - bool partial_fr2_fallback_rx_req_present = false; - bool non_crit_ext_present = false; - nrdc_params_v15c0_s nrdc_params_v15c0; - ue_nr_cap_v15g0_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; -}; - -// UECapabilityEnquiry-v1610-IEs ::= SEQUENCE -struct ue_cap_enquiry_v1610_ies_s { - bool rrc_seg_allowed_r16_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; -}; - -// 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; - ue_cap_enquiry_v1610_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 ::= SEQUENCE -struct as_cfg_s { - bool ext = false; - dyn_octstring rrc_recfg; - // ... - // group 0 - dyn_octstring source_rb_sn_cfg; - dyn_octstring source_scg_nr_cfg; - dyn_octstring source_scg_eutra_cfg; - // group 1 - bool source_scg_cfg_present = false; - // group 2 - copy_ptr sdt_cfg_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BandCombinationInfo ::= SEQUENCE -struct band_combination_info_s { - using allowed_feature_sets_list_l_ = dyn_array; - - // member variables - uint32_t band_combination_idx = 1; - allowed_feature_sets_list_l_ allowed_feature_sets_list; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ReestabNCellInfo ::= SEQUENCE -struct reestab_ncell_info_s { - fixed_bitstring<36> cell_id; - fixed_bitstring<256> key_g_node_b_star; - 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; -}; - -// BandCombinationInfoList ::= SEQUENCE (SIZE (1..65536)) OF BandCombinationInfo -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; - -// T-Offset-r16 ::= ENUMERATED -struct t_offset_r16_opts { - enum options { ms0dot5, ms0dot75, ms1, ms1dot5, ms2, ms2dot5, ms3, spare1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; -}; -using t_offset_r16_e = enumerated; - -// 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; -}; - -// ConfigRestrictInfoDAPS-r16 ::= SEQUENCE -struct cfg_restrict_info_daps_r16_s { - struct pwr_coordination_r16_s_ { - struct ul_pwr_sharing_daps_mode_r16_opts { - enum options { semi_static_mode1, semi_static_mode2, dyn, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ul_pwr_sharing_daps_mode_r16_e_ = enumerated; - - // member variables - int8_t p_daps_source_r16 = -30; - int8_t p_daps_target_r16 = -30; - ul_pwr_sharing_daps_mode_r16_e_ ul_pwr_sharing_daps_mode_r16; - }; - - // member variables - bool pwr_coordination_r16_present = false; - pwr_coordination_r16_s_ pwr_coordination_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ConfigRestrictInfoDAPS-v1640 ::= SEQUENCE -struct cfg_restrict_info_daps_v1640_s { - uint16_t source_feature_set_per_dl_cc_r16 = 1; - uint16_t source_feature_set_per_ul_cc_r16 = 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_ { - bool p_max_nr_fr1_present = false; - bool p_max_eutra_present = false; - bool p_max_ue_fr1_present = false; - int8_t p_max_nr_fr1 = -30; - int8_t p_max_eutra = -30; - int8_t p_max_ue_fr1 = -30; - }; - struct serv_cell_idx_range_scg_s_ { - uint8_t low_bound = 0; - uint8_t up_bound = 0; - }; - using sel_band_entries_mn_list_l_ = dyn_array; - struct pwr_coordination_fr2_r16_s_ { - bool p_max_nr_fr2_mcg_r16_present = false; - bool p_max_nr_fr2_scg_r16_present = false; - bool p_max_ue_fr2_r16_present = false; - int8_t p_max_nr_fr2_mcg_r16 = -30; - int8_t p_max_nr_fr2_scg_r16 = -30; - int8_t p_max_ue_fr2_r16 = -30; - }; - struct nrdc_pc_mode_fr1_r16_opts { - enum options { semi_static_mode1, semi_static_mode2, dyn, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using nrdc_pc_mode_fr1_r16_e_ = enumerated; - struct nrdc_pc_mode_fr2_r16_opts { - enum options { semi_static_mode1, semi_static_mode2, dyn, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using nrdc_pc_mode_fr2_r16_e_ = enumerated; - - // member variables - bool ext = 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 = 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; - // group 2 - bool p_max_nr_fr1_mcg_r16_present = false; - bool nrdc_pc_mode_fr1_r16_present = false; - bool nrdc_pc_mode_fr2_r16_present = false; - bool max_meas_srs_res_scg_r16_present = false; - bool max_meas_cli_res_scg_r16_present = false; - bool max_num_ehc_contexts_sn_r16_present = false; - bool max_toffset_r16_present = false; - int8_t p_max_nr_fr1_mcg_r16 = -30; - copy_ptr pwr_coordination_fr2_r16; - nrdc_pc_mode_fr1_r16_e_ nrdc_pc_mode_fr1_r16; - nrdc_pc_mode_fr2_r16_e_ nrdc_pc_mode_fr2_r16; - uint8_t max_meas_srs_res_scg_r16 = 0; - uint8_t max_meas_cli_res_scg_r16 = 0; - uint32_t max_num_ehc_contexts_sn_r16 = 0; - copy_ptr allowed_reduced_cfg_for_overheat_r16; - t_offset_r16_e max_toffset_r16; - // group 3 - bool max_num_udc_drb_r17_present = false; - bool max_num_cp_cc_andidates_r17_present = false; - copy_ptr allowed_reduced_cfg_for_overheat_r17; - uint8_t max_num_udc_drb_r17 = 0; - uint8_t max_num_cp_cc_andidates_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ReestablishmentInfo ::= SEQUENCE -struct reest_info_s { - uint16_t source_pci = 0; - fixed_bitstring<16> target_cell_short_mac_i; - reestab_ncell_info_list_l add_reestab_info_list; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AS-Context ::= SEQUENCE -struct as_context_s { - bool ext = false; - bool reest_info_present = false; - bool cfg_restrict_info_present = false; - reest_info_s reest_info; - cfg_restrict_info_scg_s cfg_restrict_info; - // ... - // group 0 - copy_ptr ran_notif_area_info; - // group 1 - dyn_octstring ue_assist_info; - // group 2 - copy_ptr sel_band_combination_sn; - // group 3 - copy_ptr cfg_restrict_info_daps_r16; - dyn_octstring sidelink_ue_info_nr_r16; - dyn_octstring sidelink_ue_info_eutra_r16; - dyn_octstring ue_assist_info_eutra_r16; - dyn_octstring ue_assist_info_scg_r16; - copy_ptr need_for_gaps_info_nr_r16; - // group 4 - copy_ptr cfg_restrict_info_daps_v1640; - // group 5 - copy_ptr need_for_gap_ncsg_info_nr_r17; - copy_ptr need_for_gap_ncsg_info_eutra_r17; - dyn_octstring mbs_interest_ind_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AffectedCarrierFreqCombEUTRA ::= SEQUENCE (SIZE (1..32)) OF INTEGER (0..262143) -using affected_carrier_freq_comb_eutra_l = bounded_array; - -// AffectedCarrierFreqCombNR ::= SEQUENCE (SIZE (1..32)) OF INTEGER (0..3279165) -using affected_carrier_freq_comb_nr_l = bounded_array; - -// VictimSystemType ::= SEQUENCE -struct victim_sys_type_s { - bool gps_present = false; - bool glonass_present = false; - bool bds_present = false; - bool galileo_present = false; - bool wlan_present = false; - bool bluetooth_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AffectedCarrierFreqCombInfoMRDC ::= SEQUENCE -struct affected_carrier_freq_comb_info_mrdc_s { - struct interference_direction_mrdc_opts { - enum options { eutra_nr, nr, other, utra_nr_other, nr_other, spare3, spare2, spare1, nulltype } value; - - const char* to_string() const; - }; - using interference_direction_mrdc_e_ = enumerated; - struct affected_carrier_freq_comb_mrdc_s_ { - affected_carrier_freq_comb_eutra_l affected_carrier_freq_comb_eutra; - affected_carrier_freq_comb_nr_l affected_carrier_freq_comb_nr; - }; - - // member variables - bool affected_carrier_freq_comb_mrdc_present = false; - victim_sys_type_s victim_sys_type; - interference_direction_mrdc_e_ interference_direction_mrdc; - affected_carrier_freq_comb_mrdc_s_ affected_carrier_freq_comb_mrdc; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CG-CandidateInfoId-r17 ::= SEQUENCE -struct cg_candidate_info_id_r17_s { - uint32_t ssb_freq_r17 = 0; - uint16_t pci_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CG-CandidateInfo-r17 ::= SEQUENCE -struct cg_candidate_info_r17_s { - cg_candidate_info_id_r17_s cg_candidate_info_id_r17; - dyn_octstring candidate_cg_cfg_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CG-CandidateList-r17-IEs ::= SEQUENCE -struct cg_candidate_list_r17_ies_s { - using cg_candidate_to_add_mod_list_r17_l_ = dyn_array; - using cg_candidate_to_release_list_r17_l_ = dyn_array; - - // member variables - bool non_crit_ext_present = false; - cg_candidate_to_add_mod_list_r17_l_ cg_candidate_to_add_mod_list_r17; - cg_candidate_to_release_list_r17_l_ cg_candidate_to_release_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CG-CandidateList ::= SEQUENCE -struct cg_candidate_list_s { - struct crit_exts_c_ { - struct c1_c_ { - struct types_opts { - enum options { cg_candidate_list_r17, spare3, spare2, spare1, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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 - cg_candidate_list_r17_ies_s& cg_candidate_list_r17() - { - assert_choice_type(types::cg_candidate_list_r17, type_, "c1"); - return c; - } - const cg_candidate_list_r17_ies_s& cg_candidate_list_r17() const - { - assert_choice_type(types::cg_candidate_list_r17, type_, "c1"); - return c; - } - cg_candidate_list_r17_ies_s& set_cg_candidate_list_r17(); - void set_spare3(); - void set_spare2(); - void set_spare1(); - - private: - types type_; - cg_candidate_list_r17_ies_s c; - }; - struct types_opts { - enum options { c1, crit_exts_future, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - c1_c_& c1() - { - assert_choice_type(types::c1, type_, "criticalExtensions"); - return c; - } - const c1_c_& c1() const - { - assert_choice_type(types::c1, type_, "criticalExtensions"); - return c; - } - c1_c_& set_c1(); - void set_crit_exts_future(); - - private: - types type_; - c1_c_ c; - }; - - // 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; -}; - -// CandidateCell-r17 ::= SEQUENCE -struct candidate_cell_r17_s { - uint16_t pci_r17 = 0; - dyn_octstring cond_execution_cond_scg_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CandidateCellInfo-r17 ::= SEQUENCE -struct candidate_cell_info_r17_s { - using candidate_list_r17_l_ = dyn_array; - - // member variables - uint32_t ssb_freq_r17 = 0; - candidate_list_r17_l_ candidate_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FrequencyConfig-NR-r16 ::= SEQUENCE -struct freq_cfg_nr_r16_s { - uint16_t freq_band_ind_nr_r16 = 1; - uint32_t carrier_center_freq_nr_r16 = 0; - uint16_t carrier_bw_nr_r16 = 1; - subcarrier_spacing_e subcarrier_spacing_nr_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// TransmissionBandwidth-EUTRA-r16 ::= ENUMERATED -struct tx_bw_eutra_r16_opts { - enum options { rb6, rb15, rb25, rb50, rb75, rb100, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; -}; -using tx_bw_eutra_r16_e = enumerated; - -// CG-Config-v1730-IEs ::= SEQUENCE -struct cg_cfg_v1730_ies_s { - bool fr1_carriers_scg_r17_present = false; - bool fr2_carriers_scg_r17_present = false; - bool non_crit_ext_present = false; - uint8_t fr1_carriers_scg_r17 = 1; - uint8_t fr2_carriers_scg_r17 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CandidateCellInfoListCPC-r17 ::= SEQUENCE (SIZE (1..8)) OF CandidateCellInfo-r17 -using candidate_cell_info_list_cp_c_r17_l = dyn_array; - -// ServCellInfoXCG-EUTRA-r16 ::= SEQUENCE -struct serv_cell_info_xcg_eutra_r16_s { - bool ext = false; - bool dl_carrier_freq_eutra_r16_present = false; - bool ul_carrier_freq_eutra_r16_present = false; - bool tx_bw_eutra_r16_present = false; - uint32_t dl_carrier_freq_eutra_r16 = 0; - uint32_t ul_carrier_freq_eutra_r16 = 0; - tx_bw_eutra_r16_e tx_bw_eutra_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ServCellInfoXCG-NR-r16 ::= SEQUENCE -struct serv_cell_info_xcg_nr_r16_s { - bool ext = false; - bool dl_freq_info_nr_r16_present = false; - bool ul_freq_info_nr_r16_present = false; - freq_cfg_nr_r16_s dl_freq_info_nr_r16; - freq_cfg_nr_r16_s ul_freq_info_nr_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CG-Config-v1700-IEs ::= SEQUENCE -struct cg_cfg_v1700_ies_s { - bool two_phr_mode_scg_r17_present = false; - bool non_crit_ext_present = false; - candidate_cell_info_list_cp_c_r17_l candidate_cell_info_list_cp_c_r17; - cg_cfg_v1730_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; -}; - -// ServCellInfoListSCG-EUTRA-r16 ::= SEQUENCE (SIZE (1..32)) OF ServCellInfoXCG-EUTRA-r16 -using serv_cell_info_list_scg_eutra_r16_l = dyn_array; - -// ServCellInfoListSCG-NR-r16 ::= SEQUENCE (SIZE (1..32)) OF ServCellInfoXCG-NR-r16 -using serv_cell_info_list_scg_nr_r16_l = dyn_array; - -// CG-Config-v1640-IEs ::= SEQUENCE -struct cg_cfg_v1640_ies_s { - bool non_crit_ext_present = false; - serv_cell_info_list_scg_nr_r16_l serv_cell_info_list_scg_nr_r16; - serv_cell_info_list_scg_eutra_r16_l serv_cell_info_list_scg_eutra_r16; - cg_cfg_v1700_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; -}; - -// CG-Config-v1630-IEs ::= SEQUENCE -struct cg_cfg_v1630_ies_s { - bool sel_toffset_r16_present = false; - bool non_crit_ext_present = false; - t_offset_r16_e sel_toffset_r16; - cg_cfg_v1640_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; -}; - -// CG-Config-v1620-IEs ::= SEQUENCE -struct cg_cfg_v1620_ies_s { - bool non_crit_ext_present = false; - dyn_octstring ue_assist_info_scg_r16; - cg_cfg_v1630_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; -}; - -// DRX-Info2 ::= SEQUENCE -struct drx_info2_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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using milli_seconds_e_ = enumerated; - struct types_opts { - enum options { sub_milli_seconds, milli_seconds, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::sub_milli_seconds, type_, "drx-onDurationTimer"); - return c.get(); - } - milli_seconds_e_& milli_seconds() - { - assert_choice_type(types::milli_seconds, type_, "drx-onDurationTimer"); - return c.get(); - } - const uint8_t& sub_milli_seconds() const - { - assert_choice_type(types::sub_milli_seconds, type_, "drx-onDurationTimer"); - return c.get(); - } - const milli_seconds_e_& milli_seconds() const - { - assert_choice_type(types::milli_seconds, type_, "drx-onDurationTimer"); - return c.get(); - } - uint8_t& set_sub_milli_seconds(); - milli_seconds_e_& set_milli_seconds(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - drx_on_dur_timer_c_ drx_on_dur_timer; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CG-Config-v1610-IEs ::= SEQUENCE -struct cg_cfg_v1610_ies_s { - bool drx_info_scg2_present = false; - bool non_crit_ext_present = false; - drx_info2_s drx_info_scg2; - cg_cfg_v1620_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-UplinkCarrierSCG ::= SEQUENCE -struct ph_ul_carrier_scg_s { - struct ph_type1or3_opts { - enum options { type1, type3, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ph_type1or3_e_ = enumerated; - - // member variables - bool ext = false; - ph_type1or3_e_ ph_type1or3; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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 non_crit_ext_present = false; - scell_frequencies_sn_nr_l_ scell_frequencies_sn_nr; - scell_frequencies_sn_eutra_l_ scell_frequencies_sn_eutra; - cg_cfg_v1610_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; -}; - -// 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; - bool ph_supplementary_ul_present = false; - uint8_t serv_cell_idx = 0; - ph_ul_carrier_scg_s ph_ul; - ph_ul_carrier_scg_s ph_supplementary_ul; - // ... - // group 0 - bool two_srs_pusch_repeat_r17_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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 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 { - enum options { fr1, fr2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using fr_type_e_ = enumerated; - - // member variables - uint8_t serv_cell_idx = 0; - fr_type_e_ fr_type; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NR-FreqInfo ::= SEQUENCE -struct nr_freq_info_s { - bool ext = false; - bool measured_freq_present = false; - uint32_t measured_freq = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PH-TypeListSCG ::= SEQUENCE (SIZE (1..32)) OF PH-InfoSCG -using ph_type_list_scg_l = dyn_array; - -// CG-Config-v1540-IEs ::= SEQUENCE -struct cg_cfg_v1540_ies_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; - }; - - // member variables - bool requested_cell_info_present = false; - requested_cell_info_s_ requested_cell_info; - }; - - // member variables - bool pscell_freq_present = false; - bool report_cgi_request_nr_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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CandidateServingFreqListNR ::= SEQUENCE (SIZE (1..32)) OF INTEGER (0..3279165) -using candidate_serving_freq_list_nr_l = bounded_array; - -// ConfigRestrictModReqSCG ::= SEQUENCE -struct cfg_restrict_mod_req_scg_s { - bool ext = false; - bool requested_bc_mrdc_present = false; - bool requested_p_max_fr1_present = false; - band_combination_info_sn_s requested_bc_mrdc; - int8_t requested_p_max_fr1 = -30; +// AS-Context ::= SEQUENCE +struct as_context_s { + bool ext = false; + bool reest_info_present = false; + bool cfg_restrict_info_present = false; + reest_info_s reest_info; + cfg_restrict_info_scg_s cfg_restrict_info; // ... // 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; + copy_ptr ran_notif_area_info; // group 1 - bool requested_p_max_fr2_r16_present = false; - bool requested_max_inter_freq_meas_id_scg_r16_present = false; - bool requested_max_intra_freq_meas_id_scg_r16_present = false; - bool requested_toffset_r16_present = false; - int8_t requested_p_max_fr2_r16 = -30; - uint8_t requested_max_inter_freq_meas_id_scg_r16 = 1; - uint8_t requested_max_intra_freq_meas_id_scg_r16 = 1; - t_offset_r16_e requested_toffset_r16; + dyn_octstring ue_assist_info; + // group 2 + copy_ptr sel_band_combination_sn; + // group 3 + copy_ptr cfg_restrict_info_daps_r16; + dyn_octstring sidelink_ue_info_nr_r16; + dyn_octstring sidelink_ue_info_eutra_r16; + dyn_octstring ue_assist_info_eutra_r16; + dyn_octstring ue_assist_info_scg_r16; + copy_ptr need_for_gaps_info_nr_r16; + // group 4 + copy_ptr cfg_restrict_info_daps_v1640; + // group 5 + copy_ptr need_for_gap_ncsg_info_nr_r17; + copy_ptr need_for_gap_ncsg_info_eutra_r17; + dyn_octstring mbs_interest_ind_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -6733,331 +1473,10 @@ struct cfg_restrict_mod_req_scg_s { void to_json(json_writer& j) const; }; -// DRX-Info ::= SEQUENCE -struct drx_info_s { - struct drx_long_cycle_start_offset_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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // 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_(); } - 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() - { - assert_choice_type(types::ms10, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms20() - { - assert_choice_type(types::ms20, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms32() - { - assert_choice_type(types::ms32, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms40() - { - assert_choice_type(types::ms40, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms60() - { - assert_choice_type(types::ms60, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms64() - { - assert_choice_type(types::ms64, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms70() - { - assert_choice_type(types::ms70, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms80() - { - assert_choice_type(types::ms80, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms128() - { - assert_choice_type(types::ms128, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& ms160() - { - assert_choice_type(types::ms160, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms256() - { - assert_choice_type(types::ms256, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms320() - { - assert_choice_type(types::ms320, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms512() - { - assert_choice_type(types::ms512, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms640() - { - assert_choice_type(types::ms640, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms1024() - { - assert_choice_type(types::ms1024, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms1280() - { - assert_choice_type(types::ms1280, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms2048() - { - assert_choice_type(types::ms2048, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms2560() - { - assert_choice_type(types::ms2560, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms5120() - { - assert_choice_type(types::ms5120, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint16_t& ms10240() - { - assert_choice_type(types::ms10240, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms10() const - { - assert_choice_type(types::ms10, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms20() const - { - assert_choice_type(types::ms20, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms32() const - { - assert_choice_type(types::ms32, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms40() const - { - assert_choice_type(types::ms40, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms60() const - { - assert_choice_type(types::ms60, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms64() const - { - assert_choice_type(types::ms64, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms70() const - { - assert_choice_type(types::ms70, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms80() const - { - assert_choice_type(types::ms80, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms128() const - { - assert_choice_type(types::ms128, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint8_t& ms160() const - { - assert_choice_type(types::ms160, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms256() const - { - assert_choice_type(types::ms256, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms320() const - { - assert_choice_type(types::ms320, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms512() const - { - assert_choice_type(types::ms512, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms640() const - { - assert_choice_type(types::ms640, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms1024() const - { - assert_choice_type(types::ms1024, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms1280() const - { - assert_choice_type(types::ms1280, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms2048() const - { - assert_choice_type(types::ms2048, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms2560() const - { - assert_choice_type(types::ms2560, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms5120() const - { - assert_choice_type(types::ms5120, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - const uint16_t& ms10240() const - { - assert_choice_type(types::ms10240, type_, "drx-LongCycleStartOffset"); - return c.get(); - } - uint8_t& set_ms10(); - uint8_t& set_ms20(); - uint8_t& set_ms32(); - uint8_t& set_ms40(); - uint8_t& set_ms60(); - uint8_t& set_ms64(); - uint8_t& set_ms70(); - uint8_t& set_ms80(); - uint8_t& set_ms128(); - uint8_t& set_ms160(); - uint16_t& set_ms256(); - uint16_t& set_ms320(); - uint16_t& set_ms512(); - uint16_t& set_ms640(); - uint16_t& set_ms1024(); - uint16_t& set_ms1280(); - uint16_t& set_ms2048(); - uint16_t& set_ms2560(); - uint16_t& set_ms5120(); - uint16_t& set_ms10240(); - - 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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using drx_short_cycle_e_ = enumerated; - - // member variables - drx_short_cycle_e_ drx_short_cycle; - uint8_t drx_short_cycle_timer = 1; - }; - - // member variables - bool short_drx_present = false; - drx_long_cycle_start_offset_c_ drx_long_cycle_start_offset; - short_drx_s_ short_drx; +// CG-CandidateInfoId-r17 ::= SEQUENCE +struct cg_candidate_info_id_r17_s { + uint32_t ssb_freq_r17 = 0; + uint16_t pci_r17 = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7065,41 +1484,26 @@ struct drx_info_s { void to_json(json_writer& j) const; }; -// FR-InfoList ::= SEQUENCE (SIZE (1..31)) OF FR-Info -using fr_info_list_l = dyn_array; - -// MeasConfigSN ::= SEQUENCE -struct meas_cfg_sn_s { - using measured_frequencies_sn_l_ = dyn_array; - - // member variables - bool ext = false; - measured_frequencies_sn_l_ measured_frequencies_sn; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +// CG-CandidateInfo-r17 ::= SEQUENCE +struct cg_candidate_info_r17_s { + cg_candidate_info_id_r17_s cg_candidate_info_id_r17; + dyn_octstring candidate_cg_cfg_r17; -// CG-Config-IEs ::= SEQUENCE -struct cg_cfg_ies_s { - bool cfg_restrict_mod_req_present = false; - bool drx_info_scg_present = false; - bool meas_cfg_sn_present = false; - bool sel_band_combination_present = false; - bool non_crit_ext_present = false; - dyn_octstring scg_cell_group_cfg; - dyn_octstring scg_rb_cfg; - cfg_restrict_mod_req_scg_s cfg_restrict_mod_req; - 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; - 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; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CG-CandidateList-r17-IEs ::= SEQUENCE +struct cg_candidate_list_r17_ies_s { + using cg_candidate_to_add_mod_list_r17_l_ = dyn_array; + using cg_candidate_to_release_list_r17_l_ = dyn_array; + + // member variables + bool non_crit_ext_present = false; + cg_candidate_to_add_mod_list_r17_l_ cg_candidate_to_add_mod_list_r17; + cg_candidate_to_release_list_r17_l_ cg_candidate_to_release_list_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7107,12 +1511,12 @@ struct cg_cfg_ies_s { void to_json(json_writer& j) const; }; -// CG-Config ::= SEQUENCE -struct cg_cfg_s { +// CG-CandidateList ::= SEQUENCE +struct cg_candidate_list_s { struct crit_exts_c_ { struct c1_c_ { struct types_opts { - enum options { cg_cfg, spare3, spare2, spare1, nulltype } value; + enum options { cg_candidate_list_r17, spare3, spare2, spare1, nulltype } value; const char* to_string() const; }; @@ -7126,24 +1530,24 @@ struct cg_cfg_s { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - cg_cfg_ies_s& cg_cfg() + cg_candidate_list_r17_ies_s& cg_candidate_list_r17() { - assert_choice_type(types::cg_cfg, type_, "c1"); + assert_choice_type(types::cg_candidate_list_r17, type_, "c1"); return c; } - const cg_cfg_ies_s& cg_cfg() const + const cg_candidate_list_r17_ies_s& cg_candidate_list_r17() const { - assert_choice_type(types::cg_cfg, type_, "c1"); + assert_choice_type(types::cg_candidate_list_r17, type_, "c1"); return c; } - cg_cfg_ies_s& set_cg_cfg(); - void set_spare3(); - void set_spare2(); - void set_spare1(); + cg_candidate_list_r17_ies_s& set_cg_candidate_list_r17(); + void set_spare3(); + void set_spare2(); + void set_spare1(); private: - types type_; - cg_cfg_ies_s c; + types type_; + cg_candidate_list_r17_ies_s c; }; struct types_opts { enum options { c1, crit_exts_future, nulltype } value; @@ -7189,13 +1593,24 @@ struct cg_cfg_s { void to_json(json_writer& j) const; }; -// CandidateCellCPC-r17 ::= SEQUENCE -struct candidate_cell_cp_c_r17_s { - using candidate_cell_list_r17_l_ = bounded_array; +// CandidateCell-r17 ::= SEQUENCE +struct candidate_cell_r17_s { + uint16_t pci_r17 = 0; + dyn_octstring cond_execution_cond_scg_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CandidateCellInfo-r17 ::= SEQUENCE +struct candidate_cell_info_r17_s { + using candidate_list_r17_l_ = dyn_array; // member variables - uint32_t ssb_freq_r17 = 0; - candidate_cell_list_r17_l_ candidate_cell_list_r17; + uint32_t ssb_freq_r17 = 0; + candidate_list_r17_l_ candidate_list_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7203,13 +1618,13 @@ struct candidate_cell_cp_c_r17_s { void to_json(json_writer& j) const; }; -// CG-ConfigInfo-v1730-IEs ::= SEQUENCE -struct cg_cfg_info_v1730_ies_s { - bool fr1_carriers_mcg_r17_present = false; - bool fr2_carriers_mcg_r17_present = false; +// CG-Config-v1730-IEs ::= SEQUENCE +struct cg_cfg_v1730_ies_s { + bool fr1_carriers_scg_r17_present = false; + bool fr2_carriers_scg_r17_present = false; bool non_crit_ext_present = false; - uint8_t fr1_carriers_mcg_r17 = 1; - uint8_t fr2_carriers_mcg_r17 = 1; + uint8_t fr1_carriers_scg_r17 = 1; + uint8_t fr2_carriers_scg_r17 = 1; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7217,16 +1632,15 @@ struct cg_cfg_info_v1730_ies_s { void to_json(json_writer& j) const; }; -// CandidateCellListCPC-r17 ::= SEQUENCE (SIZE (1..8)) OF CandidateCellCPC-r17 -using candidate_cell_list_cp_c_r17_l = dyn_array; +// CandidateCellInfoListCPC-r17 ::= SEQUENCE (SIZE (1..8)) OF CandidateCellInfo-r17 +using candidate_cell_info_list_cp_c_r17_l = dyn_array; -// CG-ConfigInfo-v1700-IEs ::= SEQUENCE -struct cg_cfg_info_v1700_ies_s { - bool two_phr_mode_mcg_r17_present = false; - bool low_mob_eval_connected_in_pcell_r17_present = false; - bool non_crit_ext_present = false; - candidate_cell_list_cp_c_r17_l candidate_cell_list_cp_c_r17; - cg_cfg_info_v1730_ies_s non_crit_ext; +// CG-Config-v1700-IEs ::= SEQUENCE +struct cg_cfg_v1700_ies_s { + bool two_phr_mode_scg_r17_present = false; + bool non_crit_ext_present = false; + candidate_cell_info_list_cp_c_r17_l candidate_cell_info_list_cp_c_r17; + cg_cfg_v1730_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7234,18 +1648,18 @@ struct cg_cfg_info_v1700_ies_s { void to_json(json_writer& j) const; }; -// ServCellInfoListMCG-EUTRA-r16 ::= SEQUENCE (SIZE (1..32)) OF ServCellInfoXCG-EUTRA-r16 -using serv_cell_info_list_mcg_eutra_r16_l = dyn_array; +// ServCellInfoListSCG-EUTRA-r16 ::= SEQUENCE (SIZE (1..32)) OF ServCellInfoXCG-EUTRA-r16 +using serv_cell_info_list_scg_eutra_r16_l = dyn_array; -// ServCellInfoListMCG-NR-r16 ::= SEQUENCE (SIZE (1..32)) OF ServCellInfoXCG-NR-r16 -using serv_cell_info_list_mcg_nr_r16_l = dyn_array; +// ServCellInfoListSCG-NR-r16 ::= SEQUENCE (SIZE (1..32)) OF ServCellInfoXCG-NR-r16 +using serv_cell_info_list_scg_nr_r16_l = dyn_array; -// CG-ConfigInfo-v1640-IEs ::= SEQUENCE -struct cg_cfg_info_v1640_ies_s { +// CG-Config-v1640-IEs ::= SEQUENCE +struct cg_cfg_v1640_ies_s { bool non_crit_ext_present = false; - serv_cell_info_list_mcg_nr_r16_l serv_cell_info_list_mcg_nr_r16; - serv_cell_info_list_mcg_eutra_r16_l serv_cell_info_list_mcg_eutra_r16; - cg_cfg_info_v1700_ies_s non_crit_ext; + serv_cell_info_list_scg_nr_r16_l serv_cell_info_list_scg_nr_r16; + serv_cell_info_list_scg_eutra_r16_l serv_cell_info_list_scg_eutra_r16; + cg_cfg_v1700_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7253,11 +1667,12 @@ struct cg_cfg_info_v1640_ies_s { void to_json(json_writer& j) const; }; -// CG-ConfigInfo-v1620-IEs ::= SEQUENCE -struct cg_cfg_info_v1620_ies_s { - bool non_crit_ext_present = false; - dyn_octstring ue_assist_info_source_scg_r16; - cg_cfg_info_v1640_ies_s non_crit_ext; +// CG-Config-v1630-IEs ::= SEQUENCE +struct cg_cfg_v1630_ies_s { + bool sel_toffset_r16_present = false; + bool non_crit_ext_present = false; + t_offset_r16_e sel_toffset_r16; + cg_cfg_v1640_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7265,69 +1680,11 @@ struct cg_cfg_info_v1620_ies_s { void to_json(json_writer& j) const; }; -// CG-ConfigInfo-v1610-IEs ::= SEQUENCE -struct cg_cfg_info_v1610_ies_s { - struct scg_fail_info_r16_s_ { - struct fail_type_r16_opts { - enum options { - scg_lbt_fail_r16, - beam_fail_recovery_fail_r16, - t312_expiry_r16, - bh_rlf_r16, - beam_fail_r17, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using fail_type_r16_e_ = enumerated; - - // member variables - fail_type_r16_e_ fail_type_r16; - dyn_octstring meas_result_scg_r16; - }; - struct dummy1_s_ { - struct fail_type_eutra_r16_opts { - enum options { - scg_lbt_fail_r16, - beam_fail_recovery_fail_r16, - t312_expiry_r16, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using fail_type_eutra_r16_e_ = enumerated; - - // member variables - fail_type_eutra_r16_e_ fail_type_eutra_r16; - dyn_octstring meas_result_scg_eutra_r16; - }; - - // member variables - bool drx_info_mcg2_present = false; - bool aligned_drx_ind_present = false; - bool scg_fail_info_r16_present = false; - bool dummy1_present = false; - bool non_crit_ext_present = false; - drx_info2_s drx_info_mcg2; - scg_fail_info_r16_s_ scg_fail_info_r16; - dummy1_s_ dummy1; - dyn_octstring sidelink_ue_info_nr_r16; - dyn_octstring sidelink_ue_info_eutra_r16; - cg_cfg_info_v1620_ies_s non_crit_ext; +// CG-Config-v1620-IEs ::= SEQUENCE +struct cg_cfg_v1620_ies_s { + bool non_crit_ext_present = false; + dyn_octstring ue_assist_info_scg_r16; + cg_cfg_v1630_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7335,14 +1692,12 @@ struct cg_cfg_info_v1610_ies_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 non_crit_ext_present = false; - serv_frequencies_mn_nr_l_ serv_frequencies_mn_nr; - cg_cfg_info_v1610_ies_s non_crit_ext; +// CG-Config-v1610-IEs ::= SEQUENCE +struct cg_cfg_v1610_ies_s { + bool drx_info_scg2_present = false; + bool non_crit_ext_present = false; + drx_info2_s drx_info_scg2; + cg_cfg_v1620_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7350,8 +1705,8 @@ struct cg_cfg_info_v1590_ies_s { void to_json(json_writer& j) const; }; -// PH-UplinkCarrierMCG ::= SEQUENCE -struct ph_ul_carrier_mcg_s { +// PH-UplinkCarrierSCG ::= SEQUENCE +struct ph_ul_carrier_scg_s { struct ph_type1or3_opts { enum options { type1, type3, nulltype } value; typedef uint8_t number_type; @@ -7372,18 +1727,16 @@ 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-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; -// CG-ConfigInfo-v1570-IEs ::= SEQUENCE -struct cg_cfg_info_v1570_ies_s { - 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; + // member variables + bool non_crit_ext_present = false; + scell_frequencies_sn_nr_l_ scell_frequencies_sn_nr; + scell_frequencies_sn_eutra_l_ scell_frequencies_sn_eutra; + cg_cfg_v1610_ies_s non_crit_ext; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7391,13 +1744,16 @@ struct cg_cfg_info_v1570_ies_s { void to_json(json_writer& j) const; }; -// PH-InfoMCG ::= SEQUENCE -struct ph_info_mcg_s { +// 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; bool ph_supplementary_ul_present = false; uint8_t serv_cell_idx = 0; - ph_ul_carrier_mcg_s ph_ul; - ph_ul_carrier_mcg_s ph_supplementary_ul; + ph_ul_carrier_scg_s ph_ul; + ph_ul_carrier_scg_s ph_supplementary_ul; // ... // group 0 bool two_srs_pusch_repeat_r17_present = false; @@ -7408,42 +1764,32 @@ 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; - - const char* to_string() const; - uint16_t to_number() 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; }; - using fail_type_eutra_e_ = enumerated; // 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; + bool requested_cell_info_eutra_present = false; + requested_cell_info_eutra_s_ requested_cell_info_eutra; }; // member variables - bool scg_fail_info_eutra_present = false; - bool drx_cfg_mcg_present = false; - bool meas_result_report_cgi_eutra_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; + bool pscell_freq_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; @@ -7451,23 +1797,30 @@ struct cg_cfg_info_v1560_ies_s { void to_json(json_writer& j) const; }; -// PH-TypeListMCG ::= SEQUENCE (SIZE (1..32)) OF PH-InfoMCG -using ph_type_list_mcg_l = dyn_array; +// PH-TypeListSCG ::= SEQUENCE (SIZE (1..32)) OF PH-InfoSCG +using ph_type_list_scg_l = dyn_array; + +// CG-Config-v1540-IEs ::= SEQUENCE +struct cg_cfg_v1540_ies_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; + }; -// 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_nr_s cgi_info; + // member variables + bool requested_cell_info_present = false; + requested_cell_info_s_ requested_cell_info; }; // member variables - bool meas_result_report_cgi_present = false; - 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; + bool pscell_freq_present = false; + bool report_cgi_request_nr_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; @@ -7475,18 +1828,31 @@ struct cg_cfg_info_v1540_ies_s { void to_json(json_writer& j) const; }; -// MRDC-AssistanceInfo ::= SEQUENCE -struct mrdc_assist_info_s { - using affected_carrier_freq_comb_info_list_mrdc_l_ = dyn_array; +// CandidateServingFreqListNR ::= SEQUENCE (SIZE (1..32)) OF INTEGER (0..3279165) +using candidate_serving_freq_list_nr_l = bounded_array; - // member variables - bool ext = false; - affected_carrier_freq_comb_info_list_mrdc_l_ affected_carrier_freq_comb_info_list_mrdc; +// ConfigRestrictModReqSCG ::= SEQUENCE +struct cfg_restrict_mod_req_scg_s { + bool ext = false; + bool requested_bc_mrdc_present = false; + bool requested_p_max_fr1_present = false; + band_combination_info_sn_s requested_bc_mrdc; + int8_t requested_p_max_fr1 = -30; // ... // group 0 - dyn_octstring overheat_assist_scg_r16; + 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; // group 1 - dyn_octstring overheat_assist_scg_fr2_2_r17; + bool requested_p_max_fr2_r16_present = false; + bool requested_max_inter_freq_meas_id_scg_r16_present = false; + bool requested_max_intra_freq_meas_id_scg_r16_present = false; + bool requested_toffset_r16_present = false; + int8_t requested_p_max_fr2_r16 = -30; + uint8_t requested_max_inter_freq_meas_id_scg_r16 = 1; + uint8_t requested_max_intra_freq_meas_id_scg_r16 = 1; + t_offset_r16_e requested_toffset_r16; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7494,30 +1860,14 @@ struct mrdc_assist_info_s { void to_json(json_writer& j) const; }; -// MeasConfigMN ::= SEQUENCE -struct meas_cfg_mn_s { - using measured_frequencies_mn_l_ = dyn_array; - struct gap_purpose_opts { - enum options { per_ue, per_fr1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using gap_purpose_e_ = enumerated; +// MeasConfigSN ::= SEQUENCE +struct meas_cfg_sn_s { + using measured_frequencies_sn_l_ = dyn_array; // member variables - bool ext = false; - bool meas_gap_cfg_present = false; - bool gap_purpose_present = false; - measured_frequencies_mn_l_ measured_frequencies_mn; - setup_release_c meas_gap_cfg; - gap_purpose_e_ gap_purpose; + bool ext = false; + measured_frequencies_sn_l_ measured_frequencies_sn; // ... - // group 0 - copy_ptr> meas_gap_cfg_fr2; - // group 1 - bool inter_freq_no_gap_r16_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7525,51 +1875,23 @@ struct meas_cfg_mn_s { void to_json(json_writer& j) const; }; -// CG-ConfigInfo-IEs ::= SEQUENCE -struct cg_cfg_info_ies_s { - struct scg_fail_info_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, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using fail_type_e_ = enumerated; - - // member variables - fail_type_e_ fail_type; - dyn_octstring meas_result_scg; - }; - - // member variables - 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 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; +// CG-Config-IEs ::= SEQUENCE +struct cg_cfg_ies_s { + bool cfg_restrict_mod_req_present = false; + bool drx_info_scg_present = false; + bool meas_cfg_sn_present = false; + bool sel_band_combination_present = false; + bool non_crit_ext_present = false; + dyn_octstring scg_cell_group_cfg; + dyn_octstring scg_rb_cfg; + cfg_restrict_mod_req_scg_s cfg_restrict_mod_req; + 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; + 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; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -7577,12 +1899,12 @@ struct cg_cfg_info_ies_s { void to_json(json_writer& j) const; }; -// CG-ConfigInfo ::= SEQUENCE -struct cg_cfg_info_s { +// CG-Config ::= SEQUENCE +struct cg_cfg_s { struct crit_exts_c_ { struct c1_c_ { struct types_opts { - enum options { cg_cfg_info, spare3, spare2, spare1, nulltype } value; + enum options { cg_cfg, spare3, spare2, spare1, nulltype } value; const char* to_string() const; }; @@ -7596,24 +1918,24 @@ struct cg_cfg_info_s { SRSASN_CODE unpack(cbit_ref& bref); void to_json(json_writer& j) const; // getters - cg_cfg_info_ies_s& cg_cfg_info() + cg_cfg_ies_s& cg_cfg() { - assert_choice_type(types::cg_cfg_info, type_, "c1"); + assert_choice_type(types::cg_cfg, type_, "c1"); return c; } - const cg_cfg_info_ies_s& cg_cfg_info() const + const cg_cfg_ies_s& cg_cfg() const { - assert_choice_type(types::cg_cfg_info, type_, "c1"); + assert_choice_type(types::cg_cfg, type_, "c1"); return c; } - cg_cfg_info_ies_s& set_cg_cfg_info(); - void set_spare3(); - void set_spare2(); - void set_spare1(); + cg_cfg_ies_s& set_cg_cfg(); + void set_spare3(); + void set_spare2(); + void set_spare1(); private: - types type_; - cg_cfg_info_ies_s c; + types type_; + cg_cfg_ies_s c; }; struct types_opts { enum options { c1, crit_exts_future, nulltype } value; diff --git a/include/srsran/asn1/rrc_nr/serving_cell.h b/include/srsran/asn1/rrc_nr/serving_cell.h index 8f9fe84b9e..77e7c6d1c2 100644 --- a/include/srsran/asn1/rrc_nr/serving_cell.h +++ b/include/srsran/asn1/rrc_nr/serving_cell.h @@ -16,7 +16,7 @@ #pragma once -#include "common.h" +#include "bwp_cfg.h" namespace asn1 { namespace rrc_nr { @@ -25,322 +25,6 @@ namespace rrc_nr { * Struct Definitions ******************************************************************************/ -// MsgA-DMRS-Config-r16 ::= SEQUENCE -struct msg_a_dmrs_cfg_r16_s { - struct msg_a_dmrs_add_position_r16_opts { - enum options { pos0, pos1, pos3, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using msg_a_dmrs_add_position_r16_e_ = enumerated; - - // member variables - bool msg_a_dmrs_add_position_r16_present = false; - bool msg_a_max_len_r16_present = false; - bool msg_a_pusch_dmrs_cdm_group_r16_present = false; - bool msg_a_pusch_nrof_ports_r16_present = false; - bool msg_a_scrambling_id0_r16_present = false; - bool msg_a_scrambling_id1_r16_present = false; - msg_a_dmrs_add_position_r16_e_ msg_a_dmrs_add_position_r16; - uint8_t msg_a_pusch_dmrs_cdm_group_r16 = 0; - uint8_t msg_a_pusch_nrof_ports_r16 = 0; - uint32_t msg_a_scrambling_id0_r16 = 0; - uint32_t msg_a_scrambling_id1_r16 = 0; - - // 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pwr_ramp_step_high_prio_e_ = enumerated; - struct scaling_factor_bi_opts { - enum options { zero, dot25, dot5, dot75, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using scaling_factor_bi_e_ = enumerated; - - // 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; -}; - -// MsgA-PUSCH-Resource-r16 ::= SEQUENCE -struct msg_a_pusch_res_r16_s { - struct nrof_msg_a_po_per_slot_r16_opts { - enum options { one, two, three, six, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using nrof_msg_a_po_per_slot_r16_e_ = enumerated; - struct map_type_msg_a_pusch_r16_opts { - enum options { type_a, type_b, nulltype } value; - - const char* to_string() const; - }; - using map_type_msg_a_pusch_r16_e_ = enumerated; - struct nrof_msg_a_po_fdm_r16_opts { - enum options { one, two, four, eight, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using nrof_msg_a_po_fdm_r16_e_ = enumerated; - struct msg_a_alpha_r16_opts { - enum options { alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using msg_a_alpha_r16_e_ = enumerated; - - // member variables - bool ext = false; - bool msg_a_pusch_time_domain_alloc_r16_present = false; - bool start_symbol_and_len_msg_a_po_r16_present = false; - bool map_type_msg_a_pusch_r16_present = false; - bool guard_period_msg_a_pusch_r16_present = false; - bool msg_a_intra_slot_freq_hop_r16_present = false; - bool msg_a_hop_bits_r16_present = false; - bool msg_a_alpha_r16_present = false; - bool interlace_idx_first_po_msg_a_pusch_r16_present = false; - bool nrof_interlaces_per_msg_a_po_r16_present = false; - uint8_t msg_a_mcs_r16 = 0; - uint8_t nrof_slots_msg_a_pusch_r16 = 1; - nrof_msg_a_po_per_slot_r16_e_ nrof_msg_a_po_per_slot_r16; - uint8_t msg_a_pusch_time_domain_offset_r16 = 1; - uint8_t msg_a_pusch_time_domain_alloc_r16 = 1; - uint8_t start_symbol_and_len_msg_a_po_r16 = 0; - map_type_msg_a_pusch_r16_e_ map_type_msg_a_pusch_r16; - uint8_t guard_period_msg_a_pusch_r16 = 0; - uint8_t guard_band_msg_a_pusch_r16 = 0; - uint16_t freq_start_msg_a_pusch_r16 = 0; - uint8_t nrof_prbs_per_msg_a_po_r16 = 1; - nrof_msg_a_po_fdm_r16_e_ nrof_msg_a_po_fdm_r16; - fixed_bitstring<2> msg_a_hop_bits_r16; - msg_a_dmrs_cfg_r16_s msg_a_dmrs_cfg_r16; - uint8_t nrof_dmrs_seqs_r16 = 1; - msg_a_alpha_r16_e_ msg_a_alpha_r16; - uint8_t interlace_idx_first_po_msg_a_pusch_r16 = 1; - uint8_t nrof_interlaces_per_msg_a_po_r16 = 1; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NSAG-List-r17 ::= SEQUENCE (SIZE (1..8)) OF BIT STRING (SIZE (8)) -using nsag_list_r17_l = bounded_array, 8>; - -// RA-PrioritizationSliceInfo-r17 ::= SEQUENCE -struct ra_prioritization_slice_info_r17_s { - using nsag_id_list_r17_l_ = bounded_array, 8>; - - // member variables - bool ext = false; - nsag_id_list_r17_l_ nsag_id_list_r17; - ra_prioritization_s ra_prioritization_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FeatureCombination-r17 ::= SEQUENCE -struct feature_combination_r17_s { - bool red_cap_r17_present = false; - bool small_data_r17_present = false; - bool msg3_repeats_r17_present = false; - bool spare4_present = false; - bool spare3_present = false; - bool spare2_present = false; - bool spare1_present = false; - nsag_list_r17_l nsag_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MsgA-PUSCH-Config-r16 ::= SEQUENCE -struct msg_a_pusch_cfg_r16_s { - struct msg_a_transform_precoder_r16_opts { - enum options { enabled, disabled, nulltype } value; - - const char* to_string() const; - }; - using msg_a_transform_precoder_r16_e_ = enumerated; - - // member variables - bool msg_a_pusch_res_group_a_r16_present = false; - bool msg_a_pusch_res_group_b_r16_present = false; - bool msg_a_transform_precoder_r16_present = false; - bool msg_a_data_scrambling_idx_r16_present = false; - bool msg_a_delta_preamb_r16_present = false; - msg_a_pusch_res_r16_s msg_a_pusch_res_group_a_r16; - msg_a_pusch_res_r16_s msg_a_pusch_res_group_b_r16; - msg_a_transform_precoder_r16_e_ msg_a_transform_precoder_r16; - uint16_t msg_a_data_scrambling_idx_r16 = 0; - int8_t msg_a_delta_preamb_r16 = -1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RA-PrioritizationSliceInfoList-r17 ::= SEQUENCE (SIZE (1..8)) OF RA-PrioritizationSliceInfo-r17 -using ra_prioritization_slice_info_list_r17_l = dyn_array; - -// FeatureCombinationPreambles-r17 ::= SEQUENCE -struct feature_combination_preambs_r17_s { - struct group_bcfg_r17_s_ { - struct ra_size_group_a_r17_opts { - enum options { - b56, - b144, - b208, - b256, - b282, - b480, - b640, - b800, - b1000, - b72, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using ra_size_group_a_r17_e_ = enumerated; - struct msg_pwr_offset_group_b_r17_opts { - enum options { minusinfinity, db0, db5, db8, db10, db12, db15, db18, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using msg_pwr_offset_group_b_r17_e_ = enumerated; - - // member variables - ra_size_group_a_r17_e_ ra_size_group_a_r17; - msg_pwr_offset_group_b_r17_e_ msg_pwr_offset_group_b_r17; - uint8_t nof_ra_preambs_group_a_r17 = 1; - }; - - // member variables - bool ext = false; - bool ssb_shared_ro_mask_idx_r17_present = false; - bool group_bcfg_r17_present = false; - bool separate_msg_a_pusch_cfg_r17_present = false; - bool msg_a_rsrp_thres_r17_present = false; - bool rsrp_thres_ssb_r17_present = false; - bool delta_preamb_r17_present = false; - feature_combination_r17_s feature_combination_r17; - uint8_t start_preamb_for_this_partition_r17 = 0; - uint8_t nof_preambs_per_ssb_for_this_partition_r17 = 1; - uint8_t ssb_shared_ro_mask_idx_r17 = 1; - group_bcfg_r17_s_ group_bcfg_r17; - msg_a_pusch_cfg_r16_s separate_msg_a_pusch_cfg_r17; - uint8_t msg_a_rsrp_thres_r17 = 0; - uint8_t rsrp_thres_ssb_r17 = 0; - int8_t delta_preamb_r17 = -1; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// GroupB-ConfiguredTwoStepRA-r16 ::= SEQUENCE -struct group_b_cfg_two_step_ra_r16_s { - struct ra_msg_a_size_group_a_opts { - enum options { - b56, - b144, - b208, - b256, - b282, - b480, - b640, - b800, - b1000, - b72, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using ra_msg_a_size_group_a_e_ = enumerated; - struct msg_pwr_offset_group_b_opts { - enum options { minusinfinity, db0, db5, db8, db10, db12, db15, db18, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using msg_pwr_offset_group_b_e_ = enumerated; - - // member variables - ra_msg_a_size_group_a_e_ ra_msg_a_size_group_a; - msg_pwr_offset_group_b_e_ msg_pwr_offset_group_b; - uint8_t nof_ra_preambs_group_a = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // NR-NS-PmaxValue ::= SEQUENCE struct nr_ns_pmax_value_s { bool add_pmax_present = false; @@ -353,90 +37,6 @@ struct nr_ns_pmax_value_s { void to_json(json_writer& j) const; }; -// RA-PrioritizationForSlicing-r17 ::= SEQUENCE -struct ra_prioritization_for_slicing_r17_s { - bool ext = false; - ra_prioritization_slice_info_list_r17_l ra_prioritization_slice_info_list_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RACH-ConfigGenericTwoStepRA-r16 ::= SEQUENCE -struct rach_cfg_generic_two_step_ra_r16_s { - struct msg_a_ro_fdm_r16_opts { - enum options { one, two, four, eight, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using msg_a_ro_fdm_r16_e_ = enumerated; - struct msg_a_preamb_pwr_ramp_step_r16_opts { - enum options { db0, db2, db4, db6, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using msg_a_preamb_pwr_ramp_step_r16_e_ = enumerated; - struct msg_b_resp_win_r16_opts { - enum options { sl1, sl2, sl4, sl8, sl10, sl20, sl40, sl80, sl160, sl320, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using msg_b_resp_win_r16_e_ = enumerated; - struct preamb_trans_max_r16_opts { - enum options { n3, n4, n5, n6, n7, n8, n10, n20, n50, n100, n200, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preamb_trans_max_r16_e_ = enumerated; - struct msg_b_resp_win_v1700_opts { - enum options { sl240, sl640, sl960, sl1280, sl1920, sl2560, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using msg_b_resp_win_v1700_e_ = enumerated; - - // member variables - bool ext = false; - bool msg_a_prach_cfg_idx_r16_present = false; - bool msg_a_ro_fdm_r16_present = false; - bool msg_a_ro_freq_start_r16_present = false; - bool msg_a_zero_correlation_zone_cfg_r16_present = false; - bool msg_a_preamb_pwr_ramp_step_r16_present = false; - bool msg_a_preamb_rx_target_pwr_r16_present = false; - bool msg_b_resp_win_r16_present = false; - bool preamb_trans_max_r16_present = false; - uint16_t msg_a_prach_cfg_idx_r16 = 0; - msg_a_ro_fdm_r16_e_ msg_a_ro_fdm_r16; - uint16_t msg_a_ro_freq_start_r16 = 0; - uint8_t msg_a_zero_correlation_zone_cfg_r16 = 0; - msg_a_preamb_pwr_ramp_step_r16_e_ msg_a_preamb_pwr_ramp_step_r16; - int16_t msg_a_preamb_rx_target_pwr_r16 = -202; - msg_b_resp_win_r16_e_ msg_b_resp_win_r16; - preamb_trans_max_r16_e_ preamb_trans_max_r16; - // ... - // group 0 - bool msg_b_resp_win_v1700_present = false; - msg_b_resp_win_v1700_e_ msg_b_resp_win_v1700; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - // EUTRA-MBSFN-SubframeConfig ::= SEQUENCE struct eutra_mbsfn_sf_cfg_s { struct radioframe_alloc_period_opts { @@ -566,418 +166,57 @@ struct eutra_mbsfn_sf_cfg_s { // NR-NS-PmaxList ::= SEQUENCE (SIZE (1..8)) OF NR-NS-PmaxValue using nr_ns_pmax_list_l = dyn_array; -// RACH-ConfigCommonTwoStepRA-r16 ::= SEQUENCE -struct rach_cfg_common_two_step_ra_r16_s { - struct msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_ { - struct one_eighth_opts { - enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; - typedef uint8_t number_type; +// EUTRA-MBSFN-SubframeConfigList ::= SEQUENCE (SIZE (1..8)) OF EUTRA-MBSFN-SubframeConfig +using eutra_mbsfn_sf_cfg_list_l = dyn_array; - const char* to_string() const; - uint8_t to_number() const; - }; - using one_eighth_e_ = enumerated; - struct one_fourth_opts { - enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; - typedef uint8_t number_type; +// NR-MultiBandInfo ::= SEQUENCE +struct nr_multi_band_info_s { + bool freq_band_ind_nr_present = false; + uint16_t freq_band_ind_nr = 1; + nr_ns_pmax_list_l nr_ns_pmax_list; - const char* to_string() const; - uint8_t to_number() const; - }; - using one_fourth_e_ = enumerated; - struct one_half_opts { - enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, 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; +}; - const char* to_string() const; - uint8_t to_number() const; - }; - using one_half_e_ = enumerated; - struct one_opts { - enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; - typedef uint8_t number_type; +// MultiFrequencyBandListNR-SIB ::= SEQUENCE (SIZE (1..8)) OF NR-MultiBandInfo +using multi_freq_band_list_nr_sib_l = dyn_array; - const char* to_string() const; - uint8_t to_number() const; - }; - using one_e_ = enumerated; - struct two_opts { - enum options { n4, n8, n12, n16, n20, n24, n28, n32, nulltype } value; - typedef uint8_t number_type; +// 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; - const char* to_string() const; - uint8_t to_number() const; - }; - using two_e_ = enumerated; - struct types_opts { - enum options { one_eighth, one_fourth, one_half, one, two, four, eight, sixteen, nulltype } value; - typedef float number_type; + const char* to_string() const; + uint8_t to_number() const; + }; + using carrier_bw_dl_e_ = enumerated; + struct nrof_crs_ports_opts { + enum options { n1, n2, n4, nulltype } value; + typedef uint8_t number_type; - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using types = enumerated; - - // choice methods - msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_() = default; - msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_( - const msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_& other); - msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_& - operator=(const msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_& other); - ~msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_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 - one_eighth_e_& one_eighth() - { - assert_choice_type(types::one_eighth, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - one_fourth_e_& one_fourth() - { - assert_choice_type(types::one_fourth, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - one_half_e_& one_half() - { - assert_choice_type(types::one_half, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - one_e_& one() - { - assert_choice_type(types::one, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - two_e_& two() - { - assert_choice_type(types::two, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - uint8_t& four() - { - assert_choice_type(types::four, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - uint8_t& eight() - { - assert_choice_type(types::eight, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - uint8_t& sixteen() - { - assert_choice_type(types::sixteen, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - const one_eighth_e_& one_eighth() const - { - assert_choice_type(types::one_eighth, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - const one_fourth_e_& one_fourth() const - { - assert_choice_type(types::one_fourth, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - const one_half_e_& one_half() const - { - assert_choice_type(types::one_half, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - const one_e_& one() const - { - assert_choice_type(types::one, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - const two_e_& two() const - { - assert_choice_type(types::two, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - const uint8_t& four() const - { - assert_choice_type(types::four, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - const uint8_t& eight() const - { - assert_choice_type(types::eight, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - const uint8_t& sixteen() const - { - assert_choice_type(types::sixteen, type_, "msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - return c.get(); - } - one_eighth_e_& set_one_eighth(); - one_fourth_e_& set_one_fourth(); - one_half_e_& set_one_half(); - one_e_& set_one(); - two_e_& set_two(); - uint8_t& set_four(); - uint8_t& set_eight(); - uint8_t& set_sixteen(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct msg_a_prach_root_seq_idx_r16_c_ { - struct types_opts { - enum options { l839, l139, l571, l1151, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - msg_a_prach_root_seq_idx_r16_c_() = default; - msg_a_prach_root_seq_idx_r16_c_(const msg_a_prach_root_seq_idx_r16_c_& other); - msg_a_prach_root_seq_idx_r16_c_& operator=(const msg_a_prach_root_seq_idx_r16_c_& other); - ~msg_a_prach_root_seq_idx_r16_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& l839() - { - assert_choice_type(types::l839, type_, "msgA-PRACH-RootSequenceIndex-r16"); - return c.get(); - } - uint8_t& l139() - { - assert_choice_type(types::l139, type_, "msgA-PRACH-RootSequenceIndex-r16"); - return c.get(); - } - uint16_t& l571() - { - assert_choice_type(types::l571, type_, "msgA-PRACH-RootSequenceIndex-r16"); - return c.get(); - } - uint16_t& l1151() - { - assert_choice_type(types::l1151, type_, "msgA-PRACH-RootSequenceIndex-r16"); - return c.get(); - } - const uint16_t& l839() const - { - assert_choice_type(types::l839, type_, "msgA-PRACH-RootSequenceIndex-r16"); - return c.get(); - } - const uint8_t& l139() const - { - assert_choice_type(types::l139, type_, "msgA-PRACH-RootSequenceIndex-r16"); - return c.get(); - } - const uint16_t& l571() const - { - assert_choice_type(types::l571, type_, "msgA-PRACH-RootSequenceIndex-r16"); - return c.get(); - } - const uint16_t& l1151() const - { - assert_choice_type(types::l1151, type_, "msgA-PRACH-RootSequenceIndex-r16"); - return c.get(); - } - uint16_t& set_l839(); - uint8_t& set_l139(); - uint16_t& set_l571(); - uint16_t& set_l1151(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct msg_a_trans_max_r16_opts { - enum options { n1, n2, n4, n6, n8, n10, n20, n50, n100, n200, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using msg_a_trans_max_r16_e_ = enumerated; - struct msg_a_restricted_set_cfg_r16_opts { - enum options { unrestricted_set, restricted_set_type_a, restricted_set_type_b, nulltype } value; - - const char* to_string() const; - }; - using msg_a_restricted_set_cfg_r16_e_ = enumerated; - struct ra_prioritization_for_access_id_two_step_r16_s_ { - ra_prioritization_s ra_prioritization_r16; - fixed_bitstring<2> ra_prioritization_for_ai_r16; - }; - struct ra_contention_resolution_timer_r16_opts { - enum options { sf8, sf16, sf24, sf32, sf40, sf48, sf56, sf64, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ra_contention_resolution_timer_r16_e_ = enumerated; - using feature_combination_preambs_list_r17_l_ = dyn_array; - - // member variables - bool ext = false; - bool msg_a_total_nof_ra_preambs_r16_present = false; - bool msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_present = false; - bool msg_a_cb_preambs_per_ssb_per_shared_ro_r16_present = false; - bool msg_a_ssb_shared_ro_mask_idx_r16_present = false; - bool group_b_cfg_two_step_ra_r16_present = false; - bool msg_a_prach_root_seq_idx_r16_present = false; - bool msg_a_trans_max_r16_present = false; - bool msg_a_rsrp_thres_r16_present = false; - bool msg_a_rsrp_thres_ssb_r16_present = false; - bool msg_a_subcarrier_spacing_r16_present = false; - bool msg_a_restricted_set_cfg_r16_present = false; - bool ra_prioritization_for_access_id_two_step_r16_present = false; - bool ra_contention_resolution_timer_r16_present = false; - rach_cfg_generic_two_step_ra_r16_s rach_cfg_generic_two_step_ra_r16; - uint8_t msg_a_total_nof_ra_preambs_r16 = 1; - msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_ msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16; - uint8_t msg_a_cb_preambs_per_ssb_per_shared_ro_r16 = 1; - uint8_t msg_a_ssb_shared_ro_mask_idx_r16 = 1; - group_b_cfg_two_step_ra_r16_s group_b_cfg_two_step_ra_r16; - msg_a_prach_root_seq_idx_r16_c_ msg_a_prach_root_seq_idx_r16; - msg_a_trans_max_r16_e_ msg_a_trans_max_r16; - uint8_t msg_a_rsrp_thres_r16 = 0; - uint8_t msg_a_rsrp_thres_ssb_r16 = 0; - subcarrier_spacing_e msg_a_subcarrier_spacing_r16; - msg_a_restricted_set_cfg_r16_e_ msg_a_restricted_set_cfg_r16; - ra_prioritization_for_access_id_two_step_r16_s_ ra_prioritization_for_access_id_two_step_r16; - ra_contention_resolution_timer_r16_e_ ra_contention_resolution_timer_r16; - // ... - // group 0 - copy_ptr ra_prioritization_for_slicing_two_step_r17; - copy_ptr feature_combination_preambs_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RACH-ConfigGeneric ::= SEQUENCE -struct rach_cfg_generic_s { - struct msg1_fdm_opts { - enum options { one, two, four, eight, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using msg1_fdm_e_ = enumerated; - struct preamb_trans_max_opts { - enum options { n3, n4, n5, n6, n7, n8, n10, n20, n50, n100, n200, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preamb_trans_max_e_ = enumerated; - struct pwr_ramp_step_opts { - enum options { db0, db2, db4, db6, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pwr_ramp_step_e_ = enumerated; - struct ra_resp_win_opts { - enum options { sl1, sl2, sl4, sl8, sl10, sl20, sl40, sl80, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ra_resp_win_e_ = enumerated; - struct prach_cfg_period_scaling_iab_r16_opts { - enum options { scf1, scf2, scf4, scf8, scf16, scf32, scf64, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using prach_cfg_period_scaling_iab_r16_e_ = enumerated; - struct ra_resp_win_v1610_opts { - enum options { sl60, sl160, nulltype } value; - typedef uint8_t number_type; + const char* to_string() const; + uint8_t to_number() const; + }; + using nrof_crs_ports_e_ = enumerated; + struct v_shift_opts { + enum options { n0, n1, n2, n3, n4, n5, nulltype } value; + typedef uint8_t number_type; const char* to_string() const; uint8_t to_number() const; }; - using ra_resp_win_v1610_e_ = enumerated; - struct ra_resp_win_v1700_opts { - enum options { sl240, sl320, sl640, sl960, sl1280, sl1920, sl2560, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using ra_resp_win_v1700_e_ = enumerated; + using v_shift_e_ = enumerated; // member variables - bool ext = false; - uint16_t prach_cfg_idx = 0; - msg1_fdm_e_ msg1_fdm; - uint16_t msg1_freq_start = 0; - uint8_t zero_correlation_zone_cfg = 0; - int16_t preamb_rx_target_pwr = -202; - preamb_trans_max_e_ preamb_trans_max; - pwr_ramp_step_e_ pwr_ramp_step; - ra_resp_win_e_ ra_resp_win; - // ... - // group 0 - bool prach_cfg_period_scaling_iab_r16_present = false; - bool prach_cfg_frame_offset_iab_r16_present = false; - bool prach_cfg_s_offset_iab_r16_present = false; - bool ra_resp_win_v1610_present = false; - bool prach_cfg_idx_v1610_present = false; - prach_cfg_period_scaling_iab_r16_e_ prach_cfg_period_scaling_iab_r16; - uint8_t prach_cfg_frame_offset_iab_r16 = 0; - uint8_t prach_cfg_s_offset_iab_r16 = 0; - ra_resp_win_v1610_e_ ra_resp_win_v1610; - uint16_t prach_cfg_idx_v1610 = 256; - // group 1 - bool ra_resp_win_v1700_present = false; - ra_resp_win_v1700_e_ ra_resp_win_v1700; - - // sequence methods - 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; - -// MsgA-ConfigCommon-r16 ::= SEQUENCE -struct msg_a_cfg_common_r16_s { - bool msg_a_pusch_cfg_r16_present = false; - rach_cfg_common_two_step_ra_r16_s rach_cfg_common_two_step_ra_r16; - msg_a_pusch_cfg_r16_s msg_a_pusch_cfg_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NR-MultiBandInfo ::= SEQUENCE -struct nr_multi_band_info_s { - bool freq_band_ind_nr_present = false; - uint16_t freq_band_ind_nr = 1; - nr_ns_pmax_list_l nr_ns_pmax_list; + 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; @@ -985,88 +224,26 @@ struct nr_multi_band_info_s { void to_json(json_writer& j) const; }; -// PDSCH-TimeDomainResourceAllocation ::= SEQUENCE -struct pdsch_time_domain_res_alloc_s { - struct map_type_opts { - enum options { type_a, type_b, nulltype } value; - - const char* to_string() const; - }; - using map_type_e_ = enumerated; - - // member variables - bool k0_present = false; - uint8_t k0 = 0; - map_type_e_ map_type; - uint8_t start_symbol_and_len = 0; +// PagingCycle ::= ENUMERATED +struct paging_cycle_opts { + enum options { rf32, rf64, rf128, rf256, 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; + const char* to_string() const; + uint16_t to_number() const; }; +using paging_cycle_e = enumerated; -// PDSCH-TimeDomainResourceAllocation-r16 ::= SEQUENCE -struct pdsch_time_domain_res_alloc_r16_s { - struct map_type_r16_opts { - enum options { type_a, type_b, nulltype } value; - - const char* to_string() const; - }; - using map_type_r16_e_ = enumerated; - struct repeat_num_r16_opts { - enum options { n2, n3, n4, n5, n6, n7, n8, n16, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using repeat_num_r16_e_ = enumerated; - struct repeat_num_v1730_opts { - enum options { n2, n3, n4, n5, n6, n7, n8, n16, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using repeat_num_v1730_e_ = enumerated; - - // member variables - bool ext = false; - bool k0_r16_present = false; - bool repeat_num_r16_present = false; - uint8_t k0_r16 = 0; - map_type_r16_e_ map_type_r16; - uint8_t start_symbol_and_len_r16 = 0; - repeat_num_r16_e_ repeat_num_r16; +// SCS-SpecificCarrier ::= SEQUENCE +struct scs_specific_carrier_s { + bool ext = false; + uint16_t offset_to_carrier = 0; + subcarrier_spacing_e subcarrier_spacing; + uint16_t carrier_bw = 1; // ... // group 0 - bool k0_v1710_present = false; - uint8_t k0_v1710 = 33; - // group 1 - bool repeat_num_v1730_present = false; - repeat_num_v1730_e_ repeat_num_v1730; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PUSCH-TimeDomainResourceAllocation ::= SEQUENCE -struct pusch_time_domain_res_alloc_s { - struct map_type_opts { - enum options { type_a, type_b, nulltype } value; - - const char* to_string() const; - }; - using map_type_e_ = enumerated; - - // member variables - bool k2_present = false; - uint8_t k2 = 0; - map_type_e_ map_type; - uint8_t start_symbol_and_len = 0; + bool tx_direct_current_location_present = false; + uint16_t tx_direct_current_location = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -1074,9326 +251,35 @@ struct pusch_time_domain_res_alloc_s { void to_json(json_writer& j) const; }; -// RACH-ConfigCommon ::= SEQUENCE -struct rach_cfg_common_s { - struct ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_ { - struct one_eighth_opts { - enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using one_eighth_e_ = enumerated; - struct one_fourth_opts { - enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using one_fourth_e_ = enumerated; - struct one_half_opts { - enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using one_half_e_ = enumerated; - struct one_opts { - enum options { n4, n8, n12, n16, n20, n24, n28, n32, n36, n40, n44, n48, n52, n56, n60, n64, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using one_e_ = enumerated; - struct two_opts { - enum options { n4, n8, n12, n16, n20, n24, n28, n32, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using two_e_ = enumerated; - struct types_opts { - enum options { one_eighth, one_fourth, one_half, one, two, four, eight, sixteen, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using types = enumerated; - - // choice methods - ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_() = default; - ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_(const ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_& other); - ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_& - operator=(const ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_& other); - ~ssb_per_rach_occasion_and_cb_preambs_per_ssb_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 - one_eighth_e_& one_eighth() - { - assert_choice_type(types::one_eighth, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - one_fourth_e_& one_fourth() - { - assert_choice_type(types::one_fourth, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - one_half_e_& one_half() - { - assert_choice_type(types::one_half, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - one_e_& one() - { - assert_choice_type(types::one, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - two_e_& two() - { - assert_choice_type(types::two, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - uint8_t& four() - { - assert_choice_type(types::four, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - uint8_t& eight() - { - assert_choice_type(types::eight, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - uint8_t& sixteen() - { - assert_choice_type(types::sixteen, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - const one_eighth_e_& one_eighth() const - { - assert_choice_type(types::one_eighth, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - const one_fourth_e_& one_fourth() const - { - assert_choice_type(types::one_fourth, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - const one_half_e_& one_half() const - { - assert_choice_type(types::one_half, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - const one_e_& one() const - { - assert_choice_type(types::one, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - const two_e_& two() const - { - assert_choice_type(types::two, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - const uint8_t& four() const - { - assert_choice_type(types::four, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - const uint8_t& eight() const - { - assert_choice_type(types::eight, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - const uint8_t& sixteen() const - { - assert_choice_type(types::sixteen, type_, "ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - return c.get(); - } - one_eighth_e_& set_one_eighth(); - one_fourth_e_& set_one_fourth(); - one_half_e_& set_one_half(); - one_e_& set_one(); - two_e_& set_two(); - uint8_t& set_four(); - uint8_t& set_eight(); - uint8_t& set_sixteen(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct group_bcfg_s_ { - struct ra_msg3_size_group_a_opts { - enum options { - b56, - b144, - b208, - b256, - b282, - b480, - b640, - b800, - b1000, - b72, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using ra_msg3_size_group_a_e_ = enumerated; - struct msg_pwr_offset_group_b_opts { - enum options { minusinfinity, db0, db5, db8, db10, db12, db15, db18, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using msg_pwr_offset_group_b_e_ = enumerated; - - // member variables - ra_msg3_size_group_a_e_ ra_msg3_size_group_a; - msg_pwr_offset_group_b_e_ msg_pwr_offset_group_b; - uint8_t nof_ra_preambs_group_a = 1; - }; - struct ra_contention_resolution_timer_opts { - enum options { sf8, sf16, sf24, sf32, sf40, sf48, sf56, sf64, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ra_contention_resolution_timer_e_ = enumerated; - struct prach_root_seq_idx_c_ { - struct types_opts { - enum options { l839, l139, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - prach_root_seq_idx_c_() = default; - prach_root_seq_idx_c_(const prach_root_seq_idx_c_& other); - prach_root_seq_idx_c_& operator=(const prach_root_seq_idx_c_& other); - ~prach_root_seq_idx_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& l839() - { - assert_choice_type(types::l839, type_, "prach-RootSequenceIndex"); - return c.get(); - } - uint8_t& l139() - { - assert_choice_type(types::l139, type_, "prach-RootSequenceIndex"); - return c.get(); - } - const uint16_t& l839() const - { - assert_choice_type(types::l839, type_, "prach-RootSequenceIndex"); - return c.get(); - } - const uint8_t& l139() const - { - assert_choice_type(types::l139, type_, "prach-RootSequenceIndex"); - return c.get(); - } - uint16_t& set_l839(); - uint8_t& set_l139(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct restricted_set_cfg_opts { - enum options { unrestricted_set, restricted_set_type_a, restricted_set_type_b, nulltype } value; - - const char* to_string() const; - }; - using restricted_set_cfg_e_ = enumerated; - struct ra_prioritization_for_access_id_r16_s_ { - ra_prioritization_s ra_prioritization_r16; - fixed_bitstring<2> ra_prioritization_for_ai_r16; - }; - struct prach_root_seq_idx_r16_c_ { - struct types_opts { - enum options { l571, l1151, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - prach_root_seq_idx_r16_c_() = default; - prach_root_seq_idx_r16_c_(const prach_root_seq_idx_r16_c_& other); - prach_root_seq_idx_r16_c_& operator=(const prach_root_seq_idx_r16_c_& other); - ~prach_root_seq_idx_r16_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& l571() - { - assert_choice_type(types::l571, type_, "prach-RootSequenceIndex-r16"); - return c.get(); - } - uint16_t& l1151() - { - assert_choice_type(types::l1151, type_, "prach-RootSequenceIndex-r16"); - return c.get(); - } - const uint16_t& l571() const - { - assert_choice_type(types::l571, type_, "prach-RootSequenceIndex-r16"); - return c.get(); - } - const uint16_t& l1151() const - { - assert_choice_type(types::l1151, type_, "prach-RootSequenceIndex-r16"); - return c.get(); - } - uint16_t& set_l571(); - uint16_t& set_l1151(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - using feature_combination_preambs_list_r17_l_ = dyn_array; - - // member variables - bool ext = false; - bool total_nof_ra_preambs_present = false; - bool ssb_per_rach_occasion_and_cb_preambs_per_ssb_present = false; - bool group_bcfg_present = false; - bool rsrp_thres_ssb_present = false; - bool rsrp_thres_ssb_sul_present = false; - bool msg1_subcarrier_spacing_present = false; - bool msg3_transform_precoder_present = false; - rach_cfg_generic_s rach_cfg_generic; - uint8_t total_nof_ra_preambs = 1; - ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_ ssb_per_rach_occasion_and_cb_preambs_per_ssb; - group_bcfg_s_ group_bcfg; - ra_contention_resolution_timer_e_ ra_contention_resolution_timer; - uint8_t rsrp_thres_ssb = 0; - uint8_t rsrp_thres_ssb_sul = 0; - prach_root_seq_idx_c_ prach_root_seq_idx; - subcarrier_spacing_e msg1_subcarrier_spacing; - restricted_set_cfg_e_ restricted_set_cfg; - // ... - // group 0 - copy_ptr ra_prioritization_for_access_id_r16; - copy_ptr prach_root_seq_idx_r16; - // group 1 - copy_ptr ra_prioritization_for_slicing_r17; - copy_ptr feature_combination_preambs_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AdditionalRACH-Config-r17 ::= SEQUENCE -struct add_rach_cfg_r17_s { - bool ext = false; - bool rach_cfg_common_r17_present = false; - bool msg_a_cfg_common_r17_present = false; - rach_cfg_common_s rach_cfg_common_r17; - msg_a_cfg_common_r16_s msg_a_cfg_common_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ControlResourceSet ::= SEQUENCE -struct coreset_s { - struct cce_reg_map_type_c_ { - struct interleaved_s_ { - struct reg_bundle_size_opts { - enum options { n2, n3, n6, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using reg_bundle_size_e_ = enumerated; - struct interleaver_size_opts { - enum options { n2, n3, n6, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using interleaver_size_e_ = enumerated; - - // member variables - bool shift_idx_present = false; - reg_bundle_size_e_ reg_bundle_size; - interleaver_size_e_ interleaver_size; - uint16_t shift_idx = 0; - }; - struct types_opts { - enum options { interleaved, non_interleaved, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - cce_reg_map_type_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 - interleaved_s_& interleaved() - { - assert_choice_type(types::interleaved, type_, "cce-REG-MappingType"); - return c; - } - const interleaved_s_& interleaved() const - { - assert_choice_type(types::interleaved, type_, "cce-REG-MappingType"); - return c; - } - interleaved_s_& set_interleaved(); - void set_non_interleaved(); - - private: - types type_; - interleaved_s_ c; - }; - struct precoder_granularity_opts { - enum options { same_as_reg_bundle, all_contiguous_rbs, nulltype } value; - - const char* to_string() const; - }; - using precoder_granularity_e_ = enumerated; - using tci_states_pdcch_to_add_list_l_ = dyn_array; - using tci_states_pdcch_to_release_list_l_ = dyn_array; - - // member variables - bool ext = false; - bool tci_present_in_dci_present = false; - bool pdcch_dmrs_scrambling_id_present = false; - uint8_t coreset_id = 0; - fixed_bitstring<45> freq_domain_res; - uint8_t dur = 1; - cce_reg_map_type_c_ cce_reg_map_type; - precoder_granularity_e_ precoder_granularity; - tci_states_pdcch_to_add_list_l_ tci_states_pdcch_to_add_list; - tci_states_pdcch_to_release_list_l_ tci_states_pdcch_to_release_list; - uint32_t pdcch_dmrs_scrambling_id = 0; - // ... - // group 0 - bool rb_offset_r16_present = false; - bool tci_present_dci_1_2_r16_present = false; - bool coreset_pool_idx_r16_present = false; - bool coreset_id_v1610_present = false; - uint8_t rb_offset_r16 = 0; - uint8_t tci_present_dci_1_2_r16 = 1; - uint8_t coreset_pool_idx_r16 = 0; - uint8_t coreset_id_v1610 = 12; - // group 1 - bool follow_unified_tci_state_r17_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MultiFrequencyBandListNR-SIB ::= SEQUENCE (SIZE (1..8)) OF NR-MultiBandInfo -using multi_freq_band_list_nr_sib_l = dyn_array; - -// PDSCH-TimeDomainResourceAllocationList ::= SEQUENCE (SIZE (1..16)) OF PDSCH-TimeDomainResourceAllocation -using pdsch_time_domain_res_alloc_list_l = dyn_array; - -// PDSCH-TimeDomainResourceAllocationList-r16 ::= SEQUENCE (SIZE (1..16)) OF PDSCH-TimeDomainResourceAllocation-r16 -using pdsch_time_domain_res_alloc_list_r16_l = dyn_array; - -// PUSCH-TimeDomainResourceAllocationList ::= SEQUENCE (SIZE (1..16)) OF PUSCH-TimeDomainResourceAllocation -using pusch_time_domain_res_alloc_list_l = dyn_array; - -// 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // 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(types::one_slot, type_, "symbolsInResourceBlock"); - return c.get>(); - } - fixed_bitstring<28>& two_slots() - { - assert_choice_type(types::two_slots, type_, "symbolsInResourceBlock"); - return c.get>(); - } - const fixed_bitstring<14>& one_slot() const - { - assert_choice_type(types::one_slot, type_, "symbolsInResourceBlock"); - return c.get>(); - } - const fixed_bitstring<28>& two_slots() const - { - assert_choice_type(types::two_slots, type_, "symbolsInResourceBlock"); - return c.get>(); - } - fixed_bitstring<14>& set_one_slot(); - fixed_bitstring<28>& set_two_slots(); - - 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // 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(types::n2, type_, "periodicityAndPattern"); - return c.get>(); - } - fixed_bitstring<4>& n4() - { - assert_choice_type(types::n4, type_, "periodicityAndPattern"); - return c.get>(); - } - fixed_bitstring<5>& n5() - { - assert_choice_type(types::n5, type_, "periodicityAndPattern"); - return c.get>(); - } - fixed_bitstring<8>& n8() - { - assert_choice_type(types::n8, type_, "periodicityAndPattern"); - return c.get>(); - } - fixed_bitstring<10>& n10() - { - assert_choice_type(types::n10, type_, "periodicityAndPattern"); - return c.get>(); - } - fixed_bitstring<20>& n20() - { - assert_choice_type(types::n20, type_, "periodicityAndPattern"); - return c.get>(); - } - fixed_bitstring<40>& n40() - { - assert_choice_type(types::n40, type_, "periodicityAndPattern"); - return c.get>(); - } - const fixed_bitstring<2>& n2() const - { - assert_choice_type(types::n2, type_, "periodicityAndPattern"); - return c.get>(); - } - const fixed_bitstring<4>& n4() const - { - assert_choice_type(types::n4, type_, "periodicityAndPattern"); - return c.get>(); - } - const fixed_bitstring<5>& n5() const - { - assert_choice_type(types::n5, type_, "periodicityAndPattern"); - return c.get>(); - } - const fixed_bitstring<8>& n8() const - { - assert_choice_type(types::n8, type_, "periodicityAndPattern"); - return c.get>(); - } - const fixed_bitstring<10>& n10() const - { - assert_choice_type(types::n10, type_, "periodicityAndPattern"); - return c.get>(); - } - const fixed_bitstring<20>& n20() const - { - assert_choice_type(types::n20, type_, "periodicityAndPattern"); - return c.get>(); - } - const fixed_bitstring<40>& n40() const - { - assert_choice_type(types::n40, type_, "periodicityAndPattern"); - return c.get>(); - } - fixed_bitstring<2>& set_n2(); - fixed_bitstring<4>& set_n4(); - fixed_bitstring<5>& set_n5(); - fixed_bitstring<8>& set_n8(); - fixed_bitstring<10>& set_n10(); - fixed_bitstring<20>& set_n20(); - fixed_bitstring<40>& set_n40(); - - private: - types type_; - choice_buffer_t> c; - - void destroy_(); - }; - - // 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 { bitmaps, coreset, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::bitmaps, type_, "patternType"); - return c.get(); - } - uint8_t& coreset() - { - assert_choice_type(types::coreset, type_, "patternType"); - return c.get(); - } - const bitmaps_s_& bitmaps() const - { - assert_choice_type(types::bitmaps, type_, "patternType"); - return c.get(); - } - const uint8_t& coreset() const - { - assert_choice_type(types::coreset, type_, "patternType"); - return c.get(); - } - bitmaps_s_& set_bitmaps(); - uint8_t& set_coreset(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct dummy_opts { - enum options { dyn, semi_static, nulltype } value; - - const char* to_string() const; - }; - using dummy_e_ = enumerated; - - // 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; - // ... - // group 0 - bool coreset_r16_present = false; - uint8_t coreset_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using carrier_bw_dl_e_ = enumerated; - struct nrof_crs_ports_opts { - enum options { n1, n2, n4, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using nrof_crs_ports_e_ = enumerated; - struct v_shift_opts { - enum options { n0, n1, n2, n3, n4, n5, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using v_shift_e_ = enumerated; - - // member variables - 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SearchSpace ::= SEQUENCE -struct search_space_s { - struct monitoring_slot_periodicity_and_offset_c_ { - struct types_opts { - enum options { - sl1, - sl2, - sl4, - sl5, - sl8, - sl10, - sl16, - sl20, - sl40, - sl80, - sl160, - sl320, - sl640, - sl1280, - sl2560, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - monitoring_slot_periodicity_and_offset_c_() = default; - monitoring_slot_periodicity_and_offset_c_(const monitoring_slot_periodicity_and_offset_c_& other); - monitoring_slot_periodicity_and_offset_c_& operator=(const monitoring_slot_periodicity_and_offset_c_& other); - ~monitoring_slot_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& sl2() - { - assert_choice_type(types::sl2, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl4() - { - assert_choice_type(types::sl4, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl5() - { - assert_choice_type(types::sl5, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl8() - { - assert_choice_type(types::sl8, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl10() - { - assert_choice_type(types::sl10, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl16() - { - assert_choice_type(types::sl16, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl20() - { - assert_choice_type(types::sl20, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl40() - { - assert_choice_type(types::sl40, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl80() - { - assert_choice_type(types::sl80, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint8_t& sl160() - { - assert_choice_type(types::sl160, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint16_t& sl320() - { - assert_choice_type(types::sl320, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint16_t& sl640() - { - assert_choice_type(types::sl640, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint16_t& sl1280() - { - assert_choice_type(types::sl1280, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - uint16_t& sl2560() - { - assert_choice_type(types::sl2560, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl2() const - { - assert_choice_type(types::sl2, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl4() const - { - assert_choice_type(types::sl4, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl5() const - { - assert_choice_type(types::sl5, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl8() const - { - assert_choice_type(types::sl8, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl10() const - { - assert_choice_type(types::sl10, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl16() const - { - assert_choice_type(types::sl16, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl20() const - { - assert_choice_type(types::sl20, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl40() const - { - assert_choice_type(types::sl40, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl80() const - { - assert_choice_type(types::sl80, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint8_t& sl160() const - { - assert_choice_type(types::sl160, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint16_t& sl320() const - { - assert_choice_type(types::sl320, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint16_t& sl640() const - { - assert_choice_type(types::sl640, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint16_t& sl1280() const - { - assert_choice_type(types::sl1280, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - const uint16_t& sl2560() const - { - assert_choice_type(types::sl2560, type_, "monitoringSlotPeriodicityAndOffset"); - return c.get(); - } - void set_sl1(); - uint8_t& set_sl2(); - uint8_t& set_sl4(); - uint8_t& set_sl5(); - uint8_t& set_sl8(); - uint8_t& set_sl10(); - uint8_t& set_sl16(); - uint8_t& set_sl20(); - uint8_t& set_sl40(); - uint8_t& set_sl80(); - uint8_t& set_sl160(); - uint16_t& set_sl320(); - uint16_t& set_sl640(); - uint16_t& set_sl1280(); - uint16_t& set_sl2560(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct nrof_candidates_s_ { - struct aggregation_level1_opts { - enum options { n0, n1, n2, n3, n4, n5, n6, n8, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level1_e_ = enumerated; - struct aggregation_level2_opts { - enum options { n0, n1, n2, n3, n4, n5, n6, n8, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level2_e_ = enumerated; - struct aggregation_level4_opts { - enum options { n0, n1, n2, n3, n4, n5, n6, n8, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level4_e_ = enumerated; - struct aggregation_level8_opts { - enum options { n0, n1, n2, n3, n4, n5, n6, n8, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level8_e_ = enumerated; - struct aggregation_level16_opts { - enum options { n0, n1, n2, n3, n4, n5, n6, n8, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level16_e_ = enumerated; - - // member variables - aggregation_level1_e_ aggregation_level1; - aggregation_level2_e_ aggregation_level2; - aggregation_level4_e_ aggregation_level4; - aggregation_level8_e_ aggregation_level8; - aggregation_level16_e_ aggregation_level16; - }; - struct search_space_type_c_ { - struct common_s_ { - struct dci_format0_0_and_format1_0_s_ { - bool ext = false; - // ... - }; - struct dci_format2_0_s_ { - struct nrof_candidates_sfi_s_ { - struct aggregation_level1_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level1_e_ = enumerated; - struct aggregation_level2_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level2_e_ = enumerated; - struct aggregation_level4_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level4_e_ = enumerated; - struct aggregation_level8_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level8_e_ = enumerated; - struct aggregation_level16_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level16_e_ = enumerated; - - // member variables - bool aggregation_level1_present = false; - bool aggregation_level2_present = false; - bool aggregation_level4_present = false; - bool aggregation_level8_present = false; - bool aggregation_level16_present = false; - aggregation_level1_e_ aggregation_level1; - aggregation_level2_e_ aggregation_level2; - aggregation_level4_e_ aggregation_level4; - aggregation_level8_e_ aggregation_level8; - aggregation_level16_e_ aggregation_level16; - }; - - // member variables - bool ext = false; - nrof_candidates_sfi_s_ nrof_candidates_sfi; - // ... - }; - struct dci_format2_1_s_ { - bool ext = false; - // ... - }; - struct dci_format2_2_s_ { - bool ext = false; - // ... - }; - struct dci_format2_3_s_ { - struct dummy1_opts { - enum options { sl1, sl2, sl4, sl5, sl8, sl10, sl16, sl20, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using dummy1_e_ = enumerated; - struct dummy2_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using dummy2_e_ = enumerated; - - // member variables - bool ext = false; - bool dummy1_present = false; - dummy1_e_ dummy1; - dummy2_e_ dummy2; - // ... - }; - - // member variables - bool dci_format0_0_and_format1_0_present = false; - bool dci_format2_0_present = false; - bool dci_format2_1_present = false; - bool dci_format2_2_present = false; - bool dci_format2_3_present = false; - dci_format0_0_and_format1_0_s_ dci_format0_0_and_format1_0; - dci_format2_0_s_ dci_format2_0; - dci_format2_1_s_ dci_format2_1; - dci_format2_2_s_ dci_format2_2; - dci_format2_3_s_ dci_format2_3; - }; - struct ue_specific_s_ { - struct dci_formats_opts { - enum options { formats0_neg0_and_neg1_neg0, formats0_neg1_and_neg1_neg1, nulltype } value; - - const char* to_string() const; - }; - using dci_formats_e_ = enumerated; - struct dci_formats_sl_r16_opts { - enum options { - formats0_neg0_and_neg1_neg0, - formats0_neg1_and_neg1_neg1, - formats3_neg0, - formats3_neg1, - formats3_neg0_and_neg3_neg1, - nulltype - } value; - - const char* to_string() const; - }; - using dci_formats_sl_r16_e_ = enumerated; - struct dci_formats_ext_r16_opts { - enum options { - formats0_neg2_and_neg1_neg2, - formats0_neg1_and_neg1_neg1_and_neg0_neg2_and_neg1_neg2, - nulltype - } value; - - const char* to_string() const; - }; - using dci_formats_ext_r16_e_ = enumerated; - - // member variables - bool ext = false; - dci_formats_e_ dci_formats; - // ... - // group 0 - bool dci_formats_mt_r16_present = false; - bool dci_formats_sl_r16_present = false; - bool dci_formats_ext_r16_present = false; - dci_formats_sl_r16_e_ dci_formats_sl_r16; - dci_formats_ext_r16_e_ dci_formats_ext_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - }; - struct types_opts { - enum options { common, ue_specific, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - search_space_type_c_() = default; - search_space_type_c_(const search_space_type_c_& other); - search_space_type_c_& operator=(const search_space_type_c_& other); - ~search_space_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 - common_s_& common() - { - assert_choice_type(types::common, type_, "searchSpaceType"); - return c.get(); - } - ue_specific_s_& ue_specific() - { - assert_choice_type(types::ue_specific, type_, "searchSpaceType"); - return c.get(); - } - const common_s_& common() const - { - assert_choice_type(types::common, type_, "searchSpaceType"); - return c.get(); - } - const ue_specific_s_& ue_specific() const - { - assert_choice_type(types::ue_specific, type_, "searchSpaceType"); - return c.get(); - } - common_s_& set_common(); - ue_specific_s_& set_ue_specific(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool coreset_id_present = false; - bool monitoring_slot_periodicity_and_offset_present = false; - bool dur_present = false; - bool monitoring_symbols_within_slot_present = false; - bool nrof_candidates_present = false; - bool search_space_type_present = false; - uint8_t search_space_id = 0; - uint8_t coreset_id = 0; - monitoring_slot_periodicity_and_offset_c_ monitoring_slot_periodicity_and_offset; - uint16_t dur = 2; - fixed_bitstring<14> monitoring_symbols_within_slot; - nrof_candidates_s_ nrof_candidates; - search_space_type_c_ search_space_type; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SearchSpaceExt-r16 ::= SEQUENCE -struct search_space_ext_r16_s { - struct search_space_type_r16_s_ { - struct common_r16_s_ { - struct dci_format2_4_r16_s_ { - struct nrof_candidates_ci_r16_s_ { - struct aggregation_level1_r16_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level1_r16_e_ = enumerated; - struct aggregation_level2_r16_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level2_r16_e_ = enumerated; - struct aggregation_level4_r16_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level4_r16_e_ = enumerated; - struct aggregation_level8_r16_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level8_r16_e_ = enumerated; - struct aggregation_level16_r16_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level16_r16_e_ = enumerated; - - // member variables - bool aggregation_level1_r16_present = false; - bool aggregation_level2_r16_present = false; - bool aggregation_level4_r16_present = false; - bool aggregation_level8_r16_present = false; - bool aggregation_level16_r16_present = false; - aggregation_level1_r16_e_ aggregation_level1_r16; - aggregation_level2_r16_e_ aggregation_level2_r16; - aggregation_level4_r16_e_ aggregation_level4_r16; - aggregation_level8_r16_e_ aggregation_level8_r16; - aggregation_level16_r16_e_ aggregation_level16_r16; - }; - - // member variables - bool ext = false; - nrof_candidates_ci_r16_s_ nrof_candidates_ci_r16; - // ... - }; - struct dci_format2_5_r16_s_ { - struct nrof_candidates_iab_r16_s_ { - struct aggregation_level1_r16_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level1_r16_e_ = enumerated; - struct aggregation_level2_r16_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level2_r16_e_ = enumerated; - struct aggregation_level4_r16_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level4_r16_e_ = enumerated; - struct aggregation_level8_r16_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level8_r16_e_ = enumerated; - struct aggregation_level16_r16_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level16_r16_e_ = enumerated; - - // member variables - bool aggregation_level1_r16_present = false; - bool aggregation_level2_r16_present = false; - bool aggregation_level4_r16_present = false; - bool aggregation_level8_r16_present = false; - bool aggregation_level16_r16_present = false; - aggregation_level1_r16_e_ aggregation_level1_r16; - aggregation_level2_r16_e_ aggregation_level2_r16; - aggregation_level4_r16_e_ aggregation_level4_r16; - aggregation_level8_r16_e_ aggregation_level8_r16; - aggregation_level16_r16_e_ aggregation_level16_r16; - }; - - // member variables - bool ext = false; - nrof_candidates_iab_r16_s_ nrof_candidates_iab_r16; - // ... - }; - struct dci_format2_6_r16_s_ { - bool ext = false; - // ... - }; - - // member variables - bool ext = false; - bool dci_format2_4_r16_present = false; - bool dci_format2_5_r16_present = false; - bool dci_format2_6_r16_present = false; - dci_format2_4_r16_s_ dci_format2_4_r16; - dci_format2_5_r16_s_ dci_format2_5_r16; - dci_format2_6_r16_s_ dci_format2_6_r16; - // ... - }; - - // member variables - common_r16_s_ common_r16; - }; - using search_space_group_id_list_r16_l_ = bounded_array; - - // member variables - bool coreset_id_r16_present = false; - bool search_space_type_r16_present = false; - bool freq_monitor_locations_r16_present = false; - uint8_t coreset_id_r16 = 0; - search_space_type_r16_s_ search_space_type_r16; - search_space_group_id_list_r16_l_ search_space_group_id_list_r16; - fixed_bitstring<5> freq_monitor_locations_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SearchSpaceExt-v1700 ::= SEQUENCE -struct search_space_ext_v1700_s { - struct monitoring_slot_periodicity_and_offset_v1710_c_ { - struct types_opts { - enum options { sl32, sl64, sl128, sl5120, sl10240, sl20480, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - monitoring_slot_periodicity_and_offset_v1710_c_() = default; - monitoring_slot_periodicity_and_offset_v1710_c_(const monitoring_slot_periodicity_and_offset_v1710_c_& other); - monitoring_slot_periodicity_and_offset_v1710_c_& - operator=(const monitoring_slot_periodicity_and_offset_v1710_c_& other); - ~monitoring_slot_periodicity_and_offset_v1710_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& sl32() - { - assert_choice_type(types::sl32, type_, "monitoringSlotPeriodicityAndOffset-v1710"); - return c.get(); - } - uint8_t& sl64() - { - assert_choice_type(types::sl64, type_, "monitoringSlotPeriodicityAndOffset-v1710"); - return c.get(); - } - uint8_t& sl128() - { - assert_choice_type(types::sl128, type_, "monitoringSlotPeriodicityAndOffset-v1710"); - return c.get(); - } - uint16_t& sl5120() - { - assert_choice_type(types::sl5120, type_, "monitoringSlotPeriodicityAndOffset-v1710"); - return c.get(); - } - uint16_t& sl10240() - { - assert_choice_type(types::sl10240, type_, "monitoringSlotPeriodicityAndOffset-v1710"); - return c.get(); - } - uint16_t& sl20480() - { - assert_choice_type(types::sl20480, type_, "monitoringSlotPeriodicityAndOffset-v1710"); - return c.get(); - } - const uint8_t& sl32() const - { - assert_choice_type(types::sl32, type_, "monitoringSlotPeriodicityAndOffset-v1710"); - return c.get(); - } - const uint8_t& sl64() const - { - assert_choice_type(types::sl64, type_, "monitoringSlotPeriodicityAndOffset-v1710"); - return c.get(); - } - const uint8_t& sl128() const - { - assert_choice_type(types::sl128, type_, "monitoringSlotPeriodicityAndOffset-v1710"); - return c.get(); - } - const uint16_t& sl5120() const - { - assert_choice_type(types::sl5120, type_, "monitoringSlotPeriodicityAndOffset-v1710"); - return c.get(); - } - const uint16_t& sl10240() const - { - assert_choice_type(types::sl10240, type_, "monitoringSlotPeriodicityAndOffset-v1710"); - return c.get(); - } - const uint16_t& sl20480() const - { - assert_choice_type(types::sl20480, type_, "monitoringSlotPeriodicityAndOffset-v1710"); - return c.get(); - } - uint8_t& set_sl32(); - uint8_t& set_sl64(); - uint8_t& set_sl128(); - uint16_t& set_sl5120(); - uint16_t& set_sl10240(); - uint16_t& set_sl20480(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct monitoring_slots_within_slot_group_r17_c_ { - struct types_opts { - enum options { slot_group_len4_r17, slot_group_len8_r17, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - monitoring_slots_within_slot_group_r17_c_() = default; - monitoring_slots_within_slot_group_r17_c_(const monitoring_slots_within_slot_group_r17_c_& other); - monitoring_slots_within_slot_group_r17_c_& operator=(const monitoring_slots_within_slot_group_r17_c_& other); - ~monitoring_slots_within_slot_group_r17_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>& slot_group_len4_r17() - { - assert_choice_type(types::slot_group_len4_r17, type_, "monitoringSlotsWithinSlotGroup-r17"); - return c.get>(); - } - fixed_bitstring<8>& slot_group_len8_r17() - { - assert_choice_type(types::slot_group_len8_r17, type_, "monitoringSlotsWithinSlotGroup-r17"); - return c.get>(); - } - const fixed_bitstring<4>& slot_group_len4_r17() const - { - assert_choice_type(types::slot_group_len4_r17, type_, "monitoringSlotsWithinSlotGroup-r17"); - return c.get>(); - } - const fixed_bitstring<8>& slot_group_len8_r17() const - { - assert_choice_type(types::slot_group_len8_r17, type_, "monitoringSlotsWithinSlotGroup-r17"); - return c.get>(); - } - fixed_bitstring<4>& set_slot_group_len4_r17(); - fixed_bitstring<8>& set_slot_group_len8_r17(); - - private: - types type_; - choice_buffer_t> c; - - void destroy_(); - }; - struct search_space_type_r17_s_ { - struct common_r17_s_ { - struct dci_format4_0_r17_s_ { - bool ext = false; - // ... - }; - struct dci_format4_1_r17_s_ { - bool ext = false; - // ... - }; - struct dci_format4_2_r17_s_ { - bool ext = false; - // ... - }; - struct dci_format4_1_and_format4_2_r17_s_ { - bool ext = false; - // ... - }; - struct dci_format2_7_r17_s_ { - struct nrof_candidates_pei_r17_s_ { - struct aggregation_level4_r17_opts { - enum options { n0, n1, n2, n3, n4, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level4_r17_e_ = enumerated; - struct aggregation_level8_r17_opts { - enum options { n0, n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level8_r17_e_ = enumerated; - struct aggregation_level16_r17_opts { - enum options { n0, n1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using aggregation_level16_r17_e_ = enumerated; - - // member variables - bool aggregation_level4_r17_present = false; - bool aggregation_level8_r17_present = false; - bool aggregation_level16_r17_present = false; - aggregation_level4_r17_e_ aggregation_level4_r17; - aggregation_level8_r17_e_ aggregation_level8_r17; - aggregation_level16_r17_e_ aggregation_level16_r17; - }; - - // member variables - bool ext = false; - nrof_candidates_pei_r17_s_ nrof_candidates_pei_r17; - // ... - }; - - // member variables - bool dci_format4_0_r17_present = false; - bool dci_format4_1_r17_present = false; - bool dci_format4_2_r17_present = false; - bool dci_format4_1_and_format4_2_r17_present = false; - bool dci_format2_7_r17_present = false; - dci_format4_0_r17_s_ dci_format4_0_r17; - dci_format4_1_r17_s_ dci_format4_1_r17; - dci_format4_2_r17_s_ dci_format4_2_r17; - dci_format4_1_and_format4_2_r17_s_ dci_format4_1_and_format4_2_r17; - dci_format2_7_r17_s_ dci_format2_7_r17; - }; - - // member variables - common_r17_s_ common_r17; - }; - using search_space_group_id_list_r17_l_ = bounded_array; - - // member variables - bool monitoring_slot_periodicity_and_offset_v1710_present = false; - bool monitoring_slots_within_slot_group_r17_present = false; - bool dur_r17_present = false; - bool search_space_type_r17_present = false; - bool search_space_linking_id_r17_present = false; - monitoring_slot_periodicity_and_offset_v1710_c_ monitoring_slot_periodicity_and_offset_v1710; - monitoring_slots_within_slot_group_r17_c_ monitoring_slots_within_slot_group_r17; - uint16_t dur_r17 = 4; - search_space_type_r17_s_ search_space_type_r17; - search_space_group_id_list_r17_l_ search_space_group_id_list_r17; - uint8_t search_space_linking_id_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AdditionalRACH-ConfigList-r17 ::= SEQUENCE (SIZE (1..256)) OF AdditionalRACH-Config-r17 -using add_rach_cfg_list_r17_l = dyn_array; - -// BWP ::= SEQUENCE -struct bwp_s { - bool cp_present = false; - uint16_t location_and_bw = 0; - subcarrier_spacing_e subcarrier_spacing; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NumberOfMsg3-Repetitions-r17 ::= ENUMERATED -struct nof_msg3_repeats_r17_opts { - enum options { n1, n2, n3, n4, n7, n8, n12, n16, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; -}; -using nof_msg3_repeats_r17_e = enumerated; - -// PDCCH-ConfigCommon ::= SEQUENCE -struct pdcch_cfg_common_s { - using common_search_space_list_l_ = dyn_array; - struct first_pdcch_monitoring_occasion_of_po_c_ { - using scs15_kh_zone_t_l_ = bounded_array; - using scs30_kh_zone_t_scs15_kh_zhalf_t_l_ = bounded_array; - using scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_ = bounded_array; - using scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_ = bounded_array; - using scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_ = - bounded_array; - using scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_ = bounded_array; - using scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_ = bounded_array; - using scs120_kh_zone_sixteenth_t_l_ = bounded_array; - struct types_opts { - enum options { - scs15_kh_zone_t, - scs30_kh_zone_t_scs15_kh_zhalf_t, - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, - scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, - scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, - scs120_kh_zone_sixteenth_t, - nulltype - } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - first_pdcch_monitoring_occasion_of_po_c_() = default; - first_pdcch_monitoring_occasion_of_po_c_(const first_pdcch_monitoring_occasion_of_po_c_& other); - first_pdcch_monitoring_occasion_of_po_c_& operator=(const first_pdcch_monitoring_occasion_of_po_c_& other); - ~first_pdcch_monitoring_occasion_of_po_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 - scs15_kh_zone_t_l_& scs15_kh_zone_t() - { - assert_choice_type(types::scs15_kh_zone_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs30_kh_zone_t_scs15_kh_zhalf_t_l_& scs30_kh_zone_t_scs15_kh_zhalf_t() - { - assert_choice_type(types::scs30_kh_zone_t_scs15_kh_zhalf_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() - { - assert_choice_type( - types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() - { - assert_choice_type(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() - { - assert_choice_type(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& - scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() - { - assert_choice_type(types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() - { - assert_choice_type( - types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs120_kh_zone_sixteenth_t_l_& scs120_kh_zone_sixteenth_t() - { - assert_choice_type(types::scs120_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs15_kh_zone_t_l_& scs15_kh_zone_t() const - { - assert_choice_type(types::scs15_kh_zone_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs30_kh_zone_t_scs15_kh_zhalf_t_l_& scs30_kh_zone_t_scs15_kh_zhalf_t() const - { - assert_choice_type(types::scs30_kh_zone_t_scs15_kh_zhalf_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() const - { - assert_choice_type( - types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() const - { - assert_choice_type(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() const - { - assert_choice_type(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& - scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() const - { - assert_choice_type(types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& - scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() const - { - assert_choice_type( - types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs120_kh_zone_sixteenth_t_l_& scs120_kh_zone_sixteenth_t() const - { - assert_choice_type(types::scs120_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs15_kh_zone_t_l_& set_scs15_kh_zone_t(); - scs30_kh_zone_t_scs15_kh_zhalf_t_l_& set_scs30_kh_zone_t_scs15_kh_zhalf_t(); - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& set_scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t(); - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& - set_scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t(); - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& - set_scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t(); - scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& - set_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t(); - scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& set_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t(); - scs120_kh_zone_sixteenth_t_l_& set_scs120_kh_zone_sixteenth_t(); - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - using common_search_space_list_ext_r16_l_ = dyn_array; - struct sdt_search_space_r17_c_ { - struct types_opts { - enum options { new_search_space, existing_search_space, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - sdt_search_space_r17_c_() = default; - sdt_search_space_r17_c_(const sdt_search_space_r17_c_& other); - sdt_search_space_r17_c_& operator=(const sdt_search_space_r17_c_& other); - ~sdt_search_space_r17_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 - search_space_s& new_search_space() - { - assert_choice_type(types::new_search_space, type_, "sdt-SearchSpace-r17"); - return c.get(); - } - uint8_t& existing_search_space() - { - assert_choice_type(types::existing_search_space, type_, "sdt-SearchSpace-r17"); - return c.get(); - } - const search_space_s& new_search_space() const - { - assert_choice_type(types::new_search_space, type_, "sdt-SearchSpace-r17"); - return c.get(); - } - const uint8_t& existing_search_space() const - { - assert_choice_type(types::existing_search_space, type_, "sdt-SearchSpace-r17"); - return c.get(); - } - search_space_s& set_new_search_space(); - uint8_t& set_existing_search_space(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - using common_search_space_list_ext2_r17_l_ = dyn_array; - struct first_pdcch_monitoring_occasion_of_po_v1710_c_ { - using scs480_kh_zone_eighth_t_l_ = bounded_array; - using scs480_kh_zone_sixteenth_t_l_ = bounded_array; - struct types_opts { - enum options { scs480_kh_zone_eighth_t, scs480_kh_zone_sixteenth_t, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - first_pdcch_monitoring_occasion_of_po_v1710_c_() = default; - first_pdcch_monitoring_occasion_of_po_v1710_c_(const first_pdcch_monitoring_occasion_of_po_v1710_c_& other); - first_pdcch_monitoring_occasion_of_po_v1710_c_& - operator=(const first_pdcch_monitoring_occasion_of_po_v1710_c_& other); - ~first_pdcch_monitoring_occasion_of_po_v1710_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 - scs480_kh_zone_eighth_t_l_& scs480_kh_zone_eighth_t() - { - assert_choice_type(types::scs480_kh_zone_eighth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); - return c.get(); - } - scs480_kh_zone_sixteenth_t_l_& scs480_kh_zone_sixteenth_t() - { - assert_choice_type(types::scs480_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); - return c.get(); - } - const scs480_kh_zone_eighth_t_l_& scs480_kh_zone_eighth_t() const - { - assert_choice_type(types::scs480_kh_zone_eighth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); - return c.get(); - } - const scs480_kh_zone_sixteenth_t_l_& scs480_kh_zone_sixteenth_t() const - { - assert_choice_type(types::scs480_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); - return c.get(); - } - scs480_kh_zone_eighth_t_l_& set_scs480_kh_zone_eighth_t(); - scs480_kh_zone_sixteenth_t_l_& set_scs480_kh_zone_sixteenth_t(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct pei_cfg_bwp_r17_s_ { - struct first_pdcch_monitoring_occasion_of_pei_o_r17_c_ { - using scs15_kh_zone_t_l_ = bounded_array; - using scs30_kh_zone_t_scs15_kh_zhalf_t_l_ = bounded_array; - using scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_ = bounded_array; - using scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_ = - bounded_array; - using scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_ = - bounded_array; - using scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_ = - bounded_array; - using scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_ = bounded_array; - using scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_ = bounded_array; - using scs480_kh_zone_eighth_t_l_ = bounded_array; - using scs480_kh_zone_sixteenth_t_l_ = bounded_array; - struct types_opts { - enum options { - scs15_kh_zone_t, - scs30_kh_zone_t_scs15_kh_zhalf_t, - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, - scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, - scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, - scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t, - scs480_kh_zone_eighth_t, - scs480_kh_zone_sixteenth_t, - nulltype - } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - first_pdcch_monitoring_occasion_of_pei_o_r17_c_() = default; - first_pdcch_monitoring_occasion_of_pei_o_r17_c_(const first_pdcch_monitoring_occasion_of_pei_o_r17_c_& other); - first_pdcch_monitoring_occasion_of_pei_o_r17_c_& - operator=(const first_pdcch_monitoring_occasion_of_pei_o_r17_c_& other); - ~first_pdcch_monitoring_occasion_of_pei_o_r17_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 - scs15_kh_zone_t_l_& scs15_kh_zone_t() - { - assert_choice_type(types::scs15_kh_zone_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - scs30_kh_zone_t_scs15_kh_zhalf_t_l_& scs30_kh_zone_t_scs15_kh_zhalf_t() - { - assert_choice_type(types::scs30_kh_zone_t_scs15_kh_zhalf_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() - { - assert_choice_type(types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, - type_, - "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() - { - assert_choice_type(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() - { - assert_choice_type( - types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& - scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() - { - assert_choice_type( - types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& - scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() - { - assert_choice_type(types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t() - { - assert_choice_type( - types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - scs480_kh_zone_eighth_t_l_& scs480_kh_zone_eighth_t() - { - assert_choice_type(types::scs480_kh_zone_eighth_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - scs480_kh_zone_sixteenth_t_l_& scs480_kh_zone_sixteenth_t() - { - assert_choice_type(types::scs480_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - const scs15_kh_zone_t_l_& scs15_kh_zone_t() const - { - assert_choice_type(types::scs15_kh_zone_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - const scs30_kh_zone_t_scs15_kh_zhalf_t_l_& scs30_kh_zone_t_scs15_kh_zhalf_t() const - { - assert_choice_type(types::scs30_kh_zone_t_scs15_kh_zhalf_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - const scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() const - { - assert_choice_type(types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, - type_, - "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - const scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() const - { - assert_choice_type(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - const scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() const - { - assert_choice_type( - types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - const scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& - scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() const - { - assert_choice_type( - types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - const scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& - scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() const - { - assert_choice_type(types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - const scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t() const - { - assert_choice_type( - types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - const scs480_kh_zone_eighth_t_l_& scs480_kh_zone_eighth_t() const - { - assert_choice_type(types::scs480_kh_zone_eighth_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - const scs480_kh_zone_sixteenth_t_l_& scs480_kh_zone_sixteenth_t() const - { - assert_choice_type(types::scs480_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - return c.get(); - } - scs15_kh_zone_t_l_& set_scs15_kh_zone_t(); - scs30_kh_zone_t_scs15_kh_zhalf_t_l_& set_scs30_kh_zone_t_scs15_kh_zhalf_t(); - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& - set_scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t(); - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& - set_scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t(); - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& - set_scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t(); - scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& - set_scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t(); - scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& - set_scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t(); - scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& set_scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t(); - scs480_kh_zone_eighth_t_l_& set_scs480_kh_zone_eighth_t(); - scs480_kh_zone_sixteenth_t_l_& set_scs480_kh_zone_sixteenth_t(); - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - - // member variables - uint8_t pei_search_space_r17 = 0; - first_pdcch_monitoring_occasion_of_pei_o_r17_c_ first_pdcch_monitoring_occasion_of_pei_o_r17; - }; - - // member variables - bool ext = false; - bool coreset_zero_present = false; - bool common_coreset_present = false; - bool search_space_zero_present = false; - bool search_space_sib1_present = false; - bool search_space_other_sys_info_present = false; - bool paging_search_space_present = false; - bool ra_search_space_present = false; - uint8_t coreset_zero = 0; - coreset_s common_coreset; - uint8_t search_space_zero = 0; - common_search_space_list_l_ common_search_space_list; - uint8_t search_space_sib1 = 0; - uint8_t search_space_other_sys_info = 0; - uint8_t paging_search_space = 0; - uint8_t ra_search_space = 0; - // ... - // group 0 - copy_ptr first_pdcch_monitoring_occasion_of_po; - // group 1 - copy_ptr common_search_space_list_ext_r16; - // group 2 - bool search_space_mcch_r17_present = false; - bool search_space_mtch_r17_present = false; - copy_ptr sdt_search_space_r17; - uint8_t search_space_mcch_r17 = 0; - uint8_t search_space_mtch_r17 = 0; - copy_ptr common_search_space_list_ext2_r17; - copy_ptr first_pdcch_monitoring_occasion_of_po_v1710; - copy_ptr pei_cfg_bwp_r17; - // group 3 - bool follow_unified_tci_state_v1720_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PDSCH-ConfigCommon ::= SEQUENCE -struct pdsch_cfg_common_s { - bool ext = false; - pdsch_time_domain_res_alloc_list_l pdsch_time_domain_alloc_list; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PUCCH-ConfigCommon ::= SEQUENCE -struct pucch_cfg_common_s { - struct pucch_group_hop_opts { - enum options { neither, enable, disable, nulltype } value; - - const char* to_string() const; - }; - using pucch_group_hop_e_ = enumerated; - struct intra_slot_fh_r17_opts { - enum options { from_lower_edge, from_upper_edge, nulltype } value; - - const char* to_string() const; - }; - using intra_slot_fh_r17_e_ = enumerated; - struct add_prb_offset_r17_opts { - enum options { n2, n3, n4, n6, n8, n9, n10, n12, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using add_prb_offset_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool pucch_res_common_present = false; - bool hop_id_present = false; - bool p0_nominal_present = false; - uint8_t pucch_res_common = 0; - pucch_group_hop_e_ pucch_group_hop; - uint16_t hop_id = 0; - int16_t p0_nominal = -202; - // ... - // group 0 - bool nrof_prbs_present = false; - bool intra_slot_fh_r17_present = false; - bool pucch_res_common_red_cap_r17_present = false; - bool add_prb_offset_r17_present = false; - uint8_t nrof_prbs = 1; - intra_slot_fh_r17_e_ intra_slot_fh_r17; - uint8_t pucch_res_common_red_cap_r17 = 0; - add_prb_offset_r17_e_ add_prb_offset_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PUSCH-ConfigCommon ::= SEQUENCE -struct pusch_cfg_common_s { - bool ext = false; - bool group_hop_enabled_transform_precoding_present = false; - bool msg3_delta_preamb_present = false; - bool p0_nominal_with_grant_present = false; - pusch_time_domain_res_alloc_list_l pusch_time_domain_alloc_list; - int8_t msg3_delta_preamb = -1; - int16_t p0_nominal_with_grant = -202; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PagingCycle ::= ENUMERATED -struct paging_cycle_opts { - enum options { rf32, rf64, rf128, rf256, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; -}; -using paging_cycle_e = enumerated; - -// SCS-SpecificCarrier ::= SEQUENCE -struct scs_specific_carrier_s { - bool ext = false; - uint16_t offset_to_carrier = 0; - subcarrier_spacing_e subcarrier_spacing; - uint16_t carrier_bw = 1; - // ... - // group 0 - bool tx_direct_current_location_present = false; - uint16_t tx_direct_current_location = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SubgroupConfig-r17 ::= SEQUENCE -struct subgroup_cfg_r17_s { - bool ext = false; - bool subgroups_num_for_ue_id_r17_present = false; - uint8_t subgroups_num_per_po_r17 = 1; - uint8_t subgroups_num_for_ue_id_r17 = 1; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BCCH-Config ::= SEQUENCE -struct bcch_cfg_s { - struct mod_period_coeff_opts { - enum options { n2, n4, n8, n16, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using mod_period_coeff_e_ = enumerated; - - // member variables - bool ext = false; - mod_period_coeff_e_ mod_period_coeff; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BWP-DownlinkCommon ::= SEQUENCE -struct bwp_dl_common_s { - bool ext = false; - bool pdcch_cfg_common_present = false; - bool pdsch_cfg_common_present = false; - bwp_s generic_params; - setup_release_c pdcch_cfg_common; - setup_release_c pdsch_cfg_common; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BWP-UplinkCommon ::= SEQUENCE -struct bwp_ul_common_s { - using nof_msg3_repeats_list_r17_l_ = std::array; - using mcs_msg3_repeats_r17_l_ = std::array; - - // member variables - bool ext = false; - bool rach_cfg_common_present = false; - bool pusch_cfg_common_present = false; - bool pucch_cfg_common_present = false; - bwp_s generic_params; - setup_release_c rach_cfg_common; - setup_release_c pusch_cfg_common; - setup_release_c pucch_cfg_common; - // ... - // group 0 - bool use_interlace_pucch_pusch_r16_present = false; - copy_ptr> rach_cfg_common_iab_r16; - copy_ptr> msg_a_cfg_common_r16; - // group 1 - bool enable_ra_prioritization_for_slicing_r17_present = false; - bool rsrp_thres_msg3_r17_present = false; - bool enable_ra_prioritization_for_slicing_r17 = false; - copy_ptr>> add_rach_cfg_list_r17; - uint8_t rsrp_thres_msg3_r17 = 0; - copy_ptr nof_msg3_repeats_list_r17; - copy_ptr mcs_msg3_repeats_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FrequencyInfoDL-SIB ::= SEQUENCE -struct freq_info_dl_sib_s { - using scs_specific_carrier_list_l_ = dyn_array; - - // member variables - multi_freq_band_list_nr_sib_l freq_band_list; - uint16_t offset_to_point_a = 0; - scs_specific_carrier_list_l_ scs_specific_carrier_list; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FrequencyInfoUL-SIB ::= SEQUENCE -struct freq_info_ul_sib_s { - using scs_specific_carrier_list_l_ = dyn_array; - - // member variables - bool ext = false; - bool absolute_freq_point_a_present = false; - bool p_max_present = false; - bool freq_shift7p5khz_present = false; - multi_freq_band_list_nr_sib_l freq_band_list; - uint32_t absolute_freq_point_a = 0; - scs_specific_carrier_list_l_ scs_specific_carrier_list; - int8_t p_max = -30; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PCCH-Config ::= SEQUENCE -struct pcch_cfg_s { - struct nand_paging_frame_offset_c_ { - struct types_opts { - enum options { one_t, half_t, quarter_t, one_eighth_t, one_sixteenth_t, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using types = enumerated; - - // choice methods - nand_paging_frame_offset_c_() = default; - nand_paging_frame_offset_c_(const nand_paging_frame_offset_c_& other); - nand_paging_frame_offset_c_& operator=(const nand_paging_frame_offset_c_& other); - ~nand_paging_frame_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& half_t() - { - assert_choice_type(types::half_t, type_, "nAndPagingFrameOffset"); - return c.get(); - } - uint8_t& quarter_t() - { - assert_choice_type(types::quarter_t, type_, "nAndPagingFrameOffset"); - return c.get(); - } - uint8_t& one_eighth_t() - { - assert_choice_type(types::one_eighth_t, type_, "nAndPagingFrameOffset"); - return c.get(); - } - uint8_t& one_sixteenth_t() - { - assert_choice_type(types::one_sixteenth_t, type_, "nAndPagingFrameOffset"); - return c.get(); - } - const uint8_t& half_t() const - { - assert_choice_type(types::half_t, type_, "nAndPagingFrameOffset"); - return c.get(); - } - const uint8_t& quarter_t() const - { - assert_choice_type(types::quarter_t, type_, "nAndPagingFrameOffset"); - return c.get(); - } - const uint8_t& one_eighth_t() const - { - assert_choice_type(types::one_eighth_t, type_, "nAndPagingFrameOffset"); - return c.get(); - } - const uint8_t& one_sixteenth_t() const - { - assert_choice_type(types::one_sixteenth_t, type_, "nAndPagingFrameOffset"); - return c.get(); - } - void set_one_t(); - uint8_t& set_half_t(); - uint8_t& set_quarter_t(); - uint8_t& set_one_eighth_t(); - uint8_t& set_one_sixteenth_t(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct ns_opts { - enum options { four, two, one, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ns_e_ = enumerated; - struct first_pdcch_monitoring_occasion_of_po_c_ { - using scs15_kh_zone_t_l_ = bounded_array; - using scs30_kh_zone_t_scs15_kh_zhalf_t_l_ = bounded_array; - using scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_ = bounded_array; - using scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_ = bounded_array; - using scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_ = - bounded_array; - using scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_ = - bounded_array; - using scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_ = bounded_array; - using scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_ = bounded_array; - struct types_opts { - enum options { - scs15_kh_zone_t, - scs30_kh_zone_t_scs15_kh_zhalf_t, - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, - scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, - scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, - scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t, - nulltype - } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - first_pdcch_monitoring_occasion_of_po_c_() = default; - first_pdcch_monitoring_occasion_of_po_c_(const first_pdcch_monitoring_occasion_of_po_c_& other); - first_pdcch_monitoring_occasion_of_po_c_& operator=(const first_pdcch_monitoring_occasion_of_po_c_& other); - ~first_pdcch_monitoring_occasion_of_po_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 - scs15_kh_zone_t_l_& scs15_kh_zone_t() - { - assert_choice_type(types::scs15_kh_zone_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs30_kh_zone_t_scs15_kh_zhalf_t_l_& scs30_kh_zone_t_scs15_kh_zhalf_t() - { - assert_choice_type(types::scs30_kh_zone_t_scs15_kh_zhalf_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() - { - assert_choice_type( - types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() - { - assert_choice_type(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() - { - assert_choice_type(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& - scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() - { - assert_choice_type(types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& - scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() - { - assert_choice_type(types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t() - { - assert_choice_type( - types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs15_kh_zone_t_l_& scs15_kh_zone_t() const - { - assert_choice_type(types::scs15_kh_zone_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs30_kh_zone_t_scs15_kh_zhalf_t_l_& scs30_kh_zone_t_scs15_kh_zhalf_t() const - { - assert_choice_type(types::scs30_kh_zone_t_scs15_kh_zhalf_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() const - { - assert_choice_type( - types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() const - { - assert_choice_type(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() const - { - assert_choice_type(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& - scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() const - { - assert_choice_type(types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& - scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() const - { - assert_choice_type(types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, - type_, - "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - const scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t() const - { - assert_choice_type( - types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); - return c.get(); - } - scs15_kh_zone_t_l_& set_scs15_kh_zone_t(); - scs30_kh_zone_t_scs15_kh_zhalf_t_l_& set_scs30_kh_zone_t_scs15_kh_zhalf_t(); - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& set_scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t(); - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& - set_scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t(); - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& - set_scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t(); - scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& - set_scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t(); - scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& - set_scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t(); - scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& set_scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t(); - - private: - types type_; - choice_buffer_t - c; - - void destroy_(); - }; - struct first_pdcch_monitoring_occasion_of_po_v1710_c_ { - using scs480_kh_zone_eighth_t_l_ = bounded_array; - using scs480_kh_zone_sixteenth_t_l_ = bounded_array; - struct types_opts { - enum options { scs480_kh_zone_eighth_t, scs480_kh_zone_sixteenth_t, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - first_pdcch_monitoring_occasion_of_po_v1710_c_() = default; - first_pdcch_monitoring_occasion_of_po_v1710_c_(const first_pdcch_monitoring_occasion_of_po_v1710_c_& other); - first_pdcch_monitoring_occasion_of_po_v1710_c_& - operator=(const first_pdcch_monitoring_occasion_of_po_v1710_c_& other); - ~first_pdcch_monitoring_occasion_of_po_v1710_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 - scs480_kh_zone_eighth_t_l_& scs480_kh_zone_eighth_t() - { - assert_choice_type(types::scs480_kh_zone_eighth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); - return c.get(); - } - scs480_kh_zone_sixteenth_t_l_& scs480_kh_zone_sixteenth_t() - { - assert_choice_type(types::scs480_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); - return c.get(); - } - const scs480_kh_zone_eighth_t_l_& scs480_kh_zone_eighth_t() const - { - assert_choice_type(types::scs480_kh_zone_eighth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); - return c.get(); - } - const scs480_kh_zone_sixteenth_t_l_& scs480_kh_zone_sixteenth_t() const - { - assert_choice_type(types::scs480_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); - return c.get(); - } - scs480_kh_zone_eighth_t_l_& set_scs480_kh_zone_eighth_t(); - scs480_kh_zone_sixteenth_t_l_& set_scs480_kh_zone_sixteenth_t(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool ext = false; - bool first_pdcch_monitoring_occasion_of_po_present = false; - paging_cycle_e default_paging_cycle; - nand_paging_frame_offset_c_ nand_paging_frame_offset; - ns_e_ ns; - first_pdcch_monitoring_occasion_of_po_c_ first_pdcch_monitoring_occasion_of_po; - // ... - // group 0 - bool nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present = false; - uint8_t nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16 = 2; - // group 1 - bool ran_paging_in_idle_po_r17_present = false; - copy_ptr first_pdcch_monitoring_occasion_of_po_v1710; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PEI-Config-r17 ::= SEQUENCE -struct pei_cfg_r17_s { - struct po_num_per_pei_r17_opts { - enum options { po1, po2, po4, po8, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using po_num_per_pei_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool last_used_cell_only_r17_present = false; - po_num_per_pei_r17_e_ po_num_per_pei_r17; - uint8_t payload_size_dci_2_7_r17 = 1; - uint8_t pei_frame_offset_r17 = 0; - subgroup_cfg_r17_s subgroup_cfg_r17; - // ... - - // 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-Pattern ::= SEQUENCE -struct tdd_ul_dl_pattern_s { - struct dl_ul_tx_periodicity_opts { - enum options { ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms5, ms10, nulltype } value; - - const char* to_string() const; - }; - using dl_ul_tx_periodicity_e_ = enumerated; - struct dl_ul_tx_periodicity_v1530_opts { - enum options { ms3, ms4, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using dl_ul_tx_periodicity_v1530_e_ = enumerated; - - // member variables - bool ext = false; - dl_ul_tx_periodicity_e_ dl_ul_tx_periodicity; - uint16_t nrof_dl_slots = 0; - uint8_t nrof_dl_symbols = 0; - uint16_t nrof_ul_slots = 0; - uint8_t nrof_ul_symbols = 0; - // ... - // group 0 - bool dl_ul_tx_periodicity_v1530_present = false; - dl_ul_tx_periodicity_v1530_e_ dl_ul_tx_periodicity_v1530; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// TimeAlignmentTimer ::= ENUMERATED -struct time_align_timer_opts { - enum options { ms500, ms750, ms1280, ms1920, ms2560, ms5120, ms10240, infinity, nulltype } value; - typedef int16_t number_type; - - const char* to_string() const; - int16_t to_number() const; -}; -using time_align_timer_e = enumerated; - -// DownlinkConfigCommonSIB ::= SEQUENCE -struct dl_cfg_common_sib_s { - bool ext = false; - freq_info_dl_sib_s freq_info_dl; - bwp_dl_common_s init_dl_bwp; - bcch_cfg_s bcch_cfg; - pcch_cfg_s pcch_cfg; - // ... - // group 0 - copy_ptr pei_cfg_r17; - copy_ptr init_dl_bwp_red_cap_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// HighSpeedConfig-r16 ::= SEQUENCE -struct high_speed_cfg_r16_s { - bool ext = false; - bool high_speed_meas_flag_r16_present = false; - bool high_speed_demod_flag_r16_present = false; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// HighSpeedConfigFR2-r17 ::= SEQUENCE -struct high_speed_cfg_fr2_r17_s { - struct high_speed_meas_flag_fr2_r17_opts { - enum options { set1, set2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using high_speed_meas_flag_fr2_r17_e_ = enumerated; - struct high_speed_deployment_type_fr2_r17_opts { - enum options { unidirectional, bidirectional, nulltype } value; - - const char* to_string() const; - }; - using high_speed_deployment_type_fr2_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool high_speed_meas_flag_fr2_r17_present = false; - bool high_speed_deployment_type_fr2_r17_present = false; - bool high_speed_large_one_step_ul_timing_fr2_r17_present = false; - high_speed_meas_flag_fr2_r17_e_ high_speed_meas_flag_fr2_r17; - high_speed_deployment_type_fr2_r17_e_ high_speed_deployment_type_fr2_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SemiStaticChannelAccessConfig-r16 ::= SEQUENCE -struct semi_static_ch_access_cfg_r16_s { - struct period_opts { - enum options { ms1, ms2, ms2dot5, ms4, ms5, ms10, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using period_e_ = enumerated; - - // member variables - period_e_ period; - - // 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-ConfigCommon ::= SEQUENCE -struct tdd_ul_dl_cfg_common_s { - bool ext = false; - bool pattern2_present = false; - subcarrier_spacing_e ref_subcarrier_spacing; - tdd_ul_dl_pattern_s pattern1; - tdd_ul_dl_pattern_s pattern2; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UplinkConfigCommonSIB ::= SEQUENCE -struct ul_cfg_common_sib_s { - freq_info_ul_sib_s freq_info_ul; - bwp_ul_common_s init_ul_bwp; - time_align_timer_e time_align_timer_common; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UplinkConfigCommonSIB-v1700 ::= SEQUENCE -struct ul_cfg_common_sib_v1700_s { - bool init_ul_bwp_red_cap_r17_present = false; - bwp_ul_common_s init_ul_bwp_red_cap_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ServingCellConfigCommonSIB ::= SEQUENCE -struct serving_cell_cfg_common_sib_s { - struct n_timing_advance_offset_opts { - enum options { n0, n25600, n39936, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using n_timing_advance_offset_e_ = enumerated; - struct ssb_positions_in_burst_s_ { - bool group_presence_present = false; - fixed_bitstring<8> in_one_group; - fixed_bitstring<8> group_presence; - }; - struct ssb_periodicity_serving_cell_opts { - enum options { ms5, ms10, ms20, ms40, ms80, ms160, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ssb_periodicity_serving_cell_e_ = enumerated; - struct ch_access_mode_r16_c_ { - struct types_opts { - enum options { dyn, semi_static, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - ch_access_mode_r16_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 - semi_static_ch_access_cfg_r16_s& semi_static() - { - assert_choice_type(types::semi_static, type_, "channelAccessMode-r16"); - return c; - } - const semi_static_ch_access_cfg_r16_s& semi_static() const - { - assert_choice_type(types::semi_static, type_, "channelAccessMode-r16"); - return c; - } - void set_dyn(); - semi_static_ch_access_cfg_r16_s& set_semi_static(); - - private: - types type_; - semi_static_ch_access_cfg_r16_s c; - }; - struct discovery_burst_win_len_r16_opts { - enum options { ms0dot5, ms1, ms2, ms3, ms4, ms5, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using discovery_burst_win_len_r16_e_ = enumerated; - struct discovery_burst_win_len_v1700_opts { - enum options { ms0dot125, ms0dot25, ms0dot5, ms0dot75, ms1, ms1dot25, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using discovery_burst_win_len_v1700_e_ = enumerated; - - // member variables - bool ext = false; - bool ul_cfg_common_present = false; - bool supplementary_ul_present = false; - bool n_timing_advance_offset_present = false; - bool tdd_ul_dl_cfg_common_present = false; - dl_cfg_common_sib_s dl_cfg_common; - ul_cfg_common_sib_s ul_cfg_common; - ul_cfg_common_sib_s supplementary_ul; - n_timing_advance_offset_e_ n_timing_advance_offset; - ssb_positions_in_burst_s_ ssb_positions_in_burst; - ssb_periodicity_serving_cell_e_ ssb_periodicity_serving_cell; - tdd_ul_dl_cfg_common_s tdd_ul_dl_cfg_common; - int8_t ss_pbch_block_pwr = -60; - // ... - // group 0 - bool discovery_burst_win_len_r16_present = false; - copy_ptr ch_access_mode_r16; - discovery_burst_win_len_r16_e_ discovery_burst_win_len_r16; - copy_ptr high_speed_cfg_r16; - // group 1 - bool ch_access_mode2_r17_present = false; - bool discovery_burst_win_len_v1700_present = false; - discovery_burst_win_len_v1700_e_ discovery_burst_win_len_v1700; - copy_ptr high_speed_cfg_fr2_r17; - copy_ptr ul_cfg_common_v1700; - // group 2 - bool enhanced_meas_leo_r17_present = false; - // group 3 - bool ra_ch_access_r17_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NonCellDefiningSSB-r17 ::= SEQUENCE -struct non_cell_defining_ssb_r17_s { - struct ssb_periodicity_r17_opts { - enum options { ms5, ms10, ms20, ms40, ms80, ms160, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ssb_periodicity_r17_e_ = enumerated; - struct ssb_time_offset_r17_opts { - enum options { ms5, ms10, ms15, ms20, ms40, ms80, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ssb_time_offset_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool ssb_periodicity_r17_present = false; - bool ssb_time_offset_r17_present = false; - uint32_t absolute_freq_ssb_r17 = 0; - ssb_periodicity_r17_e_ ssb_periodicity_r17; - ssb_time_offset_r17_e_ ssb_time_offset_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AvailabilityCombination-r16 ::= SEQUENCE -struct availability_combination_r16_s { - using res_availability_r16_l_ = dyn_array; - - // member variables - uint16_t availability_combination_id_r16 = 0; - res_availability_r16_l_ res_availability_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RB-SetGroup-r17 ::= SEQUENCE -struct rb_set_group_r17_s { - using res_availability_r17_l_ = dyn_array; - using rb_sets_r17_l_ = bounded_array; - - // member variables - res_availability_r17_l_ res_availability_r17; - rb_sets_r17_l_ rb_sets_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AvailabilityCombinationRB-Groups-r17 ::= SEQUENCE -struct availability_combination_rb_groups_r17_s { - using rb_set_groups_r17_l_ = dyn_array; - using res_availability_r17_l_ = dyn_array; - - // member variables - uint16_t availability_combination_id_r17 = 0; - rb_set_groups_r17_l_ rb_set_groups_r17; - res_availability_r17_l_ res_availability_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AvailabilityCombinationsPerCell-r16 ::= SEQUENCE -struct availability_combinations_per_cell_r16_s { - using availability_combinations_r16_l_ = dyn_array; - using availability_combinations_rb_groups_r17_l_ = dyn_array; - - // member variables - bool ext = false; - bool position_in_dci_ai_r16_present = false; - uint16_t availability_combinations_per_cell_idx_r16 = 0; - fixed_bitstring<36> iab_du_cell_id_r16; - uint8_t position_in_dci_ai_r16 = 0; - availability_combinations_r16_l_ availability_combinations_r16; - // ... - // group 0 - copy_ptr availability_combinations_rb_groups_r17; - // group 1 - bool position_in_dci_ai_rb_groups_v1720_present = false; - uint8_t position_in_dci_ai_rb_groups_v1720 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AvailabilityIndicator-r16 ::= SEQUENCE -struct availability_ind_r16_s { - using available_comb_to_add_mod_list_r16_l_ = dyn_array; - using available_comb_to_release_list_r16_l_ = dyn_array; - - // member variables - bool ext = false; - uint32_t ai_rnti_r16 = 0; - uint8_t dci_payload_size_ai_r16 = 1; - available_comb_to_add_mod_list_r16_l_ available_comb_to_add_mod_list_r16; - available_comb_to_release_list_r16_l_ available_comb_to_release_list_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AvailableRB-SetsPerCell-r16 ::= SEQUENCE -struct available_rb_sets_per_cell_r16_s { - uint8_t serving_cell_id_r16 = 0; - uint8_t position_in_dci_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BFR-CSIRS-Resource ::= SEQUENCE -struct bfr_csi_rs_res_s { - using ra_occasion_list_l_ = dyn_array; - - // member variables - bool ext = 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; -}; - -// CSI-FrequencyOccupation ::= SEQUENCE -struct csi_freq_occupation_s { - bool ext = false; - uint16_t start_rb = 0; - uint16_t nrof_rbs = 24; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BeamLinkMonitoringRS-r17 ::= SEQUENCE -struct beam_link_monitoring_rs_r17_s { - struct detection_res_r17_c_ { - struct types_opts { - enum options { ssb_idx, csi_rs_idx, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - detection_res_r17_c_() = default; - detection_res_r17_c_(const detection_res_r17_c_& other); - detection_res_r17_c_& operator=(const detection_res_r17_c_& other); - ~detection_res_r17_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(types::ssb_idx, type_, "detectionResource-r17"); - return c.get(); - } - uint8_t& csi_rs_idx() - { - assert_choice_type(types::csi_rs_idx, type_, "detectionResource-r17"); - return c.get(); - } - const uint8_t& ssb_idx() const - { - assert_choice_type(types::ssb_idx, type_, "detectionResource-r17"); - return c.get(); - } - const uint8_t& csi_rs_idx() const - { - assert_choice_type(types::csi_rs_idx, type_, "detectionResource-r17"); - return c.get(); - } - uint8_t& set_ssb_idx(); - uint8_t& set_csi_rs_idx(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool ext = false; - uint8_t beam_link_monitoring_rs_id_r17 = 0; - detection_res_r17_c_ detection_res_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CI-ConfigurationPerServingCell-r16 ::= SEQUENCE -struct ci_cfg_per_serving_cell_r16_s { - struct ci_payload_size_r16_opts { - enum options { n1, n2, n4, n5, n7, n8, n10, n14, n16, n20, n28, n32, n35, n42, n56, n112, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ci_payload_size_r16_e_ = enumerated; - struct time_freq_region_r16_s_ { - struct time_dur_for_ci_r16_opts { - enum options { n2, n4, n7, n14, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using time_dur_for_ci_r16_e_ = enumerated; - struct time_granularity_for_ci_r16_opts { - enum options { n1, n2, n4, n7, n14, n28, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using time_granularity_for_ci_r16_e_ = enumerated; - - // member variables - bool ext = false; - bool time_dur_for_ci_r16_present = false; - time_dur_for_ci_r16_e_ time_dur_for_ci_r16; - time_granularity_for_ci_r16_e_ time_granularity_for_ci_r16; - uint16_t freq_region_for_ci_r16 = 0; - uint8_t delta_offset_r16 = 0; - // ... - }; - - // member variables - bool position_in_dci_for_sul_r16_present = false; - bool ul_cancellation_prio_v1610_present = false; - uint8_t serving_cell_id = 0; - uint8_t position_in_dci_r16 = 0; - uint8_t position_in_dci_for_sul_r16 = 0; - ci_payload_size_r16_e_ ci_payload_size_r16; - time_freq_region_r16_s_ time_freq_region_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // 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(types::row1, type_, "frequencyDomainAllocation"); - return c.get>(); - } - fixed_bitstring<12>& row2() - { - assert_choice_type(types::row2, type_, "frequencyDomainAllocation"); - return c.get>(); - } - fixed_bitstring<3>& row4() - { - assert_choice_type(types::row4, type_, "frequencyDomainAllocation"); - return c.get>(); - } - fixed_bitstring<6>& other() - { - assert_choice_type(types::other, type_, "frequencyDomainAllocation"); - return c.get>(); - } - const fixed_bitstring<4>& row1() const - { - assert_choice_type(types::row1, type_, "frequencyDomainAllocation"); - return c.get>(); - } - const fixed_bitstring<12>& row2() const - { - assert_choice_type(types::row2, type_, "frequencyDomainAllocation"); - return c.get>(); - } - const fixed_bitstring<3>& row4() const - { - assert_choice_type(types::row4, type_, "frequencyDomainAllocation"); - return c.get>(); - } - const fixed_bitstring<6>& other() const - { - assert_choice_type(types::other, type_, "frequencyDomainAllocation"); - return c.get>(); - } - fixed_bitstring<4>& set_row1(); - fixed_bitstring<12>& set_row2(); - fixed_bitstring<3>& set_row4(); - fixed_bitstring<6>& set_other(); - - private: - types type_; - choice_buffer_t> c; - - void destroy_(); - }; - struct nrof_ports_opts { - enum options { p1, p2, p4, p8, p12, p16, p24, p32, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using nrof_ports_e_ = enumerated; - struct cdm_type_opts { - enum options { no_cdm, fd_cdm2, cdm4_fd2_td2, cdm8_fd2_td4, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using cdm_type_e_ = enumerated; - struct density_c_ { - struct dot5_opts { - enum options { even_prbs, odd_prbs, nulltype } value; - - const char* to_string() const; - }; - using dot5_e_ = enumerated; - struct types_opts { - enum options { dot5, one, three, spare, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // 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(types::dot5, type_, "density"); - return c; - } - const dot5_e_& dot5() const - { - assert_choice_type(types::dot5, type_, "density"); - return c; - } - dot5_e_& set_dot5(); - void set_one(); - void set_three(); - void set_spare(); - - private: - types type_; - dot5_e_ c; - }; - - // 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; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CSI-ResourcePeriodicityAndOffset ::= CHOICE -struct csi_res_periodicity_and_offset_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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // 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_(); } - 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(types::slots4, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots5() - { - assert_choice_type(types::slots5, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots8() - { - assert_choice_type(types::slots8, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots10() - { - assert_choice_type(types::slots10, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots16() - { - assert_choice_type(types::slots16, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots20() - { - assert_choice_type(types::slots20, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots32() - { - assert_choice_type(types::slots32, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots40() - { - assert_choice_type(types::slots40, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots64() - { - assert_choice_type(types::slots64, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots80() - { - assert_choice_type(types::slots80, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& slots160() - { - assert_choice_type(types::slots160, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint16_t& slots320() - { - assert_choice_type(types::slots320, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint16_t& slots640() - { - assert_choice_type(types::slots640, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots4() const - { - assert_choice_type(types::slots4, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots5() const - { - assert_choice_type(types::slots5, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots8() const - { - assert_choice_type(types::slots8, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots10() const - { - assert_choice_type(types::slots10, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots16() const - { - assert_choice_type(types::slots16, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots20() const - { - assert_choice_type(types::slots20, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots32() const - { - assert_choice_type(types::slots32, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots40() const - { - assert_choice_type(types::slots40, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots64() const - { - assert_choice_type(types::slots64, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots80() const - { - assert_choice_type(types::slots80, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint8_t& slots160() const - { - assert_choice_type(types::slots160, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint16_t& slots320() const - { - assert_choice_type(types::slots320, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - const uint16_t& slots640() const - { - assert_choice_type(types::slots640, type_, "CSI-ResourcePeriodicityAndOffset"); - return c.get(); - } - uint8_t& set_slots4(); - uint8_t& set_slots5(); - uint8_t& set_slots8(); - uint8_t& set_slots10(); - uint8_t& set_slots16(); - uint8_t& set_slots20(); - uint8_t& set_slots32(); - uint8_t& set_slots40(); - uint8_t& set_slots64(); - uint8_t& set_slots80(); - uint8_t& set_slots160(); - uint16_t& set_slots320(); - uint16_t& set_slots640(); - -private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); -}; - -// CellGroupForSwitch-r16 ::= SEQUENCE (SIZE (1..16)) OF INTEGER (0..31) -using cell_group_for_switch_r16_l = bounded_array; - -// FDM-TDM-r16 ::= SEQUENCE -struct fdm_tdm_r16_s { - struct repeat_scheme_r16_opts { - enum options { fdm_scheme_a, fdm_scheme_b, tdm_scheme_a, nulltype } value; - - const char* to_string() const; - }; - using repeat_scheme_r16_e_ = enumerated; - - // member variables - bool start_symbol_offset_k_r16_present = false; - repeat_scheme_r16_e_ repeat_scheme_r16; - uint8_t start_symbol_offset_k_r16 = 0; - - // 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; -}; - -// MultiPDSCH-TDRA-r17 ::= SEQUENCE -struct multi_pdsch_tdra_r17_s { - using pdsch_tdra_list_r17_l_ = dyn_array; - - // member variables - bool ext = false; - pdsch_tdra_list_r17_l_ pdsch_tdra_list_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using res_elem_offset_e_ = enumerated; - struct max_nrof_ports_r16_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using max_nrof_ports_r16_e_ = enumerated; - - // 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; - // ... - // group 0 - bool max_nrof_ports_r16_present = false; - max_nrof_ports_r16_e_ max_nrof_ports_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::csi_rs, type_, "referenceSignal"); - return c.get(); - } - uint8_t& ssb() - { - assert_choice_type(types::ssb, type_, "referenceSignal"); - return c.get(); - } - const uint8_t& csi_rs() const - { - assert_choice_type(types::csi_rs, type_, "referenceSignal"); - return c.get(); - } - const uint8_t& ssb() const - { - assert_choice_type(types::ssb, type_, "referenceSignal"); - return c.get(); - } - uint8_t& set_csi_rs(); - uint8_t& set_ssb(); - - private: - 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; - - const char* to_string() const; - }; - using qcl_type_e_ = enumerated; - - // 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; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SlotBased-r16 ::= SEQUENCE -struct slot_based_r16_s { - struct tci_map_r16_opts { - enum options { cyclic_map, sequential_map, nulltype } value; - - const char* to_string() const; - }; - using tci_map_r16_e_ = enumerated; - - // member variables - tci_map_r16_e_ tci_map_r16; - uint8_t seq_offset_for_rv_r16 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SlotBased-v1630 ::= SEQUENCE -struct slot_based_v1630_s { - struct tci_map_r16_opts { - enum options { cyclic_map, sequential_map, nulltype } value; - - const char* to_string() const; - }; - using tci_map_r16_e_ = enumerated; - - // member variables - tci_map_r16_e_ tci_map_r16; - uint8_t seq_offset_for_rv_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BeamFailureDetectionSet-r17 ::= SEQUENCE -struct beam_fail_detection_set_r17_s { - using bfd_res_to_add_mod_list_r17_l_ = dyn_array; - using bfd_res_to_release_list_r17_l_ = dyn_array; - struct beam_fail_instance_max_count_r17_opts { - enum options { n1, n2, n3, n4, n5, n6, n8, n10, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using beam_fail_instance_max_count_r17_e_ = enumerated; - struct beam_fail_detection_timer_r17_opts { - enum options { pbfd1, pbfd2, pbfd3, pbfd4, pbfd5, pbfd6, pbfd8, pbfd10, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using beam_fail_detection_timer_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool beam_fail_instance_max_count_r17_present = false; - bool beam_fail_detection_timer_r17_present = false; - bfd_res_to_add_mod_list_r17_l_ bfd_res_to_add_mod_list_r17; - bfd_res_to_release_list_r17_l_ bfd_res_to_release_list_r17; - beam_fail_instance_max_count_r17_e_ beam_fail_instance_max_count_r17; - beam_fail_detection_timer_r17_e_ beam_fail_detection_timer_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// DL-PPW-PeriodicityAndStartSlot-r17 ::= CHOICE -struct dl_ppw_periodicity_and_start_slot_r17_c { - struct scs15_c_ { - struct types_opts { - enum options { - n4, - n5, - n8, - n10, - n16, - n20, - n32, - n40, - n64, - n80, - n160, - n320, - n640, - n1280, - n2560, - n5120, - n10240, - // ... - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - scs15_c_() = default; - scs15_c_(const scs15_c_& other); - scs15_c_& operator=(const scs15_c_& other); - ~scs15_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& n4() - { - assert_choice_type(types::n4, type_, "scs15"); - return c.get(); - } - uint8_t& n5() - { - assert_choice_type(types::n5, type_, "scs15"); - return c.get(); - } - uint8_t& n8() - { - assert_choice_type(types::n8, type_, "scs15"); - return c.get(); - } - uint8_t& n10() - { - assert_choice_type(types::n10, type_, "scs15"); - return c.get(); - } - uint8_t& n16() - { - assert_choice_type(types::n16, type_, "scs15"); - return c.get(); - } - uint8_t& n20() - { - assert_choice_type(types::n20, type_, "scs15"); - return c.get(); - } - uint8_t& n32() - { - assert_choice_type(types::n32, type_, "scs15"); - return c.get(); - } - uint8_t& n40() - { - assert_choice_type(types::n40, type_, "scs15"); - return c.get(); - } - uint8_t& n64() - { - assert_choice_type(types::n64, type_, "scs15"); - return c.get(); - } - uint8_t& n80() - { - assert_choice_type(types::n80, type_, "scs15"); - return c.get(); - } - uint8_t& n160() - { - assert_choice_type(types::n160, type_, "scs15"); - return c.get(); - } - uint16_t& n320() - { - assert_choice_type(types::n320, type_, "scs15"); - return c.get(); - } - uint16_t& n640() - { - assert_choice_type(types::n640, type_, "scs15"); - return c.get(); - } - uint16_t& n1280() - { - assert_choice_type(types::n1280, type_, "scs15"); - return c.get(); - } - uint16_t& n2560() - { - assert_choice_type(types::n2560, type_, "scs15"); - return c.get(); - } - uint16_t& n5120() - { - assert_choice_type(types::n5120, type_, "scs15"); - return c.get(); - } - uint16_t& n10240() - { - assert_choice_type(types::n10240, type_, "scs15"); - return c.get(); - } - const uint8_t& n4() const - { - assert_choice_type(types::n4, type_, "scs15"); - return c.get(); - } - const uint8_t& n5() const - { - assert_choice_type(types::n5, type_, "scs15"); - return c.get(); - } - const uint8_t& n8() const - { - assert_choice_type(types::n8, type_, "scs15"); - return c.get(); - } - const uint8_t& n10() const - { - assert_choice_type(types::n10, type_, "scs15"); - return c.get(); - } - const uint8_t& n16() const - { - assert_choice_type(types::n16, type_, "scs15"); - return c.get(); - } - const uint8_t& n20() const - { - assert_choice_type(types::n20, type_, "scs15"); - return c.get(); - } - const uint8_t& n32() const - { - assert_choice_type(types::n32, type_, "scs15"); - return c.get(); - } - const uint8_t& n40() const - { - assert_choice_type(types::n40, type_, "scs15"); - return c.get(); - } - const uint8_t& n64() const - { - assert_choice_type(types::n64, type_, "scs15"); - return c.get(); - } - const uint8_t& n80() const - { - assert_choice_type(types::n80, type_, "scs15"); - return c.get(); - } - const uint8_t& n160() const - { - assert_choice_type(types::n160, type_, "scs15"); - return c.get(); - } - const uint16_t& n320() const - { - assert_choice_type(types::n320, type_, "scs15"); - return c.get(); - } - const uint16_t& n640() const - { - assert_choice_type(types::n640, type_, "scs15"); - return c.get(); - } - const uint16_t& n1280() const - { - assert_choice_type(types::n1280, type_, "scs15"); - return c.get(); - } - const uint16_t& n2560() const - { - assert_choice_type(types::n2560, type_, "scs15"); - return c.get(); - } - const uint16_t& n5120() const - { - assert_choice_type(types::n5120, type_, "scs15"); - return c.get(); - } - const uint16_t& n10240() const - { - assert_choice_type(types::n10240, type_, "scs15"); - return c.get(); - } - uint8_t& set_n4(); - uint8_t& set_n5(); - uint8_t& set_n8(); - uint8_t& set_n10(); - uint8_t& set_n16(); - uint8_t& set_n20(); - uint8_t& set_n32(); - uint8_t& set_n40(); - uint8_t& set_n64(); - uint8_t& set_n80(); - uint8_t& set_n160(); - uint16_t& set_n320(); - uint16_t& set_n640(); - uint16_t& set_n1280(); - uint16_t& set_n2560(); - uint16_t& set_n5120(); - uint16_t& set_n10240(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct scs30_c_ { - struct types_opts { - enum options { - n8, - n10, - n16, - n20, - n32, - n40, - n64, - n80, - n128, - n160, - n320, - n640, - n1280, - n2560, - n5120, - n10240, - n20480, - // ... - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - scs30_c_() = default; - scs30_c_(const scs30_c_& other); - scs30_c_& operator=(const scs30_c_& other); - ~scs30_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& n8() - { - assert_choice_type(types::n8, type_, "scs30"); - return c.get(); - } - uint8_t& n10() - { - assert_choice_type(types::n10, type_, "scs30"); - return c.get(); - } - uint8_t& n16() - { - assert_choice_type(types::n16, type_, "scs30"); - return c.get(); - } - uint8_t& n20() - { - assert_choice_type(types::n20, type_, "scs30"); - return c.get(); - } - uint8_t& n32() - { - assert_choice_type(types::n32, type_, "scs30"); - return c.get(); - } - uint8_t& n40() - { - assert_choice_type(types::n40, type_, "scs30"); - return c.get(); - } - uint8_t& n64() - { - assert_choice_type(types::n64, type_, "scs30"); - return c.get(); - } - uint8_t& n80() - { - assert_choice_type(types::n80, type_, "scs30"); - return c.get(); - } - uint8_t& n128() - { - assert_choice_type(types::n128, type_, "scs30"); - return c.get(); - } - uint8_t& n160() - { - assert_choice_type(types::n160, type_, "scs30"); - return c.get(); - } - uint16_t& n320() - { - assert_choice_type(types::n320, type_, "scs30"); - return c.get(); - } - uint16_t& n640() - { - assert_choice_type(types::n640, type_, "scs30"); - return c.get(); - } - uint16_t& n1280() - { - assert_choice_type(types::n1280, type_, "scs30"); - return c.get(); - } - uint16_t& n2560() - { - assert_choice_type(types::n2560, type_, "scs30"); - return c.get(); - } - uint16_t& n5120() - { - assert_choice_type(types::n5120, type_, "scs30"); - return c.get(); - } - uint16_t& n10240() - { - assert_choice_type(types::n10240, type_, "scs30"); - return c.get(); - } - uint16_t& n20480() - { - assert_choice_type(types::n20480, type_, "scs30"); - return c.get(); - } - const uint8_t& n8() const - { - assert_choice_type(types::n8, type_, "scs30"); - return c.get(); - } - const uint8_t& n10() const - { - assert_choice_type(types::n10, type_, "scs30"); - return c.get(); - } - const uint8_t& n16() const - { - assert_choice_type(types::n16, type_, "scs30"); - return c.get(); - } - const uint8_t& n20() const - { - assert_choice_type(types::n20, type_, "scs30"); - return c.get(); - } - const uint8_t& n32() const - { - assert_choice_type(types::n32, type_, "scs30"); - return c.get(); - } - const uint8_t& n40() const - { - assert_choice_type(types::n40, type_, "scs30"); - return c.get(); - } - const uint8_t& n64() const - { - assert_choice_type(types::n64, type_, "scs30"); - return c.get(); - } - const uint8_t& n80() const - { - assert_choice_type(types::n80, type_, "scs30"); - return c.get(); - } - const uint8_t& n128() const - { - assert_choice_type(types::n128, type_, "scs30"); - return c.get(); - } - const uint8_t& n160() const - { - assert_choice_type(types::n160, type_, "scs30"); - return c.get(); - } - const uint16_t& n320() const - { - assert_choice_type(types::n320, type_, "scs30"); - return c.get(); - } - const uint16_t& n640() const - { - assert_choice_type(types::n640, type_, "scs30"); - return c.get(); - } - const uint16_t& n1280() const - { - assert_choice_type(types::n1280, type_, "scs30"); - return c.get(); - } - const uint16_t& n2560() const - { - assert_choice_type(types::n2560, type_, "scs30"); - return c.get(); - } - const uint16_t& n5120() const - { - assert_choice_type(types::n5120, type_, "scs30"); - return c.get(); - } - const uint16_t& n10240() const - { - assert_choice_type(types::n10240, type_, "scs30"); - return c.get(); - } - const uint16_t& n20480() const - { - assert_choice_type(types::n20480, type_, "scs30"); - return c.get(); - } - uint8_t& set_n8(); - uint8_t& set_n10(); - uint8_t& set_n16(); - uint8_t& set_n20(); - uint8_t& set_n32(); - uint8_t& set_n40(); - uint8_t& set_n64(); - uint8_t& set_n80(); - uint8_t& set_n128(); - uint8_t& set_n160(); - uint16_t& set_n320(); - uint16_t& set_n640(); - uint16_t& set_n1280(); - uint16_t& set_n2560(); - uint16_t& set_n5120(); - uint16_t& set_n10240(); - uint16_t& set_n20480(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct scs60_c_ { - struct types_opts { - enum options { - n16, - n20, - n32, - n40, - n64, - n80, - n128, - n160, - n256, - n320, - n640, - n1280, - n2560, - n5120, - n10240, - n20480, - n40960, - // ... - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - scs60_c_() = default; - scs60_c_(const scs60_c_& other); - scs60_c_& operator=(const scs60_c_& other); - ~scs60_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& n16() - { - assert_choice_type(types::n16, type_, "scs60"); - return c.get(); - } - uint8_t& n20() - { - assert_choice_type(types::n20, type_, "scs60"); - return c.get(); - } - uint8_t& n32() - { - assert_choice_type(types::n32, type_, "scs60"); - return c.get(); - } - uint8_t& n40() - { - assert_choice_type(types::n40, type_, "scs60"); - return c.get(); - } - uint8_t& n64() - { - assert_choice_type(types::n64, type_, "scs60"); - return c.get(); - } - uint8_t& n80() - { - assert_choice_type(types::n80, type_, "scs60"); - return c.get(); - } - uint8_t& n128() - { - assert_choice_type(types::n128, type_, "scs60"); - return c.get(); - } - uint8_t& n160() - { - assert_choice_type(types::n160, type_, "scs60"); - return c.get(); - } - uint16_t& n256() - { - assert_choice_type(types::n256, type_, "scs60"); - return c.get(); - } - uint16_t& n320() - { - assert_choice_type(types::n320, type_, "scs60"); - return c.get(); - } - uint16_t& n640() - { - assert_choice_type(types::n640, type_, "scs60"); - return c.get(); - } - uint16_t& n1280() - { - assert_choice_type(types::n1280, type_, "scs60"); - return c.get(); - } - uint16_t& n2560() - { - assert_choice_type(types::n2560, type_, "scs60"); - return c.get(); - } - uint16_t& n5120() - { - assert_choice_type(types::n5120, type_, "scs60"); - return c.get(); - } - uint16_t& n10240() - { - assert_choice_type(types::n10240, type_, "scs60"); - return c.get(); - } - uint16_t& n20480() - { - assert_choice_type(types::n20480, type_, "scs60"); - return c.get(); - } - uint16_t& n40960() - { - assert_choice_type(types::n40960, type_, "scs60"); - return c.get(); - } - const uint8_t& n16() const - { - assert_choice_type(types::n16, type_, "scs60"); - return c.get(); - } - const uint8_t& n20() const - { - assert_choice_type(types::n20, type_, "scs60"); - return c.get(); - } - const uint8_t& n32() const - { - assert_choice_type(types::n32, type_, "scs60"); - return c.get(); - } - const uint8_t& n40() const - { - assert_choice_type(types::n40, type_, "scs60"); - return c.get(); - } - const uint8_t& n64() const - { - assert_choice_type(types::n64, type_, "scs60"); - return c.get(); - } - const uint8_t& n80() const - { - assert_choice_type(types::n80, type_, "scs60"); - return c.get(); - } - const uint8_t& n128() const - { - assert_choice_type(types::n128, type_, "scs60"); - return c.get(); - } - const uint8_t& n160() const - { - assert_choice_type(types::n160, type_, "scs60"); - return c.get(); - } - const uint16_t& n256() const - { - assert_choice_type(types::n256, type_, "scs60"); - return c.get(); - } - const uint16_t& n320() const - { - assert_choice_type(types::n320, type_, "scs60"); - return c.get(); - } - const uint16_t& n640() const - { - assert_choice_type(types::n640, type_, "scs60"); - return c.get(); - } - const uint16_t& n1280() const - { - assert_choice_type(types::n1280, type_, "scs60"); - return c.get(); - } - const uint16_t& n2560() const - { - assert_choice_type(types::n2560, type_, "scs60"); - return c.get(); - } - const uint16_t& n5120() const - { - assert_choice_type(types::n5120, type_, "scs60"); - return c.get(); - } - const uint16_t& n10240() const - { - assert_choice_type(types::n10240, type_, "scs60"); - return c.get(); - } - const uint16_t& n20480() const - { - assert_choice_type(types::n20480, type_, "scs60"); - return c.get(); - } - const uint16_t& n40960() const - { - assert_choice_type(types::n40960, type_, "scs60"); - return c.get(); - } - uint8_t& set_n16(); - uint8_t& set_n20(); - uint8_t& set_n32(); - uint8_t& set_n40(); - uint8_t& set_n64(); - uint8_t& set_n80(); - uint8_t& set_n128(); - uint8_t& set_n160(); - uint16_t& set_n256(); - uint16_t& set_n320(); - uint16_t& set_n640(); - uint16_t& set_n1280(); - uint16_t& set_n2560(); - uint16_t& set_n5120(); - uint16_t& set_n10240(); - uint16_t& set_n20480(); - uint16_t& set_n40960(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct scs120_c_ { - struct types_opts { - enum options { - n32, - n40, - n64, - n80, - n128, - n160, - n256, - n320, - n512, - n640, - n1280, - n2560, - n5120, - n10240, - n20480, - n40960, - n81920, - // ... - nulltype - } value; - typedef uint32_t number_type; - - const char* to_string() const; - uint32_t to_number() const; - }; - using types = enumerated; - - // choice methods - scs120_c_() = default; - scs120_c_(const scs120_c_& other); - scs120_c_& operator=(const scs120_c_& other); - ~scs120_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& n32() - { - assert_choice_type(types::n32, type_, "scs120"); - return c.get(); - } - uint8_t& n40() - { - assert_choice_type(types::n40, type_, "scs120"); - return c.get(); - } - uint8_t& n64() - { - assert_choice_type(types::n64, type_, "scs120"); - return c.get(); - } - uint8_t& n80() - { - assert_choice_type(types::n80, type_, "scs120"); - return c.get(); - } - uint8_t& n128() - { - assert_choice_type(types::n128, type_, "scs120"); - return c.get(); - } - uint8_t& n160() - { - assert_choice_type(types::n160, type_, "scs120"); - return c.get(); - } - uint16_t& n256() - { - assert_choice_type(types::n256, type_, "scs120"); - return c.get(); - } - uint16_t& n320() - { - assert_choice_type(types::n320, type_, "scs120"); - return c.get(); - } - uint16_t& n512() - { - assert_choice_type(types::n512, type_, "scs120"); - return c.get(); - } - uint16_t& n640() - { - assert_choice_type(types::n640, type_, "scs120"); - return c.get(); - } - uint16_t& n1280() - { - assert_choice_type(types::n1280, type_, "scs120"); - return c.get(); - } - uint16_t& n2560() - { - assert_choice_type(types::n2560, type_, "scs120"); - return c.get(); - } - uint16_t& n5120() - { - assert_choice_type(types::n5120, type_, "scs120"); - return c.get(); - } - uint16_t& n10240() - { - assert_choice_type(types::n10240, type_, "scs120"); - return c.get(); - } - uint16_t& n20480() - { - assert_choice_type(types::n20480, type_, "scs120"); - return c.get(); - } - uint16_t& n40960() - { - assert_choice_type(types::n40960, type_, "scs120"); - return c.get(); - } - uint32_t& n81920() - { - assert_choice_type(types::n81920, type_, "scs120"); - return c.get(); - } - const uint8_t& n32() const - { - assert_choice_type(types::n32, type_, "scs120"); - return c.get(); - } - const uint8_t& n40() const - { - assert_choice_type(types::n40, type_, "scs120"); - return c.get(); - } - const uint8_t& n64() const - { - assert_choice_type(types::n64, type_, "scs120"); - return c.get(); - } - const uint8_t& n80() const - { - assert_choice_type(types::n80, type_, "scs120"); - return c.get(); - } - const uint8_t& n128() const - { - assert_choice_type(types::n128, type_, "scs120"); - return c.get(); - } - const uint8_t& n160() const - { - assert_choice_type(types::n160, type_, "scs120"); - return c.get(); - } - const uint16_t& n256() const - { - assert_choice_type(types::n256, type_, "scs120"); - return c.get(); - } - const uint16_t& n320() const - { - assert_choice_type(types::n320, type_, "scs120"); - return c.get(); - } - const uint16_t& n512() const - { - assert_choice_type(types::n512, type_, "scs120"); - return c.get(); - } - const uint16_t& n640() const - { - assert_choice_type(types::n640, type_, "scs120"); - return c.get(); - } - const uint16_t& n1280() const - { - assert_choice_type(types::n1280, type_, "scs120"); - return c.get(); - } - const uint16_t& n2560() const - { - assert_choice_type(types::n2560, type_, "scs120"); - return c.get(); - } - const uint16_t& n5120() const - { - assert_choice_type(types::n5120, type_, "scs120"); - return c.get(); - } - const uint16_t& n10240() const - { - assert_choice_type(types::n10240, type_, "scs120"); - return c.get(); - } - const uint16_t& n20480() const - { - assert_choice_type(types::n20480, type_, "scs120"); - return c.get(); - } - const uint16_t& n40960() const - { - assert_choice_type(types::n40960, type_, "scs120"); - return c.get(); - } - const uint32_t& n81920() const - { - assert_choice_type(types::n81920, type_, "scs120"); - return c.get(); - } - uint8_t& set_n32(); - uint8_t& set_n40(); - uint8_t& set_n64(); - uint8_t& set_n80(); - uint8_t& set_n128(); - uint8_t& set_n160(); - uint16_t& set_n256(); - uint16_t& set_n320(); - uint16_t& set_n512(); - uint16_t& set_n640(); - uint16_t& set_n1280(); - uint16_t& set_n2560(); - uint16_t& set_n5120(); - uint16_t& set_n10240(); - uint16_t& set_n20480(); - uint16_t& set_n40960(); - uint32_t& set_n81920(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct types_opts { - enum options { scs15, scs30, scs60, scs120, /*...*/ nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - dl_ppw_periodicity_and_start_slot_r17_c() = default; - dl_ppw_periodicity_and_start_slot_r17_c(const dl_ppw_periodicity_and_start_slot_r17_c& other); - dl_ppw_periodicity_and_start_slot_r17_c& operator=(const dl_ppw_periodicity_and_start_slot_r17_c& other); - ~dl_ppw_periodicity_and_start_slot_r17_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 - scs15_c_& scs15() - { - assert_choice_type(types::scs15, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); - return c.get(); - } - scs30_c_& scs30() - { - assert_choice_type(types::scs30, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); - return c.get(); - } - scs60_c_& scs60() - { - assert_choice_type(types::scs60, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); - return c.get(); - } - scs120_c_& scs120() - { - assert_choice_type(types::scs120, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); - return c.get(); - } - const scs15_c_& scs15() const - { - assert_choice_type(types::scs15, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); - return c.get(); - } - const scs30_c_& scs30() const - { - assert_choice_type(types::scs30, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); - return c.get(); - } - const scs60_c_& scs60() const - { - assert_choice_type(types::scs60, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); - return c.get(); - } - const scs120_c_& scs120() const - { - assert_choice_type(types::scs120, type_, "DL-PPW-PeriodicityAndStartSlot-r17"); - return c.get(); - } - scs15_c_& set_scs15(); - scs30_c_& set_scs30(); - scs60_c_& set_scs60(); - scs120_c_& set_scs120(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using dmrs_add_position_e_ = enumerated; - - // 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; - // ... - // group 0 - bool dmrs_dl_r16_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using time_freq_set_e_ = enumerated; - using int_cfg_per_serving_cell_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; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// Dummy-TDRA-List ::= SEQUENCE (SIZE (1..16)) OF MultiPDSCH-TDRA-r17 -using dummy_tdra_list_l = dyn_array; - -// MinSchedulingOffsetK0-Values-r16 ::= SEQUENCE (SIZE (1..2)) OF INTEGER (0..16) -using min_sched_offset_k0_values_r16_l = bounded_array; - -// MinSchedulingOffsetK0-Values-r17 ::= SEQUENCE (SIZE (1..2)) OF INTEGER (0..64) -using min_sched_offset_k0_values_r17_l = bounded_array; - -// MultiPDSCH-TDRA-List-r17 ::= SEQUENCE (SIZE (1..64)) OF MultiPDSCH-TDRA-r17 -using multi_pdsch_tdra_list_r17_l = dyn_array; - -// 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; - // ... - // group 0 - bool tpc_idx_pucch_s_scell_r17_present = false; - bool tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present = false; - uint8_t tpc_idx_pucch_s_scell_r17 = 1; - uint8_t tpc_idx_pucch_s_scell_secondary_pucch_group_r17 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - const char* to_string() const; - }; - using types = enumerated; - - // 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_; } - 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(types::cell_level, type_, "RateMatchPatternGroup-item"); - return c.get(); - } - uint8_t& bwp_level() - { - assert_choice_type(types::bwp_level, type_, "RateMatchPatternGroup-item"); - return c.get(); - } - const uint8_t& cell_level() const - { - assert_choice_type(types::cell_level, type_, "RateMatchPatternGroup-item"); - return c.get(); - } - const uint8_t& bwp_level() const - { - assert_choice_type(types::bwp_level, type_, "RateMatchPatternGroup-item"); - return c.get(); - } - uint8_t& set_cell_level(); - uint8_t& set_bwp_level(); - -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; - -// RepetitionSchemeConfig-r16 ::= CHOICE -struct repeat_scheme_cfg_r16_c { - struct types_opts { - enum options { fdm_tdm_r16, slot_based_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - repeat_scheme_cfg_r16_c() = default; - repeat_scheme_cfg_r16_c(const repeat_scheme_cfg_r16_c& other); - repeat_scheme_cfg_r16_c& operator=(const repeat_scheme_cfg_r16_c& other); - ~repeat_scheme_cfg_r16_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 - setup_release_c& fdm_tdm_r16() - { - assert_choice_type(types::fdm_tdm_r16, type_, "RepetitionSchemeConfig-r16"); - return c.get>(); - } - setup_release_c& slot_based_r16() - { - assert_choice_type(types::slot_based_r16, type_, "RepetitionSchemeConfig-r16"); - return c.get>(); - } - const setup_release_c& fdm_tdm_r16() const - { - assert_choice_type(types::fdm_tdm_r16, type_, "RepetitionSchemeConfig-r16"); - return c.get>(); - } - const setup_release_c& slot_based_r16() const - { - assert_choice_type(types::slot_based_r16, type_, "RepetitionSchemeConfig-r16"); - return c.get>(); - } - setup_release_c& set_fdm_tdm_r16(); - setup_release_c& set_slot_based_r16(); - -private: - types type_; - choice_buffer_t, setup_release_c> c; - - void destroy_(); -}; - -// RepetitionSchemeConfig-v1630 ::= SEQUENCE -struct repeat_scheme_cfg_v1630_s { - setup_release_c slot_based_v1630; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using periodicity_e_ = enumerated; - struct pdsch_aggregation_factor_r16_opts { - enum options { n1, n2, n4, n8, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pdsch_aggregation_factor_r16_e_ = enumerated; - - // 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; - // ... - // group 0 - bool sps_cfg_idx_r16_present = false; - bool harq_proc_id_offset_r16_present = false; - bool periodicity_ext_r16_present = false; - bool harq_codebook_id_r16_present = false; - bool pdsch_aggregation_factor_r16_present = false; - uint8_t sps_cfg_idx_r16 = 0; - uint8_t harq_proc_id_offset_r16 = 0; - uint16_t periodicity_ext_r16 = 1; - uint8_t harq_codebook_id_r16 = 1; - pdsch_aggregation_factor_r16_e_ pdsch_aggregation_factor_r16; - // group 1 - bool sps_harq_deferral_r17_present = false; - bool n1_pucch_an_pucch_s_scell_r17_present = false; - bool periodicity_ext_r17_present = false; - bool nrof_harq_processes_v1710_present = false; - bool harq_proc_id_offset_v1700_present = false; - uint8_t sps_harq_deferral_r17 = 1; - uint8_t n1_pucch_an_pucch_s_scell_r17 = 0; - uint16_t periodicity_ext_r17 = 1; - uint8_t nrof_harq_processes_v1710 = 9; - uint8_t harq_proc_id_offset_v1700 = 16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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_3_present = false; - bool field_type_format2_3_present = false; - uint8_t start_bit_of_format2_3 = 1; - uint8_t field_type_format2_3 = 0; - // ... - // group 0 - bool start_bit_of_format2_3_sul_present = false; - uint8_t start_bit_of_format2_3_sul = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SearchSpaceSwitchConfig-r16 ::= SEQUENCE -struct search_space_switch_cfg_r16_s { - using cell_groups_for_switch_list_r16_l_ = dyn_array; - - // member variables - bool search_space_switch_delay_r16_present = false; - cell_groups_for_switch_list_r16_l_ cell_groups_for_switch_list_r16; - uint8_t search_space_switch_delay_r16 = 10; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SearchSpaceSwitchConfig-r17 ::= SEQUENCE -struct search_space_switch_cfg_r17_s { - bool search_space_switch_timer_r17_present = false; - bool search_space_switch_delay_r17_present = false; - uint8_t search_space_switch_timer_r17 = 1; - uint8_t search_space_switch_delay_r17 = 10; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - // ... - // group 0 - bool add_pci_r17_present = false; - bool pathloss_ref_rs_id_r17_present = false; - bool ul_pwr_ctrl_r17_present = false; - uint8_t add_pci_r17 = 1; - uint8_t pathloss_ref_rs_id_r17 = 0; - uint8_t ul_pwr_ctrl_r17 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UplinkCancellation-r16 ::= SEQUENCE -struct ul_cancellation_r16_s { - using ci_cfg_per_serving_cell_r16_l_ = dyn_array; - - // member variables - bool ext = false; - uint32_t ci_rnti_r16 = 0; - uint8_t dci_payload_size_for_ci_r16 = 0; - ci_cfg_per_serving_cell_r16_l_ ci_cfg_per_serving_cell_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BeamFailureDetection-r17 ::= SEQUENCE -struct beam_fail_detection_r17_s { - bool fail_detection_set1_r17_present = false; - bool fail_detection_set2_r17_present = false; - bool add_pci_r17_present = false; - beam_fail_detection_set_r17_s fail_detection_set1_r17; - beam_fail_detection_set_r17_s fail_detection_set2_r17; - uint8_t add_pci_r17 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CandidateBeamRS-r16 ::= SEQUENCE -struct candidate_beam_rs_r16_s { - struct candidate_beam_cfg_r16_c_ { - struct types_opts { - enum options { ssb_r16, csi_rs_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - candidate_beam_cfg_r16_c_() = default; - candidate_beam_cfg_r16_c_(const candidate_beam_cfg_r16_c_& other); - candidate_beam_cfg_r16_c_& operator=(const candidate_beam_cfg_r16_c_& other); - ~candidate_beam_cfg_r16_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_r16() - { - assert_choice_type(types::ssb_r16, type_, "candidateBeamConfig-r16"); - return c.get(); - } - uint8_t& csi_rs_r16() - { - assert_choice_type(types::csi_rs_r16, type_, "candidateBeamConfig-r16"); - return c.get(); - } - const uint8_t& ssb_r16() const - { - assert_choice_type(types::ssb_r16, type_, "candidateBeamConfig-r16"); - return c.get(); - } - const uint8_t& csi_rs_r16() const - { - assert_choice_type(types::csi_rs_r16, type_, "candidateBeamConfig-r16"); - return c.get(); - } - uint8_t& set_ssb_r16(); - uint8_t& set_csi_rs_r16(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool serving_cell_id_present = false; - candidate_beam_cfg_r16_c_ candidate_beam_cfg_r16; - uint8_t serving_cell_id = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// DL-PPW-PreConfig-r17 ::= SEQUENCE -struct dl_ppw_pre_cfg_r17_s { - struct type_r17_opts { - enum options { type1_a, type1_b, type2, nulltype } value; - - const char* to_string() const; - }; - using type_r17_e_ = enumerated; - struct prio_r17_opts { - enum options { st1, st2, st3, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using prio_r17_e_ = enumerated; - - // member variables - bool type_r17_present = false; - bool prio_r17_present = false; - uint8_t dl_ppw_id_r17 = 0; - dl_ppw_periodicity_and_start_slot_r17_c dl_ppw_periodicity_and_start_slot_r17; - uint8_t len_r17 = 1; - type_r17_e_ type_r17; - prio_r17_e_ prio_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PDCCH-Config ::= SEQUENCE -struct pdcch_cfg_s { - using coreset_to_add_mod_list_l_ = dyn_array; - using coreset_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; - using coreset_to_add_mod_list_size_ext_v1610_l_ = dyn_array; - using coreset_to_release_list_size_ext_r16_l_ = bounded_array; - using search_spaces_to_add_mod_list_ext_r16_l_ = dyn_array; - struct monitoring_cap_cfg_r16_opts { - enum options { r15monitoringcap, r16monitoringcap, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using monitoring_cap_cfg_r16_e_ = enumerated; - using search_spaces_to_add_mod_list_ext_v1700_l_ = dyn_array; - using pdcch_skipping_dur_list_r17_l_ = bounded_array; - - // member variables - bool ext = false; - bool dl_preemption_present = false; - bool tpc_pusch_present = false; - bool tpc_pucch_present = false; - bool tpc_srs_present = false; - coreset_to_add_mod_list_l_ coreset_to_add_mod_list; - coreset_to_release_list_l_ coreset_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 monitoring_cap_cfg_r16_present = false; - copy_ptr coreset_to_add_mod_list_size_ext_v1610; - copy_ptr coreset_to_release_list_size_ext_r16; - copy_ptr search_spaces_to_add_mod_list_ext_r16; - copy_ptr> ul_cancellation_r16; - monitoring_cap_cfg_r16_e_ monitoring_cap_cfg_r16; - copy_ptr search_space_switch_cfg_r16; - // group 1 - bool monitoring_cap_cfg_v1710_present = false; - copy_ptr search_spaces_to_add_mod_list_ext_v1700; - copy_ptr search_space_switch_cfg_r17; - copy_ptr pdcch_skipping_dur_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using vrb_to_prb_interleaver_e_ = enumerated; - struct res_alloc_opts { - enum options { res_alloc_type0, res_alloc_type1, dyn_switch, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using res_alloc_e_ = enumerated; - struct pdsch_aggregation_factor_opts { - enum options { n2, n4, n8, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pdsch_aggregation_factor_e_ = enumerated; - 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using rbg_size_e_ = enumerated; - struct mcs_table_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using mcs_table_e_ = enumerated; - struct max_nrof_code_words_sched_by_dci_opts { - enum options { n1, n2, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using max_nrof_code_words_sched_by_dci_e_ = enumerated; - struct prb_bundling_type_c_ { - struct static_bundling_s_ { - struct bundle_size_opts { - enum options { n4, wideband, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using bundle_size_e_ = enumerated; - - // member variables - bool bundle_size_present = false; - bundle_size_e_ bundle_size; - }; - struct dyn_bundling_s_ { - struct bundle_size_set1_opts { - enum options { n4, wideband, n2_wideband, n4_wideband, nulltype } value; - - const char* to_string() const; - }; - using bundle_size_set1_e_ = enumerated; - struct bundle_size_set2_opts { - enum options { n4, wideband, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using bundle_size_set2_e_ = enumerated; - - // 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 { static_bundling, dyn_bundling, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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_(); } - 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(types::static_bundling, type_, "prb-BundlingType"); - return c.get(); - } - dyn_bundling_s_& dyn_bundling() - { - assert_choice_type(types::dyn_bundling, type_, "prb-BundlingType"); - return c.get(); - } - const static_bundling_s_& static_bundling() const - { - assert_choice_type(types::static_bundling, type_, "prb-BundlingType"); - return c.get(); - } - const dyn_bundling_s_& dyn_bundling() const - { - assert_choice_type(types::dyn_bundling, type_, "prb-BundlingType"); - return c.get(); - } - static_bundling_s_& set_static_bundling(); - dyn_bundling_s_& set_dyn_bundling(); - - private: - 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; - using aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16_l_ = dyn_array; - using aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16_l_ = bounded_array; - struct mcs_table_dci_1_2_r16_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using mcs_table_dci_1_2_r16_e_ = enumerated; - struct prb_bundling_type_dci_1_2_r16_c_ { - struct static_bundling_r16_s_ { - struct bundle_size_r16_opts { - enum options { n4, wideband, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using bundle_size_r16_e_ = enumerated; - - // member variables - bool bundle_size_r16_present = false; - bundle_size_r16_e_ bundle_size_r16; - }; - struct dyn_bundling_r16_s_ { - struct bundle_size_set1_r16_opts { - enum options { n4, wideband, n2_wideband, n4_wideband, nulltype } value; - - const char* to_string() const; - }; - using bundle_size_set1_r16_e_ = enumerated; - struct bundle_size_set2_r16_opts { - enum options { n4, wideband, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using bundle_size_set2_r16_e_ = enumerated; - - // member variables - bool bundle_size_set1_r16_present = false; - bool bundle_size_set2_r16_present = false; - bundle_size_set1_r16_e_ bundle_size_set1_r16; - bundle_size_set2_r16_e_ bundle_size_set2_r16; - }; - struct types_opts { - enum options { static_bundling_r16, dyn_bundling_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - prb_bundling_type_dci_1_2_r16_c_() = default; - prb_bundling_type_dci_1_2_r16_c_(const prb_bundling_type_dci_1_2_r16_c_& other); - prb_bundling_type_dci_1_2_r16_c_& operator=(const prb_bundling_type_dci_1_2_r16_c_& other); - ~prb_bundling_type_dci_1_2_r16_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_r16_s_& static_bundling_r16() - { - assert_choice_type(types::static_bundling_r16, type_, "prb-BundlingTypeDCI-1-2-r16"); - return c.get(); - } - dyn_bundling_r16_s_& dyn_bundling_r16() - { - assert_choice_type(types::dyn_bundling_r16, type_, "prb-BundlingTypeDCI-1-2-r16"); - return c.get(); - } - const static_bundling_r16_s_& static_bundling_r16() const - { - assert_choice_type(types::static_bundling_r16, type_, "prb-BundlingTypeDCI-1-2-r16"); - return c.get(); - } - const dyn_bundling_r16_s_& dyn_bundling_r16() const - { - assert_choice_type(types::dyn_bundling_r16, type_, "prb-BundlingTypeDCI-1-2-r16"); - return c.get(); - } - static_bundling_r16_s_& set_static_bundling_r16(); - dyn_bundling_r16_s_& set_dyn_bundling_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct res_alloc_type1_granularity_dci_1_2_r16_opts { - enum options { n2, n4, n8, n16, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using res_alloc_type1_granularity_dci_1_2_r16_e_ = enumerated; - struct vrb_to_prb_interleaver_dci_1_2_r16_opts { - enum options { n2, n4, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using vrb_to_prb_interleaver_dci_1_2_r16_e_ = enumerated; - struct res_alloc_dci_1_2_r16_opts { - enum options { res_alloc_type0, res_alloc_type1, dyn_switch, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using res_alloc_dci_1_2_r16_e_ = enumerated; - struct dl_or_joint_tci_state_list_r17_c_ { - struct explicitlist_s_ { - using dl_or_joint_tci_state_to_add_mod_list_r17_l_ = dyn_array; - using dl_or_joint_tci_state_to_release_list_r17_l_ = dyn_array; - - // member variables - dl_or_joint_tci_state_to_add_mod_list_r17_l_ dl_or_joint_tci_state_to_add_mod_list_r17; - dl_or_joint_tci_state_to_release_list_r17_l_ dl_or_joint_tci_state_to_release_list_r17; - }; - struct types_opts { - enum options { explicitlist, unified_tci_state_ref_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - dl_or_joint_tci_state_list_r17_c_() = default; - dl_or_joint_tci_state_list_r17_c_(const dl_or_joint_tci_state_list_r17_c_& other); - dl_or_joint_tci_state_list_r17_c_& operator=(const dl_or_joint_tci_state_list_r17_c_& other); - ~dl_or_joint_tci_state_list_r17_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 - explicitlist_s_& explicitlist() - { - assert_choice_type(types::explicitlist, type_, "dl-OrJointTCI-StateList-r17"); - return c.get(); - } - serving_cell_and_bwp_id_r17_s& unified_tci_state_ref_r17() - { - assert_choice_type(types::unified_tci_state_ref_r17, type_, "dl-OrJointTCI-StateList-r17"); - return c.get(); - } - const explicitlist_s_& explicitlist() const - { - assert_choice_type(types::explicitlist, type_, "dl-OrJointTCI-StateList-r17"); - return c.get(); - } - const serving_cell_and_bwp_id_r17_s& unified_tci_state_ref_r17() const - { - assert_choice_type(types::unified_tci_state_ref_r17, type_, "dl-OrJointTCI-StateList-r17"); - return c.get(); - } - explicitlist_s_& set_explicitlist(); - serving_cell_and_bwp_id_r17_s& set_unified_tci_state_ref_r17(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct beam_app_time_r17_opts { - enum options { - n1, - n2, - n4, - n7, - n14, - n28, - n42, - n56, - n70, - n84, - n98, - n112, - n224, - n336, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using beam_app_time_r17_e_ = enumerated; - struct xoverhead_multicast_r17_opts { - enum options { xoh6, xoh12, xoh18, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using xoverhead_multicast_r17_e_ = enumerated; - - // 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 vrb_to_prb_interleaver_present = false; - bool pdsch_time_domain_alloc_list_present = false; - bool pdsch_aggregation_factor_present = false; - bool mcs_table_present = false; - bool max_nrof_code_words_sched_by_dci_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; - // ... - // group 0 - bool ant_ports_field_presence_dci_1_2_r16_present = false; - bool dmrs_seq_initization_dci_1_2_r16_present = false; - bool harq_process_num_size_dci_1_2_r16_present = false; - bool mcs_table_dci_1_2_r16_present = false; - bool nof_bits_for_rv_dci_1_2_r16_present = false; - bool prio_ind_dci_1_2_r16_present = false; - bool res_alloc_type1_granularity_dci_1_2_r16_present = false; - bool vrb_to_prb_interleaver_dci_1_2_r16_present = false; - bool ref_of_slivdci_1_2_r16_present = false; - bool res_alloc_dci_1_2_r16_present = false; - bool prio_ind_dci_1_1_r16_present = false; - bool data_scrambling_id_pdsch2_r16_present = false; - copy_ptr>> max_mimo_layers_r16; - copy_ptr, 1, 2>>> minimum_sched_offset_k0_r16; - copy_ptr - aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16; - copy_ptr - aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16; - copy_ptr> dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16; - copy_ptr> dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16; - uint8_t harq_process_num_size_dci_1_2_r16 = 0; - mcs_table_dci_1_2_r16_e_ mcs_table_dci_1_2_r16; - uint8_t nof_bits_for_rv_dci_1_2_r16 = 0; - copy_ptr>> - pdsch_time_domain_alloc_list_dci_1_2_r16; - copy_ptr prb_bundling_type_dci_1_2_r16; - copy_ptr rate_match_pattern_group1_dci_1_2_r16; - copy_ptr rate_match_pattern_group2_dci_1_2_r16; - res_alloc_type1_granularity_dci_1_2_r16_e_ res_alloc_type1_granularity_dci_1_2_r16; - vrb_to_prb_interleaver_dci_1_2_r16_e_ vrb_to_prb_interleaver_dci_1_2_r16; - res_alloc_dci_1_2_r16_e_ res_alloc_dci_1_2_r16; - uint16_t data_scrambling_id_pdsch2_r16 = 0; - copy_ptr>> pdsch_time_domain_alloc_list_r16; - copy_ptr> repeat_scheme_cfg_r16; - // group 1 - copy_ptr> repeat_scheme_cfg_v1630; - // group 2 - bool pdsch_harq_ack_one_shot_feedback_dci_1_2_r17_present = false; - bool pdsch_harq_ack_enh_type3_dci_1_2_r17_present = false; - bool pdsch_harq_ack_enh_type3_dci_field_1_2_r17_present = false; - bool pdsch_harq_ack_retx_dci_1_2_r17_present = false; - bool pucch_s_scell_dyn_dci_1_2_r17_present = false; - bool beam_app_time_r17_present = false; - bool dmrs_fd_occ_disabled_for_rank1_pdsch_r17_present = false; - bool harq_process_num_size_dci_1_2_v1700_present = false; - bool harq_process_num_size_dci_1_1_r17_present = false; - bool mcs_table_r17_present = false; - bool mcs_table_dci_1_2_r17_present = false; - bool xoverhead_multicast_r17_present = false; - bool prio_ind_dci_4_2_r17_present = false; - bool size_dci_4_2_r17_present = false; - copy_ptr dl_or_joint_tci_state_list_r17; - beam_app_time_r17_e_ beam_app_time_r17; - copy_ptr>> dummy; - copy_ptr, 1, 2>>> minimum_sched_offset_k0_r17; - uint8_t harq_process_num_size_dci_1_2_v1700 = 0; - uint8_t harq_process_num_size_dci_1_1_r17 = 5; - xoverhead_multicast_r17_e_ xoverhead_multicast_r17; - uint8_t size_dci_4_2_r17 = 20; - // group 3 - copy_ptr>> pdsch_time_domain_alloc_list_for_multi_pdsch_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - const char* to_string() const; - }; - using purpose_e_ = enumerated; - struct detection_res_c_ { - struct types_opts { - enum options { ssb_idx, csi_rs_idx, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::ssb_idx, type_, "detectionResource"); - return c.get(); - } - uint8_t& csi_rs_idx() - { - assert_choice_type(types::csi_rs_idx, type_, "detectionResource"); - return c.get(); - } - const uint8_t& ssb_idx() const - { - assert_choice_type(types::ssb_idx, type_, "detectionResource"); - return c.get(); - } - const uint8_t& csi_rs_idx() const - { - assert_choice_type(types::csi_rs_idx, type_, "detectionResource"); - return c.get(); - } - uint8_t& set_ssb_idx(); - uint8_t& set_csi_rs_idx(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool ext = false; - uint8_t radio_link_monitoring_rs_id = 0; - purpose_e_ purpose; - detection_res_c_ detection_res; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SPS-ConfigDeactivationState-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..7) -using sps_cfg_deactivation_state_r16_l = bounded_array; - -// SPS-ConfigMulticastToAddModList-r17 ::= SEQUENCE (SIZE (1..8)) OF SPS-Config -using sps_cfg_multicast_to_add_mod_list_r17_l = dyn_array; - -// SPS-ConfigMulticastToReleaseList-r17 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..7) -using sps_cfg_multicast_to_release_list_r17_l = bounded_array; - -// BeamFailureRecoveryRSConfig-r16 ::= SEQUENCE -struct beam_fail_recovery_rs_cfg_r16_s { - using candidate_beam_rs_list_r16_l_ = dyn_array; - using candidate_beam_rs_list2_r17_l_ = dyn_array; - - // member variables - bool ext = false; - bool rsrp_thres_bfr_r16_present = false; - uint8_t rsrp_thres_bfr_r16 = 0; - candidate_beam_rs_list_r16_l_ candidate_beam_rs_list_r16; - // ... - // group 0 - copy_ptr candidate_beam_rs_list2_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CFR-ConfigMulticast-r17 ::= SEQUENCE -struct cfr_cfg_multicast_r17_s { - bool location_and_bw_multicast_r17_present = false; - bool pdcch_cfg_multicast_r17_present = false; - bool pdsch_cfg_multicast_r17_present = false; - uint16_t location_and_bw_multicast_r17 = 0; - pdcch_cfg_s pdcch_cfg_multicast_r17; - pdsch_cfg_s pdsch_cfg_multicast_r17; - sps_cfg_multicast_to_add_mod_list_r17_l sps_cfg_multicast_to_add_mod_list_r17; - sps_cfg_multicast_to_release_list_r17_l sps_cfg_multicast_to_release_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// DL-PPW-PreConfigToAddModList-r17 ::= SEQUENCE (SIZE (1..4)) OF DL-PPW-PreConfig-r17 -using dl_ppw_pre_cfg_to_add_mod_list_r17_l = dyn_array; - -// DL-PPW-PreConfigToReleaseList-r17 ::= SEQUENCE (SIZE (1..4)) OF INTEGER (0..15) -using dl_ppw_pre_cfg_to_release_list_r17_l = bounded_array; - -// 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using beam_fail_instance_max_count_e_ = enumerated; - struct beam_fail_detection_timer_opts { - enum options { pbfd1, pbfd2, pbfd3, pbfd4, pbfd5, pbfd6, pbfd8, pbfd10, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using beam_fail_detection_timer_e_ = enumerated; - - // member variables - bool ext = 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; - // ... - // group 0 - copy_ptr beam_fail_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SPS-ConfigDeactivationStateList-r16 ::= SEQUENCE (SIZE (1..16)) OF SPS-ConfigDeactivationState-r16 -using sps_cfg_deactivation_state_list_r16_l = dyn_array; - -// SPS-ConfigToAddModList-r16 ::= SEQUENCE (SIZE (1..8)) OF SPS-Config -using sps_cfg_to_add_mod_list_r16_l = dyn_array; - -// SPS-ConfigToReleaseList-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..7) -using sps_cfg_to_release_list_r16_l = bounded_array; - -// 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; - // ... - // group 0 - copy_ptr sps_cfg_to_add_mod_list_r16; - copy_ptr sps_cfg_to_release_list_r16; - copy_ptr sps_cfg_deactivation_state_list_r16; - copy_ptr> beam_fail_recovery_scell_cfg_r16; - copy_ptr> sl_pdcch_cfg_r16; - copy_ptr> sl_v2x_pdcch_cfg_r16; - // group 1 - bool pre_conf_gap_status_r17_present = false; - bool harq_feedback_enablingfor_sp_sactive_r17_present = false; - bool serving_cell_mo_r17_present = false; - fixed_bitstring<8> pre_conf_gap_status_r17; - copy_ptr> beam_fail_recovery_sp_cell_cfg_r17; - bool harq_feedback_enablingfor_sp_sactive_r17 = false; - copy_ptr> cfr_cfg_multicast_r17; - copy_ptr dl_ppw_pre_cfg_to_add_mod_list_r17; - copy_ptr dl_ppw_pre_cfg_to_release_list_r17; - copy_ptr non_cell_defining_ssb_r17; - uint8_t serving_cell_mo_r17 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PUCCH-PathlossReferenceRS-r16 ::= SEQUENCE -struct pucch_pathloss_ref_rs_r16_s { - struct ref_sig_r16_c_ { - struct types_opts { - enum options { ssb_idx_r16, csi_rs_idx_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - ref_sig_r16_c_() = default; - ref_sig_r16_c_(const ref_sig_r16_c_& other); - ref_sig_r16_c_& operator=(const ref_sig_r16_c_& other); - ~ref_sig_r16_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_r16() - { - assert_choice_type(types::ssb_idx_r16, type_, "referenceSignal-r16"); - return c.get(); - } - uint8_t& csi_rs_idx_r16() - { - assert_choice_type(types::csi_rs_idx_r16, type_, "referenceSignal-r16"); - return c.get(); - } - const uint8_t& ssb_idx_r16() const - { - assert_choice_type(types::ssb_idx_r16, type_, "referenceSignal-r16"); - return c.get(); - } - const uint8_t& csi_rs_idx_r16() const - { - assert_choice_type(types::csi_rs_idx_r16, type_, "referenceSignal-r16"); - return c.get(); - } - uint8_t& set_ssb_idx_r16(); - uint8_t& set_csi_rs_idx_r16(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - uint8_t pucch_pathloss_ref_rs_id_r16 = 4; - ref_sig_r16_c_ ref_sig_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PathlossReferenceRS-Config ::= CHOICE -struct pathloss_ref_rs_cfg_c { - struct types_opts { - enum options { ssb_idx, csi_rs_idx, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - pathloss_ref_rs_cfg_c() = default; - pathloss_ref_rs_cfg_c(const pathloss_ref_rs_cfg_c& other); - pathloss_ref_rs_cfg_c& operator=(const pathloss_ref_rs_cfg_c& other); - ~pathloss_ref_rs_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() - { - assert_choice_type(types::ssb_idx, type_, "PathlossReferenceRS-Config"); - return c.get(); - } - uint8_t& csi_rs_idx() - { - assert_choice_type(types::csi_rs_idx, type_, "PathlossReferenceRS-Config"); - return c.get(); - } - const uint8_t& ssb_idx() const - { - assert_choice_type(types::ssb_idx, type_, "PathlossReferenceRS-Config"); - return c.get(); - } - const uint8_t& csi_rs_idx() const - { - assert_choice_type(types::csi_rs_idx, type_, "PathlossReferenceRS-Config"); - return c.get(); - } - uint8_t& set_ssb_idx(); - uint8_t& set_csi_rs_idx(); - -private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); -}; - -// Alpha ::= ENUMERATED -struct alpha_opts { - enum options { alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; -}; -using alpha_e = enumerated; - -// 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; -}; - -// BetaOffsetsCrossPri-r17 ::= SEQUENCE (SIZE (3)) OF INTEGER (0..31) -using beta_offsets_cross_pri_r17_l = std::array; - -// DMRS-UplinkTransformPrecoding-r16 ::= SEQUENCE -struct dmrs_ul_transform_precoding_r16_s { - bool pi2_bpsk_scrambling_id0_present = false; - bool pi2_bpsk_scrambling_id1_present = false; - uint32_t pi2_bpsk_scrambling_id0 = 0; - uint32_t pi2_bpsk_scrambling_id1 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using max_nrof_ports_e_ = enumerated; - struct res_elem_offset_opts { - enum options { offset01, offset10, offset11, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using res_elem_offset_e_ = enumerated; - struct ptrs_pwr_opts { - enum options { p00, p01, p10, p11, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using ptrs_pwr_e_ = enumerated; - - // 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; - }; - - // 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; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; -}; -using pucch_max_code_rate_e = enumerated; - -// 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; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::ssb_idx, type_, "referenceSignal"); - return c.get(); - } - uint8_t& csi_rs_idx() - { - assert_choice_type(types::csi_rs_idx, type_, "referenceSignal"); - return c.get(); - } - const uint8_t& ssb_idx() const - { - assert_choice_type(types::ssb_idx, type_, "referenceSignal"); - return c.get(); - } - const uint8_t& csi_rs_idx() const - { - assert_choice_type(types::csi_rs_idx, type_, "referenceSignal"); - return c.get(); - } - uint8_t& set_ssb_idx(); - uint8_t& set_csi_rs_idx(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - uint8_t pucch_pathloss_ref_rs_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; -}; - -// PUCCH-SRS ::= SEQUENCE -struct pucch_srs_s { - uint8_t res = 0; - uint8_t ul_bwp = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using occ_len_e_ = enumerated; - struct occ_idx_opts { - enum options { n0, n1, n2, n3, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using occ_idx_e_ = enumerated; - - // 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PUSCH-Allocation-r16 ::= SEQUENCE -struct pusch_alloc_r16_s { - struct map_type_r16_opts { - enum options { type_a, type_b, nulltype } value; - - const char* to_string() const; - }; - using map_type_r16_e_ = enumerated; - struct nof_repeats_r16_opts { - enum options { n1, n2, n3, n4, n7, n8, n12, n16, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using nof_repeats_r16_e_ = enumerated; - struct nof_repeats_ext_r17_opts { - enum options { - n1, - n2, - n3, - n4, - n7, - n8, - n12, - n16, - n20, - n24, - n28, - n32, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using nof_repeats_ext_r17_e_ = enumerated; - struct nof_slots_t_bo_ms_r17_opts { - enum options { n1, n2, n4, n8, spare4, spare3, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using nof_slots_t_bo_ms_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool map_type_r16_present = false; - bool start_symbol_and_len_r16_present = false; - bool start_symbol_r16_present = false; - bool len_r16_present = false; - bool nof_repeats_r16_present = false; - map_type_r16_e_ map_type_r16; - uint8_t start_symbol_and_len_r16 = 0; - uint8_t start_symbol_r16 = 0; - uint8_t len_r16 = 1; - nof_repeats_r16_e_ nof_repeats_r16; - // ... - // group 0 - bool nof_repeats_ext_r17_present = false; - bool nof_slots_t_bo_ms_r17_present = false; - bool extended_k2_r17_present = false; - nof_repeats_ext_r17_e_ nof_repeats_ext_r17; - nof_slots_t_bo_ms_r17_e_ nof_slots_t_bo_ms_r17; - uint8_t extended_k2_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PathlossReferenceRS-r16 ::= SEQUENCE -struct pathloss_ref_rs_r16_s { - uint8_t srs_pathloss_ref_rs_id_r16 = 0; - pathloss_ref_rs_cfg_c pathloss_ref_rs_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PathlossReferenceRSs-v1610 ::= SEQUENCE (SIZE (1..60)) OF PUCCH-PathlossReferenceRS-r16 -using pathloss_ref_rss_v1610_l = dyn_array; - -// SPS-PUCCH-AN-r16 ::= SEQUENCE -struct sps_pucch_an_r16_s { - bool max_payload_size_r16_present = false; - uint8_t sps_pucch_an_res_id_r16 = 0; - uint16_t max_payload_size_r16 = 4; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// BetaOffsetsCrossPriSelCG-r17 ::= CHOICE -struct beta_offsets_cross_pri_sel_cg_r17_c { - using dyn_r17_l_ = dyn_array; - struct types_opts { - enum options { dyn_r17, semi_static_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - beta_offsets_cross_pri_sel_cg_r17_c() = default; - beta_offsets_cross_pri_sel_cg_r17_c(const beta_offsets_cross_pri_sel_cg_r17_c& other); - beta_offsets_cross_pri_sel_cg_r17_c& operator=(const beta_offsets_cross_pri_sel_cg_r17_c& other); - ~beta_offsets_cross_pri_sel_cg_r17_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_r17_l_& dyn_r17() - { - assert_choice_type(types::dyn_r17, type_, "BetaOffsetsCrossPriSelCG-r17"); - return c.get(); - } - beta_offsets_cross_pri_r17_l& semi_static_r17() - { - assert_choice_type(types::semi_static_r17, type_, "BetaOffsetsCrossPriSelCG-r17"); - return c.get(); - } - const dyn_r17_l_& dyn_r17() const - { - assert_choice_type(types::dyn_r17, type_, "BetaOffsetsCrossPriSelCG-r17"); - return c.get(); - } - const beta_offsets_cross_pri_r17_l& semi_static_r17() const - { - assert_choice_type(types::semi_static_r17, type_, "BetaOffsetsCrossPriSelCG-r17"); - return c.get(); - } - dyn_r17_l_& set_dyn_r17(); - beta_offsets_cross_pri_r17_l& set_semi_static_r17(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// CG-COT-Sharing-r16 ::= CHOICE -struct cg_cot_sharing_r16_c { - struct cot_sharing_r16_s_ { - uint8_t dur_r16 = 1; - uint8_t offset_r16 = 1; - uint8_t ch_access_prio_r16 = 1; - }; - struct types_opts { - enum options { no_cot_sharing_r16, cot_sharing_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - cg_cot_sharing_r16_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 - cot_sharing_r16_s_& cot_sharing_r16() - { - assert_choice_type(types::cot_sharing_r16, type_, "CG-COT-Sharing-r16"); - return c; - } - const cot_sharing_r16_s_& cot_sharing_r16() const - { - assert_choice_type(types::cot_sharing_r16, type_, "CG-COT-Sharing-r16"); - return c; - } - void set_no_cot_sharing_r16(); - cot_sharing_r16_s_& set_cot_sharing_r16(); - -private: - types type_; - cot_sharing_r16_s_ c; -}; - -// CG-COT-Sharing-r17 ::= CHOICE -struct cg_cot_sharing_r17_c { - struct cot_sharing_r17_s_ { - uint16_t dur_r17 = 1; - uint16_t offset_r17 = 1; - }; - struct types_opts { - enum options { no_cot_sharing_r17, cot_sharing_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - cg_cot_sharing_r17_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 - cot_sharing_r17_s_& cot_sharing_r17() - { - assert_choice_type(types::cot_sharing_r17, type_, "CG-COT-Sharing-r17"); - return c; - } - const cot_sharing_r17_s_& cot_sharing_r17() const - { - assert_choice_type(types::cot_sharing_r17, type_, "CG-COT-Sharing-r17"); - return c; - } - void set_no_cot_sharing_r17(); - cot_sharing_r17_s_& set_cot_sharing_r17(); - -private: - types type_; - cot_sharing_r17_s_ c; -}; - -// CG-SDT-Configuration-r17 ::= SEQUENCE -struct cg_sdt_cfg_r17_s { - struct sdt_ssb_subset_r17_c_ { - struct types_opts { - enum options { short_bitmap_r17, medium_bitmap_r17, long_bitmap_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - sdt_ssb_subset_r17_c_() = default; - sdt_ssb_subset_r17_c_(const sdt_ssb_subset_r17_c_& other); - sdt_ssb_subset_r17_c_& operator=(const sdt_ssb_subset_r17_c_& other); - ~sdt_ssb_subset_r17_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_r17() - { - assert_choice_type(types::short_bitmap_r17, type_, "sdt-SSB-Subset-r17"); - return c.get>(); - } - fixed_bitstring<8>& medium_bitmap_r17() - { - assert_choice_type(types::medium_bitmap_r17, type_, "sdt-SSB-Subset-r17"); - return c.get>(); - } - fixed_bitstring<64>& long_bitmap_r17() - { - assert_choice_type(types::long_bitmap_r17, type_, "sdt-SSB-Subset-r17"); - return c.get>(); - } - const fixed_bitstring<4>& short_bitmap_r17() const - { - assert_choice_type(types::short_bitmap_r17, type_, "sdt-SSB-Subset-r17"); - return c.get>(); - } - const fixed_bitstring<8>& medium_bitmap_r17() const - { - assert_choice_type(types::medium_bitmap_r17, type_, "sdt-SSB-Subset-r17"); - return c.get>(); - } - const fixed_bitstring<64>& long_bitmap_r17() const - { - assert_choice_type(types::long_bitmap_r17, type_, "sdt-SSB-Subset-r17"); - return c.get>(); - } - fixed_bitstring<4>& set_short_bitmap_r17(); - fixed_bitstring<8>& set_medium_bitmap_r17(); - fixed_bitstring<64>& set_long_bitmap_r17(); - - private: - types type_; - choice_buffer_t> c; - - void destroy_(); - }; - struct sdt_ssb_per_cg_pusch_r17_opts { - enum options { one_eighth, one_fourth, half, one, two, four, eight, sixteen, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using sdt_ssb_per_cg_pusch_r17_e_ = enumerated; - struct sdt_alpha_r17_opts { - enum options { alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using sdt_alpha_r17_e_ = enumerated; - struct sdt_dmrs_ports_r17_c_ { - struct types_opts { - enum options { dmrs_type1_r17, dmrs_type2_r17, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - sdt_dmrs_ports_r17_c_() = default; - sdt_dmrs_ports_r17_c_(const sdt_dmrs_ports_r17_c_& other); - sdt_dmrs_ports_r17_c_& operator=(const sdt_dmrs_ports_r17_c_& other); - ~sdt_dmrs_ports_r17_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>& dmrs_type1_r17() - { - assert_choice_type(types::dmrs_type1_r17, type_, "sdt-DMRS-Ports-r17"); - return c.get>(); - } - fixed_bitstring<12>& dmrs_type2_r17() - { - assert_choice_type(types::dmrs_type2_r17, type_, "sdt-DMRS-Ports-r17"); - return c.get>(); - } - const fixed_bitstring<8>& dmrs_type1_r17() const - { - assert_choice_type(types::dmrs_type1_r17, type_, "sdt-DMRS-Ports-r17"); - return c.get>(); - } - const fixed_bitstring<12>& dmrs_type2_r17() const - { - assert_choice_type(types::dmrs_type2_r17, type_, "sdt-DMRS-Ports-r17"); - return c.get>(); - } - fixed_bitstring<8>& set_dmrs_type1_r17(); - fixed_bitstring<12>& set_dmrs_type2_r17(); - - private: - types type_; - choice_buffer_t> c; - - void destroy_(); - }; - - // member variables - bool cg_sdt_retx_timer_present = false; - bool sdt_ssb_subset_r17_present = false; - bool sdt_ssb_per_cg_pusch_r17_present = false; - bool sdt_p0_pusch_r17_present = false; - bool sdt_alpha_r17_present = false; - bool sdt_dmrs_ports_r17_present = false; - bool sdt_nrof_dmrs_seqs_r17_present = false; - uint8_t cg_sdt_retx_timer = 1; - sdt_ssb_subset_r17_c_ sdt_ssb_subset_r17; - sdt_ssb_per_cg_pusch_r17_e_ sdt_ssb_per_cg_pusch_r17; - int8_t sdt_p0_pusch_r17 = -16; - sdt_alpha_r17_e_ sdt_alpha_r17; - sdt_dmrs_ports_r17_c_ sdt_dmrs_ports_r17; - uint8_t sdt_nrof_dmrs_seqs_r17 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CG-StartingOffsets-r16 ::= SEQUENCE -struct cg_start_offsets_r16_s { - using cg_start_full_bw_inside_cot_r16_l_ = bounded_array; - using cg_start_full_bw_outside_cot_r16_l_ = bounded_array; - - // member variables - bool cg_start_partial_bw_inside_cot_r16_present = false; - bool cg_start_partial_bw_outside_cot_r16_present = false; - cg_start_full_bw_inside_cot_r16_l_ cg_start_full_bw_inside_cot_r16; - cg_start_full_bw_outside_cot_r16_l_ cg_start_full_bw_outside_cot_r16; - uint8_t cg_start_partial_bw_inside_cot_r16 = 0; - uint8_t cg_start_partial_bw_outside_cot_r16 = 0; - - // 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 dyn_l_ = dyn_array; - struct types_opts { - enum options { dyn, semi_static, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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 - dyn_l_& dyn() - { - assert_choice_type(types::dyn, type_, "CG-UCI-OnPUSCH"); - return c.get(); - } - beta_offsets_s& semi_static() - { - assert_choice_type(types::semi_static, type_, "CG-UCI-OnPUSCH"); - return c.get(); - } - const dyn_l_& dyn() const - { - assert_choice_type(types::dyn, type_, "CG-UCI-OnPUSCH"); - return c.get(); - } - const beta_offsets_s& semi_static() const - { - assert_choice_type(types::semi_static, type_, "CG-UCI-OnPUSCH"); - return c.get(); - } - dyn_l_& set_dyn(); - beta_offsets_s& set_semi_static(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// DL-DataToUL-ACK-DCI-1-2-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..15) -using dl_data_to_ul_ack_dci_1_2_r16_l = bounded_array; - -// DL-DataToUL-ACK-DCI-1-2-r17 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..127) -using dl_data_to_ul_ack_dci_1_2_r17_l = bounded_array; - -// DL-DataToUL-ACK-MulticastDCI-Format4-1-r17 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..15) -using dl_data_to_ul_ack_multicast_dci_format4_1_r17_l = bounded_array; - -// DL-DataToUL-ACK-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (-1..15) -using dl_data_to_ul_ack_r16_l = bounded_array; - -// DL-DataToUL-ACK-r17 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (-1..127) -using dl_data_to_ul_ack_r17_l = bounded_array; - -// DL-DataToUL-ACK-v1700 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (16..31) -using dl_data_to_ul_ack_v1700_l = bounded_array; - -// DMRS-BundlingPUCCH-Config-r17 ::= SEQUENCE -struct dmrs_bundling_pucch_cfg_r17_s { - struct pucch_freq_hop_interv_r17_opts { - enum options { s2, s4, s5, s10, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pucch_freq_hop_interv_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool pucch_dmrs_bundling_r17_present = false; - bool pucch_time_domain_win_len_r17_present = false; - bool pucch_win_restart_r17_present = false; - bool pucch_freq_hop_interv_r17_present = false; - uint8_t pucch_time_domain_win_len_r17 = 2; - pucch_freq_hop_interv_r17_e_ pucch_freq_hop_interv_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using dmrs_add_position_e_ = enumerated; - 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; - // ... - // group 0 - bool dmrs_ul_r16_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - }; - 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; - // ... - // group 0 - copy_ptr> dmrs_ul_transform_precoding_r16; - - // 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 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; -}; - -// DummyPathlossReferenceRS-v1710 ::= SEQUENCE -struct dummy_pathloss_ref_rs_v1710_s { - bool add_pci_r17_present = false; - uint8_t pusch_pathloss_ref_rs_id_r17 = 0; - uint8_t add_pci_r17 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; -}; - -// P0-PUSCH-Set-r16 ::= SEQUENCE -struct p0_pusch_set_r16_s { - using p0_list_r16_l_ = bounded_array; - - // member variables - bool ext = false; - uint8_t p0_pusch_set_id_r16 = 0; - p0_list_r16_l_ p0_list_r16; - // ... - - // 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; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::ssb, type_, "PRACH-ResourceDedicatedBFR"); - return c.get(); - } - bfr_csi_rs_res_s& csi_rs() - { - assert_choice_type(types::csi_rs, type_, "PRACH-ResourceDedicatedBFR"); - return c.get(); - } - const bfr_ssb_res_s& ssb() const - { - assert_choice_type(types::ssb, type_, "PRACH-ResourceDedicatedBFR"); - return c.get(); - } - const bfr_csi_rs_res_s& csi_rs() const - { - assert_choice_type(types::csi_rs, type_, "PRACH-ResourceDedicatedBFR"); - return c.get(); - } - bfr_ssb_res_s& set_ssb(); - bfr_csi_rs_res_s& set_csi_rs(); - -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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using nrof_slots_e_ = enumerated; - - // 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-FormatConfigExt-r17 ::= SEQUENCE -struct pucch_format_cfg_ext_r17_s { - bool ext = false; - bool max_code_rate_lp_r17_present = false; - pucch_max_code_rate_e max_code_rate_lp_r17; - // ... - - // 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 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; - // ... - // group 0 - copy_ptr>> pathloss_ref_rss_v1610; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PUCCH-PowerControlSetInfo-r17 ::= SEQUENCE -struct pucch_pwr_ctrl_set_info_r17_s { - struct pucch_closed_loop_idx_r17_opts { - enum options { i0, i1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pucch_closed_loop_idx_r17_e_ = enumerated; - - // member variables - uint8_t pucch_pwr_ctrl_set_info_id_r17 = 1; - uint8_t p0_pucch_id_r17 = 1; - pucch_closed_loop_idx_r17_e_ pucch_closed_loop_idx_r17; - uint8_t pucch_pathloss_ref_rs_id_r17 = 0; - - // 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // 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(types::format0, type_, "format"); - return c.get(); - } - pucch_format1_s& format1() - { - assert_choice_type(types::format1, type_, "format"); - return c.get(); - } - pucch_format2_s& format2() - { - assert_choice_type(types::format2, type_, "format"); - return c.get(); - } - pucch_format3_s& format3() - { - assert_choice_type(types::format3, type_, "format"); - return c.get(); - } - pucch_format4_s& format4() - { - assert_choice_type(types::format4, type_, "format"); - return c.get(); - } - const pucch_format0_s& format0() const - { - assert_choice_type(types::format0, type_, "format"); - return c.get(); - } - const pucch_format1_s& format1() const - { - assert_choice_type(types::format1, type_, "format"); - return c.get(); - } - const pucch_format2_s& format2() const - { - assert_choice_type(types::format2, type_, "format"); - return c.get(); - } - const pucch_format3_s& format3() const - { - assert_choice_type(types::format3, type_, "format"); - return c.get(); - } - const pucch_format4_s& format4() const - { - assert_choice_type(types::format4, type_, "format"); - return c.get(); - } - pucch_format0_s& set_format0(); - pucch_format1_s& set_format1(); - pucch_format2_s& set_format2(); - pucch_format3_s& set_format3(); - pucch_format4_s& set_format4(); - - 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-ResourceExt-v1610 ::= SEQUENCE -struct pucch_res_ext_v1610_s { - struct interlace_alloc_r16_s_ { - struct interlace0_r16_c_ { - struct types_opts { - enum options { scs15, scs30, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - interlace0_r16_c_() = default; - interlace0_r16_c_(const interlace0_r16_c_& other); - interlace0_r16_c_& operator=(const interlace0_r16_c_& other); - ~interlace0_r16_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& scs15() - { - assert_choice_type(types::scs15, type_, "interlace0-r16"); - return c.get(); - } - uint8_t& scs30() - { - assert_choice_type(types::scs30, type_, "interlace0-r16"); - return c.get(); - } - const uint8_t& scs15() const - { - assert_choice_type(types::scs15, type_, "interlace0-r16"); - return c.get(); - } - const uint8_t& scs30() const - { - assert_choice_type(types::scs30, type_, "interlace0-r16"); - return c.get(); - } - uint8_t& set_scs15(); - uint8_t& set_scs30(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - uint8_t rb_set_idx_r16 = 0; - interlace0_r16_c_ interlace0_r16; - }; - struct format_v1610_c_ { - struct occ_v1610_s_ { - struct occ_len_v1610_opts { - enum options { n2, n4, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using occ_len_v1610_e_ = enumerated; - struct occ_idx_v1610_opts { - enum options { n0, n1, n2, n3, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using occ_idx_v1610_e_ = enumerated; - - // member variables - bool occ_len_v1610_present = false; - bool occ_idx_v1610_present = false; - occ_len_v1610_e_ occ_len_v1610; - occ_idx_v1610_e_ occ_idx_v1610; - }; - struct types_opts { - enum options { interlace1_v1610, occ_v1610, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - format_v1610_c_() = default; - format_v1610_c_(const format_v1610_c_& other); - format_v1610_c_& operator=(const format_v1610_c_& other); - ~format_v1610_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& interlace1_v1610() - { - assert_choice_type(types::interlace1_v1610, type_, "format-v1610"); - return c.get(); - } - occ_v1610_s_& occ_v1610() - { - assert_choice_type(types::occ_v1610, type_, "format-v1610"); - return c.get(); - } - const uint8_t& interlace1_v1610() const - { - assert_choice_type(types::interlace1_v1610, type_, "format-v1610"); - return c.get(); - } - const occ_v1610_s_& occ_v1610() const - { - assert_choice_type(types::occ_v1610, type_, "format-v1610"); - return c.get(); - } - uint8_t& set_interlace1_v1610(); - occ_v1610_s_& set_occ_v1610(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct format_v1700_s_ { - uint8_t nrof_prbs_r17 = 1; - }; - struct pucch_repeat_nrof_slots_r17_opts { - enum options { n1, n2, n4, n8, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pucch_repeat_nrof_slots_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool interlace_alloc_r16_present = false; - bool format_v1610_present = false; - interlace_alloc_r16_s_ interlace_alloc_r16; - format_v1610_c_ format_v1610; - // ... - // group 0 - bool pucch_repeat_nrof_slots_r17_present = false; - copy_ptr format_v1700; - pucch_repeat_nrof_slots_r17_e_ pucch_repeat_nrof_slots_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PUCCH-ResourceGroup-r16 ::= SEQUENCE -struct pucch_res_group_r16_s { - using res_per_group_list_r16_l_ = dyn_array; - - // member variables - uint8_t pucch_res_group_id_r16 = 0; - res_per_group_list_r16_l_ res_per_group_list_r16; - - // 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 types_opts { - enum options { ssb_idx, csi_rs_idx, srs, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::ssb_idx, type_, "referenceSignal"); - return c.get(); - } - uint8_t& csi_rs_idx() - { - assert_choice_type(types::csi_rs_idx, type_, "referenceSignal"); - return c.get(); - } - pucch_srs_s& srs() - { - assert_choice_type(types::srs, type_, "referenceSignal"); - return c.get(); - } - const uint8_t& ssb_idx() const - { - assert_choice_type(types::ssb_idx, type_, "referenceSignal"); - return c.get(); - } - const uint8_t& csi_rs_idx() const - { - assert_choice_type(types::csi_rs_idx, type_, "referenceSignal"); - return c.get(); - } - const pucch_srs_s& srs() const - { - assert_choice_type(types::srs, type_, "referenceSignal"); - return c.get(); - } - uint8_t& set_ssb_idx(); - uint8_t& set_csi_rs_idx(); - pucch_srs_s& set_srs(); - - 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using closed_loop_idx_e_ = enumerated; - - // 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; -}; - -// PUCCH-SpatialRelationInfoExt-r16 ::= SEQUENCE -struct pucch_spatial_relation_info_ext_r16_s { - bool ext = false; - bool pucch_spatial_relation_info_id_v1610_present = false; - bool pucch_pathloss_ref_rs_id_v1610_present = false; - uint8_t pucch_spatial_relation_info_id_v1610 = 9; - uint8_t pucch_pathloss_ref_rs_id_v1610 = 4; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PUSCH-PathlossReferenceRS ::= SEQUENCE -struct pusch_pathloss_ref_rs_s { - struct ref_sig_c_ { - struct types_opts { - enum options { ssb_idx, csi_rs_idx, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::ssb_idx, type_, "referenceSignal"); - return c.get(); - } - uint8_t& csi_rs_idx() - { - assert_choice_type(types::csi_rs_idx, type_, "referenceSignal"); - return c.get(); - } - const uint8_t& ssb_idx() const - { - assert_choice_type(types::ssb_idx, type_, "referenceSignal"); - return c.get(); - } - const uint8_t& csi_rs_idx() const - { - assert_choice_type(types::csi_rs_idx, type_, "referenceSignal"); - return c.get(); - } - uint8_t& set_ssb_idx(); - uint8_t& set_csi_rs_idx(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - uint8_t pusch_pathloss_ref_rs_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; -}; - -// PUSCH-PathlossReferenceRS-r16 ::= SEQUENCE -struct pusch_pathloss_ref_rs_r16_s { - struct ref_sig_r16_c_ { - struct types_opts { - enum options { ssb_idx_r16, csi_rs_idx_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - ref_sig_r16_c_() = default; - ref_sig_r16_c_(const ref_sig_r16_c_& other); - ref_sig_r16_c_& operator=(const ref_sig_r16_c_& other); - ~ref_sig_r16_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_r16() - { - assert_choice_type(types::ssb_idx_r16, type_, "referenceSignal-r16"); - return c.get(); - } - uint8_t& csi_rs_idx_r16() - { - assert_choice_type(types::csi_rs_idx_r16, type_, "referenceSignal-r16"); - return c.get(); - } - const uint8_t& ssb_idx_r16() const - { - assert_choice_type(types::ssb_idx_r16, type_, "referenceSignal-r16"); - return c.get(); - } - const uint8_t& csi_rs_idx_r16() const - { - assert_choice_type(types::csi_rs_idx_r16, type_, "referenceSignal-r16"); - return c.get(); - } - uint8_t& set_ssb_idx_r16(); - uint8_t& set_csi_rs_idx_r16(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - uint8_t pusch_pathloss_ref_rs_id_r16 = 4; - ref_sig_r16_c_ ref_sig_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PUSCH-TimeDomainResourceAllocation-r16 ::= SEQUENCE -struct pusch_time_domain_res_alloc_r16_s { - using pusch_alloc_list_r16_l_ = dyn_array; - - // member variables - bool ext = false; - bool k2_r16_present = false; - uint8_t k2_r16 = 0; - pusch_alloc_list_r16_l_ pusch_alloc_list_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PathlossReferenceRSList-r16 ::= SEQUENCE (SIZE (1..64)) OF PathlossReferenceRS-r16 -using pathloss_ref_rs_list_r16_l = dyn_array; - -// SPS-PUCCH-AN-List-r16 ::= SEQUENCE (SIZE (1..4)) OF SPS-PUCCH-AN-r16 -using sps_pucch_an_list_r16_l = dyn_array; - -// 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using sri_pusch_closed_loop_idx_e_ = enumerated; - - // 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; - - // 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; - - const char* to_string() const; - }; - using types = enumerated; - - // 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 - uint8_t& sl2() - { - assert_choice_type(types::sl2, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl4() - { - assert_choice_type(types::sl4, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl5() - { - assert_choice_type(types::sl5, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl8() - { - assert_choice_type(types::sl8, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl10() - { - assert_choice_type(types::sl10, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl16() - { - assert_choice_type(types::sl16, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl20() - { - assert_choice_type(types::sl20, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl40() - { - assert_choice_type(types::sl40, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl80() - { - assert_choice_type(types::sl80, type_, "periodicityAndOffset"); - return c.get(); - } - uint8_t& sl160() - { - assert_choice_type(types::sl160, type_, "periodicityAndOffset"); - return c.get(); - } - uint16_t& sl320() - { - assert_choice_type(types::sl320, type_, "periodicityAndOffset"); - return c.get(); - } - uint16_t& sl640() - { - assert_choice_type(types::sl640, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl2() const - { - assert_choice_type(types::sl2, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl4() const - { - assert_choice_type(types::sl4, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl5() const - { - assert_choice_type(types::sl5, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl8() const - { - assert_choice_type(types::sl8, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl10() const - { - assert_choice_type(types::sl10, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl16() const - { - assert_choice_type(types::sl16, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl20() const - { - assert_choice_type(types::sl20, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl40() const - { - assert_choice_type(types::sl40, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl80() const - { - assert_choice_type(types::sl80, type_, "periodicityAndOffset"); - return c.get(); - } - const uint8_t& sl160() const - { - assert_choice_type(types::sl160, type_, "periodicityAndOffset"); - return c.get(); - } - const uint16_t& sl320() const - { - assert_choice_type(types::sl320, type_, "periodicityAndOffset"); - return c.get(); - } - const uint16_t& sl640() const - { - assert_choice_type(types::sl640, type_, "periodicityAndOffset"); - return c.get(); - } - void set_sym2(); - void set_sym6or7(); - void set_sl1(); - uint8_t& set_sl2(); - uint8_t& set_sl4(); - uint8_t& set_sl5(); - uint8_t& set_sl8(); - uint8_t& set_sl10(); - uint8_t& set_sl16(); - uint8_t& set_sl20(); - uint8_t& set_sl40(); - uint8_t& set_sl80(); - uint8_t& set_sl160(); - uint16_t& set_sl320(); - uint16_t& set_sl640(); - - private: - types type_; - pod_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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SchedulingRequestResourceConfigExt-v1610 ::= SEQUENCE -struct sched_request_res_cfg_ext_v1610_s { - struct phy_prio_idx_r16_opts { - enum options { p0, p1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using phy_prio_idx_r16_e_ = enumerated; - - // member variables - bool ext = false; - bool phy_prio_idx_r16_present = false; - phy_prio_idx_r16_e_ phy_prio_idx_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SchedulingRequestResourceConfigExt-v1700 ::= SEQUENCE -struct sched_request_res_cfg_ext_v1700_s { - struct periodicity_and_offset_r17_c_ { - struct types_opts { - enum options { sl1280, sl2560, sl5120, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - periodicity_and_offset_r17_c_() = default; - periodicity_and_offset_r17_c_(const periodicity_and_offset_r17_c_& other); - periodicity_and_offset_r17_c_& operator=(const periodicity_and_offset_r17_c_& other); - ~periodicity_and_offset_r17_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& sl1280() - { - assert_choice_type(types::sl1280, type_, "periodicityAndOffset-r17"); - return c.get(); - } - uint16_t& sl2560() - { - assert_choice_type(types::sl2560, type_, "periodicityAndOffset-r17"); - return c.get(); - } - uint16_t& sl5120() - { - assert_choice_type(types::sl5120, type_, "periodicityAndOffset-r17"); - return c.get(); - } - const uint16_t& sl1280() const - { - assert_choice_type(types::sl1280, type_, "periodicityAndOffset-r17"); - return c.get(); - } - const uint16_t& sl2560() const - { - assert_choice_type(types::sl2560, type_, "periodicityAndOffset-r17"); - return c.get(); - } - const uint16_t& sl5120() const - { - assert_choice_type(types::sl5120, type_, "periodicityAndOffset-r17"); - return c.get(); - } - uint16_t& set_sl1280(); - uint16_t& set_sl2560(); - uint16_t& set_sl5120(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool periodicity_and_offset_r17_present = false; - periodicity_and_offset_r17_c_ periodicity_and_offset_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UCI-OnPUSCH ::= SEQUENCE -struct uci_on_pusch_s { - struct beta_offsets_c_ { - using dyn_l_ = std::array; - struct types_opts { - enum options { dyn, semi_static, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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_(); } - 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_l_& dyn() - { - assert_choice_type(types::dyn, type_, "betaOffsets"); - return c.get(); - } - beta_offsets_s& semi_static() - { - assert_choice_type(types::semi_static, type_, "betaOffsets"); - return c.get(); - } - const dyn_l_& dyn() const - { - assert_choice_type(types::dyn, type_, "betaOffsets"); - return c.get(); - } - const beta_offsets_s& semi_static() const - { - assert_choice_type(types::semi_static, type_, "betaOffsets"); - return c.get(); - } - dyn_l_& set_dyn(); - beta_offsets_s& set_semi_static(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct scaling_opts { - enum options { f0p5, f0p65, f0p8, f1, nulltype } value; - - const char* to_string() const; - }; - using scaling_e_ = enumerated; - - // 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; -}; - -// UCI-OnPUSCH-DCI-0-2-r16 ::= SEQUENCE -struct uci_on_pusch_dci_0_2_r16_s { - struct beta_offsets_dci_0_2_r16_c_ { - struct dyn_dci_0_2_r16_c_ { - using one_bit_r16_l_ = std::array; - using two_bits_r16_l_ = std::array; - struct types_opts { - enum options { one_bit_r16, two_bits_r16, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - dyn_dci_0_2_r16_c_() = default; - dyn_dci_0_2_r16_c_(const dyn_dci_0_2_r16_c_& other); - dyn_dci_0_2_r16_c_& operator=(const dyn_dci_0_2_r16_c_& other); - ~dyn_dci_0_2_r16_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 - one_bit_r16_l_& one_bit_r16() - { - assert_choice_type(types::one_bit_r16, type_, "dynamicDCI-0-2-r16"); - return c.get(); - } - two_bits_r16_l_& two_bits_r16() - { - assert_choice_type(types::two_bits_r16, type_, "dynamicDCI-0-2-r16"); - return c.get(); - } - const one_bit_r16_l_& one_bit_r16() const - { - assert_choice_type(types::one_bit_r16, type_, "dynamicDCI-0-2-r16"); - return c.get(); - } - const two_bits_r16_l_& two_bits_r16() const - { - assert_choice_type(types::two_bits_r16, type_, "dynamicDCI-0-2-r16"); - return c.get(); - } - one_bit_r16_l_& set_one_bit_r16(); - two_bits_r16_l_& set_two_bits_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct types_opts { - enum options { dyn_dci_0_2_r16, semi_static_dci_0_2_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - beta_offsets_dci_0_2_r16_c_() = default; - beta_offsets_dci_0_2_r16_c_(const beta_offsets_dci_0_2_r16_c_& other); - beta_offsets_dci_0_2_r16_c_& operator=(const beta_offsets_dci_0_2_r16_c_& other); - ~beta_offsets_dci_0_2_r16_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_dci_0_2_r16_c_& dyn_dci_0_2_r16() - { - assert_choice_type(types::dyn_dci_0_2_r16, type_, "betaOffsetsDCI-0-2-r16"); - return c.get(); - } - beta_offsets_s& semi_static_dci_0_2_r16() - { - assert_choice_type(types::semi_static_dci_0_2_r16, type_, "betaOffsetsDCI-0-2-r16"); - return c.get(); - } - const dyn_dci_0_2_r16_c_& dyn_dci_0_2_r16() const - { - assert_choice_type(types::dyn_dci_0_2_r16, type_, "betaOffsetsDCI-0-2-r16"); - return c.get(); - } - const beta_offsets_s& semi_static_dci_0_2_r16() const - { - assert_choice_type(types::semi_static_dci_0_2_r16, type_, "betaOffsetsDCI-0-2-r16"); - return c.get(); - } - dyn_dci_0_2_r16_c_& set_dyn_dci_0_2_r16(); - beta_offsets_s& set_semi_static_dci_0_2_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct scaling_dci_0_2_r16_opts { - enum options { f0p5, f0p65, f0p8, f1, nulltype } value; - - const char* to_string() const; - }; - using scaling_dci_0_2_r16_e_ = enumerated; - - // member variables - bool beta_offsets_dci_0_2_r16_present = false; - beta_offsets_dci_0_2_r16_c_ beta_offsets_dci_0_2_r16; - scaling_dci_0_2_r16_e_ scaling_dci_0_2_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UL-AccessConfigListDCI-1-1-r16 ::= SEQUENCE (SIZE (1..16)) OF INTEGER (0..15) -using ul_access_cfg_list_dci_1_1_r16_l = bounded_array; - -// UL-AccessConfigListDCI-1-1-r17 ::= SEQUENCE (SIZE (1..3)) OF INTEGER (0..2) -using ul_access_cfg_list_dci_1_1_r17_l = bounded_array; - -// UL-AccessConfigListDCI-1-2-r17 ::= SEQUENCE (SIZE (1..16)) OF INTEGER (0..15) -using ul_access_cfg_list_dci_1_2_r17_l = bounded_array; - -// BetaOffsetsCrossPriSel-r17 ::= CHOICE -struct beta_offsets_cross_pri_sel_r17_c { - using dyn_r17_l_ = std::array; - struct types_opts { - enum options { dyn_r17, semi_static_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - beta_offsets_cross_pri_sel_r17_c() = default; - beta_offsets_cross_pri_sel_r17_c(const beta_offsets_cross_pri_sel_r17_c& other); - beta_offsets_cross_pri_sel_r17_c& operator=(const beta_offsets_cross_pri_sel_r17_c& other); - ~beta_offsets_cross_pri_sel_r17_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_r17_l_& dyn_r17() - { - assert_choice_type(types::dyn_r17, type_, "BetaOffsetsCrossPriSel-r17"); - return c.get(); - } - beta_offsets_cross_pri_r17_l& semi_static_r17() - { - assert_choice_type(types::semi_static_r17, type_, "BetaOffsetsCrossPriSel-r17"); - return c.get(); - } - const dyn_r17_l_& dyn_r17() const - { - assert_choice_type(types::dyn_r17, type_, "BetaOffsetsCrossPriSel-r17"); - return c.get(); - } - const beta_offsets_cross_pri_r17_l& semi_static_r17() const - { - assert_choice_type(types::semi_static_r17, type_, "BetaOffsetsCrossPriSel-r17"); - return c.get(); - } - dyn_r17_l_& set_dyn_r17(); - beta_offsets_cross_pri_r17_l& set_semi_static_r17(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// BetaOffsetsCrossPriSelDCI-0-2-r17 ::= CHOICE -struct beta_offsets_cross_pri_sel_dci_0_2_r17_c { - struct dyn_dci_0_2_r17_c_ { - using one_bit_r17_l_ = std::array; - using two_bits_r17_l_ = std::array; - struct types_opts { - enum options { one_bit_r17, two_bits_r17, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - dyn_dci_0_2_r17_c_() = default; - dyn_dci_0_2_r17_c_(const dyn_dci_0_2_r17_c_& other); - dyn_dci_0_2_r17_c_& operator=(const dyn_dci_0_2_r17_c_& other); - ~dyn_dci_0_2_r17_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 - one_bit_r17_l_& one_bit_r17() - { - assert_choice_type(types::one_bit_r17, type_, "dynamicDCI-0-2-r17"); - return c.get(); - } - two_bits_r17_l_& two_bits_r17() - { - assert_choice_type(types::two_bits_r17, type_, "dynamicDCI-0-2-r17"); - return c.get(); - } - const one_bit_r17_l_& one_bit_r17() const - { - assert_choice_type(types::one_bit_r17, type_, "dynamicDCI-0-2-r17"); - return c.get(); - } - const two_bits_r17_l_& two_bits_r17() const - { - assert_choice_type(types::two_bits_r17, type_, "dynamicDCI-0-2-r17"); - return c.get(); - } - one_bit_r17_l_& set_one_bit_r17(); - two_bits_r17_l_& set_two_bits_r17(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct types_opts { - enum options { dyn_dci_0_2_r17, semi_static_dci_0_2_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - beta_offsets_cross_pri_sel_dci_0_2_r17_c() = default; - beta_offsets_cross_pri_sel_dci_0_2_r17_c(const beta_offsets_cross_pri_sel_dci_0_2_r17_c& other); - beta_offsets_cross_pri_sel_dci_0_2_r17_c& operator=(const beta_offsets_cross_pri_sel_dci_0_2_r17_c& other); - ~beta_offsets_cross_pri_sel_dci_0_2_r17_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_dci_0_2_r17_c_& dyn_dci_0_2_r17() - { - assert_choice_type(types::dyn_dci_0_2_r17, type_, "BetaOffsetsCrossPriSelDCI-0-2-r17"); - return c.get(); - } - beta_offsets_cross_pri_r17_l& semi_static_dci_0_2_r17() - { - assert_choice_type(types::semi_static_dci_0_2_r17, type_, "BetaOffsetsCrossPriSelDCI-0-2-r17"); - return c.get(); - } - const dyn_dci_0_2_r17_c_& dyn_dci_0_2_r17() const - { - assert_choice_type(types::dyn_dci_0_2_r17, type_, "BetaOffsetsCrossPriSelDCI-0-2-r17"); - return c.get(); - } - const beta_offsets_cross_pri_r17_l& semi_static_dci_0_2_r17() const - { - assert_choice_type(types::semi_static_dci_0_2_r17, type_, "BetaOffsetsCrossPriSelDCI-0-2-r17"); - return c.get(); - } - dyn_dci_0_2_r17_c_& set_dyn_dci_0_2_r17(); - beta_offsets_cross_pri_r17_l& set_semi_static_dci_0_2_r17(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// CandidateBeamRSListExt-r16 ::= SEQUENCE (SIZE (1..48)) OF PRACH-ResourceDedicatedBFR -using candidate_beam_rs_list_ext_r16_l = dyn_array; - -// ConfiguredGrantConfig ::= SEQUENCE -struct cfg_grant_cfg_s { - struct freq_hop_opts { - enum options { intra_slot, inter_slot, nulltype } value; - - const char* to_string() const; - }; - using freq_hop_e_ = enumerated; - struct mcs_table_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using mcs_table_e_ = enumerated; - struct mcs_table_transform_precoder_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using mcs_table_transform_precoder_e_ = enumerated; - struct res_alloc_opts { - enum options { res_alloc_type0, res_alloc_type1, dyn_switch, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using res_alloc_e_ = enumerated; - struct pwr_ctrl_loop_to_use_opts { - enum options { n0, n1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pwr_ctrl_loop_to_use_e_ = enumerated; - struct transform_precoder_opts { - enum options { enabled, disabled, nulltype } value; - - const char* to_string() const; - }; - using transform_precoder_e_ = enumerated; - struct rep_k_opts { - enum options { n1, n2, n4, n8, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using rep_k_e_ = enumerated; - struct rep_k_rv_opts { - enum options { s1_neg0231, s2_neg0303, s3_neg0000, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using rep_k_rv_e_ = enumerated; - 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; - - const char* to_string() const; - }; - using periodicity_e_ = enumerated; - struct rrc_cfg_ul_grant_s_ { - struct pusch_rep_type_ind_r16_opts { - enum options { pusch_rep_type_a, pusch_rep_type_b, nulltype } value; - - const char* to_string() const; - }; - using pusch_rep_type_ind_r16_e_ = enumerated; - struct freq_hop_pusch_rep_type_b_r16_opts { - enum options { inter_repeat, inter_slot, nulltype } value; - - const char* to_string() const; - }; - using freq_hop_pusch_rep_type_b_r16_e_ = enumerated; - - // member variables - 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; - // ... - // group 0 - bool pusch_rep_type_ind_r16_present = false; - bool freq_hop_pusch_rep_type_b_r16_present = false; - bool time_ref_sfn_r16_present = false; - pusch_rep_type_ind_r16_e_ pusch_rep_type_ind_r16; - freq_hop_pusch_rep_type_b_r16_e_ freq_hop_pusch_rep_type_b_r16; - // group 1 - bool pathloss_ref_idx2_r17_present = false; - bool srs_res_ind2_r17_present = false; - bool precoding_and_nof_layers2_r17_present = false; - bool time_domain_alloc_v1710_present = false; - bool time_domain_offset_r17_present = false; - uint8_t pathloss_ref_idx2_r17 = 0; - uint8_t srs_res_ind2_r17 = 0; - uint8_t precoding_and_nof_layers2_r17 = 0; - uint8_t time_domain_alloc_v1710 = 16; - uint16_t time_domain_offset_r17 = 0; - copy_ptr cg_sdt_cfg_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - }; - struct cg_min_dfi_delay_r16_opts { - enum options { - sym7, - sym1x14, - sym2x14, - sym3x14, - sym4x14, - sym5x14, - sym6x14, - sym7x14, - sym8x14, - sym9x14, - sym10x14, - sym11x14, - sym12x14, - sym13x14, - sym14x14, - sym15x14, - sym16x14, - nulltype - } value; - - const char* to_string() const; - }; - using cg_min_dfi_delay_r16_e_ = enumerated; - using cg_cot_sharing_list_r16_l_ = dyn_array; - struct start_from_rv0_r16_opts { - enum options { on, off, nulltype } value; - - const char* to_string() const; - }; - using start_from_rv0_r16_e_ = enumerated; - struct phy_prio_idx_r16_opts { - enum options { p0, p1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using phy_prio_idx_r16_e_ = enumerated; - struct map_pattern_r17_opts { - enum options { cyclic_map, sequential_map, nulltype } value; - - const char* to_string() const; - }; - using map_pattern_r17_e_ = enumerated; - struct pwr_ctrl_loop_to_use2_r17_opts { - enum options { n0, n1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pwr_ctrl_loop_to_use2_r17_e_ = enumerated; - using cg_cot_sharing_list_r17_l_ = dyn_array; - struct rep_k_v1710_opts { - enum options { n12, n16, n24, n32, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using rep_k_v1710_e_ = enumerated; - - // 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 cfg_grant_timer_present = false; - bool rrc_cfg_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 cfg_grant_timer = 1; - rrc_cfg_ul_grant_s_ rrc_cfg_ul_grant; - // ... - // group 0 - bool cg_retx_timer_r16_present = false; - bool cg_min_dfi_delay_r16_present = false; - bool cg_nrof_pusch_in_slot_r16_present = false; - bool cg_nrof_slots_r16_present = false; - bool cg_uci_mux_r16_present = false; - bool cg_cot_sharing_offset_r16_present = false; - bool beta_offset_cg_uci_r16_present = false; - bool harq_proc_id_offset_r16_present = false; - bool harq_proc_id_offset2_r16_present = false; - bool cfg_grant_cfg_idx_r16_present = false; - bool cfg_grant_cfg_idx_mac_r16_present = false; - bool periodicity_ext_r16_present = false; - bool start_from_rv0_r16_present = false; - bool phy_prio_idx_r16_present = false; - bool autonomous_tx_r16_present = false; - uint8_t cg_retx_timer_r16 = 1; - cg_min_dfi_delay_r16_e_ cg_min_dfi_delay_r16; - uint8_t cg_nrof_pusch_in_slot_r16 = 1; - uint8_t cg_nrof_slots_r16 = 1; - copy_ptr cg_start_offsets_r16; - uint8_t cg_cot_sharing_offset_r16 = 1; - uint8_t beta_offset_cg_uci_r16 = 0; - copy_ptr cg_cot_sharing_list_r16; - uint8_t harq_proc_id_offset_r16 = 0; - uint8_t harq_proc_id_offset2_r16 = 0; - uint8_t cfg_grant_cfg_idx_r16 = 0; - uint8_t cfg_grant_cfg_idx_mac_r16 = 0; - uint16_t periodicity_ext_r16 = 1; - start_from_rv0_r16_e_ start_from_rv0_r16; - phy_prio_idx_r16_e_ phy_prio_idx_r16; - // group 1 - bool map_pattern_r17_present = false; - bool seq_offset_for_rv_r17_present = false; - bool p0_pusch_alpha2_r17_present = false; - bool pwr_ctrl_loop_to_use2_r17_present = false; - bool periodicity_ext_r17_present = false; - bool rep_k_v1710_present = false; - bool nrof_harq_processes_v1700_present = false; - bool harq_proc_id_offset2_v1700_present = false; - bool cfg_grant_timer_v1700_present = false; - bool cg_min_dfi_delay_v1710_present = false; - copy_ptr> cg_beta_offsets_cross_pri0_r17; - copy_ptr> cg_beta_offsets_cross_pri1_r17; - map_pattern_r17_e_ map_pattern_r17; - uint8_t seq_offset_for_rv_r17 = 0; - uint8_t p0_pusch_alpha2_r17 = 0; - pwr_ctrl_loop_to_use2_r17_e_ pwr_ctrl_loop_to_use2_r17; - copy_ptr cg_cot_sharing_list_r17; - uint16_t periodicity_ext_r17 = 1; - rep_k_v1710_e_ rep_k_v1710; - uint8_t nrof_harq_processes_v1700 = 17; - uint8_t harq_proc_id_offset2_v1700 = 16; - uint16_t cfg_grant_timer_v1700 = 33; - uint16_t cg_min_dfi_delay_v1710 = 238; - // group 2 - bool harq_proc_id_offset_v1730_present = false; - bool cg_nrof_slots_r17_present = false; - uint8_t harq_proc_id_offset_v1730 = 16; - uint16_t cg_nrof_slots_r17 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ConfiguredGrantConfigType2DeactivationState-r16 ::= SEQUENCE (SIZE (1..12)) OF INTEGER (0..11) -using cfg_grant_cfg_type2_deactivation_state_r16_l = bounded_array; - -// DMRS-BundlingPUSCH-Config-r17 ::= SEQUENCE -struct dmrs_bundling_pusch_cfg_r17_s { - struct pusch_freq_hop_interv_r17_opts { - enum options { s2, s4, s5, s6, s8, s10, s12, s14, s16, s20, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using pusch_freq_hop_interv_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool pusch_dmrs_bundling_r17_present = false; - bool pusch_time_domain_win_len_r17_present = false; - bool pusch_win_restart_r17_present = false; - bool pusch_freq_hop_interv_r17_present = false; - uint8_t pusch_time_domain_win_len_r17 = 2; - pusch_freq_hop_interv_r17_e_ pusch_freq_hop_interv_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FrequencyHoppingOffsetListsDCI-0-2-r16 ::= SEQUENCE (SIZE (1..4)) OF INTEGER (1..274) -using freq_hop_offset_lists_dci_0_2_r16_l = bounded_array; - -// InvalidSymbolPattern-r16 ::= SEQUENCE -struct invalid_symbol_pattern_r16_s { - struct symbols_r16_c_ { - struct types_opts { - enum options { one_slot, two_slots, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - symbols_r16_c_() = default; - symbols_r16_c_(const symbols_r16_c_& other); - symbols_r16_c_& operator=(const symbols_r16_c_& other); - ~symbols_r16_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(types::one_slot, type_, "symbols-r16"); - return c.get>(); - } - fixed_bitstring<28>& two_slots() - { - assert_choice_type(types::two_slots, type_, "symbols-r16"); - return c.get>(); - } - const fixed_bitstring<14>& one_slot() const - { - assert_choice_type(types::one_slot, type_, "symbols-r16"); - return c.get>(); - } - const fixed_bitstring<28>& two_slots() const - { - assert_choice_type(types::two_slots, type_, "symbols-r16"); - return c.get>(); - } - fixed_bitstring<14>& set_one_slot(); - fixed_bitstring<28>& set_two_slots(); - - private: - types type_; - choice_buffer_t> c; - - void destroy_(); - }; - struct periodicity_and_pattern_r16_c_ { - struct types_opts { - enum options { n2, n4, n5, n8, n10, n20, n40, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - periodicity_and_pattern_r16_c_() = default; - periodicity_and_pattern_r16_c_(const periodicity_and_pattern_r16_c_& other); - periodicity_and_pattern_r16_c_& operator=(const periodicity_and_pattern_r16_c_& other); - ~periodicity_and_pattern_r16_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(types::n2, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - fixed_bitstring<4>& n4() - { - assert_choice_type(types::n4, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - fixed_bitstring<5>& n5() - { - assert_choice_type(types::n5, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - fixed_bitstring<8>& n8() - { - assert_choice_type(types::n8, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - fixed_bitstring<10>& n10() - { - assert_choice_type(types::n10, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - fixed_bitstring<20>& n20() - { - assert_choice_type(types::n20, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - fixed_bitstring<40>& n40() - { - assert_choice_type(types::n40, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - const fixed_bitstring<2>& n2() const - { - assert_choice_type(types::n2, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - const fixed_bitstring<4>& n4() const - { - assert_choice_type(types::n4, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - const fixed_bitstring<5>& n5() const - { - assert_choice_type(types::n5, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - const fixed_bitstring<8>& n8() const - { - assert_choice_type(types::n8, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - const fixed_bitstring<10>& n10() const - { - assert_choice_type(types::n10, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - const fixed_bitstring<20>& n20() const - { - assert_choice_type(types::n20, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - const fixed_bitstring<40>& n40() const - { - assert_choice_type(types::n40, type_, "periodicityAndPattern-r16"); - return c.get>(); - } - fixed_bitstring<2>& set_n2(); - fixed_bitstring<4>& set_n4(); - fixed_bitstring<5>& set_n5(); - fixed_bitstring<8>& set_n8(); - fixed_bitstring<10>& set_n10(); - fixed_bitstring<20>& set_n20(); - fixed_bitstring<40>& set_n40(); - - private: - types type_; - choice_buffer_t> c; - - void destroy_(); - }; - - // member variables - bool ext = false; - bool periodicity_and_pattern_r16_present = false; - symbols_r16_c_ symbols_r16; - periodicity_and_pattern_r16_c_ periodicity_and_pattern_r16; +// SubgroupConfig-r17 ::= SEQUENCE +struct subgroup_cfg_r17_s { + bool ext = false; + bool subgroups_num_for_ue_id_r17_present = false; + uint8_t subgroups_num_per_po_r17 = 1; + uint8_t subgroups_num_for_ue_id_r17 = 1; // ... - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MPE-Resource-r17 ::= SEQUENCE -struct mpe_res_r17_s { - struct mpe_ref_sig_r17_c_ { - struct types_opts { - enum options { csi_rs_res_r17, ssb_res_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - mpe_ref_sig_r17_c_() = default; - mpe_ref_sig_r17_c_(const mpe_ref_sig_r17_c_& other); - mpe_ref_sig_r17_c_& operator=(const mpe_ref_sig_r17_c_& other); - ~mpe_ref_sig_r17_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_res_r17() - { - assert_choice_type(types::csi_rs_res_r17, type_, "mpe-ReferenceSignal-r17"); - return c.get(); - } - uint8_t& ssb_res_r17() - { - assert_choice_type(types::ssb_res_r17, type_, "mpe-ReferenceSignal-r17"); - return c.get(); - } - const uint8_t& csi_rs_res_r17() const - { - assert_choice_type(types::csi_rs_res_r17, type_, "mpe-ReferenceSignal-r17"); - return c.get(); - } - const uint8_t& ssb_res_r17() const - { - assert_choice_type(types::ssb_res_r17, type_, "mpe-ReferenceSignal-r17"); - return c.get(); - } - uint8_t& set_csi_rs_res_r17(); - uint8_t& set_ssb_res_r17(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool cell_r17_present = false; - bool add_pci_r17_present = false; - uint8_t mpe_res_id_r17 = 1; - uint8_t cell_r17 = 0; - uint8_t add_pci_r17 = 1; - mpe_ref_sig_r17_c_ mpe_ref_sig_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MinSchedulingOffsetK2-Values-r16 ::= SEQUENCE (SIZE (1..2)) OF INTEGER (0..16) -using min_sched_offset_k2_values_r16_l = bounded_array; - -// MinSchedulingOffsetK2-Values-r17 ::= SEQUENCE (SIZE (1..2)) OF INTEGER (0..64) -using min_sched_offset_k2_values_r17_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; - using res_to_add_mod_list_ext_v1610_l_ = dyn_array; - struct subslot_len_for_pucch_r16_c_ { - struct normal_cp_r16_opts { - enum options { n2, n7, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using normal_cp_r16_e_ = enumerated; - struct extended_cp_r16_opts { - enum options { n2, n6, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using extended_cp_r16_e_ = enumerated; - struct types_opts { - enum options { normal_cp_r16, extended_cp_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - subslot_len_for_pucch_r16_c_() = default; - subslot_len_for_pucch_r16_c_(const subslot_len_for_pucch_r16_c_& other); - subslot_len_for_pucch_r16_c_& operator=(const subslot_len_for_pucch_r16_c_& other); - ~subslot_len_for_pucch_r16_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 - normal_cp_r16_e_& normal_cp_r16() - { - assert_choice_type(types::normal_cp_r16, type_, "subslotLengthForPUCCH-r16"); - return c.get(); - } - extended_cp_r16_e_& extended_cp_r16() - { - assert_choice_type(types::extended_cp_r16, type_, "subslotLengthForPUCCH-r16"); - return c.get(); - } - const normal_cp_r16_e_& normal_cp_r16() const - { - assert_choice_type(types::normal_cp_r16, type_, "subslotLengthForPUCCH-r16"); - return c.get(); - } - const extended_cp_r16_e_& extended_cp_r16() const - { - assert_choice_type(types::extended_cp_r16, type_, "subslotLengthForPUCCH-r16"); - return c.get(); - } - normal_cp_r16_e_& set_normal_cp_r16(); - extended_cp_r16_e_& set_extended_cp_r16(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - using spatial_relation_info_to_add_mod_list_size_ext_v1610_l_ = dyn_array; - using spatial_relation_info_to_release_list_size_ext_v1610_l_ = dyn_array; - using spatial_relation_info_to_add_mod_list_ext_v1610_l_ = dyn_array; - using spatial_relation_info_to_release_list_ext_v1610_l_ = dyn_array; - using res_group_to_add_mod_list_r16_l_ = dyn_array; - using res_group_to_release_list_r16_l_ = bounded_array; - using sched_request_res_to_add_mod_list_ext_v1610_l_ = dyn_array; - struct map_pattern_r17_opts { - enum options { cyclic_map, sequential_map, nulltype } value; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BCCH-Config ::= SEQUENCE +struct bcch_cfg_s { + struct mod_period_coeff_opts { + enum options { n2, n4, n8, n16, nulltype } value; + typedef uint8_t number_type; const char* to_string() const; + uint8_t to_number() const; }; - using map_pattern_r17_e_ = enumerated; - using pwr_ctrl_set_info_to_add_mod_list_r17_l_ = dyn_array; - using pwr_ctrl_set_info_to_release_list_r17_l_ = bounded_array; - using sched_request_res_to_add_mod_list_ext_v1700_l_ = dyn_array; + using mod_period_coeff_e_ = enumerated; // member variables - bool ext = false; - bool format1_present = false; - bool format2_present = false; - bool format3_present = false; - bool format4_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 ext = false; + mod_period_coeff_e_ mod_period_coeff; // ... - // group 0 - bool nof_bits_for_pucch_res_ind_dci_1_2_r16_present = false; - bool dmrs_ul_transform_precoding_pucch_r16_present = false; - copy_ptr res_to_add_mod_list_ext_v1610; - copy_ptr, 1, 8>>> dl_data_to_ul_ack_r16; - copy_ptr, 1, 16>>> ul_access_cfg_list_dci_1_1_r16; - copy_ptr subslot_len_for_pucch_r16; - copy_ptr, 1, 8>>> dl_data_to_ul_ack_dci_1_2_r16; - uint8_t nof_bits_for_pucch_res_ind_dci_1_2_r16 = 0; - copy_ptr - spatial_relation_info_to_add_mod_list_size_ext_v1610; - copy_ptr - spatial_relation_info_to_release_list_size_ext_v1610; - copy_ptr spatial_relation_info_to_add_mod_list_ext_v1610; - copy_ptr spatial_relation_info_to_release_list_ext_v1610; - copy_ptr res_group_to_add_mod_list_r16; - copy_ptr res_group_to_release_list_r16; - copy_ptr>> sps_pucch_an_list_r16; - copy_ptr sched_request_res_to_add_mod_list_ext_v1610; - // group 1 - bool map_pattern_r17_present = false; - bool second_tpc_field_dci_1_1_r17_present = false; - bool second_tpc_field_dci_1_2_r17_present = false; - copy_ptr> format0_r17; - copy_ptr> format2_ext_r17; - copy_ptr> format3_ext_r17; - copy_ptr> format4_ext_r17; - copy_ptr, 1, 16>>> ul_access_cfg_list_dci_1_2_r17; - map_pattern_r17_e_ map_pattern_r17; - copy_ptr pwr_ctrl_set_info_to_add_mod_list_r17; - copy_ptr pwr_ctrl_set_info_to_release_list_r17; - copy_ptr, 1, 8>>> dl_data_to_ul_ack_r17; - copy_ptr, 1, 8>>> dl_data_to_ul_ack_dci_1_2_r17; - copy_ptr, 1, 3>>> ul_access_cfg_list_dci_1_1_r17; - copy_ptr sched_request_res_to_add_mod_list_ext_v1700; - copy_ptr> dmrs_bundling_pucch_cfg_r17; - copy_ptr, 1, 8>>> dl_data_to_ul_ack_v1700; - copy_ptr, 1, 8>>> dl_data_to_ul_ack_multicast_dci_format4_1_r17; - copy_ptr>> sps_pucch_an_list_multicast_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -10401,27 +287,14 @@ struct pucch_cfg_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; +// FrequencyInfoDL-SIB ::= SEQUENCE +struct freq_info_dl_sib_s { + using scs_specific_carrier_list_l_ = dyn_array; // member variables - bool tpc_accumulation_present = false; - bool msg3_alpha_present = false; - bool p0_nominal_without_grant_present = false; - bool two_pusch_pc_adjustment_states_present = false; - bool delta_mcs_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; + multi_freq_band_list_nr_sib_l freq_band_list; + uint16_t offset_to_point_a = 0; + scs_specific_carrier_list_l_ scs_specific_carrier_list; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -10429,35 +302,20 @@ struct pusch_pwr_ctrl_s { void to_json(json_writer& j) const; }; -// PUSCH-PowerControl-v1610 ::= SEQUENCE -struct pusch_pwr_ctrl_v1610_s { - using pathloss_ref_rs_to_add_mod_list_size_ext_v1610_l_ = dyn_array; - using pathloss_ref_rs_to_release_list_size_ext_v1610_l_ = dyn_array; - using p0_pusch_set_list_r16_l_ = dyn_array; - struct olpc_param_set_s_ { - bool olpc_param_set_dci_0_1_r16_present = false; - bool olpc_param_set_dci_0_2_r16_present = false; - uint8_t olpc_param_set_dci_0_1_r16 = 1; - uint8_t olpc_param_set_dci_0_2_r16 = 1; - }; - using sri_pusch_map_to_add_mod_list2_r17_l_ = dyn_array; - using sri_pusch_map_to_release_list2_r17_l_ = bounded_array; - using p0_pusch_set_list2_r17_l_ = dyn_array; - using dummy_l_ = dyn_array; +// FrequencyInfoUL-SIB ::= SEQUENCE +struct freq_info_ul_sib_s { + using scs_specific_carrier_list_l_ = dyn_array; // member variables - bool ext = false; - bool olpc_param_set_present = false; - pathloss_ref_rs_to_add_mod_list_size_ext_v1610_l_ pathloss_ref_rs_to_add_mod_list_size_ext_v1610; - pathloss_ref_rs_to_release_list_size_ext_v1610_l_ pathloss_ref_rs_to_release_list_size_ext_v1610; - p0_pusch_set_list_r16_l_ p0_pusch_set_list_r16; - olpc_param_set_s_ olpc_param_set; + bool ext = false; + bool absolute_freq_point_a_present = false; + bool p_max_present = false; + bool freq_shift7p5khz_present = false; + multi_freq_band_list_nr_sib_l freq_band_list; + uint32_t absolute_freq_point_a = 0; + scs_specific_carrier_list_l_ scs_specific_carrier_list; + int8_t p_max = -30; // ... - // group 0 - copy_ptr sri_pusch_map_to_add_mod_list2_r17; - copy_ptr sri_pusch_map_to_release_list2_r17; - copy_ptr p0_pusch_set_list2_r17; - copy_ptr dummy; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -10465,296 +323,331 @@ struct pusch_pwr_ctrl_v1610_s { void to_json(json_writer& j) const; }; -// PUSCH-TimeDomainResourceAllocationList-r16 ::= SEQUENCE (SIZE (1..64)) OF PUSCH-TimeDomainResourceAllocation-r16 -using pusch_time_domain_res_alloc_list_r16_l = dyn_array; - -// SRS-PosResourceSet-r16 ::= SEQUENCE -struct srs_pos_res_set_r16_s { - using srs_pos_res_id_list_r16_l_ = bounded_array; - struct res_type_r16_c_ { - struct aperiodic_r16_s_ { - using aperiodic_srs_res_trigger_list_r16_l_ = bounded_array; - - // member variables - bool ext = false; - aperiodic_srs_res_trigger_list_r16_l_ aperiodic_srs_res_trigger_list_r16; - // ... - }; - struct semi_persistent_r16_s_ { - bool ext = false; - // ... - }; - struct periodic_r16_s_ { - bool ext = false; - // ... - }; +// PCCH-Config ::= SEQUENCE +struct pcch_cfg_s { + struct nand_paging_frame_offset_c_ { struct types_opts { - enum options { aperiodic_r16, semi_persistent_r16, periodic_r16, nulltype } value; + enum options { one_t, half_t, quarter_t, one_eighth_t, one_sixteenth_t, nulltype } value; + typedef float number_type; const char* to_string() const; + float to_number() const; + const char* to_number_string() const; }; using types = enumerated; // choice methods - res_type_r16_c_() = default; - res_type_r16_c_(const res_type_r16_c_& other); - res_type_r16_c_& operator=(const res_type_r16_c_& other); - ~res_type_r16_c_() { destroy_(); } + nand_paging_frame_offset_c_() = default; + nand_paging_frame_offset_c_(const nand_paging_frame_offset_c_& other); + nand_paging_frame_offset_c_& operator=(const nand_paging_frame_offset_c_& other); + ~nand_paging_frame_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 - aperiodic_r16_s_& aperiodic_r16() + uint8_t& half_t() + { + assert_choice_type(types::half_t, type_, "nAndPagingFrameOffset"); + return c.get(); + } + uint8_t& quarter_t() + { + assert_choice_type(types::quarter_t, type_, "nAndPagingFrameOffset"); + return c.get(); + } + uint8_t& one_eighth_t() { - assert_choice_type(types::aperiodic_r16, type_, "resourceType-r16"); - return c.get(); + assert_choice_type(types::one_eighth_t, type_, "nAndPagingFrameOffset"); + return c.get(); } - semi_persistent_r16_s_& semi_persistent_r16() + uint8_t& one_sixteenth_t() { - assert_choice_type(types::semi_persistent_r16, type_, "resourceType-r16"); - return c.get(); + assert_choice_type(types::one_sixteenth_t, type_, "nAndPagingFrameOffset"); + return c.get(); } - periodic_r16_s_& periodic_r16() + const uint8_t& half_t() const { - assert_choice_type(types::periodic_r16, type_, "resourceType-r16"); - return c.get(); + assert_choice_type(types::half_t, type_, "nAndPagingFrameOffset"); + return c.get(); } - const aperiodic_r16_s_& aperiodic_r16() const + const uint8_t& quarter_t() const { - assert_choice_type(types::aperiodic_r16, type_, "resourceType-r16"); - return c.get(); + assert_choice_type(types::quarter_t, type_, "nAndPagingFrameOffset"); + return c.get(); } - const semi_persistent_r16_s_& semi_persistent_r16() const + const uint8_t& one_eighth_t() const { - assert_choice_type(types::semi_persistent_r16, type_, "resourceType-r16"); - return c.get(); + assert_choice_type(types::one_eighth_t, type_, "nAndPagingFrameOffset"); + return c.get(); } - const periodic_r16_s_& periodic_r16() const + const uint8_t& one_sixteenth_t() const { - assert_choice_type(types::periodic_r16, type_, "resourceType-r16"); - return c.get(); + assert_choice_type(types::one_sixteenth_t, type_, "nAndPagingFrameOffset"); + return c.get(); } - aperiodic_r16_s_& set_aperiodic_r16(); - semi_persistent_r16_s_& set_semi_persistent_r16(); - periodic_r16_s_& set_periodic_r16(); + void set_one_t(); + uint8_t& set_half_t(); + uint8_t& set_quarter_t(); + uint8_t& set_one_eighth_t(); + uint8_t& set_one_sixteenth_t(); private: - types type_; - choice_buffer_t c; + types type_; + pod_choice_buffer_t c; void destroy_(); }; - struct pathloss_ref_rs_pos_r16_c_ { + struct ns_opts { + enum options { four, two, one, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ns_e_ = enumerated; + struct first_pdcch_monitoring_occasion_of_po_c_ { + using scs15_kh_zone_t_l_ = bounded_array; + using scs30_kh_zone_t_scs15_kh_zhalf_t_l_ = bounded_array; + using scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_ = bounded_array; + using scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_ = bounded_array; + using scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_ = + bounded_array; + using scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_ = + bounded_array; + using scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_ = bounded_array; + using scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_ = bounded_array; struct types_opts { - enum options { ssb_idx_serving_r16, ssb_ncell_r16, dl_prs_r16, nulltype } value; + enum options { + scs15_kh_zone_t, + scs30_kh_zone_t_scs15_kh_zhalf_t, + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, + scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, + scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, + scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t, + nulltype + } value; const char* to_string() const; }; using types = enumerated; // choice methods - pathloss_ref_rs_pos_r16_c_() = default; - pathloss_ref_rs_pos_r16_c_(const pathloss_ref_rs_pos_r16_c_& other); - pathloss_ref_rs_pos_r16_c_& operator=(const pathloss_ref_rs_pos_r16_c_& other); - ~pathloss_ref_rs_pos_r16_c_() { destroy_(); } + first_pdcch_monitoring_occasion_of_po_c_() = default; + first_pdcch_monitoring_occasion_of_po_c_(const first_pdcch_monitoring_occasion_of_po_c_& other); + first_pdcch_monitoring_occasion_of_po_c_& operator=(const first_pdcch_monitoring_occasion_of_po_c_& other); + ~first_pdcch_monitoring_occasion_of_po_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_serving_r16() + scs15_kh_zone_t_l_& scs15_kh_zone_t() { - assert_choice_type(types::ssb_idx_serving_r16, type_, "pathlossReferenceRS-Pos-r16"); - return c.get(); + assert_choice_type(types::scs15_kh_zone_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); } - ssb_info_ncell_r16_s& ssb_ncell_r16() + scs30_kh_zone_t_scs15_kh_zhalf_t_l_& scs30_kh_zone_t_scs15_kh_zhalf_t() { - assert_choice_type(types::ssb_ncell_r16, type_, "pathlossReferenceRS-Pos-r16"); - return c.get(); + assert_choice_type(types::scs30_kh_zone_t_scs15_kh_zhalf_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); } - dl_prs_info_r16_s& dl_prs_r16() + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() { - assert_choice_type(types::dl_prs_r16, type_, "pathlossReferenceRS-Pos-r16"); - return c.get(); + assert_choice_type( + types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); } - const uint8_t& ssb_idx_serving_r16() const + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() { - assert_choice_type(types::ssb_idx_serving_r16, type_, "pathlossReferenceRS-Pos-r16"); - return c.get(); + assert_choice_type(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() + { + assert_choice_type(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& + scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() + { + assert_choice_type(types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& + scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() + { + assert_choice_type(types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t() + { + assert_choice_type( + types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs15_kh_zone_t_l_& scs15_kh_zone_t() const + { + assert_choice_type(types::scs15_kh_zone_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs30_kh_zone_t_scs15_kh_zhalf_t_l_& scs30_kh_zone_t_scs15_kh_zhalf_t() const + { + assert_choice_type(types::scs30_kh_zone_t_scs15_kh_zhalf_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() const + { + assert_choice_type( + types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() const + { + assert_choice_type(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() const + { + assert_choice_type(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); + } + const scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& + scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() const + { + assert_choice_type(types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); } - const ssb_info_ncell_r16_s& ssb_ncell_r16() const + const scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& + scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() const { - assert_choice_type(types::ssb_ncell_r16, type_, "pathlossReferenceRS-Pos-r16"); - return c.get(); + assert_choice_type(types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t, + type_, + "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); } - const dl_prs_info_r16_s& dl_prs_r16() const + const scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t() const { - assert_choice_type(types::dl_prs_r16, type_, "pathlossReferenceRS-Pos-r16"); - return c.get(); + assert_choice_type( + types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO"); + return c.get(); } - uint8_t& set_ssb_idx_serving_r16(); - ssb_info_ncell_r16_s& set_ssb_ncell_r16(); - dl_prs_info_r16_s& set_dl_prs_r16(); + scs15_kh_zone_t_l_& set_scs15_kh_zone_t(); + scs30_kh_zone_t_scs15_kh_zhalf_t_l_& set_scs30_kh_zone_t_scs15_kh_zhalf_t(); + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& set_scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t(); + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& + set_scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t(); + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& + set_scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t(); + scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& + set_scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t(); + scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& + set_scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t(); + scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& set_scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t(); private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool ext = false; - bool alpha_r16_present = false; - bool p0_r16_present = false; - bool pathloss_ref_rs_pos_r16_present = false; - uint8_t srs_pos_res_set_id_r16 = 0; - srs_pos_res_id_list_r16_l_ srs_pos_res_id_list_r16; - res_type_r16_c_ res_type_r16; - alpha_e alpha_r16; - int16_t p0_r16 = -202; - pathloss_ref_rs_pos_r16_c_ pathloss_ref_rs_pos_r16; - // ... - - // 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; + types type_; + choice_buffer_t + c; - // 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; - // ... - }; + void destroy_(); + }; + struct first_pdcch_monitoring_occasion_of_po_v1710_c_ { + using scs480_kh_zone_eighth_t_l_ = bounded_array; + using scs480_kh_zone_sixteenth_t_l_ = bounded_array; struct types_opts { - enum options { aperiodic, semi_persistent, periodic, nulltype } value; + enum options { scs480_kh_zone_eighth_t, scs480_kh_zone_sixteenth_t, nulltype } value; const char* to_string() const; }; using types = enumerated; // 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_(); } + first_pdcch_monitoring_occasion_of_po_v1710_c_() = default; + first_pdcch_monitoring_occasion_of_po_v1710_c_(const first_pdcch_monitoring_occasion_of_po_v1710_c_& other); + first_pdcch_monitoring_occasion_of_po_v1710_c_& + operator=(const first_pdcch_monitoring_occasion_of_po_v1710_c_& other); + ~first_pdcch_monitoring_occasion_of_po_v1710_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(types::aperiodic, type_, "resourceType"); - return c.get(); - } - semi_persistent_s_& semi_persistent() - { - assert_choice_type(types::semi_persistent, type_, "resourceType"); - return c.get(); - } - periodic_s_& periodic() + scs480_kh_zone_eighth_t_l_& scs480_kh_zone_eighth_t() { - assert_choice_type(types::periodic, type_, "resourceType"); - return c.get(); + assert_choice_type(types::scs480_kh_zone_eighth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); + return c.get(); } - const aperiodic_s_& aperiodic() const + scs480_kh_zone_sixteenth_t_l_& scs480_kh_zone_sixteenth_t() { - assert_choice_type(types::aperiodic, type_, "resourceType"); - return c.get(); + assert_choice_type(types::scs480_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); + return c.get(); } - const semi_persistent_s_& semi_persistent() const + const scs480_kh_zone_eighth_t_l_& scs480_kh_zone_eighth_t() const { - assert_choice_type(types::semi_persistent, type_, "resourceType"); - return c.get(); + assert_choice_type(types::scs480_kh_zone_eighth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); + return c.get(); } - const periodic_s_& periodic() const + const scs480_kh_zone_sixteenth_t_l_& scs480_kh_zone_sixteenth_t() const { - assert_choice_type(types::periodic, type_, "resourceType"); - return c.get(); + assert_choice_type(types::scs480_kh_zone_sixteenth_t, type_, "firstPDCCH-MonitoringOccasionOfPO-v1710"); + return c.get(); } - aperiodic_s_& set_aperiodic(); - semi_persistent_s_& set_semi_persistent(); - periodic_s_& set_periodic(); + scs480_kh_zone_eighth_t_l_& set_scs480_kh_zone_eighth_t(); + scs480_kh_zone_sixteenth_t_l_& set_scs480_kh_zone_sixteenth_t(); 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; - - const char* to_string() const; - }; - using usage_e_ = enumerated; - struct srs_pwr_ctrl_adjustment_states_opts { - enum options { same_as_fci2, separate_closed_loop, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using srs_pwr_ctrl_adjustment_states_e_ = enumerated; - using available_slot_offset_list_r17_l_ = bounded_array; // member variables - bool ext = 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_cfg_c pathloss_ref_rs; - srs_pwr_ctrl_adjustment_states_e_ srs_pwr_ctrl_adjustment_states; + bool ext = false; + bool first_pdcch_monitoring_occasion_of_po_present = false; + paging_cycle_e default_paging_cycle; + nand_paging_frame_offset_c_ nand_paging_frame_offset; + ns_e_ ns; + first_pdcch_monitoring_occasion_of_po_c_ first_pdcch_monitoring_occasion_of_po; // ... // group 0 - copy_ptr>> pathloss_ref_rs_list_r16; + bool nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present = false; + uint8_t nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16 = 2; // group 1 - bool usage_pdc_r17_present = false; - bool follow_unified_tci_state_srs_r17_present = false; - copy_ptr available_slot_offset_list_r17; + bool ran_paging_in_idle_po_r17_present = false; + copy_ptr first_pdcch_monitoring_occasion_of_po_v1710; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -10762,70 +655,60 @@ struct srs_res_set_s { void to_json(json_writer& j) const; }; -// UCI-OnPUSCH-ListDCI-0-1-r16 ::= SEQUENCE (SIZE (1..2)) OF UCI-OnPUSCH -using uci_on_pusch_list_dci_0_1_r16_l = dyn_array; - -// UCI-OnPUSCH-ListDCI-0-2-r16 ::= SEQUENCE (SIZE (1..2)) OF UCI-OnPUSCH-DCI-0-2-r16 -using uci_on_pusch_list_dci_0_2_r16_l = dyn_array; +// PEI-Config-r17 ::= SEQUENCE +struct pei_cfg_r17_s { + struct po_num_per_pei_r17_opts { + enum options { po1, po2, po4, po8, nulltype } value; + typedef uint8_t number_type; -// UL-AccessConfigListDCI-0-1-r16 ::= SEQUENCE (SIZE (1..64)) OF INTEGER (0..63) -using ul_access_cfg_list_dci_0_1_r16_l = dyn_array; + const char* to_string() const; + uint8_t to_number() const; + }; + using po_num_per_pei_r17_e_ = enumerated; -// UL-AccessConfigListDCI-0-1-r17 ::= SEQUENCE (SIZE (1..3)) OF INTEGER (0..2) -using ul_access_cfg_list_dci_0_1_r17_l = bounded_array; + // member variables + bool ext = false; + bool last_used_cell_only_r17_present = false; + po_num_per_pei_r17_e_ po_num_per_pei_r17; + uint8_t payload_size_dci_2_7_r17 = 1; + uint8_t pei_frame_offset_r17 = 0; + subgroup_cfg_r17_s subgroup_cfg_r17; + // ... -// UL-AccessConfigListDCI-0-2-r17 ::= SEQUENCE (SIZE (1..64)) OF INTEGER (0..63) -using ul_access_cfg_list_dci_0_2_r17_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; +}; -// 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; +// TDD-UL-DL-Pattern ::= SEQUENCE +struct tdd_ul_dl_pattern_s { + struct dl_ul_tx_periodicity_opts { + enum options { ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms5, ms10, nulltype } value; const char* to_string() const; - float to_number() const; - const char* to_number_string() const; }; - using ssb_per_rach_occasion_e_ = enumerated; - struct beam_fail_recovery_timer_opts { - enum options { ms10, ms20, ms40, ms60, ms80, ms100, ms150, ms200, nulltype } value; + using dl_ul_tx_periodicity_e_ = enumerated; + struct dl_ul_tx_periodicity_v1530_opts { + enum options { ms3, ms4, nulltype } value; typedef uint8_t number_type; const char* to_string() const; uint8_t to_number() const; }; - using beam_fail_recovery_timer_e_ = enumerated; + using dl_ul_tx_periodicity_v1530_e_ = enumerated; // 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 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; + bool ext = false; + dl_ul_tx_periodicity_e_ dl_ul_tx_periodicity; + uint16_t nrof_dl_slots = 0; + uint8_t nrof_dl_symbols = 0; + uint16_t nrof_ul_slots = 0; + uint8_t nrof_ul_symbols = 0; // ... // group 0 - bool msg1_subcarrier_spacing_present = false; - subcarrier_spacing_e msg1_subcarrier_spacing; - // group 1 - copy_ptr ra_prioritization_two_step_r16; - copy_ptr>> candidate_beam_rs_list_ext_v1610; - // group 2 - bool sp_cell_bfr_cbra_r16_present = false; + bool dl_ul_tx_periodicity_v1530_present = false; + dl_ul_tx_periodicity_v1530_e_ dl_ul_tx_periodicity_v1530; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -10833,39 +716,71 @@ struct beam_fail_recovery_cfg_s { void to_json(json_writer& j) const; }; -// ConfiguredGrantConfigToAddModList-r16 ::= SEQUENCE (SIZE (1..12)) OF ConfiguredGrantConfig -using cfg_grant_cfg_to_add_mod_list_r16_l = dyn_array; +// TimeAlignmentTimer ::= ENUMERATED +struct time_align_timer_opts { + enum options { ms500, ms750, ms1280, ms1920, ms2560, ms5120, ms10240, infinity, nulltype } value; + typedef int16_t number_type; + + const char* to_string() const; + int16_t to_number() const; +}; +using time_align_timer_e = enumerated; + +// DownlinkConfigCommonSIB ::= SEQUENCE +struct dl_cfg_common_sib_s { + bool ext = false; + freq_info_dl_sib_s freq_info_dl; + bwp_dl_common_s init_dl_bwp; + bcch_cfg_s bcch_cfg; + pcch_cfg_s pcch_cfg; + // ... + // group 0 + copy_ptr pei_cfg_r17; + copy_ptr init_dl_bwp_red_cap_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; -// ConfiguredGrantConfigToReleaseList-r16 ::= SEQUENCE (SIZE (1..12)) OF INTEGER (0..11) -using cfg_grant_cfg_to_release_list_r16_l = bounded_array; +// HighSpeedConfig-r16 ::= SEQUENCE +struct high_speed_cfg_r16_s { + bool ext = false; + bool high_speed_meas_flag_r16_present = false; + bool high_speed_demod_flag_r16_present = false; + // ... -// ConfiguredGrantConfigType2DeactivationStateList-r16 ::= SEQUENCE (SIZE (1..16)) OF -// ConfiguredGrantConfigType2DeactivationState-r16 -using cfg_grant_cfg_type2_deactivation_state_list_r16_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; +}; -// LBT-FailureRecoveryConfig-r16 ::= SEQUENCE -struct lbt_fail_recovery_cfg_r16_s { - struct lbt_fail_instance_max_count_r16_opts { - enum options { n4, n8, n16, n32, n64, n128, nulltype } value; +// HighSpeedConfigFR2-r17 ::= SEQUENCE +struct high_speed_cfg_fr2_r17_s { + struct high_speed_meas_flag_fr2_r17_opts { + enum options { set1, set2, nulltype } value; typedef uint8_t number_type; const char* to_string() const; uint8_t to_number() const; }; - using lbt_fail_instance_max_count_r16_e_ = enumerated; - struct lbt_fail_detection_timer_r16_opts { - enum options { ms10, ms20, ms40, ms80, ms160, ms320, nulltype } value; - typedef uint16_t number_type; + using high_speed_meas_flag_fr2_r17_e_ = enumerated; + struct high_speed_deployment_type_fr2_r17_opts { + enum options { unidirectional, bidirectional, nulltype } value; const char* to_string() const; - uint16_t to_number() const; }; - using lbt_fail_detection_timer_r16_e_ = enumerated; + using high_speed_deployment_type_fr2_r17_e_ = enumerated; // member variables - bool ext = false; - lbt_fail_instance_max_count_r16_e_ lbt_fail_instance_max_count_r16; - lbt_fail_detection_timer_r16_e_ lbt_fail_detection_timer_r16; + bool ext = false; + bool high_speed_meas_flag_fr2_r17_present = false; + bool high_speed_deployment_type_fr2_r17_present = false; + bool high_speed_large_one_step_ul_timing_fr2_r17_present = false; + high_speed_meas_flag_fr2_r17_e_ high_speed_meas_flag_fr2_r17; + high_speed_deployment_type_fr2_r17_e_ high_speed_deployment_type_fr2_r17; // ... // sequence methods @@ -10874,307 +789,170 @@ struct lbt_fail_recovery_cfg_r16_s { void to_json(json_writer& j) const; }; -// PUCCH-ConfigurationList-r16 ::= SEQUENCE (SIZE (1..2)) OF PUCCH-Config -using pucch_cfg_list_r16_l = dyn_array; - -// PUSCH-Config ::= SEQUENCE -struct pusch_cfg_s { - struct tx_cfg_opts { - enum options { codebook, non_codebook, nulltype } value; +// SemiStaticChannelAccessConfig-r16 ::= SEQUENCE +struct semi_static_ch_access_cfg_r16_s { + struct period_opts { + enum options { ms1, ms2, ms2dot5, ms4, ms5, ms10, nulltype } value; + typedef float number_type; const char* to_string() const; + float to_number() const; + const char* to_number_string() const; }; - using tx_cfg_e_ = enumerated; - struct freq_hop_opts { - enum options { intra_slot, inter_slot, nulltype } value; + using period_e_ = enumerated; - const char* to_string() const; - }; - using freq_hop_e_ = enumerated; - using freq_hop_offset_lists_l_ = bounded_array; - struct res_alloc_opts { - enum options { res_alloc_type0, res_alloc_type1, dyn_switch, nulltype } value; - typedef uint8_t number_type; + // member variables + period_e_ period; - const char* to_string() const; - uint8_t to_number() const; - }; - using res_alloc_e_ = enumerated; - struct pusch_aggregation_factor_opts { - enum options { n2, n4, n8, 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; +}; - const char* to_string() const; - uint8_t to_number() const; - }; - using pusch_aggregation_factor_e_ = enumerated; - struct mcs_table_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; +// TDD-UL-DL-ConfigCommon ::= SEQUENCE +struct tdd_ul_dl_cfg_common_s { + bool ext = false; + bool pattern2_present = false; + subcarrier_spacing_e ref_subcarrier_spacing; + tdd_ul_dl_pattern_s pattern1; + tdd_ul_dl_pattern_s pattern2; + // ... - const char* to_string() const; - uint16_t to_number() const; - }; - using mcs_table_e_ = enumerated; - struct mcs_table_transform_precoder_opts { - enum options { qam256, qam64_low_se, nulltype } value; + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkConfigCommonSIB ::= SEQUENCE +struct ul_cfg_common_sib_s { + freq_info_ul_sib_s freq_info_ul; + bwp_ul_common_s init_ul_bwp; + time_align_timer_e time_align_timer_common; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkConfigCommonSIB-v1700 ::= SEQUENCE +struct ul_cfg_common_sib_v1700_s { + bool init_ul_bwp_red_cap_r17_present = false; + bwp_ul_common_s init_ul_bwp_red_cap_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ServingCellConfigCommonSIB ::= SEQUENCE +struct serving_cell_cfg_common_sib_s { + struct n_timing_advance_offset_opts { + enum options { n0, n25600, n39936, nulltype } value; typedef uint16_t number_type; const char* to_string() const; uint16_t to_number() const; }; - using mcs_table_transform_precoder_e_ = enumerated; - struct transform_precoder_opts { - enum options { enabled, disabled, nulltype } value; - - const char* to_string() const; - }; - using transform_precoder_e_ = enumerated; - struct codebook_subset_opts { - enum options { fully_and_partial_and_non_coherent, partial_and_non_coherent, non_coherent, nulltype } value; - - const char* to_string() const; + using n_timing_advance_offset_e_ = enumerated; + struct ssb_positions_in_burst_s_ { + bool group_presence_present = false; + fixed_bitstring<8> in_one_group; + fixed_bitstring<8> group_presence; }; - using codebook_subset_e_ = enumerated; - struct freq_hop_dci_0_2_r16_c_ { - struct pusch_rep_type_a_opts { - enum options { intra_slot, inter_slot, nulltype } value; - - const char* to_string() const; - }; - using pusch_rep_type_a_e_ = enumerated; - struct pusch_rep_type_b_opts { - enum options { inter_repeat, inter_slot, nulltype } value; + struct ssb_periodicity_serving_cell_opts { + enum options { ms5, ms10, ms20, ms40, ms80, ms160, nulltype } value; + typedef uint8_t number_type; - const char* to_string() const; - }; - using pusch_rep_type_b_e_ = enumerated; + const char* to_string() const; + uint8_t to_number() const; + }; + using ssb_periodicity_serving_cell_e_ = enumerated; + struct ch_access_mode_r16_c_ { struct types_opts { - enum options { pusch_rep_type_a, pusch_rep_type_b, nulltype } value; + enum options { dyn, semi_static, nulltype } value; const char* to_string() const; }; using types = enumerated; // choice methods - freq_hop_dci_0_2_r16_c_() = default; - freq_hop_dci_0_2_r16_c_(const freq_hop_dci_0_2_r16_c_& other); - freq_hop_dci_0_2_r16_c_& operator=(const freq_hop_dci_0_2_r16_c_& other); - ~freq_hop_dci_0_2_r16_c_() { destroy_(); } + ch_access_mode_r16_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 - pusch_rep_type_a_e_& pusch_rep_type_a() - { - assert_choice_type(types::pusch_rep_type_a, type_, "frequencyHoppingDCI-0-2-r16"); - return c.get(); - } - pusch_rep_type_b_e_& pusch_rep_type_b() - { - assert_choice_type(types::pusch_rep_type_b, type_, "frequencyHoppingDCI-0-2-r16"); - return c.get(); - } - const pusch_rep_type_a_e_& pusch_rep_type_a() const + semi_static_ch_access_cfg_r16_s& semi_static() { - assert_choice_type(types::pusch_rep_type_a, type_, "frequencyHoppingDCI-0-2-r16"); - return c.get(); + assert_choice_type(types::semi_static, type_, "channelAccessMode-r16"); + return c; } - const pusch_rep_type_b_e_& pusch_rep_type_b() const + const semi_static_ch_access_cfg_r16_s& semi_static() const { - assert_choice_type(types::pusch_rep_type_b, type_, "frequencyHoppingDCI-0-2-r16"); - return c.get(); + assert_choice_type(types::semi_static, type_, "channelAccessMode-r16"); + return c; } - pusch_rep_type_a_e_& set_pusch_rep_type_a(); - pusch_rep_type_b_e_& set_pusch_rep_type_b(); + void set_dyn(); + semi_static_ch_access_cfg_r16_s& set_semi_static(); private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct codebook_subset_dci_0_2_r16_opts { - enum options { fully_and_partial_and_non_coherent, partial_and_non_coherent, non_coherent, nulltype } value; - - const char* to_string() const; - }; - using codebook_subset_dci_0_2_r16_e_ = enumerated; - struct mcs_table_dci_0_2_r16_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using mcs_table_dci_0_2_r16_e_ = enumerated; - struct mcs_table_transform_precoder_dci_0_2_r16_opts { - enum options { qam256, qam64_low_se, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using mcs_table_transform_precoder_dci_0_2_r16_e_ = enumerated; - struct pusch_rep_type_ind_dci_0_2_r16_opts { - enum options { pusch_rep_type_a, pusch_rep_type_b, nulltype } value; - - const char* to_string() const; - }; - using pusch_rep_type_ind_dci_0_2_r16_e_ = enumerated; - struct res_alloc_dci_0_2_r16_opts { - enum options { res_alloc_type0, res_alloc_type1, dyn_switch, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using res_alloc_dci_0_2_r16_e_ = enumerated; - struct res_alloc_type1_granularity_dci_0_2_r16_opts { - enum options { n2, n4, n8, n16, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using res_alloc_type1_granularity_dci_0_2_r16_e_ = enumerated; - struct pusch_rep_type_ind_dci_0_1_r16_opts { - enum options { pusch_rep_type_a, pusch_rep_type_b, nulltype } value; - - const char* to_string() const; - }; - using pusch_rep_type_ind_dci_0_1_r16_e_ = enumerated; - struct freq_hop_dci_0_1_r16_opts { - enum options { inter_repeat, inter_slot, nulltype } value; - - const char* to_string() const; + types type_; + semi_static_ch_access_cfg_r16_s c; }; - using freq_hop_dci_0_1_r16_e_ = enumerated; - struct ul_full_pwr_tx_r16_opts { - enum options { fullpwr, fullpwr_mode1, fullpwr_mode2, nulltype } value; - typedef uint8_t number_type; + struct discovery_burst_win_len_r16_opts { + enum options { ms0dot5, ms1, ms2, ms3, ms4, ms5, nulltype } value; + typedef float number_type; const char* to_string() const; - uint8_t to_number() const; + float to_number() const; + const char* to_number_string() const; }; - using ul_full_pwr_tx_r16_e_ = enumerated; - struct map_pattern_r17_opts { - enum options { cyclic_map, sequential_map, nulltype } value; + using discovery_burst_win_len_r16_e_ = enumerated; + struct discovery_burst_win_len_v1700_opts { + enum options { ms0dot125, ms0dot25, ms0dot5, ms0dot75, ms1, ms1dot25, nulltype } value; + typedef float number_type; const char* to_string() const; + float to_number() const; + const char* to_number_string() const; }; - using map_pattern_r17_e_ = enumerated; - using mpe_res_pool_to_add_mod_list_r17_l_ = dyn_array; - using mpe_res_pool_to_release_list_r17_l_ = dyn_array; + using discovery_burst_win_len_v1700_e_ = enumerated; // 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 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; + bool ext = false; + bool ul_cfg_common_present = false; + bool supplementary_ul_present = false; + bool n_timing_advance_offset_present = false; + bool tdd_ul_dl_cfg_common_present = false; + dl_cfg_common_sib_s dl_cfg_common; + ul_cfg_common_sib_s ul_cfg_common; + ul_cfg_common_sib_s supplementary_ul; + n_timing_advance_offset_e_ n_timing_advance_offset; + ssb_positions_in_burst_s_ ssb_positions_in_burst; + ssb_periodicity_serving_cell_e_ ssb_periodicity_serving_cell; + tdd_ul_dl_cfg_common_s tdd_ul_dl_cfg_common; + int8_t ss_pbch_block_pwr = -60; // ... // group 0 - bool harq_process_num_size_dci_0_2_r16_present = false; - bool dmrs_seq_initization_dci_0_2_r16_present = false; - bool nof_bits_for_rv_dci_0_2_r16_present = false; - bool ant_ports_field_presence_dci_0_2_r16_present = false; - bool codebook_subset_dci_0_2_r16_present = false; - bool invalid_symbol_pattern_ind_dci_0_2_r16_present = false; - bool max_rank_dci_0_2_r16_present = false; - bool mcs_table_dci_0_2_r16_present = false; - bool mcs_table_transform_precoder_dci_0_2_r16_present = false; - bool prio_ind_dci_0_2_r16_present = false; - bool pusch_rep_type_ind_dci_0_2_r16_present = false; - bool res_alloc_dci_0_2_r16_present = false; - bool res_alloc_type1_granularity_dci_0_2_r16_present = false; - bool invalid_symbol_pattern_ind_dci_0_1_r16_present = false; - bool prio_ind_dci_0_1_r16_present = false; - bool pusch_rep_type_ind_dci_0_1_r16_present = false; - bool freq_hop_dci_0_1_r16_present = false; - bool ul_full_pwr_tx_r16_present = false; - bool nof_invalid_symbols_for_dl_ul_switching_r16_present = false; - copy_ptr, 1, 2>>> minimum_sched_offset_k2_r16; - copy_ptr, 1, 64>>> ul_access_cfg_list_dci_0_1_r16; - uint8_t harq_process_num_size_dci_0_2_r16 = 0; - uint8_t nof_bits_for_rv_dci_0_2_r16 = 0; - copy_ptr> dmrs_ul_for_pusch_map_type_a_dci_0_2_r16; - copy_ptr> dmrs_ul_for_pusch_map_type_b_dci_0_2_r16; - copy_ptr freq_hop_dci_0_2_r16; - copy_ptr, 1, 4>>> freq_hop_offset_lists_dci_0_2_r16; - codebook_subset_dci_0_2_r16_e_ codebook_subset_dci_0_2_r16; - uint8_t max_rank_dci_0_2_r16 = 1; - mcs_table_dci_0_2_r16_e_ mcs_table_dci_0_2_r16; - mcs_table_transform_precoder_dci_0_2_r16_e_ mcs_table_transform_precoder_dci_0_2_r16; - pusch_rep_type_ind_dci_0_2_r16_e_ pusch_rep_type_ind_dci_0_2_r16; - res_alloc_dci_0_2_r16_e_ res_alloc_dci_0_2_r16; - res_alloc_type1_granularity_dci_0_2_r16_e_ res_alloc_type1_granularity_dci_0_2_r16; - copy_ptr>> uci_on_pusch_list_dci_0_2_r16; - copy_ptr>> - pusch_time_domain_alloc_list_dci_0_2_r16; - copy_ptr>> - pusch_time_domain_alloc_list_dci_0_1_r16; - pusch_rep_type_ind_dci_0_1_r16_e_ pusch_rep_type_ind_dci_0_1_r16; - freq_hop_dci_0_1_r16_e_ freq_hop_dci_0_1_r16; - copy_ptr>> uci_on_pusch_list_dci_0_1_r16; - copy_ptr invalid_symbol_pattern_r16; - copy_ptr> pusch_pwr_ctrl_v1610; - ul_full_pwr_tx_r16_e_ ul_full_pwr_tx_r16; - copy_ptr>> - pusch_time_domain_alloc_list_for_multi_pusch_r16; - uint8_t nof_invalid_symbols_for_dl_ul_switching_r16 = 1; + bool discovery_burst_win_len_r16_present = false; + copy_ptr ch_access_mode_r16; + discovery_burst_win_len_r16_e_ discovery_burst_win_len_r16; + copy_ptr high_speed_cfg_r16; // group 1 - bool map_pattern_r17_present = false; - bool second_tpc_field_dci_0_1_r17_present = false; - bool second_tpc_field_dci_0_2_r17_present = false; - bool seq_offset_for_rv_r17_present = false; - bool available_slot_count_r17_present = false; - bool harq_process_num_size_dci_0_2_v1700_present = false; - bool harq_process_num_size_dci_0_1_r17_present = false; - copy_ptr, 1, 64>>> ul_access_cfg_list_dci_0_2_r17; - copy_ptr> beta_offsets_cross_pri0_r17; - copy_ptr> beta_offsets_cross_pri1_r17; - copy_ptr> beta_offsets_cross_pri0_dci_0_2_r17; - copy_ptr> beta_offsets_cross_pri1_dci_0_2_r17; - map_pattern_r17_e_ map_pattern_r17; - uint8_t seq_offset_for_rv_r17 = 0; - copy_ptr, 1, 3>>> ul_access_cfg_list_dci_0_1_r17; - copy_ptr, 1, 2>>> minimum_sched_offset_k2_r17; - copy_ptr> dmrs_bundling_pusch_cfg_r17; - uint8_t harq_process_num_size_dci_0_2_v1700 = 5; - uint8_t harq_process_num_size_dci_0_1_r17 = 5; - copy_ptr mpe_res_pool_to_add_mod_list_r17; - copy_ptr mpe_res_pool_to_release_list_r17; + bool ch_access_mode2_r17_present = false; + bool discovery_burst_win_len_v1700_present = false; + discovery_burst_win_len_v1700_e_ discovery_burst_win_len_v1700; + copy_ptr high_speed_cfg_fr2_r17; + copy_ptr ul_cfg_common_v1700; + // group 2 + bool enhanced_meas_leo_r17_present = false; + // group 3 + bool ra_ch_access_r17_present = false; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11182,62 +960,13 @@ struct pusch_cfg_s { void to_json(json_writer& j) const; }; -// PathlossReferenceRS-r17 ::= SEQUENCE -struct pathloss_ref_rs_r17_s { - struct ref_sig_r17_c_ { - struct types_opts { - enum options { ssb_idx, csi_rs_idx, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - ref_sig_r17_c_() = default; - ref_sig_r17_c_(const ref_sig_r17_c_& other); - ref_sig_r17_c_& operator=(const ref_sig_r17_c_& other); - ~ref_sig_r17_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(types::ssb_idx, type_, "referenceSignal-r17"); - return c.get(); - } - uint8_t& csi_rs_idx() - { - assert_choice_type(types::csi_rs_idx, type_, "referenceSignal-r17"); - return c.get(); - } - const uint8_t& ssb_idx() const - { - assert_choice_type(types::ssb_idx, type_, "referenceSignal-r17"); - return c.get(); - } - const uint8_t& csi_rs_idx() const - { - assert_choice_type(types::csi_rs_idx, type_, "referenceSignal-r17"); - return c.get(); - } - uint8_t& set_ssb_idx(); - uint8_t& set_csi_rs_idx(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; +// AvailabilityCombination-r16 ::= SEQUENCE +struct availability_combination_r16_s { + using res_availability_r16_l_ = dyn_array; // member variables - bool add_pci_r17_present = false; - uint8_t pathloss_ref_rs_id_r17 = 0; - ref_sig_r17_c_ ref_sig_r17; - uint8_t add_pci_r17 = 1; + uint16_t availability_combination_id_r16 = 0; + res_availability_r16_l_ res_availability_r16; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11245,38 +974,14 @@ struct pathloss_ref_rs_r17_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; - using srs_res_set_to_add_mod_list_dci_0_2_r16_l_ = dyn_array; - using srs_res_set_to_release_list_dci_0_2_r16_l_ = bounded_array; - using srs_pos_res_set_to_release_list_r16_l_ = bounded_array; - using srs_pos_res_set_to_add_mod_list_r16_l_ = dyn_array; - using srs_pos_res_to_release_list_r16_l_ = dyn_array; - using srs_pos_res_to_add_mod_list_r16_l_ = dyn_array; +// RB-SetGroup-r17 ::= SEQUENCE +struct rb_set_group_r17_s { + using res_availability_r17_l_ = dyn_array; + using rb_sets_r17_l_ = bounded_array; // member variables - bool ext = 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; - // ... - // group 0 - bool srs_request_dci_1_2_r16_present = false; - bool srs_request_dci_0_2_r16_present = false; - uint8_t srs_request_dci_1_2_r16 = 1; - uint8_t srs_request_dci_0_2_r16 = 1; - copy_ptr srs_res_set_to_add_mod_list_dci_0_2_r16; - copy_ptr srs_res_set_to_release_list_dci_0_2_r16; - copy_ptr srs_pos_res_set_to_release_list_r16; - copy_ptr srs_pos_res_set_to_add_mod_list_r16; - copy_ptr srs_pos_res_to_release_list_r16; - copy_ptr srs_pos_res_to_add_mod_list_r16; + res_availability_r17_l_ res_availability_r17; + rb_sets_r17_l_ rb_sets_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11284,83 +989,40 @@ struct srs_cfg_s { void to_json(json_writer& j) const; }; -// TCI-UL-State-r17 ::= SEQUENCE -struct tci_ul_state_r17_s { - struct ref_sig_r17_c_ { - struct types_opts { - enum options { ssb_idx_r17, csi_rs_idx_r17, srs_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; +// AvailabilityCombinationRB-Groups-r17 ::= SEQUENCE +struct availability_combination_rb_groups_r17_s { + using rb_set_groups_r17_l_ = dyn_array; + using res_availability_r17_l_ = dyn_array; - // choice methods - ref_sig_r17_c_() = default; - ref_sig_r17_c_(const ref_sig_r17_c_& other); - ref_sig_r17_c_& operator=(const ref_sig_r17_c_& other); - ~ref_sig_r17_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_r17() - { - assert_choice_type(types::ssb_idx_r17, type_, "referenceSignal-r17"); - return c.get(); - } - uint8_t& csi_rs_idx_r17() - { - assert_choice_type(types::csi_rs_idx_r17, type_, "referenceSignal-r17"); - return c.get(); - } - uint8_t& srs_r17() - { - assert_choice_type(types::srs_r17, type_, "referenceSignal-r17"); - return c.get(); - } - const uint8_t& ssb_idx_r17() const - { - assert_choice_type(types::ssb_idx_r17, type_, "referenceSignal-r17"); - return c.get(); - } - const uint8_t& csi_rs_idx_r17() const - { - assert_choice_type(types::csi_rs_idx_r17, type_, "referenceSignal-r17"); - return c.get(); - } - const uint8_t& srs_r17() const - { - assert_choice_type(types::srs_r17, type_, "referenceSignal-r17"); - return c.get(); - } - uint8_t& set_ssb_idx_r17(); - uint8_t& set_csi_rs_idx_r17(); - uint8_t& set_srs_r17(); + // member variables + uint16_t availability_combination_id_r17 = 0; + rb_set_groups_r17_l_ rb_set_groups_r17; + res_availability_r17_l_ res_availability_r17; - 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_(); - }; +// AvailabilityCombinationsPerCell-r16 ::= SEQUENCE +struct availability_combinations_per_cell_r16_s { + using availability_combinations_r16_l_ = dyn_array; + using availability_combinations_rb_groups_r17_l_ = dyn_array; // member variables - bool ext = false; - bool serving_cell_id_r17_present = false; - bool bwp_id_r17_present = false; - bool add_pci_r17_present = false; - bool ul_pwr_ctrl_r17_present = false; - bool pathloss_ref_rs_id_r17_present = false; - uint8_t tci_ul_state_id_r17 = 0; - uint8_t serving_cell_id_r17 = 0; - uint8_t bwp_id_r17 = 0; - ref_sig_r17_c_ ref_sig_r17; - uint8_t add_pci_r17 = 1; - uint8_t ul_pwr_ctrl_r17 = 1; - uint8_t pathloss_ref_rs_id_r17 = 0; + bool ext = false; + bool position_in_dci_ai_r16_present = false; + uint16_t availability_combinations_per_cell_idx_r16 = 0; + fixed_bitstring<36> iab_du_cell_id_r16; + uint8_t position_in_dci_ai_r16 = 0; + availability_combinations_r16_l_ availability_combinations_r16; // ... + // group 0 + copy_ptr availability_combinations_rb_groups_r17; + // group 1 + bool position_in_dci_ai_rb_groups_v1720_present = false; + uint8_t position_in_dci_ai_rb_groups_v1720 = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11368,104 +1030,18 @@ struct tci_ul_state_r17_s { void to_json(json_writer& j) const; }; -// BWP-UplinkDedicated ::= SEQUENCE -struct bwp_ul_ded_s { - struct ul_tci_state_list_r17_c_ { - struct explicitlist_s_ { - using ul_tci_to_add_mod_list_r17_l_ = dyn_array; - using ul_tci_to_release_list_r17_l_ = dyn_array; - - // member variables - ul_tci_to_add_mod_list_r17_l_ ul_tci_to_add_mod_list_r17; - ul_tci_to_release_list_r17_l_ ul_tci_to_release_list_r17; - }; - struct types_opts { - enum options { explicitlist, unified_tci_state_ref_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - ul_tci_state_list_r17_c_() = default; - ul_tci_state_list_r17_c_(const ul_tci_state_list_r17_c_& other); - ul_tci_state_list_r17_c_& operator=(const ul_tci_state_list_r17_c_& other); - ~ul_tci_state_list_r17_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 - explicitlist_s_& explicitlist() - { - assert_choice_type(types::explicitlist, type_, "ul-TCI-StateList-r17"); - return c.get(); - } - serving_cell_and_bwp_id_r17_s& unified_tci_state_ref_r17() - { - assert_choice_type(types::unified_tci_state_ref_r17, type_, "ul-TCI-StateList-r17"); - return c.get(); - } - const explicitlist_s_& explicitlist() const - { - assert_choice_type(types::explicitlist, type_, "ul-TCI-StateList-r17"); - return c.get(); - } - const serving_cell_and_bwp_id_r17_s& unified_tci_state_ref_r17() const - { - assert_choice_type(types::unified_tci_state_ref_r17, type_, "ul-TCI-StateList-r17"); - return c.get(); - } - explicitlist_s_& set_explicitlist(); - serving_cell_and_bwp_id_r17_s& set_unified_tci_state_ref_r17(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - using pathloss_ref_rs_to_add_mod_list_r17_l_ = dyn_array; - using pathloss_ref_rs_to_release_list_r17_l_ = dyn_array; +// AvailabilityIndicator-r16 ::= SEQUENCE +struct availability_ind_r16_s { + using available_comb_to_add_mod_list_r16_l_ = dyn_array; + using available_comb_to_release_list_r16_l_ = dyn_array; // member variables - bool ext = false; - bool pucch_cfg_present = false; - bool pusch_cfg_present = false; - bool cfg_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 cfg_grant_cfg; - setup_release_c srs_cfg; - setup_release_c beam_fail_recovery_cfg; + bool ext = false; + uint32_t ai_rnti_r16 = 0; + uint8_t dci_payload_size_ai_r16 = 1; + available_comb_to_add_mod_list_r16_l_ available_comb_to_add_mod_list_r16; + available_comb_to_release_list_r16_l_ available_comb_to_release_list_r16; // ... - // group 0 - bool cp_ext_c2_r16_present = false; - bool cp_ext_c3_r16_present = false; - bool use_interlace_pucch_pusch_r16_present = false; - copy_ptr> sl_pucch_cfg_r16; - uint8_t cp_ext_c2_r16 = 1; - uint8_t cp_ext_c3_r16 = 1; - copy_ptr>> pucch_cfg_list_r16; - copy_ptr> lbt_fail_recovery_cfg_r16; - copy_ptr cfg_grant_cfg_to_add_mod_list_r16; - copy_ptr cfg_grant_cfg_to_release_list_r16; - copy_ptr cfg_grant_cfg_type2_deactivation_state_list_r16; - // group 1 - bool ul_pwr_ctrl_r17_present = false; - copy_ptr ul_tci_state_list_r17; - uint8_t ul_pwr_ctrl_r17 = 1; - copy_ptr>> pucch_cfg_list_multicast1_r17; - copy_ptr>> pucch_cfg_list_multicast2_r17; - // group 2 - copy_ptr> pucch_cfg_multicast1_r17; - copy_ptr> pucch_cfg_multicast2_r17; - // group 3 - copy_ptr pathloss_ref_rs_to_add_mod_list_r17; - copy_ptr pathloss_ref_rs_to_release_list_r17; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; @@ -11473,15 +1049,10 @@ struct bwp_ul_ded_s { 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; - // ... +// AvailableRB-SetsPerCell-r16 ::= SEQUENCE +struct available_rb_sets_per_cell_r16_s { + uint8_t serving_cell_id_r16 = 0; + uint8_t position_in_dci_r16 = 0; // sequence methods SRSASN_CODE pack(bit_ref& bref) const; diff --git a/include/srsran/asn1/rrc_nr/sys_info.h b/include/srsran/asn1/rrc_nr/sys_info.h new file mode 100644 index 0000000000..36694f459d --- /dev/null +++ b/include/srsran/asn1/rrc_nr/sys_info.h @@ -0,0 +1,4601 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "serving_cell.h" + +namespace asn1 { +namespace rrc_nr { + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// EUTRA-NS-PmaxValue ::= SEQUENCE +struct eutra_ns_pmax_value_s { + bool add_pmax_present = false; + bool add_spec_emission_present = false; + int8_t add_pmax = -30; + uint16_t add_spec_emission = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// GNSS-ID-r16 ::= SEQUENCE +struct gnss_id_r16_s { + struct gnss_id_r16_opts { + enum options { gps, sbas, qzss, galileo, glonass, bds, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using gnss_id_r16_e_ = enumerated; + + // member variables + bool ext = false; + gnss_id_r16_e_ gnss_id_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PCI-Range ::= SEQUENCE +struct pci_range_s { + struct range_opts { + enum options { + n4, + n8, + n12, + n16, + n24, + n32, + n48, + n64, + n84, + n96, + n128, + n168, + n252, + n504, + n1008, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using range_e_ = enumerated; + + // member variables + bool range_present = false; + uint16_t start = 0; + range_e_ range; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SBAS-ID-r16 ::= SEQUENCE +struct sbas_id_r16_s { + struct sbas_id_r16_opts { + enum options { waas, egnos, msas, gagan, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using sbas_id_r16_e_ = enumerated; + + // member variables + bool ext = false; + sbas_id_r16_e_ sbas_id_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellReselectionSubPriority ::= ENUMERATED +struct cell_resel_sub_prio_opts { + enum options { odot2, odot4, odot6, odot8, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; +}; +using cell_resel_sub_prio_e = enumerated; + +// EUTRA-NS-PmaxList ::= SEQUENCE (SIZE (1..8)) OF EUTRA-NS-PmaxValue +using eutra_ns_pmax_list_l = dyn_array; + +// EUTRA-Q-OffsetRange ::= ENUMERATED +struct eutra_q_offset_range_opts { + enum options { + db_neg24, + db_neg22, + db_neg20, + db_neg18, + db_neg16, + db_neg14, + db_neg12, + db_neg10, + db_neg8, + db_neg6, + db_neg5, + db_neg4, + db_neg3, + db_neg2, + db_neg1, + db0, + db1, + db2, + db3, + db4, + db5, + db6, + db8, + db10, + db12, + db14, + db16, + db18, + db20, + db22, + db24, + nulltype + } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; +}; +using eutra_q_offset_range_e = enumerated; + +// NSAG-IdentityInfo-r17 ::= SEQUENCE +struct nsag_id_info_r17_s { + bool tac_r17_present = false; + fixed_bitstring<8> nsag_id_r17; + fixed_bitstring<24> tac_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Orbital-r17 ::= SEQUENCE +struct orbital_r17_s { + uint64_t semi_major_axis_r17 = 0; + uint32_t eccentricity_r17 = 0; + uint32_t periapsis_r17 = 0; + uint32_t longitude_r17 = 0; + int32_t inclination_r17 = -67108864; + uint32_t mean_anomaly_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PositionVelocity-r17 ::= SEQUENCE +struct position_velocity_r17_s { + int32_t position_x_r17 = -33554432; + int32_t position_y_r17 = -33554432; + int32_t position_z_r17 = -33554432; + int32_t velocity_vx_r17 = -131072; + int32_t velocity_vy_r17 = -131072; + int32_t velocity_vz_r17 = -131072; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Q-OffsetRange ::= ENUMERATED +struct q_offset_range_opts { + enum options { + db_neg24, + db_neg22, + db_neg20, + db_neg18, + db_neg16, + db_neg14, + db_neg12, + db_neg10, + db_neg8, + db_neg6, + db_neg5, + db_neg4, + db_neg3, + db_neg2, + db_neg1, + db0, + db1, + db2, + db3, + db4, + db5, + db6, + db8, + db10, + db12, + db14, + db16, + db18, + db20, + db22, + db24, + nulltype + } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; +}; +using q_offset_range_e = enumerated; + +// SI-RequestResources ::= SEQUENCE +struct si_request_res_s { + bool ra_assoc_period_idx_present = false; + bool ra_ssb_occasion_mask_idx_present = false; + uint8_t ra_preamb_start_idx = 0; + uint8_t ra_assoc_period_idx = 0; + uint8_t ra_ssb_occasion_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; +}; + +// SIB-TypeInfo-v1700 ::= SEQUENCE +struct sib_type_info_v1700_s { + struct sib_type_r17_c_ { + struct type1_r17_opts { + enum options { + sib_type15, + sib_type16, + sib_type17, + sib_type18, + sib_type19, + sib_type20, + sib_type21, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + // ... + nulltype + } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using type1_r17_e_ = enumerated; + struct type2_r17_s_ { + struct pos_sib_type_r17_opts { + enum options { + pos_sib_type1_neg9, + pos_sib_type1_neg10, + pos_sib_type2_neg24, + pos_sib_type2_neg25, + pos_sib_type6_neg4, + pos_sib_type6_neg5, + pos_sib_type6_neg6, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + // ... + nulltype + } value; + + const char* to_string() const; + }; + using pos_sib_type_r17_e_ = enumerated; + + // member variables + bool encrypted_r17_present = false; + bool gnss_id_r17_present = false; + bool sbas_id_r17_present = false; + pos_sib_type_r17_e_ pos_sib_type_r17; + gnss_id_r16_s gnss_id_r17; + sbas_id_r16_s sbas_id_r17; + }; + struct types_opts { + enum options { type1_r17, type2_r17, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + sib_type_r17_c_() = default; + sib_type_r17_c_(const sib_type_r17_c_& other); + sib_type_r17_c_& operator=(const sib_type_r17_c_& other); + ~sib_type_r17_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_r17_e_& type1_r17() + { + assert_choice_type(types::type1_r17, type_, "sibType-r17"); + return c.get(); + } + type2_r17_s_& type2_r17() + { + assert_choice_type(types::type2_r17, type_, "sibType-r17"); + return c.get(); + } + const type1_r17_e_& type1_r17() const + { + assert_choice_type(types::type1_r17, type_, "sibType-r17"); + return c.get(); + } + const type2_r17_s_& type2_r17() const + { + assert_choice_type(types::type2_r17, type_, "sibType-r17"); + return c.get(); + } + type1_r17_e_& set_type1_r17(); + type2_r17_s_& set_type2_r17(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool value_tag_r17_present = false; + bool area_scope_r17_present = false; + sib_type_r17_c_ sib_type_r17; + uint8_t value_tag_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SSB-PositionQCL-Relation-r16 ::= ENUMERATED +struct ssb_position_qcl_relation_r16_opts { + enum options { n1, n2, n4, n8, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; +}; +using ssb_position_qcl_relation_r16_e = enumerated; + +// SSB-PositionQCL-Relation-r17 ::= ENUMERATED +struct ssb_position_qcl_relation_r17_opts { + enum options { n32, n64, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; +}; +using ssb_position_qcl_relation_r17_e = enumerated; + +// SliceCellListNR-r17 ::= SEQUENCE (SIZE (1..16)) OF PCI-Range +using slice_cell_list_nr_r17_l = dyn_array; + +// EUTRA-FreqNeighCellInfo ::= SEQUENCE +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 dummy; + uint8_t q_rx_lev_min_offset_cell = 1; + uint8_t q_qual_min_offset_cell = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EUTRA-MultiBandInfo ::= SEQUENCE +struct eutra_multi_band_info_s { + uint16_t eutra_freq_band_ind = 1; + eutra_ns_pmax_list_l eutra_ns_pmax_list; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EUTRA-PhysCellIdRange ::= SEQUENCE +struct eutra_pci_range_s { + struct range_opts { + enum options { + n4, + n8, + n12, + n16, + n24, + n32, + n48, + n64, + n84, + n96, + n128, + n168, + n252, + n504, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using range_e_ = enumerated; + + // member variables + bool range_present = false; + uint16_t start = 0; + range_e_ range; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EphemerisInfo-r17 ::= CHOICE +struct ephemeris_info_r17_c { + struct types_opts { + enum options { position_velocity_r17, orbital_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + ephemeris_info_r17_c() = default; + ephemeris_info_r17_c(const ephemeris_info_r17_c& other); + ephemeris_info_r17_c& operator=(const ephemeris_info_r17_c& other); + ~ephemeris_info_r17_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 + position_velocity_r17_s& position_velocity_r17() + { + assert_choice_type(types::position_velocity_r17, type_, "EphemerisInfo-r17"); + return c.get(); + } + orbital_r17_s& orbital_r17() + { + assert_choice_type(types::orbital_r17, type_, "EphemerisInfo-r17"); + return c.get(); + } + const position_velocity_r17_s& position_velocity_r17() const + { + assert_choice_type(types::position_velocity_r17, type_, "EphemerisInfo-r17"); + return c.get(); + } + const orbital_r17_s& orbital_r17() const + { + assert_choice_type(types::orbital_r17, type_, "EphemerisInfo-r17"); + return c.get(); + } + position_velocity_r17_s& set_position_velocity_r17(); + orbital_r17_s& set_orbital_r17(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// EpochTime-r17 ::= SEQUENCE +struct epoch_time_r17_s { + uint16_t sfn_r17 = 0; + uint8_t sub_frame_nr_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqNeighCellInfo ::= SEQUENCE +struct inter_freq_neigh_cell_info_s { + bool ext = false; + bool q_rx_lev_min_offset_cell_present = false; + bool q_rx_lev_min_offset_cell_sul_present = false; + bool q_qual_min_offset_cell_present = false; + uint16_t pci = 0; + q_offset_range_e q_offset_cell; + uint8_t q_rx_lev_min_offset_cell = 1; + uint8_t q_rx_lev_min_offset_cell_sul = 1; + uint8_t q_qual_min_offset_cell = 1; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqNeighCellInfo-v1610 ::= SEQUENCE +struct inter_freq_neigh_cell_info_v1610_s { + bool ssb_position_qcl_r16_present = false; + ssb_position_qcl_relation_r16_e ssb_position_qcl_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqNeighCellInfo-v1710 ::= SEQUENCE +struct inter_freq_neigh_cell_info_v1710_s { + bool ssb_position_qcl_r17_present = false; + ssb_position_qcl_relation_r17_e ssb_position_qcl_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SI-RequestConfig ::= SEQUENCE +struct si_request_cfg_s { + struct rach_occasions_si_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; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using ssb_per_rach_occasion_e_ = enumerated; + + // member variables + rach_cfg_generic_s rach_cfg_si; + ssb_per_rach_occasion_e_ ssb_per_rach_occasion; + }; + struct si_request_period_opts { + enum options { one, two, four, six, eight, ten, twelve, sixteen, nulltype } value; + + const char* to_string() const; + }; + using si_request_period_e_ = enumerated; + using si_request_res_l_ = dyn_array; + + // member variables + bool rach_occasions_si_present = false; + bool si_request_period_present = false; + rach_occasions_si_s_ rach_occasions_si; + si_request_period_e_ si_request_period; + si_request_res_l_ si_request_res; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB-Mapping-v1700 ::= SEQUENCE (SIZE (1..32)) OF SIB-TypeInfo-v1700 +using sib_map_v1700_l = dyn_array; + +// SSB-MTC4-r17 ::= SEQUENCE +struct ssb_mtc4_r17_s { + using pci_list_r17_l_ = dyn_array; + + // member variables + pci_list_r17_l_ pci_list_r17; + uint8_t offset_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SliceInfo-r17 ::= SEQUENCE +struct slice_info_r17_s { + struct slice_cell_list_nr_r17_c_ { + struct types_opts { + enum options { slice_allowed_cell_list_nr_r17, slice_excluded_cell_list_nr_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + slice_cell_list_nr_r17_c_() = default; + slice_cell_list_nr_r17_c_(const slice_cell_list_nr_r17_c_& other); + slice_cell_list_nr_r17_c_& operator=(const slice_cell_list_nr_r17_c_& other); + ~slice_cell_list_nr_r17_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 + slice_cell_list_nr_r17_l& slice_allowed_cell_list_nr_r17() + { + assert_choice_type(types::slice_allowed_cell_list_nr_r17, type_, "sliceCellListNR-r17"); + return c.get(); + } + slice_cell_list_nr_r17_l& slice_excluded_cell_list_nr_r17() + { + assert_choice_type(types::slice_excluded_cell_list_nr_r17, type_, "sliceCellListNR-r17"); + return c.get(); + } + const slice_cell_list_nr_r17_l& slice_allowed_cell_list_nr_r17() const + { + assert_choice_type(types::slice_allowed_cell_list_nr_r17, type_, "sliceCellListNR-r17"); + return c.get(); + } + const slice_cell_list_nr_r17_l& slice_excluded_cell_list_nr_r17() const + { + assert_choice_type(types::slice_excluded_cell_list_nr_r17, type_, "sliceCellListNR-r17"); + return c.get(); + } + slice_cell_list_nr_r17_l& set_slice_allowed_cell_list_nr_r17(); + slice_cell_list_nr_r17_l& set_slice_excluded_cell_list_nr_r17(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool nsag_cell_resel_prio_r17_present = false; + bool nsag_cell_resel_sub_prio_r17_present = false; + bool slice_cell_list_nr_r17_present = false; + nsag_id_info_r17_s nsag_id_info_r17; + uint8_t nsag_cell_resel_prio_r17 = 0; + cell_resel_sub_prio_e nsag_cell_resel_sub_prio_r17; + slice_cell_list_nr_r17_c_ slice_cell_list_nr_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TA-Info-r17 ::= SEQUENCE +struct ta_info_r17_s { + bool ta_common_drift_r17_present = false; + bool ta_common_drift_variant_r17_present = false; + uint32_t ta_common_r17 = 0; + int32_t ta_common_drift_r17 = -257303; + uint16_t ta_common_drift_variant_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BeamMeasConfigIdle-NR-r16 ::= SEQUENCE +struct beam_meas_cfg_idle_nr_r16_s { + struct report_quant_rs_idxes_r16_opts { + enum options { rsrp, rsrq, both, nulltype } value; + + const char* to_string() const; + }; + using report_quant_rs_idxes_r16_e_ = enumerated; + + // member variables + report_quant_rs_idxes_r16_e_ report_quant_rs_idxes_r16; + uint8_t max_nrof_rs_idxes_to_report_r16 = 1; + bool include_beam_meass_r16 = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CAG-IdentityInfo-r16 ::= SEQUENCE +struct cag_id_info_r16_s { + bool manual_ca_gsel_allowed_r16_present = false; + fixed_bitstring<32> cag_id_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellListEUTRA-r16 ::= SEQUENCE (SIZE (1..8)) OF EUTRA-PhysCellIdRange +using cell_list_eutra_r16_l = dyn_array; + +// CellListNR-r16 ::= SEQUENCE (SIZE (1..8)) OF PCI-Range +using cell_list_nr_r16_l = dyn_array; + +// EUTRA-AllowedMeasBandwidth ::= ENUMERATED +struct eutra_allowed_meas_bw_opts { + enum options { mbw6, mbw15, mbw25, mbw50, mbw75, mbw100, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; +}; +using eutra_allowed_meas_bw_e = enumerated; + +// EUTRA-FreqExcludedCellList ::= SEQUENCE (SIZE (1..16)) OF EUTRA-PhysCellIdRange +using eutra_freq_excluded_cell_list_l = dyn_array; + +// EUTRA-FreqNeighCellList ::= SEQUENCE (SIZE (1..8)) OF EUTRA-FreqNeighCellInfo +using eutra_freq_neigh_cell_list_l = dyn_array; + +// EUTRA-FreqNeighHSDN-CellList-r17 ::= SEQUENCE (SIZE (1..8)) OF EUTRA-PhysCellIdRange +using eutra_freq_neigh_hsdn_cell_list_r17_l = dyn_array; + +// EUTRA-MultiBandInfoList ::= SEQUENCE (SIZE (1..8)) OF EUTRA-MultiBandInfo +using eutra_multi_band_info_list_l = dyn_array; + +// InterFreqAllowedCellList-r16 ::= SEQUENCE (SIZE (1..16)) OF PCI-Range +using inter_freq_allowed_cell_list_r16_l = dyn_array; + +// InterFreqCAG-CellListPerPLMN-r16 ::= SEQUENCE +struct inter_freq_cag_cell_list_per_plmn_r16_s { + using cag_cell_list_r16_l_ = dyn_array; + + // member variables + uint8_t plmn_id_idx_r16 = 1; + cag_cell_list_r16_l_ cag_cell_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqExcludedCellList ::= SEQUENCE (SIZE (1..16)) OF PCI-Range +using inter_freq_excluded_cell_list_l = dyn_array; + +// InterFreqNeighCellList ::= SEQUENCE (SIZE (1..16)) OF InterFreqNeighCellInfo +using inter_freq_neigh_cell_list_l = dyn_array; + +// InterFreqNeighCellList-v1610 ::= SEQUENCE (SIZE (1..16)) OF InterFreqNeighCellInfo-v1610 +using inter_freq_neigh_cell_list_v1610_l = dyn_array; + +// InterFreqNeighCellList-v1710 ::= SEQUENCE (SIZE (1..16)) OF InterFreqNeighCellInfo-v1710 +using inter_freq_neigh_cell_list_v1710_l = dyn_array; + +// InterFreqNeighHSDN-CellList-r17 ::= SEQUENCE (SIZE (1..16)) OF PCI-Range +using inter_freq_neigh_hsdn_cell_list_r17_l = dyn_array; + +// MBS-FSAI-List-r17 ::= SEQUENCE (SIZE (1..64)) OF OCTET STRING (SIZE (3)) +using mbs_fsai_list_r17_l = dyn_array>; + +// MultiFrequencyBandListNR ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..1024) +using multi_freq_band_list_nr_l = bounded_array; + +// NTN-Config-r17 ::= SEQUENCE +struct ntn_cfg_r17_s { + struct ntn_ul_sync_validity_dur_r17_opts { + enum options { s5, s10, s15, s20, s25, s30, s35, s40, s45, s50, s55, s60, s120, s180, s240, s900, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using ntn_ul_sync_validity_dur_r17_e_ = enumerated; + struct ntn_polarization_dl_r17_opts { + enum options { rhcp, lhcp, linear, nulltype } value; + + const char* to_string() const; + }; + using ntn_polarization_dl_r17_e_ = enumerated; + struct ntn_polarization_ul_r17_opts { + enum options { rhcp, lhcp, linear, nulltype } value; + + const char* to_string() const; + }; + using ntn_polarization_ul_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool epoch_time_r17_present = false; + bool ntn_ul_sync_validity_dur_r17_present = false; + bool cell_specific_koffset_r17_present = false; + bool kmac_r17_present = false; + bool ta_info_r17_present = false; + bool ntn_polarization_dl_r17_present = false; + bool ntn_polarization_ul_r17_present = false; + bool ephemeris_info_r17_present = false; + bool ta_report_r17_present = false; + epoch_time_r17_s epoch_time_r17; + ntn_ul_sync_validity_dur_r17_e_ ntn_ul_sync_validity_dur_r17; + uint16_t cell_specific_koffset_r17 = 1; + uint16_t kmac_r17 = 1; + ta_info_r17_s ta_info_r17; + ntn_polarization_dl_r17_e_ ntn_polarization_dl_r17; + ntn_polarization_ul_r17_e_ ntn_polarization_ul_r17; + ephemeris_info_r17_c ephemeris_info_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-ConfigPTM-r17 ::= SEQUENCE +struct pdsch_cfg_ptm_r17_s { + struct pdsch_aggregation_factor_r17_opts { + enum options { n2, n4, n8, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using pdsch_aggregation_factor_r17_e_ = enumerated; + + // member variables + bool data_scrambling_id_pdsch_r17_present = false; + bool dmrs_scrambling_id0_r17_present = false; + bool pdsch_aggregation_factor_r17_present = false; + uint16_t data_scrambling_id_pdsch_r17 = 0; + uint32_t dmrs_scrambling_id0_r17 = 0; + pdsch_aggregation_factor_r17_e_ pdsch_aggregation_factor_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PosSIB-Type-r16 ::= SEQUENCE +struct pos_sib_type_r16_s { + struct pos_sib_type_r16_opts { + enum options { + pos_sib_type1_neg1, + pos_sib_type1_neg2, + pos_sib_type1_neg3, + pos_sib_type1_neg4, + pos_sib_type1_neg5, + pos_sib_type1_neg6, + pos_sib_type1_neg7, + pos_sib_type1_neg8, + pos_sib_type2_neg1, + pos_sib_type2_neg2, + pos_sib_type2_neg3, + pos_sib_type2_neg4, + pos_sib_type2_neg5, + pos_sib_type2_neg6, + pos_sib_type2_neg7, + pos_sib_type2_neg8, + pos_sib_type2_neg9, + pos_sib_type2_neg10, + pos_sib_type2_neg11, + pos_sib_type2_neg12, + pos_sib_type2_neg13, + pos_sib_type2_neg14, + pos_sib_type2_neg15, + pos_sib_type2_neg16, + pos_sib_type2_neg17, + pos_sib_type2_neg18, + pos_sib_type2_neg19, + pos_sib_type2_neg20, + pos_sib_type2_neg21, + pos_sib_type2_neg22, + pos_sib_type2_neg23, + pos_sib_type3_neg1, + pos_sib_type4_neg1, + pos_sib_type5_neg1, + pos_sib_type6_neg1, + pos_sib_type6_neg2, + pos_sib_type6_neg3, + // ... + nulltype + } value; + + const char* to_string() const; + }; + using pos_sib_type_r16_e_ = enumerated; + + // member variables + bool encrypted_r16_present = false; + bool gnss_id_r16_present = false; + bool sbas_id_r16_present = false; + bool area_scope_r16_present = false; + gnss_id_r16_s gnss_id_r16; + sbas_id_r16_s sbas_id_r16; + pos_sib_type_r16_e_ pos_sib_type_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SI-SchedulingInfo-v1740 ::= SEQUENCE +struct si_sched_info_v1740_s { + bool si_request_cfg_red_cap_r17_present = false; + si_request_cfg_s si_request_cfg_red_cap_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SS-RSSI-Measurement ::= SEQUENCE +struct ss_rssi_meas_s { + bounded_bitstring<1, 80> meas_slots; + uint8_t end_symbol = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SSB-MTC ::= SEQUENCE +struct ssb_mtc_s { + struct periodicity_and_offset_c_ { + struct types_opts { + enum options { sf5, sf10, sf20, sf40, sf80, sf160, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // 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 + uint8_t& sf5() + { + assert_choice_type(types::sf5, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sf10() + { + assert_choice_type(types::sf10, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sf20() + { + assert_choice_type(types::sf20, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sf40() + { + assert_choice_type(types::sf40, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sf80() + { + assert_choice_type(types::sf80, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& sf160() + { + assert_choice_type(types::sf160, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sf5() const + { + assert_choice_type(types::sf5, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sf10() const + { + assert_choice_type(types::sf10, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sf20() const + { + assert_choice_type(types::sf20, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sf40() const + { + assert_choice_type(types::sf40, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sf80() const + { + assert_choice_type(types::sf80, type_, "periodicityAndOffset"); + return c.get(); + } + const uint8_t& sf160() const + { + assert_choice_type(types::sf160, type_, "periodicityAndOffset"); + return c.get(); + } + uint8_t& set_sf5(); + uint8_t& set_sf10(); + uint8_t& set_sf20(); + uint8_t& set_sf40(); + uint8_t& set_sf80(); + uint8_t& set_sf160(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct dur_opts { + enum options { sf1, sf2, sf3, sf4, sf5, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using dur_e_ = enumerated; + + // member variables + periodicity_and_offset_c_ periodicity_and_offset; + dur_e_ dur; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SSB-MTC2-LP-r16 ::= SEQUENCE +struct ssb_mtc2_lp_r16_s { + using pci_list_l_ = dyn_array; + struct periodicity_opts { + enum options { sf10, sf20, sf40, sf80, sf160, spare3, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using periodicity_e_ = enumerated; + + // member variables + 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; +}; + +// SSB-MTC4List-r17 ::= SEQUENCE (SIZE (1..3)) OF SSB-MTC4-r17 +using ssb_mtc4_list_r17_l = dyn_array; + +// SSB-ToMeasure ::= CHOICE +struct ssb_to_measure_c { + struct types_opts { + enum options { short_bitmap, medium_bitmap, long_bitmap, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + ssb_to_measure_c() = default; + ssb_to_measure_c(const ssb_to_measure_c& other); + ssb_to_measure_c& operator=(const ssb_to_measure_c& other); + ~ssb_to_measure_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(types::short_bitmap, type_, "SSB-ToMeasure"); + return c.get>(); + } + fixed_bitstring<8>& medium_bitmap() + { + assert_choice_type(types::medium_bitmap, type_, "SSB-ToMeasure"); + return c.get>(); + } + fixed_bitstring<64>& long_bitmap() + { + assert_choice_type(types::long_bitmap, type_, "SSB-ToMeasure"); + return c.get>(); + } + const fixed_bitstring<4>& short_bitmap() const + { + assert_choice_type(types::short_bitmap, type_, "SSB-ToMeasure"); + return c.get>(); + } + const fixed_bitstring<8>& medium_bitmap() const + { + assert_choice_type(types::medium_bitmap, type_, "SSB-ToMeasure"); + return c.get>(); + } + const fixed_bitstring<64>& long_bitmap() const + { + assert_choice_type(types::long_bitmap, type_, "SSB-ToMeasure"); + return c.get>(); + } + fixed_bitstring<4>& set_short_bitmap(); + fixed_bitstring<8>& set_medium_bitmap(); + fixed_bitstring<64>& set_long_bitmap(); + +private: + types type_; + choice_buffer_t> c; + + void destroy_(); +}; + +// SchedulingInfo2-r17 ::= SEQUENCE +struct sched_info2_r17_s { + struct si_broadcast_status_r17_opts { + enum options { broadcasting, not_broadcasting, nulltype } value; + + const char* to_string() const; + }; + using si_broadcast_status_r17_e_ = enumerated; + struct si_periodicity_r17_opts { + enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using si_periodicity_r17_e_ = enumerated; + + // member variables + si_broadcast_status_r17_e_ si_broadcast_status_r17; + uint16_t si_win_position_r17 = 1; + si_periodicity_r17_e_ si_periodicity_r17; + sib_map_v1700_l sib_map_info_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SliceInfoList-r17 ::= SEQUENCE (SIZE (1..8)) OF SliceInfo-r17 +using slice_info_list_r17_l = dyn_array; + +// SpeedStateScaleFactors ::= SEQUENCE +struct speed_state_scale_factors_s { + struct sf_medium_opts { + enum options { odot25, odot5, odot75, ldot0, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using sf_medium_e_ = enumerated; + struct sf_high_opts { + enum options { odot25, odot5, odot75, ldot0, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using sf_high_e_ = enumerated; + + // member variables + sf_medium_e_ sf_medium; + sf_high_e_ sf_high; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ThresholdNR ::= SEQUENCE +struct thres_nr_s { + bool thres_rsrp_present = false; + bool thres_rsrq_present = false; + bool thres_sinr_present = false; + uint8_t thres_rsrp = 0; + uint8_t thres_rsrq = 0; + uint8_t thres_sinr = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UAC-BarringInfoSet-v1700 ::= SEQUENCE +struct uac_barr_info_set_v1700_s { + struct uac_barr_factor_for_ai3_r17_opts { + enum options { p00, p05, p10, p15, p20, p25, p30, p40, p50, p60, p70, p75, p80, p85, p90, p95, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using uac_barr_factor_for_ai3_r17_e_ = enumerated; + + // member variables + bool uac_barr_factor_for_ai3_r17_present = false; + uac_barr_factor_for_ai3_r17_e_ uac_barr_factor_for_ai3_r17; + + // 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 { + struct thresh_x_q_s_ { + uint8_t thresh_x_high_q = 0; + uint8_t thresh_x_low_q = 0; + }; + + // member variables + bool cell_resel_prio_present = false; + bool cell_resel_sub_prio_present = false; + bool thresh_x_q_present = false; + uint32_t carrier_freq = 0; + eutra_multi_band_info_list_l eutra_multi_band_info_list; + eutra_freq_neigh_cell_list_l eutra_freq_neigh_cell_list; + eutra_freq_excluded_cell_list_l eutra_excluded_cell_list; + eutra_allowed_meas_bw_e allowed_meas_bw; + bool presence_ant_port1 = false; + uint8_t cell_resel_prio = 0; + cell_resel_sub_prio_e cell_resel_sub_prio; + uint8_t thresh_x_high = 0; + uint8_t thresh_x_low = 0; + int8_t q_rx_lev_min = -70; + int8_t q_qual_min = -34; + int8_t p_max_eutra = -30; + thresh_x_q_s_ thresh_x_q; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqEUTRA-v1610 ::= SEQUENCE +struct carrier_freq_eutra_v1610_s { + bool high_speed_eutra_carrier_r16_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqEUTRA-v1700 ::= SEQUENCE +struct carrier_freq_eutra_v1700_s { + eutra_freq_neigh_hsdn_cell_list_r17_l eutra_freq_neigh_hsdn_cell_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FreqPrioritySlicing-r17 ::= SEQUENCE +struct freq_prio_slicing_r17_s { + uint8_t dl_implicit_carrier_freq_r17 = 0; + slice_info_list_r17_l slice_info_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HRNN-r16 ::= SEQUENCE +struct hrnn_r16_s { + bounded_octstring<1, 48> hrnn_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqInfo ::= SEQUENCE +struct inter_freq_carrier_freq_info_s { + struct thresh_x_q_s_ { + uint8_t thresh_x_high_q = 0; + uint8_t thresh_x_low_q = 0; + }; + + // member variables + bool ext = false; + bool nrof_ss_blocks_to_average_present = false; + bool abs_thresh_ss_blocks_consolidation_present = false; + bool smtc_present = false; + bool ssb_to_measure_present = false; + bool ss_rssi_meas_present = false; + bool q_rx_lev_min_sul_present = false; + bool q_qual_min_present = false; + bool p_max_present = false; + bool t_resel_nr_sf_present = false; + bool thresh_x_q_present = false; + bool cell_resel_prio_present = false; + bool cell_resel_sub_prio_present = false; + bool q_offset_freq_present = false; + uint32_t dl_carrier_freq = 0; + multi_freq_band_list_nr_sib_l freq_band_list; + multi_freq_band_list_nr_sib_l freq_band_list_sul; + uint8_t nrof_ss_blocks_to_average = 2; + thres_nr_s abs_thresh_ss_blocks_consolidation; + ssb_mtc_s smtc; + subcarrier_spacing_e ssb_subcarrier_spacing; + ssb_to_measure_c ssb_to_measure; + bool derive_ssb_idx_from_cell = false; + ss_rssi_meas_s ss_rssi_meas; + int8_t q_rx_lev_min = -70; + int8_t q_rx_lev_min_sul = -70; + int8_t q_qual_min = -43; + int8_t p_max = -30; + uint8_t t_resel_nr = 0; + speed_state_scale_factors_s t_resel_nr_sf; + uint8_t thresh_x_high_p = 0; + uint8_t thresh_x_low_p = 0; + thresh_x_q_s_ thresh_x_q; + uint8_t cell_resel_prio = 0; + cell_resel_sub_prio_e cell_resel_sub_prio; + q_offset_range_e q_offset_freq; + inter_freq_neigh_cell_list_l inter_freq_neigh_cell_list; + inter_freq_excluded_cell_list_l inter_freq_excluded_cell_list; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqInfo-v1610 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v1610_s { + using inter_freq_cag_cell_list_r16_l_ = dyn_array; + + // member variables + bool smtc2_lp_r16_present = false; + bool ssb_position_qcl_common_r16_present = false; + inter_freq_neigh_cell_list_v1610_l inter_freq_neigh_cell_list_v1610; + ssb_mtc2_lp_r16_s smtc2_lp_r16; + inter_freq_allowed_cell_list_r16_l inter_freq_allowed_cell_list_r16; + ssb_position_qcl_relation_r16_e ssb_position_qcl_common_r16; + inter_freq_cag_cell_list_r16_l_ inter_freq_cag_cell_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqInfo-v1700 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v1700_s { + bool high_speed_meas_inter_freq_r17_present = false; + bool red_cap_access_allowed_r17_present = false; + bool ssb_position_qcl_common_r17_present = false; + inter_freq_neigh_hsdn_cell_list_r17_l inter_freq_neigh_hsdn_cell_list_r17; + ssb_position_qcl_relation_r17_e ssb_position_qcl_common_r17; + inter_freq_neigh_cell_list_v1710_l inter_freq_neigh_cell_list_v1710; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqInfo-v1720 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v1720_s { + ssb_mtc4_list_r17_l smtc4list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// InterFreqCarrierFreqInfo-v1730 ::= SEQUENCE +struct inter_freq_carrier_freq_info_v1730_s { + bool ch_access_mode2_r17_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IntraFreqNeighCellInfo ::= SEQUENCE +struct intra_freq_neigh_cell_info_s { + bool ext = false; + bool q_rx_lev_min_offset_cell_present = false; + bool q_rx_lev_min_offset_cell_sul_present = false; + bool q_qual_min_offset_cell_present = false; + uint16_t pci = 0; + q_offset_range_e q_offset_cell; + uint8_t q_rx_lev_min_offset_cell = 1; + uint8_t q_rx_lev_min_offset_cell_sul = 1; + uint8_t q_qual_min_offset_cell = 1; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IntraFreqNeighCellInfo-v1610 ::= SEQUENCE +struct intra_freq_neigh_cell_info_v1610_s { + bool ssb_position_qcl_r16_present = false; + ssb_position_qcl_relation_r16_e ssb_position_qcl_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IntraFreqNeighCellInfo-v1710 ::= SEQUENCE +struct intra_freq_neigh_cell_info_v1710_s { + bool ssb_position_qcl_r17_present = false; + ssb_position_qcl_relation_r17_e ssb_position_qcl_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LocationAndBandwidthBroadcast-r17 ::= CHOICE +struct location_and_bw_broadcast_r17_c { + struct types_opts { + enum options { same_as_sib1_cfg_location_and_bw, location_and_bw, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + location_and_bw_broadcast_r17_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 + uint16_t& location_and_bw() + { + assert_choice_type(types::location_and_bw, type_, "LocationAndBandwidthBroadcast-r17"); + return c; + } + const uint16_t& location_and_bw() const + { + assert_choice_type(types::location_and_bw, type_, "LocationAndBandwidthBroadcast-r17"); + return c; + } + void set_same_as_sib1_cfg_location_and_bw(); + uint16_t& set_location_and_bw(); + +private: + types type_; + uint16_t c; +}; + +// MBS-FSAI-InterFreq-r17 ::= SEQUENCE +struct mbs_fsai_inter_freq_r17_s { + uint32_t dl_carrier_freq_r17 = 0; + mbs_fsai_list_r17_l mbs_fsai_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MCCH-RepetitionPeriodAndOffset-r17 ::= CHOICE +struct mcch_repeat_period_and_offset_r17_c { + struct types_opts { + enum options { + rf1_r17, + rf2_r17, + rf4_r17, + rf8_r17, + rf16_r17, + rf32_r17, + rf64_r17, + rf128_r17, + rf256_r17, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + mcch_repeat_period_and_offset_r17_c() = default; + mcch_repeat_period_and_offset_r17_c(const mcch_repeat_period_and_offset_r17_c& other); + mcch_repeat_period_and_offset_r17_c& operator=(const mcch_repeat_period_and_offset_r17_c& other); + ~mcch_repeat_period_and_offset_r17_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& rf1_r17() + { + assert_choice_type(types::rf1_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + uint8_t& rf2_r17() + { + assert_choice_type(types::rf2_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + uint8_t& rf4_r17() + { + assert_choice_type(types::rf4_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + uint8_t& rf8_r17() + { + assert_choice_type(types::rf8_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + uint8_t& rf16_r17() + { + assert_choice_type(types::rf16_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + uint8_t& rf32_r17() + { + assert_choice_type(types::rf32_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + uint8_t& rf64_r17() + { + assert_choice_type(types::rf64_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + uint8_t& rf128_r17() + { + assert_choice_type(types::rf128_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + uint16_t& rf256_r17() + { + assert_choice_type(types::rf256_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + const uint8_t& rf1_r17() const + { + assert_choice_type(types::rf1_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + const uint8_t& rf2_r17() const + { + assert_choice_type(types::rf2_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + const uint8_t& rf4_r17() const + { + assert_choice_type(types::rf4_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + const uint8_t& rf8_r17() const + { + assert_choice_type(types::rf8_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + const uint8_t& rf16_r17() const + { + assert_choice_type(types::rf16_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + const uint8_t& rf32_r17() const + { + assert_choice_type(types::rf32_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + const uint8_t& rf64_r17() const + { + assert_choice_type(types::rf64_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + const uint8_t& rf128_r17() const + { + assert_choice_type(types::rf128_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + const uint16_t& rf256_r17() const + { + assert_choice_type(types::rf256_r17, type_, "MCCH-RepetitionPeriodAndOffset-r17"); + return c.get(); + } + uint8_t& set_rf1_r17(); + uint8_t& set_rf2_r17(); + uint8_t& set_rf4_r17(); + uint8_t& set_rf8_r17(); + uint8_t& set_rf16_r17(); + uint8_t& set_rf32_r17(); + uint8_t& set_rf64_r17(); + uint8_t& set_rf128_r17(); + uint16_t& set_rf256_r17(); + +private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); +}; + +// MeasIdleCarrierEUTRA-r16 ::= SEQUENCE +struct meas_idle_carrier_eutra_r16_s { + struct report_quantities_eutra_r16_opts { + enum options { rsrp, rsrq, both, nulltype } value; + + const char* to_string() const; + }; + using report_quantities_eutra_r16_e_ = enumerated; + struct quality_thres_eutra_r16_s_ { + bool idle_rsrp_thres_eutra_r16_present = false; + bool idle_rsrq_thres_eutra_r16_present = false; + uint8_t idle_rsrp_thres_eutra_r16 = 0; + int8_t idle_rsrq_thres_eutra_r16 = -30; + }; + + // member variables + bool ext = false; + bool quality_thres_eutra_r16_present = false; + uint32_t carrier_freq_eutra_r16 = 0; + eutra_allowed_meas_bw_e allowed_meas_bw_r16; + cell_list_eutra_r16_l meas_cell_list_eutra_r16; + report_quantities_eutra_r16_e_ report_quantities_eutra_r16; + quality_thres_eutra_r16_s_ quality_thres_eutra_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasIdleCarrierNR-r16 ::= SEQUENCE +struct meas_idle_carrier_nr_r16_s { + struct report_quantities_r16_opts { + enum options { rsrp, rsrq, both, nulltype } value; + + const char* to_string() const; + }; + using report_quantities_r16_e_ = enumerated; + struct quality_thres_r16_s_ { + bool idle_rsrp_thres_nr_r16_present = false; + bool idle_rsrq_thres_nr_r16_present = false; + uint8_t idle_rsrp_thres_nr_r16 = 0; + uint8_t idle_rsrq_thres_nr_r16 = 0; + }; + struct ssb_meas_cfg_r16_s_ { + bool nrof_ss_blocks_to_average_r16_present = false; + bool abs_thresh_ss_blocks_consolidation_r16_present = false; + bool smtc_r16_present = false; + bool ssb_to_measure_r16_present = false; + bool ss_rssi_meas_r16_present = false; + uint8_t nrof_ss_blocks_to_average_r16 = 2; + thres_nr_s abs_thresh_ss_blocks_consolidation_r16; + ssb_mtc_s smtc_r16; + ssb_to_measure_c ssb_to_measure_r16; + bool derive_ssb_idx_from_cell_r16 = false; + ss_rssi_meas_s ss_rssi_meas_r16; + }; + + // member variables + bool ext = false; + bool quality_thres_r16_present = false; + bool ssb_meas_cfg_r16_present = false; + bool beam_meas_cfg_idle_r16_present = false; + uint32_t carrier_freq_r16 = 0; + subcarrier_spacing_e ssb_subcarrier_spacing_r16; + multi_freq_band_list_nr_l freq_band_list; + cell_list_nr_r16_l meas_cell_list_nr_r16; + report_quantities_r16_e_ report_quantities_r16; + quality_thres_r16_s_ quality_thres_r16; + ssb_meas_cfg_r16_s_ ssb_meas_cfg_r16; + beam_meas_cfg_idle_nr_r16_s beam_meas_cfg_idle_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NPN-Identity-r16 ::= CHOICE +struct npn_id_r16_c { + struct pni_npn_r16_s_ { + using cag_id_list_r16_l_ = dyn_array; + + // member variables + plmn_id_s plmn_id_r16; + cag_id_list_r16_l_ cag_id_list_r16; + }; + struct snpn_r16_s_ { + using nid_list_r16_l_ = bounded_array, 12>; + + // member variables + plmn_id_s plmn_id_r16; + nid_list_r16_l_ nid_list_r16; + }; + struct types_opts { + enum options { pni_npn_r16, snpn_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + npn_id_r16_c() = default; + npn_id_r16_c(const npn_id_r16_c& other); + npn_id_r16_c& operator=(const npn_id_r16_c& other); + ~npn_id_r16_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 + pni_npn_r16_s_& pni_npn_r16() + { + assert_choice_type(types::pni_npn_r16, type_, "NPN-Identity-r16"); + return c.get(); + } + snpn_r16_s_& snpn_r16() + { + assert_choice_type(types::snpn_r16, type_, "NPN-Identity-r16"); + return c.get(); + } + const pni_npn_r16_s_& pni_npn_r16() const + { + assert_choice_type(types::pni_npn_r16, type_, "NPN-Identity-r16"); + return c.get(); + } + const snpn_r16_s_& snpn_r16() const + { + assert_choice_type(types::snpn_r16, type_, "NPN-Identity-r16"); + return c.get(); + } + pni_npn_r16_s_& set_pni_npn_r16(); + snpn_r16_s_& set_snpn_r16(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// NTN-NeighCellConfig-r17 ::= SEQUENCE +struct ntn_neigh_cell_cfg_r17_s { + bool ntn_cfg_r17_present = false; + bool carrier_freq_r17_present = false; + bool pci_r17_present = false; + ntn_cfg_r17_s ntn_cfg_r17; + uint32_t carrier_freq_r17 = 0; + uint16_t pci_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDSCH-ConfigBroadcast-r17 ::= SEQUENCE +struct pdsch_cfg_broadcast_r17_s { + using pdsch_cfg_list_r17_l_ = dyn_array; + using rate_match_pattern_to_add_mod_list_r17_l_ = dyn_array; + struct mcs_table_r17_opts { + enum options { qam256, qam64_low_se, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using mcs_table_r17_e_ = enumerated; + struct xoverhead_r17_opts { + enum options { xoh6, xoh12, xoh18, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using xoverhead_r17_e_ = enumerated; + + // member variables + bool lte_crs_to_match_around_r17_present = false; + bool mcs_table_r17_present = false; + bool xoverhead_r17_present = false; + pdsch_cfg_list_r17_l_ pdsch_cfg_list_r17; + pdsch_time_domain_res_alloc_list_r16_l pdsch_time_domain_alloc_list_r17; + rate_match_pattern_to_add_mod_list_r17_l_ rate_match_pattern_to_add_mod_list_r17; + rate_match_pattern_lte_crs_s lte_crs_to_match_around_r17; + mcs_table_r17_e_ mcs_table_r17; + xoverhead_r17_e_ xoverhead_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PosSIB-MappingInfo-r16 ::= SEQUENCE (SIZE (1..32)) OF PosSIB-Type-r16 +using pos_sib_map_info_r16_l = dyn_array; + +// RedCap-ConfigCommonSIB-r17 ::= SEQUENCE +struct red_cap_cfg_common_sib_r17_s { + struct cell_barred_red_cap_r17_s_ { + struct cell_barred_red_cap1_rx_r17_opts { + enum options { barred, not_barred, nulltype } value; + + const char* to_string() const; + }; + using cell_barred_red_cap1_rx_r17_e_ = enumerated; + struct cell_barred_red_cap2_rx_r17_opts { + enum options { barred, not_barred, nulltype } value; + + const char* to_string() const; + }; + using cell_barred_red_cap2_rx_r17_e_ = enumerated; + + // member variables + cell_barred_red_cap1_rx_r17_e_ cell_barred_red_cap1_rx_r17; + cell_barred_red_cap2_rx_r17_e_ cell_barred_red_cap2_rx_r17; + }; + + // member variables + bool ext = false; + bool half_duplex_red_cap_allowed_r17_present = false; + bool cell_barred_red_cap_r17_present = false; + cell_barred_red_cap_r17_s_ cell_barred_red_cap_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReferenceTime-r16 ::= SEQUENCE +struct ref_time_r16_s { + uint32_t ref_days_r16 = 0; + uint32_t ref_seconds_r16 = 0; + uint16_t ref_milli_seconds_r16 = 0; + uint32_t ref_ten_nano_seconds_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SDT-ConfigCommonSIB-r17 ::= SEQUENCE +struct sdt_cfg_common_sib_r17_s { + struct sdt_lc_ch_sr_delay_timer_r17_opts { + enum options { sf20, sf40, sf64, sf128, sf512, sf1024, sf2560, spare1, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using sdt_lc_ch_sr_delay_timer_r17_e_ = enumerated; + struct sdt_data_volume_thres_r17_opts { + enum options { + byte32, + byte100, + byte200, + byte400, + byte600, + byte800, + byte1000, + byte2000, + byte4000, + byte8000, + byte9000, + byte10000, + byte12000, + byte24000, + byte48000, + byte96000, + nulltype + } value; + typedef uint32_t number_type; + + const char* to_string() const; + uint32_t to_number() const; + }; + using sdt_data_volume_thres_r17_e_ = enumerated; + struct t319a_r17_opts { + enum options { + ms100, + ms200, + ms300, + ms400, + ms600, + ms1000, + ms2000, + ms3000, + ms4000, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using t319a_r17_e_ = enumerated; + + // member variables + bool sdt_rsrp_thres_r17_present = false; + bool sdt_lc_ch_sr_delay_timer_r17_present = false; + uint8_t sdt_rsrp_thres_r17 = 0; + sdt_lc_ch_sr_delay_timer_r17_e_ sdt_lc_ch_sr_delay_timer_r17; + sdt_data_volume_thres_r17_e_ sdt_data_volume_thres_r17; + t319a_r17_e_ t319a_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SI-SchedulingInfo-v1700 ::= SEQUENCE +struct si_sched_info_v1700_s { + using sched_info_list2_r17_l_ = dyn_array; + + // member variables + bool dummy_present = false; + sched_info_list2_r17_l_ sched_info_list2_r17; + si_request_cfg_s dummy; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB-TypeInfo ::= SEQUENCE +struct sib_type_info_s { + struct type_opts { + enum options { + sib_type2, + sib_type3, + sib_type4, + sib_type5, + sib_type6, + sib_type7, + sib_type8, + sib_type9, + sib_type10_v1610, + sib_type11_v1610, + sib_type12_v1610, + sib_type13_v1610, + sib_type14_v1610, + spare3, + spare2, + spare1, + // ... + nulltype + } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using type_e_ = enumerated; + + // member variables + bool value_tag_present = false; + bool area_scope_present = false; + type_e_ type; + uint8_t value_tag = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB1-v1740-IEs ::= SEQUENCE +struct sib1_v1740_ies_s { + bool si_sched_info_v1740_present = false; + bool non_crit_ext_present = false; + si_sched_info_v1740_s si_sched_info_v1740; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UAC-BarringInfoSetList-v1700 ::= SEQUENCE (SIZE (1..8)) OF UAC-BarringInfoSet-v1700 +using uac_barr_info_set_list_v1700_l = dyn_array; + +// UAC-BarringPerCat ::= SEQUENCE +struct uac_barr_per_cat_s { + uint8_t access_category = 1; + uint8_t uac_barr_info_set_idx = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ApplicableDisasterInfo-r17 ::= CHOICE +struct applicable_disaster_info_r17_c { + using ded_plmns_r17_l_ = dyn_array; + struct types_opts { + enum options { no_disaster_roaming_r17, disaster_related_ind_r17, common_plmns_r17, ded_plmns_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + applicable_disaster_info_r17_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 + ded_plmns_r17_l_& ded_plmns_r17() + { + assert_choice_type(types::ded_plmns_r17, type_, "ApplicableDisasterInfo-r17"); + return c; + } + const ded_plmns_r17_l_& ded_plmns_r17() const + { + assert_choice_type(types::ded_plmns_r17, type_, "ApplicableDisasterInfo-r17"); + return c; + } + void set_no_disaster_roaming_r17(); + void set_disaster_related_ind_r17(); + void set_common_plmns_r17(); + ded_plmns_r17_l_& set_ded_plmns_r17(); + +private: + types type_; + ded_plmns_r17_l_ c; +}; + +// CFR-ConfigMCCH-MTCH-r17 ::= SEQUENCE +struct cfr_cfg_mcch_mtch_r17_s { + bool location_and_bw_broadcast_r17_present = false; + bool pdsch_cfg_mcch_r17_present = false; + bool common_coreset_ext_r17_present = false; + location_and_bw_broadcast_r17_c location_and_bw_broadcast_r17; + pdsch_cfg_broadcast_r17_s pdsch_cfg_mcch_r17; + coreset_s common_coreset_ext_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CarrierFreqListEUTRA ::= SEQUENCE (SIZE (1..8)) OF CarrierFreqEUTRA +using carrier_freq_list_eutra_l = dyn_array; + +// CarrierFreqListEUTRA-v1610 ::= SEQUENCE (SIZE (1..8)) OF CarrierFreqEUTRA-v1610 +using carrier_freq_list_eutra_v1610_l = dyn_array; + +// CarrierFreqListEUTRA-v1700 ::= SEQUENCE (SIZE (1..8)) OF CarrierFreqEUTRA-v1700 +using carrier_freq_list_eutra_v1700_l = dyn_array; + +// FreqPriorityListSlicing-r17 ::= SEQUENCE (SIZE (1..9)) OF FreqPrioritySlicing-r17 +using freq_prio_list_slicing_r17_l = dyn_array; + +// GIN-Element-r17 ::= SEQUENCE +struct gin_elem_r17_s { + using nid_list_r17_l_ = bounded_array, 24>; + + // member variables + plmn_id_s plmn_id_r17; + nid_list_r17_l_ nid_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// GINs-PerSNPN-r17 ::= SEQUENCE +struct gi_ns_per_sn_pn_r17_s { + bool supported_gi_ns_r17_present = false; + bounded_bitstring<1, 24> supported_gi_ns_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// HRNN-List-r16 ::= SEQUENCE (SIZE (1..12)) OF HRNN-r16 +using hrnn_list_r16_l = dyn_array; + +// InterFreqCarrierFreqList ::= SEQUENCE (SIZE (1..8)) OF InterFreqCarrierFreqInfo +using inter_freq_carrier_freq_list_l = dyn_array; + +// InterFreqCarrierFreqList-v1610 ::= SEQUENCE (SIZE (1..8)) OF InterFreqCarrierFreqInfo-v1610 +using inter_freq_carrier_freq_list_v1610_l = dyn_array; + +// InterFreqCarrierFreqList-v1700 ::= SEQUENCE (SIZE (1..8)) OF InterFreqCarrierFreqInfo-v1700 +using inter_freq_carrier_freq_list_v1700_l = dyn_array; + +// InterFreqCarrierFreqList-v1720 ::= SEQUENCE (SIZE (1..8)) OF InterFreqCarrierFreqInfo-v1720 +using inter_freq_carrier_freq_list_v1720_l = dyn_array; + +// InterFreqCarrierFreqList-v1730 ::= SEQUENCE (SIZE (1..8)) OF InterFreqCarrierFreqInfo-v1730 +using inter_freq_carrier_freq_list_v1730_l = dyn_array; + +// IntraFreqAllowedCellList-r16 ::= SEQUENCE (SIZE (1..16)) OF PCI-Range +using intra_freq_allowed_cell_list_r16_l = dyn_array; + +// IntraFreqCAG-CellListPerPLMN-r16 ::= SEQUENCE +struct intra_freq_cag_cell_list_per_plmn_r16_s { + using cag_cell_list_r16_l_ = dyn_array; + + // member variables + uint8_t plmn_id_idx_r16 = 1; + cag_cell_list_r16_l_ cag_cell_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IntraFreqExcludedCellList ::= SEQUENCE (SIZE (1..16)) OF PCI-Range +using intra_freq_excluded_cell_list_l = dyn_array; + +// IntraFreqNeighCellList ::= SEQUENCE (SIZE (1..16)) OF IntraFreqNeighCellInfo +using intra_freq_neigh_cell_list_l = dyn_array; + +// IntraFreqNeighCellList-v1610 ::= SEQUENCE (SIZE (1..16)) OF IntraFreqNeighCellInfo-v1610 +using intra_freq_neigh_cell_list_v1610_l = dyn_array; + +// IntraFreqNeighCellList-v1710 ::= SEQUENCE (SIZE (1..16)) OF IntraFreqNeighCellInfo-v1710 +using intra_freq_neigh_cell_list_v1710_l = dyn_array; + +// IntraFreqNeighHSDN-CellList-r17 ::= SEQUENCE (SIZE (1..16)) OF PCI-Range +using intra_freq_neigh_hsdn_cell_list_r17_l = dyn_array; + +// MBS-FSAI-InterFreqList-r17 ::= SEQUENCE (SIZE (1..8)) OF MBS-FSAI-InterFreq-r17 +using mbs_fsai_inter_freq_list_r17_l = dyn_array; + +// MCCH-Config-r17 ::= SEQUENCE +struct mcch_cfg_r17_s { + struct mcch_win_dur_r17_opts { + enum options { sl2, sl4, sl8, sl10, sl20, sl40, sl80, sl160, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using mcch_win_dur_r17_e_ = enumerated; + struct mcch_mod_period_r17_opts { + enum options { + rf2, + rf4, + rf8, + rf16, + rf32, + rf64, + rf128, + rf256, + rf512, + rf1024, + r2048, + rf4096, + rf8192, + rf16384, + rf32768, + rf65536, + nulltype + } value; + typedef uint32_t number_type; + + const char* to_string() const; + uint32_t to_number() const; + }; + using mcch_mod_period_r17_e_ = enumerated; + + // member variables + bool mcch_win_dur_r17_present = false; + mcch_repeat_period_and_offset_r17_c mcch_repeat_period_and_offset_r17; + uint8_t mcch_win_start_slot_r17 = 0; + mcch_win_dur_r17_e_ mcch_win_dur_r17; + mcch_mod_period_r17_e_ mcch_mod_period_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasIdleConfigSIB-r16 ::= SEQUENCE +struct meas_idle_cfg_sib_r16_s { + using meas_idle_carrier_list_nr_r16_l_ = dyn_array; + using meas_idle_carrier_list_eutra_r16_l_ = dyn_array; + + // member variables + bool ext = false; + meas_idle_carrier_list_nr_r16_l_ meas_idle_carrier_list_nr_r16; + meas_idle_carrier_list_eutra_r16_l_ meas_idle_carrier_list_eutra_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MobilityStateParameters ::= SEQUENCE +struct mob_state_params_s { + struct t_eval_opts { + enum options { s30, s60, s120, s180, s240, spare3, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using t_eval_e_ = enumerated; + struct t_hyst_normal_opts { + enum options { s30, s60, s120, s180, s240, spare3, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using t_hyst_normal_e_ = enumerated; + + // member variables + t_eval_e_ t_eval; + t_hyst_normal_e_ t_hyst_normal; + uint8_t n_cell_change_medium = 1; + uint8_t n_cell_change_high = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NPN-IdentityInfo-r16 ::= SEQUENCE +struct npn_id_info_r16_s { + using npn_id_list_r16_l_ = dyn_array; + struct cell_reserved_for_oper_r16_opts { + enum options { reserved, not_reserved, nulltype } value; + + const char* to_string() const; + }; + using cell_reserved_for_oper_r16_e_ = enumerated; + + // member variables + bool ext = false; + bool ranac_r16_present = false; + bool iab_support_r16_present = false; + npn_id_list_r16_l_ npn_id_list_r16; + fixed_bitstring<24> tac_r16; + uint16_t ranac_r16 = 0; + fixed_bitstring<36> cell_id_r16; + cell_reserved_for_oper_r16_e_ cell_reserved_for_oper_r16; + // ... + // group 0 + bool gnb_id_len_r17_present = false; + uint8_t gnb_id_len_r17 = 22; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NTN-NeighCellConfigList-r17 ::= SEQUENCE (SIZE (1..4)) OF NTN-NeighCellConfig-r17 +using ntn_neigh_cell_cfg_list_r17_l = dyn_array; + +// PLMN-IdentityInfo ::= SEQUENCE +struct plmn_id_info_s { + using plmn_id_list_l_ = dyn_array; + struct cell_reserved_for_oper_opts { + enum options { reserved, not_reserved, nulltype } value; + + const char* to_string() const; + }; + using cell_reserved_for_oper_e_ = enumerated; + using tracking_area_list_r17_l_ = bounded_array, 12>; + + // member variables + bool ext = false; + bool tac_present = false; + bool ranac_present = false; + plmn_id_list_l_ plmn_id_list; + fixed_bitstring<24> tac; + uint16_t ranac = 0; + fixed_bitstring<36> cell_id; + cell_reserved_for_oper_e_ cell_reserved_for_oper; + // ... + // group 0 + bool iab_support_r16_present = false; + // group 1 + bool gnb_id_len_r17_present = false; + copy_ptr tracking_area_list_r17; + uint8_t gnb_id_len_r17 = 22; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PosSchedulingInfo-r16 ::= SEQUENCE +struct pos_sched_info_r16_s { + struct pos_si_periodicity_r16_opts { + enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using pos_si_periodicity_r16_e_ = enumerated; + struct pos_si_broadcast_status_r16_opts { + enum options { broadcasting, not_broadcasting, nulltype } value; + + const char* to_string() const; + }; + using pos_si_broadcast_status_r16_e_ = enumerated; + + // member variables + bool ext = false; + bool offset_to_si_used_r16_present = false; + pos_si_periodicity_r16_e_ pos_si_periodicity_r16; + pos_si_broadcast_status_r16_e_ pos_si_broadcast_status_r16; + pos_sib_map_info_r16_l pos_sib_map_info_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RangeToBestCell ::= Q-OffsetRange +using range_to_best_cell_e = q_offset_range_e; + +// ReferenceTimeInfo-r16 ::= SEQUENCE +struct ref_time_info_r16_s { + bool uncertainty_r16_present = false; + bool time_info_type_r16_present = false; + bool ref_sfn_r16_present = false; + ref_time_r16_s time_r16; + uint16_t uncertainty_r16 = 0; + uint16_t ref_sfn_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB-Mapping ::= SEQUENCE (SIZE (1..32)) OF SIB-TypeInfo +using sib_map_l = dyn_array; + +// SIB1-v1700-IEs ::= SEQUENCE +struct sib1_v1700_ies_s { + struct uac_barr_info_v1700_s_ { + uac_barr_info_set_list_v1700_l uac_barr_info_set_list_v1700; + }; + struct feature_priorities_r17_s_ { + bool red_cap_prio_r17_present = false; + bool slicing_prio_r17_present = false; + bool msg3_repeats_prio_r17_present = false; + bool sdt_prio_r17_present = false; + uint8_t red_cap_prio_r17 = 0; + uint8_t slicing_prio_r17 = 0; + uint8_t msg3_repeats_prio_r17 = 0; + uint8_t sdt_prio_r17 = 0; + }; + struct intra_freq_resel_red_cap_r17_opts { + enum options { allowed, not_allowed, nulltype } value; + + const char* to_string() const; + }; + using intra_freq_resel_red_cap_r17_e_ = enumerated; + struct cell_barred_ntn_r17_opts { + enum options { barred, not_barred, nulltype } value; + + const char* to_string() const; + }; + using cell_barred_ntn_r17_e_ = enumerated; + + // member variables + bool hsdn_cell_r17_present = false; + bool uac_barr_info_v1700_present = false; + bool sdt_cfg_common_r17_present = false; + bool red_cap_cfg_common_r17_present = false; + bool feature_priorities_r17_present = false; + bool si_sched_info_v1700_present = false; + bool hyper_sfn_r17_present = false; + bool edrx_allowed_idle_r17_present = false; + bool edrx_allowed_inactive_r17_present = false; + bool intra_freq_resel_red_cap_r17_present = false; + bool cell_barred_ntn_r17_present = false; + bool non_crit_ext_present = false; + uac_barr_info_v1700_s_ uac_barr_info_v1700; + sdt_cfg_common_sib_r17_s sdt_cfg_common_r17; + red_cap_cfg_common_sib_r17_s red_cap_cfg_common_r17; + feature_priorities_r17_s_ feature_priorities_r17; + si_sched_info_v1700_s si_sched_info_v1700; + fixed_bitstring<10> hyper_sfn_r17; + intra_freq_resel_red_cap_r17_e_ intra_freq_resel_red_cap_r17; + cell_barred_ntn_r17_e_ cell_barred_ntn_r17; + sib1_v1740_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; +}; + +// UAC-AC1-SelectAssistInfo-r16 ::= ENUMERATED +struct uac_ac1_select_assist_info_r16_opts { + enum options { a, b, c, not_cfg, nulltype } value; + + const char* to_string() const; +}; +using uac_ac1_select_assist_info_r16_e = enumerated; + +// UAC-BarringPerCatList ::= SEQUENCE (SIZE (1..63)) OF UAC-BarringPerCat +using uac_barr_per_cat_list_l = dyn_array; + +// NPN-IdentityInfoList-r16 ::= SEQUENCE (SIZE (1..12)) OF NPN-IdentityInfo-r16 +using npn_id_info_list_r16_l = dyn_array; + +// PLMN-IdentityInfoList ::= SEQUENCE (SIZE (1..12)) OF PLMN-IdentityInfo +using plmn_id_info_list_l = dyn_array; + +// PosSI-SchedulingInfo-r16 ::= SEQUENCE +struct pos_si_sched_info_r16_s { + using pos_sched_info_list_r16_l_ = dyn_array; + + // member variables + bool ext = false; + bool pos_si_request_cfg_r16_present = false; + bool pos_si_request_cfg_sul_r16_present = false; + pos_sched_info_list_r16_l_ pos_sched_info_list_r16; + si_request_cfg_s pos_si_request_cfg_r16; + si_request_cfg_s pos_si_request_cfg_sul_r16; + // ... + // group 0 + copy_ptr pos_si_request_cfg_red_cap_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB1-v1630-IEs ::= SEQUENCE +struct sib1_v1630_ies_s { + struct uac_barr_info_v1630_s_ { + using uac_ac1_select_assist_info_r16_l_ = bounded_array; + + // member variables + uac_ac1_select_assist_info_r16_l_ uac_ac1_select_assist_info_r16; + }; + + // member variables + bool uac_barr_info_v1630_present = false; + bool non_crit_ext_present = false; + uac_barr_info_v1630_s_ uac_barr_info_v1630; + sib1_v1700_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; +}; + +// SIB10-r16 ::= SEQUENCE +struct sib10_r16_s { + bool ext = false; + hrnn_list_r16_l hrnn_list_r16; + 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; +}; + +// SIB11-r16 ::= SEQUENCE +struct sib11_r16_s { + bool ext = false; + bool meas_idle_cfg_sib_r16_present = false; + meas_idle_cfg_sib_r16_s meas_idle_cfg_sib_r16; + 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; +}; + +// SIB12-r16 ::= SEQUENCE +struct sib12_r16_s { + struct segment_type_r16_opts { + enum options { not_last_segment, last_segment, nulltype } value; + + const char* to_string() const; + }; + using segment_type_r16_e_ = enumerated; + + // member variables + uint8_t segment_num_r16 = 0; + segment_type_r16_e_ segment_type_r16; + dyn_octstring segment_container_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB13-r16 ::= SEQUENCE +struct sib13_r16_s { + bool ext = false; + dyn_octstring sl_v2x_cfg_common_r16; + dyn_octstring dummy; + dyn_octstring tdd_cfg_r16; + 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; +}; + +// SIB14-r16 ::= SEQUENCE +struct sib14_r16_s { + bool ext = false; + dyn_octstring sl_v2x_cfg_common_ext_r16; + 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; +}; + +// SIB15-r17 ::= SEQUENCE +struct sib15_r17_s { + using common_plmns_with_disaster_condition_r17_l_ = dyn_array; + using applicable_disaster_info_list_r17_l_ = dyn_array; + + // member variables + bool ext = false; + common_plmns_with_disaster_condition_r17_l_ common_plmns_with_disaster_condition_r17; + applicable_disaster_info_list_r17_l_ applicable_disaster_info_list_r17; + 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; +}; + +// SIB16-r17 ::= SEQUENCE +struct sib16_r17_s { + bool ext = false; + freq_prio_list_slicing_r17_l freq_prio_list_slicing_r17; + 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; +}; + +// SIB17-r17 ::= SEQUENCE +struct sib17_r17_s { + struct segment_type_r17_opts { + enum options { not_last_segment, last_segment, nulltype } value; + + const char* to_string() const; + }; + using segment_type_r17_e_ = enumerated; + + // member variables + uint8_t segment_num_r17 = 0; + segment_type_r17_e_ segment_type_r17; + dyn_octstring segment_container_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB18-r17 ::= SEQUENCE +struct sib18_r17_s { + using gin_elem_list_r17_l_ = dyn_array; + using gins_per_sn_pn_list_r17_l_ = dyn_array; + + // member variables + bool ext = false; + gin_elem_list_r17_l_ gin_elem_list_r17; + gins_per_sn_pn_list_r17_l_ gins_per_sn_pn_list_r17; + 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; +}; + +// SIB19-r17 ::= SEQUENCE +struct sib19_r17_s { + bool ext = false; + bool ntn_cfg_r17_present = false; + bool t_service_r17_present = false; + bool distance_thresh_r17_present = false; + ntn_cfg_r17_s ntn_cfg_r17; + uint64_t t_service_r17 = 0; + dyn_octstring ref_location_r17; + uint16_t distance_thresh_r17 = 0; + ntn_neigh_cell_cfg_list_r17_l ntn_neigh_cell_cfg_list_r17; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + copy_ptr ntn_neigh_cell_cfg_list_ext_v1720; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB2 ::= SEQUENCE +struct sib2_s { + struct cell_resel_info_common_s_ { + struct q_hyst_opts { + enum options { + db0, + db1, + db2, + db3, + db4, + db5, + db6, + db8, + db10, + db12, + db14, + db16, + db18, + db20, + db22, + db24, + nulltype + } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using q_hyst_e_ = enumerated; + struct speed_state_resel_pars_s_ { + struct q_hyst_sf_s_ { + struct sf_medium_opts { + enum options { db_neg6, db_neg4, db_neg2, db0, nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using sf_medium_e_ = enumerated; + struct sf_high_opts { + enum options { db_neg6, db_neg4, db_neg2, db0, nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using sf_high_e_ = enumerated; + + // member variables + sf_medium_e_ sf_medium; + sf_high_e_ sf_high; + }; + + // member variables + mob_state_params_s mob_state_params; + q_hyst_sf_s_ q_hyst_sf; + }; + + // member variables + bool ext = false; + bool nrof_ss_blocks_to_average_present = false; + bool abs_thresh_ss_blocks_consolidation_present = false; + bool range_to_best_cell_present = false; + bool speed_state_resel_pars_present = false; + uint8_t nrof_ss_blocks_to_average = 2; + thres_nr_s abs_thresh_ss_blocks_consolidation; + range_to_best_cell_e range_to_best_cell; + q_hyst_e_ q_hyst; + speed_state_resel_pars_s_ speed_state_resel_pars; + // ... + }; + struct cell_resel_serving_freq_info_s_ { + bool ext = false; + bool s_non_intra_search_p_present = false; + bool s_non_intra_search_q_present = false; + bool thresh_serving_low_q_present = false; + bool cell_resel_sub_prio_present = false; + uint8_t s_non_intra_search_p = 0; + uint8_t s_non_intra_search_q = 0; + uint8_t thresh_serving_low_p = 0; + uint8_t thresh_serving_low_q = 0; + uint8_t cell_resel_prio = 0; + cell_resel_sub_prio_e cell_resel_sub_prio; + // ... + }; + struct intra_freq_cell_resel_info_s_ { + bool ext = false; + bool q_rx_lev_min_sul_present = false; + bool q_qual_min_present = false; + bool s_intra_search_q_present = false; + bool p_max_present = false; + bool smtc_present = false; + bool ss_rssi_meas_present = false; + bool ssb_to_measure_present = false; + int8_t q_rx_lev_min = -70; + int8_t q_rx_lev_min_sul = -70; + int8_t q_qual_min = -43; + uint8_t s_intra_search_p = 0; + uint8_t s_intra_search_q = 0; + uint8_t t_resel_nr = 0; + multi_freq_band_list_nr_sib_l freq_band_list; + multi_freq_band_list_nr_sib_l freq_band_list_sul; + int8_t p_max = -30; + ssb_mtc_s smtc; + ss_rssi_meas_s ss_rssi_meas; + ssb_to_measure_c ssb_to_measure; + bool derive_ssb_idx_from_cell = false; + // ... + // group 0 + copy_ptr t_resel_nr_sf; + // group 1 + bool ssb_position_qcl_common_r16_present = false; + copy_ptr smtc2_lp_r16; + ssb_position_qcl_relation_r16_e ssb_position_qcl_common_r16; + // group 2 + bool ssb_position_qcl_common_r17_present = false; + ssb_position_qcl_relation_r17_e ssb_position_qcl_common_r17; + // group 3 + copy_ptr smtc4list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + }; + struct relaxed_meas_r16_s_ { + struct low_mob_eval_r16_s_ { + struct s_search_delta_p_r16_opts { + enum options { db3, db6, db9, db12, db15, spare3, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using s_search_delta_p_r16_e_ = enumerated; + struct t_search_delta_p_r16_opts { + enum options { + s5, + s10, + s20, + s30, + s60, + s120, + s180, + s240, + s300, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using t_search_delta_p_r16_e_ = enumerated; + + // member variables + s_search_delta_p_r16_e_ s_search_delta_p_r16; + t_search_delta_p_r16_e_ t_search_delta_p_r16; + }; + struct cell_edge_eval_r16_s_ { + bool s_search_thres_q_r16_present = false; + uint8_t s_search_thres_p_r16 = 0; + uint8_t s_search_thres_q_r16 = 0; + }; + + // member variables + bool low_mob_eval_r16_present = false; + bool cell_edge_eval_r16_present = false; + bool combine_relaxed_meas_condition_r16_present = false; + bool high_prio_meas_relax_r16_present = false; + low_mob_eval_r16_s_ low_mob_eval_r16; + cell_edge_eval_r16_s_ cell_edge_eval_r16; + }; + struct relaxed_meas_r17_s_ { + struct stationary_mob_eval_r17_s_ { + struct s_search_delta_p_stationary_r17_opts { + enum options { db2, db3, db6, db9, db12, db15, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using s_search_delta_p_stationary_r17_e_ = enumerated; + struct t_search_delta_p_stationary_r17_opts { + enum options { + s5, + s10, + s20, + s30, + s60, + s120, + s180, + s240, + s300, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using t_search_delta_p_stationary_r17_e_ = enumerated; + + // member variables + s_search_delta_p_stationary_r17_e_ s_search_delta_p_stationary_r17; + t_search_delta_p_stationary_r17_e_ t_search_delta_p_stationary_r17; + }; + struct cell_edge_eval_while_stationary_r17_s_ { + bool s_search_thres_q2_r17_present = false; + uint8_t s_search_thres_p2_r17 = 0; + uint8_t s_search_thres_q2_r17 = 0; + }; + + // member variables + bool cell_edge_eval_while_stationary_r17_present = false; + bool combine_relaxed_meas_condition2_r17_present = false; + stationary_mob_eval_r17_s_ stationary_mob_eval_r17; + cell_edge_eval_while_stationary_r17_s_ cell_edge_eval_while_stationary_r17; + }; + + // member variables + bool ext = false; + cell_resel_info_common_s_ cell_resel_info_common; + cell_resel_serving_freq_info_s_ cell_resel_serving_freq_info; + intra_freq_cell_resel_info_s_ intra_freq_cell_resel_info; + // ... + // group 0 + copy_ptr relaxed_meas_r16; + // group 1 + bool cell_equivalent_size_r17_present = false; + uint8_t cell_equivalent_size_r17 = 2; + copy_ptr relaxed_meas_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB20-r17 ::= SEQUENCE +struct sib20_r17_s { + bool ext = false; + bool cfr_cfg_mcch_mtch_r17_present = false; + mcch_cfg_r17_s mcch_cfg_r17; + cfr_cfg_mcch_mtch_r17_s cfr_cfg_mcch_mtch_r17; + 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; +}; + +// SIB21-r17 ::= SEQUENCE +struct sib21_r17_s { + bool ext = false; + mbs_fsai_list_r17_l mbs_fsai_intra_freq_r17; + mbs_fsai_inter_freq_list_r17_l mbs_fsai_inter_freq_list_r17; + 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; +}; + +// SIB3 ::= SEQUENCE +struct sib3_s { + using intra_freq_cag_cell_list_r16_l_ = dyn_array; + + // member variables + bool ext = false; + intra_freq_neigh_cell_list_l intra_freq_neigh_cell_list; + intra_freq_excluded_cell_list_l intra_freq_excluded_cell_list; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + copy_ptr intra_freq_neigh_cell_list_v1610; + copy_ptr intra_freq_allowed_cell_list_r16; + copy_ptr intra_freq_cag_cell_list_r16; + // group 1 + copy_ptr intra_freq_neigh_hsdn_cell_list_r17; + copy_ptr intra_freq_neigh_cell_list_v1710; + // group 2 + bool ch_access_mode2_r17_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB4 ::= SEQUENCE +struct sib4_s { + bool ext = false; + inter_freq_carrier_freq_list_l inter_freq_carrier_freq_list; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + copy_ptr inter_freq_carrier_freq_list_v1610; + // group 1 + copy_ptr inter_freq_carrier_freq_list_v1700; + // group 2 + copy_ptr inter_freq_carrier_freq_list_v1720; + // group 3 + copy_ptr inter_freq_carrier_freq_list_v1730; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB5 ::= SEQUENCE +struct sib5_s { + bool ext = false; + bool t_resel_eutra_sf_present = false; + carrier_freq_list_eutra_l carrier_freq_list_eutra; + uint8_t t_resel_eutra = 0; + speed_state_scale_factors_s t_resel_eutra_sf; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + copy_ptr carrier_freq_list_eutra_v1610; + // group 1 + bool idle_mode_meas_voice_fallback_r17_present = false; + copy_ptr carrier_freq_list_eutra_v1700; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB6 ::= SEQUENCE +struct sib6_s { + bool ext = false; + fixed_bitstring<16> msg_id; + fixed_bitstring<16> serial_num; + fixed_octstring<2> warning_type; + 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; +}; + +// SIB7 ::= SEQUENCE +struct sib7_s { + struct warning_msg_segment_type_opts { + enum options { not_last_segment, last_segment, nulltype } value; + + const char* to_string() const; + }; + using warning_msg_segment_type_e_ = enumerated; + + // member variables + bool ext = false; + bool data_coding_scheme_present = false; + fixed_bitstring<16> msg_id; + fixed_bitstring<16> serial_num; + warning_msg_segment_type_e_ warning_msg_segment_type; + uint8_t warning_msg_segment_num = 0; + dyn_octstring warning_msg_segment; + fixed_octstring<1> data_coding_scheme; + 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; +}; + +// SIB8 ::= SEQUENCE +struct sib8_s { + struct warning_msg_segment_type_opts { + enum options { not_last_segment, last_segment, nulltype } value; + + const char* to_string() const; + }; + using warning_msg_segment_type_e_ = enumerated; + + // member variables + bool ext = false; + bool data_coding_scheme_present = false; + fixed_bitstring<16> msg_id; + fixed_bitstring<16> serial_num; + warning_msg_segment_type_e_ warning_msg_segment_type; + uint8_t warning_msg_segment_num = 0; + dyn_octstring warning_msg_segment; + fixed_octstring<1> data_coding_scheme; + dyn_octstring warning_area_coordinates_segment; + 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; +}; + +// SIB9 ::= SEQUENCE +struct sib9_s { + struct time_info_s_ { + bool day_light_saving_time_present = false; + bool leap_seconds_present = false; + bool local_time_offset_present = false; + uint64_t time_info_utc = 0; + fixed_bitstring<2> day_light_saving_time; + int16_t leap_seconds = -127; + int8_t local_time_offset = -63; + }; + + // member variables + bool ext = false; + bool time_info_present = false; + time_info_s_ time_info; + dyn_octstring late_non_crit_ext; + // ... + // group 0 + copy_ptr ref_time_info_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIBpos-r16 ::= SEQUENCE +struct sib_pos_r16_s { + bool ext = false; + dyn_octstring assist_data_sib_elem_r16; + 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; +}; + +// SNPN-AccessInfo-r17 ::= SEQUENCE +struct sn_pn_access_info_r17_s { + bool ext_ch_supported_r17_present = false; + bool ext_ch_without_cfg_allowed_r17_present = false; + bool onboarding_enabled_r17_present = false; + bool ims_emergency_support_for_sn_pn_r17_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SchedulingInfo ::= SEQUENCE +struct sched_info_s { + struct si_broadcast_status_opts { + enum options { broadcasting, not_broadcasting, nulltype } value; + + const char* to_string() const; + }; + using si_broadcast_status_e_ = enumerated; + struct si_periodicity_opts { + enum options { rf8, rf16, rf32, rf64, rf128, rf256, rf512, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using si_periodicity_e_ = enumerated; + + // member variables + si_broadcast_status_e_ si_broadcast_status; + si_periodicity_e_ si_periodicity; + sib_map_l sib_map_info; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UAC-BarringInfoSet ::= SEQUENCE +struct uac_barr_info_set_s { + struct uac_barr_factor_opts { + enum options { p00, p05, p10, p15, p20, p25, p30, p40, p50, p60, p70, p75, p80, p85, p90, p95, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using uac_barr_factor_e_ = enumerated; + struct uac_barr_time_opts { + enum options { s4, s8, s16, s32, s64, s128, s256, s512, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using uac_barr_time_e_ = enumerated; + + // member variables + uac_barr_factor_e_ uac_barr_factor; + uac_barr_time_e_ uac_barr_time; + fixed_bitstring<7> uac_barr_for_access_id; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UAC-BarringPerPLMN ::= SEQUENCE +struct uac_barr_per_plmn_s { + struct uac_ac_barr_list_type_c_ { + using uac_implicit_ac_barr_list_l_ = std::array; + struct types_opts { + enum options { uac_implicit_ac_barr_list, uac_explicit_ac_barr_list, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + uac_ac_barr_list_type_c_() = default; + uac_ac_barr_list_type_c_(const uac_ac_barr_list_type_c_& other); + uac_ac_barr_list_type_c_& operator=(const uac_ac_barr_list_type_c_& other); + ~uac_ac_barr_list_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 + uac_implicit_ac_barr_list_l_& uac_implicit_ac_barr_list() + { + assert_choice_type(types::uac_implicit_ac_barr_list, type_, "uac-ACBarringListType"); + return c.get(); + } + uac_barr_per_cat_list_l& uac_explicit_ac_barr_list() + { + assert_choice_type(types::uac_explicit_ac_barr_list, type_, "uac-ACBarringListType"); + return c.get(); + } + const uac_implicit_ac_barr_list_l_& uac_implicit_ac_barr_list() const + { + assert_choice_type(types::uac_implicit_ac_barr_list, type_, "uac-ACBarringListType"); + return c.get(); + } + const uac_barr_per_cat_list_l& uac_explicit_ac_barr_list() const + { + assert_choice_type(types::uac_explicit_ac_barr_list, type_, "uac-ACBarringListType"); + return c.get(); + } + uac_implicit_ac_barr_list_l_& set_uac_implicit_ac_barr_list(); + uac_barr_per_cat_list_l& set_uac_explicit_ac_barr_list(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool uac_ac_barr_list_type_present = false; + uint8_t plmn_id_idx = 1; + uac_ac_barr_list_type_c_ uac_ac_barr_list_type; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CellAccessRelatedInfo ::= SEQUENCE +struct cell_access_related_info_s { + using snpn_access_info_list_r17_l_ = dyn_array; + + // member variables + bool ext = false; + bool cell_reserved_for_other_use_present = false; + plmn_id_info_list_l plmn_id_info_list; + // ... + // group 0 + bool cell_reserved_for_future_use_r16_present = false; + copy_ptr npn_id_info_list_r16; + // group 1 + copy_ptr snpn_access_info_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ConnEstFailureControl ::= SEQUENCE +struct conn_est_fail_ctrl_s { + struct conn_est_fail_count_opts { + enum options { n1, n2, n3, n4, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using conn_est_fail_count_e_ = enumerated; + struct conn_est_fail_offset_validity_opts { + enum options { s30, s60, s120, s240, s300, s420, s600, s900, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using conn_est_fail_offset_validity_e_ = enumerated; + + // member variables + bool conn_est_fail_offset_present = false; + conn_est_fail_count_e_ conn_est_fail_count; + conn_est_fail_offset_validity_e_ conn_est_fail_offset_validity; + uint8_t conn_est_fail_offset = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PosSystemInformation-r16-IEs ::= SEQUENCE +struct pos_sys_info_r16_ies_s { + struct pos_sib_type_and_info_r16_item_c_ { + struct types_opts { + enum options { + pos_sib1_1_r16, + pos_sib1_2_r16, + pos_sib1_3_r16, + pos_sib1_4_r16, + pos_sib1_5_r16, + pos_sib1_6_r16, + pos_sib1_7_r16, + pos_sib1_8_r16, + pos_sib2_1_r16, + pos_sib2_2_r16, + pos_sib2_3_r16, + pos_sib2_4_r16, + pos_sib2_5_r16, + pos_sib2_6_r16, + pos_sib2_7_r16, + pos_sib2_8_r16, + pos_sib2_9_r16, + pos_sib2_10_r16, + pos_sib2_11_r16, + pos_sib2_12_r16, + pos_sib2_13_r16, + pos_sib2_14_r16, + pos_sib2_15_r16, + pos_sib2_16_r16, + pos_sib2_17_r16, + pos_sib2_18_r16, + pos_sib2_19_r16, + pos_sib2_20_r16, + pos_sib2_21_r16, + pos_sib2_22_r16, + pos_sib2_23_r16, + pos_sib3_1_r16, + pos_sib4_1_r16, + pos_sib5_1_r16, + pos_sib6_1_r16, + pos_sib6_2_r16, + pos_sib6_3_r16, + // ... + pos_sib1_9_v1700, + pos_sib1_10_v1700, + pos_sib2_24_v1700, + pos_sib2_25_v1700, + pos_sib6_4_v1700, + pos_sib6_5_v1700, + pos_sib6_6_v1700, + nulltype + } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + pos_sib_type_and_info_r16_item_c_() = default; + pos_sib_type_and_info_r16_item_c_(const pos_sib_type_and_info_r16_item_c_& other); + pos_sib_type_and_info_r16_item_c_& operator=(const pos_sib_type_and_info_r16_item_c_& other); + ~pos_sib_type_and_info_r16_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 + sib_pos_r16_s& pos_sib1_1_r16() + { + assert_choice_type(types::pos_sib1_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib1_2_r16() + { + assert_choice_type(types::pos_sib1_2_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib1_3_r16() + { + assert_choice_type(types::pos_sib1_3_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib1_4_r16() + { + assert_choice_type(types::pos_sib1_4_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib1_5_r16() + { + assert_choice_type(types::pos_sib1_5_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib1_6_r16() + { + assert_choice_type(types::pos_sib1_6_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib1_7_r16() + { + assert_choice_type(types::pos_sib1_7_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib1_8_r16() + { + assert_choice_type(types::pos_sib1_8_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_1_r16() + { + assert_choice_type(types::pos_sib2_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_2_r16() + { + assert_choice_type(types::pos_sib2_2_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_3_r16() + { + assert_choice_type(types::pos_sib2_3_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_4_r16() + { + assert_choice_type(types::pos_sib2_4_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_5_r16() + { + assert_choice_type(types::pos_sib2_5_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_6_r16() + { + assert_choice_type(types::pos_sib2_6_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_7_r16() + { + assert_choice_type(types::pos_sib2_7_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_8_r16() + { + assert_choice_type(types::pos_sib2_8_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_9_r16() + { + assert_choice_type(types::pos_sib2_9_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_10_r16() + { + assert_choice_type(types::pos_sib2_10_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_11_r16() + { + assert_choice_type(types::pos_sib2_11_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_12_r16() + { + assert_choice_type(types::pos_sib2_12_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_13_r16() + { + assert_choice_type(types::pos_sib2_13_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_14_r16() + { + assert_choice_type(types::pos_sib2_14_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_15_r16() + { + assert_choice_type(types::pos_sib2_15_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_16_r16() + { + assert_choice_type(types::pos_sib2_16_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_17_r16() + { + assert_choice_type(types::pos_sib2_17_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_18_r16() + { + assert_choice_type(types::pos_sib2_18_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_19_r16() + { + assert_choice_type(types::pos_sib2_19_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_20_r16() + { + assert_choice_type(types::pos_sib2_20_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_21_r16() + { + assert_choice_type(types::pos_sib2_21_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_22_r16() + { + assert_choice_type(types::pos_sib2_22_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_23_r16() + { + assert_choice_type(types::pos_sib2_23_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib3_1_r16() + { + assert_choice_type(types::pos_sib3_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib4_1_r16() + { + assert_choice_type(types::pos_sib4_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib5_1_r16() + { + assert_choice_type(types::pos_sib5_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib6_1_r16() + { + assert_choice_type(types::pos_sib6_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib6_2_r16() + { + assert_choice_type(types::pos_sib6_2_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib6_3_r16() + { + assert_choice_type(types::pos_sib6_3_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib1_9_v1700() + { + assert_choice_type(types::pos_sib1_9_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib1_10_v1700() + { + assert_choice_type(types::pos_sib1_10_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_24_v1700() + { + assert_choice_type(types::pos_sib2_24_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib2_25_v1700() + { + assert_choice_type(types::pos_sib2_25_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib6_4_v1700() + { + assert_choice_type(types::pos_sib6_4_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib6_5_v1700() + { + assert_choice_type(types::pos_sib6_5_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& pos_sib6_6_v1700() + { + assert_choice_type(types::pos_sib6_6_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib1_1_r16() const + { + assert_choice_type(types::pos_sib1_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib1_2_r16() const + { + assert_choice_type(types::pos_sib1_2_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib1_3_r16() const + { + assert_choice_type(types::pos_sib1_3_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib1_4_r16() const + { + assert_choice_type(types::pos_sib1_4_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib1_5_r16() const + { + assert_choice_type(types::pos_sib1_5_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib1_6_r16() const + { + assert_choice_type(types::pos_sib1_6_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib1_7_r16() const + { + assert_choice_type(types::pos_sib1_7_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib1_8_r16() const + { + assert_choice_type(types::pos_sib1_8_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_1_r16() const + { + assert_choice_type(types::pos_sib2_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_2_r16() const + { + assert_choice_type(types::pos_sib2_2_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_3_r16() const + { + assert_choice_type(types::pos_sib2_3_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_4_r16() const + { + assert_choice_type(types::pos_sib2_4_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_5_r16() const + { + assert_choice_type(types::pos_sib2_5_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_6_r16() const + { + assert_choice_type(types::pos_sib2_6_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_7_r16() const + { + assert_choice_type(types::pos_sib2_7_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_8_r16() const + { + assert_choice_type(types::pos_sib2_8_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_9_r16() const + { + assert_choice_type(types::pos_sib2_9_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_10_r16() const + { + assert_choice_type(types::pos_sib2_10_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_11_r16() const + { + assert_choice_type(types::pos_sib2_11_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_12_r16() const + { + assert_choice_type(types::pos_sib2_12_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_13_r16() const + { + assert_choice_type(types::pos_sib2_13_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_14_r16() const + { + assert_choice_type(types::pos_sib2_14_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_15_r16() const + { + assert_choice_type(types::pos_sib2_15_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_16_r16() const + { + assert_choice_type(types::pos_sib2_16_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_17_r16() const + { + assert_choice_type(types::pos_sib2_17_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_18_r16() const + { + assert_choice_type(types::pos_sib2_18_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_19_r16() const + { + assert_choice_type(types::pos_sib2_19_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_20_r16() const + { + assert_choice_type(types::pos_sib2_20_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_21_r16() const + { + assert_choice_type(types::pos_sib2_21_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_22_r16() const + { + assert_choice_type(types::pos_sib2_22_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_23_r16() const + { + assert_choice_type(types::pos_sib2_23_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib3_1_r16() const + { + assert_choice_type(types::pos_sib3_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib4_1_r16() const + { + assert_choice_type(types::pos_sib4_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib5_1_r16() const + { + assert_choice_type(types::pos_sib5_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib6_1_r16() const + { + assert_choice_type(types::pos_sib6_1_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib6_2_r16() const + { + assert_choice_type(types::pos_sib6_2_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib6_3_r16() const + { + assert_choice_type(types::pos_sib6_3_r16, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib1_9_v1700() const + { + assert_choice_type(types::pos_sib1_9_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib1_10_v1700() const + { + assert_choice_type(types::pos_sib1_10_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_24_v1700() const + { + assert_choice_type(types::pos_sib2_24_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib2_25_v1700() const + { + assert_choice_type(types::pos_sib2_25_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib6_4_v1700() const + { + assert_choice_type(types::pos_sib6_4_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib6_5_v1700() const + { + assert_choice_type(types::pos_sib6_5_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + const sib_pos_r16_s& pos_sib6_6_v1700() const + { + assert_choice_type(types::pos_sib6_6_v1700, type_, "posSIB-TypeAndInfo-r16-item"); + return c.get(); + } + sib_pos_r16_s& set_pos_sib1_1_r16(); + sib_pos_r16_s& set_pos_sib1_2_r16(); + sib_pos_r16_s& set_pos_sib1_3_r16(); + sib_pos_r16_s& set_pos_sib1_4_r16(); + sib_pos_r16_s& set_pos_sib1_5_r16(); + sib_pos_r16_s& set_pos_sib1_6_r16(); + sib_pos_r16_s& set_pos_sib1_7_r16(); + sib_pos_r16_s& set_pos_sib1_8_r16(); + sib_pos_r16_s& set_pos_sib2_1_r16(); + sib_pos_r16_s& set_pos_sib2_2_r16(); + sib_pos_r16_s& set_pos_sib2_3_r16(); + sib_pos_r16_s& set_pos_sib2_4_r16(); + sib_pos_r16_s& set_pos_sib2_5_r16(); + sib_pos_r16_s& set_pos_sib2_6_r16(); + sib_pos_r16_s& set_pos_sib2_7_r16(); + sib_pos_r16_s& set_pos_sib2_8_r16(); + sib_pos_r16_s& set_pos_sib2_9_r16(); + sib_pos_r16_s& set_pos_sib2_10_r16(); + sib_pos_r16_s& set_pos_sib2_11_r16(); + sib_pos_r16_s& set_pos_sib2_12_r16(); + sib_pos_r16_s& set_pos_sib2_13_r16(); + sib_pos_r16_s& set_pos_sib2_14_r16(); + sib_pos_r16_s& set_pos_sib2_15_r16(); + sib_pos_r16_s& set_pos_sib2_16_r16(); + sib_pos_r16_s& set_pos_sib2_17_r16(); + sib_pos_r16_s& set_pos_sib2_18_r16(); + sib_pos_r16_s& set_pos_sib2_19_r16(); + sib_pos_r16_s& set_pos_sib2_20_r16(); + sib_pos_r16_s& set_pos_sib2_21_r16(); + sib_pos_r16_s& set_pos_sib2_22_r16(); + sib_pos_r16_s& set_pos_sib2_23_r16(); + sib_pos_r16_s& set_pos_sib3_1_r16(); + sib_pos_r16_s& set_pos_sib4_1_r16(); + sib_pos_r16_s& set_pos_sib5_1_r16(); + sib_pos_r16_s& set_pos_sib6_1_r16(); + sib_pos_r16_s& set_pos_sib6_2_r16(); + sib_pos_r16_s& set_pos_sib6_3_r16(); + sib_pos_r16_s& set_pos_sib1_9_v1700(); + sib_pos_r16_s& set_pos_sib1_10_v1700(); + sib_pos_r16_s& set_pos_sib2_24_v1700(); + sib_pos_r16_s& set_pos_sib2_25_v1700(); + sib_pos_r16_s& set_pos_sib6_4_v1700(); + sib_pos_r16_s& set_pos_sib6_5_v1700(); + sib_pos_r16_s& set_pos_sib6_6_v1700(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + using pos_sib_type_and_info_r16_l_ = dyn_array; + + // member variables + bool non_crit_ext_present = false; + pos_sib_type_and_info_r16_l_ pos_sib_type_and_info_r16; + 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; +}; + +// SI-SchedulingInfo ::= SEQUENCE +struct si_sched_info_s { + using sched_info_list_l_ = dyn_array; + struct si_win_len_opts { + enum options { s5, s10, s20, s40, s80, s160, s320, s640, s1280, s2560_v1710, s5120_v1710, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using si_win_len_e_ = enumerated; + + // member variables + bool ext = false; + bool si_request_cfg_present = false; + bool si_request_cfg_sul_present = false; + bool sys_info_area_id_present = false; + sched_info_list_l_ sched_info_list; + si_win_len_e_ si_win_len; + si_request_cfg_s si_request_cfg; + si_request_cfg_s si_request_cfg_sul; + fixed_bitstring<24> sys_info_area_id; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB1-v1610-IEs ::= SEQUENCE +struct sib1_v1610_ies_s { + bool idle_mode_meass_eutra_r16_present = false; + bool idle_mode_meass_nr_r16_present = false; + bool pos_si_sched_info_r16_present = false; + bool non_crit_ext_present = false; + pos_si_sched_info_r16_s pos_si_sched_info_r16; + sib1_v1630_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; +}; + +// SystemInformation-IEs ::= SEQUENCE +struct sys_info_ies_s { + struct sib_type_and_info_item_c_ { + struct types_opts { + enum options { + sib2, + sib3, + sib4, + sib5, + sib6, + sib7, + sib8, + sib9, + // ... + sib10_v1610, + sib11_v1610, + sib12_v1610, + sib13_v1610, + sib14_v1610, + sib15_v1700, + sib16_v1700, + sib17_v1700, + sib18_v1700, + sib19_v1700, + sib20_v1700, + sib21_v1700, + nulltype + } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + sib_type_and_info_item_c_() = default; + sib_type_and_info_item_c_(const sib_type_and_info_item_c_& other); + sib_type_and_info_item_c_& operator=(const sib_type_and_info_item_c_& other); + ~sib_type_and_info_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 + sib2_s& sib2() + { + assert_choice_type(types::sib2, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib3_s& sib3() + { + assert_choice_type(types::sib3, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib4_s& sib4() + { + assert_choice_type(types::sib4, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib5_s& sib5() + { + assert_choice_type(types::sib5, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib6_s& sib6() + { + assert_choice_type(types::sib6, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib7_s& sib7() + { + assert_choice_type(types::sib7, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib8_s& sib8() + { + assert_choice_type(types::sib8, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib9_s& sib9() + { + assert_choice_type(types::sib9, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib10_r16_s& sib10_v1610() + { + assert_choice_type(types::sib10_v1610, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib11_r16_s& sib11_v1610() + { + assert_choice_type(types::sib11_v1610, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib12_r16_s& sib12_v1610() + { + assert_choice_type(types::sib12_v1610, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib13_r16_s& sib13_v1610() + { + assert_choice_type(types::sib13_v1610, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib14_r16_s& sib14_v1610() + { + assert_choice_type(types::sib14_v1610, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib15_r17_s& sib15_v1700() + { + assert_choice_type(types::sib15_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib16_r17_s& sib16_v1700() + { + assert_choice_type(types::sib16_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib17_r17_s& sib17_v1700() + { + assert_choice_type(types::sib17_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib18_r17_s& sib18_v1700() + { + assert_choice_type(types::sib18_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib19_r17_s& sib19_v1700() + { + assert_choice_type(types::sib19_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib20_r17_s& sib20_v1700() + { + assert_choice_type(types::sib20_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib21_r17_s& sib21_v1700() + { + assert_choice_type(types::sib21_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib2_s& sib2() const + { + assert_choice_type(types::sib2, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib3_s& sib3() const + { + assert_choice_type(types::sib3, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib4_s& sib4() const + { + assert_choice_type(types::sib4, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib5_s& sib5() const + { + assert_choice_type(types::sib5, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib6_s& sib6() const + { + assert_choice_type(types::sib6, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib7_s& sib7() const + { + assert_choice_type(types::sib7, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib8_s& sib8() const + { + assert_choice_type(types::sib8, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib9_s& sib9() const + { + assert_choice_type(types::sib9, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib10_r16_s& sib10_v1610() const + { + assert_choice_type(types::sib10_v1610, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib11_r16_s& sib11_v1610() const + { + assert_choice_type(types::sib11_v1610, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib12_r16_s& sib12_v1610() const + { + assert_choice_type(types::sib12_v1610, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib13_r16_s& sib13_v1610() const + { + assert_choice_type(types::sib13_v1610, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib14_r16_s& sib14_v1610() const + { + assert_choice_type(types::sib14_v1610, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib15_r17_s& sib15_v1700() const + { + assert_choice_type(types::sib15_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib16_r17_s& sib16_v1700() const + { + assert_choice_type(types::sib16_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib17_r17_s& sib17_v1700() const + { + assert_choice_type(types::sib17_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib18_r17_s& sib18_v1700() const + { + assert_choice_type(types::sib18_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib19_r17_s& sib19_v1700() const + { + assert_choice_type(types::sib19_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib20_r17_s& sib20_v1700() const + { + assert_choice_type(types::sib20_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + const sib21_r17_s& sib21_v1700() const + { + assert_choice_type(types::sib21_v1700, type_, "sib-TypeAndInfo-item"); + return c.get(); + } + sib2_s& set_sib2(); + sib3_s& set_sib3(); + sib4_s& set_sib4(); + sib5_s& set_sib5(); + sib6_s& set_sib6(); + sib7_s& set_sib7(); + sib8_s& set_sib8(); + sib9_s& set_sib9(); + sib10_r16_s& set_sib10_v1610(); + sib11_r16_s& set_sib11_v1610(); + sib12_r16_s& set_sib12_v1610(); + sib13_r16_s& set_sib13_v1610(); + sib14_r16_s& set_sib14_v1610(); + sib15_r17_s& set_sib15_v1700(); + sib16_r17_s& set_sib16_v1700(); + sib17_r17_s& set_sib17_v1700(); + sib18_r17_s& set_sib18_v1700(); + sib19_r17_s& set_sib19_v1700(); + sib20_r17_s& set_sib20_v1700(); + sib21_r17_s& set_sib21_v1700(); + + private: + types type_; + choice_buffer_t + c; + + void destroy_(); + }; + using sib_type_and_info_l_ = dyn_array; + + // member variables + bool non_crit_ext_present = false; + sib_type_and_info_l_ sib_type_and_info; + 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; +}; + +// UAC-AccessCategory1-SelectionAssistanceInfo ::= ENUMERATED +struct uac_access_category1_sel_assist_info_opts { + enum options { a, b, c, nulltype } value; + + const char* to_string() const; +}; +using uac_access_category1_sel_assist_info_e = enumerated; + +// UAC-BarringInfoSetList ::= SEQUENCE (SIZE (1..8)) OF UAC-BarringInfoSet +using uac_barr_info_set_list_l = dyn_array; + +// UAC-BarringPerPLMN-List ::= SEQUENCE (SIZE (1..12)) OF UAC-BarringPerPLMN +using uac_barr_per_plmn_list_l = dyn_array; + +// UE-TimersAndConstants ::= SEQUENCE +struct ue_timers_and_consts_s { + struct t300_opts { + enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using t300_e_ = enumerated; + struct t301_opts { + enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using t301_e_ = enumerated; + struct t310_opts { + enum options { ms0, ms50, ms100, ms200, ms500, ms1000, ms2000, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using t310_e_ = enumerated; + struct n310_opts { + enum options { n1, n2, n3, n4, n6, n8, n10, n20, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using n310_e_ = enumerated; + struct t311_opts { + enum options { ms1000, ms3000, ms5000, ms10000, ms15000, ms20000, ms30000, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using t311_e_ = enumerated; + struct n311_opts { + enum options { n1, n2, n3, n4, n5, n6, n8, n10, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using n311_e_ = enumerated; + struct t319_opts { + enum options { ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using t319_e_ = enumerated; + + // member variables + bool ext = false; + t300_e_ t300; + t301_e_ t301; + t310_e_ t310; + n310_e_ n310; + t311_e_ t311; + n311_e_ n311; + t319_e_ t319; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB1 ::= SEQUENCE +struct sib1_s { + struct cell_sel_info_s_ { + bool q_rx_lev_min_offset_present = false; + bool q_rx_lev_min_sul_present = false; + bool q_qual_min_present = false; + bool q_qual_min_offset_present = false; + int8_t q_rx_lev_min = -70; + uint8_t q_rx_lev_min_offset = 1; + int8_t q_rx_lev_min_sul = -70; + int8_t q_qual_min = -43; + uint8_t q_qual_min_offset = 1; + }; + struct uac_barr_info_s_ { + struct uac_access_category1_sel_assist_info_c_ { + using individual_plmn_list_l_ = bounded_array; + struct types_opts { + enum options { plmn_common, individual_plmn_list, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + uac_access_category1_sel_assist_info_c_() = default; + uac_access_category1_sel_assist_info_c_(const uac_access_category1_sel_assist_info_c_& other); + uac_access_category1_sel_assist_info_c_& operator=(const uac_access_category1_sel_assist_info_c_& other); + ~uac_access_category1_sel_assist_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 + uac_access_category1_sel_assist_info_e& plmn_common() + { + assert_choice_type(types::plmn_common, type_, "uac-AccessCategory1-SelectionAssistanceInfo"); + return c.get(); + } + individual_plmn_list_l_& individual_plmn_list() + { + assert_choice_type(types::individual_plmn_list, type_, "uac-AccessCategory1-SelectionAssistanceInfo"); + return c.get(); + } + const uac_access_category1_sel_assist_info_e& plmn_common() const + { + assert_choice_type(types::plmn_common, type_, "uac-AccessCategory1-SelectionAssistanceInfo"); + return c.get(); + } + const individual_plmn_list_l_& individual_plmn_list() const + { + assert_choice_type(types::individual_plmn_list, type_, "uac-AccessCategory1-SelectionAssistanceInfo"); + return c.get(); + } + uac_access_category1_sel_assist_info_e& set_plmn_common(); + individual_plmn_list_l_& set_individual_plmn_list(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool uac_access_category1_sel_assist_info_present = false; + uac_barr_per_cat_list_l uac_barr_for_common; + uac_barr_per_plmn_list_l uac_barr_per_plmn_list; + uac_barr_info_set_list_l uac_barr_info_set_list; + uac_access_category1_sel_assist_info_c_ uac_access_category1_sel_assist_info; + }; + + // member variables + bool cell_sel_info_present = false; + bool conn_est_fail_ctrl_present = false; + bool si_sched_info_present = false; + bool serving_cell_cfg_common_present = false; + bool ims_emergency_support_present = false; + bool ecall_over_ims_support_present = false; + bool ue_timers_and_consts_present = false; + bool uac_barr_info_present = false; + bool use_full_resume_id_present = false; + bool non_crit_ext_present = false; + cell_sel_info_s_ cell_sel_info; + cell_access_related_info_s cell_access_related_info; + conn_est_fail_ctrl_s conn_est_fail_ctrl; + si_sched_info_s si_sched_info; + serving_cell_cfg_common_sib_s serving_cell_cfg_common; + ue_timers_and_consts_s ue_timers_and_consts; + uac_barr_info_s_ uac_barr_info; + dyn_octstring late_non_crit_ext; + sib1_v1610_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; +}; + +// SystemInformation ::= SEQUENCE +struct sys_info_s { + struct crit_exts_c_ { + struct crit_exts_future_r16_c_ { + struct types_opts { + enum options { pos_sys_info_r16, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_future_r16_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 + pos_sys_info_r16_ies_s& pos_sys_info_r16() + { + assert_choice_type(types::pos_sys_info_r16, type_, "criticalExtensionsFuture-r16"); + return c; + } + const pos_sys_info_r16_ies_s& pos_sys_info_r16() const + { + assert_choice_type(types::pos_sys_info_r16, type_, "criticalExtensionsFuture-r16"); + return c; + } + pos_sys_info_r16_ies_s& set_pos_sys_info_r16(); + void set_crit_exts_future(); + + private: + types type_; + pos_sys_info_r16_ies_s c; + }; + struct types_opts { + enum options { sys_info, crit_exts_future_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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 + sys_info_ies_s& sys_info() + { + assert_choice_type(types::sys_info, type_, "criticalExtensions"); + return c.get(); + } + crit_exts_future_r16_c_& crit_exts_future_r16() + { + assert_choice_type(types::crit_exts_future_r16, type_, "criticalExtensions"); + return c.get(); + } + const sys_info_ies_s& sys_info() const + { + assert_choice_type(types::sys_info, type_, "criticalExtensions"); + return c.get(); + } + const crit_exts_future_r16_c_& crit_exts_future_r16() const + { + assert_choice_type(types::crit_exts_future_r16, type_, "criticalExtensions"); + return c.get(); + } + sys_info_ies_s& set_sys_info(); + crit_exts_future_r16_c_& set_crit_exts_future_r16(); + + 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; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/ue_cap.h b/include/srsran/asn1/rrc_nr/ue_cap.h index 074000f9c8..ce293f792a 100644 --- a/include/srsran/asn1/rrc_nr/ue_cap.h +++ b/include/srsran/asn1/rrc_nr/ue_cap.h @@ -2385,6 +2385,18 @@ 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; + +// BandCombinationList-v15g0 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v15g0 +using band_combination_list_v15g0_l = dyn_array; + // BandCombinationList-v1610 ::= SEQUENCE (SIZE (1..65536)) OF BandCombination-v1610 using band_combination_list_v1610_l = dyn_array; @@ -9741,6 +9753,27 @@ struct meas_and_mob_params_mrdc_s { void to_json(json_writer& j) const; }; +// MeasAndMobParametersMRDC-XDD-Diff-v1560 ::= SEQUENCE +struct meas_and_mob_params_mrdc_xdd_diff_v1560_s { + bool sftd_meas_pscell_nedc_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // MeasAndMobParametersMRDC-Common-v1610 ::= SEQUENCE struct meas_and_mob_params_mrdc_common_v1610_s { struct cond_pscell_change_params_common_r16_s_ { @@ -9809,6 +9842,37 @@ struct meas_and_mob_params_mrdc_v1700_s { void to_json(json_writer& j) const; }; +// MeasAndMobParametersMRDC-Common-v1730 ::= SEQUENCE +struct meas_and_mob_params_mrdc_common_v1730_s { + struct independent_gap_cfg_max_cc_r17_s_ { + bool fr1_only_r17_present = false; + bool fr2_only_r17_present = false; + bool fr1_and_fr2_r17_present = false; + uint8_t fr1_only_r17 = 1; + uint8_t fr2_only_r17 = 1; + uint8_t fr1_and_fr2_r17 = 1; + }; + + // member variables + independent_gap_cfg_max_cc_r17_s_ independent_gap_cfg_max_cc_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasAndMobParametersMRDC-v1730 ::= SEQUENCE +struct meas_and_mob_params_mrdc_v1730_s { + bool meas_and_mob_params_mrdc_common_v1730_present = false; + meas_and_mob_params_mrdc_common_v1730_s meas_and_mob_params_mrdc_common_v1730; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // GeneralParametersMRDC-XDD-Diff ::= SEQUENCE struct general_params_mrdc_xdd_diff_s { bool ext = false; @@ -10787,6 +10851,67 @@ struct pdcp_params_s { void to_json(json_writer& j) const; }; +// NAICS-Capability-Entry ::= SEQUENCE +struct naics_cap_entry_s { + struct nof_aggr_prb_opts { + enum options { + n50, + n75, + n100, + n125, + n150, + n175, + n200, + n225, + n250, + n275, + n300, + n350, + n400, + n450, + n500, + spare, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using nof_aggr_prb_e_ = enumerated; + + // member variables + bool ext = false; + uint8_t nof_naics_capable_cc = 1; + nof_aggr_prb_e_ nof_aggr_prb; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Phy-ParametersMRDC ::= SEQUENCE +struct phy_params_mrdc_s { + using naics_cap_list_l_ = dyn_array; + + // member variables + bool ext = false; + naics_cap_list_l_ naics_cap_list; + // ... + // group 0 + copy_ptr sp_cell_placement; + // group 1 + bool tdd_pcell_ul_tx_all_ul_sf_r16_present = false; + bool fdd_pcell_ul_tx_all_ul_sf_r16_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // PowSav-ParametersCommon-r16 ::= SEQUENCE struct pow_sav_params_common_r16_s { bool ext = false; @@ -10922,6 +11047,88 @@ struct rf_params_s { void to_json(json_writer& j) const; }; +// RF-ParametersMRDC ::= SEQUENCE +struct rf_params_mrdc_s { + struct supported_band_combination_list_nedc_only_v15a0_s_ { + 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; + }; + struct supported_band_combination_list_nedc_only_v1720_s_ { + band_combination_list_v1700_l supported_band_combination_list_v1700; + band_combination_list_v1720_l supported_band_combination_list_v1720; + }; + + // member variables + bool ext = false; + band_combination_list_l supported_band_combination_list; + freq_band_list_l applied_freq_band_list_filt; + // ... + // group 0 + bool srs_switching_time_requested_present = false; + 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; + // group 7 + copy_ptr supported_band_combination_list_v1610; + copy_ptr supported_band_combination_list_nedc_only_v1610; + copy_ptr supported_band_combination_list_ul_tx_switch_r16; + // group 8 + copy_ptr supported_band_combination_list_v1630; + copy_ptr supported_band_combination_list_nedc_only_v1630; + copy_ptr supported_band_combination_list_ul_tx_switch_v1630; + // group 9 + copy_ptr supported_band_combination_list_v1640; + copy_ptr supported_band_combination_list_nedc_only_v1640; + copy_ptr supported_band_combination_list_ul_tx_switch_v1640; + // group 10 + copy_ptr supported_band_combination_list_ul_tx_switch_v1670; + // group 11 + copy_ptr supported_band_combination_list_v1700; + copy_ptr supported_band_combination_list_ul_tx_switch_v1700; + // group 12 + copy_ptr supported_band_combination_list_v1720; + copy_ptr supported_band_combination_list_nedc_only_v1720; + copy_ptr supported_band_combination_list_ul_tx_switch_v1720; + // group 13 + copy_ptr supported_band_combination_list_v1730; + copy_ptr supported_band_combination_list_nedc_only_v1730; + copy_ptr supported_band_combination_list_ul_tx_switch_v1730; + // group 14 + copy_ptr supported_band_combination_list_v1740; + copy_ptr supported_band_combination_list_nedc_only_v1740; + copy_ptr supported_band_combination_list_ul_tx_switch_v1740; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RF-ParametersMRDC-v15g0 ::= SEQUENCE +struct rf_params_mrdc_v15g0_s { + band_combination_list_v15g0_l supported_band_combination_list_v15g0; + band_combination_list_v15g0_l supported_band_combination_list_nedc_only_v15g0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // RLC-ParametersSidelink-r16 ::= SEQUENCE struct rlc_params_sidelink_r16_s { bool ext = false; @@ -11018,6 +11225,152 @@ struct sidelink_params_r16_s { void to_json(json_writer& j) const; }; +// UE-MRDC-Capability-v1730 ::= SEQUENCE +struct ue_mrdc_cap_v1730_s { + bool meas_and_mob_params_mrdc_v1730_present = false; + bool non_crit_ext_present = false; + meas_and_mob_params_mrdc_v1730_s meas_and_mob_params_mrdc_v1730; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// GeneralParametersMRDC-v1610 ::= SEQUENCE +struct general_params_mrdc_v1610_s { + bool f1c_over_eutra_r16_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCP-ParametersMRDC-v1610 ::= SEQUENCE +struct pdcp_params_mrdc_v1610_s { + bool scg_drb_nr_iab_r16_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-Capability-v1700 ::= SEQUENCE +struct ue_mrdc_cap_v1700_s { + bool non_crit_ext_present = false; + meas_and_mob_params_mrdc_v1700_s meas_and_mob_params_mrdc_v1700; + ue_mrdc_cap_v1730_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-MRDC-Capability-v1610 ::= SEQUENCE +struct ue_mrdc_cap_v1610_s { + bool meas_and_mob_params_mrdc_v1610_present = false; + bool general_params_mrdc_v1610_present = false; + bool pdcp_params_mrdc_v1610_present = false; + bool non_crit_ext_present = false; + meas_and_mob_params_mrdc_v1610_s meas_and_mob_params_mrdc_v1610; + general_params_mrdc_v1610_s general_params_mrdc_v1610; + pdcp_params_mrdc_v1610_s pdcp_params_mrdc_v1610; + ue_mrdc_cap_v1700_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-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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PDCP-ParametersMRDC ::= SEQUENCE +struct pdcp_params_mrdc_s { + bool pdcp_dupl_split_srb_present = false; + bool pdcp_dupl_split_drb_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-Capability-v1560 ::= SEQUENCE +struct ue_mrdc_cap_v1560_s { + 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; + ue_mrdc_cap_v1610_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-MRDC-Capability ::= SEQUENCE +struct ue_mrdc_cap_s { + using feature_set_combinations_l_ = dyn_array; + + // member variables + bool meas_and_mob_params_mrdc_present = false; + bool phy_params_mrdc_v1530_present = false; + bool general_params_mrdc_present = false; + bool fdd_add_ue_mrdc_cap_present = false; + bool tdd_add_ue_mrdc_cap_present = false; + bool fr1_add_ue_mrdc_cap_present = false; + bool fr2_add_ue_mrdc_cap_present = false; + bool pdcp_params_mrdc_v1530_present = false; + bool non_crit_ext_present = false; + meas_and_mob_params_mrdc_s meas_and_mob_params_mrdc; + phy_params_mrdc_s phy_params_mrdc_v1530; + rf_params_mrdc_s rf_params_mrdc; + general_params_mrdc_xdd_diff_s general_params_mrdc; + ue_mrdc_cap_add_xdd_mode_s fdd_add_ue_mrdc_cap; + ue_mrdc_cap_add_xdd_mode_s tdd_add_ue_mrdc_cap; + ue_mrdc_cap_add_frx_mode_s fr1_add_ue_mrdc_cap; + ue_mrdc_cap_add_frx_mode_s fr2_add_ue_mrdc_cap; + 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; +}; + +// UE-MRDC-Capability-v15g0 ::= SEQUENCE +struct ue_mrdc_cap_v15g0_s { + bool rf_params_mrdc_v15g0_present = false; + bool non_crit_ext_present = false; + rf_params_mrdc_v15g0_s rf_params_mrdc_v15g0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + // RedCapParameters-v1740 ::= SEQUENCE struct red_cap_params_v1740_s { bool ncd_ssb_for_red_cap_init_bwp_sdt_r17_present = false; diff --git a/include/srsran/asn1/rrc_nr/ul_ccch1_msg.h b/include/srsran/asn1/rrc_nr/ul_ccch1_msg.h new file mode 100644 index 0000000000..52ccbe6d9a --- /dev/null +++ b/include/srsran/asn1/rrc_nr/ul_ccch1_msg.h @@ -0,0 +1,136 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "ul_ccch_msg_ies.h" + +namespace asn1 { +namespace rrc_nr { + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCResumeRequest1 ::= SEQUENCE +struct rrc_resume_request1_s { + rrc_resume_request1_ies_s rrc_resume_request1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // 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 + rrc_resume_request1_s& rrc_resume_request1() + { + assert_choice_type(types::rrc_resume_request1, type_, "c1"); + return c; + } + const rrc_resume_request1_s& rrc_resume_request1() const + { + assert_choice_type(types::rrc_resume_request1, type_, "c1"); + return c; + } + rrc_resume_request1_s& set_rrc_resume_request1(); + void set_spare3(); + void set_spare2(); + void set_spare1(); + + private: + types type_; + rrc_resume_request1_s c; + }; + struct types_opts { + enum options { c1, msg_class_ext, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + ul_ccch1_msg_type_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 + c1_c_& c1() + { + assert_choice_type(types::c1, type_, "UL-CCCH1-MessageType"); + return c; + } + const c1_c_& c1() const + { + assert_choice_type(types::c1, type_, "UL-CCCH1-MessageType"); + return c; + } + c1_c_& set_c1(); + void set_msg_class_ext(); + +private: + types type_; + c1_c_ c; +}; + +// UL-CCCH1-Message ::= SEQUENCE +struct ul_ccch1_msg_s { + ul_ccch1_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; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/ul_ccch_msg.h b/include/srsran/asn1/rrc_nr/ul_ccch_msg.h new file mode 100644 index 0000000000..00cdb7f244 --- /dev/null +++ b/include/srsran/asn1/rrc_nr/ul_ccch_msg.h @@ -0,0 +1,146 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "srsran/asn1/asn1_utils.h" + +namespace asn1 { +namespace rrc_nr { + +struct rrc_setup_request_s; +struct rrc_resume_request_s; +struct rrc_reest_request_s; +struct rrc_sys_info_request_s; + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// 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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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 + rrc_setup_request_s& rrc_setup_request() + { + assert_choice_type(types::rrc_setup_request, type_, "c1"); + return c.get(); + } + rrc_resume_request_s& rrc_resume_request() + { + assert_choice_type(types::rrc_resume_request, type_, "c1"); + return c.get(); + } + rrc_reest_request_s& rrc_reest_request() + { + assert_choice_type(types::rrc_reest_request, type_, "c1"); + return c.get(); + } + rrc_sys_info_request_s& rrc_sys_info_request() + { + assert_choice_type(types::rrc_sys_info_request, type_, "c1"); + return c.get(); + } + const rrc_setup_request_s& rrc_setup_request() const + { + assert_choice_type(types::rrc_setup_request, type_, "c1"); + return c.get(); + } + const rrc_resume_request_s& rrc_resume_request() const + { + assert_choice_type(types::rrc_resume_request, type_, "c1"); + return c.get(); + } + const rrc_reest_request_s& rrc_reest_request() const + { + assert_choice_type(types::rrc_reest_request, type_, "c1"); + return c.get(); + } + const rrc_sys_info_request_s& rrc_sys_info_request() const + { + assert_choice_type(types::rrc_sys_info_request, type_, "c1"); + return c.get(); + } + rrc_setup_request_s& set_rrc_setup_request(); + rrc_resume_request_s& set_rrc_resume_request(); + rrc_reest_request_s& set_rrc_reest_request(); + rrc_sys_info_request_s& set_rrc_sys_info_request(); + + private: + types type_; + choice_buffer_ptr c; + }; + struct types_opts { + enum options { c1, msg_class_ext, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + ul_ccch_msg_type_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 + c1_c_& c1() + { + assert_choice_type(types::c1, type_, "UL-CCCH-MessageType"); + return c; + } + const c1_c_& c1() const + { + assert_choice_type(types::c1, type_, "UL-CCCH-MessageType"); + return c; + } + c1_c_& set_c1(); + void set_msg_class_ext(); + +private: + types type_; + c1_c_ c; +}; + +// UL-CCCH-Message ::= SEQUENCE +struct ul_ccch_msg_s { + ul_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; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/ul_ccch_msg_ies.h b/include/srsran/asn1/rrc_nr/ul_ccch_msg_ies.h new file mode 100644 index 0000000000..1e3c16aa89 --- /dev/null +++ b/include/srsran/asn1/rrc_nr/ul_ccch_msg_ies.h @@ -0,0 +1,335 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "srsran/asn1/asn1_utils.h" + +namespace asn1 { +namespace rrc_nr { + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// 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; + + const char* to_string() const; +}; +using establishment_cause_e = enumerated; + +// InitialUE-Identity ::= CHOICE +struct init_ue_id_c { + struct types_opts { + enum options { ng_5_g_s_tmsi_part1, random_value, nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using types = enumerated; + + // 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_5_g_s_tmsi_part1() + { + assert_choice_type(types::ng_5_g_s_tmsi_part1, type_, "InitialUE-Identity"); + return c.get>(); + } + fixed_bitstring<39>& random_value() + { + assert_choice_type(types::random_value, type_, "InitialUE-Identity"); + return c.get>(); + } + const fixed_bitstring<39>& ng_5_g_s_tmsi_part1() const + { + assert_choice_type(types::ng_5_g_s_tmsi_part1, type_, "InitialUE-Identity"); + return c.get>(); + } + const fixed_bitstring<39>& random_value() const + { + assert_choice_type(types::random_value, type_, "InitialUE-Identity"); + return c.get>(); + } + fixed_bitstring<39>& set_ng_5_g_s_tmsi_part1(); + fixed_bitstring<39>& set_random_value(); + +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; + + const char* to_string() const; +}; +using reest_cause_e = enumerated; + +// 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; + + const char* to_string() const; +}; +using resume_cause_e = enumerated; + +// RRC-PosSystemInfoRequest-r16-IEs ::= SEQUENCE +struct rrc_pos_sys_info_request_r16_ies_s { + fixed_bitstring<32> requested_pos_si_list; + fixed_bitstring<11> spare; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCReestablishmentRequest-IEs ::= SEQUENCE +struct rrc_reest_request_ies_s { + reestab_ue_id_s ue_id; + reest_cause_e reest_cause; + fixed_bitstring<1> spare; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCSetupRequest-IEs ::= SEQUENCE +struct rrc_setup_request_ies_s { + init_ue_id_c ue_id; + establishment_cause_e establishment_cause; + fixed_bitstring<1> spare; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCSystemInfoRequest-IEs ::= SEQUENCE +struct rrc_sys_info_request_ies_s { + fixed_bitstring<32> requested_si_list; + fixed_bitstring<12> spare; + + // 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 crit_exts_future_r16_c_ { + struct types_opts { + enum options { rrc_pos_sys_info_request_r16, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_future_r16_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 + rrc_pos_sys_info_request_r16_ies_s& rrc_pos_sys_info_request_r16() + { + assert_choice_type(types::rrc_pos_sys_info_request_r16, type_, "criticalExtensionsFuture-r16"); + return c; + } + const rrc_pos_sys_info_request_r16_ies_s& rrc_pos_sys_info_request_r16() const + { + assert_choice_type(types::rrc_pos_sys_info_request_r16, type_, "criticalExtensionsFuture-r16"); + return c; + } + rrc_pos_sys_info_request_r16_ies_s& set_rrc_pos_sys_info_request_r16(); + void set_crit_exts_future(); + + private: + types type_; + rrc_pos_sys_info_request_r16_ies_s c; + }; + struct types_opts { + enum options { rrc_sys_info_request, crit_exts_future_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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_sys_info_request_ies_s& rrc_sys_info_request() + { + assert_choice_type(types::rrc_sys_info_request, type_, "criticalExtensions"); + return c.get(); + } + crit_exts_future_r16_c_& crit_exts_future_r16() + { + assert_choice_type(types::crit_exts_future_r16, type_, "criticalExtensions"); + return c.get(); + } + const rrc_sys_info_request_ies_s& rrc_sys_info_request() const + { + assert_choice_type(types::rrc_sys_info_request, type_, "criticalExtensions"); + return c.get(); + } + const crit_exts_future_r16_c_& crit_exts_future_r16() const + { + assert_choice_type(types::crit_exts_future_r16, type_, "criticalExtensions"); + return c.get(); + } + rrc_sys_info_request_ies_s& set_rrc_sys_info_request(); + crit_exts_future_r16_c_& set_crit_exts_future_r16(); + + 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; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/include/srsran/asn1/rrc_nr/ul_dcch_msg.h b/include/srsran/asn1/rrc_nr/ul_dcch_msg.h index 4472edceed..a1f7084e56 100644 --- a/include/srsran/asn1/rrc_nr/ul_dcch_msg.h +++ b/include/srsran/asn1/rrc_nr/ul_dcch_msg.h @@ -16,7607 +16,41 @@ #pragma once -#include "msg_common.h" -#include "ue_cap.h" +#include "srsran/asn1/asn1_utils.h" namespace asn1 { namespace rrc_nr { -/******************************************************************************* - * Struct Definitions - ******************************************************************************/ - -// PDCCH-ConfigSIB1 ::= SEQUENCE -struct pdcch_cfg_sib1_s { - uint8_t coreset_zero = 0; - uint8_t search_space_zero = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// GNSS-ID-r16 ::= SEQUENCE -struct gnss_id_r16_s { - struct gnss_id_r16_opts { - enum options { gps, sbas, qzss, galileo, glonass, bds, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using gnss_id_r16_e_ = enumerated; - - // member variables - bool ext = false; - gnss_id_r16_e_ gnss_id_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SBAS-ID-r16 ::= SEQUENCE -struct sbas_id_r16_s { - struct sbas_id_r16_opts { - enum options { waas, egnos, msas, gagan, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using sbas_id_r16_e_ = enumerated; - - // member variables - bool ext = false; - sbas_id_r16_e_ sbas_id_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CAG-IdentityInfo-r16 ::= SEQUENCE -struct cag_id_info_r16_s { - bool manual_ca_gsel_allowed_r16_present = false; - fixed_bitstring<32> cag_id_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NPN-Identity-r16 ::= CHOICE -struct npn_id_r16_c { - struct pni_npn_r16_s_ { - using cag_id_list_r16_l_ = dyn_array; - - // member variables - plmn_id_s plmn_id_r16; - cag_id_list_r16_l_ cag_id_list_r16; - }; - struct snpn_r16_s_ { - using nid_list_r16_l_ = bounded_array, 12>; - - // member variables - plmn_id_s plmn_id_r16; - nid_list_r16_l_ nid_list_r16; - }; - struct types_opts { - enum options { pni_npn_r16, snpn_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - npn_id_r16_c() = default; - npn_id_r16_c(const npn_id_r16_c& other); - npn_id_r16_c& operator=(const npn_id_r16_c& other); - ~npn_id_r16_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 - pni_npn_r16_s_& pni_npn_r16() - { - assert_choice_type(types::pni_npn_r16, type_, "NPN-Identity-r16"); - return c.get(); - } - snpn_r16_s_& snpn_r16() - { - assert_choice_type(types::snpn_r16, type_, "NPN-Identity-r16"); - return c.get(); - } - const pni_npn_r16_s_& pni_npn_r16() const - { - assert_choice_type(types::pni_npn_r16, type_, "NPN-Identity-r16"); - return c.get(); - } - const snpn_r16_s_& snpn_r16() const - { - assert_choice_type(types::snpn_r16, type_, "NPN-Identity-r16"); - return c.get(); - } - pni_npn_r16_s_& set_pni_npn_r16(); - snpn_r16_s_& set_snpn_r16(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// NPN-IdentityInfo-r16 ::= SEQUENCE -struct npn_id_info_r16_s { - using npn_id_list_r16_l_ = dyn_array; - struct cell_reserved_for_oper_r16_opts { - enum options { reserved, not_reserved, nulltype } value; - - const char* to_string() const; - }; - using cell_reserved_for_oper_r16_e_ = enumerated; - - // member variables - bool ext = false; - bool ranac_r16_present = false; - bool iab_support_r16_present = false; - npn_id_list_r16_l_ npn_id_list_r16; - fixed_bitstring<24> tac_r16; - uint16_t ranac_r16 = 0; - fixed_bitstring<36> cell_id_r16; - cell_reserved_for_oper_r16_e_ cell_reserved_for_oper_r16; - // ... - // group 0 - bool gnb_id_len_r17_present = false; - uint8_t gnb_id_len_r17 = 22; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PLMN-IdentityInfo ::= SEQUENCE -struct plmn_id_info_s { - using plmn_id_list_l_ = dyn_array; - struct cell_reserved_for_oper_opts { - enum options { reserved, not_reserved, nulltype } value; - - const char* to_string() const; - }; - using cell_reserved_for_oper_e_ = enumerated; - using tracking_area_list_r17_l_ = bounded_array, 12>; - - // member variables - bool ext = false; - bool tac_present = false; - bool ranac_present = false; - plmn_id_list_l_ plmn_id_list; - fixed_bitstring<24> tac; - uint16_t ranac = 0; - fixed_bitstring<36> cell_id; - cell_reserved_for_oper_e_ cell_reserved_for_oper; - // ... - // group 0 - bool iab_support_r16_present = false; - // group 1 - bool gnb_id_len_r17_present = false; - copy_ptr tracking_area_list_r17; - uint8_t gnb_id_len_r17 = 22; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NPN-IdentityInfoList-r16 ::= SEQUENCE (SIZE (1..12)) OF NPN-IdentityInfo-r16 -using npn_id_info_list_r16_l = dyn_array; - -// PLMN-IdentityInfoList ::= SEQUENCE (SIZE (1..12)) OF PLMN-IdentityInfo -using plmn_id_info_list_l = dyn_array; - -// PLMN-Identity-EUTRA-5GC ::= CHOICE -struct plmn_id_eutra_5_gc_c { - struct types_opts { - enum options { plmn_id_eutra_5_gc, plmn_idx, nulltype } value; - typedef int8_t number_type; - - const char* to_string() const; - int8_t to_number() const; - }; - using types = enumerated; - - // choice methods - plmn_id_eutra_5_gc_c() = default; - plmn_id_eutra_5_gc_c(const plmn_id_eutra_5_gc_c& other); - plmn_id_eutra_5_gc_c& operator=(const plmn_id_eutra_5_gc_c& other); - ~plmn_id_eutra_5_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_5_gc() - { - assert_choice_type(types::plmn_id_eutra_5_gc, type_, "PLMN-Identity-EUTRA-5GC"); - return c.get(); - } - uint8_t& plmn_idx() - { - assert_choice_type(types::plmn_idx, type_, "PLMN-Identity-EUTRA-5GC"); - return c.get(); - } - const plmn_id_s& plmn_id_eutra_5_gc() const - { - assert_choice_type(types::plmn_id_eutra_5_gc, type_, "PLMN-Identity-EUTRA-5GC"); - return c.get(); - } - const uint8_t& plmn_idx() const - { - assert_choice_type(types::plmn_idx, type_, "PLMN-Identity-EUTRA-5GC"); - return c.get(); - } - plmn_id_s& set_plmn_id_eutra_5_gc(); - uint8_t& set_plmn_idx(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// CellIdentity-EUTRA-5GC ::= CHOICE -struct cell_id_eutra_5_gc_c { - struct types_opts { - enum options { cell_id_eutra, cell_id_idx, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - cell_id_eutra_5_gc_c() = default; - cell_id_eutra_5_gc_c(const cell_id_eutra_5_gc_c& other); - cell_id_eutra_5_gc_c& operator=(const cell_id_eutra_5_gc_c& other); - ~cell_id_eutra_5_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(types::cell_id_eutra, type_, "CellIdentity-EUTRA-5GC"); - return c.get>(); - } - uint8_t& cell_id_idx() - { - assert_choice_type(types::cell_id_idx, type_, "CellIdentity-EUTRA-5GC"); - return c.get(); - } - const fixed_bitstring<28>& cell_id_eutra() const - { - assert_choice_type(types::cell_id_eutra, type_, "CellIdentity-EUTRA-5GC"); - return c.get>(); - } - const uint8_t& cell_id_idx() const - { - assert_choice_type(types::cell_id_idx, type_, "CellIdentity-EUTRA-5GC"); - return c.get(); - } - fixed_bitstring<28>& set_cell_id_eutra(); - uint8_t& set_cell_id_idx(); - -private: - types type_; - choice_buffer_t> c; - - void destroy_(); -}; - -// FrequencyComponent-r17 ::= ENUMERATED -struct freq_component_r17_opts { - enum options { active_carrier, cfg_carrier, active_bwp, cfg_bwp, nulltype } value; - - const char* to_string() const; -}; -using freq_component_r17_e = enumerated; - -// 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PLMN-IdentityList-EUTRA-5GC ::= SEQUENCE (SIZE (1..12)) OF PLMN-Identity-EUTRA-5GC -using plmn_id_list_eutra_5_gc_l = dyn_array; - -// PLMN-IdentityList-EUTRA-EPC ::= SEQUENCE (SIZE (1..12)) OF PLMN-Identity -using plmn_id_list_eutra_epc_l = dyn_array; - -// CellAccessRelatedInfo-EUTRA-5GC ::= SEQUENCE -struct cell_access_related_info_eutra_5_gc_s { - bool ranac_5gc_present = false; - plmn_id_list_eutra_5_gc_l plmn_id_list_eutra_5gc; - fixed_bitstring<24> tac_eutra_5gc; - uint16_t ranac_5gc = 0; - cell_id_eutra_5_gc_c cell_id_eutra_5gc; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// DefaultDC-Location-r17 ::= CHOICE -struct default_dc_location_r17_c { - struct types_opts { - enum options { ul, dl, ul_and_dl, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - default_dc_location_r17_c() = default; - default_dc_location_r17_c(const default_dc_location_r17_c& other); - default_dc_location_r17_c& operator=(const default_dc_location_r17_c& other); - ~default_dc_location_r17_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 - freq_component_r17_e& ul() - { - assert_choice_type(types::ul, type_, "DefaultDC-Location-r17"); - return c.get(); - } - freq_component_r17_e& dl() - { - assert_choice_type(types::dl, type_, "DefaultDC-Location-r17"); - return c.get(); - } - freq_component_r17_e& ul_and_dl() - { - assert_choice_type(types::ul_and_dl, type_, "DefaultDC-Location-r17"); - return c.get(); - } - const freq_component_r17_e& ul() const - { - assert_choice_type(types::ul, type_, "DefaultDC-Location-r17"); - return c.get(); - } - const freq_component_r17_e& dl() const - { - assert_choice_type(types::dl, type_, "DefaultDC-Location-r17"); - return c.get(); - } - const freq_component_r17_e& ul_and_dl() const - { - assert_choice_type(types::ul_and_dl, type_, "DefaultDC-Location-r17"); - return c.get(); - } - freq_component_r17_e& set_ul(); - freq_component_r17_e& set_dl(); - freq_component_r17_e& set_ul_and_dl(); - -private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); -}; - -// MultiBandInfoListEUTRA ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..256) -using multi_band_info_list_eutra_l = bounded_array; - -// OffsetValue-r17 ::= SEQUENCE -struct offset_value_r17_s { - int16_t offset_value_r17 = -20000; - bool shift7dot5k_hz_r17 = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CC-Group-r17 ::= SEQUENCE -struct cc_group_r17_s { - struct offset_to_default_r17_c_ { - using offsetlist_l_ = dyn_array; - struct types_opts { - enum options { offset_value, offsetlist, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - offset_to_default_r17_c_() = default; - offset_to_default_r17_c_(const offset_to_default_r17_c_& other); - offset_to_default_r17_c_& operator=(const offset_to_default_r17_c_& other); - ~offset_to_default_r17_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 - offset_value_r17_s& offset_value() - { - assert_choice_type(types::offset_value, type_, "offsetToDefault-r17"); - return c.get(); - } - offsetlist_l_& offsetlist() - { - assert_choice_type(types::offsetlist, type_, "offsetToDefault-r17"); - return c.get(); - } - const offset_value_r17_s& offset_value() const - { - assert_choice_type(types::offset_value, type_, "offsetToDefault-r17"); - return c.get(); - } - const offsetlist_l_& offsetlist() const - { - assert_choice_type(types::offsetlist, type_, "offsetToDefault-r17"); - return c.get(); - } - offset_value_r17_s& set_offset_value(); - offsetlist_l_& set_offsetlist(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool serv_cell_idx_higher_r17_present = false; - bool offset_to_default_r17_present = false; - uint8_t serv_cell_idx_lower_r17 = 0; - uint8_t serv_cell_idx_higher_r17 = 0; - default_dc_location_r17_c default_dc_location_r17; - offset_to_default_r17_c_ offset_to_default_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CGI-InfoEUTRA ::= SEQUENCE -struct cgi_info_eutra_s { - struct cgi_info_epc_s_ { - using cgi_info_epc_list_l_ = dyn_array; - - // member variables - cell_access_related_info_eutra_epc_s cgi_info_epc_legacy; - cgi_info_epc_list_l_ cgi_info_epc_list; - }; - using cgi_info_5_gc_l_ = dyn_array; - - // member variables - bool cgi_info_epc_present = false; - bool freq_band_ind_prio_present = false; - cgi_info_epc_s_ cgi_info_epc; - cgi_info_5_gc_l_ cgi_info_5_gc; - uint16_t freq_band_ind = 1; - multi_band_info_list_eutra_l multi_band_info_list; - - // 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; - 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; - // ... - // group 0 - copy_ptr npn_id_info_list_r16; - // group 1 - bool cell_reserved_for_other_use_r16_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeedForNCSG-IntraFreq-r17 ::= SEQUENCE -struct need_for_ncsg_intra_freq_r17_s { - struct gap_ind_intra_r17_opts { - enum options { gap, ncsg, nogap_noncsg, nulltype } value; - - const char* to_string() const; - }; - using gap_ind_intra_r17_e_ = enumerated; - - // member variables - uint8_t serv_cell_id_r17 = 0; - gap_ind_intra_r17_e_ gap_ind_intra_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeedForNCSG-NR-r17 ::= SEQUENCE -struct need_for_ncsg_nr_r17_s { - struct gap_ind_r17_opts { - enum options { gap, ncsg, nogap_noncsg, nulltype } value; - - const char* to_string() const; - }; - using gap_ind_r17_e_ = enumerated; - - // member variables - uint16_t band_nr_r17 = 1; - gap_ind_r17_e_ gap_ind_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PerRAAttemptInfo-r16 ::= SEQUENCE -struct per_ra_attempt_info_r16_s { - bool ext = false; - bool contention_detected_r16_present = false; - bool dl_rsrp_above_thres_r16_present = false; - bool contention_detected_r16 = false; - bool dl_rsrp_above_thres_r16 = false; - // ... - // group 0 - bool fallback_to_four_step_ra_r17_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ResultsPerCSI-RS-IndexList ::= SEQUENCE (SIZE (1..64)) OF ResultsPerCSI-RS-Index -using results_per_csi_rs_idx_list_l = dyn_array; - -// ResultsPerSSB-IndexList ::= SEQUENCE (SIZE (1..64)) OF ResultsPerSSB-Index -using results_per_ssb_idx_list_l = dyn_array; - -// 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; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultLoggingNR-r16 ::= SEQUENCE -struct meas_result_logging_nr_r16_s { - bool nof_good_ssb_r16_present = false; - uint16_t pci_r16 = 0; - meas_quant_results_s results_ssb_cell_r16; - uint8_t nof_good_ssb_r16 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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_ { - 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; - }; - using cho_cfg_r17_l_ = dyn_array; - struct triggered_event_r17_s_ { - struct first_triggered_event_opts { - enum options { cond_first_event, cond_second_event, nulltype } value; - - const char* to_string() const; - }; - using first_triggered_event_e_ = enumerated; - - // member variables - bool time_between_events_r17_present = false; - bool first_triggered_event_present = false; - uint16_t time_between_events_r17 = 0; - first_triggered_event_e_ first_triggered_event; - }; - - // member variables - bool ext = false; - bool pci_present = false; - uint16_t pci = 0; - meas_result_s_ meas_result; - // ... - // group 0 - copy_ptr cgi_info; - // group 1 - bool cho_candidate_r17_present = false; - copy_ptr cho_cfg_r17; - copy_ptr triggered_event_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeedForNCSG-BandListNR-r17 ::= SEQUENCE (SIZE (1..1024)) OF NeedForNCSG-NR-r17 -using need_for_ncsg_band_list_nr_r17_l = dyn_array; - -// NeedForNCSG-EUTRA-r17 ::= SEQUENCE -struct need_for_ncsg_eutra_r17_s { - struct gap_ind_r17_opts { - enum options { gap, ncsg, nogap_noncsg, nulltype } value; - - const char* to_string() const; - }; - using gap_ind_r17_e_ = enumerated; - - // member variables - uint16_t band_eutra_r17 = 1; - gap_ind_r17_e_ gap_ind_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeedForNCSG-IntraFreqList-r17 ::= SEQUENCE (SIZE (1..32)) OF NeedForNCSG-IntraFreq-r17 -using need_for_ncsg_intra_freq_list_r17_l = dyn_array; - -// PerRAAttemptInfoList-r16 ::= SEQUENCE (SIZE (1..200)) OF PerRAAttemptInfo-r16 -using per_ra_attempt_info_list_r16_l = dyn_array; - -// SL-QoS-Info-r16 ::= SEQUENCE -struct sl_qos_info_r16_s { - bool sl_qos_profile_r16_present = false; - uint16_t sl_qos_flow_id_r16 = 1; - sl_qos_profile_r16_s sl_qos_profile_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UplinkTxDirectCurrentCarrierInfo-r16 ::= SEQUENCE -struct ul_tx_direct_current_carrier_info_r16_s { - struct serv_cell_info_r16_c_ { - struct types_opts { - enum options { bwp_id_r16, deactiv_carrier_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - serv_cell_info_r16_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 - uint8_t& bwp_id_r16() - { - assert_choice_type(types::bwp_id_r16, type_, "servCellInfo-r16"); - return c; - } - const uint8_t& bwp_id_r16() const - { - assert_choice_type(types::bwp_id_r16, type_, "servCellInfo-r16"); - return c; - } - uint8_t& set_bwp_id_r16(); - void set_deactiv_carrier_r16(); - - private: - types type_; - uint8_t c; - }; - - // member variables - uint8_t serv_cell_idx_r16 = 0; - serv_cell_info_r16_c_ serv_cell_info_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UplinkTxDirectCurrentMoreCarrierList-r17 ::= SEQUENCE (SIZE (1..16)) OF CC-Group-r17 -using ul_tx_direct_current_more_carrier_list_r17_l = dyn_array; - -// UplinkTxDirectCurrentTwoCarrierInfo-r16 ::= SEQUENCE -struct ul_tx_direct_current_two_carrier_info_r16_s { - uint8_t ref_carrier_idx_r16 = 0; - bool shift7dot5k_hz_r16 = false; - uint16_t tx_direct_current_location_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// WLAN-Identifiers-r16 ::= SEQUENCE -struct wlan_ids_r16_s { - bool ext = false; - bool bssid_r16_present = false; - bool hessid_r16_present = false; - bounded_octstring<1, 32> ssid_r16; - fixed_octstring<6> bssid_r16; - fixed_octstring<6> hessid_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// WLAN-RTT-r16 ::= SEQUENCE -struct wlan_rtt_r16_s { - struct rtt_units_r16_opts { - enum options { - microseconds, - hundredsofnanoseconds, - tensofnanoseconds, - nanoseconds, - tenthsofnanoseconds, - /*...*/ nulltype - } value; - - const char* to_string() const; - }; - using rtt_units_r16_e_ = enumerated; - - // member variables - bool ext = false; - bool rtt_accuracy_r16_present = false; - uint32_t rtt_value_r16 = 0; - rtt_units_r16_e_ rtt_units_r16; - uint16_t rtt_accuracy_r16 = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CGI-InfoEUTRALogging ::= SEQUENCE -struct cgi_info_eutra_logging_s { - bool plmn_id_eutra_5gc_present = false; - bool tac_eutra_5gc_present = false; - bool cell_id_eutra_5gc_present = false; - bool plmn_id_eutra_epc_present = false; - bool tac_eutra_epc_present = false; - bool cell_id_eutra_epc_present = false; - plmn_id_s plmn_id_eutra_5gc; - fixed_bitstring<24> tac_eutra_5gc; - fixed_bitstring<28> cell_id_eutra_5gc; - plmn_id_s plmn_id_eutra_epc; - fixed_bitstring<16> tac_eutra_epc; - fixed_bitstring<28> cell_id_eutra_epc; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// LogMeasResultBT-r16 ::= SEQUENCE -struct log_meas_result_bt_r16_s { - bool ext = false; - bool rssi_bt_r16_present = false; - fixed_bitstring<48> bt_addr_r16; - int16_t rssi_bt_r16 = -128; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// LogMeasResultWLAN-r16 ::= SEQUENCE -struct log_meas_result_wlan_r16_s { - bool ext = false; - bool rssi_wlan_r16_present = false; - bool rtt_wlan_r16_present = false; - wlan_ids_r16_s wlan_ids_r16; - uint8_t rssi_wlan_r16 = 0; - wlan_rtt_r16_s rtt_wlan_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultListEUTRA ::= SEQUENCE (SIZE (1..8)) OF MeasResultEUTRA -using meas_result_list_eutra_l = dyn_array; - -// MeasResultListLoggingNR-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResultLoggingNR-r16 -using meas_result_list_logging_nr_r16_l = dyn_array; - -// MeasResultListNR ::= SEQUENCE (SIZE (1..8)) OF MeasResultNR -using meas_result_list_nr_l = dyn_array; - -// NeedForGapNCSG-InfoEUTRA-r17 ::= SEQUENCE -struct need_for_gap_ncsg_info_eutra_r17_s { - using need_for_ncsg_eutra_r17_l_ = dyn_array; - - // member variables - need_for_ncsg_eutra_r17_l_ need_for_ncsg_eutra_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeedForGapNCSG-InfoNR-r17 ::= SEQUENCE -struct need_for_gap_ncsg_info_nr_r17_s { - need_for_ncsg_intra_freq_list_r17_l intra_freq_need_for_ncsg_r17; - need_for_ncsg_band_list_nr_r17_l inter_freq_need_for_ncsg_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeedForGapsIntraFreq-r16 ::= SEQUENCE -struct need_for_gaps_intra_freq_r16_s { - struct gap_ind_intra_r16_opts { - enum options { gap, no_gap, nulltype } value; - - const char* to_string() const; - }; - using gap_ind_intra_r16_e_ = enumerated; - - // member variables - uint8_t serv_cell_id_r16 = 0; - gap_ind_intra_r16_e_ gap_ind_intra_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeedForGapsNR-r16 ::= SEQUENCE -struct need_for_gaps_nr_r16_s { - struct gap_ind_r16_opts { - enum options { gap, no_gap, nulltype } value; - - const char* to_string() const; - }; - using gap_ind_r16_e_ = enumerated; - - // member variables - uint16_t band_nr_r16 = 1; - gap_ind_r16_e_ gap_ind_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PCI-ARFCN-EUTRA-r16 ::= SEQUENCE -struct pci_arfcn_eutra_r16_s { - uint16_t pci_r16 = 0; - uint32_t carrier_freq_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PCI-ARFCN-NR-r16 ::= SEQUENCE -struct pci_arfcn_nr_r16_s { - uint16_t pci_r16 = 0; - uint32_t carrier_freq_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PerRACSI-RSInfo-r16 ::= SEQUENCE -struct per_ra_csi_r_si_nfo_r16_s { - uint8_t csi_rs_idx_r16 = 0; - uint8_t nof_preambs_sent_on_csi_rs_r16 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PerRASSBInfo-r16 ::= SEQUENCE -struct per_ra_ssb_info_r16_s { - uint8_t ssb_idx_r16 = 0; - uint8_t nof_preambs_sent_on_ssb_r16 = 1; - per_ra_attempt_info_list_r16_l per_ra_attempt_info_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCReconfigurationComplete-v1720-IEs ::= SEQUENCE -struct rrc_recfg_complete_v1720_ies_s { - bool non_crit_ext_present = false; - ul_tx_direct_current_more_carrier_list_r17_l ul_tx_direct_current_more_carrier_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ResultsPerSSB-IndexIdle-r16 ::= SEQUENCE -struct results_per_ssb_idx_idle_r16_s { - struct ssb_results_r16_s_ { - bool ssb_rsrp_result_r16_present = false; - bool ssb_rsrq_result_r16_present = false; - uint8_t ssb_rsrp_result_r16 = 0; - uint8_t ssb_rsrq_result_r16 = 0; - }; - - // member variables - bool ssb_results_r16_present = false; - uint8_t ssb_idx_r16 = 0; - ssb_results_r16_s_ ssb_results_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-PagingIdentityRemoteUE-r17 ::= SEQUENCE -struct sl_paging_id_remote_ue_r17_s { - bool full_i_rnti_r17_present = false; - fixed_bitstring<48> ng_5_g_s_tmsi_r17; - fixed_bitstring<40> full_i_rnti_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-RLC-ModeIndication-r16 ::= SEQUENCE -struct sl_rlc_mode_ind_r16_s { - struct sl_mode_r16_c_ { - struct types_opts { - enum options { sl_am_mode_r16, sl_um_mode_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - sl_mode_r16_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 - void set_sl_am_mode_r16(); - void set_sl_um_mode_r16(); - - private: - types type_; - }; - using sl_qos_info_list_r16_l_ = dyn_array; - - // member variables - sl_mode_r16_c_ sl_mode_r16; - sl_qos_info_list_r16_l_ sl_qos_info_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-TxInterestedFreqList-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..8) -using sl_tx_interested_freq_list_r16_l = bounded_array; - -// UplinkTxDirectCurrentTwoCarrier-r16 ::= SEQUENCE -struct ul_tx_direct_current_two_carrier_r16_s { - bool second_pa_tx_direct_current_r16_present = false; - ul_tx_direct_current_carrier_info_r16_s carrier_one_info_r16; - ul_tx_direct_current_carrier_info_r16_s carrier_two_info_r16; - ul_tx_direct_current_two_carrier_info_r16_s single_pa_tx_direct_current_r16; - ul_tx_direct_current_two_carrier_info_r16_s second_pa_tx_direct_current_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// VictimSystemType-r16 ::= SEQUENCE -struct victim_sys_type_r16_s { - bool ext = false; - bool gps_r16_present = false; - bool glonass_r16_present = false; - bool bds_r16_present = false; - bool galileo_r16_present = false; - bool nav_ic_r16_present = false; - bool wlan_r16_present = false; - bool bluetooth_r16_present = false; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AffectedCarrierFreq-r16 ::= SEQUENCE -struct affected_carrier_freq_r16_s { - struct interference_direction_r16_opts { - enum options { nr, other, both, spare, nulltype } value; - - const char* to_string() const; - }; - using interference_direction_r16_e_ = enumerated; - - // member variables - uint32_t carrier_freq_r16 = 0; - interference_direction_r16_e_ interference_direction_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AffectedCarrierFreqComb-r16 ::= SEQUENCE -struct affected_carrier_freq_comb_r16_s { - using affected_carrier_freq_comb_r16_l_ = bounded_array; - - // member variables - affected_carrier_freq_comb_r16_l_ affected_carrier_freq_comb_r16; - victim_sys_type_r16_s victim_sys_type_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CommonLocationInfo-r16 ::= SEQUENCE -struct common_location_info_r16_s { - dyn_octstring gnss_tod_msec_r16; - dyn_octstring location_timestamp_r16; - dyn_octstring location_coordinate_r16; - dyn_octstring location_error_r16; - dyn_octstring location_source_r16; - dyn_octstring velocity_estimate_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// LogMeasResultListBT-r16 ::= SEQUENCE (SIZE (1..32)) OF LogMeasResultBT-r16 -using log_meas_result_list_bt_r16_l = dyn_array; - -// LogMeasResultListWLAN-r16 ::= SEQUENCE (SIZE (1..32)) OF LogMeasResultWLAN-r16 -using log_meas_result_list_wlan_r16_l = dyn_array; - -// MUSIM-GapPreferenceList-r17 ::= SEQUENCE (SIZE (1..4)) OF MUSIM-GapInfo-r17 -using mu_si_m_gap_pref_list_r17_l = dyn_array; - -// MeasResult2EUTRA-r16 ::= SEQUENCE -struct meas_result2_eutra_r16_s { - uint32_t carrier_freq_r16 = 0; - meas_result_list_eutra_l meas_result_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResult2NR-r16 ::= SEQUENCE -struct meas_result2_nr_r16_s { - bool ssb_freq_r16_present = false; - bool ref_freq_csi_rs_r16_present = false; - uint32_t ssb_freq_r16 = 0; - uint32_t ref_freq_csi_rs_r16 = 0; - meas_result_list_nr_l meas_result_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultLogging2NR-r16 ::= SEQUENCE -struct meas_result_logging2_nr_r16_s { - uint32_t carrier_freq_r16 = 0; - meas_result_list_logging_nr_r16_l meas_result_list_logging_nr_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultUTRA-FDD-r16 ::= SEQUENCE -struct meas_result_utra_fdd_r16_s { - struct meas_result_r16_s_ { - bool utra_fdd_rs_cp_r16_present = false; - bool utra_fdd_ec_n0_r16_present = false; - int8_t utra_fdd_rs_cp_r16 = -5; - uint8_t utra_fdd_ec_n0_r16 = 0; - }; - - // member variables - uint16_t pci_r16 = 0; - meas_result_r16_s_ meas_result_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeedForGapsBandListNR-r16 ::= SEQUENCE (SIZE (1..1024)) OF NeedForGapsNR-r16 -using need_for_gaps_band_list_nr_r16_l = dyn_array; - -// NeedForGapsIntraFreqList-r16 ::= SEQUENCE (SIZE (1..32)) OF NeedForGapsIntraFreq-r16 -using need_for_gaps_intra_freq_list_r16_l = dyn_array; - -// PerRACSI-RSInfo-v1660 ::= SEQUENCE -struct per_ra_csi_r_si_nfo_v1660_s { - bool csi_rs_idx_v1660_present = false; - uint8_t csi_rs_idx_v1660 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PerRAInfo-r16 ::= CHOICE -struct per_ra_info_r16_c { - struct types_opts { - enum options { per_ra_ssb_info_list_r16, per_ra_csi_r_si_nfo_list_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - per_ra_info_r16_c() = default; - per_ra_info_r16_c(const per_ra_info_r16_c& other); - per_ra_info_r16_c& operator=(const per_ra_info_r16_c& other); - ~per_ra_info_r16_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 - per_ra_ssb_info_r16_s& per_ra_ssb_info_list_r16() - { - assert_choice_type(types::per_ra_ssb_info_list_r16, type_, "PerRAInfo-r16"); - return c.get(); - } - per_ra_csi_r_si_nfo_r16_s& per_ra_csi_r_si_nfo_list_r16() - { - assert_choice_type(types::per_ra_csi_r_si_nfo_list_r16, type_, "PerRAInfo-r16"); - return c.get(); - } - const per_ra_ssb_info_r16_s& per_ra_ssb_info_list_r16() const - { - assert_choice_type(types::per_ra_ssb_info_list_r16, type_, "PerRAInfo-r16"); - return c.get(); - } - const per_ra_csi_r_si_nfo_r16_s& per_ra_csi_r_si_nfo_list_r16() const - { - assert_choice_type(types::per_ra_csi_r_si_nfo_list_r16, type_, "PerRAInfo-r16"); - return c.get(); - } - per_ra_ssb_info_r16_s& set_per_ra_ssb_info_list_r16(); - per_ra_csi_r_si_nfo_r16_s& set_per_ra_csi_r_si_nfo_list_r16(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// RRCReconfigurationComplete-v1700-IEs ::= SEQUENCE -struct rrc_recfg_complete_v1700_ies_s { - bool need_for_gap_ncsg_info_nr_r17_present = false; - bool need_for_gap_ncsg_info_eutra_r17_present = false; - bool sel_cond_rrc_recfg_r17_present = false; - bool non_crit_ext_present = false; - need_for_gap_ncsg_info_nr_r17_s need_for_gap_ncsg_info_nr_r17; - need_for_gap_ncsg_info_eutra_r17_s need_for_gap_ncsg_info_eutra_r17; - uint8_t sel_cond_rrc_recfg_r17 = 1; - rrc_recfg_complete_v1720_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; -}; - -// ReducedAggregatedBandwidth ::= ENUMERATED -struct reduced_aggr_bw_opts { - enum options { - mhz0, - mhz10, - mhz20, - mhz30, - mhz40, - mhz50, - mhz60, - mhz80, - mhz100, - mhz200, - mhz300, - mhz400, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; -}; -using reduced_aggr_bw_e = enumerated; - -// ReducedAggregatedBandwidth-r17 ::= ENUMERATED -struct reduced_aggr_bw_r17_opts { - enum options { mhz0, mhz100, mhz200, mhz400, mhz800, mhz1200, mhz1600, mhz2000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; -}; -using reduced_aggr_bw_r17_e = enumerated; - -// ResultsPerSSB-IndexList-r16 ::= SEQUENCE (SIZE (1..32)) OF ResultsPerSSB-IndexIdle-r16 -using results_per_ssb_idx_list_r16_l = dyn_array; - -// SL-DRX-ConfigUC-SemiStatic-r17 ::= SEQUENCE -struct sl_drx_cfg_uc_semi_static_r17_s { - struct sl_drx_on_dur_timer_r17_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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using milli_seconds_e_ = enumerated; - struct types_opts { - enum options { sub_milli_seconds, milli_seconds, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - sl_drx_on_dur_timer_r17_c_() = default; - sl_drx_on_dur_timer_r17_c_(const sl_drx_on_dur_timer_r17_c_& other); - sl_drx_on_dur_timer_r17_c_& operator=(const sl_drx_on_dur_timer_r17_c_& other); - ~sl_drx_on_dur_timer_r17_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(types::sub_milli_seconds, type_, "sl-drx-onDurationTimer-r17"); - return c.get(); - } - milli_seconds_e_& milli_seconds() - { - assert_choice_type(types::milli_seconds, type_, "sl-drx-onDurationTimer-r17"); - return c.get(); - } - const uint8_t& sub_milli_seconds() const - { - assert_choice_type(types::sub_milli_seconds, type_, "sl-drx-onDurationTimer-r17"); - return c.get(); - } - const milli_seconds_e_& milli_seconds() const - { - assert_choice_type(types::milli_seconds, type_, "sl-drx-onDurationTimer-r17"); - return c.get(); - } - uint8_t& set_sub_milli_seconds(); - milli_seconds_e_& set_milli_seconds(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct sl_drx_cycle_start_offset_r17_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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using types = enumerated; - - // choice methods - sl_drx_cycle_start_offset_r17_c_() = default; - sl_drx_cycle_start_offset_r17_c_(const sl_drx_cycle_start_offset_r17_c_& other); - sl_drx_cycle_start_offset_r17_c_& operator=(const sl_drx_cycle_start_offset_r17_c_& other); - ~sl_drx_cycle_start_offset_r17_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() - { - assert_choice_type(types::ms10, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint8_t& ms20() - { - assert_choice_type(types::ms20, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint8_t& ms32() - { - assert_choice_type(types::ms32, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint8_t& ms40() - { - assert_choice_type(types::ms40, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint8_t& ms60() - { - assert_choice_type(types::ms60, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint8_t& ms64() - { - assert_choice_type(types::ms64, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint8_t& ms70() - { - assert_choice_type(types::ms70, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint8_t& ms80() - { - assert_choice_type(types::ms80, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint8_t& ms128() - { - assert_choice_type(types::ms128, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint8_t& ms160() - { - assert_choice_type(types::ms160, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint16_t& ms256() - { - assert_choice_type(types::ms256, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint16_t& ms320() - { - assert_choice_type(types::ms320, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint16_t& ms512() - { - assert_choice_type(types::ms512, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint16_t& ms640() - { - assert_choice_type(types::ms640, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint16_t& ms1024() - { - assert_choice_type(types::ms1024, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint16_t& ms1280() - { - assert_choice_type(types::ms1280, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint16_t& ms2048() - { - assert_choice_type(types::ms2048, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint16_t& ms2560() - { - assert_choice_type(types::ms2560, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint16_t& ms5120() - { - assert_choice_type(types::ms5120, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint16_t& ms10240() - { - assert_choice_type(types::ms10240, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint8_t& ms10() const - { - assert_choice_type(types::ms10, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint8_t& ms20() const - { - assert_choice_type(types::ms20, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint8_t& ms32() const - { - assert_choice_type(types::ms32, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint8_t& ms40() const - { - assert_choice_type(types::ms40, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint8_t& ms60() const - { - assert_choice_type(types::ms60, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint8_t& ms64() const - { - assert_choice_type(types::ms64, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint8_t& ms70() const - { - assert_choice_type(types::ms70, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint8_t& ms80() const - { - assert_choice_type(types::ms80, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint8_t& ms128() const - { - assert_choice_type(types::ms128, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint8_t& ms160() const - { - assert_choice_type(types::ms160, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint16_t& ms256() const - { - assert_choice_type(types::ms256, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint16_t& ms320() const - { - assert_choice_type(types::ms320, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint16_t& ms512() const - { - assert_choice_type(types::ms512, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint16_t& ms640() const - { - assert_choice_type(types::ms640, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint16_t& ms1024() const - { - assert_choice_type(types::ms1024, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint16_t& ms1280() const - { - assert_choice_type(types::ms1280, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint16_t& ms2048() const - { - assert_choice_type(types::ms2048, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint16_t& ms2560() const - { - assert_choice_type(types::ms2560, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint16_t& ms5120() const - { - assert_choice_type(types::ms5120, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - const uint16_t& ms10240() const - { - assert_choice_type(types::ms10240, type_, "sl-drx-CycleStartOffset-r17"); - return c.get(); - } - uint8_t& set_ms10(); - uint8_t& set_ms20(); - uint8_t& set_ms32(); - uint8_t& set_ms40(); - uint8_t& set_ms60(); - uint8_t& set_ms64(); - uint8_t& set_ms70(); - uint8_t& set_ms80(); - uint8_t& set_ms128(); - uint8_t& set_ms160(); - uint16_t& set_ms256(); - uint16_t& set_ms320(); - uint16_t& set_ms512(); - uint16_t& set_ms640(); - uint16_t& set_ms1024(); - uint16_t& set_ms1280(); - uint16_t& set_ms2048(); - uint16_t& set_ms2560(); - uint16_t& set_ms5120(); - uint16_t& set_ms10240(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - sl_drx_on_dur_timer_r17_c_ sl_drx_on_dur_timer_r17; - sl_drx_cycle_start_offset_r17_c_ sl_drx_cycle_start_offset_r17; - uint8_t sl_drx_slot_offset_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-TxResourceReq-r16 ::= SEQUENCE -struct sl_tx_res_req_r16_s { - struct sl_cast_type_r16_opts { - enum options { broadcast, groupcast, unicast, spare1, nulltype } value; - - const char* to_string() const; - }; - using sl_cast_type_r16_e_ = enumerated; - using sl_rlc_mode_ind_list_r16_l_ = dyn_array; - using sl_qos_info_list_r16_l_ = dyn_array; - using sl_type_tx_sync_list_r16_l_ = bounded_array; - - // member variables - fixed_bitstring<24> sl_dest_id_r16; - sl_cast_type_r16_e_ sl_cast_type_r16; - sl_rlc_mode_ind_list_r16_l_ sl_rlc_mode_ind_list_r16; - sl_qos_info_list_r16_l_ sl_qos_info_list_r16; - sl_type_tx_sync_list_r16_l_ sl_type_tx_sync_list_r16; - sl_tx_interested_freq_list_r16_l sl_tx_interested_freq_list_r16; - dyn_octstring sl_cap_info_sidelink_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-TxResourceReqL2U2N-Relay-r17 ::= SEQUENCE -struct sl_tx_res_req_l2_u2_n_relay_r17_s { - using sl_type_tx_sync_list_l2_u2_n_r17_l_ = bounded_array; - - // member variables - bool ext = false; - bool sl_dest_id_l2_u2_n_r17_present = false; - bool sl_local_id_request_r17_present = false; - bool sl_paging_id_remote_ue_r17_present = false; - fixed_bitstring<24> sl_dest_id_l2_u2_n_r17; - sl_tx_interested_freq_list_r16_l sl_tx_interested_freq_list_l2_u2_n_r17; - sl_type_tx_sync_list_l2_u2_n_r17_l_ sl_type_tx_sync_list_l2_u2_n_r17; - sl_paging_id_remote_ue_r17_s sl_paging_id_remote_ue_r17; - dyn_octstring sl_cap_info_sidelink_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// Sensor-LocationInfo-r16 ::= SEQUENCE -struct sensor_location_info_r16_s { - bool ext = false; - dyn_octstring sensor_meas_info_r16; - dyn_octstring sensor_motion_info_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UplinkTxDirectCurrentTwoCarrierList-r16 ::= SEQUENCE (SIZE (1..64)) OF UplinkTxDirectCurrentTwoCarrier-r16 -using ul_tx_direct_current_two_carrier_list_r16_l = dyn_array; - -// VisitedPSCellInfo-r17 ::= SEQUENCE -struct visited_pscell_info_r17_s { - struct visited_cell_id_r17_c_ { - struct nr_cell_id_r17_c_ { - struct types_opts { - enum options { cgi_info_r17, pci_arfcn_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - nr_cell_id_r17_c_() = default; - nr_cell_id_r17_c_(const nr_cell_id_r17_c_& other); - nr_cell_id_r17_c_& operator=(const nr_cell_id_r17_c_& other); - ~nr_cell_id_r17_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 - cgi_info_logging_r16_s& cgi_info_r17() - { - assert_choice_type(types::cgi_info_r17, type_, "nr-CellId-r17"); - return c.get(); - } - pci_arfcn_nr_r16_s& pci_arfcn_r17() - { - assert_choice_type(types::pci_arfcn_r17, type_, "nr-CellId-r17"); - return c.get(); - } - const cgi_info_logging_r16_s& cgi_info_r17() const - { - assert_choice_type(types::cgi_info_r17, type_, "nr-CellId-r17"); - return c.get(); - } - const pci_arfcn_nr_r16_s& pci_arfcn_r17() const - { - assert_choice_type(types::pci_arfcn_r17, type_, "nr-CellId-r17"); - return c.get(); - } - cgi_info_logging_r16_s& set_cgi_info_r17(); - pci_arfcn_nr_r16_s& set_pci_arfcn_r17(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct eutra_cell_id_r17_c_ { - struct types_opts { - enum options { cell_global_id_r17, pci_arfcn_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - eutra_cell_id_r17_c_() = default; - eutra_cell_id_r17_c_(const eutra_cell_id_r17_c_& other); - eutra_cell_id_r17_c_& operator=(const eutra_cell_id_r17_c_& other); - ~eutra_cell_id_r17_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 - cgi_info_eutra_logging_s& cell_global_id_r17() - { - assert_choice_type(types::cell_global_id_r17, type_, "eutra-CellId-r17"); - return c.get(); - } - pci_arfcn_eutra_r16_s& pci_arfcn_r17() - { - assert_choice_type(types::pci_arfcn_r17, type_, "eutra-CellId-r17"); - return c.get(); - } - const cgi_info_eutra_logging_s& cell_global_id_r17() const - { - assert_choice_type(types::cell_global_id_r17, type_, "eutra-CellId-r17"); - return c.get(); - } - const pci_arfcn_eutra_r16_s& pci_arfcn_r17() const - { - assert_choice_type(types::pci_arfcn_r17, type_, "eutra-CellId-r17"); - return c.get(); - } - cgi_info_eutra_logging_s& set_cell_global_id_r17(); - pci_arfcn_eutra_r16_s& set_pci_arfcn_r17(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct types_opts { - enum options { nr_cell_id_r17, eutra_cell_id_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - visited_cell_id_r17_c_() = default; - visited_cell_id_r17_c_(const visited_cell_id_r17_c_& other); - visited_cell_id_r17_c_& operator=(const visited_cell_id_r17_c_& other); - ~visited_cell_id_r17_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_cell_id_r17_c_& nr_cell_id_r17() - { - assert_choice_type(types::nr_cell_id_r17, type_, "visitedCellId-r17"); - return c.get(); - } - eutra_cell_id_r17_c_& eutra_cell_id_r17() - { - assert_choice_type(types::eutra_cell_id_r17, type_, "visitedCellId-r17"); - return c.get(); - } - const nr_cell_id_r17_c_& nr_cell_id_r17() const - { - assert_choice_type(types::nr_cell_id_r17, type_, "visitedCellId-r17"); - return c.get(); - } - const eutra_cell_id_r17_c_& eutra_cell_id_r17() const - { - assert_choice_type(types::eutra_cell_id_r17, type_, "visitedCellId-r17"); - return c.get(); - } - nr_cell_id_r17_c_& set_nr_cell_id_r17(); - eutra_cell_id_r17_c_& set_eutra_cell_id_r17(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool ext = false; - bool visited_cell_id_r17_present = false; - visited_cell_id_r17_c_ visited_cell_id_r17; - uint16_t time_spent_r17 = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// AffectedCarrierFreqCombList-r16 ::= SEQUENCE (SIZE (1..128)) OF AffectedCarrierFreqComb-r16 -using affected_carrier_freq_comb_list_r16_l = dyn_array; - -// AffectedCarrierFreqList-r16 ::= SEQUENCE (SIZE (1..128)) OF AffectedCarrierFreq-r16 -using affected_carrier_freq_list_r16_l = dyn_array; - -// LocationInfo-r16 ::= SEQUENCE -struct location_info_r16_s { - bool ext = false; - bool common_location_info_r16_present = false; - bool sensor_location_info_r16_present = false; - common_location_info_r16_s common_location_info_r16; - log_meas_result_list_bt_r16_l bt_location_info_r16; - log_meas_result_list_wlan_r16_l wlan_location_info_r16; - sensor_location_info_r16_s sensor_location_info_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MUSIM-Assistance-r17 ::= SEQUENCE -struct mu_si_m_assist_r17_s { - struct musim_preferred_rrc_state_r17_opts { - enum options { idle, inactive, out_of_connected, nulltype } value; - - const char* to_string() const; - }; - using musim_preferred_rrc_state_r17_e_ = enumerated; - - // member variables - bool musim_preferred_rrc_state_r17_present = false; - musim_preferred_rrc_state_r17_e_ musim_preferred_rrc_state_r17; - mu_si_m_gap_pref_list_r17_l musim_gap_pref_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MaxBW-PreferenceFR2-2-r17 ::= SEQUENCE -struct max_bw_pref_fr2_2_r17_s { - struct reduced_max_bw_fr2_2_r17_s_ { - bool reduced_bw_fr2_2_dl_r17_present = false; - bool reduced_bw_fr2_2_ul_r17_present = false; - reduced_aggr_bw_r17_e reduced_bw_fr2_2_dl_r17; - reduced_aggr_bw_r17_e reduced_bw_fr2_2_ul_r17; - }; - - // member variables - bool reduced_max_bw_fr2_2_r17_present = false; - reduced_max_bw_fr2_2_r17_s_ reduced_max_bw_fr2_2_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MaxMIMO-LayerPreferenceFR2-2-r17 ::= SEQUENCE -struct max_mimo_layer_pref_fr2_2_r17_s { - struct reduced_max_mimo_layers_fr2_2_r17_s_ { - uint8_t reduced_mimo_layers_fr2_2_dl_r17 = 1; - uint8_t reduced_mimo_layers_fr2_2_ul_r17 = 1; - }; - - // member variables - bool reduced_max_mimo_layers_fr2_2_r17_present = false; - reduced_max_mimo_layers_fr2_2_r17_s_ reduced_max_mimo_layers_fr2_2_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultCBR-NR-r16 ::= SEQUENCE -struct meas_result_cbr_nr_r16_s { - bool ext = false; - uint8_t sl_pool_report_id_r16 = 1; - uint8_t sl_cbr_results_nr_r16 = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultCLI-RSSI-r16 ::= SEQUENCE -struct meas_result_cli_rssi_r16_s { - uint8_t rssi_res_id_r16 = 0; - uint8_t cli_rssi_result_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultFailedCell-r16 ::= SEQUENCE -struct meas_result_failed_cell_r16_s { - struct meas_result_r16_s_ { - struct cell_results_r16_s_ { - meas_quant_results_s results_ssb_cell_r16; - }; - struct rs_idx_results_r16_s_ { - results_per_ssb_idx_list_l results_ssb_idxes_r16; - }; - - // member variables - cell_results_r16_s_ cell_results_r16; - rs_idx_results_r16_s_ rs_idx_results_r16; - }; - - // member variables - cgi_info_logging_r16_s cgi_info; - meas_result_r16_s_ meas_result_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultList2EUTRA-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResult2EUTRA-r16 -using meas_result_list2_eutra_r16_l = dyn_array; - -// MeasResultList2NR-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResult2NR-r16 -using meas_result_list2_nr_r16_l = dyn_array; - -// MeasResultListLogging2NR-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResultLogging2NR-r16 -using meas_result_list_logging2_nr_r16_l = dyn_array; - -// MeasResultListUTRA-FDD-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResultUTRA-FDD-r16 -using meas_result_list_utra_fdd_r16_l = dyn_array; - -// MeasResultSRS-RSRP-r16 ::= SEQUENCE -struct meas_result_srs_rsrp_r16_s { - uint8_t srs_res_id_r16 = 0; - uint8_t srs_rsrp_result_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultServingCell-r16 ::= SEQUENCE -struct meas_result_serving_cell_r16_s { - struct results_ssb_s_ { - uint8_t best_ssb_idx = 0; - meas_quant_results_s best_ssb_results; - uint8_t nof_good_ssb = 1; - }; - - // member variables - bool results_ssb_present = false; - meas_quant_results_s results_ssb_cell; - results_ssb_s_ results_ssb; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultsPerCellIdleEUTRA-r16 ::= SEQUENCE -struct meas_results_per_cell_idle_eutra_r16_s { - struct meas_idle_result_eutra_r16_s_ { - bool rsrp_result_eutra_r16_present = false; - bool rsrq_result_eutra_r16_present = false; - uint8_t rsrp_result_eutra_r16 = 0; - int8_t rsrq_result_eutra_r16 = -30; - }; - - // member variables - bool ext = false; - uint16_t eutra_pci_r16 = 0; - meas_idle_result_eutra_r16_s_ meas_idle_result_eutra_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultsPerCellIdleNR-r16 ::= SEQUENCE -struct meas_results_per_cell_idle_nr_r16_s { - struct meas_idle_result_nr_r16_s_ { - bool rsrp_result_r16_present = false; - bool rsrq_result_r16_present = false; - uint8_t rsrp_result_r16 = 0; - uint8_t rsrq_result_r16 = 0; - results_per_ssb_idx_list_r16_l results_ssb_idxes_r16; - }; - - // member variables - bool ext = false; - uint16_t pci_r16 = 0; - meas_idle_result_nr_r16_s_ meas_idle_result_nr_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MinSchedulingOffsetPreferenceExt-r17 ::= SEQUENCE -struct min_sched_offset_pref_ext_r17_s { - struct preferred_k0_r17_s_ { - struct preferred_k0_scs_480k_hz_r17_opts { - enum options { sl8, sl16, sl32, sl48, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preferred_k0_scs_480k_hz_r17_e_ = enumerated; - struct preferred_k0_scs_960k_hz_r17_opts { - enum options { sl8, sl16, sl32, sl48, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preferred_k0_scs_960k_hz_r17_e_ = enumerated; - - // member variables - bool preferred_k0_scs_480k_hz_r17_present = false; - bool preferred_k0_scs_960k_hz_r17_present = false; - preferred_k0_scs_480k_hz_r17_e_ preferred_k0_scs_480k_hz_r17; - preferred_k0_scs_960k_hz_r17_e_ preferred_k0_scs_960k_hz_r17; - }; - struct preferred_k2_r17_s_ { - struct preferred_k2_scs_480k_hz_r17_opts { - enum options { sl8, sl16, sl32, sl48, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preferred_k2_scs_480k_hz_r17_e_ = enumerated; - struct preferred_k2_scs_960k_hz_r17_opts { - enum options { sl8, sl16, sl32, sl48, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preferred_k2_scs_960k_hz_r17_e_ = enumerated; - - // member variables - bool preferred_k2_scs_480k_hz_r17_present = false; - bool preferred_k2_scs_960k_hz_r17_present = false; - preferred_k2_scs_480k_hz_r17_e_ preferred_k2_scs_480k_hz_r17; - preferred_k2_scs_960k_hz_r17_e_ preferred_k2_scs_960k_hz_r17; - }; - - // member variables - bool preferred_k0_r17_present = false; - bool preferred_k2_r17_present = false; - preferred_k0_r17_s_ preferred_k0_r17; - preferred_k2_r17_s_ preferred_k2_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NeedForGapsInfoNR-r16 ::= SEQUENCE -struct need_for_gaps_info_nr_r16_s { - need_for_gaps_intra_freq_list_r16_l intra_freq_need_for_gap_r16; - need_for_gaps_band_list_nr_r16_l inter_freq_need_for_gap_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// OverheatingAssistance-r17 ::= SEQUENCE -struct overheat_assist_r17_s { - struct reduced_max_bw_fr2_2_r17_s_ { - reduced_aggr_bw_r17_e reduced_bw_fr2_2_dl_r17; - reduced_aggr_bw_r17_e reduced_bw_fr2_2_ul_r17; - }; - struct reduced_max_mimo_layers_fr2_2_s_ { - mimo_layers_dl_e reduced_mimo_layers_fr2_2_dl; - mimo_layers_ul_e reduced_mimo_layers_fr2_2_ul; - }; - - // member variables - bool reduced_max_bw_fr2_2_r17_present = false; - bool reduced_max_mimo_layers_fr2_2_present = false; - reduced_max_bw_fr2_2_r17_s_ reduced_max_bw_fr2_2_r17; - reduced_max_mimo_layers_fr2_2_s_ reduced_max_mimo_layers_fr2_2; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// PerRAInfoList-r16 ::= SEQUENCE (SIZE (1..200)) OF PerRAInfo-r16 -using per_ra_info_list_r16_l = dyn_array; - -// PerRAInfoList-v1660 ::= SEQUENCE (SIZE (1..200)) OF PerRACSI-RSInfo-v1660 -using per_ra_info_list_v1660_l = dyn_array; - -// PropagationDelayDifference-r17 ::= SEQUENCE (SIZE (1..4)) OF INTEGER (-270..270) -using propagation_delay_difference_r17_l = bounded_array; - -// RRCReconfigurationComplete-v1640-IEs ::= SEQUENCE -struct rrc_recfg_complete_v1640_ies_s { - bool non_crit_ext_present = false; - ul_tx_direct_current_two_carrier_list_r16_l ul_tx_direct_current_two_carrier_list_r16; - rrc_recfg_complete_v1700_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; -}; - -// RRCResumeComplete-v1720-IEs ::= SEQUENCE -struct rrc_resume_complete_v1720_ies_s { - bool non_crit_ext_present = false; - ul_tx_direct_current_more_carrier_list_r17_l ul_tx_direct_current_more_carrier_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ReducedMaxBW-FRx-r16 ::= SEQUENCE -struct reduced_max_bw_f_rx_r16_s { - reduced_aggr_bw_e reduced_bw_dl_r16; - reduced_aggr_bw_e reduced_bw_ul_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ReducedMaxCCs-r16 ::= SEQUENCE -struct reduced_max_ccs_r16_s { - uint8_t reduced_ccs_dl_r16 = 0; - uint8_t reduced_ccs_ul_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SIB-Type-r17 ::= ENUMERATED -struct sib_type_r17_opts { - enum options { - sib_type2, - sib_type3, - sib_type4, - sib_type5, - sib_type9, - sib_type10_v1610, - sib_type11_v1610, - sib_type12_v1610, - sib_type13_v1610, - sib_type14_v1610, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; -}; -using sib_type_r17_e = enumerated; - -// SL-TrafficPatternInfo-r16 ::= SEQUENCE -struct sl_traffic_pattern_info_r16_s { - struct traffic_periodicity_r16_opts { - enum options { ms20, ms50, ms100, ms200, ms300, ms400, ms500, ms600, ms700, ms800, ms900, ms1000, nulltype } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using traffic_periodicity_r16_e_ = enumerated; - - // member variables - traffic_periodicity_r16_e_ traffic_periodicity_r16; - uint16_t timing_offset_r16 = 0; - fixed_bitstring<8> msg_size_r16; - uint16_t sl_qos_flow_id_r16 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-TxResourceReq-v1700 ::= SEQUENCE -struct sl_tx_res_req_v1700_s { - using sl_drx_info_from_rx_list_r17_l_ = dyn_array; - struct sl_drx_ind_r17_opts { - enum options { on, off, nulltype } value; - - const char* to_string() const; - }; - using sl_drx_ind_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool sl_drx_ind_r17_present = false; - sl_drx_info_from_rx_list_r17_l_ sl_drx_info_from_rx_list_r17; - sl_drx_ind_r17_e_ sl_drx_ind_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-TxResourceReqCommRelay-r17 ::= CHOICE -struct sl_tx_res_req_comm_relay_r17_c { - struct types_opts { - enum options { sl_tx_res_req_l2_u2_n_relay_r17, sl_tx_res_req_l3_u2_n_relay_r17, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - sl_tx_res_req_comm_relay_r17_c() = default; - sl_tx_res_req_comm_relay_r17_c(const sl_tx_res_req_comm_relay_r17_c& other); - sl_tx_res_req_comm_relay_r17_c& operator=(const sl_tx_res_req_comm_relay_r17_c& other); - ~sl_tx_res_req_comm_relay_r17_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 - sl_tx_res_req_l2_u2_n_relay_r17_s& sl_tx_res_req_l2_u2_n_relay_r17() - { - assert_choice_type(types::sl_tx_res_req_l2_u2_n_relay_r17, type_, "SL-TxResourceReqCommRelay-r17"); - return c.get(); - } - sl_tx_res_req_r16_s& sl_tx_res_req_l3_u2_n_relay_r17() - { - assert_choice_type(types::sl_tx_res_req_l3_u2_n_relay_r17, type_, "SL-TxResourceReqCommRelay-r17"); - return c.get(); - } - const sl_tx_res_req_l2_u2_n_relay_r17_s& sl_tx_res_req_l2_u2_n_relay_r17() const - { - assert_choice_type(types::sl_tx_res_req_l2_u2_n_relay_r17, type_, "SL-TxResourceReqCommRelay-r17"); - return c.get(); - } - const sl_tx_res_req_r16_s& sl_tx_res_req_l3_u2_n_relay_r17() const - { - assert_choice_type(types::sl_tx_res_req_l3_u2_n_relay_r17, type_, "SL-TxResourceReqCommRelay-r17"); - return c.get(); - } - sl_tx_res_req_l2_u2_n_relay_r17_s& set_sl_tx_res_req_l2_u2_n_relay_r17(); - sl_tx_res_req_r16_s& set_sl_tx_res_req_l3_u2_n_relay_r17(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// UE-MeasurementsAvailable-r16 ::= SEQUENCE -struct ue_meass_available_r16_s { - bool ext = false; - bool log_meas_available_r16_present = false; - bool log_meas_available_bt_r16_present = false; - bool log_meas_available_wlan_r16_present = false; - bool conn_est_fail_info_available_r16_present = false; - bool rlf_info_available_r16_present = false; - // ... - // group 0 - bool success_ho_info_available_r17_present = false; - bool sig_log_meas_cfg_available_r17_present = false; - bool sig_log_meas_cfg_available_r17 = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UL-GapFR2-Preference-r17 ::= SEQUENCE -struct ul_gap_fr2_pref_r17_s { - bool ul_gap_fr2_pattern_pref_r17_present = false; - uint8_t ul_gap_fr2_pattern_pref_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// VisitedPSCellInfoList-r17 ::= SEQUENCE (SIZE (1..16)) OF VisitedPSCellInfo-r17 -using visited_pscell_info_list_r17_l = dyn_array; - -// ChoCandidateCell-r17 ::= CHOICE -struct cho_candidate_cell_r17_c { - struct types_opts { - enum options { cell_global_id_r17, pci_arfcn_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - cho_candidate_cell_r17_c() = default; - cho_candidate_cell_r17_c(const cho_candidate_cell_r17_c& other); - cho_candidate_cell_r17_c& operator=(const cho_candidate_cell_r17_c& other); - ~cho_candidate_cell_r17_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 - cgi_info_logging_r16_s& cell_global_id_r17() - { - assert_choice_type(types::cell_global_id_r17, type_, "ChoCandidateCell-r17"); - return c.get(); - } - pci_arfcn_nr_r16_s& pci_arfcn_r17() - { - assert_choice_type(types::pci_arfcn_r17, type_, "ChoCandidateCell-r17"); - return c.get(); - } - const cgi_info_logging_r16_s& cell_global_id_r17() const - { - assert_choice_type(types::cell_global_id_r17, type_, "ChoCandidateCell-r17"); - return c.get(); - } - const pci_arfcn_nr_r16_s& pci_arfcn_r17() const - { - assert_choice_type(types::pci_arfcn_r17, type_, "ChoCandidateCell-r17"); - return c.get(); - } - cgi_info_logging_r16_s& set_cell_global_id_r17(); - pci_arfcn_nr_r16_s& set_pci_arfcn_r17(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// ConnEstFailReport-r16 ::= SEQUENCE -struct conn_est_fail_report_r16_s { - struct meas_result_neigh_cells_r16_s_ { - meas_result_list2_nr_r16_l meas_result_neigh_cell_list_nr; - meas_result_list2_eutra_r16_l meas_result_neigh_cell_list_eutra; - }; - - // member variables - bool ext = false; - bool location_info_r16_present = false; - meas_result_failed_cell_r16_s meas_result_failed_cell_r16; - location_info_r16_s location_info_r16; - meas_result_neigh_cells_r16_s_ meas_result_neigh_cells_r16; - uint8_t nof_conn_fail_r16 = 1; - per_ra_info_list_r16_l per_ra_info_list_r16; - uint32_t time_since_fail_r16 = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// DRX-Preference-r16 ::= SEQUENCE -struct drx_pref_r16_s { - struct preferred_drx_inactivity_timer_r16_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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using preferred_drx_inactivity_timer_r16_e_ = enumerated; - struct preferred_drx_long_cycle_r16_opts { - enum options { - ms10, - ms20, - ms32, - ms40, - ms60, - ms64, - ms70, - ms80, - ms128, - ms160, - ms256, - ms320, - ms512, - ms640, - ms1024, - ms1280, - ms2048, - ms2560, - ms5120, - ms10240, - spare12, - spare11, - spare10, - spare9, - spare8, - spare7, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using preferred_drx_long_cycle_r16_e_ = enumerated; - struct preferred_drx_short_cycle_r16_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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using preferred_drx_short_cycle_r16_e_ = enumerated; - - // member variables - bool preferred_drx_inactivity_timer_r16_present = false; - bool preferred_drx_long_cycle_r16_present = false; - bool preferred_drx_short_cycle_r16_present = false; - bool preferred_drx_short_cycle_timer_r16_present = false; - preferred_drx_inactivity_timer_r16_e_ preferred_drx_inactivity_timer_r16; - preferred_drx_long_cycle_r16_e_ preferred_drx_long_cycle_r16; - preferred_drx_short_cycle_r16_e_ preferred_drx_short_cycle_r16; - uint8_t preferred_drx_short_cycle_timer_r16 = 1; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// EUTRA-RSTD-Info ::= SEQUENCE -struct eutra_rstd_info_s { - bool ext = false; - uint32_t carrier_freq = 0; - uint8_t meas_prs_offset = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// IDC-Assistance-r16 ::= SEQUENCE -struct idc_assist_r16_s { - bool ext = false; - affected_carrier_freq_list_r16_l affected_carrier_freq_list_r16; - affected_carrier_freq_comb_list_r16_l affected_carrier_freq_comb_list_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// LogMeasInfo-r16 ::= SEQUENCE -struct log_meas_info_r16_s { - struct meas_result_neigh_cells_r16_s_ { - meas_result_list_logging2_nr_r16_l meas_result_neigh_cell_list_nr; - meas_result_list2_eutra_r16_l meas_result_neigh_cell_list_eutra; - }; - - // member variables - bool ext = false; - bool location_info_r16_present = false; - bool serv_cell_id_r16_present = false; - bool meas_result_serving_cell_r16_present = false; - bool any_cell_sel_detected_r16_present = false; - location_info_r16_s location_info_r16; - uint16_t relative_time_stamp_r16 = 0; - cgi_info_logging_r16_s serv_cell_id_r16; - meas_result_serving_cell_r16_s meas_result_serving_cell_r16; - meas_result_neigh_cells_r16_s_ meas_result_neigh_cells_r16; - // ... - // group 0 - bool in_dev_coex_detected_r17_present = false; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MaxBW-Preference-r16 ::= SEQUENCE -struct max_bw_pref_r16_s { - bool reduced_max_bw_fr1_r16_present = false; - bool reduced_max_bw_fr2_r16_present = false; - reduced_max_bw_f_rx_r16_s reduced_max_bw_fr1_r16; - reduced_max_bw_f_rx_r16_s reduced_max_bw_fr2_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MaxCC-Preference-r16 ::= SEQUENCE -struct max_cc_pref_r16_s { - bool reduced_max_ccs_r16_present = false; - reduced_max_ccs_r16_s reduced_max_ccs_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MaxMIMO-LayerPreference-r16 ::= SEQUENCE -struct max_mimo_layer_pref_r16_s { - struct reduced_max_mimo_layers_fr1_r16_s_ { - uint8_t reduced_mimo_layers_fr1_dl_r16 = 1; - uint8_t reduced_mimo_layers_fr1_ul_r16 = 1; - }; - struct reduced_max_mimo_layers_fr2_r16_s_ { - uint8_t reduced_mimo_layers_fr2_dl_r16 = 1; - uint8_t reduced_mimo_layers_fr2_ul_r16 = 1; - }; - - // member variables - bool reduced_max_mimo_layers_fr1_r16_present = false; - bool reduced_max_mimo_layers_fr2_r16_present = false; - reduced_max_mimo_layers_fr1_r16_s_ reduced_max_mimo_layers_fr1_r16; - reduced_max_mimo_layers_fr2_r16_s_ reduced_max_mimo_layers_fr2_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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 - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - 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; - 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 - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResult2UTRA-FDD-r16 ::= SEQUENCE -struct meas_result2_utra_fdd_r16_s { - uint16_t carrier_freq_r16 = 0; - meas_result_list_utra_fdd_r16_l meas_result_neigh_cell_list_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; -}; - -// MeasResultListCLI-RSSI-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResultCLI-RSSI-r16 -using meas_result_list_cli_rssi_r16_l = dyn_array; - -// MeasResultListSRS-RSRP-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResultSRS-RSRP-r16 -using meas_result_list_srs_rsrp_r16_l = dyn_array; - -// MeasResultNR-SL-r16 ::= SEQUENCE -struct meas_result_nr_sl_r16_s { - using meas_result_list_cbr_nr_r16_l_ = dyn_array; - - // member variables - bool ext = false; - meas_result_list_cbr_nr_r16_l_ meas_result_list_cbr_nr_r16; - // ... - - // 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 - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultSuccessHONR-r17 ::= SEQUENCE -struct meas_result_success_ho_nr_r17_s { - struct meas_result_r17_s_ { - struct cell_results_r17_s_ { - bool results_ssb_cell_r17_present = false; - bool results_csi_rs_cell_r17_present = false; - meas_quant_results_s results_ssb_cell_r17; - meas_quant_results_s results_csi_rs_cell_r17; - }; - struct rs_idx_results_r17_s_ { - results_per_ssb_idx_list_l results_ssb_idxes_r17; - results_per_csi_rs_idx_list_l results_csi_rs_idxes_r17; - }; - - // member variables - cell_results_r17_s_ cell_results_r17; - rs_idx_results_r17_s_ rs_idx_results_r17; - }; - - // member variables - meas_result_r17_s_ meas_result_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultsPerCarrierIdleEUTRA-r16 ::= SEQUENCE -struct meas_results_per_carrier_idle_eutra_r16_s { - using meas_results_per_cell_list_idle_eutra_r16_l_ = dyn_array; - - // member variables - bool ext = false; - uint32_t carrier_freq_eutra_r16 = 0; - meas_results_per_cell_list_idle_eutra_r16_l_ meas_results_per_cell_list_idle_eutra_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultsPerCarrierIdleNR-r16 ::= SEQUENCE -struct meas_results_per_carrier_idle_nr_r16_s { - using meas_results_per_cell_list_idle_nr_r16_l_ = dyn_array; - - // member variables - bool ext = false; - uint32_t carrier_freq_r16 = 0; - meas_results_per_cell_list_idle_nr_r16_l_ meas_results_per_cell_list_idle_nr_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MinSchedulingOffsetPreference-r16 ::= SEQUENCE -struct min_sched_offset_pref_r16_s { - struct preferred_k0_r16_s_ { - struct preferred_k0_scs_15k_hz_r16_opts { - enum options { sl1, sl2, sl4, sl6, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preferred_k0_scs_15k_hz_r16_e_ = enumerated; - struct preferred_k0_scs_30k_hz_r16_opts { - enum options { sl1, sl2, sl4, sl6, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preferred_k0_scs_30k_hz_r16_e_ = enumerated; - struct preferred_k0_scs_60k_hz_r16_opts { - enum options { sl2, sl4, sl8, sl12, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preferred_k0_scs_60k_hz_r16_e_ = enumerated; - struct preferred_k0_scs_120k_hz_r16_opts { - enum options { sl2, sl4, sl8, sl12, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preferred_k0_scs_120k_hz_r16_e_ = enumerated; - - // member variables - bool preferred_k0_scs_15k_hz_r16_present = false; - bool preferred_k0_scs_30k_hz_r16_present = false; - bool preferred_k0_scs_60k_hz_r16_present = false; - bool preferred_k0_scs_120k_hz_r16_present = false; - preferred_k0_scs_15k_hz_r16_e_ preferred_k0_scs_15k_hz_r16; - preferred_k0_scs_30k_hz_r16_e_ preferred_k0_scs_30k_hz_r16; - preferred_k0_scs_60k_hz_r16_e_ preferred_k0_scs_60k_hz_r16; - preferred_k0_scs_120k_hz_r16_e_ preferred_k0_scs_120k_hz_r16; - }; - struct preferred_k2_r16_s_ { - struct preferred_k2_scs_15k_hz_r16_opts { - enum options { sl1, sl2, sl4, sl6, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preferred_k2_scs_15k_hz_r16_e_ = enumerated; - struct preferred_k2_scs_30k_hz_r16_opts { - enum options { sl1, sl2, sl4, sl6, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preferred_k2_scs_30k_hz_r16_e_ = enumerated; - struct preferred_k2_scs_60k_hz_r16_opts { - enum options { sl2, sl4, sl8, sl12, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preferred_k2_scs_60k_hz_r16_e_ = enumerated; - struct preferred_k2_scs_120k_hz_r16_opts { - enum options { sl2, sl4, sl8, sl12, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using preferred_k2_scs_120k_hz_r16_e_ = enumerated; - - // member variables - bool preferred_k2_scs_15k_hz_r16_present = false; - bool preferred_k2_scs_30k_hz_r16_present = false; - bool preferred_k2_scs_60k_hz_r16_present = false; - bool preferred_k2_scs_120k_hz_r16_present = false; - preferred_k2_scs_15k_hz_r16_e_ preferred_k2_scs_15k_hz_r16; - preferred_k2_scs_30k_hz_r16_e_ preferred_k2_scs_30k_hz_r16; - preferred_k2_scs_60k_hz_r16_e_ preferred_k2_scs_60k_hz_r16; - preferred_k2_scs_120k_hz_r16_e_ preferred_k2_scs_120k_hz_r16; - }; - - // member variables - bool preferred_k0_r16_present = false; - bool preferred_k2_r16_present = false; - preferred_k0_r16_s_ preferred_k0_r16; - preferred_k2_r16_s_ preferred_k2_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NR-PRS-MeasurementInfo-r16 ::= SEQUENCE -struct nr_prs_meas_info_r16_s { - struct nr_meas_prs_repeat_and_offset_r16_c_ { - struct types_opts { - enum options { ms20_r16, ms40_r16, ms80_r16, ms160_r16, /*...*/ nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - nr_meas_prs_repeat_and_offset_r16_c_() = default; - nr_meas_prs_repeat_and_offset_r16_c_(const nr_meas_prs_repeat_and_offset_r16_c_& other); - nr_meas_prs_repeat_and_offset_r16_c_& operator=(const nr_meas_prs_repeat_and_offset_r16_c_& other); - ~nr_meas_prs_repeat_and_offset_r16_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& ms20_r16() - { - assert_choice_type(types::ms20_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); - return c.get(); - } - uint8_t& ms40_r16() - { - assert_choice_type(types::ms40_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); - return c.get(); - } - uint8_t& ms80_r16() - { - assert_choice_type(types::ms80_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); - return c.get(); - } - uint8_t& ms160_r16() - { - assert_choice_type(types::ms160_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); - return c.get(); - } - const uint8_t& ms20_r16() const - { - assert_choice_type(types::ms20_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); - return c.get(); - } - const uint8_t& ms40_r16() const - { - assert_choice_type(types::ms40_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); - return c.get(); - } - const uint8_t& ms80_r16() const - { - assert_choice_type(types::ms80_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); - return c.get(); - } - const uint8_t& ms160_r16() const - { - assert_choice_type(types::ms160_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); - return c.get(); - } - uint8_t& set_ms20_r16(); - uint8_t& set_ms40_r16(); - uint8_t& set_ms80_r16(); - uint8_t& set_ms160_r16(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - struct nr_meas_prs_len_r16_opts { - enum options { ms1dot5, ms3, ms3dot5, ms4, ms5dot5, ms6, ms10, ms20, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using nr_meas_prs_len_r16_e_ = enumerated; - - // member variables - bool ext = false; - uint32_t dl_prs_point_a_r16 = 0; - nr_meas_prs_repeat_and_offset_r16_c_ nr_meas_prs_repeat_and_offset_r16; - nr_meas_prs_len_r16_e_ nr_meas_prs_len_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NR-TimeStamp-r17 ::= SEQUENCE -struct nr_time_stamp_r17_s { - struct nr_slot_r17_c_ { - struct types_opts { - enum options { scs15_r17, scs30_r17, scs60_r17, scs120_r17, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - nr_slot_r17_c_() = default; - nr_slot_r17_c_(const nr_slot_r17_c_& other); - nr_slot_r17_c_& operator=(const nr_slot_r17_c_& other); - ~nr_slot_r17_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& scs15_r17() - { - assert_choice_type(types::scs15_r17, type_, "nr-Slot-r17"); - return c.get(); - } - uint8_t& scs30_r17() - { - assert_choice_type(types::scs30_r17, type_, "nr-Slot-r17"); - return c.get(); - } - uint8_t& scs60_r17() - { - assert_choice_type(types::scs60_r17, type_, "nr-Slot-r17"); - return c.get(); - } - uint8_t& scs120_r17() - { - assert_choice_type(types::scs120_r17, type_, "nr-Slot-r17"); - return c.get(); - } - const uint8_t& scs15_r17() const - { - assert_choice_type(types::scs15_r17, type_, "nr-Slot-r17"); - return c.get(); - } - const uint8_t& scs30_r17() const - { - assert_choice_type(types::scs30_r17, type_, "nr-Slot-r17"); - return c.get(); - } - const uint8_t& scs60_r17() const - { - assert_choice_type(types::scs60_r17, type_, "nr-Slot-r17"); - return c.get(); - } - const uint8_t& scs120_r17() const - { - assert_choice_type(types::scs120_r17, type_, "nr-Slot-r17"); - return c.get(); - } - uint8_t& set_scs15_r17(); - uint8_t& set_scs30_r17(); - uint8_t& set_scs60_r17(); - uint8_t& set_scs120_r17(); - - private: - types type_; - pod_choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool ext = false; - uint16_t nr_sfn_r17 = 0; - nr_slot_r17_c_ nr_slot_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RA-InformationCommon-r16 ::= SEQUENCE -struct ra_info_common_r16_s { - struct msg1_fdm_r16_opts { - enum options { one, two, four, eight, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using msg1_fdm_r16_e_ = enumerated; - struct msg1_fdmcfra_r16_opts { - enum options { one, two, four, eight, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using msg1_fdmcfra_r16_e_ = enumerated; - struct msg1_scs_from_prach_cfg_idx_r16_opts { - enum options { khz1dot25, khz5, spare2, spare1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using msg1_scs_from_prach_cfg_idx_r16_e_ = enumerated; - struct msg1_scs_from_prach_cfg_idx_cfra_r16_opts { - enum options { khz1dot25, khz5, spare2, spare1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using msg1_scs_from_prach_cfg_idx_cfra_r16_e_ = enumerated; - struct msg_a_ro_fdm_r17_opts { - enum options { one, two, four, eight, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using msg_a_ro_fdm_r17_e_ = enumerated; - struct msg_a_ro_fdmcfra_r17_opts { - enum options { one, two, four, eight, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using msg_a_ro_fdmcfra_r17_e_ = enumerated; - struct msg_a_scs_from_prach_cfg_idx_r17_opts { - enum options { khz1dot25, khz5, spare2, spare1, nulltype } value; - typedef float number_type; - - const char* to_string() const; - float to_number() const; - const char* to_number_string() const; - }; - using msg_a_scs_from_prach_cfg_idx_r17_e_ = enumerated; - struct msg_a_trans_max_r17_opts { - enum options { n1, n2, n4, n6, n8, n10, n20, n50, n100, n200, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using msg_a_trans_max_r17_e_ = enumerated; - struct nrof_msg_a_po_fdm_r17_opts { - enum options { one, two, four, eight, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using nrof_msg_a_po_fdm_r17_e_ = enumerated; - using intended_sibs_r17_l_ = bounded_array; - using ssbs_for_si_acquisition_r17_l_ = dyn_array; - - // member variables - bool ext = false; - bool msg1_freq_start_r16_present = false; - bool msg1_freq_start_cfra_r16_present = false; - bool msg1_subcarrier_spacing_r16_present = false; - bool msg1_subcarrier_spacing_cfra_r16_present = false; - bool msg1_fdm_r16_present = false; - bool msg1_fdmcfra_r16_present = false; - uint32_t absolute_freq_point_a_r16 = 0; - uint16_t location_and_bw_r16 = 0; - subcarrier_spacing_e subcarrier_spacing_r16; - uint16_t msg1_freq_start_r16 = 0; - uint16_t msg1_freq_start_cfra_r16 = 0; - subcarrier_spacing_e msg1_subcarrier_spacing_r16; - subcarrier_spacing_e msg1_subcarrier_spacing_cfra_r16; - msg1_fdm_r16_e_ msg1_fdm_r16; - msg1_fdmcfra_r16_e_ msg1_fdmcfra_r16; - per_ra_info_list_r16_l per_ra_info_list_r16; - // ... - // group 0 - copy_ptr per_ra_info_list_v1660; - // group 1 - bool msg1_scs_from_prach_cfg_idx_r16_present = false; - msg1_scs_from_prach_cfg_idx_r16_e_ msg1_scs_from_prach_cfg_idx_r16; - // group 2 - bool msg1_scs_from_prach_cfg_idx_cfra_r16_present = false; - msg1_scs_from_prach_cfg_idx_cfra_r16_e_ msg1_scs_from_prach_cfg_idx_cfra_r16; - // group 3 - bool msg_a_ro_freq_start_r17_present = false; - bool msg_a_ro_freq_start_cfra_r17_present = false; - bool msg_a_subcarrier_spacing_r17_present = false; - bool msg_a_ro_fdm_r17_present = false; - bool msg_a_ro_fdmcfra_r17_present = false; - bool msg_a_scs_from_prach_cfg_idx_r17_present = false; - bool msg_a_trans_max_r17_present = false; - bool msg_a_mcs_r17_present = false; - bool nrof_prbs_per_msg_a_po_r17_present = false; - bool msg_a_pusch_time_domain_alloc_r17_present = false; - bool freq_start_msg_a_pusch_r17_present = false; - bool nrof_msg_a_po_fdm_r17_present = false; - bool dl_pathloss_rsrp_r17_present = false; - bool msg_a_pusch_payload_size_r17_present = false; - bool on_demand_si_success_r17_present = false; - uint16_t msg_a_ro_freq_start_r17 = 0; - uint16_t msg_a_ro_freq_start_cfra_r17 = 0; - subcarrier_spacing_e msg_a_subcarrier_spacing_r17; - msg_a_ro_fdm_r17_e_ msg_a_ro_fdm_r17; - msg_a_ro_fdmcfra_r17_e_ msg_a_ro_fdmcfra_r17; - msg_a_scs_from_prach_cfg_idx_r17_e_ msg_a_scs_from_prach_cfg_idx_r17; - msg_a_trans_max_r17_e_ msg_a_trans_max_r17; - uint8_t msg_a_mcs_r17 = 0; - uint8_t nrof_prbs_per_msg_a_po_r17 = 1; - uint8_t msg_a_pusch_time_domain_alloc_r17 = 1; - uint16_t freq_start_msg_a_pusch_r17 = 0; - nrof_msg_a_po_fdm_r17_e_ nrof_msg_a_po_fdm_r17; - uint8_t dl_pathloss_rsrp_r17 = 0; - copy_ptr intended_sibs_r17; - copy_ptr ssbs_for_si_acquisition_r17; - fixed_bitstring<5> msg_a_pusch_payload_size_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RAN-VisibleMeasurements-r17 ::= SEQUENCE -struct ran_visible_meass_r17_s { - using app_layer_buffer_level_list_r17_l_ = bounded_array; - using pdu_session_id_list_r17_l_ = dyn_array; - - // member variables - bool ext = false; - bool playout_delay_for_media_startup_r17_present = false; - app_layer_buffer_level_list_r17_l_ app_layer_buffer_level_list_r17; - uint16_t playout_delay_for_media_startup_r17 = 0; - pdu_session_id_list_r17_l_ pdu_session_id_list_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCReconfigurationComplete-v1610-IEs ::= SEQUENCE -struct rrc_recfg_complete_v1610_ies_s { - bool ue_meass_available_r16_present = false; - bool need_for_gaps_info_nr_r16_present = false; - bool non_crit_ext_present = false; - ue_meass_available_r16_s ue_meass_available_r16; - need_for_gaps_info_nr_r16_s need_for_gaps_info_nr_r16; - rrc_recfg_complete_v1640_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; -}; - -// RRCResumeComplete-v1700-IEs ::= SEQUENCE -struct rrc_resume_complete_v1700_ies_s { - bool need_for_gap_ncsg_info_nr_r17_present = false; - bool need_for_gap_ncsg_info_eutra_r17_present = false; - bool non_crit_ext_present = false; - need_for_gap_ncsg_info_nr_r17_s need_for_gap_ncsg_info_nr_r17; - need_for_gap_ncsg_info_eutra_r17_s need_for_gap_ncsg_info_eutra_r17; - rrc_resume_complete_v1720_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; -}; - -// RRCSetupComplete-v1700-IEs ::= SEQUENCE -struct rrc_setup_complete_v1700_ies_s { - bool onboarding_request_r17_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; -}; - -// ReleasePreference-r16 ::= SEQUENCE -struct release_pref_r16_s { - struct preferred_rrc_state_r16_opts { - enum options { idle, inactive, connected, out_of_connected, nulltype } value; - - const char* to_string() const; - }; - using preferred_rrc_state_r16_e_ = enumerated; - - // member variables - preferred_rrc_state_r16_e_ preferred_rrc_state_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SHR-Cause-r17 ::= SEQUENCE -struct shr_cause_r17_s { - bool ext = false; - bool t304_cause_r17_present = false; - bool t310_cause_r17_present = false; - bool t312_cause_r17_present = false; - bool source_daps_fail_r17_present = false; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-RxDRX-Report-v1700 ::= SEQUENCE -struct sl_rx_drx_report_v1700_s { - bool ext = false; - sl_drx_cfg_uc_semi_static_r17_s sl_drx_cfg_from_tx_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-RxInterestedGC-BC-Dest-r17 ::= SEQUENCE -struct sl_rx_interested_gc_bc_dest_r17_s { - using sl_rx_interested_qos_info_list_r17_l_ = dyn_array; - - // member variables - sl_rx_interested_qos_info_list_r17_l_ sl_rx_interested_qos_info_list_r17; - fixed_bitstring<24> sl_dest_id_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-TxResourceReqCommRelayInfo-r17 ::= SEQUENCE -struct sl_tx_res_req_comm_relay_info_r17_s { - bool sl_relay_drx_cfg_r17_present = false; - sl_tx_res_req_v1700_s sl_relay_drx_cfg_r17; - sl_tx_res_req_comm_relay_r17_c sl_tx_res_req_comm_relay_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-TxResourceReqDisc-r17 ::= SEQUENCE -struct sl_tx_res_req_disc_r17_s { - struct sl_cast_type_disc_r17_opts { - enum options { broadcast, groupcast, unicast, spare1, nulltype } value; - - const char* to_string() const; - }; - using sl_cast_type_disc_r17_e_ = enumerated; - using sl_type_tx_sync_list_disc_r17_l_ = bounded_array; - struct sl_discovery_type_r17_opts { - enum options { relay, non_relay, nulltype } value; - - const char* to_string() const; - }; - using sl_discovery_type_r17_e_ = enumerated; - - // member variables - bool ext = false; - bool sl_source_id_relay_ue_r17_present = false; - fixed_bitstring<24> sl_dest_id_disc_r17; - fixed_bitstring<24> sl_source_id_relay_ue_r17; - sl_cast_type_disc_r17_e_ sl_cast_type_disc_r17; - sl_tx_interested_freq_list_r16_l sl_tx_interested_freq_list_disc_r17; - sl_type_tx_sync_list_disc_r17_l_ sl_type_tx_sync_list_disc_r17; - sl_discovery_type_r17_e_ sl_discovery_type_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-UE-AssistanceInformationNR-r16 ::= SEQUENCE (SIZE (1..8)) OF SL-TrafficPatternInfo-r16 -using sl_ue_assist_info_nr_r16_l = dyn_array; - -// UEAssistanceInformation-v1700-IEs ::= SEQUENCE -struct ue_assist_info_v1700_ies_s { - struct non_sdt_data_ind_r17_s_ { - bool resume_cause_r17_present = false; - resume_cause_e resume_cause_r17; - }; - struct scg_deactivation_pref_r17_opts { - enum options { scg_deactivation_preferred, no_pref, nulltype } value; - - const char* to_string() const; - }; - using scg_deactivation_pref_r17_e_ = enumerated; - - // member variables - bool ul_gap_fr2_pref_r17_present = false; - bool musim_assist_r17_present = false; - bool overheat_assist_r17_present = false; - bool max_bw_pref_fr2_2_r17_present = false; - bool max_mimo_layer_pref_fr2_2_r17_present = false; - bool min_sched_offset_pref_ext_r17_present = false; - bool rlm_meas_relaxation_state_r17_present = false; - bool bfd_meas_relaxation_state_r17_present = false; - bool non_sdt_data_ind_r17_present = false; - bool scg_deactivation_pref_r17_present = false; - bool ul_data_r17_present = false; - bool rrm_meas_relaxation_fulfilment_r17_present = false; - bool non_crit_ext_present = false; - ul_gap_fr2_pref_r17_s ul_gap_fr2_pref_r17; - mu_si_m_assist_r17_s musim_assist_r17; - overheat_assist_r17_s overheat_assist_r17; - max_bw_pref_fr2_2_r17_s max_bw_pref_fr2_2_r17; - max_mimo_layer_pref_fr2_2_r17_s max_mimo_layer_pref_fr2_2_r17; - min_sched_offset_pref_ext_r17_s min_sched_offset_pref_ext_r17; - bool rlm_meas_relaxation_state_r17 = false; - bounded_bitstring<1, 32> bfd_meas_relaxation_state_r17; - non_sdt_data_ind_r17_s_ non_sdt_data_ind_r17; - scg_deactivation_pref_r17_e_ scg_deactivation_pref_r17; - bool rrm_meas_relaxation_fulfilment_r17 = false; - propagation_delay_difference_r17_l propagation_delay_difference_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UL-PDCP-DelayValueResult-r16 ::= SEQUENCE -struct ul_pdcp_delay_value_result_r16_s { - bool ext = false; - uint8_t drb_id_r16 = 1; - uint16_t average_delay_r16 = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UL-PDCP-ExcessDelayResult-r17 ::= SEQUENCE -struct ul_pdcp_excess_delay_result_r17_s { - bool ext = false; - uint8_t drb_id_r17 = 1; - uint8_t excess_delay_r17 = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// VisitedCellInfo-r16 ::= SEQUENCE -struct visited_cell_info_r16_s { - struct visited_cell_id_r16_c_ { - struct nr_cell_id_r16_c_ { - struct types_opts { - enum options { cgi_info, pci_arfcn_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - nr_cell_id_r16_c_() = default; - nr_cell_id_r16_c_(const nr_cell_id_r16_c_& other); - nr_cell_id_r16_c_& operator=(const nr_cell_id_r16_c_& other); - ~nr_cell_id_r16_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 - cgi_info_logging_r16_s& cgi_info() - { - assert_choice_type(types::cgi_info, type_, "nr-CellId-r16"); - return c.get(); - } - pci_arfcn_nr_r16_s& pci_arfcn_r16() - { - assert_choice_type(types::pci_arfcn_r16, type_, "nr-CellId-r16"); - return c.get(); - } - const cgi_info_logging_r16_s& cgi_info() const - { - assert_choice_type(types::cgi_info, type_, "nr-CellId-r16"); - return c.get(); - } - const pci_arfcn_nr_r16_s& pci_arfcn_r16() const - { - assert_choice_type(types::pci_arfcn_r16, type_, "nr-CellId-r16"); - return c.get(); - } - cgi_info_logging_r16_s& set_cgi_info(); - pci_arfcn_nr_r16_s& set_pci_arfcn_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct eutra_cell_id_r16_c_ { - struct types_opts { - enum options { cell_global_id_r16, pci_arfcn_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - eutra_cell_id_r16_c_() = default; - eutra_cell_id_r16_c_(const eutra_cell_id_r16_c_& other); - eutra_cell_id_r16_c_& operator=(const eutra_cell_id_r16_c_& other); - ~eutra_cell_id_r16_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 - cgi_info_eutra_s& cell_global_id_r16() - { - assert_choice_type(types::cell_global_id_r16, type_, "eutra-CellId-r16"); - return c.get(); - } - pci_arfcn_eutra_r16_s& pci_arfcn_r16() - { - assert_choice_type(types::pci_arfcn_r16, type_, "eutra-CellId-r16"); - return c.get(); - } - const cgi_info_eutra_s& cell_global_id_r16() const - { - assert_choice_type(types::cell_global_id_r16, type_, "eutra-CellId-r16"); - return c.get(); - } - const pci_arfcn_eutra_r16_s& pci_arfcn_r16() const - { - assert_choice_type(types::pci_arfcn_r16, type_, "eutra-CellId-r16"); - return c.get(); - } - cgi_info_eutra_s& set_cell_global_id_r16(); - pci_arfcn_eutra_r16_s& set_pci_arfcn_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct types_opts { - enum options { nr_cell_id_r16, eutra_cell_id_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - visited_cell_id_r16_c_() = default; - visited_cell_id_r16_c_(const visited_cell_id_r16_c_& other); - visited_cell_id_r16_c_& operator=(const visited_cell_id_r16_c_& other); - ~visited_cell_id_r16_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_cell_id_r16_c_& nr_cell_id_r16() - { - assert_choice_type(types::nr_cell_id_r16, type_, "visitedCellId-r16"); - return c.get(); - } - eutra_cell_id_r16_c_& eutra_cell_id_r16() - { - assert_choice_type(types::eutra_cell_id_r16, type_, "visitedCellId-r16"); - return c.get(); - } - const nr_cell_id_r16_c_& nr_cell_id_r16() const - { - assert_choice_type(types::nr_cell_id_r16, type_, "visitedCellId-r16"); - return c.get(); - } - const eutra_cell_id_r16_c_& eutra_cell_id_r16() const - { - assert_choice_type(types::eutra_cell_id_r16, type_, "visitedCellId-r16"); - return c.get(); - } - nr_cell_id_r16_c_& set_nr_cell_id_r16(); - eutra_cell_id_r16_c_& set_eutra_cell_id_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool ext = false; - bool visited_cell_id_r16_present = false; - visited_cell_id_r16_c_ visited_cell_id_r16; - uint16_t time_spent_r16 = 0; - // ... - // group 0 - copy_ptr visited_pscell_info_list_report_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ChoCandidateCellList-r17 ::= SEQUENCE (SIZE (1..8)) OF ChoCandidateCell-r17 -using cho_candidate_cell_list_r17_l = dyn_array; - -// ConnEstFailReportList-r17 ::= SEQUENCE (SIZE (1..4)) OF ConnEstFailReport-r16 -using conn_est_fail_report_list_r17_l = dyn_array; - -// DRB-CountInfo ::= SEQUENCE -struct drb_count_info_s { - uint8_t drb_id = 1; - uint64_t count_ul = 0; - uint64_t count_dl = 0; - - // sequence methods - 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; - -// FailureInfoDAPS-r16 ::= SEQUENCE -struct fail_info_daps_r16_s { - struct fail_type_r16_opts { - enum options { daps_fail, spare3, spare2, spare1, nulltype } value; - - const char* to_string() const; - }; - using fail_type_r16_e_ = enumerated; - - // member variables - fail_type_r16_e_ fail_type_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// LogMeasInfoList-r16 ::= SEQUENCE (SIZE (1..520)) OF LogMeasInfo-r16 -using log_meas_info_list_r16_l = dyn_array; - -// MBS-ServiceInfo-r17 ::= SEQUENCE -struct mbs_service_info_r17_s { - tmgi_r17_s tmgi_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasReportAppLayer-r17 ::= SEQUENCE -struct meas_report_app_layer_r17_s { - struct app_layer_session_status_r17_opts { - enum options { started, stopped, nulltype } value; - - const char* to_string() const; - }; - using app_layer_session_status_r17_e_ = enumerated; - - // member variables - bool app_layer_session_status_r17_present = false; - bool ran_visible_meass_r17_present = false; - uint8_t meas_cfg_app_layer_id_r17 = 0; - dyn_octstring meas_report_app_layer_container_r17; - app_layer_session_status_r17_e_ app_layer_session_status_r17; - ran_visible_meass_r17_s ran_visible_meass_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultCLI-r16 ::= SEQUENCE -struct meas_result_cli_r16_s { - meas_result_list_srs_rsrp_r16_l meas_result_list_srs_rsrp_r16; - meas_result_list_cli_rssi_r16_l meas_result_list_cli_rssi_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultCellListSFTD-NR ::= SEQUENCE (SIZE (1..3)) OF MeasResultCellSFTD-NR -using meas_result_cell_list_sftd_nr_l = dyn_array; - -// MeasResultForRSSI-r16 ::= SEQUENCE -struct meas_result_for_rssi_r16_s { - uint8_t rssi_result_r16 = 0; - uint8_t ch_occupancy_r16 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - -// MeasResultIdleEUTRA-r16 ::= SEQUENCE -struct meas_result_idle_eutra_r16_s { - using meas_results_per_carrier_list_idle_eutra_r16_l_ = dyn_array; - - // member variables - bool ext = false; - meas_results_per_carrier_list_idle_eutra_r16_l_ meas_results_per_carrier_list_idle_eutra_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultIdleNR-r16 ::= SEQUENCE -struct meas_result_idle_nr_r16_s { - struct meas_result_serving_cell_r16_s_ { - bool rsrp_result_r16_present = false; - bool rsrq_result_r16_present = false; - uint8_t rsrp_result_r16 = 0; - uint8_t rsrq_result_r16 = 0; - results_per_ssb_idx_list_r16_l results_ssb_idxes_r16; - }; - using meas_results_per_carrier_list_idle_nr_r16_l_ = dyn_array; - - // member variables - bool ext = false; - meas_result_serving_cell_r16_s_ meas_result_serving_cell_r16; - meas_results_per_carrier_list_idle_nr_r16_l_ meas_results_per_carrier_list_idle_nr_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultList2EUTRA ::= SEQUENCE (SIZE (1..8)) OF MeasResult2EUTRA-r16 -using meas_result_list2_eutra_l = dyn_array; - -// MeasResultList2NR ::= SEQUENCE (SIZE (1..8)) OF MeasResult2NR -using meas_result_list2_nr_l = dyn_array; - -// MeasResultList2UTRA ::= SEQUENCE (SIZE (1..8)) OF MeasResult2UTRA-FDD-r16 -using meas_result_list2_utra_l = dyn_array; - -// MeasResultRLFNR-r16 ::= SEQUENCE -struct meas_result_rlf_nr_r16_s { - struct meas_result_r16_s_ { - struct cell_results_r16_s_ { - bool results_ssb_cell_r16_present = false; - bool results_csi_rs_cell_r16_present = false; - meas_quant_results_s results_ssb_cell_r16; - meas_quant_results_s results_csi_rs_cell_r16; - }; - struct rs_idx_results_r16_s_ { - bool ssb_rlm_cfg_bitmap_r16_present = false; - bool csi_rs_rlm_cfg_bitmap_r16_present = false; - results_per_ssb_idx_list_l results_ssb_idxes_r16; - fixed_bitstring<64> ssb_rlm_cfg_bitmap_r16; - results_per_csi_rs_idx_list_l results_csi_rs_idxes_r16; - fixed_bitstring<96> csi_rs_rlm_cfg_bitmap_r16; - }; - - // member variables - bool rs_idx_results_r16_present = false; - cell_results_r16_s_ cell_results_r16; - rs_idx_results_r16_s_ rs_idx_results_r16; - }; - - // member variables - meas_result_r16_s_ meas_result_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultRxTxTimeDiff-r17 ::= SEQUENCE -struct meas_result_rx_tx_time_diff_r17_s { - bool ext = false; - bool rx_tx_time_diff_ue_r17_present = false; - rx_tx_time_diff_r17_s rx_tx_time_diff_ue_r17; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MeasResultServFreqListEUTRA-SCG ::= SEQUENCE (SIZE (1..32)) OF MeasResult2EUTRA -using meas_result_serv_freq_list_eutra_scg_l = dyn_array; - -// 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; - -// MeasResultsSL-r16 ::= SEQUENCE -struct meas_results_sl_r16_s { - struct meas_results_list_sl_r16_c_ { - struct types_opts { - enum options { meas_result_nr_sl_r16, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - types type() const { return types::meas_result_nr_sl_r16; } - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - // getters - meas_result_nr_sl_r16_s& meas_result_nr_sl_r16() { return c; } - const meas_result_nr_sl_r16_s& meas_result_nr_sl_r16() const { return c; } - - private: - meas_result_nr_sl_r16_s c; - }; - - // member variables - bool ext = false; - meas_results_list_sl_r16_c_ meas_results_list_sl_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// NR-PRS-MeasurementInfoList-r16 ::= SEQUENCE (SIZE (1..4)) OF NR-PRS-MeasurementInfo-r16 -using nr_prs_meas_info_list_r16_l = dyn_array; - -// OverheatingAssistance ::= SEQUENCE -struct overheat_assist_s { - 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; - }; - - // 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_r16_s reduced_max_ccs; - reduced_max_bw_f_rx_r16_s reduced_max_bw_fr1; - reduced_max_bw_f_rx_r16_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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RA-Report-r16 ::= SEQUENCE -struct ra_report_r16_s { - struct cell_id_r16_c_ { - struct types_opts { - enum options { cell_global_id_r16, pci_arfcn_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - cell_id_r16_c_() = default; - cell_id_r16_c_(const cell_id_r16_c_& other); - cell_id_r16_c_& operator=(const cell_id_r16_c_& other); - ~cell_id_r16_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 - cgi_info_logging_r16_s& cell_global_id_r16() - { - assert_choice_type(types::cell_global_id_r16, type_, "cellId-r16"); - return c.get(); - } - pci_arfcn_nr_r16_s& pci_arfcn_r16() - { - assert_choice_type(types::pci_arfcn_r16, type_, "cellId-r16"); - return c.get(); - } - const cgi_info_logging_r16_s& cell_global_id_r16() const - { - assert_choice_type(types::cell_global_id_r16, type_, "cellId-r16"); - return c.get(); - } - const pci_arfcn_nr_r16_s& pci_arfcn_r16() const - { - assert_choice_type(types::pci_arfcn_r16, type_, "cellId-r16"); - return c.get(); - } - cgi_info_logging_r16_s& set_cell_global_id_r16(); - pci_arfcn_nr_r16_s& set_pci_arfcn_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct ra_purpose_r16_opts { - enum options { - access_related, - beam_fail_recovery, - recfg_with_sync, - ul_un_synchronized, - sched_request_fail, - no_pucch_res_available, - request_for_other_si, - msg3_request_for_other_si_r17, - spare8, - spare7, - spare6, - spare5, - spare4, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ra_purpose_r16_e_ = enumerated; - - // member variables - bool ext = false; - bool ra_info_common_r16_present = false; - cell_id_r16_c_ cell_id_r16; - ra_info_common_r16_s ra_info_common_r16; - ra_purpose_r16_e_ ra_purpose_r16; - // ... - // group 0 - copy_ptr sp_cell_id_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::nr_scg_resp, type_, "scg-Response"); - return c.get(); - } - dyn_octstring& eutra_scg_resp() - { - assert_choice_type(types::eutra_scg_resp, type_, "scg-Response"); - return c.get(); - } - const dyn_octstring& nr_scg_resp() const - { - assert_choice_type(types::nr_scg_resp, type_, "scg-Response"); - return c.get(); - } - const dyn_octstring& eutra_scg_resp() const - { - assert_choice_type(types::eutra_scg_resp, type_, "scg-Response"); - return c.get(); - } - dyn_octstring& set_nr_scg_resp(); - dyn_octstring& set_eutra_scg_resp(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool scg_resp_present = false; - bool non_crit_ext_present = false; - scg_resp_c_ scg_resp; - rrc_recfg_complete_v1610_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; -}; - -// RRCResumeComplete-v1640-IEs ::= SEQUENCE -struct rrc_resume_complete_v1640_ies_s { - bool non_crit_ext_present = false; - ul_tx_direct_current_two_carrier_list_r16_l ul_tx_direct_current_two_carrier_list_r16; - rrc_resume_complete_v1700_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; -}; - -// RRCSetupComplete-v1690-IEs ::= SEQUENCE -struct rrc_setup_complete_v1690_ies_s { - bool ul_rrc_segmentation_r16_present = false; - bool non_crit_ext_present = false; - rrc_setup_complete_v1700_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; -}; - -// SL-Failure-r16 ::= SEQUENCE -struct sl_fail_r16_s { - struct sl_fail_r16_opts { - enum options { rlf, cfg_fail, drx_reject_v1710, spare5, spare4, spare3, spare2, spare1, nulltype } value; - - const char* to_string() const; - }; - using sl_fail_r16_e_ = enumerated; - - // member variables - fixed_bitstring<24> sl_dest_id_r16; - sl_fail_r16_e_ sl_fail_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SL-InterestedFreqList-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..8) -using sl_interested_freq_list_r16_l = bounded_array; - -// SL-RxDRX-ReportList-v1700 ::= SEQUENCE (SIZE (1..32)) OF SL-RxDRX-Report-v1700 -using sl_rx_drx_report_list_v1700_l = dyn_array; - -// SL-RxInterestedGC-BC-DestList-r17 ::= SEQUENCE (SIZE (1..32)) OF SL-RxInterestedGC-BC-Dest-r17 -using sl_rx_interested_gc_bc_dest_list_r17_l = dyn_array; - -// SL-TxResourceReqList-v1700 ::= SEQUENCE (SIZE (1..32)) OF SL-TxResourceReq-v1700 -using sl_tx_res_req_list_v1700_l = dyn_array; - -// SL-TxResourceReqListCommRelay-r17 ::= SEQUENCE (SIZE (1..32)) OF SL-TxResourceReqCommRelayInfo-r17 -using sl_tx_res_req_list_comm_relay_r17_l = dyn_array; - -// SL-TxResourceReqListDisc-r17 ::= SEQUENCE (SIZE (1..32)) OF SL-TxResourceReqDisc-r17 -using sl_tx_res_req_list_disc_r17_l = dyn_array; - -// SuccessHO-Report-r17 ::= SEQUENCE -struct success_ho_report_r17_s { - struct source_cell_info_r17_s_ { - bool source_cell_meas_r17_present = false; - bool rlf_in_source_daps_r17_present = false; - cgi_info_logging_r16_s source_pcell_id_r17; - meas_result_success_ho_nr_r17_s source_cell_meas_r17; - }; - struct target_cell_info_r17_s_ { - bool target_cell_meas_r17_present = false; - cgi_info_logging_r16_s target_pcell_id_r17; - meas_result_success_ho_nr_r17_s target_cell_meas_r17; - }; - struct meas_result_neigh_cells_r17_s_ { - meas_result_list2_nr_r16_l meas_result_list_nr_r17; - meas_result_list2_eutra_r16_l meas_result_list_eutra_r17; - }; - - // member variables - bool ext = false; - bool meas_result_neigh_cells_r17_present = false; - bool location_info_r17_present = false; - bool time_since_cho_recfg_r17_present = false; - bool shr_cause_r17_present = false; - bool ra_info_common_r17_present = false; - bool up_interruption_time_at_ho_r17_present = false; - bool c_rnti_r17_present = false; - source_cell_info_r17_s_ source_cell_info_r17; - target_cell_info_r17_s_ target_cell_info_r17; - meas_result_neigh_cells_r17_s_ meas_result_neigh_cells_r17; - location_info_r16_s location_info_r17; - uint16_t time_since_cho_recfg_r17 = 0; - shr_cause_r17_s shr_cause_r17; - ra_info_common_r16_s ra_info_common_r17; - uint16_t up_interruption_time_at_ho_r17 = 0; - uint32_t c_rnti_r17 = 0; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UE-CapabilityRAT-Container ::= SEQUENCE -struct ue_cap_rat_container_s { - rat_type_e rat_type; - dyn_octstring ue_cap_rat_container; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UE-TxTEG-Association-r17 ::= SEQUENCE -struct ue_tx_teg_assoc_r17_s { - using associated_srs_pos_res_id_list_r17_l_ = dyn_array; - - // member variables - bool serv_cell_id_r17_present = false; - uint8_t ue_tx_teg_id_r17 = 0; - nr_time_stamp_r17_s nr_time_stamp_r17; - associated_srs_pos_res_id_list_r17_l_ associated_srs_pos_res_id_list_r17; - uint8_t serv_cell_id_r17 = 0; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UEAssistanceInformation-v1610-IEs ::= SEQUENCE -struct ue_assist_info_v1610_ies_s { - bool idc_assist_r16_present = false; - bool drx_pref_r16_present = false; - bool max_bw_pref_r16_present = false; - bool max_cc_pref_r16_present = false; - bool max_mimo_layer_pref_r16_present = false; - bool min_sched_offset_pref_r16_present = false; - bool release_pref_r16_present = false; - bool ref_time_info_pref_r16_present = false; - bool non_crit_ext_present = false; - idc_assist_r16_s idc_assist_r16; - drx_pref_r16_s drx_pref_r16; - max_bw_pref_r16_s max_bw_pref_r16; - max_cc_pref_r16_s max_cc_pref_r16; - max_mimo_layer_pref_r16_s max_mimo_layer_pref_r16; - min_sched_offset_pref_r16_s min_sched_offset_pref_r16; - release_pref_r16_s release_pref_r16; - sl_ue_assist_info_nr_r16_l sl_ue_assist_info_nr_r16; - bool ref_time_info_pref_r16 = false; - ue_assist_info_v1700_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; -}; - -// UL-PDCP-DelayValueResultList-r16 ::= SEQUENCE (SIZE (1..29)) OF UL-PDCP-DelayValueResult-r16 -using ul_pdcp_delay_value_result_list_r16_l = dyn_array; - -// UL-PDCP-ExcessDelayResultList-r17 ::= SEQUENCE (SIZE (1..29)) OF UL-PDCP-ExcessDelayResult-r17 -using ul_pdcp_excess_delay_result_list_r17_l = dyn_array; - -// UplinkTxDirectCurrentList ::= SEQUENCE (SIZE (1..32)) OF UplinkTxDirectCurrentCell -using ul_tx_direct_current_list_l = dyn_array; - -// VisitedCellInfoList-r16 ::= SEQUENCE (SIZE (1..16)) OF VisitedCellInfo-r16 -using visited_cell_info_list_r16_l = dyn_array; - -// CarrierFreqListMBS-r17 ::= SEQUENCE (SIZE (1..16)) OF INTEGER (0..3279165) -using carrier_freq_list_mbs_r17_l = bounded_array; - -// DRB-CountInfoList ::= SEQUENCE (SIZE (0..29)) OF DRB-CountInfo -using drb_count_info_list_l = dyn_array; - -// 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; - - const char* to_string() const; - int16_t to_number() const; - }; - using type1_e_ = enumerated; - struct types_opts { - enum options { type1, /*...*/ nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // 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; - - const char* to_string() const; - }; - using fail_type_e_ = enumerated; - - // member variables - 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FailureInformation-v1610-IEs ::= SEQUENCE -struct fail_info_v1610_ies_s { - bool fail_info_daps_r16_present = false; - bool non_crit_ext_present = false; - fail_info_daps_r16_s fail_info_daps_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// FailureReportMCG-r16 ::= SEQUENCE -struct fail_report_mcg_r16_s { - struct fail_type_r16_opts { - enum options { - t310_expiry, - random_access_problem, - rlc_max_num_retx, - t312_expiry_r16, - lbt_fail_r16, - beam_fail_recovery_fail_r16, - bh_rlf_r16, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using fail_type_r16_e_ = enumerated; - - // member variables - bool ext = false; - bool fail_type_r16_present = false; - fail_type_r16_e_ fail_type_r16; - meas_result_list2_nr_l meas_result_freq_list_r16; - meas_result_list2_eutra_l meas_result_freq_list_eutra_r16; - dyn_octstring meas_result_scg_r16; - dyn_octstring meas_result_scg_eutra_r16; - meas_result_list2_utra_l meas_result_freq_list_utra_fdd_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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, - other_r16, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using fail_type_e_ = enumerated; - struct fail_type_v1610_opts { - enum options { - scg_lbt_fail_r16, - beam_fail_recovery_fail_r16, - t312_expiry_r16, - bh_rlf_r16, - beam_fail_r17, - spare3, - spare2, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using fail_type_v1610_e_ = enumerated; - struct prev_pscell_id_r17_s_ { - uint16_t pci_r17 = 0; - uint32_t carrier_freq_r17 = 0; - }; - struct failed_pscell_id_r17_s_ { - uint16_t pci_r17 = 0; - uint32_t carrier_freq_r17 = 0; - }; - - // member variables - bool ext = false; - fail_type_e_ fail_type; - meas_result_freq_list_l meas_result_freq_list; - dyn_octstring meas_result_scg_fail; - // ... - // group 0 - bool fail_type_v1610_present = false; - copy_ptr location_info_r16; - fail_type_v1610_e_ fail_type_v1610; - // group 1 - bool time_scg_fail_r17_present = false; - copy_ptr prev_pscell_id_r17; - copy_ptr failed_pscell_id_r17; - uint16_t time_scg_fail_r17 = 0; - copy_ptr per_ra_info_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - - const char* to_string() const; - uint16_t to_number() const; - }; - using fail_type_e_ = enumerated; - - // member variables - bool ext = 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; - // ... - // group 0 - copy_ptr location_info_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// IAB-IP-AddressAndTraffic-r16 ::= SEQUENCE -struct iab_ip_address_and_traffic_r16_s { - using all_traffic_iab_ip_address_r16_l_ = dyn_array; - using f1_c_traffic_ip_address_r16_l_ = dyn_array; - using f1_u_traffic_ip_address_r16_l_ = dyn_array; - using non_f1_traffic_ip_address_r16_l_ = dyn_array; - - // member variables - all_traffic_iab_ip_address_r16_l_ all_traffic_iab_ip_address_r16; - f1_c_traffic_ip_address_r16_l_ f1_c_traffic_ip_address_r16; - f1_u_traffic_ip_address_r16_l_ f1_u_traffic_ip_address_r16; - non_f1_traffic_ip_address_r16_l_ non_f1_traffic_ip_address_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// IAB-IP-AddressNumReq-r16 ::= SEQUENCE -struct iab_ip_address_num_req_r16_s { - bool ext = false; - bool all_traffic_num_req_r16_present = false; - bool f1_c_traffic_num_req_r16_present = false; - bool f1_u_traffic_num_req_r16_present = false; - bool non_f1_traffic_num_req_r16_present = false; - uint8_t all_traffic_num_req_r16 = 1; - uint8_t f1_c_traffic_num_req_r16 = 1; - uint8_t f1_u_traffic_num_req_r16 = 1; - uint8_t non_f1_traffic_num_req_r16 = 1; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// IAB-IP-AddressPrefixReq-r16 ::= SEQUENCE -struct iab_ip_address_prefix_req_r16_s { - bool ext = false; - bool all_traffic_prefix_req_r16_present = false; - bool f1_c_traffic_prefix_req_r16_present = false; - bool f1_u_traffic_prefix_req_r16_present = false; - bool non_f1_traffic_prefix_req_r16_present = false; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// IAB-IP-PrefixAndTraffic-r16 ::= SEQUENCE -struct iab_ip_prefix_and_traffic_r16_s { - bool all_traffic_iab_ip_address_r16_present = false; - bool f1_c_traffic_ip_address_r16_present = false; - bool f1_u_traffic_ip_address_r16_present = false; - bool non_f1_traffic_ip_address_r16_present = false; - iab_ip_address_r16_c all_traffic_iab_ip_address_r16; - iab_ip_address_r16_c f1_c_traffic_ip_address_r16; - iab_ip_address_r16_c f1_u_traffic_ip_address_r16; - iab_ip_address_r16_c non_f1_traffic_ip_address_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// LocationMeasurementInfo ::= CHOICE -struct location_meas_info_c { - struct types_opts { - enum options { eutra_rstd, /*...*/ eutra_fine_timing_detection, nr_prs_meas_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - location_meas_info_c() = default; - location_meas_info_c(const location_meas_info_c& other); - location_meas_info_c& operator=(const location_meas_info_c& other); - ~location_meas_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 - eutra_rstd_info_list_l& eutra_rstd() - { - assert_choice_type(types::eutra_rstd, type_, "LocationMeasurementInfo"); - return c.get(); - } - nr_prs_meas_info_list_r16_l& nr_prs_meas_r16() - { - assert_choice_type(types::nr_prs_meas_r16, type_, "LocationMeasurementInfo"); - return c.get(); - } - const eutra_rstd_info_list_l& eutra_rstd() const - { - assert_choice_type(types::eutra_rstd, type_, "LocationMeasurementInfo"); - return c.get(); - } - const nr_prs_meas_info_list_r16_l& nr_prs_meas_r16() const - { - assert_choice_type(types::nr_prs_meas_r16, type_, "LocationMeasurementInfo"); - return c.get(); - } - eutra_rstd_info_list_l& set_eutra_rstd(); - void set_eutra_fine_timing_detection(); - nr_prs_meas_info_list_r16_l& set_nr_prs_meas_r16(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// LogMeasReport-r16 ::= SEQUENCE -struct log_meas_report_r16_s { - bool ext = false; - bool log_meas_available_r16_present = false; - bool log_meas_available_bt_r16_present = false; - bool log_meas_available_wlan_r16_present = false; - fixed_bitstring<48> absolute_time_stamp_r16; - trace_ref_r16_s trace_ref_r16; - fixed_octstring<2> trace_recording_session_ref_r16; - fixed_octstring<1> tce_id_r16; - log_meas_info_list_r16_l log_meas_info_list_r16; - // ... - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MBS-ServiceList-r17 ::= SEQUENCE (SIZE (1..16)) OF MBS-ServiceInfo-r17 -using mbs_service_list_r17_l = dyn_array; - -// 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, - meas_result_list_utra_fdd_r16, - sl_meas_results_cand_relay_r17, - nulltype - } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::meas_result_list_nr, type_, "measResultNeighCells"); - return c.get(); - } - meas_result_list_eutra_l& meas_result_list_eutra() - { - assert_choice_type(types::meas_result_list_eutra, type_, "measResultNeighCells"); - return c.get(); - } - meas_result_list_utra_fdd_r16_l& meas_result_list_utra_fdd_r16() - { - assert_choice_type(types::meas_result_list_utra_fdd_r16, type_, "measResultNeighCells"); - return c.get(); - } - dyn_octstring& sl_meas_results_cand_relay_r17() - { - assert_choice_type(types::sl_meas_results_cand_relay_r17, type_, "measResultNeighCells"); - return c.get(); - } - const meas_result_list_nr_l& meas_result_list_nr() const - { - assert_choice_type(types::meas_result_list_nr, type_, "measResultNeighCells"); - return c.get(); - } - const meas_result_list_eutra_l& meas_result_list_eutra() const - { - assert_choice_type(types::meas_result_list_eutra, type_, "measResultNeighCells"); - return c.get(); - } - const meas_result_list_utra_fdd_r16_l& meas_result_list_utra_fdd_r16() const - { - assert_choice_type(types::meas_result_list_utra_fdd_r16, type_, "measResultNeighCells"); - return c.get(); - } - const dyn_octstring& sl_meas_results_cand_relay_r17() const - { - assert_choice_type(types::sl_meas_results_cand_relay_r17, type_, "measResultNeighCells"); - return c.get(); - } - meas_result_list_nr_l& set_meas_result_list_nr(); - meas_result_list_eutra_l& set_meas_result_list_eutra(); - meas_result_list_utra_fdd_r16_l& set_meas_result_list_utra_fdd_r16(); - dyn_octstring& set_sl_meas_results_cand_relay_r17(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // 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; - // ... - // 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; - // group 2 - copy_ptr meas_result_for_rssi_r16; - copy_ptr location_info_r16; - copy_ptr ul_pdcp_delay_value_result_list_r16; - copy_ptr meas_results_sl_r16; - copy_ptr meas_result_cli_r16; - // group 3 - copy_ptr meas_result_rx_tx_time_diff_r17; - dyn_octstring sl_meas_result_serving_relay_r17; - copy_ptr ul_pdcp_excess_delay_result_list_r17; - dyn_octstring coarse_location_info_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MobilityHistoryReport-r16 ::= VisitedCellInfoList-r16 -using mob_history_report_r16_l = visited_cell_info_list_r16_l; - -// PosSIB-ReqInfo-r16 ::= SEQUENCE -struct pos_sib_req_info_r16_s { - struct pos_sib_type_r16_opts { - enum options { - pos_sib_type1_neg1, - pos_sib_type1_neg2, - pos_sib_type1_neg3, - pos_sib_type1_neg4, - pos_sib_type1_neg5, - pos_sib_type1_neg6, - pos_sib_type1_neg7, - pos_sib_type1_neg8, - pos_sib_type2_neg1, - pos_sib_type2_neg2, - pos_sib_type2_neg3, - pos_sib_type2_neg4, - pos_sib_type2_neg5, - pos_sib_type2_neg6, - pos_sib_type2_neg7, - pos_sib_type2_neg8, - pos_sib_type2_neg9, - pos_sib_type2_neg10, - pos_sib_type2_neg11, - pos_sib_type2_neg12, - pos_sib_type2_neg13, - pos_sib_type2_neg14, - pos_sib_type2_neg15, - pos_sib_type2_neg16, - pos_sib_type2_neg17, - pos_sib_type2_neg18, - pos_sib_type2_neg19, - pos_sib_type2_neg20, - pos_sib_type2_neg21, - pos_sib_type2_neg22, - pos_sib_type2_neg23, - pos_sib_type3_neg1, - pos_sib_type4_neg1, - pos_sib_type5_neg1, - pos_sib_type6_neg1, - pos_sib_type6_neg2, - pos_sib_type6_neg3, - // ... - pos_sib_type1_neg9_v1710, - pos_sib_type1_neg10_v1710, - pos_sib_type2_neg24_v1710, - pos_sib_type2_neg25_v1710, - pos_sib_type6_neg4_v1710, - pos_sib_type6_neg5_v1710, - pos_sib_type6_neg6_v1710, - nulltype - } value; - - const char* to_string() const; - }; - using pos_sib_type_r16_e_ = enumerated; - - // member variables - bool gnss_id_r16_present = false; - bool sbas_id_r16_present = false; - gnss_id_r16_s gnss_id_r16; - sbas_id_r16_s sbas_id_r16; - pos_sib_type_r16_e_ pos_sib_type_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RA-ReportList-r16 ::= SEQUENCE (SIZE (1..8)) OF RA-Report-r16 -using ra_report_list_r16_l = dyn_array; - -// RLF-Report-r16 ::= CHOICE -struct rlf_report_r16_c { - struct nr_rlf_report_r16_s_ { - struct meas_result_neigh_cells_r16_s_ { - meas_result_list2_nr_r16_l meas_result_list_nr_r16; - meas_result_list2_eutra_r16_l meas_result_list_eutra_r16; - }; - struct prev_pcell_id_r16_c_ { - struct types_opts { - enum options { nr_prev_cell_r16, eutra_prev_cell_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - prev_pcell_id_r16_c_() = default; - prev_pcell_id_r16_c_(const prev_pcell_id_r16_c_& other); - prev_pcell_id_r16_c_& operator=(const prev_pcell_id_r16_c_& other); - ~prev_pcell_id_r16_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 - cgi_info_logging_r16_s& nr_prev_cell_r16() - { - assert_choice_type(types::nr_prev_cell_r16, type_, "previousPCellId-r16"); - return c.get(); - } - cgi_info_eutra_logging_s& eutra_prev_cell_r16() - { - assert_choice_type(types::eutra_prev_cell_r16, type_, "previousPCellId-r16"); - return c.get(); - } - const cgi_info_logging_r16_s& nr_prev_cell_r16() const - { - assert_choice_type(types::nr_prev_cell_r16, type_, "previousPCellId-r16"); - return c.get(); - } - const cgi_info_eutra_logging_s& eutra_prev_cell_r16() const - { - assert_choice_type(types::eutra_prev_cell_r16, type_, "previousPCellId-r16"); - return c.get(); - } - cgi_info_logging_r16_s& set_nr_prev_cell_r16(); - cgi_info_eutra_logging_s& set_eutra_prev_cell_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct failed_pcell_id_r16_c_ { - struct nr_failed_pcell_id_r16_c_ { - struct types_opts { - enum options { cell_global_id_r16, pci_arfcn_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - nr_failed_pcell_id_r16_c_() = default; - nr_failed_pcell_id_r16_c_(const nr_failed_pcell_id_r16_c_& other); - nr_failed_pcell_id_r16_c_& operator=(const nr_failed_pcell_id_r16_c_& other); - ~nr_failed_pcell_id_r16_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 - cgi_info_logging_r16_s& cell_global_id_r16() - { - assert_choice_type(types::cell_global_id_r16, type_, "nrFailedPCellId-r16"); - return c.get(); - } - pci_arfcn_nr_r16_s& pci_arfcn_r16() - { - assert_choice_type(types::pci_arfcn_r16, type_, "nrFailedPCellId-r16"); - return c.get(); - } - const cgi_info_logging_r16_s& cell_global_id_r16() const - { - assert_choice_type(types::cell_global_id_r16, type_, "nrFailedPCellId-r16"); - return c.get(); - } - const pci_arfcn_nr_r16_s& pci_arfcn_r16() const - { - assert_choice_type(types::pci_arfcn_r16, type_, "nrFailedPCellId-r16"); - return c.get(); - } - cgi_info_logging_r16_s& set_cell_global_id_r16(); - pci_arfcn_nr_r16_s& set_pci_arfcn_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct eutra_failed_pcell_id_r16_c_ { - struct types_opts { - enum options { cell_global_id_r16, pci_arfcn_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - eutra_failed_pcell_id_r16_c_() = default; - eutra_failed_pcell_id_r16_c_(const eutra_failed_pcell_id_r16_c_& other); - eutra_failed_pcell_id_r16_c_& operator=(const eutra_failed_pcell_id_r16_c_& other); - ~eutra_failed_pcell_id_r16_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 - cgi_info_eutra_logging_s& cell_global_id_r16() - { - assert_choice_type(types::cell_global_id_r16, type_, "eutraFailedPCellId-r16"); - return c.get(); - } - pci_arfcn_eutra_r16_s& pci_arfcn_r16() - { - assert_choice_type(types::pci_arfcn_r16, type_, "eutraFailedPCellId-r16"); - return c.get(); - } - const cgi_info_eutra_logging_s& cell_global_id_r16() const - { - assert_choice_type(types::cell_global_id_r16, type_, "eutraFailedPCellId-r16"); - return c.get(); - } - const pci_arfcn_eutra_r16_s& pci_arfcn_r16() const - { - assert_choice_type(types::pci_arfcn_r16, type_, "eutraFailedPCellId-r16"); - return c.get(); - } - cgi_info_eutra_logging_s& set_cell_global_id_r16(); - pci_arfcn_eutra_r16_s& set_pci_arfcn_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct types_opts { - enum options { nr_failed_pcell_id_r16, eutra_failed_pcell_id_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - failed_pcell_id_r16_c_() = default; - failed_pcell_id_r16_c_(const failed_pcell_id_r16_c_& other); - failed_pcell_id_r16_c_& operator=(const failed_pcell_id_r16_c_& other); - ~failed_pcell_id_r16_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_failed_pcell_id_r16_c_& nr_failed_pcell_id_r16() - { - assert_choice_type(types::nr_failed_pcell_id_r16, type_, "failedPCellId-r16"); - return c.get(); - } - eutra_failed_pcell_id_r16_c_& eutra_failed_pcell_id_r16() - { - assert_choice_type(types::eutra_failed_pcell_id_r16, type_, "failedPCellId-r16"); - return c.get(); - } - const nr_failed_pcell_id_r16_c_& nr_failed_pcell_id_r16() const - { - assert_choice_type(types::nr_failed_pcell_id_r16, type_, "failedPCellId-r16"); - return c.get(); - } - const eutra_failed_pcell_id_r16_c_& eutra_failed_pcell_id_r16() const - { - assert_choice_type(types::eutra_failed_pcell_id_r16, type_, "failedPCellId-r16"); - return c.get(); - } - nr_failed_pcell_id_r16_c_& set_nr_failed_pcell_id_r16(); - eutra_failed_pcell_id_r16_c_& set_eutra_failed_pcell_id_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct reconnect_cell_id_r16_c_ { - struct types_opts { - enum options { nr_reconnect_cell_id_r16, eutra_reconnect_cell_id_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - reconnect_cell_id_r16_c_() = default; - reconnect_cell_id_r16_c_(const reconnect_cell_id_r16_c_& other); - reconnect_cell_id_r16_c_& operator=(const reconnect_cell_id_r16_c_& other); - ~reconnect_cell_id_r16_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 - cgi_info_logging_r16_s& nr_reconnect_cell_id_r16() - { - assert_choice_type(types::nr_reconnect_cell_id_r16, type_, "reconnectCellId-r16"); - return c.get(); - } - cgi_info_eutra_logging_s& eutra_reconnect_cell_id_r16() - { - assert_choice_type(types::eutra_reconnect_cell_id_r16, type_, "reconnectCellId-r16"); - return c.get(); - } - const cgi_info_logging_r16_s& nr_reconnect_cell_id_r16() const - { - assert_choice_type(types::nr_reconnect_cell_id_r16, type_, "reconnectCellId-r16"); - return c.get(); - } - const cgi_info_eutra_logging_s& eutra_reconnect_cell_id_r16() const - { - assert_choice_type(types::eutra_reconnect_cell_id_r16, type_, "reconnectCellId-r16"); - return c.get(); - } - cgi_info_logging_r16_s& set_nr_reconnect_cell_id_r16(); - cgi_info_eutra_logging_s& set_eutra_reconnect_cell_id_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct conn_fail_type_r16_opts { - enum options { rlf, hof, nulltype } value; - - const char* to_string() const; - }; - using conn_fail_type_r16_e_ = enumerated; - struct rlf_cause_r16_opts { - enum options { - t310_expiry, - random_access_problem, - rlc_max_num_retx, - beam_fail_recovery_fail, - lbt_fail_r16, - bh_rlf_recovery_fail, - t312_expiry_r17, - spare1, - nulltype - } value; - typedef uint16_t number_type; - - const char* to_string() const; - uint16_t to_number() const; - }; - using rlf_cause_r16_e_ = enumerated; - struct last_ho_type_r17_opts { - enum options { cho, daps, spare2, spare1, nulltype } value; - - const char* to_string() const; - }; - using last_ho_type_r17_e_ = enumerated; - struct cho_cell_id_r17_c_ { - struct types_opts { - enum options { cell_global_id_r17, pci_arfcn_r17, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - cho_cell_id_r17_c_() = default; - cho_cell_id_r17_c_(const cho_cell_id_r17_c_& other); - cho_cell_id_r17_c_& operator=(const cho_cell_id_r17_c_& other); - ~cho_cell_id_r17_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 - cgi_info_logging_r16_s& cell_global_id_r17() - { - assert_choice_type(types::cell_global_id_r17, type_, "choCellId-r17"); - return c.get(); - } - pci_arfcn_nr_r16_s& pci_arfcn_r17() - { - assert_choice_type(types::pci_arfcn_r17, type_, "choCellId-r17"); - return c.get(); - } - const cgi_info_logging_r16_s& cell_global_id_r17() const - { - assert_choice_type(types::cell_global_id_r17, type_, "choCellId-r17"); - return c.get(); - } - const pci_arfcn_nr_r16_s& pci_arfcn_r17() const - { - assert_choice_type(types::pci_arfcn_r17, type_, "choCellId-r17"); - return c.get(); - } - cgi_info_logging_r16_s& set_cell_global_id_r17(); - pci_arfcn_nr_r16_s& set_pci_arfcn_r17(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool ext = false; - bool meas_result_neigh_cells_r16_present = false; - bool prev_pcell_id_r16_present = false; - bool reconnect_cell_id_r16_present = false; - bool time_until_reconn_r16_present = false; - bool reest_cell_id_r16_present = false; - bool time_conn_fail_r16_present = false; - bool location_info_r16_present = false; - bool no_suitable_cell_found_r16_present = false; - bool ra_info_common_r16_present = false; - meas_result_rlf_nr_r16_s meas_result_last_serv_cell_r16; - meas_result_neigh_cells_r16_s_ meas_result_neigh_cells_r16; - uint32_t c_rnti_r16 = 0; - prev_pcell_id_r16_c_ prev_pcell_id_r16; - failed_pcell_id_r16_c_ failed_pcell_id_r16; - reconnect_cell_id_r16_c_ reconnect_cell_id_r16; - uint32_t time_until_reconn_r16 = 0; - cgi_info_logging_r16_s reest_cell_id_r16; - uint16_t time_conn_fail_r16 = 0; - uint32_t time_since_fail_r16 = 0; - conn_fail_type_r16_e_ conn_fail_type_r16; - rlf_cause_r16_e_ rlf_cause_r16; - location_info_r16_s location_info_r16; - ra_info_common_r16_s ra_info_common_r16; - // ... - // group 0 - bool csi_rs_rlm_cfg_bitmap_v1650_present = false; - fixed_bitstring<96> csi_rs_rlm_cfg_bitmap_v1650; - // group 1 - bool last_ho_type_r17_present = false; - bool time_conn_source_daps_fail_r17_present = false; - bool time_since_cho_recfg_r17_present = false; - last_ho_type_r17_e_ last_ho_type_r17; - uint16_t time_conn_source_daps_fail_r17 = 0; - uint16_t time_since_cho_recfg_r17 = 0; - copy_ptr cho_cell_id_r17; - copy_ptr cho_candidate_cell_list_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - }; - struct eutra_rlf_report_r16_s_ { - bool ext = false; - cgi_info_eutra_logging_s failed_pcell_id_eutra; - dyn_octstring meas_result_rlf_report_eutra_r16; - // ... - // group 0 - dyn_octstring meas_result_rlf_report_eutra_v1690; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; - }; - struct types_opts { - enum options { nr_rlf_report_r16, eutra_rlf_report_r16, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - rlf_report_r16_c() = default; - rlf_report_r16_c(const rlf_report_r16_c& other); - rlf_report_r16_c& operator=(const rlf_report_r16_c& other); - ~rlf_report_r16_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_rlf_report_r16_s_& nr_rlf_report_r16() - { - assert_choice_type(types::nr_rlf_report_r16, type_, "RLF-Report-r16"); - return c.get(); - } - eutra_rlf_report_r16_s_& eutra_rlf_report_r16() - { - assert_choice_type(types::eutra_rlf_report_r16, type_, "RLF-Report-r16"); - return c.get(); - } - const nr_rlf_report_r16_s_& nr_rlf_report_r16() const - { - assert_choice_type(types::nr_rlf_report_r16, type_, "RLF-Report-r16"); - return c.get(); - } - const eutra_rlf_report_r16_s_& eutra_rlf_report_r16() const - { - assert_choice_type(types::eutra_rlf_report_r16, type_, "RLF-Report-r16"); - return c.get(); - } - nr_rlf_report_r16_s_& set_nr_rlf_report_r16(); - eutra_rlf_report_r16_s_& set_eutra_rlf_report_r16(); - -private: - types type_; - choice_buffer_t c; - - void destroy_(); -}; - -// RRCReconfigurationComplete-v1530-IEs ::= SEQUENCE -struct rrc_recfg_complete_v1530_ies_s { - 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCReestablishmentComplete-v1610-IEs ::= SEQUENCE -struct rrc_reest_complete_v1610_ies_s { - bool ue_meass_available_r16_present = false; - bool non_crit_ext_present = false; - ue_meass_available_r16_s ue_meass_available_r16; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCResumeComplete-v1610-IEs ::= SEQUENCE -struct rrc_resume_complete_v1610_ies_s { - struct scg_resp_r16_c_ { - struct types_opts { - enum options { nr_scg_resp, eutra_scg_resp, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - scg_resp_r16_c_() = default; - scg_resp_r16_c_(const scg_resp_r16_c_& other); - scg_resp_r16_c_& operator=(const scg_resp_r16_c_& other); - ~scg_resp_r16_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(types::nr_scg_resp, type_, "scg-Response-r16"); - return c.get(); - } - dyn_octstring& eutra_scg_resp() - { - assert_choice_type(types::eutra_scg_resp, type_, "scg-Response-r16"); - return c.get(); - } - const dyn_octstring& nr_scg_resp() const - { - assert_choice_type(types::nr_scg_resp, type_, "scg-Response-r16"); - return c.get(); - } - const dyn_octstring& eutra_scg_resp() const - { - assert_choice_type(types::eutra_scg_resp, type_, "scg-Response-r16"); - return c.get(); - } - dyn_octstring& set_nr_scg_resp(); - dyn_octstring& set_eutra_scg_resp(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - struct mob_state_r16_opts { - enum options { normal, medium, high, spare, nulltype } value; - - const char* to_string() const; - }; - using mob_state_r16_e_ = enumerated; - - // member variables - bool idle_meas_available_r16_present = false; - bool meas_result_idle_eutra_r16_present = false; - bool meas_result_idle_nr_r16_present = false; - bool scg_resp_r16_present = false; - bool ue_meass_available_r16_present = false; - bool mob_history_avail_r16_present = false; - bool mob_state_r16_present = false; - bool need_for_gaps_info_nr_r16_present = false; - bool non_crit_ext_present = false; - meas_result_idle_eutra_r16_s meas_result_idle_eutra_r16; - meas_result_idle_nr_r16_s meas_result_idle_nr_r16; - scg_resp_r16_c_ scg_resp_r16; - ue_meass_available_r16_s ue_meass_available_r16; - mob_state_r16_e_ mob_state_r16; - need_for_gaps_info_nr_r16_s need_for_gaps_info_nr_r16; - rrc_resume_complete_v1640_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; -}; - -// RRCSetupComplete-v1610-IEs ::= SEQUENCE -struct rrc_setup_complete_v1610_ies_s { - struct mob_state_r16_opts { - enum options { normal, medium, high, spare, nulltype } value; - - const char* to_string() const; - }; - using mob_state_r16_e_ = enumerated; - - // member variables - bool iab_node_ind_r16_present = false; - bool idle_meas_available_r16_present = false; - bool ue_meass_available_r16_present = false; - bool mob_history_avail_r16_present = false; - bool mob_state_r16_present = false; - bool non_crit_ext_present = false; - ue_meass_available_r16_s ue_meass_available_r16; - mob_state_r16_e_ mob_state_r16; - rrc_setup_complete_v1690_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; -}; - -// 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; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::sst, type_, "S-NSSAI"); - return c.get>(); - } - fixed_bitstring<32>& sst_sd() - { - assert_choice_type(types::sst_sd, type_, "S-NSSAI"); - return c.get>(); - } - const fixed_bitstring<8>& sst() const - { - assert_choice_type(types::sst, type_, "S-NSSAI"); - return c.get>(); - } - const fixed_bitstring<32>& sst_sd() const - { - assert_choice_type(types::sst_sd, type_, "S-NSSAI"); - return c.get>(); - } - fixed_bitstring<8>& set_sst(); - fixed_bitstring<32>& set_sst_sd(); - -private: - types type_; - choice_buffer_t> c; - - void destroy_(); -}; - -// SCGFailureInformation-v1590-IEs ::= SEQUENCE -struct scg_fail_info_v1590_ies_s { - 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; -}; - -// SCGFailureInformationEUTRA-v1590-IEs ::= SEQUENCE -struct scg_fail_info_eutra_v1590_ies_s { - 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; -}; - -// SIB-ReqInfo-r16 ::= ENUMERATED -struct sib_req_info_r16_opts { - enum options { sib12, sib13, sib14, sib20_v1700, sib21_v1700, spare3, spare2, spare1, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; -}; -using sib_req_info_r16_e = enumerated; - -// SL-FailureList-r16 ::= SEQUENCE (SIZE (1..32)) OF SL-Failure-r16 -using sl_fail_list_r16_l = dyn_array; - -// SL-TxResourceReqList-r16 ::= SEQUENCE (SIZE (1..32)) OF SL-TxResourceReq-r16 -using sl_tx_res_req_list_r16_l = dyn_array; - -// SidelinkUEInformationNR-v1700-IEs ::= SEQUENCE -struct sidelink_ue_info_nr_v1700_ies_s { - struct ue_type_r17_opts { - enum options { relay_ue, remote_ue, nulltype } value; - - const char* to_string() const; - }; - using ue_type_r17_e_ = enumerated; - - // member variables - bool ue_type_r17_present = false; - bool sl_source_id_remote_ue_r17_present = false; - bool non_crit_ext_present = false; - sl_tx_res_req_list_v1700_l sl_tx_res_req_list_v1700; - sl_rx_drx_report_list_v1700_l sl_rx_drx_report_list_v1700; - sl_rx_interested_gc_bc_dest_list_r17_l sl_rx_interested_gc_bc_dest_list_r17; - sl_interested_freq_list_r16_l sl_rx_interested_freq_list_disc_r17; - sl_tx_res_req_list_disc_r17_l sl_tx_res_req_list_disc_r17; - sl_tx_res_req_list_comm_relay_r17_l sl_tx_res_req_list_comm_relay_r17; - ue_type_r17_e_ ue_type_r17; - fixed_bitstring<24> sl_source_id_remote_ue_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UE-CapabilityRAT-ContainerList ::= SEQUENCE (SIZE (0..8)) OF UE-CapabilityRAT-Container -using ue_cap_rat_container_list_l = dyn_array; - -// UE-TxTEG-AssociationList-r17 ::= SEQUENCE (SIZE (1..256)) OF UE-TxTEG-Association-r17 -using ue_tx_teg_assoc_list_r17_l = dyn_array; - -// UEAssistanceInformation-v1540-IEs ::= SEQUENCE -struct ue_assist_info_v1540_ies_s { - bool overheat_assist_present = false; - bool non_crit_ext_present = false; - overheat_assist_s overheat_assist; - ue_assist_info_v1610_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; -}; - -// UEInformationResponse-v1700-IEs ::= SEQUENCE -struct ue_info_resp_v1700_ies_s { - bool success_ho_report_r17_present = false; - bool non_crit_ext_present = false; - success_ho_report_r17_s success_ho_report_r17; - conn_est_fail_report_list_r17_l conn_est_fail_report_list_r17; - dyn_octstring coarse_location_info_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UEPositioningAssistanceInfo-v1720-IEs ::= SEQUENCE -struct ue_positioning_assist_info_v1720_ies_s { - struct ue_tx_teg_timing_error_margin_value_r17_opts { - enum options { - tc0, - tc2, - tc4, - tc6, - tc8, - tc12, - tc16, - tc20, - tc24, - tc32, - tc40, - tc48, - tc56, - tc64, - tc72, - tc80, - nulltype - } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using ue_tx_teg_timing_error_margin_value_r17_e_ = enumerated; - - // member variables - bool ue_tx_teg_timing_error_margin_value_r17_present = false; - bool non_crit_ext_present = false; - ue_tx_teg_timing_error_margin_value_r17_e_ ue_tx_teg_timing_error_margin_value_r17; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// ULInformationTransfer-v1700-IEs ::= SEQUENCE -struct ul_info_transfer_v1700_ies_s { - bool non_crit_ext_present = false; - dyn_octstring ded_info_f1c_r17; - - // 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 non_crit_ext_present = false; - drb_count_info_list_l drb_count_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; -}; - -// DedicatedSIBRequest-r16-IEs ::= SEQUENCE -struct ded_sib_request_r16_ies_s { - struct on_demand_sib_request_list_r16_s_ { - using requested_sib_list_r16_l_ = bounded_array; - using requested_pos_sib_list_r16_l_ = dyn_array; - - // member variables - requested_sib_list_r16_l_ requested_sib_list_r16; - requested_pos_sib_list_r16_l_ requested_pos_sib_list_r16; - }; - - // member variables - bool on_demand_sib_request_list_r16_present = false; - bool non_crit_ext_present = false; - on_demand_sib_request_list_r16_s_ on_demand_sib_request_list_r16; - 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; -}; - -// FailureInformation-IEs ::= SEQUENCE -struct fail_info_ies_s { - bool fail_info_rlc_bearer_present = false; - bool non_crit_ext_present = false; - fail_info_rlc_bearer_s fail_info_rlc_bearer; - dyn_octstring late_non_crit_ext; - fail_info_v1610_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; -}; - -// IABOtherInformation-r16-IEs ::= SEQUENCE -struct iab_other_info_r16_ies_s { - struct ip_info_type_r16_c_ { - struct iab_ip_request_r16_s_ { - struct iab_ip_v6_address_req_r16_c_ { - struct types_opts { - enum options { iab_ip_v6_address_num_req_r16, iab_ip_v6_address_prefix_req_r16, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - iab_ip_v6_address_req_r16_c_() = default; - iab_ip_v6_address_req_r16_c_(const iab_ip_v6_address_req_r16_c_& other); - iab_ip_v6_address_req_r16_c_& operator=(const iab_ip_v6_address_req_r16_c_& other); - ~iab_ip_v6_address_req_r16_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 - iab_ip_address_num_req_r16_s& iab_ip_v6_address_num_req_r16() - { - assert_choice_type(types::iab_ip_v6_address_num_req_r16, type_, "iab-IPv6-AddressReq-r16"); - return c.get(); - } - iab_ip_address_prefix_req_r16_s& iab_ip_v6_address_prefix_req_r16() - { - assert_choice_type(types::iab_ip_v6_address_prefix_req_r16, type_, "iab-IPv6-AddressReq-r16"); - return c.get(); - } - const iab_ip_address_num_req_r16_s& iab_ip_v6_address_num_req_r16() const - { - assert_choice_type(types::iab_ip_v6_address_num_req_r16, type_, "iab-IPv6-AddressReq-r16"); - return c.get(); - } - const iab_ip_address_prefix_req_r16_s& iab_ip_v6_address_prefix_req_r16() const - { - assert_choice_type(types::iab_ip_v6_address_prefix_req_r16, type_, "iab-IPv6-AddressReq-r16"); - return c.get(); - } - iab_ip_address_num_req_r16_s& set_iab_ip_v6_address_num_req_r16(); - iab_ip_address_prefix_req_r16_s& set_iab_ip_v6_address_prefix_req_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool iab_ip_v4_address_num_req_r16_present = false; - bool iab_ip_v6_address_req_r16_present = false; - iab_ip_address_num_req_r16_s iab_ip_v4_address_num_req_r16; - iab_ip_v6_address_req_r16_c_ iab_ip_v6_address_req_r16; - }; - struct iab_ip_report_r16_s_ { - struct iab_ip_v6_report_r16_c_ { - struct types_opts { - enum options { iab_ip_v6_address_report_r16, iab_ip_v6_prefix_report_r16, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - iab_ip_v6_report_r16_c_() = default; - iab_ip_v6_report_r16_c_(const iab_ip_v6_report_r16_c_& other); - iab_ip_v6_report_r16_c_& operator=(const iab_ip_v6_report_r16_c_& other); - ~iab_ip_v6_report_r16_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 - iab_ip_address_and_traffic_r16_s& iab_ip_v6_address_report_r16() - { - assert_choice_type(types::iab_ip_v6_address_report_r16, type_, "iab-IPv6-Report-r16"); - return c.get(); - } - iab_ip_prefix_and_traffic_r16_s& iab_ip_v6_prefix_report_r16() - { - assert_choice_type(types::iab_ip_v6_prefix_report_r16, type_, "iab-IPv6-Report-r16"); - return c.get(); - } - const iab_ip_address_and_traffic_r16_s& iab_ip_v6_address_report_r16() const - { - assert_choice_type(types::iab_ip_v6_address_report_r16, type_, "iab-IPv6-Report-r16"); - return c.get(); - } - const iab_ip_prefix_and_traffic_r16_s& iab_ip_v6_prefix_report_r16() const - { - assert_choice_type(types::iab_ip_v6_prefix_report_r16, type_, "iab-IPv6-Report-r16"); - return c.get(); - } - iab_ip_address_and_traffic_r16_s& set_iab_ip_v6_address_report_r16(); - iab_ip_prefix_and_traffic_r16_s& set_iab_ip_v6_prefix_report_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool iab_ip_v4_address_report_r16_present = false; - bool iab_ip_v6_report_r16_present = false; - iab_ip_address_and_traffic_r16_s iab_ip_v4_address_report_r16; - iab_ip_v6_report_r16_c_ iab_ip_v6_report_r16; - }; - struct types_opts { - enum options { iab_ip_request_r16, iab_ip_report_r16, /*...*/ nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - ip_info_type_r16_c_() = default; - ip_info_type_r16_c_(const ip_info_type_r16_c_& other); - ip_info_type_r16_c_& operator=(const ip_info_type_r16_c_& other); - ~ip_info_type_r16_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 - iab_ip_request_r16_s_& iab_ip_request_r16() - { - assert_choice_type(types::iab_ip_request_r16, type_, "ip-InfoType-r16"); - return c.get(); - } - iab_ip_report_r16_s_& iab_ip_report_r16() - { - assert_choice_type(types::iab_ip_report_r16, type_, "ip-InfoType-r16"); - return c.get(); - } - const iab_ip_request_r16_s_& iab_ip_request_r16() const - { - assert_choice_type(types::iab_ip_request_r16, type_, "ip-InfoType-r16"); - return c.get(); - } - const iab_ip_report_r16_s_& iab_ip_report_r16() const - { - assert_choice_type(types::iab_ip_report_r16, type_, "ip-InfoType-r16"); - return c.get(); - } - iab_ip_request_r16_s_& set_iab_ip_request_r16(); - iab_ip_report_r16_s_& set_iab_ip_report_r16(); - - private: - types type_; - choice_buffer_t c; - - void destroy_(); - }; - - // member variables - bool non_crit_ext_present = false; - ip_info_type_r16_c_ ip_info_type_r16; - 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; -}; - -// LocationMeasurementIndication-IEs ::= SEQUENCE -struct location_meas_ind_ies_s { - 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// MBSInterestIndication-r17-IEs ::= SEQUENCE -struct mb_si_nterest_ind_r17_ies_s { - bool mbs_prio_r17_present = false; - bool non_crit_ext_present = false; - carrier_freq_list_mbs_r17_l mbs_freq_list_r17; - mbs_service_list_r17_l mbs_service_list_r17; - 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; -}; - -// MCGFailureInformation-r16-IEs ::= SEQUENCE -struct mcg_fail_info_r16_ies_s { - bool fail_report_mcg_r16_present = false; - bool non_crit_ext_present = false; - fail_report_mcg_r16_s fail_report_mcg_r16; - 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; -}; - -// MeasurementReport-IEs ::= SEQUENCE -struct meas_report_ies_s { - 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// RRCReconfigurationComplete-IEs ::= SEQUENCE -struct rrc_recfg_complete_ies_s { - bool non_crit_ext_present = false; - dyn_octstring late_non_crit_ext; - rrc_recfg_complete_v1530_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; -}; - -// RRCReestablishmentComplete-IEs ::= SEQUENCE -struct rrc_reest_complete_ies_s { - bool non_crit_ext_present = false; - dyn_octstring late_non_crit_ext; - rrc_reest_complete_v1610_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; -}; - -// RRCResumeComplete-IEs ::= SEQUENCE -struct rrc_resume_complete_ies_s { - bool sel_plmn_id_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; - rrc_resume_complete_v1610_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; -}; - -// RRCSetupComplete-IEs ::= SEQUENCE -struct rrc_setup_complete_ies_s { - struct guami_type_opts { - enum options { native, mapped, nulltype } value; - - const char* to_string() const; - }; - using guami_type_e_ = enumerated; - using s_nssai_list_l_ = dyn_array; - struct ng_5_g_s_tmsi_value_c_ { - struct types_opts { - enum options { ng_5_g_s_tmsi, ng_5_g_s_tmsi_part2, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - ng_5_g_s_tmsi_value_c_() = default; - ng_5_g_s_tmsi_value_c_(const ng_5_g_s_tmsi_value_c_& other); - ng_5_g_s_tmsi_value_c_& operator=(const ng_5_g_s_tmsi_value_c_& other); - ~ng_5_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 - fixed_bitstring<48>& ng_5_g_s_tmsi() - { - assert_choice_type(types::ng_5_g_s_tmsi, type_, "ng-5G-S-TMSI-Value"); - return c.get>(); - } - fixed_bitstring<9>& ng_5_g_s_tmsi_part2() - { - assert_choice_type(types::ng_5_g_s_tmsi_part2, type_, "ng-5G-S-TMSI-Value"); - return c.get>(); - } - const fixed_bitstring<48>& ng_5_g_s_tmsi() const - { - assert_choice_type(types::ng_5_g_s_tmsi, type_, "ng-5G-S-TMSI-Value"); - return c.get>(); - } - const fixed_bitstring<9>& ng_5_g_s_tmsi_part2() const - { - assert_choice_type(types::ng_5_g_s_tmsi_part2, type_, "ng-5G-S-TMSI-Value"); - return c.get>(); - } - fixed_bitstring<48>& set_ng_5_g_s_tmsi(); - fixed_bitstring<9>& set_ng_5_g_s_tmsi_part2(); - - private: - types type_; - choice_buffer_t> c; - - void destroy_(); - }; - - // member variables - bool registered_amf_present = false; - bool guami_type_present = false; - bool ng_5_g_s_tmsi_value_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_5_g_s_tmsi_value_c_ ng_5_g_s_tmsi_value; - dyn_octstring late_non_crit_ext; - rrc_setup_complete_v1610_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; -}; - -// 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// SecurityModeComplete-IEs ::= SEQUENCE -struct security_mode_complete_ies_s { - 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; -}; - -// SecurityModeFailure-IEs ::= SEQUENCE -struct security_mode_fail_ies_s { - 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; -}; - -// SidelinkUEInformationNR-r16-IEs ::= SEQUENCE -struct sidelink_ue_info_nr_r16_ies_s { - bool non_crit_ext_present = false; - sl_interested_freq_list_r16_l sl_rx_interested_freq_list_r16; - sl_tx_res_req_list_r16_l sl_tx_res_req_list_r16; - sl_fail_list_r16_l sl_fail_list_r16; - dyn_octstring late_non_crit_ext; - sidelink_ue_info_nr_v1700_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; -}; - -// UEAssistanceInformation-IEs ::= SEQUENCE -struct ue_assist_info_ies_s { - bool delay_budget_report_present = false; - bool non_crit_ext_present = false; - delay_budget_report_c delay_budget_report; - dyn_octstring late_non_crit_ext; - ue_assist_info_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; -}; - -// UECapabilityInformation-IEs ::= SEQUENCE -struct ue_cap_info_ies_s { - bool ue_cap_rat_container_list_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; - - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// UEInformationResponse-r16-IEs ::= SEQUENCE -struct ue_info_resp_r16_ies_s { - bool meas_result_idle_eutra_r16_present = false; - bool meas_result_idle_nr_r16_present = false; - bool log_meas_report_r16_present = false; - bool conn_est_fail_report_r16_present = false; - bool rlf_report_r16_present = false; - bool non_crit_ext_present = false; - meas_result_idle_eutra_r16_s meas_result_idle_eutra_r16; - meas_result_idle_nr_r16_s meas_result_idle_nr_r16; - log_meas_report_r16_s log_meas_report_r16; - conn_est_fail_report_r16_s conn_est_fail_report_r16; - ra_report_list_r16_l ra_report_list_r16; - rlf_report_r16_c rlf_report_r16; - mob_history_report_r16_l mob_history_report_r16; - dyn_octstring late_non_crit_ext; - ue_info_resp_v1700_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; -}; - -// UEPositioningAssistanceInfo-r17-IEs ::= SEQUENCE -struct ue_positioning_assist_info_r17_ies_s { - bool non_crit_ext_present = false; - ue_tx_teg_assoc_list_r17_l ue_tx_teg_assoc_list_r17; - dyn_octstring late_non_crit_ext; - ue_positioning_assist_info_v1720_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; -}; - -// ULDedicatedMessageSegment-r16-IEs ::= SEQUENCE -struct ul_ded_msg_segment_r16_ies_s { - struct rrc_msg_segment_type_r16_opts { - enum options { not_last_segment, last_segment, nulltype } value; - - const char* to_string() const; - }; - using rrc_msg_segment_type_r16_e_ = enumerated; - - // member variables - bool non_crit_ext_present = false; - uint8_t segment_num_r16 = 0; - dyn_octstring rrc_msg_segment_container_r16; - rrc_msg_segment_type_r16_e_ rrc_msg_segment_type_r16; - 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; -}; - -// ULInformationTransfer-IEs ::= SEQUENCE -struct ul_info_transfer_ies_s { - bool non_crit_ext_present = false; - dyn_octstring ded_nas_msg; - dyn_octstring late_non_crit_ext; - ul_info_transfer_v1700_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; -}; - -// ULInformationTransferIRAT-r16-IEs ::= SEQUENCE -struct ul_info_transfer_irat_r16_ies_s { - bool non_crit_ext_present = false; - dyn_octstring ul_dcch_msg_eutra_r16; - 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; -}; - -// ULInformationTransferMRDC-IEs ::= SEQUENCE -struct ul_info_transfer_mrdc_ies_s { - 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; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; - -// CounterCheckResponse ::= SEQUENCE -struct counter_check_resp_s { - struct crit_exts_c_ { - struct types_opts { - enum options { counter_check_resp, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - counter_check_resp_ies_s& counter_check_resp() - { - assert_choice_type(types::counter_check_resp, type_, "criticalExtensions"); - return c; - } - const counter_check_resp_ies_s& counter_check_resp() const - { - assert_choice_type(types::counter_check_resp, type_, "criticalExtensions"); - return c; - } - counter_check_resp_ies_s& set_counter_check_resp(); - void set_crit_exts_future(); - - private: - types type_; - counter_check_resp_ies_s c; - }; - - // 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; -}; - -// DedicatedSIBRequest-r16 ::= SEQUENCE -struct ded_sib_request_r16_s { - struct crit_exts_c_ { - struct types_opts { - enum options { ded_sib_request_r16, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - ded_sib_request_r16_ies_s& ded_sib_request_r16() - { - assert_choice_type(types::ded_sib_request_r16, type_, "criticalExtensions"); - return c; - } - const ded_sib_request_r16_ies_s& ded_sib_request_r16() const - { - assert_choice_type(types::ded_sib_request_r16, type_, "criticalExtensions"); - return c; - } - ded_sib_request_r16_ies_s& set_ded_sib_request_r16(); - void set_crit_exts_future(); - - private: - types type_; - ded_sib_request_r16_ies_s c; - }; - - // 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; -}; - -// FailureInformation ::= SEQUENCE -struct fail_info_s { - struct crit_exts_c_ { - struct types_opts { - enum options { fail_info, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - fail_info_ies_s& fail_info() - { - assert_choice_type(types::fail_info, type_, "criticalExtensions"); - return c; - } - const fail_info_ies_s& fail_info() const - { - assert_choice_type(types::fail_info, type_, "criticalExtensions"); - return c; - } - fail_info_ies_s& set_fail_info(); - void set_crit_exts_future(); - - private: - types type_; - fail_info_ies_s c; - }; - - // 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; -}; - -// IABOtherInformation-r16 ::= SEQUENCE -struct iab_other_info_r16_s { - struct crit_exts_c_ { - struct types_opts { - enum options { iab_other_info_r16, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - iab_other_info_r16_ies_s& iab_other_info_r16() - { - assert_choice_type(types::iab_other_info_r16, type_, "criticalExtensions"); - return c; - } - const iab_other_info_r16_ies_s& iab_other_info_r16() const - { - assert_choice_type(types::iab_other_info_r16, type_, "criticalExtensions"); - return c; - } - iab_other_info_r16_ies_s& set_iab_other_info_r16(); - void set_crit_exts_future(); - - private: - types type_; - iab_other_info_r16_ies_s c; - }; - - // 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; -}; - -// LocationMeasurementIndication ::= SEQUENCE -struct location_meas_ind_s { - struct crit_exts_c_ { - struct types_opts { - enum options { location_meas_ind, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - location_meas_ind_ies_s& location_meas_ind() - { - assert_choice_type(types::location_meas_ind, type_, "criticalExtensions"); - return c; - } - const location_meas_ind_ies_s& location_meas_ind() const - { - assert_choice_type(types::location_meas_ind, type_, "criticalExtensions"); - return c; - } - location_meas_ind_ies_s& set_location_meas_ind(); - void set_crit_exts_future(); - - private: - types type_; - location_meas_ind_ies_s c; - }; - - // 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; -}; - -// MBSInterestIndication-r17 ::= SEQUENCE -struct mb_si_nterest_ind_r17_s { - struct crit_exts_c_ { - struct types_opts { - enum options { mbs_interest_ind_r17, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - mb_si_nterest_ind_r17_ies_s& mbs_interest_ind_r17() - { - assert_choice_type(types::mbs_interest_ind_r17, type_, "criticalExtensions"); - return c; - } - const mb_si_nterest_ind_r17_ies_s& mbs_interest_ind_r17() const - { - assert_choice_type(types::mbs_interest_ind_r17, type_, "criticalExtensions"); - return c; - } - mb_si_nterest_ind_r17_ies_s& set_mbs_interest_ind_r17(); - void set_crit_exts_future(); - - private: - types type_; - mb_si_nterest_ind_r17_ies_s c; - }; - - // 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; -}; - -// MCGFailureInformation-r16 ::= SEQUENCE -struct mcg_fail_info_r16_s { - struct crit_exts_c_ { - struct types_opts { - enum options { mcg_fail_info_r16, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - mcg_fail_info_r16_ies_s& mcg_fail_info_r16() - { - assert_choice_type(types::mcg_fail_info_r16, type_, "criticalExtensions"); - return c; - } - const mcg_fail_info_r16_ies_s& mcg_fail_info_r16() const - { - assert_choice_type(types::mcg_fail_info_r16, type_, "criticalExtensions"); - return c; - } - mcg_fail_info_r16_ies_s& set_mcg_fail_info_r16(); - void set_crit_exts_future(); - - private: - types type_; - mcg_fail_info_r16_ies_s c; - }; - - // 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; -}; - -// MeasurementReport ::= SEQUENCE -struct meas_report_s { - struct crit_exts_c_ { - struct types_opts { - enum options { meas_report, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - meas_report_ies_s& meas_report() - { - assert_choice_type(types::meas_report, type_, "criticalExtensions"); - return c; - } - const meas_report_ies_s& meas_report() const - { - assert_choice_type(types::meas_report, type_, "criticalExtensions"); - return c; - } - meas_report_ies_s& set_meas_report(); - void set_crit_exts_future(); - - private: - types type_; - meas_report_ies_s c; - }; - - // 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; -}; - -// RRCReconfigurationComplete ::= SEQUENCE -struct rrc_recfg_complete_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_recfg_complete, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - rrc_recfg_complete_ies_s& rrc_recfg_complete() - { - assert_choice_type(types::rrc_recfg_complete, type_, "criticalExtensions"); - return c; - } - const rrc_recfg_complete_ies_s& rrc_recfg_complete() const - { - assert_choice_type(types::rrc_recfg_complete, type_, "criticalExtensions"); - return c; - } - rrc_recfg_complete_ies_s& set_rrc_recfg_complete(); - void set_crit_exts_future(); - - private: - types type_; - rrc_recfg_complete_ies_s c; - }; - - // 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; -}; - -// RRCReestablishmentComplete ::= SEQUENCE -struct rrc_reest_complete_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_reest_complete, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - rrc_reest_complete_ies_s& rrc_reest_complete() - { - assert_choice_type(types::rrc_reest_complete, type_, "criticalExtensions"); - return c; - } - const rrc_reest_complete_ies_s& rrc_reest_complete() const - { - assert_choice_type(types::rrc_reest_complete, type_, "criticalExtensions"); - return c; - } - rrc_reest_complete_ies_s& set_rrc_reest_complete(); - void set_crit_exts_future(); - - private: - types type_; - rrc_reest_complete_ies_s c; - }; - - // 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; -}; - -// RRCResumeComplete ::= SEQUENCE -struct rrc_resume_complete_s { - struct crit_exts_c_ { - struct types_opts { - enum options { rrc_resume_complete, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - rrc_resume_complete_ies_s& rrc_resume_complete() - { - assert_choice_type(types::rrc_resume_complete, type_, "criticalExtensions"); - return c; - } - const rrc_resume_complete_ies_s& rrc_resume_complete() const - { - assert_choice_type(types::rrc_resume_complete, type_, "criticalExtensions"); - return c; - } - rrc_resume_complete_ies_s& set_rrc_resume_complete(); - void set_crit_exts_future(); - - private: - types type_; - rrc_resume_complete_ies_s c; - }; - - // 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 { rrc_setup_complete, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - rrc_setup_complete_ies_s& rrc_setup_complete() - { - assert_choice_type(types::rrc_setup_complete, type_, "criticalExtensions"); - return c; - } - const rrc_setup_complete_ies_s& rrc_setup_complete() const - { - assert_choice_type(types::rrc_setup_complete, type_, "criticalExtensions"); - return c; - } - rrc_setup_complete_ies_s& set_rrc_setup_complete(); - void set_crit_exts_future(); - - private: - types type_; - rrc_setup_complete_ies_s c; - }; - - // 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; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - scg_fail_info_ies_s& scg_fail_info() - { - assert_choice_type(types::scg_fail_info, type_, "criticalExtensions"); - return c; - } - const scg_fail_info_ies_s& scg_fail_info() const - { - assert_choice_type(types::scg_fail_info, type_, "criticalExtensions"); - return c; - } - scg_fail_info_ies_s& set_scg_fail_info(); - void set_crit_exts_future(); - - private: - types type_; - scg_fail_info_ies_s c; - }; - - // 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; -}; - -// SCGFailureInformationEUTRA ::= SEQUENCE -struct scg_fail_info_eutra_s { - struct crit_exts_c_ { - struct types_opts { - enum options { scg_fail_info_eutra, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - scg_fail_info_eutra_ies_s& scg_fail_info_eutra() - { - assert_choice_type(types::scg_fail_info_eutra, type_, "criticalExtensions"); - return c; - } - const scg_fail_info_eutra_ies_s& scg_fail_info_eutra() const - { - assert_choice_type(types::scg_fail_info_eutra, type_, "criticalExtensions"); - return c; - } - scg_fail_info_eutra_ies_s& set_scg_fail_info_eutra(); - void set_crit_exts_future(); - - private: - types type_; - scg_fail_info_eutra_ies_s c; - }; - - // 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; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - security_mode_complete_ies_s& security_mode_complete() - { - assert_choice_type(types::security_mode_complete, type_, "criticalExtensions"); - return c; - } - const security_mode_complete_ies_s& security_mode_complete() const - { - assert_choice_type(types::security_mode_complete, type_, "criticalExtensions"); - return c; - } - security_mode_complete_ies_s& set_security_mode_complete(); - void set_crit_exts_future(); - - private: - types type_; - security_mode_complete_ies_s c; - }; - - // 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; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - security_mode_fail_ies_s& security_mode_fail() - { - assert_choice_type(types::security_mode_fail, type_, "criticalExtensions"); - return c; - } - const security_mode_fail_ies_s& security_mode_fail() const - { - assert_choice_type(types::security_mode_fail, type_, "criticalExtensions"); - return c; - } - security_mode_fail_ies_s& set_security_mode_fail(); - void set_crit_exts_future(); - - private: - types type_; - security_mode_fail_ies_s c; - }; - - // 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; -}; - -// SidelinkUEInformationNR-r16 ::= SEQUENCE -struct sidelink_ue_info_nr_r16_s { - struct crit_exts_c_ { - struct types_opts { - enum options { sidelink_ue_info_nr_r16, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - sidelink_ue_info_nr_r16_ies_s& sidelink_ue_info_nr_r16() - { - assert_choice_type(types::sidelink_ue_info_nr_r16, type_, "criticalExtensions"); - return c; - } - const sidelink_ue_info_nr_r16_ies_s& sidelink_ue_info_nr_r16() const - { - assert_choice_type(types::sidelink_ue_info_nr_r16, type_, "criticalExtensions"); - return c; - } - sidelink_ue_info_nr_r16_ies_s& set_sidelink_ue_info_nr_r16(); - void set_crit_exts_future(); - - private: - types type_; - sidelink_ue_info_nr_r16_ies_s c; - }; - - // 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; -}; - -// UEAssistanceInformation ::= SEQUENCE -struct ue_assist_info_s { - struct crit_exts_c_ { - struct types_opts { - enum options { ue_assist_info, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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_assist_info_ies_s& ue_assist_info() - { - assert_choice_type(types::ue_assist_info, type_, "criticalExtensions"); - return c; - } - const ue_assist_info_ies_s& ue_assist_info() const - { - assert_choice_type(types::ue_assist_info, type_, "criticalExtensions"); - return c; - } - ue_assist_info_ies_s& set_ue_assist_info(); - void set_crit_exts_future(); - - private: - types type_; - ue_assist_info_ies_s c; - }; - - // 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; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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() - { - assert_choice_type(types::ue_cap_info, type_, "criticalExtensions"); - return c; - } - const ue_cap_info_ies_s& ue_cap_info() const - { - assert_choice_type(types::ue_cap_info, type_, "criticalExtensions"); - return c; - } - ue_cap_info_ies_s& set_ue_cap_info(); - void set_crit_exts_future(); - - private: - types type_; - ue_cap_info_ies_s c; - }; - - // 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; -}; - -// UEInformationResponse-r16 ::= SEQUENCE -struct ue_info_resp_r16_s { - struct crit_exts_c_ { - struct types_opts { - enum options { ue_info_resp_r16, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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_info_resp_r16_ies_s& ue_info_resp_r16() - { - assert_choice_type(types::ue_info_resp_r16, type_, "criticalExtensions"); - return c; - } - const ue_info_resp_r16_ies_s& ue_info_resp_r16() const - { - assert_choice_type(types::ue_info_resp_r16, type_, "criticalExtensions"); - return c; - } - ue_info_resp_r16_ies_s& set_ue_info_resp_r16(); - void set_crit_exts_future(); - - private: - types type_; - ue_info_resp_r16_ies_s c; - }; - - // 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; -}; - -// UEPositioningAssistanceInfo-r17 ::= SEQUENCE -struct ue_positioning_assist_info_r17_s { - struct crit_exts_c_ { - struct types_opts { - enum options { ue_positioning_assist_info_r17, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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_positioning_assist_info_r17_ies_s& ue_positioning_assist_info_r17() - { - assert_choice_type(types::ue_positioning_assist_info_r17, type_, "criticalExtensions"); - return c; - } - const ue_positioning_assist_info_r17_ies_s& ue_positioning_assist_info_r17() const - { - assert_choice_type(types::ue_positioning_assist_info_r17, type_, "criticalExtensions"); - return c; - } - ue_positioning_assist_info_r17_ies_s& set_ue_positioning_assist_info_r17(); - void set_crit_exts_future(); - - private: - types type_; - ue_positioning_assist_info_r17_ies_s c; - }; - - // 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; -}; - -// ULDedicatedMessageSegment-r16 ::= SEQUENCE -struct ul_ded_msg_segment_r16_s { - struct crit_exts_c_ { - struct types_opts { - enum options { ul_ded_msg_segment_r16, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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_ded_msg_segment_r16_ies_s& ul_ded_msg_segment_r16() - { - assert_choice_type(types::ul_ded_msg_segment_r16, type_, "criticalExtensions"); - return c; - } - const ul_ded_msg_segment_r16_ies_s& ul_ded_msg_segment_r16() const - { - assert_choice_type(types::ul_ded_msg_segment_r16, type_, "criticalExtensions"); - return c; - } - ul_ded_msg_segment_r16_ies_s& set_ul_ded_msg_segment_r16(); - void set_crit_exts_future(); - - private: - types type_; - ul_ded_msg_segment_r16_ies_s c; - }; - - // 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; -}; - -// ULInformationTransfer ::= SEQUENCE -struct ul_info_transfer_s { - struct crit_exts_c_ { - struct types_opts { - enum options { ul_info_transfer, crit_exts_future, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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_ies_s& ul_info_transfer() - { - assert_choice_type(types::ul_info_transfer, type_, "criticalExtensions"); - return c; - } - const ul_info_transfer_ies_s& ul_info_transfer() const - { - assert_choice_type(types::ul_info_transfer, type_, "criticalExtensions"); - return c; - } - ul_info_transfer_ies_s& set_ul_info_transfer(); - void set_crit_exts_future(); - - private: - types type_; - ul_info_transfer_ies_s c; - }; - - // 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; -}; - -// ULInformationTransferIRAT-r16 ::= SEQUENCE -struct ul_info_transfer_irat_r16_s { - struct crit_exts_c_ { - struct c1_c_ { - struct types_opts { - enum options { ul_info_transfer_irat_r16, spare3, spare2, spare1, nulltype } value; - - const char* to_string() const; - }; - using types = enumerated; - - // 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_irat_r16_ies_s& ul_info_transfer_irat_r16() - { - assert_choice_type(types::ul_info_transfer_irat_r16, type_, "c1"); - return c; - } - const ul_info_transfer_irat_r16_ies_s& ul_info_transfer_irat_r16() const - { - assert_choice_type(types::ul_info_transfer_irat_r16, type_, "c1"); - return c; - } - ul_info_transfer_irat_r16_ies_s& set_ul_info_transfer_irat_r16(); - void set_spare3(); - void set_spare2(); - void set_spare1(); - - private: - types type_; - ul_info_transfer_irat_r16_ies_s c; - }; - struct types_opts { - enum options { c1, crit_exts_future, nulltype } value; - typedef uint8_t number_type; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - c1_c_& c1() - { - assert_choice_type(types::c1, type_, "criticalExtensions"); - return c; - } - const c1_c_& c1() const - { - assert_choice_type(types::c1, type_, "criticalExtensions"); - return c; - } - c1_c_& set_c1(); - void set_crit_exts_future(); - - private: - types type_; - c1_c_ c; - }; - - // 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; - - const char* to_string() const; - }; - using types = enumerated; - - // 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(types::ul_info_transfer_mrdc, type_, "c1"); - return c; - } - const ul_info_transfer_mrdc_ies_s& ul_info_transfer_mrdc() const - { - assert_choice_type(types::ul_info_transfer_mrdc, type_, "c1"); - return c; - } - ul_info_transfer_mrdc_ies_s& set_ul_info_transfer_mrdc(); - void set_spare3(); - void set_spare2(); - void set_spare1(); - - 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; - - const char* to_string() const; - uint8_t to_number() const; - }; - using types = enumerated; - - // choice methods - crit_exts_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 - c1_c_& c1() - { - assert_choice_type(types::c1, type_, "criticalExtensions"); - return c; - } - const c1_c_& c1() const - { - assert_choice_type(types::c1, type_, "criticalExtensions"); - return c; - } - c1_c_& set_c1(); - void set_crit_exts_future(); - - private: - types type_; - c1_c_ c; - }; - - // member variables - crit_exts_c_ crit_exts; +struct meas_report_s; +struct rrc_recfg_complete_s; +struct rrc_setup_complete_s; +struct rrc_reest_complete_s; +struct rrc_resume_complete_s; +struct security_mode_complete_s; +struct security_mode_fail_s; +struct ul_info_transfer_s; +struct location_meas_ind_s; +struct ue_cap_info_s; +struct counter_check_resp_s; +struct ue_assist_info_s; +struct fail_info_s; +struct ul_info_transfer_mrdc_s; +struct scg_fail_info_s; +struct scg_fail_info_eutra_s; +struct ul_ded_msg_segment_r16_s; +struct ded_sib_request_r16_s; +struct mcg_fail_info_r16_s; +struct ue_info_resp_r16_s; +struct sidelink_ue_info_nr_r16_s; +struct ul_info_transfer_irat_r16_s; +struct iab_other_info_r16_s; +struct mb_si_nterest_ind_r17_s; +struct ue_positioning_assist_info_r17_s; +struct meas_report_app_layer_r17_s; - // sequence methods - SRSASN_CODE pack(bit_ref& bref) const; - SRSASN_CODE unpack(cbit_ref& bref); - void to_json(json_writer& j) const; -}; +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ // UL-DCCH-MessageType ::= CHOICE struct ul_dcch_msg_type_c { @@ -7648,9 +82,6 @@ struct ul_dcch_msg_type_c { // 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; @@ -7835,26 +266,8 @@ struct ul_dcch_msg_type_c { scg_fail_info_eutra_s& set_scg_fail_info_eutra(); private: - types type_; - choice_buffer_t - c; - - void destroy_(); + types type_; + choice_buffer_ptr c; }; struct msg_class_ext_c_ { struct c2_c_ { @@ -7885,9 +298,6 @@ struct ul_dcch_msg_type_c { // choice methods c2_c_() = default; - c2_c_(const c2_c_& other); - c2_c_& operator=(const c2_c_& other); - ~c2_c_() { destroy_(); } void set(types::options e = types::nulltype); types type() const { return type_; } SRSASN_CODE pack(bit_ref& bref) const; @@ -8012,20 +422,8 @@ struct ul_dcch_msg_type_c { void set_spare1(); private: - types type_; - choice_buffer_t - c; - - void destroy_(); + types type_; + choice_buffer_ptr c; }; struct types_opts { enum options { c2, msg_class_ext_future_r16, nulltype } value; diff --git a/include/srsran/asn1/rrc_nr/ul_dcch_msg_ies.h b/include/srsran/asn1/rrc_nr/ul_dcch_msg_ies.h new file mode 100644 index 0000000000..21d917bcff --- /dev/null +++ b/include/srsran/asn1/rrc_nr/ul_dcch_msg_ies.h @@ -0,0 +1,9167 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +/******************************************************************************* + * + * 3GPP TS ASN1 RRC NR v17.4.0 (2023-03) + * + ******************************************************************************/ + +#pragma once + +#include "bcch_bch_msg.h" +#include "dl_dcch_msg_ies.h" +#include "ue_cap.h" +#include "ul_ccch_msg_ies.h" + +namespace asn1 { +namespace rrc_nr { + +/******************************************************************************* + * Struct Definitions + ******************************************************************************/ + +// PLMN-Identity-EUTRA-5GC ::= CHOICE +struct plmn_id_eutra_5_gc_c { + struct types_opts { + enum options { plmn_id_eutra_5_gc, plmn_idx, nulltype } value; + typedef int8_t number_type; + + const char* to_string() const; + int8_t to_number() const; + }; + using types = enumerated; + + // choice methods + plmn_id_eutra_5_gc_c() = default; + plmn_id_eutra_5_gc_c(const plmn_id_eutra_5_gc_c& other); + plmn_id_eutra_5_gc_c& operator=(const plmn_id_eutra_5_gc_c& other); + ~plmn_id_eutra_5_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_5_gc() + { + assert_choice_type(types::plmn_id_eutra_5_gc, type_, "PLMN-Identity-EUTRA-5GC"); + return c.get(); + } + uint8_t& plmn_idx() + { + assert_choice_type(types::plmn_idx, type_, "PLMN-Identity-EUTRA-5GC"); + return c.get(); + } + const plmn_id_s& plmn_id_eutra_5_gc() const + { + assert_choice_type(types::plmn_id_eutra_5_gc, type_, "PLMN-Identity-EUTRA-5GC"); + return c.get(); + } + const uint8_t& plmn_idx() const + { + assert_choice_type(types::plmn_idx, type_, "PLMN-Identity-EUTRA-5GC"); + return c.get(); + } + plmn_id_s& set_plmn_id_eutra_5_gc(); + uint8_t& set_plmn_idx(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// CellIdentity-EUTRA-5GC ::= CHOICE +struct cell_id_eutra_5_gc_c { + struct types_opts { + enum options { cell_id_eutra, cell_id_idx, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + cell_id_eutra_5_gc_c() = default; + cell_id_eutra_5_gc_c(const cell_id_eutra_5_gc_c& other); + cell_id_eutra_5_gc_c& operator=(const cell_id_eutra_5_gc_c& other); + ~cell_id_eutra_5_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(types::cell_id_eutra, type_, "CellIdentity-EUTRA-5GC"); + return c.get>(); + } + uint8_t& cell_id_idx() + { + assert_choice_type(types::cell_id_idx, type_, "CellIdentity-EUTRA-5GC"); + return c.get(); + } + const fixed_bitstring<28>& cell_id_eutra() const + { + assert_choice_type(types::cell_id_eutra, type_, "CellIdentity-EUTRA-5GC"); + return c.get>(); + } + const uint8_t& cell_id_idx() const + { + assert_choice_type(types::cell_id_idx, type_, "CellIdentity-EUTRA-5GC"); + return c.get(); + } + fixed_bitstring<28>& set_cell_id_eutra(); + uint8_t& set_cell_id_idx(); + +private: + types type_; + choice_buffer_t> c; + + void destroy_(); +}; + +// FrequencyComponent-r17 ::= ENUMERATED +struct freq_component_r17_opts { + enum options { active_carrier, cfg_carrier, active_bwp, cfg_bwp, nulltype } value; + + const char* to_string() const; +}; +using freq_component_r17_e = enumerated; + +// 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PLMN-IdentityList-EUTRA-5GC ::= SEQUENCE (SIZE (1..12)) OF PLMN-Identity-EUTRA-5GC +using plmn_id_list_eutra_5_gc_l = dyn_array; + +// PLMN-IdentityList-EUTRA-EPC ::= SEQUENCE (SIZE (1..12)) OF PLMN-Identity +using plmn_id_list_eutra_epc_l = dyn_array; + +// CellAccessRelatedInfo-EUTRA-5GC ::= SEQUENCE +struct cell_access_related_info_eutra_5_gc_s { + bool ranac_5gc_present = false; + plmn_id_list_eutra_5_gc_l plmn_id_list_eutra_5gc; + fixed_bitstring<24> tac_eutra_5gc; + uint16_t ranac_5gc = 0; + cell_id_eutra_5_gc_c cell_id_eutra_5gc; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DefaultDC-Location-r17 ::= CHOICE +struct default_dc_location_r17_c { + struct types_opts { + enum options { ul, dl, ul_and_dl, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + default_dc_location_r17_c() = default; + default_dc_location_r17_c(const default_dc_location_r17_c& other); + default_dc_location_r17_c& operator=(const default_dc_location_r17_c& other); + ~default_dc_location_r17_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 + freq_component_r17_e& ul() + { + assert_choice_type(types::ul, type_, "DefaultDC-Location-r17"); + return c.get(); + } + freq_component_r17_e& dl() + { + assert_choice_type(types::dl, type_, "DefaultDC-Location-r17"); + return c.get(); + } + freq_component_r17_e& ul_and_dl() + { + assert_choice_type(types::ul_and_dl, type_, "DefaultDC-Location-r17"); + return c.get(); + } + const freq_component_r17_e& ul() const + { + assert_choice_type(types::ul, type_, "DefaultDC-Location-r17"); + return c.get(); + } + const freq_component_r17_e& dl() const + { + assert_choice_type(types::dl, type_, "DefaultDC-Location-r17"); + return c.get(); + } + const freq_component_r17_e& ul_and_dl() const + { + assert_choice_type(types::ul_and_dl, type_, "DefaultDC-Location-r17"); + return c.get(); + } + freq_component_r17_e& set_ul(); + freq_component_r17_e& set_dl(); + freq_component_r17_e& set_ul_and_dl(); + +private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); +}; + +// MultiBandInfoListEUTRA ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..256) +using multi_band_info_list_eutra_l = bounded_array; + +// OffsetValue-r17 ::= SEQUENCE +struct offset_value_r17_s { + int16_t offset_value_r17 = -20000; + bool shift7dot5k_hz_r17 = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CC-Group-r17 ::= SEQUENCE +struct cc_group_r17_s { + struct offset_to_default_r17_c_ { + using offsetlist_l_ = dyn_array; + struct types_opts { + enum options { offset_value, offsetlist, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + offset_to_default_r17_c_() = default; + offset_to_default_r17_c_(const offset_to_default_r17_c_& other); + offset_to_default_r17_c_& operator=(const offset_to_default_r17_c_& other); + ~offset_to_default_r17_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 + offset_value_r17_s& offset_value() + { + assert_choice_type(types::offset_value, type_, "offsetToDefault-r17"); + return c.get(); + } + offsetlist_l_& offsetlist() + { + assert_choice_type(types::offsetlist, type_, "offsetToDefault-r17"); + return c.get(); + } + const offset_value_r17_s& offset_value() const + { + assert_choice_type(types::offset_value, type_, "offsetToDefault-r17"); + return c.get(); + } + const offsetlist_l_& offsetlist() const + { + assert_choice_type(types::offsetlist, type_, "offsetToDefault-r17"); + return c.get(); + } + offset_value_r17_s& set_offset_value(); + offsetlist_l_& set_offsetlist(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool serv_cell_idx_higher_r17_present = false; + bool offset_to_default_r17_present = false; + uint8_t serv_cell_idx_lower_r17 = 0; + uint8_t serv_cell_idx_higher_r17 = 0; + default_dc_location_r17_c default_dc_location_r17; + offset_to_default_r17_c_ offset_to_default_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CGI-InfoEUTRA ::= SEQUENCE +struct cgi_info_eutra_s { + struct cgi_info_epc_s_ { + using cgi_info_epc_list_l_ = dyn_array; + + // member variables + cell_access_related_info_eutra_epc_s cgi_info_epc_legacy; + cgi_info_epc_list_l_ cgi_info_epc_list; + }; + using cgi_info_5_gc_l_ = dyn_array; + + // member variables + bool cgi_info_epc_present = false; + bool freq_band_ind_prio_present = false; + cgi_info_epc_s_ cgi_info_epc; + cgi_info_5_gc_l_ cgi_info_5_gc; + uint16_t freq_band_ind = 1; + multi_band_info_list_eutra_l multi_band_info_list; + + // 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; + 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; + // ... + // group 0 + copy_ptr npn_id_info_list_r16; + // group 1 + bool cell_reserved_for_other_use_r16_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeedForNCSG-IntraFreq-r17 ::= SEQUENCE +struct need_for_ncsg_intra_freq_r17_s { + struct gap_ind_intra_r17_opts { + enum options { gap, ncsg, nogap_noncsg, nulltype } value; + + const char* to_string() const; + }; + using gap_ind_intra_r17_e_ = enumerated; + + // member variables + uint8_t serv_cell_id_r17 = 0; + gap_ind_intra_r17_e_ gap_ind_intra_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeedForNCSG-NR-r17 ::= SEQUENCE +struct need_for_ncsg_nr_r17_s { + struct gap_ind_r17_opts { + enum options { gap, ncsg, nogap_noncsg, nulltype } value; + + const char* to_string() const; + }; + using gap_ind_r17_e_ = enumerated; + + // member variables + uint16_t band_nr_r17 = 1; + gap_ind_r17_e_ gap_ind_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PerRAAttemptInfo-r16 ::= SEQUENCE +struct per_ra_attempt_info_r16_s { + bool ext = false; + bool contention_detected_r16_present = false; + bool dl_rsrp_above_thres_r16_present = false; + bool contention_detected_r16 = false; + bool dl_rsrp_above_thres_r16 = false; + // ... + // group 0 + bool fallback_to_four_step_ra_r17_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ResultsPerCSI-RS-IndexList ::= SEQUENCE (SIZE (1..64)) OF ResultsPerCSI-RS-Index +using results_per_csi_rs_idx_list_l = dyn_array; + +// ResultsPerSSB-IndexList ::= SEQUENCE (SIZE (1..64)) OF ResultsPerSSB-Index +using results_per_ssb_idx_list_l = dyn_array; + +// 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; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultLoggingNR-r16 ::= SEQUENCE +struct meas_result_logging_nr_r16_s { + bool nof_good_ssb_r16_present = false; + uint16_t pci_r16 = 0; + meas_quant_results_s results_ssb_cell_r16; + uint8_t nof_good_ssb_r16 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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_ { + 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; + }; + using cho_cfg_r17_l_ = dyn_array; + struct triggered_event_r17_s_ { + struct first_triggered_event_opts { + enum options { cond_first_event, cond_second_event, nulltype } value; + + const char* to_string() const; + }; + using first_triggered_event_e_ = enumerated; + + // member variables + bool time_between_events_r17_present = false; + bool first_triggered_event_present = false; + uint16_t time_between_events_r17 = 0; + first_triggered_event_e_ first_triggered_event; + }; + + // member variables + bool ext = false; + bool pci_present = false; + uint16_t pci = 0; + meas_result_s_ meas_result; + // ... + // group 0 + copy_ptr cgi_info; + // group 1 + bool cho_candidate_r17_present = false; + copy_ptr cho_cfg_r17; + copy_ptr triggered_event_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeedForNCSG-BandListNR-r17 ::= SEQUENCE (SIZE (1..1024)) OF NeedForNCSG-NR-r17 +using need_for_ncsg_band_list_nr_r17_l = dyn_array; + +// NeedForNCSG-EUTRA-r17 ::= SEQUENCE +struct need_for_ncsg_eutra_r17_s { + struct gap_ind_r17_opts { + enum options { gap, ncsg, nogap_noncsg, nulltype } value; + + const char* to_string() const; + }; + using gap_ind_r17_e_ = enumerated; + + // member variables + uint16_t band_eutra_r17 = 1; + gap_ind_r17_e_ gap_ind_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeedForNCSG-IntraFreqList-r17 ::= SEQUENCE (SIZE (1..32)) OF NeedForNCSG-IntraFreq-r17 +using need_for_ncsg_intra_freq_list_r17_l = dyn_array; + +// PerRAAttemptInfoList-r16 ::= SEQUENCE (SIZE (1..200)) OF PerRAAttemptInfo-r16 +using per_ra_attempt_info_list_r16_l = dyn_array; + +// SL-QoS-Info-r16 ::= SEQUENCE +struct sl_qos_info_r16_s { + bool sl_qos_profile_r16_present = false; + uint16_t sl_qos_flow_id_r16 = 1; + sl_qos_profile_r16_s sl_qos_profile_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkTxDirectCurrentCarrierInfo-r16 ::= SEQUENCE +struct ul_tx_direct_current_carrier_info_r16_s { + struct serv_cell_info_r16_c_ { + struct types_opts { + enum options { bwp_id_r16, deactiv_carrier_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + serv_cell_info_r16_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 + uint8_t& bwp_id_r16() + { + assert_choice_type(types::bwp_id_r16, type_, "servCellInfo-r16"); + return c; + } + const uint8_t& bwp_id_r16() const + { + assert_choice_type(types::bwp_id_r16, type_, "servCellInfo-r16"); + return c; + } + uint8_t& set_bwp_id_r16(); + void set_deactiv_carrier_r16(); + + private: + types type_; + uint8_t c; + }; + + // member variables + uint8_t serv_cell_idx_r16 = 0; + serv_cell_info_r16_c_ serv_cell_info_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkTxDirectCurrentMoreCarrierList-r17 ::= SEQUENCE (SIZE (1..16)) OF CC-Group-r17 +using ul_tx_direct_current_more_carrier_list_r17_l = dyn_array; + +// UplinkTxDirectCurrentTwoCarrierInfo-r16 ::= SEQUENCE +struct ul_tx_direct_current_two_carrier_info_r16_s { + uint8_t ref_carrier_idx_r16 = 0; + bool shift7dot5k_hz_r16 = false; + uint16_t tx_direct_current_location_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-Identifiers-r16 ::= SEQUENCE +struct wlan_ids_r16_s { + bool ext = false; + bool bssid_r16_present = false; + bool hessid_r16_present = false; + bounded_octstring<1, 32> ssid_r16; + fixed_octstring<6> bssid_r16; + fixed_octstring<6> hessid_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// WLAN-RTT-r16 ::= SEQUENCE +struct wlan_rtt_r16_s { + struct rtt_units_r16_opts { + enum options { + microseconds, + hundredsofnanoseconds, + tensofnanoseconds, + nanoseconds, + tenthsofnanoseconds, + /*...*/ nulltype + } value; + + const char* to_string() const; + }; + using rtt_units_r16_e_ = enumerated; + + // member variables + bool ext = false; + bool rtt_accuracy_r16_present = false; + uint32_t rtt_value_r16 = 0; + rtt_units_r16_e_ rtt_units_r16; + uint16_t rtt_accuracy_r16 = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CGI-InfoEUTRALogging ::= SEQUENCE +struct cgi_info_eutra_logging_s { + bool plmn_id_eutra_5gc_present = false; + bool tac_eutra_5gc_present = false; + bool cell_id_eutra_5gc_present = false; + bool plmn_id_eutra_epc_present = false; + bool tac_eutra_epc_present = false; + bool cell_id_eutra_epc_present = false; + plmn_id_s plmn_id_eutra_5gc; + fixed_bitstring<24> tac_eutra_5gc; + fixed_bitstring<28> cell_id_eutra_5gc; + plmn_id_s plmn_id_eutra_epc; + fixed_bitstring<16> tac_eutra_epc; + fixed_bitstring<28> cell_id_eutra_epc; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LogMeasResultBT-r16 ::= SEQUENCE +struct log_meas_result_bt_r16_s { + bool ext = false; + bool rssi_bt_r16_present = false; + fixed_bitstring<48> bt_addr_r16; + int16_t rssi_bt_r16 = -128; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LogMeasResultWLAN-r16 ::= SEQUENCE +struct log_meas_result_wlan_r16_s { + bool ext = false; + bool rssi_wlan_r16_present = false; + bool rtt_wlan_r16_present = false; + wlan_ids_r16_s wlan_ids_r16; + uint8_t rssi_wlan_r16 = 0; + wlan_rtt_r16_s rtt_wlan_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultListEUTRA ::= SEQUENCE (SIZE (1..8)) OF MeasResultEUTRA +using meas_result_list_eutra_l = dyn_array; + +// MeasResultListLoggingNR-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResultLoggingNR-r16 +using meas_result_list_logging_nr_r16_l = dyn_array; + +// MeasResultListNR ::= SEQUENCE (SIZE (1..8)) OF MeasResultNR +using meas_result_list_nr_l = dyn_array; + +// NeedForGapNCSG-InfoEUTRA-r17 ::= SEQUENCE +struct need_for_gap_ncsg_info_eutra_r17_s { + using need_for_ncsg_eutra_r17_l_ = dyn_array; + + // member variables + need_for_ncsg_eutra_r17_l_ need_for_ncsg_eutra_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeedForGapNCSG-InfoNR-r17 ::= SEQUENCE +struct need_for_gap_ncsg_info_nr_r17_s { + need_for_ncsg_intra_freq_list_r17_l intra_freq_need_for_ncsg_r17; + need_for_ncsg_band_list_nr_r17_l inter_freq_need_for_ncsg_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeedForGapsIntraFreq-r16 ::= SEQUENCE +struct need_for_gaps_intra_freq_r16_s { + struct gap_ind_intra_r16_opts { + enum options { gap, no_gap, nulltype } value; + + const char* to_string() const; + }; + using gap_ind_intra_r16_e_ = enumerated; + + // member variables + uint8_t serv_cell_id_r16 = 0; + gap_ind_intra_r16_e_ gap_ind_intra_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeedForGapsNR-r16 ::= SEQUENCE +struct need_for_gaps_nr_r16_s { + struct gap_ind_r16_opts { + enum options { gap, no_gap, nulltype } value; + + const char* to_string() const; + }; + using gap_ind_r16_e_ = enumerated; + + // member variables + uint16_t band_nr_r16 = 1; + gap_ind_r16_e_ gap_ind_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PCI-ARFCN-EUTRA-r16 ::= SEQUENCE +struct pci_arfcn_eutra_r16_s { + uint16_t pci_r16 = 0; + uint32_t carrier_freq_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PCI-ARFCN-NR-r16 ::= SEQUENCE +struct pci_arfcn_nr_r16_s { + uint16_t pci_r16 = 0; + uint32_t carrier_freq_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PerRACSI-RSInfo-r16 ::= SEQUENCE +struct per_ra_csi_r_si_nfo_r16_s { + uint8_t csi_rs_idx_r16 = 0; + uint8_t nof_preambs_sent_on_csi_rs_r16 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PerRASSBInfo-r16 ::= SEQUENCE +struct per_ra_ssb_info_r16_s { + uint8_t ssb_idx_r16 = 0; + uint8_t nof_preambs_sent_on_ssb_r16 = 1; + per_ra_attempt_info_list_r16_l per_ra_attempt_info_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCReconfigurationComplete-v1720-IEs ::= SEQUENCE +struct rrc_recfg_complete_v1720_ies_s { + bool non_crit_ext_present = false; + ul_tx_direct_current_more_carrier_list_r17_l ul_tx_direct_current_more_carrier_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ResultsPerSSB-IndexIdle-r16 ::= SEQUENCE +struct results_per_ssb_idx_idle_r16_s { + struct ssb_results_r16_s_ { + bool ssb_rsrp_result_r16_present = false; + bool ssb_rsrq_result_r16_present = false; + uint8_t ssb_rsrp_result_r16 = 0; + uint8_t ssb_rsrq_result_r16 = 0; + }; + + // member variables + bool ssb_results_r16_present = false; + uint8_t ssb_idx_r16 = 0; + ssb_results_r16_s_ ssb_results_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-PagingIdentityRemoteUE-r17 ::= SEQUENCE +struct sl_paging_id_remote_ue_r17_s { + bool full_i_rnti_r17_present = false; + fixed_bitstring<48> ng_5_g_s_tmsi_r17; + fixed_bitstring<40> full_i_rnti_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-RLC-ModeIndication-r16 ::= SEQUENCE +struct sl_rlc_mode_ind_r16_s { + struct sl_mode_r16_c_ { + struct types_opts { + enum options { sl_am_mode_r16, sl_um_mode_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + sl_mode_r16_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 + void set_sl_am_mode_r16(); + void set_sl_um_mode_r16(); + + private: + types type_; + }; + using sl_qos_info_list_r16_l_ = dyn_array; + + // member variables + sl_mode_r16_c_ sl_mode_r16; + sl_qos_info_list_r16_l_ sl_qos_info_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TxInterestedFreqList-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..8) +using sl_tx_interested_freq_list_r16_l = bounded_array; + +// UplinkTxDirectCurrentTwoCarrier-r16 ::= SEQUENCE +struct ul_tx_direct_current_two_carrier_r16_s { + bool second_pa_tx_direct_current_r16_present = false; + ul_tx_direct_current_carrier_info_r16_s carrier_one_info_r16; + ul_tx_direct_current_carrier_info_r16_s carrier_two_info_r16; + ul_tx_direct_current_two_carrier_info_r16_s single_pa_tx_direct_current_r16; + ul_tx_direct_current_two_carrier_info_r16_s second_pa_tx_direct_current_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VictimSystemType-r16 ::= SEQUENCE +struct victim_sys_type_r16_s { + bool ext = false; + bool gps_r16_present = false; + bool glonass_r16_present = false; + bool bds_r16_present = false; + bool galileo_r16_present = false; + bool nav_ic_r16_present = false; + bool wlan_r16_present = false; + bool bluetooth_r16_present = false; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AffectedCarrierFreq-r16 ::= SEQUENCE +struct affected_carrier_freq_r16_s { + struct interference_direction_r16_opts { + enum options { nr, other, both, spare, nulltype } value; + + const char* to_string() const; + }; + using interference_direction_r16_e_ = enumerated; + + // member variables + uint32_t carrier_freq_r16 = 0; + interference_direction_r16_e_ interference_direction_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AffectedCarrierFreqComb-r16 ::= SEQUENCE +struct affected_carrier_freq_comb_r16_s { + using affected_carrier_freq_comb_r16_l_ = bounded_array; + + // member variables + affected_carrier_freq_comb_r16_l_ affected_carrier_freq_comb_r16; + victim_sys_type_r16_s victim_sys_type_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CommonLocationInfo-r16 ::= SEQUENCE +struct common_location_info_r16_s { + dyn_octstring gnss_tod_msec_r16; + dyn_octstring location_timestamp_r16; + dyn_octstring location_coordinate_r16; + dyn_octstring location_error_r16; + dyn_octstring location_source_r16; + dyn_octstring velocity_estimate_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LogMeasResultListBT-r16 ::= SEQUENCE (SIZE (1..32)) OF LogMeasResultBT-r16 +using log_meas_result_list_bt_r16_l = dyn_array; + +// LogMeasResultListWLAN-r16 ::= SEQUENCE (SIZE (1..32)) OF LogMeasResultWLAN-r16 +using log_meas_result_list_wlan_r16_l = dyn_array; + +// MUSIM-GapPreferenceList-r17 ::= SEQUENCE (SIZE (1..4)) OF MUSIM-GapInfo-r17 +using mu_si_m_gap_pref_list_r17_l = dyn_array; + +// MeasResult2EUTRA-r16 ::= SEQUENCE +struct meas_result2_eutra_r16_s { + uint32_t carrier_freq_r16 = 0; + meas_result_list_eutra_l meas_result_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResult2NR-r16 ::= SEQUENCE +struct meas_result2_nr_r16_s { + bool ssb_freq_r16_present = false; + bool ref_freq_csi_rs_r16_present = false; + uint32_t ssb_freq_r16 = 0; + uint32_t ref_freq_csi_rs_r16 = 0; + meas_result_list_nr_l meas_result_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultLogging2NR-r16 ::= SEQUENCE +struct meas_result_logging2_nr_r16_s { + uint32_t carrier_freq_r16 = 0; + meas_result_list_logging_nr_r16_l meas_result_list_logging_nr_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultUTRA-FDD-r16 ::= SEQUENCE +struct meas_result_utra_fdd_r16_s { + struct meas_result_r16_s_ { + bool utra_fdd_rs_cp_r16_present = false; + bool utra_fdd_ec_n0_r16_present = false; + int8_t utra_fdd_rs_cp_r16 = -5; + uint8_t utra_fdd_ec_n0_r16 = 0; + }; + + // member variables + uint16_t pci_r16 = 0; + meas_result_r16_s_ meas_result_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeedForGapsBandListNR-r16 ::= SEQUENCE (SIZE (1..1024)) OF NeedForGapsNR-r16 +using need_for_gaps_band_list_nr_r16_l = dyn_array; + +// NeedForGapsIntraFreqList-r16 ::= SEQUENCE (SIZE (1..32)) OF NeedForGapsIntraFreq-r16 +using need_for_gaps_intra_freq_list_r16_l = dyn_array; + +// PerRACSI-RSInfo-v1660 ::= SEQUENCE +struct per_ra_csi_r_si_nfo_v1660_s { + bool csi_rs_idx_v1660_present = false; + uint8_t csi_rs_idx_v1660 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PerRAInfo-r16 ::= CHOICE +struct per_ra_info_r16_c { + struct types_opts { + enum options { per_ra_ssb_info_list_r16, per_ra_csi_r_si_nfo_list_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + per_ra_info_r16_c() = default; + per_ra_info_r16_c(const per_ra_info_r16_c& other); + per_ra_info_r16_c& operator=(const per_ra_info_r16_c& other); + ~per_ra_info_r16_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 + per_ra_ssb_info_r16_s& per_ra_ssb_info_list_r16() + { + assert_choice_type(types::per_ra_ssb_info_list_r16, type_, "PerRAInfo-r16"); + return c.get(); + } + per_ra_csi_r_si_nfo_r16_s& per_ra_csi_r_si_nfo_list_r16() + { + assert_choice_type(types::per_ra_csi_r_si_nfo_list_r16, type_, "PerRAInfo-r16"); + return c.get(); + } + const per_ra_ssb_info_r16_s& per_ra_ssb_info_list_r16() const + { + assert_choice_type(types::per_ra_ssb_info_list_r16, type_, "PerRAInfo-r16"); + return c.get(); + } + const per_ra_csi_r_si_nfo_r16_s& per_ra_csi_r_si_nfo_list_r16() const + { + assert_choice_type(types::per_ra_csi_r_si_nfo_list_r16, type_, "PerRAInfo-r16"); + return c.get(); + } + per_ra_ssb_info_r16_s& set_per_ra_ssb_info_list_r16(); + per_ra_csi_r_si_nfo_r16_s& set_per_ra_csi_r_si_nfo_list_r16(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// RRCReconfigurationComplete-v1700-IEs ::= SEQUENCE +struct rrc_recfg_complete_v1700_ies_s { + bool need_for_gap_ncsg_info_nr_r17_present = false; + bool need_for_gap_ncsg_info_eutra_r17_present = false; + bool sel_cond_rrc_recfg_r17_present = false; + bool non_crit_ext_present = false; + need_for_gap_ncsg_info_nr_r17_s need_for_gap_ncsg_info_nr_r17; + need_for_gap_ncsg_info_eutra_r17_s need_for_gap_ncsg_info_eutra_r17; + uint8_t sel_cond_rrc_recfg_r17 = 1; + rrc_recfg_complete_v1720_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; +}; + +// ReducedAggregatedBandwidth ::= ENUMERATED +struct reduced_aggr_bw_opts { + enum options { + mhz0, + mhz10, + mhz20, + mhz30, + mhz40, + mhz50, + mhz60, + mhz80, + mhz100, + mhz200, + mhz300, + mhz400, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; +}; +using reduced_aggr_bw_e = enumerated; + +// ReducedAggregatedBandwidth-r17 ::= ENUMERATED +struct reduced_aggr_bw_r17_opts { + enum options { mhz0, mhz100, mhz200, mhz400, mhz800, mhz1200, mhz1600, mhz2000, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; +}; +using reduced_aggr_bw_r17_e = enumerated; + +// ResultsPerSSB-IndexList-r16 ::= SEQUENCE (SIZE (1..32)) OF ResultsPerSSB-IndexIdle-r16 +using results_per_ssb_idx_list_r16_l = dyn_array; + +// SL-DRX-ConfigUC-SemiStatic-r17 ::= SEQUENCE +struct sl_drx_cfg_uc_semi_static_r17_s { + struct sl_drx_on_dur_timer_r17_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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using milli_seconds_e_ = enumerated; + struct types_opts { + enum options { sub_milli_seconds, milli_seconds, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + sl_drx_on_dur_timer_r17_c_() = default; + sl_drx_on_dur_timer_r17_c_(const sl_drx_on_dur_timer_r17_c_& other); + sl_drx_on_dur_timer_r17_c_& operator=(const sl_drx_on_dur_timer_r17_c_& other); + ~sl_drx_on_dur_timer_r17_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(types::sub_milli_seconds, type_, "sl-drx-onDurationTimer-r17"); + return c.get(); + } + milli_seconds_e_& milli_seconds() + { + assert_choice_type(types::milli_seconds, type_, "sl-drx-onDurationTimer-r17"); + return c.get(); + } + const uint8_t& sub_milli_seconds() const + { + assert_choice_type(types::sub_milli_seconds, type_, "sl-drx-onDurationTimer-r17"); + return c.get(); + } + const milli_seconds_e_& milli_seconds() const + { + assert_choice_type(types::milli_seconds, type_, "sl-drx-onDurationTimer-r17"); + return c.get(); + } + uint8_t& set_sub_milli_seconds(); + milli_seconds_e_& set_milli_seconds(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct sl_drx_cycle_start_offset_r17_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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // choice methods + sl_drx_cycle_start_offset_r17_c_() = default; + sl_drx_cycle_start_offset_r17_c_(const sl_drx_cycle_start_offset_r17_c_& other); + sl_drx_cycle_start_offset_r17_c_& operator=(const sl_drx_cycle_start_offset_r17_c_& other); + ~sl_drx_cycle_start_offset_r17_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() + { + assert_choice_type(types::ms10, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint8_t& ms20() + { + assert_choice_type(types::ms20, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint8_t& ms32() + { + assert_choice_type(types::ms32, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint8_t& ms40() + { + assert_choice_type(types::ms40, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint8_t& ms60() + { + assert_choice_type(types::ms60, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint8_t& ms64() + { + assert_choice_type(types::ms64, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint8_t& ms70() + { + assert_choice_type(types::ms70, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint8_t& ms80() + { + assert_choice_type(types::ms80, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint8_t& ms128() + { + assert_choice_type(types::ms128, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint8_t& ms160() + { + assert_choice_type(types::ms160, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint16_t& ms256() + { + assert_choice_type(types::ms256, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint16_t& ms320() + { + assert_choice_type(types::ms320, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint16_t& ms512() + { + assert_choice_type(types::ms512, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint16_t& ms640() + { + assert_choice_type(types::ms640, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint16_t& ms1024() + { + assert_choice_type(types::ms1024, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint16_t& ms1280() + { + assert_choice_type(types::ms1280, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint16_t& ms2048() + { + assert_choice_type(types::ms2048, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint16_t& ms2560() + { + assert_choice_type(types::ms2560, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint16_t& ms5120() + { + assert_choice_type(types::ms5120, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint16_t& ms10240() + { + assert_choice_type(types::ms10240, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint8_t& ms10() const + { + assert_choice_type(types::ms10, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint8_t& ms20() const + { + assert_choice_type(types::ms20, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint8_t& ms32() const + { + assert_choice_type(types::ms32, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint8_t& ms40() const + { + assert_choice_type(types::ms40, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint8_t& ms60() const + { + assert_choice_type(types::ms60, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint8_t& ms64() const + { + assert_choice_type(types::ms64, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint8_t& ms70() const + { + assert_choice_type(types::ms70, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint8_t& ms80() const + { + assert_choice_type(types::ms80, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint8_t& ms128() const + { + assert_choice_type(types::ms128, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint8_t& ms160() const + { + assert_choice_type(types::ms160, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint16_t& ms256() const + { + assert_choice_type(types::ms256, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint16_t& ms320() const + { + assert_choice_type(types::ms320, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint16_t& ms512() const + { + assert_choice_type(types::ms512, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint16_t& ms640() const + { + assert_choice_type(types::ms640, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint16_t& ms1024() const + { + assert_choice_type(types::ms1024, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint16_t& ms1280() const + { + assert_choice_type(types::ms1280, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint16_t& ms2048() const + { + assert_choice_type(types::ms2048, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint16_t& ms2560() const + { + assert_choice_type(types::ms2560, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint16_t& ms5120() const + { + assert_choice_type(types::ms5120, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + const uint16_t& ms10240() const + { + assert_choice_type(types::ms10240, type_, "sl-drx-CycleStartOffset-r17"); + return c.get(); + } + uint8_t& set_ms10(); + uint8_t& set_ms20(); + uint8_t& set_ms32(); + uint8_t& set_ms40(); + uint8_t& set_ms60(); + uint8_t& set_ms64(); + uint8_t& set_ms70(); + uint8_t& set_ms80(); + uint8_t& set_ms128(); + uint8_t& set_ms160(); + uint16_t& set_ms256(); + uint16_t& set_ms320(); + uint16_t& set_ms512(); + uint16_t& set_ms640(); + uint16_t& set_ms1024(); + uint16_t& set_ms1280(); + uint16_t& set_ms2048(); + uint16_t& set_ms2560(); + uint16_t& set_ms5120(); + uint16_t& set_ms10240(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + sl_drx_on_dur_timer_r17_c_ sl_drx_on_dur_timer_r17; + sl_drx_cycle_start_offset_r17_c_ sl_drx_cycle_start_offset_r17; + uint8_t sl_drx_slot_offset_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TxResourceReq-r16 ::= SEQUENCE +struct sl_tx_res_req_r16_s { + struct sl_cast_type_r16_opts { + enum options { broadcast, groupcast, unicast, spare1, nulltype } value; + + const char* to_string() const; + }; + using sl_cast_type_r16_e_ = enumerated; + using sl_rlc_mode_ind_list_r16_l_ = dyn_array; + using sl_qos_info_list_r16_l_ = dyn_array; + using sl_type_tx_sync_list_r16_l_ = bounded_array; + + // member variables + fixed_bitstring<24> sl_dest_id_r16; + sl_cast_type_r16_e_ sl_cast_type_r16; + sl_rlc_mode_ind_list_r16_l_ sl_rlc_mode_ind_list_r16; + sl_qos_info_list_r16_l_ sl_qos_info_list_r16; + sl_type_tx_sync_list_r16_l_ sl_type_tx_sync_list_r16; + sl_tx_interested_freq_list_r16_l sl_tx_interested_freq_list_r16; + dyn_octstring sl_cap_info_sidelink_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TxResourceReqL2U2N-Relay-r17 ::= SEQUENCE +struct sl_tx_res_req_l2_u2_n_relay_r17_s { + using sl_type_tx_sync_list_l2_u2_n_r17_l_ = bounded_array; + + // member variables + bool ext = false; + bool sl_dest_id_l2_u2_n_r17_present = false; + bool sl_local_id_request_r17_present = false; + bool sl_paging_id_remote_ue_r17_present = false; + fixed_bitstring<24> sl_dest_id_l2_u2_n_r17; + sl_tx_interested_freq_list_r16_l sl_tx_interested_freq_list_l2_u2_n_r17; + sl_type_tx_sync_list_l2_u2_n_r17_l_ sl_type_tx_sync_list_l2_u2_n_r17; + sl_paging_id_remote_ue_r17_s sl_paging_id_remote_ue_r17; + dyn_octstring sl_cap_info_sidelink_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// Sensor-LocationInfo-r16 ::= SEQUENCE +struct sensor_location_info_r16_s { + bool ext = false; + dyn_octstring sensor_meas_info_r16; + dyn_octstring sensor_motion_info_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UplinkTxDirectCurrentTwoCarrierList-r16 ::= SEQUENCE (SIZE (1..64)) OF UplinkTxDirectCurrentTwoCarrier-r16 +using ul_tx_direct_current_two_carrier_list_r16_l = dyn_array; + +// VisitedPSCellInfo-r17 ::= SEQUENCE +struct visited_pscell_info_r17_s { + struct visited_cell_id_r17_c_ { + struct nr_cell_id_r17_c_ { + struct types_opts { + enum options { cgi_info_r17, pci_arfcn_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + nr_cell_id_r17_c_() = default; + nr_cell_id_r17_c_(const nr_cell_id_r17_c_& other); + nr_cell_id_r17_c_& operator=(const nr_cell_id_r17_c_& other); + ~nr_cell_id_r17_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 + cgi_info_logging_r16_s& cgi_info_r17() + { + assert_choice_type(types::cgi_info_r17, type_, "nr-CellId-r17"); + return c.get(); + } + pci_arfcn_nr_r16_s& pci_arfcn_r17() + { + assert_choice_type(types::pci_arfcn_r17, type_, "nr-CellId-r17"); + return c.get(); + } + const cgi_info_logging_r16_s& cgi_info_r17() const + { + assert_choice_type(types::cgi_info_r17, type_, "nr-CellId-r17"); + return c.get(); + } + const pci_arfcn_nr_r16_s& pci_arfcn_r17() const + { + assert_choice_type(types::pci_arfcn_r17, type_, "nr-CellId-r17"); + return c.get(); + } + cgi_info_logging_r16_s& set_cgi_info_r17(); + pci_arfcn_nr_r16_s& set_pci_arfcn_r17(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct eutra_cell_id_r17_c_ { + struct types_opts { + enum options { cell_global_id_r17, pci_arfcn_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + eutra_cell_id_r17_c_() = default; + eutra_cell_id_r17_c_(const eutra_cell_id_r17_c_& other); + eutra_cell_id_r17_c_& operator=(const eutra_cell_id_r17_c_& other); + ~eutra_cell_id_r17_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 + cgi_info_eutra_logging_s& cell_global_id_r17() + { + assert_choice_type(types::cell_global_id_r17, type_, "eutra-CellId-r17"); + return c.get(); + } + pci_arfcn_eutra_r16_s& pci_arfcn_r17() + { + assert_choice_type(types::pci_arfcn_r17, type_, "eutra-CellId-r17"); + return c.get(); + } + const cgi_info_eutra_logging_s& cell_global_id_r17() const + { + assert_choice_type(types::cell_global_id_r17, type_, "eutra-CellId-r17"); + return c.get(); + } + const pci_arfcn_eutra_r16_s& pci_arfcn_r17() const + { + assert_choice_type(types::pci_arfcn_r17, type_, "eutra-CellId-r17"); + return c.get(); + } + cgi_info_eutra_logging_s& set_cell_global_id_r17(); + pci_arfcn_eutra_r16_s& set_pci_arfcn_r17(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types_opts { + enum options { nr_cell_id_r17, eutra_cell_id_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + visited_cell_id_r17_c_() = default; + visited_cell_id_r17_c_(const visited_cell_id_r17_c_& other); + visited_cell_id_r17_c_& operator=(const visited_cell_id_r17_c_& other); + ~visited_cell_id_r17_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_cell_id_r17_c_& nr_cell_id_r17() + { + assert_choice_type(types::nr_cell_id_r17, type_, "visitedCellId-r17"); + return c.get(); + } + eutra_cell_id_r17_c_& eutra_cell_id_r17() + { + assert_choice_type(types::eutra_cell_id_r17, type_, "visitedCellId-r17"); + return c.get(); + } + const nr_cell_id_r17_c_& nr_cell_id_r17() const + { + assert_choice_type(types::nr_cell_id_r17, type_, "visitedCellId-r17"); + return c.get(); + } + const eutra_cell_id_r17_c_& eutra_cell_id_r17() const + { + assert_choice_type(types::eutra_cell_id_r17, type_, "visitedCellId-r17"); + return c.get(); + } + nr_cell_id_r17_c_& set_nr_cell_id_r17(); + eutra_cell_id_r17_c_& set_eutra_cell_id_r17(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext = false; + bool visited_cell_id_r17_present = false; + visited_cell_id_r17_c_ visited_cell_id_r17; + uint16_t time_spent_r17 = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AffectedCarrierFreqCombList-r16 ::= SEQUENCE (SIZE (1..128)) OF AffectedCarrierFreqComb-r16 +using affected_carrier_freq_comb_list_r16_l = dyn_array; + +// AffectedCarrierFreqList-r16 ::= SEQUENCE (SIZE (1..128)) OF AffectedCarrierFreq-r16 +using affected_carrier_freq_list_r16_l = dyn_array; + +// LocationInfo-r16 ::= SEQUENCE +struct location_info_r16_s { + bool ext = false; + bool common_location_info_r16_present = false; + bool sensor_location_info_r16_present = false; + common_location_info_r16_s common_location_info_r16; + log_meas_result_list_bt_r16_l bt_location_info_r16; + log_meas_result_list_wlan_r16_l wlan_location_info_r16; + sensor_location_info_r16_s sensor_location_info_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MUSIM-Assistance-r17 ::= SEQUENCE +struct mu_si_m_assist_r17_s { + struct musim_preferred_rrc_state_r17_opts { + enum options { idle, inactive, out_of_connected, nulltype } value; + + const char* to_string() const; + }; + using musim_preferred_rrc_state_r17_e_ = enumerated; + + // member variables + bool musim_preferred_rrc_state_r17_present = false; + musim_preferred_rrc_state_r17_e_ musim_preferred_rrc_state_r17; + mu_si_m_gap_pref_list_r17_l musim_gap_pref_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MaxBW-PreferenceFR2-2-r17 ::= SEQUENCE +struct max_bw_pref_fr2_2_r17_s { + struct reduced_max_bw_fr2_2_r17_s_ { + bool reduced_bw_fr2_2_dl_r17_present = false; + bool reduced_bw_fr2_2_ul_r17_present = false; + reduced_aggr_bw_r17_e reduced_bw_fr2_2_dl_r17; + reduced_aggr_bw_r17_e reduced_bw_fr2_2_ul_r17; + }; + + // member variables + bool reduced_max_bw_fr2_2_r17_present = false; + reduced_max_bw_fr2_2_r17_s_ reduced_max_bw_fr2_2_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MaxMIMO-LayerPreferenceFR2-2-r17 ::= SEQUENCE +struct max_mimo_layer_pref_fr2_2_r17_s { + struct reduced_max_mimo_layers_fr2_2_r17_s_ { + uint8_t reduced_mimo_layers_fr2_2_dl_r17 = 1; + uint8_t reduced_mimo_layers_fr2_2_ul_r17 = 1; + }; + + // member variables + bool reduced_max_mimo_layers_fr2_2_r17_present = false; + reduced_max_mimo_layers_fr2_2_r17_s_ reduced_max_mimo_layers_fr2_2_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultCBR-NR-r16 ::= SEQUENCE +struct meas_result_cbr_nr_r16_s { + bool ext = false; + uint8_t sl_pool_report_id_r16 = 1; + uint8_t sl_cbr_results_nr_r16 = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultCLI-RSSI-r16 ::= SEQUENCE +struct meas_result_cli_rssi_r16_s { + uint8_t rssi_res_id_r16 = 0; + uint8_t cli_rssi_result_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultFailedCell-r16 ::= SEQUENCE +struct meas_result_failed_cell_r16_s { + struct meas_result_r16_s_ { + struct cell_results_r16_s_ { + meas_quant_results_s results_ssb_cell_r16; + }; + struct rs_idx_results_r16_s_ { + results_per_ssb_idx_list_l results_ssb_idxes_r16; + }; + + // member variables + cell_results_r16_s_ cell_results_r16; + rs_idx_results_r16_s_ rs_idx_results_r16; + }; + + // member variables + cgi_info_logging_r16_s cgi_info; + meas_result_r16_s_ meas_result_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultList2EUTRA-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResult2EUTRA-r16 +using meas_result_list2_eutra_r16_l = dyn_array; + +// MeasResultList2NR-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResult2NR-r16 +using meas_result_list2_nr_r16_l = dyn_array; + +// MeasResultListLogging2NR-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResultLogging2NR-r16 +using meas_result_list_logging2_nr_r16_l = dyn_array; + +// MeasResultListUTRA-FDD-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResultUTRA-FDD-r16 +using meas_result_list_utra_fdd_r16_l = dyn_array; + +// MeasResultSRS-RSRP-r16 ::= SEQUENCE +struct meas_result_srs_rsrp_r16_s { + uint8_t srs_res_id_r16 = 0; + uint8_t srs_rsrp_result_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultServingCell-r16 ::= SEQUENCE +struct meas_result_serving_cell_r16_s { + struct results_ssb_s_ { + uint8_t best_ssb_idx = 0; + meas_quant_results_s best_ssb_results; + uint8_t nof_good_ssb = 1; + }; + + // member variables + bool results_ssb_present = false; + meas_quant_results_s results_ssb_cell; + results_ssb_s_ results_ssb; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultsPerCellIdleEUTRA-r16 ::= SEQUENCE +struct meas_results_per_cell_idle_eutra_r16_s { + struct meas_idle_result_eutra_r16_s_ { + bool rsrp_result_eutra_r16_present = false; + bool rsrq_result_eutra_r16_present = false; + uint8_t rsrp_result_eutra_r16 = 0; + int8_t rsrq_result_eutra_r16 = -30; + }; + + // member variables + bool ext = false; + uint16_t eutra_pci_r16 = 0; + meas_idle_result_eutra_r16_s_ meas_idle_result_eutra_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultsPerCellIdleNR-r16 ::= SEQUENCE +struct meas_results_per_cell_idle_nr_r16_s { + struct meas_idle_result_nr_r16_s_ { + bool rsrp_result_r16_present = false; + bool rsrq_result_r16_present = false; + uint8_t rsrp_result_r16 = 0; + uint8_t rsrq_result_r16 = 0; + results_per_ssb_idx_list_r16_l results_ssb_idxes_r16; + }; + + // member variables + bool ext = false; + uint16_t pci_r16 = 0; + meas_idle_result_nr_r16_s_ meas_idle_result_nr_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MinSchedulingOffsetPreferenceExt-r17 ::= SEQUENCE +struct min_sched_offset_pref_ext_r17_s { + struct preferred_k0_r17_s_ { + struct preferred_k0_scs_480k_hz_r17_opts { + enum options { sl8, sl16, sl32, sl48, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preferred_k0_scs_480k_hz_r17_e_ = enumerated; + struct preferred_k0_scs_960k_hz_r17_opts { + enum options { sl8, sl16, sl32, sl48, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preferred_k0_scs_960k_hz_r17_e_ = enumerated; + + // member variables + bool preferred_k0_scs_480k_hz_r17_present = false; + bool preferred_k0_scs_960k_hz_r17_present = false; + preferred_k0_scs_480k_hz_r17_e_ preferred_k0_scs_480k_hz_r17; + preferred_k0_scs_960k_hz_r17_e_ preferred_k0_scs_960k_hz_r17; + }; + struct preferred_k2_r17_s_ { + struct preferred_k2_scs_480k_hz_r17_opts { + enum options { sl8, sl16, sl32, sl48, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preferred_k2_scs_480k_hz_r17_e_ = enumerated; + struct preferred_k2_scs_960k_hz_r17_opts { + enum options { sl8, sl16, sl32, sl48, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preferred_k2_scs_960k_hz_r17_e_ = enumerated; + + // member variables + bool preferred_k2_scs_480k_hz_r17_present = false; + bool preferred_k2_scs_960k_hz_r17_present = false; + preferred_k2_scs_480k_hz_r17_e_ preferred_k2_scs_480k_hz_r17; + preferred_k2_scs_960k_hz_r17_e_ preferred_k2_scs_960k_hz_r17; + }; + + // member variables + bool preferred_k0_r17_present = false; + bool preferred_k2_r17_present = false; + preferred_k0_r17_s_ preferred_k0_r17; + preferred_k2_r17_s_ preferred_k2_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NeedForGapsInfoNR-r16 ::= SEQUENCE +struct need_for_gaps_info_nr_r16_s { + need_for_gaps_intra_freq_list_r16_l intra_freq_need_for_gap_r16; + need_for_gaps_band_list_nr_r16_l inter_freq_need_for_gap_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// OverheatingAssistance-r17 ::= SEQUENCE +struct overheat_assist_r17_s { + struct reduced_max_bw_fr2_2_r17_s_ { + reduced_aggr_bw_r17_e reduced_bw_fr2_2_dl_r17; + reduced_aggr_bw_r17_e reduced_bw_fr2_2_ul_r17; + }; + struct reduced_max_mimo_layers_fr2_2_s_ { + mimo_layers_dl_e reduced_mimo_layers_fr2_2_dl; + mimo_layers_ul_e reduced_mimo_layers_fr2_2_ul; + }; + + // member variables + bool reduced_max_bw_fr2_2_r17_present = false; + bool reduced_max_mimo_layers_fr2_2_present = false; + reduced_max_bw_fr2_2_r17_s_ reduced_max_bw_fr2_2_r17; + reduced_max_mimo_layers_fr2_2_s_ reduced_max_mimo_layers_fr2_2; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// PerRAInfoList-r16 ::= SEQUENCE (SIZE (1..200)) OF PerRAInfo-r16 +using per_ra_info_list_r16_l = dyn_array; + +// PerRAInfoList-v1660 ::= SEQUENCE (SIZE (1..200)) OF PerRACSI-RSInfo-v1660 +using per_ra_info_list_v1660_l = dyn_array; + +// PropagationDelayDifference-r17 ::= SEQUENCE (SIZE (1..4)) OF INTEGER (-270..270) +using propagation_delay_difference_r17_l = bounded_array; + +// RRCReconfigurationComplete-v1640-IEs ::= SEQUENCE +struct rrc_recfg_complete_v1640_ies_s { + bool non_crit_ext_present = false; + ul_tx_direct_current_two_carrier_list_r16_l ul_tx_direct_current_two_carrier_list_r16; + rrc_recfg_complete_v1700_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; +}; + +// RRCResumeComplete-v1720-IEs ::= SEQUENCE +struct rrc_resume_complete_v1720_ies_s { + bool non_crit_ext_present = false; + ul_tx_direct_current_more_carrier_list_r17_l ul_tx_direct_current_more_carrier_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReducedMaxBW-FRx-r16 ::= SEQUENCE +struct reduced_max_bw_f_rx_r16_s { + reduced_aggr_bw_e reduced_bw_dl_r16; + reduced_aggr_bw_e reduced_bw_ul_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ReducedMaxCCs-r16 ::= SEQUENCE +struct reduced_max_ccs_r16_s { + uint8_t reduced_ccs_dl_r16 = 0; + uint8_t reduced_ccs_ul_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SIB-Type-r17 ::= ENUMERATED +struct sib_type_r17_opts { + enum options { + sib_type2, + sib_type3, + sib_type4, + sib_type5, + sib_type9, + sib_type10_v1610, + sib_type11_v1610, + sib_type12_v1610, + sib_type13_v1610, + sib_type14_v1610, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; +}; +using sib_type_r17_e = enumerated; + +// SL-TrafficPatternInfo-r16 ::= SEQUENCE +struct sl_traffic_pattern_info_r16_s { + struct traffic_periodicity_r16_opts { + enum options { ms20, ms50, ms100, ms200, ms300, ms400, ms500, ms600, ms700, ms800, ms900, ms1000, nulltype } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using traffic_periodicity_r16_e_ = enumerated; + + // member variables + traffic_periodicity_r16_e_ traffic_periodicity_r16; + uint16_t timing_offset_r16 = 0; + fixed_bitstring<8> msg_size_r16; + uint16_t sl_qos_flow_id_r16 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TxResourceReq-v1700 ::= SEQUENCE +struct sl_tx_res_req_v1700_s { + using sl_drx_info_from_rx_list_r17_l_ = dyn_array; + struct sl_drx_ind_r17_opts { + enum options { on, off, nulltype } value; + + const char* to_string() const; + }; + using sl_drx_ind_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool sl_drx_ind_r17_present = false; + sl_drx_info_from_rx_list_r17_l_ sl_drx_info_from_rx_list_r17; + sl_drx_ind_r17_e_ sl_drx_ind_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TxResourceReqCommRelay-r17 ::= CHOICE +struct sl_tx_res_req_comm_relay_r17_c { + struct types_opts { + enum options { sl_tx_res_req_l2_u2_n_relay_r17, sl_tx_res_req_l3_u2_n_relay_r17, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + sl_tx_res_req_comm_relay_r17_c() = default; + sl_tx_res_req_comm_relay_r17_c(const sl_tx_res_req_comm_relay_r17_c& other); + sl_tx_res_req_comm_relay_r17_c& operator=(const sl_tx_res_req_comm_relay_r17_c& other); + ~sl_tx_res_req_comm_relay_r17_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 + sl_tx_res_req_l2_u2_n_relay_r17_s& sl_tx_res_req_l2_u2_n_relay_r17() + { + assert_choice_type(types::sl_tx_res_req_l2_u2_n_relay_r17, type_, "SL-TxResourceReqCommRelay-r17"); + return c.get(); + } + sl_tx_res_req_r16_s& sl_tx_res_req_l3_u2_n_relay_r17() + { + assert_choice_type(types::sl_tx_res_req_l3_u2_n_relay_r17, type_, "SL-TxResourceReqCommRelay-r17"); + return c.get(); + } + const sl_tx_res_req_l2_u2_n_relay_r17_s& sl_tx_res_req_l2_u2_n_relay_r17() const + { + assert_choice_type(types::sl_tx_res_req_l2_u2_n_relay_r17, type_, "SL-TxResourceReqCommRelay-r17"); + return c.get(); + } + const sl_tx_res_req_r16_s& sl_tx_res_req_l3_u2_n_relay_r17() const + { + assert_choice_type(types::sl_tx_res_req_l3_u2_n_relay_r17, type_, "SL-TxResourceReqCommRelay-r17"); + return c.get(); + } + sl_tx_res_req_l2_u2_n_relay_r17_s& set_sl_tx_res_req_l2_u2_n_relay_r17(); + sl_tx_res_req_r16_s& set_sl_tx_res_req_l3_u2_n_relay_r17(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// UE-MeasurementsAvailable-r16 ::= SEQUENCE +struct ue_meass_available_r16_s { + bool ext = false; + bool log_meas_available_r16_present = false; + bool log_meas_available_bt_r16_present = false; + bool log_meas_available_wlan_r16_present = false; + bool conn_est_fail_info_available_r16_present = false; + bool rlf_info_available_r16_present = false; + // ... + // group 0 + bool success_ho_info_available_r17_present = false; + bool sig_log_meas_cfg_available_r17_present = false; + bool sig_log_meas_cfg_available_r17 = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-GapFR2-Preference-r17 ::= SEQUENCE +struct ul_gap_fr2_pref_r17_s { + bool ul_gap_fr2_pattern_pref_r17_present = false; + uint8_t ul_gap_fr2_pattern_pref_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VisitedPSCellInfoList-r17 ::= SEQUENCE (SIZE (1..16)) OF VisitedPSCellInfo-r17 +using visited_pscell_info_list_r17_l = dyn_array; + +// ChoCandidateCell-r17 ::= CHOICE +struct cho_candidate_cell_r17_c { + struct types_opts { + enum options { cell_global_id_r17, pci_arfcn_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + cho_candidate_cell_r17_c() = default; + cho_candidate_cell_r17_c(const cho_candidate_cell_r17_c& other); + cho_candidate_cell_r17_c& operator=(const cho_candidate_cell_r17_c& other); + ~cho_candidate_cell_r17_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 + cgi_info_logging_r16_s& cell_global_id_r17() + { + assert_choice_type(types::cell_global_id_r17, type_, "ChoCandidateCell-r17"); + return c.get(); + } + pci_arfcn_nr_r16_s& pci_arfcn_r17() + { + assert_choice_type(types::pci_arfcn_r17, type_, "ChoCandidateCell-r17"); + return c.get(); + } + const cgi_info_logging_r16_s& cell_global_id_r17() const + { + assert_choice_type(types::cell_global_id_r17, type_, "ChoCandidateCell-r17"); + return c.get(); + } + const pci_arfcn_nr_r16_s& pci_arfcn_r17() const + { + assert_choice_type(types::pci_arfcn_r17, type_, "ChoCandidateCell-r17"); + return c.get(); + } + cgi_info_logging_r16_s& set_cell_global_id_r17(); + pci_arfcn_nr_r16_s& set_pci_arfcn_r17(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// ConnEstFailReport-r16 ::= SEQUENCE +struct conn_est_fail_report_r16_s { + struct meas_result_neigh_cells_r16_s_ { + meas_result_list2_nr_r16_l meas_result_neigh_cell_list_nr; + meas_result_list2_eutra_r16_l meas_result_neigh_cell_list_eutra; + }; + + // member variables + bool ext = false; + bool location_info_r16_present = false; + meas_result_failed_cell_r16_s meas_result_failed_cell_r16; + location_info_r16_s location_info_r16; + meas_result_neigh_cells_r16_s_ meas_result_neigh_cells_r16; + uint8_t nof_conn_fail_r16 = 1; + per_ra_info_list_r16_l per_ra_info_list_r16; + uint32_t time_since_fail_r16 = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRX-Preference-r16 ::= SEQUENCE +struct drx_pref_r16_s { + struct preferred_drx_inactivity_timer_r16_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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using preferred_drx_inactivity_timer_r16_e_ = enumerated; + struct preferred_drx_long_cycle_r16_opts { + enum options { + ms10, + ms20, + ms32, + ms40, + ms60, + ms64, + ms70, + ms80, + ms128, + ms160, + ms256, + ms320, + ms512, + ms640, + ms1024, + ms1280, + ms2048, + ms2560, + ms5120, + ms10240, + spare12, + spare11, + spare10, + spare9, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using preferred_drx_long_cycle_r16_e_ = enumerated; + struct preferred_drx_short_cycle_r16_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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using preferred_drx_short_cycle_r16_e_ = enumerated; + + // member variables + bool preferred_drx_inactivity_timer_r16_present = false; + bool preferred_drx_long_cycle_r16_present = false; + bool preferred_drx_short_cycle_r16_present = false; + bool preferred_drx_short_cycle_timer_r16_present = false; + preferred_drx_inactivity_timer_r16_e_ preferred_drx_inactivity_timer_r16; + preferred_drx_long_cycle_r16_e_ preferred_drx_long_cycle_r16; + preferred_drx_short_cycle_r16_e_ preferred_drx_short_cycle_r16; + uint8_t preferred_drx_short_cycle_timer_r16 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// EUTRA-RSTD-Info ::= SEQUENCE +struct eutra_rstd_info_s { + bool ext = false; + uint32_t carrier_freq = 0; + uint8_t meas_prs_offset = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IDC-Assistance-r16 ::= SEQUENCE +struct idc_assist_r16_s { + bool ext = false; + affected_carrier_freq_list_r16_l affected_carrier_freq_list_r16; + affected_carrier_freq_comb_list_r16_l affected_carrier_freq_comb_list_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LogMeasInfo-r16 ::= SEQUENCE +struct log_meas_info_r16_s { + struct meas_result_neigh_cells_r16_s_ { + meas_result_list_logging2_nr_r16_l meas_result_neigh_cell_list_nr; + meas_result_list2_eutra_r16_l meas_result_neigh_cell_list_eutra; + }; + + // member variables + bool ext = false; + bool location_info_r16_present = false; + bool serv_cell_id_r16_present = false; + bool meas_result_serving_cell_r16_present = false; + bool any_cell_sel_detected_r16_present = false; + location_info_r16_s location_info_r16; + uint16_t relative_time_stamp_r16 = 0; + cgi_info_logging_r16_s serv_cell_id_r16; + meas_result_serving_cell_r16_s meas_result_serving_cell_r16; + meas_result_neigh_cells_r16_s_ meas_result_neigh_cells_r16; + // ... + // group 0 + bool in_dev_coex_detected_r17_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MaxBW-Preference-r16 ::= SEQUENCE +struct max_bw_pref_r16_s { + bool reduced_max_bw_fr1_r16_present = false; + bool reduced_max_bw_fr2_r16_present = false; + reduced_max_bw_f_rx_r16_s reduced_max_bw_fr1_r16; + reduced_max_bw_f_rx_r16_s reduced_max_bw_fr2_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MaxCC-Preference-r16 ::= SEQUENCE +struct max_cc_pref_r16_s { + bool reduced_max_ccs_r16_present = false; + reduced_max_ccs_r16_s reduced_max_ccs_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MaxMIMO-LayerPreference-r16 ::= SEQUENCE +struct max_mimo_layer_pref_r16_s { + struct reduced_max_mimo_layers_fr1_r16_s_ { + uint8_t reduced_mimo_layers_fr1_dl_r16 = 1; + uint8_t reduced_mimo_layers_fr1_ul_r16 = 1; + }; + struct reduced_max_mimo_layers_fr2_r16_s_ { + uint8_t reduced_mimo_layers_fr2_dl_r16 = 1; + uint8_t reduced_mimo_layers_fr2_ul_r16 = 1; + }; + + // member variables + bool reduced_max_mimo_layers_fr1_r16_present = false; + bool reduced_max_mimo_layers_fr2_r16_present = false; + reduced_max_mimo_layers_fr1_r16_s_ reduced_max_mimo_layers_fr1_r16; + reduced_max_mimo_layers_fr2_r16_s_ reduced_max_mimo_layers_fr2_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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 + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + 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 + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResult2UTRA-FDD-r16 ::= SEQUENCE +struct meas_result2_utra_fdd_r16_s { + uint16_t carrier_freq_r16 = 0; + meas_result_list_utra_fdd_r16_l meas_result_neigh_cell_list_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; +}; + +// MeasResultListCLI-RSSI-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResultCLI-RSSI-r16 +using meas_result_list_cli_rssi_r16_l = dyn_array; + +// MeasResultListSRS-RSRP-r16 ::= SEQUENCE (SIZE (1..8)) OF MeasResultSRS-RSRP-r16 +using meas_result_list_srs_rsrp_r16_l = dyn_array; + +// MeasResultNR-SL-r16 ::= SEQUENCE +struct meas_result_nr_sl_r16_s { + using meas_result_list_cbr_nr_r16_l_ = dyn_array; + + // member variables + bool ext = false; + meas_result_list_cbr_nr_r16_l_ meas_result_list_cbr_nr_r16; + // ... + + // 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 + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultSuccessHONR-r17 ::= SEQUENCE +struct meas_result_success_ho_nr_r17_s { + struct meas_result_r17_s_ { + struct cell_results_r17_s_ { + bool results_ssb_cell_r17_present = false; + bool results_csi_rs_cell_r17_present = false; + meas_quant_results_s results_ssb_cell_r17; + meas_quant_results_s results_csi_rs_cell_r17; + }; + struct rs_idx_results_r17_s_ { + results_per_ssb_idx_list_l results_ssb_idxes_r17; + results_per_csi_rs_idx_list_l results_csi_rs_idxes_r17; + }; + + // member variables + cell_results_r17_s_ cell_results_r17; + rs_idx_results_r17_s_ rs_idx_results_r17; + }; + + // member variables + meas_result_r17_s_ meas_result_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultsPerCarrierIdleEUTRA-r16 ::= SEQUENCE +struct meas_results_per_carrier_idle_eutra_r16_s { + using meas_results_per_cell_list_idle_eutra_r16_l_ = dyn_array; + + // member variables + bool ext = false; + uint32_t carrier_freq_eutra_r16 = 0; + meas_results_per_cell_list_idle_eutra_r16_l_ meas_results_per_cell_list_idle_eutra_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultsPerCarrierIdleNR-r16 ::= SEQUENCE +struct meas_results_per_carrier_idle_nr_r16_s { + using meas_results_per_cell_list_idle_nr_r16_l_ = dyn_array; + + // member variables + bool ext = false; + uint32_t carrier_freq_r16 = 0; + meas_results_per_cell_list_idle_nr_r16_l_ meas_results_per_cell_list_idle_nr_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MinSchedulingOffsetPreference-r16 ::= SEQUENCE +struct min_sched_offset_pref_r16_s { + struct preferred_k0_r16_s_ { + struct preferred_k0_scs_15k_hz_r16_opts { + enum options { sl1, sl2, sl4, sl6, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preferred_k0_scs_15k_hz_r16_e_ = enumerated; + struct preferred_k0_scs_30k_hz_r16_opts { + enum options { sl1, sl2, sl4, sl6, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preferred_k0_scs_30k_hz_r16_e_ = enumerated; + struct preferred_k0_scs_60k_hz_r16_opts { + enum options { sl2, sl4, sl8, sl12, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preferred_k0_scs_60k_hz_r16_e_ = enumerated; + struct preferred_k0_scs_120k_hz_r16_opts { + enum options { sl2, sl4, sl8, sl12, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preferred_k0_scs_120k_hz_r16_e_ = enumerated; + + // member variables + bool preferred_k0_scs_15k_hz_r16_present = false; + bool preferred_k0_scs_30k_hz_r16_present = false; + bool preferred_k0_scs_60k_hz_r16_present = false; + bool preferred_k0_scs_120k_hz_r16_present = false; + preferred_k0_scs_15k_hz_r16_e_ preferred_k0_scs_15k_hz_r16; + preferred_k0_scs_30k_hz_r16_e_ preferred_k0_scs_30k_hz_r16; + preferred_k0_scs_60k_hz_r16_e_ preferred_k0_scs_60k_hz_r16; + preferred_k0_scs_120k_hz_r16_e_ preferred_k0_scs_120k_hz_r16; + }; + struct preferred_k2_r16_s_ { + struct preferred_k2_scs_15k_hz_r16_opts { + enum options { sl1, sl2, sl4, sl6, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preferred_k2_scs_15k_hz_r16_e_ = enumerated; + struct preferred_k2_scs_30k_hz_r16_opts { + enum options { sl1, sl2, sl4, sl6, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preferred_k2_scs_30k_hz_r16_e_ = enumerated; + struct preferred_k2_scs_60k_hz_r16_opts { + enum options { sl2, sl4, sl8, sl12, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preferred_k2_scs_60k_hz_r16_e_ = enumerated; + struct preferred_k2_scs_120k_hz_r16_opts { + enum options { sl2, sl4, sl8, sl12, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using preferred_k2_scs_120k_hz_r16_e_ = enumerated; + + // member variables + bool preferred_k2_scs_15k_hz_r16_present = false; + bool preferred_k2_scs_30k_hz_r16_present = false; + bool preferred_k2_scs_60k_hz_r16_present = false; + bool preferred_k2_scs_120k_hz_r16_present = false; + preferred_k2_scs_15k_hz_r16_e_ preferred_k2_scs_15k_hz_r16; + preferred_k2_scs_30k_hz_r16_e_ preferred_k2_scs_30k_hz_r16; + preferred_k2_scs_60k_hz_r16_e_ preferred_k2_scs_60k_hz_r16; + preferred_k2_scs_120k_hz_r16_e_ preferred_k2_scs_120k_hz_r16; + }; + + // member variables + bool preferred_k0_r16_present = false; + bool preferred_k2_r16_present = false; + preferred_k0_r16_s_ preferred_k0_r16; + preferred_k2_r16_s_ preferred_k2_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NR-PRS-MeasurementInfo-r16 ::= SEQUENCE +struct nr_prs_meas_info_r16_s { + struct nr_meas_prs_repeat_and_offset_r16_c_ { + struct types_opts { + enum options { ms20_r16, ms40_r16, ms80_r16, ms160_r16, /*...*/ nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + nr_meas_prs_repeat_and_offset_r16_c_() = default; + nr_meas_prs_repeat_and_offset_r16_c_(const nr_meas_prs_repeat_and_offset_r16_c_& other); + nr_meas_prs_repeat_and_offset_r16_c_& operator=(const nr_meas_prs_repeat_and_offset_r16_c_& other); + ~nr_meas_prs_repeat_and_offset_r16_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& ms20_r16() + { + assert_choice_type(types::ms20_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); + return c.get(); + } + uint8_t& ms40_r16() + { + assert_choice_type(types::ms40_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); + return c.get(); + } + uint8_t& ms80_r16() + { + assert_choice_type(types::ms80_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); + return c.get(); + } + uint8_t& ms160_r16() + { + assert_choice_type(types::ms160_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); + return c.get(); + } + const uint8_t& ms20_r16() const + { + assert_choice_type(types::ms20_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); + return c.get(); + } + const uint8_t& ms40_r16() const + { + assert_choice_type(types::ms40_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); + return c.get(); + } + const uint8_t& ms80_r16() const + { + assert_choice_type(types::ms80_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); + return c.get(); + } + const uint8_t& ms160_r16() const + { + assert_choice_type(types::ms160_r16, type_, "nr-MeasPRS-RepetitionAndOffset-r16"); + return c.get(); + } + uint8_t& set_ms20_r16(); + uint8_t& set_ms40_r16(); + uint8_t& set_ms80_r16(); + uint8_t& set_ms160_r16(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + struct nr_meas_prs_len_r16_opts { + enum options { ms1dot5, ms3, ms3dot5, ms4, ms5dot5, ms6, ms10, ms20, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using nr_meas_prs_len_r16_e_ = enumerated; + + // member variables + bool ext = false; + uint32_t dl_prs_point_a_r16 = 0; + nr_meas_prs_repeat_and_offset_r16_c_ nr_meas_prs_repeat_and_offset_r16; + nr_meas_prs_len_r16_e_ nr_meas_prs_len_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NR-TimeStamp-r17 ::= SEQUENCE +struct nr_time_stamp_r17_s { + struct nr_slot_r17_c_ { + struct types_opts { + enum options { scs15_r17, scs30_r17, scs60_r17, scs120_r17, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + nr_slot_r17_c_() = default; + nr_slot_r17_c_(const nr_slot_r17_c_& other); + nr_slot_r17_c_& operator=(const nr_slot_r17_c_& other); + ~nr_slot_r17_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& scs15_r17() + { + assert_choice_type(types::scs15_r17, type_, "nr-Slot-r17"); + return c.get(); + } + uint8_t& scs30_r17() + { + assert_choice_type(types::scs30_r17, type_, "nr-Slot-r17"); + return c.get(); + } + uint8_t& scs60_r17() + { + assert_choice_type(types::scs60_r17, type_, "nr-Slot-r17"); + return c.get(); + } + uint8_t& scs120_r17() + { + assert_choice_type(types::scs120_r17, type_, "nr-Slot-r17"); + return c.get(); + } + const uint8_t& scs15_r17() const + { + assert_choice_type(types::scs15_r17, type_, "nr-Slot-r17"); + return c.get(); + } + const uint8_t& scs30_r17() const + { + assert_choice_type(types::scs30_r17, type_, "nr-Slot-r17"); + return c.get(); + } + const uint8_t& scs60_r17() const + { + assert_choice_type(types::scs60_r17, type_, "nr-Slot-r17"); + return c.get(); + } + const uint8_t& scs120_r17() const + { + assert_choice_type(types::scs120_r17, type_, "nr-Slot-r17"); + return c.get(); + } + uint8_t& set_scs15_r17(); + uint8_t& set_scs30_r17(); + uint8_t& set_scs60_r17(); + uint8_t& set_scs120_r17(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext = false; + uint16_t nr_sfn_r17 = 0; + nr_slot_r17_c_ nr_slot_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RA-InformationCommon-r16 ::= SEQUENCE +struct ra_info_common_r16_s { + struct msg1_fdm_r16_opts { + enum options { one, two, four, eight, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using msg1_fdm_r16_e_ = enumerated; + struct msg1_fdmcfra_r16_opts { + enum options { one, two, four, eight, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using msg1_fdmcfra_r16_e_ = enumerated; + struct msg1_scs_from_prach_cfg_idx_r16_opts { + enum options { khz1dot25, khz5, spare2, spare1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using msg1_scs_from_prach_cfg_idx_r16_e_ = enumerated; + struct msg1_scs_from_prach_cfg_idx_cfra_r16_opts { + enum options { khz1dot25, khz5, spare2, spare1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using msg1_scs_from_prach_cfg_idx_cfra_r16_e_ = enumerated; + struct msg_a_ro_fdm_r17_opts { + enum options { one, two, four, eight, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using msg_a_ro_fdm_r17_e_ = enumerated; + struct msg_a_ro_fdmcfra_r17_opts { + enum options { one, two, four, eight, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using msg_a_ro_fdmcfra_r17_e_ = enumerated; + struct msg_a_scs_from_prach_cfg_idx_r17_opts { + enum options { khz1dot25, khz5, spare2, spare1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; + }; + using msg_a_scs_from_prach_cfg_idx_r17_e_ = enumerated; + struct msg_a_trans_max_r17_opts { + enum options { n1, n2, n4, n6, n8, n10, n20, n50, n100, n200, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using msg_a_trans_max_r17_e_ = enumerated; + struct nrof_msg_a_po_fdm_r17_opts { + enum options { one, two, four, eight, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using nrof_msg_a_po_fdm_r17_e_ = enumerated; + using intended_sibs_r17_l_ = bounded_array; + using ssbs_for_si_acquisition_r17_l_ = dyn_array; + + // member variables + bool ext = false; + bool msg1_freq_start_r16_present = false; + bool msg1_freq_start_cfra_r16_present = false; + bool msg1_subcarrier_spacing_r16_present = false; + bool msg1_subcarrier_spacing_cfra_r16_present = false; + bool msg1_fdm_r16_present = false; + bool msg1_fdmcfra_r16_present = false; + uint32_t absolute_freq_point_a_r16 = 0; + uint16_t location_and_bw_r16 = 0; + subcarrier_spacing_e subcarrier_spacing_r16; + uint16_t msg1_freq_start_r16 = 0; + uint16_t msg1_freq_start_cfra_r16 = 0; + subcarrier_spacing_e msg1_subcarrier_spacing_r16; + subcarrier_spacing_e msg1_subcarrier_spacing_cfra_r16; + msg1_fdm_r16_e_ msg1_fdm_r16; + msg1_fdmcfra_r16_e_ msg1_fdmcfra_r16; + per_ra_info_list_r16_l per_ra_info_list_r16; + // ... + // group 0 + copy_ptr per_ra_info_list_v1660; + // group 1 + bool msg1_scs_from_prach_cfg_idx_r16_present = false; + msg1_scs_from_prach_cfg_idx_r16_e_ msg1_scs_from_prach_cfg_idx_r16; + // group 2 + bool msg1_scs_from_prach_cfg_idx_cfra_r16_present = false; + msg1_scs_from_prach_cfg_idx_cfra_r16_e_ msg1_scs_from_prach_cfg_idx_cfra_r16; + // group 3 + bool msg_a_ro_freq_start_r17_present = false; + bool msg_a_ro_freq_start_cfra_r17_present = false; + bool msg_a_subcarrier_spacing_r17_present = false; + bool msg_a_ro_fdm_r17_present = false; + bool msg_a_ro_fdmcfra_r17_present = false; + bool msg_a_scs_from_prach_cfg_idx_r17_present = false; + bool msg_a_trans_max_r17_present = false; + bool msg_a_mcs_r17_present = false; + bool nrof_prbs_per_msg_a_po_r17_present = false; + bool msg_a_pusch_time_domain_alloc_r17_present = false; + bool freq_start_msg_a_pusch_r17_present = false; + bool nrof_msg_a_po_fdm_r17_present = false; + bool dl_pathloss_rsrp_r17_present = false; + bool msg_a_pusch_payload_size_r17_present = false; + bool on_demand_si_success_r17_present = false; + uint16_t msg_a_ro_freq_start_r17 = 0; + uint16_t msg_a_ro_freq_start_cfra_r17 = 0; + subcarrier_spacing_e msg_a_subcarrier_spacing_r17; + msg_a_ro_fdm_r17_e_ msg_a_ro_fdm_r17; + msg_a_ro_fdmcfra_r17_e_ msg_a_ro_fdmcfra_r17; + msg_a_scs_from_prach_cfg_idx_r17_e_ msg_a_scs_from_prach_cfg_idx_r17; + msg_a_trans_max_r17_e_ msg_a_trans_max_r17; + uint8_t msg_a_mcs_r17 = 0; + uint8_t nrof_prbs_per_msg_a_po_r17 = 1; + uint8_t msg_a_pusch_time_domain_alloc_r17 = 1; + uint16_t freq_start_msg_a_pusch_r17 = 0; + nrof_msg_a_po_fdm_r17_e_ nrof_msg_a_po_fdm_r17; + uint8_t dl_pathloss_rsrp_r17 = 0; + copy_ptr intended_sibs_r17; + copy_ptr ssbs_for_si_acquisition_r17; + fixed_bitstring<5> msg_a_pusch_payload_size_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RAN-VisibleMeasurements-r17 ::= SEQUENCE +struct ran_visible_meass_r17_s { + using app_layer_buffer_level_list_r17_l_ = bounded_array; + using pdu_session_id_list_r17_l_ = dyn_array; + + // member variables + bool ext = false; + bool playout_delay_for_media_startup_r17_present = false; + app_layer_buffer_level_list_r17_l_ app_layer_buffer_level_list_r17; + uint16_t playout_delay_for_media_startup_r17 = 0; + pdu_session_id_list_r17_l_ pdu_session_id_list_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCReconfigurationComplete-v1610-IEs ::= SEQUENCE +struct rrc_recfg_complete_v1610_ies_s { + bool ue_meass_available_r16_present = false; + bool need_for_gaps_info_nr_r16_present = false; + bool non_crit_ext_present = false; + ue_meass_available_r16_s ue_meass_available_r16; + need_for_gaps_info_nr_r16_s need_for_gaps_info_nr_r16; + rrc_recfg_complete_v1640_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; +}; + +// RRCResumeComplete-v1700-IEs ::= SEQUENCE +struct rrc_resume_complete_v1700_ies_s { + bool need_for_gap_ncsg_info_nr_r17_present = false; + bool need_for_gap_ncsg_info_eutra_r17_present = false; + bool non_crit_ext_present = false; + need_for_gap_ncsg_info_nr_r17_s need_for_gap_ncsg_info_nr_r17; + need_for_gap_ncsg_info_eutra_r17_s need_for_gap_ncsg_info_eutra_r17; + rrc_resume_complete_v1720_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; +}; + +// RRCSetupComplete-v1700-IEs ::= SEQUENCE +struct rrc_setup_complete_v1700_ies_s { + bool onboarding_request_r17_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; +}; + +// ReleasePreference-r16 ::= SEQUENCE +struct release_pref_r16_s { + struct preferred_rrc_state_r16_opts { + enum options { idle, inactive, connected, out_of_connected, nulltype } value; + + const char* to_string() const; + }; + using preferred_rrc_state_r16_e_ = enumerated; + + // member variables + preferred_rrc_state_r16_e_ preferred_rrc_state_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SHR-Cause-r17 ::= SEQUENCE +struct shr_cause_r17_s { + bool ext = false; + bool t304_cause_r17_present = false; + bool t310_cause_r17_present = false; + bool t312_cause_r17_present = false; + bool source_daps_fail_r17_present = false; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-RxDRX-Report-v1700 ::= SEQUENCE +struct sl_rx_drx_report_v1700_s { + bool ext = false; + sl_drx_cfg_uc_semi_static_r17_s sl_drx_cfg_from_tx_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-RxInterestedGC-BC-Dest-r17 ::= SEQUENCE +struct sl_rx_interested_gc_bc_dest_r17_s { + using sl_rx_interested_qos_info_list_r17_l_ = dyn_array; + + // member variables + sl_rx_interested_qos_info_list_r17_l_ sl_rx_interested_qos_info_list_r17; + fixed_bitstring<24> sl_dest_id_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TxResourceReqCommRelayInfo-r17 ::= SEQUENCE +struct sl_tx_res_req_comm_relay_info_r17_s { + bool sl_relay_drx_cfg_r17_present = false; + sl_tx_res_req_v1700_s sl_relay_drx_cfg_r17; + sl_tx_res_req_comm_relay_r17_c sl_tx_res_req_comm_relay_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-TxResourceReqDisc-r17 ::= SEQUENCE +struct sl_tx_res_req_disc_r17_s { + struct sl_cast_type_disc_r17_opts { + enum options { broadcast, groupcast, unicast, spare1, nulltype } value; + + const char* to_string() const; + }; + using sl_cast_type_disc_r17_e_ = enumerated; + using sl_type_tx_sync_list_disc_r17_l_ = bounded_array; + struct sl_discovery_type_r17_opts { + enum options { relay, non_relay, nulltype } value; + + const char* to_string() const; + }; + using sl_discovery_type_r17_e_ = enumerated; + + // member variables + bool ext = false; + bool sl_source_id_relay_ue_r17_present = false; + fixed_bitstring<24> sl_dest_id_disc_r17; + fixed_bitstring<24> sl_source_id_relay_ue_r17; + sl_cast_type_disc_r17_e_ sl_cast_type_disc_r17; + sl_tx_interested_freq_list_r16_l sl_tx_interested_freq_list_disc_r17; + sl_type_tx_sync_list_disc_r17_l_ sl_type_tx_sync_list_disc_r17; + sl_discovery_type_r17_e_ sl_discovery_type_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-UE-AssistanceInformationNR-r16 ::= SEQUENCE (SIZE (1..8)) OF SL-TrafficPatternInfo-r16 +using sl_ue_assist_info_nr_r16_l = dyn_array; + +// UEAssistanceInformation-v1700-IEs ::= SEQUENCE +struct ue_assist_info_v1700_ies_s { + struct non_sdt_data_ind_r17_s_ { + bool resume_cause_r17_present = false; + resume_cause_e resume_cause_r17; + }; + struct scg_deactivation_pref_r17_opts { + enum options { scg_deactivation_preferred, no_pref, nulltype } value; + + const char* to_string() const; + }; + using scg_deactivation_pref_r17_e_ = enumerated; + + // member variables + bool ul_gap_fr2_pref_r17_present = false; + bool musim_assist_r17_present = false; + bool overheat_assist_r17_present = false; + bool max_bw_pref_fr2_2_r17_present = false; + bool max_mimo_layer_pref_fr2_2_r17_present = false; + bool min_sched_offset_pref_ext_r17_present = false; + bool rlm_meas_relaxation_state_r17_present = false; + bool bfd_meas_relaxation_state_r17_present = false; + bool non_sdt_data_ind_r17_present = false; + bool scg_deactivation_pref_r17_present = false; + bool ul_data_r17_present = false; + bool rrm_meas_relaxation_fulfilment_r17_present = false; + bool non_crit_ext_present = false; + ul_gap_fr2_pref_r17_s ul_gap_fr2_pref_r17; + mu_si_m_assist_r17_s musim_assist_r17; + overheat_assist_r17_s overheat_assist_r17; + max_bw_pref_fr2_2_r17_s max_bw_pref_fr2_2_r17; + max_mimo_layer_pref_fr2_2_r17_s max_mimo_layer_pref_fr2_2_r17; + min_sched_offset_pref_ext_r17_s min_sched_offset_pref_ext_r17; + bool rlm_meas_relaxation_state_r17 = false; + bounded_bitstring<1, 32> bfd_meas_relaxation_state_r17; + non_sdt_data_ind_r17_s_ non_sdt_data_ind_r17; + scg_deactivation_pref_r17_e_ scg_deactivation_pref_r17; + bool rrm_meas_relaxation_fulfilment_r17 = false; + propagation_delay_difference_r17_l propagation_delay_difference_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-PDCP-DelayValueResult-r16 ::= SEQUENCE +struct ul_pdcp_delay_value_result_r16_s { + bool ext = false; + uint8_t drb_id_r16 = 1; + uint16_t average_delay_r16 = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UL-PDCP-ExcessDelayResult-r17 ::= SEQUENCE +struct ul_pdcp_excess_delay_result_r17_s { + bool ext = false; + uint8_t drb_id_r17 = 1; + uint8_t excess_delay_r17 = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// VisitedCellInfo-r16 ::= SEQUENCE +struct visited_cell_info_r16_s { + struct visited_cell_id_r16_c_ { + struct nr_cell_id_r16_c_ { + struct types_opts { + enum options { cgi_info, pci_arfcn_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + nr_cell_id_r16_c_() = default; + nr_cell_id_r16_c_(const nr_cell_id_r16_c_& other); + nr_cell_id_r16_c_& operator=(const nr_cell_id_r16_c_& other); + ~nr_cell_id_r16_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 + cgi_info_logging_r16_s& cgi_info() + { + assert_choice_type(types::cgi_info, type_, "nr-CellId-r16"); + return c.get(); + } + pci_arfcn_nr_r16_s& pci_arfcn_r16() + { + assert_choice_type(types::pci_arfcn_r16, type_, "nr-CellId-r16"); + return c.get(); + } + const cgi_info_logging_r16_s& cgi_info() const + { + assert_choice_type(types::cgi_info, type_, "nr-CellId-r16"); + return c.get(); + } + const pci_arfcn_nr_r16_s& pci_arfcn_r16() const + { + assert_choice_type(types::pci_arfcn_r16, type_, "nr-CellId-r16"); + return c.get(); + } + cgi_info_logging_r16_s& set_cgi_info(); + pci_arfcn_nr_r16_s& set_pci_arfcn_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct eutra_cell_id_r16_c_ { + struct types_opts { + enum options { cell_global_id_r16, pci_arfcn_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + eutra_cell_id_r16_c_() = default; + eutra_cell_id_r16_c_(const eutra_cell_id_r16_c_& other); + eutra_cell_id_r16_c_& operator=(const eutra_cell_id_r16_c_& other); + ~eutra_cell_id_r16_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 + cgi_info_eutra_s& cell_global_id_r16() + { + assert_choice_type(types::cell_global_id_r16, type_, "eutra-CellId-r16"); + return c.get(); + } + pci_arfcn_eutra_r16_s& pci_arfcn_r16() + { + assert_choice_type(types::pci_arfcn_r16, type_, "eutra-CellId-r16"); + return c.get(); + } + const cgi_info_eutra_s& cell_global_id_r16() const + { + assert_choice_type(types::cell_global_id_r16, type_, "eutra-CellId-r16"); + return c.get(); + } + const pci_arfcn_eutra_r16_s& pci_arfcn_r16() const + { + assert_choice_type(types::pci_arfcn_r16, type_, "eutra-CellId-r16"); + return c.get(); + } + cgi_info_eutra_s& set_cell_global_id_r16(); + pci_arfcn_eutra_r16_s& set_pci_arfcn_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types_opts { + enum options { nr_cell_id_r16, eutra_cell_id_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + visited_cell_id_r16_c_() = default; + visited_cell_id_r16_c_(const visited_cell_id_r16_c_& other); + visited_cell_id_r16_c_& operator=(const visited_cell_id_r16_c_& other); + ~visited_cell_id_r16_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_cell_id_r16_c_& nr_cell_id_r16() + { + assert_choice_type(types::nr_cell_id_r16, type_, "visitedCellId-r16"); + return c.get(); + } + eutra_cell_id_r16_c_& eutra_cell_id_r16() + { + assert_choice_type(types::eutra_cell_id_r16, type_, "visitedCellId-r16"); + return c.get(); + } + const nr_cell_id_r16_c_& nr_cell_id_r16() const + { + assert_choice_type(types::nr_cell_id_r16, type_, "visitedCellId-r16"); + return c.get(); + } + const eutra_cell_id_r16_c_& eutra_cell_id_r16() const + { + assert_choice_type(types::eutra_cell_id_r16, type_, "visitedCellId-r16"); + return c.get(); + } + nr_cell_id_r16_c_& set_nr_cell_id_r16(); + eutra_cell_id_r16_c_& set_eutra_cell_id_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext = false; + bool visited_cell_id_r16_present = false; + visited_cell_id_r16_c_ visited_cell_id_r16; + uint16_t time_spent_r16 = 0; + // ... + // group 0 + copy_ptr visited_pscell_info_list_report_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ChoCandidateCellList-r17 ::= SEQUENCE (SIZE (1..8)) OF ChoCandidateCell-r17 +using cho_candidate_cell_list_r17_l = dyn_array; + +// ConnEstFailReportList-r17 ::= SEQUENCE (SIZE (1..4)) OF ConnEstFailReport-r16 +using conn_est_fail_report_list_r17_l = dyn_array; + +// DRB-CountInfo ::= SEQUENCE +struct drb_count_info_s { + uint8_t drb_id = 1; + uint64_t count_ul = 0; + uint64_t count_dl = 0; + + // sequence methods + 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; + +// FailureInfoDAPS-r16 ::= SEQUENCE +struct fail_info_daps_r16_s { + struct fail_type_r16_opts { + enum options { daps_fail, spare3, spare2, spare1, nulltype } value; + + const char* to_string() const; + }; + using fail_type_r16_e_ = enumerated; + + // member variables + fail_type_r16_e_ fail_type_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LogMeasInfoList-r16 ::= SEQUENCE (SIZE (1..520)) OF LogMeasInfo-r16 +using log_meas_info_list_r16_l = dyn_array; + +// MBS-ServiceInfo-r17 ::= SEQUENCE +struct mbs_service_info_r17_s { + tmgi_r17_s tmgi_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasReportAppLayer-r17 ::= SEQUENCE +struct meas_report_app_layer_r17_s { + struct app_layer_session_status_r17_opts { + enum options { started, stopped, nulltype } value; + + const char* to_string() const; + }; + using app_layer_session_status_r17_e_ = enumerated; + + // member variables + bool app_layer_session_status_r17_present = false; + bool ran_visible_meass_r17_present = false; + uint8_t meas_cfg_app_layer_id_r17 = 0; + dyn_octstring meas_report_app_layer_container_r17; + app_layer_session_status_r17_e_ app_layer_session_status_r17; + ran_visible_meass_r17_s ran_visible_meass_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultCLI-r16 ::= SEQUENCE +struct meas_result_cli_r16_s { + meas_result_list_srs_rsrp_r16_l meas_result_list_srs_rsrp_r16; + meas_result_list_cli_rssi_r16_l meas_result_list_cli_rssi_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultCellListSFTD-NR ::= SEQUENCE (SIZE (1..3)) OF MeasResultCellSFTD-NR +using meas_result_cell_list_sftd_nr_l = dyn_array; + +// MeasResultForRSSI-r16 ::= SEQUENCE +struct meas_result_for_rssi_r16_s { + uint8_t rssi_result_r16 = 0; + uint8_t ch_occupancy_r16 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + +// MeasResultIdleEUTRA-r16 ::= SEQUENCE +struct meas_result_idle_eutra_r16_s { + using meas_results_per_carrier_list_idle_eutra_r16_l_ = dyn_array; + + // member variables + bool ext = false; + meas_results_per_carrier_list_idle_eutra_r16_l_ meas_results_per_carrier_list_idle_eutra_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultIdleNR-r16 ::= SEQUENCE +struct meas_result_idle_nr_r16_s { + struct meas_result_serving_cell_r16_s_ { + bool rsrp_result_r16_present = false; + bool rsrq_result_r16_present = false; + uint8_t rsrp_result_r16 = 0; + uint8_t rsrq_result_r16 = 0; + results_per_ssb_idx_list_r16_l results_ssb_idxes_r16; + }; + using meas_results_per_carrier_list_idle_nr_r16_l_ = dyn_array; + + // member variables + bool ext = false; + meas_result_serving_cell_r16_s_ meas_result_serving_cell_r16; + meas_results_per_carrier_list_idle_nr_r16_l_ meas_results_per_carrier_list_idle_nr_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultList2EUTRA ::= SEQUENCE (SIZE (1..8)) OF MeasResult2EUTRA-r16 +using meas_result_list2_eutra_l = dyn_array; + +// MeasResultList2NR ::= SEQUENCE (SIZE (1..8)) OF MeasResult2NR +using meas_result_list2_nr_l = dyn_array; + +// MeasResultList2UTRA ::= SEQUENCE (SIZE (1..8)) OF MeasResult2UTRA-FDD-r16 +using meas_result_list2_utra_l = dyn_array; + +// MeasResultRLFNR-r16 ::= SEQUENCE +struct meas_result_rlf_nr_r16_s { + struct meas_result_r16_s_ { + struct cell_results_r16_s_ { + bool results_ssb_cell_r16_present = false; + bool results_csi_rs_cell_r16_present = false; + meas_quant_results_s results_ssb_cell_r16; + meas_quant_results_s results_csi_rs_cell_r16; + }; + struct rs_idx_results_r16_s_ { + bool ssb_rlm_cfg_bitmap_r16_present = false; + bool csi_rs_rlm_cfg_bitmap_r16_present = false; + results_per_ssb_idx_list_l results_ssb_idxes_r16; + fixed_bitstring<64> ssb_rlm_cfg_bitmap_r16; + results_per_csi_rs_idx_list_l results_csi_rs_idxes_r16; + fixed_bitstring<96> csi_rs_rlm_cfg_bitmap_r16; + }; + + // member variables + bool rs_idx_results_r16_present = false; + cell_results_r16_s_ cell_results_r16; + rs_idx_results_r16_s_ rs_idx_results_r16; + }; + + // member variables + meas_result_r16_s_ meas_result_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultRxTxTimeDiff-r17 ::= SEQUENCE +struct meas_result_rx_tx_time_diff_r17_s { + bool ext = false; + bool rx_tx_time_diff_ue_r17_present = false; + rx_tx_time_diff_r17_s rx_tx_time_diff_ue_r17; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultServFreqListEUTRA-SCG ::= SEQUENCE (SIZE (1..32)) OF MeasResult2EUTRA +using meas_result_serv_freq_list_eutra_scg_l = dyn_array; + +// 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; + +// MeasResultsSL-r16 ::= SEQUENCE +struct meas_results_sl_r16_s { + struct meas_results_list_sl_r16_c_ { + struct types_opts { + enum options { meas_result_nr_sl_r16, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + types type() const { return types::meas_result_nr_sl_r16; } + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + // getters + meas_result_nr_sl_r16_s& meas_result_nr_sl_r16() { return c; } + const meas_result_nr_sl_r16_s& meas_result_nr_sl_r16() const { return c; } + + private: + meas_result_nr_sl_r16_s c; + }; + + // member variables + bool ext = false; + meas_results_list_sl_r16_c_ meas_results_list_sl_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NR-PRS-MeasurementInfoList-r16 ::= SEQUENCE (SIZE (1..4)) OF NR-PRS-MeasurementInfo-r16 +using nr_prs_meas_info_list_r16_l = dyn_array; + +// OverheatingAssistance ::= SEQUENCE +struct overheat_assist_s { + 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; + }; + + // 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_r16_s reduced_max_ccs; + reduced_max_bw_f_rx_r16_s reduced_max_bw_fr1; + reduced_max_bw_f_rx_r16_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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RA-Report-r16 ::= SEQUENCE +struct ra_report_r16_s { + struct cell_id_r16_c_ { + struct types_opts { + enum options { cell_global_id_r16, pci_arfcn_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + cell_id_r16_c_() = default; + cell_id_r16_c_(const cell_id_r16_c_& other); + cell_id_r16_c_& operator=(const cell_id_r16_c_& other); + ~cell_id_r16_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 + cgi_info_logging_r16_s& cell_global_id_r16() + { + assert_choice_type(types::cell_global_id_r16, type_, "cellId-r16"); + return c.get(); + } + pci_arfcn_nr_r16_s& pci_arfcn_r16() + { + assert_choice_type(types::pci_arfcn_r16, type_, "cellId-r16"); + return c.get(); + } + const cgi_info_logging_r16_s& cell_global_id_r16() const + { + assert_choice_type(types::cell_global_id_r16, type_, "cellId-r16"); + return c.get(); + } + const pci_arfcn_nr_r16_s& pci_arfcn_r16() const + { + assert_choice_type(types::pci_arfcn_r16, type_, "cellId-r16"); + return c.get(); + } + cgi_info_logging_r16_s& set_cell_global_id_r16(); + pci_arfcn_nr_r16_s& set_pci_arfcn_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct ra_purpose_r16_opts { + enum options { + access_related, + beam_fail_recovery, + recfg_with_sync, + ul_un_synchronized, + sched_request_fail, + no_pucch_res_available, + request_for_other_si, + msg3_request_for_other_si_r17, + spare8, + spare7, + spare6, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ra_purpose_r16_e_ = enumerated; + + // member variables + bool ext = false; + bool ra_info_common_r16_present = false; + cell_id_r16_c_ cell_id_r16; + ra_info_common_r16_s ra_info_common_r16; + ra_purpose_r16_e_ ra_purpose_r16; + // ... + // group 0 + copy_ptr sp_cell_id_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::nr_scg_resp, type_, "scg-Response"); + return c.get(); + } + dyn_octstring& eutra_scg_resp() + { + assert_choice_type(types::eutra_scg_resp, type_, "scg-Response"); + return c.get(); + } + const dyn_octstring& nr_scg_resp() const + { + assert_choice_type(types::nr_scg_resp, type_, "scg-Response"); + return c.get(); + } + const dyn_octstring& eutra_scg_resp() const + { + assert_choice_type(types::eutra_scg_resp, type_, "scg-Response"); + return c.get(); + } + dyn_octstring& set_nr_scg_resp(); + dyn_octstring& set_eutra_scg_resp(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool scg_resp_present = false; + bool non_crit_ext_present = false; + scg_resp_c_ scg_resp; + rrc_recfg_complete_v1610_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; +}; + +// RRCResumeComplete-v1640-IEs ::= SEQUENCE +struct rrc_resume_complete_v1640_ies_s { + bool non_crit_ext_present = false; + ul_tx_direct_current_two_carrier_list_r16_l ul_tx_direct_current_two_carrier_list_r16; + rrc_resume_complete_v1700_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; +}; + +// RRCSetupComplete-v1690-IEs ::= SEQUENCE +struct rrc_setup_complete_v1690_ies_s { + bool ul_rrc_segmentation_r16_present = false; + bool non_crit_ext_present = false; + rrc_setup_complete_v1700_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; +}; + +// SL-Failure-r16 ::= SEQUENCE +struct sl_fail_r16_s { + struct sl_fail_r16_opts { + enum options { rlf, cfg_fail, drx_reject_v1710, spare5, spare4, spare3, spare2, spare1, nulltype } value; + + const char* to_string() const; + }; + using sl_fail_r16_e_ = enumerated; + + // member variables + fixed_bitstring<24> sl_dest_id_r16; + sl_fail_r16_e_ sl_fail_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SL-InterestedFreqList-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (1..8) +using sl_interested_freq_list_r16_l = bounded_array; + +// SL-RxDRX-ReportList-v1700 ::= SEQUENCE (SIZE (1..32)) OF SL-RxDRX-Report-v1700 +using sl_rx_drx_report_list_v1700_l = dyn_array; + +// SL-RxInterestedGC-BC-DestList-r17 ::= SEQUENCE (SIZE (1..32)) OF SL-RxInterestedGC-BC-Dest-r17 +using sl_rx_interested_gc_bc_dest_list_r17_l = dyn_array; + +// SL-TxResourceReqList-v1700 ::= SEQUENCE (SIZE (1..32)) OF SL-TxResourceReq-v1700 +using sl_tx_res_req_list_v1700_l = dyn_array; + +// SL-TxResourceReqListCommRelay-r17 ::= SEQUENCE (SIZE (1..32)) OF SL-TxResourceReqCommRelayInfo-r17 +using sl_tx_res_req_list_comm_relay_r17_l = dyn_array; + +// SL-TxResourceReqListDisc-r17 ::= SEQUENCE (SIZE (1..32)) OF SL-TxResourceReqDisc-r17 +using sl_tx_res_req_list_disc_r17_l = dyn_array; + +// SuccessHO-Report-r17 ::= SEQUENCE +struct success_ho_report_r17_s { + struct source_cell_info_r17_s_ { + bool source_cell_meas_r17_present = false; + bool rlf_in_source_daps_r17_present = false; + cgi_info_logging_r16_s source_pcell_id_r17; + meas_result_success_ho_nr_r17_s source_cell_meas_r17; + }; + struct target_cell_info_r17_s_ { + bool target_cell_meas_r17_present = false; + cgi_info_logging_r16_s target_pcell_id_r17; + meas_result_success_ho_nr_r17_s target_cell_meas_r17; + }; + struct meas_result_neigh_cells_r17_s_ { + meas_result_list2_nr_r16_l meas_result_list_nr_r17; + meas_result_list2_eutra_r16_l meas_result_list_eutra_r17; + }; + + // member variables + bool ext = false; + bool meas_result_neigh_cells_r17_present = false; + bool location_info_r17_present = false; + bool time_since_cho_recfg_r17_present = false; + bool shr_cause_r17_present = false; + bool ra_info_common_r17_present = false; + bool up_interruption_time_at_ho_r17_present = false; + bool c_rnti_r17_present = false; + source_cell_info_r17_s_ source_cell_info_r17; + target_cell_info_r17_s_ target_cell_info_r17; + meas_result_neigh_cells_r17_s_ meas_result_neigh_cells_r17; + location_info_r16_s location_info_r17; + uint16_t time_since_cho_recfg_r17 = 0; + shr_cause_r17_s shr_cause_r17; + ra_info_common_r16_s ra_info_common_r17; + uint16_t up_interruption_time_at_ho_r17 = 0; + uint32_t c_rnti_r17 = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-CapabilityRAT-Container ::= SEQUENCE +struct ue_cap_rat_container_s { + rat_type_e rat_type; + dyn_octstring ue_cap_rat_container; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-TxTEG-Association-r17 ::= SEQUENCE +struct ue_tx_teg_assoc_r17_s { + using associated_srs_pos_res_id_list_r17_l_ = dyn_array; + + // member variables + bool serv_cell_id_r17_present = false; + uint8_t ue_tx_teg_id_r17 = 0; + nr_time_stamp_r17_s nr_time_stamp_r17; + associated_srs_pos_res_id_list_r17_l_ associated_srs_pos_res_id_list_r17; + uint8_t serv_cell_id_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEAssistanceInformation-v1610-IEs ::= SEQUENCE +struct ue_assist_info_v1610_ies_s { + bool idc_assist_r16_present = false; + bool drx_pref_r16_present = false; + bool max_bw_pref_r16_present = false; + bool max_cc_pref_r16_present = false; + bool max_mimo_layer_pref_r16_present = false; + bool min_sched_offset_pref_r16_present = false; + bool release_pref_r16_present = false; + bool ref_time_info_pref_r16_present = false; + bool non_crit_ext_present = false; + idc_assist_r16_s idc_assist_r16; + drx_pref_r16_s drx_pref_r16; + max_bw_pref_r16_s max_bw_pref_r16; + max_cc_pref_r16_s max_cc_pref_r16; + max_mimo_layer_pref_r16_s max_mimo_layer_pref_r16; + min_sched_offset_pref_r16_s min_sched_offset_pref_r16; + release_pref_r16_s release_pref_r16; + sl_ue_assist_info_nr_r16_l sl_ue_assist_info_nr_r16; + bool ref_time_info_pref_r16 = false; + ue_assist_info_v1700_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; +}; + +// UL-PDCP-DelayValueResultList-r16 ::= SEQUENCE (SIZE (1..29)) OF UL-PDCP-DelayValueResult-r16 +using ul_pdcp_delay_value_result_list_r16_l = dyn_array; + +// UL-PDCP-ExcessDelayResultList-r17 ::= SEQUENCE (SIZE (1..29)) OF UL-PDCP-ExcessDelayResult-r17 +using ul_pdcp_excess_delay_result_list_r17_l = dyn_array; + +// UplinkTxDirectCurrentList ::= SEQUENCE (SIZE (1..32)) OF UplinkTxDirectCurrentCell +using ul_tx_direct_current_list_l = dyn_array; + +// VisitedCellInfoList-r16 ::= SEQUENCE (SIZE (1..16)) OF VisitedCellInfo-r16 +using visited_cell_info_list_r16_l = dyn_array; + +// CarrierFreqListMBS-r17 ::= SEQUENCE (SIZE (1..16)) OF INTEGER (0..3279165) +using carrier_freq_list_mbs_r17_l = bounded_array; + +// DRB-CountInfoList ::= SEQUENCE (SIZE (0..29)) OF DRB-CountInfo +using drb_count_info_list_l = dyn_array; + +// 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; + + const char* to_string() const; + int16_t to_number() const; + }; + using type1_e_ = enumerated; + struct types_opts { + enum options { type1, /*...*/ nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // 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; + + const char* to_string() const; + }; + using fail_type_e_ = enumerated; + + // member variables + 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FailureInformation-v1610-IEs ::= SEQUENCE +struct fail_info_v1610_ies_s { + bool fail_info_daps_r16_present = false; + bool non_crit_ext_present = false; + fail_info_daps_r16_s fail_info_daps_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FailureReportMCG-r16 ::= SEQUENCE +struct fail_report_mcg_r16_s { + struct fail_type_r16_opts { + enum options { + t310_expiry, + random_access_problem, + rlc_max_num_retx, + t312_expiry_r16, + lbt_fail_r16, + beam_fail_recovery_fail_r16, + bh_rlf_r16, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using fail_type_r16_e_ = enumerated; + + // member variables + bool ext = false; + bool fail_type_r16_present = false; + fail_type_r16_e_ fail_type_r16; + meas_result_list2_nr_l meas_result_freq_list_r16; + meas_result_list2_eutra_l meas_result_freq_list_eutra_r16; + dyn_octstring meas_result_scg_r16; + dyn_octstring meas_result_scg_eutra_r16; + meas_result_list2_utra_l meas_result_freq_list_utra_fdd_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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, + other_r16, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using fail_type_e_ = enumerated; + struct fail_type_v1610_opts { + enum options { + scg_lbt_fail_r16, + beam_fail_recovery_fail_r16, + t312_expiry_r16, + bh_rlf_r16, + beam_fail_r17, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using fail_type_v1610_e_ = enumerated; + struct prev_pscell_id_r17_s_ { + uint16_t pci_r17 = 0; + uint32_t carrier_freq_r17 = 0; + }; + struct failed_pscell_id_r17_s_ { + uint16_t pci_r17 = 0; + uint32_t carrier_freq_r17 = 0; + }; + + // member variables + bool ext = false; + fail_type_e_ fail_type; + meas_result_freq_list_l meas_result_freq_list; + dyn_octstring meas_result_scg_fail; + // ... + // group 0 + bool fail_type_v1610_present = false; + copy_ptr location_info_r16; + fail_type_v1610_e_ fail_type_v1610; + // group 1 + bool time_scg_fail_r17_present = false; + copy_ptr prev_pscell_id_r17; + copy_ptr failed_pscell_id_r17; + uint16_t time_scg_fail_r17 = 0; + copy_ptr per_ra_info_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using fail_type_e_ = enumerated; + + // member variables + bool ext = 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; + // ... + // group 0 + copy_ptr location_info_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IAB-IP-AddressAndTraffic-r16 ::= SEQUENCE +struct iab_ip_address_and_traffic_r16_s { + using all_traffic_iab_ip_address_r16_l_ = dyn_array; + using f1_c_traffic_ip_address_r16_l_ = dyn_array; + using f1_u_traffic_ip_address_r16_l_ = dyn_array; + using non_f1_traffic_ip_address_r16_l_ = dyn_array; + + // member variables + all_traffic_iab_ip_address_r16_l_ all_traffic_iab_ip_address_r16; + f1_c_traffic_ip_address_r16_l_ f1_c_traffic_ip_address_r16; + f1_u_traffic_ip_address_r16_l_ f1_u_traffic_ip_address_r16; + non_f1_traffic_ip_address_r16_l_ non_f1_traffic_ip_address_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IAB-IP-AddressNumReq-r16 ::= SEQUENCE +struct iab_ip_address_num_req_r16_s { + bool ext = false; + bool all_traffic_num_req_r16_present = false; + bool f1_c_traffic_num_req_r16_present = false; + bool f1_u_traffic_num_req_r16_present = false; + bool non_f1_traffic_num_req_r16_present = false; + uint8_t all_traffic_num_req_r16 = 1; + uint8_t f1_c_traffic_num_req_r16 = 1; + uint8_t f1_u_traffic_num_req_r16 = 1; + uint8_t non_f1_traffic_num_req_r16 = 1; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IAB-IP-AddressPrefixReq-r16 ::= SEQUENCE +struct iab_ip_address_prefix_req_r16_s { + bool ext = false; + bool all_traffic_prefix_req_r16_present = false; + bool f1_c_traffic_prefix_req_r16_present = false; + bool f1_u_traffic_prefix_req_r16_present = false; + bool non_f1_traffic_prefix_req_r16_present = false; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// IAB-IP-PrefixAndTraffic-r16 ::= SEQUENCE +struct iab_ip_prefix_and_traffic_r16_s { + bool all_traffic_iab_ip_address_r16_present = false; + bool f1_c_traffic_ip_address_r16_present = false; + bool f1_u_traffic_ip_address_r16_present = false; + bool non_f1_traffic_ip_address_r16_present = false; + iab_ip_address_r16_c all_traffic_iab_ip_address_r16; + iab_ip_address_r16_c f1_c_traffic_ip_address_r16; + iab_ip_address_r16_c f1_u_traffic_ip_address_r16; + iab_ip_address_r16_c non_f1_traffic_ip_address_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// LocationMeasurementInfo ::= CHOICE +struct location_meas_info_c { + struct types_opts { + enum options { eutra_rstd, /*...*/ eutra_fine_timing_detection, nr_prs_meas_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + location_meas_info_c() = default; + location_meas_info_c(const location_meas_info_c& other); + location_meas_info_c& operator=(const location_meas_info_c& other); + ~location_meas_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 + eutra_rstd_info_list_l& eutra_rstd() + { + assert_choice_type(types::eutra_rstd, type_, "LocationMeasurementInfo"); + return c.get(); + } + nr_prs_meas_info_list_r16_l& nr_prs_meas_r16() + { + assert_choice_type(types::nr_prs_meas_r16, type_, "LocationMeasurementInfo"); + return c.get(); + } + const eutra_rstd_info_list_l& eutra_rstd() const + { + assert_choice_type(types::eutra_rstd, type_, "LocationMeasurementInfo"); + return c.get(); + } + const nr_prs_meas_info_list_r16_l& nr_prs_meas_r16() const + { + assert_choice_type(types::nr_prs_meas_r16, type_, "LocationMeasurementInfo"); + return c.get(); + } + eutra_rstd_info_list_l& set_eutra_rstd(); + void set_eutra_fine_timing_detection(); + nr_prs_meas_info_list_r16_l& set_nr_prs_meas_r16(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// LogMeasReport-r16 ::= SEQUENCE +struct log_meas_report_r16_s { + bool ext = false; + bool log_meas_available_r16_present = false; + bool log_meas_available_bt_r16_present = false; + bool log_meas_available_wlan_r16_present = false; + fixed_bitstring<48> absolute_time_stamp_r16; + trace_ref_r16_s trace_ref_r16; + fixed_octstring<2> trace_recording_session_ref_r16; + fixed_octstring<1> tce_id_r16; + log_meas_info_list_r16_l log_meas_info_list_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBS-ServiceList-r17 ::= SEQUENCE (SIZE (1..16)) OF MBS-ServiceInfo-r17 +using mbs_service_list_r17_l = dyn_array; + +// 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, + meas_result_list_utra_fdd_r16, + sl_meas_results_cand_relay_r17, + nulltype + } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::meas_result_list_nr, type_, "measResultNeighCells"); + return c.get(); + } + meas_result_list_eutra_l& meas_result_list_eutra() + { + assert_choice_type(types::meas_result_list_eutra, type_, "measResultNeighCells"); + return c.get(); + } + meas_result_list_utra_fdd_r16_l& meas_result_list_utra_fdd_r16() + { + assert_choice_type(types::meas_result_list_utra_fdd_r16, type_, "measResultNeighCells"); + return c.get(); + } + dyn_octstring& sl_meas_results_cand_relay_r17() + { + assert_choice_type(types::sl_meas_results_cand_relay_r17, type_, "measResultNeighCells"); + return c.get(); + } + const meas_result_list_nr_l& meas_result_list_nr() const + { + assert_choice_type(types::meas_result_list_nr, type_, "measResultNeighCells"); + return c.get(); + } + const meas_result_list_eutra_l& meas_result_list_eutra() const + { + assert_choice_type(types::meas_result_list_eutra, type_, "measResultNeighCells"); + return c.get(); + } + const meas_result_list_utra_fdd_r16_l& meas_result_list_utra_fdd_r16() const + { + assert_choice_type(types::meas_result_list_utra_fdd_r16, type_, "measResultNeighCells"); + return c.get(); + } + const dyn_octstring& sl_meas_results_cand_relay_r17() const + { + assert_choice_type(types::sl_meas_results_cand_relay_r17, type_, "measResultNeighCells"); + return c.get(); + } + meas_result_list_nr_l& set_meas_result_list_nr(); + meas_result_list_eutra_l& set_meas_result_list_eutra(); + meas_result_list_utra_fdd_r16_l& set_meas_result_list_utra_fdd_r16(); + dyn_octstring& set_sl_meas_results_cand_relay_r17(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // 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; + // ... + // 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; + // group 2 + copy_ptr meas_result_for_rssi_r16; + copy_ptr location_info_r16; + copy_ptr ul_pdcp_delay_value_result_list_r16; + copy_ptr meas_results_sl_r16; + copy_ptr meas_result_cli_r16; + // group 3 + copy_ptr meas_result_rx_tx_time_diff_r17; + dyn_octstring sl_meas_result_serving_relay_r17; + copy_ptr ul_pdcp_excess_delay_result_list_r17; + dyn_octstring coarse_location_info_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasurementReportAppLayerList-r17 ::= SEQUENCE (SIZE (1..16)) OF MeasReportAppLayer-r17 +using meas_report_app_layer_list_r17_l = dyn_array; + +// MobilityHistoryReport-r16 ::= VisitedCellInfoList-r16 +using mob_history_report_r16_l = visited_cell_info_list_r16_l; + +// PosSIB-ReqInfo-r16 ::= SEQUENCE +struct pos_sib_req_info_r16_s { + struct pos_sib_type_r16_opts { + enum options { + pos_sib_type1_neg1, + pos_sib_type1_neg2, + pos_sib_type1_neg3, + pos_sib_type1_neg4, + pos_sib_type1_neg5, + pos_sib_type1_neg6, + pos_sib_type1_neg7, + pos_sib_type1_neg8, + pos_sib_type2_neg1, + pos_sib_type2_neg2, + pos_sib_type2_neg3, + pos_sib_type2_neg4, + pos_sib_type2_neg5, + pos_sib_type2_neg6, + pos_sib_type2_neg7, + pos_sib_type2_neg8, + pos_sib_type2_neg9, + pos_sib_type2_neg10, + pos_sib_type2_neg11, + pos_sib_type2_neg12, + pos_sib_type2_neg13, + pos_sib_type2_neg14, + pos_sib_type2_neg15, + pos_sib_type2_neg16, + pos_sib_type2_neg17, + pos_sib_type2_neg18, + pos_sib_type2_neg19, + pos_sib_type2_neg20, + pos_sib_type2_neg21, + pos_sib_type2_neg22, + pos_sib_type2_neg23, + pos_sib_type3_neg1, + pos_sib_type4_neg1, + pos_sib_type5_neg1, + pos_sib_type6_neg1, + pos_sib_type6_neg2, + pos_sib_type6_neg3, + // ... + pos_sib_type1_neg9_v1710, + pos_sib_type1_neg10_v1710, + pos_sib_type2_neg24_v1710, + pos_sib_type2_neg25_v1710, + pos_sib_type6_neg4_v1710, + pos_sib_type6_neg5_v1710, + pos_sib_type6_neg6_v1710, + nulltype + } value; + + const char* to_string() const; + }; + using pos_sib_type_r16_e_ = enumerated; + + // member variables + bool gnss_id_r16_present = false; + bool sbas_id_r16_present = false; + gnss_id_r16_s gnss_id_r16; + sbas_id_r16_s sbas_id_r16; + pos_sib_type_r16_e_ pos_sib_type_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RA-ReportList-r16 ::= SEQUENCE (SIZE (1..8)) OF RA-Report-r16 +using ra_report_list_r16_l = dyn_array; + +// RLF-Report-r16 ::= CHOICE +struct rlf_report_r16_c { + struct nr_rlf_report_r16_s_ { + struct meas_result_neigh_cells_r16_s_ { + meas_result_list2_nr_r16_l meas_result_list_nr_r16; + meas_result_list2_eutra_r16_l meas_result_list_eutra_r16; + }; + struct prev_pcell_id_r16_c_ { + struct types_opts { + enum options { nr_prev_cell_r16, eutra_prev_cell_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + prev_pcell_id_r16_c_() = default; + prev_pcell_id_r16_c_(const prev_pcell_id_r16_c_& other); + prev_pcell_id_r16_c_& operator=(const prev_pcell_id_r16_c_& other); + ~prev_pcell_id_r16_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 + cgi_info_logging_r16_s& nr_prev_cell_r16() + { + assert_choice_type(types::nr_prev_cell_r16, type_, "previousPCellId-r16"); + return c.get(); + } + cgi_info_eutra_logging_s& eutra_prev_cell_r16() + { + assert_choice_type(types::eutra_prev_cell_r16, type_, "previousPCellId-r16"); + return c.get(); + } + const cgi_info_logging_r16_s& nr_prev_cell_r16() const + { + assert_choice_type(types::nr_prev_cell_r16, type_, "previousPCellId-r16"); + return c.get(); + } + const cgi_info_eutra_logging_s& eutra_prev_cell_r16() const + { + assert_choice_type(types::eutra_prev_cell_r16, type_, "previousPCellId-r16"); + return c.get(); + } + cgi_info_logging_r16_s& set_nr_prev_cell_r16(); + cgi_info_eutra_logging_s& set_eutra_prev_cell_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct failed_pcell_id_r16_c_ { + struct nr_failed_pcell_id_r16_c_ { + struct types_opts { + enum options { cell_global_id_r16, pci_arfcn_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + nr_failed_pcell_id_r16_c_() = default; + nr_failed_pcell_id_r16_c_(const nr_failed_pcell_id_r16_c_& other); + nr_failed_pcell_id_r16_c_& operator=(const nr_failed_pcell_id_r16_c_& other); + ~nr_failed_pcell_id_r16_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 + cgi_info_logging_r16_s& cell_global_id_r16() + { + assert_choice_type(types::cell_global_id_r16, type_, "nrFailedPCellId-r16"); + return c.get(); + } + pci_arfcn_nr_r16_s& pci_arfcn_r16() + { + assert_choice_type(types::pci_arfcn_r16, type_, "nrFailedPCellId-r16"); + return c.get(); + } + const cgi_info_logging_r16_s& cell_global_id_r16() const + { + assert_choice_type(types::cell_global_id_r16, type_, "nrFailedPCellId-r16"); + return c.get(); + } + const pci_arfcn_nr_r16_s& pci_arfcn_r16() const + { + assert_choice_type(types::pci_arfcn_r16, type_, "nrFailedPCellId-r16"); + return c.get(); + } + cgi_info_logging_r16_s& set_cell_global_id_r16(); + pci_arfcn_nr_r16_s& set_pci_arfcn_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct eutra_failed_pcell_id_r16_c_ { + struct types_opts { + enum options { cell_global_id_r16, pci_arfcn_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + eutra_failed_pcell_id_r16_c_() = default; + eutra_failed_pcell_id_r16_c_(const eutra_failed_pcell_id_r16_c_& other); + eutra_failed_pcell_id_r16_c_& operator=(const eutra_failed_pcell_id_r16_c_& other); + ~eutra_failed_pcell_id_r16_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 + cgi_info_eutra_logging_s& cell_global_id_r16() + { + assert_choice_type(types::cell_global_id_r16, type_, "eutraFailedPCellId-r16"); + return c.get(); + } + pci_arfcn_eutra_r16_s& pci_arfcn_r16() + { + assert_choice_type(types::pci_arfcn_r16, type_, "eutraFailedPCellId-r16"); + return c.get(); + } + const cgi_info_eutra_logging_s& cell_global_id_r16() const + { + assert_choice_type(types::cell_global_id_r16, type_, "eutraFailedPCellId-r16"); + return c.get(); + } + const pci_arfcn_eutra_r16_s& pci_arfcn_r16() const + { + assert_choice_type(types::pci_arfcn_r16, type_, "eutraFailedPCellId-r16"); + return c.get(); + } + cgi_info_eutra_logging_s& set_cell_global_id_r16(); + pci_arfcn_eutra_r16_s& set_pci_arfcn_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct types_opts { + enum options { nr_failed_pcell_id_r16, eutra_failed_pcell_id_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + failed_pcell_id_r16_c_() = default; + failed_pcell_id_r16_c_(const failed_pcell_id_r16_c_& other); + failed_pcell_id_r16_c_& operator=(const failed_pcell_id_r16_c_& other); + ~failed_pcell_id_r16_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_failed_pcell_id_r16_c_& nr_failed_pcell_id_r16() + { + assert_choice_type(types::nr_failed_pcell_id_r16, type_, "failedPCellId-r16"); + return c.get(); + } + eutra_failed_pcell_id_r16_c_& eutra_failed_pcell_id_r16() + { + assert_choice_type(types::eutra_failed_pcell_id_r16, type_, "failedPCellId-r16"); + return c.get(); + } + const nr_failed_pcell_id_r16_c_& nr_failed_pcell_id_r16() const + { + assert_choice_type(types::nr_failed_pcell_id_r16, type_, "failedPCellId-r16"); + return c.get(); + } + const eutra_failed_pcell_id_r16_c_& eutra_failed_pcell_id_r16() const + { + assert_choice_type(types::eutra_failed_pcell_id_r16, type_, "failedPCellId-r16"); + return c.get(); + } + nr_failed_pcell_id_r16_c_& set_nr_failed_pcell_id_r16(); + eutra_failed_pcell_id_r16_c_& set_eutra_failed_pcell_id_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct reconnect_cell_id_r16_c_ { + struct types_opts { + enum options { nr_reconnect_cell_id_r16, eutra_reconnect_cell_id_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + reconnect_cell_id_r16_c_() = default; + reconnect_cell_id_r16_c_(const reconnect_cell_id_r16_c_& other); + reconnect_cell_id_r16_c_& operator=(const reconnect_cell_id_r16_c_& other); + ~reconnect_cell_id_r16_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 + cgi_info_logging_r16_s& nr_reconnect_cell_id_r16() + { + assert_choice_type(types::nr_reconnect_cell_id_r16, type_, "reconnectCellId-r16"); + return c.get(); + } + cgi_info_eutra_logging_s& eutra_reconnect_cell_id_r16() + { + assert_choice_type(types::eutra_reconnect_cell_id_r16, type_, "reconnectCellId-r16"); + return c.get(); + } + const cgi_info_logging_r16_s& nr_reconnect_cell_id_r16() const + { + assert_choice_type(types::nr_reconnect_cell_id_r16, type_, "reconnectCellId-r16"); + return c.get(); + } + const cgi_info_eutra_logging_s& eutra_reconnect_cell_id_r16() const + { + assert_choice_type(types::eutra_reconnect_cell_id_r16, type_, "reconnectCellId-r16"); + return c.get(); + } + cgi_info_logging_r16_s& set_nr_reconnect_cell_id_r16(); + cgi_info_eutra_logging_s& set_eutra_reconnect_cell_id_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct conn_fail_type_r16_opts { + enum options { rlf, hof, nulltype } value; + + const char* to_string() const; + }; + using conn_fail_type_r16_e_ = enumerated; + struct rlf_cause_r16_opts { + enum options { + t310_expiry, + random_access_problem, + rlc_max_num_retx, + beam_fail_recovery_fail, + lbt_fail_r16, + bh_rlf_recovery_fail, + t312_expiry_r17, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using rlf_cause_r16_e_ = enumerated; + struct last_ho_type_r17_opts { + enum options { cho, daps, spare2, spare1, nulltype } value; + + const char* to_string() const; + }; + using last_ho_type_r17_e_ = enumerated; + struct cho_cell_id_r17_c_ { + struct types_opts { + enum options { cell_global_id_r17, pci_arfcn_r17, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + cho_cell_id_r17_c_() = default; + cho_cell_id_r17_c_(const cho_cell_id_r17_c_& other); + cho_cell_id_r17_c_& operator=(const cho_cell_id_r17_c_& other); + ~cho_cell_id_r17_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 + cgi_info_logging_r16_s& cell_global_id_r17() + { + assert_choice_type(types::cell_global_id_r17, type_, "choCellId-r17"); + return c.get(); + } + pci_arfcn_nr_r16_s& pci_arfcn_r17() + { + assert_choice_type(types::pci_arfcn_r17, type_, "choCellId-r17"); + return c.get(); + } + const cgi_info_logging_r16_s& cell_global_id_r17() const + { + assert_choice_type(types::cell_global_id_r17, type_, "choCellId-r17"); + return c.get(); + } + const pci_arfcn_nr_r16_s& pci_arfcn_r17() const + { + assert_choice_type(types::pci_arfcn_r17, type_, "choCellId-r17"); + return c.get(); + } + cgi_info_logging_r16_s& set_cell_global_id_r17(); + pci_arfcn_nr_r16_s& set_pci_arfcn_r17(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool ext = false; + bool meas_result_neigh_cells_r16_present = false; + bool prev_pcell_id_r16_present = false; + bool reconnect_cell_id_r16_present = false; + bool time_until_reconn_r16_present = false; + bool reest_cell_id_r16_present = false; + bool time_conn_fail_r16_present = false; + bool location_info_r16_present = false; + bool no_suitable_cell_found_r16_present = false; + bool ra_info_common_r16_present = false; + meas_result_rlf_nr_r16_s meas_result_last_serv_cell_r16; + meas_result_neigh_cells_r16_s_ meas_result_neigh_cells_r16; + uint32_t c_rnti_r16 = 0; + prev_pcell_id_r16_c_ prev_pcell_id_r16; + failed_pcell_id_r16_c_ failed_pcell_id_r16; + reconnect_cell_id_r16_c_ reconnect_cell_id_r16; + uint32_t time_until_reconn_r16 = 0; + cgi_info_logging_r16_s reest_cell_id_r16; + uint16_t time_conn_fail_r16 = 0; + uint32_t time_since_fail_r16 = 0; + conn_fail_type_r16_e_ conn_fail_type_r16; + rlf_cause_r16_e_ rlf_cause_r16; + location_info_r16_s location_info_r16; + ra_info_common_r16_s ra_info_common_r16; + // ... + // group 0 + bool csi_rs_rlm_cfg_bitmap_v1650_present = false; + fixed_bitstring<96> csi_rs_rlm_cfg_bitmap_v1650; + // group 1 + bool last_ho_type_r17_present = false; + bool time_conn_source_daps_fail_r17_present = false; + bool time_since_cho_recfg_r17_present = false; + last_ho_type_r17_e_ last_ho_type_r17; + uint16_t time_conn_source_daps_fail_r17 = 0; + uint16_t time_since_cho_recfg_r17 = 0; + copy_ptr cho_cell_id_r17; + copy_ptr cho_candidate_cell_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + }; + struct eutra_rlf_report_r16_s_ { + bool ext = false; + cgi_info_eutra_logging_s failed_pcell_id_eutra; + dyn_octstring meas_result_rlf_report_eutra_r16; + // ... + // group 0 + dyn_octstring meas_result_rlf_report_eutra_v1690; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; + }; + struct types_opts { + enum options { nr_rlf_report_r16, eutra_rlf_report_r16, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + rlf_report_r16_c() = default; + rlf_report_r16_c(const rlf_report_r16_c& other); + rlf_report_r16_c& operator=(const rlf_report_r16_c& other); + ~rlf_report_r16_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_rlf_report_r16_s_& nr_rlf_report_r16() + { + assert_choice_type(types::nr_rlf_report_r16, type_, "RLF-Report-r16"); + return c.get(); + } + eutra_rlf_report_r16_s_& eutra_rlf_report_r16() + { + assert_choice_type(types::eutra_rlf_report_r16, type_, "RLF-Report-r16"); + return c.get(); + } + const nr_rlf_report_r16_s_& nr_rlf_report_r16() const + { + assert_choice_type(types::nr_rlf_report_r16, type_, "RLF-Report-r16"); + return c.get(); + } + const eutra_rlf_report_r16_s_& eutra_rlf_report_r16() const + { + assert_choice_type(types::eutra_rlf_report_r16, type_, "RLF-Report-r16"); + return c.get(); + } + nr_rlf_report_r16_s_& set_nr_rlf_report_r16(); + eutra_rlf_report_r16_s_& set_eutra_rlf_report_r16(); + +private: + types type_; + choice_buffer_t c; + + void destroy_(); +}; + +// RRCReconfigurationComplete-v1530-IEs ::= SEQUENCE +struct rrc_recfg_complete_v1530_ies_s { + 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCReestablishmentComplete-v1610-IEs ::= SEQUENCE +struct rrc_reest_complete_v1610_ies_s { + bool ue_meass_available_r16_present = false; + bool non_crit_ext_present = false; + ue_meass_available_r16_s ue_meass_available_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// RRCResumeComplete-v1610-IEs ::= SEQUENCE +struct rrc_resume_complete_v1610_ies_s { + struct scg_resp_r16_c_ { + struct types_opts { + enum options { nr_scg_resp, eutra_scg_resp, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + scg_resp_r16_c_() = default; + scg_resp_r16_c_(const scg_resp_r16_c_& other); + scg_resp_r16_c_& operator=(const scg_resp_r16_c_& other); + ~scg_resp_r16_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(types::nr_scg_resp, type_, "scg-Response-r16"); + return c.get(); + } + dyn_octstring& eutra_scg_resp() + { + assert_choice_type(types::eutra_scg_resp, type_, "scg-Response-r16"); + return c.get(); + } + const dyn_octstring& nr_scg_resp() const + { + assert_choice_type(types::nr_scg_resp, type_, "scg-Response-r16"); + return c.get(); + } + const dyn_octstring& eutra_scg_resp() const + { + assert_choice_type(types::eutra_scg_resp, type_, "scg-Response-r16"); + return c.get(); + } + dyn_octstring& set_nr_scg_resp(); + dyn_octstring& set_eutra_scg_resp(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + struct mob_state_r16_opts { + enum options { normal, medium, high, spare, nulltype } value; + + const char* to_string() const; + }; + using mob_state_r16_e_ = enumerated; + + // member variables + bool idle_meas_available_r16_present = false; + bool meas_result_idle_eutra_r16_present = false; + bool meas_result_idle_nr_r16_present = false; + bool scg_resp_r16_present = false; + bool ue_meass_available_r16_present = false; + bool mob_history_avail_r16_present = false; + bool mob_state_r16_present = false; + bool need_for_gaps_info_nr_r16_present = false; + bool non_crit_ext_present = false; + meas_result_idle_eutra_r16_s meas_result_idle_eutra_r16; + meas_result_idle_nr_r16_s meas_result_idle_nr_r16; + scg_resp_r16_c_ scg_resp_r16; + ue_meass_available_r16_s ue_meass_available_r16; + mob_state_r16_e_ mob_state_r16; + need_for_gaps_info_nr_r16_s need_for_gaps_info_nr_r16; + rrc_resume_complete_v1640_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; +}; + +// RRCSetupComplete-v1610-IEs ::= SEQUENCE +struct rrc_setup_complete_v1610_ies_s { + struct mob_state_r16_opts { + enum options { normal, medium, high, spare, nulltype } value; + + const char* to_string() const; + }; + using mob_state_r16_e_ = enumerated; + + // member variables + bool iab_node_ind_r16_present = false; + bool idle_meas_available_r16_present = false; + bool ue_meass_available_r16_present = false; + bool mob_history_avail_r16_present = false; + bool mob_state_r16_present = false; + bool non_crit_ext_present = false; + ue_meass_available_r16_s ue_meass_available_r16; + mob_state_r16_e_ mob_state_r16; + rrc_setup_complete_v1690_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; +}; + +// 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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::sst, type_, "S-NSSAI"); + return c.get>(); + } + fixed_bitstring<32>& sst_sd() + { + assert_choice_type(types::sst_sd, type_, "S-NSSAI"); + return c.get>(); + } + const fixed_bitstring<8>& sst() const + { + assert_choice_type(types::sst, type_, "S-NSSAI"); + return c.get>(); + } + const fixed_bitstring<32>& sst_sd() const + { + assert_choice_type(types::sst_sd, type_, "S-NSSAI"); + return c.get>(); + } + fixed_bitstring<8>& set_sst(); + fixed_bitstring<32>& set_sst_sd(); + +private: + types type_; + choice_buffer_t> c; + + void destroy_(); +}; + +// SCGFailureInformation-v1590-IEs ::= SEQUENCE +struct scg_fail_info_v1590_ies_s { + 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; +}; + +// SCGFailureInformationEUTRA-v1590-IEs ::= SEQUENCE +struct scg_fail_info_eutra_v1590_ies_s { + 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; +}; + +// SIB-ReqInfo-r16 ::= ENUMERATED +struct sib_req_info_r16_opts { + enum options { sib12, sib13, sib14, sib20_v1700, sib21_v1700, spare3, spare2, spare1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; +}; +using sib_req_info_r16_e = enumerated; + +// SL-FailureList-r16 ::= SEQUENCE (SIZE (1..32)) OF SL-Failure-r16 +using sl_fail_list_r16_l = dyn_array; + +// SL-TxResourceReqList-r16 ::= SEQUENCE (SIZE (1..32)) OF SL-TxResourceReq-r16 +using sl_tx_res_req_list_r16_l = dyn_array; + +// SidelinkUEInformationNR-v1700-IEs ::= SEQUENCE +struct sidelink_ue_info_nr_v1700_ies_s { + struct ue_type_r17_opts { + enum options { relay_ue, remote_ue, nulltype } value; + + const char* to_string() const; + }; + using ue_type_r17_e_ = enumerated; + + // member variables + bool ue_type_r17_present = false; + bool sl_source_id_remote_ue_r17_present = false; + bool non_crit_ext_present = false; + sl_tx_res_req_list_v1700_l sl_tx_res_req_list_v1700; + sl_rx_drx_report_list_v1700_l sl_rx_drx_report_list_v1700; + sl_rx_interested_gc_bc_dest_list_r17_l sl_rx_interested_gc_bc_dest_list_r17; + sl_interested_freq_list_r16_l sl_rx_interested_freq_list_disc_r17; + sl_tx_res_req_list_disc_r17_l sl_tx_res_req_list_disc_r17; + sl_tx_res_req_list_comm_relay_r17_l sl_tx_res_req_list_comm_relay_r17; + ue_type_r17_e_ ue_type_r17; + fixed_bitstring<24> sl_source_id_remote_ue_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UE-CapabilityRAT-ContainerList ::= SEQUENCE (SIZE (0..8)) OF UE-CapabilityRAT-Container +using ue_cap_rat_container_list_l = dyn_array; + +// UE-TxTEG-AssociationList-r17 ::= SEQUENCE (SIZE (1..256)) OF UE-TxTEG-Association-r17 +using ue_tx_teg_assoc_list_r17_l = dyn_array; + +// UEAssistanceInformation-v1540-IEs ::= SEQUENCE +struct ue_assist_info_v1540_ies_s { + bool overheat_assist_present = false; + bool non_crit_ext_present = false; + overheat_assist_s overheat_assist; + ue_assist_info_v1610_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; +}; + +// UEInformationResponse-v1700-IEs ::= SEQUENCE +struct ue_info_resp_v1700_ies_s { + bool success_ho_report_r17_present = false; + bool non_crit_ext_present = false; + success_ho_report_r17_s success_ho_report_r17; + conn_est_fail_report_list_r17_l conn_est_fail_report_list_r17; + dyn_octstring coarse_location_info_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEPositioningAssistanceInfo-v1720-IEs ::= SEQUENCE +struct ue_positioning_assist_info_v1720_ies_s { + struct ue_tx_teg_timing_error_margin_value_r17_opts { + enum options { + tc0, + tc2, + tc4, + tc6, + tc8, + tc12, + tc16, + tc20, + tc24, + tc32, + tc40, + tc48, + tc56, + tc64, + tc72, + tc80, + nulltype + } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ue_tx_teg_timing_error_margin_value_r17_e_ = enumerated; + + // member variables + bool ue_tx_teg_timing_error_margin_value_r17_present = false; + bool non_crit_ext_present = false; + ue_tx_teg_timing_error_margin_value_r17_e_ ue_tx_teg_timing_error_margin_value_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ULInformationTransfer-v1700-IEs ::= SEQUENCE +struct ul_info_transfer_v1700_ies_s { + bool non_crit_ext_present = false; + dyn_octstring ded_info_f1c_r17; + + // 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 non_crit_ext_present = false; + drb_count_info_list_l drb_count_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; +}; + +// DedicatedSIBRequest-r16-IEs ::= SEQUENCE +struct ded_sib_request_r16_ies_s { + struct on_demand_sib_request_list_r16_s_ { + using requested_sib_list_r16_l_ = bounded_array; + using requested_pos_sib_list_r16_l_ = dyn_array; + + // member variables + requested_sib_list_r16_l_ requested_sib_list_r16; + requested_pos_sib_list_r16_l_ requested_pos_sib_list_r16; + }; + + // member variables + bool on_demand_sib_request_list_r16_present = false; + bool non_crit_ext_present = false; + on_demand_sib_request_list_r16_s_ on_demand_sib_request_list_r16; + 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; +}; + +// FailureInformation-IEs ::= SEQUENCE +struct fail_info_ies_s { + bool fail_info_rlc_bearer_present = false; + bool non_crit_ext_present = false; + fail_info_rlc_bearer_s fail_info_rlc_bearer; + dyn_octstring late_non_crit_ext; + fail_info_v1610_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; +}; + +// IABOtherInformation-r16-IEs ::= SEQUENCE +struct iab_other_info_r16_ies_s { + struct ip_info_type_r16_c_ { + struct iab_ip_request_r16_s_ { + struct iab_ip_v6_address_req_r16_c_ { + struct types_opts { + enum options { iab_ip_v6_address_num_req_r16, iab_ip_v6_address_prefix_req_r16, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + iab_ip_v6_address_req_r16_c_() = default; + iab_ip_v6_address_req_r16_c_(const iab_ip_v6_address_req_r16_c_& other); + iab_ip_v6_address_req_r16_c_& operator=(const iab_ip_v6_address_req_r16_c_& other); + ~iab_ip_v6_address_req_r16_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 + iab_ip_address_num_req_r16_s& iab_ip_v6_address_num_req_r16() + { + assert_choice_type(types::iab_ip_v6_address_num_req_r16, type_, "iab-IPv6-AddressReq-r16"); + return c.get(); + } + iab_ip_address_prefix_req_r16_s& iab_ip_v6_address_prefix_req_r16() + { + assert_choice_type(types::iab_ip_v6_address_prefix_req_r16, type_, "iab-IPv6-AddressReq-r16"); + return c.get(); + } + const iab_ip_address_num_req_r16_s& iab_ip_v6_address_num_req_r16() const + { + assert_choice_type(types::iab_ip_v6_address_num_req_r16, type_, "iab-IPv6-AddressReq-r16"); + return c.get(); + } + const iab_ip_address_prefix_req_r16_s& iab_ip_v6_address_prefix_req_r16() const + { + assert_choice_type(types::iab_ip_v6_address_prefix_req_r16, type_, "iab-IPv6-AddressReq-r16"); + return c.get(); + } + iab_ip_address_num_req_r16_s& set_iab_ip_v6_address_num_req_r16(); + iab_ip_address_prefix_req_r16_s& set_iab_ip_v6_address_prefix_req_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool iab_ip_v4_address_num_req_r16_present = false; + bool iab_ip_v6_address_req_r16_present = false; + iab_ip_address_num_req_r16_s iab_ip_v4_address_num_req_r16; + iab_ip_v6_address_req_r16_c_ iab_ip_v6_address_req_r16; + }; + struct iab_ip_report_r16_s_ { + struct iab_ip_v6_report_r16_c_ { + struct types_opts { + enum options { iab_ip_v6_address_report_r16, iab_ip_v6_prefix_report_r16, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + iab_ip_v6_report_r16_c_() = default; + iab_ip_v6_report_r16_c_(const iab_ip_v6_report_r16_c_& other); + iab_ip_v6_report_r16_c_& operator=(const iab_ip_v6_report_r16_c_& other); + ~iab_ip_v6_report_r16_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 + iab_ip_address_and_traffic_r16_s& iab_ip_v6_address_report_r16() + { + assert_choice_type(types::iab_ip_v6_address_report_r16, type_, "iab-IPv6-Report-r16"); + return c.get(); + } + iab_ip_prefix_and_traffic_r16_s& iab_ip_v6_prefix_report_r16() + { + assert_choice_type(types::iab_ip_v6_prefix_report_r16, type_, "iab-IPv6-Report-r16"); + return c.get(); + } + const iab_ip_address_and_traffic_r16_s& iab_ip_v6_address_report_r16() const + { + assert_choice_type(types::iab_ip_v6_address_report_r16, type_, "iab-IPv6-Report-r16"); + return c.get(); + } + const iab_ip_prefix_and_traffic_r16_s& iab_ip_v6_prefix_report_r16() const + { + assert_choice_type(types::iab_ip_v6_prefix_report_r16, type_, "iab-IPv6-Report-r16"); + return c.get(); + } + iab_ip_address_and_traffic_r16_s& set_iab_ip_v6_address_report_r16(); + iab_ip_prefix_and_traffic_r16_s& set_iab_ip_v6_prefix_report_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool iab_ip_v4_address_report_r16_present = false; + bool iab_ip_v6_report_r16_present = false; + iab_ip_address_and_traffic_r16_s iab_ip_v4_address_report_r16; + iab_ip_v6_report_r16_c_ iab_ip_v6_report_r16; + }; + struct types_opts { + enum options { iab_ip_request_r16, iab_ip_report_r16, /*...*/ nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + ip_info_type_r16_c_() = default; + ip_info_type_r16_c_(const ip_info_type_r16_c_& other); + ip_info_type_r16_c_& operator=(const ip_info_type_r16_c_& other); + ~ip_info_type_r16_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 + iab_ip_request_r16_s_& iab_ip_request_r16() + { + assert_choice_type(types::iab_ip_request_r16, type_, "ip-InfoType-r16"); + return c.get(); + } + iab_ip_report_r16_s_& iab_ip_report_r16() + { + assert_choice_type(types::iab_ip_report_r16, type_, "ip-InfoType-r16"); + return c.get(); + } + const iab_ip_request_r16_s_& iab_ip_request_r16() const + { + assert_choice_type(types::iab_ip_request_r16, type_, "ip-InfoType-r16"); + return c.get(); + } + const iab_ip_report_r16_s_& iab_ip_report_r16() const + { + assert_choice_type(types::iab_ip_report_r16, type_, "ip-InfoType-r16"); + return c.get(); + } + iab_ip_request_r16_s_& set_iab_ip_request_r16(); + iab_ip_report_r16_s_& set_iab_ip_report_r16(); + + private: + types type_; + choice_buffer_t c; + + void destroy_(); + }; + + // member variables + bool non_crit_ext_present = false; + ip_info_type_r16_c_ ip_info_type_r16; + 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; +}; + +// LocationMeasurementIndication-IEs ::= SEQUENCE +struct location_meas_ind_ies_s { + 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MBSInterestIndication-r17-IEs ::= SEQUENCE +struct mb_si_nterest_ind_r17_ies_s { + bool mbs_prio_r17_present = false; + bool non_crit_ext_present = false; + carrier_freq_list_mbs_r17_l mbs_freq_list_r17; + mbs_service_list_r17_l mbs_service_list_r17; + 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; +}; + +// MCGFailureInformation-r16-IEs ::= SEQUENCE +struct mcg_fail_info_r16_ies_s { + bool fail_report_mcg_r16_present = false; + bool non_crit_ext_present = false; + fail_report_mcg_r16_s fail_report_mcg_r16; + 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; +}; + +// MeasurementReport-IEs ::= SEQUENCE +struct meas_report_ies_s { + 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasurementReportAppLayer-r17-IEs ::= SEQUENCE +struct meas_report_app_layer_r17_ies_s { + bool non_crit_ext_present = false; + meas_report_app_layer_list_r17_l meas_report_app_layer_list_r17; + 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; +}; + +// RRCReconfigurationComplete-IEs ::= SEQUENCE +struct rrc_recfg_complete_ies_s { + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + rrc_recfg_complete_v1530_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; +}; + +// RRCReestablishmentComplete-IEs ::= SEQUENCE +struct rrc_reest_complete_ies_s { + bool non_crit_ext_present = false; + dyn_octstring late_non_crit_ext; + rrc_reest_complete_v1610_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; +}; + +// RRCResumeComplete-IEs ::= SEQUENCE +struct rrc_resume_complete_ies_s { + bool sel_plmn_id_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; + rrc_resume_complete_v1610_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; +}; + +// RRCSetupComplete-IEs ::= SEQUENCE +struct rrc_setup_complete_ies_s { + struct guami_type_opts { + enum options { native, mapped, nulltype } value; + + const char* to_string() const; + }; + using guami_type_e_ = enumerated; + using s_nssai_list_l_ = dyn_array; + struct ng_5_g_s_tmsi_value_c_ { + struct types_opts { + enum options { ng_5_g_s_tmsi, ng_5_g_s_tmsi_part2, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + ng_5_g_s_tmsi_value_c_() = default; + ng_5_g_s_tmsi_value_c_(const ng_5_g_s_tmsi_value_c_& other); + ng_5_g_s_tmsi_value_c_& operator=(const ng_5_g_s_tmsi_value_c_& other); + ~ng_5_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 + fixed_bitstring<48>& ng_5_g_s_tmsi() + { + assert_choice_type(types::ng_5_g_s_tmsi, type_, "ng-5G-S-TMSI-Value"); + return c.get>(); + } + fixed_bitstring<9>& ng_5_g_s_tmsi_part2() + { + assert_choice_type(types::ng_5_g_s_tmsi_part2, type_, "ng-5G-S-TMSI-Value"); + return c.get>(); + } + const fixed_bitstring<48>& ng_5_g_s_tmsi() const + { + assert_choice_type(types::ng_5_g_s_tmsi, type_, "ng-5G-S-TMSI-Value"); + return c.get>(); + } + const fixed_bitstring<9>& ng_5_g_s_tmsi_part2() const + { + assert_choice_type(types::ng_5_g_s_tmsi_part2, type_, "ng-5G-S-TMSI-Value"); + return c.get>(); + } + fixed_bitstring<48>& set_ng_5_g_s_tmsi(); + fixed_bitstring<9>& set_ng_5_g_s_tmsi_part2(); + + private: + types type_; + choice_buffer_t> c; + + void destroy_(); + }; + + // member variables + bool registered_amf_present = false; + bool guami_type_present = false; + bool ng_5_g_s_tmsi_value_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_5_g_s_tmsi_value_c_ ng_5_g_s_tmsi_value; + dyn_octstring late_non_crit_ext; + rrc_setup_complete_v1610_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; +}; + +// 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// SecurityModeComplete-IEs ::= SEQUENCE +struct security_mode_complete_ies_s { + 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; +}; + +// SecurityModeFailure-IEs ::= SEQUENCE +struct security_mode_fail_ies_s { + 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; +}; + +// SidelinkUEInformationNR-r16-IEs ::= SEQUENCE +struct sidelink_ue_info_nr_r16_ies_s { + bool non_crit_ext_present = false; + sl_interested_freq_list_r16_l sl_rx_interested_freq_list_r16; + sl_tx_res_req_list_r16_l sl_tx_res_req_list_r16; + sl_fail_list_r16_l sl_fail_list_r16; + dyn_octstring late_non_crit_ext; + sidelink_ue_info_nr_v1700_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; +}; + +// UEAssistanceInformation-IEs ::= SEQUENCE +struct ue_assist_info_ies_s { + bool delay_budget_report_present = false; + bool non_crit_ext_present = false; + delay_budget_report_c delay_budget_report; + dyn_octstring late_non_crit_ext; + ue_assist_info_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; +}; + +// UECapabilityInformation-IEs ::= SEQUENCE +struct ue_cap_info_ies_s { + bool ue_cap_rat_container_list_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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// UEInformationResponse-r16-IEs ::= SEQUENCE +struct ue_info_resp_r16_ies_s { + bool meas_result_idle_eutra_r16_present = false; + bool meas_result_idle_nr_r16_present = false; + bool log_meas_report_r16_present = false; + bool conn_est_fail_report_r16_present = false; + bool rlf_report_r16_present = false; + bool non_crit_ext_present = false; + meas_result_idle_eutra_r16_s meas_result_idle_eutra_r16; + meas_result_idle_nr_r16_s meas_result_idle_nr_r16; + log_meas_report_r16_s log_meas_report_r16; + conn_est_fail_report_r16_s conn_est_fail_report_r16; + ra_report_list_r16_l ra_report_list_r16; + rlf_report_r16_c rlf_report_r16; + mob_history_report_r16_l mob_history_report_r16; + dyn_octstring late_non_crit_ext; + ue_info_resp_v1700_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; +}; + +// UEPositioningAssistanceInfo-r17-IEs ::= SEQUENCE +struct ue_positioning_assist_info_r17_ies_s { + bool non_crit_ext_present = false; + ue_tx_teg_assoc_list_r17_l ue_tx_teg_assoc_list_r17; + dyn_octstring late_non_crit_ext; + ue_positioning_assist_info_v1720_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; +}; + +// ULDedicatedMessageSegment-r16-IEs ::= SEQUENCE +struct ul_ded_msg_segment_r16_ies_s { + struct rrc_msg_segment_type_r16_opts { + enum options { not_last_segment, last_segment, nulltype } value; + + const char* to_string() const; + }; + using rrc_msg_segment_type_r16_e_ = enumerated; + + // member variables + bool non_crit_ext_present = false; + uint8_t segment_num_r16 = 0; + dyn_octstring rrc_msg_segment_container_r16; + rrc_msg_segment_type_r16_e_ rrc_msg_segment_type_r16; + 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; +}; + +// ULInformationTransfer-IEs ::= SEQUENCE +struct ul_info_transfer_ies_s { + bool non_crit_ext_present = false; + dyn_octstring ded_nas_msg; + dyn_octstring late_non_crit_ext; + ul_info_transfer_v1700_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; +}; + +// ULInformationTransferIRAT-r16-IEs ::= SEQUENCE +struct ul_info_transfer_irat_r16_ies_s { + bool non_crit_ext_present = false; + dyn_octstring ul_dcch_msg_eutra_r16; + 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; +}; + +// ULInformationTransferMRDC-IEs ::= SEQUENCE +struct ul_info_transfer_mrdc_ies_s { + 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CounterCheckResponse ::= SEQUENCE +struct counter_check_resp_s { + struct crit_exts_c_ { + struct types_opts { + enum options { counter_check_resp, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + counter_check_resp_ies_s& counter_check_resp() + { + assert_choice_type(types::counter_check_resp, type_, "criticalExtensions"); + return c; + } + const counter_check_resp_ies_s& counter_check_resp() const + { + assert_choice_type(types::counter_check_resp, type_, "criticalExtensions"); + return c; + } + counter_check_resp_ies_s& set_counter_check_resp(); + void set_crit_exts_future(); + + private: + types type_; + counter_check_resp_ies_s c; + }; + + // 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; +}; + +// DedicatedSIBRequest-r16 ::= SEQUENCE +struct ded_sib_request_r16_s { + struct crit_exts_c_ { + struct types_opts { + enum options { ded_sib_request_r16, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + ded_sib_request_r16_ies_s& ded_sib_request_r16() + { + assert_choice_type(types::ded_sib_request_r16, type_, "criticalExtensions"); + return c; + } + const ded_sib_request_r16_ies_s& ded_sib_request_r16() const + { + assert_choice_type(types::ded_sib_request_r16, type_, "criticalExtensions"); + return c; + } + ded_sib_request_r16_ies_s& set_ded_sib_request_r16(); + void set_crit_exts_future(); + + private: + types type_; + ded_sib_request_r16_ies_s c; + }; + + // 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; +}; + +// FailureInformation ::= SEQUENCE +struct fail_info_s { + struct crit_exts_c_ { + struct types_opts { + enum options { fail_info, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + fail_info_ies_s& fail_info() + { + assert_choice_type(types::fail_info, type_, "criticalExtensions"); + return c; + } + const fail_info_ies_s& fail_info() const + { + assert_choice_type(types::fail_info, type_, "criticalExtensions"); + return c; + } + fail_info_ies_s& set_fail_info(); + void set_crit_exts_future(); + + private: + types type_; + fail_info_ies_s c; + }; + + // 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; +}; + +// IABOtherInformation-r16 ::= SEQUENCE +struct iab_other_info_r16_s { + struct crit_exts_c_ { + struct types_opts { + enum options { iab_other_info_r16, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + iab_other_info_r16_ies_s& iab_other_info_r16() + { + assert_choice_type(types::iab_other_info_r16, type_, "criticalExtensions"); + return c; + } + const iab_other_info_r16_ies_s& iab_other_info_r16() const + { + assert_choice_type(types::iab_other_info_r16, type_, "criticalExtensions"); + return c; + } + iab_other_info_r16_ies_s& set_iab_other_info_r16(); + void set_crit_exts_future(); + + private: + types type_; + iab_other_info_r16_ies_s c; + }; + + // 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; +}; + +// LocationMeasurementIndication ::= SEQUENCE +struct location_meas_ind_s { + struct crit_exts_c_ { + struct types_opts { + enum options { location_meas_ind, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + location_meas_ind_ies_s& location_meas_ind() + { + assert_choice_type(types::location_meas_ind, type_, "criticalExtensions"); + return c; + } + const location_meas_ind_ies_s& location_meas_ind() const + { + assert_choice_type(types::location_meas_ind, type_, "criticalExtensions"); + return c; + } + location_meas_ind_ies_s& set_location_meas_ind(); + void set_crit_exts_future(); + + private: + types type_; + location_meas_ind_ies_s c; + }; + + // 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; +}; + +// MBSInterestIndication-r17 ::= SEQUENCE +struct mb_si_nterest_ind_r17_s { + struct crit_exts_c_ { + struct types_opts { + enum options { mbs_interest_ind_r17, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + mb_si_nterest_ind_r17_ies_s& mbs_interest_ind_r17() + { + assert_choice_type(types::mbs_interest_ind_r17, type_, "criticalExtensions"); + return c; + } + const mb_si_nterest_ind_r17_ies_s& mbs_interest_ind_r17() const + { + assert_choice_type(types::mbs_interest_ind_r17, type_, "criticalExtensions"); + return c; + } + mb_si_nterest_ind_r17_ies_s& set_mbs_interest_ind_r17(); + void set_crit_exts_future(); + + private: + types type_; + mb_si_nterest_ind_r17_ies_s c; + }; + + // 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; +}; + +// MCGFailureInformation-r16 ::= SEQUENCE +struct mcg_fail_info_r16_s { + struct crit_exts_c_ { + struct types_opts { + enum options { mcg_fail_info_r16, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + mcg_fail_info_r16_ies_s& mcg_fail_info_r16() + { + assert_choice_type(types::mcg_fail_info_r16, type_, "criticalExtensions"); + return c; + } + const mcg_fail_info_r16_ies_s& mcg_fail_info_r16() const + { + assert_choice_type(types::mcg_fail_info_r16, type_, "criticalExtensions"); + return c; + } + mcg_fail_info_r16_ies_s& set_mcg_fail_info_r16(); + void set_crit_exts_future(); + + private: + types type_; + mcg_fail_info_r16_ies_s c; + }; + + // 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; +}; + +// MeasurementReport ::= SEQUENCE +struct meas_report_s { + struct crit_exts_c_ { + struct types_opts { + enum options { meas_report, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + meas_report_ies_s& meas_report() + { + assert_choice_type(types::meas_report, type_, "criticalExtensions"); + return c; + } + const meas_report_ies_s& meas_report() const + { + assert_choice_type(types::meas_report, type_, "criticalExtensions"); + return c; + } + meas_report_ies_s& set_meas_report(); + void set_crit_exts_future(); + + private: + types type_; + meas_report_ies_s c; + }; + + // 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; +}; + +// RRCReconfigurationComplete ::= SEQUENCE +struct rrc_recfg_complete_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_recfg_complete, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + rrc_recfg_complete_ies_s& rrc_recfg_complete() + { + assert_choice_type(types::rrc_recfg_complete, type_, "criticalExtensions"); + return c; + } + const rrc_recfg_complete_ies_s& rrc_recfg_complete() const + { + assert_choice_type(types::rrc_recfg_complete, type_, "criticalExtensions"); + return c; + } + rrc_recfg_complete_ies_s& set_rrc_recfg_complete(); + void set_crit_exts_future(); + + private: + types type_; + rrc_recfg_complete_ies_s c; + }; + + // 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; +}; + +// RRCReestablishmentComplete ::= SEQUENCE +struct rrc_reest_complete_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_reest_complete, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + rrc_reest_complete_ies_s& rrc_reest_complete() + { + assert_choice_type(types::rrc_reest_complete, type_, "criticalExtensions"); + return c; + } + const rrc_reest_complete_ies_s& rrc_reest_complete() const + { + assert_choice_type(types::rrc_reest_complete, type_, "criticalExtensions"); + return c; + } + rrc_reest_complete_ies_s& set_rrc_reest_complete(); + void set_crit_exts_future(); + + private: + types type_; + rrc_reest_complete_ies_s c; + }; + + // 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; +}; + +// RRCResumeComplete ::= SEQUENCE +struct rrc_resume_complete_s { + struct crit_exts_c_ { + struct types_opts { + enum options { rrc_resume_complete, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + rrc_resume_complete_ies_s& rrc_resume_complete() + { + assert_choice_type(types::rrc_resume_complete, type_, "criticalExtensions"); + return c; + } + const rrc_resume_complete_ies_s& rrc_resume_complete() const + { + assert_choice_type(types::rrc_resume_complete, type_, "criticalExtensions"); + return c; + } + rrc_resume_complete_ies_s& set_rrc_resume_complete(); + void set_crit_exts_future(); + + private: + types type_; + rrc_resume_complete_ies_s c; + }; + + // 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 { rrc_setup_complete, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + rrc_setup_complete_ies_s& rrc_setup_complete() + { + assert_choice_type(types::rrc_setup_complete, type_, "criticalExtensions"); + return c; + } + const rrc_setup_complete_ies_s& rrc_setup_complete() const + { + assert_choice_type(types::rrc_setup_complete, type_, "criticalExtensions"); + return c; + } + rrc_setup_complete_ies_s& set_rrc_setup_complete(); + void set_crit_exts_future(); + + private: + types type_; + rrc_setup_complete_ies_s c; + }; + + // 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; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + scg_fail_info_ies_s& scg_fail_info() + { + assert_choice_type(types::scg_fail_info, type_, "criticalExtensions"); + return c; + } + const scg_fail_info_ies_s& scg_fail_info() const + { + assert_choice_type(types::scg_fail_info, type_, "criticalExtensions"); + return c; + } + scg_fail_info_ies_s& set_scg_fail_info(); + void set_crit_exts_future(); + + private: + types type_; + scg_fail_info_ies_s c; + }; + + // 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; +}; + +// SCGFailureInformationEUTRA ::= SEQUENCE +struct scg_fail_info_eutra_s { + struct crit_exts_c_ { + struct types_opts { + enum options { scg_fail_info_eutra, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + scg_fail_info_eutra_ies_s& scg_fail_info_eutra() + { + assert_choice_type(types::scg_fail_info_eutra, type_, "criticalExtensions"); + return c; + } + const scg_fail_info_eutra_ies_s& scg_fail_info_eutra() const + { + assert_choice_type(types::scg_fail_info_eutra, type_, "criticalExtensions"); + return c; + } + scg_fail_info_eutra_ies_s& set_scg_fail_info_eutra(); + void set_crit_exts_future(); + + private: + types type_; + scg_fail_info_eutra_ies_s c; + }; + + // 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; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + security_mode_complete_ies_s& security_mode_complete() + { + assert_choice_type(types::security_mode_complete, type_, "criticalExtensions"); + return c; + } + const security_mode_complete_ies_s& security_mode_complete() const + { + assert_choice_type(types::security_mode_complete, type_, "criticalExtensions"); + return c; + } + security_mode_complete_ies_s& set_security_mode_complete(); + void set_crit_exts_future(); + + private: + types type_; + security_mode_complete_ies_s c; + }; + + // 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; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + security_mode_fail_ies_s& security_mode_fail() + { + assert_choice_type(types::security_mode_fail, type_, "criticalExtensions"); + return c; + } + const security_mode_fail_ies_s& security_mode_fail() const + { + assert_choice_type(types::security_mode_fail, type_, "criticalExtensions"); + return c; + } + security_mode_fail_ies_s& set_security_mode_fail(); + void set_crit_exts_future(); + + private: + types type_; + security_mode_fail_ies_s c; + }; + + // 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; +}; + +// SidelinkUEInformationNR-r16 ::= SEQUENCE +struct sidelink_ue_info_nr_r16_s { + struct crit_exts_c_ { + struct types_opts { + enum options { sidelink_ue_info_nr_r16, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + sidelink_ue_info_nr_r16_ies_s& sidelink_ue_info_nr_r16() + { + assert_choice_type(types::sidelink_ue_info_nr_r16, type_, "criticalExtensions"); + return c; + } + const sidelink_ue_info_nr_r16_ies_s& sidelink_ue_info_nr_r16() const + { + assert_choice_type(types::sidelink_ue_info_nr_r16, type_, "criticalExtensions"); + return c; + } + sidelink_ue_info_nr_r16_ies_s& set_sidelink_ue_info_nr_r16(); + void set_crit_exts_future(); + + private: + types type_; + sidelink_ue_info_nr_r16_ies_s c; + }; + + // 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; +}; + +// UEAssistanceInformation ::= SEQUENCE +struct ue_assist_info_s { + struct crit_exts_c_ { + struct types_opts { + enum options { ue_assist_info, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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_assist_info_ies_s& ue_assist_info() + { + assert_choice_type(types::ue_assist_info, type_, "criticalExtensions"); + return c; + } + const ue_assist_info_ies_s& ue_assist_info() const + { + assert_choice_type(types::ue_assist_info, type_, "criticalExtensions"); + return c; + } + ue_assist_info_ies_s& set_ue_assist_info(); + void set_crit_exts_future(); + + private: + types type_; + ue_assist_info_ies_s c; + }; + + // 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; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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() + { + assert_choice_type(types::ue_cap_info, type_, "criticalExtensions"); + return c; + } + const ue_cap_info_ies_s& ue_cap_info() const + { + assert_choice_type(types::ue_cap_info, type_, "criticalExtensions"); + return c; + } + ue_cap_info_ies_s& set_ue_cap_info(); + void set_crit_exts_future(); + + private: + types type_; + ue_cap_info_ies_s c; + }; + + // 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; +}; + +// UEInformationResponse-r16 ::= SEQUENCE +struct ue_info_resp_r16_s { + struct crit_exts_c_ { + struct types_opts { + enum options { ue_info_resp_r16, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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_info_resp_r16_ies_s& ue_info_resp_r16() + { + assert_choice_type(types::ue_info_resp_r16, type_, "criticalExtensions"); + return c; + } + const ue_info_resp_r16_ies_s& ue_info_resp_r16() const + { + assert_choice_type(types::ue_info_resp_r16, type_, "criticalExtensions"); + return c; + } + ue_info_resp_r16_ies_s& set_ue_info_resp_r16(); + void set_crit_exts_future(); + + private: + types type_; + ue_info_resp_r16_ies_s c; + }; + + // 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; +}; + +// UEPositioningAssistanceInfo-r17 ::= SEQUENCE +struct ue_positioning_assist_info_r17_s { + struct crit_exts_c_ { + struct types_opts { + enum options { ue_positioning_assist_info_r17, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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_positioning_assist_info_r17_ies_s& ue_positioning_assist_info_r17() + { + assert_choice_type(types::ue_positioning_assist_info_r17, type_, "criticalExtensions"); + return c; + } + const ue_positioning_assist_info_r17_ies_s& ue_positioning_assist_info_r17() const + { + assert_choice_type(types::ue_positioning_assist_info_r17, type_, "criticalExtensions"); + return c; + } + ue_positioning_assist_info_r17_ies_s& set_ue_positioning_assist_info_r17(); + void set_crit_exts_future(); + + private: + types type_; + ue_positioning_assist_info_r17_ies_s c; + }; + + // 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; +}; + +// ULDedicatedMessageSegment-r16 ::= SEQUENCE +struct ul_ded_msg_segment_r16_s { + struct crit_exts_c_ { + struct types_opts { + enum options { ul_ded_msg_segment_r16, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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_ded_msg_segment_r16_ies_s& ul_ded_msg_segment_r16() + { + assert_choice_type(types::ul_ded_msg_segment_r16, type_, "criticalExtensions"); + return c; + } + const ul_ded_msg_segment_r16_ies_s& ul_ded_msg_segment_r16() const + { + assert_choice_type(types::ul_ded_msg_segment_r16, type_, "criticalExtensions"); + return c; + } + ul_ded_msg_segment_r16_ies_s& set_ul_ded_msg_segment_r16(); + void set_crit_exts_future(); + + private: + types type_; + ul_ded_msg_segment_r16_ies_s c; + }; + + // 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; +}; + +// ULInformationTransfer ::= SEQUENCE +struct ul_info_transfer_s { + struct crit_exts_c_ { + struct types_opts { + enum options { ul_info_transfer, crit_exts_future, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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_ies_s& ul_info_transfer() + { + assert_choice_type(types::ul_info_transfer, type_, "criticalExtensions"); + return c; + } + const ul_info_transfer_ies_s& ul_info_transfer() const + { + assert_choice_type(types::ul_info_transfer, type_, "criticalExtensions"); + return c; + } + ul_info_transfer_ies_s& set_ul_info_transfer(); + void set_crit_exts_future(); + + private: + types type_; + ul_info_transfer_ies_s c; + }; + + // 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; +}; + +// ULInformationTransferIRAT-r16 ::= SEQUENCE +struct ul_info_transfer_irat_r16_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types_opts { + enum options { ul_info_transfer_irat_r16, spare3, spare2, spare1, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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_irat_r16_ies_s& ul_info_transfer_irat_r16() + { + assert_choice_type(types::ul_info_transfer_irat_r16, type_, "c1"); + return c; + } + const ul_info_transfer_irat_r16_ies_s& ul_info_transfer_irat_r16() const + { + assert_choice_type(types::ul_info_transfer_irat_r16, type_, "c1"); + return c; + } + ul_info_transfer_irat_r16_ies_s& set_ul_info_transfer_irat_r16(); + void set_spare3(); + void set_spare2(); + void set_spare1(); + + private: + types type_; + ul_info_transfer_irat_r16_ies_s c; + }; + struct types_opts { + enum options { c1, crit_exts_future, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + c1_c_& c1() + { + assert_choice_type(types::c1, type_, "criticalExtensions"); + return c; + } + const c1_c_& c1() const + { + assert_choice_type(types::c1, type_, "criticalExtensions"); + return c; + } + c1_c_& set_c1(); + void set_crit_exts_future(); + + private: + types type_; + c1_c_ c; + }; + + // 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; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::ul_info_transfer_mrdc, type_, "c1"); + return c; + } + const ul_info_transfer_mrdc_ies_s& ul_info_transfer_mrdc() const + { + assert_choice_type(types::ul_info_transfer_mrdc, type_, "c1"); + return c; + } + ul_info_transfer_mrdc_ies_s& set_ul_info_transfer_mrdc(); + void set_spare3(); + void set_spare2(); + void set_spare1(); + + 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; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + c1_c_& c1() + { + assert_choice_type(types::c1, type_, "criticalExtensions"); + return c; + } + const c1_c_& c1() const + { + assert_choice_type(types::c1, type_, "criticalExtensions"); + return c; + } + c1_c_& set_c1(); + void set_crit_exts_future(); + + private: + types type_; + c1_c_ c; + }; + + // 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; +}; + +// 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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using milli_seconds_e_ = enumerated; + struct types_opts { + enum options { sub_milli_seconds, milli_seconds, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::sub_milli_seconds, type_, "drx-onDurationTimer"); + return c.get(); + } + milli_seconds_e_& milli_seconds() + { + assert_choice_type(types::milli_seconds, type_, "drx-onDurationTimer"); + return c.get(); + } + const uint8_t& sub_milli_seconds() const + { + assert_choice_type(types::sub_milli_seconds, type_, "drx-onDurationTimer"); + return c.get(); + } + const milli_seconds_e_& milli_seconds() const + { + assert_choice_type(types::milli_seconds, type_, "drx-onDurationTimer"); + return c.get(); + } + uint8_t& set_sub_milli_seconds(); + milli_seconds_e_& set_milli_seconds(); + + 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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using drx_inactivity_timer_e_ = enumerated; + 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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using drx_retx_timer_dl_e_ = enumerated; + 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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using drx_retx_timer_ul_e_ = enumerated; + struct drx_long_cycle_start_offset_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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // 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_(); } + 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() + { + assert_choice_type(types::ms10, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms20() + { + assert_choice_type(types::ms20, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms32() + { + assert_choice_type(types::ms32, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms40() + { + assert_choice_type(types::ms40, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms60() + { + assert_choice_type(types::ms60, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms64() + { + assert_choice_type(types::ms64, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms70() + { + assert_choice_type(types::ms70, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms80() + { + assert_choice_type(types::ms80, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms128() + { + assert_choice_type(types::ms128, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms160() + { + assert_choice_type(types::ms160, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms256() + { + assert_choice_type(types::ms256, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms320() + { + assert_choice_type(types::ms320, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms512() + { + assert_choice_type(types::ms512, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms640() + { + assert_choice_type(types::ms640, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms1024() + { + assert_choice_type(types::ms1024, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms1280() + { + assert_choice_type(types::ms1280, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms2048() + { + assert_choice_type(types::ms2048, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms2560() + { + assert_choice_type(types::ms2560, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms5120() + { + assert_choice_type(types::ms5120, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms10240() + { + assert_choice_type(types::ms10240, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms10() const + { + assert_choice_type(types::ms10, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms20() const + { + assert_choice_type(types::ms20, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms32() const + { + assert_choice_type(types::ms32, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms40() const + { + assert_choice_type(types::ms40, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms60() const + { + assert_choice_type(types::ms60, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms64() const + { + assert_choice_type(types::ms64, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms70() const + { + assert_choice_type(types::ms70, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms80() const + { + assert_choice_type(types::ms80, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms128() const + { + assert_choice_type(types::ms128, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms160() const + { + assert_choice_type(types::ms160, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms256() const + { + assert_choice_type(types::ms256, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms320() const + { + assert_choice_type(types::ms320, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms512() const + { + assert_choice_type(types::ms512, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms640() const + { + assert_choice_type(types::ms640, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms1024() const + { + assert_choice_type(types::ms1024, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms1280() const + { + assert_choice_type(types::ms1280, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms2048() const + { + assert_choice_type(types::ms2048, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms2560() const + { + assert_choice_type(types::ms2560, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms5120() const + { + assert_choice_type(types::ms5120, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms10240() const + { + assert_choice_type(types::ms10240, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& set_ms10(); + uint8_t& set_ms20(); + uint8_t& set_ms32(); + uint8_t& set_ms40(); + uint8_t& set_ms60(); + uint8_t& set_ms64(); + uint8_t& set_ms70(); + uint8_t& set_ms80(); + uint8_t& set_ms128(); + uint8_t& set_ms160(); + uint16_t& set_ms256(); + uint16_t& set_ms320(); + uint16_t& set_ms512(); + uint16_t& set_ms640(); + uint16_t& set_ms1024(); + uint16_t& set_ms1280(); + uint16_t& set_ms2048(); + uint16_t& set_ms2560(); + uint16_t& set_ms5120(); + uint16_t& set_ms10240(); + + 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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using drx_short_cycle_e_ = enumerated; + + // member variables + drx_short_cycle_e_ drx_short_cycle; + uint8_t drx_short_cycle_timer = 1; + }; + + // 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; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasResultCellListSFTD-EUTRA ::= SEQUENCE (SIZE (1..3)) OF MeasResultSFTD-EUTRA +using meas_result_cell_list_sftd_eutra_l = dyn_array; + +// BandCombinationInfo ::= SEQUENCE +struct band_combination_info_s { + using allowed_feature_sets_list_l_ = dyn_array; + + // member variables + uint32_t band_combination_idx = 1; + allowed_feature_sets_list_l_ allowed_feature_sets_list; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// BandCombinationInfoList ::= SEQUENCE (SIZE (1..65536)) OF BandCombinationInfo +using band_combination_info_list_l = dyn_array; + +// SelectedBandEntriesMN ::= SEQUENCE (SIZE (1..32)) OF INTEGER (0..32) +using sel_band_entries_mn_l = bounded_array; + +// T-Offset-r16 ::= ENUMERATED +struct t_offset_r16_opts { + enum options { ms0dot5, ms0dot75, ms1, ms1dot5, ms2, ms2dot5, ms3, spare1, nulltype } value; + typedef float number_type; + + const char* to_string() const; + float to_number() const; + const char* to_number_string() const; +}; +using t_offset_r16_e = enumerated; + +// ConfigRestrictInfoSCG ::= SEQUENCE +struct cfg_restrict_info_scg_s { + struct pwr_coordination_fr1_s_ { + bool p_max_nr_fr1_present = false; + bool p_max_eutra_present = false; + bool p_max_ue_fr1_present = false; + int8_t p_max_nr_fr1 = -30; + int8_t p_max_eutra = -30; + int8_t p_max_ue_fr1 = -30; + }; + struct serv_cell_idx_range_scg_s_ { + uint8_t low_bound = 0; + uint8_t up_bound = 0; + }; + using sel_band_entries_mn_list_l_ = dyn_array; + struct pwr_coordination_fr2_r16_s_ { + bool p_max_nr_fr2_mcg_r16_present = false; + bool p_max_nr_fr2_scg_r16_present = false; + bool p_max_ue_fr2_r16_present = false; + int8_t p_max_nr_fr2_mcg_r16 = -30; + int8_t p_max_nr_fr2_scg_r16 = -30; + int8_t p_max_ue_fr2_r16 = -30; + }; + struct nrdc_pc_mode_fr1_r16_opts { + enum options { semi_static_mode1, semi_static_mode2, dyn, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using nrdc_pc_mode_fr1_r16_e_ = enumerated; + struct nrdc_pc_mode_fr2_r16_opts { + enum options { semi_static_mode1, semi_static_mode2, dyn, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using nrdc_pc_mode_fr2_r16_e_ = enumerated; + + // member variables + bool ext = 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 = 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; + // group 2 + bool p_max_nr_fr1_mcg_r16_present = false; + bool nrdc_pc_mode_fr1_r16_present = false; + bool nrdc_pc_mode_fr2_r16_present = false; + bool max_meas_srs_res_scg_r16_present = false; + bool max_meas_cli_res_scg_r16_present = false; + bool max_num_ehc_contexts_sn_r16_present = false; + bool max_toffset_r16_present = false; + int8_t p_max_nr_fr1_mcg_r16 = -30; + copy_ptr pwr_coordination_fr2_r16; + nrdc_pc_mode_fr1_r16_e_ nrdc_pc_mode_fr1_r16; + nrdc_pc_mode_fr2_r16_e_ nrdc_pc_mode_fr2_r16; + uint8_t max_meas_srs_res_scg_r16 = 0; + uint8_t max_meas_cli_res_scg_r16 = 0; + uint32_t max_num_ehc_contexts_sn_r16 = 0; + copy_ptr allowed_reduced_cfg_for_overheat_r16; + t_offset_r16_e max_toffset_r16; + // group 3 + bool max_num_udc_drb_r17_present = false; + bool max_num_cp_cc_andidates_r17_present = false; + copy_ptr allowed_reduced_cfg_for_overheat_r17; + uint8_t max_num_udc_drb_r17 = 0; + uint8_t max_num_cp_cc_andidates_r17 = 0; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AffectedCarrierFreqCombEUTRA ::= SEQUENCE (SIZE (1..32)) OF INTEGER (0..262143) +using affected_carrier_freq_comb_eutra_l = bounded_array; + +// AffectedCarrierFreqCombNR ::= SEQUENCE (SIZE (1..32)) OF INTEGER (0..3279165) +using affected_carrier_freq_comb_nr_l = bounded_array; + +// VictimSystemType ::= SEQUENCE +struct victim_sys_type_s { + bool gps_present = false; + bool glonass_present = false; + bool bds_present = false; + bool galileo_present = false; + bool wlan_present = false; + bool bluetooth_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// AffectedCarrierFreqCombInfoMRDC ::= SEQUENCE +struct affected_carrier_freq_comb_info_mrdc_s { + struct interference_direction_mrdc_opts { + enum options { eutra_nr, nr, other, utra_nr_other, nr_other, spare3, spare2, spare1, nulltype } value; + + const char* to_string() const; + }; + using interference_direction_mrdc_e_ = enumerated; + struct affected_carrier_freq_comb_mrdc_s_ { + affected_carrier_freq_comb_eutra_l affected_carrier_freq_comb_eutra; + affected_carrier_freq_comb_nr_l affected_carrier_freq_comb_nr; + }; + + // member variables + bool affected_carrier_freq_comb_mrdc_present = false; + victim_sys_type_s victim_sys_type; + interference_direction_mrdc_e_ interference_direction_mrdc; + affected_carrier_freq_comb_mrdc_s_ affected_carrier_freq_comb_mrdc; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FrequencyConfig-NR-r16 ::= SEQUENCE +struct freq_cfg_nr_r16_s { + uint16_t freq_band_ind_nr_r16 = 1; + uint32_t carrier_center_freq_nr_r16 = 0; + uint16_t carrier_bw_nr_r16 = 1; + subcarrier_spacing_e subcarrier_spacing_nr_r16; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// TransmissionBandwidth-EUTRA-r16 ::= ENUMERATED +struct tx_bw_eutra_r16_opts { + enum options { rb6, rb15, rb25, rb50, rb75, rb100, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; +}; +using tx_bw_eutra_r16_e = enumerated; + +// ServCellInfoXCG-EUTRA-r16 ::= SEQUENCE +struct serv_cell_info_xcg_eutra_r16_s { + bool ext = false; + bool dl_carrier_freq_eutra_r16_present = false; + bool ul_carrier_freq_eutra_r16_present = false; + bool tx_bw_eutra_r16_present = false; + uint32_t dl_carrier_freq_eutra_r16 = 0; + uint32_t ul_carrier_freq_eutra_r16 = 0; + tx_bw_eutra_r16_e tx_bw_eutra_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// ServCellInfoXCG-NR-r16 ::= SEQUENCE +struct serv_cell_info_xcg_nr_r16_s { + bool ext = false; + bool dl_freq_info_nr_r16_present = false; + bool ul_freq_info_nr_r16_present = false; + freq_cfg_nr_r16_s dl_freq_info_nr_r16; + freq_cfg_nr_r16_s ul_freq_info_nr_r16; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRX-Info2 ::= SEQUENCE +struct drx_info2_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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using milli_seconds_e_ = enumerated; + struct types_opts { + enum options { sub_milli_seconds, milli_seconds, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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(types::sub_milli_seconds, type_, "drx-onDurationTimer"); + return c.get(); + } + milli_seconds_e_& milli_seconds() + { + assert_choice_type(types::milli_seconds, type_, "drx-onDurationTimer"); + return c.get(); + } + const uint8_t& sub_milli_seconds() const + { + assert_choice_type(types::sub_milli_seconds, type_, "drx-onDurationTimer"); + return c.get(); + } + const milli_seconds_e_& milli_seconds() const + { + assert_choice_type(types::milli_seconds, type_, "drx-onDurationTimer"); + return c.get(); + } + uint8_t& set_sub_milli_seconds(); + milli_seconds_e_& set_milli_seconds(); + + private: + types type_; + pod_choice_buffer_t c; + + void destroy_(); + }; + + // member variables + drx_on_dur_timer_c_ drx_on_dur_timer; + + // 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 { + enum options { fr1, fr2, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using fr_type_e_ = enumerated; + + // member variables + uint8_t serv_cell_idx = 0; + fr_type_e_ fr_type; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// NR-FreqInfo ::= SEQUENCE +struct nr_freq_info_s { + bool ext = false; + bool measured_freq_present = false; + uint32_t measured_freq = 0; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// DRX-Info ::= SEQUENCE +struct drx_info_s { + struct drx_long_cycle_start_offset_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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using types = enumerated; + + // 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_(); } + 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() + { + assert_choice_type(types::ms10, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms20() + { + assert_choice_type(types::ms20, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms32() + { + assert_choice_type(types::ms32, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms40() + { + assert_choice_type(types::ms40, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms60() + { + assert_choice_type(types::ms60, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms64() + { + assert_choice_type(types::ms64, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms70() + { + assert_choice_type(types::ms70, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms80() + { + assert_choice_type(types::ms80, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms128() + { + assert_choice_type(types::ms128, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& ms160() + { + assert_choice_type(types::ms160, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms256() + { + assert_choice_type(types::ms256, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms320() + { + assert_choice_type(types::ms320, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms512() + { + assert_choice_type(types::ms512, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms640() + { + assert_choice_type(types::ms640, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms1024() + { + assert_choice_type(types::ms1024, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms1280() + { + assert_choice_type(types::ms1280, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms2048() + { + assert_choice_type(types::ms2048, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms2560() + { + assert_choice_type(types::ms2560, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms5120() + { + assert_choice_type(types::ms5120, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint16_t& ms10240() + { + assert_choice_type(types::ms10240, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms10() const + { + assert_choice_type(types::ms10, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms20() const + { + assert_choice_type(types::ms20, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms32() const + { + assert_choice_type(types::ms32, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms40() const + { + assert_choice_type(types::ms40, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms60() const + { + assert_choice_type(types::ms60, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms64() const + { + assert_choice_type(types::ms64, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms70() const + { + assert_choice_type(types::ms70, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms80() const + { + assert_choice_type(types::ms80, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms128() const + { + assert_choice_type(types::ms128, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint8_t& ms160() const + { + assert_choice_type(types::ms160, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms256() const + { + assert_choice_type(types::ms256, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms320() const + { + assert_choice_type(types::ms320, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms512() const + { + assert_choice_type(types::ms512, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms640() const + { + assert_choice_type(types::ms640, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms1024() const + { + assert_choice_type(types::ms1024, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms1280() const + { + assert_choice_type(types::ms1280, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms2048() const + { + assert_choice_type(types::ms2048, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms2560() const + { + assert_choice_type(types::ms2560, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms5120() const + { + assert_choice_type(types::ms5120, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + const uint16_t& ms10240() const + { + assert_choice_type(types::ms10240, type_, "drx-LongCycleStartOffset"); + return c.get(); + } + uint8_t& set_ms10(); + uint8_t& set_ms20(); + uint8_t& set_ms32(); + uint8_t& set_ms40(); + uint8_t& set_ms60(); + uint8_t& set_ms64(); + uint8_t& set_ms70(); + uint8_t& set_ms80(); + uint8_t& set_ms128(); + uint8_t& set_ms160(); + uint16_t& set_ms256(); + uint16_t& set_ms320(); + uint16_t& set_ms512(); + uint16_t& set_ms640(); + uint16_t& set_ms1024(); + uint16_t& set_ms1280(); + uint16_t& set_ms2048(); + uint16_t& set_ms2560(); + uint16_t& set_ms5120(); + uint16_t& set_ms10240(); + + 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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using drx_short_cycle_e_ = enumerated; + + // member variables + drx_short_cycle_e_ drx_short_cycle; + uint8_t drx_short_cycle_timer = 1; + }; + + // member variables + bool short_drx_present = false; + drx_long_cycle_start_offset_c_ drx_long_cycle_start_offset; + short_drx_s_ short_drx; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// FR-InfoList ::= SEQUENCE (SIZE (1..31)) OF FR-Info +using fr_info_list_l = dyn_array; + +// CandidateCellCPC-r17 ::= SEQUENCE +struct candidate_cell_cp_c_r17_s { + using candidate_cell_list_r17_l_ = bounded_array; + + // member variables + uint32_t ssb_freq_r17 = 0; + candidate_cell_list_r17_l_ candidate_cell_list_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CG-ConfigInfo-v1730-IEs ::= SEQUENCE +struct cg_cfg_info_v1730_ies_s { + bool fr1_carriers_mcg_r17_present = false; + bool fr2_carriers_mcg_r17_present = false; + bool non_crit_ext_present = false; + uint8_t fr1_carriers_mcg_r17 = 1; + uint8_t fr2_carriers_mcg_r17 = 1; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CandidateCellListCPC-r17 ::= SEQUENCE (SIZE (1..8)) OF CandidateCellCPC-r17 +using candidate_cell_list_cp_c_r17_l = dyn_array; + +// CG-ConfigInfo-v1700-IEs ::= SEQUENCE +struct cg_cfg_info_v1700_ies_s { + bool two_phr_mode_mcg_r17_present = false; + bool low_mob_eval_connected_in_pcell_r17_present = false; + bool non_crit_ext_present = false; + candidate_cell_list_cp_c_r17_l candidate_cell_list_cp_c_r17; + cg_cfg_info_v1730_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; +}; + +// ServCellInfoListMCG-EUTRA-r16 ::= SEQUENCE (SIZE (1..32)) OF ServCellInfoXCG-EUTRA-r16 +using serv_cell_info_list_mcg_eutra_r16_l = dyn_array; + +// ServCellInfoListMCG-NR-r16 ::= SEQUENCE (SIZE (1..32)) OF ServCellInfoXCG-NR-r16 +using serv_cell_info_list_mcg_nr_r16_l = dyn_array; + +// CG-ConfigInfo-v1640-IEs ::= SEQUENCE +struct cg_cfg_info_v1640_ies_s { + bool non_crit_ext_present = false; + serv_cell_info_list_mcg_nr_r16_l serv_cell_info_list_mcg_nr_r16; + serv_cell_info_list_mcg_eutra_r16_l serv_cell_info_list_mcg_eutra_r16; + cg_cfg_info_v1700_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; +}; + +// CG-ConfigInfo-v1620-IEs ::= SEQUENCE +struct cg_cfg_info_v1620_ies_s { + bool non_crit_ext_present = false; + dyn_octstring ue_assist_info_source_scg_r16; + cg_cfg_info_v1640_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; +}; + +// CG-ConfigInfo-v1610-IEs ::= SEQUENCE +struct cg_cfg_info_v1610_ies_s { + struct scg_fail_info_r16_s_ { + struct fail_type_r16_opts { + enum options { + scg_lbt_fail_r16, + beam_fail_recovery_fail_r16, + t312_expiry_r16, + bh_rlf_r16, + beam_fail_r17, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using fail_type_r16_e_ = enumerated; + + // member variables + fail_type_r16_e_ fail_type_r16; + dyn_octstring meas_result_scg_r16; + }; + struct dummy1_s_ { + struct fail_type_eutra_r16_opts { + enum options { + scg_lbt_fail_r16, + beam_fail_recovery_fail_r16, + t312_expiry_r16, + spare5, + spare4, + spare3, + spare2, + spare1, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using fail_type_eutra_r16_e_ = enumerated; + + // member variables + fail_type_eutra_r16_e_ fail_type_eutra_r16; + dyn_octstring meas_result_scg_eutra_r16; + }; + + // member variables + bool drx_info_mcg2_present = false; + bool aligned_drx_ind_present = false; + bool scg_fail_info_r16_present = false; + bool dummy1_present = false; + bool non_crit_ext_present = false; + drx_info2_s drx_info_mcg2; + scg_fail_info_r16_s_ scg_fail_info_r16; + dummy1_s_ dummy1; + dyn_octstring sidelink_ue_info_nr_r16; + dyn_octstring sidelink_ue_info_eutra_r16; + cg_cfg_info_v1620_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; +}; + +// CG-ConfigInfo-v1590-IEs ::= SEQUENCE +struct cg_cfg_info_v1590_ies_s { + using serv_frequencies_mn_nr_l_ = bounded_array; + + // member variables + bool non_crit_ext_present = false; + serv_frequencies_mn_nr_l_ serv_frequencies_mn_nr; + cg_cfg_info_v1610_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-UplinkCarrierMCG ::= SEQUENCE +struct ph_ul_carrier_mcg_s { + struct ph_type1or3_opts { + enum options { type1, type3, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using ph_type1or3_e_ = enumerated; + + // member variables + bool ext = false; + ph_type1or3_e_ ph_type1or3; + // ... + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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 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; + bool ph_supplementary_ul_present = false; + uint8_t serv_cell_idx = 0; + ph_ul_carrier_mcg_s ph_ul; + ph_ul_carrier_mcg_s ph_supplementary_ul; + // ... + // group 0 + bool two_srs_pusch_repeat_r17_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + 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; + + const char* to_string() const; + uint16_t to_number() const; + }; + using fail_type_eutra_e_ = enumerated; + + // 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 scg_fail_info_eutra_present = false; + bool drx_cfg_mcg_present = false; + bool meas_result_report_cgi_eutra_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_nr_s cgi_info; + }; + + // member variables + bool meas_result_report_cgi_present = false; + 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MRDC-AssistanceInfo ::= SEQUENCE +struct mrdc_assist_info_s { + using affected_carrier_freq_comb_info_list_mrdc_l_ = dyn_array; + + // member variables + bool ext = false; + affected_carrier_freq_comb_info_list_mrdc_l_ affected_carrier_freq_comb_info_list_mrdc; + // ... + // group 0 + dyn_octstring overheat_assist_scg_r16; + // group 1 + dyn_octstring overheat_assist_scg_fr2_2_r17; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// MeasConfigMN ::= SEQUENCE +struct meas_cfg_mn_s { + using measured_frequencies_mn_l_ = dyn_array; + struct gap_purpose_opts { + enum options { per_ue, per_fr1, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using gap_purpose_e_ = enumerated; + + // member variables + bool ext = false; + bool meas_gap_cfg_present = false; + bool gap_purpose_present = false; + measured_frequencies_mn_l_ measured_frequencies_mn; + setup_release_c meas_gap_cfg; + gap_purpose_e_ gap_purpose; + // ... + // group 0 + copy_ptr> meas_gap_cfg_fr2; + // group 1 + bool inter_freq_no_gap_r16_present = false; + + // sequence methods + SRSASN_CODE pack(bit_ref& bref) const; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CG-ConfigInfo-IEs ::= SEQUENCE +struct cg_cfg_info_ies_s { + struct scg_fail_info_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, + nulltype + } value; + typedef uint16_t number_type; + + const char* to_string() const; + uint16_t to_number() const; + }; + using fail_type_e_ = enumerated; + + // member variables + fail_type_e_ fail_type; + dyn_octstring meas_result_scg; + }; + + // member variables + 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 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; + SRSASN_CODE unpack(cbit_ref& bref); + void to_json(json_writer& j) const; +}; + +// CG-ConfigInfo ::= SEQUENCE +struct cg_cfg_info_s { + struct crit_exts_c_ { + struct c1_c_ { + struct types_opts { + enum options { cg_cfg_info, spare3, spare2, spare1, nulltype } value; + + const char* to_string() const; + }; + using types = enumerated; + + // 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 + cg_cfg_info_ies_s& cg_cfg_info() + { + assert_choice_type(types::cg_cfg_info, type_, "c1"); + return c; + } + const cg_cfg_info_ies_s& cg_cfg_info() const + { + assert_choice_type(types::cg_cfg_info, type_, "c1"); + return c; + } + cg_cfg_info_ies_s& set_cg_cfg_info(); + void set_spare3(); + void set_spare2(); + void set_spare1(); + + private: + types type_; + cg_cfg_info_ies_s c; + }; + struct types_opts { + enum options { c1, crit_exts_future, nulltype } value; + typedef uint8_t number_type; + + const char* to_string() const; + uint8_t to_number() const; + }; + using types = enumerated; + + // choice methods + crit_exts_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 + c1_c_& c1() + { + assert_choice_type(types::c1, type_, "criticalExtensions"); + return c; + } + const c1_c_& c1() const + { + assert_choice_type(types::c1, type_, "criticalExtensions"); + return c; + } + c1_c_& set_c1(); + void set_crit_exts_future(); + + private: + types type_; + c1_c_ c; + }; + + // 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; +}; + +} // namespace rrc_nr +} // namespace asn1 diff --git a/lib/asn1/CMakeLists.txt b/lib/asn1/CMakeLists.txt index 6edb9a4e49..eb3eacc1d5 100644 --- a/lib/asn1/CMakeLists.txt +++ b/lib/asn1/CMakeLists.txt @@ -1,4 +1,3 @@ - # # Copyright 2021-2024 Software Radio Systems Limited # @@ -13,11 +12,7 @@ target_compile_options(asn1_utils PRIVATE -fno-exceptions) target_link_libraries(asn1_utils srslog srsran_support) # RRC NR ASN1 -add_library(rrc_nr_asn1 STATIC rrc_nr/common.cpp rrc_nr/serving_cell.cpp rrc_nr/ue_cap.cpp - rrc_nr/msg_common.cpp rrc_nr/dl_dcch_msg.cpp rrc_nr/ul_dcch_msg.cpp rrc_nr/cell_group_config.cpp - rrc_nr/nr_ue_variables.cpp rrc_nr/pc5_rrc_definitions.cpp rrc_nr/nr_sidelink_preconf.cpp rrc_nr/rrc_nr.cpp) -target_compile_options(rrc_nr_asn1 PRIVATE -Os -fno-exceptions) -target_link_libraries(rrc_nr_asn1 asn1_utils) +add_subdirectory(rrc_nr) # F1AP ASN1 add_library(f1ap_asn1 STATIC f1ap/common.cpp f1ap/f1ap_ies.cpp f1ap/f1ap_pdu_items.cpp f1ap/f1ap_pdu_contents_ue.cpp diff --git a/lib/asn1/asn1_utils.cpp b/lib/asn1/asn1_utils.cpp index 982183f524..9a71bc0613 100644 --- a/lib/asn1/asn1_utils.cpp +++ b/lib/asn1/asn1_utils.cpp @@ -9,6 +9,7 @@ */ #include "srsran/asn1/asn1_utils.h" +#include "srsran/adt/bounded_bitset.h" #include "srsran/asn1/asn1_ap_utils.h" using srsran::byte_buffer; diff --git a/lib/asn1/rrc_nr/CMakeLists.txt b/lib/asn1/rrc_nr/CMakeLists.txt new file mode 100644 index 0000000000..2f1234c710 --- /dev/null +++ b/lib/asn1/rrc_nr/CMakeLists.txt @@ -0,0 +1,36 @@ +# +# Copyright 2021-2024 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. +# + +# RRC NR ASN1 +add_library(rrc_nr_asn1 STATIC + common.cpp + serving_cell.cpp + ue_cap.cpp + bwp_cfg.cpp + sys_info.cpp + radio_bearer_cfg.cpp + dl_ccch_msg_ies.cpp + dl_dcch_msg_ies.cpp + ul_ccch_msg_ies.cpp + ul_dcch_msg_ies.cpp + pcch_msg_ies.cpp + dl_dcch_msg.cpp + ul_dcch_msg.cpp + nr_ue_variables.cpp + pc5_rrc_definitions.cpp + nr_sidelink_preconf.cpp + cell_group_config.cpp + bcch_bch_msg.cpp + bcch_dl_sch_msg.cpp + pcch_msg.cpp + ul_ccch_msg.cpp + ul_ccch1_msg.cpp + dl_ccch_msg.cpp + rrc_nr.cpp) +target_compile_options(rrc_nr_asn1 PRIVATE -Os -fno-exceptions) +target_link_libraries(rrc_nr_asn1 asn1_utils) diff --git a/lib/asn1/rrc_nr/bcch_bch_msg.cpp b/lib/asn1/rrc_nr/bcch_bch_msg.cpp new file mode 100644 index 0000000000..700c79a51a --- /dev/null +++ b/lib/asn1/rrc_nr/bcch_bch_msg.cpp @@ -0,0 +1,213 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/bcch_bch_msg.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// PDCCH-ConfigSIB1 ::= SEQUENCE +SRSASN_CODE pdcch_cfg_sib1_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, coreset_zero, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(pack_integer(bref, search_space_zero, (uint8_t)0u, (uint8_t)15u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcch_cfg_sib1_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(coreset_zero, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(unpack_integer(search_space_zero, bref, (uint8_t)0u, (uint8_t)15u)); + + return SRSASN_SUCCESS; +} +void pdcch_cfg_sib1_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("controlResourceSetZero", coreset_zero); + j.write_int("searchSpaceZero", search_space_zero); + j.end_obj(); +} + +// MIB ::= SEQUENCE +SRSASN_CODE mib_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(sys_frame_num.pack(bref)); + HANDLE_CODE(sub_carrier_spacing_common.pack(bref)); + HANDLE_CODE(pack_integer(bref, ssb_subcarrier_offset, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(dmrs_type_a_position.pack(bref)); + HANDLE_CODE(pdcch_cfg_sib1.pack(bref)); + HANDLE_CODE(cell_barred.pack(bref)); + HANDLE_CODE(intra_freq_resel.pack(bref)); + HANDLE_CODE(spare.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mib_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(sys_frame_num.unpack(bref)); + HANDLE_CODE(sub_carrier_spacing_common.unpack(bref)); + HANDLE_CODE(unpack_integer(ssb_subcarrier_offset, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(dmrs_type_a_position.unpack(bref)); + HANDLE_CODE(pdcch_cfg_sib1.unpack(bref)); + HANDLE_CODE(cell_barred.unpack(bref)); + HANDLE_CODE(intra_freq_resel.unpack(bref)); + HANDLE_CODE(spare.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mib_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("systemFrameNumber", sys_frame_num.to_string()); + j.write_str("subCarrierSpacingCommon", sub_carrier_spacing_common.to_string()); + j.write_int("ssb-SubcarrierOffset", ssb_subcarrier_offset); + j.write_str("dmrs-TypeA-Position", dmrs_type_a_position.to_string()); + j.write_fieldname("pdcch-ConfigSIB1"); + pdcch_cfg_sib1.to_json(j); + j.write_str("cellBarred", cell_barred.to_string()); + j.write_str("intraFreqReselection", intra_freq_resel.to_string()); + j.write_str("spare", spare.to_string()); + j.end_obj(); +} + +const char* mib_s::sub_carrier_spacing_common_opts::to_string() const +{ + static const char* names[] = {"scs15or60", "scs30or120"}; + return convert_enum_idx(names, 2, value, "mib_s::sub_carrier_spacing_common_e_"); +} +uint8_t mib_s::sub_carrier_spacing_common_opts::to_number() const +{ + static const uint8_t numbers[] = {15, 30}; + return map_enum_number(numbers, 2, value, "mib_s::sub_carrier_spacing_common_e_"); +} + +const char* mib_s::dmrs_type_a_position_opts::to_string() const +{ + static const char* names[] = {"pos2", "pos3"}; + return convert_enum_idx(names, 2, value, "mib_s::dmrs_type_a_position_e_"); +} +uint8_t mib_s::dmrs_type_a_position_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 3}; + return map_enum_number(numbers, 2, value, "mib_s::dmrs_type_a_position_e_"); +} + +const char* mib_s::cell_barred_opts::to_string() const +{ + static const char* names[] = {"barred", "notBarred"}; + return convert_enum_idx(names, 2, value, "mib_s::cell_barred_e_"); +} + +const char* mib_s::intra_freq_resel_opts::to_string() const +{ + static const char* names[] = {"allowed", "notAllowed"}; + return convert_enum_idx(names, 2, value, "mib_s::intra_freq_resel_e_"); +} + +// BCCH-BCH-MessageType ::= CHOICE +void bcch_bch_msg_type_c::set(types::options e) +{ + type_ = e; +} +mib_s& bcch_bch_msg_type_c::set_mib() +{ + set(types::mib); + return c; +} +void bcch_bch_msg_type_c::set_msg_class_ext() +{ + set(types::msg_class_ext); +} +void bcch_bch_msg_type_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::mib: + j.write_fieldname("mib"); + c.to_json(j); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "bcch_bch_msg_type_c"); + } + j.end_obj(); +} +SRSASN_CODE bcch_bch_msg_type_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::mib: + HANDLE_CODE(c.pack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "bcch_bch_msg_type_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_bch_msg_type_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::mib: + HANDLE_CODE(c.unpack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "bcch_bch_msg_type_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* bcch_bch_msg_type_c::types_opts::to_string() const +{ + static const char* names[] = {"mib", "messageClassExtension"}; + return convert_enum_idx(names, 2, value, "bcch_bch_msg_type_c::types"); +} + +// BCCH-BCH-Message ::= SEQUENCE +SRSASN_CODE bcch_bch_msg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_bch_msg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void bcch_bch_msg_s::to_json(json_writer& j) const +{ + j.start_array(); + j.start_obj(); + j.start_obj("BCCH-BCH-Message"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); +} diff --git a/lib/asn1/rrc_nr/bcch_dl_sch_msg.cpp b/lib/asn1/rrc_nr/bcch_dl_sch_msg.cpp new file mode 100644 index 0000000000..822b39776a --- /dev/null +++ b/lib/asn1/rrc_nr/bcch_dl_sch_msg.cpp @@ -0,0 +1,212 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/bcch_dl_sch_msg.h" +#include "srsran/asn1/rrc_nr/sys_info.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// BCCH-DL-SCH-MessageType ::= CHOICE +void bcch_dl_sch_msg_type_c::set(types::options e) +{ + type_ = e; +} +bcch_dl_sch_msg_type_c::c1_c_& bcch_dl_sch_msg_type_c::set_c1() +{ + set(types::c1); + return c; +} +void bcch_dl_sch_msg_type_c::set_msg_class_ext() +{ + set(types::msg_class_ext); +} +void bcch_dl_sch_msg_type_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.to_json(j); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c"); + } + j.end_obj(); +} +SRSASN_CODE bcch_dl_sch_msg_type_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::c1: + HANDLE_CODE(c.pack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_dl_sch_msg_type_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.unpack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void bcch_dl_sch_msg_type_c::c1_c_::set(types::options e) +{ + type_ = e; + switch (type_) { + case types::sys_info: + c = sys_info_s{}; + break; + case types::sib_type1: + c = sib1_s{}; + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c::c1_c_"); + } +} +sys_info_s& bcch_dl_sch_msg_type_c::c1_c_::set_sys_info() +{ + set(types::sys_info); + return c.get(); +} +sib1_s& bcch_dl_sch_msg_type_c::c1_c_::set_sib_type1() +{ + set(types::sib_type1); + return c.get(); +} +void bcch_dl_sch_msg_type_c::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sys_info: + j.write_fieldname("systemInformation"); + c.get().to_json(j); + break; + case types::sib_type1: + j.write_fieldname("systemInformationBlockType1"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE bcch_dl_sch_msg_type_c::c1_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::sys_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib_type1: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_dl_sch_msg_type_c::c1_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::sys_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib_type1: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* bcch_dl_sch_msg_type_c::c1_c_::types_opts::to_string() const +{ + static const char* names[] = {"systemInformation", "systemInformationBlockType1"}; + return convert_enum_idx(names, 2, value, "bcch_dl_sch_msg_type_c::c1_c_::types"); +} +uint8_t bcch_dl_sch_msg_type_c::c1_c_::types_opts::to_number() const +{ + if (value == sib_type1) { + return 1; + } + invalid_enum_number(value, "bcch_dl_sch_msg_type_c::c1_c_::types"); + return 0; +} + +const char* bcch_dl_sch_msg_type_c::types_opts::to_string() const +{ + static const char* names[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(names, 2, value, "bcch_dl_sch_msg_type_c::types"); +} +uint8_t bcch_dl_sch_msg_type_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "bcch_dl_sch_msg_type_c::types"); +} + +// BCCH-DL-SCH-Message ::= SEQUENCE +SRSASN_CODE bcch_dl_sch_msg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE bcch_dl_sch_msg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void bcch_dl_sch_msg_s::to_json(json_writer& j) const +{ + j.start_array(); + j.start_obj(); + j.start_obj("BCCH-DL-SCH-Message"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); + j.end_obj(); + j.end_array(); +} diff --git a/lib/asn1/rrc_nr/bwp_cfg.cpp b/lib/asn1/rrc_nr/bwp_cfg.cpp new file mode 100644 index 0000000000..4fee3d3614 --- /dev/null +++ b/lib/asn1/rrc_nr/bwp_cfg.cpp @@ -0,0 +1,28094 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/bwp_cfg.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// MsgA-DMRS-Config-r16 ::= SEQUENCE +SRSASN_CODE msg_a_dmrs_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(msg_a_dmrs_add_position_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_max_len_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_pusch_dmrs_cdm_group_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_pusch_nrof_ports_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_scrambling_id0_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_scrambling_id1_r16_present, 1)); + + if (msg_a_dmrs_add_position_r16_present) { + HANDLE_CODE(msg_a_dmrs_add_position_r16.pack(bref)); + } + if (msg_a_pusch_dmrs_cdm_group_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_pusch_dmrs_cdm_group_r16, (uint8_t)0u, (uint8_t)1u)); + } + if (msg_a_pusch_nrof_ports_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_pusch_nrof_ports_r16, (uint8_t)0u, (uint8_t)1u)); + } + if (msg_a_scrambling_id0_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_scrambling_id0_r16, (uint32_t)0u, (uint32_t)65535u)); + } + if (msg_a_scrambling_id1_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_scrambling_id1_r16, (uint32_t)0u, (uint32_t)65535u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE msg_a_dmrs_cfg_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(msg_a_dmrs_add_position_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_max_len_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_pusch_dmrs_cdm_group_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_pusch_nrof_ports_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_scrambling_id0_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_scrambling_id1_r16_present, 1)); + + if (msg_a_dmrs_add_position_r16_present) { + HANDLE_CODE(msg_a_dmrs_add_position_r16.unpack(bref)); + } + if (msg_a_pusch_dmrs_cdm_group_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_pusch_dmrs_cdm_group_r16, bref, (uint8_t)0u, (uint8_t)1u)); + } + if (msg_a_pusch_nrof_ports_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_pusch_nrof_ports_r16, bref, (uint8_t)0u, (uint8_t)1u)); + } + if (msg_a_scrambling_id0_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_scrambling_id0_r16, bref, (uint32_t)0u, (uint32_t)65535u)); + } + if (msg_a_scrambling_id1_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_scrambling_id1_r16, bref, (uint32_t)0u, (uint32_t)65535u)); + } + + return SRSASN_SUCCESS; +} +void msg_a_dmrs_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (msg_a_dmrs_add_position_r16_present) { + j.write_str("msgA-DMRS-AdditionalPosition-r16", msg_a_dmrs_add_position_r16.to_string()); + } + if (msg_a_max_len_r16_present) { + j.write_str("msgA-MaxLength-r16", "len2"); + } + if (msg_a_pusch_dmrs_cdm_group_r16_present) { + j.write_int("msgA-PUSCH-DMRS-CDM-Group-r16", msg_a_pusch_dmrs_cdm_group_r16); + } + if (msg_a_pusch_nrof_ports_r16_present) { + j.write_int("msgA-PUSCH-NrofPorts-r16", msg_a_pusch_nrof_ports_r16); + } + if (msg_a_scrambling_id0_r16_present) { + j.write_int("msgA-ScramblingID0-r16", msg_a_scrambling_id0_r16); + } + if (msg_a_scrambling_id1_r16_present) { + j.write_int("msgA-ScramblingID1-r16", msg_a_scrambling_id1_r16); + } + j.end_obj(); +} + +const char* msg_a_dmrs_cfg_r16_s::msg_a_dmrs_add_position_r16_opts::to_string() const +{ + static const char* names[] = {"pos0", "pos1", "pos3"}; + return convert_enum_idx(names, 3, value, "msg_a_dmrs_cfg_r16_s::msg_a_dmrs_add_position_r16_e_"); +} +uint8_t msg_a_dmrs_cfg_r16_s::msg_a_dmrs_add_position_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 3}; + return map_enum_number(numbers, 3, value, "msg_a_dmrs_cfg_r16_s::msg_a_dmrs_add_position_r16_e_"); +} + +// RA-Prioritization ::= SEQUENCE +SRSASN_CODE ra_prioritization_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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ra_prioritization_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)); + } + + 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(); +} + +const char* ra_prioritization_s::pwr_ramp_step_high_prio_opts::to_string() const +{ + static const char* names[] = {"dB0", "dB2", "dB4", "dB6"}; + return convert_enum_idx(names, 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 numbers[] = {0, 2, 4, 6}; + return map_enum_number(numbers, 4, value, "ra_prioritization_s::pwr_ramp_step_high_prio_e_"); +} + +const char* ra_prioritization_s::scaling_factor_bi_opts::to_string() const +{ + static const char* names[] = {"zero", "dot25", "dot5", "dot75"}; + return convert_enum_idx(names, 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 numbers[] = {0, 25, 5, 75}; + return map_enum_number(numbers, 4, value, "ra_prioritization_s::scaling_factor_bi_e_"); +} + +// MsgA-PUSCH-Resource-r16 ::= SEQUENCE +SRSASN_CODE msg_a_pusch_res_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(msg_a_pusch_time_domain_alloc_r16_present, 1)); + HANDLE_CODE(bref.pack(start_symbol_and_len_msg_a_po_r16_present, 1)); + HANDLE_CODE(bref.pack(map_type_msg_a_pusch_r16_present, 1)); + HANDLE_CODE(bref.pack(guard_period_msg_a_pusch_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_intra_slot_freq_hop_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_hop_bits_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_alpha_r16_present, 1)); + HANDLE_CODE(bref.pack(interlace_idx_first_po_msg_a_pusch_r16_present, 1)); + HANDLE_CODE(bref.pack(nrof_interlaces_per_msg_a_po_r16_present, 1)); + + HANDLE_CODE(pack_integer(bref, msg_a_mcs_r16, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(pack_integer(bref, nrof_slots_msg_a_pusch_r16, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(nrof_msg_a_po_per_slot_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, msg_a_pusch_time_domain_offset_r16, (uint8_t)1u, (uint8_t)32u)); + if (msg_a_pusch_time_domain_alloc_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_pusch_time_domain_alloc_r16, (uint8_t)1u, (uint8_t)16u)); + } + if (start_symbol_and_len_msg_a_po_r16_present) { + HANDLE_CODE(pack_integer(bref, start_symbol_and_len_msg_a_po_r16, (uint8_t)0u, (uint8_t)127u)); + } + if (map_type_msg_a_pusch_r16_present) { + HANDLE_CODE(map_type_msg_a_pusch_r16.pack(bref)); + } + if (guard_period_msg_a_pusch_r16_present) { + HANDLE_CODE(pack_integer(bref, guard_period_msg_a_pusch_r16, (uint8_t)0u, (uint8_t)3u)); + } + HANDLE_CODE(pack_integer(bref, guard_band_msg_a_pusch_r16, (uint8_t)0u, (uint8_t)1u)); + HANDLE_CODE(pack_integer(bref, freq_start_msg_a_pusch_r16, (uint16_t)0u, (uint16_t)274u)); + HANDLE_CODE(pack_integer(bref, nrof_prbs_per_msg_a_po_r16, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(nrof_msg_a_po_fdm_r16.pack(bref)); + if (msg_a_hop_bits_r16_present) { + HANDLE_CODE(msg_a_hop_bits_r16.pack(bref)); + } + HANDLE_CODE(msg_a_dmrs_cfg_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, nrof_dmrs_seqs_r16, (uint8_t)1u, (uint8_t)2u)); + if (msg_a_alpha_r16_present) { + HANDLE_CODE(msg_a_alpha_r16.pack(bref)); + } + if (interlace_idx_first_po_msg_a_pusch_r16_present) { + HANDLE_CODE(pack_integer(bref, interlace_idx_first_po_msg_a_pusch_r16, (uint8_t)1u, (uint8_t)10u)); + } + if (nrof_interlaces_per_msg_a_po_r16_present) { + HANDLE_CODE(pack_integer(bref, nrof_interlaces_per_msg_a_po_r16, (uint8_t)1u, (uint8_t)10u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE msg_a_pusch_res_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(msg_a_pusch_time_domain_alloc_r16_present, 1)); + HANDLE_CODE(bref.unpack(start_symbol_and_len_msg_a_po_r16_present, 1)); + HANDLE_CODE(bref.unpack(map_type_msg_a_pusch_r16_present, 1)); + HANDLE_CODE(bref.unpack(guard_period_msg_a_pusch_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_intra_slot_freq_hop_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_hop_bits_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_alpha_r16_present, 1)); + HANDLE_CODE(bref.unpack(interlace_idx_first_po_msg_a_pusch_r16_present, 1)); + HANDLE_CODE(bref.unpack(nrof_interlaces_per_msg_a_po_r16_present, 1)); + + HANDLE_CODE(unpack_integer(msg_a_mcs_r16, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(unpack_integer(nrof_slots_msg_a_pusch_r16, bref, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(nrof_msg_a_po_per_slot_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(msg_a_pusch_time_domain_offset_r16, bref, (uint8_t)1u, (uint8_t)32u)); + if (msg_a_pusch_time_domain_alloc_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_pusch_time_domain_alloc_r16, bref, (uint8_t)1u, (uint8_t)16u)); + } + if (start_symbol_and_len_msg_a_po_r16_present) { + HANDLE_CODE(unpack_integer(start_symbol_and_len_msg_a_po_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (map_type_msg_a_pusch_r16_present) { + HANDLE_CODE(map_type_msg_a_pusch_r16.unpack(bref)); + } + if (guard_period_msg_a_pusch_r16_present) { + HANDLE_CODE(unpack_integer(guard_period_msg_a_pusch_r16, bref, (uint8_t)0u, (uint8_t)3u)); + } + HANDLE_CODE(unpack_integer(guard_band_msg_a_pusch_r16, bref, (uint8_t)0u, (uint8_t)1u)); + HANDLE_CODE(unpack_integer(freq_start_msg_a_pusch_r16, bref, (uint16_t)0u, (uint16_t)274u)); + HANDLE_CODE(unpack_integer(nrof_prbs_per_msg_a_po_r16, bref, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(nrof_msg_a_po_fdm_r16.unpack(bref)); + if (msg_a_hop_bits_r16_present) { + HANDLE_CODE(msg_a_hop_bits_r16.unpack(bref)); + } + HANDLE_CODE(msg_a_dmrs_cfg_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(nrof_dmrs_seqs_r16, bref, (uint8_t)1u, (uint8_t)2u)); + if (msg_a_alpha_r16_present) { + HANDLE_CODE(msg_a_alpha_r16.unpack(bref)); + } + if (interlace_idx_first_po_msg_a_pusch_r16_present) { + HANDLE_CODE(unpack_integer(interlace_idx_first_po_msg_a_pusch_r16, bref, (uint8_t)1u, (uint8_t)10u)); + } + if (nrof_interlaces_per_msg_a_po_r16_present) { + HANDLE_CODE(unpack_integer(nrof_interlaces_per_msg_a_po_r16, bref, (uint8_t)1u, (uint8_t)10u)); + } + + return SRSASN_SUCCESS; +} +void msg_a_pusch_res_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("msgA-MCS-r16", msg_a_mcs_r16); + j.write_int("nrofSlotsMsgA-PUSCH-r16", nrof_slots_msg_a_pusch_r16); + j.write_str("nrofMsgA-PO-PerSlot-r16", nrof_msg_a_po_per_slot_r16.to_string()); + j.write_int("msgA-PUSCH-TimeDomainOffset-r16", msg_a_pusch_time_domain_offset_r16); + if (msg_a_pusch_time_domain_alloc_r16_present) { + j.write_int("msgA-PUSCH-TimeDomainAllocation-r16", msg_a_pusch_time_domain_alloc_r16); + } + if (start_symbol_and_len_msg_a_po_r16_present) { + j.write_int("startSymbolAndLengthMsgA-PO-r16", start_symbol_and_len_msg_a_po_r16); + } + if (map_type_msg_a_pusch_r16_present) { + j.write_str("mappingTypeMsgA-PUSCH-r16", map_type_msg_a_pusch_r16.to_string()); + } + if (guard_period_msg_a_pusch_r16_present) { + j.write_int("guardPeriodMsgA-PUSCH-r16", guard_period_msg_a_pusch_r16); + } + j.write_int("guardBandMsgA-PUSCH-r16", guard_band_msg_a_pusch_r16); + j.write_int("frequencyStartMsgA-PUSCH-r16", freq_start_msg_a_pusch_r16); + j.write_int("nrofPRBs-PerMsgA-PO-r16", nrof_prbs_per_msg_a_po_r16); + j.write_str("nrofMsgA-PO-FDM-r16", nrof_msg_a_po_fdm_r16.to_string()); + if (msg_a_intra_slot_freq_hop_r16_present) { + j.write_str("msgA-IntraSlotFrequencyHopping-r16", "enabled"); + } + if (msg_a_hop_bits_r16_present) { + j.write_str("msgA-HoppingBits-r16", msg_a_hop_bits_r16.to_string()); + } + j.write_fieldname("msgA-DMRS-Config-r16"); + msg_a_dmrs_cfg_r16.to_json(j); + j.write_int("nrofDMRS-Sequences-r16", nrof_dmrs_seqs_r16); + if (msg_a_alpha_r16_present) { + j.write_str("msgA-Alpha-r16", msg_a_alpha_r16.to_string()); + } + if (interlace_idx_first_po_msg_a_pusch_r16_present) { + j.write_int("interlaceIndexFirstPO-MsgA-PUSCH-r16", interlace_idx_first_po_msg_a_pusch_r16); + } + if (nrof_interlaces_per_msg_a_po_r16_present) { + j.write_int("nrofInterlacesPerMsgA-PO-r16", nrof_interlaces_per_msg_a_po_r16); + } + j.end_obj(); +} + +const char* msg_a_pusch_res_r16_s::nrof_msg_a_po_per_slot_r16_opts::to_string() const +{ + static const char* names[] = {"one", "two", "three", "six"}; + return convert_enum_idx(names, 4, value, "msg_a_pusch_res_r16_s::nrof_msg_a_po_per_slot_r16_e_"); +} +uint8_t msg_a_pusch_res_r16_s::nrof_msg_a_po_per_slot_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3, 6}; + return map_enum_number(numbers, 4, value, "msg_a_pusch_res_r16_s::nrof_msg_a_po_per_slot_r16_e_"); +} + +const char* msg_a_pusch_res_r16_s::map_type_msg_a_pusch_r16_opts::to_string() const +{ + static const char* names[] = {"typeA", "typeB"}; + return convert_enum_idx(names, 2, value, "msg_a_pusch_res_r16_s::map_type_msg_a_pusch_r16_e_"); +} + +const char* msg_a_pusch_res_r16_s::nrof_msg_a_po_fdm_r16_opts::to_string() const +{ + static const char* names[] = {"one", "two", "four", "eight"}; + return convert_enum_idx(names, 4, value, "msg_a_pusch_res_r16_s::nrof_msg_a_po_fdm_r16_e_"); +} +uint8_t msg_a_pusch_res_r16_s::nrof_msg_a_po_fdm_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "msg_a_pusch_res_r16_s::nrof_msg_a_po_fdm_r16_e_"); +} + +const char* msg_a_pusch_res_r16_s::msg_a_alpha_r16_opts::to_string() const +{ + static const char* names[] = {"alpha0", "alpha04", "alpha05", "alpha06", "alpha07", "alpha08", "alpha09", "alpha1"}; + return convert_enum_idx(names, 8, value, "msg_a_pusch_res_r16_s::msg_a_alpha_r16_e_"); +} +float msg_a_pusch_res_r16_s::msg_a_alpha_r16_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; + return map_enum_number(numbers, 8, value, "msg_a_pusch_res_r16_s::msg_a_alpha_r16_e_"); +} +const char* msg_a_pusch_res_r16_s::msg_a_alpha_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"}; + return convert_enum_idx(number_strs, 8, value, "msg_a_pusch_res_r16_s::msg_a_alpha_r16_e_"); +} + +// RA-PrioritizationSliceInfo-r17 ::= SEQUENCE +SRSASN_CODE ra_prioritization_slice_info_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, nsag_id_list_r17, 1, 8)); + HANDLE_CODE(ra_prioritization_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ra_prioritization_slice_info_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(nsag_id_list_r17, bref, 1, 8)); + HANDLE_CODE(ra_prioritization_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ra_prioritization_slice_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("nsag-ID-List-r17"); + for (const auto& e1 : nsag_id_list_r17) { + j.write_str(e1.to_string()); + } + j.end_array(); + j.write_fieldname("ra-Prioritization-r17"); + ra_prioritization_r17.to_json(j); + j.end_obj(); +} + +// FeatureCombination-r17 ::= SEQUENCE +SRSASN_CODE feature_combination_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(red_cap_r17_present, 1)); + HANDLE_CODE(bref.pack(small_data_r17_present, 1)); + HANDLE_CODE(bref.pack(nsag_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(msg3_repeats_r17_present, 1)); + HANDLE_CODE(bref.pack(spare4_present, 1)); + HANDLE_CODE(bref.pack(spare3_present, 1)); + HANDLE_CODE(bref.pack(spare2_present, 1)); + HANDLE_CODE(bref.pack(spare1_present, 1)); + + if (nsag_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, nsag_r17, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE feature_combination_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(red_cap_r17_present, 1)); + HANDLE_CODE(bref.unpack(small_data_r17_present, 1)); + bool nsag_r17_present; + HANDLE_CODE(bref.unpack(nsag_r17_present, 1)); + HANDLE_CODE(bref.unpack(msg3_repeats_r17_present, 1)); + HANDLE_CODE(bref.unpack(spare4_present, 1)); + HANDLE_CODE(bref.unpack(spare3_present, 1)); + HANDLE_CODE(bref.unpack(spare2_present, 1)); + HANDLE_CODE(bref.unpack(spare1_present, 1)); + + if (nsag_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(nsag_r17, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void feature_combination_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (red_cap_r17_present) { + j.write_str("redCap-r17", "true"); + } + if (small_data_r17_present) { + j.write_str("smallData-r17", "true"); + } + if (nsag_r17.size() > 0) { + j.start_array("nsag-r17"); + for (const auto& e1 : nsag_r17) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (msg3_repeats_r17_present) { + j.write_str("msg3-Repetitions-r17", "true"); + } + if (spare4_present) { + j.write_str("spare4", "true"); + } + if (spare3_present) { + j.write_str("spare3", "true"); + } + if (spare2_present) { + j.write_str("spare2", "true"); + } + if (spare1_present) { + j.write_str("spare1", "true"); + } + j.end_obj(); +} + +// MsgA-PUSCH-Config-r16 ::= SEQUENCE +SRSASN_CODE msg_a_pusch_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(msg_a_pusch_res_group_a_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_pusch_res_group_b_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_transform_precoder_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_data_scrambling_idx_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_delta_preamb_r16_present, 1)); + + if (msg_a_pusch_res_group_a_r16_present) { + HANDLE_CODE(msg_a_pusch_res_group_a_r16.pack(bref)); + } + if (msg_a_pusch_res_group_b_r16_present) { + HANDLE_CODE(msg_a_pusch_res_group_b_r16.pack(bref)); + } + if (msg_a_transform_precoder_r16_present) { + HANDLE_CODE(msg_a_transform_precoder_r16.pack(bref)); + } + if (msg_a_data_scrambling_idx_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_data_scrambling_idx_r16, (uint16_t)0u, (uint16_t)1023u)); + } + if (msg_a_delta_preamb_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_delta_preamb_r16, (int8_t)-1, (int8_t)6)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE msg_a_pusch_cfg_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(msg_a_pusch_res_group_a_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_pusch_res_group_b_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_transform_precoder_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_data_scrambling_idx_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_delta_preamb_r16_present, 1)); + + if (msg_a_pusch_res_group_a_r16_present) { + HANDLE_CODE(msg_a_pusch_res_group_a_r16.unpack(bref)); + } + if (msg_a_pusch_res_group_b_r16_present) { + HANDLE_CODE(msg_a_pusch_res_group_b_r16.unpack(bref)); + } + if (msg_a_transform_precoder_r16_present) { + HANDLE_CODE(msg_a_transform_precoder_r16.unpack(bref)); + } + if (msg_a_data_scrambling_idx_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_data_scrambling_idx_r16, bref, (uint16_t)0u, (uint16_t)1023u)); + } + if (msg_a_delta_preamb_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_delta_preamb_r16, bref, (int8_t)-1, (int8_t)6)); + } + + return SRSASN_SUCCESS; +} +void msg_a_pusch_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (msg_a_pusch_res_group_a_r16_present) { + j.write_fieldname("msgA-PUSCH-ResourceGroupA-r16"); + msg_a_pusch_res_group_a_r16.to_json(j); + } + if (msg_a_pusch_res_group_b_r16_present) { + j.write_fieldname("msgA-PUSCH-ResourceGroupB-r16"); + msg_a_pusch_res_group_b_r16.to_json(j); + } + if (msg_a_transform_precoder_r16_present) { + j.write_str("msgA-TransformPrecoder-r16", msg_a_transform_precoder_r16.to_string()); + } + if (msg_a_data_scrambling_idx_r16_present) { + j.write_int("msgA-DataScramblingIndex-r16", msg_a_data_scrambling_idx_r16); + } + if (msg_a_delta_preamb_r16_present) { + j.write_int("msgA-DeltaPreamble-r16", msg_a_delta_preamb_r16); + } + j.end_obj(); +} + +const char* msg_a_pusch_cfg_r16_s::msg_a_transform_precoder_r16_opts::to_string() const +{ + static const char* names[] = {"enabled", "disabled"}; + return convert_enum_idx(names, 2, value, "msg_a_pusch_cfg_r16_s::msg_a_transform_precoder_r16_e_"); +} + +// FeatureCombinationPreambles-r17 ::= SEQUENCE +SRSASN_CODE feature_combination_preambs_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ssb_shared_ro_mask_idx_r17_present, 1)); + HANDLE_CODE(bref.pack(group_bcfg_r17_present, 1)); + HANDLE_CODE(bref.pack(separate_msg_a_pusch_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(msg_a_rsrp_thres_r17_present, 1)); + HANDLE_CODE(bref.pack(rsrp_thres_ssb_r17_present, 1)); + HANDLE_CODE(bref.pack(delta_preamb_r17_present, 1)); + + HANDLE_CODE(feature_combination_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, start_preamb_for_this_partition_r17, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_integer(bref, nof_preambs_per_ssb_for_this_partition_r17, (uint8_t)1u, (uint8_t)64u)); + if (ssb_shared_ro_mask_idx_r17_present) { + HANDLE_CODE(pack_integer(bref, ssb_shared_ro_mask_idx_r17, (uint8_t)1u, (uint8_t)15u)); + } + if (group_bcfg_r17_present) { + HANDLE_CODE(group_bcfg_r17.ra_size_group_a_r17.pack(bref)); + HANDLE_CODE(group_bcfg_r17.msg_pwr_offset_group_b_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, group_bcfg_r17.nof_ra_preambs_group_a_r17, (uint8_t)1u, (uint8_t)64u)); + } + if (separate_msg_a_pusch_cfg_r17_present) { + HANDLE_CODE(separate_msg_a_pusch_cfg_r17.pack(bref)); + } + if (msg_a_rsrp_thres_r17_present) { + HANDLE_CODE(pack_integer(bref, msg_a_rsrp_thres_r17, (uint8_t)0u, (uint8_t)127u)); + } + if (rsrp_thres_ssb_r17_present) { + HANDLE_CODE(pack_integer(bref, rsrp_thres_ssb_r17, (uint8_t)0u, (uint8_t)127u)); + } + if (delta_preamb_r17_present) { + HANDLE_CODE(pack_integer(bref, delta_preamb_r17, (int8_t)-1, (int8_t)6)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE feature_combination_preambs_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ssb_shared_ro_mask_idx_r17_present, 1)); + HANDLE_CODE(bref.unpack(group_bcfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(separate_msg_a_pusch_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_rsrp_thres_r17_present, 1)); + HANDLE_CODE(bref.unpack(rsrp_thres_ssb_r17_present, 1)); + HANDLE_CODE(bref.unpack(delta_preamb_r17_present, 1)); + + HANDLE_CODE(feature_combination_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(start_preamb_for_this_partition_r17, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(nof_preambs_per_ssb_for_this_partition_r17, bref, (uint8_t)1u, (uint8_t)64u)); + if (ssb_shared_ro_mask_idx_r17_present) { + HANDLE_CODE(unpack_integer(ssb_shared_ro_mask_idx_r17, bref, (uint8_t)1u, (uint8_t)15u)); + } + if (group_bcfg_r17_present) { + HANDLE_CODE(group_bcfg_r17.ra_size_group_a_r17.unpack(bref)); + HANDLE_CODE(group_bcfg_r17.msg_pwr_offset_group_b_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(group_bcfg_r17.nof_ra_preambs_group_a_r17, bref, (uint8_t)1u, (uint8_t)64u)); + } + if (separate_msg_a_pusch_cfg_r17_present) { + HANDLE_CODE(separate_msg_a_pusch_cfg_r17.unpack(bref)); + } + if (msg_a_rsrp_thres_r17_present) { + HANDLE_CODE(unpack_integer(msg_a_rsrp_thres_r17, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (rsrp_thres_ssb_r17_present) { + HANDLE_CODE(unpack_integer(rsrp_thres_ssb_r17, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (delta_preamb_r17_present) { + HANDLE_CODE(unpack_integer(delta_preamb_r17, bref, (int8_t)-1, (int8_t)6)); + } + + return SRSASN_SUCCESS; +} +void feature_combination_preambs_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("featureCombination-r17"); + feature_combination_r17.to_json(j); + j.write_int("startPreambleForThisPartition-r17", start_preamb_for_this_partition_r17); + j.write_int("numberOfPreamblesPerSSB-ForThisPartition-r17", nof_preambs_per_ssb_for_this_partition_r17); + if (ssb_shared_ro_mask_idx_r17_present) { + j.write_int("ssb-SharedRO-MaskIndex-r17", ssb_shared_ro_mask_idx_r17); + } + if (group_bcfg_r17_present) { + j.write_fieldname("groupBconfigured-r17"); + j.start_obj(); + j.write_str("ra-SizeGroupA-r17", group_bcfg_r17.ra_size_group_a_r17.to_string()); + j.write_str("messagePowerOffsetGroupB-r17", group_bcfg_r17.msg_pwr_offset_group_b_r17.to_string()); + j.write_int("numberOfRA-PreamblesGroupA-r17", group_bcfg_r17.nof_ra_preambs_group_a_r17); + j.end_obj(); + } + if (separate_msg_a_pusch_cfg_r17_present) { + j.write_fieldname("separateMsgA-PUSCH-Config-r17"); + separate_msg_a_pusch_cfg_r17.to_json(j); + } + if (msg_a_rsrp_thres_r17_present) { + j.write_int("msgA-RSRP-Threshold-r17", msg_a_rsrp_thres_r17); + } + if (rsrp_thres_ssb_r17_present) { + j.write_int("rsrp-ThresholdSSB-r17", rsrp_thres_ssb_r17); + } + if (delta_preamb_r17_present) { + j.write_int("deltaPreamble-r17", delta_preamb_r17); + } + j.end_obj(); +} + +const char* feature_combination_preambs_r17_s::group_bcfg_r17_s_::ra_size_group_a_r17_opts::to_string() const +{ + static const char* names[] = {"b56", + "b144", + "b208", + "b256", + "b282", + "b480", + "b640", + "b800", + "b1000", + "b72", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx( + names, 16, value, "feature_combination_preambs_r17_s::group_bcfg_r17_s_::ra_size_group_a_r17_e_"); +} +uint16_t feature_combination_preambs_r17_s::group_bcfg_r17_s_::ra_size_group_a_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {56, 144, 208, 256, 282, 480, 640, 800, 1000, 72}; + return map_enum_number( + numbers, 10, value, "feature_combination_preambs_r17_s::group_bcfg_r17_s_::ra_size_group_a_r17_e_"); +} + +const char* feature_combination_preambs_r17_s::group_bcfg_r17_s_::msg_pwr_offset_group_b_r17_opts::to_string() const +{ + static const char* names[] = {"minusinfinity", "dB0", "dB5", "dB8", "dB10", "dB12", "dB15", "dB18"}; + return convert_enum_idx( + names, 8, value, "feature_combination_preambs_r17_s::group_bcfg_r17_s_::msg_pwr_offset_group_b_r17_e_"); +} +int8_t feature_combination_preambs_r17_s::group_bcfg_r17_s_::msg_pwr_offset_group_b_r17_opts::to_number() const +{ + static const int8_t numbers[] = {-1, 0, 5, 8, 10, 12, 15, 18}; + return map_enum_number( + numbers, 8, value, "feature_combination_preambs_r17_s::group_bcfg_r17_s_::msg_pwr_offset_group_b_r17_e_"); +} + +// GroupB-ConfiguredTwoStepRA-r16 ::= SEQUENCE +SRSASN_CODE group_b_cfg_two_step_ra_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(ra_msg_a_size_group_a.pack(bref)); + HANDLE_CODE(msg_pwr_offset_group_b.pack(bref)); + HANDLE_CODE(pack_integer(bref, nof_ra_preambs_group_a, (uint8_t)1u, (uint8_t)64u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE group_b_cfg_two_step_ra_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(ra_msg_a_size_group_a.unpack(bref)); + HANDLE_CODE(msg_pwr_offset_group_b.unpack(bref)); + HANDLE_CODE(unpack_integer(nof_ra_preambs_group_a, bref, (uint8_t)1u, (uint8_t)64u)); + + return SRSASN_SUCCESS; +} +void group_b_cfg_two_step_ra_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("ra-MsgA-SizeGroupA", ra_msg_a_size_group_a.to_string()); + j.write_str("messagePowerOffsetGroupB", msg_pwr_offset_group_b.to_string()); + j.write_int("numberOfRA-PreamblesGroupA", nof_ra_preambs_group_a); + j.end_obj(); +} + +const char* group_b_cfg_two_step_ra_r16_s::ra_msg_a_size_group_a_opts::to_string() const +{ + static const char* names[] = {"b56", + "b144", + "b208", + "b256", + "b282", + "b480", + "b640", + "b800", + "b1000", + "b72", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "group_b_cfg_two_step_ra_r16_s::ra_msg_a_size_group_a_e_"); +} +uint16_t group_b_cfg_two_step_ra_r16_s::ra_msg_a_size_group_a_opts::to_number() const +{ + static const uint16_t numbers[] = {56, 144, 208, 256, 282, 480, 640, 800, 1000, 72}; + return map_enum_number(numbers, 10, value, "group_b_cfg_two_step_ra_r16_s::ra_msg_a_size_group_a_e_"); +} + +const char* group_b_cfg_two_step_ra_r16_s::msg_pwr_offset_group_b_opts::to_string() const +{ + static const char* names[] = {"minusinfinity", "dB0", "dB5", "dB8", "dB10", "dB12", "dB15", "dB18"}; + return convert_enum_idx(names, 8, value, "group_b_cfg_two_step_ra_r16_s::msg_pwr_offset_group_b_e_"); +} +int8_t group_b_cfg_two_step_ra_r16_s::msg_pwr_offset_group_b_opts::to_number() const +{ + static const int8_t numbers[] = {-1, 0, 5, 8, 10, 12, 15, 18}; + return map_enum_number(numbers, 8, value, "group_b_cfg_two_step_ra_r16_s::msg_pwr_offset_group_b_e_"); +} + +// RA-PrioritizationForSlicing-r17 ::= SEQUENCE +SRSASN_CODE ra_prioritization_for_slicing_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, ra_prioritization_slice_info_list_r17, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ra_prioritization_for_slicing_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(ra_prioritization_slice_info_list_r17, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void ra_prioritization_for_slicing_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("ra-PrioritizationSliceInfoList-r17"); + for (const auto& e1 : ra_prioritization_slice_info_list_r17) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// RACH-ConfigGenericTwoStepRA-r16 ::= SEQUENCE +SRSASN_CODE rach_cfg_generic_two_step_ra_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(msg_a_prach_cfg_idx_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_ro_fdm_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_ro_freq_start_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_zero_correlation_zone_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_preamb_pwr_ramp_step_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_preamb_rx_target_pwr_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_b_resp_win_r16_present, 1)); + HANDLE_CODE(bref.pack(preamb_trans_max_r16_present, 1)); + + if (msg_a_prach_cfg_idx_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_prach_cfg_idx_r16, (uint16_t)0u, (uint16_t)262u)); + } + if (msg_a_ro_fdm_r16_present) { + HANDLE_CODE(msg_a_ro_fdm_r16.pack(bref)); + } + if (msg_a_ro_freq_start_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_ro_freq_start_r16, (uint16_t)0u, (uint16_t)274u)); + } + if (msg_a_zero_correlation_zone_cfg_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_zero_correlation_zone_cfg_r16, (uint8_t)0u, (uint8_t)15u)); + } + if (msg_a_preamb_pwr_ramp_step_r16_present) { + HANDLE_CODE(msg_a_preamb_pwr_ramp_step_r16.pack(bref)); + } + if (msg_a_preamb_rx_target_pwr_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_preamb_rx_target_pwr_r16, (int16_t)-202, (int16_t)-60)); + } + if (msg_b_resp_win_r16_present) { + HANDLE_CODE(msg_b_resp_win_r16.pack(bref)); + } + if (preamb_trans_max_r16_present) { + HANDLE_CODE(preamb_trans_max_r16.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= msg_b_resp_win_v1700_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(msg_b_resp_win_v1700_present, 1)); + if (msg_b_resp_win_v1700_present) { + HANDLE_CODE(msg_b_resp_win_v1700.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_generic_two_step_ra_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(msg_a_prach_cfg_idx_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_ro_fdm_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_ro_freq_start_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_zero_correlation_zone_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_preamb_pwr_ramp_step_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_preamb_rx_target_pwr_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_b_resp_win_r16_present, 1)); + HANDLE_CODE(bref.unpack(preamb_trans_max_r16_present, 1)); + + if (msg_a_prach_cfg_idx_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_prach_cfg_idx_r16, bref, (uint16_t)0u, (uint16_t)262u)); + } + if (msg_a_ro_fdm_r16_present) { + HANDLE_CODE(msg_a_ro_fdm_r16.unpack(bref)); + } + if (msg_a_ro_freq_start_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_ro_freq_start_r16, bref, (uint16_t)0u, (uint16_t)274u)); + } + if (msg_a_zero_correlation_zone_cfg_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_zero_correlation_zone_cfg_r16, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (msg_a_preamb_pwr_ramp_step_r16_present) { + HANDLE_CODE(msg_a_preamb_pwr_ramp_step_r16.unpack(bref)); + } + if (msg_a_preamb_rx_target_pwr_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_preamb_rx_target_pwr_r16, bref, (int16_t)-202, (int16_t)-60)); + } + if (msg_b_resp_win_r16_present) { + HANDLE_CODE(msg_b_resp_win_r16.unpack(bref)); + } + if (preamb_trans_max_r16_present) { + HANDLE_CODE(preamb_trans_max_r16.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(msg_b_resp_win_v1700_present, 1)); + if (msg_b_resp_win_v1700_present) { + HANDLE_CODE(msg_b_resp_win_v1700.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void rach_cfg_generic_two_step_ra_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (msg_a_prach_cfg_idx_r16_present) { + j.write_int("msgA-PRACH-ConfigurationIndex-r16", msg_a_prach_cfg_idx_r16); + } + if (msg_a_ro_fdm_r16_present) { + j.write_str("msgA-RO-FDM-r16", msg_a_ro_fdm_r16.to_string()); + } + if (msg_a_ro_freq_start_r16_present) { + j.write_int("msgA-RO-FrequencyStart-r16", msg_a_ro_freq_start_r16); + } + if (msg_a_zero_correlation_zone_cfg_r16_present) { + j.write_int("msgA-ZeroCorrelationZoneConfig-r16", msg_a_zero_correlation_zone_cfg_r16); + } + if (msg_a_preamb_pwr_ramp_step_r16_present) { + j.write_str("msgA-PreamblePowerRampingStep-r16", msg_a_preamb_pwr_ramp_step_r16.to_string()); + } + if (msg_a_preamb_rx_target_pwr_r16_present) { + j.write_int("msgA-PreambleReceivedTargetPower-r16", msg_a_preamb_rx_target_pwr_r16); + } + if (msg_b_resp_win_r16_present) { + j.write_str("msgB-ResponseWindow-r16", msg_b_resp_win_r16.to_string()); + } + if (preamb_trans_max_r16_present) { + j.write_str("preambleTransMax-r16", preamb_trans_max_r16.to_string()); + } + if (ext) { + if (msg_b_resp_win_v1700_present) { + j.write_str("msgB-ResponseWindow-v1700", msg_b_resp_win_v1700.to_string()); + } + } + j.end_obj(); +} + +const char* rach_cfg_generic_two_step_ra_r16_s::msg_a_ro_fdm_r16_opts::to_string() const +{ + static const char* names[] = {"one", "two", "four", "eight"}; + return convert_enum_idx(names, 4, value, "rach_cfg_generic_two_step_ra_r16_s::msg_a_ro_fdm_r16_e_"); +} +uint8_t rach_cfg_generic_two_step_ra_r16_s::msg_a_ro_fdm_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "rach_cfg_generic_two_step_ra_r16_s::msg_a_ro_fdm_r16_e_"); +} + +const char* rach_cfg_generic_two_step_ra_r16_s::msg_a_preamb_pwr_ramp_step_r16_opts::to_string() const +{ + static const char* names[] = {"dB0", "dB2", "dB4", "dB6"}; + return convert_enum_idx(names, 4, value, "rach_cfg_generic_two_step_ra_r16_s::msg_a_preamb_pwr_ramp_step_r16_e_"); +} +uint8_t rach_cfg_generic_two_step_ra_r16_s::msg_a_preamb_pwr_ramp_step_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 2, 4, 6}; + return map_enum_number(numbers, 4, value, "rach_cfg_generic_two_step_ra_r16_s::msg_a_preamb_pwr_ramp_step_r16_e_"); +} + +const char* rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_r16_opts::to_string() const +{ + static const char* names[] = {"sl1", "sl2", "sl4", "sl8", "sl10", "sl20", "sl40", "sl80", "sl160", "sl320"}; + return convert_enum_idx(names, 10, value, "rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_r16_e_"); +} +uint16_t rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {1, 2, 4, 8, 10, 20, 40, 80, 160, 320}; + return map_enum_number(numbers, 10, value, "rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_r16_e_"); +} + +const char* rach_cfg_generic_two_step_ra_r16_s::preamb_trans_max_r16_opts::to_string() const +{ + static const char* names[] = {"n3", "n4", "n5", "n6", "n7", "n8", "n10", "n20", "n50", "n100", "n200"}; + return convert_enum_idx(names, 11, value, "rach_cfg_generic_two_step_ra_r16_s::preamb_trans_max_r16_e_"); +} +uint8_t rach_cfg_generic_two_step_ra_r16_s::preamb_trans_max_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {3, 4, 5, 6, 7, 8, 10, 20, 50, 100, 200}; + return map_enum_number(numbers, 11, value, "rach_cfg_generic_two_step_ra_r16_s::preamb_trans_max_r16_e_"); +} + +const char* rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_v1700_opts::to_string() const +{ + static const char* names[] = {"sl240", "sl640", "sl960", "sl1280", "sl1920", "sl2560"}; + return convert_enum_idx(names, 6, value, "rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_v1700_e_"); +} +uint16_t rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_v1700_opts::to_number() const +{ + static const uint16_t numbers[] = {240, 640, 960, 1280, 1920, 2560}; + return map_enum_number(numbers, 6, value, "rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_v1700_e_"); +} + +// RACH-ConfigCommonTwoStepRA-r16 ::= SEQUENCE +SRSASN_CODE rach_cfg_common_two_step_ra_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(msg_a_total_nof_ra_preambs_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_cb_preambs_per_ssb_per_shared_ro_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_ssb_shared_ro_mask_idx_r16_present, 1)); + HANDLE_CODE(bref.pack(group_b_cfg_two_step_ra_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_prach_root_seq_idx_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_trans_max_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_rsrp_thres_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_rsrp_thres_ssb_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_subcarrier_spacing_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_restricted_set_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(ra_prioritization_for_access_id_two_step_r16_present, 1)); + HANDLE_CODE(bref.pack(ra_contention_resolution_timer_r16_present, 1)); + + HANDLE_CODE(rach_cfg_generic_two_step_ra_r16.pack(bref)); + if (msg_a_total_nof_ra_preambs_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_total_nof_ra_preambs_r16, (uint8_t)1u, (uint8_t)63u)); + } + if (msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_present) { + HANDLE_CODE(msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16.pack(bref)); + } + if (msg_a_cb_preambs_per_ssb_per_shared_ro_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_cb_preambs_per_ssb_per_shared_ro_r16, (uint8_t)1u, (uint8_t)60u)); + } + if (msg_a_ssb_shared_ro_mask_idx_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_ssb_shared_ro_mask_idx_r16, (uint8_t)1u, (uint8_t)15u)); + } + if (group_b_cfg_two_step_ra_r16_present) { + HANDLE_CODE(group_b_cfg_two_step_ra_r16.pack(bref)); + } + if (msg_a_prach_root_seq_idx_r16_present) { + HANDLE_CODE(msg_a_prach_root_seq_idx_r16.pack(bref)); + } + if (msg_a_trans_max_r16_present) { + HANDLE_CODE(msg_a_trans_max_r16.pack(bref)); + } + if (msg_a_rsrp_thres_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_rsrp_thres_r16, (uint8_t)0u, (uint8_t)127u)); + } + if (msg_a_rsrp_thres_ssb_r16_present) { + HANDLE_CODE(pack_integer(bref, msg_a_rsrp_thres_ssb_r16, (uint8_t)0u, (uint8_t)127u)); + } + if (msg_a_subcarrier_spacing_r16_present) { + HANDLE_CODE(msg_a_subcarrier_spacing_r16.pack(bref)); + } + if (msg_a_restricted_set_cfg_r16_present) { + HANDLE_CODE(msg_a_restricted_set_cfg_r16.pack(bref)); + } + if (ra_prioritization_for_access_id_two_step_r16_present) { + HANDLE_CODE(ra_prioritization_for_access_id_two_step_r16.ra_prioritization_r16.pack(bref)); + HANDLE_CODE(ra_prioritization_for_access_id_two_step_r16.ra_prioritization_for_ai_r16.pack(bref)); + } + if (ra_contention_resolution_timer_r16_present) { + HANDLE_CODE(ra_contention_resolution_timer_r16.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= ra_prioritization_for_slicing_two_step_r17.is_present(); + group_flags[0] |= feature_combination_preambs_list_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ra_prioritization_for_slicing_two_step_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(feature_combination_preambs_list_r17.is_present(), 1)); + if (ra_prioritization_for_slicing_two_step_r17.is_present()) { + HANDLE_CODE(ra_prioritization_for_slicing_two_step_r17->pack(bref)); + } + if (feature_combination_preambs_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *feature_combination_preambs_list_r17, 1, 256)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_common_two_step_ra_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(msg_a_total_nof_ra_preambs_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_cb_preambs_per_ssb_per_shared_ro_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_ssb_shared_ro_mask_idx_r16_present, 1)); + HANDLE_CODE(bref.unpack(group_b_cfg_two_step_ra_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_prach_root_seq_idx_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_trans_max_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_rsrp_thres_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_rsrp_thres_ssb_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_subcarrier_spacing_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_restricted_set_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(ra_prioritization_for_access_id_two_step_r16_present, 1)); + HANDLE_CODE(bref.unpack(ra_contention_resolution_timer_r16_present, 1)); + + HANDLE_CODE(rach_cfg_generic_two_step_ra_r16.unpack(bref)); + if (msg_a_total_nof_ra_preambs_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_total_nof_ra_preambs_r16, bref, (uint8_t)1u, (uint8_t)63u)); + } + if (msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_present) { + HANDLE_CODE(msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16.unpack(bref)); + } + if (msg_a_cb_preambs_per_ssb_per_shared_ro_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_cb_preambs_per_ssb_per_shared_ro_r16, bref, (uint8_t)1u, (uint8_t)60u)); + } + if (msg_a_ssb_shared_ro_mask_idx_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_ssb_shared_ro_mask_idx_r16, bref, (uint8_t)1u, (uint8_t)15u)); + } + if (group_b_cfg_two_step_ra_r16_present) { + HANDLE_CODE(group_b_cfg_two_step_ra_r16.unpack(bref)); + } + if (msg_a_prach_root_seq_idx_r16_present) { + HANDLE_CODE(msg_a_prach_root_seq_idx_r16.unpack(bref)); + } + if (msg_a_trans_max_r16_present) { + HANDLE_CODE(msg_a_trans_max_r16.unpack(bref)); + } + if (msg_a_rsrp_thres_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_rsrp_thres_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (msg_a_rsrp_thres_ssb_r16_present) { + HANDLE_CODE(unpack_integer(msg_a_rsrp_thres_ssb_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (msg_a_subcarrier_spacing_r16_present) { + HANDLE_CODE(msg_a_subcarrier_spacing_r16.unpack(bref)); + } + if (msg_a_restricted_set_cfg_r16_present) { + HANDLE_CODE(msg_a_restricted_set_cfg_r16.unpack(bref)); + } + if (ra_prioritization_for_access_id_two_step_r16_present) { + HANDLE_CODE(ra_prioritization_for_access_id_two_step_r16.ra_prioritization_r16.unpack(bref)); + HANDLE_CODE(ra_prioritization_for_access_id_two_step_r16.ra_prioritization_for_ai_r16.unpack(bref)); + } + if (ra_contention_resolution_timer_r16_present) { + HANDLE_CODE(ra_contention_resolution_timer_r16.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); + + unpack_presence_flag(ra_prioritization_for_slicing_two_step_r17, bref); + unpack_presence_flag(feature_combination_preambs_list_r17, bref); + if (ra_prioritization_for_slicing_two_step_r17.is_present()) { + HANDLE_CODE(ra_prioritization_for_slicing_two_step_r17->unpack(bref)); + } + if (feature_combination_preambs_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*feature_combination_preambs_list_r17, bref, 1, 256)); + } + } + } + return SRSASN_SUCCESS; +} +void rach_cfg_common_two_step_ra_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rach-ConfigGenericTwoStepRA-r16"); + rach_cfg_generic_two_step_ra_r16.to_json(j); + if (msg_a_total_nof_ra_preambs_r16_present) { + j.write_int("msgA-TotalNumberOfRA-Preambles-r16", msg_a_total_nof_ra_preambs_r16); + } + if (msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_present) { + j.write_fieldname("msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); + msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16.to_json(j); + } + if (msg_a_cb_preambs_per_ssb_per_shared_ro_r16_present) { + j.write_int("msgA-CB-PreamblesPerSSB-PerSharedRO-r16", msg_a_cb_preambs_per_ssb_per_shared_ro_r16); + } + if (msg_a_ssb_shared_ro_mask_idx_r16_present) { + j.write_int("msgA-SSB-SharedRO-MaskIndex-r16", msg_a_ssb_shared_ro_mask_idx_r16); + } + if (group_b_cfg_two_step_ra_r16_present) { + j.write_fieldname("groupB-ConfiguredTwoStepRA-r16"); + group_b_cfg_two_step_ra_r16.to_json(j); + } + if (msg_a_prach_root_seq_idx_r16_present) { + j.write_fieldname("msgA-PRACH-RootSequenceIndex-r16"); + msg_a_prach_root_seq_idx_r16.to_json(j); + } + if (msg_a_trans_max_r16_present) { + j.write_str("msgA-TransMax-r16", msg_a_trans_max_r16.to_string()); + } + if (msg_a_rsrp_thres_r16_present) { + j.write_int("msgA-RSRP-Threshold-r16", msg_a_rsrp_thres_r16); + } + if (msg_a_rsrp_thres_ssb_r16_present) { + j.write_int("msgA-RSRP-ThresholdSSB-r16", msg_a_rsrp_thres_ssb_r16); + } + if (msg_a_subcarrier_spacing_r16_present) { + j.write_str("msgA-SubcarrierSpacing-r16", msg_a_subcarrier_spacing_r16.to_string()); + } + if (msg_a_restricted_set_cfg_r16_present) { + j.write_str("msgA-RestrictedSetConfig-r16", msg_a_restricted_set_cfg_r16.to_string()); + } + if (ra_prioritization_for_access_id_two_step_r16_present) { + j.write_fieldname("ra-PrioritizationForAccessIdentityTwoStep-r16"); + j.start_obj(); + j.write_fieldname("ra-Prioritization-r16"); + ra_prioritization_for_access_id_two_step_r16.ra_prioritization_r16.to_json(j); + j.write_str("ra-PrioritizationForAI-r16", + ra_prioritization_for_access_id_two_step_r16.ra_prioritization_for_ai_r16.to_string()); + j.end_obj(); + } + if (ra_contention_resolution_timer_r16_present) { + j.write_str("ra-ContentionResolutionTimer-r16", ra_contention_resolution_timer_r16.to_string()); + } + if (ext) { + if (ra_prioritization_for_slicing_two_step_r17.is_present()) { + j.write_fieldname("ra-PrioritizationForSlicingTwoStep-r17"); + ra_prioritization_for_slicing_two_step_r17->to_json(j); + } + if (feature_combination_preambs_list_r17.is_present()) { + j.start_array("featureCombinationPreamblesList-r17"); + for (const auto& e1 : *feature_combination_preambs_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +void rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::destroy_() {} +void rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_:: + msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_( + const rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::one_eighth: + c.init(other.c.get()); + break; + case types::one_fourth: + c.init(other.c.get()); + break; + case types::one_half: + c.init(other.c.get()); + break; + case types::one: + c.init(other.c.get()); + break; + case types::two: + c.init(other.c.get()); + break; + case types::four: + c.init(other.c.get()); + break; + case types::eight: + c.init(other.c.get()); + break; + case types::sixteen: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_"); + } +} +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_& +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::operator=( + const rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::one_eighth: + c.set(other.c.get()); + break; + case types::one_fourth: + c.set(other.c.get()); + break; + case types::one_half: + c.set(other.c.get()); + break; + case types::one: + c.set(other.c.get()); + break; + case types::two: + c.set(other.c.get()); + break; + case types::four: + c.set(other.c.get()); + break; + case types::eight: + c.set(other.c.get()); + break; + case types::sixteen: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_"); + } + + return *this; +} +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_eighth_e_& +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_one_eighth() +{ + set(types::one_eighth); + return c.get(); +} +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_fourth_e_& +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_one_fourth() +{ + set(types::one_fourth); + return c.get(); +} +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_half_e_& +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_one_half() +{ + set(types::one_half); + return c.get(); +} +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_e_& +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_one() +{ + set(types::one); + return c.get(); +} +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::two_e_& +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_two() +{ + set(types::two); + return c.get(); +} +uint8_t& rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_four() +{ + set(types::four); + return c.get(); +} +uint8_t& rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_eight() +{ + set(types::eight); + return c.get(); +} +uint8_t& rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_sixteen() +{ + set(types::sixteen); + return c.get(); +} +void rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::to_json( + json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::one_eighth: + j.write_str("oneEighth", c.get().to_string()); + break; + case types::one_fourth: + j.write_str("oneFourth", c.get().to_string()); + break; + case types::one_half: + j.write_str("oneHalf", c.get().to_string()); + break; + case types::one: + j.write_str("one", c.get().to_string()); + break; + case types::two: + j.write_str("two", c.get().to_string()); + break; + case types::four: + j.write_int("four", c.get()); + break; + case types::eight: + j.write_int("eight", c.get()); + break; + case types::sixteen: + j.write_int("sixteen", c.get()); + break; + default: + log_invalid_choice_id( + type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::one_eighth: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::one_fourth: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::one_half: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::one: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::two: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::four: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)16u)); + break; + case types::eight: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)8u)); + break; + case types::sixteen: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)4u)); + break; + default: + log_invalid_choice_id( + type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::one_eighth: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::one_fourth: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::one_half: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::one: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::two: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::four: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)16u)); + break; + case types::eight: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)8u)); + break; + case types::sixteen: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)4u)); + break; + default: + log_invalid_choice_id( + type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_:: + one_eighth_opts::to_string() const +{ + static const char* names[] = { + "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; + return convert_enum_idx( + names, + 16, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_eighth_e_"); +} +uint8_t rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_eighth_opts:: + to_number() const +{ + static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number( + numbers, + 16, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_eighth_e_"); +} + +const char* rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_:: + one_fourth_opts::to_string() const +{ + static const char* names[] = { + "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; + return convert_enum_idx( + names, + 16, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_fourth_e_"); +} +uint8_t rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_fourth_opts:: + to_number() const +{ + static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number( + numbers, + 16, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_fourth_e_"); +} + +const char* +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_half_opts::to_string() + const +{ + static const char* names[] = { + "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; + return convert_enum_idx( + names, + 16, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_half_e_"); +} +uint8_t +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_half_opts::to_number() + const +{ + static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number( + numbers, + 16, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_half_e_"); +} + +const char* +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_opts::to_string() + const +{ + static const char* names[] = { + "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; + return convert_enum_idx( + names, + 16, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_e_"); +} +uint8_t +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_opts::to_number() + const +{ + static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number( + numbers, + 16, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_e_"); +} + +const char* +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::two_opts::to_string() + const +{ + static const char* names[] = {"n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32"}; + return convert_enum_idx( + names, + 8, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::two_e_"); +} +uint8_t +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::two_opts::to_number() + const +{ + static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32}; + return map_enum_number( + numbers, + 8, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::two_e_"); +} + +const char* +rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::types_opts::to_string() + const +{ + static const char* names[] = {"oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; + return convert_enum_idx( + names, + 8, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::types"); +} +float rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::types_opts:: + to_number() const +{ + static const float numbers[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; + return map_enum_number( + numbers, + 8, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::types"); +} +const char* rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::types_opts:: + to_number_string() const +{ + static const char* number_strs[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; + return convert_enum_idx( + number_strs, + 8, + value, + "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::types"); +} + +void rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::destroy_() {} +void rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::msg_a_prach_root_seq_idx_r16_c_( + const rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::l839: + c.init(other.c.get()); + break; + case types::l139: + c.init(other.c.get()); + break; + case types::l571: + c.init(other.c.get()); + break; + case types::l1151: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_"); + } +} +rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_& +rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::operator=( + const rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::l839: + c.set(other.c.get()); + break; + case types::l139: + c.set(other.c.get()); + break; + case types::l571: + c.set(other.c.get()); + break; + case types::l1151: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_"); + } + + return *this; +} +uint16_t& rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::set_l839() +{ + set(types::l839); + return c.get(); +} +uint8_t& rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::set_l139() +{ + set(types::l139); + return c.get(); +} +uint16_t& rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::set_l571() +{ + set(types::l571); + return c.get(); +} +uint16_t& rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::set_l1151() +{ + set(types::l1151); + return c.get(); +} +void rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::l839: + j.write_int("l839", c.get()); + break; + case types::l139: + j.write_int("l139", c.get()); + break; + case types::l571: + j.write_int("l571", c.get()); + break; + case types::l1151: + j.write_int("l1151", c.get()); + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::l839: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)837u)); + break; + case types::l139: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)137u)); + break; + case types::l571: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)569u)); + break; + case types::l1151: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1149u)); + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::l839: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)837u)); + break; + case types::l139: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)137u)); + break; + case types::l571: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)569u)); + break; + case types::l1151: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1149u)); + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"l839", "l139", "l571", "l1151"}; + return convert_enum_idx(names, 4, value, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::types"); +} +uint16_t rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {839, 139, 571, 1151}; + return map_enum_number( + numbers, 4, value, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::types"); +} + +const char* rach_cfg_common_two_step_ra_r16_s::msg_a_trans_max_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n4", "n6", "n8", "n10", "n20", "n50", "n100", "n200"}; + return convert_enum_idx(names, 10, value, "rach_cfg_common_two_step_ra_r16_s::msg_a_trans_max_r16_e_"); +} +uint8_t rach_cfg_common_two_step_ra_r16_s::msg_a_trans_max_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 6, 8, 10, 20, 50, 100, 200}; + return map_enum_number(numbers, 10, value, "rach_cfg_common_two_step_ra_r16_s::msg_a_trans_max_r16_e_"); +} + +const char* rach_cfg_common_two_step_ra_r16_s::msg_a_restricted_set_cfg_r16_opts::to_string() const +{ + static const char* names[] = {"unrestrictedSet", "restrictedSetTypeA", "restrictedSetTypeB"}; + return convert_enum_idx(names, 3, value, "rach_cfg_common_two_step_ra_r16_s::msg_a_restricted_set_cfg_r16_e_"); +} + +const char* rach_cfg_common_two_step_ra_r16_s::ra_contention_resolution_timer_r16_opts::to_string() const +{ + static const char* names[] = {"sf8", "sf16", "sf24", "sf32", "sf40", "sf48", "sf56", "sf64"}; + return convert_enum_idx(names, 8, value, "rach_cfg_common_two_step_ra_r16_s::ra_contention_resolution_timer_r16_e_"); +} +uint8_t rach_cfg_common_two_step_ra_r16_s::ra_contention_resolution_timer_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {8, 16, 24, 32, 40, 48, 56, 64}; + return map_enum_number(numbers, 8, value, "rach_cfg_common_two_step_ra_r16_s::ra_contention_resolution_timer_r16_e_"); +} + +// RACH-ConfigGeneric ::= SEQUENCE +SRSASN_CODE rach_cfg_generic_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, prach_cfg_idx, (uint16_t)0u, (uint16_t)255u)); + HANDLE_CODE(msg1_fdm.pack(bref)); + HANDLE_CODE(pack_integer(bref, msg1_freq_start, (uint16_t)0u, (uint16_t)274u)); + HANDLE_CODE(pack_integer(bref, zero_correlation_zone_cfg, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(pack_integer(bref, preamb_rx_target_pwr, (int16_t)-202, (int16_t)-60)); + HANDLE_CODE(preamb_trans_max.pack(bref)); + HANDLE_CODE(pwr_ramp_step.pack(bref)); + HANDLE_CODE(ra_resp_win.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= prach_cfg_period_scaling_iab_r16_present; + group_flags[0] |= prach_cfg_frame_offset_iab_r16_present; + group_flags[0] |= prach_cfg_s_offset_iab_r16_present; + group_flags[0] |= ra_resp_win_v1610_present; + group_flags[0] |= prach_cfg_idx_v1610_present; + group_flags[1] |= ra_resp_win_v1700_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(prach_cfg_period_scaling_iab_r16_present, 1)); + HANDLE_CODE(bref.pack(prach_cfg_frame_offset_iab_r16_present, 1)); + HANDLE_CODE(bref.pack(prach_cfg_s_offset_iab_r16_present, 1)); + HANDLE_CODE(bref.pack(ra_resp_win_v1610_present, 1)); + HANDLE_CODE(bref.pack(prach_cfg_idx_v1610_present, 1)); + if (prach_cfg_period_scaling_iab_r16_present) { + HANDLE_CODE(prach_cfg_period_scaling_iab_r16.pack(bref)); + } + if (prach_cfg_frame_offset_iab_r16_present) { + HANDLE_CODE(pack_integer(bref, prach_cfg_frame_offset_iab_r16, (uint8_t)0u, (uint8_t)63u)); + } + if (prach_cfg_s_offset_iab_r16_present) { + HANDLE_CODE(pack_integer(bref, prach_cfg_s_offset_iab_r16, (uint8_t)0u, (uint8_t)39u)); + } + if (ra_resp_win_v1610_present) { + HANDLE_CODE(ra_resp_win_v1610.pack(bref)); + } + if (prach_cfg_idx_v1610_present) { + HANDLE_CODE(pack_integer(bref, prach_cfg_idx_v1610, (uint16_t)256u, (uint16_t)262u)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ra_resp_win_v1700_present, 1)); + if (ra_resp_win_v1700_present) { + HANDLE_CODE(ra_resp_win_v1700.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_generic_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(prach_cfg_idx, bref, (uint16_t)0u, (uint16_t)255u)); + HANDLE_CODE(msg1_fdm.unpack(bref)); + HANDLE_CODE(unpack_integer(msg1_freq_start, bref, (uint16_t)0u, (uint16_t)274u)); + HANDLE_CODE(unpack_integer(zero_correlation_zone_cfg, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(unpack_integer(preamb_rx_target_pwr, bref, (int16_t)-202, (int16_t)-60)); + HANDLE_CODE(preamb_trans_max.unpack(bref)); + HANDLE_CODE(pwr_ramp_step.unpack(bref)); + HANDLE_CODE(ra_resp_win.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(prach_cfg_period_scaling_iab_r16_present, 1)); + HANDLE_CODE(bref.unpack(prach_cfg_frame_offset_iab_r16_present, 1)); + HANDLE_CODE(bref.unpack(prach_cfg_s_offset_iab_r16_present, 1)); + HANDLE_CODE(bref.unpack(ra_resp_win_v1610_present, 1)); + HANDLE_CODE(bref.unpack(prach_cfg_idx_v1610_present, 1)); + if (prach_cfg_period_scaling_iab_r16_present) { + HANDLE_CODE(prach_cfg_period_scaling_iab_r16.unpack(bref)); + } + if (prach_cfg_frame_offset_iab_r16_present) { + HANDLE_CODE(unpack_integer(prach_cfg_frame_offset_iab_r16, bref, (uint8_t)0u, (uint8_t)63u)); + } + if (prach_cfg_s_offset_iab_r16_present) { + HANDLE_CODE(unpack_integer(prach_cfg_s_offset_iab_r16, bref, (uint8_t)0u, (uint8_t)39u)); + } + if (ra_resp_win_v1610_present) { + HANDLE_CODE(ra_resp_win_v1610.unpack(bref)); + } + if (prach_cfg_idx_v1610_present) { + HANDLE_CODE(unpack_integer(prach_cfg_idx_v1610, bref, (uint16_t)256u, (uint16_t)262u)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(ra_resp_win_v1700_present, 1)); + if (ra_resp_win_v1700_present) { + HANDLE_CODE(ra_resp_win_v1700.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void rach_cfg_generic_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("prach-ConfigurationIndex", prach_cfg_idx); + j.write_str("msg1-FDM", msg1_fdm.to_string()); + j.write_int("msg1-FrequencyStart", msg1_freq_start); + j.write_int("zeroCorrelationZoneConfig", zero_correlation_zone_cfg); + j.write_int("preambleReceivedTargetPower", preamb_rx_target_pwr); + j.write_str("preambleTransMax", preamb_trans_max.to_string()); + j.write_str("powerRampingStep", pwr_ramp_step.to_string()); + j.write_str("ra-ResponseWindow", ra_resp_win.to_string()); + if (ext) { + if (prach_cfg_period_scaling_iab_r16_present) { + j.write_str("prach-ConfigurationPeriodScaling-IAB-r16", prach_cfg_period_scaling_iab_r16.to_string()); + } + if (prach_cfg_frame_offset_iab_r16_present) { + j.write_int("prach-ConfigurationFrameOffset-IAB-r16", prach_cfg_frame_offset_iab_r16); + } + if (prach_cfg_s_offset_iab_r16_present) { + j.write_int("prach-ConfigurationSOffset-IAB-r16", prach_cfg_s_offset_iab_r16); + } + if (ra_resp_win_v1610_present) { + j.write_str("ra-ResponseWindow-v1610", ra_resp_win_v1610.to_string()); + } + if (prach_cfg_idx_v1610_present) { + j.write_int("prach-ConfigurationIndex-v1610", prach_cfg_idx_v1610); + } + if (ra_resp_win_v1700_present) { + j.write_str("ra-ResponseWindow-v1700", ra_resp_win_v1700.to_string()); + } + } + j.end_obj(); +} + +const char* rach_cfg_generic_s::msg1_fdm_opts::to_string() const +{ + static const char* names[] = {"one", "two", "four", "eight"}; + return convert_enum_idx(names, 4, value, "rach_cfg_generic_s::msg1_fdm_e_"); +} +uint8_t rach_cfg_generic_s::msg1_fdm_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "rach_cfg_generic_s::msg1_fdm_e_"); +} + +const char* rach_cfg_generic_s::preamb_trans_max_opts::to_string() const +{ + static const char* names[] = {"n3", "n4", "n5", "n6", "n7", "n8", "n10", "n20", "n50", "n100", "n200"}; + return convert_enum_idx(names, 11, value, "rach_cfg_generic_s::preamb_trans_max_e_"); +} +uint8_t rach_cfg_generic_s::preamb_trans_max_opts::to_number() const +{ + static const uint8_t numbers[] = {3, 4, 5, 6, 7, 8, 10, 20, 50, 100, 200}; + return map_enum_number(numbers, 11, value, "rach_cfg_generic_s::preamb_trans_max_e_"); +} + +const char* rach_cfg_generic_s::pwr_ramp_step_opts::to_string() const +{ + static const char* names[] = {"dB0", "dB2", "dB4", "dB6"}; + return convert_enum_idx(names, 4, value, "rach_cfg_generic_s::pwr_ramp_step_e_"); +} +uint8_t rach_cfg_generic_s::pwr_ramp_step_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 2, 4, 6}; + return map_enum_number(numbers, 4, value, "rach_cfg_generic_s::pwr_ramp_step_e_"); +} + +const char* rach_cfg_generic_s::ra_resp_win_opts::to_string() const +{ + static const char* names[] = {"sl1", "sl2", "sl4", "sl8", "sl10", "sl20", "sl40", "sl80"}; + return convert_enum_idx(names, 8, value, "rach_cfg_generic_s::ra_resp_win_e_"); +} +uint8_t rach_cfg_generic_s::ra_resp_win_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8, 10, 20, 40, 80}; + return map_enum_number(numbers, 8, value, "rach_cfg_generic_s::ra_resp_win_e_"); +} + +const char* rach_cfg_generic_s::prach_cfg_period_scaling_iab_r16_opts::to_string() const +{ + static const char* names[] = {"scf1", "scf2", "scf4", "scf8", "scf16", "scf32", "scf64"}; + return convert_enum_idx(names, 7, value, "rach_cfg_generic_s::prach_cfg_period_scaling_iab_r16_e_"); +} +uint8_t rach_cfg_generic_s::prach_cfg_period_scaling_iab_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8, 16, 32, 64}; + return map_enum_number(numbers, 7, value, "rach_cfg_generic_s::prach_cfg_period_scaling_iab_r16_e_"); +} + +const char* rach_cfg_generic_s::ra_resp_win_v1610_opts::to_string() const +{ + static const char* names[] = {"sl60", "sl160"}; + return convert_enum_idx(names, 2, value, "rach_cfg_generic_s::ra_resp_win_v1610_e_"); +} +uint8_t rach_cfg_generic_s::ra_resp_win_v1610_opts::to_number() const +{ + static const uint8_t numbers[] = {60, 160}; + return map_enum_number(numbers, 2, value, "rach_cfg_generic_s::ra_resp_win_v1610_e_"); +} + +const char* rach_cfg_generic_s::ra_resp_win_v1700_opts::to_string() const +{ + static const char* names[] = {"sl240", "sl320", "sl640", "sl960", "sl1280", "sl1920", "sl2560"}; + return convert_enum_idx(names, 7, value, "rach_cfg_generic_s::ra_resp_win_v1700_e_"); +} +uint16_t rach_cfg_generic_s::ra_resp_win_v1700_opts::to_number() const +{ + static const uint16_t numbers[] = {240, 320, 640, 960, 1280, 1920, 2560}; + return map_enum_number(numbers, 7, value, "rach_cfg_generic_s::ra_resp_win_v1700_e_"); +} + +// MsgA-ConfigCommon-r16 ::= SEQUENCE +SRSASN_CODE msg_a_cfg_common_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(msg_a_pusch_cfg_r16_present, 1)); + + HANDLE_CODE(rach_cfg_common_two_step_ra_r16.pack(bref)); + if (msg_a_pusch_cfg_r16_present) { + HANDLE_CODE(msg_a_pusch_cfg_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE msg_a_cfg_common_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(msg_a_pusch_cfg_r16_present, 1)); + + HANDLE_CODE(rach_cfg_common_two_step_ra_r16.unpack(bref)); + if (msg_a_pusch_cfg_r16_present) { + HANDLE_CODE(msg_a_pusch_cfg_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void msg_a_cfg_common_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rach-ConfigCommonTwoStepRA-r16"); + rach_cfg_common_two_step_ra_r16.to_json(j); + if (msg_a_pusch_cfg_r16_present) { + j.write_fieldname("msgA-PUSCH-Config-r16"); + msg_a_pusch_cfg_r16.to_json(j); + } + j.end_obj(); +} + +// PDSCH-TimeDomainResourceAllocation ::= SEQUENCE +SRSASN_CODE pdsch_time_domain_res_alloc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(k0_present, 1)); + + if (k0_present) { + HANDLE_CODE(pack_integer(bref, k0, (uint8_t)0u, (uint8_t)32u)); + } + HANDLE_CODE(map_type.pack(bref)); + HANDLE_CODE(pack_integer(bref, start_symbol_and_len, (uint8_t)0u, (uint8_t)127u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_time_domain_res_alloc_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(k0_present, 1)); + + if (k0_present) { + HANDLE_CODE(unpack_integer(k0, bref, (uint8_t)0u, (uint8_t)32u)); + } + HANDLE_CODE(map_type.unpack(bref)); + HANDLE_CODE(unpack_integer(start_symbol_and_len, bref, (uint8_t)0u, (uint8_t)127u)); + + return SRSASN_SUCCESS; +} +void pdsch_time_domain_res_alloc_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (k0_present) { + j.write_int("k0", k0); + } + j.write_str("mappingType", map_type.to_string()); + j.write_int("startSymbolAndLength", start_symbol_and_len); + j.end_obj(); +} + +const char* pdsch_time_domain_res_alloc_s::map_type_opts::to_string() const +{ + static const char* names[] = {"typeA", "typeB"}; + return convert_enum_idx(names, 2, value, "pdsch_time_domain_res_alloc_s::map_type_e_"); +} + +// PDSCH-TimeDomainResourceAllocation-r16 ::= SEQUENCE +SRSASN_CODE pdsch_time_domain_res_alloc_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(k0_r16_present, 1)); + HANDLE_CODE(bref.pack(repeat_num_r16_present, 1)); + + if (k0_r16_present) { + HANDLE_CODE(pack_integer(bref, k0_r16, (uint8_t)0u, (uint8_t)32u)); + } + HANDLE_CODE(map_type_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, start_symbol_and_len_r16, (uint8_t)0u, (uint8_t)127u)); + if (repeat_num_r16_present) { + HANDLE_CODE(repeat_num_r16.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= k0_v1710_present; + group_flags[1] |= repeat_num_v1730_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(k0_v1710_present, 1)); + if (k0_v1710_present) { + HANDLE_CODE(pack_integer(bref, k0_v1710, (uint8_t)33u, (uint8_t)128u)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(repeat_num_v1730_present, 1)); + if (repeat_num_v1730_present) { + HANDLE_CODE(repeat_num_v1730.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_time_domain_res_alloc_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(k0_r16_present, 1)); + HANDLE_CODE(bref.unpack(repeat_num_r16_present, 1)); + + if (k0_r16_present) { + HANDLE_CODE(unpack_integer(k0_r16, bref, (uint8_t)0u, (uint8_t)32u)); + } + HANDLE_CODE(map_type_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(start_symbol_and_len_r16, bref, (uint8_t)0u, (uint8_t)127u)); + if (repeat_num_r16_present) { + HANDLE_CODE(repeat_num_r16.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(k0_v1710_present, 1)); + if (k0_v1710_present) { + HANDLE_CODE(unpack_integer(k0_v1710, bref, (uint8_t)33u, (uint8_t)128u)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(repeat_num_v1730_present, 1)); + if (repeat_num_v1730_present) { + HANDLE_CODE(repeat_num_v1730.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void pdsch_time_domain_res_alloc_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (k0_r16_present) { + j.write_int("k0-r16", k0_r16); + } + j.write_str("mappingType-r16", map_type_r16.to_string()); + j.write_int("startSymbolAndLength-r16", start_symbol_and_len_r16); + if (repeat_num_r16_present) { + j.write_str("repetitionNumber-r16", repeat_num_r16.to_string()); + } + if (ext) { + if (k0_v1710_present) { + j.write_int("k0-v1710", k0_v1710); + } + if (repeat_num_v1730_present) { + j.write_str("repetitionNumber-v1730", repeat_num_v1730.to_string()); + } + } + j.end_obj(); +} + +const char* pdsch_time_domain_res_alloc_r16_s::map_type_r16_opts::to_string() const +{ + static const char* names[] = {"typeA", "typeB"}; + return convert_enum_idx(names, 2, value, "pdsch_time_domain_res_alloc_r16_s::map_type_r16_e_"); +} + +const char* pdsch_time_domain_res_alloc_r16_s::repeat_num_r16_opts::to_string() const +{ + static const char* names[] = {"n2", "n3", "n4", "n5", "n6", "n7", "n8", "n16"}; + return convert_enum_idx(names, 8, value, "pdsch_time_domain_res_alloc_r16_s::repeat_num_r16_e_"); +} +uint8_t pdsch_time_domain_res_alloc_r16_s::repeat_num_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 3, 4, 5, 6, 7, 8, 16}; + return map_enum_number(numbers, 8, value, "pdsch_time_domain_res_alloc_r16_s::repeat_num_r16_e_"); +} + +const char* pdsch_time_domain_res_alloc_r16_s::repeat_num_v1730_opts::to_string() const +{ + static const char* names[] = {"n2", "n3", "n4", "n5", "n6", "n7", "n8", "n16"}; + return convert_enum_idx(names, 8, value, "pdsch_time_domain_res_alloc_r16_s::repeat_num_v1730_e_"); +} +uint8_t pdsch_time_domain_res_alloc_r16_s::repeat_num_v1730_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 3, 4, 5, 6, 7, 8, 16}; + return map_enum_number(numbers, 8, value, "pdsch_time_domain_res_alloc_r16_s::repeat_num_v1730_e_"); +} + +// PUSCH-TimeDomainResourceAllocation ::= SEQUENCE +SRSASN_CODE pusch_time_domain_res_alloc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(k2_present, 1)); + + if (k2_present) { + HANDLE_CODE(pack_integer(bref, k2, (uint8_t)0u, (uint8_t)32u)); + } + HANDLE_CODE(map_type.pack(bref)); + HANDLE_CODE(pack_integer(bref, start_symbol_and_len, (uint8_t)0u, (uint8_t)127u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_time_domain_res_alloc_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(k2_present, 1)); + + if (k2_present) { + HANDLE_CODE(unpack_integer(k2, bref, (uint8_t)0u, (uint8_t)32u)); + } + HANDLE_CODE(map_type.unpack(bref)); + HANDLE_CODE(unpack_integer(start_symbol_and_len, bref, (uint8_t)0u, (uint8_t)127u)); + + return SRSASN_SUCCESS; +} +void pusch_time_domain_res_alloc_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (k2_present) { + j.write_int("k2", k2); + } + j.write_str("mappingType", map_type.to_string()); + j.write_int("startSymbolAndLength", start_symbol_and_len); + j.end_obj(); +} + +const char* pusch_time_domain_res_alloc_s::map_type_opts::to_string() const +{ + static const char* names[] = {"typeA", "typeB"}; + return convert_enum_idx(names, 2, value, "pusch_time_domain_res_alloc_s::map_type_e_"); +} + +// RACH-ConfigCommon ::= SEQUENCE +SRSASN_CODE rach_cfg_common_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(total_nof_ra_preambs_present, 1)); + HANDLE_CODE(bref.pack(ssb_per_rach_occasion_and_cb_preambs_per_ssb_present, 1)); + HANDLE_CODE(bref.pack(group_bcfg_present, 1)); + HANDLE_CODE(bref.pack(rsrp_thres_ssb_present, 1)); + HANDLE_CODE(bref.pack(rsrp_thres_ssb_sul_present, 1)); + HANDLE_CODE(bref.pack(msg1_subcarrier_spacing_present, 1)); + HANDLE_CODE(bref.pack(msg3_transform_precoder_present, 1)); + + HANDLE_CODE(rach_cfg_generic.pack(bref)); + if (total_nof_ra_preambs_present) { + HANDLE_CODE(pack_integer(bref, total_nof_ra_preambs, (uint8_t)1u, (uint8_t)63u)); + } + if (ssb_per_rach_occasion_and_cb_preambs_per_ssb_present) { + HANDLE_CODE(ssb_per_rach_occasion_and_cb_preambs_per_ssb.pack(bref)); + } + if (group_bcfg_present) { + HANDLE_CODE(group_bcfg.ra_msg3_size_group_a.pack(bref)); + HANDLE_CODE(group_bcfg.msg_pwr_offset_group_b.pack(bref)); + HANDLE_CODE(pack_integer(bref, group_bcfg.nof_ra_preambs_group_a, (uint8_t)1u, (uint8_t)64u)); + } + HANDLE_CODE(ra_contention_resolution_timer.pack(bref)); + if (rsrp_thres_ssb_present) { + HANDLE_CODE(pack_integer(bref, rsrp_thres_ssb, (uint8_t)0u, (uint8_t)127u)); + } + if (rsrp_thres_ssb_sul_present) { + HANDLE_CODE(pack_integer(bref, rsrp_thres_ssb_sul, (uint8_t)0u, (uint8_t)127u)); + } + HANDLE_CODE(prach_root_seq_idx.pack(bref)); + if (msg1_subcarrier_spacing_present) { + HANDLE_CODE(msg1_subcarrier_spacing.pack(bref)); + } + HANDLE_CODE(restricted_set_cfg.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= ra_prioritization_for_access_id_r16.is_present(); + group_flags[0] |= prach_root_seq_idx_r16.is_present(); + group_flags[1] |= ra_prioritization_for_slicing_r17.is_present(); + group_flags[1] |= feature_combination_preambs_list_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ra_prioritization_for_access_id_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(prach_root_seq_idx_r16.is_present(), 1)); + if (ra_prioritization_for_access_id_r16.is_present()) { + HANDLE_CODE(ra_prioritization_for_access_id_r16->ra_prioritization_r16.pack(bref)); + HANDLE_CODE(ra_prioritization_for_access_id_r16->ra_prioritization_for_ai_r16.pack(bref)); + } + if (prach_root_seq_idx_r16.is_present()) { + HANDLE_CODE(prach_root_seq_idx_r16->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ra_prioritization_for_slicing_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(feature_combination_preambs_list_r17.is_present(), 1)); + if (ra_prioritization_for_slicing_r17.is_present()) { + HANDLE_CODE(ra_prioritization_for_slicing_r17->pack(bref)); + } + if (feature_combination_preambs_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *feature_combination_preambs_list_r17, 1, 256)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_common_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(total_nof_ra_preambs_present, 1)); + HANDLE_CODE(bref.unpack(ssb_per_rach_occasion_and_cb_preambs_per_ssb_present, 1)); + HANDLE_CODE(bref.unpack(group_bcfg_present, 1)); + HANDLE_CODE(bref.unpack(rsrp_thres_ssb_present, 1)); + HANDLE_CODE(bref.unpack(rsrp_thres_ssb_sul_present, 1)); + HANDLE_CODE(bref.unpack(msg1_subcarrier_spacing_present, 1)); + HANDLE_CODE(bref.unpack(msg3_transform_precoder_present, 1)); + + HANDLE_CODE(rach_cfg_generic.unpack(bref)); + if (total_nof_ra_preambs_present) { + HANDLE_CODE(unpack_integer(total_nof_ra_preambs, bref, (uint8_t)1u, (uint8_t)63u)); + } + if (ssb_per_rach_occasion_and_cb_preambs_per_ssb_present) { + HANDLE_CODE(ssb_per_rach_occasion_and_cb_preambs_per_ssb.unpack(bref)); + } + if (group_bcfg_present) { + HANDLE_CODE(group_bcfg.ra_msg3_size_group_a.unpack(bref)); + HANDLE_CODE(group_bcfg.msg_pwr_offset_group_b.unpack(bref)); + HANDLE_CODE(unpack_integer(group_bcfg.nof_ra_preambs_group_a, bref, (uint8_t)1u, (uint8_t)64u)); + } + HANDLE_CODE(ra_contention_resolution_timer.unpack(bref)); + if (rsrp_thres_ssb_present) { + HANDLE_CODE(unpack_integer(rsrp_thres_ssb, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (rsrp_thres_ssb_sul_present) { + HANDLE_CODE(unpack_integer(rsrp_thres_ssb_sul, bref, (uint8_t)0u, (uint8_t)127u)); + } + HANDLE_CODE(prach_root_seq_idx.unpack(bref)); + if (msg1_subcarrier_spacing_present) { + HANDLE_CODE(msg1_subcarrier_spacing.unpack(bref)); + } + HANDLE_CODE(restricted_set_cfg.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); + + unpack_presence_flag(ra_prioritization_for_access_id_r16, bref); + unpack_presence_flag(prach_root_seq_idx_r16, bref); + if (ra_prioritization_for_access_id_r16.is_present()) { + HANDLE_CODE(ra_prioritization_for_access_id_r16->ra_prioritization_r16.unpack(bref)); + HANDLE_CODE(ra_prioritization_for_access_id_r16->ra_prioritization_for_ai_r16.unpack(bref)); + } + if (prach_root_seq_idx_r16.is_present()) { + HANDLE_CODE(prach_root_seq_idx_r16->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(ra_prioritization_for_slicing_r17, bref); + unpack_presence_flag(feature_combination_preambs_list_r17, bref); + if (ra_prioritization_for_slicing_r17.is_present()) { + HANDLE_CODE(ra_prioritization_for_slicing_r17->unpack(bref)); + } + if (feature_combination_preambs_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*feature_combination_preambs_list_r17, bref, 1, 256)); + } + } + } + return SRSASN_SUCCESS; +} +void rach_cfg_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rach-ConfigGeneric"); + rach_cfg_generic.to_json(j); + if (total_nof_ra_preambs_present) { + j.write_int("totalNumberOfRA-Preambles", total_nof_ra_preambs); + } + if (ssb_per_rach_occasion_and_cb_preambs_per_ssb_present) { + j.write_fieldname("ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); + ssb_per_rach_occasion_and_cb_preambs_per_ssb.to_json(j); + } + if (group_bcfg_present) { + j.write_fieldname("groupBconfigured"); + j.start_obj(); + j.write_str("ra-Msg3SizeGroupA", group_bcfg.ra_msg3_size_group_a.to_string()); + j.write_str("messagePowerOffsetGroupB", group_bcfg.msg_pwr_offset_group_b.to_string()); + j.write_int("numberOfRA-PreamblesGroupA", group_bcfg.nof_ra_preambs_group_a); + j.end_obj(); + } + j.write_str("ra-ContentionResolutionTimer", ra_contention_resolution_timer.to_string()); + if (rsrp_thres_ssb_present) { + j.write_int("rsrp-ThresholdSSB", rsrp_thres_ssb); + } + if (rsrp_thres_ssb_sul_present) { + j.write_int("rsrp-ThresholdSSB-SUL", rsrp_thres_ssb_sul); + } + j.write_fieldname("prach-RootSequenceIndex"); + prach_root_seq_idx.to_json(j); + if (msg1_subcarrier_spacing_present) { + j.write_str("msg1-SubcarrierSpacing", msg1_subcarrier_spacing.to_string()); + } + j.write_str("restrictedSetConfig", restricted_set_cfg.to_string()); + if (msg3_transform_precoder_present) { + j.write_str("msg3-transformPrecoder", "enabled"); + } + if (ext) { + if (ra_prioritization_for_access_id_r16.is_present()) { + j.write_fieldname("ra-PrioritizationForAccessIdentity-r16"); + j.start_obj(); + j.write_fieldname("ra-Prioritization-r16"); + ra_prioritization_for_access_id_r16->ra_prioritization_r16.to_json(j); + j.write_str("ra-PrioritizationForAI-r16", + ra_prioritization_for_access_id_r16->ra_prioritization_for_ai_r16.to_string()); + j.end_obj(); + } + if (prach_root_seq_idx_r16.is_present()) { + j.write_fieldname("prach-RootSequenceIndex-r16"); + prach_root_seq_idx_r16->to_json(j); + } + if (ra_prioritization_for_slicing_r17.is_present()) { + j.write_fieldname("ra-PrioritizationForSlicing-r17"); + ra_prioritization_for_slicing_r17->to_json(j); + } + if (feature_combination_preambs_list_r17.is_present()) { + j.start_array("featureCombinationPreamblesList-r17"); + for (const auto& e1 : *feature_combination_preambs_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +void rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::destroy_() {} +void rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_( + const rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::one_eighth: + c.init(other.c.get()); + break; + case types::one_fourth: + c.init(other.c.get()); + break; + case types::one_half: + c.init(other.c.get()); + break; + case types::one: + c.init(other.c.get()); + break; + case types::two: + c.init(other.c.get()); + break; + case types::four: + c.init(other.c.get()); + break; + case types::eight: + c.init(other.c.get()); + break; + case types::sixteen: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "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_& +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; + } + set(other.type()); + switch (type_) { + case types::one_eighth: + c.set(other.c.get()); + break; + case types::one_fourth: + c.set(other.c.get()); + break; + case types::one_half: + c.set(other.c.get()); + break; + case types::one: + c.set(other.c.get()); + break; + case types::two: + c.set(other.c.get()); + break; + case types::four: + c.set(other.c.get()); + break; + case types::eight: + c.set(other.c.get()); + break; + case types::sixteen: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_"); + } + + return *this; +} +rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_e_& +rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_one_eighth() +{ + set(types::one_eighth); + return c.get(); +} +rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_e_& +rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_one_fourth() +{ + set(types::one_fourth); + return c.get(); +} +rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_e_& +rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_one_half() +{ + set(types::one_half); + return c.get(); +} +rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_e_& +rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_one() +{ + set(types::one); + return c.get(); +} +rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_e_& +rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_two() +{ + set(types::two); + return c.get(); +} +uint8_t& rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_four() +{ + set(types::four); + return c.get(); +} +uint8_t& rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_eight() +{ + set(types::eight); + return c.get(); +} +uint8_t& rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_sixteen() +{ + set(types::sixteen); + return c.get(); +} +void rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::one_eighth: + j.write_str("oneEighth", c.get().to_string()); + break; + case types::one_fourth: + j.write_str("oneFourth", c.get().to_string()); + break; + case types::one_half: + j.write_str("oneHalf", c.get().to_string()); + break; + case types::one: + j.write_str("one", c.get().to_string()); + break; + case types::two: + j.write_str("two", c.get().to_string()); + break; + case types::four: + j.write_int("four", c.get()); + break; + case types::eight: + j.write_int("eight", c.get()); + break; + case types::sixteen: + j.write_int("sixteen", c.get()); + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_"); + } + j.end_obj(); +} +SRSASN_CODE rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::one_eighth: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::one_fourth: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::one_half: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::one: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::two: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::four: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)16u)); + break; + case types::eight: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)8u)); + break; + case types::sixteen: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)4u)); + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::one_eighth: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::one_fourth: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::one_half: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::one: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::two: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::four: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)16u)); + break; + case types::eight: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)8u)); + break; + case types::sixteen: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)4u)); + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_opts::to_string() const +{ + static const char* names[] = { + "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; + return convert_enum_idx( + names, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_e_"); +} +uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_opts::to_number() const +{ + static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number( + numbers, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_e_"); +} + +const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_opts::to_string() const +{ + static const char* names[] = { + "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; + return convert_enum_idx( + names, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_e_"); +} +uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_opts::to_number() const +{ + static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number( + numbers, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_e_"); +} + +const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_opts::to_string() const +{ + static const char* names[] = { + "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; + return convert_enum_idx( + names, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_e_"); +} +uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_opts::to_number() const +{ + static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number( + numbers, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_e_"); +} + +const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_opts::to_string() const +{ + static const char* names[] = { + "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; + return convert_enum_idx( + names, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_e_"); +} +uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_opts::to_number() const +{ + static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; + return map_enum_number( + numbers, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_e_"); +} + +const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_opts::to_string() const +{ + static const char* names[] = {"n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32"}; + return convert_enum_idx( + names, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_e_"); +} +uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_opts::to_number() const +{ + static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32}; + return map_enum_number( + numbers, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_e_"); +} + +const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types_opts::to_string() const +{ + static const char* names[] = {"oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; + return convert_enum_idx(names, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types"); +} +float rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types_opts::to_number() const +{ + static const float numbers[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; + return map_enum_number( + numbers, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types"); +} +const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types_opts::to_number_string() const +{ + static const char* number_strs[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; + return convert_enum_idx( + number_strs, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types"); +} + +const char* rach_cfg_common_s::group_bcfg_s_::ra_msg3_size_group_a_opts::to_string() const +{ + static const char* names[] = {"b56", + "b144", + "b208", + "b256", + "b282", + "b480", + "b640", + "b800", + "b1000", + "b72", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "rach_cfg_common_s::group_bcfg_s_::ra_msg3_size_group_a_e_"); +} +uint16_t rach_cfg_common_s::group_bcfg_s_::ra_msg3_size_group_a_opts::to_number() const +{ + static const uint16_t numbers[] = {56, 144, 208, 256, 282, 480, 640, 800, 1000, 72}; + return map_enum_number(numbers, 10, value, "rach_cfg_common_s::group_bcfg_s_::ra_msg3_size_group_a_e_"); +} + +const char* rach_cfg_common_s::group_bcfg_s_::msg_pwr_offset_group_b_opts::to_string() const +{ + static const char* names[] = {"minusinfinity", "dB0", "dB5", "dB8", "dB10", "dB12", "dB15", "dB18"}; + return convert_enum_idx(names, 8, value, "rach_cfg_common_s::group_bcfg_s_::msg_pwr_offset_group_b_e_"); +} +int8_t rach_cfg_common_s::group_bcfg_s_::msg_pwr_offset_group_b_opts::to_number() const +{ + static const int8_t numbers[] = {-1, 0, 5, 8, 10, 12, 15, 18}; + return map_enum_number(numbers, 8, value, "rach_cfg_common_s::group_bcfg_s_::msg_pwr_offset_group_b_e_"); +} + +const char* rach_cfg_common_s::ra_contention_resolution_timer_opts::to_string() const +{ + static const char* names[] = {"sf8", "sf16", "sf24", "sf32", "sf40", "sf48", "sf56", "sf64"}; + return convert_enum_idx(names, 8, value, "rach_cfg_common_s::ra_contention_resolution_timer_e_"); +} +uint8_t rach_cfg_common_s::ra_contention_resolution_timer_opts::to_number() const +{ + static const uint8_t numbers[] = {8, 16, 24, 32, 40, 48, 56, 64}; + return map_enum_number(numbers, 8, value, "rach_cfg_common_s::ra_contention_resolution_timer_e_"); +} + +void rach_cfg_common_s::prach_root_seq_idx_c_::destroy_() {} +void rach_cfg_common_s::prach_root_seq_idx_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +rach_cfg_common_s::prach_root_seq_idx_c_::prach_root_seq_idx_c_(const rach_cfg_common_s::prach_root_seq_idx_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::l839: + c.init(other.c.get()); + break; + case types::l139: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + 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) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::l839: + c.set(other.c.get()); + break; + case types::l139: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_c_"); + } + + return *this; +} +uint16_t& rach_cfg_common_s::prach_root_seq_idx_c_::set_l839() +{ + set(types::l839); + return c.get(); +} +uint8_t& rach_cfg_common_s::prach_root_seq_idx_c_::set_l139() +{ + set(types::l139); + return c.get(); +} +void rach_cfg_common_s::prach_root_seq_idx_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::l839: + j.write_int("l839", c.get()); + break; + case types::l139: + j.write_int("l139", c.get()); + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_c_"); + } + j.end_obj(); +} +SRSASN_CODE rach_cfg_common_s::prach_root_seq_idx_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::l839: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)837u)); + break; + case types::l139: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)137u)); + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_common_s::prach_root_seq_idx_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::l839: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)837u)); + break; + case types::l139: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)137u)); + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rach_cfg_common_s::prach_root_seq_idx_c_::types_opts::to_string() const +{ + static const char* names[] = {"l839", "l139"}; + return convert_enum_idx(names, 2, value, "rach_cfg_common_s::prach_root_seq_idx_c_::types"); +} +uint16_t rach_cfg_common_s::prach_root_seq_idx_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {839, 139}; + return map_enum_number(numbers, 2, value, "rach_cfg_common_s::prach_root_seq_idx_c_::types"); +} + +const char* rach_cfg_common_s::restricted_set_cfg_opts::to_string() const +{ + static const char* names[] = {"unrestrictedSet", "restrictedSetTypeA", "restrictedSetTypeB"}; + return convert_enum_idx(names, 3, value, "rach_cfg_common_s::restricted_set_cfg_e_"); +} + +void rach_cfg_common_s::prach_root_seq_idx_r16_c_::destroy_() {} +void rach_cfg_common_s::prach_root_seq_idx_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +rach_cfg_common_s::prach_root_seq_idx_r16_c_::prach_root_seq_idx_r16_c_( + const rach_cfg_common_s::prach_root_seq_idx_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::l571: + c.init(other.c.get()); + break; + case types::l1151: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_r16_c_"); + } +} +rach_cfg_common_s::prach_root_seq_idx_r16_c_& +rach_cfg_common_s::prach_root_seq_idx_r16_c_::operator=(const rach_cfg_common_s::prach_root_seq_idx_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::l571: + c.set(other.c.get()); + break; + case types::l1151: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_r16_c_"); + } + + return *this; +} +uint16_t& rach_cfg_common_s::prach_root_seq_idx_r16_c_::set_l571() +{ + set(types::l571); + return c.get(); +} +uint16_t& rach_cfg_common_s::prach_root_seq_idx_r16_c_::set_l1151() +{ + set(types::l1151); + return c.get(); +} +void rach_cfg_common_s::prach_root_seq_idx_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::l571: + j.write_int("l571", c.get()); + break; + case types::l1151: + j.write_int("l1151", c.get()); + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE rach_cfg_common_s::prach_root_seq_idx_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::l571: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)569u)); + break; + case types::l1151: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1149u)); + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rach_cfg_common_s::prach_root_seq_idx_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::l571: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)569u)); + break; + case types::l1151: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1149u)); + break; + default: + log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rach_cfg_common_s::prach_root_seq_idx_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"l571", "l1151"}; + return convert_enum_idx(names, 2, value, "rach_cfg_common_s::prach_root_seq_idx_r16_c_::types"); +} +uint16_t rach_cfg_common_s::prach_root_seq_idx_r16_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {571, 1151}; + return map_enum_number(numbers, 2, value, "rach_cfg_common_s::prach_root_seq_idx_r16_c_::types"); +} + +// AdditionalRACH-Config-r17 ::= SEQUENCE +SRSASN_CODE add_rach_cfg_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rach_cfg_common_r17_present, 1)); + HANDLE_CODE(bref.pack(msg_a_cfg_common_r17_present, 1)); + + if (rach_cfg_common_r17_present) { + HANDLE_CODE(rach_cfg_common_r17.pack(bref)); + } + if (msg_a_cfg_common_r17_present) { + HANDLE_CODE(msg_a_cfg_common_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE add_rach_cfg_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rach_cfg_common_r17_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_cfg_common_r17_present, 1)); + + if (rach_cfg_common_r17_present) { + HANDLE_CODE(rach_cfg_common_r17.unpack(bref)); + } + if (msg_a_cfg_common_r17_present) { + HANDLE_CODE(msg_a_cfg_common_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void add_rach_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rach_cfg_common_r17_present) { + j.write_fieldname("rach-ConfigCommon-r17"); + rach_cfg_common_r17.to_json(j); + } + if (msg_a_cfg_common_r17_present) { + j.write_fieldname("msgA-ConfigCommon-r17"); + msg_a_cfg_common_r17.to_json(j); + } + j.end_obj(); +} + +// ControlResourceSet ::= SEQUENCE +SRSASN_CODE coreset_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(tci_states_pdcch_to_add_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(tci_states_pdcch_to_release_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(tci_present_in_dci_present, 1)); + HANDLE_CODE(bref.pack(pdcch_dmrs_scrambling_id_present, 1)); + + HANDLE_CODE(pack_integer(bref, coreset_id, (uint8_t)0u, (uint8_t)11u)); + HANDLE_CODE(freq_domain_res.pack(bref)); + HANDLE_CODE(pack_integer(bref, dur, (uint8_t)1u, (uint8_t)3u)); + HANDLE_CODE(cce_reg_map_type.pack(bref)); + HANDLE_CODE(precoder_granularity.pack(bref)); + if (tci_states_pdcch_to_add_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, tci_states_pdcch_to_add_list, 1, 64, integer_packer(0, 127))); + } + if (tci_states_pdcch_to_release_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, tci_states_pdcch_to_release_list, 1, 64, integer_packer(0, 127))); + } + if (pdcch_dmrs_scrambling_id_present) { + HANDLE_CODE(pack_integer(bref, pdcch_dmrs_scrambling_id, (uint32_t)0u, (uint32_t)65535u)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= rb_offset_r16_present; + group_flags[0] |= tci_present_dci_1_2_r16_present; + group_flags[0] |= coreset_pool_idx_r16_present; + group_flags[0] |= coreset_id_v1610_present; + group_flags[1] |= follow_unified_tci_state_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(rb_offset_r16_present, 1)); + HANDLE_CODE(bref.pack(tci_present_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(coreset_pool_idx_r16_present, 1)); + HANDLE_CODE(bref.pack(coreset_id_v1610_present, 1)); + if (rb_offset_r16_present) { + HANDLE_CODE(pack_integer(bref, rb_offset_r16, (uint8_t)0u, (uint8_t)5u)); + } + if (tci_present_dci_1_2_r16_present) { + HANDLE_CODE(pack_integer(bref, tci_present_dci_1_2_r16, (uint8_t)1u, (uint8_t)3u)); + } + if (coreset_pool_idx_r16_present) { + HANDLE_CODE(pack_integer(bref, coreset_pool_idx_r16, (uint8_t)0u, (uint8_t)1u)); + } + if (coreset_id_v1610_present) { + HANDLE_CODE(pack_integer(bref, coreset_id_v1610, (uint8_t)12u, (uint8_t)15u)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(follow_unified_tci_state_r17_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE coreset_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool tci_states_pdcch_to_add_list_present; + HANDLE_CODE(bref.unpack(tci_states_pdcch_to_add_list_present, 1)); + bool tci_states_pdcch_to_release_list_present; + HANDLE_CODE(bref.unpack(tci_states_pdcch_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(tci_present_in_dci_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_dmrs_scrambling_id_present, 1)); + + HANDLE_CODE(unpack_integer(coreset_id, bref, (uint8_t)0u, (uint8_t)11u)); + HANDLE_CODE(freq_domain_res.unpack(bref)); + HANDLE_CODE(unpack_integer(dur, bref, (uint8_t)1u, (uint8_t)3u)); + HANDLE_CODE(cce_reg_map_type.unpack(bref)); + HANDLE_CODE(precoder_granularity.unpack(bref)); + if (tci_states_pdcch_to_add_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(tci_states_pdcch_to_add_list, bref, 1, 64, integer_packer(0, 127))); + } + if (tci_states_pdcch_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(tci_states_pdcch_to_release_list, bref, 1, 64, integer_packer(0, 127))); + } + if (pdcch_dmrs_scrambling_id_present) { + HANDLE_CODE(unpack_integer(pdcch_dmrs_scrambling_id, bref, (uint32_t)0u, (uint32_t)65535u)); + } + + 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(rb_offset_r16_present, 1)); + HANDLE_CODE(bref.unpack(tci_present_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(coreset_pool_idx_r16_present, 1)); + HANDLE_CODE(bref.unpack(coreset_id_v1610_present, 1)); + if (rb_offset_r16_present) { + HANDLE_CODE(unpack_integer(rb_offset_r16, bref, (uint8_t)0u, (uint8_t)5u)); + } + if (tci_present_dci_1_2_r16_present) { + HANDLE_CODE(unpack_integer(tci_present_dci_1_2_r16, bref, (uint8_t)1u, (uint8_t)3u)); + } + if (coreset_pool_idx_r16_present) { + HANDLE_CODE(unpack_integer(coreset_pool_idx_r16, bref, (uint8_t)0u, (uint8_t)1u)); + } + if (coreset_id_v1610_present) { + HANDLE_CODE(unpack_integer(coreset_id_v1610, bref, (uint8_t)12u, (uint8_t)15u)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(follow_unified_tci_state_r17_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void coreset_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("controlResourceSetId", coreset_id); + j.write_str("frequencyDomainResources", freq_domain_res.to_string()); + j.write_int("duration", dur); + j.write_fieldname("cce-REG-MappingType"); + cce_reg_map_type.to_json(j); + j.write_str("precoderGranularity", precoder_granularity.to_string()); + if (tci_states_pdcch_to_add_list.size() > 0) { + j.start_array("tci-StatesPDCCH-ToAddList"); + for (const auto& e1 : tci_states_pdcch_to_add_list) { + j.write_int(e1); + } + j.end_array(); + } + if (tci_states_pdcch_to_release_list.size() > 0) { + j.start_array("tci-StatesPDCCH-ToReleaseList"); + for (const auto& e1 : tci_states_pdcch_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (tci_present_in_dci_present) { + j.write_str("tci-PresentInDCI", "enabled"); + } + if (pdcch_dmrs_scrambling_id_present) { + j.write_int("pdcch-DMRS-ScramblingID", pdcch_dmrs_scrambling_id); + } + if (ext) { + if (rb_offset_r16_present) { + j.write_int("rb-Offset-r16", rb_offset_r16); + } + if (tci_present_dci_1_2_r16_present) { + j.write_int("tci-PresentDCI-1-2-r16", tci_present_dci_1_2_r16); + } + if (coreset_pool_idx_r16_present) { + j.write_int("coresetPoolIndex-r16", coreset_pool_idx_r16); + } + if (coreset_id_v1610_present) { + j.write_int("controlResourceSetId-v1610", coreset_id_v1610); + } + if (follow_unified_tci_state_r17_present) { + j.write_str("followUnifiedTCI-State-r17", "enabled"); + } + } + j.end_obj(); +} + +void coreset_s::cce_reg_map_type_c_::set(types::options e) +{ + type_ = e; +} +coreset_s::cce_reg_map_type_c_::interleaved_s_& coreset_s::cce_reg_map_type_c_::set_interleaved() +{ + set(types::interleaved); + return c; +} +void coreset_s::cce_reg_map_type_c_::set_non_interleaved() +{ + set(types::non_interleaved); +} +void coreset_s::cce_reg_map_type_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::interleaved: + j.write_fieldname("interleaved"); + j.start_obj(); + j.write_str("reg-BundleSize", c.reg_bundle_size.to_string()); + j.write_str("interleaverSize", c.interleaver_size.to_string()); + if (c.shift_idx_present) { + j.write_int("shiftIndex", c.shift_idx); + } + j.end_obj(); + break; + case types::non_interleaved: + break; + default: + log_invalid_choice_id(type_, "coreset_s::cce_reg_map_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE coreset_s::cce_reg_map_type_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::interleaved: + HANDLE_CODE(bref.pack(c.shift_idx_present, 1)); + HANDLE_CODE(c.reg_bundle_size.pack(bref)); + HANDLE_CODE(c.interleaver_size.pack(bref)); + if (c.shift_idx_present) { + HANDLE_CODE(pack_integer(bref, c.shift_idx, (uint16_t)0u, (uint16_t)274u)); + } + break; + case types::non_interleaved: + break; + default: + log_invalid_choice_id(type_, "coreset_s::cce_reg_map_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE coreset_s::cce_reg_map_type_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::interleaved: + HANDLE_CODE(bref.unpack(c.shift_idx_present, 1)); + HANDLE_CODE(c.reg_bundle_size.unpack(bref)); + HANDLE_CODE(c.interleaver_size.unpack(bref)); + if (c.shift_idx_present) { + HANDLE_CODE(unpack_integer(c.shift_idx, bref, (uint16_t)0u, (uint16_t)274u)); + } + break; + case types::non_interleaved: + break; + default: + log_invalid_choice_id(type_, "coreset_s::cce_reg_map_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* coreset_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_opts::to_string() const +{ + static const char* names[] = {"n2", "n3", "n6"}; + return convert_enum_idx(names, 3, value, "coreset_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_e_"); +} +uint8_t coreset_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 3, 6}; + return map_enum_number(numbers, 3, value, "coreset_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_e_"); +} + +const char* coreset_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_opts::to_string() const +{ + static const char* names[] = {"n2", "n3", "n6"}; + return convert_enum_idx(names, 3, value, "coreset_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_e_"); +} +uint8_t coreset_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 3, 6}; + return map_enum_number(numbers, 3, value, "coreset_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_e_"); +} + +const char* coreset_s::cce_reg_map_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"interleaved", "nonInterleaved"}; + return convert_enum_idx(names, 2, value, "coreset_s::cce_reg_map_type_c_::types"); +} + +const char* coreset_s::precoder_granularity_opts::to_string() const +{ + static const char* names[] = {"sameAsREG-bundle", "allContiguousRBs"}; + return convert_enum_idx(names, 2, value, "coreset_s::precoder_granularity_e_"); +} + +// RateMatchPattern ::= SEQUENCE +SRSASN_CODE rate_match_pattern_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(subcarrier_spacing_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)); + } + HANDLE_CODE(dummy.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= coreset_r16_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(coreset_r16_present, 1)); + if (coreset_r16_present) { + HANDLE_CODE(pack_integer(bref, coreset_r16, (uint8_t)0u, (uint8_t)15u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rate_match_pattern_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + 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)); + + 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(coreset_r16_present, 1)); + if (coreset_r16_present) { + HANDLE_CODE(unpack_integer(coreset_r16, bref, (uint8_t)0u, (uint8_t)15u)); + } + } + } + return SRSASN_SUCCESS; +} +void rate_match_pattern_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()); + } + j.write_str("dummy", dummy.to_string()); + if (ext) { + if (coreset_r16_present) { + j.write_int("controlResourceSet-r16", coreset_r16); + } + } + j.end_obj(); +} + +void rate_match_pattern_s::pattern_type_c_::destroy_() +{ + switch (type_) { + case types::bitmaps: + c.destroy(); + break; + default: + break; + } +} +void rate_match_pattern_s::pattern_type_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::bitmaps: + c.init(); + break; + case types::coreset: + 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::coreset: + 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::coreset: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); + } + + return *this; +} +rate_match_pattern_s::pattern_type_c_::bitmaps_s_& rate_match_pattern_s::pattern_type_c_::set_bitmaps() +{ + set(types::bitmaps); + return c.get(); +} +uint8_t& rate_match_pattern_s::pattern_type_c_::set_coreset() +{ + set(types::coreset); + return c.get(); +} +void rate_match_pattern_s::pattern_type_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(); + break; + case types::coreset: + j.write_int("controlResourceSet", c.get()); + break; + default: + log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE rate_match_pattern_s::pattern_type_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)); + } + break; + case types::coreset: + 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; +} +SRSASN_CODE rate_match_pattern_s::pattern_type_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)); + } + break; + case types::coreset: + 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; +} + +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) +{ + 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_"); + } +} +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_"); + } +} +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; + } + 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_"); + } + + return *this; +} +fixed_bitstring<14>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::set_one_slot() +{ + set(types::one_slot); + return c.get>(); +} +fixed_bitstring<28>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::set_two_slots() +{ + set(types::two_slots); + return c.get>(); +} +void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::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.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; +} + +const char* rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::types_opts::to_string() const +{ + static const char* names[] = {"oneSlot", "twoSlots"}; + return convert_enum_idx( + names, 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 numbers[] = {1, 2}; + return map_enum_number( + numbers, 2, value, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::types"); +} + +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_"); + } +} +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_"); + } +} +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::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_"); + } + + return *this; +} +fixed_bitstring<2>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n2() +{ + set(types::n2); + return c.get>(); +} +fixed_bitstring<4>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n4() +{ + set(types::n4); + return c.get>(); +} +fixed_bitstring<5>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n5() +{ + set(types::n5); + return c.get>(); +} +fixed_bitstring<8>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n8() +{ + set(types::n8); + return c.get>(); +} +fixed_bitstring<10>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n10() +{ + set(types::n10); + return c.get>(); +} +fixed_bitstring<20>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n20() +{ + set(types::n20); + return c.get>(); +} +fixed_bitstring<40>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n40() +{ + set(types::n40); + return c.get>(); +} +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::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.end_obj(); +} +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::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; + } + return SRSASN_SUCCESS; +} +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::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; + } + return SRSASN_SUCCESS; +} + +const char* rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types_opts::to_string() const +{ + static const char* names[] = {"n2", "n4", "n5", "n8", "n10", "n20", "n40"}; + return convert_enum_idx( + names, 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 numbers[] = {2, 4, 5, 8, 10, 20, 40}; + return map_enum_number( + numbers, 7, value, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types"); +} + +const char* rate_match_pattern_s::pattern_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"bitmaps", "controlResourceSet"}; + return convert_enum_idx(names, 2, value, "rate_match_pattern_s::pattern_type_c_::types"); +} + +const char* rate_match_pattern_s::dummy_opts::to_string() const +{ + static const char* names[] = {"dynamic", "semiStatic"}; + return convert_enum_idx(names, 2, value, "rate_match_pattern_s::dummy_e_"); +} + +// SearchSpace ::= SEQUENCE +SRSASN_CODE search_space_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(coreset_id_present, 1)); + HANDLE_CODE(bref.pack(monitoring_slot_periodicity_and_offset_present, 1)); + HANDLE_CODE(bref.pack(dur_present, 1)); + HANDLE_CODE(bref.pack(monitoring_symbols_within_slot_present, 1)); + HANDLE_CODE(bref.pack(nrof_candidates_present, 1)); + HANDLE_CODE(bref.pack(search_space_type_present, 1)); + + HANDLE_CODE(pack_integer(bref, search_space_id, (uint8_t)0u, (uint8_t)39u)); + if (coreset_id_present) { + HANDLE_CODE(pack_integer(bref, coreset_id, (uint8_t)0u, (uint8_t)11u)); + } + if (monitoring_slot_periodicity_and_offset_present) { + HANDLE_CODE(monitoring_slot_periodicity_and_offset.pack(bref)); + } + if (dur_present) { + HANDLE_CODE(pack_integer(bref, dur, (uint16_t)2u, (uint16_t)2559u)); + } + if (monitoring_symbols_within_slot_present) { + HANDLE_CODE(monitoring_symbols_within_slot.pack(bref)); + } + if (nrof_candidates_present) { + HANDLE_CODE(nrof_candidates.aggregation_level1.pack(bref)); + HANDLE_CODE(nrof_candidates.aggregation_level2.pack(bref)); + HANDLE_CODE(nrof_candidates.aggregation_level4.pack(bref)); + HANDLE_CODE(nrof_candidates.aggregation_level8.pack(bref)); + HANDLE_CODE(nrof_candidates.aggregation_level16.pack(bref)); + } + if (search_space_type_present) { + HANDLE_CODE(search_space_type.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE search_space_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(coreset_id_present, 1)); + HANDLE_CODE(bref.unpack(monitoring_slot_periodicity_and_offset_present, 1)); + HANDLE_CODE(bref.unpack(dur_present, 1)); + HANDLE_CODE(bref.unpack(monitoring_symbols_within_slot_present, 1)); + HANDLE_CODE(bref.unpack(nrof_candidates_present, 1)); + HANDLE_CODE(bref.unpack(search_space_type_present, 1)); + + HANDLE_CODE(unpack_integer(search_space_id, bref, (uint8_t)0u, (uint8_t)39u)); + if (coreset_id_present) { + HANDLE_CODE(unpack_integer(coreset_id, bref, (uint8_t)0u, (uint8_t)11u)); + } + if (monitoring_slot_periodicity_and_offset_present) { + HANDLE_CODE(monitoring_slot_periodicity_and_offset.unpack(bref)); + } + if (dur_present) { + HANDLE_CODE(unpack_integer(dur, bref, (uint16_t)2u, (uint16_t)2559u)); + } + if (monitoring_symbols_within_slot_present) { + HANDLE_CODE(monitoring_symbols_within_slot.unpack(bref)); + } + if (nrof_candidates_present) { + HANDLE_CODE(nrof_candidates.aggregation_level1.unpack(bref)); + HANDLE_CODE(nrof_candidates.aggregation_level2.unpack(bref)); + HANDLE_CODE(nrof_candidates.aggregation_level4.unpack(bref)); + HANDLE_CODE(nrof_candidates.aggregation_level8.unpack(bref)); + HANDLE_CODE(nrof_candidates.aggregation_level16.unpack(bref)); + } + if (search_space_type_present) { + HANDLE_CODE(search_space_type.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void search_space_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("searchSpaceId", search_space_id); + if (coreset_id_present) { + j.write_int("controlResourceSetId", coreset_id); + } + if (monitoring_slot_periodicity_and_offset_present) { + j.write_fieldname("monitoringSlotPeriodicityAndOffset"); + monitoring_slot_periodicity_and_offset.to_json(j); + } + if (dur_present) { + j.write_int("duration", dur); + } + if (monitoring_symbols_within_slot_present) { + j.write_str("monitoringSymbolsWithinSlot", monitoring_symbols_within_slot.to_string()); + } + if (nrof_candidates_present) { + j.write_fieldname("nrofCandidates"); + j.start_obj(); + j.write_str("aggregationLevel1", nrof_candidates.aggregation_level1.to_string()); + j.write_str("aggregationLevel2", nrof_candidates.aggregation_level2.to_string()); + j.write_str("aggregationLevel4", nrof_candidates.aggregation_level4.to_string()); + j.write_str("aggregationLevel8", nrof_candidates.aggregation_level8.to_string()); + j.write_str("aggregationLevel16", nrof_candidates.aggregation_level16.to_string()); + j.end_obj(); + } + if (search_space_type_present) { + j.write_fieldname("searchSpaceType"); + search_space_type.to_json(j); + } + j.end_obj(); +} + +void search_space_s::monitoring_slot_periodicity_and_offset_c_::destroy_() {} +void search_space_s::monitoring_slot_periodicity_and_offset_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +search_space_s::monitoring_slot_periodicity_and_offset_c_::monitoring_slot_periodicity_and_offset_c_( + const search_space_s::monitoring_slot_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::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::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_, "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) +{ + if (this == &other) { + return *this; + } + 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::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::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_, "search_space_s::monitoring_slot_periodicity_and_offset_c_"); + } + + return *this; +} +void search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl1() +{ + set(types::sl1); +} +uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl2() +{ + set(types::sl2); + return c.get(); +} +uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl4() +{ + set(types::sl4); + return c.get(); +} +uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl5() +{ + set(types::sl5); + return c.get(); +} +uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl8() +{ + set(types::sl8); + return c.get(); +} +uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl10() +{ + set(types::sl10); + return c.get(); +} +uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl16() +{ + set(types::sl16); + return c.get(); +} +uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl20() +{ + set(types::sl20); + return c.get(); +} +uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl40() +{ + set(types::sl40); + return c.get(); +} +uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl80() +{ + set(types::sl80); + return c.get(); +} +uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl160() +{ + set(types::sl160); + return c.get(); +} +uint16_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl320() +{ + set(types::sl320); + return c.get(); +} +uint16_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl640() +{ + set(types::sl640); + return c.get(); +} +uint16_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl1280() +{ + set(types::sl1280); + return c.get(); +} +uint16_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl2560() +{ + set(types::sl2560); + return c.get(); +} +void search_space_s::monitoring_slot_periodicity_and_offset_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::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; + 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_, "search_space_s::monitoring_slot_periodicity_and_offset_c_"); + } + j.end_obj(); +} +SRSASN_CODE search_space_s::monitoring_slot_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::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)); + 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_, "search_space_s::monitoring_slot_periodicity_and_offset_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE search_space_s::monitoring_slot_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::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; + 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_, "search_space_s::monitoring_slot_periodicity_and_offset_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* search_space_s::monitoring_slot_periodicity_and_offset_c_::types_opts::to_string() const +{ + static const char* names[] = {"sl1", + "sl2", + "sl4", + "sl5", + "sl8", + "sl10", + "sl16", + "sl20", + "sl40", + "sl80", + "sl160", + "sl320", + "sl640", + "sl1280", + "sl2560"}; + return convert_enum_idx(names, 15, value, "search_space_s::monitoring_slot_periodicity_and_offset_c_::types"); +} +uint16_t search_space_s::monitoring_slot_periodicity_and_offset_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {1, 2, 4, 5, 8, 10, 16, 20, 40, 80, 160, 320, 640, 1280, 2560}; + return map_enum_number(numbers, 15, value, "search_space_s::monitoring_slot_periodicity_and_offset_c_::types"); +} + +const char* search_space_s::nrof_candidates_s_::aggregation_level1_opts::to_string() const +{ + static const char* names[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; + return convert_enum_idx(names, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level1_e_"); +} +uint8_t search_space_s::nrof_candidates_s_::aggregation_level1_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5, 6, 8}; + return map_enum_number(numbers, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level1_e_"); +} + +const char* search_space_s::nrof_candidates_s_::aggregation_level2_opts::to_string() const +{ + static const char* names[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; + return convert_enum_idx(names, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level2_e_"); +} +uint8_t search_space_s::nrof_candidates_s_::aggregation_level2_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5, 6, 8}; + return map_enum_number(numbers, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level2_e_"); +} + +const char* search_space_s::nrof_candidates_s_::aggregation_level4_opts::to_string() const +{ + static const char* names[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; + return convert_enum_idx(names, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level4_e_"); +} +uint8_t search_space_s::nrof_candidates_s_::aggregation_level4_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5, 6, 8}; + return map_enum_number(numbers, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level4_e_"); +} + +const char* search_space_s::nrof_candidates_s_::aggregation_level8_opts::to_string() const +{ + static const char* names[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; + return convert_enum_idx(names, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level8_e_"); +} +uint8_t search_space_s::nrof_candidates_s_::aggregation_level8_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5, 6, 8}; + return map_enum_number(numbers, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level8_e_"); +} + +const char* search_space_s::nrof_candidates_s_::aggregation_level16_opts::to_string() const +{ + static const char* names[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; + return convert_enum_idx(names, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level16_e_"); +} +uint8_t search_space_s::nrof_candidates_s_::aggregation_level16_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5, 6, 8}; + return map_enum_number(numbers, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level16_e_"); +} + +void search_space_s::search_space_type_c_::destroy_() +{ + switch (type_) { + case types::common: + c.destroy(); + break; + case types::ue_specific: + c.destroy(); + break; + default: + break; + } +} +void search_space_s::search_space_type_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::common: + c.init(); + break; + case types::ue_specific: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "search_space_s::search_space_type_c_"); + } +} +search_space_s::search_space_type_c_::search_space_type_c_(const search_space_s::search_space_type_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::common: + c.init(other.c.get()); + break; + case types::ue_specific: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + 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) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::common: + c.set(other.c.get()); + break; + case types::ue_specific: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "search_space_s::search_space_type_c_"); + } + + return *this; +} +search_space_s::search_space_type_c_::common_s_& search_space_s::search_space_type_c_::set_common() +{ + set(types::common); + return c.get(); +} +search_space_s::search_space_type_c_::ue_specific_s_& search_space_s::search_space_type_c_::set_ue_specific() +{ + set(types::ue_specific); + return c.get(); +} +void search_space_s::search_space_type_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::common: + j.write_fieldname("common"); + j.start_obj(); + if (c.get().dci_format0_0_and_format1_0_present) { + j.write_fieldname("dci-Format0-0-AndFormat1-0"); + j.start_obj(); + j.end_obj(); + } + if (c.get().dci_format2_0_present) { + j.write_fieldname("dci-Format2-0"); + j.start_obj(); + j.write_fieldname("nrofCandidates-SFI"); + j.start_obj(); + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1_present) { + j.write_str("aggregationLevel1", + c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1.to_string()); + } + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2_present) { + j.write_str("aggregationLevel2", + c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2.to_string()); + } + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4_present) { + j.write_str("aggregationLevel4", + c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4.to_string()); + } + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8_present) { + j.write_str("aggregationLevel8", + c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8.to_string()); + } + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16_present) { + j.write_str("aggregationLevel16", + c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16.to_string()); + } + j.end_obj(); + j.end_obj(); + } + if (c.get().dci_format2_1_present) { + j.write_fieldname("dci-Format2-1"); + j.start_obj(); + j.end_obj(); + } + if (c.get().dci_format2_2_present) { + j.write_fieldname("dci-Format2-2"); + j.start_obj(); + j.end_obj(); + } + if (c.get().dci_format2_3_present) { + j.write_fieldname("dci-Format2-3"); + j.start_obj(); + if (c.get().dci_format2_3.dummy1_present) { + j.write_str("dummy1", c.get().dci_format2_3.dummy1.to_string()); + } + j.write_str("dummy2", c.get().dci_format2_3.dummy2.to_string()); + j.end_obj(); + } + j.end_obj(); + break; + case types::ue_specific: + j.write_fieldname("ue-Specific"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "search_space_s::search_space_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE search_space_s::search_space_type_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::common: + HANDLE_CODE(bref.pack(c.get().dci_format0_0_and_format1_0_present, 1)); + HANDLE_CODE(bref.pack(c.get().dci_format2_0_present, 1)); + HANDLE_CODE(bref.pack(c.get().dci_format2_1_present, 1)); + HANDLE_CODE(bref.pack(c.get().dci_format2_2_present, 1)); + HANDLE_CODE(bref.pack(c.get().dci_format2_3_present, 1)); + if (c.get().dci_format0_0_and_format1_0_present) { + bref.pack(c.get().dci_format0_0_and_format1_0.ext, 1); + } + if (c.get().dci_format2_0_present) { + bref.pack(c.get().dci_format2_0.ext, 1); + HANDLE_CODE(bref.pack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1_present, 1)); + HANDLE_CODE(bref.pack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2_present, 1)); + HANDLE_CODE(bref.pack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4_present, 1)); + HANDLE_CODE(bref.pack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8_present, 1)); + HANDLE_CODE(bref.pack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16_present, 1)); + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1_present) { + HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1.pack(bref)); + } + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2_present) { + HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2.pack(bref)); + } + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4_present) { + HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4.pack(bref)); + } + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8_present) { + HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8.pack(bref)); + } + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16_present) { + HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16.pack(bref)); + } + } + if (c.get().dci_format2_1_present) { + bref.pack(c.get().dci_format2_1.ext, 1); + } + if (c.get().dci_format2_2_present) { + bref.pack(c.get().dci_format2_2.ext, 1); + } + if (c.get().dci_format2_3_present) { + bref.pack(c.get().dci_format2_3.ext, 1); + HANDLE_CODE(bref.pack(c.get().dci_format2_3.dummy1_present, 1)); + if (c.get().dci_format2_3.dummy1_present) { + HANDLE_CODE(c.get().dci_format2_3.dummy1.pack(bref)); + } + HANDLE_CODE(c.get().dci_format2_3.dummy2.pack(bref)); + } + break; + case types::ue_specific: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "search_space_s::search_space_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE search_space_s::search_space_type_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::common: + HANDLE_CODE(bref.unpack(c.get().dci_format0_0_and_format1_0_present, 1)); + HANDLE_CODE(bref.unpack(c.get().dci_format2_0_present, 1)); + HANDLE_CODE(bref.unpack(c.get().dci_format2_1_present, 1)); + HANDLE_CODE(bref.unpack(c.get().dci_format2_2_present, 1)); + HANDLE_CODE(bref.unpack(c.get().dci_format2_3_present, 1)); + if (c.get().dci_format0_0_and_format1_0_present) { + bref.unpack(c.get().dci_format0_0_and_format1_0.ext, 1); + } + if (c.get().dci_format2_0_present) { + bref.unpack(c.get().dci_format2_0.ext, 1); + HANDLE_CODE(bref.unpack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1_present, 1)); + HANDLE_CODE(bref.unpack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2_present, 1)); + HANDLE_CODE(bref.unpack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4_present, 1)); + HANDLE_CODE(bref.unpack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8_present, 1)); + HANDLE_CODE(bref.unpack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16_present, 1)); + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1_present) { + HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1.unpack(bref)); + } + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2_present) { + HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2.unpack(bref)); + } + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4_present) { + HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4.unpack(bref)); + } + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8_present) { + HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8.unpack(bref)); + } + if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16_present) { + HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16.unpack(bref)); + } + } + if (c.get().dci_format2_1_present) { + bref.unpack(c.get().dci_format2_1.ext, 1); + } + if (c.get().dci_format2_2_present) { + bref.unpack(c.get().dci_format2_2.ext, 1); + } + if (c.get().dci_format2_3_present) { + bref.unpack(c.get().dci_format2_3.ext, 1); + HANDLE_CODE(bref.unpack(c.get().dci_format2_3.dummy1_present, 1)); + if (c.get().dci_format2_3.dummy1_present) { + HANDLE_CODE(c.get().dci_format2_3.dummy1.unpack(bref)); + } + HANDLE_CODE(c.get().dci_format2_3.dummy2.unpack(bref)); + } + break; + case types::ue_specific: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "search_space_s::search_space_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: + aggregation_level1_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" + "aggregation_level1_e_"); +} +uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: + aggregation_level1_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" + "aggregation_level1_e_"); +} + +const char* search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: + aggregation_level2_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" + "aggregation_level2_e_"); +} +uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: + aggregation_level2_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" + "aggregation_level2_e_"); +} + +const char* search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: + aggregation_level4_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" + "aggregation_level4_e_"); +} +uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: + aggregation_level4_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" + "aggregation_level4_e_"); +} + +const char* search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: + aggregation_level8_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" + "aggregation_level8_e_"); +} +uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: + aggregation_level8_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" + "aggregation_level8_e_"); +} + +const char* search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: + aggregation_level16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" + "aggregation_level16_e_"); +} +uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: + aggregation_level16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" + "aggregation_level16_e_"); +} + +const char* search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy1_opts::to_string() const +{ + static const char* names[] = {"sl1", "sl2", "sl4", "sl5", "sl8", "sl10", "sl16", "sl20"}; + return convert_enum_idx( + names, 8, value, "search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy1_e_"); +} +uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy1_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 5, 8, 10, 16, 20}; + return map_enum_number( + numbers, 8, value, "search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy1_e_"); +} + +const char* search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy2_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx( + names, 2, value, "search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy2_e_"); +} +uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy2_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number( + numbers, 2, value, "search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy2_e_"); +} + +SRSASN_CODE search_space_s::search_space_type_c_::ue_specific_s_::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(dci_formats.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= dci_formats_mt_r16_present; + group_flags[0] |= dci_formats_sl_r16_present; + group_flags[0] |= dci_formats_ext_r16_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(dci_formats_mt_r16_present, 1)); + HANDLE_CODE(bref.pack(dci_formats_sl_r16_present, 1)); + HANDLE_CODE(bref.pack(dci_formats_ext_r16_present, 1)); + if (dci_formats_sl_r16_present) { + HANDLE_CODE(dci_formats_sl_r16.pack(bref)); + } + if (dci_formats_ext_r16_present) { + HANDLE_CODE(dci_formats_ext_r16.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE search_space_s::search_space_type_c_::ue_specific_s_::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(dci_formats.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(dci_formats_mt_r16_present, 1)); + HANDLE_CODE(bref.unpack(dci_formats_sl_r16_present, 1)); + HANDLE_CODE(bref.unpack(dci_formats_ext_r16_present, 1)); + if (dci_formats_sl_r16_present) { + HANDLE_CODE(dci_formats_sl_r16.unpack(bref)); + } + if (dci_formats_ext_r16_present) { + HANDLE_CODE(dci_formats_ext_r16.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void search_space_s::search_space_type_c_::ue_specific_s_::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("dci-Formats", dci_formats.to_string()); + if (ext) { + if (dci_formats_mt_r16_present) { + j.write_str("dci-Formats-MT-r16", "formats2-5"); + } + if (dci_formats_sl_r16_present) { + j.write_str("dci-FormatsSL-r16", dci_formats_sl_r16.to_string()); + } + if (dci_formats_ext_r16_present) { + j.write_str("dci-FormatsExt-r16", dci_formats_ext_r16.to_string()); + } + } + j.end_obj(); +} + +const char* search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_opts::to_string() const +{ + static const char* names[] = {"formats0-0-And-1-0", "formats0-1-And-1-1"}; + return convert_enum_idx(names, 2, value, "search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_e_"); +} + +const char* search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_sl_r16_opts::to_string() const +{ + static const char* names[] = { + "formats0-0-And-1-0", "formats0-1-And-1-1", "formats3-0", "formats3-1", "formats3-0-And-3-1"}; + return convert_enum_idx( + names, 5, value, "search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_sl_r16_e_"); +} + +const char* search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_ext_r16_opts::to_string() const +{ + static const char* names[] = {"formats0-2-And-1-2", "formats0-1-And-1-1And-0-2-And-1-2"}; + return convert_enum_idx( + names, 2, value, "search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_ext_r16_e_"); +} + +const char* search_space_s::search_space_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"common", "ue-Specific"}; + return convert_enum_idx(names, 2, value, "search_space_s::search_space_type_c_::types"); +} + +// SearchSpaceExt-r16 ::= SEQUENCE +SRSASN_CODE search_space_ext_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(coreset_id_r16_present, 1)); + HANDLE_CODE(bref.pack(search_space_type_r16_present, 1)); + HANDLE_CODE(bref.pack(search_space_group_id_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(freq_monitor_locations_r16_present, 1)); + + if (coreset_id_r16_present) { + HANDLE_CODE(pack_integer(bref, coreset_id_r16, (uint8_t)0u, (uint8_t)15u)); + } + if (search_space_type_r16_present) { + bref.pack(search_space_type_r16.common_r16.ext, 1); + HANDLE_CODE(bref.pack(search_space_type_r16.common_r16.dci_format2_4_r16_present, 1)); + HANDLE_CODE(bref.pack(search_space_type_r16.common_r16.dci_format2_5_r16_present, 1)); + HANDLE_CODE(bref.pack(search_space_type_r16.common_r16.dci_format2_6_r16_present, 1)); + if (search_space_type_r16.common_r16.dci_format2_4_r16_present) { + bref.pack(search_space_type_r16.common_r16.dci_format2_4_r16.ext, 1); + HANDLE_CODE(bref.pack( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16_present, 1)); + HANDLE_CODE(bref.pack( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16_present, 1)); + HANDLE_CODE(bref.pack( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16_present, 1)); + HANDLE_CODE(bref.pack( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16_present, 1)); + HANDLE_CODE(bref.pack( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16_present, + 1)); + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16.pack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16.pack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16.pack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16.pack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16.pack( + bref)); + } + } + if (search_space_type_r16.common_r16.dci_format2_5_r16_present) { + bref.pack(search_space_type_r16.common_r16.dci_format2_5_r16.ext, 1); + HANDLE_CODE(bref.pack( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16_present, + 1)); + HANDLE_CODE(bref.pack( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16_present, + 1)); + HANDLE_CODE(bref.pack( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16_present, + 1)); + HANDLE_CODE(bref.pack( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16_present, + 1)); + HANDLE_CODE(bref.pack( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16_present, + 1)); + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16.pack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16.pack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16.pack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16.pack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16.pack( + bref)); + } + } + if (search_space_type_r16.common_r16.dci_format2_6_r16_present) { + bref.pack(search_space_type_r16.common_r16.dci_format2_6_r16.ext, 1); + } + } + if (search_space_group_id_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, search_space_group_id_list_r16, 1, 2, integer_packer(0, 1))); + } + if (freq_monitor_locations_r16_present) { + HANDLE_CODE(freq_monitor_locations_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE search_space_ext_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(coreset_id_r16_present, 1)); + HANDLE_CODE(bref.unpack(search_space_type_r16_present, 1)); + bool search_space_group_id_list_r16_present; + HANDLE_CODE(bref.unpack(search_space_group_id_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(freq_monitor_locations_r16_present, 1)); + + if (coreset_id_r16_present) { + HANDLE_CODE(unpack_integer(coreset_id_r16, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (search_space_type_r16_present) { + bref.unpack(search_space_type_r16.common_r16.ext, 1); + HANDLE_CODE(bref.unpack(search_space_type_r16.common_r16.dci_format2_4_r16_present, 1)); + HANDLE_CODE(bref.unpack(search_space_type_r16.common_r16.dci_format2_5_r16_present, 1)); + HANDLE_CODE(bref.unpack(search_space_type_r16.common_r16.dci_format2_6_r16_present, 1)); + if (search_space_type_r16.common_r16.dci_format2_4_r16_present) { + bref.unpack(search_space_type_r16.common_r16.dci_format2_4_r16.ext, 1); + HANDLE_CODE(bref.unpack( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16_present, 1)); + HANDLE_CODE(bref.unpack( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16_present, 1)); + HANDLE_CODE(bref.unpack( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16_present, 1)); + HANDLE_CODE(bref.unpack( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16_present, 1)); + HANDLE_CODE(bref.unpack( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16_present, + 1)); + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16.unpack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16.unpack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16.unpack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16.unpack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16.unpack( + bref)); + } + } + if (search_space_type_r16.common_r16.dci_format2_5_r16_present) { + bref.unpack(search_space_type_r16.common_r16.dci_format2_5_r16.ext, 1); + HANDLE_CODE(bref.unpack( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16_present, + 1)); + HANDLE_CODE(bref.unpack( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16_present, + 1)); + HANDLE_CODE(bref.unpack( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16_present, + 1)); + HANDLE_CODE(bref.unpack( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16_present, + 1)); + HANDLE_CODE(bref.unpack( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16_present, + 1)); + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16.unpack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16.unpack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16.unpack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16.unpack( + bref)); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16_present) { + HANDLE_CODE( + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16.unpack( + bref)); + } + } + if (search_space_type_r16.common_r16.dci_format2_6_r16_present) { + bref.unpack(search_space_type_r16.common_r16.dci_format2_6_r16.ext, 1); + } + } + if (search_space_group_id_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(search_space_group_id_list_r16, bref, 1, 2, integer_packer(0, 1))); + } + if (freq_monitor_locations_r16_present) { + HANDLE_CODE(freq_monitor_locations_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void search_space_ext_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (coreset_id_r16_present) { + j.write_int("controlResourceSetId-r16", coreset_id_r16); + } + if (search_space_type_r16_present) { + j.write_fieldname("searchSpaceType-r16"); + j.start_obj(); + j.write_fieldname("common-r16"); + j.start_obj(); + if (search_space_type_r16.common_r16.dci_format2_4_r16_present) { + j.write_fieldname("dci-Format2-4-r16"); + j.start_obj(); + j.write_fieldname("nrofCandidates-CI-r16"); + j.start_obj(); + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16_present) { + j.write_str("aggregationLevel1-r16", + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16 + .to_string()); + } + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16_present) { + j.write_str("aggregationLevel2-r16", + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16 + .to_string()); + } + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16_present) { + j.write_str("aggregationLevel4-r16", + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16 + .to_string()); + } + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16_present) { + j.write_str("aggregationLevel8-r16", + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16 + .to_string()); + } + if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16_present) { + j.write_str("aggregationLevel16-r16", + search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16 + .to_string()); + } + j.end_obj(); + j.end_obj(); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16_present) { + j.write_fieldname("dci-Format2-5-r16"); + j.start_obj(); + j.write_fieldname("nrofCandidates-IAB-r16"); + j.start_obj(); + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16_present) { + j.write_str("aggregationLevel1-r16", + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16 + .to_string()); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16_present) { + j.write_str("aggregationLevel2-r16", + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16 + .to_string()); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16_present) { + j.write_str("aggregationLevel4-r16", + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16 + .to_string()); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16_present) { + j.write_str("aggregationLevel8-r16", + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16 + .to_string()); + } + if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16_present) { + j.write_str("aggregationLevel16-r16", + search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16 + .to_string()); + } + j.end_obj(); + j.end_obj(); + } + if (search_space_type_r16.common_r16.dci_format2_6_r16_present) { + j.write_fieldname("dci-Format2-6-r16"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); + j.end_obj(); + } + if (search_space_group_id_list_r16.size() > 0) { + j.start_array("searchSpaceGroupIdList-r16"); + for (const auto& e1 : search_space_group_id_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (freq_monitor_locations_r16_present) { + j.write_str("freqMonitorLocations-r16", freq_monitor_locations_r16.to_string()); + } + j.end_obj(); +} + +const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: + nrof_candidates_ci_r16_s_::aggregation_level1_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" + "candidates_ci_r16_s_::aggregation_level1_r16_e_"); +} +uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: + nrof_candidates_ci_r16_s_::aggregation_level1_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" + "candidates_ci_r16_s_::aggregation_level1_r16_e_"); +} + +const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: + nrof_candidates_ci_r16_s_::aggregation_level2_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" + "candidates_ci_r16_s_::aggregation_level2_r16_e_"); +} +uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: + nrof_candidates_ci_r16_s_::aggregation_level2_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" + "candidates_ci_r16_s_::aggregation_level2_r16_e_"); +} + +const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: + nrof_candidates_ci_r16_s_::aggregation_level4_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" + "candidates_ci_r16_s_::aggregation_level4_r16_e_"); +} +uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: + nrof_candidates_ci_r16_s_::aggregation_level4_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" + "candidates_ci_r16_s_::aggregation_level4_r16_e_"); +} + +const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: + nrof_candidates_ci_r16_s_::aggregation_level8_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" + "candidates_ci_r16_s_::aggregation_level8_r16_e_"); +} +uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: + nrof_candidates_ci_r16_s_::aggregation_level8_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" + "candidates_ci_r16_s_::aggregation_level8_r16_e_"); +} + +const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: + nrof_candidates_ci_r16_s_::aggregation_level16_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" + "candidates_ci_r16_s_::aggregation_level16_r16_e_"); +} +uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: + nrof_candidates_ci_r16_s_::aggregation_level16_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" + "candidates_ci_r16_s_::aggregation_level16_r16_e_"); +} + +const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: + nrof_candidates_iab_r16_s_::aggregation_level1_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" + "candidates_iab_r16_s_::aggregation_level1_r16_e_"); +} +uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: + nrof_candidates_iab_r16_s_::aggregation_level1_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" + "candidates_iab_r16_s_::aggregation_level1_r16_e_"); +} + +const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: + nrof_candidates_iab_r16_s_::aggregation_level2_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" + "candidates_iab_r16_s_::aggregation_level2_r16_e_"); +} +uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: + nrof_candidates_iab_r16_s_::aggregation_level2_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" + "candidates_iab_r16_s_::aggregation_level2_r16_e_"); +} + +const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: + nrof_candidates_iab_r16_s_::aggregation_level4_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" + "candidates_iab_r16_s_::aggregation_level4_r16_e_"); +} +uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: + nrof_candidates_iab_r16_s_::aggregation_level4_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" + "candidates_iab_r16_s_::aggregation_level4_r16_e_"); +} + +const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: + nrof_candidates_iab_r16_s_::aggregation_level8_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" + "candidates_iab_r16_s_::aggregation_level8_r16_e_"); +} +uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: + nrof_candidates_iab_r16_s_::aggregation_level8_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" + "candidates_iab_r16_s_::aggregation_level8_r16_e_"); +} + +const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: + nrof_candidates_iab_r16_s_::aggregation_level16_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" + "candidates_iab_r16_s_::aggregation_level16_r16_e_"); +} +uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: + nrof_candidates_iab_r16_s_::aggregation_level16_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" + "candidates_iab_r16_s_::aggregation_level16_r16_e_"); +} + +// SearchSpaceExt-v1700 ::= SEQUENCE +SRSASN_CODE search_space_ext_v1700_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(monitoring_slot_periodicity_and_offset_v1710_present, 1)); + HANDLE_CODE(bref.pack(monitoring_slots_within_slot_group_r17_present, 1)); + HANDLE_CODE(bref.pack(dur_r17_present, 1)); + HANDLE_CODE(bref.pack(search_space_type_r17_present, 1)); + HANDLE_CODE(bref.pack(search_space_group_id_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(search_space_linking_id_r17_present, 1)); + + if (monitoring_slot_periodicity_and_offset_v1710_present) { + HANDLE_CODE(monitoring_slot_periodicity_and_offset_v1710.pack(bref)); + } + if (monitoring_slots_within_slot_group_r17_present) { + HANDLE_CODE(monitoring_slots_within_slot_group_r17.pack(bref)); + } + if (dur_r17_present) { + HANDLE_CODE(pack_integer(bref, dur_r17, (uint16_t)4u, (uint16_t)20476u)); + } + if (search_space_type_r17_present) { + HANDLE_CODE(bref.pack(search_space_type_r17.common_r17.dci_format4_0_r17_present, 1)); + HANDLE_CODE(bref.pack(search_space_type_r17.common_r17.dci_format4_1_r17_present, 1)); + HANDLE_CODE(bref.pack(search_space_type_r17.common_r17.dci_format4_2_r17_present, 1)); + HANDLE_CODE(bref.pack(search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17_present, 1)); + HANDLE_CODE(bref.pack(search_space_type_r17.common_r17.dci_format2_7_r17_present, 1)); + if (search_space_type_r17.common_r17.dci_format4_0_r17_present) { + bref.pack(search_space_type_r17.common_r17.dci_format4_0_r17.ext, 1); + } + if (search_space_type_r17.common_r17.dci_format4_1_r17_present) { + bref.pack(search_space_type_r17.common_r17.dci_format4_1_r17.ext, 1); + } + if (search_space_type_r17.common_r17.dci_format4_2_r17_present) { + bref.pack(search_space_type_r17.common_r17.dci_format4_2_r17.ext, 1); + } + if (search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17_present) { + bref.pack(search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17.ext, 1); + } + if (search_space_type_r17.common_r17.dci_format2_7_r17_present) { + bref.pack(search_space_type_r17.common_r17.dci_format2_7_r17.ext, 1); + HANDLE_CODE(bref.pack( + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17_present, + 1)); + HANDLE_CODE(bref.pack( + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17_present, + 1)); + HANDLE_CODE(bref.pack( + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17_present, + 1)); + if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17_present) { + HANDLE_CODE( + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17.pack( + bref)); + } + if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17_present) { + HANDLE_CODE( + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17.pack( + bref)); + } + if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17_present) { + HANDLE_CODE( + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17.pack( + bref)); + } + } + } + if (search_space_group_id_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, search_space_group_id_list_r17, 1, 3, integer_packer(0, 2))); + } + if (search_space_linking_id_r17_present) { + HANDLE_CODE(pack_integer(bref, search_space_linking_id_r17, (uint8_t)0u, (uint8_t)39u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE search_space_ext_v1700_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(monitoring_slot_periodicity_and_offset_v1710_present, 1)); + HANDLE_CODE(bref.unpack(monitoring_slots_within_slot_group_r17_present, 1)); + HANDLE_CODE(bref.unpack(dur_r17_present, 1)); + HANDLE_CODE(bref.unpack(search_space_type_r17_present, 1)); + bool search_space_group_id_list_r17_present; + HANDLE_CODE(bref.unpack(search_space_group_id_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(search_space_linking_id_r17_present, 1)); + + if (monitoring_slot_periodicity_and_offset_v1710_present) { + HANDLE_CODE(monitoring_slot_periodicity_and_offset_v1710.unpack(bref)); + } + if (monitoring_slots_within_slot_group_r17_present) { + HANDLE_CODE(monitoring_slots_within_slot_group_r17.unpack(bref)); + } + if (dur_r17_present) { + HANDLE_CODE(unpack_integer(dur_r17, bref, (uint16_t)4u, (uint16_t)20476u)); + } + if (search_space_type_r17_present) { + HANDLE_CODE(bref.unpack(search_space_type_r17.common_r17.dci_format4_0_r17_present, 1)); + HANDLE_CODE(bref.unpack(search_space_type_r17.common_r17.dci_format4_1_r17_present, 1)); + HANDLE_CODE(bref.unpack(search_space_type_r17.common_r17.dci_format4_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(search_space_type_r17.common_r17.dci_format2_7_r17_present, 1)); + if (search_space_type_r17.common_r17.dci_format4_0_r17_present) { + bref.unpack(search_space_type_r17.common_r17.dci_format4_0_r17.ext, 1); + } + if (search_space_type_r17.common_r17.dci_format4_1_r17_present) { + bref.unpack(search_space_type_r17.common_r17.dci_format4_1_r17.ext, 1); + } + if (search_space_type_r17.common_r17.dci_format4_2_r17_present) { + bref.unpack(search_space_type_r17.common_r17.dci_format4_2_r17.ext, 1); + } + if (search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17_present) { + bref.unpack(search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17.ext, 1); + } + if (search_space_type_r17.common_r17.dci_format2_7_r17_present) { + bref.unpack(search_space_type_r17.common_r17.dci_format2_7_r17.ext, 1); + HANDLE_CODE(bref.unpack( + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17_present, + 1)); + HANDLE_CODE(bref.unpack( + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17_present, + 1)); + HANDLE_CODE(bref.unpack( + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17_present, + 1)); + if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17_present) { + HANDLE_CODE( + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17.unpack( + bref)); + } + if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17_present) { + HANDLE_CODE( + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17.unpack( + bref)); + } + if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17_present) { + HANDLE_CODE( + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17.unpack( + bref)); + } + } + } + if (search_space_group_id_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(search_space_group_id_list_r17, bref, 1, 3, integer_packer(0, 2))); + } + if (search_space_linking_id_r17_present) { + HANDLE_CODE(unpack_integer(search_space_linking_id_r17, bref, (uint8_t)0u, (uint8_t)39u)); + } + + return SRSASN_SUCCESS; +} +void search_space_ext_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (monitoring_slot_periodicity_and_offset_v1710_present) { + j.write_fieldname("monitoringSlotPeriodicityAndOffset-v1710"); + monitoring_slot_periodicity_and_offset_v1710.to_json(j); + } + if (monitoring_slots_within_slot_group_r17_present) { + j.write_fieldname("monitoringSlotsWithinSlotGroup-r17"); + monitoring_slots_within_slot_group_r17.to_json(j); + } + if (dur_r17_present) { + j.write_int("duration-r17", dur_r17); + } + if (search_space_type_r17_present) { + j.write_fieldname("searchSpaceType-r17"); + j.start_obj(); + j.write_fieldname("common-r17"); + j.start_obj(); + if (search_space_type_r17.common_r17.dci_format4_0_r17_present) { + j.write_fieldname("dci-Format4-0-r17"); + j.start_obj(); + j.end_obj(); + } + if (search_space_type_r17.common_r17.dci_format4_1_r17_present) { + j.write_fieldname("dci-Format4-1-r17"); + j.start_obj(); + j.end_obj(); + } + if (search_space_type_r17.common_r17.dci_format4_2_r17_present) { + j.write_fieldname("dci-Format4-2-r17"); + j.start_obj(); + j.end_obj(); + } + if (search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17_present) { + j.write_fieldname("dci-Format4-1-AndFormat4-2-r17"); + j.start_obj(); + j.end_obj(); + } + if (search_space_type_r17.common_r17.dci_format2_7_r17_present) { + j.write_fieldname("dci-Format2-7-r17"); + j.start_obj(); + j.write_fieldname("nrofCandidates-PEI-r17"); + j.start_obj(); + if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17_present) { + j.write_str("aggregationLevel4-r17", + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17 + .to_string()); + } + if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17_present) { + j.write_str("aggregationLevel8-r17", + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17 + .to_string()); + } + if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17_present) { + j.write_str("aggregationLevel16-r17", + search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17 + .to_string()); + } + j.end_obj(); + j.end_obj(); + } + j.end_obj(); + j.end_obj(); + } + if (search_space_group_id_list_r17.size() > 0) { + j.start_array("searchSpaceGroupIdList-r17"); + for (const auto& e1 : search_space_group_id_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (search_space_linking_id_r17_present) { + j.write_int("searchSpaceLinkingId-r17", search_space_linking_id_r17); + } + j.end_obj(); +} + +void search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::destroy_() {} +void search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_:: + monitoring_slot_periodicity_and_offset_v1710_c_( + const search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sl32: + c.init(other.c.get()); + break; + case types::sl64: + c.init(other.c.get()); + break; + case types::sl128: + c.init(other.c.get()); + break; + case types::sl5120: + c.init(other.c.get()); + break; + case types::sl10240: + c.init(other.c.get()); + break; + case types::sl20480: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_"); + } +} +search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_& +search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::operator=( + const search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sl32: + c.set(other.c.get()); + break; + case types::sl64: + c.set(other.c.get()); + break; + case types::sl128: + c.set(other.c.get()); + break; + case types::sl5120: + c.set(other.c.get()); + break; + case types::sl10240: + c.set(other.c.get()); + break; + case types::sl20480: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_"); + } + + return *this; +} +uint8_t& search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set_sl32() +{ + set(types::sl32); + return c.get(); +} +uint8_t& search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set_sl64() +{ + set(types::sl64); + return c.get(); +} +uint8_t& search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set_sl128() +{ + set(types::sl128); + return c.get(); +} +uint16_t& search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set_sl5120() +{ + set(types::sl5120); + return c.get(); +} +uint16_t& search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set_sl10240() +{ + set(types::sl10240); + return c.get(); +} +uint16_t& search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set_sl20480() +{ + set(types::sl20480); + return c.get(); +} +void search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sl32: + j.write_int("sl32", c.get()); + break; + case types::sl64: + j.write_int("sl64", c.get()); + break; + case types::sl128: + j.write_int("sl128", c.get()); + break; + case types::sl5120: + j.write_int("sl5120", c.get()); + break; + case types::sl10240: + j.write_int("sl10240", c.get()); + break; + case types::sl20480: + j.write_int("sl20480", c.get()); + break; + default: + log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_"); + } + j.end_obj(); +} +SRSASN_CODE search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::sl32: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); + break; + case types::sl64: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::sl128: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + break; + case types::sl5120: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); + break; + case types::sl10240: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); + break; + case types::sl20480: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)20479u)); + break; + default: + log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::sl32: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); + break; + case types::sl64: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::sl128: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + break; + case types::sl5120: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); + break; + case types::sl10240: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); + break; + case types::sl20480: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)20479u)); + break; + default: + log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::types_opts::to_string() const +{ + static const char* names[] = {"sl32", "sl64", "sl128", "sl5120", "sl10240", "sl20480"}; + return convert_enum_idx( + names, 6, value, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::types"); +} +uint16_t search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {32, 64, 128, 5120, 10240, 20480}; + return map_enum_number( + numbers, 6, value, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::types"); +} + +void search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::destroy_() +{ + switch (type_) { + case types::slot_group_len4_r17: + c.destroy>(); + break; + case types::slot_group_len8_r17: + c.destroy>(); + break; + default: + break; + } +} +void search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::slot_group_len4_r17: + c.init>(); + break; + case types::slot_group_len8_r17: + c.init>(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_"); + } +} +search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::monitoring_slots_within_slot_group_r17_c_( + const search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::slot_group_len4_r17: + c.init(other.c.get>()); + break; + case types::slot_group_len8_r17: + c.init(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_"); + } +} +search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_& +search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::operator=( + const search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::slot_group_len4_r17: + c.set(other.c.get>()); + break; + case types::slot_group_len8_r17: + c.set(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_"); + } + + return *this; +} +fixed_bitstring<4>& search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::set_slot_group_len4_r17() +{ + set(types::slot_group_len4_r17); + return c.get>(); +} +fixed_bitstring<8>& search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::set_slot_group_len8_r17() +{ + set(types::slot_group_len8_r17); + return c.get>(); +} +void search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::slot_group_len4_r17: + j.write_str("slotGroupLength4-r17", c.get>().to_string()); + break; + case types::slot_group_len8_r17: + j.write_str("slotGroupLength8-r17", c.get>().to_string()); + break; + default: + log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::slot_group_len4_r17: + HANDLE_CODE(c.get>().pack(bref)); + break; + case types::slot_group_len8_r17: + HANDLE_CODE(c.get>().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::slot_group_len4_r17: + HANDLE_CODE(c.get>().unpack(bref)); + break; + case types::slot_group_len8_r17: + HANDLE_CODE(c.get>().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"slotGroupLength4-r17", "slotGroupLength8-r17"}; + return convert_enum_idx( + names, 2, value, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::types"); +} +uint8_t search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {4, 8}; + return map_enum_number( + numbers, 2, value, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::types"); +} + +const char* search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_:: + nrof_candidates_pei_r17_s_::aggregation_level4_r17_opts::to_string() const +{ + static const char* names[] = {"n0", "n1", "n2", "n3", "n4"}; + return convert_enum_idx(names, + 5, + value, + "search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_::" + "nrof_candidates_pei_r17_s_::aggregation_level4_r17_e_"); +} +uint8_t search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_:: + nrof_candidates_pei_r17_s_::aggregation_level4_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2, 3, 4}; + return map_enum_number(numbers, + 5, + value, + "search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_::" + "nrof_candidates_pei_r17_s_::aggregation_level4_r17_e_"); +} + +const char* search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_:: + nrof_candidates_pei_r17_s_::aggregation_level8_r17_opts::to_string() const +{ + static const char* names[] = {"n0", "n1", "n2"}; + return convert_enum_idx(names, + 3, + value, + "search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_::" + "nrof_candidates_pei_r17_s_::aggregation_level8_r17_e_"); +} +uint8_t search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_:: + nrof_candidates_pei_r17_s_::aggregation_level8_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2}; + return map_enum_number(numbers, + 3, + value, + "search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_::" + "nrof_candidates_pei_r17_s_::aggregation_level8_r17_e_"); +} + +const char* search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_:: + nrof_candidates_pei_r17_s_::aggregation_level16_r17_opts::to_string() const +{ + static const char* names[] = {"n0", "n1"}; + return convert_enum_idx(names, + 2, + value, + "search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_::" + "nrof_candidates_pei_r17_s_::aggregation_level16_r17_e_"); +} +uint8_t search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_:: + nrof_candidates_pei_r17_s_::aggregation_level16_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, + 2, + value, + "search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_::" + "nrof_candidates_pei_r17_s_::aggregation_level16_r17_e_"); +} + +// BWP ::= SEQUENCE +SRSASN_CODE bwp_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cp_present, 1)); + + HANDLE_CODE(pack_integer(bref, location_and_bw, (uint16_t)0u, (uint16_t)37949u)); + HANDLE_CODE(subcarrier_spacing.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE bwp_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cp_present, 1)); + + HANDLE_CODE(unpack_integer(location_and_bw, bref, (uint16_t)0u, (uint16_t)37949u)); + HANDLE_CODE(subcarrier_spacing.unpack(bref)); + + return SRSASN_SUCCESS; +} +void bwp_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("locationAndBandwidth", location_and_bw); + j.write_str("subcarrierSpacing", subcarrier_spacing.to_string()); + if (cp_present) { + j.write_str("cyclicPrefix", "extended"); + } + j.end_obj(); +} + +// NumberOfMsg3-Repetitions-r17 ::= ENUMERATED +const char* nof_msg3_repeats_r17_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n3", "n4", "n7", "n8", "n12", "n16"}; + return convert_enum_idx(names, 8, value, "nof_msg3_repeats_r17_e"); +} +uint8_t nof_msg3_repeats_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3, 4, 7, 8, 12, 16}; + return map_enum_number(numbers, 8, value, "nof_msg3_repeats_r17_e"); +} + +// PDCCH-ConfigCommon ::= SEQUENCE +SRSASN_CODE pdcch_cfg_common_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(coreset_zero_present, 1)); + HANDLE_CODE(bref.pack(common_coreset_present, 1)); + HANDLE_CODE(bref.pack(search_space_zero_present, 1)); + HANDLE_CODE(bref.pack(common_search_space_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(search_space_sib1_present, 1)); + HANDLE_CODE(bref.pack(search_space_other_sys_info_present, 1)); + HANDLE_CODE(bref.pack(paging_search_space_present, 1)); + HANDLE_CODE(bref.pack(ra_search_space_present, 1)); + + if (coreset_zero_present) { + HANDLE_CODE(pack_integer(bref, coreset_zero, (uint8_t)0u, (uint8_t)15u)); + } + if (common_coreset_present) { + HANDLE_CODE(common_coreset.pack(bref)); + } + if (search_space_zero_present) { + HANDLE_CODE(pack_integer(bref, search_space_zero, (uint8_t)0u, (uint8_t)15u)); + } + if (common_search_space_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, common_search_space_list, 1, 4)); + } + if (search_space_sib1_present) { + HANDLE_CODE(pack_integer(bref, search_space_sib1, (uint8_t)0u, (uint8_t)39u)); + } + if (search_space_other_sys_info_present) { + HANDLE_CODE(pack_integer(bref, search_space_other_sys_info, (uint8_t)0u, (uint8_t)39u)); + } + if (paging_search_space_present) { + HANDLE_CODE(pack_integer(bref, paging_search_space, (uint8_t)0u, (uint8_t)39u)); + } + if (ra_search_space_present) { + HANDLE_CODE(pack_integer(bref, ra_search_space, (uint8_t)0u, (uint8_t)39u)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= first_pdcch_monitoring_occasion_of_po.is_present(); + group_flags[1] |= common_search_space_list_ext_r16.is_present(); + group_flags[2] |= sdt_search_space_r17.is_present(); + group_flags[2] |= search_space_mcch_r17_present; + group_flags[2] |= search_space_mtch_r17_present; + group_flags[2] |= common_search_space_list_ext2_r17.is_present(); + group_flags[2] |= first_pdcch_monitoring_occasion_of_po_v1710.is_present(); + group_flags[2] |= pei_cfg_bwp_r17.is_present(); + group_flags[3] |= follow_unified_tci_state_v1720_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(first_pdcch_monitoring_occasion_of_po.is_present(), 1)); + if (first_pdcch_monitoring_occasion_of_po.is_present()) { + HANDLE_CODE(first_pdcch_monitoring_occasion_of_po->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(common_search_space_list_ext_r16.is_present(), 1)); + if (common_search_space_list_ext_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *common_search_space_list_ext_r16, 1, 4)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sdt_search_space_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(search_space_mcch_r17_present, 1)); + HANDLE_CODE(bref.pack(search_space_mtch_r17_present, 1)); + HANDLE_CODE(bref.pack(common_search_space_list_ext2_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(first_pdcch_monitoring_occasion_of_po_v1710.is_present(), 1)); + HANDLE_CODE(bref.pack(pei_cfg_bwp_r17.is_present(), 1)); + if (sdt_search_space_r17.is_present()) { + HANDLE_CODE(sdt_search_space_r17->pack(bref)); + } + if (search_space_mcch_r17_present) { + HANDLE_CODE(pack_integer(bref, search_space_mcch_r17, (uint8_t)0u, (uint8_t)39u)); + } + if (search_space_mtch_r17_present) { + HANDLE_CODE(pack_integer(bref, search_space_mtch_r17, (uint8_t)0u, (uint8_t)39u)); + } + if (common_search_space_list_ext2_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *common_search_space_list_ext2_r17, 1, 4)); + } + if (first_pdcch_monitoring_occasion_of_po_v1710.is_present()) { + HANDLE_CODE(first_pdcch_monitoring_occasion_of_po_v1710->pack(bref)); + } + if (pei_cfg_bwp_r17.is_present()) { + HANDLE_CODE(pack_integer(bref, pei_cfg_bwp_r17->pei_search_space_r17, (uint8_t)0u, (uint8_t)39u)); + HANDLE_CODE(pei_cfg_bwp_r17->first_pdcch_monitoring_occasion_of_pei_o_r17.pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(follow_unified_tci_state_v1720_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcch_cfg_common_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(coreset_zero_present, 1)); + HANDLE_CODE(bref.unpack(common_coreset_present, 1)); + HANDLE_CODE(bref.unpack(search_space_zero_present, 1)); + bool common_search_space_list_present; + HANDLE_CODE(bref.unpack(common_search_space_list_present, 1)); + HANDLE_CODE(bref.unpack(search_space_sib1_present, 1)); + HANDLE_CODE(bref.unpack(search_space_other_sys_info_present, 1)); + HANDLE_CODE(bref.unpack(paging_search_space_present, 1)); + HANDLE_CODE(bref.unpack(ra_search_space_present, 1)); + + if (coreset_zero_present) { + HANDLE_CODE(unpack_integer(coreset_zero, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (common_coreset_present) { + HANDLE_CODE(common_coreset.unpack(bref)); + } + if (search_space_zero_present) { + HANDLE_CODE(unpack_integer(search_space_zero, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (common_search_space_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(common_search_space_list, bref, 1, 4)); + } + if (search_space_sib1_present) { + HANDLE_CODE(unpack_integer(search_space_sib1, bref, (uint8_t)0u, (uint8_t)39u)); + } + if (search_space_other_sys_info_present) { + HANDLE_CODE(unpack_integer(search_space_other_sys_info, bref, (uint8_t)0u, (uint8_t)39u)); + } + if (paging_search_space_present) { + HANDLE_CODE(unpack_integer(paging_search_space, bref, (uint8_t)0u, (uint8_t)39u)); + } + if (ra_search_space_present) { + HANDLE_CODE(unpack_integer(ra_search_space, bref, (uint8_t)0u, (uint8_t)39u)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(first_pdcch_monitoring_occasion_of_po, bref); + if (first_pdcch_monitoring_occasion_of_po.is_present()) { + HANDLE_CODE(first_pdcch_monitoring_occasion_of_po->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(common_search_space_list_ext_r16, bref); + if (common_search_space_list_ext_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*common_search_space_list_ext_r16, bref, 1, 4)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(sdt_search_space_r17, bref); + HANDLE_CODE(bref.unpack(search_space_mcch_r17_present, 1)); + HANDLE_CODE(bref.unpack(search_space_mtch_r17_present, 1)); + unpack_presence_flag(common_search_space_list_ext2_r17, bref); + unpack_presence_flag(first_pdcch_monitoring_occasion_of_po_v1710, bref); + unpack_presence_flag(pei_cfg_bwp_r17, bref); + if (sdt_search_space_r17.is_present()) { + HANDLE_CODE(sdt_search_space_r17->unpack(bref)); + } + if (search_space_mcch_r17_present) { + HANDLE_CODE(unpack_integer(search_space_mcch_r17, bref, (uint8_t)0u, (uint8_t)39u)); + } + if (search_space_mtch_r17_present) { + HANDLE_CODE(unpack_integer(search_space_mtch_r17, bref, (uint8_t)0u, (uint8_t)39u)); + } + if (common_search_space_list_ext2_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*common_search_space_list_ext2_r17, bref, 1, 4)); + } + if (first_pdcch_monitoring_occasion_of_po_v1710.is_present()) { + HANDLE_CODE(first_pdcch_monitoring_occasion_of_po_v1710->unpack(bref)); + } + if (pei_cfg_bwp_r17.is_present()) { + HANDLE_CODE(unpack_integer(pei_cfg_bwp_r17->pei_search_space_r17, bref, (uint8_t)0u, (uint8_t)39u)); + HANDLE_CODE(pei_cfg_bwp_r17->first_pdcch_monitoring_occasion_of_pei_o_r17.unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(follow_unified_tci_state_v1720_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void pdcch_cfg_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (coreset_zero_present) { + j.write_int("controlResourceSetZero", coreset_zero); + } + if (common_coreset_present) { + j.write_fieldname("commonControlResourceSet"); + common_coreset.to_json(j); + } + if (search_space_zero_present) { + j.write_int("searchSpaceZero", search_space_zero); + } + if (common_search_space_list.size() > 0) { + j.start_array("commonSearchSpaceList"); + for (const auto& e1 : common_search_space_list) { + e1.to_json(j); + } + j.end_array(); + } + if (search_space_sib1_present) { + j.write_int("searchSpaceSIB1", search_space_sib1); + } + if (search_space_other_sys_info_present) { + j.write_int("searchSpaceOtherSystemInformation", search_space_other_sys_info); + } + if (paging_search_space_present) { + j.write_int("pagingSearchSpace", paging_search_space); + } + if (ra_search_space_present) { + j.write_int("ra-SearchSpace", ra_search_space); + } + if (ext) { + if (first_pdcch_monitoring_occasion_of_po.is_present()) { + j.write_fieldname("firstPDCCH-MonitoringOccasionOfPO"); + first_pdcch_monitoring_occasion_of_po->to_json(j); + } + if (common_search_space_list_ext_r16.is_present()) { + j.start_array("commonSearchSpaceListExt-r16"); + for (const auto& e1 : *common_search_space_list_ext_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sdt_search_space_r17.is_present()) { + j.write_fieldname("sdt-SearchSpace-r17"); + sdt_search_space_r17->to_json(j); + } + if (search_space_mcch_r17_present) { + j.write_int("searchSpaceMCCH-r17", search_space_mcch_r17); + } + if (search_space_mtch_r17_present) { + j.write_int("searchSpaceMTCH-r17", search_space_mtch_r17); + } + if (common_search_space_list_ext2_r17.is_present()) { + j.start_array("commonSearchSpaceListExt2-r17"); + for (const auto& e1 : *common_search_space_list_ext2_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (first_pdcch_monitoring_occasion_of_po_v1710.is_present()) { + j.write_fieldname("firstPDCCH-MonitoringOccasionOfPO-v1710"); + first_pdcch_monitoring_occasion_of_po_v1710->to_json(j); + } + if (pei_cfg_bwp_r17.is_present()) { + j.write_fieldname("pei-ConfigBWP-r17"); + j.start_obj(); + j.write_int("pei-SearchSpace-r17", pei_cfg_bwp_r17->pei_search_space_r17); + j.write_fieldname("firstPDCCH-MonitoringOccasionOfPEI-O-r17"); + pei_cfg_bwp_r17->first_pdcch_monitoring_occasion_of_pei_o_r17.to_json(j); + j.end_obj(); + } + if (follow_unified_tci_state_v1720_present) { + j.write_str("followUnifiedTCI-State-v1720", "enabled"); + } + } + j.end_obj(); +} + +void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::destroy_() +{ + switch (type_) { + case types::scs15_kh_zone_t: + c.destroy(); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + c.destroy(); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + c.destroy(); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + c.destroy(); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + c.destroy(); + break; + case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + c.destroy(); + break; + case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + c.destroy(); + break; + case types::scs120_kh_zone_sixteenth_t: + c.destroy(); + break; + default: + break; + } +} +void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::scs15_kh_zone_t: + c.init(); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + c.init(); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + c.init(); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + c.init(); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + c.init(); + break; + case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + c.init(); + break; + case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + c.init(); + break; + case types::scs120_kh_zone_sixteenth_t: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_"); + } +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::first_pdcch_monitoring_occasion_of_po_c_( + const pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::scs15_kh_zone_t: + c.init(other.c.get()); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + c.init(other.c.get()); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + c.init(other.c.get()); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + c.init(other.c.get()); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + c.init(other.c.get()); + break; + case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + c.init(other.c.get()); + break; + case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + c.init(other.c.get()); + break; + case types::scs120_kh_zone_sixteenth_t: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_"); + } +} +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) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::scs15_kh_zone_t: + c.set(other.c.get()); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + c.set(other.c.get()); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + c.set(other.c.get()); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + c.set(other.c.get()); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + c.set(other.c.get()); + break; + case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + c.set(other.c.get()); + break; + case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + c.set(other.c.get()); + break; + case types::scs120_kh_zone_sixteenth_t: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_"); + } + + return *this; +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::scs15_kh_zone_t_l_& +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs15_kh_zone_t() +{ + set(types::scs15_kh_zone_t); + return c.get(); +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::scs30_kh_zone_t_scs15_kh_zhalf_t_l_& +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs30_kh_zone_t_scs15_kh_zhalf_t() +{ + set(types::scs30_kh_zone_t_scs15_kh_zhalf_t); + return c.get(); +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() +{ + set(types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t); + return c.get(); +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& + pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: + set_scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() +{ + set(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t); + return c.get(); +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& + pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: + set_scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() +{ + set(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t); + return c.get(); +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: + scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& + pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: + set_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() +{ + set(types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t); + return c.get(); +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() +{ + set(types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t); + return c.get(); +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::scs120_kh_zone_sixteenth_t_l_& +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs120_kh_zone_sixteenth_t() +{ + set(types::scs120_kh_zone_sixteenth_t); + return c.get(); +} +void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scs15_kh_zone_t: + j.start_array("sCS15KHZoneT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + j.start_array("sCS30KHZoneT-SCS15KHZhalfT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + j.start_array("sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + j.start_array("sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + j.start_array("sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT"); + for (const auto& e1 : + c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + j.start_array("sCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + j.start_array("sCS120KHZoneEighthT-SCS60KHZoneSixteenthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs120_kh_zone_sixteenth_t: + j.start_array("sCS120KHZoneSixteenthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::scs15_kh_zone_t: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 139))); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 279))); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + HANDLE_CODE(pack_dyn_seq_of(bref, + c.get(), + 1, + 4, + integer_packer(0, 559))); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + HANDLE_CODE( + pack_dyn_seq_of(bref, + c.get(), + 1, + 4, + integer_packer(0, 1119))); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + HANDLE_CODE(pack_dyn_seq_of( + bref, + c.get(), + 1, + 4, + integer_packer(0, 2239))); + break; + case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + HANDLE_CODE(pack_dyn_seq_of(bref, + c.get(), + 1, + 4, + integer_packer(0, 4479))); + break; + case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + HANDLE_CODE(pack_dyn_seq_of(bref, + c.get(), + 1, + 4, + integer_packer(0, 8959))); + break; + case types::scs120_kh_zone_sixteenth_t: + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 17919))); + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::scs15_kh_zone_t: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 139))); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + HANDLE_CODE(unpack_dyn_seq_of( + c.get(), bref, 1, 4, integer_packer(0, 279))); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), + bref, + 1, + 4, + integer_packer(0, 559))); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + HANDLE_CODE( + unpack_dyn_seq_of(c.get(), + bref, + 1, + 4, + integer_packer(0, 1119))); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + HANDLE_CODE(unpack_dyn_seq_of( + c.get(), + bref, + 1, + 4, + integer_packer(0, 2239))); + break; + case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), + bref, + 1, + 4, + integer_packer(0, 4479))); + break; + case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), + bref, + 1, + 4, + integer_packer(0, 8959))); + break; + case types::scs120_kh_zone_sixteenth_t: + HANDLE_CODE( + unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 17919))); + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::types_opts::to_string() const +{ + static const char* names[] = {"sCS15KHZoneT", + "sCS30KHZoneT-SCS15KHZhalfT", + "sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT", + "sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT", + "sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT", + "sCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT", + "sCS120KHZoneEighthT-SCS60KHZoneSixteenthT", + "sCS120KHZoneSixteenthT"}; + return convert_enum_idx(names, 8, value, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::types"); +} + +void pdcch_cfg_common_s::sdt_search_space_r17_c_::destroy_() +{ + switch (type_) { + case types::new_search_space: + c.destroy(); + break; + default: + break; + } +} +void pdcch_cfg_common_s::sdt_search_space_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::new_search_space: + c.init(); + break; + case types::existing_search_space: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::sdt_search_space_r17_c_"); + } +} +pdcch_cfg_common_s::sdt_search_space_r17_c_::sdt_search_space_r17_c_( + const pdcch_cfg_common_s::sdt_search_space_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::new_search_space: + c.init(other.c.get()); + break; + case types::existing_search_space: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::sdt_search_space_r17_c_"); + } +} +pdcch_cfg_common_s::sdt_search_space_r17_c_& +pdcch_cfg_common_s::sdt_search_space_r17_c_::operator=(const pdcch_cfg_common_s::sdt_search_space_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::new_search_space: + c.set(other.c.get()); + break; + case types::existing_search_space: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::sdt_search_space_r17_c_"); + } + + return *this; +} +search_space_s& pdcch_cfg_common_s::sdt_search_space_r17_c_::set_new_search_space() +{ + set(types::new_search_space); + return c.get(); +} +uint8_t& pdcch_cfg_common_s::sdt_search_space_r17_c_::set_existing_search_space() +{ + set(types::existing_search_space); + return c.get(); +} +void pdcch_cfg_common_s::sdt_search_space_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::new_search_space: + j.write_fieldname("newSearchSpace"); + c.get().to_json(j); + break; + case types::existing_search_space: + j.write_int("existingSearchSpace", c.get()); + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::sdt_search_space_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdcch_cfg_common_s::sdt_search_space_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::new_search_space: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::existing_search_space: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::sdt_search_space_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcch_cfg_common_s::sdt_search_space_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::new_search_space: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::existing_search_space: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::sdt_search_space_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pdcch_cfg_common_s::sdt_search_space_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"newSearchSpace", "existingSearchSpace"}; + return convert_enum_idx(names, 2, value, "pdcch_cfg_common_s::sdt_search_space_r17_c_::types"); +} + +void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::destroy_() +{ + switch (type_) { + case types::scs480_kh_zone_eighth_t: + c.destroy(); + break; + case types::scs480_kh_zone_sixteenth_t: + c.destroy(); + break; + default: + break; + } +} +void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::scs480_kh_zone_eighth_t: + c.init(); + break; + case types::scs480_kh_zone_sixteenth_t: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); + } +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::first_pdcch_monitoring_occasion_of_po_v1710_c_( + const pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::scs480_kh_zone_eighth_t: + c.init(other.c.get()); + break; + case types::scs480_kh_zone_sixteenth_t: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); + } +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_& +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::operator=( + const pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::scs480_kh_zone_eighth_t: + c.set(other.c.get()); + break; + case types::scs480_kh_zone_sixteenth_t: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); + } + + return *this; +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::scs480_kh_zone_eighth_t_l_& +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::set_scs480_kh_zone_eighth_t() +{ + set(types::scs480_kh_zone_eighth_t); + return c.get(); +} +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::scs480_kh_zone_sixteenth_t_l_& +pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::set_scs480_kh_zone_sixteenth_t() +{ + set(types::scs480_kh_zone_sixteenth_t); + return c.get(); +} +void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scs480_kh_zone_eighth_t: + j.start_array("sCS480KHZoneEighthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs480_kh_zone_sixteenth_t: + j.start_array("sCS480KHZoneSixteenthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::scs480_kh_zone_eighth_t: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 35839))); + break; + case types::scs480_kh_zone_sixteenth_t: + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 71679))); + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::scs480_kh_zone_eighth_t: + HANDLE_CODE( + unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 35839))); + break; + case types::scs480_kh_zone_sixteenth_t: + HANDLE_CODE( + unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 71679))); + break; + default: + log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::types_opts::to_string() const +{ + static const char* names[] = {"sCS480KHZoneEighthT", "sCS480KHZoneSixteenthT"}; + return convert_enum_idx(names, 2, value, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::types"); +} + +void pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::destroy_() +{ + switch (type_) { + case types::scs15_kh_zone_t: + c.destroy(); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + c.destroy(); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + c.destroy(); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + c.destroy(); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + c.destroy(); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + c.destroy(); + break; + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + c.destroy(); + break; + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + c.destroy(); + break; + case types::scs480_kh_zone_eighth_t: + c.destroy(); + break; + case types::scs480_kh_zone_sixteenth_t: + c.destroy(); + break; + default: + break; + } +} +void pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::scs15_kh_zone_t: + c.init(); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + c.init(); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + c.init(); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + c.init(); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + c.init(); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + c.init(); + break; + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + c.init(); + break; + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + c.init(); + break; + case types::scs480_kh_zone_eighth_t: + c.init(); + break; + case types::scs480_kh_zone_sixteenth_t: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_"); + } +} +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + first_pdcch_monitoring_occasion_of_pei_o_r17_c_( + const pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::scs15_kh_zone_t: + c.init(other.c.get()); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + c.init(other.c.get()); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + c.init(other.c.get()); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + c.init(other.c.get()); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + c.init(other.c.get()); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + c.init(other.c.get()); + break; + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + c.init(other.c.get()); + break; + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + c.init(other.c.get()); + break; + case types::scs480_kh_zone_eighth_t: + c.init(other.c.get()); + break; + case types::scs480_kh_zone_sixteenth_t: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_"); + } +} +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_& +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::operator=( + const pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::scs15_kh_zone_t: + c.set(other.c.get()); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + c.set(other.c.get()); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + c.set(other.c.get()); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + c.set(other.c.get()); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + c.set(other.c.get()); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + c.set(other.c.get()); + break; + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + c.set(other.c.get()); + break; + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + c.set(other.c.get()); + break; + case types::scs480_kh_zone_eighth_t: + c.set(other.c.get()); + break; + case types::scs480_kh_zone_sixteenth_t: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, + "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_"); + } + + return *this; +} +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::scs15_kh_zone_t_l_& +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::set_scs15_kh_zone_t() +{ + set(types::scs15_kh_zone_t); + return c.get(); +} +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + scs30_kh_zone_t_scs15_kh_zhalf_t_l_& + pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + set_scs30_kh_zone_t_scs15_kh_zhalf_t() +{ + set(types::scs30_kh_zone_t_scs15_kh_zhalf_t); + return c.get(); +} +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& + pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + set_scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() +{ + set(types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t); + return c.get(); +} +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& + pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + set_scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() +{ + set(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t); + return c.get(); +} +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& + pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + set_scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() +{ + set(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t); + return c.get(); +} +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& + pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + set_scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() +{ + set(types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t); + return c.get(); +} +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& + pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + set_scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() +{ + set(types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t); + return c.get(); +} +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& + pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + set_scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t() +{ + set(types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t); + return c.get(); +} +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::scs480_kh_zone_eighth_t_l_& +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::set_scs480_kh_zone_eighth_t() +{ + set(types::scs480_kh_zone_eighth_t); + return c.get(); +} +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::scs480_kh_zone_sixteenth_t_l_& +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: + set_scs480_kh_zone_sixteenth_t() +{ + set(types::scs480_kh_zone_sixteenth_t); + return c.get(); +} +void pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::to_json( + json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scs15_kh_zone_t: + j.start_array("sCS15KHZoneT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + j.start_array("sCS30KHZoneT-SCS15KHZhalfT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + j.start_array("sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + j.start_array("sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + j.start_array("sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT"); + for (const auto& e1 : + c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + j.start_array("sCS480KHZoneT-SCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT"); + for (const auto& e1 : + c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + j.start_array("sCS480KHZhalfT-SCS120KHZoneEighthT-SCS60KHZoneSixteenthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + j.start_array("sCS480KHZquarterT-SCS120KHZoneSixteenthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs480_kh_zone_eighth_t: + j.start_array("sCS480KHZoneEighthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs480_kh_zone_sixteenth_t: + j.start_array("sCS480KHZoneSixteenthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, + "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::scs15_kh_zone_t: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 139))); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 279))); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + HANDLE_CODE(pack_dyn_seq_of(bref, + c.get(), + 1, + 4, + integer_packer(0, 559))); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + HANDLE_CODE( + pack_dyn_seq_of(bref, + c.get(), + 1, + 4, + integer_packer(0, 1119))); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + HANDLE_CODE(pack_dyn_seq_of( + bref, + c.get(), + 1, + 4, + integer_packer(0, 2239))); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + HANDLE_CODE(pack_dyn_seq_of( + bref, + c.get(), + 1, + 4, + integer_packer(0, 4479))); + break; + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + HANDLE_CODE(pack_dyn_seq_of(bref, + c.get(), + 1, + 4, + integer_packer(0, 8959))); + break; + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get(), 1, 4, integer_packer(0, 17919))); + break; + case types::scs480_kh_zone_eighth_t: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 35839))); + break; + case types::scs480_kh_zone_sixteenth_t: + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 71679))); + break; + default: + log_invalid_choice_id(type_, + "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::scs15_kh_zone_t: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 139))); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + HANDLE_CODE(unpack_dyn_seq_of( + c.get(), bref, 1, 4, integer_packer(0, 279))); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), + bref, + 1, + 4, + integer_packer(0, 559))); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + HANDLE_CODE( + unpack_dyn_seq_of(c.get(), + bref, + 1, + 4, + integer_packer(0, 1119))); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + HANDLE_CODE(unpack_dyn_seq_of( + c.get(), + bref, + 1, + 4, + integer_packer(0, 2239))); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + HANDLE_CODE(unpack_dyn_seq_of( + c.get(), + bref, + 1, + 4, + integer_packer(0, 4479))); + break; + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), + bref, + 1, + 4, + integer_packer(0, 8959))); + break; + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + HANDLE_CODE(unpack_dyn_seq_of( + c.get(), bref, 1, 4, integer_packer(0, 17919))); + break; + case types::scs480_kh_zone_eighth_t: + HANDLE_CODE( + unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 35839))); + break; + case types::scs480_kh_zone_sixteenth_t: + HANDLE_CODE( + unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 71679))); + break; + default: + log_invalid_choice_id(type_, + "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* +pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"sCS15KHZoneT", + "sCS30KHZoneT-SCS15KHZhalfT", + "sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT", + "sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT", + "sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT", + "sCS480KHZoneT-SCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT", + "sCS480KHZhalfT-SCS120KHZoneEighthT-SCS60KHZoneSixteenthT", + "sCS480KHZquarterT-SCS120KHZoneSixteenthT", + "sCS480KHZoneEighthT", + "sCS480KHZoneSixteenthT"}; + return convert_enum_idx( + names, + 10, + value, + "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::types"); +} + +// PDSCH-ConfigCommon ::= SEQUENCE +SRSASN_CODE pdsch_cfg_common_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pdsch_time_domain_alloc_list.size() > 0, 1)); + + if (pdsch_time_domain_alloc_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, pdsch_time_domain_alloc_list, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_common_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool pdsch_time_domain_alloc_list_present; + HANDLE_CODE(bref.unpack(pdsch_time_domain_alloc_list_present, 1)); + + if (pdsch_time_domain_alloc_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(pdsch_time_domain_alloc_list, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void pdsch_cfg_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pdsch_time_domain_alloc_list.size() > 0) { + j.start_array("pdsch-TimeDomainAllocationList"); + for (const auto& e1 : pdsch_time_domain_alloc_list) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// PUCCH-ConfigCommon ::= SEQUENCE +SRSASN_CODE pucch_cfg_common_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pucch_res_common_present, 1)); + HANDLE_CODE(bref.pack(hop_id_present, 1)); + HANDLE_CODE(bref.pack(p0_nominal_present, 1)); + + if (pucch_res_common_present) { + HANDLE_CODE(pack_integer(bref, pucch_res_common, (uint8_t)0u, (uint8_t)15u)); + } + HANDLE_CODE(pucch_group_hop.pack(bref)); + if (hop_id_present) { + HANDLE_CODE(pack_integer(bref, hop_id, (uint16_t)0u, (uint16_t)1023u)); + } + if (p0_nominal_present) { + HANDLE_CODE(pack_integer(bref, p0_nominal, (int16_t)-202, (int16_t)24)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= nrof_prbs_present; + group_flags[0] |= intra_slot_fh_r17_present; + group_flags[0] |= pucch_res_common_red_cap_r17_present; + group_flags[0] |= add_prb_offset_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(nrof_prbs_present, 1)); + HANDLE_CODE(bref.pack(intra_slot_fh_r17_present, 1)); + HANDLE_CODE(bref.pack(pucch_res_common_red_cap_r17_present, 1)); + HANDLE_CODE(bref.pack(add_prb_offset_r17_present, 1)); + if (nrof_prbs_present) { + HANDLE_CODE(pack_integer(bref, nrof_prbs, (uint8_t)1u, (uint8_t)16u)); + } + if (intra_slot_fh_r17_present) { + HANDLE_CODE(intra_slot_fh_r17.pack(bref)); + } + if (pucch_res_common_red_cap_r17_present) { + HANDLE_CODE(pack_integer(bref, pucch_res_common_red_cap_r17, (uint8_t)0u, (uint8_t)15u)); + } + if (add_prb_offset_r17_present) { + HANDLE_CODE(add_prb_offset_r17.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_common_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pucch_res_common_present, 1)); + HANDLE_CODE(bref.unpack(hop_id_present, 1)); + HANDLE_CODE(bref.unpack(p0_nominal_present, 1)); + + if (pucch_res_common_present) { + HANDLE_CODE(unpack_integer(pucch_res_common, bref, (uint8_t)0u, (uint8_t)15u)); + } + HANDLE_CODE(pucch_group_hop.unpack(bref)); + if (hop_id_present) { + HANDLE_CODE(unpack_integer(hop_id, bref, (uint16_t)0u, (uint16_t)1023u)); + } + if (p0_nominal_present) { + HANDLE_CODE(unpack_integer(p0_nominal, bref, (int16_t)-202, (int16_t)24)); + } + + 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(nrof_prbs_present, 1)); + HANDLE_CODE(bref.unpack(intra_slot_fh_r17_present, 1)); + HANDLE_CODE(bref.unpack(pucch_res_common_red_cap_r17_present, 1)); + HANDLE_CODE(bref.unpack(add_prb_offset_r17_present, 1)); + if (nrof_prbs_present) { + HANDLE_CODE(unpack_integer(nrof_prbs, bref, (uint8_t)1u, (uint8_t)16u)); + } + if (intra_slot_fh_r17_present) { + HANDLE_CODE(intra_slot_fh_r17.unpack(bref)); + } + if (pucch_res_common_red_cap_r17_present) { + HANDLE_CODE(unpack_integer(pucch_res_common_red_cap_r17, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (add_prb_offset_r17_present) { + HANDLE_CODE(add_prb_offset_r17.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void pucch_cfg_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pucch_res_common_present) { + j.write_int("pucch-ResourceCommon", pucch_res_common); + } + j.write_str("pucch-GroupHopping", pucch_group_hop.to_string()); + if (hop_id_present) { + j.write_int("hoppingId", hop_id); + } + if (p0_nominal_present) { + j.write_int("p0-nominal", p0_nominal); + } + if (ext) { + if (nrof_prbs_present) { + j.write_int("nrofPRBs", nrof_prbs); + } + if (intra_slot_fh_r17_present) { + j.write_str("intra-SlotFH-r17", intra_slot_fh_r17.to_string()); + } + if (pucch_res_common_red_cap_r17_present) { + j.write_int("pucch-ResourceCommonRedCap-r17", pucch_res_common_red_cap_r17); + } + if (add_prb_offset_r17_present) { + j.write_str("additionalPRBOffset-r17", add_prb_offset_r17.to_string()); + } + } + j.end_obj(); +} + +const char* pucch_cfg_common_s::pucch_group_hop_opts::to_string() const +{ + static const char* names[] = {"neither", "enable", "disable"}; + return convert_enum_idx(names, 3, value, "pucch_cfg_common_s::pucch_group_hop_e_"); +} + +const char* pucch_cfg_common_s::intra_slot_fh_r17_opts::to_string() const +{ + static const char* names[] = {"fromLowerEdge", "fromUpperEdge"}; + return convert_enum_idx(names, 2, value, "pucch_cfg_common_s::intra_slot_fh_r17_e_"); +} + +const char* pucch_cfg_common_s::add_prb_offset_r17_opts::to_string() const +{ + static const char* names[] = {"n2", "n3", "n4", "n6", "n8", "n9", "n10", "n12"}; + return convert_enum_idx(names, 8, value, "pucch_cfg_common_s::add_prb_offset_r17_e_"); +} +uint8_t pucch_cfg_common_s::add_prb_offset_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 3, 4, 6, 8, 9, 10, 12}; + return map_enum_number(numbers, 8, value, "pucch_cfg_common_s::add_prb_offset_r17_e_"); +} + +// PUSCH-ConfigCommon ::= SEQUENCE +SRSASN_CODE pusch_cfg_common_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(group_hop_enabled_transform_precoding_present, 1)); + HANDLE_CODE(bref.pack(pusch_time_domain_alloc_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(msg3_delta_preamb_present, 1)); + HANDLE_CODE(bref.pack(p0_nominal_with_grant_present, 1)); + + if (pusch_time_domain_alloc_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, pusch_time_domain_alloc_list, 1, 16)); + } + if (msg3_delta_preamb_present) { + HANDLE_CODE(pack_integer(bref, msg3_delta_preamb, (int8_t)-1, (int8_t)6)); + } + if (p0_nominal_with_grant_present) { + HANDLE_CODE(pack_integer(bref, p0_nominal_with_grant, (int16_t)-202, (int16_t)24)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_common_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(group_hop_enabled_transform_precoding_present, 1)); + bool pusch_time_domain_alloc_list_present; + HANDLE_CODE(bref.unpack(pusch_time_domain_alloc_list_present, 1)); + HANDLE_CODE(bref.unpack(msg3_delta_preamb_present, 1)); + HANDLE_CODE(bref.unpack(p0_nominal_with_grant_present, 1)); + + if (pusch_time_domain_alloc_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(pusch_time_domain_alloc_list, bref, 1, 16)); + } + if (msg3_delta_preamb_present) { + HANDLE_CODE(unpack_integer(msg3_delta_preamb, bref, (int8_t)-1, (int8_t)6)); + } + if (p0_nominal_with_grant_present) { + HANDLE_CODE(unpack_integer(p0_nominal_with_grant, bref, (int16_t)-202, (int16_t)24)); + } + + return SRSASN_SUCCESS; +} +void pusch_cfg_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (group_hop_enabled_transform_precoding_present) { + j.write_str("groupHoppingEnabledTransformPrecoding", "enabled"); + } + if (pusch_time_domain_alloc_list.size() > 0) { + j.start_array("pusch-TimeDomainAllocationList"); + for (const auto& e1 : pusch_time_domain_alloc_list) { + e1.to_json(j); + } + j.end_array(); + } + if (msg3_delta_preamb_present) { + j.write_int("msg3-DeltaPreamble", msg3_delta_preamb); + } + if (p0_nominal_with_grant_present) { + j.write_int("p0-NominalWithGrant", p0_nominal_with_grant); + } + j.end_obj(); +} + +// BWP-DownlinkCommon ::= SEQUENCE +SRSASN_CODE bwp_dl_common_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pdcch_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_common_present, 1)); + + HANDLE_CODE(generic_params.pack(bref)); + if (pdcch_cfg_common_present) { + HANDLE_CODE(pdcch_cfg_common.pack(bref)); + } + if (pdsch_cfg_common_present) { + HANDLE_CODE(pdsch_cfg_common.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE bwp_dl_common_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pdcch_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_common_present, 1)); + + HANDLE_CODE(generic_params.unpack(bref)); + if (pdcch_cfg_common_present) { + HANDLE_CODE(pdcch_cfg_common.unpack(bref)); + } + if (pdsch_cfg_common_present) { + HANDLE_CODE(pdsch_cfg_common.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void bwp_dl_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("genericParameters"); + generic_params.to_json(j); + if (pdcch_cfg_common_present) { + j.write_fieldname("pdcch-ConfigCommon"); + pdcch_cfg_common.to_json(j); + } + if (pdsch_cfg_common_present) { + j.write_fieldname("pdsch-ConfigCommon"); + pdsch_cfg_common.to_json(j); + } + j.end_obj(); +} + +// BWP-UplinkCommon ::= SEQUENCE +SRSASN_CODE bwp_ul_common_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rach_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(pusch_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_common_present, 1)); + + HANDLE_CODE(generic_params.pack(bref)); + if (rach_cfg_common_present) { + HANDLE_CODE(rach_cfg_common.pack(bref)); + } + if (pusch_cfg_common_present) { + HANDLE_CODE(pusch_cfg_common.pack(bref)); + } + if (pucch_cfg_common_present) { + HANDLE_CODE(pucch_cfg_common.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= rach_cfg_common_iab_r16.is_present(); + group_flags[0] |= use_interlace_pucch_pusch_r16_present; + group_flags[0] |= msg_a_cfg_common_r16.is_present(); + group_flags[1] |= enable_ra_prioritization_for_slicing_r17_present; + group_flags[1] |= add_rach_cfg_list_r17.is_present(); + group_flags[1] |= rsrp_thres_msg3_r17_present; + group_flags[1] |= nof_msg3_repeats_list_r17.is_present(); + group_flags[1] |= mcs_msg3_repeats_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(rach_cfg_common_iab_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(use_interlace_pucch_pusch_r16_present, 1)); + HANDLE_CODE(bref.pack(msg_a_cfg_common_r16.is_present(), 1)); + if (rach_cfg_common_iab_r16.is_present()) { + HANDLE_CODE(rach_cfg_common_iab_r16->pack(bref)); + } + if (msg_a_cfg_common_r16.is_present()) { + HANDLE_CODE(msg_a_cfg_common_r16->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(enable_ra_prioritization_for_slicing_r17_present, 1)); + HANDLE_CODE(bref.pack(add_rach_cfg_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(rsrp_thres_msg3_r17_present, 1)); + HANDLE_CODE(bref.pack(nof_msg3_repeats_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(mcs_msg3_repeats_r17.is_present(), 1)); + if (enable_ra_prioritization_for_slicing_r17_present) { + HANDLE_CODE(bref.pack(enable_ra_prioritization_for_slicing_r17, 1)); + } + if (add_rach_cfg_list_r17.is_present()) { + HANDLE_CODE(add_rach_cfg_list_r17->pack(bref)); + } + if (rsrp_thres_msg3_r17_present) { + HANDLE_CODE(pack_integer(bref, rsrp_thres_msg3_r17, (uint8_t)0u, (uint8_t)127u)); + } + if (nof_msg3_repeats_list_r17.is_present()) { + HANDLE_CODE(pack_fixed_seq_of(bref, *nof_msg3_repeats_list_r17, nof_msg3_repeats_list_r17->size())); + } + if (mcs_msg3_repeats_r17.is_present()) { + HANDLE_CODE(pack_fixed_seq_of( + bref, *mcs_msg3_repeats_r17, mcs_msg3_repeats_r17->size(), integer_packer(0, 31))); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE bwp_ul_common_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rach_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(pusch_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(pucch_cfg_common_present, 1)); + + HANDLE_CODE(generic_params.unpack(bref)); + if (rach_cfg_common_present) { + HANDLE_CODE(rach_cfg_common.unpack(bref)); + } + if (pusch_cfg_common_present) { + HANDLE_CODE(pusch_cfg_common.unpack(bref)); + } + if (pucch_cfg_common_present) { + HANDLE_CODE(pucch_cfg_common.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); + + unpack_presence_flag(rach_cfg_common_iab_r16, bref); + HANDLE_CODE(bref.unpack(use_interlace_pucch_pusch_r16_present, 1)); + unpack_presence_flag(msg_a_cfg_common_r16, bref); + if (rach_cfg_common_iab_r16.is_present()) { + HANDLE_CODE(rach_cfg_common_iab_r16->unpack(bref)); + } + if (msg_a_cfg_common_r16.is_present()) { + HANDLE_CODE(msg_a_cfg_common_r16->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(enable_ra_prioritization_for_slicing_r17_present, 1)); + unpack_presence_flag(add_rach_cfg_list_r17, bref); + HANDLE_CODE(bref.unpack(rsrp_thres_msg3_r17_present, 1)); + unpack_presence_flag(nof_msg3_repeats_list_r17, bref); + unpack_presence_flag(mcs_msg3_repeats_r17, bref); + if (enable_ra_prioritization_for_slicing_r17_present) { + HANDLE_CODE(bref.unpack(enable_ra_prioritization_for_slicing_r17, 1)); + } + if (add_rach_cfg_list_r17.is_present()) { + HANDLE_CODE(add_rach_cfg_list_r17->unpack(bref)); + } + if (rsrp_thres_msg3_r17_present) { + HANDLE_CODE(unpack_integer(rsrp_thres_msg3_r17, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (nof_msg3_repeats_list_r17.is_present()) { + HANDLE_CODE(unpack_fixed_seq_of(*nof_msg3_repeats_list_r17, bref, nof_msg3_repeats_list_r17->size())); + } + if (mcs_msg3_repeats_r17.is_present()) { + HANDLE_CODE(unpack_fixed_seq_of( + *mcs_msg3_repeats_r17, bref, mcs_msg3_repeats_r17->size(), integer_packer(0, 31))); + } + } + } + return SRSASN_SUCCESS; +} +void bwp_ul_common_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("genericParameters"); + generic_params.to_json(j); + if (rach_cfg_common_present) { + j.write_fieldname("rach-ConfigCommon"); + rach_cfg_common.to_json(j); + } + if (pusch_cfg_common_present) { + j.write_fieldname("pusch-ConfigCommon"); + pusch_cfg_common.to_json(j); + } + if (pucch_cfg_common_present) { + j.write_fieldname("pucch-ConfigCommon"); + pucch_cfg_common.to_json(j); + } + if (ext) { + if (rach_cfg_common_iab_r16.is_present()) { + j.write_fieldname("rach-ConfigCommonIAB-r16"); + rach_cfg_common_iab_r16->to_json(j); + } + if (use_interlace_pucch_pusch_r16_present) { + j.write_str("useInterlacePUCCH-PUSCH-r16", "enabled"); + } + if (msg_a_cfg_common_r16.is_present()) { + j.write_fieldname("msgA-ConfigCommon-r16"); + msg_a_cfg_common_r16->to_json(j); + } + if (enable_ra_prioritization_for_slicing_r17_present) { + j.write_bool("enableRA-PrioritizationForSlicing-r17", enable_ra_prioritization_for_slicing_r17); + } + if (add_rach_cfg_list_r17.is_present()) { + j.write_fieldname("additionalRACH-ConfigList-r17"); + add_rach_cfg_list_r17->to_json(j); + } + if (rsrp_thres_msg3_r17_present) { + j.write_int("rsrp-ThresholdMsg3-r17", rsrp_thres_msg3_r17); + } + if (nof_msg3_repeats_list_r17.is_present()) { + j.start_array("numberOfMsg3-RepetitionsList-r17"); + for (const auto& e1 : *nof_msg3_repeats_list_r17) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (mcs_msg3_repeats_r17.is_present()) { + j.start_array("mcs-Msg3-Repetitions-r17"); + for (const auto& e1 : *mcs_msg3_repeats_r17) { + j.write_int(e1); + } + j.end_array(); + } + } + j.end_obj(); +} + +// NonCellDefiningSSB-r17 ::= SEQUENCE +SRSASN_CODE non_cell_defining_ssb_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ssb_periodicity_r17_present, 1)); + HANDLE_CODE(bref.pack(ssb_time_offset_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, absolute_freq_ssb_r17, (uint32_t)0u, (uint32_t)3279165u)); + if (ssb_periodicity_r17_present) { + HANDLE_CODE(ssb_periodicity_r17.pack(bref)); + } + if (ssb_time_offset_r17_present) { + HANDLE_CODE(ssb_time_offset_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE non_cell_defining_ssb_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ssb_periodicity_r17_present, 1)); + HANDLE_CODE(bref.unpack(ssb_time_offset_r17_present, 1)); + + HANDLE_CODE(unpack_integer(absolute_freq_ssb_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); + if (ssb_periodicity_r17_present) { + HANDLE_CODE(ssb_periodicity_r17.unpack(bref)); + } + if (ssb_time_offset_r17_present) { + HANDLE_CODE(ssb_time_offset_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void non_cell_defining_ssb_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("absoluteFrequencySSB-r17", absolute_freq_ssb_r17); + if (ssb_periodicity_r17_present) { + j.write_str("ssb-Periodicity-r17", ssb_periodicity_r17.to_string()); + } + if (ssb_time_offset_r17_present) { + j.write_str("ssb-TimeOffset-r17", ssb_time_offset_r17.to_string()); + } + j.end_obj(); +} + +const char* non_cell_defining_ssb_r17_s::ssb_periodicity_r17_opts::to_string() const +{ + static const char* names[] = {"ms5", "ms10", "ms20", "ms40", "ms80", "ms160", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "non_cell_defining_ssb_r17_s::ssb_periodicity_r17_e_"); +} +uint8_t non_cell_defining_ssb_r17_s::ssb_periodicity_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {5, 10, 20, 40, 80, 160}; + return map_enum_number(numbers, 6, value, "non_cell_defining_ssb_r17_s::ssb_periodicity_r17_e_"); +} + +const char* non_cell_defining_ssb_r17_s::ssb_time_offset_r17_opts::to_string() const +{ + static const char* names[] = {"ms5", "ms10", "ms15", "ms20", "ms40", "ms80", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "non_cell_defining_ssb_r17_s::ssb_time_offset_r17_e_"); +} +uint8_t non_cell_defining_ssb_r17_s::ssb_time_offset_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {5, 10, 15, 20, 40, 80}; + return map_enum_number(numbers, 6, value, "non_cell_defining_ssb_r17_s::ssb_time_offset_r17_e_"); +} + +// BFR-CSIRS-Resource ::= SEQUENCE +SRSASN_CODE bfr_csi_rs_res_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ra_occasion_list.size() > 0, 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.size() > 0) { + 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_csi_rs_res_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool ra_occasion_list_present; + 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; +} +void bfr_csi_rs_res_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("csi-RS", csi_rs); + if (ra_occasion_list.size() > 0) { + 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(); +} + +// 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) +{ + 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 bfr_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(); +} + +// CSI-FrequencyOccupation ::= SEQUENCE +SRSASN_CODE csi_freq_occupation_s::pack(bit_ref& bref) 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; +} +SRSASN_CODE csi_freq_occupation_s::unpack(cbit_ref& 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 csi_freq_occupation_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("startingRB", start_rb); + j.write_int("nrofRBs", nrof_rbs); + j.end_obj(); +} + +// BeamLinkMonitoringRS-r17 ::= SEQUENCE +SRSASN_CODE beam_link_monitoring_rs_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, beam_link_monitoring_rs_id_r17, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(detection_res_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE beam_link_monitoring_rs_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(beam_link_monitoring_rs_id_r17, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(detection_res_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void beam_link_monitoring_rs_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("beamLinkMonitoringRS-Id-r17", beam_link_monitoring_rs_id_r17); + j.write_fieldname("detectionResource-r17"); + detection_res_r17.to_json(j); + j.end_obj(); +} + +void beam_link_monitoring_rs_r17_s::detection_res_r17_c_::destroy_() {} +void beam_link_monitoring_rs_r17_s::detection_res_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +beam_link_monitoring_rs_r17_s::detection_res_r17_c_::detection_res_r17_c_( + const beam_link_monitoring_rs_r17_s::detection_res_r17_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_, "beam_link_monitoring_rs_r17_s::detection_res_r17_c_"); + } +} +beam_link_monitoring_rs_r17_s::detection_res_r17_c_& beam_link_monitoring_rs_r17_s::detection_res_r17_c_::operator=( + const beam_link_monitoring_rs_r17_s::detection_res_r17_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_, "beam_link_monitoring_rs_r17_s::detection_res_r17_c_"); + } + + return *this; +} +uint8_t& beam_link_monitoring_rs_r17_s::detection_res_r17_c_::set_ssb_idx() +{ + set(types::ssb_idx); + return c.get(); +} +uint8_t& beam_link_monitoring_rs_r17_s::detection_res_r17_c_::set_csi_rs_idx() +{ + set(types::csi_rs_idx); + return c.get(); +} +void beam_link_monitoring_rs_r17_s::detection_res_r17_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()); + break; + default: + log_invalid_choice_id(type_, "beam_link_monitoring_rs_r17_s::detection_res_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE beam_link_monitoring_rs_r17_s::detection_res_r17_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_, "beam_link_monitoring_rs_r17_s::detection_res_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE beam_link_monitoring_rs_r17_s::detection_res_r17_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_, "beam_link_monitoring_rs_r17_s::detection_res_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* beam_link_monitoring_rs_r17_s::detection_res_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-Index", "csi-RS-Index"}; + return convert_enum_idx(names, 2, value, "beam_link_monitoring_rs_r17_s::detection_res_r17_c_::types"); +} + +// CI-ConfigurationPerServingCell-r16 ::= SEQUENCE +SRSASN_CODE ci_cfg_per_serving_cell_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(position_in_dci_for_sul_r16_present, 1)); + HANDLE_CODE(bref.pack(ul_cancellation_prio_v1610_present, 1)); + + HANDLE_CODE(pack_integer(bref, serving_cell_id, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, position_in_dci_r16, (uint8_t)0u, (uint8_t)125u)); + if (position_in_dci_for_sul_r16_present) { + HANDLE_CODE(pack_integer(bref, position_in_dci_for_sul_r16, (uint8_t)0u, (uint8_t)125u)); + } + HANDLE_CODE(ci_payload_size_r16.pack(bref)); + bref.pack(time_freq_region_r16.ext, 1); + HANDLE_CODE(bref.pack(time_freq_region_r16.time_dur_for_ci_r16_present, 1)); + if (time_freq_region_r16.time_dur_for_ci_r16_present) { + HANDLE_CODE(time_freq_region_r16.time_dur_for_ci_r16.pack(bref)); + } + HANDLE_CODE(time_freq_region_r16.time_granularity_for_ci_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, time_freq_region_r16.freq_region_for_ci_r16, (uint16_t)0u, (uint16_t)37949u)); + HANDLE_CODE(pack_integer(bref, time_freq_region_r16.delta_offset_r16, (uint8_t)0u, (uint8_t)2u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ci_cfg_per_serving_cell_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(position_in_dci_for_sul_r16_present, 1)); + HANDLE_CODE(bref.unpack(ul_cancellation_prio_v1610_present, 1)); + + HANDLE_CODE(unpack_integer(serving_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(position_in_dci_r16, bref, (uint8_t)0u, (uint8_t)125u)); + if (position_in_dci_for_sul_r16_present) { + HANDLE_CODE(unpack_integer(position_in_dci_for_sul_r16, bref, (uint8_t)0u, (uint8_t)125u)); + } + HANDLE_CODE(ci_payload_size_r16.unpack(bref)); + bref.unpack(time_freq_region_r16.ext, 1); + HANDLE_CODE(bref.unpack(time_freq_region_r16.time_dur_for_ci_r16_present, 1)); + if (time_freq_region_r16.time_dur_for_ci_r16_present) { + HANDLE_CODE(time_freq_region_r16.time_dur_for_ci_r16.unpack(bref)); + } + HANDLE_CODE(time_freq_region_r16.time_granularity_for_ci_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(time_freq_region_r16.freq_region_for_ci_r16, bref, (uint16_t)0u, (uint16_t)37949u)); + HANDLE_CODE(unpack_integer(time_freq_region_r16.delta_offset_r16, bref, (uint8_t)0u, (uint8_t)2u)); + + return SRSASN_SUCCESS; +} +void ci_cfg_per_serving_cell_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servingCellId", serving_cell_id); + j.write_int("positionInDCI-r16", position_in_dci_r16); + if (position_in_dci_for_sul_r16_present) { + j.write_int("positionInDCI-ForSUL-r16", position_in_dci_for_sul_r16); + } + j.write_str("ci-PayloadSize-r16", ci_payload_size_r16.to_string()); + j.write_fieldname("timeFrequencyRegion-r16"); + j.start_obj(); + if (time_freq_region_r16.time_dur_for_ci_r16_present) { + j.write_str("timeDurationForCI-r16", time_freq_region_r16.time_dur_for_ci_r16.to_string()); + } + j.write_str("timeGranularityForCI-r16", time_freq_region_r16.time_granularity_for_ci_r16.to_string()); + j.write_int("frequencyRegionForCI-r16", time_freq_region_r16.freq_region_for_ci_r16); + j.write_int("deltaOffset-r16", time_freq_region_r16.delta_offset_r16); + j.end_obj(); + if (ul_cancellation_prio_v1610_present) { + j.write_str("uplinkCancellationPriority-v1610", "enabled"); + } + j.end_obj(); +} + +const char* ci_cfg_per_serving_cell_r16_s::ci_payload_size_r16_opts::to_string() const +{ + static const char* names[] = { + "n1", "n2", "n4", "n5", "n7", "n8", "n10", "n14", "n16", "n20", "n28", "n32", "n35", "n42", "n56", "n112"}; + return convert_enum_idx(names, 16, value, "ci_cfg_per_serving_cell_r16_s::ci_payload_size_r16_e_"); +} +uint8_t ci_cfg_per_serving_cell_r16_s::ci_payload_size_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 5, 7, 8, 10, 14, 16, 20, 28, 32, 35, 42, 56, 112}; + return map_enum_number(numbers, 16, value, "ci_cfg_per_serving_cell_r16_s::ci_payload_size_r16_e_"); +} + +const char* ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_dur_for_ci_r16_opts::to_string() const +{ + static const char* names[] = {"n2", "n4", "n7", "n14"}; + return convert_enum_idx( + names, 4, value, "ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_dur_for_ci_r16_e_"); +} +uint8_t ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_dur_for_ci_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 7, 14}; + return map_enum_number( + numbers, 4, value, "ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_dur_for_ci_r16_e_"); +} + +const char* ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_granularity_for_ci_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n4", "n7", "n14", "n28"}; + return convert_enum_idx( + names, 6, value, "ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_granularity_for_ci_r16_e_"); +} +uint8_t ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_granularity_for_ci_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 7, 14, 28}; + return map_enum_number( + numbers, 6, value, "ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_granularity_for_ci_r16_e_"); +} + +// CSI-RS-ResourceMapping ::= SEQUENCE +SRSASN_CODE csi_rs_res_map_s::pack(bit_ref& bref) 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; +} +SRSASN_CODE csi_rs_res_map_s::unpack(cbit_ref& bref) +{ + 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 csi_rs_res_map_s::to_json(json_writer& j) const +{ + j.start_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_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(); +} + +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_"); + } +} +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::row1: + c.init(other.c.get>()); + break; + 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_"); + } +} +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::row1: + c.set(other.c.get>()); + break; + 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_"); + } + + return *this; +} +fixed_bitstring<4>& csi_rs_res_map_s::freq_domain_alloc_c_::set_row1() +{ + set(types::row1); + return c.get>(); +} +fixed_bitstring<12>& csi_rs_res_map_s::freq_domain_alloc_c_::set_row2() +{ + set(types::row2); + return c.get>(); +} +fixed_bitstring<3>& csi_rs_res_map_s::freq_domain_alloc_c_::set_row4() +{ + set(types::row4); + return c.get>(); +} +fixed_bitstring<6>& csi_rs_res_map_s::freq_domain_alloc_c_::set_other() +{ + set(types::other); + return c.get>(); +} +void csi_rs_res_map_s::freq_domain_alloc_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::row1: + j.write_str("row1", c.get>().to_string()); + break; + 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_"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_res_map_s::freq_domain_alloc_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::row1: + HANDLE_CODE(c.get>().pack(bref)); + break; + 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_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::row1: + HANDLE_CODE(c.get>().unpack(bref)); + break; + 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_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* csi_rs_res_map_s::freq_domain_alloc_c_::types_opts::to_string() const +{ + static const char* names[] = {"row1", "row2", "row4", "other"}; + return convert_enum_idx(names, 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 numbers[] = {1, 2, 4}; + return map_enum_number(numbers, 3, value, "csi_rs_res_map_s::freq_domain_alloc_c_::types"); +} + +const char* csi_rs_res_map_s::nrof_ports_opts::to_string() const +{ + static const char* names[] = {"p1", "p2", "p4", "p8", "p12", "p16", "p24", "p32"}; + return convert_enum_idx(names, 8, value, "csi_rs_res_map_s::nrof_ports_e_"); +} +uint8_t csi_rs_res_map_s::nrof_ports_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8, 12, 16, 24, 32}; + return map_enum_number(numbers, 8, value, "csi_rs_res_map_s::nrof_ports_e_"); +} + +const char* csi_rs_res_map_s::cdm_type_opts::to_string() const +{ + static const char* names[] = {"noCDM", "fd-CDM2", "cdm4-FD2-TD2", "cdm8-FD2-TD4"}; + return convert_enum_idx(names, 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: + invalid_enum_number(value, "csi_rs_res_map_s::cdm_type_e_"); + } + return 0; +} + +void csi_rs_res_map_s::density_c_::set(types::options e) +{ + type_ = e; +} +csi_rs_res_map_s::density_c_::dot5_e_& csi_rs_res_map_s::density_c_::set_dot5() +{ + set(types::dot5); + return c; +} +void csi_rs_res_map_s::density_c_::set_one() +{ + set(types::one); +} +void csi_rs_res_map_s::density_c_::set_three() +{ + set(types::three); +} +void csi_rs_res_map_s::density_c_::set_spare() +{ + set(types::spare); +} +void csi_rs_res_map_s::density_c_::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.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; + } + 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; + } + return SRSASN_SUCCESS; +} + +const char* csi_rs_res_map_s::density_c_::dot5_opts::to_string() const +{ + static const char* names[] = {"evenPRBs", "oddPRBs"}; + return convert_enum_idx(names, 2, value, "csi_rs_res_map_s::density_c_::dot5_e_"); +} + +const char* csi_rs_res_map_s::density_c_::types_opts::to_string() const +{ + static const char* names[] = {"dot5", "one", "three", "spare"}; + return convert_enum_idx(names, 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 numbers[] = {5, 1, 3}; + return map_enum_number(numbers, 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; +} +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::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: + 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_, "csi_res_periodicity_and_offset_c"); + } +} +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::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: + 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_, "csi_res_periodicity_and_offset_c"); + } + + return *this; +} +uint8_t& csi_res_periodicity_and_offset_c::set_slots4() +{ + set(types::slots4); + return c.get(); +} +uint8_t& csi_res_periodicity_and_offset_c::set_slots5() +{ + set(types::slots5); + return c.get(); +} +uint8_t& csi_res_periodicity_and_offset_c::set_slots8() +{ + set(types::slots8); + return c.get(); +} +uint8_t& csi_res_periodicity_and_offset_c::set_slots10() +{ + set(types::slots10); + return c.get(); +} +uint8_t& csi_res_periodicity_and_offset_c::set_slots16() +{ + set(types::slots16); + return c.get(); +} +uint8_t& csi_res_periodicity_and_offset_c::set_slots20() +{ + set(types::slots20); + return c.get(); +} +uint8_t& csi_res_periodicity_and_offset_c::set_slots32() +{ + set(types::slots32); + return c.get(); +} +uint8_t& csi_res_periodicity_and_offset_c::set_slots40() +{ + set(types::slots40); + return c.get(); +} +uint8_t& csi_res_periodicity_and_offset_c::set_slots64() +{ + set(types::slots64); + return c.get(); +} +uint8_t& csi_res_periodicity_and_offset_c::set_slots80() +{ + set(types::slots80); + return c.get(); +} +uint8_t& csi_res_periodicity_and_offset_c::set_slots160() +{ + set(types::slots160); + return c.get(); +} +uint16_t& csi_res_periodicity_and_offset_c::set_slots320() +{ + set(types::slots320); + return c.get(); +} +uint16_t& csi_res_periodicity_and_offset_c::set_slots640() +{ + set(types::slots640); + return c.get(); +} +void csi_res_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::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_, "csi_res_periodicity_and_offset_c"); + } + j.end_obj(); +} +SRSASN_CODE csi_res_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::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_, "csi_res_periodicity_and_offset_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_res_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::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_, "csi_res_periodicity_and_offset_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* csi_res_periodicity_and_offset_c::types_opts::to_string() const +{ + static const char* names[] = {"slots4", + "slots5", + "slots8", + "slots10", + "slots16", + "slots20", + "slots32", + "slots40", + "slots64", + "slots80", + "slots160", + "slots320", + "slots640"}; + return convert_enum_idx(names, 13, value, "csi_res_periodicity_and_offset_c::types"); +} +uint16_t csi_res_periodicity_and_offset_c::types_opts::to_number() const +{ + static const uint16_t numbers[] = {4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640}; + return map_enum_number(numbers, 13, value, "csi_res_periodicity_and_offset_c::types"); +} + +// FDM-TDM-r16 ::= SEQUENCE +SRSASN_CODE fdm_tdm_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(start_symbol_offset_k_r16_present, 1)); + + HANDLE_CODE(repeat_scheme_r16.pack(bref)); + if (start_symbol_offset_k_r16_present) { + HANDLE_CODE(pack_integer(bref, start_symbol_offset_k_r16, (uint8_t)0u, (uint8_t)7u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE fdm_tdm_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(start_symbol_offset_k_r16_present, 1)); + + HANDLE_CODE(repeat_scheme_r16.unpack(bref)); + if (start_symbol_offset_k_r16_present) { + HANDLE_CODE(unpack_integer(start_symbol_offset_k_r16, bref, (uint8_t)0u, (uint8_t)7u)); + } + + return SRSASN_SUCCESS; +} +void fdm_tdm_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("repetitionScheme-r16", repeat_scheme_r16.to_string()); + if (start_symbol_offset_k_r16_present) { + j.write_int("startingSymbolOffsetK-r16", start_symbol_offset_k_r16); + } + j.end_obj(); +} + +const char* fdm_tdm_r16_s::repeat_scheme_r16_opts::to_string() const +{ + static const char* names[] = {"fdmSchemeA", "fdmSchemeB", "tdmSchemeA"}; + return convert_enum_idx(names, 3, value, "fdm_tdm_r16_s::repeat_scheme_r16_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(); +} + +// MultiPDSCH-TDRA-r17 ::= SEQUENCE +SRSASN_CODE multi_pdsch_tdra_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, pdsch_tdra_list_r17, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE multi_pdsch_tdra_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(pdsch_tdra_list_r17, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void multi_pdsch_tdra_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("pdsch-TDRA-List-r17"); + for (const auto& e1 : pdsch_tdra_list_r17) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// PTRS-DownlinkConfig ::= SEQUENCE +SRSASN_CODE ptrs_dl_cfg_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)); + + if (freq_density_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, freq_density, freq_density.size(), integer_packer(1, 276))); + } + if (time_density_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, time_density, 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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= max_nrof_ports_r16_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(max_nrof_ports_r16_present, 1)); + if (max_nrof_ports_r16_present) { + HANDLE_CODE(max_nrof_ports_r16.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ptrs_dl_cfg_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)); + + if (freq_density_present) { + HANDLE_CODE(unpack_fixed_seq_of(freq_density, bref, freq_density.size(), integer_packer(1, 276))); + } + if (time_density_present) { + HANDLE_CODE(unpack_fixed_seq_of(time_density, 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)); + } + + 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_nrof_ports_r16_present, 1)); + if (max_nrof_ports_r16_present) { + HANDLE_CODE(max_nrof_ports_r16.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void ptrs_dl_cfg_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 (res_elem_offset_present) { + j.write_str("resourceElementOffset", res_elem_offset.to_string()); + } + if (ext) { + if (max_nrof_ports_r16_present) { + j.write_str("maxNrofPorts-r16", max_nrof_ports_r16.to_string()); + } + } + j.end_obj(); +} + +const char* ptrs_dl_cfg_s::res_elem_offset_opts::to_string() const +{ + static const char* names[] = {"offset01", "offset10", "offset11"}; + return convert_enum_idx(names, 3, value, "ptrs_dl_cfg_s::res_elem_offset_e_"); +} +float ptrs_dl_cfg_s::res_elem_offset_opts::to_number() const +{ + static const float numbers[] = {0.1, 1.0, 1.1}; + return map_enum_number(numbers, 3, value, "ptrs_dl_cfg_s::res_elem_offset_e_"); +} +const char* ptrs_dl_cfg_s::res_elem_offset_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.1", "1.0", "1.1"}; + return convert_enum_idx(number_strs, 3, value, "ptrs_dl_cfg_s::res_elem_offset_e_"); +} + +const char* ptrs_dl_cfg_s::max_nrof_ports_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, 2, value, "ptrs_dl_cfg_s::max_nrof_ports_r16_e_"); +} +uint8_t ptrs_dl_cfg_s::max_nrof_ports_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "ptrs_dl_cfg_s::max_nrof_ports_r16_e_"); +} + +// QCL-Info ::= SEQUENCE +SRSASN_CODE qcl_info_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)); + + if (cell_present) { + HANDLE_CODE(pack_integer(bref, cell, (uint8_t)0u, (uint8_t)31u)); + } + if (bwp_id_present) { + HANDLE_CODE(pack_integer(bref, bwp_id, (uint8_t)0u, (uint8_t)4u)); + } + HANDLE_CODE(ref_sig.pack(bref)); + HANDLE_CODE(qcl_type.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE qcl_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cell_present, 1)); + HANDLE_CODE(bref.unpack(bwp_id_present, 1)); + + if (cell_present) { + HANDLE_CODE(unpack_integer(cell, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (bwp_id_present) { + HANDLE_CODE(unpack_integer(bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); + } + HANDLE_CODE(ref_sig.unpack(bref)); + HANDLE_CODE(qcl_type.unpack(bref)); + + return SRSASN_SUCCESS; +} +void qcl_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cell_present) { + j.write_int("cell", cell); + } + 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 qcl_info_s::ref_sig_c_::destroy_() {} +void qcl_info_s::ref_sig_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +qcl_info_s::ref_sig_c_::ref_sig_c_(const qcl_info_s::ref_sig_c_& other) +{ + 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_"); + } +} +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::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_"); + } + + return *this; +} +uint8_t& qcl_info_s::ref_sig_c_::set_csi_rs() +{ + set(types::csi_rs); + return c.get(); +} +uint8_t& qcl_info_s::ref_sig_c_::set_ssb() +{ + set(types::ssb); + return c.get(); +} +void qcl_info_s::ref_sig_c_::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.end_obj(); +} +SRSASN_CODE qcl_info_s::ref_sig_c_::pack(bit_ref& bref) 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; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE qcl_info_s::ref_sig_c_::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; + } + return SRSASN_SUCCESS; +} + +const char* qcl_info_s::ref_sig_c_::types_opts::to_string() const +{ + static const char* names[] = {"csi-rs", "ssb"}; + return convert_enum_idx(names, 2, value, "qcl_info_s::ref_sig_c_::types"); +} + +const char* qcl_info_s::qcl_type_opts::to_string() const +{ + static const char* names[] = {"typeA", "typeB", "typeC", "typeD"}; + return convert_enum_idx(names, 4, value, "qcl_info_s::qcl_type_e_"); +} + +// SlotBased-r16 ::= SEQUENCE +SRSASN_CODE slot_based_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(tci_map_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, seq_offset_for_rv_r16, (uint8_t)1u, (uint8_t)3u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE slot_based_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(tci_map_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(seq_offset_for_rv_r16, bref, (uint8_t)1u, (uint8_t)3u)); + + return SRSASN_SUCCESS; +} +void slot_based_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("tciMapping-r16", tci_map_r16.to_string()); + j.write_int("sequenceOffsetForRV-r16", seq_offset_for_rv_r16); + j.end_obj(); +} + +const char* slot_based_r16_s::tci_map_r16_opts::to_string() const +{ + static const char* names[] = {"cyclicMapping", "sequentialMapping"}; + return convert_enum_idx(names, 2, value, "slot_based_r16_s::tci_map_r16_e_"); +} + +// SlotBased-v1630 ::= SEQUENCE +SRSASN_CODE slot_based_v1630_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(tci_map_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, seq_offset_for_rv_r16, (uint8_t)0u, (uint8_t)0u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE slot_based_v1630_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(tci_map_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(seq_offset_for_rv_r16, bref, (uint8_t)0u, (uint8_t)0u)); + + return SRSASN_SUCCESS; +} +void slot_based_v1630_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("tciMapping-r16", tci_map_r16.to_string()); + j.write_int("sequenceOffsetForRV-r16", seq_offset_for_rv_r16); + j.end_obj(); +} + +const char* slot_based_v1630_s::tci_map_r16_opts::to_string() const +{ + static const char* names[] = {"cyclicMapping", "sequentialMapping"}; + return convert_enum_idx(names, 2, value, "slot_based_v1630_s::tci_map_r16_e_"); +} + +// BeamFailureDetectionSet-r17 ::= SEQUENCE +SRSASN_CODE beam_fail_detection_set_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(bfd_res_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(bfd_res_to_release_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(beam_fail_instance_max_count_r17_present, 1)); + HANDLE_CODE(bref.pack(beam_fail_detection_timer_r17_present, 1)); + + if (bfd_res_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, bfd_res_to_add_mod_list_r17, 1, 64)); + } + if (bfd_res_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, bfd_res_to_release_list_r17, 1, 64, integer_packer(0, 63))); + } + if (beam_fail_instance_max_count_r17_present) { + HANDLE_CODE(beam_fail_instance_max_count_r17.pack(bref)); + } + if (beam_fail_detection_timer_r17_present) { + HANDLE_CODE(beam_fail_detection_timer_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE beam_fail_detection_set_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool bfd_res_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(bfd_res_to_add_mod_list_r17_present, 1)); + bool bfd_res_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(bfd_res_to_release_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(beam_fail_instance_max_count_r17_present, 1)); + HANDLE_CODE(bref.unpack(beam_fail_detection_timer_r17_present, 1)); + + if (bfd_res_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(bfd_res_to_add_mod_list_r17, bref, 1, 64)); + } + if (bfd_res_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(bfd_res_to_release_list_r17, bref, 1, 64, integer_packer(0, 63))); + } + if (beam_fail_instance_max_count_r17_present) { + HANDLE_CODE(beam_fail_instance_max_count_r17.unpack(bref)); + } + if (beam_fail_detection_timer_r17_present) { + HANDLE_CODE(beam_fail_detection_timer_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void beam_fail_detection_set_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (bfd_res_to_add_mod_list_r17.size() > 0) { + j.start_array("bfdResourcesToAddModList-r17"); + for (const auto& e1 : bfd_res_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (bfd_res_to_release_list_r17.size() > 0) { + j.start_array("bfdResourcesToReleaseList-r17"); + for (const auto& e1 : bfd_res_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (beam_fail_instance_max_count_r17_present) { + j.write_str("beamFailureInstanceMaxCount-r17", beam_fail_instance_max_count_r17.to_string()); + } + if (beam_fail_detection_timer_r17_present) { + j.write_str("beamFailureDetectionTimer-r17", beam_fail_detection_timer_r17.to_string()); + } + j.end_obj(); +} + +const char* beam_fail_detection_set_r17_s::beam_fail_instance_max_count_r17_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; + return convert_enum_idx(names, 8, value, "beam_fail_detection_set_r17_s::beam_fail_instance_max_count_r17_e_"); +} +uint8_t beam_fail_detection_set_r17_s::beam_fail_instance_max_count_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return map_enum_number(numbers, 8, value, "beam_fail_detection_set_r17_s::beam_fail_instance_max_count_r17_e_"); +} + +const char* beam_fail_detection_set_r17_s::beam_fail_detection_timer_r17_opts::to_string() const +{ + static const char* names[] = {"pbfd1", "pbfd2", "pbfd3", "pbfd4", "pbfd5", "pbfd6", "pbfd8", "pbfd10"}; + return convert_enum_idx(names, 8, value, "beam_fail_detection_set_r17_s::beam_fail_detection_timer_r17_e_"); +} +uint8_t beam_fail_detection_set_r17_s::beam_fail_detection_timer_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return map_enum_number(numbers, 8, value, "beam_fail_detection_set_r17_s::beam_fail_detection_timer_r17_e_"); +} + +// DL-PPW-PeriodicityAndStartSlot-r17 ::= CHOICE +void dl_ppw_periodicity_and_start_slot_r17_c::destroy_() +{ + switch (type_) { + case types::scs15: + c.destroy(); + break; + case types::scs30: + c.destroy(); + break; + case types::scs60: + c.destroy(); + break; + case types::scs120: + c.destroy(); + break; + default: + break; + } +} +void dl_ppw_periodicity_and_start_slot_r17_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::scs15: + c.init(); + break; + case types::scs30: + c.init(); + break; + case types::scs60: + c.init(); + break; + case types::scs120: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c"); + } +} +dl_ppw_periodicity_and_start_slot_r17_c::dl_ppw_periodicity_and_start_slot_r17_c( + const dl_ppw_periodicity_and_start_slot_r17_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::scs15: + c.init(other.c.get()); + break; + case types::scs30: + c.init(other.c.get()); + break; + case types::scs60: + c.init(other.c.get()); + break; + case types::scs120: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c"); + } +} +dl_ppw_periodicity_and_start_slot_r17_c& +dl_ppw_periodicity_and_start_slot_r17_c::operator=(const dl_ppw_periodicity_and_start_slot_r17_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::scs15: + c.set(other.c.get()); + break; + case types::scs30: + c.set(other.c.get()); + break; + case types::scs60: + c.set(other.c.get()); + break; + case types::scs120: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c"); + } + + return *this; +} +dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_& dl_ppw_periodicity_and_start_slot_r17_c::set_scs15() +{ + set(types::scs15); + return c.get(); +} +dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_& dl_ppw_periodicity_and_start_slot_r17_c::set_scs30() +{ + set(types::scs30); + return c.get(); +} +dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_& dl_ppw_periodicity_and_start_slot_r17_c::set_scs60() +{ + set(types::scs60); + return c.get(); +} +dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_& dl_ppw_periodicity_and_start_slot_r17_c::set_scs120() +{ + set(types::scs120); + return c.get(); +} +void dl_ppw_periodicity_and_start_slot_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scs15: + j.write_fieldname("scs15"); + c.get().to_json(j); + break; + case types::scs30: + j.write_fieldname("scs30"); + c.get().to_json(j); + break; + case types::scs60: + j.write_fieldname("scs60"); + c.get().to_json(j); + break; + case types::scs120: + j.write_fieldname("scs120"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::scs15: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::scs30: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::scs60: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::scs120: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::scs15: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::scs30: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::scs60: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::scs120: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::destroy_() {} +void dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::scs15_c_( + const dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_& other) +{ + type_ = other.type(); + switch (type_) { + 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::n16: + c.init(other.c.get()); + break; + case types::n20: + c.init(other.c.get()); + break; + case types::n32: + c.init(other.c.get()); + break; + case types::n40: + c.init(other.c.get()); + break; + case types::n64: + c.init(other.c.get()); + break; + case types::n80: + c.init(other.c.get()); + break; + case types::n160: + c.init(other.c.get()); + break; + case types::n320: + c.init(other.c.get()); + break; + case types::n640: + c.init(other.c.get()); + break; + case types::n1280: + c.init(other.c.get()); + break; + case types::n2560: + c.init(other.c.get()); + break; + case types::n5120: + c.init(other.c.get()); + break; + case types::n10240: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_"); + } +} +dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::operator=( + const dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + 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::n16: + c.set(other.c.get()); + break; + case types::n20: + c.set(other.c.get()); + break; + case types::n32: + c.set(other.c.get()); + break; + case types::n40: + c.set(other.c.get()); + break; + case types::n64: + c.set(other.c.get()); + break; + case types::n80: + c.set(other.c.get()); + break; + case types::n160: + c.set(other.c.get()); + break; + case types::n320: + c.set(other.c.get()); + break; + case types::n640: + c.set(other.c.get()); + break; + case types::n1280: + c.set(other.c.get()); + break; + case types::n2560: + c.set(other.c.get()); + break; + case types::n5120: + c.set(other.c.get()); + break; + case types::n10240: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_"); + } + + return *this; +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n4() +{ + set(types::n4); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n5() +{ + set(types::n5); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n8() +{ + set(types::n8); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n10() +{ + set(types::n10); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n16() +{ + set(types::n16); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n20() +{ + set(types::n20); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n32() +{ + set(types::n32); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n40() +{ + set(types::n40); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n64() +{ + set(types::n64); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n80() +{ + set(types::n80); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n160() +{ + set(types::n160); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n320() +{ + set(types::n320); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n640() +{ + set(types::n640); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n1280() +{ + set(types::n1280); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n2560() +{ + set(types::n2560); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n5120() +{ + set(types::n5120); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n10240() +{ + set(types::n10240); + return c.get(); +} +void dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::n4: + j.write_int("n4", c.get()); + break; + case types::n5: + j.write_int("n5", c.get()); + break; + case types::n8: + j.write_int("n8", c.get()); + break; + case types::n10: + j.write_int("n10", c.get()); + break; + case types::n16: + j.write_int("n16", c.get()); + break; + case types::n20: + j.write_int("n20", c.get()); + break; + case types::n32: + j.write_int("n32", c.get()); + break; + case types::n40: + j.write_int("n40", c.get()); + break; + case types::n64: + j.write_int("n64", c.get()); + break; + case types::n80: + j.write_int("n80", c.get()); + break; + case types::n160: + j.write_int("n160", c.get()); + break; + case types::n320: + j.write_int("n320", c.get()); + break; + case types::n640: + j.write_int("n640", c.get()); + break; + case types::n1280: + j.write_int("n1280", c.get()); + break; + case types::n2560: + j.write_int("n2560", c.get()); + break; + case types::n5120: + j.write_int("n5120", c.get()); + break; + case types::n10240: + j.write_int("n10240", c.get()); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::n4: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); + break; + case types::n5: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); + break; + case types::n8: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); + break; + case types::n10: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); + break; + case types::n16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); + break; + case types::n20: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + break; + case types::n32: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); + break; + case types::n40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::n64: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::n80: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::n160: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + case types::n320: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + break; + case types::n640: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + break; + case types::n1280: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); + break; + case types::n2560: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); + break; + case types::n5120: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); + break; + case types::n10240: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::n4: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); + break; + case types::n5: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); + break; + case types::n8: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); + break; + case types::n10: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); + break; + case types::n16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); + break; + case types::n20: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::n32: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); + break; + case types::n40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::n64: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::n80: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::n160: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + case types::n320: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + case types::n640: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + break; + case types::n1280: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); + break; + case types::n2560: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); + break; + case types::n5120: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); + break; + case types::n10240: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::types_opts::to_string() const +{ + static const char* names[] = {"n4", + "n5", + "n8", + "n10", + "n16", + "n20", + "n32", + "n40", + "n64", + "n80", + "n160", + "n320", + "n640", + "n1280", + "n2560", + "n5120", + "n10240"}; + return convert_enum_idx(names, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::types"); +} +uint16_t dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560, 5120, 10240}; + return map_enum_number(numbers, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::types"); +} + +void dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::destroy_() {} +void dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::scs30_c_( + const dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::n8: + c.init(other.c.get()); + break; + case types::n10: + c.init(other.c.get()); + break; + case types::n16: + c.init(other.c.get()); + break; + case types::n20: + c.init(other.c.get()); + break; + case types::n32: + c.init(other.c.get()); + break; + case types::n40: + c.init(other.c.get()); + break; + case types::n64: + c.init(other.c.get()); + break; + case types::n80: + c.init(other.c.get()); + break; + case types::n128: + c.init(other.c.get()); + break; + case types::n160: + c.init(other.c.get()); + break; + case types::n320: + c.init(other.c.get()); + break; + case types::n640: + c.init(other.c.get()); + break; + case types::n1280: + c.init(other.c.get()); + break; + case types::n2560: + c.init(other.c.get()); + break; + case types::n5120: + c.init(other.c.get()); + break; + case types::n10240: + c.init(other.c.get()); + break; + case types::n20480: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_"); + } +} +dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::operator=( + const dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::n8: + c.set(other.c.get()); + break; + case types::n10: + c.set(other.c.get()); + break; + case types::n16: + c.set(other.c.get()); + break; + case types::n20: + c.set(other.c.get()); + break; + case types::n32: + c.set(other.c.get()); + break; + case types::n40: + c.set(other.c.get()); + break; + case types::n64: + c.set(other.c.get()); + break; + case types::n80: + c.set(other.c.get()); + break; + case types::n128: + c.set(other.c.get()); + break; + case types::n160: + c.set(other.c.get()); + break; + case types::n320: + c.set(other.c.get()); + break; + case types::n640: + c.set(other.c.get()); + break; + case types::n1280: + c.set(other.c.get()); + break; + case types::n2560: + c.set(other.c.get()); + break; + case types::n5120: + c.set(other.c.get()); + break; + case types::n10240: + c.set(other.c.get()); + break; + case types::n20480: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_"); + } + + return *this; +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n8() +{ + set(types::n8); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n10() +{ + set(types::n10); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n16() +{ + set(types::n16); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n20() +{ + set(types::n20); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n32() +{ + set(types::n32); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n40() +{ + set(types::n40); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n64() +{ + set(types::n64); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n80() +{ + set(types::n80); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n128() +{ + set(types::n128); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n160() +{ + set(types::n160); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n320() +{ + set(types::n320); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n640() +{ + set(types::n640); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n1280() +{ + set(types::n1280); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n2560() +{ + set(types::n2560); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n5120() +{ + set(types::n5120); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n10240() +{ + set(types::n10240); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n20480() +{ + set(types::n20480); + return c.get(); +} +void dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::n8: + j.write_int("n8", c.get()); + break; + case types::n10: + j.write_int("n10", c.get()); + break; + case types::n16: + j.write_int("n16", c.get()); + break; + case types::n20: + j.write_int("n20", c.get()); + break; + case types::n32: + j.write_int("n32", c.get()); + break; + case types::n40: + j.write_int("n40", c.get()); + break; + case types::n64: + j.write_int("n64", c.get()); + break; + case types::n80: + j.write_int("n80", c.get()); + break; + case types::n128: + j.write_int("n128", c.get()); + break; + case types::n160: + j.write_int("n160", c.get()); + break; + case types::n320: + j.write_int("n320", c.get()); + break; + case types::n640: + j.write_int("n640", c.get()); + break; + case types::n1280: + j.write_int("n1280", c.get()); + break; + case types::n2560: + j.write_int("n2560", c.get()); + break; + case types::n5120: + j.write_int("n5120", c.get()); + break; + case types::n10240: + j.write_int("n10240", c.get()); + break; + case types::n20480: + j.write_int("n20480", c.get()); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::n8: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); + break; + case types::n10: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); + break; + case types::n16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); + break; + case types::n20: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + break; + case types::n32: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); + break; + case types::n40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::n64: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::n80: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::n128: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + break; + case types::n160: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + case types::n320: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + break; + case types::n640: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + break; + case types::n1280: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); + break; + case types::n2560: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); + break; + case types::n5120: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); + break; + case types::n10240: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); + break; + case types::n20480: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)20479u)); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::n8: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); + break; + case types::n10: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); + break; + case types::n16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); + break; + case types::n20: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::n32: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); + break; + case types::n40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::n64: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::n80: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::n128: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + break; + case types::n160: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + case types::n320: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + case types::n640: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + break; + case types::n1280: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); + break; + case types::n2560: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); + break; + case types::n5120: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); + break; + case types::n10240: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); + break; + case types::n20480: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)20479u)); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::types_opts::to_string() const +{ + static const char* names[] = {"n8", + "n10", + "n16", + "n20", + "n32", + "n40", + "n64", + "n80", + "n128", + "n160", + "n320", + "n640", + "n1280", + "n2560", + "n5120", + "n10240", + "n20480"}; + return convert_enum_idx(names, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::types"); +} +uint16_t dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {8, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1280, 2560, 5120, 10240, 20480}; + return map_enum_number(numbers, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::types"); +} + +void dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::destroy_() {} +void dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::scs60_c_( + const dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::n16: + c.init(other.c.get()); + break; + case types::n20: + c.init(other.c.get()); + break; + case types::n32: + c.init(other.c.get()); + break; + case types::n40: + c.init(other.c.get()); + break; + case types::n64: + c.init(other.c.get()); + break; + case types::n80: + c.init(other.c.get()); + break; + case types::n128: + c.init(other.c.get()); + break; + case types::n160: + c.init(other.c.get()); + break; + case types::n256: + c.init(other.c.get()); + break; + case types::n320: + c.init(other.c.get()); + break; + case types::n640: + c.init(other.c.get()); + break; + case types::n1280: + c.init(other.c.get()); + break; + case types::n2560: + c.init(other.c.get()); + break; + case types::n5120: + c.init(other.c.get()); + break; + case types::n10240: + c.init(other.c.get()); + break; + case types::n20480: + c.init(other.c.get()); + break; + case types::n40960: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_"); + } +} +dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::operator=( + const dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::n16: + c.set(other.c.get()); + break; + case types::n20: + c.set(other.c.get()); + break; + case types::n32: + c.set(other.c.get()); + break; + case types::n40: + c.set(other.c.get()); + break; + case types::n64: + c.set(other.c.get()); + break; + case types::n80: + c.set(other.c.get()); + break; + case types::n128: + c.set(other.c.get()); + break; + case types::n160: + c.set(other.c.get()); + break; + case types::n256: + c.set(other.c.get()); + break; + case types::n320: + c.set(other.c.get()); + break; + case types::n640: + c.set(other.c.get()); + break; + case types::n1280: + c.set(other.c.get()); + break; + case types::n2560: + c.set(other.c.get()); + break; + case types::n5120: + c.set(other.c.get()); + break; + case types::n10240: + c.set(other.c.get()); + break; + case types::n20480: + c.set(other.c.get()); + break; + case types::n40960: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_"); + } + + return *this; +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n16() +{ + set(types::n16); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n20() +{ + set(types::n20); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n32() +{ + set(types::n32); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n40() +{ + set(types::n40); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n64() +{ + set(types::n64); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n80() +{ + set(types::n80); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n128() +{ + set(types::n128); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n160() +{ + set(types::n160); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n256() +{ + set(types::n256); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n320() +{ + set(types::n320); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n640() +{ + set(types::n640); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n1280() +{ + set(types::n1280); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n2560() +{ + set(types::n2560); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n5120() +{ + set(types::n5120); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n10240() +{ + set(types::n10240); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n20480() +{ + set(types::n20480); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n40960() +{ + set(types::n40960); + return c.get(); +} +void dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::n16: + j.write_int("n16", c.get()); + break; + case types::n20: + j.write_int("n20", c.get()); + break; + case types::n32: + j.write_int("n32", c.get()); + break; + case types::n40: + j.write_int("n40", c.get()); + break; + case types::n64: + j.write_int("n64", c.get()); + break; + case types::n80: + j.write_int("n80", c.get()); + break; + case types::n128: + j.write_int("n128", c.get()); + break; + case types::n160: + j.write_int("n160", c.get()); + break; + case types::n256: + j.write_int("n256", c.get()); + break; + case types::n320: + j.write_int("n320", c.get()); + break; + case types::n640: + j.write_int("n640", c.get()); + break; + case types::n1280: + j.write_int("n1280", c.get()); + break; + case types::n2560: + j.write_int("n2560", c.get()); + break; + case types::n5120: + j.write_int("n5120", c.get()); + break; + case types::n10240: + j.write_int("n10240", c.get()); + break; + case types::n20480: + j.write_int("n20480", c.get()); + break; + case types::n40960: + j.write_int("n40960", c.get()); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::n16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); + break; + case types::n20: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + break; + case types::n32: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); + break; + case types::n40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::n64: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::n80: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::n128: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + break; + case types::n160: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + case types::n256: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)255u)); + break; + case types::n320: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + break; + case types::n640: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + break; + case types::n1280: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); + break; + case types::n2560: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); + break; + case types::n5120: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); + break; + case types::n10240: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); + break; + case types::n20480: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)20479u)); + break; + case types::n40960: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)40959u)); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::n16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); + break; + case types::n20: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::n32: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); + break; + case types::n40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::n64: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::n80: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::n128: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + break; + case types::n160: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + case types::n256: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)255u)); + break; + case types::n320: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + case types::n640: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + break; + case types::n1280: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); + break; + case types::n2560: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); + break; + case types::n5120: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); + break; + case types::n10240: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); + break; + case types::n20480: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)20479u)); + break; + case types::n40960: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)40959u)); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::types_opts::to_string() const +{ + static const char* names[] = {"n16", + "n20", + "n32", + "n40", + "n64", + "n80", + "n128", + "n160", + "n256", + "n320", + "n640", + "n1280", + "n2560", + "n5120", + "n10240", + "n20480", + "n40960"}; + return convert_enum_idx(names, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::types"); +} +uint16_t dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = { + 16, 20, 32, 40, 64, 80, 128, 160, 256, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960}; + return map_enum_number(numbers, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::types"); +} + +void dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::destroy_() {} +void dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::scs120_c_( + const dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::n32: + c.init(other.c.get()); + break; + case types::n40: + c.init(other.c.get()); + break; + case types::n64: + c.init(other.c.get()); + break; + case types::n80: + c.init(other.c.get()); + break; + case types::n128: + c.init(other.c.get()); + break; + case types::n160: + c.init(other.c.get()); + break; + case types::n256: + c.init(other.c.get()); + break; + case types::n320: + c.init(other.c.get()); + break; + case types::n512: + c.init(other.c.get()); + break; + case types::n640: + c.init(other.c.get()); + break; + case types::n1280: + c.init(other.c.get()); + break; + case types::n2560: + c.init(other.c.get()); + break; + case types::n5120: + c.init(other.c.get()); + break; + case types::n10240: + c.init(other.c.get()); + break; + case types::n20480: + c.init(other.c.get()); + break; + case types::n40960: + c.init(other.c.get()); + break; + case types::n81920: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_"); + } +} +dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::operator=( + const dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::n32: + c.set(other.c.get()); + break; + case types::n40: + c.set(other.c.get()); + break; + case types::n64: + c.set(other.c.get()); + break; + case types::n80: + c.set(other.c.get()); + break; + case types::n128: + c.set(other.c.get()); + break; + case types::n160: + c.set(other.c.get()); + break; + case types::n256: + c.set(other.c.get()); + break; + case types::n320: + c.set(other.c.get()); + break; + case types::n512: + c.set(other.c.get()); + break; + case types::n640: + c.set(other.c.get()); + break; + case types::n1280: + c.set(other.c.get()); + break; + case types::n2560: + c.set(other.c.get()); + break; + case types::n5120: + c.set(other.c.get()); + break; + case types::n10240: + c.set(other.c.get()); + break; + case types::n20480: + c.set(other.c.get()); + break; + case types::n40960: + c.set(other.c.get()); + break; + case types::n81920: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_"); + } + + return *this; +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n32() +{ + set(types::n32); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n40() +{ + set(types::n40); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n64() +{ + set(types::n64); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n80() +{ + set(types::n80); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n128() +{ + set(types::n128); + return c.get(); +} +uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n160() +{ + set(types::n160); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n256() +{ + set(types::n256); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n320() +{ + set(types::n320); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n512() +{ + set(types::n512); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n640() +{ + set(types::n640); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n1280() +{ + set(types::n1280); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n2560() +{ + set(types::n2560); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n5120() +{ + set(types::n5120); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n10240() +{ + set(types::n10240); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n20480() +{ + set(types::n20480); + return c.get(); +} +uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n40960() +{ + set(types::n40960); + return c.get(); +} +uint32_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n81920() +{ + set(types::n81920); + return c.get(); +} +void dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::n32: + j.write_int("n32", c.get()); + break; + case types::n40: + j.write_int("n40", c.get()); + break; + case types::n64: + j.write_int("n64", c.get()); + break; + case types::n80: + j.write_int("n80", c.get()); + break; + case types::n128: + j.write_int("n128", c.get()); + break; + case types::n160: + j.write_int("n160", c.get()); + break; + case types::n256: + j.write_int("n256", c.get()); + break; + case types::n320: + j.write_int("n320", c.get()); + break; + case types::n512: + j.write_int("n512", c.get()); + break; + case types::n640: + j.write_int("n640", c.get()); + break; + case types::n1280: + j.write_int("n1280", c.get()); + break; + case types::n2560: + j.write_int("n2560", c.get()); + break; + case types::n5120: + j.write_int("n5120", c.get()); + break; + case types::n10240: + j.write_int("n10240", c.get()); + break; + case types::n20480: + j.write_int("n20480", c.get()); + break; + case types::n40960: + j.write_int("n40960", c.get()); + break; + case types::n81920: + j.write_int("n81920", c.get()); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::n32: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); + break; + case types::n40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::n64: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::n80: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::n128: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + break; + case types::n160: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + case types::n256: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)255u)); + break; + case types::n320: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + break; + case types::n512: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)511u)); + break; + case types::n640: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + break; + case types::n1280: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); + break; + case types::n2560: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); + break; + case types::n5120: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); + break; + case types::n10240: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); + break; + case types::n20480: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)20479u)); + break; + case types::n40960: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)40959u)); + break; + case types::n81920: + HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)81919u)); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::n32: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); + break; + case types::n40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::n64: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::n80: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::n128: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + break; + case types::n160: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + case types::n256: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)255u)); + break; + case types::n320: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + case types::n512: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)511u)); + break; + case types::n640: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + break; + case types::n1280: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); + break; + case types::n2560: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); + break; + case types::n5120: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); + break; + case types::n10240: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); + break; + case types::n20480: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)20479u)); + break; + case types::n40960: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)40959u)); + break; + case types::n81920: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)81919u)); + break; + default: + log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::types_opts::to_string() const +{ + static const char* names[] = {"n32", + "n40", + "n64", + "n80", + "n128", + "n160", + "n256", + "n320", + "n512", + "n640", + "n1280", + "n2560", + "n5120", + "n10240", + "n20480", + "n40960", + "n81920"}; + return convert_enum_idx(names, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::types"); +} +uint32_t dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::types_opts::to_number() const +{ + static const uint32_t numbers[] = { + 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920}; + return map_enum_number(numbers, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::types"); +} + +const char* dl_ppw_periodicity_and_start_slot_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"scs15", "scs30", "scs60", "scs120"}; + return convert_enum_idx(names, 4, value, "dl_ppw_periodicity_and_start_slot_r17_c::types"); +} +uint8_t dl_ppw_periodicity_and_start_slot_r17_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {15, 30, 60, 120}; + return map_enum_number(numbers, 4, value, "dl_ppw_periodicity_and_start_slot_r17_c::types"); +} + +// DMRS-DownlinkConfig ::= SEQUENCE +SRSASN_CODE dmrs_dl_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)); + + 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 (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= dmrs_dl_r16_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(dmrs_dl_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dmrs_dl_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)); + + 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 (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(dmrs_dl_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void dmrs_dl_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 (phase_tracking_rs_present) { + j.write_fieldname("phaseTrackingRS"); + phase_tracking_rs.to_json(j); + } + if (ext) { + if (dmrs_dl_r16_present) { + j.write_str("dmrs-Downlink-r16", "enabled"); + } + } + j.end_obj(); +} + +const char* dmrs_dl_cfg_s::dmrs_add_position_opts::to_string() const +{ + static const char* names[] = {"pos0", "pos1", "pos3"}; + return convert_enum_idx(names, 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 numbers[] = {0, 1, 3}; + return map_enum_number(numbers, 3, value, "dmrs_dl_cfg_s::dmrs_add_position_e_"); +} + +// DownlinkPreemption ::= SEQUENCE +SRSASN_CODE dl_preemption_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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_preemption_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)); + + return SRSASN_SUCCESS; +} +void dl_preemption_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); + } + j.end_array(); + j.end_obj(); +} + +const char* dl_preemption_s::time_freq_set_opts::to_string() const +{ + static const char* names[] = {"set0", "set1"}; + return convert_enum_idx(names, 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 numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "dl_preemption_s::time_freq_set_e_"); +} + +// 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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= tpc_idx_pucch_s_scell_r17_present; + group_flags[0] |= tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(tpc_idx_pucch_s_scell_r17_present, 1)); + HANDLE_CODE(bref.pack(tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present, 1)); + if (tpc_idx_pucch_s_scell_r17_present) { + HANDLE_CODE(pack_integer(bref, tpc_idx_pucch_s_scell_r17, (uint8_t)1u, (uint8_t)15u)); + } + if (tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present) { + HANDLE_CODE(pack_integer(bref, tpc_idx_pucch_s_scell_secondary_pucch_group_r17, (uint8_t)1u, (uint8_t)15u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_tpc_cmd_cfg_s::unpack(cbit_ref& bref) +{ + 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)); + } + + 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(tpc_idx_pucch_s_scell_r17_present, 1)); + HANDLE_CODE(bref.unpack(tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present, 1)); + if (tpc_idx_pucch_s_scell_r17_present) { + HANDLE_CODE(unpack_integer(tpc_idx_pucch_s_scell_r17, bref, (uint8_t)1u, (uint8_t)15u)); + } + if (tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present) { + HANDLE_CODE(unpack_integer(tpc_idx_pucch_s_scell_secondary_pucch_group_r17, bref, (uint8_t)1u, (uint8_t)15u)); + } + } + } + return SRSASN_SUCCESS; +} +void pucch_tpc_cmd_cfg_s::to_json(json_writer& j) 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); + } + if (ext) { + if (tpc_idx_pucch_s_scell_r17_present) { + j.write_int("tpc-IndexPUCCH-sSCell-r17", tpc_idx_pucch_s_scell_r17); + } + if (tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present) { + j.write_int("tpc-IndexPUCCH-sScellSecondaryPUCCHgroup-r17", tpc_idx_pucch_s_scell_secondary_pucch_group_r17); + } + } + j.end_obj(); +} + +// PUSCH-TPC-CommandConfig ::= SEQUENCE +SRSASN_CODE pusch_tpc_cmd_cfg_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)); + + if (tpc_idx_present) { + HANDLE_CODE(pack_integer(bref, tpc_idx, (uint8_t)1u, (uint8_t)15u)); + } + 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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_tpc_cmd_cfg_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)); + + if (tpc_idx_present) { + HANDLE_CODE(unpack_integer(tpc_idx, bref, (uint8_t)1u, (uint8_t)15u)); + } + 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)); + } + + return SRSASN_SUCCESS; +} +void pusch_tpc_cmd_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tpc_idx_present) { + j.write_int("tpc-Index", tpc_idx); + } + if (tpc_idx_sul_present) { + j.write_int("tpc-IndexSUL", tpc_idx_sul); + } + if (target_cell_present) { + j.write_int("targetCell", target_cell); + } + j.end_obj(); +} + +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_"); + } +} +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::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_"); + } + + return *this; +} +uint8_t& rate_match_pattern_group_item_c_::set_cell_level() +{ + set(types::cell_level); + return c.get(); +} +uint8_t& rate_match_pattern_group_item_c_::set_bwp_level() +{ + set(types::bwp_level); + return c.get(); +} +void rate_match_pattern_group_item_c_::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_"); + } + 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; + } + 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; + } + return SRSASN_SUCCESS; +} + +const char* rate_match_pattern_group_item_c_::types_opts::to_string() const +{ + static const char* names[] = {"cellLevel", "bwpLevel"}; + return convert_enum_idx(names, 2, value, "rate_match_pattern_group_item_c_::types"); +} + +// RepetitionSchemeConfig-r16 ::= CHOICE +void repeat_scheme_cfg_r16_c::destroy_() +{ + switch (type_) { + case types::fdm_tdm_r16: + c.destroy>(); + break; + case types::slot_based_r16: + c.destroy>(); + break; + default: + break; + } +} +void repeat_scheme_cfg_r16_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::fdm_tdm_r16: + c.init>(); + break; + case types::slot_based_r16: + c.init>(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "repeat_scheme_cfg_r16_c"); + } +} +repeat_scheme_cfg_r16_c::repeat_scheme_cfg_r16_c(const repeat_scheme_cfg_r16_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::fdm_tdm_r16: + c.init(other.c.get>()); + break; + case types::slot_based_r16: + c.init(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "repeat_scheme_cfg_r16_c"); + } +} +repeat_scheme_cfg_r16_c& repeat_scheme_cfg_r16_c::operator=(const repeat_scheme_cfg_r16_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::fdm_tdm_r16: + c.set(other.c.get>()); + break; + case types::slot_based_r16: + c.set(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "repeat_scheme_cfg_r16_c"); + } + + return *this; +} +setup_release_c& repeat_scheme_cfg_r16_c::set_fdm_tdm_r16() +{ + set(types::fdm_tdm_r16); + return c.get>(); +} +setup_release_c& repeat_scheme_cfg_r16_c::set_slot_based_r16() +{ + set(types::slot_based_r16); + return c.get>(); +} +void repeat_scheme_cfg_r16_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::fdm_tdm_r16: + j.write_fieldname("fdm-TDM-r16"); + c.get>().to_json(j); + break; + case types::slot_based_r16: + j.write_fieldname("slotBased-r16"); + c.get>().to_json(j); + break; + default: + log_invalid_choice_id(type_, "repeat_scheme_cfg_r16_c"); + } + j.end_obj(); +} +SRSASN_CODE repeat_scheme_cfg_r16_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::fdm_tdm_r16: + HANDLE_CODE(c.get>().pack(bref)); + break; + case types::slot_based_r16: + HANDLE_CODE(c.get>().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "repeat_scheme_cfg_r16_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE repeat_scheme_cfg_r16_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::fdm_tdm_r16: + HANDLE_CODE(c.get>().unpack(bref)); + break; + case types::slot_based_r16: + HANDLE_CODE(c.get>().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "repeat_scheme_cfg_r16_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* repeat_scheme_cfg_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"fdm-TDM-r16", "slotBased-r16"}; + return convert_enum_idx(names, 2, value, "repeat_scheme_cfg_r16_c::types"); +} + +// RepetitionSchemeConfig-v1630 ::= SEQUENCE +SRSASN_CODE repeat_scheme_cfg_v1630_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(slot_based_v1630.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE repeat_scheme_cfg_v1630_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(slot_based_v1630.unpack(bref)); + + return SRSASN_SUCCESS; +} +void repeat_scheme_cfg_v1630_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("slotBased-v1630"); + slot_based_v1630.to_json(j); + j.end_obj(); +} + +// SPS-Config ::= SEQUENCE +SRSASN_CODE sps_cfg_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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= sps_cfg_idx_r16_present; + group_flags[0] |= harq_proc_id_offset_r16_present; + group_flags[0] |= periodicity_ext_r16_present; + group_flags[0] |= harq_codebook_id_r16_present; + group_flags[0] |= pdsch_aggregation_factor_r16_present; + group_flags[1] |= sps_harq_deferral_r17_present; + group_flags[1] |= n1_pucch_an_pucch_s_scell_r17_present; + group_flags[1] |= periodicity_ext_r17_present; + group_flags[1] |= nrof_harq_processes_v1710_present; + group_flags[1] |= harq_proc_id_offset_v1700_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sps_cfg_idx_r16_present, 1)); + HANDLE_CODE(bref.pack(harq_proc_id_offset_r16_present, 1)); + HANDLE_CODE(bref.pack(periodicity_ext_r16_present, 1)); + HANDLE_CODE(bref.pack(harq_codebook_id_r16_present, 1)); + HANDLE_CODE(bref.pack(pdsch_aggregation_factor_r16_present, 1)); + if (sps_cfg_idx_r16_present) { + HANDLE_CODE(pack_integer(bref, sps_cfg_idx_r16, (uint8_t)0u, (uint8_t)7u)); + } + if (harq_proc_id_offset_r16_present) { + HANDLE_CODE(pack_integer(bref, harq_proc_id_offset_r16, (uint8_t)0u, (uint8_t)15u)); + } + if (periodicity_ext_r16_present) { + HANDLE_CODE(pack_integer(bref, periodicity_ext_r16, (uint16_t)1u, (uint16_t)5120u)); + } + if (harq_codebook_id_r16_present) { + HANDLE_CODE(pack_integer(bref, harq_codebook_id_r16, (uint8_t)1u, (uint8_t)2u)); + } + if (pdsch_aggregation_factor_r16_present) { + HANDLE_CODE(pdsch_aggregation_factor_r16.pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sps_harq_deferral_r17_present, 1)); + HANDLE_CODE(bref.pack(n1_pucch_an_pucch_s_scell_r17_present, 1)); + HANDLE_CODE(bref.pack(periodicity_ext_r17_present, 1)); + HANDLE_CODE(bref.pack(nrof_harq_processes_v1710_present, 1)); + HANDLE_CODE(bref.pack(harq_proc_id_offset_v1700_present, 1)); + if (sps_harq_deferral_r17_present) { + HANDLE_CODE(pack_integer(bref, sps_harq_deferral_r17, (uint8_t)1u, (uint8_t)32u)); + } + if (n1_pucch_an_pucch_s_scell_r17_present) { + HANDLE_CODE(pack_integer(bref, n1_pucch_an_pucch_s_scell_r17, (uint8_t)0u, (uint8_t)127u)); + } + if (periodicity_ext_r17_present) { + HANDLE_CODE(pack_integer(bref, periodicity_ext_r17, (uint16_t)1u, (uint16_t)40960u)); + } + if (nrof_harq_processes_v1710_present) { + HANDLE_CODE(pack_integer(bref, nrof_harq_processes_v1710, (uint8_t)9u, (uint8_t)32u)); + } + if (harq_proc_id_offset_v1700_present) { + HANDLE_CODE(pack_integer(bref, harq_proc_id_offset_v1700, (uint8_t)16u, (uint8_t)31u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_cfg_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)); + } + + 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(sps_cfg_idx_r16_present, 1)); + HANDLE_CODE(bref.unpack(harq_proc_id_offset_r16_present, 1)); + HANDLE_CODE(bref.unpack(periodicity_ext_r16_present, 1)); + HANDLE_CODE(bref.unpack(harq_codebook_id_r16_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_aggregation_factor_r16_present, 1)); + if (sps_cfg_idx_r16_present) { + HANDLE_CODE(unpack_integer(sps_cfg_idx_r16, bref, (uint8_t)0u, (uint8_t)7u)); + } + if (harq_proc_id_offset_r16_present) { + HANDLE_CODE(unpack_integer(harq_proc_id_offset_r16, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (periodicity_ext_r16_present) { + HANDLE_CODE(unpack_integer(periodicity_ext_r16, bref, (uint16_t)1u, (uint16_t)5120u)); + } + if (harq_codebook_id_r16_present) { + HANDLE_CODE(unpack_integer(harq_codebook_id_r16, bref, (uint8_t)1u, (uint8_t)2u)); + } + if (pdsch_aggregation_factor_r16_present) { + HANDLE_CODE(pdsch_aggregation_factor_r16.unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(sps_harq_deferral_r17_present, 1)); + HANDLE_CODE(bref.unpack(n1_pucch_an_pucch_s_scell_r17_present, 1)); + HANDLE_CODE(bref.unpack(periodicity_ext_r17_present, 1)); + HANDLE_CODE(bref.unpack(nrof_harq_processes_v1710_present, 1)); + HANDLE_CODE(bref.unpack(harq_proc_id_offset_v1700_present, 1)); + if (sps_harq_deferral_r17_present) { + HANDLE_CODE(unpack_integer(sps_harq_deferral_r17, bref, (uint8_t)1u, (uint8_t)32u)); + } + if (n1_pucch_an_pucch_s_scell_r17_present) { + HANDLE_CODE(unpack_integer(n1_pucch_an_pucch_s_scell_r17, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (periodicity_ext_r17_present) { + HANDLE_CODE(unpack_integer(periodicity_ext_r17, bref, (uint16_t)1u, (uint16_t)40960u)); + } + if (nrof_harq_processes_v1710_present) { + HANDLE_CODE(unpack_integer(nrof_harq_processes_v1710, bref, (uint8_t)9u, (uint8_t)32u)); + } + if (harq_proc_id_offset_v1700_present) { + HANDLE_CODE(unpack_integer(harq_proc_id_offset_v1700, bref, (uint8_t)16u, (uint8_t)31u)); + } + } + } + return SRSASN_SUCCESS; +} +void sps_cfg_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"); + } + if (ext) { + if (sps_cfg_idx_r16_present) { + j.write_int("sps-ConfigIndex-r16", sps_cfg_idx_r16); + } + if (harq_proc_id_offset_r16_present) { + j.write_int("harq-ProcID-Offset-r16", harq_proc_id_offset_r16); + } + if (periodicity_ext_r16_present) { + j.write_int("periodicityExt-r16", periodicity_ext_r16); + } + if (harq_codebook_id_r16_present) { + j.write_int("harq-CodebookID-r16", harq_codebook_id_r16); + } + if (pdsch_aggregation_factor_r16_present) { + j.write_str("pdsch-AggregationFactor-r16", pdsch_aggregation_factor_r16.to_string()); + } + if (sps_harq_deferral_r17_present) { + j.write_int("sps-HARQ-Deferral-r17", sps_harq_deferral_r17); + } + if (n1_pucch_an_pucch_s_scell_r17_present) { + j.write_int("n1PUCCH-AN-PUCCHsSCell-r17", n1_pucch_an_pucch_s_scell_r17); + } + if (periodicity_ext_r17_present) { + j.write_int("periodicityExt-r17", periodicity_ext_r17); + } + if (nrof_harq_processes_v1710_present) { + j.write_int("nrofHARQ-Processes-v1710", nrof_harq_processes_v1710); + } + if (harq_proc_id_offset_v1700_present) { + j.write_int("harq-ProcID-Offset-v1700", harq_proc_id_offset_v1700); + } + } + j.end_obj(); +} + +const char* sps_cfg_s::periodicity_opts::to_string() const +{ + static const char* names[] = {"ms10", + "ms20", + "ms32", + "ms40", + "ms64", + "ms80", + "ms128", + "ms160", + "ms320", + "ms640", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "sps_cfg_s::periodicity_e_"); +} +uint16_t sps_cfg_s::periodicity_opts::to_number() const +{ + static const uint16_t numbers[] = {10, 20, 32, 40, 64, 80, 128, 160, 320, 640}; + return map_enum_number(numbers, 10, value, "sps_cfg_s::periodicity_e_"); +} + +const char* sps_cfg_s::pdsch_aggregation_factor_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n4", "n8"}; + return convert_enum_idx(names, 4, value, "sps_cfg_s::pdsch_aggregation_factor_r16_e_"); +} +uint8_t sps_cfg_s::pdsch_aggregation_factor_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "sps_cfg_s::pdsch_aggregation_factor_r16_e_"); +} + +// SRS-TPC-CommandConfig ::= SEQUENCE +SRSASN_CODE srs_tpc_cmd_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(start_bit_of_format2_3_present, 1)); + HANDLE_CODE(bref.pack(field_type_format2_3_present, 1)); + + if (start_bit_of_format2_3_present) { + HANDLE_CODE(pack_integer(bref, start_bit_of_format2_3, (uint8_t)1u, (uint8_t)31u)); + } + if (field_type_format2_3_present) { + HANDLE_CODE(pack_integer(bref, field_type_format2_3, (uint8_t)0u, (uint8_t)1u)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= start_bit_of_format2_3_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_3_sul_present, 1)); + if (start_bit_of_format2_3_sul_present) { + HANDLE_CODE(pack_integer(bref, start_bit_of_format2_3_sul, (uint8_t)1u, (uint8_t)31u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_tpc_cmd_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(start_bit_of_format2_3_present, 1)); + HANDLE_CODE(bref.unpack(field_type_format2_3_present, 1)); + + if (start_bit_of_format2_3_present) { + HANDLE_CODE(unpack_integer(start_bit_of_format2_3, bref, (uint8_t)1u, (uint8_t)31u)); + } + if (field_type_format2_3_present) { + HANDLE_CODE(unpack_integer(field_type_format2_3, 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_3_sul_present, 1)); + if (start_bit_of_format2_3_sul_present) { + HANDLE_CODE(unpack_integer(start_bit_of_format2_3_sul, bref, (uint8_t)1u, (uint8_t)31u)); + } + } + } + return SRSASN_SUCCESS; +} +void srs_tpc_cmd_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (start_bit_of_format2_3_present) { + j.write_int("startingBitOfFormat2-3", start_bit_of_format2_3); + } + if (field_type_format2_3_present) { + j.write_int("fieldTypeFormat2-3", field_type_format2_3); + } + if (ext) { + if (start_bit_of_format2_3_sul_present) { + j.write_int("startingBitOfFormat2-3SUL", start_bit_of_format2_3_sul); + } + } + j.end_obj(); +} + +// SearchSpaceSwitchConfig-r16 ::= SEQUENCE +SRSASN_CODE search_space_switch_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_groups_for_switch_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(search_space_switch_delay_r16_present, 1)); + + if (cell_groups_for_switch_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, + cell_groups_for_switch_list_r16, + 1, + 4, + SeqOfPacker>(1, 16, integer_packer(0, 31)))); + } + if (search_space_switch_delay_r16_present) { + HANDLE_CODE(pack_integer(bref, search_space_switch_delay_r16, (uint8_t)10u, (uint8_t)52u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE search_space_switch_cfg_r16_s::unpack(cbit_ref& bref) +{ + bool cell_groups_for_switch_list_r16_present; + HANDLE_CODE(bref.unpack(cell_groups_for_switch_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(search_space_switch_delay_r16_present, 1)); + + if (cell_groups_for_switch_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(cell_groups_for_switch_list_r16, + bref, + 1, + 4, + SeqOfPacker>(1, 16, integer_packer(0, 31)))); + } + if (search_space_switch_delay_r16_present) { + HANDLE_CODE(unpack_integer(search_space_switch_delay_r16, bref, (uint8_t)10u, (uint8_t)52u)); + } + + return SRSASN_SUCCESS; +} +void search_space_switch_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cell_groups_for_switch_list_r16.size() > 0) { + j.start_array("cellGroupsForSwitchList-r16"); + for (const auto& e1 : cell_groups_for_switch_list_r16) { + j.start_array(); + for (const auto& e2 : e1) { + j.write_int(e2); + } + j.end_array(); + } + j.end_array(); + } + if (search_space_switch_delay_r16_present) { + j.write_int("searchSpaceSwitchDelay-r16", search_space_switch_delay_r16); + } + j.end_obj(); +} + +// SearchSpaceSwitchConfig-r17 ::= SEQUENCE +SRSASN_CODE search_space_switch_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(search_space_switch_timer_r17_present, 1)); + HANDLE_CODE(bref.pack(search_space_switch_delay_r17_present, 1)); + + if (search_space_switch_timer_r17_present) { + HANDLE_CODE(pack_integer(bref, search_space_switch_timer_r17, (uint8_t)1u, (uint8_t)166u)); + } + if (search_space_switch_delay_r17_present) { + HANDLE_CODE(pack_integer(bref, search_space_switch_delay_r17, (uint8_t)10u, (uint8_t)52u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE search_space_switch_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(search_space_switch_timer_r17_present, 1)); + HANDLE_CODE(bref.unpack(search_space_switch_delay_r17_present, 1)); + + if (search_space_switch_timer_r17_present) { + HANDLE_CODE(unpack_integer(search_space_switch_timer_r17, bref, (uint8_t)1u, (uint8_t)166u)); + } + if (search_space_switch_delay_r17_present) { + HANDLE_CODE(unpack_integer(search_space_switch_delay_r17, bref, (uint8_t)10u, (uint8_t)52u)); + } + + return SRSASN_SUCCESS; +} +void search_space_switch_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (search_space_switch_timer_r17_present) { + j.write_int("searchSpaceSwitchTimer-r17", search_space_switch_timer_r17); + } + if (search_space_switch_delay_r17_present) { + j.write_int("searchSpaceSwitchDelay-r17", search_space_switch_delay_r17); + } + j.end_obj(); +} + +// TCI-State ::= SEQUENCE +SRSASN_CODE tci_state_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(qcl_type2_present, 1)); + + 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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= add_pci_r17_present; + group_flags[0] |= pathloss_ref_rs_id_r17_present; + group_flags[0] |= ul_pwr_ctrl_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(add_pci_r17_present, 1)); + HANDLE_CODE(bref.pack(pathloss_ref_rs_id_r17_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_r17_present, 1)); + if (add_pci_r17_present) { + HANDLE_CODE(pack_integer(bref, add_pci_r17, (uint8_t)1u, (uint8_t)7u)); + } + if (pathloss_ref_rs_id_r17_present) { + HANDLE_CODE(pack_integer(bref, pathloss_ref_rs_id_r17, (uint8_t)0u, (uint8_t)63u)); + } + if (ul_pwr_ctrl_r17_present) { + HANDLE_CODE(pack_integer(bref, ul_pwr_ctrl_r17, (uint8_t)1u, (uint8_t)64u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE tci_state_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(qcl_type2_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 (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(add_pci_r17_present, 1)); + HANDLE_CODE(bref.unpack(pathloss_ref_rs_id_r17_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_r17_present, 1)); + if (add_pci_r17_present) { + HANDLE_CODE(unpack_integer(add_pci_r17, bref, (uint8_t)1u, (uint8_t)7u)); + } + if (pathloss_ref_rs_id_r17_present) { + HANDLE_CODE(unpack_integer(pathloss_ref_rs_id_r17, bref, (uint8_t)0u, (uint8_t)63u)); + } + if (ul_pwr_ctrl_r17_present) { + HANDLE_CODE(unpack_integer(ul_pwr_ctrl_r17, bref, (uint8_t)1u, (uint8_t)64u)); + } + } + } + return SRSASN_SUCCESS; +} +void tci_state_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 (ext) { + if (add_pci_r17_present) { + j.write_int("additionalPCI-r17", add_pci_r17); + } + if (pathloss_ref_rs_id_r17_present) { + j.write_int("pathlossReferenceRS-Id-r17", pathloss_ref_rs_id_r17); + } + if (ul_pwr_ctrl_r17_present) { + j.write_int("ul-powerControl-r17", ul_pwr_ctrl_r17); + } + } + j.end_obj(); +} + +// UplinkCancellation-r16 ::= SEQUENCE +SRSASN_CODE ul_cancellation_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, ci_rnti_r16, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(pack_integer(bref, dci_payload_size_for_ci_r16, (uint8_t)0u, (uint8_t)126u)); + HANDLE_CODE(pack_dyn_seq_of(bref, ci_cfg_per_serving_cell_r16, 1, 32)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_cancellation_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(ci_rnti_r16, bref, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(unpack_integer(dci_payload_size_for_ci_r16, bref, (uint8_t)0u, (uint8_t)126u)); + HANDLE_CODE(unpack_dyn_seq_of(ci_cfg_per_serving_cell_r16, bref, 1, 32)); + + return SRSASN_SUCCESS; +} +void ul_cancellation_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ci-RNTI-r16", ci_rnti_r16); + j.write_int("dci-PayloadSizeForCI-r16", dci_payload_size_for_ci_r16); + j.start_array("ci-ConfigurationPerServingCell-r16"); + for (const auto& e1 : ci_cfg_per_serving_cell_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// ZP-CSI-RS-Resource ::= SEQUENCE +SRSASN_CODE zp_csi_rs_res_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + 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 zp_csi_rs_res_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + 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 zp_csi_rs_res_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.end_obj(); +} + +// ZP-CSI-RS-ResourceSet ::= SEQUENCE +SRSASN_CODE zp_csi_rs_res_set_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))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE zp_csi_rs_res_set_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))); + + return SRSASN_SUCCESS; +} +void zp_csi_rs_res_set_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("zp-CSI-RS-ResourceSetId", zp_csi_rs_res_set_id); + j.start_array("zp-CSI-RS-ResourceIdList"); + for (const auto& e1 : zp_csi_rs_res_id_list) { + j.write_int(e1); + } + j.end_array(); + j.end_obj(); +} + +// BeamFailureDetection-r17 ::= SEQUENCE +SRSASN_CODE beam_fail_detection_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(fail_detection_set1_r17_present, 1)); + HANDLE_CODE(bref.pack(fail_detection_set2_r17_present, 1)); + HANDLE_CODE(bref.pack(add_pci_r17_present, 1)); + + if (fail_detection_set1_r17_present) { + HANDLE_CODE(fail_detection_set1_r17.pack(bref)); + } + if (fail_detection_set2_r17_present) { + HANDLE_CODE(fail_detection_set2_r17.pack(bref)); + } + if (add_pci_r17_present) { + HANDLE_CODE(pack_integer(bref, add_pci_r17, (uint8_t)1u, (uint8_t)7u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE beam_fail_detection_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(fail_detection_set1_r17_present, 1)); + HANDLE_CODE(bref.unpack(fail_detection_set2_r17_present, 1)); + HANDLE_CODE(bref.unpack(add_pci_r17_present, 1)); + + if (fail_detection_set1_r17_present) { + HANDLE_CODE(fail_detection_set1_r17.unpack(bref)); + } + if (fail_detection_set2_r17_present) { + HANDLE_CODE(fail_detection_set2_r17.unpack(bref)); + } + if (add_pci_r17_present) { + HANDLE_CODE(unpack_integer(add_pci_r17, bref, (uint8_t)1u, (uint8_t)7u)); + } + + return SRSASN_SUCCESS; +} +void beam_fail_detection_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fail_detection_set1_r17_present) { + j.write_fieldname("failureDetectionSet1-r17"); + fail_detection_set1_r17.to_json(j); + } + if (fail_detection_set2_r17_present) { + j.write_fieldname("failureDetectionSet2-r17"); + fail_detection_set2_r17.to_json(j); + } + if (add_pci_r17_present) { + j.write_int("additionalPCI-r17", add_pci_r17); + } + j.end_obj(); +} + +// CandidateBeamRS-r16 ::= SEQUENCE +SRSASN_CODE candidate_beam_rs_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(serving_cell_id_present, 1)); + + HANDLE_CODE(candidate_beam_cfg_r16.pack(bref)); + if (serving_cell_id_present) { + HANDLE_CODE(pack_integer(bref, serving_cell_id, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE candidate_beam_rs_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(serving_cell_id_present, 1)); + + HANDLE_CODE(candidate_beam_cfg_r16.unpack(bref)); + if (serving_cell_id_present) { + HANDLE_CODE(unpack_integer(serving_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +void candidate_beam_rs_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("candidateBeamConfig-r16"); + candidate_beam_cfg_r16.to_json(j); + if (serving_cell_id_present) { + j.write_int("servingCellId", serving_cell_id); + } + j.end_obj(); +} + +void candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::destroy_() {} +void candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::candidate_beam_cfg_r16_c_( + const candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ssb_r16: + c.init(other.c.get()); + break; + case types::csi_rs_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_"); + } +} +candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_& candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::operator=( + const candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ssb_r16: + c.set(other.c.get()); + break; + case types::csi_rs_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_"); + } + + return *this; +} +uint8_t& candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::set_ssb_r16() +{ + set(types::ssb_r16); + return c.get(); +} +uint8_t& candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::set_csi_rs_r16() +{ + set(types::csi_rs_r16); + return c.get(); +} +void candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ssb_r16: + j.write_int("ssb-r16", c.get()); + break; + case types::csi_rs_r16: + j.write_int("csi-RS-r16", c.get()); + break; + default: + log_invalid_choice_id(type_, "candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ssb_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::csi_rs_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + break; + default: + log_invalid_choice_id(type_, "candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ssb_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::csi_rs_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + break; + default: + log_invalid_choice_id(type_, "candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-r16", "csi-RS-r16"}; + return convert_enum_idx(names, 2, value, "candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::types"); +} + +// DL-PPW-PreConfig-r17 ::= SEQUENCE +SRSASN_CODE dl_ppw_pre_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(type_r17_present, 1)); + HANDLE_CODE(bref.pack(prio_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, dl_ppw_id_r17, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(dl_ppw_periodicity_and_start_slot_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, len_r17, (uint8_t)1u, (uint8_t)160u)); + if (type_r17_present) { + HANDLE_CODE(type_r17.pack(bref)); + } + if (prio_r17_present) { + HANDLE_CODE(prio_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ppw_pre_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(type_r17_present, 1)); + HANDLE_CODE(bref.unpack(prio_r17_present, 1)); + + HANDLE_CODE(unpack_integer(dl_ppw_id_r17, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(dl_ppw_periodicity_and_start_slot_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(len_r17, bref, (uint8_t)1u, (uint8_t)160u)); + if (type_r17_present) { + HANDLE_CODE(type_r17.unpack(bref)); + } + if (prio_r17_present) { + HANDLE_CODE(prio_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void dl_ppw_pre_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-PPW-ID-r17", dl_ppw_id_r17); + j.write_fieldname("dl-PPW-PeriodicityAndStartSlot-r17"); + dl_ppw_periodicity_and_start_slot_r17.to_json(j); + j.write_int("length-r17", len_r17); + if (type_r17_present) { + j.write_str("type-r17", type_r17.to_string()); + } + if (prio_r17_present) { + j.write_str("priority-r17", prio_r17.to_string()); + } + j.end_obj(); +} + +const char* dl_ppw_pre_cfg_r17_s::type_r17_opts::to_string() const +{ + static const char* names[] = {"type1A", "type1B", "type2"}; + return convert_enum_idx(names, 3, value, "dl_ppw_pre_cfg_r17_s::type_r17_e_"); +} + +const char* dl_ppw_pre_cfg_r17_s::prio_r17_opts::to_string() const +{ + static const char* names[] = {"st1", "st2", "st3"}; + return convert_enum_idx(names, 3, value, "dl_ppw_pre_cfg_r17_s::prio_r17_e_"); +} +uint8_t dl_ppw_pre_cfg_r17_s::prio_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3}; + return map_enum_number(numbers, 3, value, "dl_ppw_pre_cfg_r17_s::prio_r17_e_"); +} + +// PDCCH-Config ::= SEQUENCE +SRSASN_CODE pdcch_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(coreset_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(coreset_to_release_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(search_spaces_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(search_spaces_to_release_list.size() > 0, 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 (coreset_to_add_mod_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, coreset_to_add_mod_list, 1, 3)); + } + if (coreset_to_release_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, coreset_to_release_list, 1, 3, integer_packer(0, 11))); + } + if (search_spaces_to_add_mod_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, search_spaces_to_add_mod_list, 1, 10)); + } + if (search_spaces_to_release_list.size() > 0) { + 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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= coreset_to_add_mod_list_size_ext_v1610.is_present(); + group_flags[0] |= coreset_to_release_list_size_ext_r16.is_present(); + group_flags[0] |= search_spaces_to_add_mod_list_ext_r16.is_present(); + group_flags[0] |= ul_cancellation_r16.is_present(); + group_flags[0] |= monitoring_cap_cfg_r16_present; + group_flags[0] |= search_space_switch_cfg_r16.is_present(); + group_flags[1] |= search_spaces_to_add_mod_list_ext_v1700.is_present(); + group_flags[1] |= monitoring_cap_cfg_v1710_present; + group_flags[1] |= search_space_switch_cfg_r17.is_present(); + group_flags[1] |= pdcch_skipping_dur_list_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(coreset_to_add_mod_list_size_ext_v1610.is_present(), 1)); + HANDLE_CODE(bref.pack(coreset_to_release_list_size_ext_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(search_spaces_to_add_mod_list_ext_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(ul_cancellation_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(monitoring_cap_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(search_space_switch_cfg_r16.is_present(), 1)); + if (coreset_to_add_mod_list_size_ext_v1610.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *coreset_to_add_mod_list_size_ext_v1610, 1, 2)); + } + if (coreset_to_release_list_size_ext_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *coreset_to_release_list_size_ext_r16, 1, 5, integer_packer(0, 15))); + } + if (search_spaces_to_add_mod_list_ext_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *search_spaces_to_add_mod_list_ext_r16, 1, 10)); + } + if (ul_cancellation_r16.is_present()) { + HANDLE_CODE(ul_cancellation_r16->pack(bref)); + } + if (monitoring_cap_cfg_r16_present) { + HANDLE_CODE(monitoring_cap_cfg_r16.pack(bref)); + } + if (search_space_switch_cfg_r16.is_present()) { + HANDLE_CODE(search_space_switch_cfg_r16->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(search_spaces_to_add_mod_list_ext_v1700.is_present(), 1)); + HANDLE_CODE(bref.pack(monitoring_cap_cfg_v1710_present, 1)); + HANDLE_CODE(bref.pack(search_space_switch_cfg_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(pdcch_skipping_dur_list_r17.is_present(), 1)); + if (search_spaces_to_add_mod_list_ext_v1700.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *search_spaces_to_add_mod_list_ext_v1700, 1, 10)); + } + if (search_space_switch_cfg_r17.is_present()) { + HANDLE_CODE(search_space_switch_cfg_r17->pack(bref)); + } + if (pdcch_skipping_dur_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *pdcch_skipping_dur_list_r17, 1, 3, integer_packer(1, 166))); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcch_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool coreset_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(coreset_to_add_mod_list_present, 1)); + bool coreset_to_release_list_present; + HANDLE_CODE(bref.unpack(coreset_to_release_list_present, 1)); + bool search_spaces_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(search_spaces_to_add_mod_list_present, 1)); + bool search_spaces_to_release_list_present; + 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 (coreset_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(coreset_to_add_mod_list, bref, 1, 3)); + } + if (coreset_to_release_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(coreset_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)); + } + + 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); + + unpack_presence_flag(coreset_to_add_mod_list_size_ext_v1610, bref); + unpack_presence_flag(coreset_to_release_list_size_ext_r16, bref); + unpack_presence_flag(search_spaces_to_add_mod_list_ext_r16, bref); + unpack_presence_flag(ul_cancellation_r16, bref); + HANDLE_CODE(bref.unpack(monitoring_cap_cfg_r16_present, 1)); + unpack_presence_flag(search_space_switch_cfg_r16, bref); + if (coreset_to_add_mod_list_size_ext_v1610.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*coreset_to_add_mod_list_size_ext_v1610, bref, 1, 2)); + } + if (coreset_to_release_list_size_ext_r16.is_present()) { + HANDLE_CODE( + unpack_dyn_seq_of(*coreset_to_release_list_size_ext_r16, bref, 1, 5, integer_packer(0, 15))); + } + if (search_spaces_to_add_mod_list_ext_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*search_spaces_to_add_mod_list_ext_r16, bref, 1, 10)); + } + if (ul_cancellation_r16.is_present()) { + HANDLE_CODE(ul_cancellation_r16->unpack(bref)); + } + if (monitoring_cap_cfg_r16_present) { + HANDLE_CODE(monitoring_cap_cfg_r16.unpack(bref)); + } + if (search_space_switch_cfg_r16.is_present()) { + HANDLE_CODE(search_space_switch_cfg_r16->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(search_spaces_to_add_mod_list_ext_v1700, bref); + HANDLE_CODE(bref.unpack(monitoring_cap_cfg_v1710_present, 1)); + unpack_presence_flag(search_space_switch_cfg_r17, bref); + unpack_presence_flag(pdcch_skipping_dur_list_r17, bref); + if (search_spaces_to_add_mod_list_ext_v1700.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*search_spaces_to_add_mod_list_ext_v1700, bref, 1, 10)); + } + if (search_space_switch_cfg_r17.is_present()) { + HANDLE_CODE(search_space_switch_cfg_r17->unpack(bref)); + } + if (pdcch_skipping_dur_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*pdcch_skipping_dur_list_r17, bref, 1, 3, integer_packer(1, 166))); + } + } + } + return SRSASN_SUCCESS; +} +void pdcch_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (coreset_to_add_mod_list.size() > 0) { + j.start_array("controlResourceSetToAddModList"); + for (const auto& e1 : coreset_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); + } + if (coreset_to_release_list.size() > 0) { + j.start_array("controlResourceSetToReleaseList"); + for (const auto& e1 : coreset_to_release_list) { + j.write_int(e1); + } + j.end_array(); + } + if (search_spaces_to_add_mod_list.size() > 0) { + 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.size() > 0) { + 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); + } + if (ext) { + if (coreset_to_add_mod_list_size_ext_v1610.is_present()) { + j.start_array("controlResourceSetToAddModListSizeExt-v1610"); + for (const auto& e1 : *coreset_to_add_mod_list_size_ext_v1610) { + e1.to_json(j); + } + j.end_array(); + } + if (coreset_to_release_list_size_ext_r16.is_present()) { + j.start_array("controlResourceSetToReleaseListSizeExt-r16"); + for (const auto& e1 : *coreset_to_release_list_size_ext_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (search_spaces_to_add_mod_list_ext_r16.is_present()) { + j.start_array("searchSpacesToAddModListExt-r16"); + for (const auto& e1 : *search_spaces_to_add_mod_list_ext_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (ul_cancellation_r16.is_present()) { + j.write_fieldname("uplinkCancellation-r16"); + ul_cancellation_r16->to_json(j); + } + if (monitoring_cap_cfg_r16_present) { + j.write_str("monitoringCapabilityConfig-r16", monitoring_cap_cfg_r16.to_string()); + } + if (search_space_switch_cfg_r16.is_present()) { + j.write_fieldname("searchSpaceSwitchConfig-r16"); + search_space_switch_cfg_r16->to_json(j); + } + if (search_spaces_to_add_mod_list_ext_v1700.is_present()) { + j.start_array("searchSpacesToAddModListExt-v1700"); + for (const auto& e1 : *search_spaces_to_add_mod_list_ext_v1700) { + e1.to_json(j); + } + j.end_array(); + } + if (monitoring_cap_cfg_v1710_present) { + j.write_str("monitoringCapabilityConfig-v1710", "r17monitoringcapability"); + } + if (search_space_switch_cfg_r17.is_present()) { + j.write_fieldname("searchSpaceSwitchConfig-r17"); + search_space_switch_cfg_r17->to_json(j); + } + if (pdcch_skipping_dur_list_r17.is_present()) { + j.start_array("pdcch-SkippingDurationList-r17"); + for (const auto& e1 : *pdcch_skipping_dur_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + } + j.end_obj(); +} + +const char* pdcch_cfg_s::monitoring_cap_cfg_r16_opts::to_string() const +{ + static const char* names[] = {"r15monitoringcapability", "r16monitoringcapability"}; + return convert_enum_idx(names, 2, value, "pdcch_cfg_s::monitoring_cap_cfg_r16_e_"); +} +uint8_t pdcch_cfg_s::monitoring_cap_cfg_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {15, 16}; + return map_enum_number(numbers, 2, value, "pdcch_cfg_s::monitoring_cap_cfg_r16_e_"); +} + +// PDSCH-Config ::= SEQUENCE +SRSASN_CODE pdsch_cfg_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.size() > 0, 1)); + HANDLE_CODE(bref.pack(tci_states_to_release_list.size() > 0, 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_to_release_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_group1.size() > 0, 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_group2.size() > 0, 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(zp_csi_rs_res_to_release_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(aperiodic_zp_csi_rs_res_sets_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(aperiodic_zp_csi_rs_res_sets_to_release_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(sp_zp_csi_rs_res_sets_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(sp_zp_csi_rs_res_sets_to_release_list.size() > 0, 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, tci_states_to_add_mod_list, 1, 128)); + } + if (tci_states_to_release_list.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_add_mod_list, 1, 4)); + } + if (rate_match_pattern_to_release_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_release_list, 1, 4, integer_packer(0, 3))); + } + if (rate_match_pattern_group1.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_group1, 1, 8)); + } + if (rate_match_pattern_group2.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= max_mimo_layers_r16.is_present(); + group_flags[0] |= minimum_sched_offset_k0_r16.is_present(); + group_flags[0] |= ant_ports_field_presence_dci_1_2_r16_present; + group_flags[0] |= aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16.is_present(); + group_flags[0] |= aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16.is_present(); + group_flags[0] |= dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16.is_present(); + group_flags[0] |= dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16.is_present(); + group_flags[0] |= dmrs_seq_initization_dci_1_2_r16_present; + group_flags[0] |= harq_process_num_size_dci_1_2_r16_present; + group_flags[0] |= mcs_table_dci_1_2_r16_present; + group_flags[0] |= nof_bits_for_rv_dci_1_2_r16_present; + group_flags[0] |= pdsch_time_domain_alloc_list_dci_1_2_r16.is_present(); + group_flags[0] |= prb_bundling_type_dci_1_2_r16.is_present(); + group_flags[0] |= prio_ind_dci_1_2_r16_present; + group_flags[0] |= rate_match_pattern_group1_dci_1_2_r16.is_present(); + group_flags[0] |= rate_match_pattern_group2_dci_1_2_r16.is_present(); + group_flags[0] |= res_alloc_type1_granularity_dci_1_2_r16_present; + group_flags[0] |= vrb_to_prb_interleaver_dci_1_2_r16_present; + group_flags[0] |= ref_of_slivdci_1_2_r16_present; + group_flags[0] |= res_alloc_dci_1_2_r16_present; + group_flags[0] |= prio_ind_dci_1_1_r16_present; + group_flags[0] |= data_scrambling_id_pdsch2_r16_present; + group_flags[0] |= pdsch_time_domain_alloc_list_r16.is_present(); + group_flags[0] |= repeat_scheme_cfg_r16.is_present(); + group_flags[1] |= repeat_scheme_cfg_v1630.is_present(); + group_flags[2] |= pdsch_harq_ack_one_shot_feedback_dci_1_2_r17_present; + group_flags[2] |= pdsch_harq_ack_enh_type3_dci_1_2_r17_present; + group_flags[2] |= pdsch_harq_ack_enh_type3_dci_field_1_2_r17_present; + group_flags[2] |= pdsch_harq_ack_retx_dci_1_2_r17_present; + group_flags[2] |= pucch_s_scell_dyn_dci_1_2_r17_present; + group_flags[2] |= dl_or_joint_tci_state_list_r17.is_present(); + group_flags[2] |= beam_app_time_r17_present; + group_flags[2] |= dummy.is_present(); + group_flags[2] |= dmrs_fd_occ_disabled_for_rank1_pdsch_r17_present; + group_flags[2] |= minimum_sched_offset_k0_r17.is_present(); + group_flags[2] |= harq_process_num_size_dci_1_2_v1700_present; + group_flags[2] |= harq_process_num_size_dci_1_1_r17_present; + group_flags[2] |= mcs_table_r17_present; + group_flags[2] |= mcs_table_dci_1_2_r17_present; + group_flags[2] |= xoverhead_multicast_r17_present; + group_flags[2] |= prio_ind_dci_4_2_r17_present; + group_flags[2] |= size_dci_4_2_r17_present; + group_flags[3] |= pdsch_time_domain_alloc_list_for_multi_pdsch_r17.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_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(minimum_sched_offset_k0_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(ant_ports_field_presence_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(dmrs_seq_initization_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(harq_process_num_size_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(mcs_table_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(nof_bits_for_rv_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(pdsch_time_domain_alloc_list_dci_1_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(prb_bundling_type_dci_1_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(prio_ind_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_group1_dci_1_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_group2_dci_1_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(res_alloc_type1_granularity_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(vrb_to_prb_interleaver_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(ref_of_slivdci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(res_alloc_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(prio_ind_dci_1_1_r16_present, 1)); + HANDLE_CODE(bref.pack(data_scrambling_id_pdsch2_r16_present, 1)); + HANDLE_CODE(bref.pack(pdsch_time_domain_alloc_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(repeat_scheme_cfg_r16.is_present(), 1)); + if (max_mimo_layers_r16.is_present()) { + HANDLE_CODE(max_mimo_layers_r16->pack(bref)); + } + if (minimum_sched_offset_k0_r16.is_present()) { + HANDLE_CODE(minimum_sched_offset_k0_r16->pack(bref)); + } + if (aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16, 1, 16)); + } + if (aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of( + bref, *aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16, 1, 16, integer_packer(0, 15))); + } + if (dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16.is_present()) { + HANDLE_CODE(dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16->pack(bref)); + } + if (dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16.is_present()) { + HANDLE_CODE(dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16->pack(bref)); + } + if (harq_process_num_size_dci_1_2_r16_present) { + HANDLE_CODE(pack_integer(bref, harq_process_num_size_dci_1_2_r16, (uint8_t)0u, (uint8_t)4u)); + } + if (mcs_table_dci_1_2_r16_present) { + HANDLE_CODE(mcs_table_dci_1_2_r16.pack(bref)); + } + if (nof_bits_for_rv_dci_1_2_r16_present) { + HANDLE_CODE(pack_integer(bref, nof_bits_for_rv_dci_1_2_r16, (uint8_t)0u, (uint8_t)2u)); + } + if (pdsch_time_domain_alloc_list_dci_1_2_r16.is_present()) { + HANDLE_CODE(pdsch_time_domain_alloc_list_dci_1_2_r16->pack(bref)); + } + if (prb_bundling_type_dci_1_2_r16.is_present()) { + HANDLE_CODE(prb_bundling_type_dci_1_2_r16->pack(bref)); + } + if (rate_match_pattern_group1_dci_1_2_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *rate_match_pattern_group1_dci_1_2_r16, 1, 8)); + } + if (rate_match_pattern_group2_dci_1_2_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *rate_match_pattern_group2_dci_1_2_r16, 1, 8)); + } + if (res_alloc_type1_granularity_dci_1_2_r16_present) { + HANDLE_CODE(res_alloc_type1_granularity_dci_1_2_r16.pack(bref)); + } + if (vrb_to_prb_interleaver_dci_1_2_r16_present) { + HANDLE_CODE(vrb_to_prb_interleaver_dci_1_2_r16.pack(bref)); + } + if (res_alloc_dci_1_2_r16_present) { + HANDLE_CODE(res_alloc_dci_1_2_r16.pack(bref)); + } + if (data_scrambling_id_pdsch2_r16_present) { + HANDLE_CODE(pack_integer(bref, data_scrambling_id_pdsch2_r16, (uint16_t)0u, (uint16_t)1023u)); + } + if (pdsch_time_domain_alloc_list_r16.is_present()) { + HANDLE_CODE(pdsch_time_domain_alloc_list_r16->pack(bref)); + } + if (repeat_scheme_cfg_r16.is_present()) { + HANDLE_CODE(repeat_scheme_cfg_r16->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(repeat_scheme_cfg_v1630.is_present(), 1)); + if (repeat_scheme_cfg_v1630.is_present()) { + HANDLE_CODE(repeat_scheme_cfg_v1630->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pdsch_harq_ack_one_shot_feedback_dci_1_2_r17_present, 1)); + HANDLE_CODE(bref.pack(pdsch_harq_ack_enh_type3_dci_1_2_r17_present, 1)); + HANDLE_CODE(bref.pack(pdsch_harq_ack_enh_type3_dci_field_1_2_r17_present, 1)); + HANDLE_CODE(bref.pack(pdsch_harq_ack_retx_dci_1_2_r17_present, 1)); + HANDLE_CODE(bref.pack(pucch_s_scell_dyn_dci_1_2_r17_present, 1)); + HANDLE_CODE(bref.pack(dl_or_joint_tci_state_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(beam_app_time_r17_present, 1)); + HANDLE_CODE(bref.pack(dummy.is_present(), 1)); + HANDLE_CODE(bref.pack(dmrs_fd_occ_disabled_for_rank1_pdsch_r17_present, 1)); + HANDLE_CODE(bref.pack(minimum_sched_offset_k0_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(harq_process_num_size_dci_1_2_v1700_present, 1)); + HANDLE_CODE(bref.pack(harq_process_num_size_dci_1_1_r17_present, 1)); + HANDLE_CODE(bref.pack(mcs_table_r17_present, 1)); + HANDLE_CODE(bref.pack(mcs_table_dci_1_2_r17_present, 1)); + HANDLE_CODE(bref.pack(xoverhead_multicast_r17_present, 1)); + HANDLE_CODE(bref.pack(prio_ind_dci_4_2_r17_present, 1)); + HANDLE_CODE(bref.pack(size_dci_4_2_r17_present, 1)); + if (dl_or_joint_tci_state_list_r17.is_present()) { + HANDLE_CODE(dl_or_joint_tci_state_list_r17->pack(bref)); + } + if (beam_app_time_r17_present) { + HANDLE_CODE(beam_app_time_r17.pack(bref)); + } + if (dummy.is_present()) { + HANDLE_CODE(dummy->pack(bref)); + } + if (minimum_sched_offset_k0_r17.is_present()) { + HANDLE_CODE(minimum_sched_offset_k0_r17->pack(bref)); + } + if (harq_process_num_size_dci_1_2_v1700_present) { + HANDLE_CODE(pack_integer(bref, harq_process_num_size_dci_1_2_v1700, (uint8_t)0u, (uint8_t)5u)); + } + if (harq_process_num_size_dci_1_1_r17_present) { + HANDLE_CODE(pack_integer(bref, harq_process_num_size_dci_1_1_r17, (uint8_t)5u, (uint8_t)5u)); + } + if (xoverhead_multicast_r17_present) { + HANDLE_CODE(xoverhead_multicast_r17.pack(bref)); + } + if (size_dci_4_2_r17_present) { + HANDLE_CODE(pack_integer(bref, size_dci_4_2_r17, (uint8_t)20u, (uint8_t)140u)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pdsch_time_domain_alloc_list_for_multi_pdsch_r17.is_present(), 1)); + if (pdsch_time_domain_alloc_list_for_multi_pdsch_r17.is_present()) { + HANDLE_CODE(pdsch_time_domain_alloc_list_for_multi_pdsch_r17->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)); + bool tci_states_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(tci_states_to_add_mod_list_present, 1)); + bool tci_states_to_release_list_present; + 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)); + bool rate_match_pattern_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(rate_match_pattern_to_add_mod_list_present, 1)); + bool rate_match_pattern_to_release_list_present; + HANDLE_CODE(bref.unpack(rate_match_pattern_to_release_list_present, 1)); + bool rate_match_pattern_group1_present; + HANDLE_CODE(bref.unpack(rate_match_pattern_group1_present, 1)); + bool rate_match_pattern_group2_present; + 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)); + bool zp_csi_rs_res_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(zp_csi_rs_res_to_add_mod_list_present, 1)); + bool zp_csi_rs_res_to_release_list_present; + HANDLE_CODE(bref.unpack(zp_csi_rs_res_to_release_list_present, 1)); + bool aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present, 1)); + bool aperiodic_zp_csi_rs_res_sets_to_release_list_present; + HANDLE_CODE(bref.unpack(aperiodic_zp_csi_rs_res_sets_to_release_list_present, 1)); + bool sp_zp_csi_rs_res_sets_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(sp_zp_csi_rs_res_sets_to_add_mod_list_present, 1)); + bool sp_zp_csi_rs_res_sets_to_release_list_present; + 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)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(max_mimo_layers_r16, bref); + unpack_presence_flag(minimum_sched_offset_k0_r16, bref); + HANDLE_CODE(bref.unpack(ant_ports_field_presence_dci_1_2_r16_present, 1)); + unpack_presence_flag(aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16, bref); + unpack_presence_flag(aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16, bref); + unpack_presence_flag(dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16, bref); + unpack_presence_flag(dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16, bref); + HANDLE_CODE(bref.unpack(dmrs_seq_initization_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(harq_process_num_size_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(mcs_table_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(nof_bits_for_rv_dci_1_2_r16_present, 1)); + unpack_presence_flag(pdsch_time_domain_alloc_list_dci_1_2_r16, bref); + unpack_presence_flag(prb_bundling_type_dci_1_2_r16, bref); + HANDLE_CODE(bref.unpack(prio_ind_dci_1_2_r16_present, 1)); + unpack_presence_flag(rate_match_pattern_group1_dci_1_2_r16, bref); + unpack_presence_flag(rate_match_pattern_group2_dci_1_2_r16, bref); + HANDLE_CODE(bref.unpack(res_alloc_type1_granularity_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(vrb_to_prb_interleaver_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(ref_of_slivdci_1_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(res_alloc_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(prio_ind_dci_1_1_r16_present, 1)); + HANDLE_CODE(bref.unpack(data_scrambling_id_pdsch2_r16_present, 1)); + unpack_presence_flag(pdsch_time_domain_alloc_list_r16, bref); + unpack_presence_flag(repeat_scheme_cfg_r16, bref); + if (max_mimo_layers_r16.is_present()) { + HANDLE_CODE(max_mimo_layers_r16->unpack(bref)); + } + if (minimum_sched_offset_k0_r16.is_present()) { + HANDLE_CODE(minimum_sched_offset_k0_r16->unpack(bref)); + } + if (aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16, bref, 1, 16)); + } + if (aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of( + *aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16, bref, 1, 16, integer_packer(0, 15))); + } + if (dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16.is_present()) { + HANDLE_CODE(dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16->unpack(bref)); + } + if (dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16.is_present()) { + HANDLE_CODE(dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16->unpack(bref)); + } + if (harq_process_num_size_dci_1_2_r16_present) { + HANDLE_CODE(unpack_integer(harq_process_num_size_dci_1_2_r16, bref, (uint8_t)0u, (uint8_t)4u)); + } + if (mcs_table_dci_1_2_r16_present) { + HANDLE_CODE(mcs_table_dci_1_2_r16.unpack(bref)); + } + if (nof_bits_for_rv_dci_1_2_r16_present) { + HANDLE_CODE(unpack_integer(nof_bits_for_rv_dci_1_2_r16, bref, (uint8_t)0u, (uint8_t)2u)); + } + if (pdsch_time_domain_alloc_list_dci_1_2_r16.is_present()) { + HANDLE_CODE(pdsch_time_domain_alloc_list_dci_1_2_r16->unpack(bref)); + } + if (prb_bundling_type_dci_1_2_r16.is_present()) { + HANDLE_CODE(prb_bundling_type_dci_1_2_r16->unpack(bref)); + } + if (rate_match_pattern_group1_dci_1_2_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*rate_match_pattern_group1_dci_1_2_r16, bref, 1, 8)); + } + if (rate_match_pattern_group2_dci_1_2_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*rate_match_pattern_group2_dci_1_2_r16, bref, 1, 8)); + } + if (res_alloc_type1_granularity_dci_1_2_r16_present) { + HANDLE_CODE(res_alloc_type1_granularity_dci_1_2_r16.unpack(bref)); + } + if (vrb_to_prb_interleaver_dci_1_2_r16_present) { + HANDLE_CODE(vrb_to_prb_interleaver_dci_1_2_r16.unpack(bref)); + } + if (res_alloc_dci_1_2_r16_present) { + HANDLE_CODE(res_alloc_dci_1_2_r16.unpack(bref)); + } + if (data_scrambling_id_pdsch2_r16_present) { + HANDLE_CODE(unpack_integer(data_scrambling_id_pdsch2_r16, bref, (uint16_t)0u, (uint16_t)1023u)); + } + if (pdsch_time_domain_alloc_list_r16.is_present()) { + HANDLE_CODE(pdsch_time_domain_alloc_list_r16->unpack(bref)); + } + if (repeat_scheme_cfg_r16.is_present()) { + HANDLE_CODE(repeat_scheme_cfg_r16->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(repeat_scheme_cfg_v1630, bref); + if (repeat_scheme_cfg_v1630.is_present()) { + HANDLE_CODE(repeat_scheme_cfg_v1630->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(pdsch_harq_ack_one_shot_feedback_dci_1_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_harq_ack_enh_type3_dci_1_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_harq_ack_enh_type3_dci_field_1_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_harq_ack_retx_dci_1_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(pucch_s_scell_dyn_dci_1_2_r17_present, 1)); + unpack_presence_flag(dl_or_joint_tci_state_list_r17, bref); + HANDLE_CODE(bref.unpack(beam_app_time_r17_present, 1)); + unpack_presence_flag(dummy, bref); + HANDLE_CODE(bref.unpack(dmrs_fd_occ_disabled_for_rank1_pdsch_r17_present, 1)); + unpack_presence_flag(minimum_sched_offset_k0_r17, bref); + HANDLE_CODE(bref.unpack(harq_process_num_size_dci_1_2_v1700_present, 1)); + HANDLE_CODE(bref.unpack(harq_process_num_size_dci_1_1_r17_present, 1)); + HANDLE_CODE(bref.unpack(mcs_table_r17_present, 1)); + HANDLE_CODE(bref.unpack(mcs_table_dci_1_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(xoverhead_multicast_r17_present, 1)); + HANDLE_CODE(bref.unpack(prio_ind_dci_4_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(size_dci_4_2_r17_present, 1)); + if (dl_or_joint_tci_state_list_r17.is_present()) { + HANDLE_CODE(dl_or_joint_tci_state_list_r17->unpack(bref)); + } + if (beam_app_time_r17_present) { + HANDLE_CODE(beam_app_time_r17.unpack(bref)); + } + if (dummy.is_present()) { + HANDLE_CODE(dummy->unpack(bref)); + } + if (minimum_sched_offset_k0_r17.is_present()) { + HANDLE_CODE(minimum_sched_offset_k0_r17->unpack(bref)); + } + if (harq_process_num_size_dci_1_2_v1700_present) { + HANDLE_CODE(unpack_integer(harq_process_num_size_dci_1_2_v1700, bref, (uint8_t)0u, (uint8_t)5u)); + } + if (harq_process_num_size_dci_1_1_r17_present) { + HANDLE_CODE(unpack_integer(harq_process_num_size_dci_1_1_r17, bref, (uint8_t)5u, (uint8_t)5u)); + } + if (xoverhead_multicast_r17_present) { + HANDLE_CODE(xoverhead_multicast_r17.unpack(bref)); + } + if (size_dci_4_2_r17_present) { + HANDLE_CODE(unpack_integer(size_dci_4_2_r17, bref, (uint8_t)20u, (uint8_t)140u)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(pdsch_time_domain_alloc_list_for_multi_pdsch_r17, bref); + if (pdsch_time_domain_alloc_list_for_multi_pdsch_r17.is_present()) { + HANDLE_CODE(pdsch_time_domain_alloc_list_for_multi_pdsch_r17->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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + j.start_array("rateMatchPatternGroup1"); + for (const auto& e1 : rate_match_pattern_group1) { + e1.to_json(j); + } + j.end_array(); + } + if (rate_match_pattern_group2.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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); + } + if (ext) { + if (max_mimo_layers_r16.is_present()) { + j.write_fieldname("maxMIMO-Layers-r16"); + max_mimo_layers_r16->to_json(j); + } + if (minimum_sched_offset_k0_r16.is_present()) { + j.write_fieldname("minimumSchedulingOffsetK0-r16"); + minimum_sched_offset_k0_r16->to_json(j); + } + if (ant_ports_field_presence_dci_1_2_r16_present) { + j.write_str("antennaPortsFieldPresenceDCI-1-2-r16", "enabled"); + } + if (aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16.is_present()) { + j.start_array("aperiodicZP-CSI-RS-ResourceSetsToAddModListDCI-1-2-r16"); + for (const auto& e1 : *aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16.is_present()) { + j.start_array("aperiodicZP-CSI-RS-ResourceSetsToReleaseListDCI-1-2-r16"); + for (const auto& e1 : *aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16.is_present()) { + j.write_fieldname("dmrs-DownlinkForPDSCH-MappingTypeA-DCI-1-2-r16"); + dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16->to_json(j); + } + if (dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16.is_present()) { + j.write_fieldname("dmrs-DownlinkForPDSCH-MappingTypeB-DCI-1-2-r16"); + dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16->to_json(j); + } + if (dmrs_seq_initization_dci_1_2_r16_present) { + j.write_str("dmrs-SequenceInitializationDCI-1-2-r16", "enabled"); + } + if (harq_process_num_size_dci_1_2_r16_present) { + j.write_int("harq-ProcessNumberSizeDCI-1-2-r16", harq_process_num_size_dci_1_2_r16); + } + if (mcs_table_dci_1_2_r16_present) { + j.write_str("mcs-TableDCI-1-2-r16", mcs_table_dci_1_2_r16.to_string()); + } + if (nof_bits_for_rv_dci_1_2_r16_present) { + j.write_int("numberOfBitsForRV-DCI-1-2-r16", nof_bits_for_rv_dci_1_2_r16); + } + if (pdsch_time_domain_alloc_list_dci_1_2_r16.is_present()) { + j.write_fieldname("pdsch-TimeDomainAllocationListDCI-1-2-r16"); + pdsch_time_domain_alloc_list_dci_1_2_r16->to_json(j); + } + if (prb_bundling_type_dci_1_2_r16.is_present()) { + j.write_fieldname("prb-BundlingTypeDCI-1-2-r16"); + prb_bundling_type_dci_1_2_r16->to_json(j); + } + if (prio_ind_dci_1_2_r16_present) { + j.write_str("priorityIndicatorDCI-1-2-r16", "enabled"); + } + if (rate_match_pattern_group1_dci_1_2_r16.is_present()) { + j.start_array("rateMatchPatternGroup1DCI-1-2-r16"); + for (const auto& e1 : *rate_match_pattern_group1_dci_1_2_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (rate_match_pattern_group2_dci_1_2_r16.is_present()) { + j.start_array("rateMatchPatternGroup2DCI-1-2-r16"); + for (const auto& e1 : *rate_match_pattern_group2_dci_1_2_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (res_alloc_type1_granularity_dci_1_2_r16_present) { + j.write_str("resourceAllocationType1GranularityDCI-1-2-r16", res_alloc_type1_granularity_dci_1_2_r16.to_string()); + } + if (vrb_to_prb_interleaver_dci_1_2_r16_present) { + j.write_str("vrb-ToPRB-InterleaverDCI-1-2-r16", vrb_to_prb_interleaver_dci_1_2_r16.to_string()); + } + if (ref_of_slivdci_1_2_r16_present) { + j.write_str("referenceOfSLIVDCI-1-2-r16", "enabled"); + } + if (res_alloc_dci_1_2_r16_present) { + j.write_str("resourceAllocationDCI-1-2-r16", res_alloc_dci_1_2_r16.to_string()); + } + if (prio_ind_dci_1_1_r16_present) { + j.write_str("priorityIndicatorDCI-1-1-r16", "enabled"); + } + if (data_scrambling_id_pdsch2_r16_present) { + j.write_int("dataScramblingIdentityPDSCH2-r16", data_scrambling_id_pdsch2_r16); + } + if (pdsch_time_domain_alloc_list_r16.is_present()) { + j.write_fieldname("pdsch-TimeDomainAllocationList-r16"); + pdsch_time_domain_alloc_list_r16->to_json(j); + } + if (repeat_scheme_cfg_r16.is_present()) { + j.write_fieldname("repetitionSchemeConfig-r16"); + repeat_scheme_cfg_r16->to_json(j); + } + if (repeat_scheme_cfg_v1630.is_present()) { + j.write_fieldname("repetitionSchemeConfig-v1630"); + repeat_scheme_cfg_v1630->to_json(j); + } + if (pdsch_harq_ack_one_shot_feedback_dci_1_2_r17_present) { + j.write_str("pdsch-HARQ-ACK-OneShotFeedbackDCI-1-2-r17", "enabled"); + } + if (pdsch_harq_ack_enh_type3_dci_1_2_r17_present) { + j.write_str("pdsch-HARQ-ACK-EnhType3DCI-1-2-r17", "enabled"); + } + if (pdsch_harq_ack_enh_type3_dci_field_1_2_r17_present) { + j.write_str("pdsch-HARQ-ACK-EnhType3DCI-Field-1-2-r17", "enabled"); + } + if (pdsch_harq_ack_retx_dci_1_2_r17_present) { + j.write_str("pdsch-HARQ-ACK-RetxDCI-1-2-r17", "enabled"); + } + if (pucch_s_scell_dyn_dci_1_2_r17_present) { + j.write_str("pucch-sSCellDynDCI-1-2-r17", "enabled"); + } + if (dl_or_joint_tci_state_list_r17.is_present()) { + j.write_fieldname("dl-OrJointTCI-StateList-r17"); + dl_or_joint_tci_state_list_r17->to_json(j); + } + if (beam_app_time_r17_present) { + j.write_str("beamAppTime-r17", beam_app_time_r17.to_string()); + } + if (dummy.is_present()) { + j.write_fieldname("dummy"); + dummy->to_json(j); + } + if (dmrs_fd_occ_disabled_for_rank1_pdsch_r17_present) { + j.write_str("dmrs-FD-OCC-DisabledForRank1-PDSCH-r17", "true"); + } + if (minimum_sched_offset_k0_r17.is_present()) { + j.write_fieldname("minimumSchedulingOffsetK0-r17"); + minimum_sched_offset_k0_r17->to_json(j); + } + if (harq_process_num_size_dci_1_2_v1700_present) { + j.write_int("harq-ProcessNumberSizeDCI-1-2-v1700", harq_process_num_size_dci_1_2_v1700); + } + if (harq_process_num_size_dci_1_1_r17_present) { + j.write_int("harq-ProcessNumberSizeDCI-1-1-r17", harq_process_num_size_dci_1_1_r17); + } + if (mcs_table_r17_present) { + j.write_str("mcs-Table-r17", "qam1024"); + } + if (mcs_table_dci_1_2_r17_present) { + j.write_str("mcs-TableDCI-1-2-r17", "qam1024"); + } + if (xoverhead_multicast_r17_present) { + j.write_str("xOverheadMulticast-r17", xoverhead_multicast_r17.to_string()); + } + if (prio_ind_dci_4_2_r17_present) { + j.write_str("priorityIndicatorDCI-4-2-r17", "enabled"); + } + if (size_dci_4_2_r17_present) { + j.write_int("sizeDCI-4-2-r17", size_dci_4_2_r17); + } + if (pdsch_time_domain_alloc_list_for_multi_pdsch_r17.is_present()) { + j.write_fieldname("pdsch-TimeDomainAllocationListForMultiPDSCH-r17"); + pdsch_time_domain_alloc_list_for_multi_pdsch_r17->to_json(j); + } + } + j.end_obj(); +} + +const char* pdsch_cfg_s::vrb_to_prb_interleaver_opts::to_string() const +{ + static const char* names[] = {"n2", "n4"}; + return convert_enum_idx(names, 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 numbers[] = {2, 4}; + return map_enum_number(numbers, 2, value, "pdsch_cfg_s::vrb_to_prb_interleaver_e_"); +} + +const char* pdsch_cfg_s::res_alloc_opts::to_string() const +{ + static const char* names[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; + return convert_enum_idx(names, 3, value, "pdsch_cfg_s::res_alloc_e_"); +} +uint8_t pdsch_cfg_s::res_alloc_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "pdsch_cfg_s::res_alloc_e_"); +} + +const char* pdsch_cfg_s::pdsch_aggregation_factor_opts::to_string() const +{ + static const char* names[] = {"n2", "n4", "n8"}; + return convert_enum_idx(names, 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 numbers[] = {2, 4, 8}; + return map_enum_number(numbers, 3, value, "pdsch_cfg_s::pdsch_aggregation_factor_e_"); +} + +const char* pdsch_cfg_s::rbg_size_opts::to_string() const +{ + static const char* names[] = {"config1", "config2"}; + return convert_enum_idx(names, 2, value, "pdsch_cfg_s::rbg_size_e_"); +} +uint8_t pdsch_cfg_s::rbg_size_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "pdsch_cfg_s::rbg_size_e_"); +} + +const char* pdsch_cfg_s::mcs_table_opts::to_string() const +{ + static const char* names[] = {"qam256", "qam64LowSE"}; + return convert_enum_idx(names, 2, value, "pdsch_cfg_s::mcs_table_e_"); +} +uint16_t pdsch_cfg_s::mcs_table_opts::to_number() const +{ + static const uint16_t numbers[] = {256, 64}; + return map_enum_number(numbers, 2, value, "pdsch_cfg_s::mcs_table_e_"); +} + +const char* pdsch_cfg_s::max_nrof_code_words_sched_by_dci_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, 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 numbers[] = {1, 2}; + return map_enum_number(numbers, 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::dyn_bundling: + c.destroy(); + break; + default: + break; + } +} +void pdsch_cfg_s::prb_bundling_type_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::static_bundling: + c.init(); + break; + case types::dyn_bundling: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); + } +} +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::static_bundling: + c.init(other.c.get()); + break; + case types::dyn_bundling: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_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) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::static_bundling: + c.set(other.c.get()); + break; + case types::dyn_bundling: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); + } + + return *this; +} +pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_& pdsch_cfg_s::prb_bundling_type_c_::set_static_bundling() +{ + set(types::static_bundling); + return c.get(); +} +pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_& pdsch_cfg_s::prb_bundling_type_c_::set_dyn_bundling() +{ + set(types::dyn_bundling); + return c.get(); +} +void pdsch_cfg_s::prb_bundling_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(); + break; + case types::dyn_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_, "pdsch_cfg_s::prb_bundling_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdsch_cfg_s::prb_bundling_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)); + } + break; + case types::dyn_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; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_s::prb_bundling_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)); + } + break; + case types::dyn_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; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_opts::to_string() const +{ + static const char* names[] = {"n4", "wideband"}; + return convert_enum_idx(names, 2, value, "pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_e_"); +} +uint8_t pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_opts::to_number() const +{ + static const uint8_t numbers[] = {4}; + return map_enum_number(numbers, 1, value, "pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_e_"); +} + +const char* pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_::bundle_size_set1_opts::to_string() const +{ + static const char* names[] = {"n4", "wideband", "n2-wideband", "n4-wideband"}; + return convert_enum_idx(names, 4, value, "pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_::bundle_size_set1_e_"); +} + +const char* pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_::bundle_size_set2_opts::to_string() const +{ + static const char* names[] = {"n4", "wideband"}; + return convert_enum_idx(names, 2, value, "pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_::bundle_size_set2_e_"); +} +uint8_t pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_::bundle_size_set2_opts::to_number() const +{ + static const uint8_t numbers[] = {4}; + return map_enum_number(numbers, 1, value, "pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_::bundle_size_set2_e_"); +} + +const char* pdsch_cfg_s::prb_bundling_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"staticBundling", "dynamicBundling"}; + return convert_enum_idx(names, 2, value, "pdsch_cfg_s::prb_bundling_type_c_::types"); +} + +const char* pdsch_cfg_s::mcs_table_dci_1_2_r16_opts::to_string() const +{ + static const char* names[] = {"qam256", "qam64LowSE"}; + return convert_enum_idx(names, 2, value, "pdsch_cfg_s::mcs_table_dci_1_2_r16_e_"); +} +uint16_t pdsch_cfg_s::mcs_table_dci_1_2_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {256, 64}; + return map_enum_number(numbers, 2, value, "pdsch_cfg_s::mcs_table_dci_1_2_r16_e_"); +} + +void pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::destroy_() +{ + switch (type_) { + case types::static_bundling_r16: + c.destroy(); + break; + case types::dyn_bundling_r16: + c.destroy(); + break; + default: + break; + } +} +void pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::static_bundling_r16: + c.init(); + break; + case types::dyn_bundling_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_"); + } +} +pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::prb_bundling_type_dci_1_2_r16_c_( + const pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::static_bundling_r16: + c.init(other.c.get()); + break; + case types::dyn_bundling_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_"); + } +} +pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_& +pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::operator=(const pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::static_bundling_r16: + c.set(other.c.get()); + break; + case types::dyn_bundling_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_"); + } + + return *this; +} +pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::static_bundling_r16_s_& +pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::set_static_bundling_r16() +{ + set(types::static_bundling_r16); + return c.get(); +} +pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_& +pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::set_dyn_bundling_r16() +{ + set(types::dyn_bundling_r16); + return c.get(); +} +void pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::static_bundling_r16: + j.write_fieldname("staticBundling-r16"); + j.start_obj(); + if (c.get().bundle_size_r16_present) { + j.write_str("bundleSize-r16", c.get().bundle_size_r16.to_string()); + } + j.end_obj(); + break; + case types::dyn_bundling_r16: + j.write_fieldname("dynamicBundling-r16"); + j.start_obj(); + if (c.get().bundle_size_set1_r16_present) { + j.write_str("bundleSizeSet1-r16", c.get().bundle_size_set1_r16.to_string()); + } + if (c.get().bundle_size_set2_r16_present) { + j.write_str("bundleSizeSet2-r16", c.get().bundle_size_set2_r16.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::static_bundling_r16: + HANDLE_CODE(bref.pack(c.get().bundle_size_r16_present, 1)); + if (c.get().bundle_size_r16_present) { + HANDLE_CODE(c.get().bundle_size_r16.pack(bref)); + } + break; + case types::dyn_bundling_r16: + HANDLE_CODE(bref.pack(c.get().bundle_size_set1_r16_present, 1)); + HANDLE_CODE(bref.pack(c.get().bundle_size_set2_r16_present, 1)); + if (c.get().bundle_size_set1_r16_present) { + HANDLE_CODE(c.get().bundle_size_set1_r16.pack(bref)); + } + if (c.get().bundle_size_set2_r16_present) { + HANDLE_CODE(c.get().bundle_size_set2_r16.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::static_bundling_r16: + HANDLE_CODE(bref.unpack(c.get().bundle_size_r16_present, 1)); + if (c.get().bundle_size_r16_present) { + HANDLE_CODE(c.get().bundle_size_r16.unpack(bref)); + } + break; + case types::dyn_bundling_r16: + HANDLE_CODE(bref.unpack(c.get().bundle_size_set1_r16_present, 1)); + HANDLE_CODE(bref.unpack(c.get().bundle_size_set2_r16_present, 1)); + if (c.get().bundle_size_set1_r16_present) { + HANDLE_CODE(c.get().bundle_size_set1_r16.unpack(bref)); + } + if (c.get().bundle_size_set2_r16_present) { + HANDLE_CODE(c.get().bundle_size_set2_r16.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* +pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::static_bundling_r16_s_::bundle_size_r16_opts::to_string() const +{ + static const char* names[] = {"n4", "wideband"}; + return convert_enum_idx( + names, 2, value, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::static_bundling_r16_s_::bundle_size_r16_e_"); +} +uint8_t pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::static_bundling_r16_s_::bundle_size_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {4}; + return map_enum_number( + numbers, 1, value, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::static_bundling_r16_s_::bundle_size_r16_e_"); +} + +const char* +pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_::bundle_size_set1_r16_opts::to_string() const +{ + static const char* names[] = {"n4", "wideband", "n2-wideband", "n4-wideband"}; + return convert_enum_idx( + names, 4, value, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_::bundle_size_set1_r16_e_"); +} + +const char* +pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_::bundle_size_set2_r16_opts::to_string() const +{ + static const char* names[] = {"n4", "wideband"}; + return convert_enum_idx( + names, 2, value, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_::bundle_size_set2_r16_e_"); +} +uint8_t pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_::bundle_size_set2_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {4}; + return map_enum_number( + numbers, 1, value, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_::bundle_size_set2_r16_e_"); +} + +const char* pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"staticBundling-r16", "dynamicBundling-r16"}; + return convert_enum_idx(names, 2, value, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::types"); +} + +const char* pdsch_cfg_s::res_alloc_type1_granularity_dci_1_2_r16_opts::to_string() const +{ + static const char* names[] = {"n2", "n4", "n8", "n16"}; + return convert_enum_idx(names, 4, value, "pdsch_cfg_s::res_alloc_type1_granularity_dci_1_2_r16_e_"); +} +uint8_t pdsch_cfg_s::res_alloc_type1_granularity_dci_1_2_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 8, 16}; + return map_enum_number(numbers, 4, value, "pdsch_cfg_s::res_alloc_type1_granularity_dci_1_2_r16_e_"); +} + +const char* pdsch_cfg_s::vrb_to_prb_interleaver_dci_1_2_r16_opts::to_string() const +{ + static const char* names[] = {"n2", "n4"}; + return convert_enum_idx(names, 2, value, "pdsch_cfg_s::vrb_to_prb_interleaver_dci_1_2_r16_e_"); +} +uint8_t pdsch_cfg_s::vrb_to_prb_interleaver_dci_1_2_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4}; + return map_enum_number(numbers, 2, value, "pdsch_cfg_s::vrb_to_prb_interleaver_dci_1_2_r16_e_"); +} + +const char* pdsch_cfg_s::res_alloc_dci_1_2_r16_opts::to_string() const +{ + static const char* names[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; + return convert_enum_idx(names, 3, value, "pdsch_cfg_s::res_alloc_dci_1_2_r16_e_"); +} +uint8_t pdsch_cfg_s::res_alloc_dci_1_2_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "pdsch_cfg_s::res_alloc_dci_1_2_r16_e_"); +} + +void pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::destroy_() +{ + switch (type_) { + case types::explicitlist: + c.destroy(); + break; + case types::unified_tci_state_ref_r17: + c.destroy(); + break; + default: + break; + } +} +void pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::explicitlist: + c.init(); + break; + case types::unified_tci_state_ref_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_"); + } +} +pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::dl_or_joint_tci_state_list_r17_c_( + const pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::explicitlist: + c.init(other.c.get()); + break; + case types::unified_tci_state_ref_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_"); + } +} +pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_& +pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::operator=(const pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::explicitlist: + c.set(other.c.get()); + break; + case types::unified_tci_state_ref_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_"); + } + + return *this; +} +pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::explicitlist_s_& +pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::set_explicitlist() +{ + set(types::explicitlist); + return c.get(); +} +serving_cell_and_bwp_id_r17_s& pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::set_unified_tci_state_ref_r17() +{ + set(types::unified_tci_state_ref_r17); + return c.get(); +} +void pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::explicitlist: + j.write_fieldname("explicitlist"); + j.start_obj(); + if (c.get().dl_or_joint_tci_state_to_add_mod_list_r17.size() > 0) { + j.start_array("dl-OrJointTCI-StateToAddModList-r17"); + for (const auto& e1 : c.get().dl_or_joint_tci_state_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (c.get().dl_or_joint_tci_state_to_release_list_r17.size() > 0) { + j.start_array("dl-OrJointTCI-StateToReleaseList-r17"); + for (const auto& e1 : c.get().dl_or_joint_tci_state_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); + break; + case types::unified_tci_state_ref_r17: + j.write_fieldname("unifiedTCI-StateRef-r17"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::explicitlist: + HANDLE_CODE(bref.pack(c.get().dl_or_joint_tci_state_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(c.get().dl_or_joint_tci_state_to_release_list_r17.size() > 0, 1)); + if (c.get().dl_or_joint_tci_state_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().dl_or_joint_tci_state_to_add_mod_list_r17, 1, 128)); + } + if (c.get().dl_or_joint_tci_state_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, + c.get().dl_or_joint_tci_state_to_release_list_r17, + 1, + 128, + integer_packer(0, 127))); + } + break; + case types::unified_tci_state_ref_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::explicitlist: + bool dl_or_joint_tci_state_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(dl_or_joint_tci_state_to_add_mod_list_r17_present, 1)); + bool dl_or_joint_tci_state_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(dl_or_joint_tci_state_to_release_list_r17_present, 1)); + if (dl_or_joint_tci_state_to_add_mod_list_r17_present) { + HANDLE_CODE( + unpack_dyn_seq_of(c.get().dl_or_joint_tci_state_to_add_mod_list_r17, bref, 1, 128)); + } + if (dl_or_joint_tci_state_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.get().dl_or_joint_tci_state_to_release_list_r17, + bref, + 1, + 128, + integer_packer(0, 127))); + } + break; + case types::unified_tci_state_ref_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"explicitlist", "unifiedTCI-StateRef-r17"}; + return convert_enum_idx(names, 2, value, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::types"); +} + +const char* pdsch_cfg_s::beam_app_time_r17_opts::to_string() const +{ + static const char* names[] = {"n1", + "n2", + "n4", + "n7", + "n14", + "n28", + "n42", + "n56", + "n70", + "n84", + "n98", + "n112", + "n224", + "n336", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "pdsch_cfg_s::beam_app_time_r17_e_"); +} +uint16_t pdsch_cfg_s::beam_app_time_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {1, 2, 4, 7, 14, 28, 42, 56, 70, 84, 98, 112, 224, 336}; + return map_enum_number(numbers, 14, value, "pdsch_cfg_s::beam_app_time_r17_e_"); +} + +const char* pdsch_cfg_s::xoverhead_multicast_r17_opts::to_string() const +{ + static const char* names[] = {"xOh6", "xOh12", "xOh18"}; + return convert_enum_idx(names, 3, value, "pdsch_cfg_s::xoverhead_multicast_r17_e_"); +} +uint8_t pdsch_cfg_s::xoverhead_multicast_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {6, 12, 18}; + return map_enum_number(numbers, 3, value, "pdsch_cfg_s::xoverhead_multicast_r17_e_"); +} + +// RadioLinkMonitoringRS ::= SEQUENCE +SRSASN_CODE radio_link_monitoring_rs_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)); + + 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)); + + 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(); +} + +const char* radio_link_monitoring_rs_s::purpose_opts::to_string() const +{ + static const char* names[] = {"beamFailure", "rlf", "both"}; + return convert_enum_idx(names, 3, value, "radio_link_monitoring_rs_s::purpose_e_"); +} + +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_"); + } + + return *this; +} +uint8_t& radio_link_monitoring_rs_s::detection_res_c_::set_ssb_idx() +{ + set(types::ssb_idx); + return c.get(); +} +uint8_t& radio_link_monitoring_rs_s::detection_res_c_::set_csi_rs_idx() +{ + set(types::csi_rs_idx); + return c.get(); +} +void radio_link_monitoring_rs_s::detection_res_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()); + 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; + } + 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; + } + return SRSASN_SUCCESS; +} + +const char* radio_link_monitoring_rs_s::detection_res_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-Index", "csi-RS-Index"}; + return convert_enum_idx(names, 2, value, "radio_link_monitoring_rs_s::detection_res_c_::types"); +} + +// BeamFailureRecoveryRSConfig-r16 ::= SEQUENCE +SRSASN_CODE beam_fail_recovery_rs_cfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rsrp_thres_bfr_r16_present, 1)); + HANDLE_CODE(bref.pack(candidate_beam_rs_list_r16.size() > 0, 1)); + + if (rsrp_thres_bfr_r16_present) { + HANDLE_CODE(pack_integer(bref, rsrp_thres_bfr_r16, (uint8_t)0u, (uint8_t)127u)); + } + if (candidate_beam_rs_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, candidate_beam_rs_list_r16, 1, 64)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= candidate_beam_rs_list2_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(candidate_beam_rs_list2_r17.is_present(), 1)); + if (candidate_beam_rs_list2_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *candidate_beam_rs_list2_r17, 1, 64)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE beam_fail_recovery_rs_cfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rsrp_thres_bfr_r16_present, 1)); + bool candidate_beam_rs_list_r16_present; + HANDLE_CODE(bref.unpack(candidate_beam_rs_list_r16_present, 1)); + + if (rsrp_thres_bfr_r16_present) { + HANDLE_CODE(unpack_integer(rsrp_thres_bfr_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (candidate_beam_rs_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(candidate_beam_rs_list_r16, bref, 1, 64)); + } + + 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); + + unpack_presence_flag(candidate_beam_rs_list2_r17, bref); + if (candidate_beam_rs_list2_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*candidate_beam_rs_list2_r17, bref, 1, 64)); + } + } + } + return SRSASN_SUCCESS; +} +void beam_fail_recovery_rs_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rsrp_thres_bfr_r16_present) { + j.write_int("rsrp-ThresholdBFR-r16", rsrp_thres_bfr_r16); + } + if (candidate_beam_rs_list_r16.size() > 0) { + j.start_array("candidateBeamRS-List-r16"); + for (const auto& e1 : candidate_beam_rs_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (ext) { + if (candidate_beam_rs_list2_r17.is_present()) { + j.start_array("candidateBeamRS-List2-r17"); + for (const auto& e1 : *candidate_beam_rs_list2_r17) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +// CFR-ConfigMulticast-r17 ::= SEQUENCE +SRSASN_CODE cfr_cfg_multicast_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(location_and_bw_multicast_r17_present, 1)); + HANDLE_CODE(bref.pack(pdcch_cfg_multicast_r17_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_multicast_r17_present, 1)); + HANDLE_CODE(bref.pack(sps_cfg_multicast_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(sps_cfg_multicast_to_release_list_r17.size() > 0, 1)); + + if (location_and_bw_multicast_r17_present) { + HANDLE_CODE(pack_integer(bref, location_and_bw_multicast_r17, (uint16_t)0u, (uint16_t)37949u)); + } + if (pdcch_cfg_multicast_r17_present) { + HANDLE_CODE(pdcch_cfg_multicast_r17.pack(bref)); + } + if (pdsch_cfg_multicast_r17_present) { + HANDLE_CODE(pdsch_cfg_multicast_r17.pack(bref)); + } + if (sps_cfg_multicast_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sps_cfg_multicast_to_add_mod_list_r17, 1, 8)); + } + if (sps_cfg_multicast_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sps_cfg_multicast_to_release_list_r17, 1, 8, integer_packer(0, 7))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cfr_cfg_multicast_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(location_and_bw_multicast_r17_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_cfg_multicast_r17_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_multicast_r17_present, 1)); + bool sps_cfg_multicast_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(sps_cfg_multicast_to_add_mod_list_r17_present, 1)); + bool sps_cfg_multicast_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(sps_cfg_multicast_to_release_list_r17_present, 1)); + + if (location_and_bw_multicast_r17_present) { + HANDLE_CODE(unpack_integer(location_and_bw_multicast_r17, bref, (uint16_t)0u, (uint16_t)37949u)); + } + if (pdcch_cfg_multicast_r17_present) { + HANDLE_CODE(pdcch_cfg_multicast_r17.unpack(bref)); + } + if (pdsch_cfg_multicast_r17_present) { + HANDLE_CODE(pdsch_cfg_multicast_r17.unpack(bref)); + } + if (sps_cfg_multicast_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sps_cfg_multicast_to_add_mod_list_r17, bref, 1, 8)); + } + if (sps_cfg_multicast_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sps_cfg_multicast_to_release_list_r17, bref, 1, 8, integer_packer(0, 7))); + } + + return SRSASN_SUCCESS; +} +void cfr_cfg_multicast_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (location_and_bw_multicast_r17_present) { + j.write_int("locationAndBandwidthMulticast-r17", location_and_bw_multicast_r17); + } + if (pdcch_cfg_multicast_r17_present) { + j.write_fieldname("pdcch-ConfigMulticast-r17"); + pdcch_cfg_multicast_r17.to_json(j); + } + if (pdsch_cfg_multicast_r17_present) { + j.write_fieldname("pdsch-ConfigMulticast-r17"); + pdsch_cfg_multicast_r17.to_json(j); + } + if (sps_cfg_multicast_to_add_mod_list_r17.size() > 0) { + j.start_array("sps-ConfigMulticastToAddModList-r17"); + for (const auto& e1 : sps_cfg_multicast_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (sps_cfg_multicast_to_release_list_r17.size() > 0) { + j.start_array("sps-ConfigMulticastToReleaseList-r17"); + for (const auto& e1 : sps_cfg_multicast_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} + +// RadioLinkMonitoringConfig ::= SEQUENCE +SRSASN_CODE radio_link_monitoring_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(fail_detection_res_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(fail_detection_res_to_release_list.size() > 0, 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, fail_detection_res_to_add_mod_list, 1, 10)); + } + if (fail_detection_res_to_release_list.size() > 0) { + 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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= beam_fail_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(beam_fail_r17.is_present(), 1)); + if (beam_fail_r17.is_present()) { + HANDLE_CODE(beam_fail_r17->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE radio_link_monitoring_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool fail_detection_res_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(fail_detection_res_to_add_mod_list_present, 1)); + bool fail_detection_res_to_release_list_present; + 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)); + } + + 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); + + unpack_presence_flag(beam_fail_r17, bref); + if (beam_fail_r17.is_present()) { + HANDLE_CODE(beam_fail_r17->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void radio_link_monitoring_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fail_detection_res_to_add_mod_list.size() > 0) { + 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.size() > 0) { + 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()); + } + if (ext) { + if (beam_fail_r17.is_present()) { + j.write_fieldname("beamFailure-r17"); + beam_fail_r17->to_json(j); + } + } + j.end_obj(); +} + +const char* radio_link_monitoring_cfg_s::beam_fail_instance_max_count_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; + return convert_enum_idx(names, 8, value, "radio_link_monitoring_cfg_s::beam_fail_instance_max_count_e_"); +} +uint8_t radio_link_monitoring_cfg_s::beam_fail_instance_max_count_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return map_enum_number(numbers, 8, value, "radio_link_monitoring_cfg_s::beam_fail_instance_max_count_e_"); +} + +const char* radio_link_monitoring_cfg_s::beam_fail_detection_timer_opts::to_string() const +{ + static const char* names[] = {"pbfd1", "pbfd2", "pbfd3", "pbfd4", "pbfd5", "pbfd6", "pbfd8", "pbfd10"}; + return convert_enum_idx(names, 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 numbers[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return map_enum_number(numbers, 8, value, "radio_link_monitoring_cfg_s::beam_fail_detection_timer_e_"); +} + +// BWP-DownlinkDedicated ::= SEQUENCE +SRSASN_CODE bwp_dl_ded_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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= sps_cfg_to_add_mod_list_r16.is_present(); + group_flags[0] |= sps_cfg_to_release_list_r16.is_present(); + group_flags[0] |= sps_cfg_deactivation_state_list_r16.is_present(); + group_flags[0] |= beam_fail_recovery_scell_cfg_r16.is_present(); + group_flags[0] |= sl_pdcch_cfg_r16.is_present(); + group_flags[0] |= sl_v2x_pdcch_cfg_r16.is_present(); + group_flags[1] |= pre_conf_gap_status_r17_present; + group_flags[1] |= beam_fail_recovery_sp_cell_cfg_r17.is_present(); + group_flags[1] |= harq_feedback_enablingfor_sp_sactive_r17_present; + group_flags[1] |= cfr_cfg_multicast_r17.is_present(); + group_flags[1] |= dl_ppw_pre_cfg_to_add_mod_list_r17.is_present(); + group_flags[1] |= dl_ppw_pre_cfg_to_release_list_r17.is_present(); + group_flags[1] |= non_cell_defining_ssb_r17.is_present(); + group_flags[1] |= serving_cell_mo_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sps_cfg_to_add_mod_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(sps_cfg_to_release_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(sps_cfg_deactivation_state_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(beam_fail_recovery_scell_cfg_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(sl_pdcch_cfg_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(sl_v2x_pdcch_cfg_r16.is_present(), 1)); + if (sps_cfg_to_add_mod_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *sps_cfg_to_add_mod_list_r16, 1, 8)); + } + if (sps_cfg_to_release_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *sps_cfg_to_release_list_r16, 1, 8, integer_packer(0, 7))); + } + if (sps_cfg_deactivation_state_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, + *sps_cfg_deactivation_state_list_r16, + 1, + 16, + SeqOfPacker>(1, 8, integer_packer(0, 7)))); + } + if (beam_fail_recovery_scell_cfg_r16.is_present()) { + HANDLE_CODE(beam_fail_recovery_scell_cfg_r16->pack(bref)); + } + if (sl_pdcch_cfg_r16.is_present()) { + HANDLE_CODE(sl_pdcch_cfg_r16->pack(bref)); + } + if (sl_v2x_pdcch_cfg_r16.is_present()) { + HANDLE_CODE(sl_v2x_pdcch_cfg_r16->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pre_conf_gap_status_r17_present, 1)); + HANDLE_CODE(bref.pack(beam_fail_recovery_sp_cell_cfg_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(harq_feedback_enablingfor_sp_sactive_r17_present, 1)); + HANDLE_CODE(bref.pack(cfr_cfg_multicast_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(dl_ppw_pre_cfg_to_add_mod_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(dl_ppw_pre_cfg_to_release_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(non_cell_defining_ssb_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(serving_cell_mo_r17_present, 1)); + if (pre_conf_gap_status_r17_present) { + HANDLE_CODE(pre_conf_gap_status_r17.pack(bref)); + } + if (beam_fail_recovery_sp_cell_cfg_r17.is_present()) { + HANDLE_CODE(beam_fail_recovery_sp_cell_cfg_r17->pack(bref)); + } + if (harq_feedback_enablingfor_sp_sactive_r17_present) { + HANDLE_CODE(bref.pack(harq_feedback_enablingfor_sp_sactive_r17, 1)); + } + if (cfr_cfg_multicast_r17.is_present()) { + HANDLE_CODE(cfr_cfg_multicast_r17->pack(bref)); + } + if (dl_ppw_pre_cfg_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *dl_ppw_pre_cfg_to_add_mod_list_r17, 1, 4)); + } + if (dl_ppw_pre_cfg_to_release_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *dl_ppw_pre_cfg_to_release_list_r17, 1, 4, integer_packer(0, 15))); + } + if (non_cell_defining_ssb_r17.is_present()) { + HANDLE_CODE(non_cell_defining_ssb_r17->pack(bref)); + } + if (serving_cell_mo_r17_present) { + HANDLE_CODE(pack_integer(bref, serving_cell_mo_r17, (uint8_t)1u, (uint8_t)64u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE bwp_dl_ded_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)); + } + + 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); + + unpack_presence_flag(sps_cfg_to_add_mod_list_r16, bref); + unpack_presence_flag(sps_cfg_to_release_list_r16, bref); + unpack_presence_flag(sps_cfg_deactivation_state_list_r16, bref); + unpack_presence_flag(beam_fail_recovery_scell_cfg_r16, bref); + unpack_presence_flag(sl_pdcch_cfg_r16, bref); + unpack_presence_flag(sl_v2x_pdcch_cfg_r16, bref); + if (sps_cfg_to_add_mod_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*sps_cfg_to_add_mod_list_r16, bref, 1, 8)); + } + if (sps_cfg_to_release_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*sps_cfg_to_release_list_r16, bref, 1, 8, integer_packer(0, 7))); + } + if (sps_cfg_deactivation_state_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*sps_cfg_deactivation_state_list_r16, + bref, + 1, + 16, + SeqOfPacker>(1, 8, integer_packer(0, 7)))); + } + if (beam_fail_recovery_scell_cfg_r16.is_present()) { + HANDLE_CODE(beam_fail_recovery_scell_cfg_r16->unpack(bref)); + } + if (sl_pdcch_cfg_r16.is_present()) { + HANDLE_CODE(sl_pdcch_cfg_r16->unpack(bref)); + } + if (sl_v2x_pdcch_cfg_r16.is_present()) { + HANDLE_CODE(sl_v2x_pdcch_cfg_r16->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(pre_conf_gap_status_r17_present, 1)); + unpack_presence_flag(beam_fail_recovery_sp_cell_cfg_r17, bref); + HANDLE_CODE(bref.unpack(harq_feedback_enablingfor_sp_sactive_r17_present, 1)); + unpack_presence_flag(cfr_cfg_multicast_r17, bref); + unpack_presence_flag(dl_ppw_pre_cfg_to_add_mod_list_r17, bref); + unpack_presence_flag(dl_ppw_pre_cfg_to_release_list_r17, bref); + unpack_presence_flag(non_cell_defining_ssb_r17, bref); + HANDLE_CODE(bref.unpack(serving_cell_mo_r17_present, 1)); + if (pre_conf_gap_status_r17_present) { + HANDLE_CODE(pre_conf_gap_status_r17.unpack(bref)); + } + if (beam_fail_recovery_sp_cell_cfg_r17.is_present()) { + HANDLE_CODE(beam_fail_recovery_sp_cell_cfg_r17->unpack(bref)); + } + if (harq_feedback_enablingfor_sp_sactive_r17_present) { + HANDLE_CODE(bref.unpack(harq_feedback_enablingfor_sp_sactive_r17, 1)); + } + if (cfr_cfg_multicast_r17.is_present()) { + HANDLE_CODE(cfr_cfg_multicast_r17->unpack(bref)); + } + if (dl_ppw_pre_cfg_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*dl_ppw_pre_cfg_to_add_mod_list_r17, bref, 1, 4)); + } + if (dl_ppw_pre_cfg_to_release_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*dl_ppw_pre_cfg_to_release_list_r17, bref, 1, 4, integer_packer(0, 15))); + } + if (non_cell_defining_ssb_r17.is_present()) { + HANDLE_CODE(non_cell_defining_ssb_r17->unpack(bref)); + } + if (serving_cell_mo_r17_present) { + HANDLE_CODE(unpack_integer(serving_cell_mo_r17, bref, (uint8_t)1u, (uint8_t)64u)); + } + } + } + return SRSASN_SUCCESS; +} +void bwp_dl_ded_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); + } + if (ext) { + if (sps_cfg_to_add_mod_list_r16.is_present()) { + j.start_array("sps-ConfigToAddModList-r16"); + for (const auto& e1 : *sps_cfg_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sps_cfg_to_release_list_r16.is_present()) { + j.start_array("sps-ConfigToReleaseList-r16"); + for (const auto& e1 : *sps_cfg_to_release_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sps_cfg_deactivation_state_list_r16.is_present()) { + j.start_array("sps-ConfigDeactivationStateList-r16"); + for (const auto& e1 : *sps_cfg_deactivation_state_list_r16) { + j.start_array(); + for (const auto& e2 : e1) { + j.write_int(e2); + } + j.end_array(); + } + j.end_array(); + } + if (beam_fail_recovery_scell_cfg_r16.is_present()) { + j.write_fieldname("beamFailureRecoverySCellConfig-r16"); + beam_fail_recovery_scell_cfg_r16->to_json(j); + } + if (sl_pdcch_cfg_r16.is_present()) { + j.write_fieldname("sl-PDCCH-Config-r16"); + sl_pdcch_cfg_r16->to_json(j); + } + if (sl_v2x_pdcch_cfg_r16.is_present()) { + j.write_fieldname("sl-V2X-PDCCH-Config-r16"); + sl_v2x_pdcch_cfg_r16->to_json(j); + } + if (pre_conf_gap_status_r17_present) { + j.write_str("preConfGapStatus-r17", pre_conf_gap_status_r17.to_string()); + } + if (beam_fail_recovery_sp_cell_cfg_r17.is_present()) { + j.write_fieldname("beamFailureRecoverySpCellConfig-r17"); + beam_fail_recovery_sp_cell_cfg_r17->to_json(j); + } + if (harq_feedback_enablingfor_sp_sactive_r17_present) { + j.write_bool("harq-FeedbackEnablingforSPSactive-r17", harq_feedback_enablingfor_sp_sactive_r17); + } + if (cfr_cfg_multicast_r17.is_present()) { + j.write_fieldname("cfr-ConfigMulticast-r17"); + cfr_cfg_multicast_r17->to_json(j); + } + if (dl_ppw_pre_cfg_to_add_mod_list_r17.is_present()) { + j.start_array("dl-PPW-PreConfigToAddModList-r17"); + for (const auto& e1 : *dl_ppw_pre_cfg_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (dl_ppw_pre_cfg_to_release_list_r17.is_present()) { + j.start_array("dl-PPW-PreConfigToReleaseList-r17"); + for (const auto& e1 : *dl_ppw_pre_cfg_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (non_cell_defining_ssb_r17.is_present()) { + j.write_fieldname("nonCellDefiningSSB-r17"); + non_cell_defining_ssb_r17->to_json(j); + } + if (serving_cell_mo_r17_present) { + j.write_int("servingCellMO-r17", serving_cell_mo_r17); + } + } + j.end_obj(); +} + +// BWP-Downlink ::= SEQUENCE +SRSASN_CODE bwp_dl_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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE bwp_dl_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)); + } + + return SRSASN_SUCCESS; +} +void bwp_dl_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.end_obj(); +} + +// BWP-DownlinkDedicatedSDT-r17 ::= SEQUENCE +SRSASN_CODE bwp_dl_ded_sdt_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pdcch_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_r17_present, 1)); + + if (pdcch_cfg_r17_present) { + HANDLE_CODE(pdcch_cfg_r17.pack(bref)); + } + if (pdsch_cfg_r17_present) { + HANDLE_CODE(pdsch_cfg_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE bwp_dl_ded_sdt_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pdcch_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_r17_present, 1)); + + if (pdcch_cfg_r17_present) { + HANDLE_CODE(pdcch_cfg_r17.unpack(bref)); + } + if (pdsch_cfg_r17_present) { + HANDLE_CODE(pdsch_cfg_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void bwp_dl_ded_sdt_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pdcch_cfg_r17_present) { + j.write_fieldname("pdcch-Config-r17"); + pdcch_cfg_r17.to_json(j); + } + if (pdsch_cfg_r17_present) { + j.write_fieldname("pdsch-Config-r17"); + pdsch_cfg_r17.to_json(j); + } + j.end_obj(); +} + +// PUCCH-PathlossReferenceRS-r16 ::= SEQUENCE +SRSASN_CODE pucch_pathloss_ref_rs_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pucch_pathloss_ref_rs_id_r16, (uint8_t)4u, (uint8_t)63u)); + HANDLE_CODE(ref_sig_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_pathloss_ref_rs_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pucch_pathloss_ref_rs_id_r16, bref, (uint8_t)4u, (uint8_t)63u)); + HANDLE_CODE(ref_sig_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pucch_pathloss_ref_rs_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("pucch-PathlossReferenceRS-Id-r16", pucch_pathloss_ref_rs_id_r16); + j.write_fieldname("referenceSignal-r16"); + ref_sig_r16.to_json(j); + j.end_obj(); +} + +void pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::destroy_() {} +void pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::ref_sig_r16_c_(const pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ssb_idx_r16: + c.init(other.c.get()); + break; + case types::csi_rs_idx_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); + } +} +pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_& +pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::operator=(const pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ssb_idx_r16: + c.set(other.c.get()); + break; + case types::csi_rs_idx_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); + } + + return *this; +} +uint8_t& pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::set_ssb_idx_r16() +{ + set(types::ssb_idx_r16); + return c.get(); +} +uint8_t& pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::set_csi_rs_idx_r16() +{ + set(types::csi_rs_idx_r16); + return c.get(); +} +void pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ssb_idx_r16: + j.write_int("ssb-Index-r16", c.get()); + break; + case types::csi_rs_idx_r16: + j.write_int("csi-RS-Index-r16", c.get()); + break; + default: + log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ssb_idx_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::csi_rs_idx_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + break; + default: + log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ssb_idx_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::csi_rs_idx_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + break; + default: + log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-Index-r16", "csi-RS-Index-r16"}; + return convert_enum_idx(names, 2, value, "pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::types"); +} + +// PathlossReferenceRS-Config ::= CHOICE +void pathloss_ref_rs_cfg_c::destroy_() {} +void pathloss_ref_rs_cfg_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +pathloss_ref_rs_cfg_c::pathloss_ref_rs_cfg_c(const pathloss_ref_rs_cfg_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_, "pathloss_ref_rs_cfg_c"); + } +} +pathloss_ref_rs_cfg_c& pathloss_ref_rs_cfg_c::operator=(const pathloss_ref_rs_cfg_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_, "pathloss_ref_rs_cfg_c"); + } + + return *this; +} +uint8_t& pathloss_ref_rs_cfg_c::set_ssb_idx() +{ + set(types::ssb_idx); + return c.get(); +} +uint8_t& pathloss_ref_rs_cfg_c::set_csi_rs_idx() +{ + set(types::csi_rs_idx); + return c.get(); +} +void pathloss_ref_rs_cfg_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()); + break; + default: + log_invalid_choice_id(type_, "pathloss_ref_rs_cfg_c"); + } + j.end_obj(); +} +SRSASN_CODE pathloss_ref_rs_cfg_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_, "pathloss_ref_rs_cfg_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pathloss_ref_rs_cfg_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_, "pathloss_ref_rs_cfg_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pathloss_ref_rs_cfg_c::types_opts::to_string() const +{ + static const char* names[] = {"ssb-Index", "csi-RS-Index"}; + return convert_enum_idx(names, 2, value, "pathloss_ref_rs_cfg_c::types"); +} + +// Alpha ::= ENUMERATED +const char* alpha_opts::to_string() const +{ + static const char* names[] = {"alpha0", "alpha04", "alpha05", "alpha06", "alpha07", "alpha08", "alpha09", "alpha1"}; + return convert_enum_idx(names, 8, value, "alpha_e"); +} +float alpha_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; + return map_enum_number(numbers, 8, value, "alpha_e"); +} +const char* alpha_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"}; + return convert_enum_idx(number_strs, 8, value, "alpha_e"); +} + +// 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)); + } + + 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 (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)); + } + + 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(); +} + +// DMRS-UplinkTransformPrecoding-r16 ::= SEQUENCE +SRSASN_CODE dmrs_ul_transform_precoding_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pi2_bpsk_scrambling_id0_present, 1)); + HANDLE_CODE(bref.pack(pi2_bpsk_scrambling_id1_present, 1)); + + if (pi2_bpsk_scrambling_id0_present) { + HANDLE_CODE(pack_integer(bref, pi2_bpsk_scrambling_id0, (uint32_t)0u, (uint32_t)65535u)); + } + if (pi2_bpsk_scrambling_id1_present) { + HANDLE_CODE(pack_integer(bref, pi2_bpsk_scrambling_id1, (uint32_t)0u, (uint32_t)65535u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dmrs_ul_transform_precoding_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pi2_bpsk_scrambling_id0_present, 1)); + HANDLE_CODE(bref.unpack(pi2_bpsk_scrambling_id1_present, 1)); + + if (pi2_bpsk_scrambling_id0_present) { + HANDLE_CODE(unpack_integer(pi2_bpsk_scrambling_id0, bref, (uint32_t)0u, (uint32_t)65535u)); + } + if (pi2_bpsk_scrambling_id1_present) { + HANDLE_CODE(unpack_integer(pi2_bpsk_scrambling_id1, bref, (uint32_t)0u, (uint32_t)65535u)); + } + + return SRSASN_SUCCESS; +} +void dmrs_ul_transform_precoding_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pi2_bpsk_scrambling_id0_present) { + j.write_int("pi2BPSK-ScramblingID0", pi2_bpsk_scrambling_id0); + } + if (pi2_bpsk_scrambling_id1_present) { + j.write_int("pi2BPSK-ScramblingID1", pi2_bpsk_scrambling_id1); + } + 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 p0_pucch_s::unpack(cbit_ref& bref) +{ + 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; +} +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(); +} + +// PTRS-UplinkConfig ::= SEQUENCE +SRSASN_CODE ptrs_ul_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)); + + 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, + 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, + 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, + transform_precoder_enabled.sample_density.size(), + integer_packer(1, 276))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ptrs_ul_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)); + + 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, + 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, + 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, + bref, + transform_precoder_enabled.sample_density.size(), + integer_packer(1, 276))); + } + + return SRSASN_SUCCESS; +} +void ptrs_ul_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_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(); +} + +const char* ptrs_ul_cfg_s::transform_precoder_disabled_s_::max_nrof_ports_opts::to_string() const +{ + static const char* names[] = {"n1", "n2"}; + return convert_enum_idx(names, 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 numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::max_nrof_ports_e_"); +} + +const char* ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_opts::to_string() const +{ + static const char* names[] = {"offset01", "offset10", "offset11"}; + return convert_enum_idx(names, 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 numbers[] = {0.1, 1.0, 1.1}; + return map_enum_number(numbers, 3, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_e_"); +} +const char* ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.1", "1.0", "1.1"}; + return convert_enum_idx(number_strs, 3, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_e_"); +} + +const char* ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_opts::to_string() const +{ + static const char* names[] = {"p00", "p01", "p10", "p11"}; + return convert_enum_idx(names, 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 numbers[] = {0.0, 0.1, 1.0, 1.1}; + return map_enum_number(numbers, 4, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_e_"); +} +const char* ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.0", "0.1", "1.0", "1.1"}; + return convert_enum_idx(number_strs, 4, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_e_"); +} + +// PUCCH-MaxCodeRate ::= ENUMERATED +const char* pucch_max_code_rate_opts::to_string() const +{ + static const char* names[] = { + "zeroDot08", "zeroDot15", "zeroDot25", "zeroDot35", "zeroDot45", "zeroDot60", "zeroDot80"}; + return convert_enum_idx(names, 7, value, "pucch_max_code_rate_e"); +} +float pucch_max_code_rate_opts::to_number() const +{ + static const float numbers[] = {0.08, 0.15, 0.25, 0.35, 0.45, 0.6, 0.8}; + return map_enum_number(numbers, 7, value, "pucch_max_code_rate_e"); +} +const char* pucch_max_code_rate_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.08", "0.15", "0.25", "0.35", "0.45", "0.60", "0.80"}; + return convert_enum_idx(number_strs, 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; +} +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; +} +uint8_t& pucch_pathloss_ref_rs_s::ref_sig_c_::set_ssb_idx() +{ + set(types::ssb_idx); + return c.get(); +} +uint8_t& pucch_pathloss_ref_rs_s::ref_sig_c_::set_csi_rs_idx() +{ + set(types::csi_rs_idx); + return c.get(); +} +void pucch_pathloss_ref_rs_s::ref_sig_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()); + break; + default: + log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_pathloss_ref_rs_s::ref_sig_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_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::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_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pucch_pathloss_ref_rs_s::ref_sig_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-Index", "csi-RS-Index"}; + return convert_enum_idx(names, 2, value, "pucch_pathloss_ref_rs_s::ref_sig_c_::types"); +} + +// PUCCH-SRS ::= SEQUENCE +SRSASN_CODE pucch_srs_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, res, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_integer(bref, ul_bwp, (uint8_t)0u, (uint8_t)4u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_srs_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(res, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(ul_bwp, bref, (uint8_t)0u, (uint8_t)4u)); + + return SRSASN_SUCCESS; +} +void pucch_srs_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("resource", res); + j.write_int("uplinkBWP", ul_bwp); + j.end_obj(); +} + +// PUCCH-format0 ::= SEQUENCE +SRSASN_CODE pucch_format0_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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_format0_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)); + + return SRSASN_SUCCESS; +} +void pucch_format0_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(); +} + +// PUCCH-format1 ::= SEQUENCE +SRSASN_CODE pucch_format1_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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_format1_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)); + + 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(); +} + +// PUCCH-format2 ::= SEQUENCE +SRSASN_CODE pucch_format2_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)); + + 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)); + + 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(); +} + +// 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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_format3_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)); + + 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(); +} + +// 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)); + + 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)); + + return SRSASN_SUCCESS; +} +void pucch_format4_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); + j.end_obj(); +} + +const char* pucch_format4_s::occ_len_opts::to_string() const +{ + static const char* names[] = {"n2", "n4"}; + return convert_enum_idx(names, 2, value, "pucch_format4_s::occ_len_e_"); +} +uint8_t pucch_format4_s::occ_len_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4}; + return map_enum_number(numbers, 2, value, "pucch_format4_s::occ_len_e_"); +} + +const char* pucch_format4_s::occ_idx_opts::to_string() const +{ + static const char* names[] = {"n0", "n1", "n2", "n3"}; + return convert_enum_idx(names, 4, value, "pucch_format4_s::occ_idx_e_"); +} +uint8_t pucch_format4_s::occ_idx_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2, 3}; + return map_enum_number(numbers, 4, value, "pucch_format4_s::occ_idx_e_"); +} + +// PUSCH-Allocation-r16 ::= SEQUENCE +SRSASN_CODE pusch_alloc_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(map_type_r16_present, 1)); + HANDLE_CODE(bref.pack(start_symbol_and_len_r16_present, 1)); + HANDLE_CODE(bref.pack(start_symbol_r16_present, 1)); + HANDLE_CODE(bref.pack(len_r16_present, 1)); + HANDLE_CODE(bref.pack(nof_repeats_r16_present, 1)); + + if (map_type_r16_present) { + HANDLE_CODE(map_type_r16.pack(bref)); + } + if (start_symbol_and_len_r16_present) { + HANDLE_CODE(pack_integer(bref, start_symbol_and_len_r16, (uint8_t)0u, (uint8_t)127u)); + } + if (start_symbol_r16_present) { + HANDLE_CODE(pack_integer(bref, start_symbol_r16, (uint8_t)0u, (uint8_t)13u)); + } + if (len_r16_present) { + HANDLE_CODE(pack_integer(bref, len_r16, (uint8_t)1u, (uint8_t)14u)); + } + if (nof_repeats_r16_present) { + HANDLE_CODE(nof_repeats_r16.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= nof_repeats_ext_r17_present; + group_flags[0] |= nof_slots_t_bo_ms_r17_present; + group_flags[0] |= extended_k2_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(nof_repeats_ext_r17_present, 1)); + HANDLE_CODE(bref.pack(nof_slots_t_bo_ms_r17_present, 1)); + HANDLE_CODE(bref.pack(extended_k2_r17_present, 1)); + if (nof_repeats_ext_r17_present) { + HANDLE_CODE(nof_repeats_ext_r17.pack(bref)); + } + if (nof_slots_t_bo_ms_r17_present) { + HANDLE_CODE(nof_slots_t_bo_ms_r17.pack(bref)); + } + if (extended_k2_r17_present) { + HANDLE_CODE(pack_integer(bref, extended_k2_r17, (uint8_t)0u, (uint8_t)128u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_alloc_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(map_type_r16_present, 1)); + HANDLE_CODE(bref.unpack(start_symbol_and_len_r16_present, 1)); + HANDLE_CODE(bref.unpack(start_symbol_r16_present, 1)); + HANDLE_CODE(bref.unpack(len_r16_present, 1)); + HANDLE_CODE(bref.unpack(nof_repeats_r16_present, 1)); + + if (map_type_r16_present) { + HANDLE_CODE(map_type_r16.unpack(bref)); + } + if (start_symbol_and_len_r16_present) { + HANDLE_CODE(unpack_integer(start_symbol_and_len_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (start_symbol_r16_present) { + HANDLE_CODE(unpack_integer(start_symbol_r16, bref, (uint8_t)0u, (uint8_t)13u)); + } + if (len_r16_present) { + HANDLE_CODE(unpack_integer(len_r16, bref, (uint8_t)1u, (uint8_t)14u)); + } + if (nof_repeats_r16_present) { + HANDLE_CODE(nof_repeats_r16.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(nof_repeats_ext_r17_present, 1)); + HANDLE_CODE(bref.unpack(nof_slots_t_bo_ms_r17_present, 1)); + HANDLE_CODE(bref.unpack(extended_k2_r17_present, 1)); + if (nof_repeats_ext_r17_present) { + HANDLE_CODE(nof_repeats_ext_r17.unpack(bref)); + } + if (nof_slots_t_bo_ms_r17_present) { + HANDLE_CODE(nof_slots_t_bo_ms_r17.unpack(bref)); + } + if (extended_k2_r17_present) { + HANDLE_CODE(unpack_integer(extended_k2_r17, bref, (uint8_t)0u, (uint8_t)128u)); + } + } + } + return SRSASN_SUCCESS; +} +void pusch_alloc_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (map_type_r16_present) { + j.write_str("mappingType-r16", map_type_r16.to_string()); + } + if (start_symbol_and_len_r16_present) { + j.write_int("startSymbolAndLength-r16", start_symbol_and_len_r16); + } + if (start_symbol_r16_present) { + j.write_int("startSymbol-r16", start_symbol_r16); + } + if (len_r16_present) { + j.write_int("length-r16", len_r16); + } + if (nof_repeats_r16_present) { + j.write_str("numberOfRepetitions-r16", nof_repeats_r16.to_string()); + } + if (ext) { + if (nof_repeats_ext_r17_present) { + j.write_str("numberOfRepetitionsExt-r17", nof_repeats_ext_r17.to_string()); + } + if (nof_slots_t_bo_ms_r17_present) { + j.write_str("numberOfSlotsTBoMS-r17", nof_slots_t_bo_ms_r17.to_string()); + } + if (extended_k2_r17_present) { + j.write_int("extendedK2-r17", extended_k2_r17); + } + } + j.end_obj(); +} + +const char* pusch_alloc_r16_s::map_type_r16_opts::to_string() const +{ + static const char* names[] = {"typeA", "typeB"}; + return convert_enum_idx(names, 2, value, "pusch_alloc_r16_s::map_type_r16_e_"); +} + +const char* pusch_alloc_r16_s::nof_repeats_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n3", "n4", "n7", "n8", "n12", "n16"}; + return convert_enum_idx(names, 8, value, "pusch_alloc_r16_s::nof_repeats_r16_e_"); +} +uint8_t pusch_alloc_r16_s::nof_repeats_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3, 4, 7, 8, 12, 16}; + return map_enum_number(numbers, 8, value, "pusch_alloc_r16_s::nof_repeats_r16_e_"); +} + +const char* pusch_alloc_r16_s::nof_repeats_ext_r17_opts::to_string() const +{ + static const char* names[] = {"n1", + "n2", + "n3", + "n4", + "n7", + "n8", + "n12", + "n16", + "n20", + "n24", + "n28", + "n32", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "pusch_alloc_r16_s::nof_repeats_ext_r17_e_"); +} +uint8_t pusch_alloc_r16_s::nof_repeats_ext_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3, 4, 7, 8, 12, 16, 20, 24, 28, 32}; + return map_enum_number(numbers, 12, value, "pusch_alloc_r16_s::nof_repeats_ext_r17_e_"); +} + +const char* pusch_alloc_r16_s::nof_slots_t_bo_ms_r17_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n4", "n8", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "pusch_alloc_r16_s::nof_slots_t_bo_ms_r17_e_"); +} +uint8_t pusch_alloc_r16_s::nof_slots_t_bo_ms_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "pusch_alloc_r16_s::nof_slots_t_bo_ms_r17_e_"); +} + +// PathlossReferenceRS-r16 ::= SEQUENCE +SRSASN_CODE pathloss_ref_rs_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, srs_pathloss_ref_rs_id_r16, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pathloss_ref_rs_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pathloss_ref_rs_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(srs_pathloss_ref_rs_id_r16, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pathloss_ref_rs_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pathloss_ref_rs_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("srs-PathlossReferenceRS-Id-r16", srs_pathloss_ref_rs_id_r16); + j.write_fieldname("pathlossReferenceRS-r16"); + pathloss_ref_rs_r16.to_json(j); + j.end_obj(); +} + +// SPS-PUCCH-AN-r16 ::= SEQUENCE +SRSASN_CODE sps_pucch_an_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(max_payload_size_r16_present, 1)); + + HANDLE_CODE(pack_integer(bref, sps_pucch_an_res_id_r16, (uint8_t)0u, (uint8_t)127u)); + if (max_payload_size_r16_present) { + HANDLE_CODE(pack_integer(bref, max_payload_size_r16, (uint16_t)4u, (uint16_t)256u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sps_pucch_an_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(max_payload_size_r16_present, 1)); + + HANDLE_CODE(unpack_integer(sps_pucch_an_res_id_r16, bref, (uint8_t)0u, (uint8_t)127u)); + if (max_payload_size_r16_present) { + HANDLE_CODE(unpack_integer(max_payload_size_r16, bref, (uint16_t)4u, (uint16_t)256u)); + } + + return SRSASN_SUCCESS; +} +void sps_pucch_an_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sps-PUCCH-AN-ResourceID-r16", sps_pucch_an_res_id_r16); + if (max_payload_size_r16_present) { + j.write_int("maxPayloadSize-r16", max_payload_size_r16); + } + j.end_obj(); +} + +// BetaOffsetsCrossPriSelCG-r17 ::= CHOICE +void beta_offsets_cross_pri_sel_cg_r17_c::destroy_() +{ + switch (type_) { + case types::dyn_r17: + c.destroy(); + break; + case types::semi_static_r17: + c.destroy(); + break; + default: + break; + } +} +void beta_offsets_cross_pri_sel_cg_r17_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::dyn_r17: + c.init(); + break; + case types::semi_static_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_cg_r17_c"); + } +} +beta_offsets_cross_pri_sel_cg_r17_c::beta_offsets_cross_pri_sel_cg_r17_c( + const beta_offsets_cross_pri_sel_cg_r17_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::dyn_r17: + c.init(other.c.get()); + break; + case types::semi_static_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_cg_r17_c"); + } +} +beta_offsets_cross_pri_sel_cg_r17_c& +beta_offsets_cross_pri_sel_cg_r17_c::operator=(const beta_offsets_cross_pri_sel_cg_r17_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::dyn_r17: + c.set(other.c.get()); + break; + case types::semi_static_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_cg_r17_c"); + } + + return *this; +} +beta_offsets_cross_pri_sel_cg_r17_c::dyn_r17_l_& beta_offsets_cross_pri_sel_cg_r17_c::set_dyn_r17() +{ + set(types::dyn_r17); + return c.get(); +} +beta_offsets_cross_pri_r17_l& beta_offsets_cross_pri_sel_cg_r17_c::set_semi_static_r17() +{ + set(types::semi_static_r17); + return c.get(); +} +void beta_offsets_cross_pri_sel_cg_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::dyn_r17: + j.start_array("dynamic-r17"); + for (const auto& e1 : c.get()) { + j.start_array(); + for (const auto& e2 : e1) { + j.write_int(e2); + } + j.end_array(); + } + j.end_array(); + break; + case types::semi_static_r17: + j.start_array("semiStatic-r17"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_cg_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE beta_offsets_cross_pri_sel_cg_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::dyn_r17: + HANDLE_CODE(pack_dyn_seq_of(bref, + c.get(), + 1, + 4, + FixedSeqOfPacker>(3, integer_packer(0, 31)))); + break; + case types::semi_static_r17: + HANDLE_CODE(pack_fixed_seq_of(bref, + c.get(), + c.get().size(), + integer_packer(0, 31))); + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_cg_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE beta_offsets_cross_pri_sel_cg_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::dyn_r17: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), + bref, + 1, + 4, + FixedSeqOfPacker>(3, integer_packer(0, 31)))); + break; + case types::semi_static_r17: + HANDLE_CODE(unpack_fixed_seq_of(c.get(), + bref, + c.get().size(), + integer_packer(0, 31))); + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_cg_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* beta_offsets_cross_pri_sel_cg_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"dynamic-r17", "semiStatic-r17"}; + return convert_enum_idx(names, 2, value, "beta_offsets_cross_pri_sel_cg_r17_c::types"); +} + +// CG-COT-Sharing-r16 ::= CHOICE +void cg_cot_sharing_r16_c::set(types::options e) +{ + type_ = e; +} +void cg_cot_sharing_r16_c::set_no_cot_sharing_r16() +{ + set(types::no_cot_sharing_r16); +} +cg_cot_sharing_r16_c::cot_sharing_r16_s_& cg_cot_sharing_r16_c::set_cot_sharing_r16() +{ + set(types::cot_sharing_r16); + return c; +} +void cg_cot_sharing_r16_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::no_cot_sharing_r16: + break; + case types::cot_sharing_r16: + j.write_fieldname("cot-Sharing-r16"); + j.start_obj(); + j.write_int("duration-r16", c.dur_r16); + j.write_int("offset-r16", c.offset_r16); + j.write_int("channelAccessPriority-r16", c.ch_access_prio_r16); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cg_cot_sharing_r16_c"); + } + j.end_obj(); +} +SRSASN_CODE cg_cot_sharing_r16_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::no_cot_sharing_r16: + break; + case types::cot_sharing_r16: + HANDLE_CODE(pack_integer(bref, c.dur_r16, (uint8_t)1u, (uint8_t)39u)); + HANDLE_CODE(pack_integer(bref, c.offset_r16, (uint8_t)1u, (uint8_t)39u)); + HANDLE_CODE(pack_integer(bref, c.ch_access_prio_r16, (uint8_t)1u, (uint8_t)4u)); + break; + default: + log_invalid_choice_id(type_, "cg_cot_sharing_r16_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cot_sharing_r16_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::no_cot_sharing_r16: + break; + case types::cot_sharing_r16: + HANDLE_CODE(unpack_integer(c.dur_r16, bref, (uint8_t)1u, (uint8_t)39u)); + HANDLE_CODE(unpack_integer(c.offset_r16, bref, (uint8_t)1u, (uint8_t)39u)); + HANDLE_CODE(unpack_integer(c.ch_access_prio_r16, bref, (uint8_t)1u, (uint8_t)4u)); + break; + default: + log_invalid_choice_id(type_, "cg_cot_sharing_r16_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* cg_cot_sharing_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"noCOT-Sharing-r16", "cot-Sharing-r16"}; + return convert_enum_idx(names, 2, value, "cg_cot_sharing_r16_c::types"); +} + +// CG-COT-Sharing-r17 ::= CHOICE +void cg_cot_sharing_r17_c::set(types::options e) +{ + type_ = e; +} +void cg_cot_sharing_r17_c::set_no_cot_sharing_r17() +{ + set(types::no_cot_sharing_r17); +} +cg_cot_sharing_r17_c::cot_sharing_r17_s_& cg_cot_sharing_r17_c::set_cot_sharing_r17() +{ + set(types::cot_sharing_r17); + return c; +} +void cg_cot_sharing_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::no_cot_sharing_r17: + break; + case types::cot_sharing_r17: + j.write_fieldname("cot-Sharing-r17"); + j.start_obj(); + j.write_int("duration-r17", c.dur_r17); + j.write_int("offset-r17", c.offset_r17); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cg_cot_sharing_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE cg_cot_sharing_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::no_cot_sharing_r17: + break; + case types::cot_sharing_r17: + HANDLE_CODE(pack_integer(bref, c.dur_r17, (uint16_t)1u, (uint16_t)319u)); + HANDLE_CODE(pack_integer(bref, c.offset_r17, (uint16_t)1u, (uint16_t)319u)); + break; + default: + log_invalid_choice_id(type_, "cg_cot_sharing_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cot_sharing_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::no_cot_sharing_r17: + break; + case types::cot_sharing_r17: + HANDLE_CODE(unpack_integer(c.dur_r17, bref, (uint16_t)1u, (uint16_t)319u)); + HANDLE_CODE(unpack_integer(c.offset_r17, bref, (uint16_t)1u, (uint16_t)319u)); + break; + default: + log_invalid_choice_id(type_, "cg_cot_sharing_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* cg_cot_sharing_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"noCOT-Sharing-r17", "cot-Sharing-r17"}; + return convert_enum_idx(names, 2, value, "cg_cot_sharing_r17_c::types"); +} + +// CG-SDT-Configuration-r17 ::= SEQUENCE +SRSASN_CODE cg_sdt_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cg_sdt_retx_timer_present, 1)); + HANDLE_CODE(bref.pack(sdt_ssb_subset_r17_present, 1)); + HANDLE_CODE(bref.pack(sdt_ssb_per_cg_pusch_r17_present, 1)); + HANDLE_CODE(bref.pack(sdt_p0_pusch_r17_present, 1)); + HANDLE_CODE(bref.pack(sdt_alpha_r17_present, 1)); + HANDLE_CODE(bref.pack(sdt_dmrs_ports_r17_present, 1)); + HANDLE_CODE(bref.pack(sdt_nrof_dmrs_seqs_r17_present, 1)); + + if (cg_sdt_retx_timer_present) { + HANDLE_CODE(pack_integer(bref, cg_sdt_retx_timer, (uint8_t)1u, (uint8_t)64u)); + } + if (sdt_ssb_subset_r17_present) { + HANDLE_CODE(sdt_ssb_subset_r17.pack(bref)); + } + if (sdt_ssb_per_cg_pusch_r17_present) { + HANDLE_CODE(sdt_ssb_per_cg_pusch_r17.pack(bref)); + } + if (sdt_p0_pusch_r17_present) { + HANDLE_CODE(pack_integer(bref, sdt_p0_pusch_r17, (int8_t)-16, (int8_t)15)); + } + if (sdt_alpha_r17_present) { + HANDLE_CODE(sdt_alpha_r17.pack(bref)); + } + if (sdt_dmrs_ports_r17_present) { + HANDLE_CODE(sdt_dmrs_ports_r17.pack(bref)); + } + if (sdt_nrof_dmrs_seqs_r17_present) { + HANDLE_CODE(pack_integer(bref, sdt_nrof_dmrs_seqs_r17, (uint8_t)1u, (uint8_t)2u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_sdt_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cg_sdt_retx_timer_present, 1)); + HANDLE_CODE(bref.unpack(sdt_ssb_subset_r17_present, 1)); + HANDLE_CODE(bref.unpack(sdt_ssb_per_cg_pusch_r17_present, 1)); + HANDLE_CODE(bref.unpack(sdt_p0_pusch_r17_present, 1)); + HANDLE_CODE(bref.unpack(sdt_alpha_r17_present, 1)); + HANDLE_CODE(bref.unpack(sdt_dmrs_ports_r17_present, 1)); + HANDLE_CODE(bref.unpack(sdt_nrof_dmrs_seqs_r17_present, 1)); + + if (cg_sdt_retx_timer_present) { + HANDLE_CODE(unpack_integer(cg_sdt_retx_timer, bref, (uint8_t)1u, (uint8_t)64u)); + } + if (sdt_ssb_subset_r17_present) { + HANDLE_CODE(sdt_ssb_subset_r17.unpack(bref)); + } + if (sdt_ssb_per_cg_pusch_r17_present) { + HANDLE_CODE(sdt_ssb_per_cg_pusch_r17.unpack(bref)); + } + if (sdt_p0_pusch_r17_present) { + HANDLE_CODE(unpack_integer(sdt_p0_pusch_r17, bref, (int8_t)-16, (int8_t)15)); + } + if (sdt_alpha_r17_present) { + HANDLE_CODE(sdt_alpha_r17.unpack(bref)); + } + if (sdt_dmrs_ports_r17_present) { + HANDLE_CODE(sdt_dmrs_ports_r17.unpack(bref)); + } + if (sdt_nrof_dmrs_seqs_r17_present) { + HANDLE_CODE(unpack_integer(sdt_nrof_dmrs_seqs_r17, bref, (uint8_t)1u, (uint8_t)2u)); + } + + return SRSASN_SUCCESS; +} +void cg_sdt_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cg_sdt_retx_timer_present) { + j.write_int("cg-SDT-RetransmissionTimer", cg_sdt_retx_timer); + } + if (sdt_ssb_subset_r17_present) { + j.write_fieldname("sdt-SSB-Subset-r17"); + sdt_ssb_subset_r17.to_json(j); + } + if (sdt_ssb_per_cg_pusch_r17_present) { + j.write_str("sdt-SSB-PerCG-PUSCH-r17", sdt_ssb_per_cg_pusch_r17.to_string()); + } + if (sdt_p0_pusch_r17_present) { + j.write_int("sdt-P0-PUSCH-r17", sdt_p0_pusch_r17); + } + if (sdt_alpha_r17_present) { + j.write_str("sdt-Alpha-r17", sdt_alpha_r17.to_string()); + } + if (sdt_dmrs_ports_r17_present) { + j.write_fieldname("sdt-DMRS-Ports-r17"); + sdt_dmrs_ports_r17.to_json(j); + } + if (sdt_nrof_dmrs_seqs_r17_present) { + j.write_int("sdt-NrofDMRS-Sequences-r17", sdt_nrof_dmrs_seqs_r17); + } + j.end_obj(); +} + +void cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::destroy_() +{ + switch (type_) { + case types::short_bitmap_r17: + c.destroy>(); + break; + case types::medium_bitmap_r17: + c.destroy>(); + break; + case types::long_bitmap_r17: + c.destroy>(); + break; + default: + break; + } +} +void cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::short_bitmap_r17: + c.init>(); + break; + case types::medium_bitmap_r17: + c.init>(); + break; + case types::long_bitmap_r17: + c.init>(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_"); + } +} +cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::sdt_ssb_subset_r17_c_(const cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::short_bitmap_r17: + c.init(other.c.get>()); + break; + case types::medium_bitmap_r17: + c.init(other.c.get>()); + break; + case types::long_bitmap_r17: + c.init(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_"); + } +} +cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_& +cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::operator=(const cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::short_bitmap_r17: + c.set(other.c.get>()); + break; + case types::medium_bitmap_r17: + c.set(other.c.get>()); + break; + case types::long_bitmap_r17: + c.set(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_"); + } + + return *this; +} +fixed_bitstring<4>& cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::set_short_bitmap_r17() +{ + set(types::short_bitmap_r17); + return c.get>(); +} +fixed_bitstring<8>& cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::set_medium_bitmap_r17() +{ + set(types::medium_bitmap_r17); + return c.get>(); +} +fixed_bitstring<64>& cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::set_long_bitmap_r17() +{ + set(types::long_bitmap_r17); + return c.get>(); +} +void cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::short_bitmap_r17: + j.write_str("shortBitmap-r17", c.get>().to_string()); + break; + case types::medium_bitmap_r17: + j.write_str("mediumBitmap-r17", c.get>().to_string()); + break; + case types::long_bitmap_r17: + j.write_str("longBitmap-r17", c.get>().to_string()); + break; + default: + log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::short_bitmap_r17: + HANDLE_CODE(c.get>().pack(bref)); + break; + case types::medium_bitmap_r17: + HANDLE_CODE(c.get>().pack(bref)); + break; + case types::long_bitmap_r17: + HANDLE_CODE(c.get>().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::short_bitmap_r17: + HANDLE_CODE(c.get>().unpack(bref)); + break; + case types::medium_bitmap_r17: + HANDLE_CODE(c.get>().unpack(bref)); + break; + case types::long_bitmap_r17: + HANDLE_CODE(c.get>().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"shortBitmap-r17", "mediumBitmap-r17", "longBitmap-r17"}; + return convert_enum_idx(names, 3, value, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::types"); +} + +const char* cg_sdt_cfg_r17_s::sdt_ssb_per_cg_pusch_r17_opts::to_string() const +{ + static const char* names[] = {"oneEighth", "oneFourth", "half", "one", "two", "four", "eight", "sixteen"}; + return convert_enum_idx(names, 8, value, "cg_sdt_cfg_r17_s::sdt_ssb_per_cg_pusch_r17_e_"); +} +float cg_sdt_cfg_r17_s::sdt_ssb_per_cg_pusch_r17_opts::to_number() const +{ + static const float numbers[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; + return map_enum_number(numbers, 8, value, "cg_sdt_cfg_r17_s::sdt_ssb_per_cg_pusch_r17_e_"); +} +const char* cg_sdt_cfg_r17_s::sdt_ssb_per_cg_pusch_r17_opts::to_number_string() const +{ + static const char* number_strs[] = {"1/8", "1/4", "0.5", "1", "2", "4", "8", "6"}; + return convert_enum_idx(number_strs, 8, value, "cg_sdt_cfg_r17_s::sdt_ssb_per_cg_pusch_r17_e_"); +} + +const char* cg_sdt_cfg_r17_s::sdt_alpha_r17_opts::to_string() const +{ + static const char* names[] = {"alpha0", "alpha04", "alpha05", "alpha06", "alpha07", "alpha08", "alpha09", "alpha1"}; + return convert_enum_idx(names, 8, value, "cg_sdt_cfg_r17_s::sdt_alpha_r17_e_"); +} +float cg_sdt_cfg_r17_s::sdt_alpha_r17_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; + return map_enum_number(numbers, 8, value, "cg_sdt_cfg_r17_s::sdt_alpha_r17_e_"); +} +const char* cg_sdt_cfg_r17_s::sdt_alpha_r17_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"}; + return convert_enum_idx(number_strs, 8, value, "cg_sdt_cfg_r17_s::sdt_alpha_r17_e_"); +} + +void cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::destroy_() +{ + switch (type_) { + case types::dmrs_type1_r17: + c.destroy>(); + break; + case types::dmrs_type2_r17: + c.destroy>(); + break; + default: + break; + } +} +void cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::dmrs_type1_r17: + c.init>(); + break; + case types::dmrs_type2_r17: + c.init>(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_"); + } +} +cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::sdt_dmrs_ports_r17_c_(const cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::dmrs_type1_r17: + c.init(other.c.get>()); + break; + case types::dmrs_type2_r17: + c.init(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_"); + } +} +cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_& +cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::operator=(const cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::dmrs_type1_r17: + c.set(other.c.get>()); + break; + case types::dmrs_type2_r17: + c.set(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_"); + } + + return *this; +} +fixed_bitstring<8>& cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::set_dmrs_type1_r17() +{ + set(types::dmrs_type1_r17); + return c.get>(); +} +fixed_bitstring<12>& cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::set_dmrs_type2_r17() +{ + set(types::dmrs_type2_r17); + return c.get>(); +} +void cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::dmrs_type1_r17: + j.write_str("dmrsType1-r17", c.get>().to_string()); + break; + case types::dmrs_type2_r17: + j.write_str("dmrsType2-r17", c.get>().to_string()); + break; + default: + log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::dmrs_type1_r17: + HANDLE_CODE(c.get>().pack(bref)); + break; + case types::dmrs_type2_r17: + HANDLE_CODE(c.get>().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::dmrs_type1_r17: + HANDLE_CODE(c.get>().unpack(bref)); + break; + case types::dmrs_type2_r17: + HANDLE_CODE(c.get>().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"dmrsType1-r17", "dmrsType2-r17"}; + return convert_enum_idx(names, 2, value, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::types"); +} +uint8_t cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::types"); +} + +// CG-StartingOffsets-r16 ::= SEQUENCE +SRSASN_CODE cg_start_offsets_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cg_start_full_bw_inside_cot_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(cg_start_full_bw_outside_cot_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(cg_start_partial_bw_inside_cot_r16_present, 1)); + HANDLE_CODE(bref.pack(cg_start_partial_bw_outside_cot_r16_present, 1)); + + if (cg_start_full_bw_inside_cot_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cg_start_full_bw_inside_cot_r16, 1, 7, integer_packer(0, 6))); + } + if (cg_start_full_bw_outside_cot_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cg_start_full_bw_outside_cot_r16, 1, 7, integer_packer(0, 6))); + } + if (cg_start_partial_bw_inside_cot_r16_present) { + HANDLE_CODE(pack_integer(bref, cg_start_partial_bw_inside_cot_r16, (uint8_t)0u, (uint8_t)6u)); + } + if (cg_start_partial_bw_outside_cot_r16_present) { + HANDLE_CODE(pack_integer(bref, cg_start_partial_bw_outside_cot_r16, (uint8_t)0u, (uint8_t)6u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_start_offsets_r16_s::unpack(cbit_ref& bref) +{ + bool cg_start_full_bw_inside_cot_r16_present; + HANDLE_CODE(bref.unpack(cg_start_full_bw_inside_cot_r16_present, 1)); + bool cg_start_full_bw_outside_cot_r16_present; + HANDLE_CODE(bref.unpack(cg_start_full_bw_outside_cot_r16_present, 1)); + HANDLE_CODE(bref.unpack(cg_start_partial_bw_inside_cot_r16_present, 1)); + HANDLE_CODE(bref.unpack(cg_start_partial_bw_outside_cot_r16_present, 1)); + + if (cg_start_full_bw_inside_cot_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(cg_start_full_bw_inside_cot_r16, bref, 1, 7, integer_packer(0, 6))); + } + if (cg_start_full_bw_outside_cot_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(cg_start_full_bw_outside_cot_r16, bref, 1, 7, integer_packer(0, 6))); + } + if (cg_start_partial_bw_inside_cot_r16_present) { + HANDLE_CODE(unpack_integer(cg_start_partial_bw_inside_cot_r16, bref, (uint8_t)0u, (uint8_t)6u)); + } + if (cg_start_partial_bw_outside_cot_r16_present) { + HANDLE_CODE(unpack_integer(cg_start_partial_bw_outside_cot_r16, bref, (uint8_t)0u, (uint8_t)6u)); + } + + return SRSASN_SUCCESS; +} +void cg_start_offsets_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cg_start_full_bw_inside_cot_r16.size() > 0) { + j.start_array("cg-StartingFullBW-InsideCOT-r16"); + for (const auto& e1 : cg_start_full_bw_inside_cot_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (cg_start_full_bw_outside_cot_r16.size() > 0) { + j.start_array("cg-StartingFullBW-OutsideCOT-r16"); + for (const auto& e1 : cg_start_full_bw_outside_cot_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (cg_start_partial_bw_inside_cot_r16_present) { + j.write_int("cg-StartingPartialBW-InsideCOT-r16", cg_start_partial_bw_inside_cot_r16); + } + if (cg_start_partial_bw_outside_cot_r16_present) { + j.write_int("cg-StartingPartialBW-OutsideCOT-r16", cg_start_partial_bw_outside_cot_r16); + } + j.end_obj(); +} + +// CG-UCI-OnPUSCH ::= CHOICE +void cg_uci_on_pusch_c::destroy_() +{ + switch (type_) { + case types::dyn: + c.destroy(); + break; + case types::semi_static: + c.destroy(); + break; + default: + break; + } +} +void cg_uci_on_pusch_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::dyn: + 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"); + } +} +cg_uci_on_pusch_c::cg_uci_on_pusch_c(const cg_uci_on_pusch_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::dyn: + 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"); + } +} +cg_uci_on_pusch_c& cg_uci_on_pusch_c::operator=(const cg_uci_on_pusch_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::dyn: + 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 *this; +} +cg_uci_on_pusch_c::dyn_l_& cg_uci_on_pusch_c::set_dyn() +{ + set(types::dyn); + return c.get(); +} +beta_offsets_s& cg_uci_on_pusch_c::set_semi_static() +{ + set(types::semi_static); + return c.get(); +} +void cg_uci_on_pusch_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::dyn: + 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"); + } + j.end_obj(); +} +SRSASN_CODE cg_uci_on_pusch_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::dyn: + 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; + } + 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::dyn: + 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; + } + return SRSASN_SUCCESS; +} + +const char* cg_uci_on_pusch_c::types_opts::to_string() const +{ + static const char* names[] = {"dynamic", "semiStatic"}; + return convert_enum_idx(names, 2, value, "cg_uci_on_pusch_c::types"); +} + +// DMRS-BundlingPUCCH-Config-r17 ::= SEQUENCE +SRSASN_CODE dmrs_bundling_pucch_cfg_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pucch_dmrs_bundling_r17_present, 1)); + HANDLE_CODE(bref.pack(pucch_time_domain_win_len_r17_present, 1)); + HANDLE_CODE(bref.pack(pucch_win_restart_r17_present, 1)); + HANDLE_CODE(bref.pack(pucch_freq_hop_interv_r17_present, 1)); + + if (pucch_time_domain_win_len_r17_present) { + HANDLE_CODE(pack_integer(bref, pucch_time_domain_win_len_r17, (uint8_t)2u, (uint8_t)8u)); + } + if (pucch_freq_hop_interv_r17_present) { + HANDLE_CODE(pucch_freq_hop_interv_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dmrs_bundling_pucch_cfg_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pucch_dmrs_bundling_r17_present, 1)); + HANDLE_CODE(bref.unpack(pucch_time_domain_win_len_r17_present, 1)); + HANDLE_CODE(bref.unpack(pucch_win_restart_r17_present, 1)); + HANDLE_CODE(bref.unpack(pucch_freq_hop_interv_r17_present, 1)); + + if (pucch_time_domain_win_len_r17_present) { + HANDLE_CODE(unpack_integer(pucch_time_domain_win_len_r17, bref, (uint8_t)2u, (uint8_t)8u)); + } + if (pucch_freq_hop_interv_r17_present) { + HANDLE_CODE(pucch_freq_hop_interv_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void dmrs_bundling_pucch_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pucch_dmrs_bundling_r17_present) { + j.write_str("pucch-DMRS-Bundling-r17", "enabled"); + } + if (pucch_time_domain_win_len_r17_present) { + j.write_int("pucch-TimeDomainWindowLength-r17", pucch_time_domain_win_len_r17); + } + if (pucch_win_restart_r17_present) { + j.write_str("pucch-WindowRestart-r17", "enabled"); + } + if (pucch_freq_hop_interv_r17_present) { + j.write_str("pucch-FrequencyHoppingInterval-r17", pucch_freq_hop_interv_r17.to_string()); + } + j.end_obj(); +} + +const char* dmrs_bundling_pucch_cfg_r17_s::pucch_freq_hop_interv_r17_opts::to_string() const +{ + static const char* names[] = {"s2", "s4", "s5", "s10"}; + return convert_enum_idx(names, 4, value, "dmrs_bundling_pucch_cfg_r17_s::pucch_freq_hop_interv_r17_e_"); +} +uint8_t dmrs_bundling_pucch_cfg_r17_s::pucch_freq_hop_interv_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 5, 10}; + return map_enum_number(numbers, 4, value, "dmrs_bundling_pucch_cfg_r17_s::pucch_freq_hop_interv_r17_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) { + HANDLE_CODE(transform_precoding_disabled.pack(bref)); + } + if (transform_precoding_enabled_present) { + HANDLE_CODE(transform_precoding_enabled.pack(bref)); + } + + 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) { + HANDLE_CODE(transform_precoding_disabled.unpack(bref)); + } + if (transform_precoding_enabled_present) { + HANDLE_CODE(transform_precoding_enabled.unpack(bref)); + } + + 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"); + transform_precoding_disabled.to_json(j); + } + if (transform_precoding_enabled_present) { + j.write_fieldname("transformPrecodingEnabled"); + transform_precoding_enabled.to_json(j); + } + j.end_obj(); +} + +const char* dmrs_ul_cfg_s::dmrs_add_position_opts::to_string() const +{ + static const char* names[] = {"pos0", "pos1", "pos3"}; + return convert_enum_idx(names, 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 numbers[] = {0, 1, 3}; + return map_enum_number(numbers, 3, value, "dmrs_ul_cfg_s::dmrs_add_position_e_"); +} + +SRSASN_CODE dmrs_ul_cfg_s::transform_precoding_disabled_s_::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(scrambling_id0_present, 1)); + HANDLE_CODE(bref.pack(scrambling_id1_present, 1)); + + 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 (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= dmrs_ul_r16_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(dmrs_ul_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dmrs_ul_cfg_s::transform_precoding_disabled_s_::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(scrambling_id0_present, 1)); + HANDLE_CODE(bref.unpack(scrambling_id1_present, 1)); + + 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 (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(dmrs_ul_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void dmrs_ul_cfg_s::transform_precoding_disabled_s_::to_json(json_writer& j) const +{ + j.start_obj(); + if (scrambling_id0_present) { + j.write_int("scramblingID0", scrambling_id0); + } + if (scrambling_id1_present) { + j.write_int("scramblingID1", scrambling_id1); + } + if (ext) { + if (dmrs_ul_r16_present) { + j.write_str("dmrs-Uplink-r16", "enabled"); + } + } + j.end_obj(); +} + +SRSASN_CODE dmrs_ul_cfg_s::transform_precoding_enabled_s_::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(npusch_id_present, 1)); + HANDLE_CODE(bref.pack(seq_group_hop_present, 1)); + HANDLE_CODE(bref.pack(seq_hop_present, 1)); + + if (npusch_id_present) { + HANDLE_CODE(pack_integer(bref, npusch_id, (uint16_t)0u, (uint16_t)1007u)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= dmrs_ul_transform_precoding_r16.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(dmrs_ul_transform_precoding_r16.is_present(), 1)); + if (dmrs_ul_transform_precoding_r16.is_present()) { + HANDLE_CODE(dmrs_ul_transform_precoding_r16->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dmrs_ul_cfg_s::transform_precoding_enabled_s_::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(npusch_id_present, 1)); + HANDLE_CODE(bref.unpack(seq_group_hop_present, 1)); + HANDLE_CODE(bref.unpack(seq_hop_present, 1)); + + if (npusch_id_present) { + HANDLE_CODE(unpack_integer(npusch_id, bref, (uint16_t)0u, (uint16_t)1007u)); + } + + 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); + + unpack_presence_flag(dmrs_ul_transform_precoding_r16, bref); + if (dmrs_ul_transform_precoding_r16.is_present()) { + HANDLE_CODE(dmrs_ul_transform_precoding_r16->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void dmrs_ul_cfg_s::transform_precoding_enabled_s_::to_json(json_writer& j) const +{ + j.start_obj(); + if (npusch_id_present) { + j.write_int("nPUSCH-Identity", npusch_id); + } + if (seq_group_hop_present) { + j.write_str("sequenceGroupHopping", "disabled"); + } + if (seq_hop_present) { + j.write_str("sequenceHopping", "enabled"); + } + if (ext) { + if (dmrs_ul_transform_precoding_r16.is_present()) { + j.write_fieldname("dmrs-UplinkTransformPrecoding-r16"); + dmrs_ul_transform_precoding_r16->to_json(j); + } + } + j.end_obj(); +} + +// DummyPathlossReferenceRS-v1710 ::= SEQUENCE +SRSASN_CODE dummy_pathloss_ref_rs_v1710_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(add_pci_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, pusch_pathloss_ref_rs_id_r17, (uint8_t)0u, (uint8_t)63u)); + if (add_pci_r17_present) { + HANDLE_CODE(pack_integer(bref, add_pci_r17, (uint8_t)1u, (uint8_t)7u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dummy_pathloss_ref_rs_v1710_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(add_pci_r17_present, 1)); + + HANDLE_CODE(unpack_integer(pusch_pathloss_ref_rs_id_r17, bref, (uint8_t)0u, (uint8_t)63u)); + if (add_pci_r17_present) { + HANDLE_CODE(unpack_integer(add_pci_r17, bref, (uint8_t)1u, (uint8_t)7u)); + } + + return SRSASN_SUCCESS; +} +void dummy_pathloss_ref_rs_v1710_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("pusch-PathlossReferenceRS-Id-r17", pusch_pathloss_ref_rs_id_r17); + if (add_pci_r17_present) { + j.write_int("additionalPCI-r17", add_pci_r17); + } + j.end_obj(); +} + +// 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)); + + 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)); + } + + 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 p0_pusch_alpha_set_s::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(); +} + +// P0-PUSCH-Set-r16 ::= SEQUENCE +SRSASN_CODE p0_pusch_set_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(p0_list_r16.size() > 0, 1)); + + HANDLE_CODE(pack_integer(bref, p0_pusch_set_id_r16, (uint8_t)0u, (uint8_t)15u)); + if (p0_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, p0_list_r16, 1, 2, integer_packer(-16, 15))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE p0_pusch_set_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool p0_list_r16_present; + HANDLE_CODE(bref.unpack(p0_list_r16_present, 1)); + + HANDLE_CODE(unpack_integer(p0_pusch_set_id_r16, bref, (uint8_t)0u, (uint8_t)15u)); + if (p0_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(p0_list_r16, bref, 1, 2, integer_packer(-16, 15))); + } + + return SRSASN_SUCCESS; +} +void p0_pusch_set_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("p0-PUSCH-SetId-r16", p0_pusch_set_id_r16); + if (p0_list_r16.size() > 0) { + j.start_array("p0-List-r16"); + for (const auto& e1 : p0_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + 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) +{ + type_ = other.type(); + switch (type_) { + case types::ssb: + c.init(other.c.get()); + break; + case types::csi_rs: + c.init(other.c.get()); + 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::operator=(const prach_res_ded_bfr_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ssb: + c.set(other.c.get()); + break; + case types::csi_rs: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); + } + + return *this; +} +bfr_ssb_res_s& prach_res_ded_bfr_c::set_ssb() +{ + set(types::ssb); + return c.get(); +} +bfr_csi_rs_res_s& prach_res_ded_bfr_c::set_csi_rs() +{ + set(types::csi_rs); + return c.get(); +} +void prach_res_ded_bfr_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ssb: + j.write_fieldname("ssb"); + c.get().to_json(j); + break; + case types::csi_rs: + j.write_fieldname("csi-RS"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); + } + j.end_obj(); +} +SRSASN_CODE prach_res_ded_bfr_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ssb: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::csi_rs: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE prach_res_ded_bfr_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ssb: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::csi_rs: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* prach_res_ded_bfr_c::types_opts::to_string() const +{ + static const char* names[] = {"ssb", "csi-RS"}; + return convert_enum_idx(names, 2, value, "prach_res_ded_bfr_c::types"); +} + +// PUCCH-FormatConfig ::= SEQUENCE +SRSASN_CODE pucch_format_cfg_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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_format_cfg_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)); + } + + return SRSASN_SUCCESS; +} +void pucch_format_cfg_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.end_obj(); +} + +const char* pucch_format_cfg_s::nrof_slots_opts::to_string() const +{ + static const char* names[] = {"n2", "n4", "n8"}; + return convert_enum_idx(names, 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 numbers[] = {2, 4, 8}; + return map_enum_number(numbers, 3, value, "pucch_format_cfg_s::nrof_slots_e_"); +} + +// PUCCH-FormatConfigExt-r17 ::= SEQUENCE +SRSASN_CODE pucch_format_cfg_ext_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(max_code_rate_lp_r17_present, 1)); + + if (max_code_rate_lp_r17_present) { + HANDLE_CODE(max_code_rate_lp_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_format_cfg_ext_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(max_code_rate_lp_r17_present, 1)); + + if (max_code_rate_lp_r17_present) { + HANDLE_CODE(max_code_rate_lp_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pucch_format_cfg_ext_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (max_code_rate_lp_r17_present) { + j.write_str("maxCodeRateLP-r17", max_code_rate_lp_r17.to_string()); + } + j.end_obj(); +} + +// 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(pathloss_ref_rss.size() > 0, 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, p0_set, 1, 8)); + } + if (pathloss_ref_rss.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, pathloss_ref_rss, 1, 4)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= pathloss_ref_rss_v1610.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pathloss_ref_rss_v1610.is_present(), 1)); + if (pathloss_ref_rss_v1610.is_present()) { + HANDLE_CODE(pathloss_ref_rss_v1610->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_pwr_ctrl_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)); + bool p0_set_present; + HANDLE_CODE(bref.unpack(p0_set_present, 1)); + bool pathloss_ref_rss_present; + HANDLE_CODE(bref.unpack(pathloss_ref_rss_present, 1)); + HANDLE_CODE(bref.unpack(two_pucch_pc_adjustment_states_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)); + } + if (pathloss_ref_rss_present) { + HANDLE_CODE(unpack_dyn_seq_of(pathloss_ref_rss, 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); + + unpack_presence_flag(pathloss_ref_rss_v1610, bref); + if (pathloss_ref_rss_v1610.is_present()) { + HANDLE_CODE(pathloss_ref_rss_v1610->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void pucch_pwr_ctrl_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.size() > 0) { + j.start_array("p0-Set"); + for (const auto& e1 : p0_set) { + e1.to_json(j); + } + j.end_array(); + } + if (pathloss_ref_rss.size() > 0) { + 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"); + } + if (ext) { + if (pathloss_ref_rss_v1610.is_present()) { + j.write_fieldname("pathlossReferenceRSs-v1610"); + pathloss_ref_rss_v1610->to_json(j); + } + } + j.end_obj(); +} + +// PUCCH-PowerControlSetInfo-r17 ::= SEQUENCE +SRSASN_CODE pucch_pwr_ctrl_set_info_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pucch_pwr_ctrl_set_info_id_r17, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pack_integer(bref, p0_pucch_id_r17, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pucch_closed_loop_idx_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, pucch_pathloss_ref_rs_id_r17, (uint8_t)0u, (uint8_t)7u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_pwr_ctrl_set_info_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pucch_pwr_ctrl_set_info_id_r17, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(unpack_integer(p0_pucch_id_r17, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pucch_closed_loop_idx_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(pucch_pathloss_ref_rs_id_r17, bref, (uint8_t)0u, (uint8_t)7u)); + + return SRSASN_SUCCESS; +} +void pucch_pwr_ctrl_set_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("pucch-PowerControlSetInfoId-r17", pucch_pwr_ctrl_set_info_id_r17); + j.write_int("p0-PUCCH-Id-r17", p0_pucch_id_r17); + j.write_str("pucch-ClosedLoopIndex-r17", pucch_closed_loop_idx_r17.to_string()); + j.write_int("pucch-PathlossReferenceRS-Id-r17", pucch_pathloss_ref_rs_id_r17); + j.end_obj(); +} + +const char* pucch_pwr_ctrl_set_info_r17_s::pucch_closed_loop_idx_r17_opts::to_string() const +{ + static const char* names[] = {"i0", "i1"}; + return convert_enum_idx(names, 2, value, "pucch_pwr_ctrl_set_info_r17_s::pucch_closed_loop_idx_r17_e_"); +} +uint8_t pucch_pwr_ctrl_set_info_r17_s::pucch_closed_loop_idx_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "pucch_pwr_ctrl_set_info_r17_s::pucch_closed_loop_idx_r17_e_"); +} + +// 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)); + } + 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 (second_hop_prb_present) { + j.write_int("secondHopPRB", second_hop_prb); + } + j.write_fieldname("format"); + format.to_json(j); + j.end_obj(); +} + +void pucch_res_s::format_c_::destroy_() +{ + 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; + } +} +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_"); + } +} +pucch_res_s::format_c_::format_c_(const pucch_res_s::format_c_& other) +{ + 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_"); + } +} +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 *this; +} +pucch_format0_s& pucch_res_s::format_c_::set_format0() +{ + set(types::format0); + return c.get(); +} +pucch_format1_s& pucch_res_s::format_c_::set_format1() +{ + set(types::format1); + return c.get(); +} +pucch_format2_s& pucch_res_s::format_c_::set_format2() +{ + set(types::format2); + return c.get(); +} +pucch_format3_s& pucch_res_s::format_c_::set_format3() +{ + set(types::format3); + return c.get(); +} +pucch_format4_s& pucch_res_s::format_c_::set_format4() +{ + set(types::format4); + return c.get(); +} +void pucch_res_s::format_c_::to_json(json_writer& j) const +{ + j.start_obj(); + 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_"); + } + 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; + } + 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; + } + return SRSASN_SUCCESS; +} + +const char* pucch_res_s::format_c_::types_opts::to_string() const +{ + static const char* names[] = {"format0", "format1", "format2", "format3", "format4"}; + return convert_enum_idx(names, 5, value, "pucch_res_s::format_c_::types"); +} +uint8_t pucch_res_s::format_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2, 3, 4}; + return map_enum_number(numbers, 5, value, "pucch_res_s::format_c_::types"); +} + +// PUCCH-ResourceExt-v1610 ::= SEQUENCE +SRSASN_CODE pucch_res_ext_v1610_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(interlace_alloc_r16_present, 1)); + HANDLE_CODE(bref.pack(format_v1610_present, 1)); + + if (interlace_alloc_r16_present) { + HANDLE_CODE(pack_integer(bref, interlace_alloc_r16.rb_set_idx_r16, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(interlace_alloc_r16.interlace0_r16.pack(bref)); + } + if (format_v1610_present) { + HANDLE_CODE(format_v1610.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= format_v1700.is_present(); + group_flags[0] |= pucch_repeat_nrof_slots_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(format_v1700.is_present(), 1)); + HANDLE_CODE(bref.pack(pucch_repeat_nrof_slots_r17_present, 1)); + if (format_v1700.is_present()) { + HANDLE_CODE(pack_integer(bref, format_v1700->nrof_prbs_r17, (uint8_t)1u, (uint8_t)16u)); + } + if (pucch_repeat_nrof_slots_r17_present) { + HANDLE_CODE(pucch_repeat_nrof_slots_r17.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_res_ext_v1610_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(interlace_alloc_r16_present, 1)); + HANDLE_CODE(bref.unpack(format_v1610_present, 1)); + + if (interlace_alloc_r16_present) { + HANDLE_CODE(unpack_integer(interlace_alloc_r16.rb_set_idx_r16, bref, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(interlace_alloc_r16.interlace0_r16.unpack(bref)); + } + if (format_v1610_present) { + HANDLE_CODE(format_v1610.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); + + unpack_presence_flag(format_v1700, bref); + HANDLE_CODE(bref.unpack(pucch_repeat_nrof_slots_r17_present, 1)); + if (format_v1700.is_present()) { + HANDLE_CODE(unpack_integer(format_v1700->nrof_prbs_r17, bref, (uint8_t)1u, (uint8_t)16u)); + } + if (pucch_repeat_nrof_slots_r17_present) { + HANDLE_CODE(pucch_repeat_nrof_slots_r17.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void pucch_res_ext_v1610_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (interlace_alloc_r16_present) { + j.write_fieldname("interlaceAllocation-r16"); + j.start_obj(); + j.write_int("rb-SetIndex-r16", interlace_alloc_r16.rb_set_idx_r16); + j.write_fieldname("interlace0-r16"); + interlace_alloc_r16.interlace0_r16.to_json(j); + j.end_obj(); + } + if (format_v1610_present) { + j.write_fieldname("format-v1610"); + format_v1610.to_json(j); + } + if (ext) { + if (format_v1700.is_present()) { + j.write_fieldname("format-v1700"); + j.start_obj(); + j.write_int("nrofPRBs-r17", format_v1700->nrof_prbs_r17); + j.end_obj(); + } + if (pucch_repeat_nrof_slots_r17_present) { + j.write_str("pucch-RepetitionNrofSlots-r17", pucch_repeat_nrof_slots_r17.to_string()); + } + } + j.end_obj(); +} + +void pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::destroy_() {} +void pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::interlace0_r16_c_( + const pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::scs15: + c.init(other.c.get()); + break; + case types::scs30: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_"); + } +} +pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_& +pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::operator=( + const pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::scs15: + c.set(other.c.get()); + break; + case types::scs30: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_"); + } + + return *this; +} +uint8_t& pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::set_scs15() +{ + set(types::scs15); + return c.get(); +} +uint8_t& pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::set_scs30() +{ + set(types::scs30); + return c.get(); +} +void pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scs15: + j.write_int("scs15", c.get()); + break; + case types::scs30: + j.write_int("scs30", c.get()); + break; + default: + log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::scs15: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); + break; + case types::scs30: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); + break; + default: + log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::scs15: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); + break; + case types::scs30: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); + break; + default: + log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"scs15", "scs30"}; + return convert_enum_idx(names, 2, value, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::types"); +} +uint8_t pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {15, 30}; + return map_enum_number(numbers, 2, value, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::types"); +} + +void pucch_res_ext_v1610_s::format_v1610_c_::destroy_() +{ + switch (type_) { + case types::occ_v1610: + c.destroy(); + break; + default: + break; + } +} +void pucch_res_ext_v1610_s::format_v1610_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::interlace1_v1610: + break; + case types::occ_v1610: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::format_v1610_c_"); + } +} +pucch_res_ext_v1610_s::format_v1610_c_::format_v1610_c_(const pucch_res_ext_v1610_s::format_v1610_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::interlace1_v1610: + c.init(other.c.get()); + break; + case types::occ_v1610: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::format_v1610_c_"); + } +} +pucch_res_ext_v1610_s::format_v1610_c_& +pucch_res_ext_v1610_s::format_v1610_c_::operator=(const pucch_res_ext_v1610_s::format_v1610_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::interlace1_v1610: + c.set(other.c.get()); + break; + case types::occ_v1610: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::format_v1610_c_"); + } + + return *this; +} +uint8_t& pucch_res_ext_v1610_s::format_v1610_c_::set_interlace1_v1610() +{ + set(types::interlace1_v1610); + return c.get(); +} +pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_& pucch_res_ext_v1610_s::format_v1610_c_::set_occ_v1610() +{ + set(types::occ_v1610); + return c.get(); +} +void pucch_res_ext_v1610_s::format_v1610_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::interlace1_v1610: + j.write_int("interlace1-v1610", c.get()); + break; + case types::occ_v1610: + j.write_fieldname("occ-v1610"); + j.start_obj(); + if (c.get().occ_len_v1610_present) { + j.write_str("occ-Length-v1610", c.get().occ_len_v1610.to_string()); + } + if (c.get().occ_idx_v1610_present) { + j.write_str("occ-Index-v1610", c.get().occ_idx_v1610.to_string()); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::format_v1610_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_res_ext_v1610_s::format_v1610_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::interlace1_v1610: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); + break; + case types::occ_v1610: + HANDLE_CODE(bref.pack(c.get().occ_len_v1610_present, 1)); + HANDLE_CODE(bref.pack(c.get().occ_idx_v1610_present, 1)); + if (c.get().occ_len_v1610_present) { + HANDLE_CODE(c.get().occ_len_v1610.pack(bref)); + } + if (c.get().occ_idx_v1610_present) { + HANDLE_CODE(c.get().occ_idx_v1610.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::format_v1610_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_res_ext_v1610_s::format_v1610_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::interlace1_v1610: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); + break; + case types::occ_v1610: + HANDLE_CODE(bref.unpack(c.get().occ_len_v1610_present, 1)); + HANDLE_CODE(bref.unpack(c.get().occ_idx_v1610_present, 1)); + if (c.get().occ_len_v1610_present) { + HANDLE_CODE(c.get().occ_len_v1610.unpack(bref)); + } + if (c.get().occ_idx_v1610_present) { + HANDLE_CODE(c.get().occ_idx_v1610.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::format_v1610_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_len_v1610_opts::to_string() const +{ + static const char* names[] = {"n2", "n4"}; + return convert_enum_idx(names, 2, value, "pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_len_v1610_e_"); +} +uint8_t pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_len_v1610_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4}; + return map_enum_number(numbers, 2, value, "pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_len_v1610_e_"); +} + +const char* pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_idx_v1610_opts::to_string() const +{ + static const char* names[] = {"n0", "n1", "n2", "n3"}; + return convert_enum_idx(names, 4, value, "pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_idx_v1610_e_"); +} +uint8_t pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_idx_v1610_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2, 3}; + return map_enum_number(numbers, 4, value, "pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_idx_v1610_e_"); +} + +const char* pucch_res_ext_v1610_s::format_v1610_c_::types_opts::to_string() const +{ + static const char* names[] = {"interlace1-v1610", "occ-v1610"}; + return convert_enum_idx(names, 2, value, "pucch_res_ext_v1610_s::format_v1610_c_::types"); +} +uint8_t pucch_res_ext_v1610_s::format_v1610_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "pucch_res_ext_v1610_s::format_v1610_c_::types"); +} + +const char* pucch_res_ext_v1610_s::pucch_repeat_nrof_slots_r17_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n4", "n8"}; + return convert_enum_idx(names, 4, value, "pucch_res_ext_v1610_s::pucch_repeat_nrof_slots_r17_e_"); +} +uint8_t pucch_res_ext_v1610_s::pucch_repeat_nrof_slots_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "pucch_res_ext_v1610_s::pucch_repeat_nrof_slots_r17_e_"); +} + +// PUCCH-ResourceGroup-r16 ::= SEQUENCE +SRSASN_CODE pucch_res_group_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pucch_res_group_id_r16, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(pack_dyn_seq_of(bref, res_per_group_list_r16, 1, 128, integer_packer(0, 127))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_res_group_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pucch_res_group_id_r16, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(unpack_dyn_seq_of(res_per_group_list_r16, bref, 1, 128, integer_packer(0, 127))); + + return SRSASN_SUCCESS; +} +void pucch_res_group_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("pucch-ResourceGroupId-r16", pucch_res_group_id_r16); + j.start_array("resourcePerGroupList-r16"); + for (const auto& e1 : res_per_group_list_r16) { + j.write_int(e1); + } + j.end_array(); + j.end_obj(); +} + +// PUCCH-ResourceSet ::= SEQUENCE +SRSASN_CODE pucch_res_set_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(max_payload_size_present, 1)); + + 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 pucch_res_set_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(max_payload_size_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_size_present) { + HANDLE_CODE(unpack_integer(max_payload_size, bref, (uint16_t)4u, (uint16_t)256u)); + } + + return SRSASN_SUCCESS; +} +void pucch_res_set_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("pucch-ResourceSetId", pucch_res_set_id); + j.start_array("resourceList"); + for (const auto& e1 : res_list) { + j.write_int(e1); + } + j.end_array(); + if (max_payload_size_present) { + j.write_int("maxPayloadSize", max_payload_size); + } + 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_() +{ + switch (type_) { + case types::srs: + c.destroy(); + break; + default: + break; + } +} +void pucch_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_, "pucch_spatial_relation_info_s::ref_sig_c_"); + } +} +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::ssb_idx: + c.init(other.c.get()); + break; + 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_, "pucch_spatial_relation_info_s::ref_sig_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) +{ + 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::srs: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); + } + + return *this; +} +uint8_t& pucch_spatial_relation_info_s::ref_sig_c_::set_ssb_idx() +{ + set(types::ssb_idx); + return c.get(); +} +uint8_t& pucch_spatial_relation_info_s::ref_sig_c_::set_csi_rs_idx() +{ + set(types::csi_rs_idx); + return c.get(); +} +pucch_srs_s& pucch_spatial_relation_info_s::ref_sig_c_::set_srs() +{ + set(types::srs); + return c.get(); +} +void pucch_spatial_relation_info_s::ref_sig_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()); + break; + case types::srs: + j.write_fieldname("srs"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_spatial_relation_info_s::ref_sig_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; + case types::srs: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::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; + case types::srs: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pucch_spatial_relation_info_s::ref_sig_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-Index", "csi-RS-Index", "srs"}; + return convert_enum_idx(names, 3, value, "pucch_spatial_relation_info_s::ref_sig_c_::types"); +} + +const char* pucch_spatial_relation_info_s::closed_loop_idx_opts::to_string() const +{ + static const char* names[] = {"i0", "i1"}; + return convert_enum_idx(names, 2, value, "pucch_spatial_relation_info_s::closed_loop_idx_e_"); +} +uint8_t pucch_spatial_relation_info_s::closed_loop_idx_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "pucch_spatial_relation_info_s::closed_loop_idx_e_"); +} + +// PUCCH-SpatialRelationInfoExt-r16 ::= SEQUENCE +SRSASN_CODE pucch_spatial_relation_info_ext_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pucch_spatial_relation_info_id_v1610_present, 1)); + HANDLE_CODE(bref.pack(pucch_pathloss_ref_rs_id_v1610_present, 1)); + + if (pucch_spatial_relation_info_id_v1610_present) { + HANDLE_CODE(pack_integer(bref, pucch_spatial_relation_info_id_v1610, (uint8_t)9u, (uint8_t)64u)); + } + if (pucch_pathloss_ref_rs_id_v1610_present) { + HANDLE_CODE(pack_integer(bref, pucch_pathloss_ref_rs_id_v1610, (uint8_t)4u, (uint8_t)63u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_spatial_relation_info_ext_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pucch_spatial_relation_info_id_v1610_present, 1)); + HANDLE_CODE(bref.unpack(pucch_pathloss_ref_rs_id_v1610_present, 1)); + + if (pucch_spatial_relation_info_id_v1610_present) { + HANDLE_CODE(unpack_integer(pucch_spatial_relation_info_id_v1610, bref, (uint8_t)9u, (uint8_t)64u)); + } + if (pucch_pathloss_ref_rs_id_v1610_present) { + HANDLE_CODE(unpack_integer(pucch_pathloss_ref_rs_id_v1610, bref, (uint8_t)4u, (uint8_t)63u)); + } + + return SRSASN_SUCCESS; +} +void pucch_spatial_relation_info_ext_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pucch_spatial_relation_info_id_v1610_present) { + j.write_int("pucch-SpatialRelationInfoId-v1610", pucch_spatial_relation_info_id_v1610); + } + if (pucch_pathloss_ref_rs_id_v1610_present) { + j.write_int("pucch-PathlossReferenceRS-Id-v1610", pucch_pathloss_ref_rs_id_v1610); + } + j.end_obj(); +} + +// 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; +} +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::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_, "pusch_pathloss_ref_rs_s::ref_sig_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) +{ + 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_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); + } + + return *this; +} +uint8_t& pusch_pathloss_ref_rs_s::ref_sig_c_::set_ssb_idx() +{ + set(types::ssb_idx); + return c.get(); +} +uint8_t& pusch_pathloss_ref_rs_s::ref_sig_c_::set_csi_rs_idx() +{ + set(types::csi_rs_idx); + return c.get(); +} +void pusch_pathloss_ref_rs_s::ref_sig_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()); + break; + default: + log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); + } + j.end_obj(); +} +SRSASN_CODE pusch_pathloss_ref_rs_s::ref_sig_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_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::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_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pusch_pathloss_ref_rs_s::ref_sig_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-Index", "csi-RS-Index"}; + return convert_enum_idx(names, 2, value, "pusch_pathloss_ref_rs_s::ref_sig_c_::types"); +} + +// PUSCH-PathlossReferenceRS-r16 ::= SEQUENCE +SRSASN_CODE pusch_pathloss_ref_rs_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pusch_pathloss_ref_rs_id_r16, (uint8_t)4u, (uint8_t)63u)); + HANDLE_CODE(ref_sig_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_pathloss_ref_rs_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pusch_pathloss_ref_rs_id_r16, bref, (uint8_t)4u, (uint8_t)63u)); + HANDLE_CODE(ref_sig_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pusch_pathloss_ref_rs_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("pusch-PathlossReferenceRS-Id-r16", pusch_pathloss_ref_rs_id_r16); + j.write_fieldname("referenceSignal-r16"); + ref_sig_r16.to_json(j); + j.end_obj(); +} + +void pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::destroy_() {} +void pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::ref_sig_r16_c_(const pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ssb_idx_r16: + c.init(other.c.get()); + break; + case types::csi_rs_idx_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); + } +} +pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_& +pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::operator=(const pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ssb_idx_r16: + c.set(other.c.get()); + break; + case types::csi_rs_idx_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); + } + + return *this; +} +uint8_t& pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::set_ssb_idx_r16() +{ + set(types::ssb_idx_r16); + return c.get(); +} +uint8_t& pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::set_csi_rs_idx_r16() +{ + set(types::csi_rs_idx_r16); + return c.get(); +} +void pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ssb_idx_r16: + j.write_int("ssb-Index-r16", c.get()); + break; + case types::csi_rs_idx_r16: + j.write_int("csi-RS-Index-r16", c.get()); + break; + default: + log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ssb_idx_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::csi_rs_idx_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + break; + default: + log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ssb_idx_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::csi_rs_idx_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + break; + default: + log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-Index-r16", "csi-RS-Index-r16"}; + return convert_enum_idx(names, 2, value, "pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::types"); +} + +// PUSCH-TimeDomainResourceAllocation-r16 ::= SEQUENCE +SRSASN_CODE pusch_time_domain_res_alloc_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(k2_r16_present, 1)); + + if (k2_r16_present) { + HANDLE_CODE(pack_integer(bref, k2_r16, (uint8_t)0u, (uint8_t)32u)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, pusch_alloc_list_r16, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_time_domain_res_alloc_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(k2_r16_present, 1)); + + if (k2_r16_present) { + HANDLE_CODE(unpack_integer(k2_r16, bref, (uint8_t)0u, (uint8_t)32u)); + } + HANDLE_CODE(unpack_dyn_seq_of(pusch_alloc_list_r16, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void pusch_time_domain_res_alloc_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (k2_r16_present) { + j.write_int("k2-r16", k2_r16); + } + j.start_array("puschAllocationList-r16"); + for (const auto& e1 : pusch_alloc_list_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// SRI-PUSCH-PowerControl ::= SEQUENCE +SRSASN_CODE sri_pusch_pwr_ctrl_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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sri_pusch_pwr_ctrl_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)); + + return SRSASN_SUCCESS; +} +void sri_pusch_pwr_ctrl_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.end_obj(); +} + +const char* sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_opts::to_string() const +{ + static const char* names[] = {"i0", "i1"}; + return convert_enum_idx(names, 2, value, "sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_e_"); +} +uint8_t sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_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 sched_request_res_cfg_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)); + } + + return SRSASN_SUCCESS; +} +void sched_request_res_cfg_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.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) +{ + type_ = other.type(); + switch (type_) { + case types::sym2: + break; + 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_, "sched_request_res_cfg_s::periodicity_and_offset_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) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sym2: + break; + 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_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); + } + + return *this; +} +void sched_request_res_cfg_s::periodicity_and_offset_c_::set_sym2() +{ + set(types::sym2); +} +void sched_request_res_cfg_s::periodicity_and_offset_c_::set_sym6or7() +{ + set(types::sym6or7); +} +void sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl1() +{ + set(types::sl1); +} +uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl2() +{ + set(types::sl2); + return c.get(); +} +uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl4() +{ + set(types::sl4); + return c.get(); +} +uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl5() +{ + set(types::sl5); + return c.get(); +} +uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl8() +{ + set(types::sl8); + return c.get(); +} +uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl10() +{ + set(types::sl10); + return c.get(); +} +uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl16() +{ + set(types::sl16); + return c.get(); +} +uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl20() +{ + set(types::sl20); + return c.get(); +} +uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl40() +{ + set(types::sl40); + return c.get(); +} +uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl80() +{ + set(types::sl80); + return c.get(); +} +uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl160() +{ + set(types::sl160); + return c.get(); +} +uint16_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl320() +{ + set(types::sl320); + return c.get(); +} +uint16_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl640() +{ + set(types::sl640); + return c.get(); +} +void sched_request_res_cfg_s::periodicity_and_offset_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()); + 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_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); + } + j.end_obj(); +} +SRSASN_CODE sched_request_res_cfg_s::periodicity_and_offset_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)); + break; + case types::sl640: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + break; + default: + log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::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)); + break; + case types::sl640: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + break; + default: + log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* sched_request_res_cfg_s::periodicity_and_offset_c_::types_opts::to_string() const +{ + static const char* names[] = {"sym2", + "sym6or7", + "sl1", + "sl2", + "sl4", + "sl5", + "sl8", + "sl10", + "sl16", + "sl20", + "sl40", + "sl80", + "sl160", + "sl320", + "sl640"}; + return convert_enum_idx(names, 15, value, "sched_request_res_cfg_s::periodicity_and_offset_c_::types"); +} + +// SchedulingRequestResourceConfigExt-v1610 ::= SEQUENCE +SRSASN_CODE sched_request_res_cfg_ext_v1610_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(phy_prio_idx_r16_present, 1)); + + if (phy_prio_idx_r16_present) { + HANDLE_CODE(phy_prio_idx_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_request_res_cfg_ext_v1610_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(phy_prio_idx_r16_present, 1)); + + if (phy_prio_idx_r16_present) { + HANDLE_CODE(phy_prio_idx_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sched_request_res_cfg_ext_v1610_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (phy_prio_idx_r16_present) { + j.write_str("phy-PriorityIndex-r16", phy_prio_idx_r16.to_string()); + } + j.end_obj(); +} + +const char* sched_request_res_cfg_ext_v1610_s::phy_prio_idx_r16_opts::to_string() const +{ + static const char* names[] = {"p0", "p1"}; + return convert_enum_idx(names, 2, value, "sched_request_res_cfg_ext_v1610_s::phy_prio_idx_r16_e_"); +} +uint8_t sched_request_res_cfg_ext_v1610_s::phy_prio_idx_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "sched_request_res_cfg_ext_v1610_s::phy_prio_idx_r16_e_"); +} + +// SchedulingRequestResourceConfigExt-v1700 ::= SEQUENCE +SRSASN_CODE sched_request_res_cfg_ext_v1700_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(periodicity_and_offset_r17_present, 1)); + + if (periodicity_and_offset_r17_present) { + HANDLE_CODE(periodicity_and_offset_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_request_res_cfg_ext_v1700_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(periodicity_and_offset_r17_present, 1)); + + if (periodicity_and_offset_r17_present) { + HANDLE_CODE(periodicity_and_offset_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sched_request_res_cfg_ext_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (periodicity_and_offset_r17_present) { + j.write_fieldname("periodicityAndOffset-r17"); + periodicity_and_offset_r17.to_json(j); + } + j.end_obj(); +} + +void sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::destroy_() {} +void sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::periodicity_and_offset_r17_c_( + const sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sl1280: + c.init(other.c.get()); + break; + case types::sl2560: + c.init(other.c.get()); + break; + case types::sl5120: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_"); + } +} +sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_& +sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::operator=( + const sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sl1280: + c.set(other.c.get()); + break; + case types::sl2560: + c.set(other.c.get()); + break; + case types::sl5120: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_"); + } + + return *this; +} +uint16_t& sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::set_sl1280() +{ + set(types::sl1280); + return c.get(); +} +uint16_t& sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::set_sl2560() +{ + set(types::sl2560); + return c.get(); +} +uint16_t& sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::set_sl5120() +{ + set(types::sl5120); + return c.get(); +} +void sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sl1280: + j.write_int("sl1280", c.get()); + break; + case types::sl2560: + j.write_int("sl2560", c.get()); + break; + case types::sl5120: + j.write_int("sl5120", c.get()); + break; + default: + log_invalid_choice_id(type_, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + 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; + case types::sl5120: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); + break; + default: + log_invalid_choice_id(type_, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + 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; + case types::sl5120: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); + break; + default: + log_invalid_choice_id(type_, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"sl1280", "sl2560", "sl5120"}; + return convert_enum_idx(names, 3, value, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::types"); +} +uint16_t sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {1280, 2560, 5120}; + return map_enum_number(numbers, 3, value, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::types"); +} + +// UCI-OnPUSCH ::= SEQUENCE +SRSASN_CODE uci_on_pusch_s::pack(bit_ref& bref) const +{ + 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 uci_on_pusch_s::unpack(cbit_ref& 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 uci_on_pusch_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_str("scaling", scaling.to_string()); + j.end_obj(); +} + +void uci_on_pusch_s::beta_offsets_c_::destroy_() +{ + switch (type_) { + case types::dyn: + c.destroy(); + break; + case types::semi_static: + c.destroy(); + break; + default: + break; + } +} +void uci_on_pusch_s::beta_offsets_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::dyn: + c.init(); + break; + case types::semi_static: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); + } +} +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::dyn: + 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_, "uci_on_pusch_s::beta_offsets_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) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::dyn: + 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_, "uci_on_pusch_s::beta_offsets_c_"); + } + + return *this; +} +uci_on_pusch_s::beta_offsets_c_::dyn_l_& uci_on_pusch_s::beta_offsets_c_::set_dyn() +{ + set(types::dyn); + return c.get(); +} +beta_offsets_s& uci_on_pusch_s::beta_offsets_c_::set_semi_static() +{ + set(types::semi_static); + return c.get(); +} +void uci_on_pusch_s::beta_offsets_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::dyn: + 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_, "uci_on_pusch_s::beta_offsets_c_"); + } + j.end_obj(); +} +SRSASN_CODE uci_on_pusch_s::beta_offsets_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::dyn: + HANDLE_CODE(pack_fixed_seq_of(bref, c.get(), c.get().size())); + break; + case types::semi_static: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE uci_on_pusch_s::beta_offsets_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::dyn: + HANDLE_CODE(unpack_fixed_seq_of(c.get(), bref, c.get().size())); + break; + case types::semi_static: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* uci_on_pusch_s::beta_offsets_c_::types_opts::to_string() const +{ + static const char* names[] = {"dynamic", "semiStatic"}; + return convert_enum_idx(names, 2, value, "uci_on_pusch_s::beta_offsets_c_::types"); +} + +const char* uci_on_pusch_s::scaling_opts::to_string() const +{ + static const char* names[] = {"f0p5", "f0p65", "f0p8", "f1"}; + return convert_enum_idx(names, 4, value, "uci_on_pusch_s::scaling_e_"); +} + +// UCI-OnPUSCH-DCI-0-2-r16 ::= SEQUENCE +SRSASN_CODE uci_on_pusch_dci_0_2_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(beta_offsets_dci_0_2_r16_present, 1)); + + if (beta_offsets_dci_0_2_r16_present) { + HANDLE_CODE(beta_offsets_dci_0_2_r16.pack(bref)); + } + HANDLE_CODE(scaling_dci_0_2_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE uci_on_pusch_dci_0_2_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(beta_offsets_dci_0_2_r16_present, 1)); + + if (beta_offsets_dci_0_2_r16_present) { + HANDLE_CODE(beta_offsets_dci_0_2_r16.unpack(bref)); + } + HANDLE_CODE(scaling_dci_0_2_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void uci_on_pusch_dci_0_2_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (beta_offsets_dci_0_2_r16_present) { + j.write_fieldname("betaOffsetsDCI-0-2-r16"); + beta_offsets_dci_0_2_r16.to_json(j); + } + j.write_str("scalingDCI-0-2-r16", scaling_dci_0_2_r16.to_string()); + j.end_obj(); +} + +void uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::destroy_() +{ + switch (type_) { + case types::dyn_dci_0_2_r16: + c.destroy(); + break; + case types::semi_static_dci_0_2_r16: + c.destroy(); + break; + default: + break; + } +} +void uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::dyn_dci_0_2_r16: + c.init(); + break; + case types::semi_static_dci_0_2_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_"); + } +} +uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::beta_offsets_dci_0_2_r16_c_( + const uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::dyn_dci_0_2_r16: + c.init(other.c.get()); + break; + case types::semi_static_dci_0_2_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_"); + } +} +uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_& +uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::operator=( + const uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::dyn_dci_0_2_r16: + c.set(other.c.get()); + break; + case types::semi_static_dci_0_2_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_"); + } + + return *this; +} +uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_& +uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::set_dyn_dci_0_2_r16() +{ + set(types::dyn_dci_0_2_r16); + return c.get(); +} +beta_offsets_s& uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::set_semi_static_dci_0_2_r16() +{ + set(types::semi_static_dci_0_2_r16); + return c.get(); +} +void uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::dyn_dci_0_2_r16: + j.write_fieldname("dynamicDCI-0-2-r16"); + c.get().to_json(j); + break; + case types::semi_static_dci_0_2_r16: + j.write_fieldname("semiStaticDCI-0-2-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::dyn_dci_0_2_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::semi_static_dci_0_2_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::dyn_dci_0_2_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::semi_static_dci_0_2_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::destroy_() +{ + switch (type_) { + case types::one_bit_r16: + c.destroy(); + break; + case types::two_bits_r16: + c.destroy(); + break; + default: + break; + } +} +void uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::one_bit_r16: + c.init(); + break; + case types::two_bits_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_"); + } +} +uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_( + const uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::one_bit_r16: + c.init(other.c.get()); + break; + case types::two_bits_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_"); + } +} +uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_& +uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::operator=( + const uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::one_bit_r16: + c.set(other.c.get()); + break; + case types::two_bits_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_"); + } + + return *this; +} +uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::one_bit_r16_l_& +uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::set_one_bit_r16() +{ + set(types::one_bit_r16); + return c.get(); +} +uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::two_bits_r16_l_& +uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::set_two_bits_r16() +{ + set(types::two_bits_r16); + return c.get(); +} +void uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::one_bit_r16: + j.start_array("oneBit-r16"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::two_bits_r16: + j.start_array("twoBits-r16"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::one_bit_r16: + HANDLE_CODE(pack_fixed_seq_of(bref, c.get(), c.get().size())); + break; + case types::two_bits_r16: + HANDLE_CODE(pack_fixed_seq_of(bref, c.get(), c.get().size())); + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::one_bit_r16: + HANDLE_CODE(unpack_fixed_seq_of(c.get(), bref, c.get().size())); + break; + case types::two_bits_r16: + HANDLE_CODE(unpack_fixed_seq_of(c.get(), bref, c.get().size())); + break; + default: + log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"oneBit-r16", "twoBits-r16"}; + return convert_enum_idx( + names, 2, value, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::types"); +} +uint8_t uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number( + numbers, 2, value, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::types"); +} + +const char* uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"dynamicDCI-0-2-r16", "semiStaticDCI-0-2-r16"}; + return convert_enum_idx(names, 2, value, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::types"); +} + +const char* uci_on_pusch_dci_0_2_r16_s::scaling_dci_0_2_r16_opts::to_string() const +{ + static const char* names[] = {"f0p5", "f0p65", "f0p8", "f1"}; + return convert_enum_idx(names, 4, value, "uci_on_pusch_dci_0_2_r16_s::scaling_dci_0_2_r16_e_"); +} + +// BetaOffsetsCrossPriSel-r17 ::= CHOICE +void beta_offsets_cross_pri_sel_r17_c::destroy_() +{ + switch (type_) { + case types::dyn_r17: + c.destroy(); + break; + case types::semi_static_r17: + c.destroy(); + break; + default: + break; + } +} +void beta_offsets_cross_pri_sel_r17_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::dyn_r17: + c.init(); + break; + case types::semi_static_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_r17_c"); + } +} +beta_offsets_cross_pri_sel_r17_c::beta_offsets_cross_pri_sel_r17_c(const beta_offsets_cross_pri_sel_r17_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::dyn_r17: + c.init(other.c.get()); + break; + case types::semi_static_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_r17_c"); + } +} +beta_offsets_cross_pri_sel_r17_c& +beta_offsets_cross_pri_sel_r17_c::operator=(const beta_offsets_cross_pri_sel_r17_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::dyn_r17: + c.set(other.c.get()); + break; + case types::semi_static_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_r17_c"); + } + + return *this; +} +beta_offsets_cross_pri_sel_r17_c::dyn_r17_l_& beta_offsets_cross_pri_sel_r17_c::set_dyn_r17() +{ + set(types::dyn_r17); + return c.get(); +} +beta_offsets_cross_pri_r17_l& beta_offsets_cross_pri_sel_r17_c::set_semi_static_r17() +{ + set(types::semi_static_r17); + return c.get(); +} +void beta_offsets_cross_pri_sel_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::dyn_r17: + j.start_array("dynamic-r17"); + for (const auto& e1 : c.get()) { + j.start_array(); + for (const auto& e2 : e1) { + j.write_int(e2); + } + j.end_array(); + } + j.end_array(); + break; + case types::semi_static_r17: + j.start_array("semiStatic-r17"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE beta_offsets_cross_pri_sel_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::dyn_r17: + HANDLE_CODE(pack_fixed_seq_of(bref, + c.get(), + c.get().size(), + FixedSeqOfPacker>(3, integer_packer(0, 31)))); + break; + case types::semi_static_r17: + HANDLE_CODE(pack_fixed_seq_of(bref, + c.get(), + c.get().size(), + integer_packer(0, 31))); + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE beta_offsets_cross_pri_sel_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::dyn_r17: + HANDLE_CODE(unpack_fixed_seq_of(c.get(), + bref, + c.get().size(), + FixedSeqOfPacker>(3, integer_packer(0, 31)))); + break; + case types::semi_static_r17: + HANDLE_CODE(unpack_fixed_seq_of(c.get(), + bref, + c.get().size(), + integer_packer(0, 31))); + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* beta_offsets_cross_pri_sel_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"dynamic-r17", "semiStatic-r17"}; + return convert_enum_idx(names, 2, value, "beta_offsets_cross_pri_sel_r17_c::types"); +} + +// BetaOffsetsCrossPriSelDCI-0-2-r17 ::= CHOICE +void beta_offsets_cross_pri_sel_dci_0_2_r17_c::destroy_() +{ + switch (type_) { + case types::dyn_dci_0_2_r17: + c.destroy(); + break; + case types::semi_static_dci_0_2_r17: + c.destroy(); + break; + default: + break; + } +} +void beta_offsets_cross_pri_sel_dci_0_2_r17_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::dyn_dci_0_2_r17: + c.init(); + break; + case types::semi_static_dci_0_2_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c"); + } +} +beta_offsets_cross_pri_sel_dci_0_2_r17_c::beta_offsets_cross_pri_sel_dci_0_2_r17_c( + const beta_offsets_cross_pri_sel_dci_0_2_r17_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::dyn_dci_0_2_r17: + c.init(other.c.get()); + break; + case types::semi_static_dci_0_2_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c"); + } +} +beta_offsets_cross_pri_sel_dci_0_2_r17_c& +beta_offsets_cross_pri_sel_dci_0_2_r17_c::operator=(const beta_offsets_cross_pri_sel_dci_0_2_r17_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::dyn_dci_0_2_r17: + c.set(other.c.get()); + break; + case types::semi_static_dci_0_2_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c"); + } + + return *this; +} +beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_& +beta_offsets_cross_pri_sel_dci_0_2_r17_c::set_dyn_dci_0_2_r17() +{ + set(types::dyn_dci_0_2_r17); + return c.get(); +} +beta_offsets_cross_pri_r17_l& beta_offsets_cross_pri_sel_dci_0_2_r17_c::set_semi_static_dci_0_2_r17() +{ + set(types::semi_static_dci_0_2_r17); + return c.get(); +} +void beta_offsets_cross_pri_sel_dci_0_2_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::dyn_dci_0_2_r17: + j.write_fieldname("dynamicDCI-0-2-r17"); + c.get().to_json(j); + break; + case types::semi_static_dci_0_2_r17: + j.start_array("semiStaticDCI-0-2-r17"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE beta_offsets_cross_pri_sel_dci_0_2_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::dyn_dci_0_2_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::semi_static_dci_0_2_r17: + HANDLE_CODE(pack_fixed_seq_of(bref, + c.get(), + c.get().size(), + integer_packer(0, 31))); + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE beta_offsets_cross_pri_sel_dci_0_2_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::dyn_dci_0_2_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::semi_static_dci_0_2_r17: + HANDLE_CODE(unpack_fixed_seq_of(c.get(), + bref, + c.get().size(), + integer_packer(0, 31))); + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::destroy_() +{ + switch (type_) { + case types::one_bit_r17: + c.destroy(); + break; + case types::two_bits_r17: + c.destroy(); + break; + default: + break; + } +} +void beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::one_bit_r17: + c.init(); + break; + case types::two_bits_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_"); + } +} +beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::dyn_dci_0_2_r17_c_( + const beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::one_bit_r17: + c.init(other.c.get()); + break; + case types::two_bits_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_"); + } +} +beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_& +beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::operator=( + const beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::one_bit_r17: + c.set(other.c.get()); + break; + case types::two_bits_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_"); + } + + return *this; +} +beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::one_bit_r17_l_& +beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::set_one_bit_r17() +{ + set(types::one_bit_r17); + return c.get(); +} +beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::two_bits_r17_l_& +beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::set_two_bits_r17() +{ + set(types::two_bits_r17); + return c.get(); +} +void beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::one_bit_r17: + j.start_array("oneBit-r17"); + for (const auto& e1 : c.get()) { + j.start_array(); + for (const auto& e2 : e1) { + j.write_int(e2); + } + j.end_array(); + } + j.end_array(); + break; + case types::two_bits_r17: + j.start_array("twoBits-r17"); + for (const auto& e1 : c.get()) { + j.start_array(); + for (const auto& e2 : e1) { + j.write_int(e2); + } + j.end_array(); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::one_bit_r17: + HANDLE_CODE(pack_fixed_seq_of(bref, + c.get(), + c.get().size(), + FixedSeqOfPacker>(3, integer_packer(0, 31)))); + break; + case types::two_bits_r17: + HANDLE_CODE(pack_fixed_seq_of(bref, + c.get(), + c.get().size(), + FixedSeqOfPacker>(3, integer_packer(0, 31)))); + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::one_bit_r17: + HANDLE_CODE(unpack_fixed_seq_of(c.get(), + bref, + c.get().size(), + FixedSeqOfPacker>(3, integer_packer(0, 31)))); + break; + case types::two_bits_r17: + HANDLE_CODE(unpack_fixed_seq_of(c.get(), + bref, + c.get().size(), + FixedSeqOfPacker>(3, integer_packer(0, 31)))); + break; + default: + log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"oneBit-r17", "twoBits-r17"}; + return convert_enum_idx(names, 2, value, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::types"); +} +uint8_t beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::types"); +} + +const char* beta_offsets_cross_pri_sel_dci_0_2_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"dynamicDCI-0-2-r17", "semiStaticDCI-0-2-r17"}; + return convert_enum_idx(names, 2, value, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::types"); +} + +// ConfiguredGrantConfig ::= SEQUENCE +SRSASN_CODE cfg_grant_cfg_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(cfg_grant_timer_present, 1)); + HANDLE_CODE(bref.pack(rrc_cfg_ul_grant_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 (cfg_grant_timer_present) { + HANDLE_CODE(pack_integer(bref, cfg_grant_timer, (uint8_t)1u, (uint8_t)64u)); + } + if (rrc_cfg_ul_grant_present) { + HANDLE_CODE(rrc_cfg_ul_grant.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= cg_retx_timer_r16_present; + group_flags[0] |= cg_min_dfi_delay_r16_present; + group_flags[0] |= cg_nrof_pusch_in_slot_r16_present; + group_flags[0] |= cg_nrof_slots_r16_present; + group_flags[0] |= cg_start_offsets_r16.is_present(); + group_flags[0] |= cg_uci_mux_r16_present; + group_flags[0] |= cg_cot_sharing_offset_r16_present; + group_flags[0] |= beta_offset_cg_uci_r16_present; + group_flags[0] |= cg_cot_sharing_list_r16.is_present(); + group_flags[0] |= harq_proc_id_offset_r16_present; + group_flags[0] |= harq_proc_id_offset2_r16_present; + group_flags[0] |= cfg_grant_cfg_idx_r16_present; + group_flags[0] |= cfg_grant_cfg_idx_mac_r16_present; + group_flags[0] |= periodicity_ext_r16_present; + group_flags[0] |= start_from_rv0_r16_present; + group_flags[0] |= phy_prio_idx_r16_present; + group_flags[0] |= autonomous_tx_r16_present; + group_flags[1] |= cg_beta_offsets_cross_pri0_r17.is_present(); + group_flags[1] |= cg_beta_offsets_cross_pri1_r17.is_present(); + group_flags[1] |= map_pattern_r17_present; + group_flags[1] |= seq_offset_for_rv_r17_present; + group_flags[1] |= p0_pusch_alpha2_r17_present; + group_flags[1] |= pwr_ctrl_loop_to_use2_r17_present; + group_flags[1] |= cg_cot_sharing_list_r17.is_present(); + group_flags[1] |= periodicity_ext_r17_present; + group_flags[1] |= rep_k_v1710_present; + group_flags[1] |= nrof_harq_processes_v1700_present; + group_flags[1] |= harq_proc_id_offset2_v1700_present; + group_flags[1] |= cfg_grant_timer_v1700_present; + group_flags[1] |= cg_min_dfi_delay_v1710_present; + group_flags[2] |= harq_proc_id_offset_v1730_present; + group_flags[2] |= cg_nrof_slots_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(cg_retx_timer_r16_present, 1)); + HANDLE_CODE(bref.pack(cg_min_dfi_delay_r16_present, 1)); + HANDLE_CODE(bref.pack(cg_nrof_pusch_in_slot_r16_present, 1)); + HANDLE_CODE(bref.pack(cg_nrof_slots_r16_present, 1)); + HANDLE_CODE(bref.pack(cg_start_offsets_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(cg_uci_mux_r16_present, 1)); + HANDLE_CODE(bref.pack(cg_cot_sharing_offset_r16_present, 1)); + HANDLE_CODE(bref.pack(beta_offset_cg_uci_r16_present, 1)); + HANDLE_CODE(bref.pack(cg_cot_sharing_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(harq_proc_id_offset_r16_present, 1)); + HANDLE_CODE(bref.pack(harq_proc_id_offset2_r16_present, 1)); + HANDLE_CODE(bref.pack(cfg_grant_cfg_idx_r16_present, 1)); + HANDLE_CODE(bref.pack(cfg_grant_cfg_idx_mac_r16_present, 1)); + HANDLE_CODE(bref.pack(periodicity_ext_r16_present, 1)); + HANDLE_CODE(bref.pack(start_from_rv0_r16_present, 1)); + HANDLE_CODE(bref.pack(phy_prio_idx_r16_present, 1)); + HANDLE_CODE(bref.pack(autonomous_tx_r16_present, 1)); + if (cg_retx_timer_r16_present) { + HANDLE_CODE(pack_integer(bref, cg_retx_timer_r16, (uint8_t)1u, (uint8_t)64u)); + } + if (cg_min_dfi_delay_r16_present) { + HANDLE_CODE(cg_min_dfi_delay_r16.pack(bref)); + } + if (cg_nrof_pusch_in_slot_r16_present) { + HANDLE_CODE(pack_integer(bref, cg_nrof_pusch_in_slot_r16, (uint8_t)1u, (uint8_t)7u)); + } + if (cg_nrof_slots_r16_present) { + HANDLE_CODE(pack_integer(bref, cg_nrof_slots_r16, (uint8_t)1u, (uint8_t)40u)); + } + if (cg_start_offsets_r16.is_present()) { + HANDLE_CODE(cg_start_offsets_r16->pack(bref)); + } + if (cg_cot_sharing_offset_r16_present) { + HANDLE_CODE(pack_integer(bref, cg_cot_sharing_offset_r16, (uint8_t)1u, (uint8_t)39u)); + } + if (beta_offset_cg_uci_r16_present) { + HANDLE_CODE(pack_integer(bref, beta_offset_cg_uci_r16, (uint8_t)0u, (uint8_t)31u)); + } + if (cg_cot_sharing_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cg_cot_sharing_list_r16, 1, 1709)); + } + if (harq_proc_id_offset_r16_present) { + HANDLE_CODE(pack_integer(bref, harq_proc_id_offset_r16, (uint8_t)0u, (uint8_t)15u)); + } + if (harq_proc_id_offset2_r16_present) { + HANDLE_CODE(pack_integer(bref, harq_proc_id_offset2_r16, (uint8_t)0u, (uint8_t)15u)); + } + if (cfg_grant_cfg_idx_r16_present) { + HANDLE_CODE(pack_integer(bref, cfg_grant_cfg_idx_r16, (uint8_t)0u, (uint8_t)11u)); + } + if (cfg_grant_cfg_idx_mac_r16_present) { + HANDLE_CODE(pack_integer(bref, cfg_grant_cfg_idx_mac_r16, (uint8_t)0u, (uint8_t)31u)); + } + if (periodicity_ext_r16_present) { + HANDLE_CODE(pack_integer(bref, periodicity_ext_r16, (uint16_t)1u, (uint16_t)5120u)); + } + if (start_from_rv0_r16_present) { + HANDLE_CODE(start_from_rv0_r16.pack(bref)); + } + if (phy_prio_idx_r16_present) { + HANDLE_CODE(phy_prio_idx_r16.pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(cg_beta_offsets_cross_pri0_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(cg_beta_offsets_cross_pri1_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(map_pattern_r17_present, 1)); + HANDLE_CODE(bref.pack(seq_offset_for_rv_r17_present, 1)); + HANDLE_CODE(bref.pack(p0_pusch_alpha2_r17_present, 1)); + HANDLE_CODE(bref.pack(pwr_ctrl_loop_to_use2_r17_present, 1)); + HANDLE_CODE(bref.pack(cg_cot_sharing_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(periodicity_ext_r17_present, 1)); + HANDLE_CODE(bref.pack(rep_k_v1710_present, 1)); + HANDLE_CODE(bref.pack(nrof_harq_processes_v1700_present, 1)); + HANDLE_CODE(bref.pack(harq_proc_id_offset2_v1700_present, 1)); + HANDLE_CODE(bref.pack(cfg_grant_timer_v1700_present, 1)); + HANDLE_CODE(bref.pack(cg_min_dfi_delay_v1710_present, 1)); + if (cg_beta_offsets_cross_pri0_r17.is_present()) { + HANDLE_CODE(cg_beta_offsets_cross_pri0_r17->pack(bref)); + } + if (cg_beta_offsets_cross_pri1_r17.is_present()) { + HANDLE_CODE(cg_beta_offsets_cross_pri1_r17->pack(bref)); + } + if (map_pattern_r17_present) { + HANDLE_CODE(map_pattern_r17.pack(bref)); + } + if (seq_offset_for_rv_r17_present) { + HANDLE_CODE(pack_integer(bref, seq_offset_for_rv_r17, (uint8_t)0u, (uint8_t)3u)); + } + if (p0_pusch_alpha2_r17_present) { + HANDLE_CODE(pack_integer(bref, p0_pusch_alpha2_r17, (uint8_t)0u, (uint8_t)29u)); + } + if (pwr_ctrl_loop_to_use2_r17_present) { + HANDLE_CODE(pwr_ctrl_loop_to_use2_r17.pack(bref)); + } + if (cg_cot_sharing_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cg_cot_sharing_list_r17, 1, 50722)); + } + if (periodicity_ext_r17_present) { + HANDLE_CODE(pack_integer(bref, periodicity_ext_r17, (uint16_t)1u, (uint16_t)40960u)); + } + if (rep_k_v1710_present) { + HANDLE_CODE(rep_k_v1710.pack(bref)); + } + if (nrof_harq_processes_v1700_present) { + HANDLE_CODE(pack_integer(bref, nrof_harq_processes_v1700, (uint8_t)17u, (uint8_t)32u)); + } + if (harq_proc_id_offset2_v1700_present) { + HANDLE_CODE(pack_integer(bref, harq_proc_id_offset2_v1700, (uint8_t)16u, (uint8_t)31u)); + } + if (cfg_grant_timer_v1700_present) { + HANDLE_CODE(pack_integer(bref, cfg_grant_timer_v1700, (uint16_t)33u, (uint16_t)288u)); + } + if (cg_min_dfi_delay_v1710_present) { + HANDLE_CODE(pack_integer(bref, cg_min_dfi_delay_v1710, (uint16_t)238u, (uint16_t)3584u)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(harq_proc_id_offset_v1730_present, 1)); + HANDLE_CODE(bref.pack(cg_nrof_slots_r17_present, 1)); + if (harq_proc_id_offset_v1730_present) { + HANDLE_CODE(pack_integer(bref, harq_proc_id_offset_v1730, (uint8_t)16u, (uint8_t)31u)); + } + if (cg_nrof_slots_r17_present) { + HANDLE_CODE(pack_integer(bref, cg_nrof_slots_r17, (uint16_t)1u, (uint16_t)320u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cfg_grant_cfg_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(cfg_grant_timer_present, 1)); + HANDLE_CODE(bref.unpack(rrc_cfg_ul_grant_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 (cfg_grant_timer_present) { + HANDLE_CODE(unpack_integer(cfg_grant_timer, bref, (uint8_t)1u, (uint8_t)64u)); + } + if (rrc_cfg_ul_grant_present) { + HANDLE_CODE(rrc_cfg_ul_grant.unpack(bref)); + } + + if (ext) { + 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(cg_retx_timer_r16_present, 1)); + HANDLE_CODE(bref.unpack(cg_min_dfi_delay_r16_present, 1)); + HANDLE_CODE(bref.unpack(cg_nrof_pusch_in_slot_r16_present, 1)); + HANDLE_CODE(bref.unpack(cg_nrof_slots_r16_present, 1)); + unpack_presence_flag(cg_start_offsets_r16, bref); + HANDLE_CODE(bref.unpack(cg_uci_mux_r16_present, 1)); + HANDLE_CODE(bref.unpack(cg_cot_sharing_offset_r16_present, 1)); + HANDLE_CODE(bref.unpack(beta_offset_cg_uci_r16_present, 1)); + unpack_presence_flag(cg_cot_sharing_list_r16, bref); + HANDLE_CODE(bref.unpack(harq_proc_id_offset_r16_present, 1)); + HANDLE_CODE(bref.unpack(harq_proc_id_offset2_r16_present, 1)); + HANDLE_CODE(bref.unpack(cfg_grant_cfg_idx_r16_present, 1)); + HANDLE_CODE(bref.unpack(cfg_grant_cfg_idx_mac_r16_present, 1)); + HANDLE_CODE(bref.unpack(periodicity_ext_r16_present, 1)); + HANDLE_CODE(bref.unpack(start_from_rv0_r16_present, 1)); + HANDLE_CODE(bref.unpack(phy_prio_idx_r16_present, 1)); + HANDLE_CODE(bref.unpack(autonomous_tx_r16_present, 1)); + if (cg_retx_timer_r16_present) { + HANDLE_CODE(unpack_integer(cg_retx_timer_r16, bref, (uint8_t)1u, (uint8_t)64u)); + } + if (cg_min_dfi_delay_r16_present) { + HANDLE_CODE(cg_min_dfi_delay_r16.unpack(bref)); + } + if (cg_nrof_pusch_in_slot_r16_present) { + HANDLE_CODE(unpack_integer(cg_nrof_pusch_in_slot_r16, bref, (uint8_t)1u, (uint8_t)7u)); + } + if (cg_nrof_slots_r16_present) { + HANDLE_CODE(unpack_integer(cg_nrof_slots_r16, bref, (uint8_t)1u, (uint8_t)40u)); + } + if (cg_start_offsets_r16.is_present()) { + HANDLE_CODE(cg_start_offsets_r16->unpack(bref)); + } + if (cg_cot_sharing_offset_r16_present) { + HANDLE_CODE(unpack_integer(cg_cot_sharing_offset_r16, bref, (uint8_t)1u, (uint8_t)39u)); + } + if (beta_offset_cg_uci_r16_present) { + HANDLE_CODE(unpack_integer(beta_offset_cg_uci_r16, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (cg_cot_sharing_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*cg_cot_sharing_list_r16, bref, 1, 1709)); + } + if (harq_proc_id_offset_r16_present) { + HANDLE_CODE(unpack_integer(harq_proc_id_offset_r16, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (harq_proc_id_offset2_r16_present) { + HANDLE_CODE(unpack_integer(harq_proc_id_offset2_r16, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (cfg_grant_cfg_idx_r16_present) { + HANDLE_CODE(unpack_integer(cfg_grant_cfg_idx_r16, bref, (uint8_t)0u, (uint8_t)11u)); + } + if (cfg_grant_cfg_idx_mac_r16_present) { + HANDLE_CODE(unpack_integer(cfg_grant_cfg_idx_mac_r16, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (periodicity_ext_r16_present) { + HANDLE_CODE(unpack_integer(periodicity_ext_r16, bref, (uint16_t)1u, (uint16_t)5120u)); + } + if (start_from_rv0_r16_present) { + HANDLE_CODE(start_from_rv0_r16.unpack(bref)); + } + if (phy_prio_idx_r16_present) { + HANDLE_CODE(phy_prio_idx_r16.unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(cg_beta_offsets_cross_pri0_r17, bref); + unpack_presence_flag(cg_beta_offsets_cross_pri1_r17, bref); + HANDLE_CODE(bref.unpack(map_pattern_r17_present, 1)); + HANDLE_CODE(bref.unpack(seq_offset_for_rv_r17_present, 1)); + HANDLE_CODE(bref.unpack(p0_pusch_alpha2_r17_present, 1)); + HANDLE_CODE(bref.unpack(pwr_ctrl_loop_to_use2_r17_present, 1)); + unpack_presence_flag(cg_cot_sharing_list_r17, bref); + HANDLE_CODE(bref.unpack(periodicity_ext_r17_present, 1)); + HANDLE_CODE(bref.unpack(rep_k_v1710_present, 1)); + HANDLE_CODE(bref.unpack(nrof_harq_processes_v1700_present, 1)); + HANDLE_CODE(bref.unpack(harq_proc_id_offset2_v1700_present, 1)); + HANDLE_CODE(bref.unpack(cfg_grant_timer_v1700_present, 1)); + HANDLE_CODE(bref.unpack(cg_min_dfi_delay_v1710_present, 1)); + if (cg_beta_offsets_cross_pri0_r17.is_present()) { + HANDLE_CODE(cg_beta_offsets_cross_pri0_r17->unpack(bref)); + } + if (cg_beta_offsets_cross_pri1_r17.is_present()) { + HANDLE_CODE(cg_beta_offsets_cross_pri1_r17->unpack(bref)); + } + if (map_pattern_r17_present) { + HANDLE_CODE(map_pattern_r17.unpack(bref)); + } + if (seq_offset_for_rv_r17_present) { + HANDLE_CODE(unpack_integer(seq_offset_for_rv_r17, bref, (uint8_t)0u, (uint8_t)3u)); + } + if (p0_pusch_alpha2_r17_present) { + HANDLE_CODE(unpack_integer(p0_pusch_alpha2_r17, bref, (uint8_t)0u, (uint8_t)29u)); + } + if (pwr_ctrl_loop_to_use2_r17_present) { + HANDLE_CODE(pwr_ctrl_loop_to_use2_r17.unpack(bref)); + } + if (cg_cot_sharing_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*cg_cot_sharing_list_r17, bref, 1, 50722)); + } + if (periodicity_ext_r17_present) { + HANDLE_CODE(unpack_integer(periodicity_ext_r17, bref, (uint16_t)1u, (uint16_t)40960u)); + } + if (rep_k_v1710_present) { + HANDLE_CODE(rep_k_v1710.unpack(bref)); + } + if (nrof_harq_processes_v1700_present) { + HANDLE_CODE(unpack_integer(nrof_harq_processes_v1700, bref, (uint8_t)17u, (uint8_t)32u)); + } + if (harq_proc_id_offset2_v1700_present) { + HANDLE_CODE(unpack_integer(harq_proc_id_offset2_v1700, bref, (uint8_t)16u, (uint8_t)31u)); + } + if (cfg_grant_timer_v1700_present) { + HANDLE_CODE(unpack_integer(cfg_grant_timer_v1700, bref, (uint16_t)33u, (uint16_t)288u)); + } + if (cg_min_dfi_delay_v1710_present) { + HANDLE_CODE(unpack_integer(cg_min_dfi_delay_v1710, bref, (uint16_t)238u, (uint16_t)3584u)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(harq_proc_id_offset_v1730_present, 1)); + HANDLE_CODE(bref.unpack(cg_nrof_slots_r17_present, 1)); + if (harq_proc_id_offset_v1730_present) { + HANDLE_CODE(unpack_integer(harq_proc_id_offset_v1730, bref, (uint8_t)16u, (uint8_t)31u)); + } + if (cg_nrof_slots_r17_present) { + HANDLE_CODE(unpack_integer(cg_nrof_slots_r17, bref, (uint16_t)1u, (uint16_t)320u)); + } + } + } + return SRSASN_SUCCESS; +} +void cfg_grant_cfg_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 (cfg_grant_timer_present) { + j.write_int("configuredGrantTimer", cfg_grant_timer); + } + if (rrc_cfg_ul_grant_present) { + j.write_fieldname("rrc-ConfiguredUplinkGrant"); + rrc_cfg_ul_grant.to_json(j); + } + if (ext) { + if (cg_retx_timer_r16_present) { + j.write_int("cg-RetransmissionTimer-r16", cg_retx_timer_r16); + } + if (cg_min_dfi_delay_r16_present) { + j.write_str("cg-minDFI-Delay-r16", cg_min_dfi_delay_r16.to_string()); + } + if (cg_nrof_pusch_in_slot_r16_present) { + j.write_int("cg-nrofPUSCH-InSlot-r16", cg_nrof_pusch_in_slot_r16); + } + if (cg_nrof_slots_r16_present) { + j.write_int("cg-nrofSlots-r16", cg_nrof_slots_r16); + } + if (cg_start_offsets_r16.is_present()) { + j.write_fieldname("cg-StartingOffsets-r16"); + cg_start_offsets_r16->to_json(j); + } + if (cg_uci_mux_r16_present) { + j.write_str("cg-UCI-Multiplexing-r16", "enabled"); + } + if (cg_cot_sharing_offset_r16_present) { + j.write_int("cg-COT-SharingOffset-r16", cg_cot_sharing_offset_r16); + } + if (beta_offset_cg_uci_r16_present) { + j.write_int("betaOffsetCG-UCI-r16", beta_offset_cg_uci_r16); + } + if (cg_cot_sharing_list_r16.is_present()) { + j.start_array("cg-COT-SharingList-r16"); + for (const auto& e1 : *cg_cot_sharing_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (harq_proc_id_offset_r16_present) { + j.write_int("harq-ProcID-Offset-r16", harq_proc_id_offset_r16); + } + if (harq_proc_id_offset2_r16_present) { + j.write_int("harq-ProcID-Offset2-r16", harq_proc_id_offset2_r16); + } + if (cfg_grant_cfg_idx_r16_present) { + j.write_int("configuredGrantConfigIndex-r16", cfg_grant_cfg_idx_r16); + } + if (cfg_grant_cfg_idx_mac_r16_present) { + j.write_int("configuredGrantConfigIndexMAC-r16", cfg_grant_cfg_idx_mac_r16); + } + if (periodicity_ext_r16_present) { + j.write_int("periodicityExt-r16", periodicity_ext_r16); + } + if (start_from_rv0_r16_present) { + j.write_str("startingFromRV0-r16", start_from_rv0_r16.to_string()); + } + if (phy_prio_idx_r16_present) { + j.write_str("phy-PriorityIndex-r16", phy_prio_idx_r16.to_string()); + } + if (autonomous_tx_r16_present) { + j.write_str("autonomousTx-r16", "enabled"); + } + if (cg_beta_offsets_cross_pri0_r17.is_present()) { + j.write_fieldname("cg-betaOffsetsCrossPri0-r17"); + cg_beta_offsets_cross_pri0_r17->to_json(j); + } + if (cg_beta_offsets_cross_pri1_r17.is_present()) { + j.write_fieldname("cg-betaOffsetsCrossPri1-r17"); + cg_beta_offsets_cross_pri1_r17->to_json(j); + } + if (map_pattern_r17_present) { + j.write_str("mappingPattern-r17", map_pattern_r17.to_string()); + } + if (seq_offset_for_rv_r17_present) { + j.write_int("sequenceOffsetForRV-r17", seq_offset_for_rv_r17); + } + if (p0_pusch_alpha2_r17_present) { + j.write_int("p0-PUSCH-Alpha2-r17", p0_pusch_alpha2_r17); + } + if (pwr_ctrl_loop_to_use2_r17_present) { + j.write_str("powerControlLoopToUse2-r17", pwr_ctrl_loop_to_use2_r17.to_string()); + } + if (cg_cot_sharing_list_r17.is_present()) { + j.start_array("cg-COT-SharingList-r17"); + for (const auto& e1 : *cg_cot_sharing_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (periodicity_ext_r17_present) { + j.write_int("periodicityExt-r17", periodicity_ext_r17); + } + if (rep_k_v1710_present) { + j.write_str("repK-v1710", rep_k_v1710.to_string()); + } + if (nrof_harq_processes_v1700_present) { + j.write_int("nrofHARQ-Processes-v1700", nrof_harq_processes_v1700); + } + if (harq_proc_id_offset2_v1700_present) { + j.write_int("harq-ProcID-Offset2-v1700", harq_proc_id_offset2_v1700); + } + if (cfg_grant_timer_v1700_present) { + j.write_int("configuredGrantTimer-v1700", cfg_grant_timer_v1700); + } + if (cg_min_dfi_delay_v1710_present) { + j.write_int("cg-minDFI-Delay-v1710", cg_min_dfi_delay_v1710); + } + if (harq_proc_id_offset_v1730_present) { + j.write_int("harq-ProcID-Offset-v1730", harq_proc_id_offset_v1730); + } + if (cg_nrof_slots_r17_present) { + j.write_int("cg-nrofSlots-r17", cg_nrof_slots_r17); + } + } + j.end_obj(); +} + +const char* cfg_grant_cfg_s::freq_hop_opts::to_string() const +{ + static const char* names[] = {"intraSlot", "interSlot"}; + return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::freq_hop_e_"); +} + +const char* cfg_grant_cfg_s::mcs_table_opts::to_string() const +{ + static const char* names[] = {"qam256", "qam64LowSE"}; + return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::mcs_table_e_"); +} +uint16_t cfg_grant_cfg_s::mcs_table_opts::to_number() const +{ + static const uint16_t numbers[] = {256, 64}; + return map_enum_number(numbers, 2, value, "cfg_grant_cfg_s::mcs_table_e_"); +} + +const char* cfg_grant_cfg_s::mcs_table_transform_precoder_opts::to_string() const +{ + static const char* names[] = {"qam256", "qam64LowSE"}; + return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::mcs_table_transform_precoder_e_"); +} +uint16_t cfg_grant_cfg_s::mcs_table_transform_precoder_opts::to_number() const +{ + static const uint16_t numbers[] = {256, 64}; + return map_enum_number(numbers, 2, value, "cfg_grant_cfg_s::mcs_table_transform_precoder_e_"); +} + +const char* cfg_grant_cfg_s::res_alloc_opts::to_string() const +{ + static const char* names[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; + return convert_enum_idx(names, 3, value, "cfg_grant_cfg_s::res_alloc_e_"); +} +uint8_t cfg_grant_cfg_s::res_alloc_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "cfg_grant_cfg_s::res_alloc_e_"); +} + +const char* cfg_grant_cfg_s::pwr_ctrl_loop_to_use_opts::to_string() const +{ + static const char* names[] = {"n0", "n1"}; + return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::pwr_ctrl_loop_to_use_e_"); +} +uint8_t cfg_grant_cfg_s::pwr_ctrl_loop_to_use_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "cfg_grant_cfg_s::pwr_ctrl_loop_to_use_e_"); +} + +const char* cfg_grant_cfg_s::transform_precoder_opts::to_string() const +{ + static const char* names[] = {"enabled", "disabled"}; + return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::transform_precoder_e_"); +} + +const char* cfg_grant_cfg_s::rep_k_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n4", "n8"}; + return convert_enum_idx(names, 4, value, "cfg_grant_cfg_s::rep_k_e_"); +} +uint8_t cfg_grant_cfg_s::rep_k_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "cfg_grant_cfg_s::rep_k_e_"); +} + +const char* cfg_grant_cfg_s::rep_k_rv_opts::to_string() const +{ + static const char* names[] = {"s1-0231", "s2-0303", "s3-0000"}; + return convert_enum_idx(names, 3, value, "cfg_grant_cfg_s::rep_k_rv_e_"); +} +uint8_t cfg_grant_cfg_s::rep_k_rv_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3}; + return map_enum_number(numbers, 3, value, "cfg_grant_cfg_s::rep_k_rv_e_"); +} + +const char* cfg_grant_cfg_s::periodicity_opts::to_string() const +{ + static const char* names[] = { + "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(names, 45, value, "cfg_grant_cfg_s::periodicity_e_"); +} + +SRSASN_CODE cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(dmrs_seq_initization_present, 1)); + HANDLE_CODE(bref.pack(srs_res_ind_present, 1)); + HANDLE_CODE(bref.pack(freq_hop_offset_present, 1)); + + HANDLE_CODE(pack_integer(bref, time_domain_offset, (uint16_t)0u, (uint16_t)5119u)); + HANDLE_CODE(pack_integer(bref, time_domain_alloc, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(freq_domain_alloc.pack(bref)); + HANDLE_CODE(pack_integer(bref, ant_port, (uint8_t)0u, (uint8_t)31u)); + if (dmrs_seq_initization_present) { + HANDLE_CODE(pack_integer(bref, dmrs_seq_initization, (uint8_t)0u, (uint8_t)1u)); + } + HANDLE_CODE(pack_integer(bref, precoding_and_nof_layers, (uint8_t)0u, (uint8_t)63u)); + if (srs_res_ind_present) { + HANDLE_CODE(pack_integer(bref, srs_res_ind, (uint8_t)0u, (uint8_t)15u)); + } + HANDLE_CODE(pack_integer(bref, mcs_and_tbs, (uint8_t)0u, (uint8_t)31u)); + if (freq_hop_offset_present) { + HANDLE_CODE(pack_integer(bref, freq_hop_offset, (uint16_t)1u, (uint16_t)274u)); + } + HANDLE_CODE(pack_integer(bref, pathloss_ref_idx, (uint8_t)0u, (uint8_t)3u)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= pusch_rep_type_ind_r16_present; + group_flags[0] |= freq_hop_pusch_rep_type_b_r16_present; + group_flags[0] |= time_ref_sfn_r16_present; + group_flags[1] |= pathloss_ref_idx2_r17_present; + group_flags[1] |= srs_res_ind2_r17_present; + group_flags[1] |= precoding_and_nof_layers2_r17_present; + group_flags[1] |= time_domain_alloc_v1710_present; + group_flags[1] |= time_domain_offset_r17_present; + group_flags[1] |= cg_sdt_cfg_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pusch_rep_type_ind_r16_present, 1)); + HANDLE_CODE(bref.pack(freq_hop_pusch_rep_type_b_r16_present, 1)); + HANDLE_CODE(bref.pack(time_ref_sfn_r16_present, 1)); + if (pusch_rep_type_ind_r16_present) { + HANDLE_CODE(pusch_rep_type_ind_r16.pack(bref)); + } + if (freq_hop_pusch_rep_type_b_r16_present) { + HANDLE_CODE(freq_hop_pusch_rep_type_b_r16.pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pathloss_ref_idx2_r17_present, 1)); + HANDLE_CODE(bref.pack(srs_res_ind2_r17_present, 1)); + HANDLE_CODE(bref.pack(precoding_and_nof_layers2_r17_present, 1)); + HANDLE_CODE(bref.pack(time_domain_alloc_v1710_present, 1)); + HANDLE_CODE(bref.pack(time_domain_offset_r17_present, 1)); + HANDLE_CODE(bref.pack(cg_sdt_cfg_r17.is_present(), 1)); + if (pathloss_ref_idx2_r17_present) { + HANDLE_CODE(pack_integer(bref, pathloss_ref_idx2_r17, (uint8_t)0u, (uint8_t)3u)); + } + if (srs_res_ind2_r17_present) { + HANDLE_CODE(pack_integer(bref, srs_res_ind2_r17, (uint8_t)0u, (uint8_t)15u)); + } + if (precoding_and_nof_layers2_r17_present) { + HANDLE_CODE(pack_integer(bref, precoding_and_nof_layers2_r17, (uint8_t)0u, (uint8_t)63u)); + } + if (time_domain_alloc_v1710_present) { + HANDLE_CODE(pack_integer(bref, time_domain_alloc_v1710, (uint8_t)16u, (uint8_t)63u)); + } + if (time_domain_offset_r17_present) { + HANDLE_CODE(pack_integer(bref, time_domain_offset_r17, (uint16_t)0u, (uint16_t)40959u)); + } + if (cg_sdt_cfg_r17.is_present()) { + HANDLE_CODE(cg_sdt_cfg_r17->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(dmrs_seq_initization_present, 1)); + HANDLE_CODE(bref.unpack(srs_res_ind_present, 1)); + HANDLE_CODE(bref.unpack(freq_hop_offset_present, 1)); + + HANDLE_CODE(unpack_integer(time_domain_offset, bref, (uint16_t)0u, (uint16_t)5119u)); + HANDLE_CODE(unpack_integer(time_domain_alloc, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(freq_domain_alloc.unpack(bref)); + HANDLE_CODE(unpack_integer(ant_port, bref, (uint8_t)0u, (uint8_t)31u)); + if (dmrs_seq_initization_present) { + HANDLE_CODE(unpack_integer(dmrs_seq_initization, bref, (uint8_t)0u, (uint8_t)1u)); + } + HANDLE_CODE(unpack_integer(precoding_and_nof_layers, bref, (uint8_t)0u, (uint8_t)63u)); + if (srs_res_ind_present) { + HANDLE_CODE(unpack_integer(srs_res_ind, bref, (uint8_t)0u, (uint8_t)15u)); + } + HANDLE_CODE(unpack_integer(mcs_and_tbs, bref, (uint8_t)0u, (uint8_t)31u)); + if (freq_hop_offset_present) { + HANDLE_CODE(unpack_integer(freq_hop_offset, bref, (uint16_t)1u, (uint16_t)274u)); + } + HANDLE_CODE(unpack_integer(pathloss_ref_idx, bref, (uint8_t)0u, (uint8_t)3u)); + + 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(pusch_rep_type_ind_r16_present, 1)); + HANDLE_CODE(bref.unpack(freq_hop_pusch_rep_type_b_r16_present, 1)); + HANDLE_CODE(bref.unpack(time_ref_sfn_r16_present, 1)); + if (pusch_rep_type_ind_r16_present) { + HANDLE_CODE(pusch_rep_type_ind_r16.unpack(bref)); + } + if (freq_hop_pusch_rep_type_b_r16_present) { + HANDLE_CODE(freq_hop_pusch_rep_type_b_r16.unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(pathloss_ref_idx2_r17_present, 1)); + HANDLE_CODE(bref.unpack(srs_res_ind2_r17_present, 1)); + HANDLE_CODE(bref.unpack(precoding_and_nof_layers2_r17_present, 1)); + HANDLE_CODE(bref.unpack(time_domain_alloc_v1710_present, 1)); + HANDLE_CODE(bref.unpack(time_domain_offset_r17_present, 1)); + unpack_presence_flag(cg_sdt_cfg_r17, bref); + if (pathloss_ref_idx2_r17_present) { + HANDLE_CODE(unpack_integer(pathloss_ref_idx2_r17, bref, (uint8_t)0u, (uint8_t)3u)); + } + if (srs_res_ind2_r17_present) { + HANDLE_CODE(unpack_integer(srs_res_ind2_r17, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (precoding_and_nof_layers2_r17_present) { + HANDLE_CODE(unpack_integer(precoding_and_nof_layers2_r17, bref, (uint8_t)0u, (uint8_t)63u)); + } + if (time_domain_alloc_v1710_present) { + HANDLE_CODE(unpack_integer(time_domain_alloc_v1710, bref, (uint8_t)16u, (uint8_t)63u)); + } + if (time_domain_offset_r17_present) { + HANDLE_CODE(unpack_integer(time_domain_offset_r17, bref, (uint16_t)0u, (uint16_t)40959u)); + } + if (cg_sdt_cfg_r17.is_present()) { + HANDLE_CODE(cg_sdt_cfg_r17->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("timeDomainOffset", time_domain_offset); + j.write_int("timeDomainAllocation", time_domain_alloc); + j.write_str("frequencyDomainAllocation", freq_domain_alloc.to_string()); + j.write_int("antennaPort", ant_port); + if (dmrs_seq_initization_present) { + j.write_int("dmrs-SeqInitialization", dmrs_seq_initization); + } + j.write_int("precodingAndNumberOfLayers", precoding_and_nof_layers); + if (srs_res_ind_present) { + j.write_int("srs-ResourceIndicator", srs_res_ind); + } + j.write_int("mcsAndTBS", mcs_and_tbs); + if (freq_hop_offset_present) { + j.write_int("frequencyHoppingOffset", freq_hop_offset); + } + j.write_int("pathlossReferenceIndex", pathloss_ref_idx); + if (ext) { + if (pusch_rep_type_ind_r16_present) { + j.write_str("pusch-RepTypeIndicator-r16", pusch_rep_type_ind_r16.to_string()); + } + if (freq_hop_pusch_rep_type_b_r16_present) { + j.write_str("frequencyHoppingPUSCH-RepTypeB-r16", freq_hop_pusch_rep_type_b_r16.to_string()); + } + if (time_ref_sfn_r16_present) { + j.write_str("timeReferenceSFN-r16", "sfn512"); + } + if (pathloss_ref_idx2_r17_present) { + j.write_int("pathlossReferenceIndex2-r17", pathloss_ref_idx2_r17); + } + if (srs_res_ind2_r17_present) { + j.write_int("srs-ResourceIndicator2-r17", srs_res_ind2_r17); + } + if (precoding_and_nof_layers2_r17_present) { + j.write_int("precodingAndNumberOfLayers2-r17", precoding_and_nof_layers2_r17); + } + if (time_domain_alloc_v1710_present) { + j.write_int("timeDomainAllocation-v1710", time_domain_alloc_v1710); + } + if (time_domain_offset_r17_present) { + j.write_int("timeDomainOffset-r17", time_domain_offset_r17); + } + if (cg_sdt_cfg_r17.is_present()) { + j.write_fieldname("cg-SDT-Configuration-r17"); + cg_sdt_cfg_r17->to_json(j); + } + } + j.end_obj(); +} + +const char* cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::pusch_rep_type_ind_r16_opts::to_string() const +{ + static const char* names[] = {"pusch-RepTypeA", "pusch-RepTypeB"}; + return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::pusch_rep_type_ind_r16_e_"); +} + +const char* cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::freq_hop_pusch_rep_type_b_r16_opts::to_string() const +{ + static const char* names[] = {"interRepetition", "interSlot"}; + return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::freq_hop_pusch_rep_type_b_r16_e_"); +} + +const char* cfg_grant_cfg_s::cg_min_dfi_delay_r16_opts::to_string() const +{ + static const char* names[] = {"sym7", + "sym1x14", + "sym2x14", + "sym3x14", + "sym4x14", + "sym5x14", + "sym6x14", + "sym7x14", + "sym8x14", + "sym9x14", + "sym10x14", + "sym11x14", + "sym12x14", + "sym13x14", + "sym14x14", + "sym15x14", + "sym16x14"}; + return convert_enum_idx(names, 17, value, "cfg_grant_cfg_s::cg_min_dfi_delay_r16_e_"); +} + +const char* cfg_grant_cfg_s::start_from_rv0_r16_opts::to_string() const +{ + static const char* names[] = {"on", "off"}; + return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::start_from_rv0_r16_e_"); +} + +const char* cfg_grant_cfg_s::phy_prio_idx_r16_opts::to_string() const +{ + static const char* names[] = {"p0", "p1"}; + return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::phy_prio_idx_r16_e_"); +} +uint8_t cfg_grant_cfg_s::phy_prio_idx_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "cfg_grant_cfg_s::phy_prio_idx_r16_e_"); +} + +const char* cfg_grant_cfg_s::map_pattern_r17_opts::to_string() const +{ + static const char* names[] = {"cyclicMapping", "sequentialMapping"}; + return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::map_pattern_r17_e_"); +} + +const char* cfg_grant_cfg_s::pwr_ctrl_loop_to_use2_r17_opts::to_string() const +{ + static const char* names[] = {"n0", "n1"}; + return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::pwr_ctrl_loop_to_use2_r17_e_"); +} +uint8_t cfg_grant_cfg_s::pwr_ctrl_loop_to_use2_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "cfg_grant_cfg_s::pwr_ctrl_loop_to_use2_r17_e_"); +} + +const char* cfg_grant_cfg_s::rep_k_v1710_opts::to_string() const +{ + static const char* names[] = {"n12", "n16", "n24", "n32"}; + return convert_enum_idx(names, 4, value, "cfg_grant_cfg_s::rep_k_v1710_e_"); +} +uint8_t cfg_grant_cfg_s::rep_k_v1710_opts::to_number() const +{ + static const uint8_t numbers[] = {12, 16, 24, 32}; + return map_enum_number(numbers, 4, value, "cfg_grant_cfg_s::rep_k_v1710_e_"); +} + +// DMRS-BundlingPUSCH-Config-r17 ::= SEQUENCE +SRSASN_CODE dmrs_bundling_pusch_cfg_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pusch_dmrs_bundling_r17_present, 1)); + HANDLE_CODE(bref.pack(pusch_time_domain_win_len_r17_present, 1)); + HANDLE_CODE(bref.pack(pusch_win_restart_r17_present, 1)); + HANDLE_CODE(bref.pack(pusch_freq_hop_interv_r17_present, 1)); + + if (pusch_time_domain_win_len_r17_present) { + HANDLE_CODE(pack_integer(bref, pusch_time_domain_win_len_r17, (uint8_t)2u, (uint8_t)32u)); + } + if (pusch_freq_hop_interv_r17_present) { + HANDLE_CODE(pusch_freq_hop_interv_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dmrs_bundling_pusch_cfg_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pusch_dmrs_bundling_r17_present, 1)); + HANDLE_CODE(bref.unpack(pusch_time_domain_win_len_r17_present, 1)); + HANDLE_CODE(bref.unpack(pusch_win_restart_r17_present, 1)); + HANDLE_CODE(bref.unpack(pusch_freq_hop_interv_r17_present, 1)); + + if (pusch_time_domain_win_len_r17_present) { + HANDLE_CODE(unpack_integer(pusch_time_domain_win_len_r17, bref, (uint8_t)2u, (uint8_t)32u)); + } + if (pusch_freq_hop_interv_r17_present) { + HANDLE_CODE(pusch_freq_hop_interv_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void dmrs_bundling_pusch_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pusch_dmrs_bundling_r17_present) { + j.write_str("pusch-DMRS-Bundling-r17", "enabled"); + } + if (pusch_time_domain_win_len_r17_present) { + j.write_int("pusch-TimeDomainWindowLength-r17", pusch_time_domain_win_len_r17); + } + if (pusch_win_restart_r17_present) { + j.write_str("pusch-WindowRestart-r17", "enabled"); + } + if (pusch_freq_hop_interv_r17_present) { + j.write_str("pusch-FrequencyHoppingInterval-r17", pusch_freq_hop_interv_r17.to_string()); + } + j.end_obj(); +} + +const char* dmrs_bundling_pusch_cfg_r17_s::pusch_freq_hop_interv_r17_opts::to_string() const +{ + static const char* names[] = {"s2", "s4", "s5", "s6", "s8", "s10", "s12", "s14", "s16", "s20"}; + return convert_enum_idx(names, 10, value, "dmrs_bundling_pusch_cfg_r17_s::pusch_freq_hop_interv_r17_e_"); +} +uint8_t dmrs_bundling_pusch_cfg_r17_s::pusch_freq_hop_interv_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 5, 6, 8, 10, 12, 14, 16, 20}; + return map_enum_number(numbers, 10, value, "dmrs_bundling_pusch_cfg_r17_s::pusch_freq_hop_interv_r17_e_"); +} + +// InvalidSymbolPattern-r16 ::= SEQUENCE +SRSASN_CODE invalid_symbol_pattern_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(periodicity_and_pattern_r16_present, 1)); + + HANDLE_CODE(symbols_r16.pack(bref)); + if (periodicity_and_pattern_r16_present) { + HANDLE_CODE(periodicity_and_pattern_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE invalid_symbol_pattern_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(periodicity_and_pattern_r16_present, 1)); + + HANDLE_CODE(symbols_r16.unpack(bref)); + if (periodicity_and_pattern_r16_present) { + HANDLE_CODE(periodicity_and_pattern_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void invalid_symbol_pattern_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("symbols-r16"); + symbols_r16.to_json(j); + if (periodicity_and_pattern_r16_present) { + j.write_fieldname("periodicityAndPattern-r16"); + periodicity_and_pattern_r16.to_json(j); + } + j.end_obj(); +} + +void invalid_symbol_pattern_r16_s::symbols_r16_c_::destroy_() +{ + switch (type_) { + case types::one_slot: + c.destroy>(); + break; + case types::two_slots: + c.destroy>(); + break; + default: + break; + } +} +void invalid_symbol_pattern_r16_s::symbols_r16_c_::set(types::options e) +{ + 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_, "invalid_symbol_pattern_r16_s::symbols_r16_c_"); + } +} +invalid_symbol_pattern_r16_s::symbols_r16_c_::symbols_r16_c_(const invalid_symbol_pattern_r16_s::symbols_r16_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_, "invalid_symbol_pattern_r16_s::symbols_r16_c_"); + } +} +invalid_symbol_pattern_r16_s::symbols_r16_c_& +invalid_symbol_pattern_r16_s::symbols_r16_c_::operator=(const invalid_symbol_pattern_r16_s::symbols_r16_c_& other) +{ + 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_, "invalid_symbol_pattern_r16_s::symbols_r16_c_"); + } + + return *this; +} +fixed_bitstring<14>& invalid_symbol_pattern_r16_s::symbols_r16_c_::set_one_slot() +{ + set(types::one_slot); + return c.get>(); +} +fixed_bitstring<28>& invalid_symbol_pattern_r16_s::symbols_r16_c_::set_two_slots() +{ + set(types::two_slots); + return c.get>(); +} +void invalid_symbol_pattern_r16_s::symbols_r16_c_::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_, "invalid_symbol_pattern_r16_s::symbols_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE invalid_symbol_pattern_r16_s::symbols_r16_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_, "invalid_symbol_pattern_r16_s::symbols_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE invalid_symbol_pattern_r16_s::symbols_r16_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_, "invalid_symbol_pattern_r16_s::symbols_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* invalid_symbol_pattern_r16_s::symbols_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"oneSlot", "twoSlots"}; + return convert_enum_idx(names, 2, value, "invalid_symbol_pattern_r16_s::symbols_r16_c_::types"); +} +uint8_t invalid_symbol_pattern_r16_s::symbols_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "invalid_symbol_pattern_r16_s::symbols_r16_c_::types"); +} + +void invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_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 invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_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_, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_"); + } +} +invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::periodicity_and_pattern_r16_c_( + const invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_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_, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_"); + } +} +invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_& +invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::operator=( + const invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_& other) +{ + if (this == &other) { + return *this; + } + 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_, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_"); + } + + return *this; +} +fixed_bitstring<2>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n2() +{ + set(types::n2); + return c.get>(); +} +fixed_bitstring<4>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n4() +{ + set(types::n4); + return c.get>(); +} +fixed_bitstring<5>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n5() +{ + set(types::n5); + return c.get>(); +} +fixed_bitstring<8>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n8() +{ + set(types::n8); + return c.get>(); +} +fixed_bitstring<10>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n10() +{ + set(types::n10); + return c.get>(); +} +fixed_bitstring<20>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n20() +{ + set(types::n20); + return c.get>(); +} +fixed_bitstring<40>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n40() +{ + set(types::n40); + return c.get>(); +} +void invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::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_, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::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_, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::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_, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"n2", "n4", "n5", "n8", "n10", "n20", "n40"}; + return convert_enum_idx(names, 7, value, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::types"); +} +uint8_t invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 5, 8, 10, 20, 40}; + return map_enum_number(numbers, 7, value, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::types"); +} + +// MPE-Resource-r17 ::= SEQUENCE +SRSASN_CODE mpe_res_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_r17_present, 1)); + HANDLE_CODE(bref.pack(add_pci_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, mpe_res_id_r17, (uint8_t)1u, (uint8_t)64u)); + if (cell_r17_present) { + HANDLE_CODE(pack_integer(bref, cell_r17, (uint8_t)0u, (uint8_t)31u)); + } + if (add_pci_r17_present) { + HANDLE_CODE(pack_integer(bref, add_pci_r17, (uint8_t)1u, (uint8_t)7u)); + } + HANDLE_CODE(mpe_ref_sig_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mpe_res_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_r17_present, 1)); + HANDLE_CODE(bref.unpack(add_pci_r17_present, 1)); + + HANDLE_CODE(unpack_integer(mpe_res_id_r17, bref, (uint8_t)1u, (uint8_t)64u)); + if (cell_r17_present) { + HANDLE_CODE(unpack_integer(cell_r17, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (add_pci_r17_present) { + HANDLE_CODE(unpack_integer(add_pci_r17, bref, (uint8_t)1u, (uint8_t)7u)); + } + HANDLE_CODE(mpe_ref_sig_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mpe_res_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("mpe-ResourceId-r17", mpe_res_id_r17); + if (cell_r17_present) { + j.write_int("cell-r17", cell_r17); + } + if (add_pci_r17_present) { + j.write_int("additionalPCI-r17", add_pci_r17); + } + j.write_fieldname("mpe-ReferenceSignal-r17"); + mpe_ref_sig_r17.to_json(j); + j.end_obj(); +} + +void mpe_res_r17_s::mpe_ref_sig_r17_c_::destroy_() {} +void mpe_res_r17_s::mpe_ref_sig_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +mpe_res_r17_s::mpe_ref_sig_r17_c_::mpe_ref_sig_r17_c_(const mpe_res_r17_s::mpe_ref_sig_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::csi_rs_res_r17: + c.init(other.c.get()); + break; + case types::ssb_res_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mpe_res_r17_s::mpe_ref_sig_r17_c_"); + } +} +mpe_res_r17_s::mpe_ref_sig_r17_c_& +mpe_res_r17_s::mpe_ref_sig_r17_c_::operator=(const mpe_res_r17_s::mpe_ref_sig_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::csi_rs_res_r17: + c.set(other.c.get()); + break; + case types::ssb_res_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mpe_res_r17_s::mpe_ref_sig_r17_c_"); + } + + return *this; +} +uint8_t& mpe_res_r17_s::mpe_ref_sig_r17_c_::set_csi_rs_res_r17() +{ + set(types::csi_rs_res_r17); + return c.get(); +} +uint8_t& mpe_res_r17_s::mpe_ref_sig_r17_c_::set_ssb_res_r17() +{ + set(types::ssb_res_r17); + return c.get(); +} +void mpe_res_r17_s::mpe_ref_sig_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::csi_rs_res_r17: + j.write_int("csi-RS-Resource-r17", c.get()); + break; + case types::ssb_res_r17: + j.write_int("ssb-Resource-r17", c.get()); + break; + default: + log_invalid_choice_id(type_, "mpe_res_r17_s::mpe_ref_sig_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE mpe_res_r17_s::mpe_ref_sig_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::csi_rs_res_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + break; + case types::ssb_res_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + default: + log_invalid_choice_id(type_, "mpe_res_r17_s::mpe_ref_sig_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mpe_res_r17_s::mpe_ref_sig_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::csi_rs_res_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + break; + case types::ssb_res_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + default: + log_invalid_choice_id(type_, "mpe_res_r17_s::mpe_ref_sig_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* mpe_res_r17_s::mpe_ref_sig_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"csi-RS-Resource-r17", "ssb-Resource-r17"}; + return convert_enum_idx(names, 2, value, "mpe_res_r17_s::mpe_ref_sig_r17_c_::types"); +} + +// PUCCH-Config ::= SEQUENCE +SRSASN_CODE pucch_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(res_set_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(res_set_to_release_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(res_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(res_to_release_list.size() > 0, 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(sched_request_res_to_release_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(multi_csi_pucch_res_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(dl_data_to_ul_ack.size() > 0, 1)); + HANDLE_CODE(bref.pack(spatial_relation_info_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(spatial_relation_info_to_release_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(pucch_pwr_ctrl_present, 1)); + + if (res_set_to_add_mod_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, res_set_to_add_mod_list, 1, 4)); + } + if (res_set_to_release_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, res_set_to_release_list, 1, 4, integer_packer(0, 3))); + } + if (res_to_add_mod_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, res_to_add_mod_list, 1, 128)); + } + if (res_to_release_list.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sched_request_res_to_add_mod_list, 1, 8)); + } + if (sched_request_res_to_release_list.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_csi_pucch_res_list, 1, 2, integer_packer(0, 127))); + } + if (dl_data_to_ul_ack.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, spatial_relation_info_to_add_mod_list, 1, 8)); + } + if (spatial_relation_info_to_release_list.size() > 0) { + 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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= res_to_add_mod_list_ext_v1610.is_present(); + group_flags[0] |= dl_data_to_ul_ack_r16.is_present(); + group_flags[0] |= ul_access_cfg_list_dci_1_1_r16.is_present(); + group_flags[0] |= subslot_len_for_pucch_r16.is_present(); + group_flags[0] |= dl_data_to_ul_ack_dci_1_2_r16.is_present(); + group_flags[0] |= nof_bits_for_pucch_res_ind_dci_1_2_r16_present; + group_flags[0] |= dmrs_ul_transform_precoding_pucch_r16_present; + group_flags[0] |= spatial_relation_info_to_add_mod_list_size_ext_v1610.is_present(); + group_flags[0] |= spatial_relation_info_to_release_list_size_ext_v1610.is_present(); + group_flags[0] |= spatial_relation_info_to_add_mod_list_ext_v1610.is_present(); + group_flags[0] |= spatial_relation_info_to_release_list_ext_v1610.is_present(); + group_flags[0] |= res_group_to_add_mod_list_r16.is_present(); + group_flags[0] |= res_group_to_release_list_r16.is_present(); + group_flags[0] |= sps_pucch_an_list_r16.is_present(); + group_flags[0] |= sched_request_res_to_add_mod_list_ext_v1610.is_present(); + group_flags[1] |= format0_r17.is_present(); + group_flags[1] |= format2_ext_r17.is_present(); + group_flags[1] |= format3_ext_r17.is_present(); + group_flags[1] |= format4_ext_r17.is_present(); + group_flags[1] |= ul_access_cfg_list_dci_1_2_r17.is_present(); + group_flags[1] |= map_pattern_r17_present; + group_flags[1] |= pwr_ctrl_set_info_to_add_mod_list_r17.is_present(); + group_flags[1] |= pwr_ctrl_set_info_to_release_list_r17.is_present(); + group_flags[1] |= second_tpc_field_dci_1_1_r17_present; + group_flags[1] |= second_tpc_field_dci_1_2_r17_present; + group_flags[1] |= dl_data_to_ul_ack_r17.is_present(); + group_flags[1] |= dl_data_to_ul_ack_dci_1_2_r17.is_present(); + group_flags[1] |= ul_access_cfg_list_dci_1_1_r17.is_present(); + group_flags[1] |= sched_request_res_to_add_mod_list_ext_v1700.is_present(); + group_flags[1] |= dmrs_bundling_pucch_cfg_r17.is_present(); + group_flags[1] |= dl_data_to_ul_ack_v1700.is_present(); + group_flags[1] |= dl_data_to_ul_ack_multicast_dci_format4_1_r17.is_present(); + group_flags[1] |= sps_pucch_an_list_multicast_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(res_to_add_mod_list_ext_v1610.is_present(), 1)); + HANDLE_CODE(bref.pack(dl_data_to_ul_ack_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(ul_access_cfg_list_dci_1_1_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(subslot_len_for_pucch_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(dl_data_to_ul_ack_dci_1_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(nof_bits_for_pucch_res_ind_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(dmrs_ul_transform_precoding_pucch_r16_present, 1)); + HANDLE_CODE(bref.pack(spatial_relation_info_to_add_mod_list_size_ext_v1610.is_present(), 1)); + HANDLE_CODE(bref.pack(spatial_relation_info_to_release_list_size_ext_v1610.is_present(), 1)); + HANDLE_CODE(bref.pack(spatial_relation_info_to_add_mod_list_ext_v1610.is_present(), 1)); + HANDLE_CODE(bref.pack(spatial_relation_info_to_release_list_ext_v1610.is_present(), 1)); + HANDLE_CODE(bref.pack(res_group_to_add_mod_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(res_group_to_release_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(sps_pucch_an_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(sched_request_res_to_add_mod_list_ext_v1610.is_present(), 1)); + if (res_to_add_mod_list_ext_v1610.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *res_to_add_mod_list_ext_v1610, 1, 128)); + } + if (dl_data_to_ul_ack_r16.is_present()) { + HANDLE_CODE(dl_data_to_ul_ack_r16->pack(bref)); + } + if (ul_access_cfg_list_dci_1_1_r16.is_present()) { + HANDLE_CODE(ul_access_cfg_list_dci_1_1_r16->pack(bref)); + } + if (subslot_len_for_pucch_r16.is_present()) { + HANDLE_CODE(subslot_len_for_pucch_r16->pack(bref)); + } + if (dl_data_to_ul_ack_dci_1_2_r16.is_present()) { + HANDLE_CODE(dl_data_to_ul_ack_dci_1_2_r16->pack(bref)); + } + if (nof_bits_for_pucch_res_ind_dci_1_2_r16_present) { + HANDLE_CODE(pack_integer(bref, nof_bits_for_pucch_res_ind_dci_1_2_r16, (uint8_t)0u, (uint8_t)3u)); + } + if (spatial_relation_info_to_add_mod_list_size_ext_v1610.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *spatial_relation_info_to_add_mod_list_size_ext_v1610, 1, 56)); + } + if (spatial_relation_info_to_release_list_size_ext_v1610.is_present()) { + HANDLE_CODE(pack_dyn_seq_of( + bref, *spatial_relation_info_to_release_list_size_ext_v1610, 1, 56, integer_packer(1, 8))); + } + if (spatial_relation_info_to_add_mod_list_ext_v1610.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *spatial_relation_info_to_add_mod_list_ext_v1610, 1, 64)); + } + if (spatial_relation_info_to_release_list_ext_v1610.is_present()) { + HANDLE_CODE(pack_dyn_seq_of( + bref, *spatial_relation_info_to_release_list_ext_v1610, 1, 64, integer_packer(1, 64))); + } + if (res_group_to_add_mod_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *res_group_to_add_mod_list_r16, 1, 4)); + } + if (res_group_to_release_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *res_group_to_release_list_r16, 1, 4, integer_packer(0, 3))); + } + if (sps_pucch_an_list_r16.is_present()) { + HANDLE_CODE(sps_pucch_an_list_r16->pack(bref)); + } + if (sched_request_res_to_add_mod_list_ext_v1610.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *sched_request_res_to_add_mod_list_ext_v1610, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(format0_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(format2_ext_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(format3_ext_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(format4_ext_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(ul_access_cfg_list_dci_1_2_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(map_pattern_r17_present, 1)); + HANDLE_CODE(bref.pack(pwr_ctrl_set_info_to_add_mod_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(pwr_ctrl_set_info_to_release_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(second_tpc_field_dci_1_1_r17_present, 1)); + HANDLE_CODE(bref.pack(second_tpc_field_dci_1_2_r17_present, 1)); + HANDLE_CODE(bref.pack(dl_data_to_ul_ack_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(dl_data_to_ul_ack_dci_1_2_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(ul_access_cfg_list_dci_1_1_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(sched_request_res_to_add_mod_list_ext_v1700.is_present(), 1)); + HANDLE_CODE(bref.pack(dmrs_bundling_pucch_cfg_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(dl_data_to_ul_ack_v1700.is_present(), 1)); + HANDLE_CODE(bref.pack(dl_data_to_ul_ack_multicast_dci_format4_1_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(sps_pucch_an_list_multicast_r17.is_present(), 1)); + if (format0_r17.is_present()) { + HANDLE_CODE(format0_r17->pack(bref)); + } + if (format2_ext_r17.is_present()) { + HANDLE_CODE(format2_ext_r17->pack(bref)); + } + if (format3_ext_r17.is_present()) { + HANDLE_CODE(format3_ext_r17->pack(bref)); + } + if (format4_ext_r17.is_present()) { + HANDLE_CODE(format4_ext_r17->pack(bref)); + } + if (ul_access_cfg_list_dci_1_2_r17.is_present()) { + HANDLE_CODE(ul_access_cfg_list_dci_1_2_r17->pack(bref)); + } + if (map_pattern_r17_present) { + HANDLE_CODE(map_pattern_r17.pack(bref)); + } + if (pwr_ctrl_set_info_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *pwr_ctrl_set_info_to_add_mod_list_r17, 1, 8)); + } + if (pwr_ctrl_set_info_to_release_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *pwr_ctrl_set_info_to_release_list_r17, 1, 8, integer_packer(1, 8))); + } + if (dl_data_to_ul_ack_r17.is_present()) { + HANDLE_CODE(dl_data_to_ul_ack_r17->pack(bref)); + } + if (dl_data_to_ul_ack_dci_1_2_r17.is_present()) { + HANDLE_CODE(dl_data_to_ul_ack_dci_1_2_r17->pack(bref)); + } + if (ul_access_cfg_list_dci_1_1_r17.is_present()) { + HANDLE_CODE(ul_access_cfg_list_dci_1_1_r17->pack(bref)); + } + if (sched_request_res_to_add_mod_list_ext_v1700.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *sched_request_res_to_add_mod_list_ext_v1700, 1, 8)); + } + if (dmrs_bundling_pucch_cfg_r17.is_present()) { + HANDLE_CODE(dmrs_bundling_pucch_cfg_r17->pack(bref)); + } + if (dl_data_to_ul_ack_v1700.is_present()) { + HANDLE_CODE(dl_data_to_ul_ack_v1700->pack(bref)); + } + if (dl_data_to_ul_ack_multicast_dci_format4_1_r17.is_present()) { + HANDLE_CODE(dl_data_to_ul_ack_multicast_dci_format4_1_r17->pack(bref)); + } + if (sps_pucch_an_list_multicast_r17.is_present()) { + HANDLE_CODE(sps_pucch_an_list_multicast_r17->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool res_set_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(res_set_to_add_mod_list_present, 1)); + bool res_set_to_release_list_present; + HANDLE_CODE(bref.unpack(res_set_to_release_list_present, 1)); + bool res_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(res_to_add_mod_list_present, 1)); + bool res_to_release_list_present; + 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)); + bool sched_request_res_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(sched_request_res_to_add_mod_list_present, 1)); + bool sched_request_res_to_release_list_present; + HANDLE_CODE(bref.unpack(sched_request_res_to_release_list_present, 1)); + bool multi_csi_pucch_res_list_present; + HANDLE_CODE(bref.unpack(multi_csi_pucch_res_list_present, 1)); + bool dl_data_to_ul_ack_present; + HANDLE_CODE(bref.unpack(dl_data_to_ul_ack_present, 1)); + bool spatial_relation_info_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(spatial_relation_info_to_add_mod_list_present, 1)); + bool spatial_relation_info_to_release_list_present; + HANDLE_CODE(bref.unpack(spatial_relation_info_to_release_list_present, 1)); + HANDLE_CODE(bref.unpack(pucch_pwr_ctrl_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)); + } + 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)); + } + + 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); + + unpack_presence_flag(res_to_add_mod_list_ext_v1610, bref); + unpack_presence_flag(dl_data_to_ul_ack_r16, bref); + unpack_presence_flag(ul_access_cfg_list_dci_1_1_r16, bref); + unpack_presence_flag(subslot_len_for_pucch_r16, bref); + unpack_presence_flag(dl_data_to_ul_ack_dci_1_2_r16, bref); + HANDLE_CODE(bref.unpack(nof_bits_for_pucch_res_ind_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_ul_transform_precoding_pucch_r16_present, 1)); + unpack_presence_flag(spatial_relation_info_to_add_mod_list_size_ext_v1610, bref); + unpack_presence_flag(spatial_relation_info_to_release_list_size_ext_v1610, bref); + unpack_presence_flag(spatial_relation_info_to_add_mod_list_ext_v1610, bref); + unpack_presence_flag(spatial_relation_info_to_release_list_ext_v1610, bref); + unpack_presence_flag(res_group_to_add_mod_list_r16, bref); + unpack_presence_flag(res_group_to_release_list_r16, bref); + unpack_presence_flag(sps_pucch_an_list_r16, bref); + unpack_presence_flag(sched_request_res_to_add_mod_list_ext_v1610, bref); + if (res_to_add_mod_list_ext_v1610.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*res_to_add_mod_list_ext_v1610, bref, 1, 128)); + } + if (dl_data_to_ul_ack_r16.is_present()) { + HANDLE_CODE(dl_data_to_ul_ack_r16->unpack(bref)); + } + if (ul_access_cfg_list_dci_1_1_r16.is_present()) { + HANDLE_CODE(ul_access_cfg_list_dci_1_1_r16->unpack(bref)); + } + if (subslot_len_for_pucch_r16.is_present()) { + HANDLE_CODE(subslot_len_for_pucch_r16->unpack(bref)); + } + if (dl_data_to_ul_ack_dci_1_2_r16.is_present()) { + HANDLE_CODE(dl_data_to_ul_ack_dci_1_2_r16->unpack(bref)); + } + if (nof_bits_for_pucch_res_ind_dci_1_2_r16_present) { + HANDLE_CODE(unpack_integer(nof_bits_for_pucch_res_ind_dci_1_2_r16, bref, (uint8_t)0u, (uint8_t)3u)); + } + if (spatial_relation_info_to_add_mod_list_size_ext_v1610.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*spatial_relation_info_to_add_mod_list_size_ext_v1610, bref, 1, 56)); + } + if (spatial_relation_info_to_release_list_size_ext_v1610.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of( + *spatial_relation_info_to_release_list_size_ext_v1610, bref, 1, 56, integer_packer(1, 8))); + } + if (spatial_relation_info_to_add_mod_list_ext_v1610.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*spatial_relation_info_to_add_mod_list_ext_v1610, bref, 1, 64)); + } + if (spatial_relation_info_to_release_list_ext_v1610.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of( + *spatial_relation_info_to_release_list_ext_v1610, bref, 1, 64, integer_packer(1, 64))); + } + if (res_group_to_add_mod_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*res_group_to_add_mod_list_r16, bref, 1, 4)); + } + if (res_group_to_release_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*res_group_to_release_list_r16, bref, 1, 4, integer_packer(0, 3))); + } + if (sps_pucch_an_list_r16.is_present()) { + HANDLE_CODE(sps_pucch_an_list_r16->unpack(bref)); + } + if (sched_request_res_to_add_mod_list_ext_v1610.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*sched_request_res_to_add_mod_list_ext_v1610, bref, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(format0_r17, bref); + unpack_presence_flag(format2_ext_r17, bref); + unpack_presence_flag(format3_ext_r17, bref); + unpack_presence_flag(format4_ext_r17, bref); + unpack_presence_flag(ul_access_cfg_list_dci_1_2_r17, bref); + HANDLE_CODE(bref.unpack(map_pattern_r17_present, 1)); + unpack_presence_flag(pwr_ctrl_set_info_to_add_mod_list_r17, bref); + unpack_presence_flag(pwr_ctrl_set_info_to_release_list_r17, bref); + HANDLE_CODE(bref.unpack(second_tpc_field_dci_1_1_r17_present, 1)); + HANDLE_CODE(bref.unpack(second_tpc_field_dci_1_2_r17_present, 1)); + unpack_presence_flag(dl_data_to_ul_ack_r17, bref); + unpack_presence_flag(dl_data_to_ul_ack_dci_1_2_r17, bref); + unpack_presence_flag(ul_access_cfg_list_dci_1_1_r17, bref); + unpack_presence_flag(sched_request_res_to_add_mod_list_ext_v1700, bref); + unpack_presence_flag(dmrs_bundling_pucch_cfg_r17, bref); + unpack_presence_flag(dl_data_to_ul_ack_v1700, bref); + unpack_presence_flag(dl_data_to_ul_ack_multicast_dci_format4_1_r17, bref); + unpack_presence_flag(sps_pucch_an_list_multicast_r17, bref); + if (format0_r17.is_present()) { + HANDLE_CODE(format0_r17->unpack(bref)); + } + if (format2_ext_r17.is_present()) { + HANDLE_CODE(format2_ext_r17->unpack(bref)); + } + if (format3_ext_r17.is_present()) { + HANDLE_CODE(format3_ext_r17->unpack(bref)); + } + if (format4_ext_r17.is_present()) { + HANDLE_CODE(format4_ext_r17->unpack(bref)); + } + if (ul_access_cfg_list_dci_1_2_r17.is_present()) { + HANDLE_CODE(ul_access_cfg_list_dci_1_2_r17->unpack(bref)); + } + if (map_pattern_r17_present) { + HANDLE_CODE(map_pattern_r17.unpack(bref)); + } + if (pwr_ctrl_set_info_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*pwr_ctrl_set_info_to_add_mod_list_r17, bref, 1, 8)); + } + if (pwr_ctrl_set_info_to_release_list_r17.is_present()) { + HANDLE_CODE( + unpack_dyn_seq_of(*pwr_ctrl_set_info_to_release_list_r17, bref, 1, 8, integer_packer(1, 8))); + } + if (dl_data_to_ul_ack_r17.is_present()) { + HANDLE_CODE(dl_data_to_ul_ack_r17->unpack(bref)); + } + if (dl_data_to_ul_ack_dci_1_2_r17.is_present()) { + HANDLE_CODE(dl_data_to_ul_ack_dci_1_2_r17->unpack(bref)); + } + if (ul_access_cfg_list_dci_1_1_r17.is_present()) { + HANDLE_CODE(ul_access_cfg_list_dci_1_1_r17->unpack(bref)); + } + if (sched_request_res_to_add_mod_list_ext_v1700.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*sched_request_res_to_add_mod_list_ext_v1700, bref, 1, 8)); + } + if (dmrs_bundling_pucch_cfg_r17.is_present()) { + HANDLE_CODE(dmrs_bundling_pucch_cfg_r17->unpack(bref)); + } + if (dl_data_to_ul_ack_v1700.is_present()) { + HANDLE_CODE(dl_data_to_ul_ack_v1700->unpack(bref)); + } + if (dl_data_to_ul_ack_multicast_dci_format4_1_r17.is_present()) { + HANDLE_CODE(dl_data_to_ul_ack_multicast_dci_format4_1_r17->unpack(bref)); + } + if (sps_pucch_an_list_multicast_r17.is_present()) { + HANDLE_CODE(sps_pucch_an_list_multicast_r17->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void pucch_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (res_set_to_add_mod_list.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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 (ext) { + if (res_to_add_mod_list_ext_v1610.is_present()) { + j.start_array("resourceToAddModListExt-v1610"); + for (const auto& e1 : *res_to_add_mod_list_ext_v1610) { + e1.to_json(j); + } + j.end_array(); + } + if (dl_data_to_ul_ack_r16.is_present()) { + j.write_fieldname("dl-DataToUL-ACK-r16"); + dl_data_to_ul_ack_r16->to_json(j); + } + if (ul_access_cfg_list_dci_1_1_r16.is_present()) { + j.write_fieldname("ul-AccessConfigListDCI-1-1-r16"); + ul_access_cfg_list_dci_1_1_r16->to_json(j); + } + if (subslot_len_for_pucch_r16.is_present()) { + j.write_fieldname("subslotLengthForPUCCH-r16"); + subslot_len_for_pucch_r16->to_json(j); + } + if (dl_data_to_ul_ack_dci_1_2_r16.is_present()) { + j.write_fieldname("dl-DataToUL-ACK-DCI-1-2-r16"); + dl_data_to_ul_ack_dci_1_2_r16->to_json(j); + } + if (nof_bits_for_pucch_res_ind_dci_1_2_r16_present) { + j.write_int("numberOfBitsForPUCCH-ResourceIndicatorDCI-1-2-r16", nof_bits_for_pucch_res_ind_dci_1_2_r16); + } + if (dmrs_ul_transform_precoding_pucch_r16_present) { + j.write_str("dmrs-UplinkTransformPrecodingPUCCH-r16", "enabled"); + } + if (spatial_relation_info_to_add_mod_list_size_ext_v1610.is_present()) { + j.start_array("spatialRelationInfoToAddModListSizeExt-v1610"); + for (const auto& e1 : *spatial_relation_info_to_add_mod_list_size_ext_v1610) { + e1.to_json(j); + } + j.end_array(); + } + if (spatial_relation_info_to_release_list_size_ext_v1610.is_present()) { + j.start_array("spatialRelationInfoToReleaseListSizeExt-v1610"); + for (const auto& e1 : *spatial_relation_info_to_release_list_size_ext_v1610) { + j.write_int(e1); + } + j.end_array(); + } + if (spatial_relation_info_to_add_mod_list_ext_v1610.is_present()) { + j.start_array("spatialRelationInfoToAddModListExt-v1610"); + for (const auto& e1 : *spatial_relation_info_to_add_mod_list_ext_v1610) { + e1.to_json(j); + } + j.end_array(); + } + if (spatial_relation_info_to_release_list_ext_v1610.is_present()) { + j.start_array("spatialRelationInfoToReleaseListExt-v1610"); + for (const auto& e1 : *spatial_relation_info_to_release_list_ext_v1610) { + j.write_int(e1); + } + j.end_array(); + } + if (res_group_to_add_mod_list_r16.is_present()) { + j.start_array("resourceGroupToAddModList-r16"); + for (const auto& e1 : *res_group_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (res_group_to_release_list_r16.is_present()) { + j.start_array("resourceGroupToReleaseList-r16"); + for (const auto& e1 : *res_group_to_release_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sps_pucch_an_list_r16.is_present()) { + j.write_fieldname("sps-PUCCH-AN-List-r16"); + sps_pucch_an_list_r16->to_json(j); + } + if (sched_request_res_to_add_mod_list_ext_v1610.is_present()) { + j.start_array("schedulingRequestResourceToAddModListExt-v1610"); + for (const auto& e1 : *sched_request_res_to_add_mod_list_ext_v1610) { + e1.to_json(j); + } + j.end_array(); + } + if (format0_r17.is_present()) { + j.write_fieldname("format0-r17"); + format0_r17->to_json(j); + } + if (format2_ext_r17.is_present()) { + j.write_fieldname("format2Ext-r17"); + format2_ext_r17->to_json(j); + } + if (format3_ext_r17.is_present()) { + j.write_fieldname("format3Ext-r17"); + format3_ext_r17->to_json(j); + } + if (format4_ext_r17.is_present()) { + j.write_fieldname("format4Ext-r17"); + format4_ext_r17->to_json(j); + } + if (ul_access_cfg_list_dci_1_2_r17.is_present()) { + j.write_fieldname("ul-AccessConfigListDCI-1-2-r17"); + ul_access_cfg_list_dci_1_2_r17->to_json(j); + } + if (map_pattern_r17_present) { + j.write_str("mappingPattern-r17", map_pattern_r17.to_string()); + } + if (pwr_ctrl_set_info_to_add_mod_list_r17.is_present()) { + j.start_array("powerControlSetInfoToAddModList-r17"); + for (const auto& e1 : *pwr_ctrl_set_info_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (pwr_ctrl_set_info_to_release_list_r17.is_present()) { + j.start_array("powerControlSetInfoToReleaseList-r17"); + for (const auto& e1 : *pwr_ctrl_set_info_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (second_tpc_field_dci_1_1_r17_present) { + j.write_str("secondTPCFieldDCI-1-1-r17", "enabled"); + } + if (second_tpc_field_dci_1_2_r17_present) { + j.write_str("secondTPCFieldDCI-1-2-r17", "enabled"); + } + if (dl_data_to_ul_ack_r17.is_present()) { + j.write_fieldname("dl-DataToUL-ACK-r17"); + dl_data_to_ul_ack_r17->to_json(j); + } + if (dl_data_to_ul_ack_dci_1_2_r17.is_present()) { + j.write_fieldname("dl-DataToUL-ACK-DCI-1-2-r17"); + dl_data_to_ul_ack_dci_1_2_r17->to_json(j); + } + if (ul_access_cfg_list_dci_1_1_r17.is_present()) { + j.write_fieldname("ul-AccessConfigListDCI-1-1-r17"); + ul_access_cfg_list_dci_1_1_r17->to_json(j); + } + if (sched_request_res_to_add_mod_list_ext_v1700.is_present()) { + j.start_array("schedulingRequestResourceToAddModListExt-v1700"); + for (const auto& e1 : *sched_request_res_to_add_mod_list_ext_v1700) { + e1.to_json(j); + } + j.end_array(); + } + if (dmrs_bundling_pucch_cfg_r17.is_present()) { + j.write_fieldname("dmrs-BundlingPUCCH-Config-r17"); + dmrs_bundling_pucch_cfg_r17->to_json(j); + } + if (dl_data_to_ul_ack_v1700.is_present()) { + j.write_fieldname("dl-DataToUL-ACK-v1700"); + dl_data_to_ul_ack_v1700->to_json(j); + } + if (dl_data_to_ul_ack_multicast_dci_format4_1_r17.is_present()) { + j.write_fieldname("dl-DataToUL-ACK-MulticastDCI-Format4-1-r17"); + dl_data_to_ul_ack_multicast_dci_format4_1_r17->to_json(j); + } + if (sps_pucch_an_list_multicast_r17.is_present()) { + j.write_fieldname("sps-PUCCH-AN-ListMulticast-r17"); + sps_pucch_an_list_multicast_r17->to_json(j); + } + } + j.end_obj(); +} + +void pucch_cfg_s::subslot_len_for_pucch_r16_c_::destroy_() {} +void pucch_cfg_s::subslot_len_for_pucch_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +pucch_cfg_s::subslot_len_for_pucch_r16_c_::subslot_len_for_pucch_r16_c_( + const pucch_cfg_s::subslot_len_for_pucch_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::normal_cp_r16: + c.init(other.c.get()); + break; + case types::extended_cp_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_s::subslot_len_for_pucch_r16_c_"); + } +} +pucch_cfg_s::subslot_len_for_pucch_r16_c_& +pucch_cfg_s::subslot_len_for_pucch_r16_c_::operator=(const pucch_cfg_s::subslot_len_for_pucch_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::normal_cp_r16: + c.set(other.c.get()); + break; + case types::extended_cp_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_s::subslot_len_for_pucch_r16_c_"); + } + + return *this; +} +pucch_cfg_s::subslot_len_for_pucch_r16_c_::normal_cp_r16_e_& +pucch_cfg_s::subslot_len_for_pucch_r16_c_::set_normal_cp_r16() +{ + set(types::normal_cp_r16); + return c.get(); +} +pucch_cfg_s::subslot_len_for_pucch_r16_c_::extended_cp_r16_e_& +pucch_cfg_s::subslot_len_for_pucch_r16_c_::set_extended_cp_r16() +{ + set(types::extended_cp_r16); + return c.get(); +} +void pucch_cfg_s::subslot_len_for_pucch_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::normal_cp_r16: + j.write_str("normalCP-r16", c.get().to_string()); + break; + case types::extended_cp_r16: + j.write_str("extendedCP-r16", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_s::subslot_len_for_pucch_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE pucch_cfg_s::subslot_len_for_pucch_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::normal_cp_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::extended_cp_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_s::subslot_len_for_pucch_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pucch_cfg_s::subslot_len_for_pucch_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::normal_cp_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::extended_cp_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "pucch_cfg_s::subslot_len_for_pucch_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pucch_cfg_s::subslot_len_for_pucch_r16_c_::normal_cp_r16_opts::to_string() const +{ + static const char* names[] = {"n2", "n7"}; + return convert_enum_idx(names, 2, value, "pucch_cfg_s::subslot_len_for_pucch_r16_c_::normal_cp_r16_e_"); +} +uint8_t pucch_cfg_s::subslot_len_for_pucch_r16_c_::normal_cp_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 7}; + return map_enum_number(numbers, 2, value, "pucch_cfg_s::subslot_len_for_pucch_r16_c_::normal_cp_r16_e_"); +} + +const char* pucch_cfg_s::subslot_len_for_pucch_r16_c_::extended_cp_r16_opts::to_string() const +{ + static const char* names[] = {"n2", "n6"}; + return convert_enum_idx(names, 2, value, "pucch_cfg_s::subslot_len_for_pucch_r16_c_::extended_cp_r16_e_"); +} +uint8_t pucch_cfg_s::subslot_len_for_pucch_r16_c_::extended_cp_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 6}; + return map_enum_number(numbers, 2, value, "pucch_cfg_s::subslot_len_for_pucch_r16_c_::extended_cp_r16_e_"); +} + +const char* pucch_cfg_s::subslot_len_for_pucch_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"normalCP-r16", "extendedCP-r16"}; + return convert_enum_idx(names, 2, value, "pucch_cfg_s::subslot_len_for_pucch_r16_c_::types"); +} + +const char* pucch_cfg_s::map_pattern_r17_opts::to_string() const +{ + static const char* names[] = {"cyclicMapping", "sequentialMapping"}; + return convert_enum_idx(names, 2, value, "pucch_cfg_s::map_pattern_r17_e_"); +} + +// PUSCH-PowerControl ::= SEQUENCE +SRSASN_CODE pusch_pwr_ctrl_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.size() > 0, 1)); + HANDLE_CODE(bref.pack(pathloss_ref_rs_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(pathloss_ref_rs_to_release_list.size() > 0, 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(sri_pusch_map_to_release_list.size() > 0, 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, p0_alpha_sets, 1, 30)); + } + if (pathloss_ref_rs_to_add_mod_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, pathloss_ref_rs_to_add_mod_list, 1, 4)); + } + if (pathloss_ref_rs_to_release_list.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sri_pusch_map_to_add_mod_list, 1, 16)); + } + if (sri_pusch_map_to_release_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sri_pusch_map_to_release_list, 1, 16, integer_packer(0, 15))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_pwr_ctrl_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)); + bool p0_alpha_sets_present; + HANDLE_CODE(bref.unpack(p0_alpha_sets_present, 1)); + bool pathloss_ref_rs_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(pathloss_ref_rs_to_add_mod_list_present, 1)); + bool pathloss_ref_rs_to_release_list_present; + 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)); + bool sri_pusch_map_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(sri_pusch_map_to_add_mod_list_present, 1)); + bool sri_pusch_map_to_release_list_present; + HANDLE_CODE(bref.unpack(sri_pusch_map_to_release_list_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 (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 SRSASN_SUCCESS; +} +void pusch_pwr_ctrl_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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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(); +} + +// PUSCH-PowerControl-v1610 ::= SEQUENCE +SRSASN_CODE pusch_pwr_ctrl_v1610_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pathloss_ref_rs_to_add_mod_list_size_ext_v1610.size() > 0, 1)); + HANDLE_CODE(bref.pack(pathloss_ref_rs_to_release_list_size_ext_v1610.size() > 0, 1)); + HANDLE_CODE(bref.pack(p0_pusch_set_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(olpc_param_set_present, 1)); + + if (pathloss_ref_rs_to_add_mod_list_size_ext_v1610.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, pathloss_ref_rs_to_add_mod_list_size_ext_v1610, 1, 60)); + } + if (pathloss_ref_rs_to_release_list_size_ext_v1610.size() > 0) { + HANDLE_CODE( + pack_dyn_seq_of(bref, pathloss_ref_rs_to_release_list_size_ext_v1610, 1, 60, integer_packer(4, 63))); + } + if (p0_pusch_set_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, p0_pusch_set_list_r16, 1, 16)); + } + if (olpc_param_set_present) { + HANDLE_CODE(bref.pack(olpc_param_set.olpc_param_set_dci_0_1_r16_present, 1)); + HANDLE_CODE(bref.pack(olpc_param_set.olpc_param_set_dci_0_2_r16_present, 1)); + if (olpc_param_set.olpc_param_set_dci_0_1_r16_present) { + HANDLE_CODE(pack_integer(bref, olpc_param_set.olpc_param_set_dci_0_1_r16, (uint8_t)1u, (uint8_t)2u)); + } + if (olpc_param_set.olpc_param_set_dci_0_2_r16_present) { + HANDLE_CODE(pack_integer(bref, olpc_param_set.olpc_param_set_dci_0_2_r16, (uint8_t)1u, (uint8_t)2u)); + } + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= sri_pusch_map_to_add_mod_list2_r17.is_present(); + group_flags[0] |= sri_pusch_map_to_release_list2_r17.is_present(); + group_flags[0] |= p0_pusch_set_list2_r17.is_present(); + group_flags[0] |= dummy.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sri_pusch_map_to_add_mod_list2_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(sri_pusch_map_to_release_list2_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(p0_pusch_set_list2_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(dummy.is_present(), 1)); + if (sri_pusch_map_to_add_mod_list2_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *sri_pusch_map_to_add_mod_list2_r17, 1, 16)); + } + if (sri_pusch_map_to_release_list2_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *sri_pusch_map_to_release_list2_r17, 1, 16, integer_packer(0, 15))); + } + if (p0_pusch_set_list2_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *p0_pusch_set_list2_r17, 1, 16)); + } + if (dummy.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *dummy, 1, 64)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_pwr_ctrl_v1610_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool pathloss_ref_rs_to_add_mod_list_size_ext_v1610_present; + HANDLE_CODE(bref.unpack(pathloss_ref_rs_to_add_mod_list_size_ext_v1610_present, 1)); + bool pathloss_ref_rs_to_release_list_size_ext_v1610_present; + HANDLE_CODE(bref.unpack(pathloss_ref_rs_to_release_list_size_ext_v1610_present, 1)); + bool p0_pusch_set_list_r16_present; + HANDLE_CODE(bref.unpack(p0_pusch_set_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(olpc_param_set_present, 1)); + + if (pathloss_ref_rs_to_add_mod_list_size_ext_v1610_present) { + HANDLE_CODE(unpack_dyn_seq_of(pathloss_ref_rs_to_add_mod_list_size_ext_v1610, bref, 1, 60)); + } + if (pathloss_ref_rs_to_release_list_size_ext_v1610_present) { + HANDLE_CODE( + unpack_dyn_seq_of(pathloss_ref_rs_to_release_list_size_ext_v1610, bref, 1, 60, integer_packer(4, 63))); + } + if (p0_pusch_set_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(p0_pusch_set_list_r16, bref, 1, 16)); + } + if (olpc_param_set_present) { + HANDLE_CODE(bref.unpack(olpc_param_set.olpc_param_set_dci_0_1_r16_present, 1)); + HANDLE_CODE(bref.unpack(olpc_param_set.olpc_param_set_dci_0_2_r16_present, 1)); + if (olpc_param_set.olpc_param_set_dci_0_1_r16_present) { + HANDLE_CODE(unpack_integer(olpc_param_set.olpc_param_set_dci_0_1_r16, bref, (uint8_t)1u, (uint8_t)2u)); + } + if (olpc_param_set.olpc_param_set_dci_0_2_r16_present) { + HANDLE_CODE(unpack_integer(olpc_param_set.olpc_param_set_dci_0_2_r16, bref, (uint8_t)1u, (uint8_t)2u)); + } + } + + 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); + + unpack_presence_flag(sri_pusch_map_to_add_mod_list2_r17, bref); + unpack_presence_flag(sri_pusch_map_to_release_list2_r17, bref); + unpack_presence_flag(p0_pusch_set_list2_r17, bref); + unpack_presence_flag(dummy, bref); + if (sri_pusch_map_to_add_mod_list2_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*sri_pusch_map_to_add_mod_list2_r17, bref, 1, 16)); + } + if (sri_pusch_map_to_release_list2_r17.is_present()) { + HANDLE_CODE( + unpack_dyn_seq_of(*sri_pusch_map_to_release_list2_r17, bref, 1, 16, integer_packer(0, 15))); + } + if (p0_pusch_set_list2_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*p0_pusch_set_list2_r17, bref, 1, 16)); + } + if (dummy.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*dummy, bref, 1, 64)); + } + } + } + return SRSASN_SUCCESS; +} +void pusch_pwr_ctrl_v1610_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pathloss_ref_rs_to_add_mod_list_size_ext_v1610.size() > 0) { + j.start_array("pathlossReferenceRSToAddModListSizeExt-v1610"); + for (const auto& e1 : pathloss_ref_rs_to_add_mod_list_size_ext_v1610) { + e1.to_json(j); + } + j.end_array(); + } + if (pathloss_ref_rs_to_release_list_size_ext_v1610.size() > 0) { + j.start_array("pathlossReferenceRSToReleaseListSizeExt-v1610"); + for (const auto& e1 : pathloss_ref_rs_to_release_list_size_ext_v1610) { + j.write_int(e1); + } + j.end_array(); + } + if (p0_pusch_set_list_r16.size() > 0) { + j.start_array("p0-PUSCH-SetList-r16"); + for (const auto& e1 : p0_pusch_set_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (olpc_param_set_present) { + j.write_fieldname("olpc-ParameterSet"); + j.start_obj(); + if (olpc_param_set.olpc_param_set_dci_0_1_r16_present) { + j.write_int("olpc-ParameterSetDCI-0-1-r16", olpc_param_set.olpc_param_set_dci_0_1_r16); + } + if (olpc_param_set.olpc_param_set_dci_0_2_r16_present) { + j.write_int("olpc-ParameterSetDCI-0-2-r16", olpc_param_set.olpc_param_set_dci_0_2_r16); + } + j.end_obj(); + } + if (ext) { + if (sri_pusch_map_to_add_mod_list2_r17.is_present()) { + j.start_array("sri-PUSCH-MappingToAddModList2-r17"); + for (const auto& e1 : *sri_pusch_map_to_add_mod_list2_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (sri_pusch_map_to_release_list2_r17.is_present()) { + j.start_array("sri-PUSCH-MappingToReleaseList2-r17"); + for (const auto& e1 : *sri_pusch_map_to_release_list2_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (p0_pusch_set_list2_r17.is_present()) { + j.start_array("p0-PUSCH-SetList2-r17"); + for (const auto& e1 : *p0_pusch_set_list2_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (dummy.is_present()) { + j.start_array("dummy"); + for (const auto& e1 : *dummy) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +// SRS-PosResourceSet-r16 ::= SEQUENCE +SRSASN_CODE srs_pos_res_set_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(srs_pos_res_id_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(alpha_r16_present, 1)); + HANDLE_CODE(bref.pack(p0_r16_present, 1)); + HANDLE_CODE(bref.pack(pathloss_ref_rs_pos_r16_present, 1)); + + HANDLE_CODE(pack_integer(bref, srs_pos_res_set_id_r16, (uint8_t)0u, (uint8_t)15u)); + if (srs_pos_res_id_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_pos_res_id_list_r16, 1, 16, integer_packer(0, 63))); + } + HANDLE_CODE(res_type_r16.pack(bref)); + if (alpha_r16_present) { + HANDLE_CODE(alpha_r16.pack(bref)); + } + if (p0_r16_present) { + HANDLE_CODE(pack_integer(bref, p0_r16, (int16_t)-202, (int16_t)24)); + } + if (pathloss_ref_rs_pos_r16_present) { + HANDLE_CODE(pathloss_ref_rs_pos_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_pos_res_set_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool srs_pos_res_id_list_r16_present; + HANDLE_CODE(bref.unpack(srs_pos_res_id_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(alpha_r16_present, 1)); + HANDLE_CODE(bref.unpack(p0_r16_present, 1)); + HANDLE_CODE(bref.unpack(pathloss_ref_rs_pos_r16_present, 1)); + + HANDLE_CODE(unpack_integer(srs_pos_res_set_id_r16, bref, (uint8_t)0u, (uint8_t)15u)); + if (srs_pos_res_id_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_pos_res_id_list_r16, bref, 1, 16, integer_packer(0, 63))); + } + HANDLE_CODE(res_type_r16.unpack(bref)); + if (alpha_r16_present) { + HANDLE_CODE(alpha_r16.unpack(bref)); + } + if (p0_r16_present) { + HANDLE_CODE(unpack_integer(p0_r16, bref, (int16_t)-202, (int16_t)24)); + } + if (pathloss_ref_rs_pos_r16_present) { + HANDLE_CODE(pathloss_ref_rs_pos_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void srs_pos_res_set_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("srs-PosResourceSetId-r16", srs_pos_res_set_id_r16); + if (srs_pos_res_id_list_r16.size() > 0) { + j.start_array("srs-PosResourceIdList-r16"); + for (const auto& e1 : srs_pos_res_id_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + j.write_fieldname("resourceType-r16"); + res_type_r16.to_json(j); + if (alpha_r16_present) { + j.write_str("alpha-r16", alpha_r16.to_string()); + } + if (p0_r16_present) { + j.write_int("p0-r16", p0_r16); + } + if (pathloss_ref_rs_pos_r16_present) { + j.write_fieldname("pathlossReferenceRS-Pos-r16"); + pathloss_ref_rs_pos_r16.to_json(j); + } + j.end_obj(); +} + +void srs_pos_res_set_r16_s::res_type_r16_c_::destroy_() +{ + switch (type_) { + case types::aperiodic_r16: + c.destroy(); + break; + case types::semi_persistent_r16: + c.destroy(); + break; + case types::periodic_r16: + c.destroy(); + break; + default: + break; + } +} +void srs_pos_res_set_r16_s::res_type_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::aperiodic_r16: + c.init(); + break; + case types::semi_persistent_r16: + c.init(); + break; + case types::periodic_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::res_type_r16_c_"); + } +} +srs_pos_res_set_r16_s::res_type_r16_c_::res_type_r16_c_(const srs_pos_res_set_r16_s::res_type_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::aperiodic_r16: + c.init(other.c.get()); + break; + case types::semi_persistent_r16: + c.init(other.c.get()); + break; + case types::periodic_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::res_type_r16_c_"); + } +} +srs_pos_res_set_r16_s::res_type_r16_c_& +srs_pos_res_set_r16_s::res_type_r16_c_::operator=(const srs_pos_res_set_r16_s::res_type_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::aperiodic_r16: + c.set(other.c.get()); + break; + case types::semi_persistent_r16: + c.set(other.c.get()); + break; + case types::periodic_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::res_type_r16_c_"); + } + + return *this; +} +srs_pos_res_set_r16_s::res_type_r16_c_::aperiodic_r16_s_& srs_pos_res_set_r16_s::res_type_r16_c_::set_aperiodic_r16() +{ + set(types::aperiodic_r16); + return c.get(); +} +srs_pos_res_set_r16_s::res_type_r16_c_::semi_persistent_r16_s_& +srs_pos_res_set_r16_s::res_type_r16_c_::set_semi_persistent_r16() +{ + set(types::semi_persistent_r16); + return c.get(); +} +srs_pos_res_set_r16_s::res_type_r16_c_::periodic_r16_s_& srs_pos_res_set_r16_s::res_type_r16_c_::set_periodic_r16() +{ + set(types::periodic_r16); + return c.get(); +} +void srs_pos_res_set_r16_s::res_type_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::aperiodic_r16: + j.write_fieldname("aperiodic-r16"); + j.start_obj(); + if (c.get().aperiodic_srs_res_trigger_list_r16.size() > 0) { + j.start_array("aperiodicSRS-ResourceTriggerList-r16"); + for (const auto& e1 : c.get().aperiodic_srs_res_trigger_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); + break; + case types::semi_persistent_r16: + j.write_fieldname("semi-persistent-r16"); + j.start_obj(); + j.end_obj(); + break; + case types::periodic_r16: + j.write_fieldname("periodic-r16"); + j.start_obj(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::res_type_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE srs_pos_res_set_r16_s::res_type_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::aperiodic_r16: + bref.pack(c.get().ext, 1); + HANDLE_CODE(bref.pack(c.get().aperiodic_srs_res_trigger_list_r16.size() > 0, 1)); + if (c.get().aperiodic_srs_res_trigger_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get().aperiodic_srs_res_trigger_list_r16, 1, 3, integer_packer(1, 3))); + } + break; + case types::semi_persistent_r16: + bref.pack(c.get().ext, 1); + break; + case types::periodic_r16: + bref.pack(c.get().ext, 1); + break; + default: + log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::res_type_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_pos_res_set_r16_s::res_type_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::aperiodic_r16: + bref.unpack(c.get().ext, 1); + bool aperiodic_srs_res_trigger_list_r16_present; + HANDLE_CODE(bref.unpack(aperiodic_srs_res_trigger_list_r16_present, 1)); + if (aperiodic_srs_res_trigger_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of( + c.get().aperiodic_srs_res_trigger_list_r16, bref, 1, 3, integer_packer(1, 3))); + } + break; + case types::semi_persistent_r16: + bref.unpack(c.get().ext, 1); + break; + case types::periodic_r16: + bref.unpack(c.get().ext, 1); + break; + default: + log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::res_type_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* srs_pos_res_set_r16_s::res_type_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"aperiodic-r16", "semi-persistent-r16", "periodic-r16"}; + return convert_enum_idx(names, 3, value, "srs_pos_res_set_r16_s::res_type_r16_c_::types"); +} + +void srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::destroy_() +{ + switch (type_) { + case types::ssb_ncell_r16: + c.destroy(); + break; + case types::dl_prs_r16: + c.destroy(); + break; + default: + break; + } +} +void srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ssb_idx_serving_r16: + break; + case types::ssb_ncell_r16: + c.init(); + break; + case types::dl_prs_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_"); + } +} +srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::pathloss_ref_rs_pos_r16_c_( + const srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ssb_idx_serving_r16: + c.init(other.c.get()); + break; + case types::ssb_ncell_r16: + c.init(other.c.get()); + break; + case types::dl_prs_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_"); + } +} +srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_& srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::operator=( + const srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ssb_idx_serving_r16: + c.set(other.c.get()); + break; + case types::ssb_ncell_r16: + c.set(other.c.get()); + break; + case types::dl_prs_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_"); + } + + return *this; +} +uint8_t& srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::set_ssb_idx_serving_r16() +{ + set(types::ssb_idx_serving_r16); + return c.get(); +} +ssb_info_ncell_r16_s& srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::set_ssb_ncell_r16() +{ + set(types::ssb_ncell_r16); + return c.get(); +} +dl_prs_info_r16_s& srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::set_dl_prs_r16() +{ + set(types::dl_prs_r16); + return c.get(); +} +void srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ssb_idx_serving_r16: + j.write_int("ssb-IndexServing-r16", c.get()); + break; + case types::ssb_ncell_r16: + j.write_fieldname("ssb-Ncell-r16"); + c.get().to_json(j); + break; + case types::dl_prs_r16: + j.write_fieldname("dl-PRS-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ssb_idx_serving_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::ssb_ncell_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::dl_prs_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ssb_idx_serving_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::ssb_ncell_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::dl_prs_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-IndexServing-r16", "ssb-Ncell-r16", "dl-PRS-r16"}; + return convert_enum_idx(names, 3, value, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_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.size() > 0, 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.size() > 0) { + 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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= pathloss_ref_rs_list_r16.is_present(); + group_flags[1] |= usage_pdc_r17_present; + group_flags[1] |= available_slot_offset_list_r17.is_present(); + group_flags[1] |= follow_unified_tci_state_srs_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pathloss_ref_rs_list_r16.is_present(), 1)); + if (pathloss_ref_rs_list_r16.is_present()) { + HANDLE_CODE(pathloss_ref_rs_list_r16->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(usage_pdc_r17_present, 1)); + HANDLE_CODE(bref.pack(available_slot_offset_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(follow_unified_tci_state_srs_r17_present, 1)); + if (available_slot_offset_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *available_slot_offset_list_r17, 1, 4, integer_packer(0, 7))); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_res_set_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool srs_res_id_list_present; + 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)); + } + + 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); + + unpack_presence_flag(pathloss_ref_rs_list_r16, bref); + if (pathloss_ref_rs_list_r16.is_present()) { + HANDLE_CODE(pathloss_ref_rs_list_r16->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(usage_pdc_r17_present, 1)); + unpack_presence_flag(available_slot_offset_list_r17, bref); + HANDLE_CODE(bref.unpack(follow_unified_tci_state_srs_r17_present, 1)); + if (available_slot_offset_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*available_slot_offset_list_r17, bref, 1, 4, integer_packer(0, 7))); + } + } + } + return SRSASN_SUCCESS; +} +void srs_res_set_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("srs-ResourceSetId", srs_res_set_id); + if (srs_res_id_list.size() > 0) { + 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()); + } + if (ext) { + if (pathloss_ref_rs_list_r16.is_present()) { + j.write_fieldname("pathlossReferenceRSList-r16"); + pathloss_ref_rs_list_r16->to_json(j); + } + if (usage_pdc_r17_present) { + j.write_str("usagePDC-r17", "true"); + } + if (available_slot_offset_list_r17.is_present()) { + j.start_array("availableSlotOffsetList-r17"); + for (const auto& e1 : *available_slot_offset_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (follow_unified_tci_state_srs_r17_present) { + j.write_str("followUnifiedTCI-StateSRS-r17", "enabled"); + } + } + j.end_obj(); +} + +void srs_res_set_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; + } +} +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_"); + } +} +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_"); + } +} +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::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_"); + } + + return *this; +} +srs_res_set_s::res_type_c_::aperiodic_s_& srs_res_set_s::res_type_c_::set_aperiodic() +{ + set(types::aperiodic); + return c.get(); +} +srs_res_set_s::res_type_c_::semi_persistent_s_& srs_res_set_s::res_type_c_::set_semi_persistent() +{ + set(types::semi_persistent); + return c.get(); +} +srs_res_set_s::res_type_c_::periodic_s_& srs_res_set_s::res_type_c_::set_periodic() +{ + set(types::periodic); + return c.get(); +} +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_"); + } + 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; + } + 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; + } + 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 (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 srs_res_set_s::res_type_c_::aperiodic_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(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); + + unpack_presence_flag(aperiodic_srs_res_trigger_list, bref); + 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 srs_res_set_s::res_type_c_::aperiodic_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 (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(); +} + +const char* srs_res_set_s::res_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"aperiodic", "semi-persistent", "periodic"}; + return convert_enum_idx(names, 3, value, "srs_res_set_s::res_type_c_::types"); +} + +const char* srs_res_set_s::usage_opts::to_string() const +{ + static const char* names[] = {"beamManagement", "codebook", "nonCodebook", "antennaSwitching"}; + return convert_enum_idx(names, 4, value, "srs_res_set_s::usage_e_"); +} + +const char* srs_res_set_s::srs_pwr_ctrl_adjustment_states_opts::to_string() const +{ + static const char* names[] = {"sameAsFci2", "separateClosedLoop"}; + return convert_enum_idx(names, 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 numbers[] = {2}; + return map_enum_number(numbers, 1, value, "srs_res_set_s::srs_pwr_ctrl_adjustment_states_e_"); +} + +// BeamFailureRecoveryConfig ::= SEQUENCE +SRSASN_CODE beam_fail_recovery_cfg_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.size() > 0, 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)); + } + 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.size() > 0) { + 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[1] |= ra_prioritization_two_step_r16.is_present(); + group_flags[1] |= candidate_beam_rs_list_ext_v1610.is_present(); + group_flags[2] |= sp_cell_bfr_cbra_r16_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)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ra_prioritization_two_step_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(candidate_beam_rs_list_ext_v1610.is_present(), 1)); + if (ra_prioritization_two_step_r16.is_present()) { + HANDLE_CODE(ra_prioritization_two_step_r16->pack(bref)); + } + if (candidate_beam_rs_list_ext_v1610.is_present()) { + HANDLE_CODE(candidate_beam_rs_list_ext_v1610->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sp_cell_bfr_cbra_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE beam_fail_recovery_cfg_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)); + bool candidate_beam_rs_list_present; + 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)); + } + 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 (ext) { + 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(msg1_subcarrier_spacing_present, 1)); + if (msg1_subcarrier_spacing_present) { + HANDLE_CODE(msg1_subcarrier_spacing.unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(ra_prioritization_two_step_r16, bref); + unpack_presence_flag(candidate_beam_rs_list_ext_v1610, bref); + if (ra_prioritization_two_step_r16.is_present()) { + HANDLE_CODE(ra_prioritization_two_step_r16->unpack(bref)); + } + if (candidate_beam_rs_list_ext_v1610.is_present()) { + HANDLE_CODE(candidate_beam_rs_list_ext_v1610->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(sp_cell_bfr_cbra_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void beam_fail_recovery_cfg_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.size() > 0) { + 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()); + } + if (ra_prioritization_two_step_r16.is_present()) { + j.write_fieldname("ra-PrioritizationTwoStep-r16"); + ra_prioritization_two_step_r16->to_json(j); + } + if (candidate_beam_rs_list_ext_v1610.is_present()) { + j.write_fieldname("candidateBeamRSListExt-v1610"); + candidate_beam_rs_list_ext_v1610->to_json(j); + } + if (sp_cell_bfr_cbra_r16_present) { + j.write_str("spCell-BFR-CBRA-r16", "true"); + } + } + j.end_obj(); +} + +const char* beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_string() const +{ + static const char* names[] = {"oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; + return convert_enum_idx(names, 8, value, "beam_fail_recovery_cfg_s::ssb_per_rach_occasion_e_"); +} +float beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_number() const +{ + static const float numbers[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; + return map_enum_number(numbers, 8, value, "beam_fail_recovery_cfg_s::ssb_per_rach_occasion_e_"); +} +const char* beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_number_string() const +{ + static const char* number_strs[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; + return convert_enum_idx(number_strs, 8, value, "beam_fail_recovery_cfg_s::ssb_per_rach_occasion_e_"); +} + +const char* beam_fail_recovery_cfg_s::beam_fail_recovery_timer_opts::to_string() const +{ + static const char* names[] = {"ms10", "ms20", "ms40", "ms60", "ms80", "ms100", "ms150", "ms200"}; + return convert_enum_idx(names, 8, value, "beam_fail_recovery_cfg_s::beam_fail_recovery_timer_e_"); +} +uint8_t beam_fail_recovery_cfg_s::beam_fail_recovery_timer_opts::to_number() const +{ + static const uint8_t numbers[] = {10, 20, 40, 60, 80, 100, 150, 200}; + return map_enum_number(numbers, 8, value, "beam_fail_recovery_cfg_s::beam_fail_recovery_timer_e_"); +} + +// LBT-FailureRecoveryConfig-r16 ::= SEQUENCE +SRSASN_CODE lbt_fail_recovery_cfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(lbt_fail_instance_max_count_r16.pack(bref)); + HANDLE_CODE(lbt_fail_detection_timer_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE lbt_fail_recovery_cfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(lbt_fail_instance_max_count_r16.unpack(bref)); + HANDLE_CODE(lbt_fail_detection_timer_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void lbt_fail_recovery_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("lbt-FailureInstanceMaxCount-r16", lbt_fail_instance_max_count_r16.to_string()); + j.write_str("lbt-FailureDetectionTimer-r16", lbt_fail_detection_timer_r16.to_string()); + j.end_obj(); +} + +const char* lbt_fail_recovery_cfg_r16_s::lbt_fail_instance_max_count_r16_opts::to_string() const +{ + static const char* names[] = {"n4", "n8", "n16", "n32", "n64", "n128"}; + return convert_enum_idx(names, 6, value, "lbt_fail_recovery_cfg_r16_s::lbt_fail_instance_max_count_r16_e_"); +} +uint8_t lbt_fail_recovery_cfg_r16_s::lbt_fail_instance_max_count_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {4, 8, 16, 32, 64, 128}; + return map_enum_number(numbers, 6, value, "lbt_fail_recovery_cfg_r16_s::lbt_fail_instance_max_count_r16_e_"); +} + +const char* lbt_fail_recovery_cfg_r16_s::lbt_fail_detection_timer_r16_opts::to_string() const +{ + static const char* names[] = {"ms10", "ms20", "ms40", "ms80", "ms160", "ms320"}; + return convert_enum_idx(names, 6, value, "lbt_fail_recovery_cfg_r16_s::lbt_fail_detection_timer_r16_e_"); +} +uint16_t lbt_fail_recovery_cfg_r16_s::lbt_fail_detection_timer_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {10, 20, 40, 80, 160, 320}; + return map_enum_number(numbers, 6, value, "lbt_fail_recovery_cfg_r16_s::lbt_fail_detection_timer_r16_e_"); +} + +// PUSCH-Config ::= SEQUENCE +SRSASN_CODE pusch_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.size() > 0, 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)); + } + 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 (freq_hop_offset_lists.size() > 0) { + 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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= minimum_sched_offset_k2_r16.is_present(); + group_flags[0] |= ul_access_cfg_list_dci_0_1_r16.is_present(); + group_flags[0] |= harq_process_num_size_dci_0_2_r16_present; + group_flags[0] |= dmrs_seq_initization_dci_0_2_r16_present; + group_flags[0] |= nof_bits_for_rv_dci_0_2_r16_present; + group_flags[0] |= ant_ports_field_presence_dci_0_2_r16_present; + group_flags[0] |= dmrs_ul_for_pusch_map_type_a_dci_0_2_r16.is_present(); + group_flags[0] |= dmrs_ul_for_pusch_map_type_b_dci_0_2_r16.is_present(); + group_flags[0] |= freq_hop_dci_0_2_r16.is_present(); + group_flags[0] |= freq_hop_offset_lists_dci_0_2_r16.is_present(); + group_flags[0] |= codebook_subset_dci_0_2_r16_present; + group_flags[0] |= invalid_symbol_pattern_ind_dci_0_2_r16_present; + group_flags[0] |= max_rank_dci_0_2_r16_present; + group_flags[0] |= mcs_table_dci_0_2_r16_present; + group_flags[0] |= mcs_table_transform_precoder_dci_0_2_r16_present; + group_flags[0] |= prio_ind_dci_0_2_r16_present; + group_flags[0] |= pusch_rep_type_ind_dci_0_2_r16_present; + group_flags[0] |= res_alloc_dci_0_2_r16_present; + group_flags[0] |= res_alloc_type1_granularity_dci_0_2_r16_present; + group_flags[0] |= uci_on_pusch_list_dci_0_2_r16.is_present(); + group_flags[0] |= pusch_time_domain_alloc_list_dci_0_2_r16.is_present(); + group_flags[0] |= pusch_time_domain_alloc_list_dci_0_1_r16.is_present(); + group_flags[0] |= invalid_symbol_pattern_ind_dci_0_1_r16_present; + group_flags[0] |= prio_ind_dci_0_1_r16_present; + group_flags[0] |= pusch_rep_type_ind_dci_0_1_r16_present; + group_flags[0] |= freq_hop_dci_0_1_r16_present; + group_flags[0] |= uci_on_pusch_list_dci_0_1_r16.is_present(); + group_flags[0] |= invalid_symbol_pattern_r16.is_present(); + group_flags[0] |= pusch_pwr_ctrl_v1610.is_present(); + group_flags[0] |= ul_full_pwr_tx_r16_present; + group_flags[0] |= pusch_time_domain_alloc_list_for_multi_pusch_r16.is_present(); + group_flags[0] |= nof_invalid_symbols_for_dl_ul_switching_r16_present; + group_flags[1] |= ul_access_cfg_list_dci_0_2_r17.is_present(); + group_flags[1] |= beta_offsets_cross_pri0_r17.is_present(); + group_flags[1] |= beta_offsets_cross_pri1_r17.is_present(); + group_flags[1] |= beta_offsets_cross_pri0_dci_0_2_r17.is_present(); + group_flags[1] |= beta_offsets_cross_pri1_dci_0_2_r17.is_present(); + group_flags[1] |= map_pattern_r17_present; + group_flags[1] |= second_tpc_field_dci_0_1_r17_present; + group_flags[1] |= second_tpc_field_dci_0_2_r17_present; + group_flags[1] |= seq_offset_for_rv_r17_present; + group_flags[1] |= ul_access_cfg_list_dci_0_1_r17.is_present(); + group_flags[1] |= minimum_sched_offset_k2_r17.is_present(); + group_flags[1] |= available_slot_count_r17_present; + group_flags[1] |= dmrs_bundling_pusch_cfg_r17.is_present(); + group_flags[1] |= harq_process_num_size_dci_0_2_v1700_present; + group_flags[1] |= harq_process_num_size_dci_0_1_r17_present; + group_flags[1] |= mpe_res_pool_to_add_mod_list_r17.is_present(); + group_flags[1] |= mpe_res_pool_to_release_list_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(minimum_sched_offset_k2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(ul_access_cfg_list_dci_0_1_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(harq_process_num_size_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(dmrs_seq_initization_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(nof_bits_for_rv_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(ant_ports_field_presence_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(dmrs_ul_for_pusch_map_type_a_dci_0_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(dmrs_ul_for_pusch_map_type_b_dci_0_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(freq_hop_dci_0_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(freq_hop_offset_lists_dci_0_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(codebook_subset_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(invalid_symbol_pattern_ind_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(max_rank_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(mcs_table_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(mcs_table_transform_precoder_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(prio_ind_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(pusch_rep_type_ind_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(res_alloc_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(res_alloc_type1_granularity_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(uci_on_pusch_list_dci_0_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(pusch_time_domain_alloc_list_dci_0_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(pusch_time_domain_alloc_list_dci_0_1_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(invalid_symbol_pattern_ind_dci_0_1_r16_present, 1)); + HANDLE_CODE(bref.pack(prio_ind_dci_0_1_r16_present, 1)); + HANDLE_CODE(bref.pack(pusch_rep_type_ind_dci_0_1_r16_present, 1)); + HANDLE_CODE(bref.pack(freq_hop_dci_0_1_r16_present, 1)); + HANDLE_CODE(bref.pack(uci_on_pusch_list_dci_0_1_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(invalid_symbol_pattern_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(pusch_pwr_ctrl_v1610.is_present(), 1)); + HANDLE_CODE(bref.pack(ul_full_pwr_tx_r16_present, 1)); + HANDLE_CODE(bref.pack(pusch_time_domain_alloc_list_for_multi_pusch_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(nof_invalid_symbols_for_dl_ul_switching_r16_present, 1)); + if (minimum_sched_offset_k2_r16.is_present()) { + HANDLE_CODE(minimum_sched_offset_k2_r16->pack(bref)); + } + if (ul_access_cfg_list_dci_0_1_r16.is_present()) { + HANDLE_CODE(ul_access_cfg_list_dci_0_1_r16->pack(bref)); + } + if (harq_process_num_size_dci_0_2_r16_present) { + HANDLE_CODE(pack_integer(bref, harq_process_num_size_dci_0_2_r16, (uint8_t)0u, (uint8_t)4u)); + } + if (nof_bits_for_rv_dci_0_2_r16_present) { + HANDLE_CODE(pack_integer(bref, nof_bits_for_rv_dci_0_2_r16, (uint8_t)0u, (uint8_t)2u)); + } + if (dmrs_ul_for_pusch_map_type_a_dci_0_2_r16.is_present()) { + HANDLE_CODE(dmrs_ul_for_pusch_map_type_a_dci_0_2_r16->pack(bref)); + } + if (dmrs_ul_for_pusch_map_type_b_dci_0_2_r16.is_present()) { + HANDLE_CODE(dmrs_ul_for_pusch_map_type_b_dci_0_2_r16->pack(bref)); + } + if (freq_hop_dci_0_2_r16.is_present()) { + HANDLE_CODE(freq_hop_dci_0_2_r16->pack(bref)); + } + if (freq_hop_offset_lists_dci_0_2_r16.is_present()) { + HANDLE_CODE(freq_hop_offset_lists_dci_0_2_r16->pack(bref)); + } + if (codebook_subset_dci_0_2_r16_present) { + HANDLE_CODE(codebook_subset_dci_0_2_r16.pack(bref)); + } + if (max_rank_dci_0_2_r16_present) { + HANDLE_CODE(pack_integer(bref, max_rank_dci_0_2_r16, (uint8_t)1u, (uint8_t)4u)); + } + if (mcs_table_dci_0_2_r16_present) { + HANDLE_CODE(mcs_table_dci_0_2_r16.pack(bref)); + } + if (mcs_table_transform_precoder_dci_0_2_r16_present) { + HANDLE_CODE(mcs_table_transform_precoder_dci_0_2_r16.pack(bref)); + } + if (pusch_rep_type_ind_dci_0_2_r16_present) { + HANDLE_CODE(pusch_rep_type_ind_dci_0_2_r16.pack(bref)); + } + if (res_alloc_dci_0_2_r16_present) { + HANDLE_CODE(res_alloc_dci_0_2_r16.pack(bref)); + } + if (res_alloc_type1_granularity_dci_0_2_r16_present) { + HANDLE_CODE(res_alloc_type1_granularity_dci_0_2_r16.pack(bref)); + } + if (uci_on_pusch_list_dci_0_2_r16.is_present()) { + HANDLE_CODE(uci_on_pusch_list_dci_0_2_r16->pack(bref)); + } + if (pusch_time_domain_alloc_list_dci_0_2_r16.is_present()) { + HANDLE_CODE(pusch_time_domain_alloc_list_dci_0_2_r16->pack(bref)); + } + if (pusch_time_domain_alloc_list_dci_0_1_r16.is_present()) { + HANDLE_CODE(pusch_time_domain_alloc_list_dci_0_1_r16->pack(bref)); + } + if (pusch_rep_type_ind_dci_0_1_r16_present) { + HANDLE_CODE(pusch_rep_type_ind_dci_0_1_r16.pack(bref)); + } + if (freq_hop_dci_0_1_r16_present) { + HANDLE_CODE(freq_hop_dci_0_1_r16.pack(bref)); + } + if (uci_on_pusch_list_dci_0_1_r16.is_present()) { + HANDLE_CODE(uci_on_pusch_list_dci_0_1_r16->pack(bref)); + } + if (invalid_symbol_pattern_r16.is_present()) { + HANDLE_CODE(invalid_symbol_pattern_r16->pack(bref)); + } + if (pusch_pwr_ctrl_v1610.is_present()) { + HANDLE_CODE(pusch_pwr_ctrl_v1610->pack(bref)); + } + if (ul_full_pwr_tx_r16_present) { + HANDLE_CODE(ul_full_pwr_tx_r16.pack(bref)); + } + if (pusch_time_domain_alloc_list_for_multi_pusch_r16.is_present()) { + HANDLE_CODE(pusch_time_domain_alloc_list_for_multi_pusch_r16->pack(bref)); + } + if (nof_invalid_symbols_for_dl_ul_switching_r16_present) { + HANDLE_CODE(pack_integer(bref, nof_invalid_symbols_for_dl_ul_switching_r16, (uint8_t)1u, (uint8_t)4u)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ul_access_cfg_list_dci_0_2_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(beta_offsets_cross_pri0_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(beta_offsets_cross_pri1_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(beta_offsets_cross_pri0_dci_0_2_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(beta_offsets_cross_pri1_dci_0_2_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(map_pattern_r17_present, 1)); + HANDLE_CODE(bref.pack(second_tpc_field_dci_0_1_r17_present, 1)); + HANDLE_CODE(bref.pack(second_tpc_field_dci_0_2_r17_present, 1)); + HANDLE_CODE(bref.pack(seq_offset_for_rv_r17_present, 1)); + HANDLE_CODE(bref.pack(ul_access_cfg_list_dci_0_1_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(minimum_sched_offset_k2_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(available_slot_count_r17_present, 1)); + HANDLE_CODE(bref.pack(dmrs_bundling_pusch_cfg_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(harq_process_num_size_dci_0_2_v1700_present, 1)); + HANDLE_CODE(bref.pack(harq_process_num_size_dci_0_1_r17_present, 1)); + HANDLE_CODE(bref.pack(mpe_res_pool_to_add_mod_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(mpe_res_pool_to_release_list_r17.is_present(), 1)); + if (ul_access_cfg_list_dci_0_2_r17.is_present()) { + HANDLE_CODE(ul_access_cfg_list_dci_0_2_r17->pack(bref)); + } + if (beta_offsets_cross_pri0_r17.is_present()) { + HANDLE_CODE(beta_offsets_cross_pri0_r17->pack(bref)); + } + if (beta_offsets_cross_pri1_r17.is_present()) { + HANDLE_CODE(beta_offsets_cross_pri1_r17->pack(bref)); + } + if (beta_offsets_cross_pri0_dci_0_2_r17.is_present()) { + HANDLE_CODE(beta_offsets_cross_pri0_dci_0_2_r17->pack(bref)); + } + if (beta_offsets_cross_pri1_dci_0_2_r17.is_present()) { + HANDLE_CODE(beta_offsets_cross_pri1_dci_0_2_r17->pack(bref)); + } + if (map_pattern_r17_present) { + HANDLE_CODE(map_pattern_r17.pack(bref)); + } + if (seq_offset_for_rv_r17_present) { + HANDLE_CODE(pack_integer(bref, seq_offset_for_rv_r17, (uint8_t)0u, (uint8_t)3u)); + } + if (ul_access_cfg_list_dci_0_1_r17.is_present()) { + HANDLE_CODE(ul_access_cfg_list_dci_0_1_r17->pack(bref)); + } + if (minimum_sched_offset_k2_r17.is_present()) { + HANDLE_CODE(minimum_sched_offset_k2_r17->pack(bref)); + } + if (dmrs_bundling_pusch_cfg_r17.is_present()) { + HANDLE_CODE(dmrs_bundling_pusch_cfg_r17->pack(bref)); + } + if (harq_process_num_size_dci_0_2_v1700_present) { + HANDLE_CODE(pack_integer(bref, harq_process_num_size_dci_0_2_v1700, (uint8_t)5u, (uint8_t)5u)); + } + if (harq_process_num_size_dci_0_1_r17_present) { + HANDLE_CODE(pack_integer(bref, harq_process_num_size_dci_0_1_r17, (uint8_t)5u, (uint8_t)5u)); + } + if (mpe_res_pool_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *mpe_res_pool_to_add_mod_list_r17, 1, 64)); + } + if (mpe_res_pool_to_release_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *mpe_res_pool_to_release_list_r17, 1, 64, integer_packer(1, 64))); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_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)); + bool freq_hop_offset_lists_present; + 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)); + } + 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)); + } + + 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); + + unpack_presence_flag(minimum_sched_offset_k2_r16, bref); + unpack_presence_flag(ul_access_cfg_list_dci_0_1_r16, bref); + HANDLE_CODE(bref.unpack(harq_process_num_size_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_seq_initization_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(nof_bits_for_rv_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(ant_ports_field_presence_dci_0_2_r16_present, 1)); + unpack_presence_flag(dmrs_ul_for_pusch_map_type_a_dci_0_2_r16, bref); + unpack_presence_flag(dmrs_ul_for_pusch_map_type_b_dci_0_2_r16, bref); + unpack_presence_flag(freq_hop_dci_0_2_r16, bref); + unpack_presence_flag(freq_hop_offset_lists_dci_0_2_r16, bref); + HANDLE_CODE(bref.unpack(codebook_subset_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(invalid_symbol_pattern_ind_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(max_rank_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(mcs_table_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(mcs_table_transform_precoder_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(prio_ind_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(pusch_rep_type_ind_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(res_alloc_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(res_alloc_type1_granularity_dci_0_2_r16_present, 1)); + unpack_presence_flag(uci_on_pusch_list_dci_0_2_r16, bref); + unpack_presence_flag(pusch_time_domain_alloc_list_dci_0_2_r16, bref); + unpack_presence_flag(pusch_time_domain_alloc_list_dci_0_1_r16, bref); + HANDLE_CODE(bref.unpack(invalid_symbol_pattern_ind_dci_0_1_r16_present, 1)); + HANDLE_CODE(bref.unpack(prio_ind_dci_0_1_r16_present, 1)); + HANDLE_CODE(bref.unpack(pusch_rep_type_ind_dci_0_1_r16_present, 1)); + HANDLE_CODE(bref.unpack(freq_hop_dci_0_1_r16_present, 1)); + unpack_presence_flag(uci_on_pusch_list_dci_0_1_r16, bref); + unpack_presence_flag(invalid_symbol_pattern_r16, bref); + unpack_presence_flag(pusch_pwr_ctrl_v1610, bref); + HANDLE_CODE(bref.unpack(ul_full_pwr_tx_r16_present, 1)); + unpack_presence_flag(pusch_time_domain_alloc_list_for_multi_pusch_r16, bref); + HANDLE_CODE(bref.unpack(nof_invalid_symbols_for_dl_ul_switching_r16_present, 1)); + if (minimum_sched_offset_k2_r16.is_present()) { + HANDLE_CODE(minimum_sched_offset_k2_r16->unpack(bref)); + } + if (ul_access_cfg_list_dci_0_1_r16.is_present()) { + HANDLE_CODE(ul_access_cfg_list_dci_0_1_r16->unpack(bref)); + } + if (harq_process_num_size_dci_0_2_r16_present) { + HANDLE_CODE(unpack_integer(harq_process_num_size_dci_0_2_r16, bref, (uint8_t)0u, (uint8_t)4u)); + } + if (nof_bits_for_rv_dci_0_2_r16_present) { + HANDLE_CODE(unpack_integer(nof_bits_for_rv_dci_0_2_r16, bref, (uint8_t)0u, (uint8_t)2u)); + } + if (dmrs_ul_for_pusch_map_type_a_dci_0_2_r16.is_present()) { + HANDLE_CODE(dmrs_ul_for_pusch_map_type_a_dci_0_2_r16->unpack(bref)); + } + if (dmrs_ul_for_pusch_map_type_b_dci_0_2_r16.is_present()) { + HANDLE_CODE(dmrs_ul_for_pusch_map_type_b_dci_0_2_r16->unpack(bref)); + } + if (freq_hop_dci_0_2_r16.is_present()) { + HANDLE_CODE(freq_hop_dci_0_2_r16->unpack(bref)); + } + if (freq_hop_offset_lists_dci_0_2_r16.is_present()) { + HANDLE_CODE(freq_hop_offset_lists_dci_0_2_r16->unpack(bref)); + } + if (codebook_subset_dci_0_2_r16_present) { + HANDLE_CODE(codebook_subset_dci_0_2_r16.unpack(bref)); + } + if (max_rank_dci_0_2_r16_present) { + HANDLE_CODE(unpack_integer(max_rank_dci_0_2_r16, bref, (uint8_t)1u, (uint8_t)4u)); + } + if (mcs_table_dci_0_2_r16_present) { + HANDLE_CODE(mcs_table_dci_0_2_r16.unpack(bref)); + } + if (mcs_table_transform_precoder_dci_0_2_r16_present) { + HANDLE_CODE(mcs_table_transform_precoder_dci_0_2_r16.unpack(bref)); + } + if (pusch_rep_type_ind_dci_0_2_r16_present) { + HANDLE_CODE(pusch_rep_type_ind_dci_0_2_r16.unpack(bref)); + } + if (res_alloc_dci_0_2_r16_present) { + HANDLE_CODE(res_alloc_dci_0_2_r16.unpack(bref)); + } + if (res_alloc_type1_granularity_dci_0_2_r16_present) { + HANDLE_CODE(res_alloc_type1_granularity_dci_0_2_r16.unpack(bref)); + } + if (uci_on_pusch_list_dci_0_2_r16.is_present()) { + HANDLE_CODE(uci_on_pusch_list_dci_0_2_r16->unpack(bref)); + } + if (pusch_time_domain_alloc_list_dci_0_2_r16.is_present()) { + HANDLE_CODE(pusch_time_domain_alloc_list_dci_0_2_r16->unpack(bref)); + } + if (pusch_time_domain_alloc_list_dci_0_1_r16.is_present()) { + HANDLE_CODE(pusch_time_domain_alloc_list_dci_0_1_r16->unpack(bref)); + } + if (pusch_rep_type_ind_dci_0_1_r16_present) { + HANDLE_CODE(pusch_rep_type_ind_dci_0_1_r16.unpack(bref)); + } + if (freq_hop_dci_0_1_r16_present) { + HANDLE_CODE(freq_hop_dci_0_1_r16.unpack(bref)); + } + if (uci_on_pusch_list_dci_0_1_r16.is_present()) { + HANDLE_CODE(uci_on_pusch_list_dci_0_1_r16->unpack(bref)); + } + if (invalid_symbol_pattern_r16.is_present()) { + HANDLE_CODE(invalid_symbol_pattern_r16->unpack(bref)); + } + if (pusch_pwr_ctrl_v1610.is_present()) { + HANDLE_CODE(pusch_pwr_ctrl_v1610->unpack(bref)); + } + if (ul_full_pwr_tx_r16_present) { + HANDLE_CODE(ul_full_pwr_tx_r16.unpack(bref)); + } + if (pusch_time_domain_alloc_list_for_multi_pusch_r16.is_present()) { + HANDLE_CODE(pusch_time_domain_alloc_list_for_multi_pusch_r16->unpack(bref)); + } + if (nof_invalid_symbols_for_dl_ul_switching_r16_present) { + HANDLE_CODE(unpack_integer(nof_invalid_symbols_for_dl_ul_switching_r16, bref, (uint8_t)1u, (uint8_t)4u)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(ul_access_cfg_list_dci_0_2_r17, bref); + unpack_presence_flag(beta_offsets_cross_pri0_r17, bref); + unpack_presence_flag(beta_offsets_cross_pri1_r17, bref); + unpack_presence_flag(beta_offsets_cross_pri0_dci_0_2_r17, bref); + unpack_presence_flag(beta_offsets_cross_pri1_dci_0_2_r17, bref); + HANDLE_CODE(bref.unpack(map_pattern_r17_present, 1)); + HANDLE_CODE(bref.unpack(second_tpc_field_dci_0_1_r17_present, 1)); + HANDLE_CODE(bref.unpack(second_tpc_field_dci_0_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(seq_offset_for_rv_r17_present, 1)); + unpack_presence_flag(ul_access_cfg_list_dci_0_1_r17, bref); + unpack_presence_flag(minimum_sched_offset_k2_r17, bref); + HANDLE_CODE(bref.unpack(available_slot_count_r17_present, 1)); + unpack_presence_flag(dmrs_bundling_pusch_cfg_r17, bref); + HANDLE_CODE(bref.unpack(harq_process_num_size_dci_0_2_v1700_present, 1)); + HANDLE_CODE(bref.unpack(harq_process_num_size_dci_0_1_r17_present, 1)); + unpack_presence_flag(mpe_res_pool_to_add_mod_list_r17, bref); + unpack_presence_flag(mpe_res_pool_to_release_list_r17, bref); + if (ul_access_cfg_list_dci_0_2_r17.is_present()) { + HANDLE_CODE(ul_access_cfg_list_dci_0_2_r17->unpack(bref)); + } + if (beta_offsets_cross_pri0_r17.is_present()) { + HANDLE_CODE(beta_offsets_cross_pri0_r17->unpack(bref)); + } + if (beta_offsets_cross_pri1_r17.is_present()) { + HANDLE_CODE(beta_offsets_cross_pri1_r17->unpack(bref)); + } + if (beta_offsets_cross_pri0_dci_0_2_r17.is_present()) { + HANDLE_CODE(beta_offsets_cross_pri0_dci_0_2_r17->unpack(bref)); + } + if (beta_offsets_cross_pri1_dci_0_2_r17.is_present()) { + HANDLE_CODE(beta_offsets_cross_pri1_dci_0_2_r17->unpack(bref)); + } + if (map_pattern_r17_present) { + HANDLE_CODE(map_pattern_r17.unpack(bref)); + } + if (seq_offset_for_rv_r17_present) { + HANDLE_CODE(unpack_integer(seq_offset_for_rv_r17, bref, (uint8_t)0u, (uint8_t)3u)); + } + if (ul_access_cfg_list_dci_0_1_r17.is_present()) { + HANDLE_CODE(ul_access_cfg_list_dci_0_1_r17->unpack(bref)); + } + if (minimum_sched_offset_k2_r17.is_present()) { + HANDLE_CODE(minimum_sched_offset_k2_r17->unpack(bref)); + } + if (dmrs_bundling_pusch_cfg_r17.is_present()) { + HANDLE_CODE(dmrs_bundling_pusch_cfg_r17->unpack(bref)); + } + if (harq_process_num_size_dci_0_2_v1700_present) { + HANDLE_CODE(unpack_integer(harq_process_num_size_dci_0_2_v1700, bref, (uint8_t)5u, (uint8_t)5u)); + } + if (harq_process_num_size_dci_0_1_r17_present) { + HANDLE_CODE(unpack_integer(harq_process_num_size_dci_0_1_r17, bref, (uint8_t)5u, (uint8_t)5u)); + } + if (mpe_res_pool_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*mpe_res_pool_to_add_mod_list_r17, bref, 1, 64)); + } + if (mpe_res_pool_to_release_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*mpe_res_pool_to_release_list_r17, bref, 1, 64, integer_packer(1, 64))); + } + } + } + return SRSASN_SUCCESS; +} +void pusch_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.size() > 0) { + 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"); + } + if (ext) { + if (minimum_sched_offset_k2_r16.is_present()) { + j.write_fieldname("minimumSchedulingOffsetK2-r16"); + minimum_sched_offset_k2_r16->to_json(j); + } + if (ul_access_cfg_list_dci_0_1_r16.is_present()) { + j.write_fieldname("ul-AccessConfigListDCI-0-1-r16"); + ul_access_cfg_list_dci_0_1_r16->to_json(j); + } + if (harq_process_num_size_dci_0_2_r16_present) { + j.write_int("harq-ProcessNumberSizeDCI-0-2-r16", harq_process_num_size_dci_0_2_r16); + } + if (dmrs_seq_initization_dci_0_2_r16_present) { + j.write_str("dmrs-SequenceInitializationDCI-0-2-r16", "enabled"); + } + if (nof_bits_for_rv_dci_0_2_r16_present) { + j.write_int("numberOfBitsForRV-DCI-0-2-r16", nof_bits_for_rv_dci_0_2_r16); + } + if (ant_ports_field_presence_dci_0_2_r16_present) { + j.write_str("antennaPortsFieldPresenceDCI-0-2-r16", "enabled"); + } + if (dmrs_ul_for_pusch_map_type_a_dci_0_2_r16.is_present()) { + j.write_fieldname("dmrs-UplinkForPUSCH-MappingTypeA-DCI-0-2-r16"); + dmrs_ul_for_pusch_map_type_a_dci_0_2_r16->to_json(j); + } + if (dmrs_ul_for_pusch_map_type_b_dci_0_2_r16.is_present()) { + j.write_fieldname("dmrs-UplinkForPUSCH-MappingTypeB-DCI-0-2-r16"); + dmrs_ul_for_pusch_map_type_b_dci_0_2_r16->to_json(j); + } + if (freq_hop_dci_0_2_r16.is_present()) { + j.write_fieldname("frequencyHoppingDCI-0-2-r16"); + freq_hop_dci_0_2_r16->to_json(j); + } + if (freq_hop_offset_lists_dci_0_2_r16.is_present()) { + j.write_fieldname("frequencyHoppingOffsetListsDCI-0-2-r16"); + freq_hop_offset_lists_dci_0_2_r16->to_json(j); + } + if (codebook_subset_dci_0_2_r16_present) { + j.write_str("codebookSubsetDCI-0-2-r16", codebook_subset_dci_0_2_r16.to_string()); + } + if (invalid_symbol_pattern_ind_dci_0_2_r16_present) { + j.write_str("invalidSymbolPatternIndicatorDCI-0-2-r16", "enabled"); + } + if (max_rank_dci_0_2_r16_present) { + j.write_int("maxRankDCI-0-2-r16", max_rank_dci_0_2_r16); + } + if (mcs_table_dci_0_2_r16_present) { + j.write_str("mcs-TableDCI-0-2-r16", mcs_table_dci_0_2_r16.to_string()); + } + if (mcs_table_transform_precoder_dci_0_2_r16_present) { + j.write_str("mcs-TableTransformPrecoderDCI-0-2-r16", mcs_table_transform_precoder_dci_0_2_r16.to_string()); + } + if (prio_ind_dci_0_2_r16_present) { + j.write_str("priorityIndicatorDCI-0-2-r16", "enabled"); + } + if (pusch_rep_type_ind_dci_0_2_r16_present) { + j.write_str("pusch-RepTypeIndicatorDCI-0-2-r16", pusch_rep_type_ind_dci_0_2_r16.to_string()); + } + if (res_alloc_dci_0_2_r16_present) { + j.write_str("resourceAllocationDCI-0-2-r16", res_alloc_dci_0_2_r16.to_string()); + } + if (res_alloc_type1_granularity_dci_0_2_r16_present) { + j.write_str("resourceAllocationType1GranularityDCI-0-2-r16", res_alloc_type1_granularity_dci_0_2_r16.to_string()); + } + if (uci_on_pusch_list_dci_0_2_r16.is_present()) { + j.write_fieldname("uci-OnPUSCH-ListDCI-0-2-r16"); + uci_on_pusch_list_dci_0_2_r16->to_json(j); + } + if (pusch_time_domain_alloc_list_dci_0_2_r16.is_present()) { + j.write_fieldname("pusch-TimeDomainAllocationListDCI-0-2-r16"); + pusch_time_domain_alloc_list_dci_0_2_r16->to_json(j); + } + if (pusch_time_domain_alloc_list_dci_0_1_r16.is_present()) { + j.write_fieldname("pusch-TimeDomainAllocationListDCI-0-1-r16"); + pusch_time_domain_alloc_list_dci_0_1_r16->to_json(j); + } + if (invalid_symbol_pattern_ind_dci_0_1_r16_present) { + j.write_str("invalidSymbolPatternIndicatorDCI-0-1-r16", "enabled"); + } + if (prio_ind_dci_0_1_r16_present) { + j.write_str("priorityIndicatorDCI-0-1-r16", "enabled"); + } + if (pusch_rep_type_ind_dci_0_1_r16_present) { + j.write_str("pusch-RepTypeIndicatorDCI-0-1-r16", pusch_rep_type_ind_dci_0_1_r16.to_string()); + } + if (freq_hop_dci_0_1_r16_present) { + j.write_str("frequencyHoppingDCI-0-1-r16", freq_hop_dci_0_1_r16.to_string()); + } + if (uci_on_pusch_list_dci_0_1_r16.is_present()) { + j.write_fieldname("uci-OnPUSCH-ListDCI-0-1-r16"); + uci_on_pusch_list_dci_0_1_r16->to_json(j); + } + if (invalid_symbol_pattern_r16.is_present()) { + j.write_fieldname("invalidSymbolPattern-r16"); + invalid_symbol_pattern_r16->to_json(j); + } + if (pusch_pwr_ctrl_v1610.is_present()) { + j.write_fieldname("pusch-PowerControl-v1610"); + pusch_pwr_ctrl_v1610->to_json(j); + } + if (ul_full_pwr_tx_r16_present) { + j.write_str("ul-FullPowerTransmission-r16", ul_full_pwr_tx_r16.to_string()); + } + if (pusch_time_domain_alloc_list_for_multi_pusch_r16.is_present()) { + j.write_fieldname("pusch-TimeDomainAllocationListForMultiPUSCH-r16"); + pusch_time_domain_alloc_list_for_multi_pusch_r16->to_json(j); + } + if (nof_invalid_symbols_for_dl_ul_switching_r16_present) { + j.write_int("numberOfInvalidSymbolsForDL-UL-Switching-r16", nof_invalid_symbols_for_dl_ul_switching_r16); + } + if (ul_access_cfg_list_dci_0_2_r17.is_present()) { + j.write_fieldname("ul-AccessConfigListDCI-0-2-r17"); + ul_access_cfg_list_dci_0_2_r17->to_json(j); + } + if (beta_offsets_cross_pri0_r17.is_present()) { + j.write_fieldname("betaOffsetsCrossPri0-r17"); + beta_offsets_cross_pri0_r17->to_json(j); + } + if (beta_offsets_cross_pri1_r17.is_present()) { + j.write_fieldname("betaOffsetsCrossPri1-r17"); + beta_offsets_cross_pri1_r17->to_json(j); + } + if (beta_offsets_cross_pri0_dci_0_2_r17.is_present()) { + j.write_fieldname("betaOffsetsCrossPri0DCI-0-2-r17"); + beta_offsets_cross_pri0_dci_0_2_r17->to_json(j); + } + if (beta_offsets_cross_pri1_dci_0_2_r17.is_present()) { + j.write_fieldname("betaOffsetsCrossPri1DCI-0-2-r17"); + beta_offsets_cross_pri1_dci_0_2_r17->to_json(j); + } + if (map_pattern_r17_present) { + j.write_str("mappingPattern-r17", map_pattern_r17.to_string()); + } + if (second_tpc_field_dci_0_1_r17_present) { + j.write_str("secondTPCFieldDCI-0-1-r17", "enabled"); + } + if (second_tpc_field_dci_0_2_r17_present) { + j.write_str("secondTPCFieldDCI-0-2-r17", "enabled"); + } + if (seq_offset_for_rv_r17_present) { + j.write_int("sequenceOffsetForRV-r17", seq_offset_for_rv_r17); + } + if (ul_access_cfg_list_dci_0_1_r17.is_present()) { + j.write_fieldname("ul-AccessConfigListDCI-0-1-r17"); + ul_access_cfg_list_dci_0_1_r17->to_json(j); + } + if (minimum_sched_offset_k2_r17.is_present()) { + j.write_fieldname("minimumSchedulingOffsetK2-r17"); + minimum_sched_offset_k2_r17->to_json(j); + } + if (available_slot_count_r17_present) { + j.write_str("availableSlotCounting-r17", "enabled"); + } + if (dmrs_bundling_pusch_cfg_r17.is_present()) { + j.write_fieldname("dmrs-BundlingPUSCH-Config-r17"); + dmrs_bundling_pusch_cfg_r17->to_json(j); + } + if (harq_process_num_size_dci_0_2_v1700_present) { + j.write_int("harq-ProcessNumberSizeDCI-0-2-v1700", harq_process_num_size_dci_0_2_v1700); + } + if (harq_process_num_size_dci_0_1_r17_present) { + j.write_int("harq-ProcessNumberSizeDCI-0-1-r17", harq_process_num_size_dci_0_1_r17); + } + if (mpe_res_pool_to_add_mod_list_r17.is_present()) { + j.start_array("mpe-ResourcePoolToAddModList-r17"); + for (const auto& e1 : *mpe_res_pool_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (mpe_res_pool_to_release_list_r17.is_present()) { + j.start_array("mpe-ResourcePoolToReleaseList-r17"); + for (const auto& e1 : *mpe_res_pool_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + } + j.end_obj(); +} + +const char* pusch_cfg_s::tx_cfg_opts::to_string() const +{ + static const char* names[] = {"codebook", "nonCodebook"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::tx_cfg_e_"); +} + +const char* pusch_cfg_s::freq_hop_opts::to_string() const +{ + static const char* names[] = {"intraSlot", "interSlot"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::freq_hop_e_"); +} + +const char* pusch_cfg_s::res_alloc_opts::to_string() const +{ + static const char* names[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; + return convert_enum_idx(names, 3, value, "pusch_cfg_s::res_alloc_e_"); +} +uint8_t pusch_cfg_s::res_alloc_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "pusch_cfg_s::res_alloc_e_"); +} + +const char* pusch_cfg_s::pusch_aggregation_factor_opts::to_string() const +{ + static const char* names[] = {"n2", "n4", "n8"}; + return convert_enum_idx(names, 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 numbers[] = {2, 4, 8}; + return map_enum_number(numbers, 3, value, "pusch_cfg_s::pusch_aggregation_factor_e_"); +} + +const char* pusch_cfg_s::mcs_table_opts::to_string() const +{ + static const char* names[] = {"qam256", "qam64LowSE"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::mcs_table_e_"); +} +uint16_t pusch_cfg_s::mcs_table_opts::to_number() const +{ + static const uint16_t numbers[] = {256, 64}; + return map_enum_number(numbers, 2, value, "pusch_cfg_s::mcs_table_e_"); +} + +const char* pusch_cfg_s::mcs_table_transform_precoder_opts::to_string() const +{ + static const char* names[] = {"qam256", "qam64LowSE"}; + return convert_enum_idx(names, 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 numbers[] = {256, 64}; + return map_enum_number(numbers, 2, value, "pusch_cfg_s::mcs_table_transform_precoder_e_"); +} + +const char* pusch_cfg_s::transform_precoder_opts::to_string() const +{ + static const char* names[] = {"enabled", "disabled"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::transform_precoder_e_"); +} + +const char* pusch_cfg_s::codebook_subset_opts::to_string() const +{ + static const char* names[] = {"fullyAndPartialAndNonCoherent", "partialAndNonCoherent", "nonCoherent"}; + return convert_enum_idx(names, 3, value, "pusch_cfg_s::codebook_subset_e_"); +} + +void pusch_cfg_s::freq_hop_dci_0_2_r16_c_::destroy_() {} +void pusch_cfg_s::freq_hop_dci_0_2_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +pusch_cfg_s::freq_hop_dci_0_2_r16_c_::freq_hop_dci_0_2_r16_c_(const pusch_cfg_s::freq_hop_dci_0_2_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::pusch_rep_type_a: + c.init(other.c.get()); + break; + case types::pusch_rep_type_b: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_"); + } +} +pusch_cfg_s::freq_hop_dci_0_2_r16_c_& +pusch_cfg_s::freq_hop_dci_0_2_r16_c_::operator=(const pusch_cfg_s::freq_hop_dci_0_2_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::pusch_rep_type_a: + c.set(other.c.get()); + break; + case types::pusch_rep_type_b: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_"); + } + + return *this; +} +pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pusch_rep_type_a_e_& pusch_cfg_s::freq_hop_dci_0_2_r16_c_::set_pusch_rep_type_a() +{ + set(types::pusch_rep_type_a); + return c.get(); +} +pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pusch_rep_type_b_e_& pusch_cfg_s::freq_hop_dci_0_2_r16_c_::set_pusch_rep_type_b() +{ + set(types::pusch_rep_type_b); + return c.get(); +} +void pusch_cfg_s::freq_hop_dci_0_2_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::pusch_rep_type_a: + j.write_str("pusch-RepTypeA", c.get().to_string()); + break; + case types::pusch_rep_type_b: + j.write_str("pusch-RepTypeB", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::pusch_rep_type_a: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pusch_rep_type_b: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pusch_cfg_s::freq_hop_dci_0_2_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::pusch_rep_type_a: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pusch_rep_type_b: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pusch_rep_type_a_opts::to_string() const +{ + static const char* names[] = {"intraSlot", "interSlot"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pusch_rep_type_a_e_"); +} + +const char* pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pusch_rep_type_b_opts::to_string() const +{ + static const char* names[] = {"interRepetition", "interSlot"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pusch_rep_type_b_e_"); +} + +const char* pusch_cfg_s::freq_hop_dci_0_2_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"pusch-RepTypeA", "pusch-RepTypeB"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_::types"); +} + +const char* pusch_cfg_s::codebook_subset_dci_0_2_r16_opts::to_string() const +{ + static const char* names[] = {"fullyAndPartialAndNonCoherent", "partialAndNonCoherent", "nonCoherent"}; + return convert_enum_idx(names, 3, value, "pusch_cfg_s::codebook_subset_dci_0_2_r16_e_"); +} + +const char* pusch_cfg_s::mcs_table_dci_0_2_r16_opts::to_string() const +{ + static const char* names[] = {"qam256", "qam64LowSE"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::mcs_table_dci_0_2_r16_e_"); +} +uint16_t pusch_cfg_s::mcs_table_dci_0_2_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {256, 64}; + return map_enum_number(numbers, 2, value, "pusch_cfg_s::mcs_table_dci_0_2_r16_e_"); +} + +const char* pusch_cfg_s::mcs_table_transform_precoder_dci_0_2_r16_opts::to_string() const +{ + static const char* names[] = {"qam256", "qam64LowSE"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::mcs_table_transform_precoder_dci_0_2_r16_e_"); +} +uint16_t pusch_cfg_s::mcs_table_transform_precoder_dci_0_2_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {256, 64}; + return map_enum_number(numbers, 2, value, "pusch_cfg_s::mcs_table_transform_precoder_dci_0_2_r16_e_"); +} + +const char* pusch_cfg_s::pusch_rep_type_ind_dci_0_2_r16_opts::to_string() const +{ + static const char* names[] = {"pusch-RepTypeA", "pusch-RepTypeB"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::pusch_rep_type_ind_dci_0_2_r16_e_"); +} + +const char* pusch_cfg_s::res_alloc_dci_0_2_r16_opts::to_string() const +{ + static const char* names[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; + return convert_enum_idx(names, 3, value, "pusch_cfg_s::res_alloc_dci_0_2_r16_e_"); +} +uint8_t pusch_cfg_s::res_alloc_dci_0_2_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1}; + return map_enum_number(numbers, 2, value, "pusch_cfg_s::res_alloc_dci_0_2_r16_e_"); +} + +const char* pusch_cfg_s::res_alloc_type1_granularity_dci_0_2_r16_opts::to_string() const +{ + static const char* names[] = {"n2", "n4", "n8", "n16"}; + return convert_enum_idx(names, 4, value, "pusch_cfg_s::res_alloc_type1_granularity_dci_0_2_r16_e_"); +} +uint8_t pusch_cfg_s::res_alloc_type1_granularity_dci_0_2_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 8, 16}; + return map_enum_number(numbers, 4, value, "pusch_cfg_s::res_alloc_type1_granularity_dci_0_2_r16_e_"); +} + +const char* pusch_cfg_s::pusch_rep_type_ind_dci_0_1_r16_opts::to_string() const +{ + static const char* names[] = {"pusch-RepTypeA", "pusch-RepTypeB"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::pusch_rep_type_ind_dci_0_1_r16_e_"); +} + +const char* pusch_cfg_s::freq_hop_dci_0_1_r16_opts::to_string() const +{ + static const char* names[] = {"interRepetition", "interSlot"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::freq_hop_dci_0_1_r16_e_"); +} + +const char* pusch_cfg_s::ul_full_pwr_tx_r16_opts::to_string() const +{ + static const char* names[] = {"fullpower", "fullpowerMode1", "fullpowerMode2"}; + return convert_enum_idx(names, 3, value, "pusch_cfg_s::ul_full_pwr_tx_r16_e_"); +} +uint8_t pusch_cfg_s::ul_full_pwr_tx_r16_opts::to_number() const +{ + switch (value) { + case fullpwr_mode1: + return 1; + case fullpwr_mode2: + return 2; + default: + invalid_enum_number(value, "pusch_cfg_s::ul_full_pwr_tx_r16_e_"); + } + return 0; +} + +const char* pusch_cfg_s::map_pattern_r17_opts::to_string() const +{ + static const char* names[] = {"cyclicMapping", "sequentialMapping"}; + return convert_enum_idx(names, 2, value, "pusch_cfg_s::map_pattern_r17_e_"); +} + +// PathlossReferenceRS-r17 ::= SEQUENCE +SRSASN_CODE pathloss_ref_rs_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(add_pci_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, pathloss_ref_rs_id_r17, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(ref_sig_r17.pack(bref)); + if (add_pci_r17_present) { + HANDLE_CODE(pack_integer(bref, add_pci_r17, (uint8_t)1u, (uint8_t)7u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pathloss_ref_rs_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(add_pci_r17_present, 1)); + + HANDLE_CODE(unpack_integer(pathloss_ref_rs_id_r17, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(ref_sig_r17.unpack(bref)); + if (add_pci_r17_present) { + HANDLE_CODE(unpack_integer(add_pci_r17, bref, (uint8_t)1u, (uint8_t)7u)); + } + + return SRSASN_SUCCESS; +} +void pathloss_ref_rs_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("pathlossReferenceRS-Id-r17", pathloss_ref_rs_id_r17); + j.write_fieldname("referenceSignal-r17"); + ref_sig_r17.to_json(j); + if (add_pci_r17_present) { + j.write_int("additionalPCI-r17", add_pci_r17); + } + j.end_obj(); +} + +void pathloss_ref_rs_r17_s::ref_sig_r17_c_::destroy_() {} +void pathloss_ref_rs_r17_s::ref_sig_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +pathloss_ref_rs_r17_s::ref_sig_r17_c_::ref_sig_r17_c_(const pathloss_ref_rs_r17_s::ref_sig_r17_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_, "pathloss_ref_rs_r17_s::ref_sig_r17_c_"); + } +} +pathloss_ref_rs_r17_s::ref_sig_r17_c_& +pathloss_ref_rs_r17_s::ref_sig_r17_c_::operator=(const pathloss_ref_rs_r17_s::ref_sig_r17_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_, "pathloss_ref_rs_r17_s::ref_sig_r17_c_"); + } + + return *this; +} +uint8_t& pathloss_ref_rs_r17_s::ref_sig_r17_c_::set_ssb_idx() +{ + set(types::ssb_idx); + return c.get(); +} +uint8_t& pathloss_ref_rs_r17_s::ref_sig_r17_c_::set_csi_rs_idx() +{ + set(types::csi_rs_idx); + return c.get(); +} +void pathloss_ref_rs_r17_s::ref_sig_r17_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()); + break; + default: + log_invalid_choice_id(type_, "pathloss_ref_rs_r17_s::ref_sig_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE pathloss_ref_rs_r17_s::ref_sig_r17_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_, "pathloss_ref_rs_r17_s::ref_sig_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pathloss_ref_rs_r17_s::ref_sig_r17_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_, "pathloss_ref_rs_r17_s::ref_sig_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pathloss_ref_rs_r17_s::ref_sig_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-Index", "csi-RS-Index"}; + return convert_enum_idx(names, 2, value, "pathloss_ref_rs_r17_s::ref_sig_r17_c_::types"); +} + +// 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(srs_res_set_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(srs_res_to_release_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(srs_res_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(tpc_accumulation_present, 1)); + + if (srs_res_set_to_release_list.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_set_to_add_mod_list, 1, 16)); + } + if (srs_res_to_release_list.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_to_add_mod_list, 1, 64)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= srs_request_dci_1_2_r16_present; + group_flags[0] |= srs_request_dci_0_2_r16_present; + group_flags[0] |= srs_res_set_to_add_mod_list_dci_0_2_r16.is_present(); + group_flags[0] |= srs_res_set_to_release_list_dci_0_2_r16.is_present(); + group_flags[0] |= srs_pos_res_set_to_release_list_r16.is_present(); + group_flags[0] |= srs_pos_res_set_to_add_mod_list_r16.is_present(); + group_flags[0] |= srs_pos_res_to_release_list_r16.is_present(); + group_flags[0] |= srs_pos_res_to_add_mod_list_r16.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(srs_request_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.pack(srs_request_dci_0_2_r16_present, 1)); + HANDLE_CODE(bref.pack(srs_res_set_to_add_mod_list_dci_0_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(srs_res_set_to_release_list_dci_0_2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(srs_pos_res_set_to_release_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(srs_pos_res_set_to_add_mod_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(srs_pos_res_to_release_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(srs_pos_res_to_add_mod_list_r16.is_present(), 1)); + if (srs_request_dci_1_2_r16_present) { + HANDLE_CODE(pack_integer(bref, srs_request_dci_1_2_r16, (uint8_t)1u, (uint8_t)2u)); + } + if (srs_request_dci_0_2_r16_present) { + HANDLE_CODE(pack_integer(bref, srs_request_dci_0_2_r16, (uint8_t)1u, (uint8_t)2u)); + } + if (srs_res_set_to_add_mod_list_dci_0_2_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_res_set_to_add_mod_list_dci_0_2_r16, 1, 16)); + } + if (srs_res_set_to_release_list_dci_0_2_r16.is_present()) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *srs_res_set_to_release_list_dci_0_2_r16, 1, 16, integer_packer(0, 15))); + } + if (srs_pos_res_set_to_release_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_pos_res_set_to_release_list_r16, 1, 16, integer_packer(0, 15))); + } + if (srs_pos_res_set_to_add_mod_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_pos_res_set_to_add_mod_list_r16, 1, 16)); + } + if (srs_pos_res_to_release_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_pos_res_to_release_list_r16, 1, 64, integer_packer(0, 63))); + } + if (srs_pos_res_to_add_mod_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *srs_pos_res_to_add_mod_list_r16, 1, 64)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool srs_res_set_to_release_list_present; + HANDLE_CODE(bref.unpack(srs_res_set_to_release_list_present, 1)); + bool srs_res_set_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(srs_res_set_to_add_mod_list_present, 1)); + bool srs_res_to_release_list_present; + HANDLE_CODE(bref.unpack(srs_res_to_release_list_present, 1)); + bool srs_res_to_add_mod_list_present; + 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)); + } + + 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(srs_request_dci_1_2_r16_present, 1)); + HANDLE_CODE(bref.unpack(srs_request_dci_0_2_r16_present, 1)); + unpack_presence_flag(srs_res_set_to_add_mod_list_dci_0_2_r16, bref); + unpack_presence_flag(srs_res_set_to_release_list_dci_0_2_r16, bref); + unpack_presence_flag(srs_pos_res_set_to_release_list_r16, bref); + unpack_presence_flag(srs_pos_res_set_to_add_mod_list_r16, bref); + unpack_presence_flag(srs_pos_res_to_release_list_r16, bref); + unpack_presence_flag(srs_pos_res_to_add_mod_list_r16, bref); + if (srs_request_dci_1_2_r16_present) { + HANDLE_CODE(unpack_integer(srs_request_dci_1_2_r16, bref, (uint8_t)1u, (uint8_t)2u)); + } + if (srs_request_dci_0_2_r16_present) { + HANDLE_CODE(unpack_integer(srs_request_dci_0_2_r16, bref, (uint8_t)1u, (uint8_t)2u)); + } + if (srs_res_set_to_add_mod_list_dci_0_2_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*srs_res_set_to_add_mod_list_dci_0_2_r16, bref, 1, 16)); + } + if (srs_res_set_to_release_list_dci_0_2_r16.is_present()) { + HANDLE_CODE( + unpack_dyn_seq_of(*srs_res_set_to_release_list_dci_0_2_r16, bref, 1, 16, integer_packer(0, 15))); + } + if (srs_pos_res_set_to_release_list_r16.is_present()) { + HANDLE_CODE( + unpack_dyn_seq_of(*srs_pos_res_set_to_release_list_r16, bref, 1, 16, integer_packer(0, 15))); + } + if (srs_pos_res_set_to_add_mod_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*srs_pos_res_set_to_add_mod_list_r16, bref, 1, 16)); + } + if (srs_pos_res_to_release_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*srs_pos_res_to_release_list_r16, bref, 1, 64, integer_packer(0, 63))); + } + if (srs_pos_res_to_add_mod_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*srs_pos_res_to_add_mod_list_r16, bref, 1, 64)); + } + } + } + return SRSASN_SUCCESS; +} +void srs_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (srs_res_set_to_release_list.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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"); + } + if (ext) { + if (srs_request_dci_1_2_r16_present) { + j.write_int("srs-RequestDCI-1-2-r16", srs_request_dci_1_2_r16); + } + if (srs_request_dci_0_2_r16_present) { + j.write_int("srs-RequestDCI-0-2-r16", srs_request_dci_0_2_r16); + } + if (srs_res_set_to_add_mod_list_dci_0_2_r16.is_present()) { + j.start_array("srs-ResourceSetToAddModListDCI-0-2-r16"); + for (const auto& e1 : *srs_res_set_to_add_mod_list_dci_0_2_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (srs_res_set_to_release_list_dci_0_2_r16.is_present()) { + j.start_array("srs-ResourceSetToReleaseListDCI-0-2-r16"); + for (const auto& e1 : *srs_res_set_to_release_list_dci_0_2_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (srs_pos_res_set_to_release_list_r16.is_present()) { + j.start_array("srs-PosResourceSetToReleaseList-r16"); + for (const auto& e1 : *srs_pos_res_set_to_release_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (srs_pos_res_set_to_add_mod_list_r16.is_present()) { + j.start_array("srs-PosResourceSetToAddModList-r16"); + for (const auto& e1 : *srs_pos_res_set_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (srs_pos_res_to_release_list_r16.is_present()) { + j.start_array("srs-PosResourceToReleaseList-r16"); + for (const auto& e1 : *srs_pos_res_to_release_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (srs_pos_res_to_add_mod_list_r16.is_present()) { + j.start_array("srs-PosResourceToAddModList-r16"); + for (const auto& e1 : *srs_pos_res_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +// TCI-UL-State-r17 ::= SEQUENCE +SRSASN_CODE tci_ul_state_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(serving_cell_id_r17_present, 1)); + HANDLE_CODE(bref.pack(bwp_id_r17_present, 1)); + HANDLE_CODE(bref.pack(add_pci_r17_present, 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_r17_present, 1)); + HANDLE_CODE(bref.pack(pathloss_ref_rs_id_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, tci_ul_state_id_r17, (uint8_t)0u, (uint8_t)63u)); + if (serving_cell_id_r17_present) { + HANDLE_CODE(pack_integer(bref, serving_cell_id_r17, (uint8_t)0u, (uint8_t)31u)); + } + if (bwp_id_r17_present) { + HANDLE_CODE(pack_integer(bref, bwp_id_r17, (uint8_t)0u, (uint8_t)4u)); + } + HANDLE_CODE(ref_sig_r17.pack(bref)); + if (add_pci_r17_present) { + HANDLE_CODE(pack_integer(bref, add_pci_r17, (uint8_t)1u, (uint8_t)7u)); + } + if (ul_pwr_ctrl_r17_present) { + HANDLE_CODE(pack_integer(bref, ul_pwr_ctrl_r17, (uint8_t)1u, (uint8_t)64u)); + } + if (pathloss_ref_rs_id_r17_present) { + HANDLE_CODE(pack_integer(bref, pathloss_ref_rs_id_r17, (uint8_t)0u, (uint8_t)63u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE tci_ul_state_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(serving_cell_id_r17_present, 1)); + HANDLE_CODE(bref.unpack(bwp_id_r17_present, 1)); + HANDLE_CODE(bref.unpack(add_pci_r17_present, 1)); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_r17_present, 1)); + HANDLE_CODE(bref.unpack(pathloss_ref_rs_id_r17_present, 1)); + + HANDLE_CODE(unpack_integer(tci_ul_state_id_r17, bref, (uint8_t)0u, (uint8_t)63u)); + if (serving_cell_id_r17_present) { + HANDLE_CODE(unpack_integer(serving_cell_id_r17, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (bwp_id_r17_present) { + HANDLE_CODE(unpack_integer(bwp_id_r17, bref, (uint8_t)0u, (uint8_t)4u)); + } + HANDLE_CODE(ref_sig_r17.unpack(bref)); + if (add_pci_r17_present) { + HANDLE_CODE(unpack_integer(add_pci_r17, bref, (uint8_t)1u, (uint8_t)7u)); + } + if (ul_pwr_ctrl_r17_present) { + HANDLE_CODE(unpack_integer(ul_pwr_ctrl_r17, bref, (uint8_t)1u, (uint8_t)64u)); + } + if (pathloss_ref_rs_id_r17_present) { + HANDLE_CODE(unpack_integer(pathloss_ref_rs_id_r17, bref, (uint8_t)0u, (uint8_t)63u)); + } + + return SRSASN_SUCCESS; +} +void tci_ul_state_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("tci-UL-StateId-r17", tci_ul_state_id_r17); + if (serving_cell_id_r17_present) { + j.write_int("servingCellId-r17", serving_cell_id_r17); + } + if (bwp_id_r17_present) { + j.write_int("bwp-Id-r17", bwp_id_r17); + } + j.write_fieldname("referenceSignal-r17"); + ref_sig_r17.to_json(j); + if (add_pci_r17_present) { + j.write_int("additionalPCI-r17", add_pci_r17); + } + if (ul_pwr_ctrl_r17_present) { + j.write_int("ul-powerControl-r17", ul_pwr_ctrl_r17); + } + if (pathloss_ref_rs_id_r17_present) { + j.write_int("pathlossReferenceRS-Id-r17", pathloss_ref_rs_id_r17); + } + j.end_obj(); +} + +void tci_ul_state_r17_s::ref_sig_r17_c_::destroy_() {} +void tci_ul_state_r17_s::ref_sig_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +tci_ul_state_r17_s::ref_sig_r17_c_::ref_sig_r17_c_(const tci_ul_state_r17_s::ref_sig_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ssb_idx_r17: + c.init(other.c.get()); + break; + case types::csi_rs_idx_r17: + c.init(other.c.get()); + break; + case types::srs_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tci_ul_state_r17_s::ref_sig_r17_c_"); + } +} +tci_ul_state_r17_s::ref_sig_r17_c_& +tci_ul_state_r17_s::ref_sig_r17_c_::operator=(const tci_ul_state_r17_s::ref_sig_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ssb_idx_r17: + c.set(other.c.get()); + break; + case types::csi_rs_idx_r17: + c.set(other.c.get()); + break; + case types::srs_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tci_ul_state_r17_s::ref_sig_r17_c_"); + } + + return *this; +} +uint8_t& tci_ul_state_r17_s::ref_sig_r17_c_::set_ssb_idx_r17() +{ + set(types::ssb_idx_r17); + return c.get(); +} +uint8_t& tci_ul_state_r17_s::ref_sig_r17_c_::set_csi_rs_idx_r17() +{ + set(types::csi_rs_idx_r17); + return c.get(); +} +uint8_t& tci_ul_state_r17_s::ref_sig_r17_c_::set_srs_r17() +{ + set(types::srs_r17); + return c.get(); +} +void tci_ul_state_r17_s::ref_sig_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ssb_idx_r17: + j.write_int("ssb-Index-r17", c.get()); + break; + case types::csi_rs_idx_r17: + j.write_int("csi-RS-Index-r17", c.get()); + break; + case types::srs_r17: + j.write_int("srs-r17", c.get()); + break; + default: + log_invalid_choice_id(type_, "tci_ul_state_r17_s::ref_sig_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE tci_ul_state_r17_s::ref_sig_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ssb_idx_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::csi_rs_idx_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); + break; + case types::srs_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + default: + log_invalid_choice_id(type_, "tci_ul_state_r17_s::ref_sig_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE tci_ul_state_r17_s::ref_sig_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ssb_idx_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::csi_rs_idx_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); + break; + case types::srs_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + default: + log_invalid_choice_id(type_, "tci_ul_state_r17_s::ref_sig_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* tci_ul_state_r17_s::ref_sig_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-Index-r17", "csi-RS-Index-r17", "srs-r17"}; + return convert_enum_idx(names, 3, value, "tci_ul_state_r17_s::ref_sig_r17_c_::types"); +} + +// BWP-UplinkDedicated ::= SEQUENCE +SRSASN_CODE bwp_ul_ded_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(cfg_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 (cfg_grant_cfg_present) { + HANDLE_CODE(cfg_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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= sl_pucch_cfg_r16.is_present(); + group_flags[0] |= cp_ext_c2_r16_present; + group_flags[0] |= cp_ext_c3_r16_present; + group_flags[0] |= use_interlace_pucch_pusch_r16_present; + group_flags[0] |= pucch_cfg_list_r16.is_present(); + group_flags[0] |= lbt_fail_recovery_cfg_r16.is_present(); + group_flags[0] |= cfg_grant_cfg_to_add_mod_list_r16.is_present(); + group_flags[0] |= cfg_grant_cfg_to_release_list_r16.is_present(); + group_flags[0] |= cfg_grant_cfg_type2_deactivation_state_list_r16.is_present(); + group_flags[1] |= ul_tci_state_list_r17.is_present(); + group_flags[1] |= ul_pwr_ctrl_r17_present; + group_flags[1] |= pucch_cfg_list_multicast1_r17.is_present(); + group_flags[1] |= pucch_cfg_list_multicast2_r17.is_present(); + group_flags[2] |= pucch_cfg_multicast1_r17.is_present(); + group_flags[2] |= pucch_cfg_multicast2_r17.is_present(); + group_flags[3] |= pathloss_ref_rs_to_add_mod_list_r17.is_present(); + group_flags[3] |= pathloss_ref_rs_to_release_list_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sl_pucch_cfg_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(cp_ext_c2_r16_present, 1)); + HANDLE_CODE(bref.pack(cp_ext_c3_r16_present, 1)); + HANDLE_CODE(bref.pack(use_interlace_pucch_pusch_r16_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(lbt_fail_recovery_cfg_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(cfg_grant_cfg_to_add_mod_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(cfg_grant_cfg_to_release_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(cfg_grant_cfg_type2_deactivation_state_list_r16.is_present(), 1)); + if (sl_pucch_cfg_r16.is_present()) { + HANDLE_CODE(sl_pucch_cfg_r16->pack(bref)); + } + if (cp_ext_c2_r16_present) { + HANDLE_CODE(pack_integer(bref, cp_ext_c2_r16, (uint8_t)1u, (uint8_t)28u)); + } + if (cp_ext_c3_r16_present) { + HANDLE_CODE(pack_integer(bref, cp_ext_c3_r16, (uint8_t)1u, (uint8_t)28u)); + } + if (pucch_cfg_list_r16.is_present()) { + HANDLE_CODE(pucch_cfg_list_r16->pack(bref)); + } + if (lbt_fail_recovery_cfg_r16.is_present()) { + HANDLE_CODE(lbt_fail_recovery_cfg_r16->pack(bref)); + } + if (cfg_grant_cfg_to_add_mod_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cfg_grant_cfg_to_add_mod_list_r16, 1, 12)); + } + if (cfg_grant_cfg_to_release_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cfg_grant_cfg_to_release_list_r16, 1, 12, integer_packer(0, 11))); + } + if (cfg_grant_cfg_type2_deactivation_state_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, + *cfg_grant_cfg_type2_deactivation_state_list_r16, + 1, + 16, + SeqOfPacker>(1, 12, integer_packer(0, 11)))); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ul_tci_state_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(ul_pwr_ctrl_r17_present, 1)); + HANDLE_CODE(bref.pack(pucch_cfg_list_multicast1_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(pucch_cfg_list_multicast2_r17.is_present(), 1)); + if (ul_tci_state_list_r17.is_present()) { + HANDLE_CODE(ul_tci_state_list_r17->pack(bref)); + } + if (ul_pwr_ctrl_r17_present) { + HANDLE_CODE(pack_integer(bref, ul_pwr_ctrl_r17, (uint8_t)1u, (uint8_t)64u)); + } + if (pucch_cfg_list_multicast1_r17.is_present()) { + HANDLE_CODE(pucch_cfg_list_multicast1_r17->pack(bref)); + } + if (pucch_cfg_list_multicast2_r17.is_present()) { + HANDLE_CODE(pucch_cfg_list_multicast2_r17->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pucch_cfg_multicast1_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(pucch_cfg_multicast2_r17.is_present(), 1)); + if (pucch_cfg_multicast1_r17.is_present()) { + HANDLE_CODE(pucch_cfg_multicast1_r17->pack(bref)); + } + if (pucch_cfg_multicast2_r17.is_present()) { + HANDLE_CODE(pucch_cfg_multicast2_r17->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pathloss_ref_rs_to_add_mod_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(pathloss_ref_rs_to_release_list_r17.is_present(), 1)); + if (pathloss_ref_rs_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *pathloss_ref_rs_to_add_mod_list_r17, 1, 64)); + } + if (pathloss_ref_rs_to_release_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *pathloss_ref_rs_to_release_list_r17, 1, 64, integer_packer(0, 63))); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE bwp_ul_ded_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(cfg_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 (cfg_grant_cfg_present) { + HANDLE_CODE(cfg_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)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(sl_pucch_cfg_r16, bref); + HANDLE_CODE(bref.unpack(cp_ext_c2_r16_present, 1)); + HANDLE_CODE(bref.unpack(cp_ext_c3_r16_present, 1)); + HANDLE_CODE(bref.unpack(use_interlace_pucch_pusch_r16_present, 1)); + unpack_presence_flag(pucch_cfg_list_r16, bref); + unpack_presence_flag(lbt_fail_recovery_cfg_r16, bref); + unpack_presence_flag(cfg_grant_cfg_to_add_mod_list_r16, bref); + unpack_presence_flag(cfg_grant_cfg_to_release_list_r16, bref); + unpack_presence_flag(cfg_grant_cfg_type2_deactivation_state_list_r16, bref); + if (sl_pucch_cfg_r16.is_present()) { + HANDLE_CODE(sl_pucch_cfg_r16->unpack(bref)); + } + if (cp_ext_c2_r16_present) { + HANDLE_CODE(unpack_integer(cp_ext_c2_r16, bref, (uint8_t)1u, (uint8_t)28u)); + } + if (cp_ext_c3_r16_present) { + HANDLE_CODE(unpack_integer(cp_ext_c3_r16, bref, (uint8_t)1u, (uint8_t)28u)); + } + if (pucch_cfg_list_r16.is_present()) { + HANDLE_CODE(pucch_cfg_list_r16->unpack(bref)); + } + if (lbt_fail_recovery_cfg_r16.is_present()) { + HANDLE_CODE(lbt_fail_recovery_cfg_r16->unpack(bref)); + } + if (cfg_grant_cfg_to_add_mod_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*cfg_grant_cfg_to_add_mod_list_r16, bref, 1, 12)); + } + if (cfg_grant_cfg_to_release_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*cfg_grant_cfg_to_release_list_r16, bref, 1, 12, integer_packer(0, 11))); + } + if (cfg_grant_cfg_type2_deactivation_state_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*cfg_grant_cfg_type2_deactivation_state_list_r16, + bref, + 1, + 16, + SeqOfPacker>(1, 12, integer_packer(0, 11)))); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(ul_tci_state_list_r17, bref); + HANDLE_CODE(bref.unpack(ul_pwr_ctrl_r17_present, 1)); + unpack_presence_flag(pucch_cfg_list_multicast1_r17, bref); + unpack_presence_flag(pucch_cfg_list_multicast2_r17, bref); + if (ul_tci_state_list_r17.is_present()) { + HANDLE_CODE(ul_tci_state_list_r17->unpack(bref)); + } + if (ul_pwr_ctrl_r17_present) { + HANDLE_CODE(unpack_integer(ul_pwr_ctrl_r17, bref, (uint8_t)1u, (uint8_t)64u)); + } + if (pucch_cfg_list_multicast1_r17.is_present()) { + HANDLE_CODE(pucch_cfg_list_multicast1_r17->unpack(bref)); + } + if (pucch_cfg_list_multicast2_r17.is_present()) { + HANDLE_CODE(pucch_cfg_list_multicast2_r17->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(pucch_cfg_multicast1_r17, bref); + unpack_presence_flag(pucch_cfg_multicast2_r17, bref); + if (pucch_cfg_multicast1_r17.is_present()) { + HANDLE_CODE(pucch_cfg_multicast1_r17->unpack(bref)); + } + if (pucch_cfg_multicast2_r17.is_present()) { + HANDLE_CODE(pucch_cfg_multicast2_r17->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(pathloss_ref_rs_to_add_mod_list_r17, bref); + unpack_presence_flag(pathloss_ref_rs_to_release_list_r17, bref); + if (pathloss_ref_rs_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*pathloss_ref_rs_to_add_mod_list_r17, bref, 1, 64)); + } + if (pathloss_ref_rs_to_release_list_r17.is_present()) { + HANDLE_CODE( + unpack_dyn_seq_of(*pathloss_ref_rs_to_release_list_r17, bref, 1, 64, integer_packer(0, 63))); + } + } + } + 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 (cfg_grant_cfg_present) { + j.write_fieldname("configuredGrantConfig"); + cfg_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); + } + if (ext) { + if (sl_pucch_cfg_r16.is_present()) { + j.write_fieldname("sl-PUCCH-Config-r16"); + sl_pucch_cfg_r16->to_json(j); + } + if (cp_ext_c2_r16_present) { + j.write_int("cp-ExtensionC2-r16", cp_ext_c2_r16); + } + if (cp_ext_c3_r16_present) { + j.write_int("cp-ExtensionC3-r16", cp_ext_c3_r16); + } + if (use_interlace_pucch_pusch_r16_present) { + j.write_str("useInterlacePUCCH-PUSCH-r16", "enabled"); + } + if (pucch_cfg_list_r16.is_present()) { + j.write_fieldname("pucch-ConfigurationList-r16"); + pucch_cfg_list_r16->to_json(j); + } + if (lbt_fail_recovery_cfg_r16.is_present()) { + j.write_fieldname("lbt-FailureRecoveryConfig-r16"); + lbt_fail_recovery_cfg_r16->to_json(j); + } + if (cfg_grant_cfg_to_add_mod_list_r16.is_present()) { + j.start_array("configuredGrantConfigToAddModList-r16"); + for (const auto& e1 : *cfg_grant_cfg_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (cfg_grant_cfg_to_release_list_r16.is_present()) { + j.start_array("configuredGrantConfigToReleaseList-r16"); + for (const auto& e1 : *cfg_grant_cfg_to_release_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (cfg_grant_cfg_type2_deactivation_state_list_r16.is_present()) { + j.start_array("configuredGrantConfigType2DeactivationStateList-r16"); + for (const auto& e1 : *cfg_grant_cfg_type2_deactivation_state_list_r16) { + j.start_array(); + for (const auto& e2 : e1) { + j.write_int(e2); + } + j.end_array(); + } + j.end_array(); + } + if (ul_tci_state_list_r17.is_present()) { + j.write_fieldname("ul-TCI-StateList-r17"); + ul_tci_state_list_r17->to_json(j); + } + if (ul_pwr_ctrl_r17_present) { + j.write_int("ul-powerControl-r17", ul_pwr_ctrl_r17); + } + if (pucch_cfg_list_multicast1_r17.is_present()) { + j.write_fieldname("pucch-ConfigurationListMulticast1-r17"); + pucch_cfg_list_multicast1_r17->to_json(j); + } + if (pucch_cfg_list_multicast2_r17.is_present()) { + j.write_fieldname("pucch-ConfigurationListMulticast2-r17"); + pucch_cfg_list_multicast2_r17->to_json(j); + } + if (pucch_cfg_multicast1_r17.is_present()) { + j.write_fieldname("pucch-ConfigMulticast1-r17"); + pucch_cfg_multicast1_r17->to_json(j); + } + if (pucch_cfg_multicast2_r17.is_present()) { + j.write_fieldname("pucch-ConfigMulticast2-r17"); + pucch_cfg_multicast2_r17->to_json(j); + } + if (pathloss_ref_rs_to_add_mod_list_r17.is_present()) { + j.start_array("pathlossReferenceRSToAddModList-r17"); + for (const auto& e1 : *pathloss_ref_rs_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (pathloss_ref_rs_to_release_list_r17.is_present()) { + j.start_array("pathlossReferenceRSToReleaseList-r17"); + for (const auto& e1 : *pathloss_ref_rs_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + } + j.end_obj(); +} + +void bwp_ul_ded_s::ul_tci_state_list_r17_c_::destroy_() +{ + switch (type_) { + case types::explicitlist: + c.destroy(); + break; + case types::unified_tci_state_ref_r17: + c.destroy(); + break; + default: + break; + } +} +void bwp_ul_ded_s::ul_tci_state_list_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::explicitlist: + c.init(); + break; + case types::unified_tci_state_ref_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bwp_ul_ded_s::ul_tci_state_list_r17_c_"); + } +} +bwp_ul_ded_s::ul_tci_state_list_r17_c_::ul_tci_state_list_r17_c_(const bwp_ul_ded_s::ul_tci_state_list_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::explicitlist: + c.init(other.c.get()); + break; + case types::unified_tci_state_ref_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bwp_ul_ded_s::ul_tci_state_list_r17_c_"); + } +} +bwp_ul_ded_s::ul_tci_state_list_r17_c_& +bwp_ul_ded_s::ul_tci_state_list_r17_c_::operator=(const bwp_ul_ded_s::ul_tci_state_list_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::explicitlist: + c.set(other.c.get()); + break; + case types::unified_tci_state_ref_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "bwp_ul_ded_s::ul_tci_state_list_r17_c_"); + } + + return *this; +} +bwp_ul_ded_s::ul_tci_state_list_r17_c_::explicitlist_s_& bwp_ul_ded_s::ul_tci_state_list_r17_c_::set_explicitlist() +{ + set(types::explicitlist); + return c.get(); +} +serving_cell_and_bwp_id_r17_s& bwp_ul_ded_s::ul_tci_state_list_r17_c_::set_unified_tci_state_ref_r17() +{ + set(types::unified_tci_state_ref_r17); + return c.get(); +} +void bwp_ul_ded_s::ul_tci_state_list_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::explicitlist: + j.write_fieldname("explicitlist"); + j.start_obj(); + if (c.get().ul_tci_to_add_mod_list_r17.size() > 0) { + j.start_array("ul-TCI-ToAddModList-r17"); + for (const auto& e1 : c.get().ul_tci_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (c.get().ul_tci_to_release_list_r17.size() > 0) { + j.start_array("ul-TCI-ToReleaseList-r17"); + for (const auto& e1 : c.get().ul_tci_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); + break; + case types::unified_tci_state_ref_r17: + j.write_fieldname("unifiedTCI-StateRef-r17"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "bwp_ul_ded_s::ul_tci_state_list_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE bwp_ul_ded_s::ul_tci_state_list_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::explicitlist: + HANDLE_CODE(bref.pack(c.get().ul_tci_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(c.get().ul_tci_to_release_list_r17.size() > 0, 1)); + if (c.get().ul_tci_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().ul_tci_to_add_mod_list_r17, 1, 64)); + } + if (c.get().ul_tci_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get().ul_tci_to_release_list_r17, 1, 64, integer_packer(0, 63))); + } + break; + case types::unified_tci_state_ref_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "bwp_ul_ded_s::ul_tci_state_list_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE bwp_ul_ded_s::ul_tci_state_list_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::explicitlist: + bool ul_tci_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(ul_tci_to_add_mod_list_r17_present, 1)); + bool ul_tci_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(ul_tci_to_release_list_r17_present, 1)); + if (ul_tci_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(c.get().ul_tci_to_add_mod_list_r17, bref, 1, 64)); + } + if (ul_tci_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of( + c.get().ul_tci_to_release_list_r17, bref, 1, 64, integer_packer(0, 63))); + } + break; + case types::unified_tci_state_ref_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "bwp_ul_ded_s::ul_tci_state_list_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* bwp_ul_ded_s::ul_tci_state_list_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"explicitlist", "unifiedTCI-StateRef-r17"}; + return convert_enum_idx(names, 2, value, "bwp_ul_ded_s::ul_tci_state_list_r17_c_::types"); +} + +// BWP-Uplink ::= SEQUENCE +SRSASN_CODE bwp_ul_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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE bwp_ul_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)); + } + + return SRSASN_SUCCESS; +} +void bwp_ul_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.end_obj(); +} + +// BWP-UplinkDedicatedSDT-r17 ::= SEQUENCE +SRSASN_CODE bwp_ul_ded_sdt_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pusch_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(cfg_grant_cfg_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(cfg_grant_cfg_to_release_list_r17.size() > 0, 1)); + + if (pusch_cfg_r17_present) { + HANDLE_CODE(pusch_cfg_r17.pack(bref)); + } + if (cfg_grant_cfg_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cfg_grant_cfg_to_add_mod_list_r17, 1, 12)); + } + if (cfg_grant_cfg_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cfg_grant_cfg_to_release_list_r17, 1, 12, integer_packer(0, 11))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE bwp_ul_ded_sdt_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pusch_cfg_r17_present, 1)); + bool cfg_grant_cfg_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(cfg_grant_cfg_to_add_mod_list_r17_present, 1)); + bool cfg_grant_cfg_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(cfg_grant_cfg_to_release_list_r17_present, 1)); + + if (pusch_cfg_r17_present) { + HANDLE_CODE(pusch_cfg_r17.unpack(bref)); + } + if (cfg_grant_cfg_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(cfg_grant_cfg_to_add_mod_list_r17, bref, 1, 12)); + } + if (cfg_grant_cfg_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(cfg_grant_cfg_to_release_list_r17, bref, 1, 12, integer_packer(0, 11))); + } + + return SRSASN_SUCCESS; +} +void bwp_ul_ded_sdt_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pusch_cfg_r17_present) { + j.write_fieldname("pusch-Config-r17"); + pusch_cfg_r17.to_json(j); + } + if (cfg_grant_cfg_to_add_mod_list_r17.size() > 0) { + j.start_array("configuredGrantConfigToAddModList-r17"); + for (const auto& e1 : cfg_grant_cfg_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (cfg_grant_cfg_to_release_list_r17.size() > 0) { + j.start_array("configuredGrantConfigToReleaseList-r17"); + for (const auto& e1 : cfg_grant_cfg_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} diff --git a/lib/asn1/rrc_nr/cell_group_config.cpp b/lib/asn1/rrc_nr/cell_group_config.cpp index 5e64ae3f3f..d2fad7dccf 100644 --- a/lib/asn1/rrc_nr/cell_group_config.cpp +++ b/lib/asn1/rrc_nr/cell_group_config.cpp @@ -9,8 +9,6 @@ */ #include "srsran/asn1/rrc_nr/cell_group_config.h" -#include - using namespace asn1; using namespace asn1::rrc_nr; @@ -18,205 +16,6 @@ using namespace asn1::rrc_nr; * Struct Methods ******************************************************************************/ -// TA-Info-r17 ::= SEQUENCE -SRSASN_CODE ta_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ta_common_drift_r17_present, 1)); - HANDLE_CODE(bref.pack(ta_common_drift_variant_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, ta_common_r17, (uint32_t)0u, (uint32_t)66485757u)); - if (ta_common_drift_r17_present) { - HANDLE_CODE(pack_integer(bref, ta_common_drift_r17, (int32_t)-257303, (int32_t)257303)); - } - if (ta_common_drift_variant_r17_present) { - HANDLE_CODE(pack_integer(bref, ta_common_drift_variant_r17, (uint16_t)0u, (uint16_t)28949u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ta_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ta_common_drift_r17_present, 1)); - HANDLE_CODE(bref.unpack(ta_common_drift_variant_r17_present, 1)); - - HANDLE_CODE(unpack_integer(ta_common_r17, bref, (uint32_t)0u, (uint32_t)66485757u)); - if (ta_common_drift_r17_present) { - HANDLE_CODE(unpack_integer(ta_common_drift_r17, bref, (int32_t)-257303, (int32_t)257303)); - } - if (ta_common_drift_variant_r17_present) { - HANDLE_CODE(unpack_integer(ta_common_drift_variant_r17, bref, (uint16_t)0u, (uint16_t)28949u)); - } - - return SRSASN_SUCCESS; -} -void ta_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("ta-Common-r17", ta_common_r17); - if (ta_common_drift_r17_present) { - j.write_int("ta-CommonDrift-r17", ta_common_drift_r17); - } - if (ta_common_drift_variant_r17_present) { - j.write_int("ta-CommonDriftVariant-r17", ta_common_drift_variant_r17); - } - j.end_obj(); -} - -// NTN-Config-r17 ::= SEQUENCE -SRSASN_CODE ntn_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(epoch_time_r17_present, 1)); - HANDLE_CODE(bref.pack(ntn_ul_sync_validity_dur_r17_present, 1)); - HANDLE_CODE(bref.pack(cell_specific_koffset_r17_present, 1)); - HANDLE_CODE(bref.pack(kmac_r17_present, 1)); - HANDLE_CODE(bref.pack(ta_info_r17_present, 1)); - HANDLE_CODE(bref.pack(ntn_polarization_dl_r17_present, 1)); - HANDLE_CODE(bref.pack(ntn_polarization_ul_r17_present, 1)); - HANDLE_CODE(bref.pack(ephemeris_info_r17_present, 1)); - HANDLE_CODE(bref.pack(ta_report_r17_present, 1)); - - if (epoch_time_r17_present) { - HANDLE_CODE(epoch_time_r17.pack(bref)); - } - if (ntn_ul_sync_validity_dur_r17_present) { - HANDLE_CODE(ntn_ul_sync_validity_dur_r17.pack(bref)); - } - if (cell_specific_koffset_r17_present) { - HANDLE_CODE(pack_integer(bref, cell_specific_koffset_r17, (uint16_t)1u, (uint16_t)1023u)); - } - if (kmac_r17_present) { - HANDLE_CODE(pack_integer(bref, kmac_r17, (uint16_t)1u, (uint16_t)512u)); - } - if (ta_info_r17_present) { - HANDLE_CODE(ta_info_r17.pack(bref)); - } - if (ntn_polarization_dl_r17_present) { - HANDLE_CODE(ntn_polarization_dl_r17.pack(bref)); - } - if (ntn_polarization_ul_r17_present) { - HANDLE_CODE(ntn_polarization_ul_r17.pack(bref)); - } - if (ephemeris_info_r17_present) { - HANDLE_CODE(ephemeris_info_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ntn_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(epoch_time_r17_present, 1)); - HANDLE_CODE(bref.unpack(ntn_ul_sync_validity_dur_r17_present, 1)); - HANDLE_CODE(bref.unpack(cell_specific_koffset_r17_present, 1)); - HANDLE_CODE(bref.unpack(kmac_r17_present, 1)); - HANDLE_CODE(bref.unpack(ta_info_r17_present, 1)); - HANDLE_CODE(bref.unpack(ntn_polarization_dl_r17_present, 1)); - HANDLE_CODE(bref.unpack(ntn_polarization_ul_r17_present, 1)); - HANDLE_CODE(bref.unpack(ephemeris_info_r17_present, 1)); - HANDLE_CODE(bref.unpack(ta_report_r17_present, 1)); - - if (epoch_time_r17_present) { - HANDLE_CODE(epoch_time_r17.unpack(bref)); - } - if (ntn_ul_sync_validity_dur_r17_present) { - HANDLE_CODE(ntn_ul_sync_validity_dur_r17.unpack(bref)); - } - if (cell_specific_koffset_r17_present) { - HANDLE_CODE(unpack_integer(cell_specific_koffset_r17, bref, (uint16_t)1u, (uint16_t)1023u)); - } - if (kmac_r17_present) { - HANDLE_CODE(unpack_integer(kmac_r17, bref, (uint16_t)1u, (uint16_t)512u)); - } - if (ta_info_r17_present) { - HANDLE_CODE(ta_info_r17.unpack(bref)); - } - if (ntn_polarization_dl_r17_present) { - HANDLE_CODE(ntn_polarization_dl_r17.unpack(bref)); - } - if (ntn_polarization_ul_r17_present) { - HANDLE_CODE(ntn_polarization_ul_r17.unpack(bref)); - } - if (ephemeris_info_r17_present) { - HANDLE_CODE(ephemeris_info_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ntn_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (epoch_time_r17_present) { - j.write_fieldname("epochTime-r17"); - epoch_time_r17.to_json(j); - } - if (ntn_ul_sync_validity_dur_r17_present) { - j.write_str("ntn-UlSyncValidityDuration-r17", ntn_ul_sync_validity_dur_r17.to_string()); - } - if (cell_specific_koffset_r17_present) { - j.write_int("cellSpecificKoffset-r17", cell_specific_koffset_r17); - } - if (kmac_r17_present) { - j.write_int("kmac-r17", kmac_r17); - } - if (ta_info_r17_present) { - j.write_fieldname("ta-Info-r17"); - ta_info_r17.to_json(j); - } - if (ntn_polarization_dl_r17_present) { - j.write_str("ntn-PolarizationDL-r17", ntn_polarization_dl_r17.to_string()); - } - if (ntn_polarization_ul_r17_present) { - j.write_str("ntn-PolarizationUL-r17", ntn_polarization_ul_r17.to_string()); - } - if (ephemeris_info_r17_present) { - j.write_fieldname("ephemerisInfo-r17"); - ephemeris_info_r17.to_json(j); - } - if (ta_report_r17_present) { - j.write_str("ta-Report-r17", "enabled"); - } - j.end_obj(); -} - -const char* ntn_cfg_r17_s::ntn_ul_sync_validity_dur_r17_opts::to_string() const -{ - static const char* names[] = {"s5", - "s10", - "s15", - "s20", - "s25", - "s30", - "s35", - "s40", - "s45", - "s50", - "s55", - "s60", - "s120", - "s180", - "s240", - "s900"}; - return convert_enum_idx(names, 16, value, "ntn_cfg_r17_s::ntn_ul_sync_validity_dur_r17_e_"); -} -uint16_t ntn_cfg_r17_s::ntn_ul_sync_validity_dur_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 120, 180, 240, 900}; - return map_enum_number(numbers, 16, value, "ntn_cfg_r17_s::ntn_ul_sync_validity_dur_r17_e_"); -} - -const char* ntn_cfg_r17_s::ntn_polarization_dl_r17_opts::to_string() const -{ - static const char* names[] = {"rhcp", "lhcp", "linear"}; - return convert_enum_idx(names, 3, value, "ntn_cfg_r17_s::ntn_polarization_dl_r17_e_"); -} - -const char* ntn_cfg_r17_s::ntn_polarization_ul_r17_opts::to_string() const -{ - static const char* names[] = {"rhcp", "lhcp", "linear"}; - return convert_enum_idx(names, 3, value, "ntn_cfg_r17_s::ntn_polarization_ul_r17_e_"); -} - // T-Reassembly ::= ENUMERATED const char* t_reassembly_opts::to_string() const { @@ -409,6 +208,12 @@ uint16_t drx_cfg_ptm_r17_s::drx_on_dur_timer_ptm_r17_c_::milli_seconds_opts::to_ return map_enum_number(numbers, 24, value, "drx_cfg_ptm_r17_s::drx_on_dur_timer_ptm_r17_c_::milli_seconds_e_"); } +const char* drx_cfg_ptm_r17_s::drx_on_dur_timer_ptm_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"subMilliSeconds", "milliSeconds"}; + return convert_enum_idx(names, 2, value, "drx_cfg_ptm_r17_s::drx_on_dur_timer_ptm_r17_c_::types"); +} + const char* drx_cfg_ptm_r17_s::drx_inactivity_timer_ptm_r17_opts::to_string() const { static const char* names[] = {"ms0", "ms1", "ms2", "ms3", "ms4", "ms5", "ms6", "ms8", @@ -904,6 +709,20 @@ SRSASN_CODE drx_cfg_ptm_r17_s::drx_long_cycle_start_offset_ptm_r17_c_::unpack(cb return SRSASN_SUCCESS; } +const char* drx_cfg_ptm_r17_s::drx_long_cycle_start_offset_ptm_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", + "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", + "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; + return convert_enum_idx(names, 20, value, "drx_cfg_ptm_r17_s::drx_long_cycle_start_offset_ptm_r17_c_::types"); +} +uint16_t drx_cfg_ptm_r17_s::drx_long_cycle_start_offset_ptm_r17_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, + 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; + return map_enum_number(numbers, 20, value, "drx_cfg_ptm_r17_s::drx_long_cycle_start_offset_ptm_r17_c_::types"); +} + // BH-LogicalChannelIdentity-r16 ::= CHOICE void bh_lc_ch_id_r16_c::destroy_() {} void bh_lc_ch_id_r16_c::set(types::options e) @@ -1008,6 +827,12 @@ SRSASN_CODE bh_lc_ch_id_r16_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* bh_lc_ch_id_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"bh-LogicalChannelIdentity-r16", "bh-LogicalChannelIdentityExt-r16"}; + return convert_enum_idx(names, 2, value, "bh_lc_ch_id_r16_c::types"); +} + // T-StatusProhibit ::= ENUMERATED const char* t_status_prohibit_opts::to_string() const { @@ -1764,6 +1589,12 @@ SRSASN_CODE rlc_cfg_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* rlc_cfg_c::types_opts::to_string() const +{ + static const char* names[] = {"am", "um-Bi-Directional", "um-Uni-Directional-UL", "um-Uni-Directional-DL"}; + return convert_enum_idx(names, 4, value, "rlc_cfg_c::types"); +} + // BH-RLC-ChannelConfig-r16 ::= SEQUENCE SRSASN_CODE bh_rlc_ch_cfg_r16_s::pack(bit_ref& bref) const { @@ -1890,6 +1721,12 @@ SRSASN_CODE carrier_state_r17_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* carrier_state_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"deActivated-r17", "activeBWP-r17"}; + return convert_enum_idx(names, 2, value, "carrier_state_r17_c::types"); +} + // CC-State-r17 ::= SEQUENCE SRSASN_CODE cc_state_r17_s::pack(bit_ref& bref) const { @@ -2268,6 +2105,12 @@ SRSASN_CODE cfra_s::res_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* cfra_s::res_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb", "csirs"}; + return convert_enum_idx(names, 2, value, "cfra_s::res_c_::types"); +} + // CFRA-TwoStep-r16 ::= SEQUENCE SRSASN_CODE cfra_two_step_r16_s::pack(bit_ref& bref) const { @@ -3765,6 +3608,12 @@ SRSASN_CODE serving_cell_cfg_common_s::ssb_positions_in_burst_c_::unpack(cbit_re return SRSASN_SUCCESS; } +const char* serving_cell_cfg_common_s::ssb_positions_in_burst_c_::types_opts::to_string() const +{ + static const char* names[] = {"shortBitmap", "mediumBitmap", "longBitmap"}; + return convert_enum_idx(names, 3, value, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_::types"); +} + const char* serving_cell_cfg_common_s::ssb_periodicity_serving_cell_opts::to_string() const { static const char* names[] = {"ms5", "ms10", "ms20", "ms40", "ms80", "ms160", "spare2", "spare1"}; @@ -3848,6 +3697,12 @@ SRSASN_CODE serving_cell_cfg_common_s::ch_access_mode_r16_c_::unpack(cbit_ref& b return SRSASN_SUCCESS; } +const char* serving_cell_cfg_common_s::ch_access_mode_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"dynamic", "semiStatic"}; + return convert_enum_idx(names, 2, value, "serving_cell_cfg_common_s::ch_access_mode_r16_c_::types"); +} + const char* serving_cell_cfg_common_s::discovery_burst_win_len_r16_opts::to_string() const { static const char* names[] = {"ms0dot5", "ms1", "ms2", "ms3", "ms4", "ms5"}; @@ -3951,75 +3806,98 @@ void d_cp_cfg_r16_s::to_json(json_writer& j) const j.end_obj(); } -// DRX-Config ::= SEQUENCE -SRSASN_CODE drx_cfg_s::pack(bit_ref& bref) const +// DRX-ConfigExt-v1700 ::= SEQUENCE +SRSASN_CODE drx_cfg_ext_v1700_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(short_drx_present, 1)); + HANDLE_CODE(pack_integer(bref, drx_harq_rtt_timer_dl_r17, (uint16_t)0u, (uint16_t)448u)); + HANDLE_CODE(pack_integer(bref, drx_harq_rtt_timer_ul_r17, (uint16_t)0u, (uint16_t)448u)); - 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 drx_cfg_ext_v1700_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(drx_harq_rtt_timer_dl_r17, bref, (uint16_t)0u, (uint16_t)448u)); + HANDLE_CODE(unpack_integer(drx_harq_rtt_timer_ul_r17, bref, (uint16_t)0u, (uint16_t)448u)); return SRSASN_SUCCESS; } -SRSASN_CODE drx_cfg_s::unpack(cbit_ref& bref) +void drx_cfg_ext_v1700_s::to_json(json_writer& j) const { - HANDLE_CODE(bref.unpack(short_drx_present, 1)); + j.start_obj(); + j.write_int("drx-HARQ-RTT-TimerDL-r17", drx_harq_rtt_timer_dl_r17); + j.write_int("drx-HARQ-RTT-TimerUL-r17", drx_harq_rtt_timer_ul_r17); + j.end_obj(); +} - 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)); +// DRX-ConfigSL-r17 ::= SEQUENCE +SRSASN_CODE drx_cfg_sl_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, drx_harq_rtt_timer_sl_r17, (uint8_t)0u, (uint8_t)56u)); + HANDLE_CODE(drx_retx_timer_sl_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_cfg_sl_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(drx_harq_rtt_timer_sl_r17, bref, (uint8_t)0u, (uint8_t)56u)); + HANDLE_CODE(drx_retx_timer_sl_r17.unpack(bref)); return SRSASN_SUCCESS; } -void drx_cfg_s::to_json(json_writer& j) const +void drx_cfg_sl_r17_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_int("drx-HARQ-RTT-TimerSL-r17", drx_harq_rtt_timer_sl_r17); + j.write_str("drx-RetransmissionTimerSL-r17", drx_retx_timer_sl_r17.to_string()); + j.end_obj(); +} + +const char* drx_cfg_sl_r17_s::drx_retx_timer_sl_r17_opts::to_string() const +{ + static const char* names[] = {"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(names, 32, value, "drx_cfg_sl_r17_s::drx_retx_timer_sl_r17_e_"); +} +uint16_t drx_cfg_sl_r17_s::drx_retx_timer_sl_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; + return map_enum_number(numbers, 17, value, "drx_cfg_sl_r17_s::drx_retx_timer_sl_r17_e_"); +} + +// DRX-ConfigSecondaryGroup-r16 ::= SEQUENCE +SRSASN_CODE drx_cfg_secondary_group_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(drx_on_dur_timer_r16.pack(bref)); + HANDLE_CODE(drx_inactivity_timer_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_cfg_secondary_group_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(drx_on_dur_timer_r16.unpack(bref)); + HANDLE_CODE(drx_inactivity_timer_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void drx_cfg_secondary_group_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("drx-onDurationTimer-r16"); + drx_on_dur_timer_r16.to_json(j); + j.write_str("drx-InactivityTimer-r16", drx_inactivity_timer_r16.to_string()); 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 drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::destroy_() {} +void drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::set(types::options e) { destroy_(); type_ = e; } -drx_cfg_s::drx_on_dur_timer_c_::drx_on_dur_timer_c_(const drx_cfg_s::drx_on_dur_timer_c_& other) +drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::drx_on_dur_timer_r16_c_( + const drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_& other) { type_ = other.type(); switch (type_) { @@ -4032,10 +3910,12 @@ drx_cfg_s::drx_on_dur_timer_c_::drx_on_dur_timer_c_(const drx_cfg_s::drx_on_dur_ case types::nulltype: break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + log_invalid_choice_id(type_, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_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) +drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_& +drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::operator=( + const drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_& other) { if (this == &other) { return *this; @@ -4051,22 +3931,23 @@ drx_cfg_s::drx_on_dur_timer_c_& drx_cfg_s::drx_on_dur_timer_c_::operator=(const case types::nulltype: break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + log_invalid_choice_id(type_, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_"); } return *this; } -uint8_t& drx_cfg_s::drx_on_dur_timer_c_::set_sub_milli_seconds() +uint8_t& drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::set_sub_milli_seconds() { set(types::sub_milli_seconds); return c.get(); } -drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_e_& drx_cfg_s::drx_on_dur_timer_c_::set_milli_seconds() +drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::milli_seconds_e_& +drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::set_milli_seconds() { set(types::milli_seconds); return c.get(); } -void drx_cfg_s::drx_on_dur_timer_c_::to_json(json_writer& j) const +void drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { @@ -4077,11 +3958,11 @@ void drx_cfg_s::drx_on_dur_timer_c_::to_json(json_writer& j) const j.write_str("milliSeconds", c.get().to_string()); break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + log_invalid_choice_id(type_, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_"); } j.end_obj(); } -SRSASN_CODE drx_cfg_s::drx_on_dur_timer_c_::pack(bit_ref& bref) const +SRSASN_CODE drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { @@ -4092,12 +3973,12 @@ SRSASN_CODE drx_cfg_s::drx_on_dur_timer_c_::pack(bit_ref& bref) const HANDLE_CODE(c.get().pack(bref)); break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + log_invalid_choice_id(type_, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_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 drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); @@ -4110,809 +3991,86 @@ SRSASN_CODE drx_cfg_s::drx_on_dur_timer_c_::unpack(cbit_ref& bref) HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + log_invalid_choice_id(type_, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -const char* drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_opts::to_string() const +const char* drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::milli_seconds_opts::to_string() const { static const char* names[] = {"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(names, 32, value, "drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_e_"); + return convert_enum_idx(names, 32, value, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::milli_seconds_e_"); } -uint16_t drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_opts::to_number() const +uint16_t drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::milli_seconds_opts::to_number() const { static const uint16_t numbers[] = {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(numbers, 24, value, "drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_e_"); + return map_enum_number( + numbers, 24, value, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::milli_seconds_e_"); +} + +const char* drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"subMilliSeconds", "milliSeconds"}; + return convert_enum_idx(names, 2, value, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::types"); } -const char* drx_cfg_s::drx_inactivity_timer_opts::to_string() const +const char* drx_cfg_secondary_group_r16_s::drx_inactivity_timer_r16_opts::to_string() const { static const char* names[] = {"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(names, 32, value, "drx_cfg_s::drx_inactivity_timer_e_"); + return convert_enum_idx(names, 32, value, "drx_cfg_secondary_group_r16_s::drx_inactivity_timer_r16_e_"); } -uint16_t drx_cfg_s::drx_inactivity_timer_opts::to_number() const +uint16_t drx_cfg_secondary_group_r16_s::drx_inactivity_timer_r16_opts::to_number() const { static const uint16_t numbers[] = {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(numbers, 23, value, "drx_cfg_s::drx_inactivity_timer_e_"); + return map_enum_number(numbers, 23, value, "drx_cfg_secondary_group_r16_s::drx_inactivity_timer_r16_e_"); } -const char* drx_cfg_s::drx_retx_timer_dl_opts::to_string() const +// DataInactivityTimer ::= ENUMERATED +const char* data_inactivity_timer_opts::to_string() const { - static const char* names[] = {"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(names, 32, value, "drx_cfg_s::drx_retx_timer_dl_e_"); + static const char* names[] = { + "s1", "s2", "s3", "s5", "s7", "s10", "s15", "s20", "s40", "s50", "s60", "s80", "s100", "s120", "s150", "s180"}; + return convert_enum_idx(names, 16, value, "data_inactivity_timer_e"); } -uint16_t drx_cfg_s::drx_retx_timer_dl_opts::to_number() const +uint8_t data_inactivity_timer_opts::to_number() const { - static const uint16_t numbers[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; - return map_enum_number(numbers, 17, value, "drx_cfg_s::drx_retx_timer_dl_e_"); + static const uint8_t numbers[] = {1, 2, 3, 5, 7, 10, 15, 20, 40, 50, 60, 80, 100, 120, 150, 180}; + return map_enum_number(numbers, 16, value, "data_inactivity_timer_e"); } -const char* drx_cfg_s::drx_retx_timer_ul_opts::to_string() const +// DeactivatedSCG-Config-r17 ::= SEQUENCE +SRSASN_CODE deactiv_scg_cfg_r17_s::pack(bit_ref& bref) const { - static const char* names[] = {"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(names, 32, value, "drx_cfg_s::drx_retx_timer_ul_e_"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(bfd_and_rlm_r17, 1)); + + return SRSASN_SUCCESS; } -uint16_t drx_cfg_s::drx_retx_timer_ul_opts::to_number() const +SRSASN_CODE deactiv_scg_cfg_r17_s::unpack(cbit_ref& bref) { - static const uint16_t numbers[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; - return map_enum_number(numbers, 17, value, "drx_cfg_s::drx_retx_timer_ul_e_"); -} + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(bfd_and_rlm_r17, 1)); -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) + return SRSASN_SUCCESS; +} +void deactiv_scg_cfg_r17_s::to_json(json_writer& j) const { - destroy_(); - type_ = e; + j.start_obj(); + j.write_bool("bfd-and-RLM-r17", bfd_and_rlm_r17); + j.end_obj(); } -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()); - 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_, "drx_cfg_s::drx_long_cycle_start_offset_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) -{ - 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()); - break; - case types::ms10240: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); - } - - return *this; -} -uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms10() -{ - set(types::ms10); - return c.get(); -} -uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms20() -{ - set(types::ms20); - return c.get(); -} -uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms32() -{ - set(types::ms32); - return c.get(); -} -uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms40() -{ - set(types::ms40); - return c.get(); -} -uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms60() -{ - set(types::ms60); - return c.get(); -} -uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms64() -{ - set(types::ms64); - return c.get(); -} -uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms70() -{ - set(types::ms70); - return c.get(); -} -uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms80() -{ - set(types::ms80); - return c.get(); -} -uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms128() -{ - set(types::ms128); - return c.get(); -} -uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms160() -{ - set(types::ms160); - return c.get(); -} -uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms256() -{ - set(types::ms256); - return c.get(); -} -uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms320() -{ - set(types::ms320); - return c.get(); -} -uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms512() -{ - set(types::ms512); - return c.get(); -} -uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms640() -{ - set(types::ms640); - return c.get(); -} -uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms1024() -{ - set(types::ms1024); - return c.get(); -} -uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms1280() -{ - set(types::ms1280); - return c.get(); -} -uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms2048() -{ - set(types::ms2048); - return c.get(); -} -uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms2560() -{ - set(types::ms2560); - return c.get(); -} -uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms5120() -{ - set(types::ms5120); - return c.get(); -} -uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms10240() -{ - set(types::ms10240); - return c.get(); -} -void drx_cfg_s::drx_long_cycle_start_offset_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()); - break; - case types::ms10240: - j.write_int("ms10240", c.get()); - break; - default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); - } - j.end_obj(); -} -SRSASN_CODE drx_cfg_s::drx_long_cycle_start_offset_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)); - break; - case types::ms10240: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); - break; - default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::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)); - break; - case types::ms10240: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); - break; - default: - log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* drx_cfg_s::short_drx_s_::drx_short_cycle_opts::to_string() const -{ - static const char* names[] = {"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(names, 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 numbers[] = {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(numbers, 23, value, "drx_cfg_s::short_drx_s_::drx_short_cycle_e_"); -} - -// DRX-ConfigExt-v1700 ::= SEQUENCE -SRSASN_CODE drx_cfg_ext_v1700_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, drx_harq_rtt_timer_dl_r17, (uint16_t)0u, (uint16_t)448u)); - HANDLE_CODE(pack_integer(bref, drx_harq_rtt_timer_ul_r17, (uint16_t)0u, (uint16_t)448u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE drx_cfg_ext_v1700_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(drx_harq_rtt_timer_dl_r17, bref, (uint16_t)0u, (uint16_t)448u)); - HANDLE_CODE(unpack_integer(drx_harq_rtt_timer_ul_r17, bref, (uint16_t)0u, (uint16_t)448u)); - - return SRSASN_SUCCESS; -} -void drx_cfg_ext_v1700_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("drx-HARQ-RTT-TimerDL-r17", drx_harq_rtt_timer_dl_r17); - j.write_int("drx-HARQ-RTT-TimerUL-r17", drx_harq_rtt_timer_ul_r17); - j.end_obj(); -} - -// DRX-ConfigSL-r17 ::= SEQUENCE -SRSASN_CODE drx_cfg_sl_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, drx_harq_rtt_timer_sl_r17, (uint8_t)0u, (uint8_t)56u)); - HANDLE_CODE(drx_retx_timer_sl_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE drx_cfg_sl_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(drx_harq_rtt_timer_sl_r17, bref, (uint8_t)0u, (uint8_t)56u)); - HANDLE_CODE(drx_retx_timer_sl_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void drx_cfg_sl_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("drx-HARQ-RTT-TimerSL-r17", drx_harq_rtt_timer_sl_r17); - j.write_str("drx-RetransmissionTimerSL-r17", drx_retx_timer_sl_r17.to_string()); - j.end_obj(); -} - -const char* drx_cfg_sl_r17_s::drx_retx_timer_sl_r17_opts::to_string() const -{ - static const char* names[] = {"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(names, 32, value, "drx_cfg_sl_r17_s::drx_retx_timer_sl_r17_e_"); -} -uint16_t drx_cfg_sl_r17_s::drx_retx_timer_sl_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; - return map_enum_number(numbers, 17, value, "drx_cfg_sl_r17_s::drx_retx_timer_sl_r17_e_"); -} - -// DRX-ConfigSecondaryGroup-r16 ::= SEQUENCE -SRSASN_CODE drx_cfg_secondary_group_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(drx_on_dur_timer_r16.pack(bref)); - HANDLE_CODE(drx_inactivity_timer_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE drx_cfg_secondary_group_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(drx_on_dur_timer_r16.unpack(bref)); - HANDLE_CODE(drx_inactivity_timer_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void drx_cfg_secondary_group_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("drx-onDurationTimer-r16"); - drx_on_dur_timer_r16.to_json(j); - j.write_str("drx-InactivityTimer-r16", drx_inactivity_timer_r16.to_string()); - j.end_obj(); -} - -void drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::destroy_() {} -void drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::drx_on_dur_timer_r16_c_( - const drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_& other) -{ - 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_secondary_group_r16_s::drx_on_dur_timer_r16_c_"); - } -} -drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_& -drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::operator=( - const drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_& other) -{ - if (this == &other) { - return *this; - } - 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_secondary_group_r16_s::drx_on_dur_timer_r16_c_"); - } - - return *this; -} -uint8_t& drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::set_sub_milli_seconds() -{ - set(types::sub_milli_seconds); - return c.get(); -} -drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::milli_seconds_e_& -drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::set_milli_seconds() -{ - set(types::milli_seconds); - return c.get(); -} -void drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::to_json(json_writer& j) const -{ - j.start_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_secondary_group_r16_s::drx_on_dur_timer_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_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)); - break; - case types::milli_seconds: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_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)); - break; - case types::milli_seconds: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::milli_seconds_opts::to_string() const -{ - static const char* names[] = {"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(names, 32, value, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::milli_seconds_e_"); -} -uint16_t drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::milli_seconds_opts::to_number() const -{ - static const uint16_t numbers[] = {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( - numbers, 24, value, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::milli_seconds_e_"); -} - -const char* drx_cfg_secondary_group_r16_s::drx_inactivity_timer_r16_opts::to_string() const -{ - static const char* names[] = {"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(names, 32, value, "drx_cfg_secondary_group_r16_s::drx_inactivity_timer_r16_e_"); -} -uint16_t drx_cfg_secondary_group_r16_s::drx_inactivity_timer_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {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(numbers, 23, value, "drx_cfg_secondary_group_r16_s::drx_inactivity_timer_r16_e_"); -} - -// DataInactivityTimer ::= ENUMERATED -const char* data_inactivity_timer_opts::to_string() const -{ - static const char* names[] = { - "s1", "s2", "s3", "s5", "s7", "s10", "s15", "s20", "s40", "s50", "s60", "s80", "s100", "s120", "s150", "s180"}; - return convert_enum_idx(names, 16, value, "data_inactivity_timer_e"); -} -uint8_t data_inactivity_timer_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 5, 7, 10, 15, 20, 40, 50, 60, 80, 100, 120, 150, 180}; - return map_enum_number(numbers, 16, value, "data_inactivity_timer_e"); -} - -// DeactivatedSCG-Config-r17 ::= SEQUENCE -SRSASN_CODE deactiv_scg_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(bfd_and_rlm_r17, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE deactiv_scg_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(bfd_and_rlm_r17, 1)); - - return SRSASN_SUCCESS; -} -void deactiv_scg_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_bool("bfd-and-RLM-r17", bfd_and_rlm_r17); - j.end_obj(); -} - -// GoodServingCellEvaluation-r17 ::= SEQUENCE -SRSASN_CODE good_serving_cell_eval_r17_s::pack(bit_ref& bref) const + +// GoodServingCellEvaluation-r17 ::= SEQUENCE +SRSASN_CODE good_serving_cell_eval_r17_s::pack(bit_ref& bref) const { HANDLE_CODE(bref.pack(offset_r17_present, 1)); @@ -5163,6 +4321,12 @@ SRSASN_CODE mbs_rnti_specific_cfg_r17_s::group_common_rnti_r17_c_::unpack(cbit_r return SRSASN_SUCCESS; } +const char* mbs_rnti_specific_cfg_r17_s::group_common_rnti_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"g-RNTI", "g-CS-RNTI"}; + return convert_enum_idx(names, 2, value, "mbs_rnti_specific_cfg_r17_s::group_common_rnti_r17_c_::types"); +} + const char* mbs_rnti_specific_cfg_r17_s::harq_feedback_enabler_multicast_r17_opts::to_string() const { static const char* names[] = {"dci-enabler", "enabled"}; @@ -5510,6 +4674,12 @@ SRSASN_CODE pdsch_harq_ack_enh_type3_r17_s::applicable_r17_c_::unpack(cbit_ref& return SRSASN_SUCCESS; } +const char* pdsch_harq_ack_enh_type3_r17_s::applicable_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"perCC", "perHARQ"}; + return convert_enum_idx(names, 2, value, "pdsch_harq_ack_enh_type3_r17_s::applicable_r17_c_::types"); +} + // PHR-Config ::= SEQUENCE SRSASN_CODE phr_cfg_s::pack(bit_ref& bref) const { @@ -6058,6 +5228,12 @@ SRSASN_CODE recfg_with_sync_s::rach_cfg_ded_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* recfg_with_sync_s::rach_cfg_ded_c_::types_opts::to_string() const +{ + static const char* names[] = {"uplink", "supplementaryUplink"}; + return convert_enum_idx(names, 2, value, "recfg_with_sync_s::rach_cfg_ded_c_::types"); +} + // SchedulingRequestConfig ::= SEQUENCE SRSASN_CODE sched_request_cfg_s::pack(bit_ref& bref) const { @@ -7754,6 +6930,12 @@ SRSASN_CODE rlc_bearer_cfg_s::served_radio_bearer_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* rlc_bearer_cfg_s::served_radio_bearer_c_::types_opts::to_string() const +{ + static const char* names[] = {"srb-Identity", "drb-Identity"}; + return convert_enum_idx(names, 2, value, "rlc_bearer_cfg_s::served_radio_bearer_c_::types"); +} + // SCellConfig ::= SEQUENCE SRSASN_CODE scell_cfg_s::pack(bit_ref& bref) const { diff --git a/lib/asn1/rrc_nr/common.cpp b/lib/asn1/rrc_nr/common.cpp index 5868088875..05f3b1c8f5 100644 --- a/lib/asn1/rrc_nr/common.cpp +++ b/lib/asn1/rrc_nr/common.cpp @@ -9,8 +9,6 @@ */ #include "srsran/asn1/rrc_nr/common.h" -#include - using namespace asn1; using namespace asn1::rrc_nr; @@ -470,6 +468,33 @@ SRSASN_CODE srs_periodicity_and_offset_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* srs_periodicity_and_offset_c::types_opts::to_string() const +{ + static const char* names[] = {"sl1", + "sl2", + "sl4", + "sl5", + "sl8", + "sl10", + "sl16", + "sl20", + "sl32", + "sl40", + "sl64", + "sl80", + "sl160", + "sl320", + "sl640", + "sl1280", + "sl2560"}; + return convert_enum_idx(names, 17, value, "srs_periodicity_and_offset_c::types"); +} +uint16_t srs_periodicity_and_offset_c::types_opts::to_number() const +{ + static const uint16_t numbers[] = {1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560}; + return map_enum_number(numbers, 17, value, "srs_periodicity_and_offset_c::types"); +} + // SRS-SpatialRelationInfo ::= SEQUENCE SRSASN_CODE srs_spatial_relation_info_s::pack(bit_ref& bref) const { @@ -656,6 +681,12 @@ SRSASN_CODE srs_spatial_relation_info_s::ref_sig_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* srs_spatial_relation_info_s::ref_sig_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-Index", "csi-RS-Index", "srs"}; + return convert_enum_idx(names, 3, value, "srs_spatial_relation_info_s::ref_sig_c_::types"); +} + // ServingCellAndBWP-Id-r17 ::= SEQUENCE SRSASN_CODE serving_cell_and_bwp_id_r17_s::pack(bit_ref& bref) const { @@ -876,6 +907,12 @@ SRSASN_CODE spatial_relation_info_pdc_r17_s::ref_sig_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* spatial_relation_info_pdc_r17_s::ref_sig_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-Index", "csi-RS-Index", "dl-PRS-PDC", "srs"}; + return convert_enum_idx(names, 4, value, "spatial_relation_info_pdc_r17_s::ref_sig_c_::types"); +} + // SRS-Resource ::= SEQUENCE SRSASN_CODE srs_res_s::pack(bit_ref& bref) const { @@ -1296,6 +1333,17 @@ SRSASN_CODE srs_res_s::tx_comb_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* srs_res_s::tx_comb_c_::types_opts::to_string() const +{ + static const char* names[] = {"n2", "n4"}; + return convert_enum_idx(names, 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 numbers[] = {2, 4}; + return map_enum_number(numbers, 2, value, "srs_res_s::tx_comb_c_::types"); +} + const char* srs_res_s::res_map_s_::nrof_symbols_opts::to_string() const { static const char* names[] = {"n1", "n2", "n4"}; @@ -1491,6 +1539,12 @@ SRSASN_CODE srs_res_s::res_type_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* srs_res_s::res_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"aperiodic", "semi-persistent", "periodic"}; + return convert_enum_idx(names, 3, value, "srs_res_s::res_type_c_::types"); +} + const char* srs_res_s::res_map_r16_s_::nrof_symbols_r16_opts::to_string() const { static const char* names[] = {"n1", "n2", "n4"}; @@ -1641,6 +1695,17 @@ SRSASN_CODE srs_res_s::partial_freq_sr17_s_::start_rb_idx_f_scaling_r17_c_::unpa return SRSASN_SUCCESS; } +const char* srs_res_s::partial_freq_sr17_s_::start_rb_idx_f_scaling_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"startRBIndexAndFreqScalingFactor2-r17", "startRBIndexAndFreqScalingFactor4-r17"}; + return convert_enum_idx(names, 2, value, "srs_res_s::partial_freq_sr17_s_::start_rb_idx_f_scaling_r17_c_::types"); +} +uint8_t srs_res_s::partial_freq_sr17_s_::start_rb_idx_f_scaling_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4}; + return map_enum_number(numbers, 2, value, "srs_res_s::partial_freq_sr17_s_::start_rb_idx_f_scaling_r17_c_::types"); +} + void srs_res_s::srs_tci_state_r17_c_::destroy_() {} void srs_res_s::srs_tci_state_r17_c_::set(types::options e) { @@ -1745,6 +1810,12 @@ SRSASN_CODE srs_res_s::srs_tci_state_r17_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* srs_res_s::srs_tci_state_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"srs-UL-TCI-State", "srs-DLorJointTCI-State"}; + return convert_enum_idx(names, 2, value, "srs_res_s::srs_tci_state_r17_c_::types"); +} + // SSB-Configuration-r16 ::= SEQUENCE SRSASN_CODE ssb_cfg_r16_s::pack(bit_ref& bref) const { @@ -2405,6 +2476,20 @@ SRSASN_CODE srs_periodicity_and_offset_r16_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* srs_periodicity_and_offset_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"sl1", "sl2", "sl4", "sl5", "sl8", "sl10", "sl16", + "sl20", "sl32", "sl40", "sl64", "sl80", "sl160", "sl320", + "sl640", "sl1280", "sl2560", "sl5120", "sl10240", "sl40960", "sl81920"}; + return convert_enum_idx(names, 21, value, "srs_periodicity_and_offset_r16_c::types"); +} +uint32_t srs_periodicity_and_offset_r16_c::types_opts::to_number() const +{ + static const uint32_t numbers[] = {1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, + 80, 160, 320, 640, 1280, 2560, 5120, 10240, 40960, 81920}; + return map_enum_number(numbers, 21, value, "srs_periodicity_and_offset_r16_c::types"); +} + // SRS-PeriodicityAndOffsetExt-r16 ::= CHOICE void srs_periodicity_and_offset_ext_r16_c::destroy_() {} void srs_periodicity_and_offset_ext_r16_c::set(types::options e) @@ -2551,6 +2636,17 @@ SRSASN_CODE srs_periodicity_and_offset_ext_r16_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* srs_periodicity_and_offset_ext_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"sl128", "sl256", "sl512", "sl20480"}; + return convert_enum_idx(names, 4, value, "srs_periodicity_and_offset_ext_r16_c::types"); +} +uint16_t srs_periodicity_and_offset_ext_r16_c::types_opts::to_number() const +{ + static const uint16_t numbers[] = {128, 256, 512, 20480}; + return map_enum_number(numbers, 4, value, "srs_periodicity_and_offset_ext_r16_c::types"); +} + // SRS-SpatialRelationInfoPos-r16 ::= CHOICE void srs_spatial_relation_info_pos_r16_c::destroy_() { @@ -3007,6 +3103,30 @@ SRSASN_CODE srs_spatial_relation_info_pos_r16_c::serving_rs_r16_s_::ref_sig_r16_ return SRSASN_SUCCESS; } +const char* srs_spatial_relation_info_pos_r16_c::serving_rs_r16_s_::ref_sig_r16_c_::srs_spatial_relation_r16_s_:: + res_sel_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"srs-ResourceId-r16", "srs-PosResourceId-r16"}; + return convert_enum_idx(names, + 2, + value, + "srs_spatial_relation_info_pos_r16_c::serving_rs_r16_s_::ref_sig_r16_c_::srs_spatial_" + "relation_r16_s_::res_sel_r16_c_::types"); +} + +const char* srs_spatial_relation_info_pos_r16_c::serving_rs_r16_s_::ref_sig_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-IndexServing-r16", "csi-RS-IndexServing-r16", "srs-SpatialRelation-r16"}; + return convert_enum_idx( + names, 3, value, "srs_spatial_relation_info_pos_r16_c::serving_rs_r16_s_::ref_sig_r16_c_::types"); +} + +const char* srs_spatial_relation_info_pos_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"servingRS-r16", "ssb-Ncell-r16", "dl-PRS-r16"}; + return convert_enum_idx(names, 3, value, "srs_spatial_relation_info_pos_r16_c::types"); +} + // SRS-PosResource-r16 ::= SEQUENCE SRSASN_CODE srs_pos_res_r16_s::pack(bit_ref& bref) const { @@ -3249,6 +3369,17 @@ SRSASN_CODE srs_pos_res_r16_s::tx_comb_r16_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* srs_pos_res_r16_s::tx_comb_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"n2-r16", "n4-r16", "n8-r16"}; + return convert_enum_idx(names, 3, value, "srs_pos_res_r16_s::tx_comb_r16_c_::types"); +} +uint8_t srs_pos_res_r16_s::tx_comb_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 8}; + return map_enum_number(numbers, 3, value, "srs_pos_res_r16_s::tx_comb_r16_c_::types"); +} + const char* srs_pos_res_r16_s::res_map_r16_s_::nrof_symbols_r16_opts::to_string() const { static const char* names[] = {"n1", "n2", "n4", "n8", "n12"}; @@ -3546,6 +3677,12 @@ void srs_pos_res_r16_s::res_type_r16_c_::periodic_r16_s_::to_json(json_writer& j j.end_obj(); } +const char* srs_pos_res_r16_s::res_type_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"aperiodic-r16", "semi-persistent-r16", "periodic-r16"}; + return convert_enum_idx(names, 3, value, "srs_pos_res_r16_s::res_type_r16_c_::types"); +} + // SRS-PosResourceAP-r16 ::= SEQUENCE SRSASN_CODE srs_pos_res_ap_r16_s::pack(bit_ref& bref) const { diff --git a/lib/asn1/rrc_nr/dl_ccch_msg.cpp b/lib/asn1/rrc_nr/dl_ccch_msg.cpp new file mode 100644 index 0000000000..3c290ba884 --- /dev/null +++ b/lib/asn1/rrc_nr/dl_ccch_msg.cpp @@ -0,0 +1,228 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/dl_ccch_msg.h" +#include "srsran/asn1/rrc_nr/dl_ccch_msg_ies.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// DL-CCCH-MessageType ::= CHOICE +void dl_ccch_msg_type_c::set(types::options e) +{ + type_ = e; +} +dl_ccch_msg_type_c::c1_c_& dl_ccch_msg_type_c::set_c1() +{ + set(types::c1); + return c; +} +void dl_ccch_msg_type_c::set_msg_class_ext() +{ + set(types::msg_class_ext); +} +void dl_ccch_msg_type_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.to_json(j); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); + } + j.end_obj(); +} +SRSASN_CODE dl_ccch_msg_type_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::c1: + HANDLE_CODE(c.pack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ccch_msg_type_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.unpack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void dl_ccch_msg_type_c::c1_c_::set(types::options e) +{ + type_ = e; + switch (type_) { + case types::rrc_reject: + c = rrc_reject_s{}; + break; + case types::rrc_setup: + c = rrc_setup_s{}; + 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_"); + } +} +rrc_reject_s& dl_ccch_msg_type_c::c1_c_::set_rrc_reject() +{ + set(types::rrc_reject); + return c.get(); +} +rrc_setup_s& dl_ccch_msg_type_c::c1_c_::set_rrc_setup() +{ + set(types::rrc_setup); + return c.get(); +} +void dl_ccch_msg_type_c::c1_c_::set_spare2() +{ + set(types::spare2); +} +void dl_ccch_msg_type_c::c1_c_::set_spare1() +{ + set(types::spare1); +} +void dl_ccch_msg_type_c::c1_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: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_ccch_msg_type_c::c1_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: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ccch_msg_type_c::c1_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: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* dl_ccch_msg_type_c::c1_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcReject", "rrcSetup", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "dl_ccch_msg_type_c::c1_c_::types"); +} + +const char* dl_ccch_msg_type_c::types_opts::to_string() const +{ + static const char* names[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(names, 2, value, "dl_ccch_msg_type_c::types"); +} +uint8_t dl_ccch_msg_type_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 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(); +} diff --git a/lib/asn1/rrc_nr/msg_common.cpp b/lib/asn1/rrc_nr/dl_ccch_msg_ies.cpp similarity index 71% rename from lib/asn1/rrc_nr/msg_common.cpp rename to lib/asn1/rrc_nr/dl_ccch_msg_ies.cpp index ed51c8ee8e..d8ef5336a7 100644 --- a/lib/asn1/rrc_nr/msg_common.cpp +++ b/lib/asn1/rrc_nr/dl_ccch_msg_ies.cpp @@ -8,9 +8,7 @@ * */ -#include "srsran/asn1/rrc_nr/msg_common.h" -#include - +#include "srsran/asn1/rrc_nr/dl_ccch_msg_ies.h" using namespace asn1; using namespace asn1::rrc_nr; @@ -691,6 +689,17 @@ uint16_t sl_res_reserve_period_r16_c::sl_res_reserve_period1_r16_opts::to_number return map_enum_number(numbers, 11, value, "sl_res_reserve_period_r16_c::sl_res_reserve_period1_r16_e_"); } +const char* sl_res_reserve_period_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"sl-ResourceReservePeriod1-r16", "sl-ResourceReservePeriod2-r16"}; + return convert_enum_idx(names, 2, value, "sl_res_reserve_period_r16_c::types"); +} +uint8_t sl_res_reserve_period_r16_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "sl_res_reserve_period_r16_c::types"); +} + // SL-TxPercentageConfig-r16 ::= SEQUENCE SRSASN_CODE sl_tx_percentage_cfg_r16_s::pack(bit_ref& bref) const { @@ -1872,6 +1881,12 @@ SRSASN_CODE sl_meas_report_quant_r16_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* sl_meas_report_quant_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"sl-RSRP-r16"}; + return convert_enum_idx(names, 1, value, "sl_meas_report_quant_r16_c::types"); +} + // SL-MeasTriggerQuantity-r16 ::= CHOICE void sl_meas_trigger_quant_r16_c::to_json(json_writer& j) const { @@ -1897,6 +1912,12 @@ SRSASN_CODE sl_meas_trigger_quant_r16_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* sl_meas_trigger_quant_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"sl-RSRP-r16"}; + return convert_enum_idx(names, 1, value, "sl_meas_trigger_quant_r16_c::types"); +} + // SL-RS-Type-r16 ::= ENUMERATED const char* sl_rs_type_r16_opts::to_string() const { @@ -2618,6 +2639,17 @@ SRSASN_CODE sl_event_trigger_cfg_r16_s::sl_event_id_r16_c_::unpack(cbit_ref& bre return SRSASN_SUCCESS; } +const char* sl_event_trigger_cfg_r16_s::sl_event_id_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"eventS1-r16", "eventS2-r16"}; + return convert_enum_idx(names, 2, value, "sl_event_trigger_cfg_r16_s::sl_event_id_r16_c_::types"); +} +uint8_t sl_event_trigger_cfg_r16_s::sl_event_id_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "sl_event_trigger_cfg_r16_s::sl_event_id_r16_c_::types"); +} + const char* sl_event_trigger_cfg_r16_s::sl_report_amount_r16_opts::to_string() const { static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; @@ -2837,6 +2869,12 @@ const char* sl_pqi_r16_c::sl_non_standardized_pqi_r16_s_::sl_res_type_r16_opts:: return convert_enum_idx(names, 4, value, "sl_pqi_r16_c::sl_non_standardized_pqi_r16_s_::sl_res_type_r16_e_"); } +const char* sl_pqi_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"sl-StandardizedPQI-r16", "sl-Non-StandardizedPQI-r16"}; + return convert_enum_idx(names, 2, value, "sl_pqi_r16_c::types"); +} + // SL-PeriodicalReportConfig-r16 ::= SEQUENCE SRSASN_CODE sl_periodical_report_cfg_r16_s::pack(bit_ref& bref) const { @@ -2975,6 +3013,17 @@ SRSASN_CODE sl_tx_pwr_r16_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* sl_tx_pwr_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"minusinfinity-r16", "txPower-r16"}; + return convert_enum_idx(names, 2, value, "sl_tx_pwr_r16_c::types"); +} +int8_t sl_tx_pwr_r16_c::types_opts::to_number() const +{ + static const int8_t numbers[] = {-1}; + return map_enum_number(numbers, 1, value, "sl_tx_pwr_r16_c::types"); +} + // SL-MeasObject-r16 ::= SEQUENCE SRSASN_CODE sl_meas_obj_r16_s::pack(bit_ref& bref) const { @@ -3264,6 +3313,17 @@ uint16_t sl_period_cg_r16_c::sl_period_cg1_r16_opts::to_number() const return map_enum_number(numbers, 10, value, "sl_period_cg_r16_c::sl_period_cg1_r16_e_"); } +const char* sl_period_cg_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"sl-PeriodCG1-r16", "sl-PeriodCG2-r16"}; + return convert_enum_idx(names, 2, value, "sl_period_cg_r16_c::types"); +} +uint8_t sl_period_cg_r16_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "sl_period_cg_r16_c::types"); +} + // SL-QoS-Profile-r16 ::= SEQUENCE SRSASN_CODE sl_qos_profile_r16_s::pack(bit_ref& bref) const { @@ -3484,6 +3544,12 @@ SRSASN_CODE sl_report_cfg_r16_s::sl_report_type_r16_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* sl_report_cfg_r16_s::sl_report_type_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"sl-Periodical-r16", "sl-EventTriggered-r16"}; + return convert_enum_idx(names, 2, value, "sl_report_cfg_r16_s::sl_report_type_r16_c_::types"); +} + // SL-SSB-TimeAllocation-r16 ::= SEQUENCE SRSASN_CODE sl_ssb_time_alloc_r16_s::pack(bit_ref& bref) const { @@ -4404,6 +4470,12 @@ uint16_t sl_drx_cfg_uc_r17_s::sl_drx_on_dur_timer_r17_c_::milli_seconds_opts::to return map_enum_number(numbers, 24, value, "sl_drx_cfg_uc_r17_s::sl_drx_on_dur_timer_r17_c_::milli_seconds_e_"); } +const char* sl_drx_cfg_uc_r17_s::sl_drx_on_dur_timer_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"subMilliSeconds", "milliSeconds"}; + return convert_enum_idx(names, 2, value, "sl_drx_cfg_uc_r17_s::sl_drx_on_dur_timer_r17_c_::types"); +} + const char* sl_drx_cfg_uc_r17_s::sl_drx_inactivity_timer_r17_opts::to_string() const { static const char* names[] = {"ms0", "ms1", "ms2", "ms3", "ms4", "ms5", "ms6", "ms8", @@ -4920,6 +4992,20 @@ SRSASN_CODE sl_drx_cfg_uc_r17_s::sl_drx_cycle_start_offset_r17_c_::unpack(cbit_r return SRSASN_SUCCESS; } +const char* sl_drx_cfg_uc_r17_s::sl_drx_cycle_start_offset_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", + "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", + "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; + return convert_enum_idx(names, 20, value, "sl_drx_cfg_uc_r17_s::sl_drx_cycle_start_offset_r17_c_::types"); +} +uint16_t sl_drx_cfg_uc_r17_s::sl_drx_cycle_start_offset_r17_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, + 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; + return map_enum_number(numbers, 20, value, "sl_drx_cfg_uc_r17_s::sl_drx_cycle_start_offset_r17_c_::types"); +} + // SL-DRX-GC-BC-QoS-r17 ::= SEQUENCE SRSASN_CODE sl_drx_gc_bc_qos_r17_s::pack(bit_ref& bref) const { @@ -5091,6 +5177,12 @@ uint16_t sl_drx_gc_bc_qos_r17_s::sl_drx_gc_bc_on_dur_timer_r17_c_::milli_seconds numbers, 24, value, "sl_drx_gc_bc_qos_r17_s::sl_drx_gc_bc_on_dur_timer_r17_c_::milli_seconds_e_"); } +const char* sl_drx_gc_bc_qos_r17_s::sl_drx_gc_bc_on_dur_timer_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"subMilliSeconds", "milliSeconds"}; + return convert_enum_idx(names, 2, value, "sl_drx_gc_bc_qos_r17_s::sl_drx_gc_bc_on_dur_timer_r17_c_::types"); +} + const char* sl_drx_gc_bc_qos_r17_s::sl_drx_gc_inactivity_timer_r17_opts::to_string() const { static const char* names[] = {"ms0", "ms1", "ms2", "ms3", "ms4", "ms5", "ms6", "ms8", @@ -5597,112 +5689,6 @@ uint16_t t_poll_retx_opts::to_number() const return map_enum_number(numbers, 63, value, "t_poll_retx_e"); } -// DiscardTimerExt-r16 ::= ENUMERATED -const char* discard_timer_ext_r16_opts::to_string() const -{ - static const char* names[] = {"ms0dot5", "ms1", "ms2", "ms4", "ms6", "ms8", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "discard_timer_ext_r16_e"); -} -float discard_timer_ext_r16_opts::to_number() const -{ - static const float numbers[] = {0.5, 1.0, 2.0, 4.0, 6.0, 8.0}; - return map_enum_number(numbers, 6, value, "discard_timer_ext_r16_e"); -} -const char* discard_timer_ext_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.5", "1", "2", "4", "6", "8"}; - return convert_enum_idx(number_strs, 8, value, "discard_timer_ext_r16_e"); -} - -// DiscardTimerExt2-r17 ::= ENUMERATED -const char* discard_timer_ext2_r17_opts::to_string() const -{ - static const char* names[] = {"ms2000", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "discard_timer_ext2_r17_e"); -} -uint16_t discard_timer_ext2_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {2000}; - return map_enum_number(numbers, 1, value, "discard_timer_ext2_r17_e"); -} - -// EthernetHeaderCompression-r16 ::= SEQUENCE -SRSASN_CODE ethernet_hdr_compress_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ehc_dl_r16_present, 1)); - HANDLE_CODE(bref.pack(ehc_ul_r16_present, 1)); - - bref.pack(ehc_common_r16.ext, 1); - HANDLE_CODE(ehc_common_r16.ehc_c_id_len_r16.pack(bref)); - if (ehc_dl_r16_present) { - bref.pack(ehc_dl_r16.ext, 1); - HANDLE_CODE(bref.pack(ehc_dl_r16.drb_continue_ehc_dl_r16_present, 1)); - } - if (ehc_ul_r16_present) { - bref.pack(ehc_ul_r16.ext, 1); - HANDLE_CODE(bref.pack(ehc_ul_r16.drb_continue_ehc_ul_r16_present, 1)); - HANDLE_CODE(pack_integer(bref, ehc_ul_r16.max_c_id_ehc_ul_r16, (uint16_t)1u, (uint16_t)32767u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ethernet_hdr_compress_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ehc_dl_r16_present, 1)); - HANDLE_CODE(bref.unpack(ehc_ul_r16_present, 1)); - - bref.unpack(ehc_common_r16.ext, 1); - HANDLE_CODE(ehc_common_r16.ehc_c_id_len_r16.unpack(bref)); - if (ehc_dl_r16_present) { - bref.unpack(ehc_dl_r16.ext, 1); - HANDLE_CODE(bref.unpack(ehc_dl_r16.drb_continue_ehc_dl_r16_present, 1)); - } - if (ehc_ul_r16_present) { - bref.unpack(ehc_ul_r16.ext, 1); - HANDLE_CODE(bref.unpack(ehc_ul_r16.drb_continue_ehc_ul_r16_present, 1)); - HANDLE_CODE(unpack_integer(ehc_ul_r16.max_c_id_ehc_ul_r16, bref, (uint16_t)1u, (uint16_t)32767u)); - } - - return SRSASN_SUCCESS; -} -void ethernet_hdr_compress_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("ehc-Common-r16"); - j.start_obj(); - j.write_str("ehc-CID-Length-r16", ehc_common_r16.ehc_c_id_len_r16.to_string()); - j.end_obj(); - if (ehc_dl_r16_present) { - j.write_fieldname("ehc-Downlink-r16"); - j.start_obj(); - if (ehc_dl_r16.drb_continue_ehc_dl_r16_present) { - j.write_str("drb-ContinueEHC-DL-r16", "true"); - } - j.end_obj(); - } - if (ehc_ul_r16_present) { - j.write_fieldname("ehc-Uplink-r16"); - j.start_obj(); - j.write_int("maxCID-EHC-UL-r16", ehc_ul_r16.max_c_id_ehc_ul_r16); - if (ehc_ul_r16.drb_continue_ehc_ul_r16_present) { - j.write_str("drb-ContinueEHC-UL-r16", "true"); - } - j.end_obj(); - } - j.end_obj(); -} - -const char* ethernet_hdr_compress_r16_s::ehc_common_r16_s_::ehc_c_id_len_r16_opts::to_string() const -{ - static const char* names[] = {"bits7", "bits15"}; - return convert_enum_idx(names, 2, value, "ethernet_hdr_compress_r16_s::ehc_common_r16_s_::ehc_c_id_len_r16_e_"); -} -uint8_t ethernet_hdr_compress_r16_s::ehc_common_r16_s_::ehc_c_id_len_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {7, 15}; - return map_enum_number(numbers, 2, value, "ethernet_hdr_compress_r16_s::ehc_common_r16_s_::ehc_c_id_len_r16_e_"); -} - // MAC-MainConfigSL-r16 ::= SEQUENCE SRSASN_CODE mac_main_cfg_sl_r16_s::pack(bit_ref& bref) const { @@ -6519,6 +6505,12 @@ uint8_t sl_rlc_cfg_r16_c::sl_am_rlc_r16_s_::sl_max_retx_thres_r16_opts::to_numbe return map_enum_number(numbers, 8, value, "sl_rlc_cfg_r16_c::sl_am_rlc_r16_s_::sl_max_retx_thres_r16_e_"); } +const char* sl_rlc_cfg_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"sl-AM-RLC-r16", "sl-UM-RLC-r16"}; + return convert_enum_idx(names, 2, value, "sl_rlc_cfg_r16_c::types"); +} + // SL-RemoteUE-RB-Identity-r17 ::= CHOICE void sl_remote_ue_rb_id_r17_c::destroy_() {} void sl_remote_ue_rb_id_r17_c::set(types::options e) @@ -6623,6 +6615,12 @@ SRSASN_CODE sl_remote_ue_rb_id_r17_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* sl_remote_ue_rb_id_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"srb-Identity-r17", "drb-Identity-r17"}; + return convert_enum_idx(names, 2, value, "sl_remote_ue_rb_id_r17_c::types"); +} + // SL-ReselectionConfig-r17 ::= SEQUENCE SRSASN_CODE sl_resel_cfg_r17_s::pack(bit_ref& bref) const { @@ -6675,5454 +6673,1945 @@ void sl_resel_cfg_r17_s::to_json(json_writer& j) const j.end_obj(); } -// UL-DataSplitThreshold ::= ENUMERATED -const char* ul_data_split_thres_opts::to_string() const -{ - static const char* names[] = {"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(names, 32, value, "ul_data_split_thres_e"); -} -int32_t ul_data_split_thres_opts::to_number() const +// SL-DRX-Config-r17 ::= SEQUENCE +SRSASN_CODE sl_drx_cfg_r17_s::pack(bit_ref& bref) const { - static const int32_t numbers[] = {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(numbers, 24, value, "ul_data_split_thres_e"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_drx_cfg_gc_bc_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_drx_cfg_uc_to_release_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_drx_cfg_uc_to_add_mod_list_r17.size() > 0, 1)); -// UplinkDataCompression-r17 ::= CHOICE -void ul_data_compress_r17_c::set(types::options e) -{ - type_ = e; -} -ul_data_compress_r17_c::new_setup_s_& ul_data_compress_r17_c::set_new_setup() -{ - set(types::new_setup); - return c; -} -void ul_data_compress_r17_c::set_drb_continue_udc() -{ - set(types::drb_continue_udc); -} -void ul_data_compress_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::new_setup: - j.write_fieldname("newSetup"); - j.start_obj(); - j.write_str("bufferSize-r17", c.buffer_size_r17.to_string()); - if (c.dictionary_r17_present) { - j.write_str("dictionary-r17", c.dictionary_r17.to_string()); - } - j.end_obj(); - break; - case types::drb_continue_udc: - break; - default: - log_invalid_choice_id(type_, "ul_data_compress_r17_c"); + if (sl_drx_cfg_gc_bc_r17_present) { + HANDLE_CODE(sl_drx_cfg_gc_bc_r17.pack(bref)); } - j.end_obj(); -} -SRSASN_CODE ul_data_compress_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::new_setup: - HANDLE_CODE(bref.pack(c.dictionary_r17_present, 1)); - HANDLE_CODE(c.buffer_size_r17.pack(bref)); - if (c.dictionary_r17_present) { - HANDLE_CODE(c.dictionary_r17.pack(bref)); - } - break; - case types::drb_continue_udc: - break; - default: - log_invalid_choice_id(type_, "ul_data_compress_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; + if (sl_drx_cfg_uc_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_drx_cfg_uc_to_release_list_r17, 1, 32, integer_packer(0, 31))); + } + if (sl_drx_cfg_uc_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_drx_cfg_uc_to_add_mod_list_r17, 1, 32)); } + return SRSASN_SUCCESS; } -SRSASN_CODE ul_data_compress_r17_c::unpack(cbit_ref& bref) +SRSASN_CODE sl_drx_cfg_r17_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::new_setup: - HANDLE_CODE(bref.unpack(c.dictionary_r17_present, 1)); - HANDLE_CODE(c.buffer_size_r17.unpack(bref)); - if (c.dictionary_r17_present) { - HANDLE_CODE(c.dictionary_r17.unpack(bref)); - } - break; - case types::drb_continue_udc: - break; - default: - log_invalid_choice_id(type_, "ul_data_compress_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_drx_cfg_gc_bc_r17_present, 1)); + bool sl_drx_cfg_uc_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(sl_drx_cfg_uc_to_release_list_r17_present, 1)); + bool sl_drx_cfg_uc_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(sl_drx_cfg_uc_to_add_mod_list_r17_present, 1)); + + if (sl_drx_cfg_gc_bc_r17_present) { + HANDLE_CODE(sl_drx_cfg_gc_bc_r17.unpack(bref)); + } + if (sl_drx_cfg_uc_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_drx_cfg_uc_to_release_list_r17, bref, 1, 32, integer_packer(0, 31))); + } + if (sl_drx_cfg_uc_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_drx_cfg_uc_to_add_mod_list_r17, bref, 1, 32)); } - return SRSASN_SUCCESS; -} -const char* ul_data_compress_r17_c::new_setup_s_::buffer_size_r17_opts::to_string() const -{ - static const char* names[] = {"kbyte2", "kbyte4", "kbyte8", "spare1"}; - return convert_enum_idx(names, 4, value, "ul_data_compress_r17_c::new_setup_s_::buffer_size_r17_e_"); + return SRSASN_SUCCESS; } -uint8_t ul_data_compress_r17_c::new_setup_s_::buffer_size_r17_opts::to_number() const +void sl_drx_cfg_r17_s::to_json(json_writer& j) const { - static const uint8_t numbers[] = {2, 4, 8}; - return map_enum_number(numbers, 3, value, "ul_data_compress_r17_c::new_setup_s_::buffer_size_r17_e_"); + j.start_obj(); + if (sl_drx_cfg_gc_bc_r17_present) { + j.write_fieldname("sl-DRX-ConfigGC-BC-r17"); + sl_drx_cfg_gc_bc_r17.to_json(j); + } + if (sl_drx_cfg_uc_to_release_list_r17.size() > 0) { + j.start_array("sl-DRX-ConfigUC-ToReleaseList-r17"); + for (const auto& e1 : sl_drx_cfg_uc_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_drx_cfg_uc_to_add_mod_list_r17.size() > 0) { + j.start_array("sl-DRX-ConfigUC-ToAddModList-r17"); + for (const auto& e1 : sl_drx_cfg_uc_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); } -const char* ul_data_compress_r17_c::new_setup_s_::dictionary_r17_opts::to_string() const +// SL-FreqConfig-r16 ::= SEQUENCE +SRSASN_CODE sl_freq_cfg_r16_s::pack(bit_ref& bref) const { - static const char* names[] = {"sip-SDP", "operator"}; - return convert_enum_idx(names, 2, value, "ul_data_compress_r17_c::new_setup_s_::dictionary_r17_e_"); -} + HANDLE_CODE(bref.pack(sl_absolute_freq_point_a_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_absolute_freq_ssb_r16_present, 1)); + HANDLE_CODE(bref.pack(freq_shift7p5khz_sl_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_bwp_to_release_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_bwp_to_add_mod_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_sync_cfg_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_sync_prio_r16_present, 1)); -// CipheringAlgorithm ::= ENUMERATED -const char* ciphering_algorithm_opts::to_string() const -{ - static const char* names[] = {"nea0", "nea1", "nea2", "nea3", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "ciphering_algorithm_e"); -} -uint8_t ciphering_algorithm_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 2, 3}; - return map_enum_number(numbers, 4, value, "ciphering_algorithm_e"); -} + HANDLE_CODE(pack_integer(bref, sl_freq_id_r16, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pack_dyn_seq_of(bref, sl_scs_specific_carrier_list_r16, 1, 5)); + if (sl_absolute_freq_point_a_r16_present) { + HANDLE_CODE(pack_integer(bref, sl_absolute_freq_point_a_r16, (uint32_t)0u, (uint32_t)3279165u)); + } + if (sl_absolute_freq_ssb_r16_present) { + HANDLE_CODE(pack_integer(bref, sl_absolute_freq_ssb_r16, (uint32_t)0u, (uint32_t)3279165u)); + } + HANDLE_CODE(pack_integer(bref, value_n_r16, (int8_t)-1, (int8_t)1)); + if (sl_bwp_to_release_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_bwp_to_release_list_r16, 1, 4, integer_packer(0, 4))); + } + if (sl_bwp_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_bwp_to_add_mod_list_r16, 1, 4)); + } + if (sl_sync_cfg_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_sync_cfg_list_r16, 1, 16)); + } + if (sl_sync_prio_r16_present) { + HANDLE_CODE(sl_sync_prio_r16.pack(bref)); + } -// IntegrityProtAlgorithm ::= ENUMERATED -const char* integrity_prot_algorithm_opts::to_string() const -{ - static const char* names[] = {"nia0", "nia1", "nia2", "nia3", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "integrity_prot_algorithm_e"); + return SRSASN_SUCCESS; } -uint8_t integrity_prot_algorithm_opts::to_number() const +SRSASN_CODE sl_freq_cfg_r16_s::unpack(cbit_ref& bref) { - static const uint8_t numbers[] = {0, 1, 2, 3}; - return map_enum_number(numbers, 4, value, "integrity_prot_algorithm_e"); -} + HANDLE_CODE(bref.unpack(sl_absolute_freq_point_a_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_absolute_freq_ssb_r16_present, 1)); + HANDLE_CODE(bref.unpack(freq_shift7p5khz_sl_r16_present, 1)); + bool sl_bwp_to_release_list_r16_present; + HANDLE_CODE(bref.unpack(sl_bwp_to_release_list_r16_present, 1)); + bool sl_bwp_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(sl_bwp_to_add_mod_list_r16_present, 1)); + bool sl_sync_cfg_list_r16_present; + HANDLE_CODE(bref.unpack(sl_sync_cfg_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_sync_prio_r16_present, 1)); -// PDCP-Config ::= SEQUENCE -SRSASN_CODE pdcp_cfg_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)); - - 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)); - } + HANDLE_CODE(unpack_integer(sl_freq_id_r16, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(unpack_dyn_seq_of(sl_scs_specific_carrier_list_r16, bref, 1, 5)); + if (sl_absolute_freq_point_a_r16_present) { + HANDLE_CODE(unpack_integer(sl_absolute_freq_point_a_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); } - if (t_reordering_present) { - HANDLE_CODE(t_reordering.pack(bref)); + if (sl_absolute_freq_ssb_r16_present) { + HANDLE_CODE(unpack_integer(sl_absolute_freq_ssb_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= ciphering_disabled_present; - group_flags[1] |= discard_timer_ext_r16.is_present(); - group_flags[1] |= more_than_two_rlc_drb_r16.is_present(); - group_flags[1] |= ethernet_hdr_compress_r16.is_present(); - group_flags[2] |= survival_time_state_support_r17_present; - group_flags[2] |= ul_data_compress_r17.is_present(); - group_flags[2] |= discard_timer_ext2_r17.is_present(); - group_flags[2] |= init_rx_deliv_r17_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)); - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(discard_timer_ext_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(more_than_two_rlc_drb_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(ethernet_hdr_compress_r16.is_present(), 1)); - if (discard_timer_ext_r16.is_present()) { - HANDLE_CODE(discard_timer_ext_r16->pack(bref)); - } - if (more_than_two_rlc_drb_r16.is_present()) { - HANDLE_CODE(bref.pack(more_than_two_rlc_drb_r16->split_secondary_path_r16_present, 1)); - HANDLE_CODE(bref.pack(more_than_two_rlc_drb_r16->dupl_state_r16_present, 1)); - if (more_than_two_rlc_drb_r16->split_secondary_path_r16_present) { - HANDLE_CODE( - pack_integer(bref, more_than_two_rlc_drb_r16->split_secondary_path_r16, (uint8_t)1u, (uint8_t)32u)); - } - if (more_than_two_rlc_drb_r16->dupl_state_r16_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, - more_than_two_rlc_drb_r16->dupl_state_r16, - more_than_two_rlc_drb_r16->dupl_state_r16.size(), - BitPacker(1))); - } - } - if (ethernet_hdr_compress_r16.is_present()) { - HANDLE_CODE(ethernet_hdr_compress_r16->pack(bref)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(survival_time_state_support_r17_present, 1)); - HANDLE_CODE(bref.pack(ul_data_compress_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(discard_timer_ext2_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(init_rx_deliv_r17_present, 1)); - if (ul_data_compress_r17.is_present()) { - HANDLE_CODE(ul_data_compress_r17->pack(bref)); - } - if (discard_timer_ext2_r17.is_present()) { - HANDLE_CODE(discard_timer_ext2_r17->pack(bref)); - } - if (init_rx_deliv_r17_present) { - HANDLE_CODE(init_rx_deliv_r17.pack(bref)); - } - } + HANDLE_CODE(unpack_integer(value_n_r16, bref, (int8_t)-1, (int8_t)1)); + if (sl_bwp_to_release_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_bwp_to_release_list_r16, bref, 1, 4, integer_packer(0, 4))); } - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcp_cfg_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)); - - 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 (sl_bwp_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_bwp_to_add_mod_list_r16, bref, 1, 4)); } - if (t_reordering_present) { - HANDLE_CODE(t_reordering.unpack(bref)); + if (sl_sync_cfg_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_sync_cfg_list_r16, bref, 1, 16)); } - - if (ext) { - 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(ciphering_disabled_present, 1)); - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(discard_timer_ext_r16, bref); - unpack_presence_flag(more_than_two_rlc_drb_r16, bref); - unpack_presence_flag(ethernet_hdr_compress_r16, bref); - if (discard_timer_ext_r16.is_present()) { - HANDLE_CODE(discard_timer_ext_r16->unpack(bref)); - } - if (more_than_two_rlc_drb_r16.is_present()) { - HANDLE_CODE(bref.unpack(more_than_two_rlc_drb_r16->split_secondary_path_r16_present, 1)); - HANDLE_CODE(bref.unpack(more_than_two_rlc_drb_r16->dupl_state_r16_present, 1)); - if (more_than_two_rlc_drb_r16->split_secondary_path_r16_present) { - HANDLE_CODE( - unpack_integer(more_than_two_rlc_drb_r16->split_secondary_path_r16, bref, (uint8_t)1u, (uint8_t)32u)); - } - if (more_than_two_rlc_drb_r16->dupl_state_r16_present) { - HANDLE_CODE(unpack_fixed_seq_of(more_than_two_rlc_drb_r16->dupl_state_r16, - bref, - more_than_two_rlc_drb_r16->dupl_state_r16.size(), - BitPacker(1))); - } - } - if (ethernet_hdr_compress_r16.is_present()) { - HANDLE_CODE(ethernet_hdr_compress_r16->unpack(bref)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(survival_time_state_support_r17_present, 1)); - unpack_presence_flag(ul_data_compress_r17, bref); - unpack_presence_flag(discard_timer_ext2_r17, bref); - HANDLE_CODE(bref.unpack(init_rx_deliv_r17_present, 1)); - if (ul_data_compress_r17.is_present()) { - HANDLE_CODE(ul_data_compress_r17->unpack(bref)); - } - if (discard_timer_ext2_r17.is_present()) { - HANDLE_CODE(discard_timer_ext2_r17->unpack(bref)); - } - if (init_rx_deliv_r17_present) { - HANDLE_CODE(init_rx_deliv_r17.unpack(bref)); - } - } + if (sl_sync_prio_r16_present) { + HANDLE_CODE(sl_sync_prio_r16.unpack(bref)); } + return SRSASN_SUCCESS; } -void pdcp_cfg_s::to_json(json_writer& j) const +void sl_freq_cfg_r16_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(); + j.write_int("sl-Freq-Id-r16", sl_freq_id_r16); + j.start_array("sl-SCS-SpecificCarrierList-r16"); + for (const auto& e1 : sl_scs_specific_carrier_list_r16) { + e1.to_json(j); } - 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(); + j.end_array(); + if (sl_absolute_freq_point_a_r16_present) { + j.write_int("sl-AbsoluteFrequencyPointA-r16", sl_absolute_freq_point_a_r16); } - if (t_reordering_present) { - j.write_str("t-Reordering", t_reordering.to_string()); + if (sl_absolute_freq_ssb_r16_present) { + j.write_int("sl-AbsoluteFrequencySSB-r16", sl_absolute_freq_ssb_r16); } - if (ext) { - if (ciphering_disabled_present) { - j.write_str("cipheringDisabled", "true"); - } - if (discard_timer_ext_r16.is_present()) { - j.write_fieldname("discardTimerExt-r16"); - discard_timer_ext_r16->to_json(j); - } - if (more_than_two_rlc_drb_r16.is_present()) { - j.write_fieldname("moreThanTwoRLC-DRB-r16"); - j.start_obj(); - if (more_than_two_rlc_drb_r16->split_secondary_path_r16_present) { - j.write_int("splitSecondaryPath-r16", more_than_two_rlc_drb_r16->split_secondary_path_r16); - } - if (more_than_two_rlc_drb_r16->dupl_state_r16_present) { - j.start_array("duplicationState-r16"); - for (const auto& e1 : more_than_two_rlc_drb_r16->dupl_state_r16) { - j.write_bool(e1); - } - j.end_array(); - } - j.end_obj(); - } - if (ethernet_hdr_compress_r16.is_present()) { - j.write_fieldname("ethernetHeaderCompression-r16"); - ethernet_hdr_compress_r16->to_json(j); - } - if (survival_time_state_support_r17_present) { - j.write_str("survivalTimeStateSupport-r17", "true"); - } - if (ul_data_compress_r17.is_present()) { - j.write_fieldname("uplinkDataCompression-r17"); - ul_data_compress_r17->to_json(j); + if (freq_shift7p5khz_sl_r16_present) { + j.write_str("frequencyShift7p5khzSL-r16", "true"); + } + j.write_int("valueN-r16", value_n_r16); + if (sl_bwp_to_release_list_r16.size() > 0) { + j.start_array("sl-BWP-ToReleaseList-r16"); + for (const auto& e1 : sl_bwp_to_release_list_r16) { + j.write_int(e1); } - if (discard_timer_ext2_r17.is_present()) { - j.write_fieldname("discardTimerExt2-r17"); - discard_timer_ext2_r17->to_json(j); + j.end_array(); + } + if (sl_bwp_to_add_mod_list_r16.size() > 0) { + j.start_array("sl-BWP-ToAddModList-r16"); + for (const auto& e1 : sl_bwp_to_add_mod_list_r16) { + e1.to_json(j); } - if (init_rx_deliv_r17_present) { - j.write_str("initialRX-DELIV-r17", init_rx_deliv_r17.to_string()); + j.end_array(); + } + if (sl_sync_cfg_list_r16.size() > 0) { + j.start_array("sl-SyncConfigList-r16"); + for (const auto& e1 : sl_sync_cfg_list_r16) { + e1.to_json(j); } + j.end_array(); + } + if (sl_sync_prio_r16_present) { + j.write_str("sl-SyncPriority-r16", sl_sync_prio_r16.to_string()); } j.end_obj(); } -const char* pdcp_cfg_s::drb_s_::discard_timer_opts::to_string() const -{ - static const char* names[] = {"ms10", - "ms20", - "ms30", - "ms40", - "ms50", - "ms60", - "ms75", - "ms100", - "ms150", - "ms200", - "ms250", - "ms300", - "ms500", - "ms750", - "ms1500", - "infinity"}; - return convert_enum_idx(names, 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 numbers[] = {10, 20, 30, 40, 50, 60, 75, 100, 150, 200, 250, 300, 500, 750, 1500, -1}; - return map_enum_number(numbers, 16, value, "pdcp_cfg_s::drb_s_::discard_timer_e_"); -} - -const char* pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_opts::to_string() const -{ - static const char* names[] = {"len12bits", "len18bits"}; - return convert_enum_idx(names, 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 +const char* sl_freq_cfg_r16_s::sl_sync_prio_r16_opts::to_string() const { - static const uint8_t numbers[] = {12, 18}; - return map_enum_number(numbers, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_e_"); + static const char* names[] = {"gnss", "gnbEnb"}; + return convert_enum_idx(names, 2, value, "sl_freq_cfg_r16_s::sl_sync_prio_r16_e_"); } -const char* pdcp_cfg_s::drb_s_::pdcp_sn_size_dl_opts::to_string() const -{ - static const char* names[] = {"len12bits", "len18bits"}; - return convert_enum_idx(names, 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 +// SL-MappingToAddMod-r17 ::= SEQUENCE +SRSASN_CODE sl_map_to_add_mod_r17_s::pack(bit_ref& bref) const { - static const uint8_t numbers[] = {12, 18}; - return map_enum_number(numbers, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_dl_e_"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_egress_rlc_ch_uu_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_egress_rlc_ch_pc5_r17_present, 1)); -void pdcp_cfg_s::drb_s_::hdr_compress_c_::destroy_() -{ - switch (type_) { - case types::rohc: - c.destroy(); - break; - case types::ul_only_rohc: - c.destroy(); - break; - default: - break; - } -} -void pdcp_cfg_s::drb_s_::hdr_compress_c_::set(types::options e) -{ - 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_"); + HANDLE_CODE(sl_remote_ue_rb_id_r17.pack(bref)); + if (sl_egress_rlc_ch_uu_r17_present) { + HANDLE_CODE(pack_integer(bref, sl_egress_rlc_ch_uu_r17, (uint8_t)1u, (uint8_t)32u)); } -} -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_"); + if (sl_egress_rlc_ch_pc5_r17_present) { + HANDLE_CODE(pack_integer(bref, sl_egress_rlc_ch_pc5_r17, (uint16_t)1u, (uint16_t)512u)); } + + return SRSASN_SUCCESS; } -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) +SRSASN_CODE sl_map_to_add_mod_r17_s::unpack(cbit_ref& bref) { - if (this == &other) { - return *this; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_egress_rlc_ch_uu_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_egress_rlc_ch_pc5_r17_present, 1)); + + HANDLE_CODE(sl_remote_ue_rb_id_r17.unpack(bref)); + if (sl_egress_rlc_ch_uu_r17_present) { + HANDLE_CODE(unpack_integer(sl_egress_rlc_ch_uu_r17, bref, (uint8_t)1u, (uint8_t)32u)); } - 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_"); + if (sl_egress_rlc_ch_pc5_r17_present) { + HANDLE_CODE(unpack_integer(sl_egress_rlc_ch_pc5_r17, bref, (uint16_t)1u, (uint16_t)512u)); } - return *this; -} -void pdcp_cfg_s::drb_s_::hdr_compress_c_::set_not_used() -{ - set(types::not_used); -} -pdcp_cfg_s::drb_s_::hdr_compress_c_::rohc_s_& pdcp_cfg_s::drb_s_::hdr_compress_c_::set_rohc() -{ - set(types::rohc); - return c.get(); -} -pdcp_cfg_s::drb_s_::hdr_compress_c_::ul_only_rohc_s_& pdcp_cfg_s::drb_s_::hdr_compress_c_::set_ul_only_rohc() -{ - set(types::ul_only_rohc); - return c.get(); + return SRSASN_SUCCESS; } -void pdcp_cfg_s::drb_s_::hdr_compress_c_::to_json(json_writer& j) const +void sl_map_to_add_mod_r17_s::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_c_id_present) { - j.write_int("maxCID", c.get().max_c_id); - } - 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_c_id_present) { - j.write_int("maxCID", c.get().max_c_id); - } - 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.write_fieldname("sl-RemoteUE-RB-Identity-r17"); + sl_remote_ue_rb_id_r17.to_json(j); + if (sl_egress_rlc_ch_uu_r17_present) { + j.write_int("sl-EgressRLC-ChannelUu-r17", sl_egress_rlc_ch_uu_r17); + } + if (sl_egress_rlc_ch_pc5_r17_present) { + j.write_int("sl-EgressRLC-ChannelPC5-r17", sl_egress_rlc_ch_pc5_r17); } j.end_obj(); } -SRSASN_CODE pdcp_cfg_s::drb_s_::hdr_compress_c_::pack(bit_ref& bref) const + +// SL-MeasConfig-r16 ::= SEQUENCE +SRSASN_CODE sl_meas_cfg_r16_s::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_c_id_present, 1)); - HANDLE_CODE(bref.pack(c.get().drb_continue_rohc_present, 1)); - if (c.get().max_c_id_present) { - HANDLE_CODE(pack_integer(bref, c.get().max_c_id, (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_c_id_present, 1)); - HANDLE_CODE(bref.pack(c.get().drb_continue_rohc_present, 1)); - if (c.get().max_c_id_present) { - HANDLE_CODE(pack_integer(bref, c.get().max_c_id, (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; + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_meas_obj_to_rem_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_meas_obj_to_add_mod_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_report_cfg_to_rem_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_report_cfg_to_add_mod_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_meas_id_to_rem_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_meas_id_to_add_mod_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_quant_cfg_r16_present, 1)); + + if (sl_meas_obj_to_rem_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_meas_obj_to_rem_list_r16, 1, 64, integer_packer(1, 64))); + } + if (sl_meas_obj_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_meas_obj_to_add_mod_list_r16, 1, 64)); + } + if (sl_report_cfg_to_rem_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_report_cfg_to_rem_list_r16, 1, 64, integer_packer(1, 64))); + } + if (sl_report_cfg_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_report_cfg_to_add_mod_list_r16, 1, 64)); + } + if (sl_meas_id_to_rem_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_meas_id_to_rem_list_r16, 1, 64, integer_packer(1, 64))); + } + if (sl_meas_id_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_meas_id_to_add_mod_list_r16, 1, 64)); + } + if (sl_quant_cfg_r16_present) { + HANDLE_CODE(sl_quant_cfg_r16.pack(bref)); } + return SRSASN_SUCCESS; } -SRSASN_CODE pdcp_cfg_s::drb_s_::hdr_compress_c_::unpack(cbit_ref& bref) +SRSASN_CODE sl_meas_cfg_r16_s::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_c_id_present, 1)); - HANDLE_CODE(bref.unpack(c.get().drb_continue_rohc_present, 1)); - if (c.get().max_c_id_present) { - HANDLE_CODE(unpack_integer(c.get().max_c_id, 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_c_id_present, 1)); - HANDLE_CODE(bref.unpack(c.get().drb_continue_rohc_present, 1)); - if (c.get().max_c_id_present) { - HANDLE_CODE(unpack_integer(c.get().max_c_id, 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; + bref.unpack(ext, 1); + bool sl_meas_obj_to_rem_list_r16_present; + HANDLE_CODE(bref.unpack(sl_meas_obj_to_rem_list_r16_present, 1)); + bool sl_meas_obj_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(sl_meas_obj_to_add_mod_list_r16_present, 1)); + bool sl_report_cfg_to_rem_list_r16_present; + HANDLE_CODE(bref.unpack(sl_report_cfg_to_rem_list_r16_present, 1)); + bool sl_report_cfg_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(sl_report_cfg_to_add_mod_list_r16_present, 1)); + bool sl_meas_id_to_rem_list_r16_present; + HANDLE_CODE(bref.unpack(sl_meas_id_to_rem_list_r16_present, 1)); + bool sl_meas_id_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(sl_meas_id_to_add_mod_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_quant_cfg_r16_present, 1)); + + if (sl_meas_obj_to_rem_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_meas_obj_to_rem_list_r16, bref, 1, 64, integer_packer(1, 64))); + } + if (sl_meas_obj_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_meas_obj_to_add_mod_list_r16, bref, 1, 64)); + } + if (sl_report_cfg_to_rem_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_report_cfg_to_rem_list_r16, bref, 1, 64, integer_packer(1, 64))); + } + if (sl_report_cfg_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_report_cfg_to_add_mod_list_r16, bref, 1, 64)); + } + if (sl_meas_id_to_rem_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_meas_id_to_rem_list_r16, bref, 1, 64, integer_packer(1, 64))); + } + if (sl_meas_id_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_meas_id_to_add_mod_list_r16, bref, 1, 64)); + } + if (sl_quant_cfg_r16_present) { + HANDLE_CODE(sl_quant_cfg_r16.unpack(bref)); } - return SRSASN_SUCCESS; -} -const char* pdcp_cfg_s::t_reordering_opts::to_string() const -{ - static const char* names[] = {"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(names, 64, value, "pdcp_cfg_s::t_reordering_e_"); + return SRSASN_SUCCESS; } -uint16_t pdcp_cfg_s::t_reordering_opts::to_number() const +void sl_meas_cfg_r16_s::to_json(json_writer& j) const { - static const uint16_t numbers[] = {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(numbers, 36, value, "pdcp_cfg_s::t_reordering_e_"); + j.start_obj(); + if (sl_meas_obj_to_rem_list_r16.size() > 0) { + j.start_array("sl-MeasObjectToRemoveList-r16"); + for (const auto& e1 : sl_meas_obj_to_rem_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_meas_obj_to_add_mod_list_r16.size() > 0) { + j.start_array("sl-MeasObjectToAddModList-r16"); + for (const auto& e1 : sl_meas_obj_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_report_cfg_to_rem_list_r16.size() > 0) { + j.start_array("sl-ReportConfigToRemoveList-r16"); + for (const auto& e1 : sl_report_cfg_to_rem_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_report_cfg_to_add_mod_list_r16.size() > 0) { + j.start_array("sl-ReportConfigToAddModList-r16"); + for (const auto& e1 : sl_report_cfg_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_meas_id_to_rem_list_r16.size() > 0) { + j.start_array("sl-MeasIdToRemoveList-r16"); + for (const auto& e1 : sl_meas_id_to_rem_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_meas_id_to_add_mod_list_r16.size() > 0) { + j.start_array("sl-MeasIdToAddModList-r16"); + for (const auto& e1 : sl_meas_id_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_quant_cfg_r16_present) { + j.write_fieldname("sl-QuantityConfig-r16"); + sl_quant_cfg_r16.to_json(j); + } + j.end_obj(); } -// SDAP-Config ::= SEQUENCE -SRSASN_CODE sdap_cfg_s::pack(bit_ref& bref) const +// SL-PDCP-Config-r16 ::= SEQUENCE +SRSASN_CODE sl_pdcp_cfg_r16_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(mapped_qos_flows_to_add.size() > 0, 1)); - HANDLE_CODE(bref.pack(mapped_qos_flows_to_release.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_discard_timer_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_pdcp_sn_size_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_out_of_order_delivery_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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, mapped_qos_flows_to_add, 1, 64, integer_packer(0, 63))); + if (sl_discard_timer_r16_present) { + HANDLE_CODE(sl_discard_timer_r16.pack(bref)); } - if (mapped_qos_flows_to_release.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, mapped_qos_flows_to_release, 1, 64, integer_packer(0, 63))); + if (sl_pdcp_sn_size_r16_present) { + HANDLE_CODE(sl_pdcp_sn_size_r16.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE sdap_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_pdcp_cfg_r16_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - bool mapped_qos_flows_to_add_present; - HANDLE_CODE(bref.unpack(mapped_qos_flows_to_add_present, 1)); - bool mapped_qos_flows_to_release_present; - HANDLE_CODE(bref.unpack(mapped_qos_flows_to_release_present, 1)); + HANDLE_CODE(bref.unpack(sl_discard_timer_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_pdcp_sn_size_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_out_of_order_delivery_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 (sl_discard_timer_r16_present) { + HANDLE_CODE(sl_discard_timer_r16.unpack(bref)); } - 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))); + if (sl_pdcp_sn_size_r16_present) { + HANDLE_CODE(sl_pdcp_sn_size_r16.unpack(bref)); } return SRSASN_SUCCESS; } -void sdap_cfg_s::to_json(json_writer& j) const +void sl_pdcp_cfg_r16_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.size() > 0) { - j.start_array("mappedQoS-FlowsToAdd"); - for (const auto& e1 : mapped_qos_flows_to_add) { - j.write_int(e1); - } - j.end_array(); + if (sl_discard_timer_r16_present) { + j.write_str("sl-DiscardTimer-r16", sl_discard_timer_r16.to_string()); } - if (mapped_qos_flows_to_release.size() > 0) { - j.start_array("mappedQoS-FlowsToRelease"); - for (const auto& e1 : mapped_qos_flows_to_release) { - j.write_int(e1); - } - j.end_array(); + if (sl_pdcp_sn_size_r16_present) { + j.write_str("sl-PDCP-SN-Size-r16", sl_pdcp_sn_size_r16.to_string()); + } + if (sl_out_of_order_delivery_present) { + j.write_str("sl-OutOfOrderDelivery", "true"); } j.end_obj(); } -const char* sdap_cfg_s::sdap_hdr_dl_opts::to_string() const +const char* sl_pdcp_cfg_r16_s::sl_discard_timer_r16_opts::to_string() const { - static const char* names[] = {"present", "absent"}; - return convert_enum_idx(names, 2, value, "sdap_cfg_s::sdap_hdr_dl_e_"); + static const char* names[] = {"ms3", + "ms10", + "ms20", + "ms25", + "ms30", + "ms40", + "ms50", + "ms60", + "ms75", + "ms100", + "ms150", + "ms200", + "ms250", + "ms300", + "ms500", + "ms750", + "ms1500", + "infinity"}; + return convert_enum_idx(names, 18, value, "sl_pdcp_cfg_r16_s::sl_discard_timer_r16_e_"); +} +int16_t sl_pdcp_cfg_r16_s::sl_discard_timer_r16_opts::to_number() const +{ + static const int16_t numbers[] = {3, 10, 20, 25, 30, 40, 50, 60, 75, 100, 150, 200, 250, 300, 500, 750, 1500, -1}; + return map_enum_number(numbers, 18, value, "sl_pdcp_cfg_r16_s::sl_discard_timer_r16_e_"); } -const char* sdap_cfg_s::sdap_hdr_ul_opts::to_string() const +const char* sl_pdcp_cfg_r16_s::sl_pdcp_sn_size_r16_opts::to_string() const { - static const char* names[] = {"present", "absent"}; - return convert_enum_idx(names, 2, value, "sdap_cfg_s::sdap_hdr_ul_e_"); + static const char* names[] = {"len12bits", "len18bits"}; + return convert_enum_idx(names, 2, value, "sl_pdcp_cfg_r16_s::sl_pdcp_sn_size_r16_e_"); +} +uint8_t sl_pdcp_cfg_r16_s::sl_pdcp_sn_size_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {12, 18}; + return map_enum_number(numbers, 2, value, "sl_pdcp_cfg_r16_s::sl_pdcp_sn_size_r16_e_"); } -// SL-DRX-Config-r17 ::= SEQUENCE -SRSASN_CODE sl_drx_cfg_r17_s::pack(bit_ref& bref) const +// SL-RLC-BearerConfig-r16 ::= SEQUENCE +SRSASN_CODE sl_rlc_bearer_cfg_r16_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_drx_cfg_gc_bc_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_drx_cfg_uc_to_release_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_drx_cfg_uc_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_served_radio_bearer_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_rlc_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_mac_lc_ch_cfg_r16_present, 1)); - if (sl_drx_cfg_gc_bc_r17_present) { - HANDLE_CODE(sl_drx_cfg_gc_bc_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, sl_rlc_bearer_cfg_idx_r16, (uint16_t)1u, (uint16_t)512u)); + if (sl_served_radio_bearer_r16_present) { + HANDLE_CODE(pack_integer(bref, sl_served_radio_bearer_r16, (uint16_t)1u, (uint16_t)512u)); } - if (sl_drx_cfg_uc_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_drx_cfg_uc_to_release_list_r17, 1, 32, integer_packer(0, 31))); + if (sl_rlc_cfg_r16_present) { + HANDLE_CODE(sl_rlc_cfg_r16.pack(bref)); } - if (sl_drx_cfg_uc_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_drx_cfg_uc_to_add_mod_list_r17, 1, 32)); + if (sl_mac_lc_ch_cfg_r16_present) { + HANDLE_CODE(sl_mac_lc_ch_cfg_r16.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE sl_drx_cfg_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_rlc_bearer_cfg_r16_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_drx_cfg_gc_bc_r17_present, 1)); - bool sl_drx_cfg_uc_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(sl_drx_cfg_uc_to_release_list_r17_present, 1)); - bool sl_drx_cfg_uc_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(sl_drx_cfg_uc_to_add_mod_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_served_radio_bearer_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_rlc_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_mac_lc_ch_cfg_r16_present, 1)); - if (sl_drx_cfg_gc_bc_r17_present) { - HANDLE_CODE(sl_drx_cfg_gc_bc_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(sl_rlc_bearer_cfg_idx_r16, bref, (uint16_t)1u, (uint16_t)512u)); + if (sl_served_radio_bearer_r16_present) { + HANDLE_CODE(unpack_integer(sl_served_radio_bearer_r16, bref, (uint16_t)1u, (uint16_t)512u)); } - if (sl_drx_cfg_uc_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_drx_cfg_uc_to_release_list_r17, bref, 1, 32, integer_packer(0, 31))); + if (sl_rlc_cfg_r16_present) { + HANDLE_CODE(sl_rlc_cfg_r16.unpack(bref)); } - if (sl_drx_cfg_uc_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_drx_cfg_uc_to_add_mod_list_r17, bref, 1, 32)); + if (sl_mac_lc_ch_cfg_r16_present) { + HANDLE_CODE(sl_mac_lc_ch_cfg_r16.unpack(bref)); } return SRSASN_SUCCESS; } -void sl_drx_cfg_r17_s::to_json(json_writer& j) const +void sl_rlc_bearer_cfg_r16_s::to_json(json_writer& j) const { j.start_obj(); - if (sl_drx_cfg_gc_bc_r17_present) { - j.write_fieldname("sl-DRX-ConfigGC-BC-r17"); - sl_drx_cfg_gc_bc_r17.to_json(j); + j.write_int("sl-RLC-BearerConfigIndex-r16", sl_rlc_bearer_cfg_idx_r16); + if (sl_served_radio_bearer_r16_present) { + j.write_int("sl-ServedRadioBearer-r16", sl_served_radio_bearer_r16); } - if (sl_drx_cfg_uc_to_release_list_r17.size() > 0) { - j.start_array("sl-DRX-ConfigUC-ToReleaseList-r17"); - for (const auto& e1 : sl_drx_cfg_uc_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); + if (sl_rlc_cfg_r16_present) { + j.write_fieldname("sl-RLC-Config-r16"); + sl_rlc_cfg_r16.to_json(j); } - if (sl_drx_cfg_uc_to_add_mod_list_r17.size() > 0) { - j.start_array("sl-DRX-ConfigUC-ToAddModList-r17"); - for (const auto& e1 : sl_drx_cfg_uc_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); + if (sl_mac_lc_ch_cfg_r16_present) { + j.write_fieldname("sl-MAC-LogicalChannelConfig-r16"); + sl_mac_lc_ch_cfg_r16.to_json(j); } j.end_obj(); } -// SL-FreqConfig-r16 ::= SEQUENCE -SRSASN_CODE sl_freq_cfg_r16_s::pack(bit_ref& bref) const +// SL-RLC-ChannelConfig-r17 ::= SEQUENCE +SRSASN_CODE sl_rlc_ch_cfg_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(sl_absolute_freq_point_a_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_absolute_freq_ssb_r16_present, 1)); - HANDLE_CODE(bref.pack(freq_shift7p5khz_sl_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_bwp_to_release_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_bwp_to_add_mod_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_sync_cfg_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_sync_prio_r16_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_rlc_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_mac_lc_ch_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_packet_delay_budget_r17_present, 1)); - HANDLE_CODE(pack_integer(bref, sl_freq_id_r16, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(pack_dyn_seq_of(bref, sl_scs_specific_carrier_list_r16, 1, 5)); - if (sl_absolute_freq_point_a_r16_present) { - HANDLE_CODE(pack_integer(bref, sl_absolute_freq_point_a_r16, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(pack_integer(bref, sl_rlc_ch_id_r17, (uint16_t)1u, (uint16_t)512u)); + if (sl_rlc_cfg_r17_present) { + HANDLE_CODE(sl_rlc_cfg_r17.pack(bref)); } - if (sl_absolute_freq_ssb_r16_present) { - HANDLE_CODE(pack_integer(bref, sl_absolute_freq_ssb_r16, (uint32_t)0u, (uint32_t)3279165u)); + if (sl_mac_lc_ch_cfg_r17_present) { + HANDLE_CODE(sl_mac_lc_ch_cfg_r17.pack(bref)); } - HANDLE_CODE(pack_integer(bref, value_n_r16, (int8_t)-1, (int8_t)1)); - if (sl_bwp_to_release_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_bwp_to_release_list_r16, 1, 4, integer_packer(0, 4))); + if (sl_packet_delay_budget_r17_present) { + HANDLE_CODE(pack_integer(bref, sl_packet_delay_budget_r17, (uint16_t)0u, (uint16_t)1023u)); } - if (sl_bwp_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_bwp_to_add_mod_list_r16, 1, 4)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_rlc_ch_cfg_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_rlc_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_mac_lc_ch_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_packet_delay_budget_r17_present, 1)); + + HANDLE_CODE(unpack_integer(sl_rlc_ch_id_r17, bref, (uint16_t)1u, (uint16_t)512u)); + if (sl_rlc_cfg_r17_present) { + HANDLE_CODE(sl_rlc_cfg_r17.unpack(bref)); } - if (sl_sync_cfg_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_sync_cfg_list_r16, 1, 16)); + if (sl_mac_lc_ch_cfg_r17_present) { + HANDLE_CODE(sl_mac_lc_ch_cfg_r17.unpack(bref)); } - if (sl_sync_prio_r16_present) { - HANDLE_CODE(sl_sync_prio_r16.pack(bref)); + if (sl_packet_delay_budget_r17_present) { + HANDLE_CODE(unpack_integer(sl_packet_delay_budget_r17, bref, (uint16_t)0u, (uint16_t)1023u)); } return SRSASN_SUCCESS; } -SRSASN_CODE sl_freq_cfg_r16_s::unpack(cbit_ref& bref) +void sl_rlc_ch_cfg_r17_s::to_json(json_writer& j) const { - HANDLE_CODE(bref.unpack(sl_absolute_freq_point_a_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_absolute_freq_ssb_r16_present, 1)); - HANDLE_CODE(bref.unpack(freq_shift7p5khz_sl_r16_present, 1)); - bool sl_bwp_to_release_list_r16_present; - HANDLE_CODE(bref.unpack(sl_bwp_to_release_list_r16_present, 1)); - bool sl_bwp_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(sl_bwp_to_add_mod_list_r16_present, 1)); - bool sl_sync_cfg_list_r16_present; - HANDLE_CODE(bref.unpack(sl_sync_cfg_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_sync_prio_r16_present, 1)); - - HANDLE_CODE(unpack_integer(sl_freq_id_r16, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(unpack_dyn_seq_of(sl_scs_specific_carrier_list_r16, bref, 1, 5)); - if (sl_absolute_freq_point_a_r16_present) { - HANDLE_CODE(unpack_integer(sl_absolute_freq_point_a_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + j.start_obj(); + j.write_int("sl-RLC-ChannelID-r17", sl_rlc_ch_id_r17); + if (sl_rlc_cfg_r17_present) { + j.write_fieldname("sl-RLC-Config-r17"); + sl_rlc_cfg_r17.to_json(j); } - if (sl_absolute_freq_ssb_r16_present) { - HANDLE_CODE(unpack_integer(sl_absolute_freq_ssb_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + if (sl_mac_lc_ch_cfg_r17_present) { + j.write_fieldname("sl-MAC-LogicalChannelConfig-r17"); + sl_mac_lc_ch_cfg_r17.to_json(j); } - HANDLE_CODE(unpack_integer(value_n_r16, bref, (int8_t)-1, (int8_t)1)); - if (sl_bwp_to_release_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_bwp_to_release_list_r16, bref, 1, 4, integer_packer(0, 4))); + if (sl_packet_delay_budget_r17_present) { + j.write_int("sl-PacketDelayBudget-r17", sl_packet_delay_budget_r17); } - if (sl_bwp_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_bwp_to_add_mod_list_r16, bref, 1, 4)); + j.end_obj(); +} + +// SL-RelayUE-Config-r17 ::= SEQUENCE +SRSASN_CODE sl_relay_ue_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(thresh_high_relay_r17_present, 1)); + HANDLE_CODE(bref.pack(thresh_low_relay_r17_present, 1)); + HANDLE_CODE(bref.pack(hyst_max_relay_r17_present, 1)); + HANDLE_CODE(bref.pack(hyst_min_relay_r17_present, 1)); + + if (thresh_high_relay_r17_present) { + HANDLE_CODE(pack_integer(bref, thresh_high_relay_r17, (uint8_t)0u, (uint8_t)127u)); } - if (sl_sync_cfg_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_sync_cfg_list_r16, bref, 1, 16)); + if (thresh_low_relay_r17_present) { + HANDLE_CODE(pack_integer(bref, thresh_low_relay_r17, (uint8_t)0u, (uint8_t)127u)); } - if (sl_sync_prio_r16_present) { - HANDLE_CODE(sl_sync_prio_r16.unpack(bref)); + if (hyst_max_relay_r17_present) { + HANDLE_CODE(pack_integer(bref, hyst_max_relay_r17, (uint8_t)0u, (uint8_t)30u)); + } + if (hyst_min_relay_r17_present) { + HANDLE_CODE(pack_integer(bref, hyst_min_relay_r17, (uint8_t)0u, (uint8_t)30u)); } return SRSASN_SUCCESS; } -void sl_freq_cfg_r16_s::to_json(json_writer& j) const +SRSASN_CODE sl_relay_ue_cfg_r17_s::unpack(cbit_ref& bref) { - j.start_obj(); - j.write_int("sl-Freq-Id-r16", sl_freq_id_r16); - j.start_array("sl-SCS-SpecificCarrierList-r16"); - for (const auto& e1 : sl_scs_specific_carrier_list_r16) { - e1.to_json(j); + HANDLE_CODE(bref.unpack(thresh_high_relay_r17_present, 1)); + HANDLE_CODE(bref.unpack(thresh_low_relay_r17_present, 1)); + HANDLE_CODE(bref.unpack(hyst_max_relay_r17_present, 1)); + HANDLE_CODE(bref.unpack(hyst_min_relay_r17_present, 1)); + + if (thresh_high_relay_r17_present) { + HANDLE_CODE(unpack_integer(thresh_high_relay_r17, bref, (uint8_t)0u, (uint8_t)127u)); } - j.end_array(); - if (sl_absolute_freq_point_a_r16_present) { - j.write_int("sl-AbsoluteFrequencyPointA-r16", sl_absolute_freq_point_a_r16); + if (thresh_low_relay_r17_present) { + HANDLE_CODE(unpack_integer(thresh_low_relay_r17, bref, (uint8_t)0u, (uint8_t)127u)); } - if (sl_absolute_freq_ssb_r16_present) { - j.write_int("sl-AbsoluteFrequencySSB-r16", sl_absolute_freq_ssb_r16); + if (hyst_max_relay_r17_present) { + HANDLE_CODE(unpack_integer(hyst_max_relay_r17, bref, (uint8_t)0u, (uint8_t)30u)); } - if (freq_shift7p5khz_sl_r16_present) { - j.write_str("frequencyShift7p5khzSL-r16", "true"); + if (hyst_min_relay_r17_present) { + HANDLE_CODE(unpack_integer(hyst_min_relay_r17, bref, (uint8_t)0u, (uint8_t)30u)); } - j.write_int("valueN-r16", value_n_r16); - if (sl_bwp_to_release_list_r16.size() > 0) { - j.start_array("sl-BWP-ToReleaseList-r16"); - for (const auto& e1 : sl_bwp_to_release_list_r16) { - j.write_int(e1); - } - j.end_array(); + + return SRSASN_SUCCESS; +} +void sl_relay_ue_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (thresh_high_relay_r17_present) { + j.write_int("threshHighRelay-r17", thresh_high_relay_r17); } - if (sl_bwp_to_add_mod_list_r16.size() > 0) { - j.start_array("sl-BWP-ToAddModList-r16"); - for (const auto& e1 : sl_bwp_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); + if (thresh_low_relay_r17_present) { + j.write_int("threshLowRelay-r17", thresh_low_relay_r17); } - if (sl_sync_cfg_list_r16.size() > 0) { - j.start_array("sl-SyncConfigList-r16"); - for (const auto& e1 : sl_sync_cfg_list_r16) { - e1.to_json(j); - } - j.end_array(); + if (hyst_max_relay_r17_present) { + j.write_int("hystMaxRelay-r17", hyst_max_relay_r17); } - if (sl_sync_prio_r16_present) { - j.write_str("sl-SyncPriority-r16", sl_sync_prio_r16.to_string()); + if (hyst_min_relay_r17_present) { + j.write_int("hystMinRelay-r17", hyst_min_relay_r17); } j.end_obj(); } -const char* sl_freq_cfg_r16_s::sl_sync_prio_r16_opts::to_string() const -{ - static const char* names[] = {"gnss", "gnbEnb"}; - return convert_enum_idx(names, 2, value, "sl_freq_cfg_r16_s::sl_sync_prio_r16_e_"); -} - -// SL-MappingToAddMod-r17 ::= SEQUENCE -SRSASN_CODE sl_map_to_add_mod_r17_s::pack(bit_ref& bref) const +// SL-RemoteUE-Config-r17 ::= SEQUENCE +SRSASN_CODE sl_remote_ue_cfg_r17_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_egress_rlc_ch_uu_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_egress_rlc_ch_pc5_r17_present, 1)); + HANDLE_CODE(bref.pack(thresh_high_remote_r17_present, 1)); + HANDLE_CODE(bref.pack(hyst_max_remote_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_resel_cfg_r17_present, 1)); - HANDLE_CODE(sl_remote_ue_rb_id_r17.pack(bref)); - if (sl_egress_rlc_ch_uu_r17_present) { - HANDLE_CODE(pack_integer(bref, sl_egress_rlc_ch_uu_r17, (uint8_t)1u, (uint8_t)32u)); + if (thresh_high_remote_r17_present) { + HANDLE_CODE(pack_integer(bref, thresh_high_remote_r17, (uint8_t)0u, (uint8_t)127u)); } - if (sl_egress_rlc_ch_pc5_r17_present) { - HANDLE_CODE(pack_integer(bref, sl_egress_rlc_ch_pc5_r17, (uint16_t)1u, (uint16_t)512u)); + if (hyst_max_remote_r17_present) { + HANDLE_CODE(pack_integer(bref, hyst_max_remote_r17, (uint8_t)0u, (uint8_t)30u)); + } + if (sl_resel_cfg_r17_present) { + HANDLE_CODE(sl_resel_cfg_r17.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE sl_map_to_add_mod_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_remote_ue_cfg_r17_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_egress_rlc_ch_uu_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_egress_rlc_ch_pc5_r17_present, 1)); + HANDLE_CODE(bref.unpack(thresh_high_remote_r17_present, 1)); + HANDLE_CODE(bref.unpack(hyst_max_remote_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_resel_cfg_r17_present, 1)); - HANDLE_CODE(sl_remote_ue_rb_id_r17.unpack(bref)); - if (sl_egress_rlc_ch_uu_r17_present) { - HANDLE_CODE(unpack_integer(sl_egress_rlc_ch_uu_r17, bref, (uint8_t)1u, (uint8_t)32u)); + if (thresh_high_remote_r17_present) { + HANDLE_CODE(unpack_integer(thresh_high_remote_r17, bref, (uint8_t)0u, (uint8_t)127u)); } - if (sl_egress_rlc_ch_pc5_r17_present) { - HANDLE_CODE(unpack_integer(sl_egress_rlc_ch_pc5_r17, bref, (uint16_t)1u, (uint16_t)512u)); + if (hyst_max_remote_r17_present) { + HANDLE_CODE(unpack_integer(hyst_max_remote_r17, bref, (uint8_t)0u, (uint8_t)30u)); + } + if (sl_resel_cfg_r17_present) { + HANDLE_CODE(sl_resel_cfg_r17.unpack(bref)); } return SRSASN_SUCCESS; } -void sl_map_to_add_mod_r17_s::to_json(json_writer& j) const +void sl_remote_ue_cfg_r17_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("sl-RemoteUE-RB-Identity-r17"); - sl_remote_ue_rb_id_r17.to_json(j); - if (sl_egress_rlc_ch_uu_r17_present) { - j.write_int("sl-EgressRLC-ChannelUu-r17", sl_egress_rlc_ch_uu_r17); + if (thresh_high_remote_r17_present) { + j.write_int("threshHighRemote-r17", thresh_high_remote_r17); } - if (sl_egress_rlc_ch_pc5_r17_present) { - j.write_int("sl-EgressRLC-ChannelPC5-r17", sl_egress_rlc_ch_pc5_r17); + if (hyst_max_remote_r17_present) { + j.write_int("hystMaxRemote-r17", hyst_max_remote_r17); + } + if (sl_resel_cfg_r17_present) { + j.write_fieldname("sl-ReselectionConfig-r17"); + sl_resel_cfg_r17.to_json(j); } j.end_obj(); } -// SL-MeasConfig-r16 ::= SEQUENCE -SRSASN_CODE sl_meas_cfg_r16_s::pack(bit_ref& bref) const -{ +// SL-SDAP-Config-r16 ::= SEQUENCE +SRSASN_CODE sl_sdap_cfg_r16_s::pack(bit_ref& bref) const +{ bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_meas_obj_to_rem_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_meas_obj_to_add_mod_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_report_cfg_to_rem_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_report_cfg_to_add_mod_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_meas_id_to_rem_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_meas_id_to_add_mod_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_quant_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_mapped_qos_flows_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_cast_type_r16_present, 1)); - if (sl_meas_obj_to_rem_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_meas_obj_to_rem_list_r16, 1, 64, integer_packer(1, 64))); - } - if (sl_meas_obj_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_meas_obj_to_add_mod_list_r16, 1, 64)); - } - if (sl_report_cfg_to_rem_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_report_cfg_to_rem_list_r16, 1, 64, integer_packer(1, 64))); - } - if (sl_report_cfg_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_report_cfg_to_add_mod_list_r16, 1, 64)); - } - if (sl_meas_id_to_rem_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_meas_id_to_rem_list_r16, 1, 64, integer_packer(1, 64))); - } - if (sl_meas_id_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_meas_id_to_add_mod_list_r16, 1, 64)); + HANDLE_CODE(sl_sdap_hdr_r16.pack(bref)); + HANDLE_CODE(bref.pack(sl_default_rb_r16, 1)); + if (sl_mapped_qos_flows_r16_present) { + HANDLE_CODE(sl_mapped_qos_flows_r16.pack(bref)); } - if (sl_quant_cfg_r16_present) { - HANDLE_CODE(sl_quant_cfg_r16.pack(bref)); + if (sl_cast_type_r16_present) { + HANDLE_CODE(sl_cast_type_r16.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE sl_meas_cfg_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_sdap_cfg_r16_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - bool sl_meas_obj_to_rem_list_r16_present; - HANDLE_CODE(bref.unpack(sl_meas_obj_to_rem_list_r16_present, 1)); - bool sl_meas_obj_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(sl_meas_obj_to_add_mod_list_r16_present, 1)); - bool sl_report_cfg_to_rem_list_r16_present; - HANDLE_CODE(bref.unpack(sl_report_cfg_to_rem_list_r16_present, 1)); - bool sl_report_cfg_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(sl_report_cfg_to_add_mod_list_r16_present, 1)); - bool sl_meas_id_to_rem_list_r16_present; - HANDLE_CODE(bref.unpack(sl_meas_id_to_rem_list_r16_present, 1)); - bool sl_meas_id_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(sl_meas_id_to_add_mod_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_quant_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_mapped_qos_flows_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_cast_type_r16_present, 1)); - if (sl_meas_obj_to_rem_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_meas_obj_to_rem_list_r16, bref, 1, 64, integer_packer(1, 64))); - } - if (sl_meas_obj_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_meas_obj_to_add_mod_list_r16, bref, 1, 64)); - } - if (sl_report_cfg_to_rem_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_report_cfg_to_rem_list_r16, bref, 1, 64, integer_packer(1, 64))); - } - if (sl_report_cfg_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_report_cfg_to_add_mod_list_r16, bref, 1, 64)); - } - if (sl_meas_id_to_rem_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_meas_id_to_rem_list_r16, bref, 1, 64, integer_packer(1, 64))); - } - if (sl_meas_id_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_meas_id_to_add_mod_list_r16, bref, 1, 64)); + HANDLE_CODE(sl_sdap_hdr_r16.unpack(bref)); + HANDLE_CODE(bref.unpack(sl_default_rb_r16, 1)); + if (sl_mapped_qos_flows_r16_present) { + HANDLE_CODE(sl_mapped_qos_flows_r16.unpack(bref)); } - if (sl_quant_cfg_r16_present) { - HANDLE_CODE(sl_quant_cfg_r16.unpack(bref)); + if (sl_cast_type_r16_present) { + HANDLE_CODE(sl_cast_type_r16.unpack(bref)); } return SRSASN_SUCCESS; } -void sl_meas_cfg_r16_s::to_json(json_writer& j) const +void sl_sdap_cfg_r16_s::to_json(json_writer& j) const { j.start_obj(); - if (sl_meas_obj_to_rem_list_r16.size() > 0) { - j.start_array("sl-MeasObjectToRemoveList-r16"); - for (const auto& e1 : sl_meas_obj_to_rem_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_meas_obj_to_add_mod_list_r16.size() > 0) { - j.start_array("sl-MeasObjectToAddModList-r16"); - for (const auto& e1 : sl_meas_obj_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_report_cfg_to_rem_list_r16.size() > 0) { - j.start_array("sl-ReportConfigToRemoveList-r16"); - for (const auto& e1 : sl_report_cfg_to_rem_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_report_cfg_to_add_mod_list_r16.size() > 0) { - j.start_array("sl-ReportConfigToAddModList-r16"); - for (const auto& e1 : sl_report_cfg_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_meas_id_to_rem_list_r16.size() > 0) { - j.start_array("sl-MeasIdToRemoveList-r16"); - for (const auto& e1 : sl_meas_id_to_rem_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_meas_id_to_add_mod_list_r16.size() > 0) { - j.start_array("sl-MeasIdToAddModList-r16"); - for (const auto& e1 : sl_meas_id_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); + j.write_str("sl-SDAP-Header-r16", sl_sdap_hdr_r16.to_string()); + j.write_bool("sl-DefaultRB-r16", sl_default_rb_r16); + if (sl_mapped_qos_flows_r16_present) { + j.write_fieldname("sl-MappedQoS-Flows-r16"); + sl_mapped_qos_flows_r16.to_json(j); } - if (sl_quant_cfg_r16_present) { - j.write_fieldname("sl-QuantityConfig-r16"); - sl_quant_cfg_r16.to_json(j); + if (sl_cast_type_r16_present) { + j.write_str("sl-CastType-r16", sl_cast_type_r16.to_string()); } j.end_obj(); } -// SL-PDCP-Config-r16 ::= SEQUENCE -SRSASN_CODE sl_pdcp_cfg_r16_s::pack(bit_ref& bref) const +const char* sl_sdap_cfg_r16_s::sl_sdap_hdr_r16_opts::to_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_discard_timer_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_pdcp_sn_size_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_out_of_order_delivery_present, 1)); + static const char* names[] = {"present", "absent"}; + return convert_enum_idx(names, 2, value, "sl_sdap_cfg_r16_s::sl_sdap_hdr_r16_e_"); +} - if (sl_discard_timer_r16_present) { - HANDLE_CODE(sl_discard_timer_r16.pack(bref)); +void sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::destroy_() +{ + switch (type_) { + case types::sl_mapped_qos_flows_list_r16: + c.destroy(); + break; + case types::sl_mapped_qos_flows_list_ded_r16: + c.destroy(); + break; + default: + break; } - if (sl_pdcp_sn_size_r16_present) { - HANDLE_CODE(sl_pdcp_sn_size_r16.pack(bref)); +} +void sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sl_mapped_qos_flows_list_r16: + c.init(); + break; + case types::sl_mapped_qos_flows_list_ded_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_"); } - - return SRSASN_SUCCESS; } -SRSASN_CODE sl_pdcp_cfg_r16_s::unpack(cbit_ref& bref) +sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::sl_mapped_qos_flows_r16_c_( + const sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_& other) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_discard_timer_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_pdcp_sn_size_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_out_of_order_delivery_present, 1)); - - if (sl_discard_timer_r16_present) { - HANDLE_CODE(sl_discard_timer_r16.unpack(bref)); + type_ = other.type(); + switch (type_) { + case types::sl_mapped_qos_flows_list_r16: + c.init(other.c.get()); + break; + case types::sl_mapped_qos_flows_list_ded_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_"); } - if (sl_pdcp_sn_size_r16_present) { - HANDLE_CODE(sl_pdcp_sn_size_r16.unpack(bref)); +} +sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_& +sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::operator=(const sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sl_mapped_qos_flows_list_r16: + c.set(other.c.get()); + break; + case types::sl_mapped_qos_flows_list_ded_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_"); } - return SRSASN_SUCCESS; + return *this; } -void sl_pdcp_cfg_r16_s::to_json(json_writer& j) const +sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::sl_mapped_qos_flows_list_r16_l_& +sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::set_sl_mapped_qos_flows_list_r16() +{ + set(types::sl_mapped_qos_flows_list_r16); + return c.get(); +} +sl_mapped_qos_flows_list_ded_r16_s& +sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::set_sl_mapped_qos_flows_list_ded_r16() +{ + set(types::sl_mapped_qos_flows_list_ded_r16); + return c.get(); +} +void sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::to_json(json_writer& j) const { j.start_obj(); - if (sl_discard_timer_r16_present) { - j.write_str("sl-DiscardTimer-r16", sl_discard_timer_r16.to_string()); - } - if (sl_pdcp_sn_size_r16_present) { - j.write_str("sl-PDCP-SN-Size-r16", sl_pdcp_sn_size_r16.to_string()); - } - if (sl_out_of_order_delivery_present) { - j.write_str("sl-OutOfOrderDelivery", "true"); + switch (type_) { + case types::sl_mapped_qos_flows_list_r16: + j.start_array("sl-MappedQoS-FlowsList-r16"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::sl_mapped_qos_flows_list_ded_r16: + j.write_fieldname("sl-MappedQoS-FlowsListDedicated-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_"); } j.end_obj(); } - -const char* sl_pdcp_cfg_r16_s::sl_discard_timer_r16_opts::to_string() const +SRSASN_CODE sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::pack(bit_ref& bref) const { - static const char* names[] = {"ms3", - "ms10", - "ms20", - "ms25", - "ms30", - "ms40", - "ms50", - "ms60", - "ms75", - "ms100", - "ms150", - "ms200", - "ms250", - "ms300", - "ms500", - "ms750", - "ms1500", - "infinity"}; - return convert_enum_idx(names, 18, value, "sl_pdcp_cfg_r16_s::sl_discard_timer_r16_e_"); + type_.pack(bref); + switch (type_) { + case types::sl_mapped_qos_flows_list_r16: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 2048)); + break; + case types::sl_mapped_qos_flows_list_ded_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; } -int16_t sl_pdcp_cfg_r16_s::sl_discard_timer_r16_opts::to_number() const +SRSASN_CODE sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::unpack(cbit_ref& bref) { - static const int16_t numbers[] = {3, 10, 20, 25, 30, 40, 50, 60, 75, 100, 150, 200, 250, 300, 500, 750, 1500, -1}; - return map_enum_number(numbers, 18, value, "sl_pdcp_cfg_r16_s::sl_discard_timer_r16_e_"); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::sl_mapped_qos_flows_list_r16: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 2048)); + break; + case types::sl_mapped_qos_flows_list_ded_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; } -const char* sl_pdcp_cfg_r16_s::sl_pdcp_sn_size_r16_opts::to_string() const +const char* sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::types_opts::to_string() const { - static const char* names[] = {"len12bits", "len18bits"}; - return convert_enum_idx(names, 2, value, "sl_pdcp_cfg_r16_s::sl_pdcp_sn_size_r16_e_"); + static const char* names[] = {"sl-MappedQoS-FlowsList-r16", "sl-MappedQoS-FlowsListDedicated-r16"}; + return convert_enum_idx(names, 2, value, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::types"); } -uint8_t sl_pdcp_cfg_r16_s::sl_pdcp_sn_size_r16_opts::to_number() const + +const char* sl_sdap_cfg_r16_s::sl_cast_type_r16_opts::to_string() const { - static const uint8_t numbers[] = {12, 18}; - return map_enum_number(numbers, 2, value, "sl_pdcp_cfg_r16_s::sl_pdcp_sn_size_r16_e_"); + static const char* names[] = {"broadcast", "groupcast", "unicast", "spare1"}; + return convert_enum_idx(names, 4, value, "sl_sdap_cfg_r16_s::sl_cast_type_r16_e_"); } -// SL-RLC-BearerConfig-r16 ::= SEQUENCE -SRSASN_CODE sl_rlc_bearer_cfg_r16_s::pack(bit_ref& bref) const +// SL-ScheduledConfig-r16 ::= SEQUENCE +SRSASN_CODE sl_sched_cfg_r16_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_served_radio_bearer_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_rlc_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_mac_lc_ch_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(mac_main_cfg_sl_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_cs_rnti_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_psfch_to_pucch_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_cfg_grant_cfg_list_r16_present, 1)); - HANDLE_CODE(pack_integer(bref, sl_rlc_bearer_cfg_idx_r16, (uint16_t)1u, (uint16_t)512u)); - if (sl_served_radio_bearer_r16_present) { - HANDLE_CODE(pack_integer(bref, sl_served_radio_bearer_r16, (uint16_t)1u, (uint16_t)512u)); + HANDLE_CODE(pack_integer(bref, sl_rnti_r16, (uint32_t)0u, (uint32_t)65535u)); + if (mac_main_cfg_sl_r16_present) { + HANDLE_CODE(mac_main_cfg_sl_r16.pack(bref)); } - if (sl_rlc_cfg_r16_present) { - HANDLE_CODE(sl_rlc_cfg_r16.pack(bref)); + if (sl_cs_rnti_r16_present) { + HANDLE_CODE(pack_integer(bref, sl_cs_rnti_r16, (uint32_t)0u, (uint32_t)65535u)); } - if (sl_mac_lc_ch_cfg_r16_present) { - HANDLE_CODE(sl_mac_lc_ch_cfg_r16.pack(bref)); + if (sl_psfch_to_pucch_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_psfch_to_pucch_r16, 1, 8, integer_packer(0, 15))); + } + if (sl_cfg_grant_cfg_list_r16_present) { + HANDLE_CODE(sl_cfg_grant_cfg_list_r16.pack(bref)); } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= sl_dci_to_sl_trans_r16.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sl_dci_to_sl_trans_r16.is_present(), 1)); + if (sl_dci_to_sl_trans_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *sl_dci_to_sl_trans_r16, 1, 8, integer_packer(1, 32))); + } + } + } return SRSASN_SUCCESS; } -SRSASN_CODE sl_rlc_bearer_cfg_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_sched_cfg_r16_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_served_radio_bearer_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_rlc_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_mac_lc_ch_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(mac_main_cfg_sl_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_cs_rnti_r16_present, 1)); + bool sl_psfch_to_pucch_r16_present; + HANDLE_CODE(bref.unpack(sl_psfch_to_pucch_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_cfg_grant_cfg_list_r16_present, 1)); - HANDLE_CODE(unpack_integer(sl_rlc_bearer_cfg_idx_r16, bref, (uint16_t)1u, (uint16_t)512u)); - if (sl_served_radio_bearer_r16_present) { - HANDLE_CODE(unpack_integer(sl_served_radio_bearer_r16, bref, (uint16_t)1u, (uint16_t)512u)); + HANDLE_CODE(unpack_integer(sl_rnti_r16, bref, (uint32_t)0u, (uint32_t)65535u)); + if (mac_main_cfg_sl_r16_present) { + HANDLE_CODE(mac_main_cfg_sl_r16.unpack(bref)); } - if (sl_rlc_cfg_r16_present) { - HANDLE_CODE(sl_rlc_cfg_r16.unpack(bref)); + if (sl_cs_rnti_r16_present) { + HANDLE_CODE(unpack_integer(sl_cs_rnti_r16, bref, (uint32_t)0u, (uint32_t)65535u)); } - if (sl_mac_lc_ch_cfg_r16_present) { - HANDLE_CODE(sl_mac_lc_ch_cfg_r16.unpack(bref)); + if (sl_psfch_to_pucch_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_psfch_to_pucch_r16, bref, 1, 8, integer_packer(0, 15))); + } + if (sl_cfg_grant_cfg_list_r16_present) { + HANDLE_CODE(sl_cfg_grant_cfg_list_r16.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); + + unpack_presence_flag(sl_dci_to_sl_trans_r16, bref); + if (sl_dci_to_sl_trans_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*sl_dci_to_sl_trans_r16, bref, 1, 8, integer_packer(1, 32))); + } + } + } return SRSASN_SUCCESS; } -void sl_rlc_bearer_cfg_r16_s::to_json(json_writer& j) const +void sl_sched_cfg_r16_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("sl-RLC-BearerConfigIndex-r16", sl_rlc_bearer_cfg_idx_r16); - if (sl_served_radio_bearer_r16_present) { - j.write_int("sl-ServedRadioBearer-r16", sl_served_radio_bearer_r16); + j.write_int("sl-RNTI-r16", sl_rnti_r16); + if (mac_main_cfg_sl_r16_present) { + j.write_fieldname("mac-MainConfigSL-r16"); + mac_main_cfg_sl_r16.to_json(j); } - if (sl_rlc_cfg_r16_present) { - j.write_fieldname("sl-RLC-Config-r16"); - sl_rlc_cfg_r16.to_json(j); + if (sl_cs_rnti_r16_present) { + j.write_int("sl-CS-RNTI-r16", sl_cs_rnti_r16); } - if (sl_mac_lc_ch_cfg_r16_present) { - j.write_fieldname("sl-MAC-LogicalChannelConfig-r16"); - sl_mac_lc_ch_cfg_r16.to_json(j); + if (sl_psfch_to_pucch_r16.size() > 0) { + j.start_array("sl-PSFCH-ToPUCCH-r16"); + for (const auto& e1 : sl_psfch_to_pucch_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_cfg_grant_cfg_list_r16_present) { + j.write_fieldname("sl-ConfiguredGrantConfigList-r16"); + sl_cfg_grant_cfg_list_r16.to_json(j); + } + if (ext) { + if (sl_dci_to_sl_trans_r16.is_present()) { + j.start_array("sl-DCI-ToSL-Trans-r16"); + for (const auto& e1 : *sl_dci_to_sl_trans_r16) { + j.write_int(e1); + } + j.end_array(); + } } j.end_obj(); } -// SL-RLC-ChannelConfig-r17 ::= SEQUENCE -SRSASN_CODE sl_rlc_ch_cfg_r17_s::pack(bit_ref& bref) const +// SL-UE-SelectedConfig-r16 ::= SEQUENCE +SRSASN_CODE sl_ue_sel_cfg_r16_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_rlc_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_mac_lc_ch_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_packet_delay_budget_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_pssch_tx_cfg_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_prob_res_keep_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_reselect_after_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_cbr_common_tx_cfg_list_r16_present, 1)); + HANDLE_CODE(bref.pack(ul_prioritization_thres_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_prioritization_thres_r16_present, 1)); - HANDLE_CODE(pack_integer(bref, sl_rlc_ch_id_r17, (uint16_t)1u, (uint16_t)512u)); - if (sl_rlc_cfg_r17_present) { - HANDLE_CODE(sl_rlc_cfg_r17.pack(bref)); + if (sl_pssch_tx_cfg_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_pssch_tx_cfg_list_r16, 1, 16)); } - if (sl_mac_lc_ch_cfg_r17_present) { - HANDLE_CODE(sl_mac_lc_ch_cfg_r17.pack(bref)); + if (sl_prob_res_keep_r16_present) { + HANDLE_CODE(sl_prob_res_keep_r16.pack(bref)); } - if (sl_packet_delay_budget_r17_present) { - HANDLE_CODE(pack_integer(bref, sl_packet_delay_budget_r17, (uint16_t)0u, (uint16_t)1023u)); + if (sl_reselect_after_r16_present) { + HANDLE_CODE(sl_reselect_after_r16.pack(bref)); + } + if (sl_cbr_common_tx_cfg_list_r16_present) { + HANDLE_CODE(sl_cbr_common_tx_cfg_list_r16.pack(bref)); + } + if (ul_prioritization_thres_r16_present) { + HANDLE_CODE(pack_integer(bref, ul_prioritization_thres_r16, (uint8_t)1u, (uint8_t)16u)); + } + if (sl_prioritization_thres_r16_present) { + HANDLE_CODE(pack_integer(bref, sl_prioritization_thres_r16, (uint8_t)1u, (uint8_t)8u)); } return SRSASN_SUCCESS; } -SRSASN_CODE sl_rlc_ch_cfg_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_ue_sel_cfg_r16_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_rlc_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_mac_lc_ch_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_packet_delay_budget_r17_present, 1)); + bool sl_pssch_tx_cfg_list_r16_present; + HANDLE_CODE(bref.unpack(sl_pssch_tx_cfg_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_prob_res_keep_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_reselect_after_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_cbr_common_tx_cfg_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(ul_prioritization_thres_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_prioritization_thres_r16_present, 1)); - HANDLE_CODE(unpack_integer(sl_rlc_ch_id_r17, bref, (uint16_t)1u, (uint16_t)512u)); - if (sl_rlc_cfg_r17_present) { - HANDLE_CODE(sl_rlc_cfg_r17.unpack(bref)); + if (sl_pssch_tx_cfg_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_pssch_tx_cfg_list_r16, bref, 1, 16)); } - if (sl_mac_lc_ch_cfg_r17_present) { - HANDLE_CODE(sl_mac_lc_ch_cfg_r17.unpack(bref)); + if (sl_prob_res_keep_r16_present) { + HANDLE_CODE(sl_prob_res_keep_r16.unpack(bref)); } - if (sl_packet_delay_budget_r17_present) { - HANDLE_CODE(unpack_integer(sl_packet_delay_budget_r17, bref, (uint16_t)0u, (uint16_t)1023u)); + if (sl_reselect_after_r16_present) { + HANDLE_CODE(sl_reselect_after_r16.unpack(bref)); + } + if (sl_cbr_common_tx_cfg_list_r16_present) { + HANDLE_CODE(sl_cbr_common_tx_cfg_list_r16.unpack(bref)); + } + if (ul_prioritization_thres_r16_present) { + HANDLE_CODE(unpack_integer(ul_prioritization_thres_r16, bref, (uint8_t)1u, (uint8_t)16u)); + } + if (sl_prioritization_thres_r16_present) { + HANDLE_CODE(unpack_integer(sl_prioritization_thres_r16, bref, (uint8_t)1u, (uint8_t)8u)); } return SRSASN_SUCCESS; } -void sl_rlc_ch_cfg_r17_s::to_json(json_writer& j) const +void sl_ue_sel_cfg_r16_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("sl-RLC-ChannelID-r17", sl_rlc_ch_id_r17); - if (sl_rlc_cfg_r17_present) { - j.write_fieldname("sl-RLC-Config-r17"); - sl_rlc_cfg_r17.to_json(j); - } - if (sl_mac_lc_ch_cfg_r17_present) { - j.write_fieldname("sl-MAC-LogicalChannelConfig-r17"); - sl_mac_lc_ch_cfg_r17.to_json(j); + if (sl_pssch_tx_cfg_list_r16.size() > 0) { + j.start_array("sl-PSSCH-TxConfigList-r16"); + for (const auto& e1 : sl_pssch_tx_cfg_list_r16) { + e1.to_json(j); + } + j.end_array(); } - if (sl_packet_delay_budget_r17_present) { - j.write_int("sl-PacketDelayBudget-r17", sl_packet_delay_budget_r17); + if (sl_prob_res_keep_r16_present) { + j.write_str("sl-ProbResourceKeep-r16", sl_prob_res_keep_r16.to_string()); } - j.end_obj(); -} - -// SL-RelayUE-Config-r17 ::= SEQUENCE -SRSASN_CODE sl_relay_ue_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(thresh_high_relay_r17_present, 1)); - HANDLE_CODE(bref.pack(thresh_low_relay_r17_present, 1)); - HANDLE_CODE(bref.pack(hyst_max_relay_r17_present, 1)); - HANDLE_CODE(bref.pack(hyst_min_relay_r17_present, 1)); - - if (thresh_high_relay_r17_present) { - HANDLE_CODE(pack_integer(bref, thresh_high_relay_r17, (uint8_t)0u, (uint8_t)127u)); + if (sl_reselect_after_r16_present) { + j.write_str("sl-ReselectAfter-r16", sl_reselect_after_r16.to_string()); } - if (thresh_low_relay_r17_present) { - HANDLE_CODE(pack_integer(bref, thresh_low_relay_r17, (uint8_t)0u, (uint8_t)127u)); + if (sl_cbr_common_tx_cfg_list_r16_present) { + j.write_fieldname("sl-CBR-CommonTxConfigList-r16"); + sl_cbr_common_tx_cfg_list_r16.to_json(j); } - if (hyst_max_relay_r17_present) { - HANDLE_CODE(pack_integer(bref, hyst_max_relay_r17, (uint8_t)0u, (uint8_t)30u)); + if (ul_prioritization_thres_r16_present) { + j.write_int("ul-PrioritizationThres-r16", ul_prioritization_thres_r16); } - if (hyst_min_relay_r17_present) { - HANDLE_CODE(pack_integer(bref, hyst_min_relay_r17, (uint8_t)0u, (uint8_t)30u)); + if (sl_prioritization_thres_r16_present) { + j.write_int("sl-PrioritizationThres-r16", sl_prioritization_thres_r16); } + j.end_obj(); +} - return SRSASN_SUCCESS; +const char* sl_ue_sel_cfg_r16_s::sl_prob_res_keep_r16_opts::to_string() const +{ + static const char* names[] = {"v0", "v0dot2", "v0dot4", "v0dot6", "v0dot8"}; + return convert_enum_idx(names, 5, value, "sl_ue_sel_cfg_r16_s::sl_prob_res_keep_r16_e_"); } -SRSASN_CODE sl_relay_ue_cfg_r17_s::unpack(cbit_ref& bref) +float sl_ue_sel_cfg_r16_s::sl_prob_res_keep_r16_opts::to_number() const { - HANDLE_CODE(bref.unpack(thresh_high_relay_r17_present, 1)); - HANDLE_CODE(bref.unpack(thresh_low_relay_r17_present, 1)); - HANDLE_CODE(bref.unpack(hyst_max_relay_r17_present, 1)); - HANDLE_CODE(bref.unpack(hyst_min_relay_r17_present, 1)); - - if (thresh_high_relay_r17_present) { - HANDLE_CODE(unpack_integer(thresh_high_relay_r17, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (thresh_low_relay_r17_present) { - HANDLE_CODE(unpack_integer(thresh_low_relay_r17, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (hyst_max_relay_r17_present) { - HANDLE_CODE(unpack_integer(hyst_max_relay_r17, bref, (uint8_t)0u, (uint8_t)30u)); - } - if (hyst_min_relay_r17_present) { - HANDLE_CODE(unpack_integer(hyst_min_relay_r17, bref, (uint8_t)0u, (uint8_t)30u)); - } + static const float numbers[] = {0.0, 0.2, 0.4, 0.6, 0.8}; + return map_enum_number(numbers, 5, value, "sl_ue_sel_cfg_r16_s::sl_prob_res_keep_r16_e_"); +} +const char* sl_ue_sel_cfg_r16_s::sl_prob_res_keep_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.2", "0.4", "0.6", "0.8"}; + return convert_enum_idx(number_strs, 5, value, "sl_ue_sel_cfg_r16_s::sl_prob_res_keep_r16_e_"); +} - return SRSASN_SUCCESS; +const char* sl_ue_sel_cfg_r16_s::sl_reselect_after_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n7", "n8", "n9"}; + return convert_enum_idx(names, 9, value, "sl_ue_sel_cfg_r16_s::sl_reselect_after_r16_e_"); } -void sl_relay_ue_cfg_r17_s::to_json(json_writer& j) const +uint8_t sl_ue_sel_cfg_r16_s::sl_reselect_after_r16_opts::to_number() const { - j.start_obj(); - if (thresh_high_relay_r17_present) { - j.write_int("threshHighRelay-r17", thresh_high_relay_r17); - } - if (thresh_low_relay_r17_present) { - j.write_int("threshLowRelay-r17", thresh_low_relay_r17); - } - if (hyst_max_relay_r17_present) { - j.write_int("hystMaxRelay-r17", hyst_max_relay_r17); - } - if (hyst_min_relay_r17_present) { - j.write_int("hystMinRelay-r17", hyst_min_relay_r17); - } - j.end_obj(); + static const uint8_t numbers[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; + return map_enum_number(numbers, 9, value, "sl_ue_sel_cfg_r16_s::sl_reselect_after_r16_e_"); } -// SL-RemoteUE-Config-r17 ::= SEQUENCE -SRSASN_CODE sl_remote_ue_cfg_r17_s::pack(bit_ref& bref) const +// SL-DiscConfig-r17 ::= SEQUENCE +SRSASN_CODE sl_disc_cfg_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(thresh_high_remote_r17_present, 1)); - HANDLE_CODE(bref.pack(hyst_max_remote_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_resel_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_relay_ue_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_remote_ue_cfg_r17_present, 1)); - if (thresh_high_remote_r17_present) { - HANDLE_CODE(pack_integer(bref, thresh_high_remote_r17, (uint8_t)0u, (uint8_t)127u)); - } - if (hyst_max_remote_r17_present) { - HANDLE_CODE(pack_integer(bref, hyst_max_remote_r17, (uint8_t)0u, (uint8_t)30u)); + if (sl_relay_ue_cfg_r17_present) { + HANDLE_CODE(sl_relay_ue_cfg_r17.pack(bref)); } - if (sl_resel_cfg_r17_present) { - HANDLE_CODE(sl_resel_cfg_r17.pack(bref)); + if (sl_remote_ue_cfg_r17_present) { + HANDLE_CODE(sl_remote_ue_cfg_r17.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE sl_remote_ue_cfg_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_disc_cfg_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(thresh_high_remote_r17_present, 1)); - HANDLE_CODE(bref.unpack(hyst_max_remote_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_resel_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_relay_ue_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_remote_ue_cfg_r17_present, 1)); - if (thresh_high_remote_r17_present) { - HANDLE_CODE(unpack_integer(thresh_high_remote_r17, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (hyst_max_remote_r17_present) { - HANDLE_CODE(unpack_integer(hyst_max_remote_r17, bref, (uint8_t)0u, (uint8_t)30u)); + if (sl_relay_ue_cfg_r17_present) { + HANDLE_CODE(sl_relay_ue_cfg_r17.unpack(bref)); } - if (sl_resel_cfg_r17_present) { - HANDLE_CODE(sl_resel_cfg_r17.unpack(bref)); + if (sl_remote_ue_cfg_r17_present) { + HANDLE_CODE(sl_remote_ue_cfg_r17.unpack(bref)); } return SRSASN_SUCCESS; } -void sl_remote_ue_cfg_r17_s::to_json(json_writer& j) const +void sl_disc_cfg_r17_s::to_json(json_writer& j) const { j.start_obj(); - if (thresh_high_remote_r17_present) { - j.write_int("threshHighRemote-r17", thresh_high_remote_r17); - } - if (hyst_max_remote_r17_present) { - j.write_int("hystMaxRemote-r17", hyst_max_remote_r17); + if (sl_relay_ue_cfg_r17_present) { + j.write_fieldname("sl-RelayUE-Config-r17"); + sl_relay_ue_cfg_r17.to_json(j); } - if (sl_resel_cfg_r17_present) { - j.write_fieldname("sl-ReselectionConfig-r17"); - sl_resel_cfg_r17.to_json(j); + if (sl_remote_ue_cfg_r17_present) { + j.write_fieldname("sl-RemoteUE-Config-r17"); + sl_remote_ue_cfg_r17.to_json(j); } j.end_obj(); } -// SL-SDAP-Config-r16 ::= SEQUENCE -SRSASN_CODE sl_sdap_cfg_r16_s::pack(bit_ref& bref) const +// SL-MeasConfigInfo-r16 ::= SEQUENCE +SRSASN_CODE sl_meas_cfg_info_r16_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_mapped_qos_flows_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_cast_type_r16_present, 1)); - - HANDLE_CODE(sl_sdap_hdr_r16.pack(bref)); - HANDLE_CODE(bref.pack(sl_default_rb_r16, 1)); - if (sl_mapped_qos_flows_r16_present) { - HANDLE_CODE(sl_mapped_qos_flows_r16.pack(bref)); - } - if (sl_cast_type_r16_present) { - HANDLE_CODE(sl_cast_type_r16.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, sl_dest_idx_r16, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(sl_meas_cfg_r16.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE sl_sdap_cfg_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_meas_cfg_info_r16_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_mapped_qos_flows_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_cast_type_r16_present, 1)); - - HANDLE_CODE(sl_sdap_hdr_r16.unpack(bref)); - HANDLE_CODE(bref.unpack(sl_default_rb_r16, 1)); - if (sl_mapped_qos_flows_r16_present) { - HANDLE_CODE(sl_mapped_qos_flows_r16.unpack(bref)); - } - if (sl_cast_type_r16_present) { - HANDLE_CODE(sl_cast_type_r16.unpack(bref)); - } + HANDLE_CODE(unpack_integer(sl_dest_idx_r16, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(sl_meas_cfg_r16.unpack(bref)); return SRSASN_SUCCESS; } -void sl_sdap_cfg_r16_s::to_json(json_writer& j) const +void sl_meas_cfg_info_r16_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("sl-SDAP-Header-r16", sl_sdap_hdr_r16.to_string()); - j.write_bool("sl-DefaultRB-r16", sl_default_rb_r16); - if (sl_mapped_qos_flows_r16_present) { - j.write_fieldname("sl-MappedQoS-Flows-r16"); - sl_mapped_qos_flows_r16.to_json(j); - } - if (sl_cast_type_r16_present) { - j.write_str("sl-CastType-r16", sl_cast_type_r16.to_string()); - } + j.write_int("sl-DestinationIndex-r16", sl_dest_idx_r16); + j.write_fieldname("sl-MeasConfig-r16"); + sl_meas_cfg_r16.to_json(j); j.end_obj(); } -const char* sl_sdap_cfg_r16_s::sl_sdap_hdr_r16_opts::to_string() const +// SL-PHY-MAC-RLC-Config-r16 ::= SEQUENCE +SRSASN_CODE sl_phy_mac_rlc_cfg_r16_s::pack(bit_ref& bref) const { - static const char* names[] = {"present", "absent"}; - return convert_enum_idx(names, 2, value, "sl_sdap_cfg_r16_s::sl_sdap_hdr_r16_e_"); -} + HANDLE_CODE(bref.pack(sl_sched_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_ue_sel_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_freq_info_to_release_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_freq_info_to_add_mod_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_rlc_bearer_to_release_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_rlc_bearer_to_add_mod_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_max_num_consecutive_dtx_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_csi_acquisition_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_csi_sched_request_id_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_ssb_prio_nr_r16_present, 1)); + HANDLE_CODE(bref.pack(network_ctrl_sync_tx_r16_present, 1)); -void sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::destroy_() -{ - switch (type_) { - case types::sl_mapped_qos_flows_list_r16: - c.destroy(); - break; - case types::sl_mapped_qos_flows_list_ded_r16: - c.destroy(); - break; - default: - break; + if (sl_sched_cfg_r16_present) { + HANDLE_CODE(sl_sched_cfg_r16.pack(bref)); } -} -void sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::sl_mapped_qos_flows_list_r16: - c.init(); - break; - case types::sl_mapped_qos_flows_list_ded_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_"); + if (sl_ue_sel_cfg_r16_present) { + HANDLE_CODE(sl_ue_sel_cfg_r16.pack(bref)); } -} -sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::sl_mapped_qos_flows_r16_c_( - const sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::sl_mapped_qos_flows_list_r16: - c.init(other.c.get()); - break; - case types::sl_mapped_qos_flows_list_ded_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_"); - } -} -sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_& -sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::operator=(const sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::sl_mapped_qos_flows_list_r16: - c.set(other.c.get()); - break; - case types::sl_mapped_qos_flows_list_ded_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_"); - } - - return *this; -} -sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::sl_mapped_qos_flows_list_r16_l_& -sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::set_sl_mapped_qos_flows_list_r16() -{ - set(types::sl_mapped_qos_flows_list_r16); - return c.get(); -} -sl_mapped_qos_flows_list_ded_r16_s& -sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::set_sl_mapped_qos_flows_list_ded_r16() -{ - set(types::sl_mapped_qos_flows_list_ded_r16); - return c.get(); -} -void sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::sl_mapped_qos_flows_list_r16: - j.start_array("sl-MappedQoS-FlowsList-r16"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); - break; - case types::sl_mapped_qos_flows_list_ded_r16: - j.write_fieldname("sl-MappedQoS-FlowsListDedicated-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::sl_mapped_qos_flows_list_r16: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 2048)); - break; - case types::sl_mapped_qos_flows_list_ded_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::sl_mapped_qos_flows_list_r16: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 2048)); - break; - case types::sl_mapped_qos_flows_list_ded_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* sl_sdap_cfg_r16_s::sl_cast_type_r16_opts::to_string() const -{ - static const char* names[] = {"broadcast", "groupcast", "unicast", "spare1"}; - return convert_enum_idx(names, 4, value, "sl_sdap_cfg_r16_s::sl_cast_type_r16_e_"); -} - -// SL-ScheduledConfig-r16 ::= SEQUENCE -SRSASN_CODE sl_sched_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(mac_main_cfg_sl_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_cs_rnti_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_psfch_to_pucch_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_cfg_grant_cfg_list_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, sl_rnti_r16, (uint32_t)0u, (uint32_t)65535u)); - if (mac_main_cfg_sl_r16_present) { - HANDLE_CODE(mac_main_cfg_sl_r16.pack(bref)); - } - if (sl_cs_rnti_r16_present) { - HANDLE_CODE(pack_integer(bref, sl_cs_rnti_r16, (uint32_t)0u, (uint32_t)65535u)); - } - if (sl_psfch_to_pucch_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_psfch_to_pucch_r16, 1, 8, integer_packer(0, 15))); - } - if (sl_cfg_grant_cfg_list_r16_present) { - HANDLE_CODE(sl_cfg_grant_cfg_list_r16.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= sl_dci_to_sl_trans_r16.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(sl_dci_to_sl_trans_r16.is_present(), 1)); - if (sl_dci_to_sl_trans_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *sl_dci_to_sl_trans_r16, 1, 8, integer_packer(1, 32))); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_sched_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(mac_main_cfg_sl_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_cs_rnti_r16_present, 1)); - bool sl_psfch_to_pucch_r16_present; - HANDLE_CODE(bref.unpack(sl_psfch_to_pucch_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_cfg_grant_cfg_list_r16_present, 1)); - - HANDLE_CODE(unpack_integer(sl_rnti_r16, bref, (uint32_t)0u, (uint32_t)65535u)); - if (mac_main_cfg_sl_r16_present) { - HANDLE_CODE(mac_main_cfg_sl_r16.unpack(bref)); - } - if (sl_cs_rnti_r16_present) { - HANDLE_CODE(unpack_integer(sl_cs_rnti_r16, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (sl_psfch_to_pucch_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_psfch_to_pucch_r16, bref, 1, 8, integer_packer(0, 15))); - } - if (sl_cfg_grant_cfg_list_r16_present) { - HANDLE_CODE(sl_cfg_grant_cfg_list_r16.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); - - unpack_presence_flag(sl_dci_to_sl_trans_r16, bref); - if (sl_dci_to_sl_trans_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*sl_dci_to_sl_trans_r16, bref, 1, 8, integer_packer(1, 32))); - } - } - } - return SRSASN_SUCCESS; -} -void sl_sched_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("sl-RNTI-r16", sl_rnti_r16); - if (mac_main_cfg_sl_r16_present) { - j.write_fieldname("mac-MainConfigSL-r16"); - mac_main_cfg_sl_r16.to_json(j); - } - if (sl_cs_rnti_r16_present) { - j.write_int("sl-CS-RNTI-r16", sl_cs_rnti_r16); - } - if (sl_psfch_to_pucch_r16.size() > 0) { - j.start_array("sl-PSFCH-ToPUCCH-r16"); - for (const auto& e1 : sl_psfch_to_pucch_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_cfg_grant_cfg_list_r16_present) { - j.write_fieldname("sl-ConfiguredGrantConfigList-r16"); - sl_cfg_grant_cfg_list_r16.to_json(j); - } - if (ext) { - if (sl_dci_to_sl_trans_r16.is_present()) { - j.start_array("sl-DCI-ToSL-Trans-r16"); - for (const auto& e1 : *sl_dci_to_sl_trans_r16) { - j.write_int(e1); - } - j.end_array(); - } - } - j.end_obj(); -} - -// SL-UE-SelectedConfig-r16 ::= SEQUENCE -SRSASN_CODE sl_ue_sel_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_pssch_tx_cfg_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_prob_res_keep_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_reselect_after_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_cbr_common_tx_cfg_list_r16_present, 1)); - HANDLE_CODE(bref.pack(ul_prioritization_thres_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_prioritization_thres_r16_present, 1)); - - if (sl_pssch_tx_cfg_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_pssch_tx_cfg_list_r16, 1, 16)); - } - if (sl_prob_res_keep_r16_present) { - HANDLE_CODE(sl_prob_res_keep_r16.pack(bref)); - } - if (sl_reselect_after_r16_present) { - HANDLE_CODE(sl_reselect_after_r16.pack(bref)); - } - if (sl_cbr_common_tx_cfg_list_r16_present) { - HANDLE_CODE(sl_cbr_common_tx_cfg_list_r16.pack(bref)); - } - if (ul_prioritization_thres_r16_present) { - HANDLE_CODE(pack_integer(bref, ul_prioritization_thres_r16, (uint8_t)1u, (uint8_t)16u)); - } - if (sl_prioritization_thres_r16_present) { - HANDLE_CODE(pack_integer(bref, sl_prioritization_thres_r16, (uint8_t)1u, (uint8_t)8u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_ue_sel_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool sl_pssch_tx_cfg_list_r16_present; - HANDLE_CODE(bref.unpack(sl_pssch_tx_cfg_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_prob_res_keep_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_reselect_after_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_cbr_common_tx_cfg_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(ul_prioritization_thres_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_prioritization_thres_r16_present, 1)); - - if (sl_pssch_tx_cfg_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_pssch_tx_cfg_list_r16, bref, 1, 16)); - } - if (sl_prob_res_keep_r16_present) { - HANDLE_CODE(sl_prob_res_keep_r16.unpack(bref)); - } - if (sl_reselect_after_r16_present) { - HANDLE_CODE(sl_reselect_after_r16.unpack(bref)); - } - if (sl_cbr_common_tx_cfg_list_r16_present) { - HANDLE_CODE(sl_cbr_common_tx_cfg_list_r16.unpack(bref)); - } - if (ul_prioritization_thres_r16_present) { - HANDLE_CODE(unpack_integer(ul_prioritization_thres_r16, bref, (uint8_t)1u, (uint8_t)16u)); - } - if (sl_prioritization_thres_r16_present) { - HANDLE_CODE(unpack_integer(sl_prioritization_thres_r16, bref, (uint8_t)1u, (uint8_t)8u)); - } - - return SRSASN_SUCCESS; -} -void sl_ue_sel_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_pssch_tx_cfg_list_r16.size() > 0) { - j.start_array("sl-PSSCH-TxConfigList-r16"); - for (const auto& e1 : sl_pssch_tx_cfg_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_prob_res_keep_r16_present) { - j.write_str("sl-ProbResourceKeep-r16", sl_prob_res_keep_r16.to_string()); - } - if (sl_reselect_after_r16_present) { - j.write_str("sl-ReselectAfter-r16", sl_reselect_after_r16.to_string()); - } - if (sl_cbr_common_tx_cfg_list_r16_present) { - j.write_fieldname("sl-CBR-CommonTxConfigList-r16"); - sl_cbr_common_tx_cfg_list_r16.to_json(j); - } - if (ul_prioritization_thres_r16_present) { - j.write_int("ul-PrioritizationThres-r16", ul_prioritization_thres_r16); - } - if (sl_prioritization_thres_r16_present) { - j.write_int("sl-PrioritizationThres-r16", sl_prioritization_thres_r16); - } - j.end_obj(); -} - -const char* sl_ue_sel_cfg_r16_s::sl_prob_res_keep_r16_opts::to_string() const -{ - static const char* names[] = {"v0", "v0dot2", "v0dot4", "v0dot6", "v0dot8"}; - return convert_enum_idx(names, 5, value, "sl_ue_sel_cfg_r16_s::sl_prob_res_keep_r16_e_"); -} -float sl_ue_sel_cfg_r16_s::sl_prob_res_keep_r16_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.2, 0.4, 0.6, 0.8}; - return map_enum_number(numbers, 5, value, "sl_ue_sel_cfg_r16_s::sl_prob_res_keep_r16_e_"); -} -const char* sl_ue_sel_cfg_r16_s::sl_prob_res_keep_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.2", "0.4", "0.6", "0.8"}; - return convert_enum_idx(number_strs, 5, value, "sl_ue_sel_cfg_r16_s::sl_prob_res_keep_r16_e_"); -} - -const char* sl_ue_sel_cfg_r16_s::sl_reselect_after_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n7", "n8", "n9"}; - return convert_enum_idx(names, 9, value, "sl_ue_sel_cfg_r16_s::sl_reselect_after_r16_e_"); -} -uint8_t sl_ue_sel_cfg_r16_s::sl_reselect_after_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; - return map_enum_number(numbers, 9, value, "sl_ue_sel_cfg_r16_s::sl_reselect_after_r16_e_"); -} - -// TMGI-r17 ::= SEQUENCE -SRSASN_CODE tmgi_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(plmn_id_r17.pack(bref)); - HANDLE_CODE(service_id_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE tmgi_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(plmn_id_r17.unpack(bref)); - HANDLE_CODE(service_id_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void tmgi_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("plmn-Id-r17"); - plmn_id_r17.to_json(j); - j.write_str("serviceId-r17", service_id_r17.to_string()); - j.end_obj(); -} - -void tmgi_r17_s::plmn_id_r17_c_::destroy_() -{ - switch (type_) { - case types::explicit_value: - c.destroy(); - break; - default: - break; - } -} -void tmgi_r17_s::plmn_id_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::plmn_idx: - break; - case types::explicit_value: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "tmgi_r17_s::plmn_id_r17_c_"); - } -} -tmgi_r17_s::plmn_id_r17_c_::plmn_id_r17_c_(const tmgi_r17_s::plmn_id_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::plmn_idx: - c.init(other.c.get()); - break; - case types::explicit_value: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "tmgi_r17_s::plmn_id_r17_c_"); - } -} -tmgi_r17_s::plmn_id_r17_c_& tmgi_r17_s::plmn_id_r17_c_::operator=(const tmgi_r17_s::plmn_id_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::plmn_idx: - c.set(other.c.get()); - break; - case types::explicit_value: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "tmgi_r17_s::plmn_id_r17_c_"); - } - - return *this; -} -uint8_t& tmgi_r17_s::plmn_id_r17_c_::set_plmn_idx() -{ - set(types::plmn_idx); - return c.get(); -} -plmn_id_s& tmgi_r17_s::plmn_id_r17_c_::set_explicit_value() -{ - set(types::explicit_value); - return c.get(); -} -void tmgi_r17_s::plmn_id_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::plmn_idx: - j.write_int("plmn-Index", c.get()); - break; - case types::explicit_value: - j.write_fieldname("explicitValue"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "tmgi_r17_s::plmn_id_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE tmgi_r17_s::plmn_id_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::plmn_idx: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)12u)); - break; - case types::explicit_value: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "tmgi_r17_s::plmn_id_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE tmgi_r17_s::plmn_id_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::plmn_idx: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)12u)); - break; - case types::explicit_value: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "tmgi_r17_s::plmn_id_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// DRB-ToAddMod ::= SEQUENCE -SRSASN_CODE drb_to_add_mod_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)); - - 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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= daps_cfg_r16_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(daps_cfg_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE drb_to_add_mod_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)); - - 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)); - } - - 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(daps_cfg_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void drb_to_add_mod_s::to_json(json_writer& j) const -{ - j.start_obj(); - 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); - } - if (ext) { - if (daps_cfg_r16_present) { - j.write_str("daps-Config-r16", "true"); - } - } - j.end_obj(); -} - -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_"); - } -} -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::eps_bearer_id: - c.init(other.c.get()); - break; - case types::sdap_cfg: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::eps_bearer_id: - c.set(other.c.get()); - break; - case types::sdap_cfg: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); - } - - return *this; -} -uint8_t& drb_to_add_mod_s::cn_assoc_c_::set_eps_bearer_id() -{ - set(types::eps_bearer_id); - return c.get(); -} -sdap_cfg_s& drb_to_add_mod_s::cn_assoc_c_::set_sdap_cfg() -{ - set(types::sdap_cfg); - return c.get(); -} -void drb_to_add_mod_s::cn_assoc_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::eps_bearer_id: - j.write_int("eps-BearerIdentity", c.get()); - break; - case types::sdap_cfg: - j.write_fieldname("sdap-Config"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); - } - j.end_obj(); -} -SRSASN_CODE drb_to_add_mod_s::cn_assoc_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)); - break; - case types::sdap_cfg: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::eps_bearer_id: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); - break; - case types::sdap_cfg: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// MRB-ToAddMod-r17 ::= SEQUENCE -SRSASN_CODE mrb_to_add_mod_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(mbs_session_id_r17_present, 1)); - HANDLE_CODE(bref.pack(mrb_id_new_r17_present, 1)); - HANDLE_CODE(bref.pack(reestablish_pdcp_r17_present, 1)); - HANDLE_CODE(bref.pack(recover_pdcp_r17_present, 1)); - HANDLE_CODE(bref.pack(pdcp_cfg_r17_present, 1)); - - if (mbs_session_id_r17_present) { - HANDLE_CODE(mbs_session_id_r17.pack(bref)); - } - HANDLE_CODE(pack_integer(bref, mrb_id_r17, (uint16_t)1u, (uint16_t)512u)); - if (mrb_id_new_r17_present) { - HANDLE_CODE(pack_integer(bref, mrb_id_new_r17, (uint16_t)1u, (uint16_t)512u)); - } - if (pdcp_cfg_r17_present) { - HANDLE_CODE(pdcp_cfg_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mrb_to_add_mod_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(mbs_session_id_r17_present, 1)); - HANDLE_CODE(bref.unpack(mrb_id_new_r17_present, 1)); - HANDLE_CODE(bref.unpack(reestablish_pdcp_r17_present, 1)); - HANDLE_CODE(bref.unpack(recover_pdcp_r17_present, 1)); - HANDLE_CODE(bref.unpack(pdcp_cfg_r17_present, 1)); - - if (mbs_session_id_r17_present) { - HANDLE_CODE(mbs_session_id_r17.unpack(bref)); - } - HANDLE_CODE(unpack_integer(mrb_id_r17, bref, (uint16_t)1u, (uint16_t)512u)); - if (mrb_id_new_r17_present) { - HANDLE_CODE(unpack_integer(mrb_id_new_r17, bref, (uint16_t)1u, (uint16_t)512u)); - } - if (pdcp_cfg_r17_present) { - HANDLE_CODE(pdcp_cfg_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void mrb_to_add_mod_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (mbs_session_id_r17_present) { - j.write_fieldname("mbs-SessionId-r17"); - mbs_session_id_r17.to_json(j); - } - j.write_int("mrb-Identity-r17", mrb_id_r17); - if (mrb_id_new_r17_present) { - j.write_int("mrb-IdentityNew-r17", mrb_id_new_r17); - } - if (reestablish_pdcp_r17_present) { - j.write_str("reestablishPDCP-r17", "true"); - } - if (recover_pdcp_r17_present) { - j.write_str("recoverPDCP-r17", "true"); - } - if (pdcp_cfg_r17_present) { - j.write_fieldname("pdcp-Config-r17"); - pdcp_cfg_r17.to_json(j); - } - j.end_obj(); -} - -// SL-DiscConfig-r17 ::= SEQUENCE -SRSASN_CODE sl_disc_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sl_relay_ue_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_remote_ue_cfg_r17_present, 1)); - - if (sl_relay_ue_cfg_r17_present) { - HANDLE_CODE(sl_relay_ue_cfg_r17.pack(bref)); - } - if (sl_remote_ue_cfg_r17_present) { - HANDLE_CODE(sl_remote_ue_cfg_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_disc_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sl_relay_ue_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_remote_ue_cfg_r17_present, 1)); - - if (sl_relay_ue_cfg_r17_present) { - HANDLE_CODE(sl_relay_ue_cfg_r17.unpack(bref)); - } - if (sl_remote_ue_cfg_r17_present) { - HANDLE_CODE(sl_remote_ue_cfg_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sl_disc_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_relay_ue_cfg_r17_present) { - j.write_fieldname("sl-RelayUE-Config-r17"); - sl_relay_ue_cfg_r17.to_json(j); - } - if (sl_remote_ue_cfg_r17_present) { - j.write_fieldname("sl-RemoteUE-Config-r17"); - sl_remote_ue_cfg_r17.to_json(j); - } - j.end_obj(); -} - -// SL-MeasConfigInfo-r16 ::= SEQUENCE -SRSASN_CODE sl_meas_cfg_info_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, sl_dest_idx_r16, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(sl_meas_cfg_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_meas_cfg_info_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(sl_dest_idx_r16, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(sl_meas_cfg_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void sl_meas_cfg_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("sl-DestinationIndex-r16", sl_dest_idx_r16); - j.write_fieldname("sl-MeasConfig-r16"); - sl_meas_cfg_r16.to_json(j); - j.end_obj(); -} - -// SL-PHY-MAC-RLC-Config-r16 ::= SEQUENCE -SRSASN_CODE sl_phy_mac_rlc_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sl_sched_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_ue_sel_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_freq_info_to_release_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_freq_info_to_add_mod_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_rlc_bearer_to_release_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_rlc_bearer_to_add_mod_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_max_num_consecutive_dtx_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_csi_acquisition_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_csi_sched_request_id_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_ssb_prio_nr_r16_present, 1)); - HANDLE_CODE(bref.pack(network_ctrl_sync_tx_r16_present, 1)); - - if (sl_sched_cfg_r16_present) { - HANDLE_CODE(sl_sched_cfg_r16.pack(bref)); - } - if (sl_ue_sel_cfg_r16_present) { - HANDLE_CODE(sl_ue_sel_cfg_r16.pack(bref)); - } - if (sl_freq_info_to_release_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_freq_info_to_release_list_r16, 1, 8, integer_packer(1, 8))); - } - if (sl_freq_info_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_freq_info_to_add_mod_list_r16, 1, 8)); - } - if (sl_rlc_bearer_to_release_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_rlc_bearer_to_release_list_r16, 1, 512, integer_packer(1, 512))); - } - if (sl_rlc_bearer_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_rlc_bearer_to_add_mod_list_r16, 1, 512)); - } - if (sl_max_num_consecutive_dtx_r16_present) { - HANDLE_CODE(sl_max_num_consecutive_dtx_r16.pack(bref)); - } - if (sl_csi_sched_request_id_r16_present) { - HANDLE_CODE(sl_csi_sched_request_id_r16.pack(bref)); - } - if (sl_ssb_prio_nr_r16_present) { - HANDLE_CODE(pack_integer(bref, sl_ssb_prio_nr_r16, (uint8_t)1u, (uint8_t)8u)); - } - if (network_ctrl_sync_tx_r16_present) { - HANDLE_CODE(network_ctrl_sync_tx_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_phy_mac_rlc_cfg_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sl_sched_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_ue_sel_cfg_r16_present, 1)); - bool sl_freq_info_to_release_list_r16_present; - HANDLE_CODE(bref.unpack(sl_freq_info_to_release_list_r16_present, 1)); - bool sl_freq_info_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(sl_freq_info_to_add_mod_list_r16_present, 1)); - bool sl_rlc_bearer_to_release_list_r16_present; - HANDLE_CODE(bref.unpack(sl_rlc_bearer_to_release_list_r16_present, 1)); - bool sl_rlc_bearer_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(sl_rlc_bearer_to_add_mod_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_max_num_consecutive_dtx_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_csi_acquisition_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_csi_sched_request_id_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_ssb_prio_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(network_ctrl_sync_tx_r16_present, 1)); - - if (sl_sched_cfg_r16_present) { - HANDLE_CODE(sl_sched_cfg_r16.unpack(bref)); - } - if (sl_ue_sel_cfg_r16_present) { - HANDLE_CODE(sl_ue_sel_cfg_r16.unpack(bref)); - } - if (sl_freq_info_to_release_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_freq_info_to_release_list_r16, bref, 1, 8, integer_packer(1, 8))); - } - if (sl_freq_info_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_freq_info_to_add_mod_list_r16, bref, 1, 8)); - } - if (sl_rlc_bearer_to_release_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_rlc_bearer_to_release_list_r16, bref, 1, 512, integer_packer(1, 512))); - } - if (sl_rlc_bearer_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_rlc_bearer_to_add_mod_list_r16, bref, 1, 512)); - } - if (sl_max_num_consecutive_dtx_r16_present) { - HANDLE_CODE(sl_max_num_consecutive_dtx_r16.unpack(bref)); - } - if (sl_csi_sched_request_id_r16_present) { - HANDLE_CODE(sl_csi_sched_request_id_r16.unpack(bref)); - } - if (sl_ssb_prio_nr_r16_present) { - HANDLE_CODE(unpack_integer(sl_ssb_prio_nr_r16, bref, (uint8_t)1u, (uint8_t)8u)); - } - if (network_ctrl_sync_tx_r16_present) { - HANDLE_CODE(network_ctrl_sync_tx_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sl_phy_mac_rlc_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_sched_cfg_r16_present) { - j.write_fieldname("sl-ScheduledConfig-r16"); - sl_sched_cfg_r16.to_json(j); - } - if (sl_ue_sel_cfg_r16_present) { - j.write_fieldname("sl-UE-SelectedConfig-r16"); - sl_ue_sel_cfg_r16.to_json(j); - } - if (sl_freq_info_to_release_list_r16.size() > 0) { - j.start_array("sl-FreqInfoToReleaseList-r16"); - for (const auto& e1 : sl_freq_info_to_release_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_freq_info_to_add_mod_list_r16.size() > 0) { - j.start_array("sl-FreqInfoToAddModList-r16"); - for (const auto& e1 : sl_freq_info_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_rlc_bearer_to_release_list_r16.size() > 0) { - j.start_array("sl-RLC-BearerToReleaseList-r16"); - for (const auto& e1 : sl_rlc_bearer_to_release_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_rlc_bearer_to_add_mod_list_r16.size() > 0) { - j.start_array("sl-RLC-BearerToAddModList-r16"); - for (const auto& e1 : sl_rlc_bearer_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_max_num_consecutive_dtx_r16_present) { - j.write_str("sl-MaxNumConsecutiveDTX-r16", sl_max_num_consecutive_dtx_r16.to_string()); - } - if (sl_csi_acquisition_r16_present) { - j.write_str("sl-CSI-Acquisition-r16", "enabled"); - } - if (sl_csi_sched_request_id_r16_present) { - j.write_fieldname("sl-CSI-SchedulingRequestId-r16"); - sl_csi_sched_request_id_r16.to_json(j); - } - if (sl_ssb_prio_nr_r16_present) { - j.write_int("sl-SSB-PriorityNR-r16", sl_ssb_prio_nr_r16); - } - if (network_ctrl_sync_tx_r16_present) { - j.write_str("networkControlledSyncTx-r16", network_ctrl_sync_tx_r16.to_string()); - } - j.end_obj(); -} - -const char* sl_phy_mac_rlc_cfg_r16_s::sl_max_num_consecutive_dtx_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n16", "n32"}; - return convert_enum_idx(names, 8, value, "sl_phy_mac_rlc_cfg_r16_s::sl_max_num_consecutive_dtx_r16_e_"); -} -uint8_t sl_phy_mac_rlc_cfg_r16_s::sl_max_num_consecutive_dtx_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 6, 8, 16, 32}; - return map_enum_number(numbers, 8, value, "sl_phy_mac_rlc_cfg_r16_s::sl_max_num_consecutive_dtx_r16_e_"); -} - -const char* sl_phy_mac_rlc_cfg_r16_s::network_ctrl_sync_tx_r16_opts::to_string() const -{ - static const char* names[] = {"on", "off"}; - return convert_enum_idx(names, 2, value, "sl_phy_mac_rlc_cfg_r16_s::network_ctrl_sync_tx_r16_e_"); -} - -// SL-PHY-MAC-RLC-Config-v1700 ::= SEQUENCE -SRSASN_CODE sl_phy_mac_rlc_cfg_v1700_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_drx_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_rlc_ch_to_release_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_rlc_ch_to_add_mod_list_r17.size() > 0, 1)); - - if (sl_drx_cfg_r17_present) { - HANDLE_CODE(sl_drx_cfg_r17.pack(bref)); - } - if (sl_rlc_ch_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_rlc_ch_to_release_list_r17, 1, 512, integer_packer(1, 512))); - } - if (sl_rlc_ch_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_rlc_ch_to_add_mod_list_r17, 1, 512)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_phy_mac_rlc_cfg_v1700_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_drx_cfg_r17_present, 1)); - bool sl_rlc_ch_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(sl_rlc_ch_to_release_list_r17_present, 1)); - bool sl_rlc_ch_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(sl_rlc_ch_to_add_mod_list_r17_present, 1)); - - if (sl_drx_cfg_r17_present) { - HANDLE_CODE(sl_drx_cfg_r17.unpack(bref)); - } - if (sl_rlc_ch_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_rlc_ch_to_release_list_r17, bref, 1, 512, integer_packer(1, 512))); - } - if (sl_rlc_ch_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_rlc_ch_to_add_mod_list_r17, bref, 1, 512)); - } - - return SRSASN_SUCCESS; -} -void sl_phy_mac_rlc_cfg_v1700_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_drx_cfg_r17_present) { - j.write_fieldname("sl-DRX-Config-r17"); - sl_drx_cfg_r17.to_json(j); - } - if (sl_rlc_ch_to_release_list_r17.size() > 0) { - j.start_array("sl-RLC-ChannelToReleaseList-r17"); - for (const auto& e1 : sl_rlc_ch_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_rlc_ch_to_add_mod_list_r17.size() > 0) { - j.start_array("sl-RLC-ChannelToAddModList-r17"); - for (const auto& e1 : sl_rlc_ch_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// SL-RadioBearerConfig-r16 ::= SEQUENCE -SRSASN_CODE sl_radio_bearer_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_sdap_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_pdcp_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_trans_range_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, slrb_uu_cfg_idx_r16, (uint16_t)1u, (uint16_t)512u)); - if (sl_sdap_cfg_r16_present) { - HANDLE_CODE(sl_sdap_cfg_r16.pack(bref)); - } - if (sl_pdcp_cfg_r16_present) { - HANDLE_CODE(sl_pdcp_cfg_r16.pack(bref)); - } - if (sl_trans_range_r16_present) { - HANDLE_CODE(sl_trans_range_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_radio_bearer_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_sdap_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_pdcp_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_trans_range_r16_present, 1)); - - HANDLE_CODE(unpack_integer(slrb_uu_cfg_idx_r16, bref, (uint16_t)1u, (uint16_t)512u)); - if (sl_sdap_cfg_r16_present) { - HANDLE_CODE(sl_sdap_cfg_r16.unpack(bref)); - } - if (sl_pdcp_cfg_r16_present) { - HANDLE_CODE(sl_pdcp_cfg_r16.unpack(bref)); - } - if (sl_trans_range_r16_present) { - HANDLE_CODE(sl_trans_range_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sl_radio_bearer_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("slrb-Uu-ConfigIndex-r16", slrb_uu_cfg_idx_r16); - if (sl_sdap_cfg_r16_present) { - j.write_fieldname("sl-SDAP-Config-r16"); - sl_sdap_cfg_r16.to_json(j); - } - if (sl_pdcp_cfg_r16_present) { - j.write_fieldname("sl-PDCP-Config-r16"); - sl_pdcp_cfg_r16.to_json(j); - } - if (sl_trans_range_r16_present) { - j.write_str("sl-TransRange-r16", sl_trans_range_r16.to_string()); - } - j.end_obj(); -} - -const char* sl_radio_bearer_cfg_r16_s::sl_trans_range_r16_opts::to_string() const -{ - static const char* names[] = {"m20", "m50", "m80", "m100", "m120", "m150", "m180", "m200", - "m220", "m250", "m270", "m300", "m350", "m370", "m400", "m420", - "m450", "m480", "m500", "m550", "m600", "m700", "m1000", "spare9", - "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 32, value, "sl_radio_bearer_cfg_r16_s::sl_trans_range_r16_e_"); -} -uint16_t sl_radio_bearer_cfg_r16_s::sl_trans_range_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {20, 50, 80, 100, 120, 150, 180, 200, 220, 250, 270, 300, - 350, 370, 400, 420, 450, 480, 500, 550, 600, 700, 1000}; - return map_enum_number(numbers, 23, value, "sl_radio_bearer_cfg_r16_s::sl_trans_range_r16_e_"); -} - -// SL-SRAP-Config-r17 ::= SEQUENCE -SRSASN_CODE sl_srap_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_local_id_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_map_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_map_to_release_list_r17.size() > 0, 1)); - - if (sl_local_id_r17_present) { - HANDLE_CODE(pack_integer(bref, sl_local_id_r17, (uint16_t)0u, (uint16_t)255u)); - } - if (sl_map_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_map_to_add_mod_list_r17, 1, 32)); - } - if (sl_map_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_map_to_release_list_r17, 1, 32)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_srap_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_local_id_r17_present, 1)); - bool sl_map_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(sl_map_to_add_mod_list_r17_present, 1)); - bool sl_map_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(sl_map_to_release_list_r17_present, 1)); - - if (sl_local_id_r17_present) { - HANDLE_CODE(unpack_integer(sl_local_id_r17, bref, (uint16_t)0u, (uint16_t)255u)); - } - if (sl_map_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_map_to_add_mod_list_r17, bref, 1, 32)); - } - if (sl_map_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_map_to_release_list_r17, bref, 1, 32)); - } - - return SRSASN_SUCCESS; -} -void sl_srap_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_local_id_r17_present) { - j.write_int("sl-LocalIdentity-r17", sl_local_id_r17); - } - if (sl_map_to_add_mod_list_r17.size() > 0) { - j.start_array("sl-MappingToAddModList-r17"); - for (const auto& e1 : sl_map_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_map_to_release_list_r17.size() > 0) { - j.start_array("sl-MappingToReleaseList-r17"); - for (const auto& e1 : sl_map_to_release_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// SRB-ToAddMod ::= SEQUENCE -SRSASN_CODE srb_to_add_mod_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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= srb_id_v1700_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(srb_id_v1700_present, 1)); - if (srb_id_v1700_present) { - HANDLE_CODE(pack_integer(bref, srb_id_v1700, (uint8_t)4u, (uint8_t)4u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE srb_to_add_mod_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)); - } - - 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(srb_id_v1700_present, 1)); - if (srb_id_v1700_present) { - HANDLE_CODE(unpack_integer(srb_id_v1700, bref, (uint8_t)4u, (uint8_t)4u)); - } - } - } - return SRSASN_SUCCESS; -} -void srb_to_add_mod_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); - } - if (ext) { - if (srb_id_v1700_present) { - j.write_int("srb-Identity-v1700", srb_id_v1700); - } - } - j.end_obj(); -} - -// SecurityAlgorithmConfig ::= SEQUENCE -SRSASN_CODE security_algorithm_cfg_s::pack(bit_ref& bref) const -{ - 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 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)); - } - - return SRSASN_SUCCESS; -} -void security_algorithm_cfg_s::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()); - } - j.end_obj(); -} - -// SL-ConfigDedicatedNR-r16 ::= SEQUENCE -SRSASN_CODE sl_cfg_ded_nr_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_phy_mac_rlc_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_radio_bearer_to_release_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_radio_bearer_to_add_mod_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_meas_cfg_info_to_release_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_meas_cfg_info_to_add_mod_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(t400_r16_present, 1)); - - if (sl_phy_mac_rlc_cfg_r16_present) { - HANDLE_CODE(sl_phy_mac_rlc_cfg_r16.pack(bref)); - } - if (sl_radio_bearer_to_release_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_radio_bearer_to_release_list_r16, 1, 512, integer_packer(1, 512))); - } - if (sl_radio_bearer_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_radio_bearer_to_add_mod_list_r16, 1, 512)); - } - if (sl_meas_cfg_info_to_release_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_meas_cfg_info_to_release_list_r16, 1, 32, integer_packer(0, 31))); - } - if (sl_meas_cfg_info_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_meas_cfg_info_to_add_mod_list_r16, 1, 32)); - } - if (t400_r16_present) { - HANDLE_CODE(t400_r16.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= sl_phy_mac_rlc_cfg_v1700.is_present(); - group_flags[0] |= sl_disc_cfg_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(sl_phy_mac_rlc_cfg_v1700.is_present(), 1)); - HANDLE_CODE(bref.pack(sl_disc_cfg_r17.is_present(), 1)); - if (sl_phy_mac_rlc_cfg_v1700.is_present()) { - HANDLE_CODE(sl_phy_mac_rlc_cfg_v1700->pack(bref)); - } - if (sl_disc_cfg_r17.is_present()) { - HANDLE_CODE(sl_disc_cfg_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_cfg_ded_nr_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_phy_mac_rlc_cfg_r16_present, 1)); - bool sl_radio_bearer_to_release_list_r16_present; - HANDLE_CODE(bref.unpack(sl_radio_bearer_to_release_list_r16_present, 1)); - bool sl_radio_bearer_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(sl_radio_bearer_to_add_mod_list_r16_present, 1)); - bool sl_meas_cfg_info_to_release_list_r16_present; - HANDLE_CODE(bref.unpack(sl_meas_cfg_info_to_release_list_r16_present, 1)); - bool sl_meas_cfg_info_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(sl_meas_cfg_info_to_add_mod_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(t400_r16_present, 1)); - - if (sl_phy_mac_rlc_cfg_r16_present) { - HANDLE_CODE(sl_phy_mac_rlc_cfg_r16.unpack(bref)); - } - if (sl_radio_bearer_to_release_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_radio_bearer_to_release_list_r16, bref, 1, 512, integer_packer(1, 512))); - } - if (sl_radio_bearer_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_radio_bearer_to_add_mod_list_r16, bref, 1, 512)); - } - if (sl_meas_cfg_info_to_release_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_meas_cfg_info_to_release_list_r16, bref, 1, 32, integer_packer(0, 31))); - } - if (sl_meas_cfg_info_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_meas_cfg_info_to_add_mod_list_r16, bref, 1, 32)); - } - if (t400_r16_present) { - HANDLE_CODE(t400_r16.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); - - unpack_presence_flag(sl_phy_mac_rlc_cfg_v1700, bref); - unpack_presence_flag(sl_disc_cfg_r17, bref); - if (sl_phy_mac_rlc_cfg_v1700.is_present()) { - HANDLE_CODE(sl_phy_mac_rlc_cfg_v1700->unpack(bref)); - } - if (sl_disc_cfg_r17.is_present()) { - HANDLE_CODE(sl_disc_cfg_r17->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void sl_cfg_ded_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_phy_mac_rlc_cfg_r16_present) { - j.write_fieldname("sl-PHY-MAC-RLC-Config-r16"); - sl_phy_mac_rlc_cfg_r16.to_json(j); - } - if (sl_radio_bearer_to_release_list_r16.size() > 0) { - j.start_array("sl-RadioBearerToReleaseList-r16"); - for (const auto& e1 : sl_radio_bearer_to_release_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_radio_bearer_to_add_mod_list_r16.size() > 0) { - j.start_array("sl-RadioBearerToAddModList-r16"); - for (const auto& e1 : sl_radio_bearer_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_meas_cfg_info_to_release_list_r16.size() > 0) { - j.start_array("sl-MeasConfigInfoToReleaseList-r16"); - for (const auto& e1 : sl_meas_cfg_info_to_release_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_meas_cfg_info_to_add_mod_list_r16.size() > 0) { - j.start_array("sl-MeasConfigInfoToAddModList-r16"); - for (const auto& e1 : sl_meas_cfg_info_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (t400_r16_present) { - j.write_str("t400-r16", t400_r16.to_string()); - } - if (ext) { - if (sl_phy_mac_rlc_cfg_v1700.is_present()) { - j.write_fieldname("sl-PHY-MAC-RLC-Config-v1700"); - sl_phy_mac_rlc_cfg_v1700->to_json(j); - } - if (sl_disc_cfg_r17.is_present()) { - j.write_fieldname("sl-DiscConfig-r17"); - sl_disc_cfg_r17->to_json(j); - } - } - j.end_obj(); -} - -const char* sl_cfg_ded_nr_r16_s::t400_r16_opts::to_string() const -{ - static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; - return convert_enum_idx(names, 8, value, "sl_cfg_ded_nr_r16_s::t400_r16_e_"); -} -uint16_t sl_cfg_ded_nr_r16_s::t400_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return map_enum_number(numbers, 8, value, "sl_cfg_ded_nr_r16_s::t400_r16_e_"); -} - -// SL-L2RemoteUE-Config-r17 ::= SEQUENCE -SRSASN_CODE sl_l2_remote_ue_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_srap_cfg_remote_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_ue_id_remote_r17_present, 1)); - - if (sl_srap_cfg_remote_r17_present) { - HANDLE_CODE(sl_srap_cfg_remote_r17.pack(bref)); - } - if (sl_ue_id_remote_r17_present) { - HANDLE_CODE(pack_integer(bref, sl_ue_id_remote_r17, (uint32_t)0u, (uint32_t)65535u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_l2_remote_ue_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_srap_cfg_remote_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_ue_id_remote_r17_present, 1)); - - if (sl_srap_cfg_remote_r17_present) { - HANDLE_CODE(sl_srap_cfg_remote_r17.unpack(bref)); - } - if (sl_ue_id_remote_r17_present) { - HANDLE_CODE(unpack_integer(sl_ue_id_remote_r17, bref, (uint32_t)0u, (uint32_t)65535u)); - } - - return SRSASN_SUCCESS; -} -void sl_l2_remote_ue_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_srap_cfg_remote_r17_present) { - j.write_fieldname("sl-SRAP-ConfigRemote-r17"); - sl_srap_cfg_remote_r17.to_json(j); - } - if (sl_ue_id_remote_r17_present) { - j.write_int("sl-UEIdentityRemote-r17", sl_ue_id_remote_r17); - } - j.end_obj(); -} - -// SecurityConfig ::= SEQUENCE -SRSASN_CODE security_cfg_s::pack(bit_ref& bref) const -{ - 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 security_cfg_s::unpack(cbit_ref& bref) -{ - 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 security_cfg_s::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()); - } - j.end_obj(); -} - -const char* security_cfg_s::key_to_use_opts::to_string() const -{ - static const char* names[] = {"master", "secondary"}; - return convert_enum_idx(names, 2, value, "security_cfg_s::key_to_use_e_"); -} - -// RRCSetup-v1700-IEs ::= SEQUENCE -SRSASN_CODE rrc_setup_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sl_cfg_ded_nr_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_l2_remote_ue_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (sl_cfg_ded_nr_r17_present) { - HANDLE_CODE(sl_cfg_ded_nr_r17.pack(bref)); - } - if (sl_l2_remote_ue_cfg_r17_present) { - HANDLE_CODE(sl_l2_remote_ue_cfg_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_setup_v1700_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sl_cfg_ded_nr_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_l2_remote_ue_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (sl_cfg_ded_nr_r17_present) { - HANDLE_CODE(sl_cfg_ded_nr_r17.unpack(bref)); - } - if (sl_l2_remote_ue_cfg_r17_present) { - HANDLE_CODE(sl_l2_remote_ue_cfg_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_setup_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_cfg_ded_nr_r17_present) { - j.write_fieldname("sl-ConfigDedicatedNR-r17"); - sl_cfg_ded_nr_r17.to_json(j); - } - if (sl_l2_remote_ue_cfg_r17_present) { - j.write_fieldname("sl-L2RemoteUE-Config-r17"); - sl_l2_remote_ue_cfg_r17.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(srb3_to_release_present, 1)); - HANDLE_CODE(bref.pack(drb_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(drb_to_release_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(security_cfg_present, 1)); - - if (srb_to_add_mod_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, srb_to_add_mod_list, 1, 2)); - } - if (drb_to_add_mod_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_add_mod_list, 1, 29)); - } - if (drb_to_release_list.size() > 0) { - 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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= mrb_to_add_mod_list_r17.is_present(); - group_flags[0] |= mrb_to_release_list_r17.is_present(); - group_flags[0] |= srb4_to_add_mod_r17.is_present(); - group_flags[0] |= srb4_to_release_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(mrb_to_add_mod_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(mrb_to_release_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(srb4_to_add_mod_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(srb4_to_release_r17_present, 1)); - if (mrb_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *mrb_to_add_mod_list_r17, 1, 32)); - } - if (mrb_to_release_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *mrb_to_release_list_r17, 1, 32, integer_packer(1, 512))); - } - if (srb4_to_add_mod_r17.is_present()) { - HANDLE_CODE(srb4_to_add_mod_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE radio_bearer_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool srb_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(srb_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(srb3_to_release_present, 1)); - bool drb_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(drb_to_add_mod_list_present, 1)); - bool drb_to_release_list_present; - 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)); - } - - 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); - - unpack_presence_flag(mrb_to_add_mod_list_r17, bref); - unpack_presence_flag(mrb_to_release_list_r17, bref); - unpack_presence_flag(srb4_to_add_mod_r17, bref); - HANDLE_CODE(bref.unpack(srb4_to_release_r17_present, 1)); - if (mrb_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*mrb_to_add_mod_list_r17, bref, 1, 32)); - } - if (mrb_to_release_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*mrb_to_release_list_r17, bref, 1, 32, integer_packer(1, 512))); - } - if (srb4_to_add_mod_r17.is_present()) { - HANDLE_CODE(srb4_to_add_mod_r17->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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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); - } - if (ext) { - if (mrb_to_add_mod_list_r17.is_present()) { - j.start_array("mrb-ToAddModList-r17"); - for (const auto& e1 : *mrb_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (mrb_to_release_list_r17.is_present()) { - j.start_array("mrb-ToReleaseList-r17"); - for (const auto& e1 : *mrb_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (srb4_to_add_mod_r17.is_present()) { - j.write_fieldname("srb4-ToAddMod-r17"); - srb4_to_add_mod_r17->to_json(j); - } - if (srb4_to_release_r17_present) { - j.write_str("srb4-ToRelease-r17", "true"); - } - } - 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.size() > 0, 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.size() > 0) { - 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)); - bool late_non_crit_ext_present; - 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.size() > 0) { - 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.size() > 0, 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.size() > 0) { - 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_setup_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(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.size() > 0) { - 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(); -} - -// 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 -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void rrc_reject_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -rrc_reject_ies_s& rrc_reject_s::crit_exts_c_::set_rrc_reject() -{ - set(types::rrc_reject); - return c; -} -void rrc_reject_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void rrc_reject_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rrc_reject: - j.write_fieldname("rrcReject"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE rrc_reject_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rrc_reject: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_reject_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_reject: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// RRCSetup ::= SEQUENCE -SRSASN_CODE rrc_setup_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) -{ - 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 -{ - 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_::set(types::options e) -{ - type_ = e; -} -rrc_setup_ies_s& rrc_setup_s::crit_exts_c_::set_rrc_setup() -{ - set(types::rrc_setup); - return c; -} -void rrc_setup_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void rrc_setup_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rrc_setup: - j.write_fieldname("rrcSetup"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE rrc_setup_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rrc_setup: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_setup_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_setup: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// DL-CCCH-MessageType ::= CHOICE -void dl_ccch_msg_type_c::set(types::options e) -{ - type_ = e; -} -dl_ccch_msg_type_c::c1_c_& dl_ccch_msg_type_c::set_c1() -{ - set(types::c1); - return c; -} -void dl_ccch_msg_type_c::set_msg_class_ext() -{ - set(types::msg_class_ext); -} -void dl_ccch_msg_type_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.to_json(j); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); - } - j.end_obj(); -} -SRSASN_CODE dl_ccch_msg_type_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::c1: - HANDLE_CODE(c.pack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_ccch_msg_type_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.unpack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void dl_ccch_msg_type_c::c1_c_::destroy_() -{ - switch (type_) { - case types::rrc_reject: - c.destroy(); - break; - case types::rrc_setup: - c.destroy(); - break; - default: - break; - } -} -void dl_ccch_msg_type_c::c1_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::rrc_reject: - c.init(); - break; - 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_, "dl_ccch_msg_type_c::c1_c_"); - } -} -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::rrc_reject: - c.init(other.c.get()); - break; - 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_, "dl_ccch_msg_type_c::c1_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) -{ - 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: - break; - case types::spare1: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); - } - - return *this; -} -rrc_reject_s& dl_ccch_msg_type_c::c1_c_::set_rrc_reject() -{ - set(types::rrc_reject); - return c.get(); -} -rrc_setup_s& dl_ccch_msg_type_c::c1_c_::set_rrc_setup() -{ - set(types::rrc_setup); - return c.get(); -} -void dl_ccch_msg_type_c::c1_c_::set_spare2() -{ - set(types::spare2); -} -void dl_ccch_msg_type_c::c1_c_::set_spare1() -{ - set(types::spare1); -} -void dl_ccch_msg_type_c::c1_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: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); - } - j.end_obj(); -} -SRSASN_CODE dl_ccch_msg_type_c::c1_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: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_ccch_msg_type_c::c1_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: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "dl_ccch_msg_type_c::c1_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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(); -} - -// MUSIM-Starting-SFN-AndSubframe-r17 ::= SEQUENCE -SRSASN_CODE mu_si_m_start_sfn_and_sf_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, start_sfn_r17, (uint16_t)0u, (uint16_t)1023u)); - HANDLE_CODE(pack_integer(bref, start_sf_r17, (uint8_t)0u, (uint8_t)9u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mu_si_m_start_sfn_and_sf_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(start_sfn_r17, bref, (uint16_t)0u, (uint16_t)1023u)); - HANDLE_CODE(unpack_integer(start_sf_r17, bref, (uint8_t)0u, (uint8_t)9u)); - - return SRSASN_SUCCESS; -} -void mu_si_m_start_sfn_and_sf_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("starting-SFN-r17", start_sfn_r17); - j.write_int("startingSubframe-r17", start_sf_r17); - j.end_obj(); -} - -// MUSIM-GapInfo-r17 ::= SEQUENCE -SRSASN_CODE mu_si_m_gap_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(musim_start_sfn_and_sf_r17_present, 1)); - HANDLE_CODE(bref.pack(musim_gap_len_r17_present, 1)); - HANDLE_CODE(bref.pack(musim_gap_repeat_and_offset_r17_present, 1)); - - if (musim_start_sfn_and_sf_r17_present) { - HANDLE_CODE(musim_start_sfn_and_sf_r17.pack(bref)); - } - if (musim_gap_len_r17_present) { - HANDLE_CODE(musim_gap_len_r17.pack(bref)); - } - if (musim_gap_repeat_and_offset_r17_present) { - HANDLE_CODE(musim_gap_repeat_and_offset_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mu_si_m_gap_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(musim_start_sfn_and_sf_r17_present, 1)); - HANDLE_CODE(bref.unpack(musim_gap_len_r17_present, 1)); - HANDLE_CODE(bref.unpack(musim_gap_repeat_and_offset_r17_present, 1)); - - if (musim_start_sfn_and_sf_r17_present) { - HANDLE_CODE(musim_start_sfn_and_sf_r17.unpack(bref)); - } - if (musim_gap_len_r17_present) { - HANDLE_CODE(musim_gap_len_r17.unpack(bref)); - } - if (musim_gap_repeat_and_offset_r17_present) { - HANDLE_CODE(musim_gap_repeat_and_offset_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void mu_si_m_gap_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (musim_start_sfn_and_sf_r17_present) { - j.write_fieldname("musim-Starting-SFN-AndSubframe-r17"); - musim_start_sfn_and_sf_r17.to_json(j); - } - if (musim_gap_len_r17_present) { - j.write_str("musim-GapLength-r17", musim_gap_len_r17.to_string()); - } - if (musim_gap_repeat_and_offset_r17_present) { - j.write_fieldname("musim-GapRepetitionAndOffset-r17"); - musim_gap_repeat_and_offset_r17.to_json(j); - } - j.end_obj(); -} - -const char* mu_si_m_gap_info_r17_s::musim_gap_len_r17_opts::to_string() const -{ - static const char* names[] = {"ms3", "ms4", "ms6", "ms10", "ms20"}; - return convert_enum_idx(names, 5, value, "mu_si_m_gap_info_r17_s::musim_gap_len_r17_e_"); -} -uint8_t mu_si_m_gap_info_r17_s::musim_gap_len_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {3, 4, 6, 10, 20}; - return map_enum_number(numbers, 5, value, "mu_si_m_gap_info_r17_s::musim_gap_len_r17_e_"); -} - -void mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::destroy_() {} -void mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::musim_gap_repeat_and_offset_r17_c_( - const mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::ms20_r17: - c.init(other.c.get()); - break; - case types::ms40_r17: - c.init(other.c.get()); - break; - case types::ms80_r17: - c.init(other.c.get()); - break; - case types::ms160_r17: - c.init(other.c.get()); - break; - case types::ms320_r17: - c.init(other.c.get()); - break; - case types::ms640_r17: - c.init(other.c.get()); - break; - case types::ms1280_r17: - c.init(other.c.get()); - break; - case types::ms2560_r17: - c.init(other.c.get()); - break; - case types::ms5120_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_"); - } -} -mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_& -mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::operator=( - const mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ms20_r17: - c.set(other.c.get()); - break; - case types::ms40_r17: - c.set(other.c.get()); - break; - case types::ms80_r17: - c.set(other.c.get()); - break; - case types::ms160_r17: - c.set(other.c.get()); - break; - case types::ms320_r17: - c.set(other.c.get()); - break; - case types::ms640_r17: - c.set(other.c.get()); - break; - case types::ms1280_r17: - c.set(other.c.get()); - break; - case types::ms2560_r17: - c.set(other.c.get()); - break; - case types::ms5120_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_"); - } - - return *this; -} -uint8_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms20_r17() -{ - set(types::ms20_r17); - return c.get(); -} -uint8_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms40_r17() -{ - set(types::ms40_r17); - return c.get(); -} -uint8_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms80_r17() -{ - set(types::ms80_r17); - return c.get(); -} -uint8_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms160_r17() -{ - set(types::ms160_r17); - return c.get(); -} -uint16_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms320_r17() -{ - set(types::ms320_r17); - return c.get(); -} -uint16_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms640_r17() -{ - set(types::ms640_r17); - return c.get(); -} -uint16_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms1280_r17() -{ - set(types::ms1280_r17); - return c.get(); -} -uint16_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms2560_r17() -{ - set(types::ms2560_r17); - return c.get(); -} -uint16_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms5120_r17() -{ - set(types::ms5120_r17); - return c.get(); -} -void mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ms20_r17: - j.write_int("ms20-r17", c.get()); - break; - case types::ms40_r17: - j.write_int("ms40-r17", c.get()); - break; - case types::ms80_r17: - j.write_int("ms80-r17", c.get()); - break; - case types::ms160_r17: - j.write_int("ms160-r17", c.get()); - break; - case types::ms320_r17: - j.write_int("ms320-r17", c.get()); - break; - case types::ms640_r17: - j.write_int("ms640-r17", c.get()); - break; - case types::ms1280_r17: - j.write_int("ms1280-r17", c.get()); - break; - case types::ms2560_r17: - j.write_int("ms2560-r17", c.get()); - break; - case types::ms5120_r17: - j.write_int("ms5120-r17", c.get()); - break; - default: - log_invalid_choice_id(type_, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ms20_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); - break; - case types::ms40_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::ms80_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - case types::ms160_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); - break; - case types::ms320_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); - break; - case types::ms640_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); - break; - case types::ms1280_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); - break; - case types::ms2560_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); - break; - case types::ms5120_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); - break; - default: - log_invalid_choice_id(type_, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ms20_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::ms40_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::ms80_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::ms160_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); - break; - case types::ms320_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); - break; - case types::ms640_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); - break; - case types::ms1280_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); - break; - case types::ms2560_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); - break; - case types::ms5120_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); - break; - default: - log_invalid_choice_id(type_, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// IAB-IP-Address-r16 ::= CHOICE -void iab_ip_address_r16_c::destroy_() -{ - switch (type_) { - case types::ip_v4_address_r16: - c.destroy>(); - break; - case types::ip_v6_address_r16: - c.destroy>(); - break; - case types::ip_v6_prefix_r16: - c.destroy>(); - break; - default: - break; - } -} -void iab_ip_address_r16_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::ip_v4_address_r16: - c.init>(); - break; - case types::ip_v6_address_r16: - c.init>(); - break; - case types::ip_v6_prefix_r16: - c.init>(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "iab_ip_address_r16_c"); - } -} -iab_ip_address_r16_c::iab_ip_address_r16_c(const iab_ip_address_r16_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::ip_v4_address_r16: - c.init(other.c.get>()); - break; - case types::ip_v6_address_r16: - c.init(other.c.get>()); - break; - case types::ip_v6_prefix_r16: - c.init(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "iab_ip_address_r16_c"); - } -} -iab_ip_address_r16_c& iab_ip_address_r16_c::operator=(const iab_ip_address_r16_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ip_v4_address_r16: - c.set(other.c.get>()); - break; - case types::ip_v6_address_r16: - c.set(other.c.get>()); - break; - case types::ip_v6_prefix_r16: - c.set(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "iab_ip_address_r16_c"); - } - - return *this; -} -fixed_bitstring<32>& iab_ip_address_r16_c::set_ip_v4_address_r16() -{ - set(types::ip_v4_address_r16); - return c.get>(); -} -fixed_bitstring<128>& iab_ip_address_r16_c::set_ip_v6_address_r16() -{ - set(types::ip_v6_address_r16); - return c.get>(); -} -fixed_bitstring<64>& iab_ip_address_r16_c::set_ip_v6_prefix_r16() -{ - set(types::ip_v6_prefix_r16); - return c.get>(); -} -void iab_ip_address_r16_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ip_v4_address_r16: - j.write_str("iPv4-Address-r16", c.get>().to_string()); - break; - case types::ip_v6_address_r16: - j.write_str("iPv6-Address-r16", c.get>().to_string()); - break; - case types::ip_v6_prefix_r16: - j.write_str("iPv6-Prefix-r16", c.get>().to_string()); - break; - default: - log_invalid_choice_id(type_, "iab_ip_address_r16_c"); - } - j.end_obj(); -} -SRSASN_CODE iab_ip_address_r16_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ip_v4_address_r16: - HANDLE_CODE(c.get>().pack(bref)); - break; - case types::ip_v6_address_r16: - HANDLE_CODE(c.get>().pack(bref)); - break; - case types::ip_v6_prefix_r16: - HANDLE_CODE(c.get>().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "iab_ip_address_r16_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE iab_ip_address_r16_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ip_v4_address_r16: - HANDLE_CODE(c.get>().unpack(bref)); - break; - case types::ip_v6_address_r16: - HANDLE_CODE(c.get>().unpack(bref)); - break; - case types::ip_v6_prefix_r16: - HANDLE_CODE(c.get>().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "iab_ip_address_r16_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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::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_c"); - } -} -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::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; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_c"); - } - - return *this; -} -uint8_t& meas_trigger_quant_c::set_rsrp() -{ - set(types::rsrp); - return c.get(); -} -uint8_t& meas_trigger_quant_c::set_rsrq() -{ - set(types::rsrq); - return c.get(); -} -uint8_t& meas_trigger_quant_c::set_sinr() -{ - set(types::sinr); - return c.get(); -} -void meas_trigger_quant_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rsrp: - j.write_int("rsrp", c.get()); - break; - 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_, "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::rsrq: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); - break; - case types::sinr: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); - break; - 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::rsrq: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); - break; - case types::sinr: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_c"); - return SRSASN_ERROR_DECODE_FAIL; + if (sl_freq_info_to_release_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_freq_info_to_release_list_r16, 1, 8, integer_packer(1, 8))); } - return SRSASN_SUCCESS; -} - -// MeasTriggerQuantityOffset ::= CHOICE -void meas_trigger_quant_offset_c::destroy_() {} -void meas_trigger_quant_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) -{ - 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_offset_c"); + if (sl_freq_info_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_freq_info_to_add_mod_list_r16, 1, 8)); } -} -meas_trigger_quant_offset_c& meas_trigger_quant_offset_c::operator=(const meas_trigger_quant_offset_c& other) -{ - if (this == &other) { - return *this; + if (sl_rlc_bearer_to_release_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_rlc_bearer_to_release_list_r16, 1, 512, integer_packer(1, 512))); } - 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; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_offset_c"); + if (sl_rlc_bearer_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_rlc_bearer_to_add_mod_list_r16, 1, 512)); } - - return *this; -} -int8_t& meas_trigger_quant_offset_c::set_rsrp() -{ - set(types::rsrp); - return c.get(); -} -int8_t& meas_trigger_quant_offset_c::set_rsrq() -{ - set(types::rsrq); - return c.get(); -} -int8_t& meas_trigger_quant_offset_c::set_sinr() -{ - set(types::sinr); - return c.get(); -} -void meas_trigger_quant_offset_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rsrp: - j.write_int("rsrp", c.get()); - break; - 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_, "meas_trigger_quant_offset_c"); + if (sl_max_num_consecutive_dtx_r16_present) { + HANDLE_CODE(sl_max_num_consecutive_dtx_r16.pack(bref)); } - j.end_obj(); -} -SRSASN_CODE meas_trigger_quant_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)); - break; - 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_, "meas_trigger_quant_offset_c"); - return SRSASN_ERROR_ENCODE_FAIL; + if (sl_csi_sched_request_id_r16_present) { + HANDLE_CODE(sl_csi_sched_request_id_r16.pack(bref)); } - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_trigger_quant_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)); - break; - 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_, "meas_trigger_quant_offset_c"); - return SRSASN_ERROR_DECODE_FAIL; + if (sl_ssb_prio_nr_r16_present) { + HANDLE_CODE(pack_integer(bref, sl_ssb_prio_nr_r16, (uint8_t)1u, (uint8_t)8u)); } - return SRSASN_SUCCESS; -} - -// NR-RS-Type ::= ENUMERATED -const char* nr_rs_type_opts::to_string() const -{ - static const char* names[] = {"ssb", "csi-rs"}; - return convert_enum_idx(names, 2, value, "nr_rs_type_e"); -} - -// CGI-Info-Logging-r16 ::= SEQUENCE -SRSASN_CODE cgi_info_logging_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(tac_r16_present, 1)); - - HANDLE_CODE(plmn_id_r16.pack(bref)); - HANDLE_CODE(cell_id_r16.pack(bref)); - if (tac_r16_present) { - HANDLE_CODE(tac_r16.pack(bref)); + if (network_ctrl_sync_tx_r16_present) { + HANDLE_CODE(network_ctrl_sync_tx_r16.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE cgi_info_logging_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_phy_mac_rlc_cfg_r16_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(tac_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_sched_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_ue_sel_cfg_r16_present, 1)); + bool sl_freq_info_to_release_list_r16_present; + HANDLE_CODE(bref.unpack(sl_freq_info_to_release_list_r16_present, 1)); + bool sl_freq_info_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(sl_freq_info_to_add_mod_list_r16_present, 1)); + bool sl_rlc_bearer_to_release_list_r16_present; + HANDLE_CODE(bref.unpack(sl_rlc_bearer_to_release_list_r16_present, 1)); + bool sl_rlc_bearer_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(sl_rlc_bearer_to_add_mod_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_max_num_consecutive_dtx_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_csi_acquisition_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_csi_sched_request_id_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_ssb_prio_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(network_ctrl_sync_tx_r16_present, 1)); - HANDLE_CODE(plmn_id_r16.unpack(bref)); - HANDLE_CODE(cell_id_r16.unpack(bref)); - if (tac_r16_present) { - HANDLE_CODE(tac_r16.unpack(bref)); + if (sl_sched_cfg_r16_present) { + HANDLE_CODE(sl_sched_cfg_r16.unpack(bref)); + } + if (sl_ue_sel_cfg_r16_present) { + HANDLE_CODE(sl_ue_sel_cfg_r16.unpack(bref)); + } + if (sl_freq_info_to_release_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_freq_info_to_release_list_r16, bref, 1, 8, integer_packer(1, 8))); + } + if (sl_freq_info_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_freq_info_to_add_mod_list_r16, bref, 1, 8)); + } + if (sl_rlc_bearer_to_release_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_rlc_bearer_to_release_list_r16, bref, 1, 512, integer_packer(1, 512))); + } + if (sl_rlc_bearer_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_rlc_bearer_to_add_mod_list_r16, bref, 1, 512)); + } + if (sl_max_num_consecutive_dtx_r16_present) { + HANDLE_CODE(sl_max_num_consecutive_dtx_r16.unpack(bref)); + } + if (sl_csi_sched_request_id_r16_present) { + HANDLE_CODE(sl_csi_sched_request_id_r16.unpack(bref)); + } + if (sl_ssb_prio_nr_r16_present) { + HANDLE_CODE(unpack_integer(sl_ssb_prio_nr_r16, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (network_ctrl_sync_tx_r16_present) { + HANDLE_CODE(network_ctrl_sync_tx_r16.unpack(bref)); } return SRSASN_SUCCESS; } -void cgi_info_logging_r16_s::to_json(json_writer& j) const +void sl_phy_mac_rlc_cfg_r16_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("plmn-Identity-r16"); - plmn_id_r16.to_json(j); - j.write_str("cellIdentity-r16", cell_id_r16.to_string()); - if (tac_r16_present) { - j.write_str("trackingAreaCode-r16", tac_r16.to_string()); + if (sl_sched_cfg_r16_present) { + j.write_fieldname("sl-ScheduledConfig-r16"); + sl_sched_cfg_r16.to_json(j); + } + if (sl_ue_sel_cfg_r16_present) { + j.write_fieldname("sl-UE-SelectedConfig-r16"); + sl_ue_sel_cfg_r16.to_json(j); + } + if (sl_freq_info_to_release_list_r16.size() > 0) { + j.start_array("sl-FreqInfoToReleaseList-r16"); + for (const auto& e1 : sl_freq_info_to_release_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_freq_info_to_add_mod_list_r16.size() > 0) { + j.start_array("sl-FreqInfoToAddModList-r16"); + for (const auto& e1 : sl_freq_info_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_rlc_bearer_to_release_list_r16.size() > 0) { + j.start_array("sl-RLC-BearerToReleaseList-r16"); + for (const auto& e1 : sl_rlc_bearer_to_release_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_rlc_bearer_to_add_mod_list_r16.size() > 0) { + j.start_array("sl-RLC-BearerToAddModList-r16"); + for (const auto& e1 : sl_rlc_bearer_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_max_num_consecutive_dtx_r16_present) { + j.write_str("sl-MaxNumConsecutiveDTX-r16", sl_max_num_consecutive_dtx_r16.to_string()); + } + if (sl_csi_acquisition_r16_present) { + j.write_str("sl-CSI-Acquisition-r16", "enabled"); + } + if (sl_csi_sched_request_id_r16_present) { + j.write_fieldname("sl-CSI-SchedulingRequestId-r16"); + sl_csi_sched_request_id_r16.to_json(j); + } + if (sl_ssb_prio_nr_r16_present) { + j.write_int("sl-SSB-PriorityNR-r16", sl_ssb_prio_nr_r16); + } + if (network_ctrl_sync_tx_r16_present) { + j.write_str("networkControlledSyncTx-r16", network_ctrl_sync_tx_r16.to_string()); } j.end_obj(); } -// CondTriggerConfig-r16 ::= SEQUENCE -SRSASN_CODE cond_trigger_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(cond_event_id.pack(bref)); - HANDLE_CODE(rs_type_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cond_trigger_cfg_r16_s::unpack(cbit_ref& bref) +const char* sl_phy_mac_rlc_cfg_r16_s::sl_max_num_consecutive_dtx_r16_opts::to_string() const { - bref.unpack(ext, 1); - HANDLE_CODE(cond_event_id.unpack(bref)); - HANDLE_CODE(rs_type_r16.unpack(bref)); - - return SRSASN_SUCCESS; + static const char* names[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n16", "n32"}; + return convert_enum_idx(names, 8, value, "sl_phy_mac_rlc_cfg_r16_s::sl_max_num_consecutive_dtx_r16_e_"); } -void cond_trigger_cfg_r16_s::to_json(json_writer& j) const +uint8_t sl_phy_mac_rlc_cfg_r16_s::sl_max_num_consecutive_dtx_r16_opts::to_number() const { - j.start_obj(); - j.write_fieldname("condEventId"); - cond_event_id.to_json(j); - j.write_str("rsType-r16", rs_type_r16.to_string()); - j.end_obj(); + static const uint8_t numbers[] = {1, 2, 3, 4, 6, 8, 16, 32}; + return map_enum_number(numbers, 8, value, "sl_phy_mac_rlc_cfg_r16_s::sl_max_num_consecutive_dtx_r16_e_"); } -void cond_trigger_cfg_r16_s::cond_event_id_c_::destroy_() -{ - switch (type_) { - case types::cond_event_a3: - c.destroy(); - break; - case types::cond_event_a5: - c.destroy(); - break; - case types::cond_event_a4_r17: - c.destroy(); - break; - case types::cond_event_d1_r17: - c.destroy(); - break; - case types::cond_event_t1_r17: - c.destroy(); - break; - default: - break; - } -} -void cond_trigger_cfg_r16_s::cond_event_id_c_::set(types::options e) +const char* sl_phy_mac_rlc_cfg_r16_s::network_ctrl_sync_tx_r16_opts::to_string() const { - destroy_(); - type_ = e; - switch (type_) { - case types::cond_event_a3: - c.init(); - break; - case types::cond_event_a5: - c.init(); - break; - case types::cond_event_a4_r17: - c.init(); - break; - case types::cond_event_d1_r17: - c.init(); - break; - case types::cond_event_t1_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cond_trigger_cfg_r16_s::cond_event_id_c_"); - } + static const char* names[] = {"on", "off"}; + return convert_enum_idx(names, 2, value, "sl_phy_mac_rlc_cfg_r16_s::network_ctrl_sync_tx_r16_e_"); } -cond_trigger_cfg_r16_s::cond_event_id_c_::cond_event_id_c_(const cond_trigger_cfg_r16_s::cond_event_id_c_& other) + +// SL-PHY-MAC-RLC-Config-v1700 ::= SEQUENCE +SRSASN_CODE sl_phy_mac_rlc_cfg_v1700_s::pack(bit_ref& bref) const { - type_ = other.type(); - switch (type_) { - case types::cond_event_a3: - c.init(other.c.get()); - break; - case types::cond_event_a5: - c.init(other.c.get()); - break; - case types::cond_event_a4_r17: - c.init(other.c.get()); - break; - case types::cond_event_d1_r17: - c.init(other.c.get()); - break; - case types::cond_event_t1_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cond_trigger_cfg_r16_s::cond_event_id_c_"); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_drx_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_rlc_ch_to_release_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_rlc_ch_to_add_mod_list_r17.size() > 0, 1)); + + if (sl_drx_cfg_r17_present) { + HANDLE_CODE(sl_drx_cfg_r17.pack(bref)); } -} -cond_trigger_cfg_r16_s::cond_event_id_c_& -cond_trigger_cfg_r16_s::cond_event_id_c_::operator=(const cond_trigger_cfg_r16_s::cond_event_id_c_& other) -{ - if (this == &other) { - return *this; + if (sl_rlc_ch_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_rlc_ch_to_release_list_r17, 1, 512, integer_packer(1, 512))); } - set(other.type()); - switch (type_) { - case types::cond_event_a3: - c.set(other.c.get()); - break; - case types::cond_event_a5: - c.set(other.c.get()); - break; - case types::cond_event_a4_r17: - c.set(other.c.get()); - break; - case types::cond_event_d1_r17: - c.set(other.c.get()); - break; - case types::cond_event_t1_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cond_trigger_cfg_r16_s::cond_event_id_c_"); + if (sl_rlc_ch_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_rlc_ch_to_add_mod_list_r17, 1, 512)); } - return *this; -} -cond_trigger_cfg_r16_s::cond_event_id_c_::cond_event_a3_s_& -cond_trigger_cfg_r16_s::cond_event_id_c_::set_cond_event_a3() -{ - set(types::cond_event_a3); - return c.get(); -} -cond_trigger_cfg_r16_s::cond_event_id_c_::cond_event_a5_s_& -cond_trigger_cfg_r16_s::cond_event_id_c_::set_cond_event_a5() -{ - set(types::cond_event_a5); - return c.get(); -} -cond_trigger_cfg_r16_s::cond_event_id_c_::cond_event_a4_r17_s_& -cond_trigger_cfg_r16_s::cond_event_id_c_::set_cond_event_a4_r17() -{ - set(types::cond_event_a4_r17); - return c.get(); -} -cond_trigger_cfg_r16_s::cond_event_id_c_::cond_event_d1_r17_s_& -cond_trigger_cfg_r16_s::cond_event_id_c_::set_cond_event_d1_r17() -{ - set(types::cond_event_d1_r17); - return c.get(); -} -cond_trigger_cfg_r16_s::cond_event_id_c_::cond_event_t1_r17_s_& -cond_trigger_cfg_r16_s::cond_event_id_c_::set_cond_event_t1_r17() -{ - set(types::cond_event_t1_r17); - return c.get(); + return SRSASN_SUCCESS; } -void cond_trigger_cfg_r16_s::cond_event_id_c_::to_json(json_writer& j) const +SRSASN_CODE sl_phy_mac_rlc_cfg_v1700_s::unpack(cbit_ref& bref) { - j.start_obj(); - switch (type_) { - case types::cond_event_a3: - j.write_fieldname("condEventA3"); - j.start_obj(); - j.write_fieldname("a3-Offset"); - c.get().a3_offset.to_json(j); - j.write_int("hysteresis", c.get().hysteresis); - j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); - j.end_obj(); - break; - case types::cond_event_a5: - j.write_fieldname("condEventA5"); - 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_int("hysteresis", c.get().hysteresis); - j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); - j.end_obj(); - break; - case types::cond_event_a4_r17: - j.write_fieldname("condEventA4-r17"); - j.start_obj(); - j.write_fieldname("a4-Threshold-r17"); - c.get().a4_thres_r17.to_json(j); - j.write_int("hysteresis-r17", c.get().hysteresis_r17); - j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); - j.end_obj(); - break; - case types::cond_event_d1_r17: - j.write_fieldname("condEventD1-r17"); - j.start_obj(); - j.write_int("distanceThreshFromReference1-r17", c.get().distance_thresh_from_ref1_r17); - j.write_int("distanceThreshFromReference2-r17", c.get().distance_thresh_from_ref2_r17); - j.write_str("referenceLocation1-r17", c.get().ref_location1_r17.to_string()); - j.write_str("referenceLocation2-r17", c.get().ref_location2_r17.to_string()); - j.write_int("hysteresisLocation-r17", c.get().hysteresis_location_r17); - j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); - j.end_obj(); - break; - case types::cond_event_t1_r17: - j.write_fieldname("condEventT1-r17"); - j.start_obj(); - j.write_int("t1-Threshold-r17", c.get().t1_thres_r17); - j.write_int("duration-r17", c.get().dur_r17); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "cond_trigger_cfg_r16_s::cond_event_id_c_"); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_drx_cfg_r17_present, 1)); + bool sl_rlc_ch_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(sl_rlc_ch_to_release_list_r17_present, 1)); + bool sl_rlc_ch_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(sl_rlc_ch_to_add_mod_list_r17_present, 1)); + + if (sl_drx_cfg_r17_present) { + HANDLE_CODE(sl_drx_cfg_r17.unpack(bref)); } - j.end_obj(); -} -SRSASN_CODE cond_trigger_cfg_r16_s::cond_event_id_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cond_event_a3: - HANDLE_CODE(c.get().a3_offset.pack(bref)); - 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::cond_event_a5: - HANDLE_CODE(c.get().a5_thres1.pack(bref)); - HANDLE_CODE(c.get().a5_thres2.pack(bref)); - 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::cond_event_a4_r17: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().a4_thres_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r17, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r17.pack(bref)); - } break; - case types::cond_event_d1_r17: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(pack_integer( - bref, c.get().distance_thresh_from_ref1_r17, (uint16_t)0u, (uint16_t)65525u)); - HANDLE_CODE(pack_integer( - bref, c.get().distance_thresh_from_ref2_r17, (uint16_t)0u, (uint16_t)65525u)); - HANDLE_CODE(c.get().ref_location1_r17.pack(bref)); - HANDLE_CODE(c.get().ref_location2_r17.pack(bref)); - HANDLE_CODE( - pack_integer(bref, c.get().hysteresis_location_r17, (uint16_t)0u, (uint16_t)32768u)); - HANDLE_CODE(c.get().time_to_trigger_r17.pack(bref)); - } break; - case types::cond_event_t1_r17: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE( - pack_integer(bref, c.get().t1_thres_r17, (uint64_t)0u, (uint64_t)549755813887u)); - HANDLE_CODE(pack_integer(bref, c.get().dur_r17, (uint16_t)1u, (uint16_t)6000u)); - } break; - default: - log_invalid_choice_id(type_, "cond_trigger_cfg_r16_s::cond_event_id_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + if (sl_rlc_ch_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_rlc_ch_to_release_list_r17, bref, 1, 512, integer_packer(1, 512))); } - return SRSASN_SUCCESS; -} -SRSASN_CODE cond_trigger_cfg_r16_s::cond_event_id_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cond_event_a3: - HANDLE_CODE(c.get().a3_offset.unpack(bref)); - 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::cond_event_a5: - HANDLE_CODE(c.get().a5_thres1.unpack(bref)); - HANDLE_CODE(c.get().a5_thres2.unpack(bref)); - 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::cond_event_a4_r17: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().a4_thres_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(c.get().hysteresis_r17, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r17.unpack(bref)); - } break; - case types::cond_event_d1_r17: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(unpack_integer( - c.get().distance_thresh_from_ref1_r17, bref, (uint16_t)0u, (uint16_t)65525u)); - HANDLE_CODE(unpack_integer( - c.get().distance_thresh_from_ref2_r17, bref, (uint16_t)0u, (uint16_t)65525u)); - HANDLE_CODE(c.get().ref_location1_r17.unpack(bref)); - HANDLE_CODE(c.get().ref_location2_r17.unpack(bref)); - HANDLE_CODE( - unpack_integer(c.get().hysteresis_location_r17, bref, (uint16_t)0u, (uint16_t)32768u)); - HANDLE_CODE(c.get().time_to_trigger_r17.unpack(bref)); - } break; - case types::cond_event_t1_r17: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE( - unpack_integer(c.get().t1_thres_r17, bref, (uint64_t)0u, (uint64_t)549755813887u)); - HANDLE_CODE(unpack_integer(c.get().dur_r17, bref, (uint16_t)1u, (uint16_t)6000u)); - } break; - default: - log_invalid_choice_id(type_, "cond_trigger_cfg_r16_s::cond_event_id_c_"); - return SRSASN_ERROR_DECODE_FAIL; + if (sl_rlc_ch_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_rlc_ch_to_add_mod_list_r17, bref, 1, 512)); } + return SRSASN_SUCCESS; } - -// RAT-Type ::= ENUMERATED -const char* rat_type_opts::to_string() const +void sl_phy_mac_rlc_cfg_v1700_s::to_json(json_writer& j) const { - static const char* names[] = {"nr", "eutra-nr", "eutra", "utra-fdd-v1610"}; - return convert_enum_idx(names, 4, value, "rat_type_e"); + j.start_obj(); + if (sl_drx_cfg_r17_present) { + j.write_fieldname("sl-DRX-Config-r17"); + sl_drx_cfg_r17.to_json(j); + } + if (sl_rlc_ch_to_release_list_r17.size() > 0) { + j.start_array("sl-RLC-ChannelToReleaseList-r17"); + for (const auto& e1 : sl_rlc_ch_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_rlc_ch_to_add_mod_list_r17.size() > 0) { + j.start_array("sl-RLC-ChannelToAddModList-r17"); + for (const auto& e1 : sl_rlc_ch_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); } -// RxTxTimeDiff-r17 ::= SEQUENCE -SRSASN_CODE rx_tx_time_diff_r17_s::pack(bit_ref& bref) const +// SL-RadioBearerConfig-r16 ::= SEQUENCE +SRSASN_CODE sl_radio_bearer_cfg_r16_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(result_k5_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_sdap_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_pdcp_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_trans_range_r16_present, 1)); - if (result_k5_r17_present) { - HANDLE_CODE(pack_integer(bref, result_k5_r17, (uint16_t)0u, (uint16_t)61565u)); + HANDLE_CODE(pack_integer(bref, slrb_uu_cfg_idx_r16, (uint16_t)1u, (uint16_t)512u)); + if (sl_sdap_cfg_r16_present) { + HANDLE_CODE(sl_sdap_cfg_r16.pack(bref)); + } + if (sl_pdcp_cfg_r16_present) { + HANDLE_CODE(sl_pdcp_cfg_r16.pack(bref)); + } + if (sl_trans_range_r16_present) { + HANDLE_CODE(sl_trans_range_r16.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE rx_tx_time_diff_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_radio_bearer_cfg_r16_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(result_k5_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_sdap_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_pdcp_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_trans_range_r16_present, 1)); - if (result_k5_r17_present) { - HANDLE_CODE(unpack_integer(result_k5_r17, bref, (uint16_t)0u, (uint16_t)61565u)); + HANDLE_CODE(unpack_integer(slrb_uu_cfg_idx_r16, bref, (uint16_t)1u, (uint16_t)512u)); + if (sl_sdap_cfg_r16_present) { + HANDLE_CODE(sl_sdap_cfg_r16.unpack(bref)); + } + if (sl_pdcp_cfg_r16_present) { + HANDLE_CODE(sl_pdcp_cfg_r16.unpack(bref)); + } + if (sl_trans_range_r16_present) { + HANDLE_CODE(sl_trans_range_r16.unpack(bref)); } return SRSASN_SUCCESS; } -void rx_tx_time_diff_r17_s::to_json(json_writer& j) const +void sl_radio_bearer_cfg_r16_s::to_json(json_writer& j) const { j.start_obj(); - if (result_k5_r17_present) { - j.write_int("result-k5-r17", result_k5_r17); + j.write_int("slrb-Uu-ConfigIndex-r16", slrb_uu_cfg_idx_r16); + if (sl_sdap_cfg_r16_present) { + j.write_fieldname("sl-SDAP-Config-r16"); + sl_sdap_cfg_r16.to_json(j); + } + if (sl_pdcp_cfg_r16_present) { + j.write_fieldname("sl-PDCP-Config-r16"); + sl_pdcp_cfg_r16.to_json(j); + } + if (sl_trans_range_r16_present) { + j.write_str("sl-TransRange-r16", sl_trans_range_r16.to_string()); } j.end_obj(); } -// TraceReference-r16 ::= SEQUENCE -SRSASN_CODE trace_ref_r16_s::pack(bit_ref& bref) const +const char* sl_radio_bearer_cfg_r16_s::sl_trans_range_r16_opts::to_string() const +{ + static const char* names[] = {"m20", "m50", "m80", "m100", "m120", "m150", "m180", "m200", + "m220", "m250", "m270", "m300", "m350", "m370", "m400", "m420", + "m450", "m480", "m500", "m550", "m600", "m700", "m1000", "spare9", + "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 32, value, "sl_radio_bearer_cfg_r16_s::sl_trans_range_r16_e_"); +} +uint16_t sl_radio_bearer_cfg_r16_s::sl_trans_range_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {20, 50, 80, 100, 120, 150, 180, 200, 220, 250, 270, 300, + 350, 370, 400, 420, 450, 480, 500, 550, 600, 700, 1000}; + return map_enum_number(numbers, 23, value, "sl_radio_bearer_cfg_r16_s::sl_trans_range_r16_e_"); +} + +// SL-SRAP-Config-r17 ::= SEQUENCE +SRSASN_CODE sl_srap_cfg_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(plmn_id_r16.pack(bref)); - HANDLE_CODE(trace_id_r16.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_local_id_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_map_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_map_to_release_list_r17.size() > 0, 1)); + + if (sl_local_id_r17_present) { + HANDLE_CODE(pack_integer(bref, sl_local_id_r17, (uint16_t)0u, (uint16_t)255u)); + } + if (sl_map_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_map_to_add_mod_list_r17, 1, 32)); + } + if (sl_map_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_map_to_release_list_r17, 1, 32)); + } return SRSASN_SUCCESS; } -SRSASN_CODE trace_ref_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_srap_cfg_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(plmn_id_r16.unpack(bref)); - HANDLE_CODE(trace_id_r16.unpack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_local_id_r17_present, 1)); + bool sl_map_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(sl_map_to_add_mod_list_r17_present, 1)); + bool sl_map_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(sl_map_to_release_list_r17_present, 1)); + + if (sl_local_id_r17_present) { + HANDLE_CODE(unpack_integer(sl_local_id_r17, bref, (uint16_t)0u, (uint16_t)255u)); + } + if (sl_map_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_map_to_add_mod_list_r17, bref, 1, 32)); + } + if (sl_map_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_map_to_release_list_r17, bref, 1, 32)); + } return SRSASN_SUCCESS; } -void trace_ref_r16_s::to_json(json_writer& j) const +void sl_srap_cfg_r17_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("plmn-Identity-r16"); - plmn_id_r16.to_json(j); - j.write_str("traceId-r16", trace_id_r16.to_string()); + if (sl_local_id_r17_present) { + j.write_int("sl-LocalIdentity-r17", sl_local_id_r17); + } + if (sl_map_to_add_mod_list_r17.size() > 0) { + j.start_array("sl-MappingToAddModList-r17"); + for (const auto& e1 : sl_map_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_map_to_release_list_r17.size() > 0) { + j.start_array("sl-MappingToReleaseList-r17"); + for (const auto& e1 : sl_map_to_release_list_r17) { + e1.to_json(j); + } + j.end_array(); + } j.end_obj(); } -// EstablishmentCause ::= ENUMERATED -const char* establishment_cause_opts::to_string() const +// SL-ConfigDedicatedNR-r16 ::= SEQUENCE +SRSASN_CODE sl_cfg_ded_nr_r16_s::pack(bit_ref& bref) const { - static const char* names[] = {"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(names, 16, value, "establishment_cause_e"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_phy_mac_rlc_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_radio_bearer_to_release_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_radio_bearer_to_add_mod_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_meas_cfg_info_to_release_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_meas_cfg_info_to_add_mod_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(t400_r16_present, 1)); -// InitialUE-Identity ::= CHOICE -void init_ue_id_c::destroy_() -{ - switch (type_) { - case types::ng_5_g_s_tmsi_part1: - c.destroy>(); - break; - case types::random_value: - c.destroy>(); - break; - default: - break; + if (sl_phy_mac_rlc_cfg_r16_present) { + HANDLE_CODE(sl_phy_mac_rlc_cfg_r16.pack(bref)); } -} -void init_ue_id_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::ng_5_g_s_tmsi_part1: - c.init>(); - break; - case types::random_value: - c.init>(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "init_ue_id_c"); + if (sl_radio_bearer_to_release_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_radio_bearer_to_release_list_r16, 1, 512, integer_packer(1, 512))); } -} -init_ue_id_c::init_ue_id_c(const init_ue_id_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::ng_5_g_s_tmsi_part1: - c.init(other.c.get>()); - break; - case types::random_value: - c.init(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "init_ue_id_c"); + if (sl_radio_bearer_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_radio_bearer_to_add_mod_list_r16, 1, 512)); } -} -init_ue_id_c& init_ue_id_c::operator=(const init_ue_id_c& other) -{ - if (this == &other) { - return *this; + if (sl_meas_cfg_info_to_release_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_meas_cfg_info_to_release_list_r16, 1, 32, integer_packer(0, 31))); } - set(other.type()); - switch (type_) { - case types::ng_5_g_s_tmsi_part1: - c.set(other.c.get>()); - break; - case types::random_value: - c.set(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "init_ue_id_c"); + if (sl_meas_cfg_info_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_meas_cfg_info_to_add_mod_list_r16, 1, 32)); + } + if (t400_r16_present) { + HANDLE_CODE(t400_r16.pack(bref)); } - return *this; -} -fixed_bitstring<39>& init_ue_id_c::set_ng_5_g_s_tmsi_part1() -{ - set(types::ng_5_g_s_tmsi_part1); - return c.get>(); -} -fixed_bitstring<39>& init_ue_id_c::set_random_value() -{ - set(types::random_value); - return c.get>(); -} -void init_ue_id_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ng_5_g_s_tmsi_part1: - j.write_str("ng-5G-S-TMSI-Part1", c.get>().to_string()); - break; - case types::random_value: - j.write_str("randomValue", c.get>().to_string()); - break; - default: - log_invalid_choice_id(type_, "init_ue_id_c"); + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= sl_phy_mac_rlc_cfg_v1700.is_present(); + group_flags[0] |= sl_disc_cfg_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sl_phy_mac_rlc_cfg_v1700.is_present(), 1)); + HANDLE_CODE(bref.pack(sl_disc_cfg_r17.is_present(), 1)); + if (sl_phy_mac_rlc_cfg_v1700.is_present()) { + HANDLE_CODE(sl_phy_mac_rlc_cfg_v1700->pack(bref)); + } + if (sl_disc_cfg_r17.is_present()) { + HANDLE_CODE(sl_disc_cfg_r17->pack(bref)); + } + } } - j.end_obj(); + return SRSASN_SUCCESS; } -SRSASN_CODE init_ue_id_c::pack(bit_ref& bref) const +SRSASN_CODE sl_cfg_ded_nr_r16_s::unpack(cbit_ref& bref) { - type_.pack(bref); - switch (type_) { - case types::ng_5_g_s_tmsi_part1: - HANDLE_CODE(c.get>().pack(bref)); - break; - case types::random_value: - HANDLE_CODE(c.get>().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "init_ue_id_c"); - return SRSASN_ERROR_ENCODE_FAIL; + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_phy_mac_rlc_cfg_r16_present, 1)); + bool sl_radio_bearer_to_release_list_r16_present; + HANDLE_CODE(bref.unpack(sl_radio_bearer_to_release_list_r16_present, 1)); + bool sl_radio_bearer_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(sl_radio_bearer_to_add_mod_list_r16_present, 1)); + bool sl_meas_cfg_info_to_release_list_r16_present; + HANDLE_CODE(bref.unpack(sl_meas_cfg_info_to_release_list_r16_present, 1)); + bool sl_meas_cfg_info_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(sl_meas_cfg_info_to_add_mod_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(t400_r16_present, 1)); + + if (sl_phy_mac_rlc_cfg_r16_present) { + HANDLE_CODE(sl_phy_mac_rlc_cfg_r16.unpack(bref)); + } + if (sl_radio_bearer_to_release_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_radio_bearer_to_release_list_r16, bref, 1, 512, integer_packer(1, 512))); + } + if (sl_radio_bearer_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_radio_bearer_to_add_mod_list_r16, bref, 1, 512)); + } + if (sl_meas_cfg_info_to_release_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_meas_cfg_info_to_release_list_r16, bref, 1, 32, integer_packer(0, 31))); } - return SRSASN_SUCCESS; -} -SRSASN_CODE init_ue_id_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ng_5_g_s_tmsi_part1: - HANDLE_CODE(c.get>().unpack(bref)); - break; - case types::random_value: - HANDLE_CODE(c.get>().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "init_ue_id_c"); - return SRSASN_ERROR_DECODE_FAIL; + if (sl_meas_cfg_info_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_meas_cfg_info_to_add_mod_list_r16, bref, 1, 32)); + } + if (t400_r16_present) { + HANDLE_CODE(t400_r16.unpack(bref)); } - return SRSASN_SUCCESS; -} -// ReestabUE-Identity ::= SEQUENCE -SRSASN_CODE reestab_ue_id_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)); + if (ext) { + ext_groups_unpacker_guard group_flags(1); + group_flags.unpack(bref); - return SRSASN_SUCCESS; -} -SRSASN_CODE reestab_ue_id_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)); + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + unpack_presence_flag(sl_phy_mac_rlc_cfg_v1700, bref); + unpack_presence_flag(sl_disc_cfg_r17, bref); + if (sl_phy_mac_rlc_cfg_v1700.is_present()) { + HANDLE_CODE(sl_phy_mac_rlc_cfg_v1700->unpack(bref)); + } + if (sl_disc_cfg_r17.is_present()) { + HANDLE_CODE(sl_disc_cfg_r17->unpack(bref)); + } + } + } return SRSASN_SUCCESS; } -void reestab_ue_id_s::to_json(json_writer& j) const +void sl_cfg_ded_nr_r16_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()); + if (sl_phy_mac_rlc_cfg_r16_present) { + j.write_fieldname("sl-PHY-MAC-RLC-Config-r16"); + sl_phy_mac_rlc_cfg_r16.to_json(j); + } + if (sl_radio_bearer_to_release_list_r16.size() > 0) { + j.start_array("sl-RadioBearerToReleaseList-r16"); + for (const auto& e1 : sl_radio_bearer_to_release_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_radio_bearer_to_add_mod_list_r16.size() > 0) { + j.start_array("sl-RadioBearerToAddModList-r16"); + for (const auto& e1 : sl_radio_bearer_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_meas_cfg_info_to_release_list_r16.size() > 0) { + j.start_array("sl-MeasConfigInfoToReleaseList-r16"); + for (const auto& e1 : sl_meas_cfg_info_to_release_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_meas_cfg_info_to_add_mod_list_r16.size() > 0) { + j.start_array("sl-MeasConfigInfoToAddModList-r16"); + for (const auto& e1 : sl_meas_cfg_info_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (t400_r16_present) { + j.write_str("t400-r16", t400_r16.to_string()); + } + if (ext) { + if (sl_phy_mac_rlc_cfg_v1700.is_present()) { + j.write_fieldname("sl-PHY-MAC-RLC-Config-v1700"); + sl_phy_mac_rlc_cfg_v1700->to_json(j); + } + if (sl_disc_cfg_r17.is_present()) { + j.write_fieldname("sl-DiscConfig-r17"); + sl_disc_cfg_r17->to_json(j); + } + } j.end_obj(); } -// ReestablishmentCause ::= ENUMERATED -const char* reest_cause_opts::to_string() const +const char* sl_cfg_ded_nr_r16_s::t400_r16_opts::to_string() const { - static const char* names[] = {"reconfigurationFailure", "handoverFailure", "otherFailure", "spare1"}; - return convert_enum_idx(names, 4, value, "reest_cause_e"); + static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + return convert_enum_idx(names, 8, value, "sl_cfg_ded_nr_r16_s::t400_r16_e_"); } - -// ResumeCause ::= ENUMERATED -const char* resume_cause_opts::to_string() const +uint16_t sl_cfg_ded_nr_r16_s::t400_r16_opts::to_number() const { - static const char* names[] = {"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(names, 16, value, "resume_cause_e"); + static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(numbers, 8, value, "sl_cfg_ded_nr_r16_s::t400_r16_e_"); } -// RRC-PosSystemInfoRequest-r16-IEs ::= SEQUENCE -SRSASN_CODE rrc_pos_sys_info_request_r16_ies_s::pack(bit_ref& bref) const +// SL-L2RemoteUE-Config-r17 ::= SEQUENCE +SRSASN_CODE sl_l2_remote_ue_cfg_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(requested_pos_si_list.pack(bref)); - HANDLE_CODE(spare.pack(bref)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_srap_cfg_remote_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_ue_id_remote_r17_present, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_pos_sys_info_request_r16_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(requested_pos_si_list.unpack(bref)); - HANDLE_CODE(spare.unpack(bref)); + if (sl_srap_cfg_remote_r17_present) { + HANDLE_CODE(sl_srap_cfg_remote_r17.pack(bref)); + } + if (sl_ue_id_remote_r17_present) { + HANDLE_CODE(pack_integer(bref, sl_ue_id_remote_r17, (uint32_t)0u, (uint32_t)65535u)); + } return SRSASN_SUCCESS; } -void rrc_pos_sys_info_request_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("requestedPosSI-List", requested_pos_si_list.to_string()); - j.write_str("spare", spare.to_string()); - j.end_obj(); -} - -// RRCReestablishmentRequest-IEs ::= SEQUENCE -SRSASN_CODE rrc_reest_request_ies_s::pack(bit_ref& bref) const +SRSASN_CODE sl_l2_remote_ue_cfg_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(ue_id.pack(bref)); - HANDLE_CODE(reest_cause.pack(bref)); - HANDLE_CODE(spare.pack(bref)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_srap_cfg_remote_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_ue_id_remote_r17_present, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_reest_request_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(ue_id.unpack(bref)); - HANDLE_CODE(reest_cause.unpack(bref)); - HANDLE_CODE(spare.unpack(bref)); + if (sl_srap_cfg_remote_r17_present) { + HANDLE_CODE(sl_srap_cfg_remote_r17.unpack(bref)); + } + if (sl_ue_id_remote_r17_present) { + HANDLE_CODE(unpack_integer(sl_ue_id_remote_r17, bref, (uint32_t)0u, (uint32_t)65535u)); + } return SRSASN_SUCCESS; } -void rrc_reest_request_ies_s::to_json(json_writer& j) const +void sl_l2_remote_ue_cfg_r17_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 (sl_srap_cfg_remote_r17_present) { + j.write_fieldname("sl-SRAP-ConfigRemote-r17"); + sl_srap_cfg_remote_r17.to_json(j); + } + if (sl_ue_id_remote_r17_present) { + j.write_int("sl-UEIdentityRemote-r17", sl_ue_id_remote_r17); + } j.end_obj(); } -// RRCResumeRequest-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_request_ies_s::pack(bit_ref& bref) const +// RRCSetup-v1700-IEs ::= SEQUENCE +SRSASN_CODE rrc_setup_v1700_ies_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(sl_cfg_ded_nr_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_l2_remote_ue_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_request_ies_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)); + if (sl_cfg_ded_nr_r17_present) { + HANDLE_CODE(sl_cfg_ded_nr_r17.pack(bref)); + } + if (sl_l2_remote_ue_cfg_r17_present) { + HANDLE_CODE(sl_l2_remote_ue_cfg_r17.pack(bref)); + } return SRSASN_SUCCESS; } -void rrc_resume_request_ies_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()); - j.end_obj(); -} - -// RRCSetupRequest-IEs ::= SEQUENCE -SRSASN_CODE rrc_setup_request_ies_s::pack(bit_ref& bref) const +SRSASN_CODE rrc_setup_v1700_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(ue_id.pack(bref)); - HANDLE_CODE(establishment_cause.pack(bref)); - HANDLE_CODE(spare.pack(bref)); + HANDLE_CODE(bref.unpack(sl_cfg_ded_nr_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_l2_remote_ue_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_setup_request_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(ue_id.unpack(bref)); - HANDLE_CODE(establishment_cause.unpack(bref)); - HANDLE_CODE(spare.unpack(bref)); + if (sl_cfg_ded_nr_r17_present) { + HANDLE_CODE(sl_cfg_ded_nr_r17.unpack(bref)); + } + if (sl_l2_remote_ue_cfg_r17_present) { + HANDLE_CODE(sl_l2_remote_ue_cfg_r17.unpack(bref)); + } return SRSASN_SUCCESS; } -void rrc_setup_request_ies_s::to_json(json_writer& j) const +void rrc_setup_v1700_ies_s::to_json(json_writer& j) 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()); + if (sl_cfg_ded_nr_r17_present) { + j.write_fieldname("sl-ConfigDedicatedNR-r17"); + sl_cfg_ded_nr_r17.to_json(j); + } + if (sl_l2_remote_ue_cfg_r17_present) { + j.write_fieldname("sl-L2RemoteUE-Config-r17"); + sl_l2_remote_ue_cfg_r17.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } j.end_obj(); } -// RRCSystemInfoRequest-IEs ::= SEQUENCE -SRSASN_CODE rrc_sys_info_request_ies_s::pack(bit_ref& bref) const +// RRCReject-IEs ::= SEQUENCE +SRSASN_CODE rrc_reject_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(requested_si_list.pack(bref)); - HANDLE_CODE(spare.pack(bref)); + HANDLE_CODE(bref.pack(wait_time_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_sys_info_request_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(requested_si_list.unpack(bref)); - HANDLE_CODE(spare.unpack(bref)); + if (wait_time_present) { + HANDLE_CODE(pack_integer(bref, wait_time, (uint8_t)1u, (uint8_t)16u)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } -void rrc_sys_info_request_ies_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.end_obj(); -} - -// RRCReestablishmentRequest ::= SEQUENCE -SRSASN_CODE rrc_reest_request_s::pack(bit_ref& bref) const +SRSASN_CODE rrc_reject_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(rrc_reest_request.pack(bref)); + HANDLE_CODE(bref.unpack(wait_time_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_reest_request_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(rrc_reest_request.unpack(bref)); + 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_reest_request_s::to_json(json_writer& j) const +void rrc_reject_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("rrcReestablishmentRequest"); - rrc_reest_request.to_json(j); + if (wait_time_present) { + j.write_int("waitTime", wait_time); + } + if (late_non_crit_ext.size() > 0) { + 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(); } -// RRCResumeRequest ::= SEQUENCE -SRSASN_CODE rrc_resume_request_s::pack(bit_ref& bref) const +// RRCSetup-IEs ::= SEQUENCE +SRSASN_CODE rrc_setup_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(rrc_resume_request.pack(bref)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_request_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(rrc_resume_request.unpack(bref)); + HANDLE_CODE(radio_bearer_cfg.pack(bref)); + HANDLE_CODE(master_cell_group.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(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(); -} - -// RRCSetupRequest ::= SEQUENCE -SRSASN_CODE rrc_setup_request_s::pack(bit_ref& bref) const +SRSASN_CODE rrc_setup_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(rrc_setup_request.pack(bref)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_setup_request_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(rrc_setup_request.unpack(bref)); + 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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } -void rrc_setup_request_s::to_json(json_writer& j) const +void rrc_setup_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("rrcSetupRequest"); - rrc_setup_request.to_json(j); + j.write_fieldname("radioBearerConfig"); + radio_bearer_cfg.to_json(j); + j.write_str("masterCellGroup", master_cell_group.to_string()); + if (late_non_crit_ext.size() > 0) { + 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(); } -// RRCSystemInfoRequest ::= SEQUENCE -SRSASN_CODE rrc_sys_info_request_s::pack(bit_ref& bref) const +// RRCReject ::= SEQUENCE +SRSASN_CODE rrc_reject_s::pack(bit_ref& bref) const { HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE rrc_sys_info_request_s::unpack(cbit_ref& bref) +SRSASN_CODE rrc_reject_s::unpack(cbit_ref& bref) { HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void rrc_sys_info_request_s::to_json(json_writer& j) const +void rrc_reject_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("criticalExtensions"); @@ -12130,469 +8619,160 @@ void rrc_sys_info_request_s::to_json(json_writer& j) const j.end_obj(); } -void rrc_sys_info_request_s::crit_exts_c_::destroy_() -{ - switch (type_) { - case types::rrc_sys_info_request: - c.destroy(); - break; - case types::crit_exts_future_r16: - c.destroy(); - break; - default: - break; - } -} -void rrc_sys_info_request_s::crit_exts_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::rrc_sys_info_request: - c.init(); - break; - case types::crit_exts_future_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); - } -} -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::rrc_sys_info_request: - c.init(other.c.get()); - break; - case types::crit_exts_future_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); - } -} -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::rrc_sys_info_request: - c.set(other.c.get()); - break; - case types::crit_exts_future_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); - } - - return *this; -} -rrc_sys_info_request_ies_s& rrc_sys_info_request_s::crit_exts_c_::set_rrc_sys_info_request() -{ - set(types::rrc_sys_info_request); - return c.get(); -} -rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_& -rrc_sys_info_request_s::crit_exts_c_::set_crit_exts_future_r16() -{ - set(types::crit_exts_future_r16); - return c.get(); -} -void rrc_sys_info_request_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rrc_sys_info_request: - j.write_fieldname("rrcSystemInfoRequest"); - c.get().to_json(j); - break; - case types::crit_exts_future_r16: - j.write_fieldname("criticalExtensionsFuture-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); - } - 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: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::crit_exts_future_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::rrc_sys_info_request: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::crit_exts_future_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::set(types::options e) +void rrc_reject_s::crit_exts_c_::set(types::options e) { type_ = e; } -rrc_pos_sys_info_request_r16_ies_s& -rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::set_rrc_pos_sys_info_request_r16() +rrc_reject_ies_s& rrc_reject_s::crit_exts_c_::set_rrc_reject() { - set(types::rrc_pos_sys_info_request_r16); + set(types::rrc_reject); return c; } -void rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::set_crit_exts_future() +void rrc_reject_s::crit_exts_c_::set_crit_exts_future() { set(types::crit_exts_future); } -void rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_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::rrc_pos_sys_info_request_r16: - j.write_fieldname("rrcPosSystemInfoRequest-r16"); + case types::rrc_reject: + j.write_fieldname("rrcReject"); c.to_json(j); break; case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_"); + log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_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::rrc_pos_sys_info_request_r16: + case types::rrc_reject: HANDLE_CODE(c.pack(bref)); break; case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_"); + log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_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::rrc_pos_sys_info_request_r16: + case types::rrc_reject: HANDLE_CODE(c.unpack(bref)); break; case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_"); + log_invalid_choice_id(type_, "rrc_reject_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -// UL-CCCH-MessageType ::= CHOICE -void ul_ccch_msg_type_c::set(types::options e) +const char* rrc_reject_s::crit_exts_c_::types_opts::to_string() const { - type_ = e; + static const char* names[] = {"rrcReject", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "rrc_reject_s::crit_exts_c_::types"); } -ul_ccch_msg_type_c::c1_c_& ul_ccch_msg_type_c::set_c1() + +// RRCSetup ::= SEQUENCE +SRSASN_CODE rrc_setup_s::pack(bit_ref& bref) const { - set(types::c1); - return c; + HANDLE_CODE(pack_integer(bref, rrc_transaction_id, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; } -void ul_ccch_msg_type_c::set_msg_class_ext() +SRSASN_CODE rrc_setup_s::unpack(cbit_ref& bref) { - set(types::msg_class_ext); + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; } -void ul_ccch_msg_type_c::to_json(json_writer& j) const +void rrc_setup_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.to_json(j); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); - } + j.write_int("rrc-TransactionIdentifier", rrc_transaction_id); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -SRSASN_CODE ul_ccch_msg_type_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::c1: - HANDLE_CODE(c.pack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_ccch_msg_type_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.unpack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} -void ul_ccch_msg_type_c::c1_c_::destroy_() -{ - 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; - } -} -void ul_ccch_msg_type_c::c1_c_::set(types::options e) +void rrc_setup_s::crit_exts_c_::set(types::options e) { - 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_"); - } -} -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::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_"); - } -} -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::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_"); - } - - return *this; -} -rrc_setup_request_s& ul_ccch_msg_type_c::c1_c_::set_rrc_setup_request() -{ - set(types::rrc_setup_request); - return c.get(); -} -rrc_resume_request_s& ul_ccch_msg_type_c::c1_c_::set_rrc_resume_request() -{ - set(types::rrc_resume_request); - return c.get(); } -rrc_reest_request_s& ul_ccch_msg_type_c::c1_c_::set_rrc_reest_request() +rrc_setup_ies_s& rrc_setup_s::crit_exts_c_::set_rrc_setup() { - set(types::rrc_reest_request); - return c.get(); + set(types::rrc_setup); + return c; } -rrc_sys_info_request_s& ul_ccch_msg_type_c::c1_c_::set_rrc_sys_info_request() +void rrc_setup_s::crit_exts_c_::set_crit_exts_future() { - set(types::rrc_sys_info_request); - return c.get(); + set(types::crit_exts_future); } -void ul_ccch_msg_type_c::c1_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::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); + case types::rrc_setup: + j.write_fieldname("rrcSetup"); + c.to_json(j); break; - case types::rrc_sys_info_request: - j.write_fieldname("rrcSystemInfoRequest"); - c.get().to_json(j); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE ul_ccch_msg_type_c::c1_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::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)); + case types::rrc_setup: + HANDLE_CODE(c.pack(bref)); break; - case types::rrc_sys_info_request: - HANDLE_CODE(c.get().pack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE ul_ccch_msg_type_c::c1_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::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)); + case types::rrc_setup: + HANDLE_CODE(c.unpack(bref)); break; - case types::rrc_sys_info_request: - HANDLE_CODE(c.get().unpack(bref)); + case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "rrc_setup_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -// UL-CCCH-Message ::= SEQUENCE -SRSASN_CODE ul_ccch_msg_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(msg.pack(bref)); - - bref.align_bytes_zero(); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_ccch_msg_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(msg.unpack(bref)); - - bref.align_bytes(); - - return SRSASN_SUCCESS; -} -void ul_ccch_msg_s::to_json(json_writer& j) const +const char* rrc_setup_s::crit_exts_c_::types_opts::to_string() 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.end_obj(); - j.end_array(); + static const char* names[] = {"rrcSetup", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "rrc_setup_s::crit_exts_c_::types"); } diff --git a/lib/asn1/rrc_nr/dl_dcch_msg.cpp b/lib/asn1/rrc_nr/dl_dcch_msg.cpp index 2d2553dea2..584538bdf4 100644 --- a/lib/asn1/rrc_nr/dl_dcch_msg.cpp +++ b/lib/asn1/rrc_nr/dl_dcch_msg.cpp @@ -9,17256 +9,13 @@ */ #include "srsran/asn1/rrc_nr/dl_dcch_msg.h" -#include - -using namespace asn1; -using namespace asn1::rrc_nr; - -/******************************************************************************* - * Struct Methods - ******************************************************************************/ - -// PCI-Range ::= SEQUENCE -SRSASN_CODE pci_range_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(range_present, 1)); - - HANDLE_CODE(pack_integer(bref, start, (uint16_t)0u, (uint16_t)1007u)); - if (range_present) { - HANDLE_CODE(range.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pci_range_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(range_present, 1)); - - HANDLE_CODE(unpack_integer(start, bref, (uint16_t)0u, (uint16_t)1007u)); - if (range_present) { - HANDLE_CODE(range.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void pci_range_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("start", start); - if (range_present) { - j.write_str("range", range.to_string()); - } - j.end_obj(); -} - -const char* pci_range_s::range_opts::to_string() const -{ - static const char* names[] = {"n4", - "n8", - "n12", - "n16", - "n24", - "n32", - "n48", - "n64", - "n84", - "n96", - "n128", - "n168", - "n252", - "n504", - "n1008", - "spare1"}; - return convert_enum_idx(names, 16, value, "pci_range_s::range_e_"); -} -uint16_t pci_range_s::range_opts::to_number() const -{ - static const uint16_t numbers[] = {4, 8, 12, 16, 24, 32, 48, 64, 84, 96, 128, 168, 252, 504, 1008}; - return map_enum_number(numbers, 15, value, "pci_range_s::range_e_"); -} - -// CellReselectionSubPriority ::= ENUMERATED -const char* cell_resel_sub_prio_opts::to_string() const -{ - static const char* names[] = {"oDot2", "oDot4", "oDot6", "oDot8"}; - return convert_enum_idx(names, 4, value, "cell_resel_sub_prio_e"); -} -float cell_resel_sub_prio_opts::to_number() const -{ - static const float numbers[] = {0.2, 0.4, 0.6, 0.8}; - return map_enum_number(numbers, 4, value, "cell_resel_sub_prio_e"); -} -const char* cell_resel_sub_prio_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.2", "0.4", "0.6", "0.8"}; - return convert_enum_idx(number_strs, 4, value, "cell_resel_sub_prio_e"); -} - -// EUTRA-Q-OffsetRange ::= ENUMERATED -const char* eutra_q_offset_range_opts::to_string() const -{ - static const char* names[] = {"dB-24", "dB-22", "dB-20", "dB-18", "dB-16", "dB-14", "dB-12", "dB-10", - "dB-8", "dB-6", "dB-5", "dB-4", "dB-3", "dB-2", "dB-1", "dB0", - "dB1", "dB2", "dB3", "dB4", "dB5", "dB6", "dB8", "dB10", - "dB12", "dB14", "dB16", "dB18", "dB20", "dB22", "dB24"}; - return convert_enum_idx(names, 31, value, "eutra_q_offset_range_e"); -} -int8_t eutra_q_offset_range_opts::to_number() const -{ - static const int8_t numbers[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, - 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; - return map_enum_number(numbers, 31, value, "eutra_q_offset_range_e"); -} - -// NSAG-IdentityInfo-r17 ::= SEQUENCE -SRSASN_CODE nsag_id_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(tac_r17_present, 1)); - - HANDLE_CODE(nsag_id_r17.pack(bref)); - if (tac_r17_present) { - HANDLE_CODE(tac_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE nsag_id_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(tac_r17_present, 1)); - - HANDLE_CODE(nsag_id_r17.unpack(bref)); - if (tac_r17_present) { - HANDLE_CODE(tac_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void nsag_id_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("nsag-ID-r17", nsag_id_r17.to_string()); - if (tac_r17_present) { - j.write_str("trackingAreaCode-r17", tac_r17.to_string()); - } - j.end_obj(); -} - -// Orbital-r17 ::= SEQUENCE -SRSASN_CODE orbital_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, semi_major_axis_r17, (uint64_t)0u, (uint64_t)8589934591u)); - HANDLE_CODE(pack_integer(bref, eccentricity_r17, (uint32_t)0u, (uint32_t)1048575u)); - HANDLE_CODE(pack_integer(bref, periapsis_r17, (uint32_t)0u, (uint32_t)268435455u)); - HANDLE_CODE(pack_integer(bref, longitude_r17, (uint32_t)0u, (uint32_t)268435455u)); - HANDLE_CODE(pack_integer(bref, inclination_r17, (int32_t)-67108864, (int32_t)67108863)); - HANDLE_CODE(pack_integer(bref, mean_anomaly_r17, (uint32_t)0u, (uint32_t)268435455u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE orbital_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(semi_major_axis_r17, bref, (uint64_t)0u, (uint64_t)8589934591u)); - HANDLE_CODE(unpack_integer(eccentricity_r17, bref, (uint32_t)0u, (uint32_t)1048575u)); - HANDLE_CODE(unpack_integer(periapsis_r17, bref, (uint32_t)0u, (uint32_t)268435455u)); - HANDLE_CODE(unpack_integer(longitude_r17, bref, (uint32_t)0u, (uint32_t)268435455u)); - HANDLE_CODE(unpack_integer(inclination_r17, bref, (int32_t)-67108864, (int32_t)67108863)); - HANDLE_CODE(unpack_integer(mean_anomaly_r17, bref, (uint32_t)0u, (uint32_t)268435455u)); - - return SRSASN_SUCCESS; -} -void orbital_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("semiMajorAxis-r17", semi_major_axis_r17); - j.write_int("eccentricity-r17", eccentricity_r17); - j.write_int("periapsis-r17", periapsis_r17); - j.write_int("longitude-r17", longitude_r17); - j.write_int("inclination-r17", inclination_r17); - j.write_int("meanAnomaly-r17", mean_anomaly_r17); - j.end_obj(); -} - -// PositionVelocity-r17 ::= SEQUENCE -SRSASN_CODE position_velocity_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, position_x_r17, (int32_t)-33554432, (int32_t)33554431)); - HANDLE_CODE(pack_integer(bref, position_y_r17, (int32_t)-33554432, (int32_t)33554431)); - HANDLE_CODE(pack_integer(bref, position_z_r17, (int32_t)-33554432, (int32_t)33554431)); - HANDLE_CODE(pack_integer(bref, velocity_vx_r17, (int32_t)-131072, (int32_t)131071)); - HANDLE_CODE(pack_integer(bref, velocity_vy_r17, (int32_t)-131072, (int32_t)131071)); - HANDLE_CODE(pack_integer(bref, velocity_vz_r17, (int32_t)-131072, (int32_t)131071)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE position_velocity_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(position_x_r17, bref, (int32_t)-33554432, (int32_t)33554431)); - HANDLE_CODE(unpack_integer(position_y_r17, bref, (int32_t)-33554432, (int32_t)33554431)); - HANDLE_CODE(unpack_integer(position_z_r17, bref, (int32_t)-33554432, (int32_t)33554431)); - HANDLE_CODE(unpack_integer(velocity_vx_r17, bref, (int32_t)-131072, (int32_t)131071)); - HANDLE_CODE(unpack_integer(velocity_vy_r17, bref, (int32_t)-131072, (int32_t)131071)); - HANDLE_CODE(unpack_integer(velocity_vz_r17, bref, (int32_t)-131072, (int32_t)131071)); - - return SRSASN_SUCCESS; -} -void position_velocity_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("positionX-r17", position_x_r17); - j.write_int("positionY-r17", position_y_r17); - j.write_int("positionZ-r17", position_z_r17); - j.write_int("velocityVX-r17", velocity_vx_r17); - j.write_int("velocityVY-r17", velocity_vy_r17); - j.write_int("velocityVZ-r17", velocity_vz_r17); - j.end_obj(); -} - -// Q-OffsetRange ::= ENUMERATED -const char* q_offset_range_opts::to_string() const -{ - static const char* names[] = {"dB-24", "dB-22", "dB-20", "dB-18", "dB-16", "dB-14", "dB-12", "dB-10", - "dB-8", "dB-6", "dB-5", "dB-4", "dB-3", "dB-2", "dB-1", "dB0", - "dB1", "dB2", "dB3", "dB4", "dB5", "dB6", "dB8", "dB10", - "dB12", "dB14", "dB16", "dB18", "dB20", "dB22", "dB24"}; - return convert_enum_idx(names, 31, value, "q_offset_range_e"); -} -int8_t q_offset_range_opts::to_number() const -{ - static const int8_t numbers[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, - 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; - return map_enum_number(numbers, 31, value, "q_offset_range_e"); -} - -// SSB-PositionQCL-Relation-r16 ::= ENUMERATED -const char* ssb_position_qcl_relation_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n4", "n8"}; - return convert_enum_idx(names, 4, value, "ssb_position_qcl_relation_r16_e"); -} -uint8_t ssb_position_qcl_relation_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "ssb_position_qcl_relation_r16_e"); -} - -// SSB-PositionQCL-Relation-r17 ::= ENUMERATED -const char* ssb_position_qcl_relation_r17_opts::to_string() const -{ - static const char* names[] = {"n32", "n64"}; - return convert_enum_idx(names, 2, value, "ssb_position_qcl_relation_r17_e"); -} -uint8_t ssb_position_qcl_relation_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {32, 64}; - return map_enum_number(numbers, 2, value, "ssb_position_qcl_relation_r17_e"); -} - -// EUTRA-PhysCellIdRange ::= SEQUENCE -SRSASN_CODE eutra_pci_range_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(range_present, 1)); - - HANDLE_CODE(pack_integer(bref, start, (uint16_t)0u, (uint16_t)503u)); - if (range_present) { - HANDLE_CODE(range.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE eutra_pci_range_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(range_present, 1)); - - HANDLE_CODE(unpack_integer(start, bref, (uint16_t)0u, (uint16_t)503u)); - if (range_present) { - HANDLE_CODE(range.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void eutra_pci_range_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("start", start); - if (range_present) { - j.write_str("range", range.to_string()); - } - j.end_obj(); -} - -const char* eutra_pci_range_s::range_opts::to_string() const -{ - static const char* names[] = {"n4", - "n8", - "n12", - "n16", - "n24", - "n32", - "n48", - "n64", - "n84", - "n96", - "n128", - "n168", - "n252", - "n504", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "eutra_pci_range_s::range_e_"); -} -uint16_t eutra_pci_range_s::range_opts::to_number() const -{ - static const uint16_t numbers[] = {4, 8, 12, 16, 24, 32, 48, 64, 84, 96, 128, 168, 252, 504}; - return map_enum_number(numbers, 14, value, "eutra_pci_range_s::range_e_"); -} - -// EphemerisInfo-r17 ::= CHOICE -void ephemeris_info_r17_c::destroy_() -{ - switch (type_) { - case types::position_velocity_r17: - c.destroy(); - break; - case types::orbital_r17: - c.destroy(); - break; - default: - break; - } -} -void ephemeris_info_r17_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::position_velocity_r17: - c.init(); - break; - case types::orbital_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ephemeris_info_r17_c"); - } -} -ephemeris_info_r17_c::ephemeris_info_r17_c(const ephemeris_info_r17_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::position_velocity_r17: - c.init(other.c.get()); - break; - case types::orbital_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ephemeris_info_r17_c"); - } -} -ephemeris_info_r17_c& ephemeris_info_r17_c::operator=(const ephemeris_info_r17_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::position_velocity_r17: - c.set(other.c.get()); - break; - case types::orbital_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ephemeris_info_r17_c"); - } - - return *this; -} -position_velocity_r17_s& ephemeris_info_r17_c::set_position_velocity_r17() -{ - set(types::position_velocity_r17); - return c.get(); -} -orbital_r17_s& ephemeris_info_r17_c::set_orbital_r17() -{ - set(types::orbital_r17); - return c.get(); -} -void ephemeris_info_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::position_velocity_r17: - j.write_fieldname("positionVelocity-r17"); - c.get().to_json(j); - break; - case types::orbital_r17: - j.write_fieldname("orbital-r17"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "ephemeris_info_r17_c"); - } - j.end_obj(); -} -SRSASN_CODE ephemeris_info_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::position_velocity_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::orbital_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "ephemeris_info_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ephemeris_info_r17_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::position_velocity_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::orbital_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "ephemeris_info_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// EpochTime-r17 ::= SEQUENCE -SRSASN_CODE epoch_time_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, sfn_r17, (uint16_t)0u, (uint16_t)1023u)); - HANDLE_CODE(pack_integer(bref, sub_frame_nr_r17, (uint8_t)0u, (uint8_t)9u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE epoch_time_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(sfn_r17, bref, (uint16_t)0u, (uint16_t)1023u)); - HANDLE_CODE(unpack_integer(sub_frame_nr_r17, bref, (uint8_t)0u, (uint8_t)9u)); - - return SRSASN_SUCCESS; -} -void epoch_time_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("sfn-r17", sfn_r17); - j.write_int("subFrameNR-r17", sub_frame_nr_r17); - j.end_obj(); -} - -// SSB-MTC4-r17 ::= SEQUENCE -SRSASN_CODE ssb_mtc4_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(pci_list_r17.size() > 0, 1)); - - if (pci_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, pci_list_r17, 1, 64, integer_packer(0, 1007))); - } - HANDLE_CODE(pack_integer(bref, offset_r17, (uint8_t)0u, (uint8_t)159u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ssb_mtc4_r17_s::unpack(cbit_ref& bref) -{ - bool pci_list_r17_present; - HANDLE_CODE(bref.unpack(pci_list_r17_present, 1)); - - if (pci_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(pci_list_r17, bref, 1, 64, integer_packer(0, 1007))); - } - HANDLE_CODE(unpack_integer(offset_r17, bref, (uint8_t)0u, (uint8_t)159u)); - - return SRSASN_SUCCESS; -} -void ssb_mtc4_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pci_list_r17.size() > 0) { - j.start_array("pci-List-r17"); - for (const auto& e1 : pci_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - j.write_int("offset-r17", offset_r17); - j.end_obj(); -} - -// BeamMeasConfigIdle-NR-r16 ::= SEQUENCE -SRSASN_CODE beam_meas_cfg_idle_nr_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(report_quant_rs_idxes_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, max_nrof_rs_idxes_to_report_r16, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(bref.pack(include_beam_meass_r16, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE beam_meas_cfg_idle_nr_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(report_quant_rs_idxes_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(max_nrof_rs_idxes_to_report_r16, bref, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(bref.unpack(include_beam_meass_r16, 1)); - - return SRSASN_SUCCESS; -} -void beam_meas_cfg_idle_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("reportQuantityRS-Indexes-r16", report_quant_rs_idxes_r16.to_string()); - j.write_int("maxNrofRS-IndexesToReport-r16", max_nrof_rs_idxes_to_report_r16); - j.write_bool("includeBeamMeasurements-r16", include_beam_meass_r16); - j.end_obj(); -} - -const char* beam_meas_cfg_idle_nr_r16_s::report_quant_rs_idxes_r16_opts::to_string() const -{ - static const char* names[] = {"rsrp", "rsrq", "both"}; - return convert_enum_idx(names, 3, value, "beam_meas_cfg_idle_nr_r16_s::report_quant_rs_idxes_r16_e_"); -} - -// EUTRA-AllowedMeasBandwidth ::= ENUMERATED -const char* eutra_allowed_meas_bw_opts::to_string() const -{ - static const char* names[] = {"mbw6", "mbw15", "mbw25", "mbw50", "mbw75", "mbw100"}; - return convert_enum_idx(names, 6, value, "eutra_allowed_meas_bw_e"); -} -uint8_t eutra_allowed_meas_bw_opts::to_number() const -{ - static const uint8_t numbers[] = {6, 15, 25, 50, 75, 100}; - return map_enum_number(numbers, 6, value, "eutra_allowed_meas_bw_e"); -} - -// SS-RSSI-Measurement ::= SEQUENCE -SRSASN_CODE ss_rssi_meas_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(meas_slots.pack(bref)); - HANDLE_CODE(pack_integer(bref, end_symbol, (uint8_t)0u, (uint8_t)3u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ss_rssi_meas_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(meas_slots.unpack(bref)); - HANDLE_CODE(unpack_integer(end_symbol, bref, (uint8_t)0u, (uint8_t)3u)); - - return SRSASN_SUCCESS; -} -void ss_rssi_meas_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("measurementSlots", meas_slots.to_string()); - j.write_int("endSymbol", end_symbol); - j.end_obj(); -} - -// SSB-MTC ::= SEQUENCE -SRSASN_CODE ssb_mtc_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(periodicity_and_offset.pack(bref)); - HANDLE_CODE(dur.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ssb_mtc_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(periodicity_and_offset.unpack(bref)); - HANDLE_CODE(dur.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ssb_mtc_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("periodicityAndOffset"); - periodicity_and_offset.to_json(j); - j.write_str("duration", dur.to_string()); - j.end_obj(); -} - -void ssb_mtc_s::periodicity_and_offset_c_::destroy_() {} -void ssb_mtc_s::periodicity_and_offset_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -ssb_mtc_s::periodicity_and_offset_c_::periodicity_and_offset_c_(const ssb_mtc_s::periodicity_and_offset_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::sf5: - c.init(other.c.get()); - break; - case types::sf10: - c.init(other.c.get()); - break; - case types::sf20: - c.init(other.c.get()); - break; - case types::sf40: - c.init(other.c.get()); - break; - case types::sf80: - c.init(other.c.get()); - break; - case types::sf160: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - 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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::sf5: - c.set(other.c.get()); - break; - case types::sf10: - c.set(other.c.get()); - break; - case types::sf20: - c.set(other.c.get()); - break; - case types::sf40: - c.set(other.c.get()); - break; - case types::sf80: - c.set(other.c.get()); - break; - case types::sf160: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ssb_mtc_s::periodicity_and_offset_c_"); - } - - return *this; -} -uint8_t& ssb_mtc_s::periodicity_and_offset_c_::set_sf5() -{ - set(types::sf5); - return c.get(); -} -uint8_t& ssb_mtc_s::periodicity_and_offset_c_::set_sf10() -{ - set(types::sf10); - return c.get(); -} -uint8_t& ssb_mtc_s::periodicity_and_offset_c_::set_sf20() -{ - set(types::sf20); - return c.get(); -} -uint8_t& ssb_mtc_s::periodicity_and_offset_c_::set_sf40() -{ - set(types::sf40); - return c.get(); -} -uint8_t& ssb_mtc_s::periodicity_and_offset_c_::set_sf80() -{ - set(types::sf80); - return c.get(); -} -uint8_t& ssb_mtc_s::periodicity_and_offset_c_::set_sf160() -{ - set(types::sf160); - return c.get(); -} -void ssb_mtc_s::periodicity_and_offset_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::sf5: - j.write_int("sf5", c.get()); - break; - case types::sf10: - j.write_int("sf10", c.get()); - break; - case types::sf20: - j.write_int("sf20", c.get()); - break; - case types::sf40: - j.write_int("sf40", c.get()); - break; - case types::sf80: - j.write_int("sf80", c.get()); - break; - case types::sf160: - j.write_int("sf160", c.get()); - break; - default: - log_invalid_choice_id(type_, "ssb_mtc_s::periodicity_and_offset_c_"); - } - j.end_obj(); -} -SRSASN_CODE ssb_mtc_s::periodicity_and_offset_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::sf5: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); - break; - case types::sf10: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - break; - case types::sf20: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); - break; - case types::sf40: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::sf80: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - case types::sf160: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); - break; - default: - log_invalid_choice_id(type_, "ssb_mtc_s::periodicity_and_offset_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ssb_mtc_s::periodicity_and_offset_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::sf5: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); - break; - case types::sf10: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - break; - case types::sf20: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::sf40: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::sf80: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::sf160: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); - break; - default: - log_invalid_choice_id(type_, "ssb_mtc_s::periodicity_and_offset_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* ssb_mtc_s::dur_opts::to_string() const -{ - static const char* names[] = {"sf1", "sf2", "sf3", "sf4", "sf5"}; - return convert_enum_idx(names, 5, value, "ssb_mtc_s::dur_e_"); -} -uint8_t ssb_mtc_s::dur_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 5}; - return map_enum_number(numbers, 5, value, "ssb_mtc_s::dur_e_"); -} - -// SSB-ToMeasure ::= CHOICE -void ssb_to_measure_c::destroy_() -{ - switch (type_) { - case types::short_bitmap: - c.destroy>(); - break; - case types::medium_bitmap: - c.destroy>(); - break; - case types::long_bitmap: - c.destroy>(); - break; - default: - break; - } -} -void ssb_to_measure_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::short_bitmap: - c.init>(); - break; - case types::medium_bitmap: - c.init>(); - break; - case types::long_bitmap: - c.init>(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ssb_to_measure_c"); - } -} -ssb_to_measure_c::ssb_to_measure_c(const ssb_to_measure_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>()); - break; - case types::long_bitmap: - c.init(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ssb_to_measure_c"); - } -} -ssb_to_measure_c& ssb_to_measure_c::operator=(const ssb_to_measure_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>()); - break; - case types::long_bitmap: - c.set(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ssb_to_measure_c"); - } - - return *this; -} -fixed_bitstring<4>& ssb_to_measure_c::set_short_bitmap() -{ - set(types::short_bitmap); - return c.get>(); -} -fixed_bitstring<8>& ssb_to_measure_c::set_medium_bitmap() -{ - set(types::medium_bitmap); - return c.get>(); -} -fixed_bitstring<64>& ssb_to_measure_c::set_long_bitmap() -{ - set(types::long_bitmap); - return c.get>(); -} -void ssb_to_measure_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()); - break; - case types::long_bitmap: - j.write_str("longBitmap", c.get>().to_string()); - break; - default: - log_invalid_choice_id(type_, "ssb_to_measure_c"); - } - j.end_obj(); -} -SRSASN_CODE ssb_to_measure_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)); - break; - case types::long_bitmap: - HANDLE_CODE(c.get>().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "ssb_to_measure_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ssb_to_measure_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)); - break; - case types::long_bitmap: - HANDLE_CODE(c.get>().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "ssb_to_measure_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// ThresholdNR ::= SEQUENCE -SRSASN_CODE thres_nr_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(thres_rsrp_present, 1)); - HANDLE_CODE(bref.pack(thres_rsrq_present, 1)); - HANDLE_CODE(bref.pack(thres_sinr_present, 1)); - - if (thres_rsrp_present) { - HANDLE_CODE(pack_integer(bref, thres_rsrp, (uint8_t)0u, (uint8_t)127u)); - } - if (thres_rsrq_present) { - HANDLE_CODE(pack_integer(bref, thres_rsrq, (uint8_t)0u, (uint8_t)127u)); - } - if (thres_sinr_present) { - HANDLE_CODE(pack_integer(bref, thres_sinr, (uint8_t)0u, (uint8_t)127u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE thres_nr_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(thres_rsrp_present, 1)); - HANDLE_CODE(bref.unpack(thres_rsrq_present, 1)); - HANDLE_CODE(bref.unpack(thres_sinr_present, 1)); - - if (thres_rsrp_present) { - HANDLE_CODE(unpack_integer(thres_rsrp, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (thres_rsrq_present) { - HANDLE_CODE(unpack_integer(thres_rsrq, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (thres_sinr_present) { - HANDLE_CODE(unpack_integer(thres_sinr, bref, (uint8_t)0u, (uint8_t)127u)); - } - - return SRSASN_SUCCESS; -} -void thres_nr_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (thres_rsrp_present) { - j.write_int("thresholdRSRP", thres_rsrp); - } - if (thres_rsrq_present) { - j.write_int("thresholdRSRQ", thres_rsrq); - } - if (thres_sinr_present) { - j.write_int("thresholdSINR", thres_sinr); - } - j.end_obj(); -} - -// MeasIdleCarrierEUTRA-r16 ::= SEQUENCE -SRSASN_CODE meas_idle_carrier_eutra_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_cell_list_eutra_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(quality_thres_eutra_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, carrier_freq_eutra_r16, (uint32_t)0u, (uint32_t)262143u)); - HANDLE_CODE(allowed_meas_bw_r16.pack(bref)); - if (meas_cell_list_eutra_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_cell_list_eutra_r16, 1, 8)); - } - HANDLE_CODE(report_quantities_eutra_r16.pack(bref)); - if (quality_thres_eutra_r16_present) { - HANDLE_CODE(bref.pack(quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16_present, 1)); - HANDLE_CODE(bref.pack(quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16_present, 1)); - if (quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16_present) { - HANDLE_CODE(pack_integer(bref, quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16, (uint8_t)0u, (uint8_t)97u)); - } - if (quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16_present) { - HANDLE_CODE(pack_integer(bref, quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16, (int8_t)-30, (int8_t)46)); - } - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_idle_carrier_eutra_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool meas_cell_list_eutra_r16_present; - HANDLE_CODE(bref.unpack(meas_cell_list_eutra_r16_present, 1)); - HANDLE_CODE(bref.unpack(quality_thres_eutra_r16_present, 1)); - - HANDLE_CODE(unpack_integer(carrier_freq_eutra_r16, bref, (uint32_t)0u, (uint32_t)262143u)); - HANDLE_CODE(allowed_meas_bw_r16.unpack(bref)); - if (meas_cell_list_eutra_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_cell_list_eutra_r16, bref, 1, 8)); - } - HANDLE_CODE(report_quantities_eutra_r16.unpack(bref)); - if (quality_thres_eutra_r16_present) { - HANDLE_CODE(bref.unpack(quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16_present, 1)); - HANDLE_CODE(bref.unpack(quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16_present, 1)); - if (quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16_present) { - HANDLE_CODE(unpack_integer(quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16, bref, (uint8_t)0u, (uint8_t)97u)); - } - if (quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16_present) { - HANDLE_CODE(unpack_integer(quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16, bref, (int8_t)-30, (int8_t)46)); - } - } - - return SRSASN_SUCCESS; -} -void meas_idle_carrier_eutra_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("carrierFreqEUTRA-r16", carrier_freq_eutra_r16); - j.write_str("allowedMeasBandwidth-r16", allowed_meas_bw_r16.to_string()); - if (meas_cell_list_eutra_r16.size() > 0) { - j.start_array("measCellListEUTRA-r16"); - for (const auto& e1 : meas_cell_list_eutra_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.write_str("reportQuantitiesEUTRA-r16", report_quantities_eutra_r16.to_string()); - if (quality_thres_eutra_r16_present) { - j.write_fieldname("qualityThresholdEUTRA-r16"); - j.start_obj(); - if (quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16_present) { - j.write_int("idleRSRP-Threshold-EUTRA-r16", quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16); - } - if (quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16_present) { - j.write_int("idleRSRQ-Threshold-EUTRA-r16", quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16); - } - j.end_obj(); - } - j.end_obj(); -} - -const char* meas_idle_carrier_eutra_r16_s::report_quantities_eutra_r16_opts::to_string() const -{ - static const char* names[] = {"rsrp", "rsrq", "both"}; - return convert_enum_idx(names, 3, value, "meas_idle_carrier_eutra_r16_s::report_quantities_eutra_r16_e_"); -} - -// MeasIdleCarrierNR-r16 ::= SEQUENCE -SRSASN_CODE meas_idle_carrier_nr_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(freq_band_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_cell_list_nr_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(quality_thres_r16_present, 1)); - HANDLE_CODE(bref.pack(ssb_meas_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(beam_meas_cfg_idle_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(ssb_subcarrier_spacing_r16.pack(bref)); - if (freq_band_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8, integer_packer(1, 1024))); - } - if (meas_cell_list_nr_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_cell_list_nr_r16, 1, 8)); - } - HANDLE_CODE(report_quantities_r16.pack(bref)); - if (quality_thres_r16_present) { - HANDLE_CODE(bref.pack(quality_thres_r16.idle_rsrp_thres_nr_r16_present, 1)); - HANDLE_CODE(bref.pack(quality_thres_r16.idle_rsrq_thres_nr_r16_present, 1)); - if (quality_thres_r16.idle_rsrp_thres_nr_r16_present) { - HANDLE_CODE(pack_integer(bref, quality_thres_r16.idle_rsrp_thres_nr_r16, (uint8_t)0u, (uint8_t)127u)); - } - if (quality_thres_r16.idle_rsrq_thres_nr_r16_present) { - HANDLE_CODE(pack_integer(bref, quality_thres_r16.idle_rsrq_thres_nr_r16, (uint8_t)0u, (uint8_t)127u)); - } - } - if (ssb_meas_cfg_r16_present) { - HANDLE_CODE(bref.pack(ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16_present, 1)); - HANDLE_CODE(bref.pack(ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16_present, 1)); - HANDLE_CODE(bref.pack(ssb_meas_cfg_r16.smtc_r16_present, 1)); - HANDLE_CODE(bref.pack(ssb_meas_cfg_r16.ssb_to_measure_r16_present, 1)); - HANDLE_CODE(bref.pack(ssb_meas_cfg_r16.ss_rssi_meas_r16_present, 1)); - if (ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16_present) { - HANDLE_CODE(pack_integer(bref, ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16, (uint8_t)2u, (uint8_t)16u)); - } - if (ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16_present) { - HANDLE_CODE(ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16.pack(bref)); - } - if (ssb_meas_cfg_r16.smtc_r16_present) { - HANDLE_CODE(ssb_meas_cfg_r16.smtc_r16.pack(bref)); - } - if (ssb_meas_cfg_r16.ssb_to_measure_r16_present) { - HANDLE_CODE(ssb_meas_cfg_r16.ssb_to_measure_r16.pack(bref)); - } - HANDLE_CODE(bref.pack(ssb_meas_cfg_r16.derive_ssb_idx_from_cell_r16, 1)); - if (ssb_meas_cfg_r16.ss_rssi_meas_r16_present) { - HANDLE_CODE(ssb_meas_cfg_r16.ss_rssi_meas_r16.pack(bref)); - } - } - if (beam_meas_cfg_idle_r16_present) { - HANDLE_CODE(beam_meas_cfg_idle_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_idle_carrier_nr_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool freq_band_list_present; - HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); - bool meas_cell_list_nr_r16_present; - HANDLE_CODE(bref.unpack(meas_cell_list_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(quality_thres_r16_present, 1)); - HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(beam_meas_cfg_idle_r16_present, 1)); - - HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(ssb_subcarrier_spacing_r16.unpack(bref)); - if (freq_band_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8, integer_packer(1, 1024))); - } - if (meas_cell_list_nr_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_cell_list_nr_r16, bref, 1, 8)); - } - HANDLE_CODE(report_quantities_r16.unpack(bref)); - if (quality_thres_r16_present) { - HANDLE_CODE(bref.unpack(quality_thres_r16.idle_rsrp_thres_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(quality_thres_r16.idle_rsrq_thres_nr_r16_present, 1)); - if (quality_thres_r16.idle_rsrp_thres_nr_r16_present) { - HANDLE_CODE(unpack_integer(quality_thres_r16.idle_rsrp_thres_nr_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (quality_thres_r16.idle_rsrq_thres_nr_r16_present) { - HANDLE_CODE(unpack_integer(quality_thres_r16.idle_rsrq_thres_nr_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - } - if (ssb_meas_cfg_r16_present) { - HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16_present, 1)); - HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16_present, 1)); - HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16.smtc_r16_present, 1)); - HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16.ssb_to_measure_r16_present, 1)); - HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16.ss_rssi_meas_r16_present, 1)); - if (ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16_present) { - HANDLE_CODE(unpack_integer(ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16, bref, (uint8_t)2u, (uint8_t)16u)); - } - if (ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16_present) { - HANDLE_CODE(ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16.unpack(bref)); - } - if (ssb_meas_cfg_r16.smtc_r16_present) { - HANDLE_CODE(ssb_meas_cfg_r16.smtc_r16.unpack(bref)); - } - if (ssb_meas_cfg_r16.ssb_to_measure_r16_present) { - HANDLE_CODE(ssb_meas_cfg_r16.ssb_to_measure_r16.unpack(bref)); - } - HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16.derive_ssb_idx_from_cell_r16, 1)); - if (ssb_meas_cfg_r16.ss_rssi_meas_r16_present) { - HANDLE_CODE(ssb_meas_cfg_r16.ss_rssi_meas_r16.unpack(bref)); - } - } - if (beam_meas_cfg_idle_r16_present) { - HANDLE_CODE(beam_meas_cfg_idle_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void meas_idle_carrier_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("carrierFreq-r16", carrier_freq_r16); - j.write_str("ssbSubcarrierSpacing-r16", ssb_subcarrier_spacing_r16.to_string()); - if (freq_band_list.size() > 0) { - j.start_array("frequencyBandList"); - for (const auto& e1 : freq_band_list) { - j.write_int(e1); - } - j.end_array(); - } - if (meas_cell_list_nr_r16.size() > 0) { - j.start_array("measCellListNR-r16"); - for (const auto& e1 : meas_cell_list_nr_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.write_str("reportQuantities-r16", report_quantities_r16.to_string()); - if (quality_thres_r16_present) { - j.write_fieldname("qualityThreshold-r16"); - j.start_obj(); - if (quality_thres_r16.idle_rsrp_thres_nr_r16_present) { - j.write_int("idleRSRP-Threshold-NR-r16", quality_thres_r16.idle_rsrp_thres_nr_r16); - } - if (quality_thres_r16.idle_rsrq_thres_nr_r16_present) { - j.write_int("idleRSRQ-Threshold-NR-r16", quality_thres_r16.idle_rsrq_thres_nr_r16); - } - j.end_obj(); - } - if (ssb_meas_cfg_r16_present) { - j.write_fieldname("ssb-MeasConfig-r16"); - j.start_obj(); - if (ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16_present) { - j.write_int("nrofSS-BlocksToAverage-r16", ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16); - } - if (ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16_present) { - j.write_fieldname("absThreshSS-BlocksConsolidation-r16"); - ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16.to_json(j); - } - if (ssb_meas_cfg_r16.smtc_r16_present) { - j.write_fieldname("smtc-r16"); - ssb_meas_cfg_r16.smtc_r16.to_json(j); - } - if (ssb_meas_cfg_r16.ssb_to_measure_r16_present) { - j.write_fieldname("ssb-ToMeasure-r16"); - ssb_meas_cfg_r16.ssb_to_measure_r16.to_json(j); - } - j.write_bool("deriveSSB-IndexFromCell-r16", ssb_meas_cfg_r16.derive_ssb_idx_from_cell_r16); - if (ssb_meas_cfg_r16.ss_rssi_meas_r16_present) { - j.write_fieldname("ss-RSSI-Measurement-r16"); - ssb_meas_cfg_r16.ss_rssi_meas_r16.to_json(j); - } - j.end_obj(); - } - if (beam_meas_cfg_idle_r16_present) { - j.write_fieldname("beamMeasConfigIdle-r16"); - beam_meas_cfg_idle_r16.to_json(j); - } - j.end_obj(); -} - -const char* meas_idle_carrier_nr_r16_s::report_quantities_r16_opts::to_string() const -{ - static const char* names[] = {"rsrp", "rsrq", "both"}; - return convert_enum_idx(names, 3, value, "meas_idle_carrier_nr_r16_s::report_quantities_r16_e_"); -} - -// ReferenceTime-r16 ::= SEQUENCE -SRSASN_CODE ref_time_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, ref_days_r16, (uint32_t)0u, (uint32_t)72999u)); - HANDLE_CODE(pack_integer(bref, ref_seconds_r16, (uint32_t)0u, (uint32_t)86399u)); - HANDLE_CODE(pack_integer(bref, ref_milli_seconds_r16, (uint16_t)0u, (uint16_t)999u)); - HANDLE_CODE(pack_integer(bref, ref_ten_nano_seconds_r16, (uint32_t)0u, (uint32_t)99999u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ref_time_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(ref_days_r16, bref, (uint32_t)0u, (uint32_t)72999u)); - HANDLE_CODE(unpack_integer(ref_seconds_r16, bref, (uint32_t)0u, (uint32_t)86399u)); - HANDLE_CODE(unpack_integer(ref_milli_seconds_r16, bref, (uint16_t)0u, (uint16_t)999u)); - HANDLE_CODE(unpack_integer(ref_ten_nano_seconds_r16, bref, (uint32_t)0u, (uint32_t)99999u)); - - return SRSASN_SUCCESS; -} -void ref_time_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("refDays-r16", ref_days_r16); - j.write_int("refSeconds-r16", ref_seconds_r16); - j.write_int("refMilliSeconds-r16", ref_milli_seconds_r16); - j.write_int("refTenNanoSeconds-r16", ref_ten_nano_seconds_r16); - j.end_obj(); -} - -// ReferenceTimeInfo-r16 ::= SEQUENCE -SRSASN_CODE ref_time_info_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(uncertainty_r16_present, 1)); - HANDLE_CODE(bref.pack(time_info_type_r16_present, 1)); - HANDLE_CODE(bref.pack(ref_sfn_r16_present, 1)); - - HANDLE_CODE(time_r16.pack(bref)); - if (uncertainty_r16_present) { - HANDLE_CODE(pack_integer(bref, uncertainty_r16, (uint16_t)0u, (uint16_t)32767u)); - } - if (ref_sfn_r16_present) { - HANDLE_CODE(pack_integer(bref, ref_sfn_r16, (uint16_t)0u, (uint16_t)1023u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ref_time_info_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(uncertainty_r16_present, 1)); - HANDLE_CODE(bref.unpack(time_info_type_r16_present, 1)); - HANDLE_CODE(bref.unpack(ref_sfn_r16_present, 1)); - - HANDLE_CODE(time_r16.unpack(bref)); - if (uncertainty_r16_present) { - HANDLE_CODE(unpack_integer(uncertainty_r16, bref, (uint16_t)0u, (uint16_t)32767u)); - } - if (ref_sfn_r16_present) { - HANDLE_CODE(unpack_integer(ref_sfn_r16, bref, (uint16_t)0u, (uint16_t)1023u)); - } - - return SRSASN_SUCCESS; -} -void ref_time_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("time-r16"); - time_r16.to_json(j); - if (uncertainty_r16_present) { - j.write_int("uncertainty-r16", uncertainty_r16); - } - if (time_info_type_r16_present) { - j.write_str("timeInfoType-r16", "localClock"); - } - if (ref_sfn_r16_present) { - j.write_int("referenceSFN-r16", ref_sfn_r16); - } - j.end_obj(); -} - -// 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)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= slot_cfg_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(slot_cfg_r17.is_present(), 1)); - if (slot_cfg_r17.is_present()) { - HANDLE_CODE(slot_cfg_r17->pack(bref)); - } - } - } - 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)); - - 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); - - unpack_presence_flag(slot_cfg_r17, bref); - if (slot_cfg_r17.is_present()) { - HANDLE_CODE(slot_cfg_r17->unpack(bref)); - } - } - } - 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); - if (ext) { - if (slot_cfg_r17.is_present()) { - j.write_fieldname("slotConfig-r17"); - slot_cfg_r17->to_json(j); - } - } - 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; -} -uint8_t& csi_rs_res_mob_s::slot_cfg_c_::set_ms4() -{ - set(types::ms4); - return c.get(); -} -uint8_t& csi_rs_res_mob_s::slot_cfg_c_::set_ms5() -{ - set(types::ms5); - return c.get(); -} -uint8_t& csi_rs_res_mob_s::slot_cfg_c_::set_ms10() -{ - set(types::ms10); - return c.get(); -} -uint8_t& csi_rs_res_mob_s::slot_cfg_c_::set_ms20() -{ - set(types::ms20); - return c.get(); -} -uint16_t& csi_rs_res_mob_s::slot_cfg_c_::set_ms40() -{ - set(types::ms40); - return c.get(); -} -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.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_mob_s::freq_domain_alloc_c_::destroy_() -{ - switch (type_) { - case types::row1: - c.destroy>(); - break; - case types::row2: - c.destroy>(); - break; - default: - 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>(); - break; - case types::row2: - c.init>(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_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) -{ - type_ = other.type(); - switch (type_) { - case types::row1: - c.init(other.c.get>()); - break; - case types::row2: - 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_"); - } -} -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; - } - set(other.type()); - switch (type_) { - case types::row1: - c.set(other.c.get>()); - break; - case types::row2: - 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_"); - } - - return *this; -} -fixed_bitstring<4>& csi_rs_res_mob_s::freq_domain_alloc_c_::set_row1() -{ - set(types::row1); - return c.get>(); -} -fixed_bitstring<12>& csi_rs_res_mob_s::freq_domain_alloc_c_::set_row2() -{ - set(types::row2); - return c.get>(); -} -void csi_rs_res_mob_s::freq_domain_alloc_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::row1: - j.write_str("row1", c.get>().to_string()); - break; - case types::row2: - j.write_str("row2", c.get>().to_string()); - break; - default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); - } - j.end_obj(); -} -SRSASN_CODE csi_rs_res_mob_s::freq_domain_alloc_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::row1: - HANDLE_CODE(c.get>().pack(bref)); - break; - case types::row2: - HANDLE_CODE(c.get>().pack(bref)); - break; - default: - 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_mob_s::freq_domain_alloc_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::row1: - HANDLE_CODE(c.get>().unpack(bref)); - break; - case types::row2: - HANDLE_CODE(c.get>().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void csi_rs_res_mob_s::slot_cfg_r17_c_::destroy_() {} -void csi_rs_res_mob_s::slot_cfg_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -csi_rs_res_mob_s::slot_cfg_r17_c_::slot_cfg_r17_c_(const csi_rs_res_mob_s::slot_cfg_r17_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_r17_c_"); - } -} -csi_rs_res_mob_s::slot_cfg_r17_c_& -csi_rs_res_mob_s::slot_cfg_r17_c_::operator=(const csi_rs_res_mob_s::slot_cfg_r17_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_r17_c_"); - } - - return *this; -} -uint16_t& csi_rs_res_mob_s::slot_cfg_r17_c_::set_ms4() -{ - set(types::ms4); - return c.get(); -} -uint16_t& csi_rs_res_mob_s::slot_cfg_r17_c_::set_ms5() -{ - set(types::ms5); - return c.get(); -} -uint16_t& csi_rs_res_mob_s::slot_cfg_r17_c_::set_ms10() -{ - set(types::ms10); - return c.get(); -} -uint16_t& csi_rs_res_mob_s::slot_cfg_r17_c_::set_ms20() -{ - set(types::ms20); - return c.get(); -} -uint16_t& csi_rs_res_mob_s::slot_cfg_r17_c_::set_ms40() -{ - set(types::ms40); - return c.get(); -} -void csi_rs_res_mob_s::slot_cfg_r17_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_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE csi_rs_res_mob_s::slot_cfg_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ms4: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)255u)); - break; - case types::ms5: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); - break; - case types::ms10: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); - break; - case types::ms20: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); - break; - case types::ms40: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); - break; - default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE csi_rs_res_mob_s::slot_cfg_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ms4: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)255u)); - break; - case types::ms5: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); - break; - case types::ms10: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); - break; - case types::ms20: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); - break; - case types::ms40: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); - break; - default: - log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// NeighbourCellInfo-r17 ::= SEQUENCE -SRSASN_CODE neighbour_cell_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(epoch_time_r17.pack(bref)); - HANDLE_CODE(ephemeris_info_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE neighbour_cell_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(epoch_time_r17.unpack(bref)); - HANDLE_CODE(ephemeris_info_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void neighbour_cell_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("epochTime-r17"); - epoch_time_r17.to_json(j); - j.write_fieldname("ephemerisInfo-r17"); - ephemeris_info_r17.to_json(j); - j.end_obj(); -} - -// RAN-VisibleParameters-r17 ::= SEQUENCE -SRSASN_CODE ran_visible_params_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ran_visible_periodicity_r17_present, 1)); - HANDLE_CODE(bref.pack(nof_buffer_level_entries_r17_present, 1)); - HANDLE_CODE(bref.pack(report_playout_delay_for_media_startup_r17_present, 1)); - - if (ran_visible_periodicity_r17_present) { - HANDLE_CODE(ran_visible_periodicity_r17.pack(bref)); - } - if (nof_buffer_level_entries_r17_present) { - HANDLE_CODE(pack_integer(bref, nof_buffer_level_entries_r17, (uint8_t)1u, (uint8_t)8u)); - } - if (report_playout_delay_for_media_startup_r17_present) { - HANDLE_CODE(bref.pack(report_playout_delay_for_media_startup_r17, 1)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ran_visible_params_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ran_visible_periodicity_r17_present, 1)); - HANDLE_CODE(bref.unpack(nof_buffer_level_entries_r17_present, 1)); - HANDLE_CODE(bref.unpack(report_playout_delay_for_media_startup_r17_present, 1)); - - if (ran_visible_periodicity_r17_present) { - HANDLE_CODE(ran_visible_periodicity_r17.unpack(bref)); - } - if (nof_buffer_level_entries_r17_present) { - HANDLE_CODE(unpack_integer(nof_buffer_level_entries_r17, bref, (uint8_t)1u, (uint8_t)8u)); - } - if (report_playout_delay_for_media_startup_r17_present) { - HANDLE_CODE(bref.unpack(report_playout_delay_for_media_startup_r17, 1)); - } - - return SRSASN_SUCCESS; -} -void ran_visible_params_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ran_visible_periodicity_r17_present) { - j.write_str("ran-VisiblePeriodicity-r17", ran_visible_periodicity_r17.to_string()); - } - if (nof_buffer_level_entries_r17_present) { - j.write_int("numberOfBufferLevelEntries-r17", nof_buffer_level_entries_r17); - } - if (report_playout_delay_for_media_startup_r17_present) { - j.write_bool("reportPlayoutDelayForMediaStartup-r17", report_playout_delay_for_media_startup_r17); - } - j.end_obj(); -} - -const char* ran_visible_params_r17_s::ran_visible_periodicity_r17_opts::to_string() const -{ - static const char* names[] = {"ms120", "ms240", "ms480", "ms640", "ms1024"}; - return convert_enum_idx(names, 5, value, "ran_visible_params_r17_s::ran_visible_periodicity_r17_e_"); -} -uint16_t ran_visible_params_r17_s::ran_visible_periodicity_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {120, 240, 480, 640, 1024}; - return map_enum_number(numbers, 5, value, "ran_visible_params_r17_s::ran_visible_periodicity_r17_e_"); -} - -// RSSI-PeriodicityAndOffset-r16 ::= CHOICE -void rssi_periodicity_and_offset_r16_c::destroy_() {} -void rssi_periodicity_and_offset_r16_c::set(types::options e) -{ - destroy_(); - type_ = e; -} -rssi_periodicity_and_offset_r16_c::rssi_periodicity_and_offset_r16_c(const rssi_periodicity_and_offset_r16_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::sl10: - 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::s1640: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rssi_periodicity_and_offset_r16_c"); - } -} -rssi_periodicity_and_offset_r16_c& -rssi_periodicity_and_offset_r16_c::operator=(const rssi_periodicity_and_offset_r16_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::sl10: - 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::s1640: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rssi_periodicity_and_offset_r16_c"); - } - - return *this; -} -uint8_t& rssi_periodicity_and_offset_r16_c::set_sl10() -{ - set(types::sl10); - return c.get(); -} -uint8_t& rssi_periodicity_and_offset_r16_c::set_sl20() -{ - set(types::sl20); - return c.get(); -} -uint8_t& rssi_periodicity_and_offset_r16_c::set_sl40() -{ - set(types::sl40); - return c.get(); -} -uint8_t& rssi_periodicity_and_offset_r16_c::set_sl80() -{ - set(types::sl80); - return c.get(); -} -uint8_t& rssi_periodicity_and_offset_r16_c::set_sl160() -{ - set(types::sl160); - return c.get(); -} -uint16_t& rssi_periodicity_and_offset_r16_c::set_sl320() -{ - set(types::sl320); - return c.get(); -} -uint16_t& rssi_periodicity_and_offset_r16_c::set_s1640() -{ - set(types::s1640); - return c.get(); -} -void rssi_periodicity_and_offset_r16_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::sl10: - j.write_int("sl10", 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::s1640: - j.write_int("s1640", c.get()); - break; - default: - log_invalid_choice_id(type_, "rssi_periodicity_and_offset_r16_c"); - } - j.end_obj(); -} -SRSASN_CODE rssi_periodicity_and_offset_r16_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::sl10: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - 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)); - break; - case types::s1640: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); - break; - default: - log_invalid_choice_id(type_, "rssi_periodicity_and_offset_r16_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rssi_periodicity_and_offset_r16_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::sl10: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - 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::s1640: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); - break; - default: - log_invalid_choice_id(type_, "rssi_periodicity_and_offset_r16_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// SSB-PositionQCL-Cell-r17 ::= SEQUENCE -SRSASN_CODE ssb_position_qcl_cell_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pci_r17, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(ssb_position_qcl_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ssb_position_qcl_cell_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(ssb_position_qcl_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ssb_position_qcl_cell_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("physCellId-r17", pci_r17); - j.write_str("ssb-PositionQCL-r17", ssb_position_qcl_r17.to_string()); - j.end_obj(); -} - -// SSB-PositionQCL-CellsToAddMod-r16 ::= SEQUENCE -SRSASN_CODE ssb_position_qcl_cells_to_add_mod_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(ssb_position_qcl_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ssb_position_qcl_cells_to_add_mod_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(ssb_position_qcl_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ssb_position_qcl_cells_to_add_mod_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("physCellId-r16", pci_r16); - j.write_str("ssb-PositionQCL-r16", ssb_position_qcl_r16.to_string()); - j.end_obj(); -} - -// BFD-RelaxationReportingConfig-r17 ::= SEQUENCE -SRSASN_CODE bfd_relaxation_report_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bfd_relaxtion_report_prohibit_timer.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE bfd_relaxation_report_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bfd_relaxtion_report_prohibit_timer.unpack(bref)); - - return SRSASN_SUCCESS; -} -void bfd_relaxation_report_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("bfd-RelaxtionReportingProhibitTimer", bfd_relaxtion_report_prohibit_timer.to_string()); - j.end_obj(); -} - -const char* bfd_relaxation_report_cfg_r17_s::bfd_relaxtion_report_prohibit_timer_opts::to_string() const -{ - static const char* names[] = {"s0", - "s0dot5", - "s1", - "s2", - "s5", - "s10", - "s20", - "s30", - "s60", - "s90", - "s120", - "s300", - "s600", - "infinity", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "bfd_relaxation_report_cfg_r17_s::bfd_relaxtion_report_prohibit_timer_e_"); -} -float bfd_relaxation_report_cfg_r17_s::bfd_relaxtion_report_prohibit_timer_opts::to_number() const -{ - static const float numbers[] = {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, -1.0}; - return map_enum_number(numbers, 14, value, "bfd_relaxation_report_cfg_r17_s::bfd_relaxtion_report_prohibit_timer_e_"); -} -const char* bfd_relaxation_report_cfg_r17_s::bfd_relaxtion_report_prohibit_timer_opts::to_number_string() const -{ - static const char* number_strs[] = { - "0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600", "inf"}; - return convert_enum_idx( - number_strs, 16, value, "bfd_relaxation_report_cfg_r17_s::bfd_relaxtion_report_prohibit_timer_e_"); -} - -// CSI-RS-CellMobility ::= SEQUENCE -SRSASN_CODE csi_rs_cell_mob_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(density_present, 1)); - - 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; -} -SRSASN_CODE csi_rs_cell_mob_s::unpack(cbit_ref& bref) -{ - 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)); - } - HANDLE_CODE(unpack_dyn_seq_of(csi_rs_res_list_mob, bref, 1, 96)); - - return SRSASN_SUCCESS; -} -void csi_rs_cell_mob_s::to_json(json_writer& j) const -{ - 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.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(); -} - -const char* csi_rs_cell_mob_s::csi_rs_meas_bw_s_::nrof_prbs_opts::to_string() const -{ - static const char* names[] = {"size24", "size48", "size96", "size192", "size264"}; - return convert_enum_idx(names, 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 numbers[] = {24, 48, 96, 192, 264}; - return map_enum_number(numbers, 5, value, "csi_rs_cell_mob_s::csi_rs_meas_bw_s_::nrof_prbs_e_"); -} - -const char* csi_rs_cell_mob_s::density_opts::to_string() const -{ - static const char* names[] = {"d1", "d3"}; - return convert_enum_idx(names, 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 numbers[] = {1, 3}; - return map_enum_number(numbers, 2, value, "csi_rs_cell_mob_s::density_e_"); -} - -// CondReconfigToAddMod-r16 ::= SEQUENCE -SRSASN_CODE cond_recfg_to_add_mod_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cond_execution_cond_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(cond_rrc_recfg_r16.size() > 0, 1)); - - HANDLE_CODE(pack_integer(bref, cond_recfg_id_r16, (uint8_t)1u, (uint8_t)8u)); - if (cond_execution_cond_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cond_execution_cond_r16, 1, 2, integer_packer(1, 64))); - } - if (cond_rrc_recfg_r16.size() > 0) { - HANDLE_CODE(cond_rrc_recfg_r16.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= cond_execution_cond_scg_r17.size() > 0; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(cond_execution_cond_scg_r17.size() > 0, 1)); - if (cond_execution_cond_scg_r17.size() > 0) { - HANDLE_CODE(cond_execution_cond_scg_r17.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cond_recfg_to_add_mod_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool cond_execution_cond_r16_present; - HANDLE_CODE(bref.unpack(cond_execution_cond_r16_present, 1)); - bool cond_rrc_recfg_r16_present; - HANDLE_CODE(bref.unpack(cond_rrc_recfg_r16_present, 1)); - - HANDLE_CODE(unpack_integer(cond_recfg_id_r16, bref, (uint8_t)1u, (uint8_t)8u)); - if (cond_execution_cond_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(cond_execution_cond_r16, bref, 1, 2, integer_packer(1, 64))); - } - if (cond_rrc_recfg_r16_present) { - HANDLE_CODE(cond_rrc_recfg_r16.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 cond_execution_cond_scg_r17_present; - HANDLE_CODE(bref.unpack(cond_execution_cond_scg_r17_present, 1)); - if (cond_execution_cond_scg_r17_present) { - HANDLE_CODE(cond_execution_cond_scg_r17.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void cond_recfg_to_add_mod_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("condReconfigId-r16", cond_recfg_id_r16); - if (cond_execution_cond_r16.size() > 0) { - j.start_array("condExecutionCond-r16"); - for (const auto& e1 : cond_execution_cond_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (cond_rrc_recfg_r16.size() > 0) { - j.write_str("condRRCReconfig-r16", cond_rrc_recfg_r16.to_string()); - } - if (ext) { - if (cond_execution_cond_scg_r17.size() > 0) { - j.write_str("condExecutionCondSCG-r17", cond_execution_cond_scg_r17.to_string()); - } - } - j.end_obj(); -} - -// ExcessDelay-DRB-IdentityInfo-r17 ::= SEQUENCE -SRSASN_CODE excess_delay_drb_id_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_dyn_seq_of(bref, drb_id_list, 1, 29, integer_packer(1, 32))); - HANDLE_CODE(delay_thres.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE excess_delay_drb_id_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_dyn_seq_of(drb_id_list, bref, 1, 29, integer_packer(1, 32))); - HANDLE_CODE(delay_thres.unpack(bref)); - - return SRSASN_SUCCESS; -} -void excess_delay_drb_id_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("drb-IdentityList"); - for (const auto& e1 : drb_id_list) { - j.write_int(e1); - } - j.end_array(); - j.write_str("delayThreshold", delay_thres.to_string()); - j.end_obj(); -} - -const char* excess_delay_drb_id_info_r17_s::delay_thres_opts::to_string() const -{ - static const char* names[] = {"ms0dot25", - "ms0dot5", - "ms1", - "ms2", - "ms4", - "ms5", - "ms10", - "ms20", - "ms30", - "ms40", - "ms50", - "ms60", - "ms70", - "ms80", - "ms90", - "ms100", - "ms150", - "ms300", - "ms500"}; - return convert_enum_idx(names, 19, value, "excess_delay_drb_id_info_r17_s::delay_thres_e_"); -} -float excess_delay_drb_id_info_r17_s::delay_thres_opts::to_number() const -{ - static const float numbers[] = { - 0.25, 0.5, 1.0, 2.0, 4.0, 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 150.0, 300.0, 500.0}; - return map_enum_number(numbers, 19, value, "excess_delay_drb_id_info_r17_s::delay_thres_e_"); -} -const char* excess_delay_drb_id_info_r17_s::delay_thres_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.25", - "0.5", - "1", - "2", - "4", - "5", - "10", - "20", - "30", - "40", - "50", - "60", - "70", - "80", - "90", - "100", - "150", - "300", - "500"}; - return convert_enum_idx(number_strs, 19, value, "excess_delay_drb_id_info_r17_s::delay_thres_e_"); -} - -// IAB-IP-Usage-r16 ::= ENUMERATED -const char* iab_ip_usage_r16_opts::to_string() const -{ - static const char* names[] = {"f1-C", "f1-U", "non-F1", "spare"}; - return convert_enum_idx(names, 4, value, "iab_ip_usage_r16_e"); -} - -// MUSIM-Gap-r17 ::= SEQUENCE -SRSASN_CODE mu_si_m_gap_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, musim_gap_id_r17, (uint8_t)0u, (uint8_t)2u)); - HANDLE_CODE(musim_gap_info_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mu_si_m_gap_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(musim_gap_id_r17, bref, (uint8_t)0u, (uint8_t)2u)); - HANDLE_CODE(musim_gap_info_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void mu_si_m_gap_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("musim-GapId-r17", musim_gap_id_r17); - j.write_fieldname("musim-GapInfo-r17"); - musim_gap_info_r17.to_json(j); - j.end_obj(); -} - -// MUSIM-GapAssistanceConfig-r17 ::= SEQUENCE -SRSASN_CODE mu_si_m_gap_assist_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(musim_gap_prohibit_timer_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mu_si_m_gap_assist_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(musim_gap_prohibit_timer_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void mu_si_m_gap_assist_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("musim-GapProhibitTimer-r17", musim_gap_prohibit_timer_r17.to_string()); - j.end_obj(); -} - -const char* mu_si_m_gap_assist_cfg_r17_s::musim_gap_prohibit_timer_r17_opts::to_string() const -{ - static const char* names[] = {"s0", - "s0dot1", - "s0dot2", - "s0dot3", - "s0dot4", - "s0dot5", - "s1", - "s2", - "s3", - "s4", - "s5", - "s6", - "s7", - "s8", - "s9", - "s10"}; - return convert_enum_idx(names, 16, value, "mu_si_m_gap_assist_cfg_r17_s::musim_gap_prohibit_timer_r17_e_"); -} -float mu_si_m_gap_assist_cfg_r17_s::musim_gap_prohibit_timer_r17_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; - return map_enum_number(numbers, 16, value, "mu_si_m_gap_assist_cfg_r17_s::musim_gap_prohibit_timer_r17_e_"); -} -const char* mu_si_m_gap_assist_cfg_r17_s::musim_gap_prohibit_timer_r17_opts::to_number_string() const -{ - static const char* number_strs[] = { - "0", "0.1", "0.2", "0.3", "0.4", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - return convert_enum_idx(number_strs, 16, value, "mu_si_m_gap_assist_cfg_r17_s::musim_gap_prohibit_timer_r17_e_"); -} - -// MUSIM-LeaveAssistanceConfig-r17 ::= SEQUENCE -SRSASN_CODE mu_si_m_leave_assist_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(musim_leave_without_resp_timer_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mu_si_m_leave_assist_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(musim_leave_without_resp_timer_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void mu_si_m_leave_assist_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("musim-LeaveWithoutResponseTimer-r17", musim_leave_without_resp_timer_r17.to_string()); - j.end_obj(); -} - -const char* mu_si_m_leave_assist_cfg_r17_s::musim_leave_without_resp_timer_r17_opts::to_string() const -{ - static const char* names[] = {"ms10", "ms20", "ms40", "ms60", "ms80", "ms100", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "mu_si_m_leave_assist_cfg_r17_s::musim_leave_without_resp_timer_r17_e_"); -} -uint8_t mu_si_m_leave_assist_cfg_r17_s::musim_leave_without_resp_timer_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {10, 20, 40, 60, 80, 100}; - return map_enum_number(numbers, 6, value, "mu_si_m_leave_assist_cfg_r17_s::musim_leave_without_resp_timer_r17_e_"); -} - -// MeasConfigAppLayer-r17 ::= SEQUENCE -SRSASN_CODE meas_cfg_app_layer_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_cfg_app_layer_container_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(service_type_r17_present, 1)); - HANDLE_CODE(bref.pack(pause_report_r17_present, 1)); - HANDLE_CODE(bref.pack(tx_of_session_start_stop_r17_present, 1)); - HANDLE_CODE(bref.pack(ran_visible_params_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, meas_cfg_app_layer_id_r17, (uint8_t)0u, (uint8_t)15u)); - if (meas_cfg_app_layer_container_r17.size() > 0) { - HANDLE_CODE(meas_cfg_app_layer_container_r17.pack(bref)); - } - if (service_type_r17_present) { - HANDLE_CODE(service_type_r17.pack(bref)); - } - if (pause_report_r17_present) { - HANDLE_CODE(bref.pack(pause_report_r17, 1)); - } - if (tx_of_session_start_stop_r17_present) { - HANDLE_CODE(bref.pack(tx_of_session_start_stop_r17, 1)); - } - if (ran_visible_params_r17_present) { - HANDLE_CODE(ran_visible_params_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_cfg_app_layer_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool meas_cfg_app_layer_container_r17_present; - HANDLE_CODE(bref.unpack(meas_cfg_app_layer_container_r17_present, 1)); - HANDLE_CODE(bref.unpack(service_type_r17_present, 1)); - HANDLE_CODE(bref.unpack(pause_report_r17_present, 1)); - HANDLE_CODE(bref.unpack(tx_of_session_start_stop_r17_present, 1)); - HANDLE_CODE(bref.unpack(ran_visible_params_r17_present, 1)); - - HANDLE_CODE(unpack_integer(meas_cfg_app_layer_id_r17, bref, (uint8_t)0u, (uint8_t)15u)); - if (meas_cfg_app_layer_container_r17_present) { - HANDLE_CODE(meas_cfg_app_layer_container_r17.unpack(bref)); - } - if (service_type_r17_present) { - HANDLE_CODE(service_type_r17.unpack(bref)); - } - if (pause_report_r17_present) { - HANDLE_CODE(bref.unpack(pause_report_r17, 1)); - } - if (tx_of_session_start_stop_r17_present) { - HANDLE_CODE(bref.unpack(tx_of_session_start_stop_r17, 1)); - } - if (ran_visible_params_r17_present) { - HANDLE_CODE(ran_visible_params_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void meas_cfg_app_layer_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("measConfigAppLayerId-r17", meas_cfg_app_layer_id_r17); - if (meas_cfg_app_layer_container_r17.size() > 0) { - j.write_str("measConfigAppLayerContainer-r17", meas_cfg_app_layer_container_r17.to_string()); - } - if (service_type_r17_present) { - j.write_str("serviceType-r17", service_type_r17.to_string()); - } - if (pause_report_r17_present) { - j.write_bool("pauseReporting-r17", pause_report_r17); - } - if (tx_of_session_start_stop_r17_present) { - j.write_bool("transmissionOfSessionStartStop-r17", tx_of_session_start_stop_r17); - } - if (ran_visible_params_r17_present) { - j.write_fieldname("ran-VisibleParameters-r17"); - ran_visible_params_r17.to_json(j); - } - j.end_obj(); -} - -const char* meas_cfg_app_layer_r17_s::service_type_r17_opts::to_string() const -{ - static const char* names[] = {"streaming", "mtsi", "vr", "spare5", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "meas_cfg_app_layer_r17_s::service_type_r17_e_"); -} - -// PropDelayDiffReportConfig-r17 ::= SEQUENCE -SRSASN_CODE prop_delay_diff_report_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(thresh_prop_delay_diff_r17_present, 1)); - HANDLE_CODE(bref.pack(neigh_cell_info_list_r17.size() > 0, 1)); - - if (thresh_prop_delay_diff_r17_present) { - HANDLE_CODE(thresh_prop_delay_diff_r17.pack(bref)); - } - if (neigh_cell_info_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, neigh_cell_info_list_r17, 1, 4)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE prop_delay_diff_report_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(thresh_prop_delay_diff_r17_present, 1)); - bool neigh_cell_info_list_r17_present; - HANDLE_CODE(bref.unpack(neigh_cell_info_list_r17_present, 1)); - - if (thresh_prop_delay_diff_r17_present) { - HANDLE_CODE(thresh_prop_delay_diff_r17.unpack(bref)); - } - if (neigh_cell_info_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(neigh_cell_info_list_r17, bref, 1, 4)); - } - - return SRSASN_SUCCESS; -} -void prop_delay_diff_report_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (thresh_prop_delay_diff_r17_present) { - j.write_str("threshPropDelayDiff-r17", thresh_prop_delay_diff_r17.to_string()); - } - if (neigh_cell_info_list_r17.size() > 0) { - j.start_array("neighCellInfoList-r17"); - for (const auto& e1 : neigh_cell_info_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -const char* prop_delay_diff_report_cfg_r17_s::thresh_prop_delay_diff_r17_opts::to_string() const -{ - static const char* names[] = {"ms0dot5", - "ms1", - "ms2", - "ms3", - "ms4", - "ms5", - "ms6", - "ms7", - "ms8", - "ms9", - "ms10", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "prop_delay_diff_report_cfg_r17_s::thresh_prop_delay_diff_r17_e_"); -} -float prop_delay_diff_report_cfg_r17_s::thresh_prop_delay_diff_r17_opts::to_number() const -{ - static const float numbers[] = {0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; - return map_enum_number(numbers, 11, value, "prop_delay_diff_report_cfg_r17_s::thresh_prop_delay_diff_r17_e_"); -} -const char* prop_delay_diff_report_cfg_r17_s::thresh_prop_delay_diff_r17_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - return convert_enum_idx(number_strs, 16, value, "prop_delay_diff_report_cfg_r17_s::thresh_prop_delay_diff_r17_e_"); -} - -// Q-OffsetRangeList ::= SEQUENCE -SRSASN_CODE q_offset_range_list_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)); - - 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; -} -SRSASN_CODE q_offset_range_list_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)); - - 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(); -} - -// RLM-RelaxationReportingConfig-r17 ::= SEQUENCE -SRSASN_CODE rlm_relaxation_report_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(rlm_relaxtion_report_prohibit_timer.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE rlm_relaxation_report_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(rlm_relaxtion_report_prohibit_timer.unpack(bref)); - - return SRSASN_SUCCESS; -} -void rlm_relaxation_report_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("rlm-RelaxtionReportingProhibitTimer", rlm_relaxtion_report_prohibit_timer.to_string()); - j.end_obj(); -} - -const char* rlm_relaxation_report_cfg_r17_s::rlm_relaxtion_report_prohibit_timer_opts::to_string() const -{ - static const char* names[] = {"s0", - "s0dot5", - "s1", - "s2", - "s5", - "s10", - "s20", - "s30", - "s60", - "s90", - "s120", - "s300", - "s600", - "infinity", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "rlm_relaxation_report_cfg_r17_s::rlm_relaxtion_report_prohibit_timer_e_"); -} -float rlm_relaxation_report_cfg_r17_s::rlm_relaxtion_report_prohibit_timer_opts::to_number() const -{ - static const float numbers[] = {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, -1.0}; - return map_enum_number(numbers, 14, value, "rlm_relaxation_report_cfg_r17_s::rlm_relaxtion_report_prohibit_timer_e_"); -} -const char* rlm_relaxation_report_cfg_r17_s::rlm_relaxtion_report_prohibit_timer_opts::to_number_string() const -{ - static const char* number_strs[] = { - "0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600", "inf"}; - return convert_enum_idx( - number_strs, 16, value, "rlm_relaxation_report_cfg_r17_s::rlm_relaxtion_report_prohibit_timer_e_"); -} - -// RRM-MeasRelaxationReportingConfig-r17 ::= SEQUENCE -SRSASN_CODE rrm_meas_relaxation_report_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(s_search_delta_p_stationary_r17.pack(bref)); - HANDLE_CODE(t_search_delta_p_stationary_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrm_meas_relaxation_report_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(s_search_delta_p_stationary_r17.unpack(bref)); - HANDLE_CODE(t_search_delta_p_stationary_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void rrm_meas_relaxation_report_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("s-SearchDeltaP-Stationary-r17", s_search_delta_p_stationary_r17.to_string()); - j.write_str("t-SearchDeltaP-Stationary-r17", t_search_delta_p_stationary_r17.to_string()); - j.end_obj(); -} - -const char* rrm_meas_relaxation_report_cfg_r17_s::s_search_delta_p_stationary_r17_opts::to_string() const -{ - static const char* names[] = {"dB2", "dB3", "dB6", "dB9", "dB12", "dB15", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "rrm_meas_relaxation_report_cfg_r17_s::s_search_delta_p_stationary_r17_e_"); -} -uint8_t rrm_meas_relaxation_report_cfg_r17_s::s_search_delta_p_stationary_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 3, 6, 9, 12, 15}; - return map_enum_number(numbers, 6, value, "rrm_meas_relaxation_report_cfg_r17_s::s_search_delta_p_stationary_r17_e_"); -} - -const char* rrm_meas_relaxation_report_cfg_r17_s::t_search_delta_p_stationary_r17_opts::to_string() const -{ - static const char* names[] = {"s5", - "s10", - "s20", - "s30", - "s60", - "s120", - "s180", - "s240", - "s300", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "rrm_meas_relaxation_report_cfg_r17_s::t_search_delta_p_stationary_r17_e_"); -} -uint16_t rrm_meas_relaxation_report_cfg_r17_s::t_search_delta_p_stationary_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {5, 10, 20, 30, 60, 120, 180, 240, 300}; - return map_enum_number(numbers, 9, value, "rrm_meas_relaxation_report_cfg_r17_s::t_search_delta_p_stationary_r17_e_"); -} - -// RSSI-ResourceConfigCLI-r16 ::= SEQUENCE -SRSASN_CODE rssi_res_cfg_cli_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ref_serv_cell_idx_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, rssi_res_id_r16, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(rssi_scs_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, start_prb_r16, (uint16_t)0u, (uint16_t)2169u)); - HANDLE_CODE(pack_integer(bref, nrof_prbs_r16, (uint16_t)4u, (uint16_t)276u)); - HANDLE_CODE(pack_integer(bref, start_position_r16, (uint8_t)0u, (uint8_t)13u)); - HANDLE_CODE(pack_integer(bref, nrof_symbols_r16, (uint8_t)1u, (uint8_t)14u)); - HANDLE_CODE(rssi_periodicity_and_offset_r16.pack(bref)); - if (ref_serv_cell_idx_r16_present) { - HANDLE_CODE(pack_integer(bref, ref_serv_cell_idx_r16, (uint8_t)0u, (uint8_t)31u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rssi_res_cfg_cli_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ref_serv_cell_idx_r16_present, 1)); - - HANDLE_CODE(unpack_integer(rssi_res_id_r16, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(rssi_scs_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(start_prb_r16, bref, (uint16_t)0u, (uint16_t)2169u)); - HANDLE_CODE(unpack_integer(nrof_prbs_r16, bref, (uint16_t)4u, (uint16_t)276u)); - HANDLE_CODE(unpack_integer(start_position_r16, bref, (uint8_t)0u, (uint8_t)13u)); - HANDLE_CODE(unpack_integer(nrof_symbols_r16, bref, (uint8_t)1u, (uint8_t)14u)); - HANDLE_CODE(rssi_periodicity_and_offset_r16.unpack(bref)); - if (ref_serv_cell_idx_r16_present) { - HANDLE_CODE(unpack_integer(ref_serv_cell_idx_r16, bref, (uint8_t)0u, (uint8_t)31u)); - } - - return SRSASN_SUCCESS; -} -void rssi_res_cfg_cli_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("rssi-ResourceId-r16", rssi_res_id_r16); - j.write_str("rssi-SCS-r16", rssi_scs_r16.to_string()); - j.write_int("startPRB-r16", start_prb_r16); - j.write_int("nrofPRBs-r16", nrof_prbs_r16); - j.write_int("startPosition-r16", start_position_r16); - j.write_int("nrofSymbols-r16", nrof_symbols_r16); - j.write_fieldname("rssi-PeriodicityAndOffset-r16"); - rssi_periodicity_and_offset_r16.to_json(j); - if (ref_serv_cell_idx_r16_present) { - j.write_int("refServCellIndex-r16", ref_serv_cell_idx_r16); - } - j.end_obj(); -} - -// SCG-DeactivationPreferenceConfig-r17 ::= SEQUENCE -SRSASN_CODE scg_deactivation_pref_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(scg_deactivation_pref_prohibit_timer_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE scg_deactivation_pref_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(scg_deactivation_pref_prohibit_timer_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void scg_deactivation_pref_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("scg-DeactivationPreferenceProhibitTimer-r17", scg_deactivation_pref_prohibit_timer_r17.to_string()); - j.end_obj(); -} - -const char* scg_deactivation_pref_cfg_r17_s::scg_deactivation_pref_prohibit_timer_r17_opts::to_string() const -{ - static const char* names[] = {"s0", - "s1", - "s2", - "s4", - "s8", - "s10", - "s15", - "s30", - "s60", - "s120", - "s180", - "s240", - "s300", - "s600", - "s900", - "s1800"}; - return convert_enum_idx( - names, 16, value, "scg_deactivation_pref_cfg_r17_s::scg_deactivation_pref_prohibit_timer_r17_e_"); -} -uint16_t scg_deactivation_pref_cfg_r17_s::scg_deactivation_pref_prohibit_timer_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {0, 1, 2, 4, 8, 10, 15, 30, 60, 120, 180, 240, 300, 600, 900, 1800}; - return map_enum_number( - numbers, 16, value, "scg_deactivation_pref_cfg_r17_s::scg_deactivation_pref_prohibit_timer_r17_e_"); -} - -// SL-RemoteUE-ToAddMod-r17 ::= SEQUENCE -SRSASN_CODE sl_remote_ue_to_add_mod_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_srap_cfg_relay_r17_present, 1)); - - HANDLE_CODE(sl_l2_id_remote_r17.pack(bref)); - if (sl_srap_cfg_relay_r17_present) { - HANDLE_CODE(sl_srap_cfg_relay_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_remote_ue_to_add_mod_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_srap_cfg_relay_r17_present, 1)); - - HANDLE_CODE(sl_l2_id_remote_r17.unpack(bref)); - if (sl_srap_cfg_relay_r17_present) { - HANDLE_CODE(sl_srap_cfg_relay_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sl_remote_ue_to_add_mod_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("sl-L2IdentityRemote-r17", sl_l2_id_remote_r17.to_string()); - if (sl_srap_cfg_relay_r17_present) { - j.write_fieldname("sl-SRAP-ConfigRelay-r17"); - sl_srap_cfg_relay_r17.to_json(j); - } - j.end_obj(); -} - -// SRS-ResourceConfigCLI-r16 ::= SEQUENCE -SRSASN_CODE srs_res_cfg_cli_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ref_serv_cell_idx_r16_present, 1)); - - HANDLE_CODE(srs_res_r16.pack(bref)); - HANDLE_CODE(srs_scs_r16.pack(bref)); - if (ref_serv_cell_idx_r16_present) { - HANDLE_CODE(pack_integer(bref, ref_serv_cell_idx_r16, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(pack_integer(bref, ref_bwp_r16, (uint8_t)0u, (uint8_t)4u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE srs_res_cfg_cli_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ref_serv_cell_idx_r16_present, 1)); - - HANDLE_CODE(srs_res_r16.unpack(bref)); - HANDLE_CODE(srs_scs_r16.unpack(bref)); - if (ref_serv_cell_idx_r16_present) { - HANDLE_CODE(unpack_integer(ref_serv_cell_idx_r16, bref, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(unpack_integer(ref_bwp_r16, bref, (uint8_t)0u, (uint8_t)4u)); - - return SRSASN_SUCCESS; -} -void srs_res_cfg_cli_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("srs-Resource-r16"); - srs_res_r16.to_json(j); - j.write_str("srs-SCS-r16", srs_scs_r16.to_string()); - if (ref_serv_cell_idx_r16_present) { - j.write_int("refServCellIndex-r16", ref_serv_cell_idx_r16); - } - j.write_int("refBWP-r16", ref_bwp_r16); - j.end_obj(); -} - -// SuccessHO-Config-r17 ::= SEQUENCE -SRSASN_CODE success_ho_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(thres_percentage_t304_r17_present, 1)); - HANDLE_CODE(bref.pack(thres_percentage_t310_r17_present, 1)); - HANDLE_CODE(bref.pack(thres_percentage_t312_r17_present, 1)); - HANDLE_CODE(bref.pack(source_daps_fail_report_r17_present, 1)); - - if (thres_percentage_t304_r17_present) { - HANDLE_CODE(thres_percentage_t304_r17.pack(bref)); - } - if (thres_percentage_t310_r17_present) { - HANDLE_CODE(thres_percentage_t310_r17.pack(bref)); - } - if (thres_percentage_t312_r17_present) { - HANDLE_CODE(thres_percentage_t312_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE success_ho_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(thres_percentage_t304_r17_present, 1)); - HANDLE_CODE(bref.unpack(thres_percentage_t310_r17_present, 1)); - HANDLE_CODE(bref.unpack(thres_percentage_t312_r17_present, 1)); - HANDLE_CODE(bref.unpack(source_daps_fail_report_r17_present, 1)); - - if (thres_percentage_t304_r17_present) { - HANDLE_CODE(thres_percentage_t304_r17.unpack(bref)); - } - if (thres_percentage_t310_r17_present) { - HANDLE_CODE(thres_percentage_t310_r17.unpack(bref)); - } - if (thres_percentage_t312_r17_present) { - HANDLE_CODE(thres_percentage_t312_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void success_ho_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (thres_percentage_t304_r17_present) { - j.write_str("thresholdPercentageT304-r17", thres_percentage_t304_r17.to_string()); - } - if (thres_percentage_t310_r17_present) { - j.write_str("thresholdPercentageT310-r17", thres_percentage_t310_r17.to_string()); - } - if (thres_percentage_t312_r17_present) { - j.write_str("thresholdPercentageT312-r17", thres_percentage_t312_r17.to_string()); - } - if (source_daps_fail_report_r17_present) { - j.write_str("sourceDAPS-FailureReporting-r17", "true"); - } - j.end_obj(); -} - -const char* success_ho_cfg_r17_s::thres_percentage_t304_r17_opts::to_string() const -{ - static const char* names[] = {"p40", "p60", "p80", "spare5", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "success_ho_cfg_r17_s::thres_percentage_t304_r17_e_"); -} -uint8_t success_ho_cfg_r17_s::thres_percentage_t304_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {40, 60, 80}; - return map_enum_number(numbers, 3, value, "success_ho_cfg_r17_s::thres_percentage_t304_r17_e_"); -} - -const char* success_ho_cfg_r17_s::thres_percentage_t310_r17_opts::to_string() const -{ - static const char* names[] = {"p40", "p60", "p80", "spare5", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "success_ho_cfg_r17_s::thres_percentage_t310_r17_e_"); -} -uint8_t success_ho_cfg_r17_s::thres_percentage_t310_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {40, 60, 80}; - return map_enum_number(numbers, 3, value, "success_ho_cfg_r17_s::thres_percentage_t310_r17_e_"); -} - -const char* success_ho_cfg_r17_s::thres_percentage_t312_r17_opts::to_string() const -{ - static const char* names[] = {"p20", "p40", "p60", "p80", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "success_ho_cfg_r17_s::thres_percentage_t312_r17_e_"); -} -uint8_t success_ho_cfg_r17_s::thres_percentage_t312_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {20, 40, 60, 80}; - return map_enum_number(numbers, 4, value, "success_ho_cfg_r17_s::thres_percentage_t312_r17_e_"); -} - -// AppLayerMeasConfig-r17 ::= SEQUENCE -SRSASN_CODE app_layer_meas_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_cfg_app_layer_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_cfg_app_layer_to_release_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(rrc_seg_allowed_r17_present, 1)); - - if (meas_cfg_app_layer_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_cfg_app_layer_to_add_mod_list_r17, 1, 16)); - } - if (meas_cfg_app_layer_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_cfg_app_layer_to_release_list_r17, 1, 16, integer_packer(0, 15))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE app_layer_meas_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool meas_cfg_app_layer_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(meas_cfg_app_layer_to_add_mod_list_r17_present, 1)); - bool meas_cfg_app_layer_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(meas_cfg_app_layer_to_release_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(rrc_seg_allowed_r17_present, 1)); - - if (meas_cfg_app_layer_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_cfg_app_layer_to_add_mod_list_r17, bref, 1, 16)); - } - if (meas_cfg_app_layer_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_cfg_app_layer_to_release_list_r17, bref, 1, 16, integer_packer(0, 15))); - } - - return SRSASN_SUCCESS; -} -void app_layer_meas_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (meas_cfg_app_layer_to_add_mod_list_r17.size() > 0) { - j.start_array("measConfigAppLayerToAddModList-r17"); - for (const auto& e1 : meas_cfg_app_layer_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_cfg_app_layer_to_release_list_r17.size() > 0) { - j.start_array("measConfigAppLayerToReleaseList-r17"); - for (const auto& e1 : meas_cfg_app_layer_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (rrc_seg_allowed_r17_present) { - j.write_str("rrc-SegAllowed-r17", "enabled"); - } - j.end_obj(); -} - -// BAP-RoutingID-r16 ::= SEQUENCE -SRSASN_CODE bap_routing_id_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bap_address_r16.pack(bref)); - HANDLE_CODE(bap_path_id_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE bap_routing_id_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bap_address_r16.unpack(bref)); - HANDLE_CODE(bap_path_id_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void bap_routing_id_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("bap-Address-r16", bap_address_r16.to_string()); - j.write_str("bap-PathId-r16", bap_path_id_r16.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(); -} - -// CellsToAddModExt-v1710 ::= SEQUENCE -SRSASN_CODE cells_to_add_mod_ext_v1710_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ntn_polarization_dl_r17_present, 1)); - HANDLE_CODE(bref.pack(ntn_polarization_ul_r17_present, 1)); - - if (ntn_polarization_dl_r17_present) { - HANDLE_CODE(ntn_polarization_dl_r17.pack(bref)); - } - if (ntn_polarization_ul_r17_present) { - HANDLE_CODE(ntn_polarization_ul_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cells_to_add_mod_ext_v1710_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ntn_polarization_dl_r17_present, 1)); - HANDLE_CODE(bref.unpack(ntn_polarization_ul_r17_present, 1)); - - if (ntn_polarization_dl_r17_present) { - HANDLE_CODE(ntn_polarization_dl_r17.unpack(bref)); - } - if (ntn_polarization_ul_r17_present) { - HANDLE_CODE(ntn_polarization_ul_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void cells_to_add_mod_ext_v1710_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ntn_polarization_dl_r17_present) { - j.write_str("ntn-PolarizationDL-r17", ntn_polarization_dl_r17.to_string()); - } - if (ntn_polarization_ul_r17_present) { - j.write_str("ntn-PolarizationUL-r17", ntn_polarization_ul_r17.to_string()); - } - j.end_obj(); -} - -const char* cells_to_add_mod_ext_v1710_s::ntn_polarization_dl_r17_opts::to_string() const -{ - static const char* names[] = {"rhcp", "lhcp", "linear"}; - return convert_enum_idx(names, 3, value, "cells_to_add_mod_ext_v1710_s::ntn_polarization_dl_r17_e_"); -} - -const char* cells_to_add_mod_ext_v1710_s::ntn_polarization_ul_r17_opts::to_string() const -{ - static const char* names[] = {"rhcp", "lhcp", "linear"}; - return convert_enum_idx(names, 3, value, "cells_to_add_mod_ext_v1710_s::ntn_polarization_ul_r17_e_"); -} - -// CellsToAddModUTRA-FDD-r16 ::= SEQUENCE -SRSASN_CODE cells_to_add_mod_utra_fdd_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, cell_idx_utra_fdd_r16, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)511u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cells_to_add_mod_utra_fdd_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(cell_idx_utra_fdd_r16, bref, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)511u)); - - return SRSASN_SUCCESS; -} -void cells_to_add_mod_utra_fdd_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("cellIndexUTRA-FDD-r16", cell_idx_utra_fdd_r16); - j.write_int("physCellId-r16", pci_r16); - j.end_obj(); -} - -// DRX-PreferenceConfig-r16 ::= SEQUENCE -SRSASN_CODE drx_pref_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(drx_pref_prohibit_timer_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE drx_pref_cfg_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(drx_pref_prohibit_timer_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void drx_pref_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("drx-PreferenceProhibitTimer-r16", drx_pref_prohibit_timer_r16.to_string()); - j.end_obj(); -} - -const char* drx_pref_cfg_r16_s::drx_pref_prohibit_timer_r16_opts::to_string() const -{ - static const char* names[] = { - "s0", "s0dot5", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s20", "s30", "spare2", "spare1"}; - return convert_enum_idx(names, 16, value, "drx_pref_cfg_r16_s::drx_pref_prohibit_timer_r16_e_"); -} -float drx_pref_cfg_r16_s::drx_pref_prohibit_timer_r16_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0}; - return map_enum_number(numbers, 14, value, "drx_pref_cfg_r16_s::drx_pref_prohibit_timer_r16_e_"); -} -const char* drx_pref_cfg_r16_s::drx_pref_prohibit_timer_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "20", "30"}; - return convert_enum_idx(number_strs, 16, value, "drx_pref_cfg_r16_s::drx_pref_prohibit_timer_r16_e_"); -} - -// IAB-IP-AddressConfiguration-r16 ::= SEQUENCE -SRSASN_CODE iab_ip_address_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(iab_ip_address_r16_present, 1)); - HANDLE_CODE(bref.pack(iab_ip_usage_r16_present, 1)); - HANDLE_CODE(bref.pack(iab_donor_du_bap_address_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, iab_ip_address_idx_r16, (uint8_t)1u, (uint8_t)32u)); - if (iab_ip_address_r16_present) { - HANDLE_CODE(iab_ip_address_r16.pack(bref)); - } - if (iab_ip_usage_r16_present) { - HANDLE_CODE(iab_ip_usage_r16.pack(bref)); - } - if (iab_donor_du_bap_address_r16_present) { - HANDLE_CODE(iab_donor_du_bap_address_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE iab_ip_address_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(iab_ip_address_r16_present, 1)); - HANDLE_CODE(bref.unpack(iab_ip_usage_r16_present, 1)); - HANDLE_CODE(bref.unpack(iab_donor_du_bap_address_r16_present, 1)); - - HANDLE_CODE(unpack_integer(iab_ip_address_idx_r16, bref, (uint8_t)1u, (uint8_t)32u)); - if (iab_ip_address_r16_present) { - HANDLE_CODE(iab_ip_address_r16.unpack(bref)); - } - if (iab_ip_usage_r16_present) { - HANDLE_CODE(iab_ip_usage_r16.unpack(bref)); - } - if (iab_donor_du_bap_address_r16_present) { - HANDLE_CODE(iab_donor_du_bap_address_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void iab_ip_address_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("iab-IP-AddressIndex-r16", iab_ip_address_idx_r16); - if (iab_ip_address_r16_present) { - j.write_fieldname("iab-IP-Address-r16"); - iab_ip_address_r16.to_json(j); - } - if (iab_ip_usage_r16_present) { - j.write_str("iab-IP-Usage-r16", iab_ip_usage_r16.to_string()); - } - if (iab_donor_du_bap_address_r16_present) { - j.write_str("iab-donor-DU-BAP-Address-r16", iab_donor_du_bap_address_r16.to_string()); - } - j.end_obj(); -} - -// IDC-AssistanceConfig-r16 ::= SEQUENCE -SRSASN_CODE idc_assist_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(candidate_serving_freq_list_nr_r16.size() > 0, 1)); - - if (candidate_serving_freq_list_nr_r16.size() > 0) { - HANDLE_CODE( - pack_dyn_seq_of(bref, candidate_serving_freq_list_nr_r16, 1, 128, integer_packer(0, 3279165))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE idc_assist_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool candidate_serving_freq_list_nr_r16_present; - HANDLE_CODE(bref.unpack(candidate_serving_freq_list_nr_r16_present, 1)); - - if (candidate_serving_freq_list_nr_r16_present) { - HANDLE_CODE( - unpack_dyn_seq_of(candidate_serving_freq_list_nr_r16, bref, 1, 128, integer_packer(0, 3279165))); - } - - return SRSASN_SUCCESS; -} -void idc_assist_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (candidate_serving_freq_list_nr_r16.size() > 0) { - j.start_array("candidateServingFreqListNR-r16"); - for (const auto& e1 : candidate_serving_freq_list_nr_r16) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// MUSIM-GapConfig-r17 ::= SEQUENCE -SRSASN_CODE mu_si_m_gap_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(musim_gap_to_release_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(musim_gap_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(musim_aperiodic_gap_r17_present, 1)); - - if (musim_gap_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, musim_gap_to_release_list_r17, 1, 3, integer_packer(0, 2))); - } - if (musim_gap_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, musim_gap_to_add_mod_list_r17, 1, 3)); - } - if (musim_aperiodic_gap_r17_present) { - HANDLE_CODE(musim_aperiodic_gap_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mu_si_m_gap_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool musim_gap_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(musim_gap_to_release_list_r17_present, 1)); - bool musim_gap_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(musim_gap_to_add_mod_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(musim_aperiodic_gap_r17_present, 1)); - - if (musim_gap_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(musim_gap_to_release_list_r17, bref, 1, 3, integer_packer(0, 2))); - } - if (musim_gap_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(musim_gap_to_add_mod_list_r17, bref, 1, 3)); - } - if (musim_aperiodic_gap_r17_present) { - HANDLE_CODE(musim_aperiodic_gap_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void mu_si_m_gap_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (musim_gap_to_release_list_r17.size() > 0) { - j.start_array("musim-GapToReleaseList-r17"); - for (const auto& e1 : musim_gap_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (musim_gap_to_add_mod_list_r17.size() > 0) { - j.start_array("musim-GapToAddModList-r17"); - for (const auto& e1 : musim_gap_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (musim_aperiodic_gap_r17_present) { - j.write_fieldname("musim-AperiodicGap-r17"); - musim_aperiodic_gap_r17.to_json(j); - } - j.end_obj(); -} - -// MaxBW-PreferenceConfig-r16 ::= SEQUENCE -SRSASN_CODE max_bw_pref_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(max_bw_pref_prohibit_timer_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE max_bw_pref_cfg_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(max_bw_pref_prohibit_timer_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void max_bw_pref_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("maxBW-PreferenceProhibitTimer-r16", max_bw_pref_prohibit_timer_r16.to_string()); - j.end_obj(); -} - -const char* max_bw_pref_cfg_r16_s::max_bw_pref_prohibit_timer_r16_opts::to_string() const -{ - static const char* names[] = { - "s0", "s0dot5", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s20", "s30", "spare2", "spare1"}; - return convert_enum_idx(names, 16, value, "max_bw_pref_cfg_r16_s::max_bw_pref_prohibit_timer_r16_e_"); -} -float max_bw_pref_cfg_r16_s::max_bw_pref_prohibit_timer_r16_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0}; - return map_enum_number(numbers, 14, value, "max_bw_pref_cfg_r16_s::max_bw_pref_prohibit_timer_r16_e_"); -} -const char* max_bw_pref_cfg_r16_s::max_bw_pref_prohibit_timer_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "20", "30"}; - return convert_enum_idx(number_strs, 16, value, "max_bw_pref_cfg_r16_s::max_bw_pref_prohibit_timer_r16_e_"); -} - -// MaxCC-PreferenceConfig-r16 ::= SEQUENCE -SRSASN_CODE max_cc_pref_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(max_cc_pref_prohibit_timer_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE max_cc_pref_cfg_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(max_cc_pref_prohibit_timer_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void max_cc_pref_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("maxCC-PreferenceProhibitTimer-r16", max_cc_pref_prohibit_timer_r16.to_string()); - j.end_obj(); -} - -const char* max_cc_pref_cfg_r16_s::max_cc_pref_prohibit_timer_r16_opts::to_string() const -{ - static const char* names[] = { - "s0", "s0dot5", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s20", "s30", "spare2", "spare1"}; - return convert_enum_idx(names, 16, value, "max_cc_pref_cfg_r16_s::max_cc_pref_prohibit_timer_r16_e_"); -} -float max_cc_pref_cfg_r16_s::max_cc_pref_prohibit_timer_r16_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0}; - return map_enum_number(numbers, 14, value, "max_cc_pref_cfg_r16_s::max_cc_pref_prohibit_timer_r16_e_"); -} -const char* max_cc_pref_cfg_r16_s::max_cc_pref_prohibit_timer_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "20", "30"}; - return convert_enum_idx(number_strs, 16, value, "max_cc_pref_cfg_r16_s::max_cc_pref_prohibit_timer_r16_e_"); -} - -// MaxMIMO-LayerPreferenceConfig-r16 ::= SEQUENCE -SRSASN_CODE max_mimo_layer_pref_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(max_mimo_layer_pref_prohibit_timer_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE max_mimo_layer_pref_cfg_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(max_mimo_layer_pref_prohibit_timer_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void max_mimo_layer_pref_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("maxMIMO-LayerPreferenceProhibitTimer-r16", max_mimo_layer_pref_prohibit_timer_r16.to_string()); - j.end_obj(); -} - -const char* max_mimo_layer_pref_cfg_r16_s::max_mimo_layer_pref_prohibit_timer_r16_opts::to_string() const -{ - static const char* names[] = { - "s0", "s0dot5", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s20", "s30", "spare2", "spare1"}; - return convert_enum_idx(names, 16, value, "max_mimo_layer_pref_cfg_r16_s::max_mimo_layer_pref_prohibit_timer_r16_e_"); -} -float max_mimo_layer_pref_cfg_r16_s::max_mimo_layer_pref_prohibit_timer_r16_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0}; - return map_enum_number( - numbers, 14, value, "max_mimo_layer_pref_cfg_r16_s::max_mimo_layer_pref_prohibit_timer_r16_e_"); -} -const char* max_mimo_layer_pref_cfg_r16_s::max_mimo_layer_pref_prohibit_timer_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "20", "30"}; - return convert_enum_idx( - number_strs, 16, value, "max_mimo_layer_pref_cfg_r16_s::max_mimo_layer_pref_prohibit_timer_r16_e_"); -} - -// MeasRSSI-ReportConfig-r16 ::= SEQUENCE -SRSASN_CODE meas_rssi_report_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ch_occupancy_thres_r16_present, 1)); - - if (ch_occupancy_thres_r16_present) { - HANDLE_CODE(pack_integer(bref, ch_occupancy_thres_r16, (uint8_t)0u, (uint8_t)76u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_rssi_report_cfg_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ch_occupancy_thres_r16_present, 1)); - - if (ch_occupancy_thres_r16_present) { - HANDLE_CODE(unpack_integer(ch_occupancy_thres_r16, bref, (uint8_t)0u, (uint8_t)76u)); - } - - return SRSASN_SUCCESS; -} -void meas_rssi_report_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ch_occupancy_thres_r16_present) { - j.write_int("channelOccupancyThreshold-r16", ch_occupancy_thres_r16); - } - j.end_obj(); -} - -// 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(); -} - -// MeasReportQuantity-r16 ::= SEQUENCE -SRSASN_CODE meas_report_quant_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cbr_r16, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_report_quant_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(cbr_r16, 1)); - - return SRSASN_SUCCESS; -} -void meas_report_quant_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_bool("cbr-r16", cbr_r16); - j.end_obj(); -} - -// MeasReportQuantityCLI-r16 ::= ENUMERATED -const char* meas_report_quant_cli_r16_opts::to_string() const -{ - static const char* names[] = {"srs-rsrp", "cli-rssi"}; - return convert_enum_idx(names, 2, value, "meas_report_quant_cli_r16_e"); -} - -// MeasReportQuantityUTRA-FDD-r16 ::= SEQUENCE -SRSASN_CODE meas_report_quant_utra_fdd_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(cpich_rs_cp, 1)); - HANDLE_CODE(bref.pack(cpich_ec_n0, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_report_quant_utra_fdd_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(cpich_rs_cp, 1)); - HANDLE_CODE(bref.unpack(cpich_ec_n0, 1)); - - return SRSASN_SUCCESS; -} -void meas_report_quant_utra_fdd_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_bool("cpich-RSCP", cpich_rs_cp); - j.write_bool("cpich-EcN0", cpich_ec_n0); - j.end_obj(); -} - -// MeasTriggerQuantityCLI-r16 ::= CHOICE -void meas_trigger_quant_cli_r16_c::destroy_() {} -void meas_trigger_quant_cli_r16_c::set(types::options e) -{ - destroy_(); - type_ = e; -} -meas_trigger_quant_cli_r16_c::meas_trigger_quant_cli_r16_c(const meas_trigger_quant_cli_r16_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::srs_rsrp_r16: - c.init(other.c.get()); - break; - case types::cli_rssi_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_cli_r16_c"); - } -} -meas_trigger_quant_cli_r16_c& meas_trigger_quant_cli_r16_c::operator=(const meas_trigger_quant_cli_r16_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::srs_rsrp_r16: - c.set(other.c.get()); - break; - case types::cli_rssi_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_cli_r16_c"); - } - - return *this; -} -uint8_t& meas_trigger_quant_cli_r16_c::set_srs_rsrp_r16() -{ - set(types::srs_rsrp_r16); - return c.get(); -} -uint8_t& meas_trigger_quant_cli_r16_c::set_cli_rssi_r16() -{ - set(types::cli_rssi_r16); - return c.get(); -} -void meas_trigger_quant_cli_r16_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::srs_rsrp_r16: - j.write_int("srs-RSRP-r16", c.get()); - break; - case types::cli_rssi_r16: - j.write_int("cli-RSSI-r16", c.get()); - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_cli_r16_c"); - } - j.end_obj(); -} -SRSASN_CODE meas_trigger_quant_cli_r16_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::srs_rsrp_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)98u)); - break; - case types::cli_rssi_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)76u)); - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_cli_r16_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_trigger_quant_cli_r16_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::srs_rsrp_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)98u)); - break; - case types::cli_rssi_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)76u)); - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_cli_r16_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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::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"); - } -} -meas_trigger_quant_eutra_c& meas_trigger_quant_eutra_c::operator=(const meas_trigger_quant_eutra_c& other) -{ - 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; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); - } - - return *this; -} -uint8_t& meas_trigger_quant_eutra_c::set_rsrp() -{ - set(types::rsrp); - return c.get(); -} -uint8_t& meas_trigger_quant_eutra_c::set_rsrq() -{ - set(types::rsrq); - return c.get(); -} -uint8_t& meas_trigger_quant_eutra_c::set_sinr() -{ - set(types::sinr); - return c.get(); -} -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::rsrq: - j.write_int("rsrq", c.get()); - break; - case types::sinr: - j.write_int("sinr", c.get()); - break; - 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::rsrq: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)34u)); - break; - case types::sinr: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_trigger_quant_eutra_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)); - break; - case types::rsrq: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)34u)); - break; - case types::sinr: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// MeasTriggerQuantityUTRA-FDD-r16 ::= CHOICE -void meas_trigger_quant_utra_fdd_r16_c::destroy_() {} -void meas_trigger_quant_utra_fdd_r16_c::set(types::options e) -{ - destroy_(); - type_ = e; -} -meas_trigger_quant_utra_fdd_r16_c::meas_trigger_quant_utra_fdd_r16_c(const meas_trigger_quant_utra_fdd_r16_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::utra_fdd_rs_cp_r16: - c.init(other.c.get()); - break; - case types::utra_fdd_ec_n0_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_utra_fdd_r16_c"); - } -} -meas_trigger_quant_utra_fdd_r16_c& -meas_trigger_quant_utra_fdd_r16_c::operator=(const meas_trigger_quant_utra_fdd_r16_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::utra_fdd_rs_cp_r16: - c.set(other.c.get()); - break; - case types::utra_fdd_ec_n0_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_utra_fdd_r16_c"); - } - - return *this; -} -int8_t& meas_trigger_quant_utra_fdd_r16_c::set_utra_fdd_rs_cp_r16() -{ - set(types::utra_fdd_rs_cp_r16); - return c.get(); -} -uint8_t& meas_trigger_quant_utra_fdd_r16_c::set_utra_fdd_ec_n0_r16() -{ - set(types::utra_fdd_ec_n0_r16); - return c.get(); -} -void meas_trigger_quant_utra_fdd_r16_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::utra_fdd_rs_cp_r16: - j.write_int("utra-FDD-RSCP-r16", c.get()); - break; - case types::utra_fdd_ec_n0_r16: - j.write_int("utra-FDD-EcN0-r16", c.get()); - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_utra_fdd_r16_c"); - } - j.end_obj(); -} -SRSASN_CODE meas_trigger_quant_utra_fdd_r16_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::utra_fdd_rs_cp_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (int8_t)-5, (int8_t)91)); - break; - case types::utra_fdd_ec_n0_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)49u)); - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_utra_fdd_r16_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_trigger_quant_utra_fdd_r16_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::utra_fdd_rs_cp_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (int8_t)-5, (int8_t)91)); - break; - case types::utra_fdd_ec_n0_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)49u)); - break; - default: - log_invalid_choice_id(type_, "meas_trigger_quant_utra_fdd_r16_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// MinSchedulingOffsetPreferenceConfig-r16 ::= SEQUENCE -SRSASN_CODE min_sched_offset_pref_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(min_sched_offset_pref_prohibit_timer_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE min_sched_offset_pref_cfg_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(min_sched_offset_pref_prohibit_timer_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void min_sched_offset_pref_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("minSchedulingOffsetPreferenceProhibitTimer-r16", min_sched_offset_pref_prohibit_timer_r16.to_string()); - j.end_obj(); -} - -const char* min_sched_offset_pref_cfg_r16_s::min_sched_offset_pref_prohibit_timer_r16_opts::to_string() const -{ - static const char* names[] = { - "s0", "s0dot5", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s20", "s30", "spare2", "spare1"}; - return convert_enum_idx( - names, 16, value, "min_sched_offset_pref_cfg_r16_s::min_sched_offset_pref_prohibit_timer_r16_e_"); -} -float min_sched_offset_pref_cfg_r16_s::min_sched_offset_pref_prohibit_timer_r16_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0}; - return map_enum_number( - numbers, 14, value, "min_sched_offset_pref_cfg_r16_s::min_sched_offset_pref_prohibit_timer_r16_e_"); -} -const char* min_sched_offset_pref_cfg_r16_s::min_sched_offset_pref_prohibit_timer_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "20", "30"}; - return convert_enum_idx( - number_strs, 16, value, "min_sched_offset_pref_cfg_r16_s::min_sched_offset_pref_prohibit_timer_r16_e_"); -} - -// NeedForGapNCSG-ConfigEUTRA-r17 ::= SEQUENCE -SRSASN_CODE need_for_gap_ncsg_cfg_eutra_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(requested_target_band_filt_ncsg_eutra_r17.size() > 0, 1)); - - if (requested_target_band_filt_ncsg_eutra_r17.size() > 0) { - HANDLE_CODE( - pack_dyn_seq_of(bref, requested_target_band_filt_ncsg_eutra_r17, 1, 256, integer_packer(1, 256))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE need_for_gap_ncsg_cfg_eutra_r17_s::unpack(cbit_ref& bref) -{ - bool requested_target_band_filt_ncsg_eutra_r17_present; - HANDLE_CODE(bref.unpack(requested_target_band_filt_ncsg_eutra_r17_present, 1)); - - if (requested_target_band_filt_ncsg_eutra_r17_present) { - HANDLE_CODE( - unpack_dyn_seq_of(requested_target_band_filt_ncsg_eutra_r17, bref, 1, 256, integer_packer(1, 256))); - } - - return SRSASN_SUCCESS; -} -void need_for_gap_ncsg_cfg_eutra_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (requested_target_band_filt_ncsg_eutra_r17.size() > 0) { - j.start_array("requestedTargetBandFilterNCSG-EUTRA-r17"); - for (const auto& e1 : requested_target_band_filt_ncsg_eutra_r17) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// NeedForGapNCSG-ConfigNR-r17 ::= SEQUENCE -SRSASN_CODE need_for_gap_ncsg_cfg_nr_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(requested_target_band_filt_ncsg_nr_r17.size() > 0, 1)); - - if (requested_target_band_filt_ncsg_nr_r17.size() > 0) { - HANDLE_CODE( - pack_dyn_seq_of(bref, requested_target_band_filt_ncsg_nr_r17, 1, 1024, integer_packer(1, 1024))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE need_for_gap_ncsg_cfg_nr_r17_s::unpack(cbit_ref& bref) -{ - bool requested_target_band_filt_ncsg_nr_r17_present; - HANDLE_CODE(bref.unpack(requested_target_band_filt_ncsg_nr_r17_present, 1)); - - if (requested_target_band_filt_ncsg_nr_r17_present) { - HANDLE_CODE( - unpack_dyn_seq_of(requested_target_band_filt_ncsg_nr_r17, bref, 1, 1024, integer_packer(1, 1024))); - } - - return SRSASN_SUCCESS; -} -void need_for_gap_ncsg_cfg_nr_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (requested_target_band_filt_ncsg_nr_r17.size() > 0) { - j.start_array("requestedTargetBandFilterNCSG-NR-r17"); - for (const auto& e1 : requested_target_band_filt_ncsg_nr_r17) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// OtherConfig-v1700 ::= SEQUENCE -SRSASN_CODE other_cfg_v1700_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_gap_fr2_pref_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(musim_gap_assist_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(musim_leave_assist_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(success_ho_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(max_bw_pref_cfg_fr2_2_r17_present, 1)); - HANDLE_CODE(bref.pack(max_mimo_layer_pref_cfg_fr2_2_r17_present, 1)); - HANDLE_CODE(bref.pack(min_sched_offset_pref_cfg_ext_r17_present, 1)); - HANDLE_CODE(bref.pack(rlm_relaxation_report_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(bfd_relaxation_report_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(scg_deactivation_pref_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(rrm_meas_relaxation_report_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(prop_delay_diff_report_cfg_r17_present, 1)); - - if (musim_gap_assist_cfg_r17_present) { - HANDLE_CODE(musim_gap_assist_cfg_r17.pack(bref)); - } - if (musim_leave_assist_cfg_r17_present) { - HANDLE_CODE(musim_leave_assist_cfg_r17.pack(bref)); - } - if (success_ho_cfg_r17_present) { - HANDLE_CODE(success_ho_cfg_r17.pack(bref)); - } - if (rlm_relaxation_report_cfg_r17_present) { - HANDLE_CODE(rlm_relaxation_report_cfg_r17.pack(bref)); - } - if (bfd_relaxation_report_cfg_r17_present) { - HANDLE_CODE(bfd_relaxation_report_cfg_r17.pack(bref)); - } - if (scg_deactivation_pref_cfg_r17_present) { - HANDLE_CODE(scg_deactivation_pref_cfg_r17.pack(bref)); - } - if (rrm_meas_relaxation_report_cfg_r17_present) { - HANDLE_CODE(rrm_meas_relaxation_report_cfg_r17.pack(bref)); - } - if (prop_delay_diff_report_cfg_r17_present) { - HANDLE_CODE(prop_delay_diff_report_cfg_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE other_cfg_v1700_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ul_gap_fr2_pref_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(musim_gap_assist_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(musim_leave_assist_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(success_ho_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(max_bw_pref_cfg_fr2_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(max_mimo_layer_pref_cfg_fr2_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(min_sched_offset_pref_cfg_ext_r17_present, 1)); - HANDLE_CODE(bref.unpack(rlm_relaxation_report_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(bfd_relaxation_report_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(scg_deactivation_pref_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(rrm_meas_relaxation_report_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(prop_delay_diff_report_cfg_r17_present, 1)); - - if (musim_gap_assist_cfg_r17_present) { - HANDLE_CODE(musim_gap_assist_cfg_r17.unpack(bref)); - } - if (musim_leave_assist_cfg_r17_present) { - HANDLE_CODE(musim_leave_assist_cfg_r17.unpack(bref)); - } - if (success_ho_cfg_r17_present) { - HANDLE_CODE(success_ho_cfg_r17.unpack(bref)); - } - if (rlm_relaxation_report_cfg_r17_present) { - HANDLE_CODE(rlm_relaxation_report_cfg_r17.unpack(bref)); - } - if (bfd_relaxation_report_cfg_r17_present) { - HANDLE_CODE(bfd_relaxation_report_cfg_r17.unpack(bref)); - } - if (scg_deactivation_pref_cfg_r17_present) { - HANDLE_CODE(scg_deactivation_pref_cfg_r17.unpack(bref)); - } - if (rrm_meas_relaxation_report_cfg_r17_present) { - HANDLE_CODE(rrm_meas_relaxation_report_cfg_r17.unpack(bref)); - } - if (prop_delay_diff_report_cfg_r17_present) { - HANDLE_CODE(prop_delay_diff_report_cfg_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void other_cfg_v1700_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ul_gap_fr2_pref_cfg_r17_present) { - j.write_str("ul-GapFR2-PreferenceConfig-r17", "true"); - } - if (musim_gap_assist_cfg_r17_present) { - j.write_fieldname("musim-GapAssistanceConfig-r17"); - musim_gap_assist_cfg_r17.to_json(j); - } - if (musim_leave_assist_cfg_r17_present) { - j.write_fieldname("musim-LeaveAssistanceConfig-r17"); - musim_leave_assist_cfg_r17.to_json(j); - } - if (success_ho_cfg_r17_present) { - j.write_fieldname("successHO-Config-r17"); - success_ho_cfg_r17.to_json(j); - } - if (max_bw_pref_cfg_fr2_2_r17_present) { - j.write_str("maxBW-PreferenceConfigFR2-2-r17", "true"); - } - if (max_mimo_layer_pref_cfg_fr2_2_r17_present) { - j.write_str("maxMIMO-LayerPreferenceConfigFR2-2-r17", "true"); - } - if (min_sched_offset_pref_cfg_ext_r17_present) { - j.write_str("minSchedulingOffsetPreferenceConfigExt-r17", "true"); - } - if (rlm_relaxation_report_cfg_r17_present) { - j.write_fieldname("rlm-RelaxationReportingConfig-r17"); - rlm_relaxation_report_cfg_r17.to_json(j); - } - if (bfd_relaxation_report_cfg_r17_present) { - j.write_fieldname("bfd-RelaxationReportingConfig-r17"); - bfd_relaxation_report_cfg_r17.to_json(j); - } - if (scg_deactivation_pref_cfg_r17_present) { - j.write_fieldname("scg-DeactivationPreferenceConfig-r17"); - scg_deactivation_pref_cfg_r17.to_json(j); - } - if (rrm_meas_relaxation_report_cfg_r17_present) { - j.write_fieldname("rrm-MeasRelaxationReportingConfig-r17"); - rrm_meas_relaxation_report_cfg_r17.to_json(j); - } - if (prop_delay_diff_report_cfg_r17_present) { - j.write_fieldname("propDelayDiffReportConfig-r17"); - prop_delay_diff_report_cfg_r17.to_json(j); - } - j.end_obj(); -} - -// ReleasePreferenceConfig-r16 ::= SEQUENCE -SRSASN_CODE release_pref_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(connected_report_present, 1)); - - HANDLE_CODE(release_pref_prohibit_timer_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE release_pref_cfg_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(connected_report_present, 1)); - - HANDLE_CODE(release_pref_prohibit_timer_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void release_pref_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("releasePreferenceProhibitTimer-r16", release_pref_prohibit_timer_r16.to_string()); - if (connected_report_present) { - j.write_str("connectedReporting", "true"); - } - j.end_obj(); -} - -const char* release_pref_cfg_r16_s::release_pref_prohibit_timer_r16_opts::to_string() const -{ - static const char* names[] = { - "s0", "s0dot5", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s20", "s30", "infinity", "spare1"}; - return convert_enum_idx(names, 16, value, "release_pref_cfg_r16_s::release_pref_prohibit_timer_r16_e_"); -} -float release_pref_cfg_r16_s::release_pref_prohibit_timer_r16_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0, -1.0}; - return map_enum_number(numbers, 15, value, "release_pref_cfg_r16_s::release_pref_prohibit_timer_r16_e_"); -} -const char* release_pref_cfg_r16_s::release_pref_prohibit_timer_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "20", "30", "inf"}; - return convert_enum_idx(number_strs, 16, value, "release_pref_cfg_r16_s::release_pref_prohibit_timer_r16_e_"); -} - -// RxTxReportInterval-r17 ::= ENUMERATED -const char* rx_tx_report_interv_r17_opts::to_string() const -{ - static const char* names[] = {"ms80", - "ms120", - "ms160", - "ms240", - "ms320", - "ms480", - "ms640", - "ms1024", - "ms1280", - "ms2048", - "ms2560", - "ms5120", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "rx_tx_report_interv_r17_e"); -} -uint16_t rx_tx_report_interv_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {80, 120, 160, 240, 320, 480, 640, 1024, 1280, 2048, 2560, 5120}; - return map_enum_number(numbers, 12, value, "rx_tx_report_interv_r17_e"); -} - -// SL-L2RelayUE-Config-r17 ::= SEQUENCE -SRSASN_CODE sl_l2_relay_ue_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_remote_ue_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_remote_ue_to_release_list_r17.size() > 0, 1)); - - if (sl_remote_ue_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_remote_ue_to_add_mod_list_r17, 1, 32)); - } - if (sl_remote_ue_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_remote_ue_to_release_list_r17, 1, 32)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_l2_relay_ue_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool sl_remote_ue_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(sl_remote_ue_to_add_mod_list_r17_present, 1)); - bool sl_remote_ue_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(sl_remote_ue_to_release_list_r17_present, 1)); - - if (sl_remote_ue_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_remote_ue_to_add_mod_list_r17, bref, 1, 32)); - } - if (sl_remote_ue_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_remote_ue_to_release_list_r17, bref, 1, 32)); - } - - return SRSASN_SUCCESS; -} -void sl_l2_relay_ue_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_remote_ue_to_add_mod_list_r17.size() > 0) { - j.start_array("sl-RemoteUE-ToAddModList-r17"); - for (const auto& e1 : sl_remote_ue_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_remote_ue_to_release_list_r17.size() > 0) { - j.start_array("sl-RemoteUE-ToReleaseList-r17"); - for (const auto& e1 : sl_remote_ue_to_release_list_r17) { - j.write_str(e1.to_string()); - } - j.end_array(); - } - j.end_obj(); -} - -// SL-TimeOffsetEUTRA-r16 ::= ENUMERATED -const char* sl_time_offset_eutra_r16_opts::to_string() const -{ - static const char* names[] = {"ms0", - "ms0dot25", - "ms0dot5", - "ms0dot625", - "ms0dot75", - "ms1", - "ms1dot25", - "ms1dot5", - "ms1dot75", - "ms2", - "ms2dot5", - "ms3", - "ms4", - "ms5", - "ms6", - "ms8", - "ms10", - "ms20"}; - return convert_enum_idx(names, 18, value, "sl_time_offset_eutra_r16_e"); -} -float sl_time_offset_eutra_r16_opts::to_number() const -{ - static const float numbers[] = { - 0.0, 0.25, 0.5, 0.625, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 20.0}; - return map_enum_number(numbers, 18, value, "sl_time_offset_eutra_r16_e"); -} -const char* sl_time_offset_eutra_r16_opts::to_number_string() const -{ - static const char* number_strs[] = { - "0", "0.25", "0.5", "0.625", "0.75", "1", "1.25", "1.5", "1.75", "2", "2.5", "3", "4", "5", "6", "8", "10", "20"}; - return convert_enum_idx(number_strs, 18, value, "sl_time_offset_eutra_r16_e"); -} - -// SSB-ConfigMobility ::= SEQUENCE -SRSASN_CODE ssb_cfg_mob_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)); - - if (ssb_to_measure_present) { - HANDLE_CODE(ssb_to_measure.pack(bref)); - } - HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell, 1)); - if (ss_rssi_meas_present) { - HANDLE_CODE(ss_rssi_meas.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= ssb_position_qcl_common_r16_present; - group_flags[0] |= ssb_position_qcl_cells_to_add_mod_list_r16.is_present(); - group_flags[0] |= ssb_position_qcl_cells_to_rem_list_r16.is_present(); - group_flags[1] |= derive_ssb_idx_from_cell_inter_r17_present; - group_flags[1] |= ssb_position_qcl_common_r17_present; - group_flags[1] |= ssb_position_qcl_cells_r17.is_present(); - group_flags[2] |= cca_cells_to_add_mod_list_r17.is_present(); - group_flags[2] |= cca_cells_to_rem_list_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ssb_position_qcl_common_r16_present, 1)); - HANDLE_CODE(bref.pack(ssb_position_qcl_cells_to_add_mod_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(ssb_position_qcl_cells_to_rem_list_r16.is_present(), 1)); - if (ssb_position_qcl_common_r16_present) { - HANDLE_CODE(ssb_position_qcl_common_r16.pack(bref)); - } - if (ssb_position_qcl_cells_to_add_mod_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *ssb_position_qcl_cells_to_add_mod_list_r16, 1, 32)); - } - if (ssb_position_qcl_cells_to_rem_list_r16.is_present()) { - HANDLE_CODE( - pack_dyn_seq_of(bref, *ssb_position_qcl_cells_to_rem_list_r16, 1, 32, integer_packer(0, 1007))); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell_inter_r17_present, 1)); - HANDLE_CODE(bref.pack(ssb_position_qcl_common_r17_present, 1)); - HANDLE_CODE(bref.pack(ssb_position_qcl_cells_r17.is_present(), 1)); - if (derive_ssb_idx_from_cell_inter_r17_present) { - HANDLE_CODE(pack_integer(bref, derive_ssb_idx_from_cell_inter_r17, (uint8_t)0u, (uint8_t)31u)); - } - if (ssb_position_qcl_common_r17_present) { - HANDLE_CODE(ssb_position_qcl_common_r17.pack(bref)); - } - if (ssb_position_qcl_cells_r17.is_present()) { - HANDLE_CODE(ssb_position_qcl_cells_r17->pack(bref)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(cca_cells_to_add_mod_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(cca_cells_to_rem_list_r17.is_present(), 1)); - if (cca_cells_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *cca_cells_to_add_mod_list_r17, 1, 32, integer_packer(0, 1007))); - } - if (cca_cells_to_rem_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *cca_cells_to_rem_list_r17, 1, 32, integer_packer(0, 1007))); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ssb_cfg_mob_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)); - - if (ssb_to_measure_present) { - HANDLE_CODE(ssb_to_measure.unpack(bref)); - } - HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell, 1)); - if (ss_rssi_meas_present) { - HANDLE_CODE(ss_rssi_meas.unpack(bref)); - } - - if (ext) { - 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(ssb_position_qcl_common_r16_present, 1)); - unpack_presence_flag(ssb_position_qcl_cells_to_add_mod_list_r16, bref); - unpack_presence_flag(ssb_position_qcl_cells_to_rem_list_r16, bref); - if (ssb_position_qcl_common_r16_present) { - HANDLE_CODE(ssb_position_qcl_common_r16.unpack(bref)); - } - if (ssb_position_qcl_cells_to_add_mod_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*ssb_position_qcl_cells_to_add_mod_list_r16, bref, 1, 32)); - } - if (ssb_position_qcl_cells_to_rem_list_r16.is_present()) { - HANDLE_CODE( - unpack_dyn_seq_of(*ssb_position_qcl_cells_to_rem_list_r16, bref, 1, 32, integer_packer(0, 1007))); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell_inter_r17_present, 1)); - HANDLE_CODE(bref.unpack(ssb_position_qcl_common_r17_present, 1)); - unpack_presence_flag(ssb_position_qcl_cells_r17, bref); - if (derive_ssb_idx_from_cell_inter_r17_present) { - HANDLE_CODE(unpack_integer(derive_ssb_idx_from_cell_inter_r17, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (ssb_position_qcl_common_r17_present) { - HANDLE_CODE(ssb_position_qcl_common_r17.unpack(bref)); - } - if (ssb_position_qcl_cells_r17.is_present()) { - HANDLE_CODE(ssb_position_qcl_cells_r17->unpack(bref)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(cca_cells_to_add_mod_list_r17, bref); - unpack_presence_flag(cca_cells_to_rem_list_r17, bref); - if (cca_cells_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*cca_cells_to_add_mod_list_r17, bref, 1, 32, integer_packer(0, 1007))); - } - if (cca_cells_to_rem_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*cca_cells_to_rem_list_r17, bref, 1, 32, integer_packer(0, 1007))); - } - } - } - return SRSASN_SUCCESS; -} -void ssb_cfg_mob_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); - } - 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 (ext) { - if (ssb_position_qcl_common_r16_present) { - j.write_str("ssb-PositionQCL-Common-r16", ssb_position_qcl_common_r16.to_string()); - } - if (ssb_position_qcl_cells_to_add_mod_list_r16.is_present()) { - j.start_array("ssb-PositionQCL-CellsToAddModList-r16"); - for (const auto& e1 : *ssb_position_qcl_cells_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (ssb_position_qcl_cells_to_rem_list_r16.is_present()) { - j.start_array("ssb-PositionQCL-CellsToRemoveList-r16"); - for (const auto& e1 : *ssb_position_qcl_cells_to_rem_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (derive_ssb_idx_from_cell_inter_r17_present) { - j.write_int("deriveSSB-IndexFromCellInter-r17", derive_ssb_idx_from_cell_inter_r17); - } - if (ssb_position_qcl_common_r17_present) { - j.write_str("ssb-PositionQCL-Common-r17", ssb_position_qcl_common_r17.to_string()); - } - if (ssb_position_qcl_cells_r17.is_present()) { - j.write_fieldname("ssb-PositionQCL-Cells-r17"); - ssb_position_qcl_cells_r17->to_json(j); - } - if (cca_cells_to_add_mod_list_r17.is_present()) { - j.start_array("cca-CellsToAddModList-r17"); - for (const auto& e1 : *cca_cells_to_add_mod_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (cca_cells_to_rem_list_r17.is_present()) { - j.start_array("cca-CellsToRemoveList-r17"); - for (const auto& e1 : *cca_cells_to_rem_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - } - j.end_obj(); -} - -// SSB-MTC3-r16 ::= SEQUENCE -SRSASN_CODE ssb_mtc3_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(pci_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(ssb_to_measure_r16_present, 1)); - - HANDLE_CODE(periodicity_and_offset_r16.pack(bref)); - HANDLE_CODE(dur_r16.pack(bref)); - if (pci_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, pci_list_r16, 1, 64, integer_packer(0, 1007))); - } - if (ssb_to_measure_r16_present) { - HANDLE_CODE(ssb_to_measure_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ssb_mtc3_r16_s::unpack(cbit_ref& bref) -{ - bool pci_list_r16_present; - HANDLE_CODE(bref.unpack(pci_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(ssb_to_measure_r16_present, 1)); - - HANDLE_CODE(periodicity_and_offset_r16.unpack(bref)); - HANDLE_CODE(dur_r16.unpack(bref)); - if (pci_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(pci_list_r16, bref, 1, 64, integer_packer(0, 1007))); - } - if (ssb_to_measure_r16_present) { - HANDLE_CODE(ssb_to_measure_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ssb_mtc3_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("periodicityAndOffset-r16"); - periodicity_and_offset_r16.to_json(j); - j.write_str("duration-r16", dur_r16.to_string()); - if (pci_list_r16.size() > 0) { - j.start_array("pci-List-r16"); - for (const auto& e1 : pci_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (ssb_to_measure_r16_present) { - j.write_fieldname("ssb-ToMeasure-r16"); - ssb_to_measure_r16.to_json(j); - } - j.end_obj(); -} - -void ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::destroy_() {} -void ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::periodicity_and_offset_r16_c_( - const ssb_mtc3_r16_s::periodicity_and_offset_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::sf5_r16: - c.init(other.c.get()); - break; - case types::sf10_r16: - c.init(other.c.get()); - break; - case types::sf20_r16: - c.init(other.c.get()); - break; - case types::sf40_r16: - c.init(other.c.get()); - break; - case types::sf80_r16: - c.init(other.c.get()); - break; - case types::sf160_r16: - c.init(other.c.get()); - break; - case types::sf320_r16: - c.init(other.c.get()); - break; - case types::sf640_r16: - c.init(other.c.get()); - break; - case types::sf1280_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_"); - } -} -ssb_mtc3_r16_s::periodicity_and_offset_r16_c_& -ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::operator=(const ssb_mtc3_r16_s::periodicity_and_offset_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::sf5_r16: - c.set(other.c.get()); - break; - case types::sf10_r16: - c.set(other.c.get()); - break; - case types::sf20_r16: - c.set(other.c.get()); - break; - case types::sf40_r16: - c.set(other.c.get()); - break; - case types::sf80_r16: - c.set(other.c.get()); - break; - case types::sf160_r16: - c.set(other.c.get()); - break; - case types::sf320_r16: - c.set(other.c.get()); - break; - case types::sf640_r16: - c.set(other.c.get()); - break; - case types::sf1280_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_"); - } - - return *this; -} -uint8_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf5_r16() -{ - set(types::sf5_r16); - return c.get(); -} -uint8_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf10_r16() -{ - set(types::sf10_r16); - return c.get(); -} -uint8_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf20_r16() -{ - set(types::sf20_r16); - return c.get(); -} -uint8_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf40_r16() -{ - set(types::sf40_r16); - return c.get(); -} -uint8_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf80_r16() -{ - set(types::sf80_r16); - return c.get(); -} -uint8_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf160_r16() -{ - set(types::sf160_r16); - return c.get(); -} -uint16_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf320_r16() -{ - set(types::sf320_r16); - return c.get(); -} -uint16_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf640_r16() -{ - set(types::sf640_r16); - return c.get(); -} -uint16_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf1280_r16() -{ - set(types::sf1280_r16); - return c.get(); -} -void ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::sf5_r16: - j.write_int("sf5-r16", c.get()); - break; - case types::sf10_r16: - j.write_int("sf10-r16", c.get()); - break; - case types::sf20_r16: - j.write_int("sf20-r16", c.get()); - break; - case types::sf40_r16: - j.write_int("sf40-r16", c.get()); - break; - case types::sf80_r16: - j.write_int("sf80-r16", c.get()); - break; - case types::sf160_r16: - j.write_int("sf160-r16", c.get()); - break; - case types::sf320_r16: - j.write_int("sf320-r16", c.get()); - break; - case types::sf640_r16: - j.write_int("sf640-r16", c.get()); - break; - case types::sf1280_r16: - j.write_int("sf1280-r16", c.get()); - break; - default: - log_invalid_choice_id(type_, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::sf5_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); - break; - case types::sf10_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - break; - case types::sf20_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); - break; - case types::sf40_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::sf80_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - case types::sf160_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); - break; - case types::sf320_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); - break; - case types::sf640_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); - break; - case types::sf1280_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); - break; - default: - log_invalid_choice_id(type_, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::sf5_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); - break; - case types::sf10_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - break; - case types::sf20_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::sf40_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::sf80_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::sf160_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); - break; - case types::sf320_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); - break; - case types::sf640_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); - break; - case types::sf1280_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); - break; - default: - log_invalid_choice_id(type_, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* ssb_mtc3_r16_s::dur_r16_opts::to_string() const -{ - static const char* names[] = {"sf1", "sf2", "sf3", "sf4", "sf5"}; - return convert_enum_idx(names, 5, value, "ssb_mtc3_r16_s::dur_r16_e_"); -} -uint8_t ssb_mtc3_r16_s::dur_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 5}; - return map_enum_number(numbers, 5, value, "ssb_mtc3_r16_s::dur_r16_e_"); -} - -// Sensor-NameList-r16 ::= SEQUENCE -SRSASN_CODE sensor_name_list_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(meas_uncom_bar_pre_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_ue_speed_present, 1)); - HANDLE_CODE(bref.pack(meas_ue_orientation_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sensor_name_list_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(meas_uncom_bar_pre_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_ue_speed_present, 1)); - HANDLE_CODE(bref.unpack(meas_ue_orientation_present, 1)); - - return SRSASN_SUCCESS; -} -void sensor_name_list_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (meas_uncom_bar_pre_r16_present) { - j.write_str("measUncomBarPre-r16", "true"); - } - if (meas_ue_speed_present) { - j.write_str("measUeSpeed", "true"); - } - if (meas_ue_orientation_present) { - j.write_str("measUeOrientation", "true"); - } - j.end_obj(); -} - -// UE-TxTEG-RequestUL-TDOA-Config-r17 ::= CHOICE -void ue_tx_teg_request_ul_tdoa_cfg_r17_c::set(types::options e) -{ - type_ = e; -} -void ue_tx_teg_request_ul_tdoa_cfg_r17_c::set_one_shot_r17() -{ - set(types::one_shot_r17); -} -ue_tx_teg_request_ul_tdoa_cfg_r17_c::periodic_report_r17_e_& -ue_tx_teg_request_ul_tdoa_cfg_r17_c::set_periodic_report_r17() -{ - set(types::periodic_report_r17); - return c; -} -void ue_tx_teg_request_ul_tdoa_cfg_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::one_shot_r17: - break; - case types::periodic_report_r17: - j.write_str("periodicReporting-r17", c.to_string()); - break; - default: - log_invalid_choice_id(type_, "ue_tx_teg_request_ul_tdoa_cfg_r17_c"); - } - j.end_obj(); -} -SRSASN_CODE ue_tx_teg_request_ul_tdoa_cfg_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::one_shot_r17: - break; - case types::periodic_report_r17: - HANDLE_CODE(c.pack(bref)); - break; - default: - log_invalid_choice_id(type_, "ue_tx_teg_request_ul_tdoa_cfg_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_tx_teg_request_ul_tdoa_cfg_r17_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::one_shot_r17: - break; - case types::periodic_report_r17: - HANDLE_CODE(c.unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "ue_tx_teg_request_ul_tdoa_cfg_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* ue_tx_teg_request_ul_tdoa_cfg_r17_c::periodic_report_r17_opts::to_string() const -{ - static const char* names[] = {"ms160", "ms320", "ms1280", "ms2560", "ms61440", "ms81920", "ms368640", "ms737280"}; - return convert_enum_idx(names, 8, value, "ue_tx_teg_request_ul_tdoa_cfg_r17_c::periodic_report_r17_e_"); -} -uint32_t ue_tx_teg_request_ul_tdoa_cfg_r17_c::periodic_report_r17_opts::to_number() const -{ - static const uint32_t numbers[] = {160, 320, 1280, 2560, 61440, 81920, 368640, 737280}; - return map_enum_number(numbers, 8, value, "ue_tx_teg_request_ul_tdoa_cfg_r17_c::periodic_report_r17_e_"); -} - -// UL-DelayValueConfig-r16 ::= SEQUENCE -SRSASN_CODE ul_delay_value_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_dyn_seq_of(bref, delay_drb_list_r16, 1, 29, integer_packer(1, 32))); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_delay_value_cfg_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_dyn_seq_of(delay_drb_list_r16, bref, 1, 29, integer_packer(1, 32))); - - return SRSASN_SUCCESS; -} -void ul_delay_value_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("delay-DRBlist-r16"); - for (const auto& e1 : delay_drb_list_r16) { - j.write_int(e1); - } - j.end_array(); - j.end_obj(); -} - -// UL-ExcessDelayConfig-r17 ::= SEQUENCE -SRSASN_CODE ul_excess_delay_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_dyn_seq_of(bref, excess_delay_drb_list_r17, 1, 29)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_excess_delay_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_dyn_seq_of(excess_delay_drb_list_r17, bref, 1, 29)); - - return SRSASN_SUCCESS; -} -void ul_excess_delay_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("excessDelay-DRBlist-r17"); - for (const auto& e1 : excess_delay_drb_list_r17) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// UL-GapFR2-Config-r17 ::= SEQUENCE -SRSASN_CODE ul_gap_fr2_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ref_fr2_serv_cell_async_ca_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, gap_offset_r17, (uint8_t)0u, (uint8_t)159u)); - HANDLE_CODE(ugl_r17.pack(bref)); - HANDLE_CODE(ugrp_r17.pack(bref)); - if (ref_fr2_serv_cell_async_ca_r17_present) { - HANDLE_CODE(pack_integer(bref, ref_fr2_serv_cell_async_ca_r17, (uint8_t)0u, (uint8_t)31u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_gap_fr2_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ref_fr2_serv_cell_async_ca_r17_present, 1)); - - HANDLE_CODE(unpack_integer(gap_offset_r17, bref, (uint8_t)0u, (uint8_t)159u)); - HANDLE_CODE(ugl_r17.unpack(bref)); - HANDLE_CODE(ugrp_r17.unpack(bref)); - if (ref_fr2_serv_cell_async_ca_r17_present) { - HANDLE_CODE(unpack_integer(ref_fr2_serv_cell_async_ca_r17, bref, (uint8_t)0u, (uint8_t)31u)); - } - - return SRSASN_SUCCESS; -} -void ul_gap_fr2_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("gapOffset-r17", gap_offset_r17); - j.write_str("ugl-r17", ugl_r17.to_string()); - j.write_str("ugrp-r17", ugrp_r17.to_string()); - if (ref_fr2_serv_cell_async_ca_r17_present) { - j.write_int("refFR2-ServCellAsyncCA-r17", ref_fr2_serv_cell_async_ca_r17); - } - j.end_obj(); -} - -const char* ul_gap_fr2_cfg_r17_s::ugl_r17_opts::to_string() const -{ - static const char* names[] = {"ms0dot125", "ms0dot25", "ms0dot5", "ms1"}; - return convert_enum_idx(names, 4, value, "ul_gap_fr2_cfg_r17_s::ugl_r17_e_"); -} -float ul_gap_fr2_cfg_r17_s::ugl_r17_opts::to_number() const -{ - static const float numbers[] = {0.125, 0.25, 0.5, 1.0}; - return map_enum_number(numbers, 4, value, "ul_gap_fr2_cfg_r17_s::ugl_r17_e_"); -} -const char* ul_gap_fr2_cfg_r17_s::ugl_r17_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.125", "0.25", "0.5", "1"}; - return convert_enum_idx(number_strs, 4, value, "ul_gap_fr2_cfg_r17_s::ugl_r17_e_"); -} - -const char* ul_gap_fr2_cfg_r17_s::ugrp_r17_opts::to_string() const -{ - static const char* names[] = {"ms5", "ms20", "ms40", "ms160"}; - return convert_enum_idx(names, 4, value, "ul_gap_fr2_cfg_r17_s::ugrp_r17_e_"); -} -uint8_t ul_gap_fr2_cfg_r17_s::ugrp_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {5, 20, 40, 160}; - return map_enum_number(numbers, 4, value, "ul_gap_fr2_cfg_r17_s::ugrp_r17_e_"); -} - -// BAP-Config-r16 ::= SEQUENCE -SRSASN_CODE bap_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(bap_address_r16_present, 1)); - HANDLE_CODE(bref.pack(default_ul_bap_routing_id_r16_present, 1)); - HANDLE_CODE(bref.pack(default_ul_bh_rlc_ch_r16_present, 1)); - HANDLE_CODE(bref.pack(flow_ctrl_feedback_type_r16_present, 1)); - - if (bap_address_r16_present) { - HANDLE_CODE(bap_address_r16.pack(bref)); - } - if (default_ul_bap_routing_id_r16_present) { - HANDLE_CODE(default_ul_bap_routing_id_r16.pack(bref)); - } - if (default_ul_bh_rlc_ch_r16_present) { - HANDLE_CODE(default_ul_bh_rlc_ch_r16.pack(bref)); - } - if (flow_ctrl_feedback_type_r16_present) { - HANDLE_CODE(flow_ctrl_feedback_type_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE bap_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(bap_address_r16_present, 1)); - HANDLE_CODE(bref.unpack(default_ul_bap_routing_id_r16_present, 1)); - HANDLE_CODE(bref.unpack(default_ul_bh_rlc_ch_r16_present, 1)); - HANDLE_CODE(bref.unpack(flow_ctrl_feedback_type_r16_present, 1)); - - if (bap_address_r16_present) { - HANDLE_CODE(bap_address_r16.unpack(bref)); - } - if (default_ul_bap_routing_id_r16_present) { - HANDLE_CODE(default_ul_bap_routing_id_r16.unpack(bref)); - } - if (default_ul_bh_rlc_ch_r16_present) { - HANDLE_CODE(default_ul_bh_rlc_ch_r16.unpack(bref)); - } - if (flow_ctrl_feedback_type_r16_present) { - HANDLE_CODE(flow_ctrl_feedback_type_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void bap_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (bap_address_r16_present) { - j.write_str("bap-Address-r16", bap_address_r16.to_string()); - } - if (default_ul_bap_routing_id_r16_present) { - j.write_fieldname("defaultUL-BAP-RoutingID-r16"); - default_ul_bap_routing_id_r16.to_json(j); - } - if (default_ul_bh_rlc_ch_r16_present) { - j.write_str("defaultUL-BH-RLC-Channel-r16", default_ul_bh_rlc_ch_r16.to_string()); - } - if (flow_ctrl_feedback_type_r16_present) { - j.write_str("flowControlFeedbackType-r16", flow_ctrl_feedback_type_r16.to_string()); - } - j.end_obj(); -} - -const char* bap_cfg_r16_s::flow_ctrl_feedback_type_r16_opts::to_string() const -{ - static const char* names[] = {"perBH-RLC-Channel", "perRoutingID", "both"}; - return convert_enum_idx(names, 3, value, "bap_cfg_r16_s::flow_ctrl_feedback_type_r16_e_"); -} - -// CLI-EventTriggerConfig-r16 ::= SEQUENCE -SRSASN_CODE cli_event_trigger_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(event_id_r16.pack(bref)); - HANDLE_CODE(report_interv_r16.pack(bref)); - HANDLE_CODE(report_amount_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, max_report_cli_r16, (uint8_t)1u, (uint8_t)8u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cli_event_trigger_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(event_id_r16.unpack(bref)); - HANDLE_CODE(report_interv_r16.unpack(bref)); - HANDLE_CODE(report_amount_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(max_report_cli_r16, bref, (uint8_t)1u, (uint8_t)8u)); - - return SRSASN_SUCCESS; -} -void cli_event_trigger_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("eventId-r16"); - event_id_r16.to_json(j); - j.write_str("reportInterval-r16", report_interv_r16.to_string()); - j.write_str("reportAmount-r16", report_amount_r16.to_string()); - j.write_int("maxReportCLI-r16", max_report_cli_r16); - j.end_obj(); -} - -void cli_event_trigger_cfg_r16_s::event_id_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("eventI1-r16"); - j.start_obj(); - j.write_fieldname("i1-Threshold-r16"); - c.i1_thres_r16.to_json(j); - j.write_bool("reportOnLeave-r16", c.report_on_leave_r16); - j.write_int("hysteresis-r16", c.hysteresis_r16); - j.write_str("timeToTrigger-r16", c.time_to_trigger_r16.to_string()); - j.end_obj(); - j.end_obj(); -} -SRSASN_CODE cli_event_trigger_cfg_r16_s::event_id_r16_c_::pack(bit_ref& bref) const -{ - pack_enum(bref, type()); - HANDLE_CODE(c.i1_thres_r16.pack(bref)); - HANDLE_CODE(bref.pack(c.report_on_leave_r16, 1)); - HANDLE_CODE(pack_integer(bref, c.hysteresis_r16, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.time_to_trigger_r16.pack(bref)); - return SRSASN_SUCCESS; -} -SRSASN_CODE cli_event_trigger_cfg_r16_s::event_id_r16_c_::unpack(cbit_ref& bref) -{ - types e; - unpack_enum(e, bref); - if (e != type()) { - log_invalid_choice_id(e, "cli_event_trigger_cfg_r16_s::event_id_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - HANDLE_CODE(c.i1_thres_r16.unpack(bref)); - HANDLE_CODE(bref.unpack(c.report_on_leave_r16, 1)); - HANDLE_CODE(unpack_integer(c.hysteresis_r16, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.time_to_trigger_r16.unpack(bref)); - return SRSASN_SUCCESS; -} - -const char* cli_event_trigger_cfg_r16_s::report_amount_r16_opts::to_string() const -{ - static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; - return convert_enum_idx(names, 8, value, "cli_event_trigger_cfg_r16_s::report_amount_r16_e_"); -} -int8_t cli_event_trigger_cfg_r16_s::report_amount_r16_opts::to_number() const -{ - static const int8_t numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return map_enum_number(numbers, 8, value, "cli_event_trigger_cfg_r16_s::report_amount_r16_e_"); -} - -// CLI-PeriodicalReportConfig-r16 ::= SEQUENCE -SRSASN_CODE cli_periodical_report_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(report_interv_r16.pack(bref)); - HANDLE_CODE(report_amount_r16.pack(bref)); - HANDLE_CODE(report_quant_cli_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, max_report_cli_r16, (uint8_t)1u, (uint8_t)8u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cli_periodical_report_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(report_interv_r16.unpack(bref)); - HANDLE_CODE(report_amount_r16.unpack(bref)); - HANDLE_CODE(report_quant_cli_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(max_report_cli_r16, bref, (uint8_t)1u, (uint8_t)8u)); - - return SRSASN_SUCCESS; -} -void cli_periodical_report_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("reportInterval-r16", report_interv_r16.to_string()); - j.write_str("reportAmount-r16", report_amount_r16.to_string()); - j.write_str("reportQuantityCLI-r16", report_quant_cli_r16.to_string()); - j.write_int("maxReportCLI-r16", max_report_cli_r16); - j.end_obj(); -} - -const char* cli_periodical_report_cfg_r16_s::report_amount_r16_opts::to_string() const -{ - static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; - return convert_enum_idx(names, 8, value, "cli_periodical_report_cfg_r16_s::report_amount_r16_e_"); -} -int8_t cli_periodical_report_cfg_r16_s::report_amount_r16_opts::to_number() const -{ - static const int8_t numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return map_enum_number(numbers, 8, value, "cli_periodical_report_cfg_r16_s::report_amount_r16_e_"); -} - -// CLI-ResourceConfig-r16 ::= SEQUENCE -SRSASN_CODE cli_res_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(srs_res_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(rssi_res_cfg_r16_present, 1)); - - if (srs_res_cfg_r16_present) { - HANDLE_CODE(srs_res_cfg_r16.pack(bref)); - } - if (rssi_res_cfg_r16_present) { - HANDLE_CODE(rssi_res_cfg_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cli_res_cfg_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(srs_res_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(rssi_res_cfg_r16_present, 1)); - - if (srs_res_cfg_r16_present) { - HANDLE_CODE(srs_res_cfg_r16.unpack(bref)); - } - if (rssi_res_cfg_r16_present) { - HANDLE_CODE(rssi_res_cfg_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void cli_res_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (srs_res_cfg_r16_present) { - j.write_fieldname("srs-ResourceConfig-r16"); - srs_res_cfg_r16.to_json(j); - } - if (rssi_res_cfg_r16_present) { - j.write_fieldname("rssi-ResourceConfig-r16"); - rssi_res_cfg_r16.to_json(j); - } - j.end_obj(); -} - -// ConditionalReconfiguration-r16 ::= SEQUENCE -SRSASN_CODE conditional_recfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(attempt_cond_recfg_r16_present, 1)); - HANDLE_CODE(bref.pack(cond_recfg_to_rem_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(cond_recfg_to_add_mod_list_r16.size() > 0, 1)); - - if (cond_recfg_to_rem_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cond_recfg_to_rem_list_r16, 1, 8, integer_packer(1, 8))); - } - if (cond_recfg_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cond_recfg_to_add_mod_list_r16, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE conditional_recfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(attempt_cond_recfg_r16_present, 1)); - bool cond_recfg_to_rem_list_r16_present; - HANDLE_CODE(bref.unpack(cond_recfg_to_rem_list_r16_present, 1)); - bool cond_recfg_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(cond_recfg_to_add_mod_list_r16_present, 1)); - - if (cond_recfg_to_rem_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(cond_recfg_to_rem_list_r16, bref, 1, 8, integer_packer(1, 8))); - } - if (cond_recfg_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(cond_recfg_to_add_mod_list_r16, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -void conditional_recfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (attempt_cond_recfg_r16_present) { - j.write_str("attemptCondReconfig-r16", "true"); - } - if (cond_recfg_to_rem_list_r16.size() > 0) { - j.start_array("condReconfigToRemoveList-r16"); - for (const auto& e1 : cond_recfg_to_rem_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (cond_recfg_to_add_mod_list_r16.size() > 0) { - j.start_array("condReconfigToAddModList-r16"); - for (const auto& e1 : cond_recfg_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - 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(); -} - -// EUTRA-ExcludedCell ::= SEQUENCE -SRSASN_CODE eutra_excluded_cell_s::pack(bit_ref& bref) 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_excluded_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_excluded_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(); -} - -// EventTriggerConfig ::= SEQUENCE -SRSASN_CODE event_trigger_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(report_add_neigh_meas_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 (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)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= meas_rssi_report_cfg_r16.is_present(); - group_flags[0] |= use_t312_r16_present; - group_flags[0] |= include_common_location_info_r16_present; - group_flags[0] |= include_bt_meas_r16.is_present(); - group_flags[0] |= include_wlan_meas_r16.is_present(); - group_flags[0] |= include_sensor_meas_r16.is_present(); - group_flags[1] |= coarse_location_request_r17_present; - group_flags[1] |= report_quant_relay_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(meas_rssi_report_cfg_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(use_t312_r16_present, 1)); - HANDLE_CODE(bref.pack(include_common_location_info_r16_present, 1)); - HANDLE_CODE(bref.pack(include_bt_meas_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(include_wlan_meas_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(include_sensor_meas_r16.is_present(), 1)); - if (meas_rssi_report_cfg_r16.is_present()) { - HANDLE_CODE(meas_rssi_report_cfg_r16->pack(bref)); - } - if (use_t312_r16_present) { - HANDLE_CODE(bref.pack(use_t312_r16, 1)); - } - if (include_bt_meas_r16.is_present()) { - HANDLE_CODE(include_bt_meas_r16->pack(bref)); - } - if (include_wlan_meas_r16.is_present()) { - HANDLE_CODE(include_wlan_meas_r16->pack(bref)); - } - if (include_sensor_meas_r16.is_present()) { - HANDLE_CODE(include_sensor_meas_r16->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(coarse_location_request_r17_present, 1)); - HANDLE_CODE(bref.pack(report_quant_relay_r17.is_present(), 1)); - if (report_quant_relay_r17.is_present()) { - HANDLE_CODE(report_quant_relay_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE event_trigger_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(report_add_neigh_meas_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 (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)); - - 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); - - unpack_presence_flag(meas_rssi_report_cfg_r16, bref); - HANDLE_CODE(bref.unpack(use_t312_r16_present, 1)); - HANDLE_CODE(bref.unpack(include_common_location_info_r16_present, 1)); - unpack_presence_flag(include_bt_meas_r16, bref); - unpack_presence_flag(include_wlan_meas_r16, bref); - unpack_presence_flag(include_sensor_meas_r16, bref); - if (meas_rssi_report_cfg_r16.is_present()) { - HANDLE_CODE(meas_rssi_report_cfg_r16->unpack(bref)); - } - if (use_t312_r16_present) { - HANDLE_CODE(bref.unpack(use_t312_r16, 1)); - } - if (include_bt_meas_r16.is_present()) { - HANDLE_CODE(include_bt_meas_r16->unpack(bref)); - } - if (include_wlan_meas_r16.is_present()) { - HANDLE_CODE(include_wlan_meas_r16->unpack(bref)); - } - if (include_sensor_meas_r16.is_present()) { - HANDLE_CODE(include_sensor_meas_r16->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(coarse_location_request_r17_present, 1)); - unpack_presence_flag(report_quant_relay_r17, bref); - if (report_quant_relay_r17.is_present()) { - HANDLE_CODE(report_quant_relay_r17->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void event_trigger_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("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); - } - j.write_bool("includeBeamMeasurements", include_beam_meass); - if (report_add_neigh_meas_present) { - j.write_str("reportAddNeighMeas", "setup"); - } - if (ext) { - if (meas_rssi_report_cfg_r16.is_present()) { - j.write_fieldname("measRSSI-ReportConfig-r16"); - meas_rssi_report_cfg_r16->to_json(j); - } - if (use_t312_r16_present) { - j.write_bool("useT312-r16", use_t312_r16); - } - if (include_common_location_info_r16_present) { - j.write_str("includeCommonLocationInfo-r16", "true"); - } - if (include_bt_meas_r16.is_present()) { - j.write_fieldname("includeBT-Meas-r16"); - include_bt_meas_r16->to_json(j); - } - if (include_wlan_meas_r16.is_present()) { - j.write_fieldname("includeWLAN-Meas-r16"); - include_wlan_meas_r16->to_json(j); - } - if (include_sensor_meas_r16.is_present()) { - j.write_fieldname("includeSensor-Meas-r16"); - include_sensor_meas_r16->to_json(j); - } - if (coarse_location_request_r17_present) { - j.write_str("coarseLocationRequest-r17", "true"); - } - if (report_quant_relay_r17.is_present()) { - j.write_fieldname("reportQuantityRelay-r17"); - report_quant_relay_r17->to_json(j); - } - } - 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; - case types::event_x1_r17: - c.destroy(); - break; - case types::event_x2_r17: - c.destroy(); - break; - case types::event_d1_r17: - c.destroy(); - break; - default: - break; - } -} -void event_trigger_cfg_s::event_id_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::event_x1_r17: - c.init(); - break; - case types::event_x2_r17: - c.init(); - break; - case types::event_d1_r17: - 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) -{ - 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()); - break; - case types::event_a6: - c.init(other.c.get()); - break; - case types::event_x1_r17: - c.init(other.c.get()); - break; - case types::event_x2_r17: - c.init(other.c.get()); - break; - case types::event_d1_r17: - c.init(other.c.get()); - 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_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::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()); - break; - case types::event_a6: - c.set(other.c.get()); - break; - case types::event_x1_r17: - c.set(other.c.get()); - break; - case types::event_x2_r17: - c.set(other.c.get()); - break; - case types::event_d1_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); - } - - return *this; -} -event_trigger_cfg_s::event_id_c_::event_a1_s_& event_trigger_cfg_s::event_id_c_::set_event_a1() -{ - set(types::event_a1); - return c.get(); -} -event_trigger_cfg_s::event_id_c_::event_a2_s_& event_trigger_cfg_s::event_id_c_::set_event_a2() -{ - set(types::event_a2); - return c.get(); -} -event_trigger_cfg_s::event_id_c_::event_a3_s_& event_trigger_cfg_s::event_id_c_::set_event_a3() -{ - set(types::event_a3); - return c.get(); -} -event_trigger_cfg_s::event_id_c_::event_a4_s_& event_trigger_cfg_s::event_id_c_::set_event_a4() -{ - set(types::event_a4); - return c.get(); -} -event_trigger_cfg_s::event_id_c_::event_a5_s_& event_trigger_cfg_s::event_id_c_::set_event_a5() -{ - set(types::event_a5); - return c.get(); -} -event_trigger_cfg_s::event_id_c_::event_a6_s_& event_trigger_cfg_s::event_id_c_::set_event_a6() -{ - set(types::event_a6); - return c.get(); -} -event_trigger_cfg_s::event_id_c_::event_x1_r17_s_& event_trigger_cfg_s::event_id_c_::set_event_x1_r17() -{ - set(types::event_x1_r17); - return c.get(); -} -event_trigger_cfg_s::event_id_c_::event_x2_r17_s_& event_trigger_cfg_s::event_id_c_::set_event_x2_r17() -{ - set(types::event_x2_r17); - return c.get(); -} -event_trigger_cfg_s::event_id_c_::event_d1_r17_s_& event_trigger_cfg_s::event_id_c_::set_event_d1_r17() -{ - set(types::event_d1_r17); - return c.get(); -} -void event_trigger_cfg_s::event_id_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("useAllowedCellList", c.get().use_allowed_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("useAllowedCellList", c.get().use_allowed_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("useAllowedCellList", c.get().use_allowed_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("useAllowedCellList", c.get().use_allowed_cell_list); - j.end_obj(); - break; - case types::event_x1_r17: - j.write_fieldname("eventX1-r17"); - j.start_obj(); - j.write_fieldname("x1-Threshold1-Relay-r17"); - c.get().x1_thres1_relay_r17.to_json(j); - j.write_fieldname("x1-Threshold2-r17"); - c.get().x1_thres2_r17.to_json(j); - j.write_bool("reportOnLeave-r17", c.get().report_on_leave_r17); - j.write_int("hysteresis-r17", c.get().hysteresis_r17); - j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); - j.write_bool("useAllowedCellList-r17", c.get().use_allowed_cell_list_r17); - j.end_obj(); - break; - case types::event_x2_r17: - j.write_fieldname("eventX2-r17"); - j.start_obj(); - j.write_fieldname("x2-Threshold-Relay-r17"); - c.get().x2_thres_relay_r17.to_json(j); - j.write_bool("reportOnLeave-r17", c.get().report_on_leave_r17); - j.write_int("hysteresis-r17", c.get().hysteresis_r17); - j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); - j.end_obj(); - break; - case types::event_d1_r17: - j.write_fieldname("eventD1-r17"); - j.start_obj(); - j.write_int("distanceThreshFromReference1-r17", c.get().distance_thresh_from_ref1_r17); - j.write_int("distanceThreshFromReference2-r17", c.get().distance_thresh_from_ref2_r17); - j.write_str("referenceLocation1-r17", c.get().ref_location1_r17.to_string()); - j.write_str("referenceLocation2-r17", c.get().ref_location2_r17.to_string()); - j.write_bool("reportOnLeave-r17", c.get().report_on_leave_r17); - j.write_int("hysteresisLocation-r17", c.get().hysteresis_location_r17); - j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); - } - j.end_obj(); -} -SRSASN_CODE event_trigger_cfg_s::event_id_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_allowed_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_allowed_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_allowed_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_allowed_cell_list, 1)); - break; - case types::event_x1_r17: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().x1_thres1_relay_r17.pack(bref)); - HANDLE_CODE(c.get().x1_thres2_r17.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave_r17, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r17, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r17.pack(bref)); - HANDLE_CODE(bref.pack(c.get().use_allowed_cell_list_r17, 1)); - } break; - case types::event_x2_r17: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().x2_thres_relay_r17.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave_r17, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r17, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r17.pack(bref)); - } break; - case types::event_d1_r17: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE( - pack_integer(bref, c.get().distance_thresh_from_ref1_r17, (uint16_t)1u, (uint16_t)65525u)); - HANDLE_CODE( - pack_integer(bref, c.get().distance_thresh_from_ref2_r17, (uint16_t)1u, (uint16_t)65525u)); - HANDLE_CODE(c.get().ref_location1_r17.pack(bref)); - HANDLE_CODE(c.get().ref_location2_r17.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave_r17, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis_location_r17, (uint16_t)0u, (uint16_t)32768u)); - HANDLE_CODE(c.get().time_to_trigger_r17.pack(bref)); - } break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE event_trigger_cfg_s::event_id_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_allowed_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_allowed_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_allowed_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_allowed_cell_list, 1)); - break; - case types::event_x1_r17: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().x1_thres1_relay_r17.unpack(bref)); - HANDLE_CODE(c.get().x1_thres2_r17.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave_r17, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis_r17, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r17.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().use_allowed_cell_list_r17, 1)); - } break; - case types::event_x2_r17: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().x2_thres_relay_r17.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave_r17, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis_r17, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r17.unpack(bref)); - } break; - case types::event_d1_r17: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE( - unpack_integer(c.get().distance_thresh_from_ref1_r17, bref, (uint16_t)1u, (uint16_t)65525u)); - HANDLE_CODE( - unpack_integer(c.get().distance_thresh_from_ref2_r17, bref, (uint16_t)1u, (uint16_t)65525u)); - HANDLE_CODE(c.get().ref_location1_r17.unpack(bref)); - HANDLE_CODE(c.get().ref_location2_r17.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave_r17, 1)); - HANDLE_CODE( - unpack_integer(c.get().hysteresis_location_r17, bref, (uint16_t)0u, (uint16_t)32768u)); - HANDLE_CODE(c.get().time_to_trigger_r17.unpack(bref)); - } break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* event_trigger_cfg_s::report_amount_opts::to_string() const -{ - static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; - return convert_enum_idx(names, 8, value, "event_trigger_cfg_s::report_amount_e_"); -} -int8_t event_trigger_cfg_s::report_amount_opts::to_number() const -{ - static const int8_t numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return map_enum_number(numbers, 8, value, "event_trigger_cfg_s::report_amount_e_"); -} - -// 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)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= report_quant_utra_fdd_r16.is_present(); - group_flags[1] |= include_common_location_info_r16_present; - group_flags[1] |= include_bt_meas_r16.is_present(); - group_flags[1] |= include_wlan_meas_r16.is_present(); - group_flags[1] |= include_sensor_meas_r16.is_present(); - group_flags[2] |= report_quant_relay_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(report_quant_utra_fdd_r16.is_present(), 1)); - if (report_quant_utra_fdd_r16.is_present()) { - HANDLE_CODE(report_quant_utra_fdd_r16->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(include_common_location_info_r16_present, 1)); - HANDLE_CODE(bref.pack(include_bt_meas_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(include_wlan_meas_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(include_sensor_meas_r16.is_present(), 1)); - if (include_bt_meas_r16.is_present()) { - HANDLE_CODE(include_bt_meas_r16->pack(bref)); - } - if (include_wlan_meas_r16.is_present()) { - HANDLE_CODE(include_wlan_meas_r16->pack(bref)); - } - if (include_sensor_meas_r16.is_present()) { - HANDLE_CODE(include_sensor_meas_r16->pack(bref)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(report_quant_relay_r17.is_present(), 1)); - if (report_quant_relay_r17.is_present()) { - HANDLE_CODE(report_quant_relay_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE event_trigger_cfg_inter_rat_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)); - - if (ext) { - ext_groups_unpacker_guard group_flags(3); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(report_quant_utra_fdd_r16, bref); - if (report_quant_utra_fdd_r16.is_present()) { - HANDLE_CODE(report_quant_utra_fdd_r16->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(include_common_location_info_r16_present, 1)); - unpack_presence_flag(include_bt_meas_r16, bref); - unpack_presence_flag(include_wlan_meas_r16, bref); - unpack_presence_flag(include_sensor_meas_r16, bref); - if (include_bt_meas_r16.is_present()) { - HANDLE_CODE(include_bt_meas_r16->unpack(bref)); - } - if (include_wlan_meas_r16.is_present()) { - HANDLE_CODE(include_wlan_meas_r16->unpack(bref)); - } - if (include_sensor_meas_r16.is_present()) { - HANDLE_CODE(include_sensor_meas_r16->unpack(bref)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(report_quant_relay_r17, bref); - if (report_quant_relay_r17.is_present()) { - HANDLE_CODE(report_quant_relay_r17->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void event_trigger_cfg_inter_rat_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 (ext) { - if (report_quant_utra_fdd_r16.is_present()) { - j.write_fieldname("reportQuantityUTRA-FDD-r16"); - report_quant_utra_fdd_r16->to_json(j); - } - if (include_common_location_info_r16_present) { - j.write_str("includeCommonLocationInfo-r16", "true"); - } - if (include_bt_meas_r16.is_present()) { - j.write_fieldname("includeBT-Meas-r16"); - include_bt_meas_r16->to_json(j); - } - if (include_wlan_meas_r16.is_present()) { - j.write_fieldname("includeWLAN-Meas-r16"); - include_wlan_meas_r16->to_json(j); - } - if (include_sensor_meas_r16.is_present()) { - j.write_fieldname("includeSensor-Meas-r16"); - include_sensor_meas_r16->to_json(j); - } - if (report_quant_relay_r17.is_present()) { - j.write_fieldname("reportQuantityRelay-r17"); - report_quant_relay_r17->to_json(j); - } - } - j.end_obj(); -} - -void event_trigger_cfg_inter_rat_s::event_id_c_::destroy_() -{ - switch (type_) { - case types::event_b1: - c.destroy(); - break; - case types::event_b2: - c.destroy(); - break; - case types::event_b1_utra_fdd_r16: - c.destroy(); - break; - case types::event_b2_utra_fdd_r16: - c.destroy(); - break; - case types::event_y1_relay_r17: - c.destroy(); - break; - case types::event_y2_relay_r17: - c.destroy(); - break; - default: - break; - } -} -void event_trigger_cfg_inter_rat_s::event_id_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::event_b1: - c.init(); - break; - case types::event_b2: - c.init(); - break; - case types::event_b1_utra_fdd_r16: - c.init(); - break; - case types::event_b2_utra_fdd_r16: - c.init(); - break; - case types::event_y1_relay_r17: - c.init(); - break; - case types::event_y2_relay_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); - } -} -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::event_b1: - c.init(other.c.get()); - break; - case types::event_b2: - c.init(other.c.get()); - break; - case types::event_b1_utra_fdd_r16: - c.init(other.c.get()); - break; - case types::event_b2_utra_fdd_r16: - c.init(other.c.get()); - break; - case types::event_y1_relay_r17: - c.init(other.c.get()); - break; - case types::event_y2_relay_r17: - 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_"); - } -} -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::event_b1: - c.set(other.c.get()); - break; - case types::event_b2: - c.set(other.c.get()); - break; - case types::event_b1_utra_fdd_r16: - c.set(other.c.get()); - break; - case types::event_b2_utra_fdd_r16: - c.set(other.c.get()); - break; - case types::event_y1_relay_r17: - c.set(other.c.get()); - break; - case types::event_y2_relay_r17: - 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_"); - } - - return *this; -} -event_trigger_cfg_inter_rat_s::event_id_c_::event_b1_s_& event_trigger_cfg_inter_rat_s::event_id_c_::set_event_b1() -{ - set(types::event_b1); - return c.get(); -} -event_trigger_cfg_inter_rat_s::event_id_c_::event_b2_s_& event_trigger_cfg_inter_rat_s::event_id_c_::set_event_b2() -{ - set(types::event_b2); - return c.get(); -} -event_trigger_cfg_inter_rat_s::event_id_c_::event_b1_utra_fdd_r16_s_& -event_trigger_cfg_inter_rat_s::event_id_c_::set_event_b1_utra_fdd_r16() -{ - set(types::event_b1_utra_fdd_r16); - return c.get(); -} -event_trigger_cfg_inter_rat_s::event_id_c_::event_b2_utra_fdd_r16_s_& -event_trigger_cfg_inter_rat_s::event_id_c_::set_event_b2_utra_fdd_r16() -{ - set(types::event_b2_utra_fdd_r16); - return c.get(); -} -event_trigger_cfg_inter_rat_s::event_id_c_::event_y1_relay_r17_s_& -event_trigger_cfg_inter_rat_s::event_id_c_::set_event_y1_relay_r17() -{ - set(types::event_y1_relay_r17); - return c.get(); -} -event_trigger_cfg_inter_rat_s::event_id_c_::event_y2_relay_r17_s_& -event_trigger_cfg_inter_rat_s::event_id_c_::set_event_y2_relay_r17() -{ - set(types::event_y2_relay_r17); - return c.get(); -} -void event_trigger_cfg_inter_rat_s::event_id_c_::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; - case types::event_b1_utra_fdd_r16: - j.write_fieldname("eventB1-UTRA-FDD-r16"); - j.start_obj(); - j.write_fieldname("b1-ThresholdUTRA-FDD-r16"); - c.get().b1_thres_utra_fdd_r16.to_json(j); - j.write_bool("reportOnLeave-r16", c.get().report_on_leave_r16); - j.write_int("hysteresis-r16", c.get().hysteresis_r16); - j.write_str("timeToTrigger-r16", c.get().time_to_trigger_r16.to_string()); - j.end_obj(); - break; - case types::event_b2_utra_fdd_r16: - j.write_fieldname("eventB2-UTRA-FDD-r16"); - j.start_obj(); - j.write_fieldname("b2-Threshold1-r16"); - c.get().b2_thres1_r16.to_json(j); - j.write_fieldname("b2-Threshold2UTRA-FDD-r16"); - c.get().b2_thres2_utra_fdd_r16.to_json(j); - j.write_bool("reportOnLeave-r16", c.get().report_on_leave_r16); - j.write_int("hysteresis-r16", c.get().hysteresis_r16); - j.write_str("timeToTrigger-r16", c.get().time_to_trigger_r16.to_string()); - j.end_obj(); - break; - case types::event_y1_relay_r17: - j.write_fieldname("eventY1-Relay-r17"); - j.start_obj(); - j.write_fieldname("y1-Threshold1-r17"); - c.get().y1_thres1_r17.to_json(j); - j.write_fieldname("y1-Threshold2-Relay-r17"); - c.get().y1_thres2_relay_r17.to_json(j); - j.write_bool("reportOnLeave-r17", c.get().report_on_leave_r17); - j.write_int("hysteresis-r17", c.get().hysteresis_r17); - j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); - j.end_obj(); - break; - case types::event_y2_relay_r17: - j.write_fieldname("eventY2-Relay-r17"); - j.start_obj(); - j.write_fieldname("y2-Threshold-Relay-r17"); - c.get().y2_thres_relay_r17.to_json(j); - j.write_bool("reportOnLeave-r17", c.get().report_on_leave_r17); - j.write_int("hysteresis-r17", c.get().hysteresis_r17); - j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); - } - 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; - case types::event_b1_utra_fdd_r16: { - varlength_field_pack_guard varlen_scope(bref, false); - bref.pack(c.get().ext, 1); - HANDLE_CODE(c.get().b1_thres_utra_fdd_r16.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave_r16, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r16, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r16.pack(bref)); - } break; - case types::event_b2_utra_fdd_r16: { - varlength_field_pack_guard varlen_scope(bref, false); - bref.pack(c.get().ext, 1); - HANDLE_CODE(c.get().b2_thres1_r16.pack(bref)); - HANDLE_CODE(c.get().b2_thres2_utra_fdd_r16.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave_r16, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r16, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r16.pack(bref)); - } break; - case types::event_y1_relay_r17: { - varlength_field_pack_guard varlen_scope(bref, false); - bref.pack(c.get().ext, 1); - HANDLE_CODE(c.get().y1_thres1_r17.pack(bref)); - HANDLE_CODE(c.get().y1_thres2_relay_r17.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave_r17, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r17, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r17.pack(bref)); - } break; - case types::event_y2_relay_r17: { - varlength_field_pack_guard varlen_scope(bref, false); - bref.pack(c.get().ext, 1); - HANDLE_CODE(c.get().y2_thres_relay_r17.pack(bref)); - HANDLE_CODE(bref.pack(c.get().report_on_leave_r17, 1)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r17, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r17.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; - case types::event_b1_utra_fdd_r16: { - varlength_field_unpack_guard varlen_scope(bref, false); - bref.unpack(c.get().ext, 1); - HANDLE_CODE(c.get().b1_thres_utra_fdd_r16.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave_r16, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis_r16, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r16.unpack(bref)); - } break; - case types::event_b2_utra_fdd_r16: { - varlength_field_unpack_guard varlen_scope(bref, false); - bref.unpack(c.get().ext, 1); - HANDLE_CODE(c.get().b2_thres1_r16.unpack(bref)); - HANDLE_CODE(c.get().b2_thres2_utra_fdd_r16.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave_r16, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis_r16, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r16.unpack(bref)); - } break; - case types::event_y1_relay_r17: { - varlength_field_unpack_guard varlen_scope(bref, false); - bref.unpack(c.get().ext, 1); - HANDLE_CODE(c.get().y1_thres1_r17.unpack(bref)); - HANDLE_CODE(c.get().y1_thres2_relay_r17.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave_r17, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis_r17, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r17.unpack(bref)); - } break; - case types::event_y2_relay_r17: { - varlength_field_unpack_guard varlen_scope(bref, false); - bref.unpack(c.get().ext, 1); - HANDLE_CODE(c.get().y2_thres_relay_r17.unpack(bref)); - HANDLE_CODE(bref.unpack(c.get().report_on_leave_r17, 1)); - HANDLE_CODE(unpack_integer(c.get().hysteresis_r17, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r17.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; -} - -const char* event_trigger_cfg_inter_rat_s::report_amount_opts::to_string() const -{ - static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; - return convert_enum_idx(names, 8, value, "event_trigger_cfg_inter_rat_s::report_amount_e_"); -} -int8_t event_trigger_cfg_inter_rat_s::report_amount_opts::to_number() const -{ - static const int8_t numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return map_enum_number(numbers, 8, value, "event_trigger_cfg_inter_rat_s::report_amount_e_"); -} - -// EventTriggerConfigNR-SL-r16 ::= SEQUENCE -SRSASN_CODE event_trigger_cfg_nr_sl_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(event_id_r16.pack(bref)); - HANDLE_CODE(report_interv_r16.pack(bref)); - HANDLE_CODE(report_amount_r16.pack(bref)); - HANDLE_CODE(report_quant_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE event_trigger_cfg_nr_sl_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(event_id_r16.unpack(bref)); - HANDLE_CODE(report_interv_r16.unpack(bref)); - HANDLE_CODE(report_amount_r16.unpack(bref)); - HANDLE_CODE(report_quant_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void event_trigger_cfg_nr_sl_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("eventId-r16"); - event_id_r16.to_json(j); - j.write_str("reportInterval-r16", report_interv_r16.to_string()); - j.write_str("reportAmount-r16", report_amount_r16.to_string()); - j.write_fieldname("reportQuantity-r16"); - report_quant_r16.to_json(j); - j.end_obj(); -} - -void event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::destroy_() -{ - switch (type_) { - case types::event_c1: - c.destroy(); - break; - case types::event_c2_r16: - c.destroy(); - break; - default: - break; - } -} -void event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::event_c1: - c.init(); - break; - case types::event_c2_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_"); - } -} -event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::event_id_r16_c_( - const event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::event_c1: - c.init(other.c.get()); - break; - case types::event_c2_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_"); - } -} -event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_& -event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::operator=(const event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::event_c1: - c.set(other.c.get()); - break; - case types::event_c2_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_"); - } - - return *this; -} -event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::event_c1_s_& -event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::set_event_c1() -{ - set(types::event_c1); - return c.get(); -} -event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::event_c2_r16_s_& -event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::set_event_c2_r16() -{ - set(types::event_c2_r16); - return c.get(); -} -void event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::event_c1: - j.write_fieldname("eventC1"); - j.start_obj(); - j.write_int("c1-Threshold-r16", c.get().c1_thres_r16); - j.write_int("hysteresis-r16", c.get().hysteresis_r16); - j.write_str("timeToTrigger-r16", c.get().time_to_trigger_r16.to_string()); - j.end_obj(); - break; - case types::event_c2_r16: - j.write_fieldname("eventC2-r16"); - j.start_obj(); - j.write_int("c2-Threshold-r16", c.get().c2_thres_r16); - j.write_int("hysteresis-r16", c.get().hysteresis_r16); - j.write_str("timeToTrigger-r16", c.get().time_to_trigger_r16.to_string()); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::event_c1: - HANDLE_CODE(pack_integer(bref, c.get().c1_thres_r16, (uint8_t)0u, (uint8_t)100u)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r16, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r16.pack(bref)); - break; - case types::event_c2_r16: - HANDLE_CODE(pack_integer(bref, c.get().c2_thres_r16, (uint8_t)0u, (uint8_t)100u)); - HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r16, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r16.pack(bref)); - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::event_c1: - HANDLE_CODE(unpack_integer(c.get().c1_thres_r16, bref, (uint8_t)0u, (uint8_t)100u)); - HANDLE_CODE(unpack_integer(c.get().hysteresis_r16, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r16.unpack(bref)); - break; - case types::event_c2_r16: - HANDLE_CODE(unpack_integer(c.get().c2_thres_r16, bref, (uint8_t)0u, (uint8_t)100u)); - HANDLE_CODE(unpack_integer(c.get().hysteresis_r16, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.get().time_to_trigger_r16.unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* event_trigger_cfg_nr_sl_r16_s::report_amount_r16_opts::to_string() const -{ - static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; - return convert_enum_idx(names, 8, value, "event_trigger_cfg_nr_sl_r16_s::report_amount_r16_e_"); -} -int8_t event_trigger_cfg_nr_sl_r16_s::report_amount_r16_opts::to_number() const -{ - static const int8_t numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return map_enum_number(numbers, 8, value, "event_trigger_cfg_nr_sl_r16_s::report_amount_r16_e_"); -} - -// FilterConfig ::= SEQUENCE -SRSASN_CODE filt_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)); - - 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 (filt_coef_rs_sinr_present) { - HANDLE_CODE(filt_coef_rs_sinr.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE filt_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)); - - 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 (filt_coef_rs_sinr_present) { - HANDLE_CODE(filt_coef_rs_sinr.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void filt_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 (filt_coef_rs_sinr_present) { - j.write_str("filterCoefficientRS-SINR", filt_coef_rs_sinr.to_string()); - } - j.end_obj(); -} - -// IAB-IP-AddressConfigurationList-r16 ::= SEQUENCE -SRSASN_CODE iab_ip_address_cfg_list_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(iab_ip_address_to_add_mod_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(iab_ip_address_to_release_list_r16.size() > 0, 1)); - - if (iab_ip_address_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, iab_ip_address_to_add_mod_list_r16, 1, 32)); - } - if (iab_ip_address_to_release_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, iab_ip_address_to_release_list_r16, 1, 32, integer_packer(1, 32))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE iab_ip_address_cfg_list_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool iab_ip_address_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(iab_ip_address_to_add_mod_list_r16_present, 1)); - bool iab_ip_address_to_release_list_r16_present; - HANDLE_CODE(bref.unpack(iab_ip_address_to_release_list_r16_present, 1)); - - if (iab_ip_address_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(iab_ip_address_to_add_mod_list_r16, bref, 1, 32)); - } - if (iab_ip_address_to_release_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(iab_ip_address_to_release_list_r16, bref, 1, 32, integer_packer(1, 32))); - } - - return SRSASN_SUCCESS; -} -void iab_ip_address_cfg_list_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (iab_ip_address_to_add_mod_list_r16.size() > 0) { - j.start_array("iab-IP-AddressToAddModList-r16"); - for (const auto& e1 : iab_ip_address_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (iab_ip_address_to_release_list_r16.size() > 0) { - j.start_array("iab-IP-AddressToReleaseList-r16"); - for (const auto& e1 : iab_ip_address_to_release_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// NeedForGapsConfigNR-r16 ::= SEQUENCE -SRSASN_CODE need_for_gaps_cfg_nr_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(requested_target_band_filt_nr_r16.size() > 0, 1)); - - if (requested_target_band_filt_nr_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, requested_target_band_filt_nr_r16, 1, 1024, integer_packer(1, 1024))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE need_for_gaps_cfg_nr_r16_s::unpack(cbit_ref& bref) -{ - bool requested_target_band_filt_nr_r16_present; - HANDLE_CODE(bref.unpack(requested_target_band_filt_nr_r16_present, 1)); - - if (requested_target_band_filt_nr_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(requested_target_band_filt_nr_r16, bref, 1, 1024, integer_packer(1, 1024))); - } - - return SRSASN_SUCCESS; -} -void need_for_gaps_cfg_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (requested_target_band_filt_nr_r16.size() > 0) { - j.start_array("requestedTargetBandFilterNR-r16"); - for (const auto& e1 : requested_target_band_filt_nr_r16) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// OnDemandSIB-Request-r16 ::= SEQUENCE -SRSASN_CODE on_demand_sib_request_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(on_demand_sib_request_prohibit_timer_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE on_demand_sib_request_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(on_demand_sib_request_prohibit_timer_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void on_demand_sib_request_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("onDemandSIB-RequestProhibitTimer-r16", on_demand_sib_request_prohibit_timer_r16.to_string()); - j.end_obj(); -} - -const char* on_demand_sib_request_r16_s::on_demand_sib_request_prohibit_timer_r16_opts::to_string() const -{ - static const char* names[] = {"s0", "s0dot5", "s1", "s2", "s5", "s10", "s20", "s30"}; - return convert_enum_idx(names, 8, value, "on_demand_sib_request_r16_s::on_demand_sib_request_prohibit_timer_r16_e_"); -} -float on_demand_sib_request_r16_s::on_demand_sib_request_prohibit_timer_r16_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0}; - return map_enum_number(numbers, 8, value, "on_demand_sib_request_r16_s::on_demand_sib_request_prohibit_timer_r16_e_"); -} -const char* on_demand_sib_request_r16_s::on_demand_sib_request_prohibit_timer_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.5", "1", "2", "5", "10", "20", "30"}; - return convert_enum_idx( - number_strs, 8, value, "on_demand_sib_request_r16_s::on_demand_sib_request_prohibit_timer_r16_e_"); -} - -// OtherConfig-v1610 ::= SEQUENCE -SRSASN_CODE other_cfg_v1610_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(idc_assist_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(drx_pref_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(max_bw_pref_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(max_cc_pref_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(max_mimo_layer_pref_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(min_sched_offset_pref_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(release_pref_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(ref_time_pref_report_r16_present, 1)); - HANDLE_CODE(bref.pack(bt_name_list_r16_present, 1)); - HANDLE_CODE(bref.pack(wlan_name_list_r16_present, 1)); - HANDLE_CODE(bref.pack(sensor_name_list_r16_present, 1)); - HANDLE_CODE(bref.pack(obtain_common_location_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_assist_cfg_nr_r16_present, 1)); - - if (idc_assist_cfg_r16_present) { - HANDLE_CODE(idc_assist_cfg_r16.pack(bref)); - } - if (drx_pref_cfg_r16_present) { - HANDLE_CODE(drx_pref_cfg_r16.pack(bref)); - } - if (max_bw_pref_cfg_r16_present) { - HANDLE_CODE(max_bw_pref_cfg_r16.pack(bref)); - } - if (max_cc_pref_cfg_r16_present) { - HANDLE_CODE(max_cc_pref_cfg_r16.pack(bref)); - } - if (max_mimo_layer_pref_cfg_r16_present) { - HANDLE_CODE(max_mimo_layer_pref_cfg_r16.pack(bref)); - } - if (min_sched_offset_pref_cfg_r16_present) { - HANDLE_CODE(min_sched_offset_pref_cfg_r16.pack(bref)); - } - if (release_pref_cfg_r16_present) { - HANDLE_CODE(release_pref_cfg_r16.pack(bref)); - } - if (bt_name_list_r16_present) { - HANDLE_CODE(bt_name_list_r16.pack(bref)); - } - if (wlan_name_list_r16_present) { - HANDLE_CODE(wlan_name_list_r16.pack(bref)); - } - if (sensor_name_list_r16_present) { - HANDLE_CODE(sensor_name_list_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE other_cfg_v1610_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(idc_assist_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(drx_pref_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(max_bw_pref_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(max_cc_pref_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(max_mimo_layer_pref_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(min_sched_offset_pref_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(release_pref_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(ref_time_pref_report_r16_present, 1)); - HANDLE_CODE(bref.unpack(bt_name_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(wlan_name_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(sensor_name_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(obtain_common_location_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_assist_cfg_nr_r16_present, 1)); - - if (idc_assist_cfg_r16_present) { - HANDLE_CODE(idc_assist_cfg_r16.unpack(bref)); - } - if (drx_pref_cfg_r16_present) { - HANDLE_CODE(drx_pref_cfg_r16.unpack(bref)); - } - if (max_bw_pref_cfg_r16_present) { - HANDLE_CODE(max_bw_pref_cfg_r16.unpack(bref)); - } - if (max_cc_pref_cfg_r16_present) { - HANDLE_CODE(max_cc_pref_cfg_r16.unpack(bref)); - } - if (max_mimo_layer_pref_cfg_r16_present) { - HANDLE_CODE(max_mimo_layer_pref_cfg_r16.unpack(bref)); - } - if (min_sched_offset_pref_cfg_r16_present) { - HANDLE_CODE(min_sched_offset_pref_cfg_r16.unpack(bref)); - } - if (release_pref_cfg_r16_present) { - HANDLE_CODE(release_pref_cfg_r16.unpack(bref)); - } - if (bt_name_list_r16_present) { - HANDLE_CODE(bt_name_list_r16.unpack(bref)); - } - if (wlan_name_list_r16_present) { - HANDLE_CODE(wlan_name_list_r16.unpack(bref)); - } - if (sensor_name_list_r16_present) { - HANDLE_CODE(sensor_name_list_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void other_cfg_v1610_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (idc_assist_cfg_r16_present) { - j.write_fieldname("idc-AssistanceConfig-r16"); - idc_assist_cfg_r16.to_json(j); - } - if (drx_pref_cfg_r16_present) { - j.write_fieldname("drx-PreferenceConfig-r16"); - drx_pref_cfg_r16.to_json(j); - } - if (max_bw_pref_cfg_r16_present) { - j.write_fieldname("maxBW-PreferenceConfig-r16"); - max_bw_pref_cfg_r16.to_json(j); - } - if (max_cc_pref_cfg_r16_present) { - j.write_fieldname("maxCC-PreferenceConfig-r16"); - max_cc_pref_cfg_r16.to_json(j); - } - if (max_mimo_layer_pref_cfg_r16_present) { - j.write_fieldname("maxMIMO-LayerPreferenceConfig-r16"); - max_mimo_layer_pref_cfg_r16.to_json(j); - } - if (min_sched_offset_pref_cfg_r16_present) { - j.write_fieldname("minSchedulingOffsetPreferenceConfig-r16"); - min_sched_offset_pref_cfg_r16.to_json(j); - } - if (release_pref_cfg_r16_present) { - j.write_fieldname("releasePreferenceConfig-r16"); - release_pref_cfg_r16.to_json(j); - } - if (ref_time_pref_report_r16_present) { - j.write_str("referenceTimePreferenceReporting-r16", "true"); - } - if (bt_name_list_r16_present) { - j.write_fieldname("btNameList-r16"); - bt_name_list_r16.to_json(j); - } - if (wlan_name_list_r16_present) { - j.write_fieldname("wlanNameList-r16"); - wlan_name_list_r16.to_json(j); - } - if (sensor_name_list_r16_present) { - j.write_fieldname("sensorNameList-r16"); - sensor_name_list_r16.to_json(j); - } - if (obtain_common_location_r16_present) { - j.write_str("obtainCommonLocation-r16", "true"); - } - if (sl_assist_cfg_nr_r16_present) { - j.write_str("sl-AssistanceConfigNR-r16", "true"); - } - 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 -{ - 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(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 (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)); - HANDLE_CODE(bref.pack(use_allowed_cell_list, 1)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= meas_rssi_report_cfg_r16.is_present(); - group_flags[0] |= include_common_location_info_r16_present; - group_flags[0] |= include_bt_meas_r16.is_present(); - group_flags[0] |= include_wlan_meas_r16.is_present(); - group_flags[0] |= include_sensor_meas_r16.is_present(); - group_flags[0] |= ul_delay_value_cfg_r16.is_present(); - group_flags[0] |= report_add_neigh_meas_r16_present; - group_flags[1] |= ul_excess_delay_cfg_r17.is_present(); - group_flags[1] |= coarse_location_request_r17_present; - group_flags[1] |= report_quant_relay_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(meas_rssi_report_cfg_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(include_common_location_info_r16_present, 1)); - HANDLE_CODE(bref.pack(include_bt_meas_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(include_wlan_meas_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(include_sensor_meas_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(ul_delay_value_cfg_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(report_add_neigh_meas_r16_present, 1)); - if (meas_rssi_report_cfg_r16.is_present()) { - HANDLE_CODE(meas_rssi_report_cfg_r16->pack(bref)); - } - if (include_bt_meas_r16.is_present()) { - HANDLE_CODE(include_bt_meas_r16->pack(bref)); - } - if (include_wlan_meas_r16.is_present()) { - HANDLE_CODE(include_wlan_meas_r16->pack(bref)); - } - if (include_sensor_meas_r16.is_present()) { - HANDLE_CODE(include_sensor_meas_r16->pack(bref)); - } - if (ul_delay_value_cfg_r16.is_present()) { - HANDLE_CODE(ul_delay_value_cfg_r16->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ul_excess_delay_cfg_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(coarse_location_request_r17_present, 1)); - HANDLE_CODE(bref.pack(report_quant_relay_r17.is_present(), 1)); - if (ul_excess_delay_cfg_r17.is_present()) { - HANDLE_CODE(ul_excess_delay_cfg_r17->pack(bref)); - } - if (report_quant_relay_r17.is_present()) { - HANDLE_CODE(report_quant_relay_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE periodical_report_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(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 (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)); - HANDLE_CODE(bref.unpack(use_allowed_cell_list, 1)); - - 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); - - unpack_presence_flag(meas_rssi_report_cfg_r16, bref); - HANDLE_CODE(bref.unpack(include_common_location_info_r16_present, 1)); - unpack_presence_flag(include_bt_meas_r16, bref); - unpack_presence_flag(include_wlan_meas_r16, bref); - unpack_presence_flag(include_sensor_meas_r16, bref); - unpack_presence_flag(ul_delay_value_cfg_r16, bref); - HANDLE_CODE(bref.unpack(report_add_neigh_meas_r16_present, 1)); - if (meas_rssi_report_cfg_r16.is_present()) { - HANDLE_CODE(meas_rssi_report_cfg_r16->unpack(bref)); - } - if (include_bt_meas_r16.is_present()) { - HANDLE_CODE(include_bt_meas_r16->unpack(bref)); - } - if (include_wlan_meas_r16.is_present()) { - HANDLE_CODE(include_wlan_meas_r16->unpack(bref)); - } - if (include_sensor_meas_r16.is_present()) { - HANDLE_CODE(include_sensor_meas_r16->unpack(bref)); - } - if (ul_delay_value_cfg_r16.is_present()) { - HANDLE_CODE(ul_delay_value_cfg_r16->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(ul_excess_delay_cfg_r17, bref); - HANDLE_CODE(bref.unpack(coarse_location_request_r17_present, 1)); - unpack_presence_flag(report_quant_relay_r17, bref); - if (ul_excess_delay_cfg_r17.is_present()) { - HANDLE_CODE(ul_excess_delay_cfg_r17->unpack(bref)); - } - if (report_quant_relay_r17.is_present()) { - HANDLE_CODE(report_quant_relay_r17->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void periodical_report_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 (max_nrof_rs_idxes_to_report_present) { - j.write_int("maxNrofRS-IndexesToReport", max_nrof_rs_idxes_to_report); - } - j.write_bool("includeBeamMeasurements", include_beam_meass); - j.write_bool("useAllowedCellList", use_allowed_cell_list); - if (ext) { - if (meas_rssi_report_cfg_r16.is_present()) { - j.write_fieldname("measRSSI-ReportConfig-r16"); - meas_rssi_report_cfg_r16->to_json(j); - } - if (include_common_location_info_r16_present) { - j.write_str("includeCommonLocationInfo-r16", "true"); - } - if (include_bt_meas_r16.is_present()) { - j.write_fieldname("includeBT-Meas-r16"); - include_bt_meas_r16->to_json(j); - } - if (include_wlan_meas_r16.is_present()) { - j.write_fieldname("includeWLAN-Meas-r16"); - include_wlan_meas_r16->to_json(j); - } - if (include_sensor_meas_r16.is_present()) { - j.write_fieldname("includeSensor-Meas-r16"); - include_sensor_meas_r16->to_json(j); - } - if (ul_delay_value_cfg_r16.is_present()) { - j.write_fieldname("ul-DelayValueConfig-r16"); - ul_delay_value_cfg_r16->to_json(j); - } - if (report_add_neigh_meas_r16_present) { - j.write_str("reportAddNeighMeas-r16", "setup"); - } - if (ul_excess_delay_cfg_r17.is_present()) { - j.write_fieldname("ul-ExcessDelayConfig-r17"); - ul_excess_delay_cfg_r17->to_json(j); - } - if (coarse_location_request_r17_present) { - j.write_str("coarseLocationRequest-r17", "true"); - } - if (report_quant_relay_r17.is_present()) { - j.write_fieldname("reportQuantityRelay-r17"); - report_quant_relay_r17->to_json(j); - } - } - j.end_obj(); -} - -const char* periodical_report_cfg_s::report_amount_opts::to_string() const -{ - static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; - return convert_enum_idx(names, 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 numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return map_enum_number(numbers, 8, value, "periodical_report_cfg_s::report_amount_e_"); -} - -// PeriodicalReportConfigInterRAT ::= SEQUENCE -SRSASN_CODE periodical_report_cfg_inter_rat_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)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= report_quant_utra_fdd_r16.is_present(); - group_flags[1] |= include_common_location_info_r16_present; - group_flags[1] |= include_bt_meas_r16.is_present(); - group_flags[1] |= include_wlan_meas_r16.is_present(); - group_flags[1] |= include_sensor_meas_r16.is_present(); - group_flags[2] |= report_quant_relay_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(report_quant_utra_fdd_r16.is_present(), 1)); - if (report_quant_utra_fdd_r16.is_present()) { - HANDLE_CODE(report_quant_utra_fdd_r16->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(include_common_location_info_r16_present, 1)); - HANDLE_CODE(bref.pack(include_bt_meas_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(include_wlan_meas_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(include_sensor_meas_r16.is_present(), 1)); - if (include_bt_meas_r16.is_present()) { - HANDLE_CODE(include_bt_meas_r16->pack(bref)); - } - if (include_wlan_meas_r16.is_present()) { - HANDLE_CODE(include_wlan_meas_r16->pack(bref)); - } - if (include_sensor_meas_r16.is_present()) { - HANDLE_CODE(include_sensor_meas_r16->pack(bref)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(report_quant_relay_r17.is_present(), 1)); - if (report_quant_relay_r17.is_present()) { - HANDLE_CODE(report_quant_relay_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -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)); - - if (ext) { - ext_groups_unpacker_guard group_flags(3); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(report_quant_utra_fdd_r16, bref); - if (report_quant_utra_fdd_r16.is_present()) { - HANDLE_CODE(report_quant_utra_fdd_r16->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(include_common_location_info_r16_present, 1)); - unpack_presence_flag(include_bt_meas_r16, bref); - unpack_presence_flag(include_wlan_meas_r16, bref); - unpack_presence_flag(include_sensor_meas_r16, bref); - if (include_bt_meas_r16.is_present()) { - HANDLE_CODE(include_bt_meas_r16->unpack(bref)); - } - if (include_wlan_meas_r16.is_present()) { - HANDLE_CODE(include_wlan_meas_r16->unpack(bref)); - } - if (include_sensor_meas_r16.is_present()) { - HANDLE_CODE(include_sensor_meas_r16->unpack(bref)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(report_quant_relay_r17, bref); - if (report_quant_relay_r17.is_present()) { - HANDLE_CODE(report_quant_relay_r17->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void periodical_report_cfg_inter_rat_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); - if (ext) { - if (report_quant_utra_fdd_r16.is_present()) { - j.write_fieldname("reportQuantityUTRA-FDD-r16"); - report_quant_utra_fdd_r16->to_json(j); - } - if (include_common_location_info_r16_present) { - j.write_str("includeCommonLocationInfo-r16", "true"); - } - if (include_bt_meas_r16.is_present()) { - j.write_fieldname("includeBT-Meas-r16"); - include_bt_meas_r16->to_json(j); - } - if (include_wlan_meas_r16.is_present()) { - j.write_fieldname("includeWLAN-Meas-r16"); - include_wlan_meas_r16->to_json(j); - } - if (include_sensor_meas_r16.is_present()) { - j.write_fieldname("includeSensor-Meas-r16"); - include_sensor_meas_r16->to_json(j); - } - if (report_quant_relay_r17.is_present()) { - j.write_fieldname("reportQuantityRelay-r17"); - report_quant_relay_r17->to_json(j); - } - } - j.end_obj(); -} - -const char* periodical_report_cfg_inter_rat_s::report_amount_opts::to_string() const -{ - static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; - return convert_enum_idx(names, 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 numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return map_enum_number(numbers, 8, value, "periodical_report_cfg_inter_rat_s::report_amount_e_"); -} - -// PeriodicalReportConfigNR-SL-r16 ::= SEQUENCE -SRSASN_CODE periodical_report_cfg_nr_sl_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(report_interv_r16.pack(bref)); - HANDLE_CODE(report_amount_r16.pack(bref)); - HANDLE_CODE(report_quant_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE periodical_report_cfg_nr_sl_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(report_interv_r16.unpack(bref)); - HANDLE_CODE(report_amount_r16.unpack(bref)); - HANDLE_CODE(report_quant_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void periodical_report_cfg_nr_sl_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("reportInterval-r16", report_interv_r16.to_string()); - j.write_str("reportAmount-r16", report_amount_r16.to_string()); - j.write_fieldname("reportQuantity-r16"); - report_quant_r16.to_json(j); - j.end_obj(); -} - -const char* periodical_report_cfg_nr_sl_r16_s::report_amount_r16_opts::to_string() const -{ - static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; - return convert_enum_idx(names, 8, value, "periodical_report_cfg_nr_sl_r16_s::report_amount_r16_e_"); -} -int8_t periodical_report_cfg_nr_sl_r16_s::report_amount_r16_opts::to_number() const -{ - static const int8_t numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; - return map_enum_number(numbers, 8, value, "periodical_report_cfg_nr_sl_r16_s::report_amount_r16_e_"); -} - -// RAN-AreaConfig ::= SEQUENCE -SRSASN_CODE ran_area_cfg_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ran_area_code_list.size() > 0, 1)); - - HANDLE_CODE(tac.pack(bref)); - if (ran_area_code_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, ran_area_code_list, 1, 32, integer_packer(0, 255))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ran_area_cfg_s::unpack(cbit_ref& bref) -{ - bool ran_area_code_list_present; - 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.size() > 0) { - j.start_array("ran-AreaCodeList"); - for (const auto& e1 : ran_area_code_list) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// RMTC-Config-r16 ::= SEQUENCE -SRSASN_CODE rmtc_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(rmtc_sf_offset_r16_present, 1)); - - HANDLE_CODE(rmtc_periodicity_r16.pack(bref)); - if (rmtc_sf_offset_r16_present) { - HANDLE_CODE(pack_integer(bref, rmtc_sf_offset_r16, (uint16_t)0u, (uint16_t)639u)); - } - HANDLE_CODE(meas_dur_symbols_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, rmtc_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(ref_scs_cp_r16.pack(bref)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= rmtc_bw_r17_present; - group_flags[0] |= meas_dur_symbols_v1700_present; - group_flags[0] |= ref_scs_cp_v1700_present; - group_flags[0] |= tci_state_info_r17.is_present(); - group_flags[1] |= ref_bwp_id_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(rmtc_bw_r17_present, 1)); - HANDLE_CODE(bref.pack(meas_dur_symbols_v1700_present, 1)); - HANDLE_CODE(bref.pack(ref_scs_cp_v1700_present, 1)); - HANDLE_CODE(bref.pack(tci_state_info_r17.is_present(), 1)); - if (rmtc_bw_r17_present) { - HANDLE_CODE(rmtc_bw_r17.pack(bref)); - } - if (meas_dur_symbols_v1700_present) { - HANDLE_CODE(meas_dur_symbols_v1700.pack(bref)); - } - if (ref_scs_cp_v1700_present) { - HANDLE_CODE(ref_scs_cp_v1700.pack(bref)); - } - if (tci_state_info_r17.is_present()) { - HANDLE_CODE(bref.pack(tci_state_info_r17->ref_serv_cell_id_r17_present, 1)); - HANDLE_CODE(pack_integer(bref, tci_state_info_r17->tci_state_id_r17, (uint8_t)0u, (uint8_t)127u)); - if (tci_state_info_r17->ref_serv_cell_id_r17_present) { - HANDLE_CODE(pack_integer(bref, tci_state_info_r17->ref_serv_cell_id_r17, (uint8_t)0u, (uint8_t)31u)); - } - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ref_bwp_id_r17_present, 1)); - if (ref_bwp_id_r17_present) { - HANDLE_CODE(pack_integer(bref, ref_bwp_id_r17, (uint8_t)0u, (uint8_t)4u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rmtc_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(rmtc_sf_offset_r16_present, 1)); - - HANDLE_CODE(rmtc_periodicity_r16.unpack(bref)); - if (rmtc_sf_offset_r16_present) { - HANDLE_CODE(unpack_integer(rmtc_sf_offset_r16, bref, (uint16_t)0u, (uint16_t)639u)); - } - HANDLE_CODE(meas_dur_symbols_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(rmtc_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(ref_scs_cp_r16.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(rmtc_bw_r17_present, 1)); - HANDLE_CODE(bref.unpack(meas_dur_symbols_v1700_present, 1)); - HANDLE_CODE(bref.unpack(ref_scs_cp_v1700_present, 1)); - unpack_presence_flag(tci_state_info_r17, bref); - if (rmtc_bw_r17_present) { - HANDLE_CODE(rmtc_bw_r17.unpack(bref)); - } - if (meas_dur_symbols_v1700_present) { - HANDLE_CODE(meas_dur_symbols_v1700.unpack(bref)); - } - if (ref_scs_cp_v1700_present) { - HANDLE_CODE(ref_scs_cp_v1700.unpack(bref)); - } - if (tci_state_info_r17.is_present()) { - HANDLE_CODE(bref.unpack(tci_state_info_r17->ref_serv_cell_id_r17_present, 1)); - HANDLE_CODE(unpack_integer(tci_state_info_r17->tci_state_id_r17, bref, (uint8_t)0u, (uint8_t)127u)); - if (tci_state_info_r17->ref_serv_cell_id_r17_present) { - HANDLE_CODE(unpack_integer(tci_state_info_r17->ref_serv_cell_id_r17, bref, (uint8_t)0u, (uint8_t)31u)); - } - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(ref_bwp_id_r17_present, 1)); - if (ref_bwp_id_r17_present) { - HANDLE_CODE(unpack_integer(ref_bwp_id_r17, bref, (uint8_t)0u, (uint8_t)4u)); - } - } - } - return SRSASN_SUCCESS; -} -void rmtc_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("rmtc-Periodicity-r16", rmtc_periodicity_r16.to_string()); - if (rmtc_sf_offset_r16_present) { - j.write_int("rmtc-SubframeOffset-r16", rmtc_sf_offset_r16); - } - j.write_str("measDurationSymbols-r16", meas_dur_symbols_r16.to_string()); - j.write_int("rmtc-Frequency-r16", rmtc_freq_r16); - j.write_str("ref-SCS-CP-r16", ref_scs_cp_r16.to_string()); - if (ext) { - if (rmtc_bw_r17_present) { - j.write_str("rmtc-Bandwidth-r17", rmtc_bw_r17.to_string()); - } - if (meas_dur_symbols_v1700_present) { - j.write_str("measDurationSymbols-v1700", meas_dur_symbols_v1700.to_string()); - } - if (ref_scs_cp_v1700_present) { - j.write_str("ref-SCS-CP-v1700", ref_scs_cp_v1700.to_string()); - } - if (tci_state_info_r17.is_present()) { - j.write_fieldname("tci-StateInfo-r17"); - j.start_obj(); - j.write_int("tci-StateId-r17", tci_state_info_r17->tci_state_id_r17); - if (tci_state_info_r17->ref_serv_cell_id_r17_present) { - j.write_int("ref-ServCellId-r17", tci_state_info_r17->ref_serv_cell_id_r17); - } - j.end_obj(); - } - if (ref_bwp_id_r17_present) { - j.write_int("ref-BWPId-r17", ref_bwp_id_r17); - } - } - j.end_obj(); -} - -const char* rmtc_cfg_r16_s::rmtc_periodicity_r16_opts::to_string() const -{ - static const char* names[] = {"ms40", "ms80", "ms160", "ms320", "ms640"}; - return convert_enum_idx(names, 5, value, "rmtc_cfg_r16_s::rmtc_periodicity_r16_e_"); -} -uint16_t rmtc_cfg_r16_s::rmtc_periodicity_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {40, 80, 160, 320, 640}; - return map_enum_number(numbers, 5, value, "rmtc_cfg_r16_s::rmtc_periodicity_r16_e_"); -} - -const char* rmtc_cfg_r16_s::meas_dur_symbols_r16_opts::to_string() const -{ - static const char* names[] = {"sym1", "sym14or12", "sym28or24", "sym42or36", "sym70or60"}; - return convert_enum_idx(names, 5, value, "rmtc_cfg_r16_s::meas_dur_symbols_r16_e_"); -} -uint8_t rmtc_cfg_r16_s::meas_dur_symbols_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 14, 28, 42, 70}; - return map_enum_number(numbers, 5, value, "rmtc_cfg_r16_s::meas_dur_symbols_r16_e_"); -} - -const char* rmtc_cfg_r16_s::ref_scs_cp_r16_opts::to_string() const -{ - static const char* names[] = {"kHz15", "kHz30", "kHz60-NCP", "kHz60-ECP"}; - return convert_enum_idx(names, 4, value, "rmtc_cfg_r16_s::ref_scs_cp_r16_e_"); -} - -const char* rmtc_cfg_r16_s::rmtc_bw_r17_opts::to_string() const -{ - static const char* names[] = {"mhz100", "mhz400", "mhz800", "mhz1600", "mhz2000"}; - return convert_enum_idx(names, 5, value, "rmtc_cfg_r16_s::rmtc_bw_r17_e_"); -} -uint16_t rmtc_cfg_r16_s::rmtc_bw_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {100, 400, 800, 1600, 2000}; - return map_enum_number(numbers, 5, value, "rmtc_cfg_r16_s::rmtc_bw_r17_e_"); -} - -const char* rmtc_cfg_r16_s::meas_dur_symbols_v1700_opts::to_string() const -{ - static const char* names[] = {"sym140", "sym560", "sym1120"}; - return convert_enum_idx(names, 3, value, "rmtc_cfg_r16_s::meas_dur_symbols_v1700_e_"); -} -uint16_t rmtc_cfg_r16_s::meas_dur_symbols_v1700_opts::to_number() const -{ - static const uint16_t numbers[] = {140, 560, 1120}; - return map_enum_number(numbers, 3, value, "rmtc_cfg_r16_s::meas_dur_symbols_v1700_e_"); -} - -const char* rmtc_cfg_r16_s::ref_scs_cp_v1700_opts::to_string() const -{ - static const char* names[] = {"kHz120", "kHz480", "kHz960"}; - return convert_enum_idx(names, 3, value, "rmtc_cfg_r16_s::ref_scs_cp_v1700_e_"); -} -uint16_t rmtc_cfg_r16_s::ref_scs_cp_v1700_opts::to_number() const -{ - static const uint16_t numbers[] = {120, 480, 960}; - return map_enum_number(numbers, 3, value, "rmtc_cfg_r16_s::ref_scs_cp_v1700_e_"); -} - -// RRCReconfiguration-v1700-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(other_cfg_v1700_present, 1)); - HANDLE_CODE(bref.pack(sl_l2_relay_ue_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_l2_remote_ue_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(ded_paging_delivery_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(need_for_gap_ncsg_cfg_nr_r17_present, 1)); - HANDLE_CODE(bref.pack(need_for_gap_ncsg_cfg_eutra_r17_present, 1)); - HANDLE_CODE(bref.pack(musim_gap_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(ul_gap_fr2_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(scg_state_r17_present, 1)); - HANDLE_CODE(bref.pack(app_layer_meas_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(ue_tx_teg_request_ul_tdoa_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (other_cfg_v1700_present) { - HANDLE_CODE(other_cfg_v1700.pack(bref)); - } - if (sl_l2_relay_ue_cfg_r17_present) { - HANDLE_CODE(sl_l2_relay_ue_cfg_r17.pack(bref)); - } - if (sl_l2_remote_ue_cfg_r17_present) { - HANDLE_CODE(sl_l2_remote_ue_cfg_r17.pack(bref)); - } - if (ded_paging_delivery_r17.size() > 0) { - HANDLE_CODE(ded_paging_delivery_r17.pack(bref)); - } - if (need_for_gap_ncsg_cfg_nr_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_cfg_nr_r17.pack(bref)); - } - if (need_for_gap_ncsg_cfg_eutra_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_cfg_eutra_r17.pack(bref)); - } - if (musim_gap_cfg_r17_present) { - HANDLE_CODE(musim_gap_cfg_r17.pack(bref)); - } - if (ul_gap_fr2_cfg_r17_present) { - HANDLE_CODE(ul_gap_fr2_cfg_r17.pack(bref)); - } - if (app_layer_meas_cfg_r17_present) { - HANDLE_CODE(app_layer_meas_cfg_r17.pack(bref)); - } - if (ue_tx_teg_request_ul_tdoa_cfg_r17_present) { - HANDLE_CODE(ue_tx_teg_request_ul_tdoa_cfg_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_recfg_v1700_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(other_cfg_v1700_present, 1)); - HANDLE_CODE(bref.unpack(sl_l2_relay_ue_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_l2_remote_ue_cfg_r17_present, 1)); - bool ded_paging_delivery_r17_present; - HANDLE_CODE(bref.unpack(ded_paging_delivery_r17_present, 1)); - HANDLE_CODE(bref.unpack(need_for_gap_ncsg_cfg_nr_r17_present, 1)); - HANDLE_CODE(bref.unpack(need_for_gap_ncsg_cfg_eutra_r17_present, 1)); - HANDLE_CODE(bref.unpack(musim_gap_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(ul_gap_fr2_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(scg_state_r17_present, 1)); - HANDLE_CODE(bref.unpack(app_layer_meas_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(ue_tx_teg_request_ul_tdoa_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (other_cfg_v1700_present) { - HANDLE_CODE(other_cfg_v1700.unpack(bref)); - } - if (sl_l2_relay_ue_cfg_r17_present) { - HANDLE_CODE(sl_l2_relay_ue_cfg_r17.unpack(bref)); - } - if (sl_l2_remote_ue_cfg_r17_present) { - HANDLE_CODE(sl_l2_remote_ue_cfg_r17.unpack(bref)); - } - if (ded_paging_delivery_r17_present) { - HANDLE_CODE(ded_paging_delivery_r17.unpack(bref)); - } - if (need_for_gap_ncsg_cfg_nr_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_cfg_nr_r17.unpack(bref)); - } - if (need_for_gap_ncsg_cfg_eutra_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_cfg_eutra_r17.unpack(bref)); - } - if (musim_gap_cfg_r17_present) { - HANDLE_CODE(musim_gap_cfg_r17.unpack(bref)); - } - if (ul_gap_fr2_cfg_r17_present) { - HANDLE_CODE(ul_gap_fr2_cfg_r17.unpack(bref)); - } - if (app_layer_meas_cfg_r17_present) { - HANDLE_CODE(app_layer_meas_cfg_r17.unpack(bref)); - } - if (ue_tx_teg_request_ul_tdoa_cfg_r17_present) { - HANDLE_CODE(ue_tx_teg_request_ul_tdoa_cfg_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_recfg_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (other_cfg_v1700_present) { - j.write_fieldname("otherConfig-v1700"); - other_cfg_v1700.to_json(j); - } - if (sl_l2_relay_ue_cfg_r17_present) { - j.write_fieldname("sl-L2RelayUE-Config-r17"); - sl_l2_relay_ue_cfg_r17.to_json(j); - } - if (sl_l2_remote_ue_cfg_r17_present) { - j.write_fieldname("sl-L2RemoteUE-Config-r17"); - sl_l2_remote_ue_cfg_r17.to_json(j); - } - if (ded_paging_delivery_r17.size() > 0) { - j.write_str("dedicatedPagingDelivery-r17", ded_paging_delivery_r17.to_string()); - } - if (need_for_gap_ncsg_cfg_nr_r17_present) { - j.write_fieldname("needForGapNCSG-ConfigNR-r17"); - need_for_gap_ncsg_cfg_nr_r17.to_json(j); - } - if (need_for_gap_ncsg_cfg_eutra_r17_present) { - j.write_fieldname("needForGapNCSG-ConfigEUTRA-r17"); - need_for_gap_ncsg_cfg_eutra_r17.to_json(j); - } - if (musim_gap_cfg_r17_present) { - j.write_fieldname("musim-GapConfig-r17"); - musim_gap_cfg_r17.to_json(j); - } - if (ul_gap_fr2_cfg_r17_present) { - j.write_fieldname("ul-GapFR2-Config-r17"); - ul_gap_fr2_cfg_r17.to_json(j); - } - if (scg_state_r17_present) { - j.write_str("scg-State-r17", "deactivated"); - } - if (app_layer_meas_cfg_r17_present) { - j.write_fieldname("appLayerMeasConfig-r17"); - app_layer_meas_cfg_r17.to_json(j); - } - if (ue_tx_teg_request_ul_tdoa_cfg_r17_present) { - j.write_fieldname("ue-TxTEG-RequestUL-TDOA-Config-r17"); - ue_tx_teg_request_ul_tdoa_cfg_r17.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// ReferenceSignalConfig ::= SEQUENCE -SRSASN_CODE ref_sig_cfg_s::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)); - } - - 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)); - - 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 -{ - 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(); -} - -// ReportCGI ::= SEQUENCE -SRSASN_CODE report_cgi_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)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= use_autonomous_gaps_r16_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(use_autonomous_gaps_r16_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)); - - 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(use_autonomous_gaps_r16_present, 1)); - } - } - 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); - if (ext) { - if (use_autonomous_gaps_r16_present) { - j.write_str("useAutonomousGaps-r16", "setup"); - } - } - 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)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= use_autonomous_gaps_r16_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(use_autonomous_gaps_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE report_cgi_eutra_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)); - - 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(use_autonomous_gaps_r16_present, 1)); - } - } - 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); - if (ext) { - if (use_autonomous_gaps_r16_present) { - j.write_str("useAutonomousGaps-r16", "setup"); - } - } - j.end_obj(); -} - -// ReportSFTD-EUTRA ::= SEQUENCE -SRSASN_CODE report_sftd_eutra_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(report_sftd_meas, 1)); - HANDLE_CODE(bref.pack(report_rsrp, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE report_sftd_eutra_s::unpack(cbit_ref& bref) -{ - 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(); -} - -// ReportSFTD-NR ::= SEQUENCE -SRSASN_CODE report_sftd_nr_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(report_sftd_meas, 1)); - HANDLE_CODE(bref.pack(report_rsrp, 1)); - - 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 report_sftd_nr_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(report_sftd_meas, 1)); - HANDLE_CODE(bref.unpack(report_rsrp, 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(report_sftd_neigh_meas_present, 1)); - HANDLE_CODE(bref.unpack(drx_sftd_neigh_meas_present, 1)); - unpack_presence_flag(cells_for_which_to_report_sftd, bref); - 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 report_sftd_nr_s::to_json(json_writer& j) const -{ - j.start_obj(); - 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.end_obj(); -} - -// RxTxPeriodical-r17 ::= SEQUENCE -SRSASN_CODE rx_tx_periodical_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(rx_tx_report_interv_r17_present, 1)); - - if (rx_tx_report_interv_r17_present) { - HANDLE_CODE(rx_tx_report_interv_r17.pack(bref)); - } - HANDLE_CODE(report_amount_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE rx_tx_periodical_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(rx_tx_report_interv_r17_present, 1)); - - if (rx_tx_report_interv_r17_present) { - HANDLE_CODE(rx_tx_report_interv_r17.unpack(bref)); - } - HANDLE_CODE(report_amount_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void rx_tx_periodical_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (rx_tx_report_interv_r17_present) { - j.write_str("rxTxReportInterval-r17", rx_tx_report_interv_r17.to_string()); - } - j.write_str("reportAmount-r17", report_amount_r17.to_string()); - j.end_obj(); -} - -const char* rx_tx_periodical_r17_s::report_amount_r17_opts::to_string() const -{ - static const char* names[] = {"r1", "infinity", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "rx_tx_periodical_r17_s::report_amount_r17_e_"); -} -int8_t rx_tx_periodical_r17_s::report_amount_r17_opts::to_number() const -{ - static const int8_t numbers[] = {1, -1}; - return map_enum_number(numbers, 2, value, "rx_tx_periodical_r17_s::report_amount_r17_e_"); -} - -// SL-ConfigDedicatedEUTRA-Info-r16 ::= SEQUENCE -SRSASN_CODE sl_cfg_ded_eutra_info_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sl_cfg_ded_eutra_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_time_offset_eutra_list_r16_present, 1)); - - if (sl_cfg_ded_eutra_r16.size() > 0) { - HANDLE_CODE(sl_cfg_ded_eutra_r16.pack(bref)); - } - if (sl_time_offset_eutra_list_r16_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, sl_time_offset_eutra_list_r16, sl_time_offset_eutra_list_r16.size())); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_cfg_ded_eutra_info_r16_s::unpack(cbit_ref& bref) -{ - bool sl_cfg_ded_eutra_r16_present; - HANDLE_CODE(bref.unpack(sl_cfg_ded_eutra_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_time_offset_eutra_list_r16_present, 1)); - - if (sl_cfg_ded_eutra_r16_present) { - HANDLE_CODE(sl_cfg_ded_eutra_r16.unpack(bref)); - } - if (sl_time_offset_eutra_list_r16_present) { - HANDLE_CODE(unpack_fixed_seq_of(sl_time_offset_eutra_list_r16, bref, sl_time_offset_eutra_list_r16.size())); - } - - return SRSASN_SUCCESS; -} -void sl_cfg_ded_eutra_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_cfg_ded_eutra_r16.size() > 0) { - j.write_str("sl-ConfigDedicatedEUTRA-r16", sl_cfg_ded_eutra_r16.to_string()); - } - if (sl_time_offset_eutra_list_r16_present) { - j.start_array("sl-TimeOffsetEUTRA-List-r16"); - for (const auto& e1 : sl_time_offset_eutra_list_r16) { - j.write_str(e1.to_string()); - } - j.end_array(); - } - j.end_obj(); -} - -// SSB-MTC2 ::= SEQUENCE -SRSASN_CODE ssb_mtc2_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(pci_list.size() > 0, 1)); - - if (pci_list.size() > 0) { - 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) -{ - bool pci_list_present; - 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(); - if (pci_list.size() > 0) { - 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(); -} - -const char* ssb_mtc2_s::periodicity_opts::to_string() const -{ - static const char* names[] = {"sf5", "sf10", "sf20", "sf40", "sf80", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "ssb_mtc2_s::periodicity_e_"); -} -uint8_t ssb_mtc2_s::periodicity_opts::to_number() const -{ - static const uint8_t numbers[] = {5, 10, 20, 40, 80}; - return map_enum_number(numbers, 5, value, "ssb_mtc2_s::periodicity_e_"); -} - -// SliceInfoDedicated-r17 ::= SEQUENCE -SRSASN_CODE slice_info_ded_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(nsag_cell_resel_prio_r17_present, 1)); - HANDLE_CODE(bref.pack(nsag_cell_resel_sub_prio_r17_present, 1)); - - HANDLE_CODE(nsag_id_info_r17.pack(bref)); - if (nsag_cell_resel_prio_r17_present) { - HANDLE_CODE(pack_integer(bref, nsag_cell_resel_prio_r17, (uint8_t)0u, (uint8_t)7u)); - } - if (nsag_cell_resel_sub_prio_r17_present) { - HANDLE_CODE(nsag_cell_resel_sub_prio_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE slice_info_ded_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(nsag_cell_resel_prio_r17_present, 1)); - HANDLE_CODE(bref.unpack(nsag_cell_resel_sub_prio_r17_present, 1)); - - HANDLE_CODE(nsag_id_info_r17.unpack(bref)); - if (nsag_cell_resel_prio_r17_present) { - HANDLE_CODE(unpack_integer(nsag_cell_resel_prio_r17, bref, (uint8_t)0u, (uint8_t)7u)); - } - if (nsag_cell_resel_sub_prio_r17_present) { - HANDLE_CODE(nsag_cell_resel_sub_prio_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void slice_info_ded_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("nsag-IdentityInfo-r17"); - nsag_id_info_r17.to_json(j); - if (nsag_cell_resel_prio_r17_present) { - j.write_int("nsag-CellReselectionPriority-r17", nsag_cell_resel_prio_r17); - } - if (nsag_cell_resel_sub_prio_r17_present) { - j.write_str("nsag-CellReselectionSubPriority-r17", nsag_cell_resel_sub_prio_r17.to_string()); - } - j.end_obj(); -} - -// T312-r16 ::= ENUMERATED -const char* t312_r16_opts::to_string() const -{ - static const char* names[] = {"ms0", "ms50", "ms100", "ms200", "ms300", "ms400", "ms500", "ms1000"}; - return convert_enum_idx(names, 8, value, "t312_r16_e"); -} -uint16_t t312_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {0, 50, 100, 200, 300, 400, 500, 1000}; - return map_enum_number(numbers, 8, value, "t312_r16_e"); -} - -// T316-r16 ::= ENUMERATED -const char* t316_r16_opts::to_string() const -{ - static const char* names[] = { - "ms50", "ms100", "ms200", "ms300", "ms400", "ms500", "ms600", "ms1000", "ms1500", "ms2000"}; - return convert_enum_idx(names, 10, value, "t316_r16_e"); -} -uint16_t t316_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {50, 100, 200, 300, 400, 500, 600, 1000, 1500, 2000}; - return map_enum_number(numbers, 10, value, "t316_r16_e"); -} - -// TrackingAreaIdentity-r16 ::= SEQUENCE -SRSASN_CODE tracking_area_id_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(plmn_id_r16.pack(bref)); - HANDLE_CODE(tac_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE tracking_area_id_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(plmn_id_r16.unpack(bref)); - HANDLE_CODE(tac_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void tracking_area_id_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("plmn-Identity-r16"); - plmn_id_r16.to_json(j); - j.write_str("trackingAreaCode-r16", tac_r16.to_string()); - j.end_obj(); -} - -// UTRA-FDD-Q-OffsetRange-r16 ::= ENUMERATED -const char* utra_fdd_q_offset_range_r16_opts::to_string() const -{ - static const char* names[] = {"dB-24", "dB-22", "dB-20", "dB-18", "dB-16", "dB-14", "dB-12", "dB-10", - "dB-8", "dB-6", "dB-5", "dB-4", "dB-3", "dB-2", "dB-1", "dB0", - "dB1", "dB2", "dB3", "dB4", "dB5", "dB6", "dB8", "dB10", - "dB12", "dB14", "dB16", "dB18", "dB20", "dB22", "dB24"}; - return convert_enum_idx(names, 31, value, "utra_fdd_q_offset_range_r16_e"); -} -int8_t utra_fdd_q_offset_range_r16_opts::to_number() const -{ - static const int8_t numbers[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, - 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; - return map_enum_number(numbers, 31, value, "utra_fdd_q_offset_range_r16_e"); -} - -// ValidityArea-r16 ::= SEQUENCE -SRSASN_CODE validity_area_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(validity_cell_list_r16.size() > 0, 1)); - - HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); - if (validity_cell_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, validity_cell_list_r16, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE validity_area_r16_s::unpack(cbit_ref& bref) -{ - bool validity_cell_list_r16_present; - HANDLE_CODE(bref.unpack(validity_cell_list_r16_present, 1)); - - HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - if (validity_cell_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(validity_cell_list_r16, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -void validity_area_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("carrierFreq-r16", carrier_freq_r16); - if (validity_cell_list_r16.size() > 0) { - j.start_array("validityCellList-r16"); - for (const auto& e1 : validity_cell_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// MRDC-SecondaryCellGroupConfig ::= SEQUENCE -SRSASN_CODE mrdc_secondary_cell_group_cfg_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(mrdc_release_and_add_present, 1)); - - HANDLE_CODE(mrdc_secondary_cell_group.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mrdc_secondary_cell_group_cfg_s::unpack(cbit_ref& bref) -{ - 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 mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::destroy_() -{ - switch (type_) { - case types::nr_scg: - c.destroy(); - break; - case types::eutra_scg: - c.destroy(); - break; - default: - break; - } -} -void mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::nr_scg: - c.init(); - break; - case types::eutra_scg: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); - } -} -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::nr_scg: - c.init(other.c.get()); - break; - case types::eutra_scg: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); - } -} -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::nr_scg: - c.set(other.c.get()); - break; - case types::eutra_scg: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); - } - - return *this; -} -dyn_octstring& mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::set_nr_scg() -{ - set(types::nr_scg); - return c.get(); -} -dyn_octstring& mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::set_eutra_scg() -{ - set(types::eutra_scg); - return c.get(); -} -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::nr_scg: - j.write_str("nr-SCG", c.get().to_string()); - break; - case types::eutra_scg: - j.write_str("eutra-SCG", c.get().to_string()); - break; - default: - log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); - } - j.end_obj(); -} -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::nr_scg: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::eutra_scg: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - 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 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::nr_scg: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::eutra_scg: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// MeasGapSharingScheme ::= ENUMERATED -const char* meas_gap_sharing_scheme_opts::to_string() const -{ - static const char* names[] = {"scheme00", "scheme01", "scheme10", "scheme11"}; - return convert_enum_idx(names, 4, value, "meas_gap_sharing_scheme_e"); -} -float meas_gap_sharing_scheme_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.1, 1.0, 1.1}; - return map_enum_number(numbers, 4, value, "meas_gap_sharing_scheme_e"); -} -const char* meas_gap_sharing_scheme_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.0", "0.1", "1.0", "1.1"}; - return convert_enum_idx(number_strs, 4, value, "meas_gap_sharing_scheme_e"); -} - -// MeasObjectCLI-r16 ::= SEQUENCE -SRSASN_CODE meas_obj_cli_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(cli_res_cfg_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_obj_cli_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(cli_res_cfg_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void meas_obj_cli_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("cli-ResourceConfig-r16"); - cli_res_cfg_r16.to_json(j); - j.end_obj(); -} - -// MeasObjectEUTRA ::= SEQUENCE -SRSASN_CODE meas_obj_eutra_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cells_to_rem_list_eutran.size() > 0, 1)); - HANDLE_CODE(bref.pack(cells_to_add_mod_list_eutran.size() > 0, 1)); - HANDLE_CODE(bref.pack(excluded_cells_to_rem_list_eutran.size() > 0, 1)); - HANDLE_CODE(bref.pack(excluded_cells_to_add_mod_list_eutran.size() > 0, 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.size() > 0) { - 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_add_mod_list_eutran, 1, 32)); - } - if (excluded_cells_to_rem_list_eutran.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, excluded_cells_to_rem_list_eutran, 1, 32, integer_packer(1, 32))); - } - if (excluded_cells_to_add_mod_list_eutran.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, excluded_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)); - } - HANDLE_CODE(bref.pack(wideband_rsrq_meas, 1)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= associated_meas_gap_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(associated_meas_gap_r17_present, 1)); - if (associated_meas_gap_r17_present) { - HANDLE_CODE(pack_integer(bref, associated_meas_gap_r17, (uint8_t)1u, (uint8_t)8u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_obj_eutra_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool cells_to_rem_list_eutran_present; - HANDLE_CODE(bref.unpack(cells_to_rem_list_eutran_present, 1)); - bool cells_to_add_mod_list_eutran_present; - HANDLE_CODE(bref.unpack(cells_to_add_mod_list_eutran_present, 1)); - bool excluded_cells_to_rem_list_eutran_present; - HANDLE_CODE(bref.unpack(excluded_cells_to_rem_list_eutran_present, 1)); - bool excluded_cells_to_add_mod_list_eutran_present; - HANDLE_CODE(bref.unpack(excluded_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)); - } - if (excluded_cells_to_rem_list_eutran_present) { - HANDLE_CODE(unpack_dyn_seq_of(excluded_cells_to_rem_list_eutran, bref, 1, 32, integer_packer(1, 32))); - } - if (excluded_cells_to_add_mod_list_eutran_present) { - HANDLE_CODE(unpack_dyn_seq_of(excluded_cells_to_add_mod_list_eutran, bref, 1, 32)); - } - 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)); - - 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(associated_meas_gap_r17_present, 1)); - if (associated_meas_gap_r17_present) { - HANDLE_CODE(unpack_integer(associated_meas_gap_r17, bref, (uint8_t)1u, (uint8_t)8u)); - } - } - } - return SRSASN_SUCCESS; -} -void meas_obj_eutra_s::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.size() > 0) { - 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.size() > 0) { - j.start_array("cellsToAddModListEUTRAN"); - for (const auto& e1 : cells_to_add_mod_list_eutran) { - e1.to_json(j); - } - j.end_array(); - } - if (excluded_cells_to_rem_list_eutran.size() > 0) { - j.start_array("excludedCellsToRemoveListEUTRAN"); - for (const auto& e1 : excluded_cells_to_rem_list_eutran) { - j.write_int(e1); - } - j.end_array(); - } - if (excluded_cells_to_add_mod_list_eutran.size() > 0) { - j.start_array("excludedCellsToAddModListEUTRAN"); - for (const auto& e1 : excluded_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()); - } - j.write_bool("widebandRSRQ-Meas", wideband_rsrq_meas); - if (ext) { - if (associated_meas_gap_r17_present) { - j.write_int("associatedMeasGap-r17", associated_meas_gap_r17); - } - } - j.end_obj(); -} - -// MeasObjectNR ::= SEQUENCE -SRSASN_CODE meas_obj_nr_s::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.size() > 0, 1)); - HANDLE_CODE(bref.pack(cells_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(excluded_cells_to_rem_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(excluded_cells_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(allowed_cells_to_rem_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(allowed_cells_to_add_mod_list.size() > 0, 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_rem_list, 1, 32, integer_packer(0, 1007))); - } - if (cells_to_add_mod_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_add_mod_list, 1, 32)); - } - if (excluded_cells_to_rem_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, excluded_cells_to_rem_list, 1, 8, integer_packer(1, 8))); - } - if (excluded_cells_to_add_mod_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, excluded_cells_to_add_mod_list, 1, 8)); - } - if (allowed_cells_to_rem_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, allowed_cells_to_rem_list, 1, 8, integer_packer(1, 8))); - } - if (allowed_cells_to_add_mod_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, allowed_cells_to_add_mod_list, 1, 8)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= freq_band_ind_nr_present; - group_flags[0] |= meas_cycle_scell_present; - group_flags[1] |= smtc3list_r16.is_present(); - group_flags[1] |= rmtc_cfg_r16.is_present(); - group_flags[1] |= t312_r16.is_present(); - group_flags[2] |= associated_meas_gap_ssb_r17_present; - group_flags[2] |= associated_meas_gap_csi_rs_r17_present; - group_flags[2] |= smtc4list_r17.is_present(); - group_flags[2] |= meas_cycle_pscell_r17_present; - group_flags[2] |= cells_to_add_mod_list_ext_v1710.is_present(); - group_flags[3] |= associated_meas_gap_ssb2_v1720_present; - group_flags[3] |= associated_meas_gap_csi_rs2_v1720_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_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)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(smtc3list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(rmtc_cfg_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(t312_r16.is_present(), 1)); - if (smtc3list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *smtc3list_r16, 1, 4)); - } - if (rmtc_cfg_r16.is_present()) { - HANDLE_CODE(rmtc_cfg_r16->pack(bref)); - } - if (t312_r16.is_present()) { - HANDLE_CODE(t312_r16->pack(bref)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(associated_meas_gap_ssb_r17_present, 1)); - HANDLE_CODE(bref.pack(associated_meas_gap_csi_rs_r17_present, 1)); - HANDLE_CODE(bref.pack(smtc4list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(meas_cycle_pscell_r17_present, 1)); - HANDLE_CODE(bref.pack(cells_to_add_mod_list_ext_v1710.is_present(), 1)); - if (associated_meas_gap_ssb_r17_present) { - HANDLE_CODE(pack_integer(bref, associated_meas_gap_ssb_r17, (uint8_t)1u, (uint8_t)8u)); - } - if (associated_meas_gap_csi_rs_r17_present) { - HANDLE_CODE(pack_integer(bref, associated_meas_gap_csi_rs_r17, (uint8_t)1u, (uint8_t)8u)); - } - if (smtc4list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *smtc4list_r17, 1, 3)); - } - if (meas_cycle_pscell_r17_present) { - HANDLE_CODE(meas_cycle_pscell_r17.pack(bref)); - } - if (cells_to_add_mod_list_ext_v1710.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *cells_to_add_mod_list_ext_v1710, 1, 32)); - } - } - if (group_flags[3]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(associated_meas_gap_ssb2_v1720_present, 1)); - HANDLE_CODE(bref.pack(associated_meas_gap_csi_rs2_v1720_present, 1)); - if (associated_meas_gap_ssb2_v1720_present) { - HANDLE_CODE(pack_integer(bref, associated_meas_gap_ssb2_v1720, (uint8_t)1u, (uint8_t)8u)); - } - if (associated_meas_gap_csi_rs2_v1720_present) { - HANDLE_CODE(pack_integer(bref, associated_meas_gap_csi_rs2_v1720, (uint8_t)1u, (uint8_t)8u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_obj_nr_s::unpack(cbit_ref& bref) -{ - 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)); - bool cells_to_rem_list_present; - HANDLE_CODE(bref.unpack(cells_to_rem_list_present, 1)); - bool cells_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(cells_to_add_mod_list_present, 1)); - bool excluded_cells_to_rem_list_present; - HANDLE_CODE(bref.unpack(excluded_cells_to_rem_list_present, 1)); - bool excluded_cells_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(excluded_cells_to_add_mod_list_present, 1)); - bool allowed_cells_to_rem_list_present; - HANDLE_CODE(bref.unpack(allowed_cells_to_rem_list_present, 1)); - bool allowed_cells_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(allowed_cells_to_add_mod_list_present, 1)); - - if (ssb_freq_present) { - HANDLE_CODE(unpack_integer(ssb_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); - } - 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 (excluded_cells_to_rem_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(excluded_cells_to_rem_list, bref, 1, 8, integer_packer(1, 8))); - } - if (excluded_cells_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(excluded_cells_to_add_mod_list, bref, 1, 8)); - } - if (allowed_cells_to_rem_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(allowed_cells_to_rem_list, bref, 1, 8, integer_packer(1, 8))); - } - if (allowed_cells_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(allowed_cells_to_add_mod_list, bref, 1, 8)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(4); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - 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)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(smtc3list_r16, bref); - unpack_presence_flag(rmtc_cfg_r16, bref); - unpack_presence_flag(t312_r16, bref); - if (smtc3list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*smtc3list_r16, bref, 1, 4)); - } - if (rmtc_cfg_r16.is_present()) { - HANDLE_CODE(rmtc_cfg_r16->unpack(bref)); - } - if (t312_r16.is_present()) { - HANDLE_CODE(t312_r16->unpack(bref)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(associated_meas_gap_ssb_r17_present, 1)); - HANDLE_CODE(bref.unpack(associated_meas_gap_csi_rs_r17_present, 1)); - unpack_presence_flag(smtc4list_r17, bref); - HANDLE_CODE(bref.unpack(meas_cycle_pscell_r17_present, 1)); - unpack_presence_flag(cells_to_add_mod_list_ext_v1710, bref); - if (associated_meas_gap_ssb_r17_present) { - HANDLE_CODE(unpack_integer(associated_meas_gap_ssb_r17, bref, (uint8_t)1u, (uint8_t)8u)); - } - if (associated_meas_gap_csi_rs_r17_present) { - HANDLE_CODE(unpack_integer(associated_meas_gap_csi_rs_r17, bref, (uint8_t)1u, (uint8_t)8u)); - } - if (smtc4list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*smtc4list_r17, bref, 1, 3)); - } - if (meas_cycle_pscell_r17_present) { - HANDLE_CODE(meas_cycle_pscell_r17.unpack(bref)); - } - if (cells_to_add_mod_list_ext_v1710.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*cells_to_add_mod_list_ext_v1710, bref, 1, 32)); - } - } - if (group_flags[3]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(associated_meas_gap_ssb2_v1720_present, 1)); - HANDLE_CODE(bref.unpack(associated_meas_gap_csi_rs2_v1720_present, 1)); - if (associated_meas_gap_ssb2_v1720_present) { - HANDLE_CODE(unpack_integer(associated_meas_gap_ssb2_v1720, bref, (uint8_t)1u, (uint8_t)8u)); - } - if (associated_meas_gap_csi_rs2_v1720_present) { - HANDLE_CODE(unpack_integer(associated_meas_gap_csi_rs2_v1720, bref, (uint8_t)1u, (uint8_t)8u)); - } - } - } - 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.size() > 0) { - 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.size() > 0) { - j.start_array("cellsToAddModList"); - for (const auto& e1 : cells_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); - } - if (excluded_cells_to_rem_list.size() > 0) { - j.start_array("excludedCellsToRemoveList"); - for (const auto& e1 : excluded_cells_to_rem_list) { - j.write_int(e1); - } - j.end_array(); - } - if (excluded_cells_to_add_mod_list.size() > 0) { - j.start_array("excludedCellsToAddModList"); - for (const auto& e1 : excluded_cells_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); - } - if (allowed_cells_to_rem_list.size() > 0) { - j.start_array("allowedCellsToRemoveList"); - for (const auto& e1 : allowed_cells_to_rem_list) { - j.write_int(e1); - } - j.end_array(); - } - if (allowed_cells_to_add_mod_list.size() > 0) { - j.start_array("allowedCellsToAddModList"); - for (const auto& e1 : allowed_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()); - } - if (smtc3list_r16.is_present()) { - j.start_array("smtc3list-r16"); - for (const auto& e1 : *smtc3list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (rmtc_cfg_r16.is_present()) { - j.write_fieldname("rmtc-Config-r16"); - rmtc_cfg_r16->to_json(j); - } - if (t312_r16.is_present()) { - j.write_fieldname("t312-r16"); - t312_r16->to_json(j); - } - if (associated_meas_gap_ssb_r17_present) { - j.write_int("associatedMeasGapSSB-r17", associated_meas_gap_ssb_r17); - } - if (associated_meas_gap_csi_rs_r17_present) { - j.write_int("associatedMeasGapCSIRS-r17", associated_meas_gap_csi_rs_r17); - } - if (smtc4list_r17.is_present()) { - j.start_array("smtc4list-r17"); - for (const auto& e1 : *smtc4list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_cycle_pscell_r17_present) { - j.write_str("measCyclePSCell-r17", meas_cycle_pscell_r17.to_string()); - } - if (cells_to_add_mod_list_ext_v1710.is_present()) { - j.start_array("cellsToAddModListExt-v1710"); - for (const auto& e1 : *cells_to_add_mod_list_ext_v1710) { - e1.to_json(j); - } - j.end_array(); - } - if (associated_meas_gap_ssb2_v1720_present) { - j.write_int("associatedMeasGapSSB2-v1720", associated_meas_gap_ssb2_v1720); - } - if (associated_meas_gap_csi_rs2_v1720_present) { - j.write_int("associatedMeasGapCSIRS2-v1720", associated_meas_gap_csi_rs2_v1720); - } - } - j.end_obj(); -} - -const char* meas_obj_nr_s::meas_cycle_scell_opts::to_string() const -{ - static const char* names[] = {"sf160", "sf256", "sf320", "sf512", "sf640", "sf1024", "sf1280"}; - return convert_enum_idx(names, 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 numbers[] = {160, 256, 320, 512, 640, 1024, 1280}; - return map_enum_number(numbers, 7, value, "meas_obj_nr_s::meas_cycle_scell_e_"); -} - -const char* meas_obj_nr_s::meas_cycle_pscell_r17_opts::to_string() const -{ - static const char* names[] = {"ms160", "ms256", "ms320", "ms512", "ms640", "ms1024", "ms1280", "spare1"}; - return convert_enum_idx(names, 8, value, "meas_obj_nr_s::meas_cycle_pscell_r17_e_"); -} -uint16_t meas_obj_nr_s::meas_cycle_pscell_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {160, 256, 320, 512, 640, 1024, 1280}; - return map_enum_number(numbers, 7, value, "meas_obj_nr_s::meas_cycle_pscell_r17_e_"); -} - -// MeasObjectNR-SL-r16 ::= SEQUENCE -SRSASN_CODE meas_obj_nr_sl_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(tx_pool_meas_to_rem_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(tx_pool_meas_to_add_mod_list_r16.size() > 0, 1)); - - if (tx_pool_meas_to_rem_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, tx_pool_meas_to_rem_list_r16, 1, 8, integer_packer(1, 16))); - } - if (tx_pool_meas_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, tx_pool_meas_to_add_mod_list_r16, 1, 8, integer_packer(1, 16))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_obj_nr_sl_r16_s::unpack(cbit_ref& bref) -{ - bool tx_pool_meas_to_rem_list_r16_present; - HANDLE_CODE(bref.unpack(tx_pool_meas_to_rem_list_r16_present, 1)); - bool tx_pool_meas_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(tx_pool_meas_to_add_mod_list_r16_present, 1)); - - if (tx_pool_meas_to_rem_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(tx_pool_meas_to_rem_list_r16, bref, 1, 8, integer_packer(1, 16))); - } - if (tx_pool_meas_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(tx_pool_meas_to_add_mod_list_r16, bref, 1, 8, integer_packer(1, 16))); - } - - return SRSASN_SUCCESS; -} -void meas_obj_nr_sl_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (tx_pool_meas_to_rem_list_r16.size() > 0) { - j.start_array("tx-PoolMeasToRemoveList-r16"); - for (const auto& e1 : tx_pool_meas_to_rem_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (tx_pool_meas_to_add_mod_list_r16.size() > 0) { - j.start_array("tx-PoolMeasToAddModList-r16"); - for (const auto& e1 : tx_pool_meas_to_add_mod_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// MeasObjectRxTxDiff-r17 ::= SEQUENCE -SRSASN_CODE meas_obj_rx_tx_diff_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(dl_ref_r17_present, 1)); - - if (dl_ref_r17_present) { - HANDLE_CODE(dl_ref_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_obj_rx_tx_diff_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(dl_ref_r17_present, 1)); - - if (dl_ref_r17_present) { - HANDLE_CODE(dl_ref_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void meas_obj_rx_tx_diff_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (dl_ref_r17_present) { - j.write_fieldname("dl-Ref-r17"); - dl_ref_r17.to_json(j); - } - j.end_obj(); -} - -void meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::set(types::options e) -{ - type_ = e; -} -void meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::set_prs_ref_r17() -{ - set(types::prs_ref_r17); -} -void meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::set_csi_rs_ref_r17() -{ - set(types::csi_rs_ref_r17); -} -void meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - j.end_obj(); -} -SRSASN_CODE meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - return SRSASN_SUCCESS; -} - -// MeasObjectUTRA-FDD-r16 ::= SEQUENCE -SRSASN_CODE meas_obj_utra_fdd_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(utra_fdd_q_offset_range_r16_present, 1)); - HANDLE_CODE(bref.pack(cells_to_rem_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(cells_to_add_mod_list_r16.size() > 0, 1)); - - HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint16_t)0u, (uint16_t)16383u)); - if (utra_fdd_q_offset_range_r16_present) { - HANDLE_CODE(utra_fdd_q_offset_range_r16.pack(bref)); - } - if (cells_to_rem_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_rem_list_r16, 1, 32, integer_packer(1, 32))); - } - if (cells_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_add_mod_list_r16, 1, 32)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_obj_utra_fdd_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(utra_fdd_q_offset_range_r16_present, 1)); - bool cells_to_rem_list_r16_present; - HANDLE_CODE(bref.unpack(cells_to_rem_list_r16_present, 1)); - bool cells_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(cells_to_add_mod_list_r16_present, 1)); - - HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint16_t)0u, (uint16_t)16383u)); - if (utra_fdd_q_offset_range_r16_present) { - HANDLE_CODE(utra_fdd_q_offset_range_r16.unpack(bref)); - } - if (cells_to_rem_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(cells_to_rem_list_r16, bref, 1, 32, integer_packer(1, 32))); - } - if (cells_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(cells_to_add_mod_list_r16, bref, 1, 32)); - } - - return SRSASN_SUCCESS; -} -void meas_obj_utra_fdd_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("carrierFreq-r16", carrier_freq_r16); - if (utra_fdd_q_offset_range_r16_present) { - j.write_str("utra-FDD-Q-OffsetRange-r16", utra_fdd_q_offset_range_r16.to_string()); - } - if (cells_to_rem_list_r16.size() > 0) { - j.start_array("cellsToRemoveList-r16"); - for (const auto& e1 : cells_to_rem_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (cells_to_add_mod_list_r16.size() > 0) { - j.start_array("cellsToAddModList-r16"); - for (const auto& e1 : cells_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// 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(); -} - -const char* overheat_assist_cfg_s::overheat_ind_prohibit_timer_opts::to_string() const -{ - static const char* names[] = {"s0", - "s0dot5", - "s1", - "s2", - "s5", - "s10", - "s20", - "s30", - "s60", - "s90", - "s120", - "s300", - "s600", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 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 numbers[] = {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(numbers, 13, value, "overheat_assist_cfg_s::overheat_ind_prohibit_timer_e_"); -} -const char* overheat_assist_cfg_s::overheat_ind_prohibit_timer_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600"}; - return convert_enum_idx(number_strs, 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(); -} - -// PosGapConfig-r17 ::= SEQUENCE -SRSASN_CODE pos_gap_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, meas_pos_pre_cfg_gap_id_r17, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(pack_integer(bref, gap_offset_r17, (uint8_t)0u, (uint8_t)159u)); - HANDLE_CODE(mgl_r17.pack(bref)); - HANDLE_CODE(mgrp_r17.pack(bref)); - HANDLE_CODE(mgta_r17.pack(bref)); - HANDLE_CODE(gap_type_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pos_gap_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(meas_pos_pre_cfg_gap_id_r17, bref, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(unpack_integer(gap_offset_r17, bref, (uint8_t)0u, (uint8_t)159u)); - HANDLE_CODE(mgl_r17.unpack(bref)); - HANDLE_CODE(mgrp_r17.unpack(bref)); - HANDLE_CODE(mgta_r17.unpack(bref)); - HANDLE_CODE(gap_type_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void pos_gap_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("measPosPreConfigGapId-r17", meas_pos_pre_cfg_gap_id_r17); - j.write_int("gapOffset-r17", gap_offset_r17); - j.write_str("mgl-r17", mgl_r17.to_string()); - j.write_str("mgrp-r17", mgrp_r17.to_string()); - j.write_str("mgta-r17", mgta_r17.to_string()); - j.write_str("gapType-r17", gap_type_r17.to_string()); - j.end_obj(); -} - -const char* pos_gap_cfg_r17_s::mgl_r17_opts::to_string() const -{ - static const char* names[] = {"ms1dot5", "ms3", "ms3dot5", "ms4", "ms5dot5", "ms6", "ms10", "ms20"}; - return convert_enum_idx(names, 8, value, "pos_gap_cfg_r17_s::mgl_r17_e_"); -} -float pos_gap_cfg_r17_s::mgl_r17_opts::to_number() const -{ - static const float numbers[] = {1.5, 3.0, 3.5, 4.0, 5.5, 6.0, 10.0, 20.0}; - return map_enum_number(numbers, 8, value, "pos_gap_cfg_r17_s::mgl_r17_e_"); -} -const char* pos_gap_cfg_r17_s::mgl_r17_opts::to_number_string() const -{ - static const char* number_strs[] = {"1.5", "3", "3.5", "4", "5.5", "6", "10", "20"}; - return convert_enum_idx(number_strs, 8, value, "pos_gap_cfg_r17_s::mgl_r17_e_"); -} - -const char* pos_gap_cfg_r17_s::mgrp_r17_opts::to_string() const -{ - static const char* names[] = {"ms20", "ms40", "ms80", "ms160"}; - return convert_enum_idx(names, 4, value, "pos_gap_cfg_r17_s::mgrp_r17_e_"); -} -uint8_t pos_gap_cfg_r17_s::mgrp_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {20, 40, 80, 160}; - return map_enum_number(numbers, 4, value, "pos_gap_cfg_r17_s::mgrp_r17_e_"); -} - -const char* pos_gap_cfg_r17_s::mgta_r17_opts::to_string() const -{ - static const char* names[] = {"ms0", "ms0dot25", "ms0dot5"}; - return convert_enum_idx(names, 3, value, "pos_gap_cfg_r17_s::mgta_r17_e_"); -} -float pos_gap_cfg_r17_s::mgta_r17_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.25, 0.5}; - return map_enum_number(numbers, 3, value, "pos_gap_cfg_r17_s::mgta_r17_e_"); -} -const char* pos_gap_cfg_r17_s::mgta_r17_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.25", "0.5"}; - return convert_enum_idx(number_strs, 3, value, "pos_gap_cfg_r17_s::mgta_r17_e_"); -} - -const char* pos_gap_cfg_r17_s::gap_type_r17_opts::to_string() const -{ - static const char* names[] = {"perUE", "perFR1", "perFR2"}; - return convert_enum_idx(names, 3, value, "pos_gap_cfg_r17_s::gap_type_r17_e_"); -} -uint8_t pos_gap_cfg_r17_s::gap_type_r17_opts::to_number() const -{ - switch (value) { - case per_fr1: - return 1; - case per_fr2: - return 2; - default: - invalid_enum_number(value, "pos_gap_cfg_r17_s::gap_type_r17_e_"); - } - return 0; -} - -// 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(); -} - -// RRCReconfiguration-v1610-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(other_cfg_v1610_present, 1)); - HANDLE_CODE(bref.pack(bap_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(iab_ip_address_cfg_list_r16_present, 1)); - HANDLE_CODE(bref.pack(conditional_recfg_r16_present, 1)); - HANDLE_CODE(bref.pack(daps_source_release_r16_present, 1)); - HANDLE_CODE(bref.pack(t316_r16_present, 1)); - HANDLE_CODE(bref.pack(need_for_gaps_cfg_nr_r16_present, 1)); - HANDLE_CODE(bref.pack(on_demand_sib_request_r16_present, 1)); - HANDLE_CODE(bref.pack(ded_pos_sys_info_delivery_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_cfg_ded_nr_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_cfg_ded_eutra_info_r16_present, 1)); - HANDLE_CODE(bref.pack(target_cell_smtc_scg_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (other_cfg_v1610_present) { - HANDLE_CODE(other_cfg_v1610.pack(bref)); - } - if (bap_cfg_r16_present) { - HANDLE_CODE(bap_cfg_r16.pack(bref)); - } - if (iab_ip_address_cfg_list_r16_present) { - HANDLE_CODE(iab_ip_address_cfg_list_r16.pack(bref)); - } - if (conditional_recfg_r16_present) { - HANDLE_CODE(conditional_recfg_r16.pack(bref)); - } - if (t316_r16_present) { - HANDLE_CODE(t316_r16.pack(bref)); - } - if (need_for_gaps_cfg_nr_r16_present) { - HANDLE_CODE(need_for_gaps_cfg_nr_r16.pack(bref)); - } - if (on_demand_sib_request_r16_present) { - HANDLE_CODE(on_demand_sib_request_r16.pack(bref)); - } - if (ded_pos_sys_info_delivery_r16.size() > 0) { - HANDLE_CODE(ded_pos_sys_info_delivery_r16.pack(bref)); - } - if (sl_cfg_ded_nr_r16_present) { - HANDLE_CODE(sl_cfg_ded_nr_r16.pack(bref)); - } - if (sl_cfg_ded_eutra_info_r16_present) { - HANDLE_CODE(sl_cfg_ded_eutra_info_r16.pack(bref)); - } - if (target_cell_smtc_scg_r16_present) { - HANDLE_CODE(target_cell_smtc_scg_r16.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_recfg_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(other_cfg_v1610_present, 1)); - HANDLE_CODE(bref.unpack(bap_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(iab_ip_address_cfg_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(conditional_recfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(daps_source_release_r16_present, 1)); - HANDLE_CODE(bref.unpack(t316_r16_present, 1)); - HANDLE_CODE(bref.unpack(need_for_gaps_cfg_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(on_demand_sib_request_r16_present, 1)); - bool ded_pos_sys_info_delivery_r16_present; - HANDLE_CODE(bref.unpack(ded_pos_sys_info_delivery_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_cfg_ded_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_cfg_ded_eutra_info_r16_present, 1)); - HANDLE_CODE(bref.unpack(target_cell_smtc_scg_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (other_cfg_v1610_present) { - HANDLE_CODE(other_cfg_v1610.unpack(bref)); - } - if (bap_cfg_r16_present) { - HANDLE_CODE(bap_cfg_r16.unpack(bref)); - } - if (iab_ip_address_cfg_list_r16_present) { - HANDLE_CODE(iab_ip_address_cfg_list_r16.unpack(bref)); - } - if (conditional_recfg_r16_present) { - HANDLE_CODE(conditional_recfg_r16.unpack(bref)); - } - if (t316_r16_present) { - HANDLE_CODE(t316_r16.unpack(bref)); - } - if (need_for_gaps_cfg_nr_r16_present) { - HANDLE_CODE(need_for_gaps_cfg_nr_r16.unpack(bref)); - } - if (on_demand_sib_request_r16_present) { - HANDLE_CODE(on_demand_sib_request_r16.unpack(bref)); - } - if (ded_pos_sys_info_delivery_r16_present) { - HANDLE_CODE(ded_pos_sys_info_delivery_r16.unpack(bref)); - } - if (sl_cfg_ded_nr_r16_present) { - HANDLE_CODE(sl_cfg_ded_nr_r16.unpack(bref)); - } - if (sl_cfg_ded_eutra_info_r16_present) { - HANDLE_CODE(sl_cfg_ded_eutra_info_r16.unpack(bref)); - } - if (target_cell_smtc_scg_r16_present) { - HANDLE_CODE(target_cell_smtc_scg_r16.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_recfg_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (other_cfg_v1610_present) { - j.write_fieldname("otherConfig-v1610"); - other_cfg_v1610.to_json(j); - } - if (bap_cfg_r16_present) { - j.write_fieldname("bap-Config-r16"); - bap_cfg_r16.to_json(j); - } - if (iab_ip_address_cfg_list_r16_present) { - j.write_fieldname("iab-IP-AddressConfigurationList-r16"); - iab_ip_address_cfg_list_r16.to_json(j); - } - if (conditional_recfg_r16_present) { - j.write_fieldname("conditionalReconfiguration-r16"); - conditional_recfg_r16.to_json(j); - } - if (daps_source_release_r16_present) { - j.write_str("daps-SourceRelease-r16", "true"); - } - if (t316_r16_present) { - j.write_fieldname("t316-r16"); - t316_r16.to_json(j); - } - if (need_for_gaps_cfg_nr_r16_present) { - j.write_fieldname("needForGapsConfigNR-r16"); - need_for_gaps_cfg_nr_r16.to_json(j); - } - if (on_demand_sib_request_r16_present) { - j.write_fieldname("onDemandSIB-Request-r16"); - on_demand_sib_request_r16.to_json(j); - } - if (ded_pos_sys_info_delivery_r16.size() > 0) { - j.write_str("dedicatedPosSysInfoDelivery-r16", ded_pos_sys_info_delivery_r16.to_string()); - } - if (sl_cfg_ded_nr_r16_present) { - j.write_fieldname("sl-ConfigDedicatedNR-r16"); - sl_cfg_ded_nr_r16.to_json(j); - } - if (sl_cfg_ded_eutra_info_r16_present) { - j.write_fieldname("sl-ConfigDedicatedEUTRA-Info-r16"); - sl_cfg_ded_eutra_info_r16.to_json(j); - } - if (target_cell_smtc_scg_r16_present) { - j.write_fieldname("targetCellSMTC-SCG-r16"); - target_cell_smtc_scg_r16.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// RRCRelease-v1710-IEs ::= SEQUENCE -SRSASN_CODE rrc_release_v1710_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(no_last_cell_upd_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_release_v1710_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(no_last_cell_upd_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - return SRSASN_SUCCESS; -} -void rrc_release_v1710_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (no_last_cell_upd_r17_present) { - j.write_str("noLastCellUpdate-r17", "true"); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - 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_"); - } -} -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::periodical: - c.init(other.c.get()); - break; - 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_, "report_cfg_inter_rat_s::report_type_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) -{ - 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()); - 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_, "report_cfg_inter_rat_s::report_type_c_"); - } - - return *this; -} -periodical_report_cfg_inter_rat_s& report_cfg_inter_rat_s::report_type_c_::set_periodical() -{ - set(types::periodical); - return c.get(); -} -event_trigger_cfg_inter_rat_s& report_cfg_inter_rat_s::report_type_c_::set_event_triggered() -{ - set(types::event_triggered); - return c.get(); -} -report_cgi_eutra_s& report_cfg_inter_rat_s::report_type_c_::set_report_cgi() -{ - set(types::report_cgi); - return c.get(); -} -report_sftd_eutra_s& report_cfg_inter_rat_s::report_type_c_::set_report_sftd() -{ - set(types::report_sftd); - return c.get(); -} -void report_cfg_inter_rat_s::report_type_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); - 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_, "report_cfg_inter_rat_s::report_type_c_"); - } - j.end_obj(); -} -SRSASN_CODE report_cfg_inter_rat_s::report_type_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::periodical: - HANDLE_CODE(c.get().pack(bref)); - break; - 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_, "report_cfg_inter_rat_s::report_type_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::periodical: - HANDLE_CODE(c.get().unpack(bref)); - break; - 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_, "report_cfg_inter_rat_s::report_type_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// ReportConfigNR ::= SEQUENCE -SRSASN_CODE report_cfg_nr_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(report_type.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE report_cfg_nr_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(report_type.unpack(bref)); - - return SRSASN_SUCCESS; -} -void report_cfg_nr_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_nr_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; - case types::cond_trigger_cfg_r16: - c.destroy(); - break; - case types::cli_periodical_r16: - c.destroy(); - break; - case types::cli_event_triggered_r16: - c.destroy(); - break; - case types::rx_tx_periodical_r17: - c.destroy(); - break; - default: - break; - } -} -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::event_triggered: - c.init(); - break; - case types::report_cgi: - c.init(); - break; - case types::report_sftd: - c.init(); - break; - case types::cond_trigger_cfg_r16: - c.init(); - break; - case types::cli_periodical_r16: - c.init(); - break; - case types::cli_event_triggered_r16: - c.init(); - break; - case types::rx_tx_periodical_r17: - 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) -{ - type_ = other.type(); - switch (type_) { - case types::periodical: - c.init(other.c.get()); - break; - 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::cond_trigger_cfg_r16: - c.init(other.c.get()); - break; - case types::cli_periodical_r16: - c.init(other.c.get()); - break; - case types::cli_event_triggered_r16: - c.init(other.c.get()); - break; - case types::rx_tx_periodical_r17: - c.init(other.c.get()); - 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_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::periodical: - c.set(other.c.get()); - break; - 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::cond_trigger_cfg_r16: - c.set(other.c.get()); - break; - case types::cli_periodical_r16: - c.set(other.c.get()); - break; - case types::cli_event_triggered_r16: - c.set(other.c.get()); - break; - case types::rx_tx_periodical_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); - } - - return *this; -} -periodical_report_cfg_s& report_cfg_nr_s::report_type_c_::set_periodical() -{ - set(types::periodical); - return c.get(); -} -event_trigger_cfg_s& report_cfg_nr_s::report_type_c_::set_event_triggered() -{ - set(types::event_triggered); - return c.get(); -} -report_cgi_s& report_cfg_nr_s::report_type_c_::set_report_cgi() -{ - set(types::report_cgi); - return c.get(); -} -report_sftd_nr_s& report_cfg_nr_s::report_type_c_::set_report_sftd() -{ - set(types::report_sftd); - return c.get(); -} -cond_trigger_cfg_r16_s& report_cfg_nr_s::report_type_c_::set_cond_trigger_cfg_r16() -{ - set(types::cond_trigger_cfg_r16); - return c.get(); -} -cli_periodical_report_cfg_r16_s& report_cfg_nr_s::report_type_c_::set_cli_periodical_r16() -{ - set(types::cli_periodical_r16); - return c.get(); -} -cli_event_trigger_cfg_r16_s& report_cfg_nr_s::report_type_c_::set_cli_event_triggered_r16() -{ - set(types::cli_event_triggered_r16); - return c.get(); -} -rx_tx_periodical_r17_s& report_cfg_nr_s::report_type_c_::set_rx_tx_periodical_r17() -{ - set(types::rx_tx_periodical_r17); - return c.get(); -} -void report_cfg_nr_s::report_type_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); - 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; - case types::cond_trigger_cfg_r16: - j.write_fieldname("condTriggerConfig-r16"); - c.get().to_json(j); - break; - case types::cli_periodical_r16: - j.write_fieldname("cli-Periodical-r16"); - c.get().to_json(j); - break; - case types::cli_event_triggered_r16: - j.write_fieldname("cli-EventTriggered-r16"); - c.get().to_json(j); - break; - case types::rx_tx_periodical_r17: - j.write_fieldname("rxTxPeriodical-r17"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); - } - j.end_obj(); -} -SRSASN_CODE report_cfg_nr_s::report_type_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::periodical: - HANDLE_CODE(c.get().pack(bref)); - break; - 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; - case types::cond_trigger_cfg_r16: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::cli_periodical_r16: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::cli_event_triggered_r16: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::rx_tx_periodical_r17: { - 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_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE report_cfg_nr_s::report_type_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::periodical: - HANDLE_CODE(c.get().unpack(bref)); - break; - 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; - case types::cond_trigger_cfg_r16: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::cli_periodical_r16: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::cli_event_triggered_r16: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::rx_tx_periodical_r17: { - 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_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// ReportConfigNR-SL-r16 ::= SEQUENCE -SRSASN_CODE report_cfg_nr_sl_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(report_type_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE report_cfg_nr_sl_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(report_type_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void report_cfg_nr_sl_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("reportType-r16"); - report_type_r16.to_json(j); - j.end_obj(); -} - -void report_cfg_nr_sl_r16_s::report_type_r16_c_::destroy_() -{ - switch (type_) { - case types::periodical_r16: - c.destroy(); - break; - case types::event_triggered_r16: - c.destroy(); - break; - default: - break; - } -} -void report_cfg_nr_sl_r16_s::report_type_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::periodical_r16: - c.init(); - break; - case types::event_triggered_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "report_cfg_nr_sl_r16_s::report_type_r16_c_"); - } -} -report_cfg_nr_sl_r16_s::report_type_r16_c_::report_type_r16_c_(const report_cfg_nr_sl_r16_s::report_type_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::periodical_r16: - c.init(other.c.get()); - break; - case types::event_triggered_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "report_cfg_nr_sl_r16_s::report_type_r16_c_"); - } -} -report_cfg_nr_sl_r16_s::report_type_r16_c_& -report_cfg_nr_sl_r16_s::report_type_r16_c_::operator=(const report_cfg_nr_sl_r16_s::report_type_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::periodical_r16: - c.set(other.c.get()); - break; - case types::event_triggered_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "report_cfg_nr_sl_r16_s::report_type_r16_c_"); - } - - return *this; -} -periodical_report_cfg_nr_sl_r16_s& report_cfg_nr_sl_r16_s::report_type_r16_c_::set_periodical_r16() -{ - set(types::periodical_r16); - return c.get(); -} -event_trigger_cfg_nr_sl_r16_s& report_cfg_nr_sl_r16_s::report_type_r16_c_::set_event_triggered_r16() -{ - set(types::event_triggered_r16); - return c.get(); -} -void report_cfg_nr_sl_r16_s::report_type_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::periodical_r16: - j.write_fieldname("periodical-r16"); - c.get().to_json(j); - break; - case types::event_triggered_r16: - j.write_fieldname("eventTriggered-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "report_cfg_nr_sl_r16_s::report_type_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE report_cfg_nr_sl_r16_s::report_type_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::periodical_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::event_triggered_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "report_cfg_nr_sl_r16_s::report_type_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE report_cfg_nr_sl_r16_s::report_type_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::periodical_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::event_triggered_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "report_cfg_nr_sl_r16_s::report_type_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// AreaConfig-r16 ::= CHOICE -void area_cfg_r16_c::destroy_() -{ - switch (type_) { - case types::cell_global_id_list_r16: - c.destroy(); - break; - case types::tac_list_r16: - c.destroy(); - break; - case types::tracking_area_id_list_r16: - c.destroy(); - break; - default: - break; - } -} -void area_cfg_r16_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::cell_global_id_list_r16: - c.init(); - break; - case types::tac_list_r16: - c.init(); - break; - case types::tracking_area_id_list_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "area_cfg_r16_c"); - } -} -area_cfg_r16_c::area_cfg_r16_c(const area_cfg_r16_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::cell_global_id_list_r16: - c.init(other.c.get()); - break; - case types::tac_list_r16: - c.init(other.c.get()); - break; - case types::tracking_area_id_list_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "area_cfg_r16_c"); - } -} -area_cfg_r16_c& area_cfg_r16_c::operator=(const area_cfg_r16_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::cell_global_id_list_r16: - c.set(other.c.get()); - break; - case types::tac_list_r16: - c.set(other.c.get()); - break; - case types::tracking_area_id_list_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "area_cfg_r16_c"); - } - - return *this; -} -cell_global_id_list_r16_l& area_cfg_r16_c::set_cell_global_id_list_r16() -{ - set(types::cell_global_id_list_r16); - return c.get(); -} -tac_list_r16_l& area_cfg_r16_c::set_tac_list_r16() -{ - set(types::tac_list_r16); - return c.get(); -} -tracking_area_id_list_r16_l& area_cfg_r16_c::set_tracking_area_id_list_r16() -{ - set(types::tracking_area_id_list_r16); - return c.get(); -} -void area_cfg_r16_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::cell_global_id_list_r16: - j.start_array("cellGlobalIdList-r16"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); - break; - case types::tac_list_r16: - j.start_array("trackingAreaCodeList-r16"); - for (const auto& e1 : c.get()) { - j.write_str(e1.to_string()); - } - j.end_array(); - break; - case types::tracking_area_id_list_r16: - j.start_array("trackingAreaIdentityList-r16"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "area_cfg_r16_c"); - } - j.end_obj(); -} -SRSASN_CODE area_cfg_r16_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cell_global_id_list_r16: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 32)); - break; - case types::tac_list_r16: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); - break; - case types::tracking_area_id_list_r16: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); - break; - default: - log_invalid_choice_id(type_, "area_cfg_r16_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE area_cfg_r16_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cell_global_id_list_r16: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 32)); - break; - case types::tac_list_r16: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); - break; - case types::tracking_area_id_list_r16: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); - break; - default: - log_invalid_choice_id(type_, "area_cfg_r16_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// FilterConfigCLI-r16 ::= SEQUENCE -SRSASN_CODE filt_cfg_cli_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(filt_coef_srs_rsrp_r16_present, 1)); - HANDLE_CODE(bref.pack(filt_coef_cli_rssi_r16_present, 1)); - - if (filt_coef_srs_rsrp_r16_present) { - HANDLE_CODE(filt_coef_srs_rsrp_r16.pack(bref)); - } - if (filt_coef_cli_rssi_r16_present) { - HANDLE_CODE(filt_coef_cli_rssi_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE filt_cfg_cli_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(filt_coef_srs_rsrp_r16_present, 1)); - HANDLE_CODE(bref.unpack(filt_coef_cli_rssi_r16_present, 1)); - - if (filt_coef_srs_rsrp_r16_present) { - HANDLE_CODE(filt_coef_srs_rsrp_r16.unpack(bref)); - } - if (filt_coef_cli_rssi_r16_present) { - HANDLE_CODE(filt_coef_cli_rssi_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void filt_cfg_cli_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (filt_coef_srs_rsrp_r16_present) { - j.write_str("filterCoefficientSRS-RSRP-r16", filt_coef_srs_rsrp_r16.to_string()); - } - if (filt_coef_cli_rssi_r16_present) { - j.write_str("filterCoefficientCLI-RSSI-r16", filt_coef_cli_rssi_r16.to_string()); - } - j.end_obj(); -} - -// FreqPriorityDedicatedSlicing-r17 ::= SEQUENCE -SRSASN_CODE freq_prio_ded_slicing_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(slice_info_list_ded_r17.size() > 0, 1)); - - HANDLE_CODE(pack_integer(bref, dl_explicit_carrier_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); - if (slice_info_list_ded_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, slice_info_list_ded_r17, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE freq_prio_ded_slicing_r17_s::unpack(cbit_ref& bref) -{ - bool slice_info_list_ded_r17_present; - HANDLE_CODE(bref.unpack(slice_info_list_ded_r17_present, 1)); - - HANDLE_CODE(unpack_integer(dl_explicit_carrier_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); - if (slice_info_list_ded_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(slice_info_list_ded_r17, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -void freq_prio_ded_slicing_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("dl-ExplicitCarrierFreq-r17", dl_explicit_carrier_freq_r17); - if (slice_info_list_ded_r17.size() > 0) { - j.start_array("sliceInfoListDedicated-r17"); - for (const auto& e1 : slice_info_list_ded_r17) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// FreqPriorityEUTRA ::= SEQUENCE -SRSASN_CODE freq_prio_eutra_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)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)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE freq_prio_eutra_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)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)); - } - - return SRSASN_SUCCESS; -} -void freq_prio_eutra_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(); -} - -// 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[1] |= ref_fr2_serv_cell_async_ca_r16_present; - group_flags[1] |= mgl_r16_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)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ref_fr2_serv_cell_async_ca_r16_present, 1)); - HANDLE_CODE(bref.pack(mgl_r16_present, 1)); - if (ref_fr2_serv_cell_async_ca_r16_present) { - HANDLE_CODE(pack_integer(bref, ref_fr2_serv_cell_async_ca_r16, (uint8_t)0u, (uint8_t)31u)); - } - if (mgl_r16_present) { - HANDLE_CODE(mgl_r16.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(2); - 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)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(ref_fr2_serv_cell_async_ca_r16_present, 1)); - HANDLE_CODE(bref.unpack(mgl_r16_present, 1)); - if (ref_fr2_serv_cell_async_ca_r16_present) { - HANDLE_CODE(unpack_integer(ref_fr2_serv_cell_async_ca_r16, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (mgl_r16_present) { - HANDLE_CODE(mgl_r16.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()); - } - if (ref_fr2_serv_cell_async_ca_r16_present) { - j.write_int("refFR2ServCellAsyncCA-r16", ref_fr2_serv_cell_async_ca_r16); - } - if (mgl_r16_present) { - j.write_str("mgl-r16", mgl_r16.to_string()); - } - } - j.end_obj(); -} - -const char* gap_cfg_s::mgl_opts::to_string() const -{ - static const char* names[] = {"ms1dot5", "ms3", "ms3dot5", "ms4", "ms5dot5", "ms6"}; - return convert_enum_idx(names, 6, value, "gap_cfg_s::mgl_e_"); -} -float gap_cfg_s::mgl_opts::to_number() const -{ - static const float numbers[] = {1.5, 3.0, 3.5, 4.0, 5.5, 6.0}; - return map_enum_number(numbers, 6, value, "gap_cfg_s::mgl_e_"); -} -const char* gap_cfg_s::mgl_opts::to_number_string() const -{ - static const char* number_strs[] = {"1.5", "3", "3.5", "4", "5.5", "6"}; - return convert_enum_idx(number_strs, 6, value, "gap_cfg_s::mgl_e_"); -} - -const char* gap_cfg_s::mgrp_opts::to_string() const -{ - static const char* names[] = {"ms20", "ms40", "ms80", "ms160"}; - return convert_enum_idx(names, 4, value, "gap_cfg_s::mgrp_e_"); -} -uint8_t gap_cfg_s::mgrp_opts::to_number() const -{ - static const uint8_t numbers[] = {20, 40, 80, 160}; - return map_enum_number(numbers, 4, value, "gap_cfg_s::mgrp_e_"); -} - -const char* gap_cfg_s::mgta_opts::to_string() const -{ - static const char* names[] = {"ms0", "ms0dot25", "ms0dot5"}; - return convert_enum_idx(names, 3, value, "gap_cfg_s::mgta_e_"); -} -float gap_cfg_s::mgta_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.25, 0.5}; - return map_enum_number(numbers, 3, value, "gap_cfg_s::mgta_e_"); -} -const char* gap_cfg_s::mgta_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.25", "0.5"}; - return convert_enum_idx(number_strs, 3, value, "gap_cfg_s::mgta_e_"); -} - -const char* gap_cfg_s::ref_serv_cell_ind_opts::to_string() const -{ - static const char* names[] = {"pCell", "pSCell", "mcg-FR2"}; - return convert_enum_idx(names, 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; -} - -const char* gap_cfg_s::mgl_r16_opts::to_string() const -{ - static const char* names[] = {"ms10", "ms20"}; - return convert_enum_idx(names, 2, value, "gap_cfg_s::mgl_r16_e_"); -} -uint8_t gap_cfg_s::mgl_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {10, 20}; - return map_enum_number(numbers, 2, value, "gap_cfg_s::mgl_r16_e_"); -} - -// GapConfig-r17 ::= SEQUENCE -SRSASN_CODE gap_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ref_serv_cell_ind_r17_present, 1)); - HANDLE_CODE(bref.pack(ref_fr2_serv_cell_async_ca_r17_present, 1)); - HANDLE_CODE(bref.pack(pre_cfg_ind_r17_present, 1)); - HANDLE_CODE(bref.pack(ncsg_ind_r17_present, 1)); - HANDLE_CODE(bref.pack(gap_assoc_prs_r17_present, 1)); - HANDLE_CODE(bref.pack(gap_sharing_r17_present, 1)); - HANDLE_CODE(bref.pack(gap_prio_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, meas_gap_id_r17, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(gap_type_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, gap_offset_r17, (uint8_t)0u, (uint8_t)159u)); - HANDLE_CODE(mgl_r17.pack(bref)); - HANDLE_CODE(mgrp_r17.pack(bref)); - HANDLE_CODE(mgta_r17.pack(bref)); - if (ref_serv_cell_ind_r17_present) { - HANDLE_CODE(ref_serv_cell_ind_r17.pack(bref)); - } - if (ref_fr2_serv_cell_async_ca_r17_present) { - HANDLE_CODE(pack_integer(bref, ref_fr2_serv_cell_async_ca_r17, (uint8_t)0u, (uint8_t)31u)); - } - if (gap_sharing_r17_present) { - HANDLE_CODE(gap_sharing_r17.pack(bref)); - } - if (gap_prio_r17_present) { - HANDLE_CODE(pack_integer(bref, gap_prio_r17, (uint8_t)1u, (uint8_t)16u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE gap_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ref_serv_cell_ind_r17_present, 1)); - HANDLE_CODE(bref.unpack(ref_fr2_serv_cell_async_ca_r17_present, 1)); - HANDLE_CODE(bref.unpack(pre_cfg_ind_r17_present, 1)); - HANDLE_CODE(bref.unpack(ncsg_ind_r17_present, 1)); - HANDLE_CODE(bref.unpack(gap_assoc_prs_r17_present, 1)); - HANDLE_CODE(bref.unpack(gap_sharing_r17_present, 1)); - HANDLE_CODE(bref.unpack(gap_prio_r17_present, 1)); - - HANDLE_CODE(unpack_integer(meas_gap_id_r17, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(gap_type_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(gap_offset_r17, bref, (uint8_t)0u, (uint8_t)159u)); - HANDLE_CODE(mgl_r17.unpack(bref)); - HANDLE_CODE(mgrp_r17.unpack(bref)); - HANDLE_CODE(mgta_r17.unpack(bref)); - if (ref_serv_cell_ind_r17_present) { - HANDLE_CODE(ref_serv_cell_ind_r17.unpack(bref)); - } - if (ref_fr2_serv_cell_async_ca_r17_present) { - HANDLE_CODE(unpack_integer(ref_fr2_serv_cell_async_ca_r17, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (gap_sharing_r17_present) { - HANDLE_CODE(gap_sharing_r17.unpack(bref)); - } - if (gap_prio_r17_present) { - HANDLE_CODE(unpack_integer(gap_prio_r17, bref, (uint8_t)1u, (uint8_t)16u)); - } - - return SRSASN_SUCCESS; -} -void gap_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("measGapId-r17", meas_gap_id_r17); - j.write_str("gapType-r17", gap_type_r17.to_string()); - j.write_int("gapOffset-r17", gap_offset_r17); - j.write_str("mgl-r17", mgl_r17.to_string()); - j.write_str("mgrp-r17", mgrp_r17.to_string()); - j.write_str("mgta-r17", mgta_r17.to_string()); - if (ref_serv_cell_ind_r17_present) { - j.write_str("refServCellIndicator-r17", ref_serv_cell_ind_r17.to_string()); - } - if (ref_fr2_serv_cell_async_ca_r17_present) { - j.write_int("refFR2-ServCellAsyncCA-r17", ref_fr2_serv_cell_async_ca_r17); - } - if (pre_cfg_ind_r17_present) { - j.write_str("preConfigInd-r17", "true"); - } - if (ncsg_ind_r17_present) { - j.write_str("ncsgInd-r17", "true"); - } - if (gap_assoc_prs_r17_present) { - j.write_str("gapAssociationPRS-r17", "true"); - } - if (gap_sharing_r17_present) { - j.write_str("gapSharing-r17", gap_sharing_r17.to_string()); - } - if (gap_prio_r17_present) { - j.write_int("gapPriority-r17", gap_prio_r17); - } - j.end_obj(); -} - -const char* gap_cfg_r17_s::gap_type_r17_opts::to_string() const -{ - static const char* names[] = {"perUE", "perFR1", "perFR2"}; - return convert_enum_idx(names, 3, value, "gap_cfg_r17_s::gap_type_r17_e_"); -} -uint8_t gap_cfg_r17_s::gap_type_r17_opts::to_number() const -{ - switch (value) { - case per_fr1: - return 1; - case per_fr2: - return 2; - default: - invalid_enum_number(value, "gap_cfg_r17_s::gap_type_r17_e_"); - } - return 0; -} - -const char* gap_cfg_r17_s::mgl_r17_opts::to_string() const -{ - static const char* names[] = { - "ms1", "ms1dot5", "ms2", "ms3", "ms3dot5", "ms4", "ms5", "ms5dot5", "ms6", "ms10", "ms20"}; - return convert_enum_idx(names, 11, value, "gap_cfg_r17_s::mgl_r17_e_"); -} -float gap_cfg_r17_s::mgl_r17_opts::to_number() const -{ - static const float numbers[] = {1.0, 1.5, 2.0, 3.0, 3.5, 4.0, 5.0, 5.5, 6.0, 10.0, 20.0}; - return map_enum_number(numbers, 11, value, "gap_cfg_r17_s::mgl_r17_e_"); -} -const char* gap_cfg_r17_s::mgl_r17_opts::to_number_string() const -{ - static const char* number_strs[] = {"1", "1.5", "2", "3", "3.5", "4", "5", "5.5", "6", "10", "20"}; - return convert_enum_idx(number_strs, 11, value, "gap_cfg_r17_s::mgl_r17_e_"); -} - -const char* gap_cfg_r17_s::mgrp_r17_opts::to_string() const -{ - static const char* names[] = {"ms20", "ms40", "ms80", "ms160"}; - return convert_enum_idx(names, 4, value, "gap_cfg_r17_s::mgrp_r17_e_"); -} -uint8_t gap_cfg_r17_s::mgrp_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {20, 40, 80, 160}; - return map_enum_number(numbers, 4, value, "gap_cfg_r17_s::mgrp_r17_e_"); -} - -const char* gap_cfg_r17_s::mgta_r17_opts::to_string() const -{ - static const char* names[] = {"ms0", "ms0dot25", "ms0dot5", "ms0dot75"}; - return convert_enum_idx(names, 4, value, "gap_cfg_r17_s::mgta_r17_e_"); -} -float gap_cfg_r17_s::mgta_r17_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.25, 0.5, 0.75}; - return map_enum_number(numbers, 4, value, "gap_cfg_r17_s::mgta_r17_e_"); -} -const char* gap_cfg_r17_s::mgta_r17_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.25", "0.5", "0.75"}; - return convert_enum_idx(number_strs, 4, value, "gap_cfg_r17_s::mgta_r17_e_"); -} - -const char* gap_cfg_r17_s::ref_serv_cell_ind_r17_opts::to_string() const -{ - static const char* names[] = {"pCell", "pSCell", "mcg-FR2"}; - return convert_enum_idx(names, 3, value, "gap_cfg_r17_s::ref_serv_cell_ind_r17_e_"); -} -uint8_t gap_cfg_r17_s::ref_serv_cell_ind_r17_opts::to_number() const -{ - if (value == mcg_fr2) { - return 2; - } - invalid_enum_number(value, "gap_cfg_r17_s::ref_serv_cell_ind_r17_e_"); - return 0; -} - -// InterFreqTargetInfo-r16 ::= SEQUENCE -SRSASN_CODE inter_freq_target_info_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(cell_list_r16.size() > 0, 1)); - - HANDLE_CODE(pack_integer(bref, dl_carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); - if (cell_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cell_list_r16, 1, 32, integer_packer(0, 1007))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE inter_freq_target_info_r16_s::unpack(cbit_ref& bref) -{ - bool cell_list_r16_present; - HANDLE_CODE(bref.unpack(cell_list_r16_present, 1)); - - HANDLE_CODE(unpack_integer(dl_carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - if (cell_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(cell_list_r16, bref, 1, 32, integer_packer(0, 1007))); - } - - return SRSASN_SUCCESS; -} -void inter_freq_target_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("dl-CarrierFreq-r16", dl_carrier_freq_r16); - if (cell_list_r16.size() > 0) { - j.start_array("cellList-r16"); - for (const auto& e1 : cell_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// 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(); -} - -// MeasIdleConfigDedicated-r16 ::= SEQUENCE -SRSASN_CODE meas_idle_cfg_ded_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_idle_carrier_list_nr_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_idle_carrier_list_eutra_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(validity_area_list_r16.size() > 0, 1)); - - if (meas_idle_carrier_list_nr_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_carrier_list_nr_r16, 1, 8)); - } - if (meas_idle_carrier_list_eutra_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_carrier_list_eutra_r16, 1, 8)); - } - HANDLE_CODE(meas_idle_dur_r16.pack(bref)); - if (validity_area_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, validity_area_list_r16, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_idle_cfg_ded_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool meas_idle_carrier_list_nr_r16_present; - HANDLE_CODE(bref.unpack(meas_idle_carrier_list_nr_r16_present, 1)); - bool meas_idle_carrier_list_eutra_r16_present; - HANDLE_CODE(bref.unpack(meas_idle_carrier_list_eutra_r16_present, 1)); - bool validity_area_list_r16_present; - HANDLE_CODE(bref.unpack(validity_area_list_r16_present, 1)); - - if (meas_idle_carrier_list_nr_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_idle_carrier_list_nr_r16, bref, 1, 8)); - } - if (meas_idle_carrier_list_eutra_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_idle_carrier_list_eutra_r16, bref, 1, 8)); - } - HANDLE_CODE(meas_idle_dur_r16.unpack(bref)); - if (validity_area_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(validity_area_list_r16, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -void meas_idle_cfg_ded_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (meas_idle_carrier_list_nr_r16.size() > 0) { - j.start_array("measIdleCarrierListNR-r16"); - for (const auto& e1 : meas_idle_carrier_list_nr_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_idle_carrier_list_eutra_r16.size() > 0) { - j.start_array("measIdleCarrierListEUTRA-r16"); - for (const auto& e1 : meas_idle_carrier_list_eutra_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.write_str("measIdleDuration-r16", meas_idle_dur_r16.to_string()); - if (validity_area_list_r16.size() > 0) { - j.start_array("validityAreaList-r16"); - for (const auto& e1 : validity_area_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -const char* meas_idle_cfg_ded_r16_s::meas_idle_dur_r16_opts::to_string() const -{ - static const char* names[] = {"sec10", "sec30", "sec60", "sec120", "sec180", "sec240", "sec300", "spare"}; - return convert_enum_idx(names, 8, value, "meas_idle_cfg_ded_r16_s::meas_idle_dur_r16_e_"); -} -uint16_t meas_idle_cfg_ded_r16_s::meas_idle_dur_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {10, 30, 60, 120, 180, 240, 300}; - return map_enum_number(numbers, 7, value, "meas_idle_cfg_ded_r16_s::meas_idle_dur_r16_e_"); -} - -// 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::meas_obj_nr: - c.destroy(); - break; - case types::meas_obj_eutra: - c.destroy(); - break; - case types::meas_obj_utra_fdd_r16: - c.destroy(); - break; - case types::meas_obj_nr_sl_r16: - c.destroy(); - break; - case types::meas_obj_cli_r16: - c.destroy(); - break; - case types::meas_obj_rx_tx_diff_r17: - c.destroy(); - break; - case types::meas_obj_relay_r17: - c.destroy(); - break; - default: - break; - } -} -void meas_obj_to_add_mod_s::meas_obj_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::meas_obj_nr: - c.init(); - break; - case types::meas_obj_eutra: - c.init(); - break; - case types::meas_obj_utra_fdd_r16: - c.init(); - break; - case types::meas_obj_nr_sl_r16: - c.init(); - break; - case types::meas_obj_cli_r16: - c.init(); - break; - case types::meas_obj_rx_tx_diff_r17: - c.init(); - break; - case types::meas_obj_relay_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); - } -} -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::meas_obj_nr: - c.init(other.c.get()); - break; - case types::meas_obj_eutra: - c.init(other.c.get()); - break; - case types::meas_obj_utra_fdd_r16: - c.init(other.c.get()); - break; - case types::meas_obj_nr_sl_r16: - c.init(other.c.get()); - break; - case types::meas_obj_cli_r16: - c.init(other.c.get()); - break; - case types::meas_obj_rx_tx_diff_r17: - c.init(other.c.get()); - break; - case types::meas_obj_relay_r17: - 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_"); - } -} -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::meas_obj_nr: - c.set(other.c.get()); - break; - case types::meas_obj_eutra: - c.set(other.c.get()); - break; - case types::meas_obj_utra_fdd_r16: - c.set(other.c.get()); - break; - case types::meas_obj_nr_sl_r16: - c.set(other.c.get()); - break; - case types::meas_obj_cli_r16: - c.set(other.c.get()); - break; - case types::meas_obj_rx_tx_diff_r17: - c.set(other.c.get()); - break; - case types::meas_obj_relay_r17: - 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_"); - } - - return *this; -} -meas_obj_nr_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_nr() -{ - set(types::meas_obj_nr); - return c.get(); -} -meas_obj_eutra_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_eutra() -{ - set(types::meas_obj_eutra); - return c.get(); -} -meas_obj_utra_fdd_r16_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_utra_fdd_r16() -{ - set(types::meas_obj_utra_fdd_r16); - return c.get(); -} -meas_obj_nr_sl_r16_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_nr_sl_r16() -{ - set(types::meas_obj_nr_sl_r16); - return c.get(); -} -meas_obj_cli_r16_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_cli_r16() -{ - set(types::meas_obj_cli_r16); - return c.get(); -} -meas_obj_rx_tx_diff_r17_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_rx_tx_diff_r17() -{ - set(types::meas_obj_rx_tx_diff_r17); - return c.get(); -} -sl_meas_obj_r16_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_relay_r17() -{ - set(types::meas_obj_relay_r17); - return c.get(); -} -void meas_obj_to_add_mod_s::meas_obj_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); - break; - case types::meas_obj_eutra: - j.write_fieldname("measObjectEUTRA"); - c.get().to_json(j); - break; - case types::meas_obj_utra_fdd_r16: - j.write_fieldname("measObjectUTRA-FDD-r16"); - c.get().to_json(j); - break; - case types::meas_obj_nr_sl_r16: - j.write_fieldname("measObjectNR-SL-r16"); - c.get().to_json(j); - break; - case types::meas_obj_cli_r16: - j.write_fieldname("measObjectCLI-r16"); - c.get().to_json(j); - break; - case types::meas_obj_rx_tx_diff_r17: - j.write_fieldname("measObjectRxTxDiff-r17"); - c.get().to_json(j); - break; - case types::meas_obj_relay_r17: - j.write_fieldname("measObjectRelay-r17"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); - } - j.end_obj(); -} -SRSASN_CODE meas_obj_to_add_mod_s::meas_obj_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - 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; - case types::meas_obj_utra_fdd_r16: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::meas_obj_nr_sl_r16: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::meas_obj_cli_r16: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::meas_obj_rx_tx_diff_r17: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::meas_obj_relay_r17: { - 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_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::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; - case types::meas_obj_utra_fdd_r16: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::meas_obj_nr_sl_r16: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::meas_obj_cli_r16: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::meas_obj_rx_tx_diff_r17: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::meas_obj_relay_r17: { - 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_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// OtherConfig-v1540 ::= SEQUENCE -SRSASN_CODE other_cfg_v1540_s::pack(bit_ref& bref) 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; -} -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 -{ - j.start_obj(); - if (overheat_assist_cfg_present) { - j.write_fieldname("overheatingAssistanceConfig"); - overheat_assist_cfg.to_json(j); - } - j.end_obj(); -} - -// 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) -{ - 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; -} -void quant_cfg_nr_s::to_json(json_writer& j) 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(); -} - -// QuantityConfigUTRA-FDD-r16 ::= SEQUENCE -SRSASN_CODE quant_cfg_utra_fdd_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(filt_coef_rs_cp_r16_present, 1)); - HANDLE_CODE(bref.pack(filt_coef_ec_no_r16_present, 1)); - - if (filt_coef_rs_cp_r16_present) { - HANDLE_CODE(filt_coef_rs_cp_r16.pack(bref)); - } - if (filt_coef_ec_no_r16_present) { - HANDLE_CODE(filt_coef_ec_no_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE quant_cfg_utra_fdd_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(filt_coef_rs_cp_r16_present, 1)); - HANDLE_CODE(bref.unpack(filt_coef_ec_no_r16_present, 1)); - - if (filt_coef_rs_cp_r16_present) { - HANDLE_CODE(filt_coef_rs_cp_r16.unpack(bref)); - } - if (filt_coef_ec_no_r16_present) { - HANDLE_CODE(filt_coef_ec_no_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void quant_cfg_utra_fdd_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (filt_coef_rs_cp_r16_present) { - j.write_str("filterCoefficientRSCP-r16", filt_coef_rs_cp_r16.to_string()); - } - if (filt_coef_ec_no_r16_present) { - j.write_str("filterCoefficientEcNO-r16", filt_coef_ec_no_r16.to_string()); - } - j.end_obj(); -} - -// RRCReconfiguration-v1560-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_v1560_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(mrdc_secondary_cell_group_cfg_present, 1)); - HANDLE_CODE(bref.pack(radio_bearer_cfg2.size() > 0, 1)); - HANDLE_CODE(bref.pack(sk_counter_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (mrdc_secondary_cell_group_cfg_present) { - HANDLE_CODE(mrdc_secondary_cell_group_cfg.pack(bref)); - } - if (radio_bearer_cfg2.size() > 0) { - HANDLE_CODE(radio_bearer_cfg2.pack(bref)); - } - if (sk_counter_present) { - HANDLE_CODE(pack_integer(bref, sk_counter, (uint32_t)0u, (uint32_t)65535u)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_recfg_v1560_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(mrdc_secondary_cell_group_cfg_present, 1)); - bool radio_bearer_cfg2_present; - 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)); - - if (mrdc_secondary_cell_group_cfg_present) { - HANDLE_CODE(mrdc_secondary_cell_group_cfg.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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_recfg_v1560_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (mrdc_secondary_cell_group_cfg_present) { - j.write_fieldname("mrdc-SecondaryCellGroupConfig"); - mrdc_secondary_cell_group_cfg.to_json(j); - } - if (radio_bearer_cfg2.size() > 0) { - 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"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// RRCRelease-v1650-IEs ::= SEQUENCE -SRSASN_CODE rrc_release_v1650_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(mps_prio_ind_r16_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 rrc_release_v1650_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(mps_prio_ind_r16_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 rrc_release_v1650_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (mps_prio_ind_r16_present) { - j.write_str("mpsPriorityIndication-r16", "true"); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// RRCResume-v1700-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sl_cfg_ded_nr_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_l2_remote_ue_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(need_for_gap_ncsg_cfg_nr_r17_present, 1)); - HANDLE_CODE(bref.pack(need_for_gap_ncsg_cfg_eutra_r17_present, 1)); - HANDLE_CODE(bref.pack(scg_state_r17_present, 1)); - HANDLE_CODE(bref.pack(app_layer_meas_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (sl_cfg_ded_nr_r17_present) { - HANDLE_CODE(sl_cfg_ded_nr_r17.pack(bref)); - } - if (sl_l2_remote_ue_cfg_r17_present) { - HANDLE_CODE(sl_l2_remote_ue_cfg_r17.pack(bref)); - } - if (need_for_gap_ncsg_cfg_nr_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_cfg_nr_r17.pack(bref)); - } - if (need_for_gap_ncsg_cfg_eutra_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_cfg_eutra_r17.pack(bref)); - } - if (app_layer_meas_cfg_r17_present) { - HANDLE_CODE(app_layer_meas_cfg_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_v1700_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sl_cfg_ded_nr_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_l2_remote_ue_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(need_for_gap_ncsg_cfg_nr_r17_present, 1)); - HANDLE_CODE(bref.unpack(need_for_gap_ncsg_cfg_eutra_r17_present, 1)); - HANDLE_CODE(bref.unpack(scg_state_r17_present, 1)); - HANDLE_CODE(bref.unpack(app_layer_meas_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (sl_cfg_ded_nr_r17_present) { - HANDLE_CODE(sl_cfg_ded_nr_r17.unpack(bref)); - } - if (sl_l2_remote_ue_cfg_r17_present) { - HANDLE_CODE(sl_l2_remote_ue_cfg_r17.unpack(bref)); - } - if (need_for_gap_ncsg_cfg_nr_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_cfg_nr_r17.unpack(bref)); - } - if (need_for_gap_ncsg_cfg_eutra_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_cfg_eutra_r17.unpack(bref)); - } - if (app_layer_meas_cfg_r17_present) { - HANDLE_CODE(app_layer_meas_cfg_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_resume_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_cfg_ded_nr_r17_present) { - j.write_fieldname("sl-ConfigDedicatedNR-r17"); - sl_cfg_ded_nr_r17.to_json(j); - } - if (sl_l2_remote_ue_cfg_r17_present) { - j.write_fieldname("sl-L2RemoteUE-Config-r17"); - sl_l2_remote_ue_cfg_r17.to_json(j); - } - if (need_for_gap_ncsg_cfg_nr_r17_present) { - j.write_fieldname("needForGapNCSG-ConfigNR-r17"); - need_for_gap_ncsg_cfg_nr_r17.to_json(j); - } - if (need_for_gap_ncsg_cfg_eutra_r17_present) { - j.write_fieldname("needForGapNCSG-ConfigEUTRA-r17"); - need_for_gap_ncsg_cfg_eutra_r17.to_json(j); - } - if (scg_state_r17_present) { - j.write_str("scg-State-r17", "deactivated"); - } - if (app_layer_meas_cfg_r17_present) { - j.write_fieldname("appLayerMeasConfig-r17"); - app_layer_meas_cfg_r17.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// 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::report_cfg_nr: - c.destroy(); - break; - case types::report_cfg_inter_rat: - c.destroy(); - break; - case types::report_cfg_nr_sl_r16: - 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::report_cfg_nr_sl_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); - } -} -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::report_cfg_nr_sl_r16: - 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_"); - } -} -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::report_cfg_nr: - c.set(other.c.get()); - break; - case types::report_cfg_inter_rat: - c.set(other.c.get()); - break; - case types::report_cfg_nr_sl_r16: - 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_"); - } - - return *this; -} -report_cfg_nr_s& report_cfg_to_add_mod_s::report_cfg_c_::set_report_cfg_nr() -{ - set(types::report_cfg_nr); - return c.get(); -} -report_cfg_inter_rat_s& report_cfg_to_add_mod_s::report_cfg_c_::set_report_cfg_inter_rat() -{ - set(types::report_cfg_inter_rat); - return c.get(); -} -report_cfg_nr_sl_r16_s& report_cfg_to_add_mod_s::report_cfg_c_::set_report_cfg_nr_sl_r16() -{ - set(types::report_cfg_nr_sl_r16); - return c.get(); -} -void report_cfg_to_add_mod_s::report_cfg_c_::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; - case types::report_cfg_nr_sl_r16: - j.write_fieldname("reportConfigNR-SL-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); - } - j.end_obj(); -} -SRSASN_CODE report_cfg_to_add_mod_s::report_cfg_c_::pack(bit_ref& bref) 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; - case types::report_cfg_nr_sl_r16: { - 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; -} -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::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; - case types::report_cfg_nr_sl_r16: { - 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; -} - -// AreaConfiguration-v1700 ::= SEQUENCE -SRSASN_CODE area_cfg_v1700_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(area_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(inter_freq_target_list_r17.size() > 0, 1)); - - if (area_cfg_r17_present) { - HANDLE_CODE(area_cfg_r17.pack(bref)); - } - if (inter_freq_target_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_target_list_r17, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE area_cfg_v1700_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(area_cfg_r17_present, 1)); - bool inter_freq_target_list_r17_present; - HANDLE_CODE(bref.unpack(inter_freq_target_list_r17_present, 1)); - - if (area_cfg_r17_present) { - HANDLE_CODE(area_cfg_r17.unpack(bref)); - } - if (inter_freq_target_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(inter_freq_target_list_r17, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -void area_cfg_v1700_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (area_cfg_r17_present) { - j.write_fieldname("areaConfig-r17"); - area_cfg_r17.to_json(j); - } - if (inter_freq_target_list_r17.size() > 0) { - j.start_array("interFreqTargetList-r17"); - for (const auto& e1 : inter_freq_target_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// CarrierInfoNR ::= SEQUENCE -SRSASN_CODE carrier_info_nr_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(smtc_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)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE carrier_info_nr_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(smtc_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)); - } - - return SRSASN_SUCCESS; -} -void carrier_info_nr_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.end_obj(); -} - -// DLInformationTransfer-v1700-IEs ::= SEQUENCE -SRSASN_CODE dl_info_transfer_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ded_info_f1c_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(rx_tx_time_diff_gnb_r17_present, 1)); - HANDLE_CODE(bref.pack(ta_pdc_r17_present, 1)); - HANDLE_CODE(bref.pack(sib9_fallback_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ded_info_f1c_r17.size() > 0) { - HANDLE_CODE(ded_info_f1c_r17.pack(bref)); - } - if (rx_tx_time_diff_gnb_r17_present) { - HANDLE_CODE(rx_tx_time_diff_gnb_r17.pack(bref)); - } - if (ta_pdc_r17_present) { - HANDLE_CODE(ta_pdc_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_info_transfer_v1700_ies_s::unpack(cbit_ref& bref) -{ - bool ded_info_f1c_r17_present; - HANDLE_CODE(bref.unpack(ded_info_f1c_r17_present, 1)); - HANDLE_CODE(bref.unpack(rx_tx_time_diff_gnb_r17_present, 1)); - HANDLE_CODE(bref.unpack(ta_pdc_r17_present, 1)); - HANDLE_CODE(bref.unpack(sib9_fallback_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ded_info_f1c_r17_present) { - HANDLE_CODE(ded_info_f1c_r17.unpack(bref)); - } - if (rx_tx_time_diff_gnb_r17_present) { - HANDLE_CODE(rx_tx_time_diff_gnb_r17.unpack(bref)); - } - if (ta_pdc_r17_present) { - HANDLE_CODE(ta_pdc_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void dl_info_transfer_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ded_info_f1c_r17.size() > 0) { - j.write_str("dedicatedInfoF1c-r17", ded_info_f1c_r17.to_string()); - } - if (rx_tx_time_diff_gnb_r17_present) { - j.write_fieldname("rxTxTimeDiff-gNB-r17"); - rx_tx_time_diff_gnb_r17.to_json(j); - } - if (ta_pdc_r17_present) { - j.write_str("ta-PDC-r17", ta_pdc_r17.to_string()); - } - if (sib9_fallback_r17_present) { - j.write_str("sib9Fallback-r17", "true"); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -const char* dl_info_transfer_v1700_ies_s::ta_pdc_r17_opts::to_string() const -{ - static const char* names[] = {"activate", "deactivate"}; - return convert_enum_idx(names, 2, value, "dl_info_transfer_v1700_ies_s::ta_pdc_r17_e_"); -} - -// 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) -{ - 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; -} -void drb_count_msb_info_s::to_json(json_writer& j) 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(); -} - -// EventType-r16 ::= CHOICE -void event_type_r16_c::set(types::options e) -{ - type_ = e; -} -void event_type_r16_c::set_out_of_coverage() -{ - set(types::out_of_coverage); -} -event_type_r16_c::event_l1_s_& event_type_r16_c::set_event_l1() -{ - set(types::event_l1); - return c; -} -void event_type_r16_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::out_of_coverage: - break; - case types::event_l1: - j.write_fieldname("eventL1"); - j.start_obj(); - j.write_fieldname("l1-Threshold"); - c.l1_thres.to_json(j); - j.write_int("hysteresis", c.hysteresis); - j.write_str("timeToTrigger", c.time_to_trigger.to_string()); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "event_type_r16_c"); - } - j.end_obj(); -} -SRSASN_CODE event_type_r16_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::out_of_coverage: - break; - case types::event_l1: - HANDLE_CODE(c.l1_thres.pack(bref)); - HANDLE_CODE(pack_integer(bref, c.hysteresis, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.time_to_trigger.pack(bref)); - break; - default: - log_invalid_choice_id(type_, "event_type_r16_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE event_type_r16_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::out_of_coverage: - break; - case types::event_l1: - HANDLE_CODE(c.l1_thres.unpack(bref)); - HANDLE_CODE(unpack_integer(c.hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); - HANDLE_CODE(c.time_to_trigger.unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "event_type_r16_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// ExtendedPagingCycle-r17 ::= ENUMERATED -const char* extended_paging_cycle_r17_opts::to_string() const -{ - static const char* names[] = {"rf256", "rf512", "rf1024", "spare1"}; - return convert_enum_idx(names, 4, value, "extended_paging_cycle_r17_e"); -} -uint16_t extended_paging_cycle_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {256, 512, 1024}; - return map_enum_number(numbers, 3, value, "extended_paging_cycle_r17_e"); -} - -// LoggingInterval-r16 ::= ENUMERATED -const char* logging_interv_r16_opts::to_string() const -{ - static const char* names[] = {"ms320", - "ms640", - "ms1280", - "ms2560", - "ms5120", - "ms10240", - "ms20480", - "ms30720", - "ms40960", - "ms61440", - "infinity"}; - return convert_enum_idx(names, 11, value, "logging_interv_r16_e"); -} -int32_t logging_interv_r16_opts::to_number() const -{ - static const int32_t numbers[] = {320, 640, 1280, 2560, 5120, 10240, 20480, 30720, 40960, 61440, -1}; - return map_enum_number(numbers, 11, value, "logging_interv_r16_e"); -} - -// MasterKeyUpdate ::= SEQUENCE -SRSASN_CODE master_key_upd_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(nas_container.size() > 0, 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.size() > 0) { - HANDLE_CODE(nas_container.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE master_key_upd_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool nas_container_present; - HANDLE_CODE(bref.unpack(nas_container_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)); - } - - return SRSASN_SUCCESS; -} -void master_key_upd_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.size() > 0) { - j.write_str("nas-Container", nas_container.to_string()); - } - j.end_obj(); -} - -// MeasGapConfig ::= SEQUENCE -SRSASN_CODE meas_gap_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(gap_fr2_present, 1)); - - 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[1] |= gap_to_add_mod_list_r17.is_present(); - group_flags[1] |= gap_to_release_list_r17.is_present(); - group_flags[1] |= pos_meas_gap_pre_cfg_to_add_mod_list_r17.is_present(); - group_flags[1] |= pos_meas_gap_pre_cfg_to_release_list_r17.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 (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(gap_to_add_mod_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(gap_to_release_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(pos_meas_gap_pre_cfg_to_add_mod_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(pos_meas_gap_pre_cfg_to_release_list_r17.is_present(), 1)); - if (gap_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *gap_to_add_mod_list_r17, 1, 8)); - } - if (gap_to_release_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *gap_to_release_list_r17, 1, 8, integer_packer(1, 8))); - } - if (pos_meas_gap_pre_cfg_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *pos_meas_gap_pre_cfg_to_add_mod_list_r17, 1, 16)); - } - if (pos_meas_gap_pre_cfg_to_release_list_r17.is_present()) { - HANDLE_CODE( - pack_dyn_seq_of(bref, *pos_meas_gap_pre_cfg_to_release_list_r17, 1, 16, integer_packer(1, 16))); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_gap_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(gap_fr2_present, 1)); - - if (gap_fr2_present) { - HANDLE_CODE(gap_fr2.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); - - unpack_presence_flag(gap_fr1, bref); - unpack_presence_flag(gap_ue, bref); - if (gap_fr1.is_present()) { - HANDLE_CODE(gap_fr1->unpack(bref)); - } - if (gap_ue.is_present()) { - HANDLE_CODE(gap_ue->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(gap_to_add_mod_list_r17, bref); - unpack_presence_flag(gap_to_release_list_r17, bref); - unpack_presence_flag(pos_meas_gap_pre_cfg_to_add_mod_list_r17, bref); - unpack_presence_flag(pos_meas_gap_pre_cfg_to_release_list_r17, bref); - if (gap_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*gap_to_add_mod_list_r17, bref, 1, 8)); - } - if (gap_to_release_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*gap_to_release_list_r17, bref, 1, 8, integer_packer(1, 8))); - } - if (pos_meas_gap_pre_cfg_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*pos_meas_gap_pre_cfg_to_add_mod_list_r17, bref, 1, 16)); - } - if (pos_meas_gap_pre_cfg_to_release_list_r17.is_present()) { - HANDLE_CODE( - unpack_dyn_seq_of(*pos_meas_gap_pre_cfg_to_release_list_r17, bref, 1, 16, integer_packer(1, 16))); - } - } - } - return SRSASN_SUCCESS; -} -void meas_gap_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (gap_fr2_present) { - j.write_fieldname("gapFR2"); - gap_fr2.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 (gap_to_add_mod_list_r17.is_present()) { - j.start_array("gapToAddModList-r17"); - for (const auto& e1 : *gap_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (gap_to_release_list_r17.is_present()) { - j.start_array("gapToReleaseList-r17"); - for (const auto& e1 : *gap_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (pos_meas_gap_pre_cfg_to_add_mod_list_r17.is_present()) { - j.start_array("posMeasGapPreConfigToAddModList-r17"); - for (const auto& e1 : *pos_meas_gap_pre_cfg_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (pos_meas_gap_pre_cfg_to_release_list_r17.is_present()) { - j.start_array("posMeasGapPreConfigToReleaseList-r17"); - for (const auto& e1 : *pos_meas_gap_pre_cfg_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - } - j.end_obj(); -} - -// MeasGapSharingConfig ::= SEQUENCE -SRSASN_CODE meas_gap_sharing_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - 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 meas_gap_sharing_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - 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); - - unpack_presence_flag(gap_sharing_fr1, bref); - unpack_presence_flag(gap_sharing_ue, bref); - 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 meas_gap_sharing_cfg_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); - } - 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_obj(); -} - -// OtherConfig ::= SEQUENCE -SRSASN_CODE other_cfg_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(delay_budget_report_cfg_present, 1)); - - if (delay_budget_report_cfg_present) { - HANDLE_CODE(delay_budget_report_cfg.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE other_cfg_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(delay_budget_report_cfg_present, 1)); - - if (delay_budget_report_cfg_present) { - HANDLE_CODE(delay_budget_report_cfg.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void other_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); - } - j.end_obj(); -} - -void other_cfg_s::delay_budget_report_cfg_c_::set(types::options e) -{ - type_ = e; -} -void other_cfg_s::delay_budget_report_cfg_c_::set_release() -{ - set(types::release); -} -other_cfg_s::delay_budget_report_cfg_c_::setup_s_& other_cfg_s::delay_budget_report_cfg_c_::set_setup() -{ - set(types::setup); - return c; -} -void other_cfg_s::delay_budget_report_cfg_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("delayBudgetReportingProhibitTimer", c.delay_budget_report_prohibit_timer.to_string()); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "other_cfg_s::delay_budget_report_cfg_c_"); - } - j.end_obj(); -} -SRSASN_CODE other_cfg_s::delay_budget_report_cfg_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::release: - break; - case types::setup: - HANDLE_CODE(c.delay_budget_report_prohibit_timer.pack(bref)); - break; - default: - log_invalid_choice_id(type_, "other_cfg_s::delay_budget_report_cfg_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE other_cfg_s::delay_budget_report_cfg_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::release: - break; - case types::setup: - HANDLE_CODE(c.delay_budget_report_prohibit_timer.unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "other_cfg_s::delay_budget_report_cfg_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* -other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_opts::to_string() const -{ - static const char* names[] = {"s0", "s0dot4", "s0dot8", "s1dot6", "s3", "s6", "s12", "s30"}; - return convert_enum_idx( - names, 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 numbers[] = {0.0, 0.4, 0.8, 1.6, 3.0, 6.0, 12.0, 30.0}; - return map_enum_number( - numbers, 8, value, "other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_e_"); -} -const char* -other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.4", "0.8", "1.6", "3", "6", "12", "30"}; - return convert_enum_idx(number_strs, - 8, - value, - "other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_e_"); -} - -// PeriodicRNAU-TimerValue ::= ENUMERATED -const char* periodic_rnau_timer_value_opts::to_string() const -{ - static const char* names[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min360", "min720"}; - return convert_enum_idx(names, 8, value, "periodic_rnau_timer_value_e"); -} -uint16_t periodic_rnau_timer_value_opts::to_number() const -{ - static const uint16_t numbers[] = {5, 10, 20, 30, 60, 120, 360, 720}; - return map_enum_number(numbers, 8, value, "periodic_rnau_timer_value_e"); -} - -// QuantityConfig ::= SEQUENCE -SRSASN_CODE quant_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(quant_cfg_nr_list.size() > 0, 1)); - - if (quant_cfg_nr_list.size() > 0) { - 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[1] |= quant_cfg_utra_fdd_r16.is_present(); - group_flags[1] |= quant_cfg_cli_r16.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)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(quant_cfg_utra_fdd_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(quant_cfg_cli_r16.is_present(), 1)); - if (quant_cfg_utra_fdd_r16.is_present()) { - HANDLE_CODE(quant_cfg_utra_fdd_r16->pack(bref)); - } - if (quant_cfg_cli_r16.is_present()) { - HANDLE_CODE(quant_cfg_cli_r16->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE quant_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool quant_cfg_nr_list_present; - 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(2); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(quant_cfg_eutra, bref); - if (quant_cfg_eutra.is_present()) { - HANDLE_CODE(quant_cfg_eutra->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(quant_cfg_utra_fdd_r16, bref); - unpack_presence_flag(quant_cfg_cli_r16, bref); - if (quant_cfg_utra_fdd_r16.is_present()) { - HANDLE_CODE(quant_cfg_utra_fdd_r16->unpack(bref)); - } - if (quant_cfg_cli_r16.is_present()) { - HANDLE_CODE(quant_cfg_cli_r16->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void quant_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (quant_cfg_nr_list.size() > 0) { - 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); - } - if (quant_cfg_utra_fdd_r16.is_present()) { - j.write_fieldname("quantityConfigUTRA-FDD-r16"); - quant_cfg_utra_fdd_r16->to_json(j); - } - if (quant_cfg_cli_r16.is_present()) { - j.write_fieldname("quantityConfigCLI-r16"); - quant_cfg_cli_r16->to_json(j); - } - } - j.end_obj(); -} - -// RAN-NotificationAreaInfo ::= CHOICE -void ran_notif_area_info_c::destroy_() -{ - switch (type_) { - case types::cell_list: - c.destroy(); - break; - case types::ran_area_cfg_list: - c.destroy(); - break; - default: - break; - } -} -void ran_notif_area_info_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) -{ - type_ = other.type(); - switch (type_) { - case types::cell_list: - c.init(other.c.get()); - break; - case types::ran_area_cfg_list: - c.init(other.c.get()); - 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::operator=(const ran_notif_area_info_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::cell_list: - c.set(other.c.get()); - break; - case types::ran_area_cfg_list: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ran_notif_area_info_c"); - } - - return *this; -} -plmn_ran_area_cell_list_l& ran_notif_area_info_c::set_cell_list() -{ - set(types::cell_list); - return c.get(); -} -plmn_ran_area_cfg_list_l& ran_notif_area_info_c::set_ran_area_cfg_list() -{ - set(types::ran_area_cfg_list); - return c.get(); -} -void ran_notif_area_info_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(); - 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(); - break; - default: - log_invalid_choice_id(type_, "ran_notif_area_info_c"); - } - j.end_obj(); -} -SRSASN_CODE ran_notif_area_info_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)); - break; - case types::ran_area_cfg_list: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); - break; - default: - log_invalid_choice_id(type_, "ran_notif_area_info_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ran_notif_area_info_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)); - break; - case types::ran_area_cfg_list: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); - break; - default: - log_invalid_choice_id(type_, "ran_notif_area_info_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.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 (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - 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 (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// RRCRelease-v1610-IEs ::= SEQUENCE -SRSASN_CODE rrc_release_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(voice_fallback_ind_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_idle_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (meas_idle_cfg_r16_present) { - HANDLE_CODE(meas_idle_cfg_r16.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_release_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(voice_fallback_ind_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_idle_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (meas_idle_cfg_r16_present) { - HANDLE_CODE(meas_idle_cfg_r16.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_release_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (voice_fallback_ind_r16_present) { - j.write_str("voiceFallbackIndication-r16", "true"); - } - if (meas_idle_cfg_r16_present) { - j.write_fieldname("measIdleConfig-r16"); - meas_idle_cfg_r16.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// RRCResume-v1610-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(idle_mode_meas_req_r16_present, 1)); - HANDLE_CODE(bref.pack(restore_mcg_scells_r16_present, 1)); - HANDLE_CODE(bref.pack(restore_scg_r16_present, 1)); - HANDLE_CODE(bref.pack(mrdc_secondary_cell_group_r16_present, 1)); - HANDLE_CODE(bref.pack(need_for_gaps_cfg_nr_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (mrdc_secondary_cell_group_r16_present) { - HANDLE_CODE(mrdc_secondary_cell_group_r16.pack(bref)); - } - if (need_for_gaps_cfg_nr_r16_present) { - HANDLE_CODE(need_for_gaps_cfg_nr_r16.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(idle_mode_meas_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(restore_mcg_scells_r16_present, 1)); - HANDLE_CODE(bref.unpack(restore_scg_r16_present, 1)); - HANDLE_CODE(bref.unpack(mrdc_secondary_cell_group_r16_present, 1)); - HANDLE_CODE(bref.unpack(need_for_gaps_cfg_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (mrdc_secondary_cell_group_r16_present) { - HANDLE_CODE(mrdc_secondary_cell_group_r16.unpack(bref)); - } - if (need_for_gaps_cfg_nr_r16_present) { - HANDLE_CODE(need_for_gaps_cfg_nr_r16.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_resume_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (idle_mode_meas_req_r16_present) { - j.write_str("idleModeMeasurementReq-r16", "true"); - } - if (restore_mcg_scells_r16_present) { - j.write_str("restoreMCG-SCells-r16", "true"); - } - if (restore_scg_r16_present) { - j.write_str("restoreSCG-r16", "true"); - } - if (mrdc_secondary_cell_group_r16_present) { - j.write_fieldname("mrdc-SecondaryCellGroup-r16"); - mrdc_secondary_cell_group_r16.to_json(j); - } - if (need_for_gaps_cfg_nr_r16_present) { - j.write_fieldname("needForGapsConfigNR-r16"); - need_for_gaps_cfg_nr_r16.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -void rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::destroy_() -{ - switch (type_) { - case types::nr_scg_r16: - c.destroy(); - break; - case types::eutra_scg_r16: - c.destroy(); - break; - default: - break; - } -} -void rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::nr_scg_r16: - c.init(); - break; - case types::eutra_scg_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_"); - } -} -rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::mrdc_secondary_cell_group_r16_c_( - const rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::nr_scg_r16: - c.init(other.c.get()); - break; - case types::eutra_scg_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_"); - } -} -rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_& -rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::operator=( - const rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::nr_scg_r16: - c.set(other.c.get()); - break; - case types::eutra_scg_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_"); - } - - return *this; -} -dyn_octstring& rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::set_nr_scg_r16() -{ - set(types::nr_scg_r16); - return c.get(); -} -dyn_octstring& rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::set_eutra_scg_r16() -{ - set(types::eutra_scg_r16); - return c.get(); -} -void rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::nr_scg_r16: - j.write_str("nr-SCG-r16", c.get().to_string()); - break; - case types::eutra_scg_r16: - j.write_str("eutra-SCG-r16", c.get().to_string()); - break; - default: - log_invalid_choice_id(type_, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::nr_scg_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::eutra_scg_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::nr_scg_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::eutra_scg_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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)); - } - - 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)); - } - - 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()); - } - j.end_obj(); -} - -const char* redirected_carrier_info_eutra_s::cn_type_opts::to_string() const -{ - static const char* names[] = {"epc", "fiveGC"}; - return convert_enum_idx(names, 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; - } - invalid_enum_number(value, "redirected_carrier_info_eutra_s::cn_type_e_"); - return 0; -} - -// SDT-Config-r17 ::= SEQUENCE -SRSASN_CODE sdt_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sdt_drb_list_r17_present, 1)); - HANDLE_CODE(bref.pack(sdt_srb2_ind_r17_present, 1)); - HANDLE_CODE(bref.pack(sdt_mac_phy_cg_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(sdt_drb_continue_rohc_r17_present, 1)); - - if (sdt_drb_list_r17_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, sdt_drb_list_r17, 0, 29, integer_packer(1, 32))); - } - if (sdt_mac_phy_cg_cfg_r17_present) { - HANDLE_CODE(sdt_mac_phy_cg_cfg_r17.pack(bref)); - } - if (sdt_drb_continue_rohc_r17_present) { - HANDLE_CODE(sdt_drb_continue_rohc_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sdt_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sdt_drb_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(sdt_srb2_ind_r17_present, 1)); - HANDLE_CODE(bref.unpack(sdt_mac_phy_cg_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(sdt_drb_continue_rohc_r17_present, 1)); - - if (sdt_drb_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sdt_drb_list_r17, bref, 0, 29, integer_packer(1, 32))); - } - if (sdt_mac_phy_cg_cfg_r17_present) { - HANDLE_CODE(sdt_mac_phy_cg_cfg_r17.unpack(bref)); - } - if (sdt_drb_continue_rohc_r17_present) { - HANDLE_CODE(sdt_drb_continue_rohc_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sdt_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sdt_drb_list_r17_present) { - j.start_array("sdt-DRB-List-r17"); - for (const auto& e1 : sdt_drb_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (sdt_srb2_ind_r17_present) { - j.write_str("sdt-SRB2-Indication-r17", "allowed"); - } - if (sdt_mac_phy_cg_cfg_r17_present) { - j.write_fieldname("sdt-MAC-PHY-CG-Config-r17"); - sdt_mac_phy_cg_cfg_r17.to_json(j); - } - if (sdt_drb_continue_rohc_r17_present) { - j.write_str("sdt-DRB-ContinueROHC-r17", sdt_drb_continue_rohc_r17.to_string()); - } - j.end_obj(); -} - -const char* sdt_cfg_r17_s::sdt_drb_continue_rohc_r17_opts::to_string() const -{ - static const char* names[] = {"cell", "rna"}; - return convert_enum_idx(names, 2, value, "sdt_cfg_r17_s::sdt_drb_continue_rohc_r17_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.size() > 0, 1)); - - HANDLE_CODE(rat_type.pack(bref)); - if (cap_request_filt.size() > 0) { - HANDLE_CODE(cap_request_filt.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_cap_rat_request_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool cap_request_filt_present; - 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; -} -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.size() > 0) { - j.write_str("capabilityRequestFilter", cap_request_filt.to_string()); - } - j.end_obj(); -} - -// AreaConfiguration-r16 ::= SEQUENCE -SRSASN_CODE area_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(inter_freq_target_list_r16.size() > 0, 1)); - - HANDLE_CODE(area_cfg_r16.pack(bref)); - if (inter_freq_target_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_target_list_r16, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE area_cfg_r16_s::unpack(cbit_ref& bref) -{ - bool inter_freq_target_list_r16_present; - HANDLE_CODE(bref.unpack(inter_freq_target_list_r16_present, 1)); - - HANDLE_CODE(area_cfg_r16.unpack(bref)); - if (inter_freq_target_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(inter_freq_target_list_r16, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -void area_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("areaConfig-r16"); - area_cfg_r16.to_json(j); - if (inter_freq_target_list_r16.size() > 0) { - j.start_array("interFreqTargetList-r16"); - for (const auto& e1 : inter_freq_target_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(freq_prio_list_nr.size() > 0, 1)); - HANDLE_CODE(bref.pack(t320_present, 1)); - - if (freq_prio_list_eutra.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_eutra, 1, 8)); - } - if (freq_prio_list_nr.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_nr, 1, 8)); - } - if (t320_present) { - HANDLE_CODE(t320.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= freq_prio_list_ded_slicing_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(freq_prio_list_ded_slicing_r17.is_present(), 1)); - if (freq_prio_list_ded_slicing_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *freq_prio_list_ded_slicing_r17, 1, 8)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cell_resel_priorities_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool freq_prio_list_eutra_present; - HANDLE_CODE(bref.unpack(freq_prio_list_eutra_present, 1)); - bool freq_prio_list_nr_present; - 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)); - } - - 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); - - unpack_presence_flag(freq_prio_list_ded_slicing_r17, bref); - if (freq_prio_list_ded_slicing_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*freq_prio_list_ded_slicing_r17, bref, 1, 8)); - } - } - } - return SRSASN_SUCCESS; -} -void cell_resel_priorities_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (freq_prio_list_eutra.size() > 0) { - j.start_array("freqPriorityListEUTRA"); - for (const auto& e1 : freq_prio_list_eutra) { - e1.to_json(j); - } - j.end_array(); - } - if (freq_prio_list_nr.size() > 0) { - j.start_array("freqPriorityListNR"); - for (const auto& e1 : freq_prio_list_nr) { - e1.to_json(j); - } - j.end_array(); - } - if (t320_present) { - j.write_str("t320", t320.to_string()); - } - if (ext) { - if (freq_prio_list_ded_slicing_r17.is_present()) { - j.start_array("freqPriorityListDedicatedSlicing-r17"); - for (const auto& e1 : *freq_prio_list_ded_slicing_r17) { - e1.to_json(j); - } - j.end_array(); - } - } - j.end_obj(); -} - -const char* cell_resel_priorities_s::t320_opts::to_string() const -{ - static const char* names[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min180", "spare1"}; - return convert_enum_idx(names, 8, value, "cell_resel_priorities_s::t320_e_"); -} -uint8_t cell_resel_priorities_s::t320_opts::to_number() const -{ - static const uint8_t numbers[] = {5, 10, 20, 30, 60, 120, 180}; - return map_enum_number(numbers, 7, value, "cell_resel_priorities_s::t320_e_"); -} - -// DLInformationTransfer-v1610-IEs ::= SEQUENCE -SRSASN_CODE dl_info_transfer_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ref_time_info_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ref_time_info_r16_present) { - HANDLE_CODE(ref_time_info_r16.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_info_transfer_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ref_time_info_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ref_time_info_r16_present) { - HANDLE_CODE(ref_time_info_r16.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void dl_info_transfer_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ref_time_info_r16_present) { - j.write_fieldname("referenceTimeInfo-r16"); - ref_time_info_r16.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// LoggedEventTriggerConfig-r16 ::= SEQUENCE -SRSASN_CODE logged_event_trigger_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(event_type_r16.pack(bref)); - HANDLE_CODE(logging_interv_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE logged_event_trigger_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(event_type_r16.unpack(bref)); - HANDLE_CODE(logging_interv_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void logged_event_trigger_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("eventType-r16"); - event_type_r16.to_json(j); - j.write_str("loggingInterval-r16", logging_interv_r16.to_string()); - j.end_obj(); -} - -// LoggedMeasurementConfiguration-v1700-IEs ::= SEQUENCE -SRSASN_CODE logged_meas_cfg_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sig_logged_meas_type_r17_present, 1)); - HANDLE_CODE(bref.pack(early_meas_ind_r17_present, 1)); - HANDLE_CODE(bref.pack(area_cfg_v1700_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (area_cfg_v1700_present) { - HANDLE_CODE(area_cfg_v1700.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE logged_meas_cfg_v1700_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sig_logged_meas_type_r17_present, 1)); - HANDLE_CODE(bref.unpack(early_meas_ind_r17_present, 1)); - HANDLE_CODE(bref.unpack(area_cfg_v1700_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (area_cfg_v1700_present) { - HANDLE_CODE(area_cfg_v1700.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void logged_meas_cfg_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sig_logged_meas_type_r17_present) { - j.write_str("sigLoggedMeasType-r17", "true"); - } - if (early_meas_ind_r17_present) { - j.write_str("earlyMeasIndication-r17", "true"); - } - if (area_cfg_v1700_present) { - j.write_fieldname("areaConfiguration-v1700"); - area_cfg_v1700.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// LoggedPeriodicalReportConfig-r16 ::= SEQUENCE -SRSASN_CODE logged_periodical_report_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(logging_interv_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE logged_periodical_report_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(logging_interv_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void logged_periodical_report_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("loggingInterval-r16", logging_interv_r16.to_string()); - j.end_obj(); -} - -// LoggingDuration-r16 ::= ENUMERATED -const char* logging_dur_r16_opts::to_string() const -{ - static const char* names[] = {"min10", "min20", "min40", "min60", "min90", "min120", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "logging_dur_r16_e"); -} -uint8_t logging_dur_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {10, 20, 40, 60, 90, 120}; - return map_enum_number(numbers, 6, value, "logging_dur_r16_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.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_obj_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(report_cfg_to_rem_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(report_cfg_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_id_to_rem_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_id_to_add_mod_list.size() > 0, 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 (meas_obj_to_rem_list.size() > 0) { - 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_to_add_mod_list, 1, 64)); - } - if (report_cfg_to_rem_list.size() > 0) { - 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, report_cfg_to_add_mod_list, 1, 64)); - } - if (meas_id_to_rem_list.size() > 0) { - 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.size() > 0) { - 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 (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= interfreq_cfg_no_gap_r16_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(interfreq_cfg_no_gap_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool meas_obj_to_rem_list_present; - HANDLE_CODE(bref.unpack(meas_obj_to_rem_list_present, 1)); - bool meas_obj_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(meas_obj_to_add_mod_list_present, 1)); - bool report_cfg_to_rem_list_present; - HANDLE_CODE(bref.unpack(report_cfg_to_rem_list_present, 1)); - bool report_cfg_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(report_cfg_to_add_mod_list_present, 1)); - bool meas_id_to_rem_list_present; - HANDLE_CODE(bref.unpack(meas_id_to_rem_list_present, 1)); - bool meas_id_to_add_mod_list_present; - 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 (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 (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(interfreq_cfg_no_gap_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void meas_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (meas_obj_to_rem_list.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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 (ext) { - if (interfreq_cfg_no_gap_r16_present) { - j.write_str("interFrequencyConfig-NoGap-r16", "true"); - } - } - j.end_obj(); -} - -void meas_cfg_s::s_measure_cfg_c_::destroy_() {} -void meas_cfg_s::s_measure_cfg_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -meas_cfg_s::s_measure_cfg_c_::s_measure_cfg_c_(const meas_cfg_s::s_measure_cfg_c_& other) -{ - 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_"); - } -} -meas_cfg_s::s_measure_cfg_c_& meas_cfg_s::s_measure_cfg_c_::operator=(const meas_cfg_s::s_measure_cfg_c_& other) -{ - 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_"); - } - - return *this; -} -uint8_t& meas_cfg_s::s_measure_cfg_c_::set_ssb_rsrp() -{ - set(types::ssb_rsrp); - return c.get(); -} -uint8_t& meas_cfg_s::s_measure_cfg_c_::set_csi_rsrp() -{ - set(types::csi_rsrp); - return c.get(); -} -void meas_cfg_s::s_measure_cfg_c_::to_json(json_writer& j) const -{ - 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(); -} -SRSASN_CODE meas_cfg_s::s_measure_cfg_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)); - 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; -} -SRSASN_CODE meas_cfg_s::s_measure_cfg_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)); - 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; -} - -// MobilityFromNRCommand-v1610-IEs ::= SEQUENCE -SRSASN_CODE mob_from_nr_cmd_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(voice_fallback_ind_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mob_from_nr_cmd_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(voice_fallback_ind_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - return SRSASN_SUCCESS; -} -void mob_from_nr_cmd_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (voice_fallback_ind_r16_present) { - j.write_str("voiceFallbackIndication-r16", "true"); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// RRCReconfiguration-v1530-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_v1530_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(master_cell_group.size() > 0, 1)); - HANDLE_CODE(bref.pack(full_cfg_present, 1)); - HANDLE_CODE(bref.pack(ded_nas_msg_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(master_key_upd_present, 1)); - HANDLE_CODE(bref.pack(ded_sib1_delivery.size() > 0, 1)); - HANDLE_CODE(bref.pack(ded_sys_info_delivery.size() > 0, 1)); - HANDLE_CODE(bref.pack(other_cfg_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (master_cell_group.size() > 0) { - HANDLE_CODE(master_cell_group.pack(bref)); - } - if (ded_nas_msg_list.size() > 0) { - 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.size() > 0) { - HANDLE_CODE(ded_sib1_delivery.pack(bref)); - } - if (ded_sys_info_delivery.size() > 0) { - 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 rrc_recfg_v1530_ies_s::unpack(cbit_ref& bref) -{ - bool master_cell_group_present; - HANDLE_CODE(bref.unpack(master_cell_group_present, 1)); - HANDLE_CODE(bref.unpack(full_cfg_present, 1)); - bool ded_nas_msg_list_present; - HANDLE_CODE(bref.unpack(ded_nas_msg_list_present, 1)); - HANDLE_CODE(bref.unpack(master_key_upd_present, 1)); - bool ded_sib1_delivery_present; - HANDLE_CODE(bref.unpack(ded_sib1_delivery_present, 1)); - bool ded_sys_info_delivery_present; - 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)); - } - 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 rrc_recfg_v1530_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (master_cell_group.size() > 0) { - j.write_str("masterCellGroup", master_cell_group.to_string()); - } - if (full_cfg_present) { - j.write_str("fullConfig", "true"); - } - if (ded_nas_msg_list.size() > 0) { - 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.size() > 0) { - j.write_str("dedicatedSIB1-Delivery", ded_sib1_delivery.to_string()); - } - if (ded_sys_info_delivery.size() > 0) { - 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(); -} - -// RRCReestablishment-v1700-IEs ::= SEQUENCE -SRSASN_CODE rrc_reest_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sl_l2_remote_ue_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (sl_l2_remote_ue_cfg_r17_present) { - HANDLE_CODE(sl_l2_remote_ue_cfg_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_reest_v1700_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sl_l2_remote_ue_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (sl_l2_remote_ue_cfg_r17_present) { - HANDLE_CODE(sl_l2_remote_ue_cfg_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_reest_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_l2_remote_ue_cfg_r17_present) { - j.write_fieldname("sl-L2RemoteUE-Config-r17"); - sl_l2_remote_ue_cfg_r17.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// RRCRelease-v1540-IEs ::= SEQUENCE -SRSASN_CODE rrc_release_v1540_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(wait_time_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 (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_release_v1540_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(wait_time_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 (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_release_v1540_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (wait_time_present) { - j.write_int("waitTime", wait_time); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// RRCResume-v1560-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_v1560_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(radio_bearer_cfg2.size() > 0, 1)); - HANDLE_CODE(bref.pack(sk_counter_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (radio_bearer_cfg2.size() > 0) { - HANDLE_CODE(radio_bearer_cfg2.pack(bref)); - } - if (sk_counter_present) { - HANDLE_CODE(pack_integer(bref, sk_counter, (uint32_t)0u, (uint32_t)65535u)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_v1560_ies_s::unpack(cbit_ref& bref) -{ - bool radio_bearer_cfg2_present; - 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)); - - 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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_resume_v1560_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (radio_bearer_cfg2.size() > 0) { - 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"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// RedirectedCarrierInfo ::= CHOICE -void redirected_carrier_info_c::destroy_() -{ - switch (type_) { - case types::nr: - c.destroy(); - break; - case types::eutra: - c.destroy(); - break; - default: - break; - } -} -void redirected_carrier_info_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::nr: - c.init(); - break; - case types::eutra: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "redirected_carrier_info_c"); - } -} -redirected_carrier_info_c::redirected_carrier_info_c(const redirected_carrier_info_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::nr: - c.init(other.c.get()); - break; - case types::eutra: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "redirected_carrier_info_c"); - } -} -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::nr: - c.set(other.c.get()); - break; - case types::eutra: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "redirected_carrier_info_c"); - } - - return *this; -} -carrier_info_nr_s& redirected_carrier_info_c::set_nr() -{ - set(types::nr); - return c.get(); -} -redirected_carrier_info_eutra_s& redirected_carrier_info_c::set_eutra() -{ - set(types::eutra); - return c.get(); -} -void redirected_carrier_info_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::nr: - j.write_fieldname("nr"); - c.get().to_json(j); - break; - case types::eutra: - j.write_fieldname("eutra"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "redirected_carrier_info_c"); - } - j.end_obj(); -} -SRSASN_CODE redirected_carrier_info_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::nr: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::eutra: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "redirected_carrier_info_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE redirected_carrier_info_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::nr: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::eutra: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "redirected_carrier_info_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// SecurityConfigSMC ::= SEQUENCE -SRSASN_CODE security_cfg_smc_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(security_algorithm_cfg.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE security_cfg_smc_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(security_algorithm_cfg.unpack(bref)); - - return SRSASN_SUCCESS; -} -void security_cfg_smc_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 (t380_present) { - HANDLE_CODE(t380.pack(bref)); - } - HANDLE_CODE(pack_integer(bref, next_hop_chaining_count, (uint8_t)0u, (uint8_t)7u)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= sl_ue_id_remote_r17_present; - group_flags[0] |= sdt_cfg_r17.is_present(); - group_flags[0] |= srs_pos_rrc_inactive_r17.is_present(); - group_flags[0] |= ran_extended_paging_cycle_r17_present; - group_flags[1] |= ncd_ssb_red_cap_init_bwp_sdt_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(sl_ue_id_remote_r17_present, 1)); - HANDLE_CODE(bref.pack(sdt_cfg_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(srs_pos_rrc_inactive_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(ran_extended_paging_cycle_r17_present, 1)); - if (sl_ue_id_remote_r17_present) { - HANDLE_CODE(pack_integer(bref, sl_ue_id_remote_r17, (uint32_t)0u, (uint32_t)65535u)); - } - if (sdt_cfg_r17.is_present()) { - HANDLE_CODE(sdt_cfg_r17->pack(bref)); - } - if (srs_pos_rrc_inactive_r17.is_present()) { - HANDLE_CODE(srs_pos_rrc_inactive_r17->pack(bref)); - } - if (ran_extended_paging_cycle_r17_present) { - HANDLE_CODE(ran_extended_paging_cycle_r17.pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ncd_ssb_red_cap_init_bwp_sdt_r17.is_present(), 1)); - if (ncd_ssb_red_cap_init_bwp_sdt_r17.is_present()) { - HANDLE_CODE(ncd_ssb_red_cap_init_bwp_sdt_r17->pack(bref)); - } - } - } - 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 (t380_present) { - HANDLE_CODE(t380.unpack(bref)); - } - HANDLE_CODE(unpack_integer(next_hop_chaining_count, bref, (uint8_t)0u, (uint8_t)7u)); - - 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(sl_ue_id_remote_r17_present, 1)); - unpack_presence_flag(sdt_cfg_r17, bref); - unpack_presence_flag(srs_pos_rrc_inactive_r17, bref); - HANDLE_CODE(bref.unpack(ran_extended_paging_cycle_r17_present, 1)); - if (sl_ue_id_remote_r17_present) { - HANDLE_CODE(unpack_integer(sl_ue_id_remote_r17, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (sdt_cfg_r17.is_present()) { - HANDLE_CODE(sdt_cfg_r17->unpack(bref)); - } - if (srs_pos_rrc_inactive_r17.is_present()) { - HANDLE_CODE(srs_pos_rrc_inactive_r17->unpack(bref)); - } - if (ran_extended_paging_cycle_r17_present) { - HANDLE_CODE(ran_extended_paging_cycle_r17.unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(ncd_ssb_red_cap_init_bwp_sdt_r17, bref); - if (ncd_ssb_red_cap_init_bwp_sdt_r17.is_present()) { - HANDLE_CODE(ncd_ssb_red_cap_init_bwp_sdt_r17->unpack(bref)); - } - } - } - 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 (t380_present) { - j.write_str("t380", t380.to_string()); - } - j.write_int("nextHopChainingCount", next_hop_chaining_count); - if (ext) { - if (sl_ue_id_remote_r17_present) { - j.write_int("sl-UEIdentityRemote-r17", sl_ue_id_remote_r17); - } - if (sdt_cfg_r17.is_present()) { - j.write_fieldname("sdt-Config-r17"); - sdt_cfg_r17->to_json(j); - } - if (srs_pos_rrc_inactive_r17.is_present()) { - j.write_fieldname("srs-PosRRC-Inactive-r17"); - srs_pos_rrc_inactive_r17->to_json(j); - } - if (ran_extended_paging_cycle_r17_present) { - j.write_str("ran-ExtendedPagingCycle-r17", ran_extended_paging_cycle_r17.to_string()); - } - if (ncd_ssb_red_cap_init_bwp_sdt_r17.is_present()) { - j.write_fieldname("ncd-SSB-RedCapInitialBWP-SDT-r17"); - ncd_ssb_red_cap_init_bwp_sdt_r17->to_json(j); - } - } - j.end_obj(); -} - -// UEInformationRequest-v1700-IEs ::= SEQUENCE -SRSASN_CODE ue_info_request_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(success_ho_report_req_r17_present, 1)); - HANDLE_CODE(bref.pack(coarse_location_request_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_info_request_v1700_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(success_ho_report_req_r17_present, 1)); - HANDLE_CODE(bref.unpack(coarse_location_request_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - return SRSASN_SUCCESS; -} -void ue_info_request_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (success_ho_report_req_r17_present) { - j.write_str("successHO-ReportReq-r17", "true"); - } - if (coarse_location_request_r17_present) { - j.write_str("coarseLocationRequest-r17", "true"); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// CounterCheck-IEs ::= SEQUENCE -SRSASN_CODE counter_check_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 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.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE counter_check_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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; -} -void counter_check_ies_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); - } - j.end_array(); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// DLDedicatedMessageSegment-r16-IEs ::= SEQUENCE -SRSASN_CODE dl_ded_msg_segment_r16_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(pack_integer(bref, segment_num_r16, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(rrc_msg_segment_container_r16.pack(bref)); - HANDLE_CODE(rrc_msg_segment_type_r16.pack(bref)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_ded_msg_segment_r16_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(unpack_integer(segment_num_r16, bref, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(rrc_msg_segment_container_r16.unpack(bref)); - HANDLE_CODE(rrc_msg_segment_type_r16.unpack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void dl_ded_msg_segment_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("segmentNumber-r16", segment_num_r16); - j.write_str("rrc-MessageSegmentContainer-r16", rrc_msg_segment_container_r16.to_string()); - j.write_str("rrc-MessageSegmentType-r16", rrc_msg_segment_type_r16.to_string()); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -const char* dl_ded_msg_segment_r16_ies_s::rrc_msg_segment_type_r16_opts::to_string() const -{ - static const char* names[] = {"notLastSegment", "lastSegment"}; - return convert_enum_idx(names, 2, value, "dl_ded_msg_segment_r16_ies_s::rrc_msg_segment_type_r16_e_"); -} - -// DLInformationTransfer-IEs ::= SEQUENCE -SRSASN_CODE dl_info_transfer_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ded_nas_msg.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ded_nas_msg.size() > 0) { - HANDLE_CODE(ded_nas_msg.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - 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 dl_info_transfer_ies_s::unpack(cbit_ref& bref) -{ - bool ded_nas_msg_present; - HANDLE_CODE(bref.unpack(ded_nas_msg_present, 1)); - bool late_non_crit_ext_present; - 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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void dl_info_transfer_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ded_nas_msg.size() > 0) { - j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// DLInformationTransferMRDC-r16-IEs ::= SEQUENCE -SRSASN_CODE dl_info_transfer_mrdc_r16_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(dl_dcch_msg_nr_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(dl_dcch_msg_eutra_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (dl_dcch_msg_nr_r16.size() > 0) { - HANDLE_CODE(dl_dcch_msg_nr_r16.pack(bref)); - } - if (dl_dcch_msg_eutra_r16.size() > 0) { - HANDLE_CODE(dl_dcch_msg_eutra_r16.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_info_transfer_mrdc_r16_ies_s::unpack(cbit_ref& bref) -{ - bool dl_dcch_msg_nr_r16_present; - HANDLE_CODE(bref.unpack(dl_dcch_msg_nr_r16_present, 1)); - bool dl_dcch_msg_eutra_r16_present; - HANDLE_CODE(bref.unpack(dl_dcch_msg_eutra_r16_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (dl_dcch_msg_nr_r16_present) { - HANDLE_CODE(dl_dcch_msg_nr_r16.unpack(bref)); - } - if (dl_dcch_msg_eutra_r16_present) { - HANDLE_CODE(dl_dcch_msg_eutra_r16.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void dl_info_transfer_mrdc_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (dl_dcch_msg_nr_r16.size() > 0) { - j.write_str("dl-DCCH-MessageNR-r16", dl_dcch_msg_nr_r16.to_string()); - } - if (dl_dcch_msg_eutra_r16.size() > 0) { - j.write_str("dl-DCCH-MessageEUTRA-r16", dl_dcch_msg_eutra_r16.to_string()); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// LoggedMeasurementConfiguration-r16-IEs ::= SEQUENCE -SRSASN_CODE logged_meas_cfg_r16_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(area_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(plmn_id_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(bt_name_list_r16_present, 1)); - HANDLE_CODE(bref.pack(wlan_name_list_r16_present, 1)); - HANDLE_CODE(bref.pack(sensor_name_list_r16_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(trace_ref_r16.pack(bref)); - HANDLE_CODE(trace_recording_session_ref_r16.pack(bref)); - HANDLE_CODE(tce_id_r16.pack(bref)); - HANDLE_CODE(absolute_time_info_r16.pack(bref)); - if (area_cfg_r16_present) { - HANDLE_CODE(area_cfg_r16.pack(bref)); - } - if (plmn_id_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_r16, 1, 16)); - } - if (bt_name_list_r16_present) { - HANDLE_CODE(bt_name_list_r16.pack(bref)); - } - if (wlan_name_list_r16_present) { - HANDLE_CODE(wlan_name_list_r16.pack(bref)); - } - if (sensor_name_list_r16_present) { - HANDLE_CODE(sensor_name_list_r16.pack(bref)); - } - HANDLE_CODE(logging_dur_r16.pack(bref)); - HANDLE_CODE(report_type.pack(bref)); - if (late_non_crit_ext.size() > 0) { - 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 logged_meas_cfg_r16_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(area_cfg_r16_present, 1)); - bool plmn_id_list_r16_present; - HANDLE_CODE(bref.unpack(plmn_id_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(bt_name_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(wlan_name_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(sensor_name_list_r16_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(trace_ref_r16.unpack(bref)); - HANDLE_CODE(trace_recording_session_ref_r16.unpack(bref)); - HANDLE_CODE(tce_id_r16.unpack(bref)); - HANDLE_CODE(absolute_time_info_r16.unpack(bref)); - if (area_cfg_r16_present) { - HANDLE_CODE(area_cfg_r16.unpack(bref)); - } - if (plmn_id_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_r16, bref, 1, 16)); - } - if (bt_name_list_r16_present) { - HANDLE_CODE(bt_name_list_r16.unpack(bref)); - } - if (wlan_name_list_r16_present) { - HANDLE_CODE(wlan_name_list_r16.unpack(bref)); - } - if (sensor_name_list_r16_present) { - HANDLE_CODE(sensor_name_list_r16.unpack(bref)); - } - HANDLE_CODE(logging_dur_r16.unpack(bref)); - HANDLE_CODE(report_type.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 logged_meas_cfg_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("traceReference-r16"); - trace_ref_r16.to_json(j); - j.write_str("traceRecordingSessionRef-r16", trace_recording_session_ref_r16.to_string()); - j.write_str("tce-Id-r16", tce_id_r16.to_string()); - j.write_str("absoluteTimeInfo-r16", absolute_time_info_r16.to_string()); - if (area_cfg_r16_present) { - j.write_fieldname("areaConfiguration-r16"); - area_cfg_r16.to_json(j); - } - if (plmn_id_list_r16.size() > 0) { - j.start_array("plmn-IdentityList-r16"); - for (const auto& e1 : plmn_id_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (bt_name_list_r16_present) { - j.write_fieldname("bt-NameList-r16"); - bt_name_list_r16.to_json(j); - } - if (wlan_name_list_r16_present) { - j.write_fieldname("wlan-NameList-r16"); - wlan_name_list_r16.to_json(j); - } - if (sensor_name_list_r16_present) { - j.write_fieldname("sensor-NameList-r16"); - sensor_name_list_r16.to_json(j); - } - j.write_str("loggingDuration-r16", logging_dur_r16.to_string()); - j.write_fieldname("reportType"); - report_type.to_json(j); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -void logged_meas_cfg_r16_ies_s::report_type_c_::destroy_() -{ - switch (type_) { - case types::periodical: - c.destroy(); - break; - case types::event_triggered: - c.destroy(); - break; - default: - break; - } -} -void logged_meas_cfg_r16_ies_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::nulltype: - break; - default: - log_invalid_choice_id(type_, "logged_meas_cfg_r16_ies_s::report_type_c_"); - } -} -logged_meas_cfg_r16_ies_s::report_type_c_::report_type_c_(const logged_meas_cfg_r16_ies_s::report_type_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()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "logged_meas_cfg_r16_ies_s::report_type_c_"); - } -} -logged_meas_cfg_r16_ies_s::report_type_c_& -logged_meas_cfg_r16_ies_s::report_type_c_::operator=(const logged_meas_cfg_r16_ies_s::report_type_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()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "logged_meas_cfg_r16_ies_s::report_type_c_"); - } - - return *this; -} -logged_periodical_report_cfg_r16_s& logged_meas_cfg_r16_ies_s::report_type_c_::set_periodical() -{ - set(types::periodical); - return c.get(); -} -logged_event_trigger_cfg_r16_s& logged_meas_cfg_r16_ies_s::report_type_c_::set_event_triggered() -{ - set(types::event_triggered); - return c.get(); -} -void logged_meas_cfg_r16_ies_s::report_type_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); - break; - default: - log_invalid_choice_id(type_, "logged_meas_cfg_r16_ies_s::report_type_c_"); - } - j.end_obj(); -} -SRSASN_CODE logged_meas_cfg_r16_ies_s::report_type_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::periodical: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::event_triggered: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "logged_meas_cfg_r16_ies_s::report_type_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE logged_meas_cfg_r16_ies_s::report_type_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::periodical: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::event_triggered: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "logged_meas_cfg_r16_ies_s::report_type_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// MobilityFromNRCommand-IEs ::= SEQUENCE -SRSASN_CODE mob_from_nr_cmd_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(nas_security_param_from_nr.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 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.size() > 0) { - HANDLE_CODE(nas_security_param_from_nr.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - 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 mob_from_nr_cmd_ies_s::unpack(cbit_ref& bref) -{ - bool nas_security_param_from_nr_present; - HANDLE_CODE(bref.unpack(nas_security_param_from_nr_present, 1)); - bool late_non_crit_ext_present; - 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)); - } - 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 mob_from_nr_cmd_ies_s::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.size() > 0) { - j.write_str("nas-SecurityParamFromNR", nas_security_param_from_nr.to_string()); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -const char* mob_from_nr_cmd_ies_s::target_rat_type_opts::to_string() const -{ - static const char* names[] = {"eutra", "utra-fdd-v1610", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "mob_from_nr_cmd_ies_s::target_rat_type_e_"); -} - -// 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_cfg_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (radio_bearer_cfg_present) { - HANDLE_CODE(radio_bearer_cfg.pack(bref)); - } - if (secondary_cell_group.size() > 0) { - HANDLE_CODE(secondary_cell_group.pack(bref)); - } - if (meas_cfg_present) { - HANDLE_CODE(meas_cfg.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - 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_recfg_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(radio_bearer_cfg_present, 1)); - bool secondary_cell_group_present; - HANDLE_CODE(bref.unpack(secondary_cell_group_present, 1)); - HANDLE_CODE(bref.unpack(meas_cfg_present, 1)); - bool late_non_crit_ext_present; - 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 (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)); - } - - return SRSASN_SUCCESS; -} -void rrc_recfg_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 (secondary_cell_group.size() > 0) { - 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.size() > 0) { - 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.size() > 0, 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.size() > 0) { - 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_reest_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(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.size() > 0) { - 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(); -} - -// 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.size() > 0, 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.size() > 0) { - 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)); - bool late_non_crit_ext_present; - 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.size() > 0) { - 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(); -} - -const char* rrc_release_ies_s::depriorit_req_s_::depriorit_type_opts::to_string() const -{ - static const char* names[] = {"frequency", "nr"}; - return convert_enum_idx(names, 2, value, "rrc_release_ies_s::depriorit_req_s_::depriorit_type_e_"); -} - -const char* rrc_release_ies_s::depriorit_req_s_::depriorit_timer_opts::to_string() const -{ - static const char* names[] = {"min5", "min10", "min15", "min30"}; - return convert_enum_idx(names, 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 numbers[] = {5, 10, 15, 30}; - return map_enum_number(numbers, 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.size() > 0, 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.size() > 0, 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.size() > 0) { - HANDLE_CODE(master_cell_group.pack(bref)); - } - if (meas_cfg_present) { - HANDLE_CODE(meas_cfg.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - 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_resume_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(radio_bearer_cfg_present, 1)); - bool master_cell_group_present; - 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)); - bool late_non_crit_ext_present; - 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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(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.size() > 0) { - 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.size() > 0) { - 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(); -} - -// SecurityModeCommand-IEs ::= SEQUENCE -SRSASN_CODE security_mode_cmd_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(security_cfg_smc.pack(bref)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE security_mode_cmd_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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.size() > 0) { - 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(); -} - -// UECapabilityEnquiry-IEs ::= SEQUENCE -SRSASN_CODE ue_cap_enquiry_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(ue_cap_enquiry_ext.size() > 0, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, ue_cap_rat_request_list, 1, 8)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - if (ue_cap_enquiry_ext.size() > 0) { - HANDLE_CODE(ue_cap_enquiry_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_cap_enquiry_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - bool ue_cap_enquiry_ext_present; - 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 ue_cap_enquiry_ies_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.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (ue_cap_enquiry_ext.size() > 0) { - j.write_str("ue-CapabilityEnquiryExt", ue_cap_enquiry_ext.to_string()); - } - j.end_obj(); -} - -// UEInformationRequest-r16-IEs ::= SEQUENCE -SRSASN_CODE ue_info_request_r16_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(idle_mode_meas_req_r16_present, 1)); - HANDLE_CODE(bref.pack(log_meas_report_req_r16_present, 1)); - HANDLE_CODE(bref.pack(conn_est_fail_report_req_r16_present, 1)); - HANDLE_CODE(bref.pack(ra_report_req_r16_present, 1)); - HANDLE_CODE(bref.pack(rlf_report_req_r16_present, 1)); - HANDLE_CODE(bref.pack(mob_history_report_req_r16_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (late_non_crit_ext.size() > 0) { - 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 ue_info_request_r16_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(idle_mode_meas_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(log_meas_report_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(conn_est_fail_report_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(ra_report_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(rlf_report_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(mob_history_report_req_r16_present, 1)); - bool late_non_crit_ext_present; - 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 ue_info_request_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (idle_mode_meas_req_r16_present) { - j.write_str("idleModeMeasurementReq-r16", "true"); - } - if (log_meas_report_req_r16_present) { - j.write_str("logMeasReportReq-r16", "true"); - } - if (conn_est_fail_report_req_r16_present) { - j.write_str("connEstFailReportReq-r16", "true"); - } - if (ra_report_req_r16_present) { - j.write_str("ra-ReportReq-r16", "true"); - } - if (rlf_report_req_r16_present) { - j.write_str("rlf-ReportReq-r16", "true"); - } - if (mob_history_report_req_r16_present) { - j.write_str("mobilityHistoryReportReq-r16", "true"); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// 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_::set(types::options e) -{ - type_ = e; -} -counter_check_ies_s& counter_check_s::crit_exts_c_::set_counter_check() -{ - set(types::counter_check); - return c; -} -void counter_check_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void counter_check_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::counter_check: - j.write_fieldname("counterCheck"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE counter_check_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::counter_check: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE counter_check_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::counter_check: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// DLDedicatedMessageSegment-r16 ::= SEQUENCE -SRSASN_CODE dl_ded_msg_segment_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_ded_msg_segment_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void dl_ded_msg_segment_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void dl_ded_msg_segment_r16_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -dl_ded_msg_segment_r16_ies_s& dl_ded_msg_segment_r16_s::crit_exts_c_::set_dl_ded_msg_segment_r16() -{ - set(types::dl_ded_msg_segment_r16); - return c; -} -void dl_ded_msg_segment_r16_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void dl_ded_msg_segment_r16_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::dl_ded_msg_segment_r16: - j.write_fieldname("dlDedicatedMessageSegment-r16"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "dl_ded_msg_segment_r16_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE dl_ded_msg_segment_r16_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::dl_ded_msg_segment_r16: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "dl_ded_msg_segment_r16_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_ded_msg_segment_r16_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::dl_ded_msg_segment_r16: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "dl_ded_msg_segment_r16_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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) -{ - HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void dl_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 dl_info_transfer_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -dl_info_transfer_ies_s& dl_info_transfer_s::crit_exts_c_::set_dl_info_transfer() -{ - set(types::dl_info_transfer); - return c; -} -void dl_info_transfer_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void dl_info_transfer_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::dl_info_transfer: - j.write_fieldname("dlInformationTransfer"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE dl_info_transfer_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::dl_info_transfer: - HANDLE_CODE(c.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; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_info_transfer_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::dl_info_transfer: - HANDLE_CODE(c.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; - } - return SRSASN_SUCCESS; -} - -// DLInformationTransferMRDC-r16 ::= SEQUENCE -SRSASN_CODE dl_info_transfer_mrdc_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_info_transfer_mrdc_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void dl_info_transfer_mrdc_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void dl_info_transfer_mrdc_r16_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_& dl_info_transfer_mrdc_r16_s::crit_exts_c_::set_c1() -{ - set(types::c1); - return c; -} -void dl_info_transfer_mrdc_r16_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void dl_info_transfer_mrdc_r16_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_mrdc_r16_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE dl_info_transfer_mrdc_r16_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::c1: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_mrdc_r16_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_info_transfer_mrdc_r16_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_mrdc_r16_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::set(types::options e) -{ - type_ = e; -} -dl_info_transfer_mrdc_r16_ies_s& dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::set_dl_info_transfer_mrdc_r16() -{ - set(types::dl_info_transfer_mrdc_r16); - return c; -} -void dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::set_spare3() -{ - set(types::spare3); -} -void dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::set_spare2() -{ - set(types::spare2); -} -void dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::set_spare1() -{ - set(types::spare1); -} -void dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::dl_info_transfer_mrdc_r16: - j.write_fieldname("dlInformationTransferMRDC-r16"); - c.to_json(j); - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_"); - } - j.end_obj(); -} -SRSASN_CODE dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::dl_info_transfer_mrdc_r16: - HANDLE_CODE(c.pack(bref)); - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::dl_info_transfer_mrdc_r16: - HANDLE_CODE(c.unpack(bref)); - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// LoggedMeasurementConfiguration-r16 ::= SEQUENCE -SRSASN_CODE logged_meas_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE logged_meas_cfg_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void logged_meas_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void logged_meas_cfg_r16_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -logged_meas_cfg_r16_ies_s& logged_meas_cfg_r16_s::crit_exts_c_::set_logged_meas_cfg_r16() -{ - set(types::logged_meas_cfg_r16); - return c; -} -void logged_meas_cfg_r16_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void logged_meas_cfg_r16_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::logged_meas_cfg_r16: - j.write_fieldname("loggedMeasurementConfiguration-r16"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "logged_meas_cfg_r16_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE logged_meas_cfg_r16_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::logged_meas_cfg_r16: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "logged_meas_cfg_r16_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE logged_meas_cfg_r16_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::logged_meas_cfg_r16: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "logged_meas_cfg_r16_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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_::set(types::options e) -{ - type_ = e; -} -mob_from_nr_cmd_ies_s& mob_from_nr_cmd_s::crit_exts_c_::set_mob_from_nr_cmd() -{ - set(types::mob_from_nr_cmd); - return c; -} -void mob_from_nr_cmd_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void mob_from_nr_cmd_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::mob_from_nr_cmd: - j.write_fieldname("mobilityFromNRCommand"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE mob_from_nr_cmd_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::mob_from_nr_cmd: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::mob_from_nr_cmd: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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_::set(types::options e) -{ - type_ = e; -} -rrc_recfg_ies_s& rrc_recfg_s::crit_exts_c_::set_rrc_recfg() -{ - set(types::rrc_recfg); - return c; -} -void rrc_recfg_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void rrc_recfg_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rrc_recfg: - j.write_fieldname("rrcReconfiguration"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE rrc_recfg_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rrc_recfg: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_recfg_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_recfg: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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_::set(types::options e) -{ - type_ = e; -} -rrc_reest_ies_s& rrc_reest_s::crit_exts_c_::set_rrc_reest() -{ - set(types::rrc_reest); - return c; -} -void rrc_reest_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void rrc_reest_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rrc_reest: - j.write_fieldname("rrcReestablishment"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE rrc_reest_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rrc_reest: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - 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.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_release_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_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 rrc_release_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -rrc_release_ies_s& rrc_release_s::crit_exts_c_::set_rrc_release() -{ - set(types::rrc_release); - return c; -} -void rrc_release_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void rrc_release_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rrc_release: - j.write_fieldname("rrcRelease"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE rrc_release_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rrc_release: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_release_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_release: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// RRCResume ::= SEQUENCE -SRSASN_CODE rrc_resume_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_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)); - - 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_::set(types::options e) -{ - type_ = e; -} -rrc_resume_ies_s& rrc_resume_s::crit_exts_c_::set_rrc_resume() -{ - set(types::rrc_resume); - return c; -} -void rrc_resume_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void rrc_resume_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rrc_resume: - j.write_fieldname("rrcResume"); - c.to_json(j); - break; - case types::crit_exts_future: - 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.pack(bref)); - break; - case types::crit_exts_future: - 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.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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_::set(types::options e) -{ - type_ = e; -} -security_mode_cmd_ies_s& security_mode_cmd_s::crit_exts_c_::set_security_mode_cmd() -{ - set(types::security_mode_cmd); - return c; -} -void security_mode_cmd_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -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.to_json(j); - break; - case types::crit_exts_future: - 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.pack(bref)); - break; - case types::crit_exts_future: - break; - 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.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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_::set(types::options e) -{ - type_ = e; -} -ue_cap_enquiry_ies_s& ue_cap_enquiry_s::crit_exts_c_::set_ue_cap_enquiry() -{ - set(types::ue_cap_enquiry); - return c; -} -void ue_cap_enquiry_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void ue_cap_enquiry_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ue_cap_enquiry: - j.write_fieldname("ueCapabilityEnquiry"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - 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.pack(bref)); - break; - case types::crit_exts_future: - break; - 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.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// UEInformationRequest-r16 ::= SEQUENCE -SRSASN_CODE ue_info_request_r16_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_info_request_r16_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_info_request_r16_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(); -} +#include "srsran/asn1/rrc_nr/dl_dcch_msg_ies.h" +using namespace asn1; +using namespace asn1::rrc_nr; -void ue_info_request_r16_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -ue_info_request_r16_ies_s& ue_info_request_r16_s::crit_exts_c_::set_ue_info_request_r16() -{ - set(types::ue_info_request_r16); - return c; -} -void ue_info_request_r16_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void ue_info_request_r16_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ue_info_request_r16: - j.write_fieldname("ueInformationRequest-r16"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_info_request_r16_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE ue_info_request_r16_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ue_info_request_r16: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_info_request_r16_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_info_request_r16_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ue_info_request_r16: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_info_request_r16_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} +/******************************************************************************* + * Struct Methods + ******************************************************************************/ // DL-DCCH-MessageType ::= CHOICE void dl_dcch_msg_type_c::set(types::options e) @@ -17322,208 +79,48 @@ SRSASN_CODE dl_dcch_msg_type_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void dl_dcch_msg_type_c::c1_c_::destroy_() -{ - 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; - case types::dl_ded_msg_segment_r16: - c.destroy(); - break; - case types::ue_info_request_r16: - c.destroy(); - break; - case types::dl_info_transfer_mrdc_r16: - c.destroy(); - break; - case types::logged_meas_cfg_r16: - c.destroy(); - break; - default: - break; - } -} void dl_dcch_msg_type_c::c1_c_::set(types::options e) { - 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::dl_ded_msg_segment_r16: - c.init(); - break; - case types::ue_info_request_r16: - c.init(); - break; - case types::dl_info_transfer_mrdc_r16: - c.init(); - break; - case types::logged_meas_cfg_r16: - c.init(); - 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_"); - } -} -dl_dcch_msg_type_c::c1_c_::c1_c_(const dl_dcch_msg_type_c::c1_c_& other) -{ - 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::dl_ded_msg_segment_r16: - c.init(other.c.get()); - break; - case types::ue_info_request_r16: - c.init(other.c.get()); - break; - case types::dl_info_transfer_mrdc_r16: - c.init(other.c.get()); - break; - case types::logged_meas_cfg_r16: - c.init(other.c.get()); - 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_"); - } -} -dl_dcch_msg_type_c::c1_c_& dl_dcch_msg_type_c::c1_c_::operator=(const dl_dcch_msg_type_c::c1_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::rrc_recfg: - c.set(other.c.get()); + c = rrc_recfg_s{}; break; case types::rrc_resume: - c.set(other.c.get()); + c = rrc_resume_s{}; break; case types::rrc_release: - c.set(other.c.get()); + c = rrc_release_s{}; break; case types::rrc_reest: - c.set(other.c.get()); + c = rrc_reest_s{}; break; case types::security_mode_cmd: - c.set(other.c.get()); + c = security_mode_cmd_s{}; break; case types::dl_info_transfer: - c.set(other.c.get()); + c = dl_info_transfer_s{}; break; case types::ue_cap_enquiry: - c.set(other.c.get()); + c = ue_cap_enquiry_s{}; break; case types::counter_check: - c.set(other.c.get()); + c = counter_check_s{}; break; case types::mob_from_nr_cmd: - c.set(other.c.get()); + c = mob_from_nr_cmd_s{}; break; case types::dl_ded_msg_segment_r16: - c.set(other.c.get()); + c = dl_ded_msg_segment_r16_s{}; break; case types::ue_info_request_r16: - c.set(other.c.get()); + c = ue_info_request_r16_s{}; break; case types::dl_info_transfer_mrdc_r16: - c.set(other.c.get()); + c = dl_info_transfer_mrdc_r16_s{}; break; case types::logged_meas_cfg_r16: - c.set(other.c.get()); + c = logged_meas_cfg_r16_s{}; break; case types::spare3: break; @@ -17536,8 +133,6 @@ dl_dcch_msg_type_c::c1_c_& dl_dcch_msg_type_c::c1_c_::operator=(const dl_dcch_ms default: log_invalid_choice_id(type_, "dl_dcch_msg_type_c::c1_c_"); } - - return *this; } rrc_recfg_s& dl_dcch_msg_type_c::c1_c_::set_rrc_recfg() { @@ -17796,6 +391,38 @@ SRSASN_CODE dl_dcch_msg_type_c::c1_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* dl_dcch_msg_type_c::c1_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcReconfiguration", + "rrcResume", + "rrcRelease", + "rrcReestablishment", + "securityModeCommand", + "dlInformationTransfer", + "ueCapabilityEnquiry", + "counterCheck", + "mobilityFromNRCommand", + "dlDedicatedMessageSegment-r16", + "ueInformationRequest-r16", + "dlInformationTransferMRDC-r16", + "loggedMeasurementConfiguration-r16", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "dl_dcch_msg_type_c::c1_c_::types"); +} + +const char* dl_dcch_msg_type_c::types_opts::to_string() const +{ + static const char* names[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(names, 2, value, "dl_dcch_msg_type_c::types"); +} +uint8_t dl_dcch_msg_type_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "dl_dcch_msg_type_c::types"); +} + // DL-DCCH-Message ::= SEQUENCE SRSASN_CODE dl_dcch_msg_s::pack(bit_ref& bref) const { diff --git a/lib/asn1/rrc_nr/dl_dcch_msg_ies.cpp b/lib/asn1/rrc_nr/dl_dcch_msg_ies.cpp new file mode 100644 index 0000000000..9c7afd2442 --- /dev/null +++ b/lib/asn1/rrc_nr/dl_dcch_msg_ies.cpp @@ -0,0 +1,17456 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/dl_dcch_msg_ies.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// MUSIM-Starting-SFN-AndSubframe-r17 ::= SEQUENCE +SRSASN_CODE mu_si_m_start_sfn_and_sf_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, start_sfn_r17, (uint16_t)0u, (uint16_t)1023u)); + HANDLE_CODE(pack_integer(bref, start_sf_r17, (uint8_t)0u, (uint8_t)9u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mu_si_m_start_sfn_and_sf_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(start_sfn_r17, bref, (uint16_t)0u, (uint16_t)1023u)); + HANDLE_CODE(unpack_integer(start_sf_r17, bref, (uint8_t)0u, (uint8_t)9u)); + + return SRSASN_SUCCESS; +} +void mu_si_m_start_sfn_and_sf_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("starting-SFN-r17", start_sfn_r17); + j.write_int("startingSubframe-r17", start_sf_r17); + j.end_obj(); +} + +// 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)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= slot_cfg_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(slot_cfg_r17.is_present(), 1)); + if (slot_cfg_r17.is_present()) { + HANDLE_CODE(slot_cfg_r17->pack(bref)); + } + } + } + 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)); + + 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); + + unpack_presence_flag(slot_cfg_r17, bref); + if (slot_cfg_r17.is_present()) { + HANDLE_CODE(slot_cfg_r17->unpack(bref)); + } + } + } + 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); + if (ext) { + if (slot_cfg_r17.is_present()) { + j.write_fieldname("slotConfig-r17"); + slot_cfg_r17->to_json(j); + } + } + 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; +} +uint8_t& csi_rs_res_mob_s::slot_cfg_c_::set_ms4() +{ + set(types::ms4); + return c.get(); +} +uint8_t& csi_rs_res_mob_s::slot_cfg_c_::set_ms5() +{ + set(types::ms5); + return c.get(); +} +uint8_t& csi_rs_res_mob_s::slot_cfg_c_::set_ms10() +{ + set(types::ms10); + return c.get(); +} +uint8_t& csi_rs_res_mob_s::slot_cfg_c_::set_ms20() +{ + set(types::ms20); + return c.get(); +} +uint16_t& csi_rs_res_mob_s::slot_cfg_c_::set_ms40() +{ + set(types::ms40); + return c.get(); +} +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.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; +} + +const char* csi_rs_res_mob_s::slot_cfg_c_::types_opts::to_string() const +{ + static const char* names[] = {"ms4", "ms5", "ms10", "ms20", "ms40"}; + return convert_enum_idx(names, 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 numbers[] = {4, 5, 10, 20, 40}; + return map_enum_number(numbers, 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>(); + break; + case types::row2: + c.destroy>(); + break; + default: + 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>(); + break; + case types::row2: + c.init>(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_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) +{ + type_ = other.type(); + switch (type_) { + case types::row1: + c.init(other.c.get>()); + break; + case types::row2: + 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_"); + } +} +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; + } + set(other.type()); + switch (type_) { + case types::row1: + c.set(other.c.get>()); + break; + case types::row2: + 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_"); + } + + return *this; +} +fixed_bitstring<4>& csi_rs_res_mob_s::freq_domain_alloc_c_::set_row1() +{ + set(types::row1); + return c.get>(); +} +fixed_bitstring<12>& csi_rs_res_mob_s::freq_domain_alloc_c_::set_row2() +{ + set(types::row2); + return c.get>(); +} +void csi_rs_res_mob_s::freq_domain_alloc_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::row1: + j.write_str("row1", c.get>().to_string()); + break; + case types::row2: + j.write_str("row2", c.get>().to_string()); + break; + default: + log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_res_mob_s::freq_domain_alloc_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::row1: + HANDLE_CODE(c.get>().pack(bref)); + break; + case types::row2: + HANDLE_CODE(c.get>().pack(bref)); + break; + default: + 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_mob_s::freq_domain_alloc_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::row1: + HANDLE_CODE(c.get>().unpack(bref)); + break; + case types::row2: + HANDLE_CODE(c.get>().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_res_mob_s::freq_domain_alloc_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* csi_rs_res_mob_s::freq_domain_alloc_c_::types_opts::to_string() const +{ + static const char* names[] = {"row1", "row2"}; + return convert_enum_idx(names, 2, value, "csi_rs_res_mob_s::freq_domain_alloc_c_::types"); +} +uint8_t csi_rs_res_mob_s::freq_domain_alloc_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "csi_rs_res_mob_s::freq_domain_alloc_c_::types"); +} + +void csi_rs_res_mob_s::slot_cfg_r17_c_::destroy_() {} +void csi_rs_res_mob_s::slot_cfg_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +csi_rs_res_mob_s::slot_cfg_r17_c_::slot_cfg_r17_c_(const csi_rs_res_mob_s::slot_cfg_r17_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_r17_c_"); + } +} +csi_rs_res_mob_s::slot_cfg_r17_c_& +csi_rs_res_mob_s::slot_cfg_r17_c_::operator=(const csi_rs_res_mob_s::slot_cfg_r17_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_r17_c_"); + } + + return *this; +} +uint16_t& csi_rs_res_mob_s::slot_cfg_r17_c_::set_ms4() +{ + set(types::ms4); + return c.get(); +} +uint16_t& csi_rs_res_mob_s::slot_cfg_r17_c_::set_ms5() +{ + set(types::ms5); + return c.get(); +} +uint16_t& csi_rs_res_mob_s::slot_cfg_r17_c_::set_ms10() +{ + set(types::ms10); + return c.get(); +} +uint16_t& csi_rs_res_mob_s::slot_cfg_r17_c_::set_ms20() +{ + set(types::ms20); + return c.get(); +} +uint16_t& csi_rs_res_mob_s::slot_cfg_r17_c_::set_ms40() +{ + set(types::ms40); + return c.get(); +} +void csi_rs_res_mob_s::slot_cfg_r17_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_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE csi_rs_res_mob_s::slot_cfg_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ms4: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)255u)); + break; + case types::ms5: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + break; + case types::ms10: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + break; + case types::ms20: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); + break; + case types::ms40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE csi_rs_res_mob_s::slot_cfg_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ms4: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)255u)); + break; + case types::ms5: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + case types::ms10: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + break; + case types::ms20: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); + break; + case types::ms40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); + break; + default: + log_invalid_choice_id(type_, "csi_rs_res_mob_s::slot_cfg_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* csi_rs_res_mob_s::slot_cfg_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"ms4", "ms5", "ms10", "ms20", "ms40"}; + return convert_enum_idx(names, 5, value, "csi_rs_res_mob_s::slot_cfg_r17_c_::types"); +} +uint8_t csi_rs_res_mob_s::slot_cfg_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {4, 5, 10, 20, 40}; + return map_enum_number(numbers, 5, value, "csi_rs_res_mob_s::slot_cfg_r17_c_::types"); +} + +// MUSIM-GapInfo-r17 ::= SEQUENCE +SRSASN_CODE mu_si_m_gap_info_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(musim_start_sfn_and_sf_r17_present, 1)); + HANDLE_CODE(bref.pack(musim_gap_len_r17_present, 1)); + HANDLE_CODE(bref.pack(musim_gap_repeat_and_offset_r17_present, 1)); + + if (musim_start_sfn_and_sf_r17_present) { + HANDLE_CODE(musim_start_sfn_and_sf_r17.pack(bref)); + } + if (musim_gap_len_r17_present) { + HANDLE_CODE(musim_gap_len_r17.pack(bref)); + } + if (musim_gap_repeat_and_offset_r17_present) { + HANDLE_CODE(musim_gap_repeat_and_offset_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mu_si_m_gap_info_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(musim_start_sfn_and_sf_r17_present, 1)); + HANDLE_CODE(bref.unpack(musim_gap_len_r17_present, 1)); + HANDLE_CODE(bref.unpack(musim_gap_repeat_and_offset_r17_present, 1)); + + if (musim_start_sfn_and_sf_r17_present) { + HANDLE_CODE(musim_start_sfn_and_sf_r17.unpack(bref)); + } + if (musim_gap_len_r17_present) { + HANDLE_CODE(musim_gap_len_r17.unpack(bref)); + } + if (musim_gap_repeat_and_offset_r17_present) { + HANDLE_CODE(musim_gap_repeat_and_offset_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mu_si_m_gap_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (musim_start_sfn_and_sf_r17_present) { + j.write_fieldname("musim-Starting-SFN-AndSubframe-r17"); + musim_start_sfn_and_sf_r17.to_json(j); + } + if (musim_gap_len_r17_present) { + j.write_str("musim-GapLength-r17", musim_gap_len_r17.to_string()); + } + if (musim_gap_repeat_and_offset_r17_present) { + j.write_fieldname("musim-GapRepetitionAndOffset-r17"); + musim_gap_repeat_and_offset_r17.to_json(j); + } + j.end_obj(); +} + +const char* mu_si_m_gap_info_r17_s::musim_gap_len_r17_opts::to_string() const +{ + static const char* names[] = {"ms3", "ms4", "ms6", "ms10", "ms20"}; + return convert_enum_idx(names, 5, value, "mu_si_m_gap_info_r17_s::musim_gap_len_r17_e_"); +} +uint8_t mu_si_m_gap_info_r17_s::musim_gap_len_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {3, 4, 6, 10, 20}; + return map_enum_number(numbers, 5, value, "mu_si_m_gap_info_r17_s::musim_gap_len_r17_e_"); +} + +void mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::destroy_() {} +void mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::musim_gap_repeat_and_offset_r17_c_( + const mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ms20_r17: + c.init(other.c.get()); + break; + case types::ms40_r17: + c.init(other.c.get()); + break; + case types::ms80_r17: + c.init(other.c.get()); + break; + case types::ms160_r17: + c.init(other.c.get()); + break; + case types::ms320_r17: + c.init(other.c.get()); + break; + case types::ms640_r17: + c.init(other.c.get()); + break; + case types::ms1280_r17: + c.init(other.c.get()); + break; + case types::ms2560_r17: + c.init(other.c.get()); + break; + case types::ms5120_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_"); + } +} +mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_& +mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::operator=( + const mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ms20_r17: + c.set(other.c.get()); + break; + case types::ms40_r17: + c.set(other.c.get()); + break; + case types::ms80_r17: + c.set(other.c.get()); + break; + case types::ms160_r17: + c.set(other.c.get()); + break; + case types::ms320_r17: + c.set(other.c.get()); + break; + case types::ms640_r17: + c.set(other.c.get()); + break; + case types::ms1280_r17: + c.set(other.c.get()); + break; + case types::ms2560_r17: + c.set(other.c.get()); + break; + case types::ms5120_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_"); + } + + return *this; +} +uint8_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms20_r17() +{ + set(types::ms20_r17); + return c.get(); +} +uint8_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms40_r17() +{ + set(types::ms40_r17); + return c.get(); +} +uint8_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms80_r17() +{ + set(types::ms80_r17); + return c.get(); +} +uint8_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms160_r17() +{ + set(types::ms160_r17); + return c.get(); +} +uint16_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms320_r17() +{ + set(types::ms320_r17); + return c.get(); +} +uint16_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms640_r17() +{ + set(types::ms640_r17); + return c.get(); +} +uint16_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms1280_r17() +{ + set(types::ms1280_r17); + return c.get(); +} +uint16_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms2560_r17() +{ + set(types::ms2560_r17); + return c.get(); +} +uint16_t& mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::set_ms5120_r17() +{ + set(types::ms5120_r17); + return c.get(); +} +void mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ms20_r17: + j.write_int("ms20-r17", c.get()); + break; + case types::ms40_r17: + j.write_int("ms40-r17", c.get()); + break; + case types::ms80_r17: + j.write_int("ms80-r17", c.get()); + break; + case types::ms160_r17: + j.write_int("ms160-r17", c.get()); + break; + case types::ms320_r17: + j.write_int("ms320-r17", c.get()); + break; + case types::ms640_r17: + j.write_int("ms640-r17", c.get()); + break; + case types::ms1280_r17: + j.write_int("ms1280-r17", c.get()); + break; + case types::ms2560_r17: + j.write_int("ms2560-r17", c.get()); + break; + case types::ms5120_r17: + j.write_int("ms5120-r17", c.get()); + break; + default: + log_invalid_choice_id(type_, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ms20_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + break; + case types::ms40_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::ms80_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::ms160_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + case types::ms320_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + break; + case types::ms640_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + break; + case types::ms1280_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); + break; + case types::ms2560_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); + break; + case types::ms5120_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); + break; + default: + log_invalid_choice_id(type_, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ms20_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::ms40_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::ms80_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::ms160_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + case types::ms320_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + case types::ms640_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + break; + case types::ms1280_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); + break; + case types::ms2560_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); + break; + case types::ms5120_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); + break; + default: + log_invalid_choice_id(type_, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"ms20-r17", + "ms40-r17", + "ms80-r17", + "ms160-r17", + "ms320-r17", + "ms640-r17", + "ms1280-r17", + "ms2560-r17", + "ms5120-r17"}; + return convert_enum_idx(names, 9, value, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::types"); +} +uint16_t mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {20, 40, 80, 160, 320, 640, 1280, 2560, 5120}; + return map_enum_number(numbers, 9, value, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::types"); +} + +// NeighbourCellInfo-r17 ::= SEQUENCE +SRSASN_CODE neighbour_cell_info_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(epoch_time_r17.pack(bref)); + HANDLE_CODE(ephemeris_info_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE neighbour_cell_info_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(epoch_time_r17.unpack(bref)); + HANDLE_CODE(ephemeris_info_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void neighbour_cell_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("epochTime-r17"); + epoch_time_r17.to_json(j); + j.write_fieldname("ephemerisInfo-r17"); + ephemeris_info_r17.to_json(j); + j.end_obj(); +} + +// RAN-VisibleParameters-r17 ::= SEQUENCE +SRSASN_CODE ran_visible_params_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ran_visible_periodicity_r17_present, 1)); + HANDLE_CODE(bref.pack(nof_buffer_level_entries_r17_present, 1)); + HANDLE_CODE(bref.pack(report_playout_delay_for_media_startup_r17_present, 1)); + + if (ran_visible_periodicity_r17_present) { + HANDLE_CODE(ran_visible_periodicity_r17.pack(bref)); + } + if (nof_buffer_level_entries_r17_present) { + HANDLE_CODE(pack_integer(bref, nof_buffer_level_entries_r17, (uint8_t)1u, (uint8_t)8u)); + } + if (report_playout_delay_for_media_startup_r17_present) { + HANDLE_CODE(bref.pack(report_playout_delay_for_media_startup_r17, 1)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ran_visible_params_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ran_visible_periodicity_r17_present, 1)); + HANDLE_CODE(bref.unpack(nof_buffer_level_entries_r17_present, 1)); + HANDLE_CODE(bref.unpack(report_playout_delay_for_media_startup_r17_present, 1)); + + if (ran_visible_periodicity_r17_present) { + HANDLE_CODE(ran_visible_periodicity_r17.unpack(bref)); + } + if (nof_buffer_level_entries_r17_present) { + HANDLE_CODE(unpack_integer(nof_buffer_level_entries_r17, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (report_playout_delay_for_media_startup_r17_present) { + HANDLE_CODE(bref.unpack(report_playout_delay_for_media_startup_r17, 1)); + } + + return SRSASN_SUCCESS; +} +void ran_visible_params_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ran_visible_periodicity_r17_present) { + j.write_str("ran-VisiblePeriodicity-r17", ran_visible_periodicity_r17.to_string()); + } + if (nof_buffer_level_entries_r17_present) { + j.write_int("numberOfBufferLevelEntries-r17", nof_buffer_level_entries_r17); + } + if (report_playout_delay_for_media_startup_r17_present) { + j.write_bool("reportPlayoutDelayForMediaStartup-r17", report_playout_delay_for_media_startup_r17); + } + j.end_obj(); +} + +const char* ran_visible_params_r17_s::ran_visible_periodicity_r17_opts::to_string() const +{ + static const char* names[] = {"ms120", "ms240", "ms480", "ms640", "ms1024"}; + return convert_enum_idx(names, 5, value, "ran_visible_params_r17_s::ran_visible_periodicity_r17_e_"); +} +uint16_t ran_visible_params_r17_s::ran_visible_periodicity_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {120, 240, 480, 640, 1024}; + return map_enum_number(numbers, 5, value, "ran_visible_params_r17_s::ran_visible_periodicity_r17_e_"); +} + +// RSSI-PeriodicityAndOffset-r16 ::= CHOICE +void rssi_periodicity_and_offset_r16_c::destroy_() {} +void rssi_periodicity_and_offset_r16_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +rssi_periodicity_and_offset_r16_c::rssi_periodicity_and_offset_r16_c(const rssi_periodicity_and_offset_r16_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::sl10: + 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::s1640: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rssi_periodicity_and_offset_r16_c"); + } +} +rssi_periodicity_and_offset_r16_c& +rssi_periodicity_and_offset_r16_c::operator=(const rssi_periodicity_and_offset_r16_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sl10: + 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::s1640: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rssi_periodicity_and_offset_r16_c"); + } + + return *this; +} +uint8_t& rssi_periodicity_and_offset_r16_c::set_sl10() +{ + set(types::sl10); + return c.get(); +} +uint8_t& rssi_periodicity_and_offset_r16_c::set_sl20() +{ + set(types::sl20); + return c.get(); +} +uint8_t& rssi_periodicity_and_offset_r16_c::set_sl40() +{ + set(types::sl40); + return c.get(); +} +uint8_t& rssi_periodicity_and_offset_r16_c::set_sl80() +{ + set(types::sl80); + return c.get(); +} +uint8_t& rssi_periodicity_and_offset_r16_c::set_sl160() +{ + set(types::sl160); + return c.get(); +} +uint16_t& rssi_periodicity_and_offset_r16_c::set_sl320() +{ + set(types::sl320); + return c.get(); +} +uint16_t& rssi_periodicity_and_offset_r16_c::set_s1640() +{ + set(types::s1640); + return c.get(); +} +void rssi_periodicity_and_offset_r16_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sl10: + j.write_int("sl10", 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::s1640: + j.write_int("s1640", c.get()); + break; + default: + log_invalid_choice_id(type_, "rssi_periodicity_and_offset_r16_c"); + } + j.end_obj(); +} +SRSASN_CODE rssi_periodicity_and_offset_r16_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::sl10: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); + 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)); + break; + case types::s1640: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + break; + default: + log_invalid_choice_id(type_, "rssi_periodicity_and_offset_r16_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rssi_periodicity_and_offset_r16_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::sl10: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); + 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::s1640: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + break; + default: + log_invalid_choice_id(type_, "rssi_periodicity_and_offset_r16_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rssi_periodicity_and_offset_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"sl10", "sl20", "sl40", "sl80", "sl160", "sl320", "s1640"}; + return convert_enum_idx(names, 7, value, "rssi_periodicity_and_offset_r16_c::types"); +} +uint16_t rssi_periodicity_and_offset_r16_c::types_opts::to_number() const +{ + static const uint16_t numbers[] = {10, 20, 40, 80, 160, 320, 1640}; + return map_enum_number(numbers, 7, value, "rssi_periodicity_and_offset_r16_c::types"); +} + +// SSB-PositionQCL-Cell-r17 ::= SEQUENCE +SRSASN_CODE ssb_position_qcl_cell_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pci_r17, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(ssb_position_qcl_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ssb_position_qcl_cell_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(ssb_position_qcl_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ssb_position_qcl_cell_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r17", pci_r17); + j.write_str("ssb-PositionQCL-r17", ssb_position_qcl_r17.to_string()); + j.end_obj(); +} + +// SSB-PositionQCL-CellsToAddMod-r16 ::= SEQUENCE +SRSASN_CODE ssb_position_qcl_cells_to_add_mod_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(ssb_position_qcl_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ssb_position_qcl_cells_to_add_mod_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(ssb_position_qcl_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ssb_position_qcl_cells_to_add_mod_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r16", pci_r16); + j.write_str("ssb-PositionQCL-r16", ssb_position_qcl_r16.to_string()); + j.end_obj(); +} + +// BFD-RelaxationReportingConfig-r17 ::= SEQUENCE +SRSASN_CODE bfd_relaxation_report_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bfd_relaxtion_report_prohibit_timer.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE bfd_relaxation_report_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bfd_relaxtion_report_prohibit_timer.unpack(bref)); + + return SRSASN_SUCCESS; +} +void bfd_relaxation_report_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("bfd-RelaxtionReportingProhibitTimer", bfd_relaxtion_report_prohibit_timer.to_string()); + j.end_obj(); +} + +const char* bfd_relaxation_report_cfg_r17_s::bfd_relaxtion_report_prohibit_timer_opts::to_string() const +{ + static const char* names[] = {"s0", + "s0dot5", + "s1", + "s2", + "s5", + "s10", + "s20", + "s30", + "s60", + "s90", + "s120", + "s300", + "s600", + "infinity", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "bfd_relaxation_report_cfg_r17_s::bfd_relaxtion_report_prohibit_timer_e_"); +} +float bfd_relaxation_report_cfg_r17_s::bfd_relaxtion_report_prohibit_timer_opts::to_number() const +{ + static const float numbers[] = {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, -1.0}; + return map_enum_number(numbers, 14, value, "bfd_relaxation_report_cfg_r17_s::bfd_relaxtion_report_prohibit_timer_e_"); +} +const char* bfd_relaxation_report_cfg_r17_s::bfd_relaxtion_report_prohibit_timer_opts::to_number_string() const +{ + static const char* number_strs[] = { + "0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600", "inf"}; + return convert_enum_idx( + number_strs, 16, value, "bfd_relaxation_report_cfg_r17_s::bfd_relaxtion_report_prohibit_timer_e_"); +} + +// CSI-RS-CellMobility ::= SEQUENCE +SRSASN_CODE csi_rs_cell_mob_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(density_present, 1)); + + 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; +} +SRSASN_CODE csi_rs_cell_mob_s::unpack(cbit_ref& bref) +{ + 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)); + } + HANDLE_CODE(unpack_dyn_seq_of(csi_rs_res_list_mob, bref, 1, 96)); + + return SRSASN_SUCCESS; +} +void csi_rs_cell_mob_s::to_json(json_writer& j) const +{ + 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.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(); +} + +const char* csi_rs_cell_mob_s::csi_rs_meas_bw_s_::nrof_prbs_opts::to_string() const +{ + static const char* names[] = {"size24", "size48", "size96", "size192", "size264"}; + return convert_enum_idx(names, 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 numbers[] = {24, 48, 96, 192, 264}; + return map_enum_number(numbers, 5, value, "csi_rs_cell_mob_s::csi_rs_meas_bw_s_::nrof_prbs_e_"); +} + +const char* csi_rs_cell_mob_s::density_opts::to_string() const +{ + static const char* names[] = {"d1", "d3"}; + return convert_enum_idx(names, 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 numbers[] = {1, 3}; + return map_enum_number(numbers, 2, value, "csi_rs_cell_mob_s::density_e_"); +} + +// CondReconfigToAddMod-r16 ::= SEQUENCE +SRSASN_CODE cond_recfg_to_add_mod_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cond_execution_cond_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(cond_rrc_recfg_r16.size() > 0, 1)); + + HANDLE_CODE(pack_integer(bref, cond_recfg_id_r16, (uint8_t)1u, (uint8_t)8u)); + if (cond_execution_cond_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cond_execution_cond_r16, 1, 2, integer_packer(1, 64))); + } + if (cond_rrc_recfg_r16.size() > 0) { + HANDLE_CODE(cond_rrc_recfg_r16.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= cond_execution_cond_scg_r17.size() > 0; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(cond_execution_cond_scg_r17.size() > 0, 1)); + if (cond_execution_cond_scg_r17.size() > 0) { + HANDLE_CODE(cond_execution_cond_scg_r17.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cond_recfg_to_add_mod_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool cond_execution_cond_r16_present; + HANDLE_CODE(bref.unpack(cond_execution_cond_r16_present, 1)); + bool cond_rrc_recfg_r16_present; + HANDLE_CODE(bref.unpack(cond_rrc_recfg_r16_present, 1)); + + HANDLE_CODE(unpack_integer(cond_recfg_id_r16, bref, (uint8_t)1u, (uint8_t)8u)); + if (cond_execution_cond_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(cond_execution_cond_r16, bref, 1, 2, integer_packer(1, 64))); + } + if (cond_rrc_recfg_r16_present) { + HANDLE_CODE(cond_rrc_recfg_r16.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 cond_execution_cond_scg_r17_present; + HANDLE_CODE(bref.unpack(cond_execution_cond_scg_r17_present, 1)); + if (cond_execution_cond_scg_r17_present) { + HANDLE_CODE(cond_execution_cond_scg_r17.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void cond_recfg_to_add_mod_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("condReconfigId-r16", cond_recfg_id_r16); + if (cond_execution_cond_r16.size() > 0) { + j.start_array("condExecutionCond-r16"); + for (const auto& e1 : cond_execution_cond_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (cond_rrc_recfg_r16.size() > 0) { + j.write_str("condRRCReconfig-r16", cond_rrc_recfg_r16.to_string()); + } + if (ext) { + if (cond_execution_cond_scg_r17.size() > 0) { + j.write_str("condExecutionCondSCG-r17", cond_execution_cond_scg_r17.to_string()); + } + } + j.end_obj(); +} + +// ExcessDelay-DRB-IdentityInfo-r17 ::= SEQUENCE +SRSASN_CODE excess_delay_drb_id_info_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, drb_id_list, 1, 29, integer_packer(1, 32))); + HANDLE_CODE(delay_thres.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE excess_delay_drb_id_info_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(drb_id_list, bref, 1, 29, integer_packer(1, 32))); + HANDLE_CODE(delay_thres.unpack(bref)); + + return SRSASN_SUCCESS; +} +void excess_delay_drb_id_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("drb-IdentityList"); + for (const auto& e1 : drb_id_list) { + j.write_int(e1); + } + j.end_array(); + j.write_str("delayThreshold", delay_thres.to_string()); + j.end_obj(); +} + +const char* excess_delay_drb_id_info_r17_s::delay_thres_opts::to_string() const +{ + static const char* names[] = {"ms0dot25", + "ms0dot5", + "ms1", + "ms2", + "ms4", + "ms5", + "ms10", + "ms20", + "ms30", + "ms40", + "ms50", + "ms60", + "ms70", + "ms80", + "ms90", + "ms100", + "ms150", + "ms300", + "ms500"}; + return convert_enum_idx(names, 19, value, "excess_delay_drb_id_info_r17_s::delay_thres_e_"); +} +float excess_delay_drb_id_info_r17_s::delay_thres_opts::to_number() const +{ + static const float numbers[] = { + 0.25, 0.5, 1.0, 2.0, 4.0, 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 150.0, 300.0, 500.0}; + return map_enum_number(numbers, 19, value, "excess_delay_drb_id_info_r17_s::delay_thres_e_"); +} +const char* excess_delay_drb_id_info_r17_s::delay_thres_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.25", + "0.5", + "1", + "2", + "4", + "5", + "10", + "20", + "30", + "40", + "50", + "60", + "70", + "80", + "90", + "100", + "150", + "300", + "500"}; + return convert_enum_idx(number_strs, 19, value, "excess_delay_drb_id_info_r17_s::delay_thres_e_"); +} + +// IAB-IP-Address-r16 ::= CHOICE +void iab_ip_address_r16_c::destroy_() +{ + switch (type_) { + case types::ip_v4_address_r16: + c.destroy>(); + break; + case types::ip_v6_address_r16: + c.destroy>(); + break; + case types::ip_v6_prefix_r16: + c.destroy>(); + break; + default: + break; + } +} +void iab_ip_address_r16_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ip_v4_address_r16: + c.init>(); + break; + case types::ip_v6_address_r16: + c.init>(); + break; + case types::ip_v6_prefix_r16: + c.init>(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "iab_ip_address_r16_c"); + } +} +iab_ip_address_r16_c::iab_ip_address_r16_c(const iab_ip_address_r16_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::ip_v4_address_r16: + c.init(other.c.get>()); + break; + case types::ip_v6_address_r16: + c.init(other.c.get>()); + break; + case types::ip_v6_prefix_r16: + c.init(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "iab_ip_address_r16_c"); + } +} +iab_ip_address_r16_c& iab_ip_address_r16_c::operator=(const iab_ip_address_r16_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ip_v4_address_r16: + c.set(other.c.get>()); + break; + case types::ip_v6_address_r16: + c.set(other.c.get>()); + break; + case types::ip_v6_prefix_r16: + c.set(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "iab_ip_address_r16_c"); + } + + return *this; +} +fixed_bitstring<32>& iab_ip_address_r16_c::set_ip_v4_address_r16() +{ + set(types::ip_v4_address_r16); + return c.get>(); +} +fixed_bitstring<128>& iab_ip_address_r16_c::set_ip_v6_address_r16() +{ + set(types::ip_v6_address_r16); + return c.get>(); +} +fixed_bitstring<64>& iab_ip_address_r16_c::set_ip_v6_prefix_r16() +{ + set(types::ip_v6_prefix_r16); + return c.get>(); +} +void iab_ip_address_r16_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ip_v4_address_r16: + j.write_str("iPv4-Address-r16", c.get>().to_string()); + break; + case types::ip_v6_address_r16: + j.write_str("iPv6-Address-r16", c.get>().to_string()); + break; + case types::ip_v6_prefix_r16: + j.write_str("iPv6-Prefix-r16", c.get>().to_string()); + break; + default: + log_invalid_choice_id(type_, "iab_ip_address_r16_c"); + } + j.end_obj(); +} +SRSASN_CODE iab_ip_address_r16_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ip_v4_address_r16: + HANDLE_CODE(c.get>().pack(bref)); + break; + case types::ip_v6_address_r16: + HANDLE_CODE(c.get>().pack(bref)); + break; + case types::ip_v6_prefix_r16: + HANDLE_CODE(c.get>().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "iab_ip_address_r16_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE iab_ip_address_r16_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ip_v4_address_r16: + HANDLE_CODE(c.get>().unpack(bref)); + break; + case types::ip_v6_address_r16: + HANDLE_CODE(c.get>().unpack(bref)); + break; + case types::ip_v6_prefix_r16: + HANDLE_CODE(c.get>().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "iab_ip_address_r16_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* iab_ip_address_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"iPv4-Address-r16", "iPv6-Address-r16", "iPv6-Prefix-r16"}; + return convert_enum_idx(names, 3, value, "iab_ip_address_r16_c::types"); +} + +// IAB-IP-Usage-r16 ::= ENUMERATED +const char* iab_ip_usage_r16_opts::to_string() const +{ + static const char* names[] = {"f1-C", "f1-U", "non-F1", "spare"}; + return convert_enum_idx(names, 4, value, "iab_ip_usage_r16_e"); +} + +// MUSIM-Gap-r17 ::= SEQUENCE +SRSASN_CODE mu_si_m_gap_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, musim_gap_id_r17, (uint8_t)0u, (uint8_t)2u)); + HANDLE_CODE(musim_gap_info_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mu_si_m_gap_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(musim_gap_id_r17, bref, (uint8_t)0u, (uint8_t)2u)); + HANDLE_CODE(musim_gap_info_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mu_si_m_gap_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("musim-GapId-r17", musim_gap_id_r17); + j.write_fieldname("musim-GapInfo-r17"); + musim_gap_info_r17.to_json(j); + j.end_obj(); +} + +// MUSIM-GapAssistanceConfig-r17 ::= SEQUENCE +SRSASN_CODE mu_si_m_gap_assist_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(musim_gap_prohibit_timer_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mu_si_m_gap_assist_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(musim_gap_prohibit_timer_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mu_si_m_gap_assist_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("musim-GapProhibitTimer-r17", musim_gap_prohibit_timer_r17.to_string()); + j.end_obj(); +} + +const char* mu_si_m_gap_assist_cfg_r17_s::musim_gap_prohibit_timer_r17_opts::to_string() const +{ + static const char* names[] = {"s0", + "s0dot1", + "s0dot2", + "s0dot3", + "s0dot4", + "s0dot5", + "s1", + "s2", + "s3", + "s4", + "s5", + "s6", + "s7", + "s8", + "s9", + "s10"}; + return convert_enum_idx(names, 16, value, "mu_si_m_gap_assist_cfg_r17_s::musim_gap_prohibit_timer_r17_e_"); +} +float mu_si_m_gap_assist_cfg_r17_s::musim_gap_prohibit_timer_r17_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + return map_enum_number(numbers, 16, value, "mu_si_m_gap_assist_cfg_r17_s::musim_gap_prohibit_timer_r17_e_"); +} +const char* mu_si_m_gap_assist_cfg_r17_s::musim_gap_prohibit_timer_r17_opts::to_number_string() const +{ + static const char* number_strs[] = { + "0", "0.1", "0.2", "0.3", "0.4", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; + return convert_enum_idx(number_strs, 16, value, "mu_si_m_gap_assist_cfg_r17_s::musim_gap_prohibit_timer_r17_e_"); +} + +// MUSIM-LeaveAssistanceConfig-r17 ::= SEQUENCE +SRSASN_CODE mu_si_m_leave_assist_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(musim_leave_without_resp_timer_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mu_si_m_leave_assist_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(musim_leave_without_resp_timer_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mu_si_m_leave_assist_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("musim-LeaveWithoutResponseTimer-r17", musim_leave_without_resp_timer_r17.to_string()); + j.end_obj(); +} + +const char* mu_si_m_leave_assist_cfg_r17_s::musim_leave_without_resp_timer_r17_opts::to_string() const +{ + static const char* names[] = {"ms10", "ms20", "ms40", "ms60", "ms80", "ms100", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "mu_si_m_leave_assist_cfg_r17_s::musim_leave_without_resp_timer_r17_e_"); +} +uint8_t mu_si_m_leave_assist_cfg_r17_s::musim_leave_without_resp_timer_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {10, 20, 40, 60, 80, 100}; + return map_enum_number(numbers, 6, value, "mu_si_m_leave_assist_cfg_r17_s::musim_leave_without_resp_timer_r17_e_"); +} + +// MeasConfigAppLayer-r17 ::= SEQUENCE +SRSASN_CODE meas_cfg_app_layer_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_cfg_app_layer_container_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(service_type_r17_present, 1)); + HANDLE_CODE(bref.pack(pause_report_r17_present, 1)); + HANDLE_CODE(bref.pack(tx_of_session_start_stop_r17_present, 1)); + HANDLE_CODE(bref.pack(ran_visible_params_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, meas_cfg_app_layer_id_r17, (uint8_t)0u, (uint8_t)15u)); + if (meas_cfg_app_layer_container_r17.size() > 0) { + HANDLE_CODE(meas_cfg_app_layer_container_r17.pack(bref)); + } + if (service_type_r17_present) { + HANDLE_CODE(service_type_r17.pack(bref)); + } + if (pause_report_r17_present) { + HANDLE_CODE(bref.pack(pause_report_r17, 1)); + } + if (tx_of_session_start_stop_r17_present) { + HANDLE_CODE(bref.pack(tx_of_session_start_stop_r17, 1)); + } + if (ran_visible_params_r17_present) { + HANDLE_CODE(ran_visible_params_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_cfg_app_layer_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool meas_cfg_app_layer_container_r17_present; + HANDLE_CODE(bref.unpack(meas_cfg_app_layer_container_r17_present, 1)); + HANDLE_CODE(bref.unpack(service_type_r17_present, 1)); + HANDLE_CODE(bref.unpack(pause_report_r17_present, 1)); + HANDLE_CODE(bref.unpack(tx_of_session_start_stop_r17_present, 1)); + HANDLE_CODE(bref.unpack(ran_visible_params_r17_present, 1)); + + HANDLE_CODE(unpack_integer(meas_cfg_app_layer_id_r17, bref, (uint8_t)0u, (uint8_t)15u)); + if (meas_cfg_app_layer_container_r17_present) { + HANDLE_CODE(meas_cfg_app_layer_container_r17.unpack(bref)); + } + if (service_type_r17_present) { + HANDLE_CODE(service_type_r17.unpack(bref)); + } + if (pause_report_r17_present) { + HANDLE_CODE(bref.unpack(pause_report_r17, 1)); + } + if (tx_of_session_start_stop_r17_present) { + HANDLE_CODE(bref.unpack(tx_of_session_start_stop_r17, 1)); + } + if (ran_visible_params_r17_present) { + HANDLE_CODE(ran_visible_params_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_cfg_app_layer_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("measConfigAppLayerId-r17", meas_cfg_app_layer_id_r17); + if (meas_cfg_app_layer_container_r17.size() > 0) { + j.write_str("measConfigAppLayerContainer-r17", meas_cfg_app_layer_container_r17.to_string()); + } + if (service_type_r17_present) { + j.write_str("serviceType-r17", service_type_r17.to_string()); + } + if (pause_report_r17_present) { + j.write_bool("pauseReporting-r17", pause_report_r17); + } + if (tx_of_session_start_stop_r17_present) { + j.write_bool("transmissionOfSessionStartStop-r17", tx_of_session_start_stop_r17); + } + if (ran_visible_params_r17_present) { + j.write_fieldname("ran-VisibleParameters-r17"); + ran_visible_params_r17.to_json(j); + } + j.end_obj(); +} + +const char* meas_cfg_app_layer_r17_s::service_type_r17_opts::to_string() const +{ + static const char* names[] = {"streaming", "mtsi", "vr", "spare5", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "meas_cfg_app_layer_r17_s::service_type_r17_e_"); +} + +// PropDelayDiffReportConfig-r17 ::= SEQUENCE +SRSASN_CODE prop_delay_diff_report_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(thresh_prop_delay_diff_r17_present, 1)); + HANDLE_CODE(bref.pack(neigh_cell_info_list_r17.size() > 0, 1)); + + if (thresh_prop_delay_diff_r17_present) { + HANDLE_CODE(thresh_prop_delay_diff_r17.pack(bref)); + } + if (neigh_cell_info_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, neigh_cell_info_list_r17, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE prop_delay_diff_report_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(thresh_prop_delay_diff_r17_present, 1)); + bool neigh_cell_info_list_r17_present; + HANDLE_CODE(bref.unpack(neigh_cell_info_list_r17_present, 1)); + + if (thresh_prop_delay_diff_r17_present) { + HANDLE_CODE(thresh_prop_delay_diff_r17.unpack(bref)); + } + if (neigh_cell_info_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(neigh_cell_info_list_r17, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void prop_delay_diff_report_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (thresh_prop_delay_diff_r17_present) { + j.write_str("threshPropDelayDiff-r17", thresh_prop_delay_diff_r17.to_string()); + } + if (neigh_cell_info_list_r17.size() > 0) { + j.start_array("neighCellInfoList-r17"); + for (const auto& e1 : neigh_cell_info_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +const char* prop_delay_diff_report_cfg_r17_s::thresh_prop_delay_diff_r17_opts::to_string() const +{ + static const char* names[] = {"ms0dot5", + "ms1", + "ms2", + "ms3", + "ms4", + "ms5", + "ms6", + "ms7", + "ms8", + "ms9", + "ms10", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "prop_delay_diff_report_cfg_r17_s::thresh_prop_delay_diff_r17_e_"); +} +float prop_delay_diff_report_cfg_r17_s::thresh_prop_delay_diff_r17_opts::to_number() const +{ + static const float numbers[] = {0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + return map_enum_number(numbers, 11, value, "prop_delay_diff_report_cfg_r17_s::thresh_prop_delay_diff_r17_e_"); +} +const char* prop_delay_diff_report_cfg_r17_s::thresh_prop_delay_diff_r17_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; + return convert_enum_idx(number_strs, 16, value, "prop_delay_diff_report_cfg_r17_s::thresh_prop_delay_diff_r17_e_"); +} + +// Q-OffsetRangeList ::= SEQUENCE +SRSASN_CODE q_offset_range_list_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)); + + 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; +} +SRSASN_CODE q_offset_range_list_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)); + + 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(); +} + +// RLM-RelaxationReportingConfig-r17 ::= SEQUENCE +SRSASN_CODE rlm_relaxation_report_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(rlm_relaxtion_report_prohibit_timer.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rlm_relaxation_report_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(rlm_relaxtion_report_prohibit_timer.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rlm_relaxation_report_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("rlm-RelaxtionReportingProhibitTimer", rlm_relaxtion_report_prohibit_timer.to_string()); + j.end_obj(); +} + +const char* rlm_relaxation_report_cfg_r17_s::rlm_relaxtion_report_prohibit_timer_opts::to_string() const +{ + static const char* names[] = {"s0", + "s0dot5", + "s1", + "s2", + "s5", + "s10", + "s20", + "s30", + "s60", + "s90", + "s120", + "s300", + "s600", + "infinity", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "rlm_relaxation_report_cfg_r17_s::rlm_relaxtion_report_prohibit_timer_e_"); +} +float rlm_relaxation_report_cfg_r17_s::rlm_relaxtion_report_prohibit_timer_opts::to_number() const +{ + static const float numbers[] = {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, -1.0}; + return map_enum_number(numbers, 14, value, "rlm_relaxation_report_cfg_r17_s::rlm_relaxtion_report_prohibit_timer_e_"); +} +const char* rlm_relaxation_report_cfg_r17_s::rlm_relaxtion_report_prohibit_timer_opts::to_number_string() const +{ + static const char* number_strs[] = { + "0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600", "inf"}; + return convert_enum_idx( + number_strs, 16, value, "rlm_relaxation_report_cfg_r17_s::rlm_relaxtion_report_prohibit_timer_e_"); +} + +// RRM-MeasRelaxationReportingConfig-r17 ::= SEQUENCE +SRSASN_CODE rrm_meas_relaxation_report_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(s_search_delta_p_stationary_r17.pack(bref)); + HANDLE_CODE(t_search_delta_p_stationary_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrm_meas_relaxation_report_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(s_search_delta_p_stationary_r17.unpack(bref)); + HANDLE_CODE(t_search_delta_p_stationary_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrm_meas_relaxation_report_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("s-SearchDeltaP-Stationary-r17", s_search_delta_p_stationary_r17.to_string()); + j.write_str("t-SearchDeltaP-Stationary-r17", t_search_delta_p_stationary_r17.to_string()); + j.end_obj(); +} + +const char* rrm_meas_relaxation_report_cfg_r17_s::s_search_delta_p_stationary_r17_opts::to_string() const +{ + static const char* names[] = {"dB2", "dB3", "dB6", "dB9", "dB12", "dB15", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "rrm_meas_relaxation_report_cfg_r17_s::s_search_delta_p_stationary_r17_e_"); +} +uint8_t rrm_meas_relaxation_report_cfg_r17_s::s_search_delta_p_stationary_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 3, 6, 9, 12, 15}; + return map_enum_number(numbers, 6, value, "rrm_meas_relaxation_report_cfg_r17_s::s_search_delta_p_stationary_r17_e_"); +} + +const char* rrm_meas_relaxation_report_cfg_r17_s::t_search_delta_p_stationary_r17_opts::to_string() const +{ + static const char* names[] = {"s5", + "s10", + "s20", + "s30", + "s60", + "s120", + "s180", + "s240", + "s300", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "rrm_meas_relaxation_report_cfg_r17_s::t_search_delta_p_stationary_r17_e_"); +} +uint16_t rrm_meas_relaxation_report_cfg_r17_s::t_search_delta_p_stationary_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {5, 10, 20, 30, 60, 120, 180, 240, 300}; + return map_enum_number(numbers, 9, value, "rrm_meas_relaxation_report_cfg_r17_s::t_search_delta_p_stationary_r17_e_"); +} + +// RSSI-ResourceConfigCLI-r16 ::= SEQUENCE +SRSASN_CODE rssi_res_cfg_cli_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ref_serv_cell_idx_r16_present, 1)); + + HANDLE_CODE(pack_integer(bref, rssi_res_id_r16, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(rssi_scs_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, start_prb_r16, (uint16_t)0u, (uint16_t)2169u)); + HANDLE_CODE(pack_integer(bref, nrof_prbs_r16, (uint16_t)4u, (uint16_t)276u)); + HANDLE_CODE(pack_integer(bref, start_position_r16, (uint8_t)0u, (uint8_t)13u)); + HANDLE_CODE(pack_integer(bref, nrof_symbols_r16, (uint8_t)1u, (uint8_t)14u)); + HANDLE_CODE(rssi_periodicity_and_offset_r16.pack(bref)); + if (ref_serv_cell_idx_r16_present) { + HANDLE_CODE(pack_integer(bref, ref_serv_cell_idx_r16, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rssi_res_cfg_cli_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ref_serv_cell_idx_r16_present, 1)); + + HANDLE_CODE(unpack_integer(rssi_res_id_r16, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(rssi_scs_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(start_prb_r16, bref, (uint16_t)0u, (uint16_t)2169u)); + HANDLE_CODE(unpack_integer(nrof_prbs_r16, bref, (uint16_t)4u, (uint16_t)276u)); + HANDLE_CODE(unpack_integer(start_position_r16, bref, (uint8_t)0u, (uint8_t)13u)); + HANDLE_CODE(unpack_integer(nrof_symbols_r16, bref, (uint8_t)1u, (uint8_t)14u)); + HANDLE_CODE(rssi_periodicity_and_offset_r16.unpack(bref)); + if (ref_serv_cell_idx_r16_present) { + HANDLE_CODE(unpack_integer(ref_serv_cell_idx_r16, bref, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +void rssi_res_cfg_cli_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rssi-ResourceId-r16", rssi_res_id_r16); + j.write_str("rssi-SCS-r16", rssi_scs_r16.to_string()); + j.write_int("startPRB-r16", start_prb_r16); + j.write_int("nrofPRBs-r16", nrof_prbs_r16); + j.write_int("startPosition-r16", start_position_r16); + j.write_int("nrofSymbols-r16", nrof_symbols_r16); + j.write_fieldname("rssi-PeriodicityAndOffset-r16"); + rssi_periodicity_and_offset_r16.to_json(j); + if (ref_serv_cell_idx_r16_present) { + j.write_int("refServCellIndex-r16", ref_serv_cell_idx_r16); + } + j.end_obj(); +} + +// SCG-DeactivationPreferenceConfig-r17 ::= SEQUENCE +SRSASN_CODE scg_deactivation_pref_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(scg_deactivation_pref_prohibit_timer_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_deactivation_pref_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(scg_deactivation_pref_prohibit_timer_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void scg_deactivation_pref_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("scg-DeactivationPreferenceProhibitTimer-r17", scg_deactivation_pref_prohibit_timer_r17.to_string()); + j.end_obj(); +} + +const char* scg_deactivation_pref_cfg_r17_s::scg_deactivation_pref_prohibit_timer_r17_opts::to_string() const +{ + static const char* names[] = {"s0", + "s1", + "s2", + "s4", + "s8", + "s10", + "s15", + "s30", + "s60", + "s120", + "s180", + "s240", + "s300", + "s600", + "s900", + "s1800"}; + return convert_enum_idx( + names, 16, value, "scg_deactivation_pref_cfg_r17_s::scg_deactivation_pref_prohibit_timer_r17_e_"); +} +uint16_t scg_deactivation_pref_cfg_r17_s::scg_deactivation_pref_prohibit_timer_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {0, 1, 2, 4, 8, 10, 15, 30, 60, 120, 180, 240, 300, 600, 900, 1800}; + return map_enum_number( + numbers, 16, value, "scg_deactivation_pref_cfg_r17_s::scg_deactivation_pref_prohibit_timer_r17_e_"); +} + +// SL-RemoteUE-ToAddMod-r17 ::= SEQUENCE +SRSASN_CODE sl_remote_ue_to_add_mod_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_srap_cfg_relay_r17_present, 1)); + + HANDLE_CODE(sl_l2_id_remote_r17.pack(bref)); + if (sl_srap_cfg_relay_r17_present) { + HANDLE_CODE(sl_srap_cfg_relay_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_remote_ue_to_add_mod_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_srap_cfg_relay_r17_present, 1)); + + HANDLE_CODE(sl_l2_id_remote_r17.unpack(bref)); + if (sl_srap_cfg_relay_r17_present) { + HANDLE_CODE(sl_srap_cfg_relay_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_remote_ue_to_add_mod_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sl-L2IdentityRemote-r17", sl_l2_id_remote_r17.to_string()); + if (sl_srap_cfg_relay_r17_present) { + j.write_fieldname("sl-SRAP-ConfigRelay-r17"); + sl_srap_cfg_relay_r17.to_json(j); + } + j.end_obj(); +} + +// SRS-ResourceConfigCLI-r16 ::= SEQUENCE +SRSASN_CODE srs_res_cfg_cli_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ref_serv_cell_idx_r16_present, 1)); + + HANDLE_CODE(srs_res_r16.pack(bref)); + HANDLE_CODE(srs_scs_r16.pack(bref)); + if (ref_serv_cell_idx_r16_present) { + HANDLE_CODE(pack_integer(bref, ref_serv_cell_idx_r16, (uint8_t)0u, (uint8_t)31u)); + } + HANDLE_CODE(pack_integer(bref, ref_bwp_r16, (uint8_t)0u, (uint8_t)4u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE srs_res_cfg_cli_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ref_serv_cell_idx_r16_present, 1)); + + HANDLE_CODE(srs_res_r16.unpack(bref)); + HANDLE_CODE(srs_scs_r16.unpack(bref)); + if (ref_serv_cell_idx_r16_present) { + HANDLE_CODE(unpack_integer(ref_serv_cell_idx_r16, bref, (uint8_t)0u, (uint8_t)31u)); + } + HANDLE_CODE(unpack_integer(ref_bwp_r16, bref, (uint8_t)0u, (uint8_t)4u)); + + return SRSASN_SUCCESS; +} +void srs_res_cfg_cli_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("srs-Resource-r16"); + srs_res_r16.to_json(j); + j.write_str("srs-SCS-r16", srs_scs_r16.to_string()); + if (ref_serv_cell_idx_r16_present) { + j.write_int("refServCellIndex-r16", ref_serv_cell_idx_r16); + } + j.write_int("refBWP-r16", ref_bwp_r16); + j.end_obj(); +} + +// SuccessHO-Config-r17 ::= SEQUENCE +SRSASN_CODE success_ho_cfg_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(thres_percentage_t304_r17_present, 1)); + HANDLE_CODE(bref.pack(thres_percentage_t310_r17_present, 1)); + HANDLE_CODE(bref.pack(thres_percentage_t312_r17_present, 1)); + HANDLE_CODE(bref.pack(source_daps_fail_report_r17_present, 1)); + + if (thres_percentage_t304_r17_present) { + HANDLE_CODE(thres_percentage_t304_r17.pack(bref)); + } + if (thres_percentage_t310_r17_present) { + HANDLE_CODE(thres_percentage_t310_r17.pack(bref)); + } + if (thres_percentage_t312_r17_present) { + HANDLE_CODE(thres_percentage_t312_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE success_ho_cfg_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(thres_percentage_t304_r17_present, 1)); + HANDLE_CODE(bref.unpack(thres_percentage_t310_r17_present, 1)); + HANDLE_CODE(bref.unpack(thres_percentage_t312_r17_present, 1)); + HANDLE_CODE(bref.unpack(source_daps_fail_report_r17_present, 1)); + + if (thres_percentage_t304_r17_present) { + HANDLE_CODE(thres_percentage_t304_r17.unpack(bref)); + } + if (thres_percentage_t310_r17_present) { + HANDLE_CODE(thres_percentage_t310_r17.unpack(bref)); + } + if (thres_percentage_t312_r17_present) { + HANDLE_CODE(thres_percentage_t312_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void success_ho_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (thres_percentage_t304_r17_present) { + j.write_str("thresholdPercentageT304-r17", thres_percentage_t304_r17.to_string()); + } + if (thres_percentage_t310_r17_present) { + j.write_str("thresholdPercentageT310-r17", thres_percentage_t310_r17.to_string()); + } + if (thres_percentage_t312_r17_present) { + j.write_str("thresholdPercentageT312-r17", thres_percentage_t312_r17.to_string()); + } + if (source_daps_fail_report_r17_present) { + j.write_str("sourceDAPS-FailureReporting-r17", "true"); + } + j.end_obj(); +} + +const char* success_ho_cfg_r17_s::thres_percentage_t304_r17_opts::to_string() const +{ + static const char* names[] = {"p40", "p60", "p80", "spare5", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "success_ho_cfg_r17_s::thres_percentage_t304_r17_e_"); +} +uint8_t success_ho_cfg_r17_s::thres_percentage_t304_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {40, 60, 80}; + return map_enum_number(numbers, 3, value, "success_ho_cfg_r17_s::thres_percentage_t304_r17_e_"); +} + +const char* success_ho_cfg_r17_s::thres_percentage_t310_r17_opts::to_string() const +{ + static const char* names[] = {"p40", "p60", "p80", "spare5", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "success_ho_cfg_r17_s::thres_percentage_t310_r17_e_"); +} +uint8_t success_ho_cfg_r17_s::thres_percentage_t310_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {40, 60, 80}; + return map_enum_number(numbers, 3, value, "success_ho_cfg_r17_s::thres_percentage_t310_r17_e_"); +} + +const char* success_ho_cfg_r17_s::thres_percentage_t312_r17_opts::to_string() const +{ + static const char* names[] = {"p20", "p40", "p60", "p80", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "success_ho_cfg_r17_s::thres_percentage_t312_r17_e_"); +} +uint8_t success_ho_cfg_r17_s::thres_percentage_t312_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {20, 40, 60, 80}; + return map_enum_number(numbers, 4, value, "success_ho_cfg_r17_s::thres_percentage_t312_r17_e_"); +} + +// AppLayerMeasConfig-r17 ::= SEQUENCE +SRSASN_CODE app_layer_meas_cfg_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_cfg_app_layer_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_cfg_app_layer_to_release_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(rrc_seg_allowed_r17_present, 1)); + + if (meas_cfg_app_layer_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_cfg_app_layer_to_add_mod_list_r17, 1, 16)); + } + if (meas_cfg_app_layer_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_cfg_app_layer_to_release_list_r17, 1, 16, integer_packer(0, 15))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE app_layer_meas_cfg_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool meas_cfg_app_layer_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(meas_cfg_app_layer_to_add_mod_list_r17_present, 1)); + bool meas_cfg_app_layer_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(meas_cfg_app_layer_to_release_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(rrc_seg_allowed_r17_present, 1)); + + if (meas_cfg_app_layer_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_cfg_app_layer_to_add_mod_list_r17, bref, 1, 16)); + } + if (meas_cfg_app_layer_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_cfg_app_layer_to_release_list_r17, bref, 1, 16, integer_packer(0, 15))); + } + + return SRSASN_SUCCESS; +} +void app_layer_meas_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_cfg_app_layer_to_add_mod_list_r17.size() > 0) { + j.start_array("measConfigAppLayerToAddModList-r17"); + for (const auto& e1 : meas_cfg_app_layer_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_cfg_app_layer_to_release_list_r17.size() > 0) { + j.start_array("measConfigAppLayerToReleaseList-r17"); + for (const auto& e1 : meas_cfg_app_layer_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (rrc_seg_allowed_r17_present) { + j.write_str("rrc-SegAllowed-r17", "enabled"); + } + j.end_obj(); +} + +// BAP-RoutingID-r16 ::= SEQUENCE +SRSASN_CODE bap_routing_id_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bap_address_r16.pack(bref)); + HANDLE_CODE(bap_path_id_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE bap_routing_id_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bap_address_r16.unpack(bref)); + HANDLE_CODE(bap_path_id_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void bap_routing_id_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("bap-Address-r16", bap_address_r16.to_string()); + j.write_str("bap-PathId-r16", bap_path_id_r16.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(); +} + +// CellsToAddModExt-v1710 ::= SEQUENCE +SRSASN_CODE cells_to_add_mod_ext_v1710_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ntn_polarization_dl_r17_present, 1)); + HANDLE_CODE(bref.pack(ntn_polarization_ul_r17_present, 1)); + + if (ntn_polarization_dl_r17_present) { + HANDLE_CODE(ntn_polarization_dl_r17.pack(bref)); + } + if (ntn_polarization_ul_r17_present) { + HANDLE_CODE(ntn_polarization_ul_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cells_to_add_mod_ext_v1710_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ntn_polarization_dl_r17_present, 1)); + HANDLE_CODE(bref.unpack(ntn_polarization_ul_r17_present, 1)); + + if (ntn_polarization_dl_r17_present) { + HANDLE_CODE(ntn_polarization_dl_r17.unpack(bref)); + } + if (ntn_polarization_ul_r17_present) { + HANDLE_CODE(ntn_polarization_ul_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cells_to_add_mod_ext_v1710_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ntn_polarization_dl_r17_present) { + j.write_str("ntn-PolarizationDL-r17", ntn_polarization_dl_r17.to_string()); + } + if (ntn_polarization_ul_r17_present) { + j.write_str("ntn-PolarizationUL-r17", ntn_polarization_ul_r17.to_string()); + } + j.end_obj(); +} + +const char* cells_to_add_mod_ext_v1710_s::ntn_polarization_dl_r17_opts::to_string() const +{ + static const char* names[] = {"rhcp", "lhcp", "linear"}; + return convert_enum_idx(names, 3, value, "cells_to_add_mod_ext_v1710_s::ntn_polarization_dl_r17_e_"); +} + +const char* cells_to_add_mod_ext_v1710_s::ntn_polarization_ul_r17_opts::to_string() const +{ + static const char* names[] = {"rhcp", "lhcp", "linear"}; + return convert_enum_idx(names, 3, value, "cells_to_add_mod_ext_v1710_s::ntn_polarization_ul_r17_e_"); +} + +// CellsToAddModUTRA-FDD-r16 ::= SEQUENCE +SRSASN_CODE cells_to_add_mod_utra_fdd_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, cell_idx_utra_fdd_r16, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)511u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cells_to_add_mod_utra_fdd_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(cell_idx_utra_fdd_r16, bref, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)511u)); + + return SRSASN_SUCCESS; +} +void cells_to_add_mod_utra_fdd_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("cellIndexUTRA-FDD-r16", cell_idx_utra_fdd_r16); + j.write_int("physCellId-r16", pci_r16); + j.end_obj(); +} + +// DRX-PreferenceConfig-r16 ::= SEQUENCE +SRSASN_CODE drx_pref_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(drx_pref_prohibit_timer_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_pref_cfg_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(drx_pref_prohibit_timer_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void drx_pref_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("drx-PreferenceProhibitTimer-r16", drx_pref_prohibit_timer_r16.to_string()); + j.end_obj(); +} + +const char* drx_pref_cfg_r16_s::drx_pref_prohibit_timer_r16_opts::to_string() const +{ + static const char* names[] = { + "s0", "s0dot5", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s20", "s30", "spare2", "spare1"}; + return convert_enum_idx(names, 16, value, "drx_pref_cfg_r16_s::drx_pref_prohibit_timer_r16_e_"); +} +float drx_pref_cfg_r16_s::drx_pref_prohibit_timer_r16_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0}; + return map_enum_number(numbers, 14, value, "drx_pref_cfg_r16_s::drx_pref_prohibit_timer_r16_e_"); +} +const char* drx_pref_cfg_r16_s::drx_pref_prohibit_timer_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "20", "30"}; + return convert_enum_idx(number_strs, 16, value, "drx_pref_cfg_r16_s::drx_pref_prohibit_timer_r16_e_"); +} + +// IAB-IP-AddressConfiguration-r16 ::= SEQUENCE +SRSASN_CODE iab_ip_address_cfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(iab_ip_address_r16_present, 1)); + HANDLE_CODE(bref.pack(iab_ip_usage_r16_present, 1)); + HANDLE_CODE(bref.pack(iab_donor_du_bap_address_r16_present, 1)); + + HANDLE_CODE(pack_integer(bref, iab_ip_address_idx_r16, (uint8_t)1u, (uint8_t)32u)); + if (iab_ip_address_r16_present) { + HANDLE_CODE(iab_ip_address_r16.pack(bref)); + } + if (iab_ip_usage_r16_present) { + HANDLE_CODE(iab_ip_usage_r16.pack(bref)); + } + if (iab_donor_du_bap_address_r16_present) { + HANDLE_CODE(iab_donor_du_bap_address_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE iab_ip_address_cfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(iab_ip_address_r16_present, 1)); + HANDLE_CODE(bref.unpack(iab_ip_usage_r16_present, 1)); + HANDLE_CODE(bref.unpack(iab_donor_du_bap_address_r16_present, 1)); + + HANDLE_CODE(unpack_integer(iab_ip_address_idx_r16, bref, (uint8_t)1u, (uint8_t)32u)); + if (iab_ip_address_r16_present) { + HANDLE_CODE(iab_ip_address_r16.unpack(bref)); + } + if (iab_ip_usage_r16_present) { + HANDLE_CODE(iab_ip_usage_r16.unpack(bref)); + } + if (iab_donor_du_bap_address_r16_present) { + HANDLE_CODE(iab_donor_du_bap_address_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void iab_ip_address_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("iab-IP-AddressIndex-r16", iab_ip_address_idx_r16); + if (iab_ip_address_r16_present) { + j.write_fieldname("iab-IP-Address-r16"); + iab_ip_address_r16.to_json(j); + } + if (iab_ip_usage_r16_present) { + j.write_str("iab-IP-Usage-r16", iab_ip_usage_r16.to_string()); + } + if (iab_donor_du_bap_address_r16_present) { + j.write_str("iab-donor-DU-BAP-Address-r16", iab_donor_du_bap_address_r16.to_string()); + } + j.end_obj(); +} + +// IDC-AssistanceConfig-r16 ::= SEQUENCE +SRSASN_CODE idc_assist_cfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(candidate_serving_freq_list_nr_r16.size() > 0, 1)); + + if (candidate_serving_freq_list_nr_r16.size() > 0) { + HANDLE_CODE( + pack_dyn_seq_of(bref, candidate_serving_freq_list_nr_r16, 1, 128, integer_packer(0, 3279165))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE idc_assist_cfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool candidate_serving_freq_list_nr_r16_present; + HANDLE_CODE(bref.unpack(candidate_serving_freq_list_nr_r16_present, 1)); + + if (candidate_serving_freq_list_nr_r16_present) { + HANDLE_CODE( + unpack_dyn_seq_of(candidate_serving_freq_list_nr_r16, bref, 1, 128, integer_packer(0, 3279165))); + } + + return SRSASN_SUCCESS; +} +void idc_assist_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (candidate_serving_freq_list_nr_r16.size() > 0) { + j.start_array("candidateServingFreqListNR-r16"); + for (const auto& e1 : candidate_serving_freq_list_nr_r16) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} + +// MUSIM-GapConfig-r17 ::= SEQUENCE +SRSASN_CODE mu_si_m_gap_cfg_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(musim_gap_to_release_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(musim_gap_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(musim_aperiodic_gap_r17_present, 1)); + + if (musim_gap_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, musim_gap_to_release_list_r17, 1, 3, integer_packer(0, 2))); + } + if (musim_gap_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, musim_gap_to_add_mod_list_r17, 1, 3)); + } + if (musim_aperiodic_gap_r17_present) { + HANDLE_CODE(musim_aperiodic_gap_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mu_si_m_gap_cfg_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool musim_gap_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(musim_gap_to_release_list_r17_present, 1)); + bool musim_gap_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(musim_gap_to_add_mod_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(musim_aperiodic_gap_r17_present, 1)); + + if (musim_gap_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(musim_gap_to_release_list_r17, bref, 1, 3, integer_packer(0, 2))); + } + if (musim_gap_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(musim_gap_to_add_mod_list_r17, bref, 1, 3)); + } + if (musim_aperiodic_gap_r17_present) { + HANDLE_CODE(musim_aperiodic_gap_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mu_si_m_gap_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (musim_gap_to_release_list_r17.size() > 0) { + j.start_array("musim-GapToReleaseList-r17"); + for (const auto& e1 : musim_gap_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (musim_gap_to_add_mod_list_r17.size() > 0) { + j.start_array("musim-GapToAddModList-r17"); + for (const auto& e1 : musim_gap_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (musim_aperiodic_gap_r17_present) { + j.write_fieldname("musim-AperiodicGap-r17"); + musim_aperiodic_gap_r17.to_json(j); + } + j.end_obj(); +} + +// MaxBW-PreferenceConfig-r16 ::= SEQUENCE +SRSASN_CODE max_bw_pref_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(max_bw_pref_prohibit_timer_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE max_bw_pref_cfg_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(max_bw_pref_prohibit_timer_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void max_bw_pref_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("maxBW-PreferenceProhibitTimer-r16", max_bw_pref_prohibit_timer_r16.to_string()); + j.end_obj(); +} + +const char* max_bw_pref_cfg_r16_s::max_bw_pref_prohibit_timer_r16_opts::to_string() const +{ + static const char* names[] = { + "s0", "s0dot5", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s20", "s30", "spare2", "spare1"}; + return convert_enum_idx(names, 16, value, "max_bw_pref_cfg_r16_s::max_bw_pref_prohibit_timer_r16_e_"); +} +float max_bw_pref_cfg_r16_s::max_bw_pref_prohibit_timer_r16_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0}; + return map_enum_number(numbers, 14, value, "max_bw_pref_cfg_r16_s::max_bw_pref_prohibit_timer_r16_e_"); +} +const char* max_bw_pref_cfg_r16_s::max_bw_pref_prohibit_timer_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "20", "30"}; + return convert_enum_idx(number_strs, 16, value, "max_bw_pref_cfg_r16_s::max_bw_pref_prohibit_timer_r16_e_"); +} + +// MaxCC-PreferenceConfig-r16 ::= SEQUENCE +SRSASN_CODE max_cc_pref_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(max_cc_pref_prohibit_timer_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE max_cc_pref_cfg_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(max_cc_pref_prohibit_timer_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void max_cc_pref_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("maxCC-PreferenceProhibitTimer-r16", max_cc_pref_prohibit_timer_r16.to_string()); + j.end_obj(); +} + +const char* max_cc_pref_cfg_r16_s::max_cc_pref_prohibit_timer_r16_opts::to_string() const +{ + static const char* names[] = { + "s0", "s0dot5", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s20", "s30", "spare2", "spare1"}; + return convert_enum_idx(names, 16, value, "max_cc_pref_cfg_r16_s::max_cc_pref_prohibit_timer_r16_e_"); +} +float max_cc_pref_cfg_r16_s::max_cc_pref_prohibit_timer_r16_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0}; + return map_enum_number(numbers, 14, value, "max_cc_pref_cfg_r16_s::max_cc_pref_prohibit_timer_r16_e_"); +} +const char* max_cc_pref_cfg_r16_s::max_cc_pref_prohibit_timer_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "20", "30"}; + return convert_enum_idx(number_strs, 16, value, "max_cc_pref_cfg_r16_s::max_cc_pref_prohibit_timer_r16_e_"); +} + +// MaxMIMO-LayerPreferenceConfig-r16 ::= SEQUENCE +SRSASN_CODE max_mimo_layer_pref_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(max_mimo_layer_pref_prohibit_timer_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE max_mimo_layer_pref_cfg_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(max_mimo_layer_pref_prohibit_timer_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void max_mimo_layer_pref_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("maxMIMO-LayerPreferenceProhibitTimer-r16", max_mimo_layer_pref_prohibit_timer_r16.to_string()); + j.end_obj(); +} + +const char* max_mimo_layer_pref_cfg_r16_s::max_mimo_layer_pref_prohibit_timer_r16_opts::to_string() const +{ + static const char* names[] = { + "s0", "s0dot5", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s20", "s30", "spare2", "spare1"}; + return convert_enum_idx(names, 16, value, "max_mimo_layer_pref_cfg_r16_s::max_mimo_layer_pref_prohibit_timer_r16_e_"); +} +float max_mimo_layer_pref_cfg_r16_s::max_mimo_layer_pref_prohibit_timer_r16_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0}; + return map_enum_number( + numbers, 14, value, "max_mimo_layer_pref_cfg_r16_s::max_mimo_layer_pref_prohibit_timer_r16_e_"); +} +const char* max_mimo_layer_pref_cfg_r16_s::max_mimo_layer_pref_prohibit_timer_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "20", "30"}; + return convert_enum_idx( + number_strs, 16, value, "max_mimo_layer_pref_cfg_r16_s::max_mimo_layer_pref_prohibit_timer_r16_e_"); +} + +// MeasRSSI-ReportConfig-r16 ::= SEQUENCE +SRSASN_CODE meas_rssi_report_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ch_occupancy_thres_r16_present, 1)); + + if (ch_occupancy_thres_r16_present) { + HANDLE_CODE(pack_integer(bref, ch_occupancy_thres_r16, (uint8_t)0u, (uint8_t)76u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_rssi_report_cfg_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ch_occupancy_thres_r16_present, 1)); + + if (ch_occupancy_thres_r16_present) { + HANDLE_CODE(unpack_integer(ch_occupancy_thres_r16, bref, (uint8_t)0u, (uint8_t)76u)); + } + + return SRSASN_SUCCESS; +} +void meas_rssi_report_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ch_occupancy_thres_r16_present) { + j.write_int("channelOccupancyThreshold-r16", ch_occupancy_thres_r16); + } + j.end_obj(); +} + +// 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(); +} + +// MeasReportQuantity-r16 ::= SEQUENCE +SRSASN_CODE meas_report_quant_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cbr_r16, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_quant_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cbr_r16, 1)); + + return SRSASN_SUCCESS; +} +void meas_report_quant_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("cbr-r16", cbr_r16); + j.end_obj(); +} + +// MeasReportQuantityCLI-r16 ::= ENUMERATED +const char* meas_report_quant_cli_r16_opts::to_string() const +{ + static const char* names[] = {"srs-rsrp", "cli-rssi"}; + return convert_enum_idx(names, 2, value, "meas_report_quant_cli_r16_e"); +} + +// MeasReportQuantityUTRA-FDD-r16 ::= SEQUENCE +SRSASN_CODE meas_report_quant_utra_fdd_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cpich_rs_cp, 1)); + HANDLE_CODE(bref.pack(cpich_ec_n0, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_quant_utra_fdd_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cpich_rs_cp, 1)); + HANDLE_CODE(bref.unpack(cpich_ec_n0, 1)); + + return SRSASN_SUCCESS; +} +void meas_report_quant_utra_fdd_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_bool("cpich-RSCP", cpich_rs_cp); + j.write_bool("cpich-EcN0", cpich_ec_n0); + 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::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_c"); + } +} +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::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; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_c"); + } + + return *this; +} +uint8_t& meas_trigger_quant_c::set_rsrp() +{ + set(types::rsrp); + return c.get(); +} +uint8_t& meas_trigger_quant_c::set_rsrq() +{ + set(types::rsrq); + return c.get(); +} +uint8_t& meas_trigger_quant_c::set_sinr() +{ + set(types::sinr); + return c.get(); +} +void meas_trigger_quant_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rsrp: + j.write_int("rsrp", c.get()); + break; + 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_, "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::rsrq: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + break; + case types::sinr: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + break; + 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::rsrq: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + break; + case types::sinr: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* meas_trigger_quant_c::types_opts::to_string() const +{ + static const char* names[] = {"rsrp", "rsrq", "sinr"}; + return convert_enum_idx(names, 3, value, "meas_trigger_quant_c::types"); +} + +// MeasTriggerQuantityCLI-r16 ::= CHOICE +void meas_trigger_quant_cli_r16_c::destroy_() {} +void meas_trigger_quant_cli_r16_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +meas_trigger_quant_cli_r16_c::meas_trigger_quant_cli_r16_c(const meas_trigger_quant_cli_r16_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::srs_rsrp_r16: + c.init(other.c.get()); + break; + case types::cli_rssi_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_cli_r16_c"); + } +} +meas_trigger_quant_cli_r16_c& meas_trigger_quant_cli_r16_c::operator=(const meas_trigger_quant_cli_r16_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::srs_rsrp_r16: + c.set(other.c.get()); + break; + case types::cli_rssi_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_cli_r16_c"); + } + + return *this; +} +uint8_t& meas_trigger_quant_cli_r16_c::set_srs_rsrp_r16() +{ + set(types::srs_rsrp_r16); + return c.get(); +} +uint8_t& meas_trigger_quant_cli_r16_c::set_cli_rssi_r16() +{ + set(types::cli_rssi_r16); + return c.get(); +} +void meas_trigger_quant_cli_r16_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::srs_rsrp_r16: + j.write_int("srs-RSRP-r16", c.get()); + break; + case types::cli_rssi_r16: + j.write_int("cli-RSSI-r16", c.get()); + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_cli_r16_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_trigger_quant_cli_r16_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::srs_rsrp_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)98u)); + break; + case types::cli_rssi_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)76u)); + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_cli_r16_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_trigger_quant_cli_r16_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::srs_rsrp_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)98u)); + break; + case types::cli_rssi_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)76u)); + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_cli_r16_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* meas_trigger_quant_cli_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"srs-RSRP-r16", "cli-RSSI-r16"}; + return convert_enum_idx(names, 2, value, "meas_trigger_quant_cli_r16_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::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"); + } +} +meas_trigger_quant_eutra_c& meas_trigger_quant_eutra_c::operator=(const meas_trigger_quant_eutra_c& other) +{ + 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; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); + } + + return *this; +} +uint8_t& meas_trigger_quant_eutra_c::set_rsrp() +{ + set(types::rsrp); + return c.get(); +} +uint8_t& meas_trigger_quant_eutra_c::set_rsrq() +{ + set(types::rsrq); + return c.get(); +} +uint8_t& meas_trigger_quant_eutra_c::set_sinr() +{ + set(types::sinr); + return c.get(); +} +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::rsrq: + j.write_int("rsrq", c.get()); + break; + case types::sinr: + j.write_int("sinr", c.get()); + break; + 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::rsrq: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)34u)); + break; + case types::sinr: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_trigger_quant_eutra_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)); + break; + case types::rsrq: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)34u)); + break; + case types::sinr: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_eutra_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* meas_trigger_quant_eutra_c::types_opts::to_string() const +{ + static const char* names[] = {"rsrp", "rsrq", "sinr"}; + return convert_enum_idx(names, 3, value, "meas_trigger_quant_eutra_c::types"); +} + +// MeasTriggerQuantityOffset ::= CHOICE +void meas_trigger_quant_offset_c::destroy_() {} +void meas_trigger_quant_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) +{ + 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_offset_c"); + } +} +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::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; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_offset_c"); + } + + return *this; +} +int8_t& meas_trigger_quant_offset_c::set_rsrp() +{ + set(types::rsrp); + return c.get(); +} +int8_t& meas_trigger_quant_offset_c::set_rsrq() +{ + set(types::rsrq); + return c.get(); +} +int8_t& meas_trigger_quant_offset_c::set_sinr() +{ + set(types::sinr); + return c.get(); +} +void meas_trigger_quant_offset_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rsrp: + j.write_int("rsrp", c.get()); + break; + 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_, "meas_trigger_quant_offset_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_trigger_quant_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)); + break; + 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_, "meas_trigger_quant_offset_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_trigger_quant_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)); + break; + 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_, "meas_trigger_quant_offset_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* meas_trigger_quant_offset_c::types_opts::to_string() const +{ + static const char* names[] = {"rsrp", "rsrq", "sinr"}; + return convert_enum_idx(names, 3, value, "meas_trigger_quant_offset_c::types"); +} + +// MeasTriggerQuantityUTRA-FDD-r16 ::= CHOICE +void meas_trigger_quant_utra_fdd_r16_c::destroy_() {} +void meas_trigger_quant_utra_fdd_r16_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +meas_trigger_quant_utra_fdd_r16_c::meas_trigger_quant_utra_fdd_r16_c(const meas_trigger_quant_utra_fdd_r16_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::utra_fdd_rs_cp_r16: + c.init(other.c.get()); + break; + case types::utra_fdd_ec_n0_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_utra_fdd_r16_c"); + } +} +meas_trigger_quant_utra_fdd_r16_c& +meas_trigger_quant_utra_fdd_r16_c::operator=(const meas_trigger_quant_utra_fdd_r16_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::utra_fdd_rs_cp_r16: + c.set(other.c.get()); + break; + case types::utra_fdd_ec_n0_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_utra_fdd_r16_c"); + } + + return *this; +} +int8_t& meas_trigger_quant_utra_fdd_r16_c::set_utra_fdd_rs_cp_r16() +{ + set(types::utra_fdd_rs_cp_r16); + return c.get(); +} +uint8_t& meas_trigger_quant_utra_fdd_r16_c::set_utra_fdd_ec_n0_r16() +{ + set(types::utra_fdd_ec_n0_r16); + return c.get(); +} +void meas_trigger_quant_utra_fdd_r16_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::utra_fdd_rs_cp_r16: + j.write_int("utra-FDD-RSCP-r16", c.get()); + break; + case types::utra_fdd_ec_n0_r16: + j.write_int("utra-FDD-EcN0-r16", c.get()); + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_utra_fdd_r16_c"); + } + j.end_obj(); +} +SRSASN_CODE meas_trigger_quant_utra_fdd_r16_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::utra_fdd_rs_cp_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (int8_t)-5, (int8_t)91)); + break; + case types::utra_fdd_ec_n0_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)49u)); + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_utra_fdd_r16_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_trigger_quant_utra_fdd_r16_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::utra_fdd_rs_cp_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (int8_t)-5, (int8_t)91)); + break; + case types::utra_fdd_ec_n0_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)49u)); + break; + default: + log_invalid_choice_id(type_, "meas_trigger_quant_utra_fdd_r16_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* meas_trigger_quant_utra_fdd_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"utra-FDD-RSCP-r16", "utra-FDD-EcN0-r16"}; + return convert_enum_idx(names, 2, value, "meas_trigger_quant_utra_fdd_r16_c::types"); +} +uint8_t meas_trigger_quant_utra_fdd_r16_c::types_opts::to_number() const +{ + if (value == utra_fdd_ec_n0_r16) { + return 0; + } + invalid_enum_number(value, "meas_trigger_quant_utra_fdd_r16_c::types"); + return 0; +} + +// MinSchedulingOffsetPreferenceConfig-r16 ::= SEQUENCE +SRSASN_CODE min_sched_offset_pref_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(min_sched_offset_pref_prohibit_timer_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE min_sched_offset_pref_cfg_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(min_sched_offset_pref_prohibit_timer_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void min_sched_offset_pref_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("minSchedulingOffsetPreferenceProhibitTimer-r16", min_sched_offset_pref_prohibit_timer_r16.to_string()); + j.end_obj(); +} + +const char* min_sched_offset_pref_cfg_r16_s::min_sched_offset_pref_prohibit_timer_r16_opts::to_string() const +{ + static const char* names[] = { + "s0", "s0dot5", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s20", "s30", "spare2", "spare1"}; + return convert_enum_idx( + names, 16, value, "min_sched_offset_pref_cfg_r16_s::min_sched_offset_pref_prohibit_timer_r16_e_"); +} +float min_sched_offset_pref_cfg_r16_s::min_sched_offset_pref_prohibit_timer_r16_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0}; + return map_enum_number( + numbers, 14, value, "min_sched_offset_pref_cfg_r16_s::min_sched_offset_pref_prohibit_timer_r16_e_"); +} +const char* min_sched_offset_pref_cfg_r16_s::min_sched_offset_pref_prohibit_timer_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "20", "30"}; + return convert_enum_idx( + number_strs, 16, value, "min_sched_offset_pref_cfg_r16_s::min_sched_offset_pref_prohibit_timer_r16_e_"); +} + +// NR-RS-Type ::= ENUMERATED +const char* nr_rs_type_opts::to_string() const +{ + static const char* names[] = {"ssb", "csi-rs"}; + return convert_enum_idx(names, 2, value, "nr_rs_type_e"); +} + +// NeedForGapNCSG-ConfigEUTRA-r17 ::= SEQUENCE +SRSASN_CODE need_for_gap_ncsg_cfg_eutra_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(requested_target_band_filt_ncsg_eutra_r17.size() > 0, 1)); + + if (requested_target_band_filt_ncsg_eutra_r17.size() > 0) { + HANDLE_CODE( + pack_dyn_seq_of(bref, requested_target_band_filt_ncsg_eutra_r17, 1, 256, integer_packer(1, 256))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE need_for_gap_ncsg_cfg_eutra_r17_s::unpack(cbit_ref& bref) +{ + bool requested_target_band_filt_ncsg_eutra_r17_present; + HANDLE_CODE(bref.unpack(requested_target_band_filt_ncsg_eutra_r17_present, 1)); + + if (requested_target_band_filt_ncsg_eutra_r17_present) { + HANDLE_CODE( + unpack_dyn_seq_of(requested_target_band_filt_ncsg_eutra_r17, bref, 1, 256, integer_packer(1, 256))); + } + + return SRSASN_SUCCESS; +} +void need_for_gap_ncsg_cfg_eutra_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (requested_target_band_filt_ncsg_eutra_r17.size() > 0) { + j.start_array("requestedTargetBandFilterNCSG-EUTRA-r17"); + for (const auto& e1 : requested_target_band_filt_ncsg_eutra_r17) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} + +// NeedForGapNCSG-ConfigNR-r17 ::= SEQUENCE +SRSASN_CODE need_for_gap_ncsg_cfg_nr_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(requested_target_band_filt_ncsg_nr_r17.size() > 0, 1)); + + if (requested_target_band_filt_ncsg_nr_r17.size() > 0) { + HANDLE_CODE( + pack_dyn_seq_of(bref, requested_target_band_filt_ncsg_nr_r17, 1, 1024, integer_packer(1, 1024))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE need_for_gap_ncsg_cfg_nr_r17_s::unpack(cbit_ref& bref) +{ + bool requested_target_band_filt_ncsg_nr_r17_present; + HANDLE_CODE(bref.unpack(requested_target_band_filt_ncsg_nr_r17_present, 1)); + + if (requested_target_band_filt_ncsg_nr_r17_present) { + HANDLE_CODE( + unpack_dyn_seq_of(requested_target_band_filt_ncsg_nr_r17, bref, 1, 1024, integer_packer(1, 1024))); + } + + return SRSASN_SUCCESS; +} +void need_for_gap_ncsg_cfg_nr_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (requested_target_band_filt_ncsg_nr_r17.size() > 0) { + j.start_array("requestedTargetBandFilterNCSG-NR-r17"); + for (const auto& e1 : requested_target_band_filt_ncsg_nr_r17) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} + +// OtherConfig-v1700 ::= SEQUENCE +SRSASN_CODE other_cfg_v1700_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_gap_fr2_pref_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(musim_gap_assist_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(musim_leave_assist_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(success_ho_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(max_bw_pref_cfg_fr2_2_r17_present, 1)); + HANDLE_CODE(bref.pack(max_mimo_layer_pref_cfg_fr2_2_r17_present, 1)); + HANDLE_CODE(bref.pack(min_sched_offset_pref_cfg_ext_r17_present, 1)); + HANDLE_CODE(bref.pack(rlm_relaxation_report_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(bfd_relaxation_report_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(scg_deactivation_pref_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(rrm_meas_relaxation_report_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(prop_delay_diff_report_cfg_r17_present, 1)); + + if (musim_gap_assist_cfg_r17_present) { + HANDLE_CODE(musim_gap_assist_cfg_r17.pack(bref)); + } + if (musim_leave_assist_cfg_r17_present) { + HANDLE_CODE(musim_leave_assist_cfg_r17.pack(bref)); + } + if (success_ho_cfg_r17_present) { + HANDLE_CODE(success_ho_cfg_r17.pack(bref)); + } + if (rlm_relaxation_report_cfg_r17_present) { + HANDLE_CODE(rlm_relaxation_report_cfg_r17.pack(bref)); + } + if (bfd_relaxation_report_cfg_r17_present) { + HANDLE_CODE(bfd_relaxation_report_cfg_r17.pack(bref)); + } + if (scg_deactivation_pref_cfg_r17_present) { + HANDLE_CODE(scg_deactivation_pref_cfg_r17.pack(bref)); + } + if (rrm_meas_relaxation_report_cfg_r17_present) { + HANDLE_CODE(rrm_meas_relaxation_report_cfg_r17.pack(bref)); + } + if (prop_delay_diff_report_cfg_r17_present) { + HANDLE_CODE(prop_delay_diff_report_cfg_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE other_cfg_v1700_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_gap_fr2_pref_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(musim_gap_assist_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(musim_leave_assist_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(success_ho_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(max_bw_pref_cfg_fr2_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(max_mimo_layer_pref_cfg_fr2_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(min_sched_offset_pref_cfg_ext_r17_present, 1)); + HANDLE_CODE(bref.unpack(rlm_relaxation_report_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(bfd_relaxation_report_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(scg_deactivation_pref_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(rrm_meas_relaxation_report_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(prop_delay_diff_report_cfg_r17_present, 1)); + + if (musim_gap_assist_cfg_r17_present) { + HANDLE_CODE(musim_gap_assist_cfg_r17.unpack(bref)); + } + if (musim_leave_assist_cfg_r17_present) { + HANDLE_CODE(musim_leave_assist_cfg_r17.unpack(bref)); + } + if (success_ho_cfg_r17_present) { + HANDLE_CODE(success_ho_cfg_r17.unpack(bref)); + } + if (rlm_relaxation_report_cfg_r17_present) { + HANDLE_CODE(rlm_relaxation_report_cfg_r17.unpack(bref)); + } + if (bfd_relaxation_report_cfg_r17_present) { + HANDLE_CODE(bfd_relaxation_report_cfg_r17.unpack(bref)); + } + if (scg_deactivation_pref_cfg_r17_present) { + HANDLE_CODE(scg_deactivation_pref_cfg_r17.unpack(bref)); + } + if (rrm_meas_relaxation_report_cfg_r17_present) { + HANDLE_CODE(rrm_meas_relaxation_report_cfg_r17.unpack(bref)); + } + if (prop_delay_diff_report_cfg_r17_present) { + HANDLE_CODE(prop_delay_diff_report_cfg_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void other_cfg_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_gap_fr2_pref_cfg_r17_present) { + j.write_str("ul-GapFR2-PreferenceConfig-r17", "true"); + } + if (musim_gap_assist_cfg_r17_present) { + j.write_fieldname("musim-GapAssistanceConfig-r17"); + musim_gap_assist_cfg_r17.to_json(j); + } + if (musim_leave_assist_cfg_r17_present) { + j.write_fieldname("musim-LeaveAssistanceConfig-r17"); + musim_leave_assist_cfg_r17.to_json(j); + } + if (success_ho_cfg_r17_present) { + j.write_fieldname("successHO-Config-r17"); + success_ho_cfg_r17.to_json(j); + } + if (max_bw_pref_cfg_fr2_2_r17_present) { + j.write_str("maxBW-PreferenceConfigFR2-2-r17", "true"); + } + if (max_mimo_layer_pref_cfg_fr2_2_r17_present) { + j.write_str("maxMIMO-LayerPreferenceConfigFR2-2-r17", "true"); + } + if (min_sched_offset_pref_cfg_ext_r17_present) { + j.write_str("minSchedulingOffsetPreferenceConfigExt-r17", "true"); + } + if (rlm_relaxation_report_cfg_r17_present) { + j.write_fieldname("rlm-RelaxationReportingConfig-r17"); + rlm_relaxation_report_cfg_r17.to_json(j); + } + if (bfd_relaxation_report_cfg_r17_present) { + j.write_fieldname("bfd-RelaxationReportingConfig-r17"); + bfd_relaxation_report_cfg_r17.to_json(j); + } + if (scg_deactivation_pref_cfg_r17_present) { + j.write_fieldname("scg-DeactivationPreferenceConfig-r17"); + scg_deactivation_pref_cfg_r17.to_json(j); + } + if (rrm_meas_relaxation_report_cfg_r17_present) { + j.write_fieldname("rrm-MeasRelaxationReportingConfig-r17"); + rrm_meas_relaxation_report_cfg_r17.to_json(j); + } + if (prop_delay_diff_report_cfg_r17_present) { + j.write_fieldname("propDelayDiffReportConfig-r17"); + prop_delay_diff_report_cfg_r17.to_json(j); + } + j.end_obj(); +} + +// ReleasePreferenceConfig-r16 ::= SEQUENCE +SRSASN_CODE release_pref_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(connected_report_present, 1)); + + HANDLE_CODE(release_pref_prohibit_timer_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE release_pref_cfg_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(connected_report_present, 1)); + + HANDLE_CODE(release_pref_prohibit_timer_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void release_pref_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("releasePreferenceProhibitTimer-r16", release_pref_prohibit_timer_r16.to_string()); + if (connected_report_present) { + j.write_str("connectedReporting", "true"); + } + j.end_obj(); +} + +const char* release_pref_cfg_r16_s::release_pref_prohibit_timer_r16_opts::to_string() const +{ + static const char* names[] = { + "s0", "s0dot5", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s20", "s30", "infinity", "spare1"}; + return convert_enum_idx(names, 16, value, "release_pref_cfg_r16_s::release_pref_prohibit_timer_r16_e_"); +} +float release_pref_cfg_r16_s::release_pref_prohibit_timer_r16_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 20.0, 30.0, -1.0}; + return map_enum_number(numbers, 15, value, "release_pref_cfg_r16_s::release_pref_prohibit_timer_r16_e_"); +} +const char* release_pref_cfg_r16_s::release_pref_prohibit_timer_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "20", "30", "inf"}; + return convert_enum_idx(number_strs, 16, value, "release_pref_cfg_r16_s::release_pref_prohibit_timer_r16_e_"); +} + +// RxTxReportInterval-r17 ::= ENUMERATED +const char* rx_tx_report_interv_r17_opts::to_string() const +{ + static const char* names[] = {"ms80", + "ms120", + "ms160", + "ms240", + "ms320", + "ms480", + "ms640", + "ms1024", + "ms1280", + "ms2048", + "ms2560", + "ms5120", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "rx_tx_report_interv_r17_e"); +} +uint16_t rx_tx_report_interv_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {80, 120, 160, 240, 320, 480, 640, 1024, 1280, 2048, 2560, 5120}; + return map_enum_number(numbers, 12, value, "rx_tx_report_interv_r17_e"); +} + +// SL-L2RelayUE-Config-r17 ::= SEQUENCE +SRSASN_CODE sl_l2_relay_ue_cfg_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_remote_ue_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_remote_ue_to_release_list_r17.size() > 0, 1)); + + if (sl_remote_ue_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_remote_ue_to_add_mod_list_r17, 1, 32)); + } + if (sl_remote_ue_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_remote_ue_to_release_list_r17, 1, 32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_l2_relay_ue_cfg_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool sl_remote_ue_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(sl_remote_ue_to_add_mod_list_r17_present, 1)); + bool sl_remote_ue_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(sl_remote_ue_to_release_list_r17_present, 1)); + + if (sl_remote_ue_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_remote_ue_to_add_mod_list_r17, bref, 1, 32)); + } + if (sl_remote_ue_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_remote_ue_to_release_list_r17, bref, 1, 32)); + } + + return SRSASN_SUCCESS; +} +void sl_l2_relay_ue_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_remote_ue_to_add_mod_list_r17.size() > 0) { + j.start_array("sl-RemoteUE-ToAddModList-r17"); + for (const auto& e1 : sl_remote_ue_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_remote_ue_to_release_list_r17.size() > 0) { + j.start_array("sl-RemoteUE-ToReleaseList-r17"); + for (const auto& e1 : sl_remote_ue_to_release_list_r17) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + j.end_obj(); +} + +// SL-TimeOffsetEUTRA-r16 ::= ENUMERATED +const char* sl_time_offset_eutra_r16_opts::to_string() const +{ + static const char* names[] = {"ms0", + "ms0dot25", + "ms0dot5", + "ms0dot625", + "ms0dot75", + "ms1", + "ms1dot25", + "ms1dot5", + "ms1dot75", + "ms2", + "ms2dot5", + "ms3", + "ms4", + "ms5", + "ms6", + "ms8", + "ms10", + "ms20"}; + return convert_enum_idx(names, 18, value, "sl_time_offset_eutra_r16_e"); +} +float sl_time_offset_eutra_r16_opts::to_number() const +{ + static const float numbers[] = { + 0.0, 0.25, 0.5, 0.625, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 20.0}; + return map_enum_number(numbers, 18, value, "sl_time_offset_eutra_r16_e"); +} +const char* sl_time_offset_eutra_r16_opts::to_number_string() const +{ + static const char* number_strs[] = { + "0", "0.25", "0.5", "0.625", "0.75", "1", "1.25", "1.5", "1.75", "2", "2.5", "3", "4", "5", "6", "8", "10", "20"}; + return convert_enum_idx(number_strs, 18, value, "sl_time_offset_eutra_r16_e"); +} + +// SSB-ConfigMobility ::= SEQUENCE +SRSASN_CODE ssb_cfg_mob_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)); + + if (ssb_to_measure_present) { + HANDLE_CODE(ssb_to_measure.pack(bref)); + } + HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell, 1)); + if (ss_rssi_meas_present) { + HANDLE_CODE(ss_rssi_meas.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= ssb_position_qcl_common_r16_present; + group_flags[0] |= ssb_position_qcl_cells_to_add_mod_list_r16.is_present(); + group_flags[0] |= ssb_position_qcl_cells_to_rem_list_r16.is_present(); + group_flags[1] |= derive_ssb_idx_from_cell_inter_r17_present; + group_flags[1] |= ssb_position_qcl_common_r17_present; + group_flags[1] |= ssb_position_qcl_cells_r17.is_present(); + group_flags[2] |= cca_cells_to_add_mod_list_r17.is_present(); + group_flags[2] |= cca_cells_to_rem_list_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ssb_position_qcl_common_r16_present, 1)); + HANDLE_CODE(bref.pack(ssb_position_qcl_cells_to_add_mod_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(ssb_position_qcl_cells_to_rem_list_r16.is_present(), 1)); + if (ssb_position_qcl_common_r16_present) { + HANDLE_CODE(ssb_position_qcl_common_r16.pack(bref)); + } + if (ssb_position_qcl_cells_to_add_mod_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *ssb_position_qcl_cells_to_add_mod_list_r16, 1, 32)); + } + if (ssb_position_qcl_cells_to_rem_list_r16.is_present()) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *ssb_position_qcl_cells_to_rem_list_r16, 1, 32, integer_packer(0, 1007))); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell_inter_r17_present, 1)); + HANDLE_CODE(bref.pack(ssb_position_qcl_common_r17_present, 1)); + HANDLE_CODE(bref.pack(ssb_position_qcl_cells_r17.is_present(), 1)); + if (derive_ssb_idx_from_cell_inter_r17_present) { + HANDLE_CODE(pack_integer(bref, derive_ssb_idx_from_cell_inter_r17, (uint8_t)0u, (uint8_t)31u)); + } + if (ssb_position_qcl_common_r17_present) { + HANDLE_CODE(ssb_position_qcl_common_r17.pack(bref)); + } + if (ssb_position_qcl_cells_r17.is_present()) { + HANDLE_CODE(ssb_position_qcl_cells_r17->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(cca_cells_to_add_mod_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(cca_cells_to_rem_list_r17.is_present(), 1)); + if (cca_cells_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cca_cells_to_add_mod_list_r17, 1, 32, integer_packer(0, 1007))); + } + if (cca_cells_to_rem_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cca_cells_to_rem_list_r17, 1, 32, integer_packer(0, 1007))); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ssb_cfg_mob_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)); + + if (ssb_to_measure_present) { + HANDLE_CODE(ssb_to_measure.unpack(bref)); + } + HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell, 1)); + if (ss_rssi_meas_present) { + HANDLE_CODE(ss_rssi_meas.unpack(bref)); + } + + if (ext) { + 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(ssb_position_qcl_common_r16_present, 1)); + unpack_presence_flag(ssb_position_qcl_cells_to_add_mod_list_r16, bref); + unpack_presence_flag(ssb_position_qcl_cells_to_rem_list_r16, bref); + if (ssb_position_qcl_common_r16_present) { + HANDLE_CODE(ssb_position_qcl_common_r16.unpack(bref)); + } + if (ssb_position_qcl_cells_to_add_mod_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*ssb_position_qcl_cells_to_add_mod_list_r16, bref, 1, 32)); + } + if (ssb_position_qcl_cells_to_rem_list_r16.is_present()) { + HANDLE_CODE( + unpack_dyn_seq_of(*ssb_position_qcl_cells_to_rem_list_r16, bref, 1, 32, integer_packer(0, 1007))); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell_inter_r17_present, 1)); + HANDLE_CODE(bref.unpack(ssb_position_qcl_common_r17_present, 1)); + unpack_presence_flag(ssb_position_qcl_cells_r17, bref); + if (derive_ssb_idx_from_cell_inter_r17_present) { + HANDLE_CODE(unpack_integer(derive_ssb_idx_from_cell_inter_r17, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (ssb_position_qcl_common_r17_present) { + HANDLE_CODE(ssb_position_qcl_common_r17.unpack(bref)); + } + if (ssb_position_qcl_cells_r17.is_present()) { + HANDLE_CODE(ssb_position_qcl_cells_r17->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(cca_cells_to_add_mod_list_r17, bref); + unpack_presence_flag(cca_cells_to_rem_list_r17, bref); + if (cca_cells_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*cca_cells_to_add_mod_list_r17, bref, 1, 32, integer_packer(0, 1007))); + } + if (cca_cells_to_rem_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*cca_cells_to_rem_list_r17, bref, 1, 32, integer_packer(0, 1007))); + } + } + } + return SRSASN_SUCCESS; +} +void ssb_cfg_mob_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); + } + 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 (ext) { + if (ssb_position_qcl_common_r16_present) { + j.write_str("ssb-PositionQCL-Common-r16", ssb_position_qcl_common_r16.to_string()); + } + if (ssb_position_qcl_cells_to_add_mod_list_r16.is_present()) { + j.start_array("ssb-PositionQCL-CellsToAddModList-r16"); + for (const auto& e1 : *ssb_position_qcl_cells_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (ssb_position_qcl_cells_to_rem_list_r16.is_present()) { + j.start_array("ssb-PositionQCL-CellsToRemoveList-r16"); + for (const auto& e1 : *ssb_position_qcl_cells_to_rem_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (derive_ssb_idx_from_cell_inter_r17_present) { + j.write_int("deriveSSB-IndexFromCellInter-r17", derive_ssb_idx_from_cell_inter_r17); + } + if (ssb_position_qcl_common_r17_present) { + j.write_str("ssb-PositionQCL-Common-r17", ssb_position_qcl_common_r17.to_string()); + } + if (ssb_position_qcl_cells_r17.is_present()) { + j.write_fieldname("ssb-PositionQCL-Cells-r17"); + ssb_position_qcl_cells_r17->to_json(j); + } + if (cca_cells_to_add_mod_list_r17.is_present()) { + j.start_array("cca-CellsToAddModList-r17"); + for (const auto& e1 : *cca_cells_to_add_mod_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (cca_cells_to_rem_list_r17.is_present()) { + j.start_array("cca-CellsToRemoveList-r17"); + for (const auto& e1 : *cca_cells_to_rem_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + } + j.end_obj(); +} + +// SSB-MTC3-r16 ::= SEQUENCE +SRSASN_CODE ssb_mtc3_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pci_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(ssb_to_measure_r16_present, 1)); + + HANDLE_CODE(periodicity_and_offset_r16.pack(bref)); + HANDLE_CODE(dur_r16.pack(bref)); + if (pci_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, pci_list_r16, 1, 64, integer_packer(0, 1007))); + } + if (ssb_to_measure_r16_present) { + HANDLE_CODE(ssb_to_measure_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ssb_mtc3_r16_s::unpack(cbit_ref& bref) +{ + bool pci_list_r16_present; + HANDLE_CODE(bref.unpack(pci_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(ssb_to_measure_r16_present, 1)); + + HANDLE_CODE(periodicity_and_offset_r16.unpack(bref)); + HANDLE_CODE(dur_r16.unpack(bref)); + if (pci_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(pci_list_r16, bref, 1, 64, integer_packer(0, 1007))); + } + if (ssb_to_measure_r16_present) { + HANDLE_CODE(ssb_to_measure_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ssb_mtc3_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("periodicityAndOffset-r16"); + periodicity_and_offset_r16.to_json(j); + j.write_str("duration-r16", dur_r16.to_string()); + if (pci_list_r16.size() > 0) { + j.start_array("pci-List-r16"); + for (const auto& e1 : pci_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (ssb_to_measure_r16_present) { + j.write_fieldname("ssb-ToMeasure-r16"); + ssb_to_measure_r16.to_json(j); + } + j.end_obj(); +} + +void ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::destroy_() {} +void ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::periodicity_and_offset_r16_c_( + const ssb_mtc3_r16_s::periodicity_and_offset_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf5_r16: + c.init(other.c.get()); + break; + case types::sf10_r16: + c.init(other.c.get()); + break; + case types::sf20_r16: + c.init(other.c.get()); + break; + case types::sf40_r16: + c.init(other.c.get()); + break; + case types::sf80_r16: + c.init(other.c.get()); + break; + case types::sf160_r16: + c.init(other.c.get()); + break; + case types::sf320_r16: + c.init(other.c.get()); + break; + case types::sf640_r16: + c.init(other.c.get()); + break; + case types::sf1280_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_"); + } +} +ssb_mtc3_r16_s::periodicity_and_offset_r16_c_& +ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::operator=(const ssb_mtc3_r16_s::periodicity_and_offset_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf5_r16: + c.set(other.c.get()); + break; + case types::sf10_r16: + c.set(other.c.get()); + break; + case types::sf20_r16: + c.set(other.c.get()); + break; + case types::sf40_r16: + c.set(other.c.get()); + break; + case types::sf80_r16: + c.set(other.c.get()); + break; + case types::sf160_r16: + c.set(other.c.get()); + break; + case types::sf320_r16: + c.set(other.c.get()); + break; + case types::sf640_r16: + c.set(other.c.get()); + break; + case types::sf1280_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_"); + } + + return *this; +} +uint8_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf5_r16() +{ + set(types::sf5_r16); + return c.get(); +} +uint8_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf10_r16() +{ + set(types::sf10_r16); + return c.get(); +} +uint8_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf20_r16() +{ + set(types::sf20_r16); + return c.get(); +} +uint8_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf40_r16() +{ + set(types::sf40_r16); + return c.get(); +} +uint8_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf80_r16() +{ + set(types::sf80_r16); + return c.get(); +} +uint8_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf160_r16() +{ + set(types::sf160_r16); + return c.get(); +} +uint16_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf320_r16() +{ + set(types::sf320_r16); + return c.get(); +} +uint16_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf640_r16() +{ + set(types::sf640_r16); + return c.get(); +} +uint16_t& ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::set_sf1280_r16() +{ + set(types::sf1280_r16); + return c.get(); +} +void ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf5_r16: + j.write_int("sf5-r16", c.get()); + break; + case types::sf10_r16: + j.write_int("sf10-r16", c.get()); + break; + case types::sf20_r16: + j.write_int("sf20-r16", c.get()); + break; + case types::sf40_r16: + j.write_int("sf40-r16", c.get()); + break; + case types::sf80_r16: + j.write_int("sf80-r16", c.get()); + break; + case types::sf160_r16: + j.write_int("sf160-r16", c.get()); + break; + case types::sf320_r16: + j.write_int("sf320-r16", c.get()); + break; + case types::sf640_r16: + j.write_int("sf640-r16", c.get()); + break; + case types::sf1280_r16: + j.write_int("sf1280-r16", c.get()); + break; + default: + log_invalid_choice_id(type_, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::sf5_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); + break; + case types::sf10_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); + break; + case types::sf20_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + break; + case types::sf40_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::sf80_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::sf160_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + case types::sf320_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); + break; + case types::sf640_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); + break; + case types::sf1280_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); + break; + default: + log_invalid_choice_id(type_, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::sf5_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); + break; + case types::sf10_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); + break; + case types::sf20_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::sf40_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::sf80_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::sf160_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + case types::sf320_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); + break; + case types::sf640_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); + break; + case types::sf1280_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); + break; + default: + log_invalid_choice_id(type_, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::types_opts::to_string() const +{ + static const char* names[] = { + "sf5-r16", "sf10-r16", "sf20-r16", "sf40-r16", "sf80-r16", "sf160-r16", "sf320-r16", "sf640-r16", "sf1280-r16"}; + return convert_enum_idx(names, 9, value, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::types"); +} +uint16_t ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {5, 10, 20, 40, 80, 160, 320, 640, 1280}; + return map_enum_number(numbers, 9, value, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::types"); +} + +const char* ssb_mtc3_r16_s::dur_r16_opts::to_string() const +{ + static const char* names[] = {"sf1", "sf2", "sf3", "sf4", "sf5"}; + return convert_enum_idx(names, 5, value, "ssb_mtc3_r16_s::dur_r16_e_"); +} +uint8_t ssb_mtc3_r16_s::dur_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3, 4, 5}; + return map_enum_number(numbers, 5, value, "ssb_mtc3_r16_s::dur_r16_e_"); +} + +// Sensor-NameList-r16 ::= SEQUENCE +SRSASN_CODE sensor_name_list_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_uncom_bar_pre_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_ue_speed_present, 1)); + HANDLE_CODE(bref.pack(meas_ue_orientation_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sensor_name_list_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_uncom_bar_pre_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_ue_speed_present, 1)); + HANDLE_CODE(bref.unpack(meas_ue_orientation_present, 1)); + + return SRSASN_SUCCESS; +} +void sensor_name_list_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_uncom_bar_pre_r16_present) { + j.write_str("measUncomBarPre-r16", "true"); + } + if (meas_ue_speed_present) { + j.write_str("measUeSpeed", "true"); + } + if (meas_ue_orientation_present) { + j.write_str("measUeOrientation", "true"); + } + j.end_obj(); +} + +// UE-TxTEG-RequestUL-TDOA-Config-r17 ::= CHOICE +void ue_tx_teg_request_ul_tdoa_cfg_r17_c::set(types::options e) +{ + type_ = e; +} +void ue_tx_teg_request_ul_tdoa_cfg_r17_c::set_one_shot_r17() +{ + set(types::one_shot_r17); +} +ue_tx_teg_request_ul_tdoa_cfg_r17_c::periodic_report_r17_e_& +ue_tx_teg_request_ul_tdoa_cfg_r17_c::set_periodic_report_r17() +{ + set(types::periodic_report_r17); + return c; +} +void ue_tx_teg_request_ul_tdoa_cfg_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::one_shot_r17: + break; + case types::periodic_report_r17: + j.write_str("periodicReporting-r17", c.to_string()); + break; + default: + log_invalid_choice_id(type_, "ue_tx_teg_request_ul_tdoa_cfg_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE ue_tx_teg_request_ul_tdoa_cfg_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::one_shot_r17: + break; + case types::periodic_report_r17: + HANDLE_CODE(c.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ue_tx_teg_request_ul_tdoa_cfg_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_tx_teg_request_ul_tdoa_cfg_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::one_shot_r17: + break; + case types::periodic_report_r17: + HANDLE_CODE(c.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ue_tx_teg_request_ul_tdoa_cfg_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ue_tx_teg_request_ul_tdoa_cfg_r17_c::periodic_report_r17_opts::to_string() const +{ + static const char* names[] = {"ms160", "ms320", "ms1280", "ms2560", "ms61440", "ms81920", "ms368640", "ms737280"}; + return convert_enum_idx(names, 8, value, "ue_tx_teg_request_ul_tdoa_cfg_r17_c::periodic_report_r17_e_"); +} +uint32_t ue_tx_teg_request_ul_tdoa_cfg_r17_c::periodic_report_r17_opts::to_number() const +{ + static const uint32_t numbers[] = {160, 320, 1280, 2560, 61440, 81920, 368640, 737280}; + return map_enum_number(numbers, 8, value, "ue_tx_teg_request_ul_tdoa_cfg_r17_c::periodic_report_r17_e_"); +} + +const char* ue_tx_teg_request_ul_tdoa_cfg_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"oneShot-r17", "periodicReporting-r17"}; + return convert_enum_idx(names, 2, value, "ue_tx_teg_request_ul_tdoa_cfg_r17_c::types"); +} +uint8_t ue_tx_teg_request_ul_tdoa_cfg_r17_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "ue_tx_teg_request_ul_tdoa_cfg_r17_c::types"); +} + +// UL-DelayValueConfig-r16 ::= SEQUENCE +SRSASN_CODE ul_delay_value_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, delay_drb_list_r16, 1, 29, integer_packer(1, 32))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_delay_value_cfg_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(delay_drb_list_r16, bref, 1, 29, integer_packer(1, 32))); + + return SRSASN_SUCCESS; +} +void ul_delay_value_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("delay-DRBlist-r16"); + for (const auto& e1 : delay_drb_list_r16) { + j.write_int(e1); + } + j.end_array(); + j.end_obj(); +} + +// UL-ExcessDelayConfig-r17 ::= SEQUENCE +SRSASN_CODE ul_excess_delay_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, excess_delay_drb_list_r17, 1, 29)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_excess_delay_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(excess_delay_drb_list_r17, bref, 1, 29)); + + return SRSASN_SUCCESS; +} +void ul_excess_delay_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("excessDelay-DRBlist-r17"); + for (const auto& e1 : excess_delay_drb_list_r17) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// UL-GapFR2-Config-r17 ::= SEQUENCE +SRSASN_CODE ul_gap_fr2_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ref_fr2_serv_cell_async_ca_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, gap_offset_r17, (uint8_t)0u, (uint8_t)159u)); + HANDLE_CODE(ugl_r17.pack(bref)); + HANDLE_CODE(ugrp_r17.pack(bref)); + if (ref_fr2_serv_cell_async_ca_r17_present) { + HANDLE_CODE(pack_integer(bref, ref_fr2_serv_cell_async_ca_r17, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_gap_fr2_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ref_fr2_serv_cell_async_ca_r17_present, 1)); + + HANDLE_CODE(unpack_integer(gap_offset_r17, bref, (uint8_t)0u, (uint8_t)159u)); + HANDLE_CODE(ugl_r17.unpack(bref)); + HANDLE_CODE(ugrp_r17.unpack(bref)); + if (ref_fr2_serv_cell_async_ca_r17_present) { + HANDLE_CODE(unpack_integer(ref_fr2_serv_cell_async_ca_r17, bref, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +void ul_gap_fr2_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("gapOffset-r17", gap_offset_r17); + j.write_str("ugl-r17", ugl_r17.to_string()); + j.write_str("ugrp-r17", ugrp_r17.to_string()); + if (ref_fr2_serv_cell_async_ca_r17_present) { + j.write_int("refFR2-ServCellAsyncCA-r17", ref_fr2_serv_cell_async_ca_r17); + } + j.end_obj(); +} + +const char* ul_gap_fr2_cfg_r17_s::ugl_r17_opts::to_string() const +{ + static const char* names[] = {"ms0dot125", "ms0dot25", "ms0dot5", "ms1"}; + return convert_enum_idx(names, 4, value, "ul_gap_fr2_cfg_r17_s::ugl_r17_e_"); +} +float ul_gap_fr2_cfg_r17_s::ugl_r17_opts::to_number() const +{ + static const float numbers[] = {0.125, 0.25, 0.5, 1.0}; + return map_enum_number(numbers, 4, value, "ul_gap_fr2_cfg_r17_s::ugl_r17_e_"); +} +const char* ul_gap_fr2_cfg_r17_s::ugl_r17_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.125", "0.25", "0.5", "1"}; + return convert_enum_idx(number_strs, 4, value, "ul_gap_fr2_cfg_r17_s::ugl_r17_e_"); +} + +const char* ul_gap_fr2_cfg_r17_s::ugrp_r17_opts::to_string() const +{ + static const char* names[] = {"ms5", "ms20", "ms40", "ms160"}; + return convert_enum_idx(names, 4, value, "ul_gap_fr2_cfg_r17_s::ugrp_r17_e_"); +} +uint8_t ul_gap_fr2_cfg_r17_s::ugrp_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {5, 20, 40, 160}; + return map_enum_number(numbers, 4, value, "ul_gap_fr2_cfg_r17_s::ugrp_r17_e_"); +} + +// BAP-Config-r16 ::= SEQUENCE +SRSASN_CODE bap_cfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(bap_address_r16_present, 1)); + HANDLE_CODE(bref.pack(default_ul_bap_routing_id_r16_present, 1)); + HANDLE_CODE(bref.pack(default_ul_bh_rlc_ch_r16_present, 1)); + HANDLE_CODE(bref.pack(flow_ctrl_feedback_type_r16_present, 1)); + + if (bap_address_r16_present) { + HANDLE_CODE(bap_address_r16.pack(bref)); + } + if (default_ul_bap_routing_id_r16_present) { + HANDLE_CODE(default_ul_bap_routing_id_r16.pack(bref)); + } + if (default_ul_bh_rlc_ch_r16_present) { + HANDLE_CODE(default_ul_bh_rlc_ch_r16.pack(bref)); + } + if (flow_ctrl_feedback_type_r16_present) { + HANDLE_CODE(flow_ctrl_feedback_type_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE bap_cfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(bap_address_r16_present, 1)); + HANDLE_CODE(bref.unpack(default_ul_bap_routing_id_r16_present, 1)); + HANDLE_CODE(bref.unpack(default_ul_bh_rlc_ch_r16_present, 1)); + HANDLE_CODE(bref.unpack(flow_ctrl_feedback_type_r16_present, 1)); + + if (bap_address_r16_present) { + HANDLE_CODE(bap_address_r16.unpack(bref)); + } + if (default_ul_bap_routing_id_r16_present) { + HANDLE_CODE(default_ul_bap_routing_id_r16.unpack(bref)); + } + if (default_ul_bh_rlc_ch_r16_present) { + HANDLE_CODE(default_ul_bh_rlc_ch_r16.unpack(bref)); + } + if (flow_ctrl_feedback_type_r16_present) { + HANDLE_CODE(flow_ctrl_feedback_type_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void bap_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (bap_address_r16_present) { + j.write_str("bap-Address-r16", bap_address_r16.to_string()); + } + if (default_ul_bap_routing_id_r16_present) { + j.write_fieldname("defaultUL-BAP-RoutingID-r16"); + default_ul_bap_routing_id_r16.to_json(j); + } + if (default_ul_bh_rlc_ch_r16_present) { + j.write_str("defaultUL-BH-RLC-Channel-r16", default_ul_bh_rlc_ch_r16.to_string()); + } + if (flow_ctrl_feedback_type_r16_present) { + j.write_str("flowControlFeedbackType-r16", flow_ctrl_feedback_type_r16.to_string()); + } + j.end_obj(); +} + +const char* bap_cfg_r16_s::flow_ctrl_feedback_type_r16_opts::to_string() const +{ + static const char* names[] = {"perBH-RLC-Channel", "perRoutingID", "both"}; + return convert_enum_idx(names, 3, value, "bap_cfg_r16_s::flow_ctrl_feedback_type_r16_e_"); +} + +// CGI-Info-Logging-r16 ::= SEQUENCE +SRSASN_CODE cgi_info_logging_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tac_r16_present, 1)); + + HANDLE_CODE(plmn_id_r16.pack(bref)); + HANDLE_CODE(cell_id_r16.pack(bref)); + if (tac_r16_present) { + HANDLE_CODE(tac_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cgi_info_logging_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tac_r16_present, 1)); + + HANDLE_CODE(plmn_id_r16.unpack(bref)); + HANDLE_CODE(cell_id_r16.unpack(bref)); + if (tac_r16_present) { + HANDLE_CODE(tac_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cgi_info_logging_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Identity-r16"); + plmn_id_r16.to_json(j); + j.write_str("cellIdentity-r16", cell_id_r16.to_string()); + if (tac_r16_present) { + j.write_str("trackingAreaCode-r16", tac_r16.to_string()); + } + j.end_obj(); +} + +// CLI-EventTriggerConfig-r16 ::= SEQUENCE +SRSASN_CODE cli_event_trigger_cfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(event_id_r16.pack(bref)); + HANDLE_CODE(report_interv_r16.pack(bref)); + HANDLE_CODE(report_amount_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, max_report_cli_r16, (uint8_t)1u, (uint8_t)8u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cli_event_trigger_cfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(event_id_r16.unpack(bref)); + HANDLE_CODE(report_interv_r16.unpack(bref)); + HANDLE_CODE(report_amount_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(max_report_cli_r16, bref, (uint8_t)1u, (uint8_t)8u)); + + return SRSASN_SUCCESS; +} +void cli_event_trigger_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("eventId-r16"); + event_id_r16.to_json(j); + j.write_str("reportInterval-r16", report_interv_r16.to_string()); + j.write_str("reportAmount-r16", report_amount_r16.to_string()); + j.write_int("maxReportCLI-r16", max_report_cli_r16); + j.end_obj(); +} + +void cli_event_trigger_cfg_r16_s::event_id_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("eventI1-r16"); + j.start_obj(); + j.write_fieldname("i1-Threshold-r16"); + c.i1_thres_r16.to_json(j); + j.write_bool("reportOnLeave-r16", c.report_on_leave_r16); + j.write_int("hysteresis-r16", c.hysteresis_r16); + j.write_str("timeToTrigger-r16", c.time_to_trigger_r16.to_string()); + j.end_obj(); + j.end_obj(); +} +SRSASN_CODE cli_event_trigger_cfg_r16_s::event_id_r16_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type()); + HANDLE_CODE(c.i1_thres_r16.pack(bref)); + HANDLE_CODE(bref.pack(c.report_on_leave_r16, 1)); + HANDLE_CODE(pack_integer(bref, c.hysteresis_r16, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.time_to_trigger_r16.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE cli_event_trigger_cfg_r16_s::event_id_r16_c_::unpack(cbit_ref& bref) +{ + types e; + unpack_enum(e, bref); + if (e != type()) { + log_invalid_choice_id(e, "cli_event_trigger_cfg_r16_s::event_id_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + HANDLE_CODE(c.i1_thres_r16.unpack(bref)); + HANDLE_CODE(bref.unpack(c.report_on_leave_r16, 1)); + HANDLE_CODE(unpack_integer(c.hysteresis_r16, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.time_to_trigger_r16.unpack(bref)); + return SRSASN_SUCCESS; +} + +const char* cli_event_trigger_cfg_r16_s::event_id_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"eventI1-r16"}; + return convert_enum_idx(names, 1, value, "cli_event_trigger_cfg_r16_s::event_id_r16_c_::types"); +} +uint8_t cli_event_trigger_cfg_r16_s::event_id_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "cli_event_trigger_cfg_r16_s::event_id_r16_c_::types"); +} + +const char* cli_event_trigger_cfg_r16_s::report_amount_r16_opts::to_string() const +{ + static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + return convert_enum_idx(names, 8, value, "cli_event_trigger_cfg_r16_s::report_amount_r16_e_"); +} +int8_t cli_event_trigger_cfg_r16_s::report_amount_r16_opts::to_number() const +{ + static const int8_t numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(numbers, 8, value, "cli_event_trigger_cfg_r16_s::report_amount_r16_e_"); +} + +// CLI-PeriodicalReportConfig-r16 ::= SEQUENCE +SRSASN_CODE cli_periodical_report_cfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(report_interv_r16.pack(bref)); + HANDLE_CODE(report_amount_r16.pack(bref)); + HANDLE_CODE(report_quant_cli_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, max_report_cli_r16, (uint8_t)1u, (uint8_t)8u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cli_periodical_report_cfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(report_interv_r16.unpack(bref)); + HANDLE_CODE(report_amount_r16.unpack(bref)); + HANDLE_CODE(report_quant_cli_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(max_report_cli_r16, bref, (uint8_t)1u, (uint8_t)8u)); + + return SRSASN_SUCCESS; +} +void cli_periodical_report_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("reportInterval-r16", report_interv_r16.to_string()); + j.write_str("reportAmount-r16", report_amount_r16.to_string()); + j.write_str("reportQuantityCLI-r16", report_quant_cli_r16.to_string()); + j.write_int("maxReportCLI-r16", max_report_cli_r16); + j.end_obj(); +} + +const char* cli_periodical_report_cfg_r16_s::report_amount_r16_opts::to_string() const +{ + static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + return convert_enum_idx(names, 8, value, "cli_periodical_report_cfg_r16_s::report_amount_r16_e_"); +} +int8_t cli_periodical_report_cfg_r16_s::report_amount_r16_opts::to_number() const +{ + static const int8_t numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(numbers, 8, value, "cli_periodical_report_cfg_r16_s::report_amount_r16_e_"); +} + +// CLI-ResourceConfig-r16 ::= SEQUENCE +SRSASN_CODE cli_res_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(srs_res_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(rssi_res_cfg_r16_present, 1)); + + if (srs_res_cfg_r16_present) { + HANDLE_CODE(srs_res_cfg_r16.pack(bref)); + } + if (rssi_res_cfg_r16_present) { + HANDLE_CODE(rssi_res_cfg_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cli_res_cfg_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(srs_res_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(rssi_res_cfg_r16_present, 1)); + + if (srs_res_cfg_r16_present) { + HANDLE_CODE(srs_res_cfg_r16.unpack(bref)); + } + if (rssi_res_cfg_r16_present) { + HANDLE_CODE(rssi_res_cfg_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cli_res_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (srs_res_cfg_r16_present) { + j.write_fieldname("srs-ResourceConfig-r16"); + srs_res_cfg_r16.to_json(j); + } + if (rssi_res_cfg_r16_present) { + j.write_fieldname("rssi-ResourceConfig-r16"); + rssi_res_cfg_r16.to_json(j); + } + j.end_obj(); +} + +// CondTriggerConfig-r16 ::= SEQUENCE +SRSASN_CODE cond_trigger_cfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(cond_event_id.pack(bref)); + HANDLE_CODE(rs_type_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cond_trigger_cfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(cond_event_id.unpack(bref)); + HANDLE_CODE(rs_type_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cond_trigger_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("condEventId"); + cond_event_id.to_json(j); + j.write_str("rsType-r16", rs_type_r16.to_string()); + j.end_obj(); +} + +void cond_trigger_cfg_r16_s::cond_event_id_c_::destroy_() +{ + switch (type_) { + case types::cond_event_a3: + c.destroy(); + break; + case types::cond_event_a5: + c.destroy(); + break; + case types::cond_event_a4_r17: + c.destroy(); + break; + case types::cond_event_d1_r17: + c.destroy(); + break; + case types::cond_event_t1_r17: + c.destroy(); + break; + default: + break; + } +} +void cond_trigger_cfg_r16_s::cond_event_id_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cond_event_a3: + c.init(); + break; + case types::cond_event_a5: + c.init(); + break; + case types::cond_event_a4_r17: + c.init(); + break; + case types::cond_event_d1_r17: + c.init(); + break; + case types::cond_event_t1_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cond_trigger_cfg_r16_s::cond_event_id_c_"); + } +} +cond_trigger_cfg_r16_s::cond_event_id_c_::cond_event_id_c_(const cond_trigger_cfg_r16_s::cond_event_id_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cond_event_a3: + c.init(other.c.get()); + break; + case types::cond_event_a5: + c.init(other.c.get()); + break; + case types::cond_event_a4_r17: + c.init(other.c.get()); + break; + case types::cond_event_d1_r17: + c.init(other.c.get()); + break; + case types::cond_event_t1_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cond_trigger_cfg_r16_s::cond_event_id_c_"); + } +} +cond_trigger_cfg_r16_s::cond_event_id_c_& +cond_trigger_cfg_r16_s::cond_event_id_c_::operator=(const cond_trigger_cfg_r16_s::cond_event_id_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cond_event_a3: + c.set(other.c.get()); + break; + case types::cond_event_a5: + c.set(other.c.get()); + break; + case types::cond_event_a4_r17: + c.set(other.c.get()); + break; + case types::cond_event_d1_r17: + c.set(other.c.get()); + break; + case types::cond_event_t1_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cond_trigger_cfg_r16_s::cond_event_id_c_"); + } + + return *this; +} +cond_trigger_cfg_r16_s::cond_event_id_c_::cond_event_a3_s_& +cond_trigger_cfg_r16_s::cond_event_id_c_::set_cond_event_a3() +{ + set(types::cond_event_a3); + return c.get(); +} +cond_trigger_cfg_r16_s::cond_event_id_c_::cond_event_a5_s_& +cond_trigger_cfg_r16_s::cond_event_id_c_::set_cond_event_a5() +{ + set(types::cond_event_a5); + return c.get(); +} +cond_trigger_cfg_r16_s::cond_event_id_c_::cond_event_a4_r17_s_& +cond_trigger_cfg_r16_s::cond_event_id_c_::set_cond_event_a4_r17() +{ + set(types::cond_event_a4_r17); + return c.get(); +} +cond_trigger_cfg_r16_s::cond_event_id_c_::cond_event_d1_r17_s_& +cond_trigger_cfg_r16_s::cond_event_id_c_::set_cond_event_d1_r17() +{ + set(types::cond_event_d1_r17); + return c.get(); +} +cond_trigger_cfg_r16_s::cond_event_id_c_::cond_event_t1_r17_s_& +cond_trigger_cfg_r16_s::cond_event_id_c_::set_cond_event_t1_r17() +{ + set(types::cond_event_t1_r17); + return c.get(); +} +void cond_trigger_cfg_r16_s::cond_event_id_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cond_event_a3: + j.write_fieldname("condEventA3"); + j.start_obj(); + j.write_fieldname("a3-Offset"); + c.get().a3_offset.to_json(j); + j.write_int("hysteresis", c.get().hysteresis); + j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); + j.end_obj(); + break; + case types::cond_event_a5: + j.write_fieldname("condEventA5"); + 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_int("hysteresis", c.get().hysteresis); + j.write_str("timeToTrigger", c.get().time_to_trigger.to_string()); + j.end_obj(); + break; + case types::cond_event_a4_r17: + j.write_fieldname("condEventA4-r17"); + j.start_obj(); + j.write_fieldname("a4-Threshold-r17"); + c.get().a4_thres_r17.to_json(j); + j.write_int("hysteresis-r17", c.get().hysteresis_r17); + j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); + j.end_obj(); + break; + case types::cond_event_d1_r17: + j.write_fieldname("condEventD1-r17"); + j.start_obj(); + j.write_int("distanceThreshFromReference1-r17", c.get().distance_thresh_from_ref1_r17); + j.write_int("distanceThreshFromReference2-r17", c.get().distance_thresh_from_ref2_r17); + j.write_str("referenceLocation1-r17", c.get().ref_location1_r17.to_string()); + j.write_str("referenceLocation2-r17", c.get().ref_location2_r17.to_string()); + j.write_int("hysteresisLocation-r17", c.get().hysteresis_location_r17); + j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); + j.end_obj(); + break; + case types::cond_event_t1_r17: + j.write_fieldname("condEventT1-r17"); + j.start_obj(); + j.write_int("t1-Threshold-r17", c.get().t1_thres_r17); + j.write_int("duration-r17", c.get().dur_r17); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "cond_trigger_cfg_r16_s::cond_event_id_c_"); + } + j.end_obj(); +} +SRSASN_CODE cond_trigger_cfg_r16_s::cond_event_id_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cond_event_a3: + HANDLE_CODE(c.get().a3_offset.pack(bref)); + 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::cond_event_a5: + HANDLE_CODE(c.get().a5_thres1.pack(bref)); + HANDLE_CODE(c.get().a5_thres2.pack(bref)); + 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::cond_event_a4_r17: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().a4_thres_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r17, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r17.pack(bref)); + } break; + case types::cond_event_d1_r17: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(pack_integer( + bref, c.get().distance_thresh_from_ref1_r17, (uint16_t)0u, (uint16_t)65525u)); + HANDLE_CODE(pack_integer( + bref, c.get().distance_thresh_from_ref2_r17, (uint16_t)0u, (uint16_t)65525u)); + HANDLE_CODE(c.get().ref_location1_r17.pack(bref)); + HANDLE_CODE(c.get().ref_location2_r17.pack(bref)); + HANDLE_CODE( + pack_integer(bref, c.get().hysteresis_location_r17, (uint16_t)0u, (uint16_t)32768u)); + HANDLE_CODE(c.get().time_to_trigger_r17.pack(bref)); + } break; + case types::cond_event_t1_r17: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE( + pack_integer(bref, c.get().t1_thres_r17, (uint64_t)0u, (uint64_t)549755813887u)); + HANDLE_CODE(pack_integer(bref, c.get().dur_r17, (uint16_t)1u, (uint16_t)6000u)); + } break; + default: + log_invalid_choice_id(type_, "cond_trigger_cfg_r16_s::cond_event_id_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cond_trigger_cfg_r16_s::cond_event_id_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cond_event_a3: + HANDLE_CODE(c.get().a3_offset.unpack(bref)); + 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::cond_event_a5: + HANDLE_CODE(c.get().a5_thres1.unpack(bref)); + HANDLE_CODE(c.get().a5_thres2.unpack(bref)); + 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::cond_event_a4_r17: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().a4_thres_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(c.get().hysteresis_r17, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r17.unpack(bref)); + } break; + case types::cond_event_d1_r17: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(unpack_integer( + c.get().distance_thresh_from_ref1_r17, bref, (uint16_t)0u, (uint16_t)65525u)); + HANDLE_CODE(unpack_integer( + c.get().distance_thresh_from_ref2_r17, bref, (uint16_t)0u, (uint16_t)65525u)); + HANDLE_CODE(c.get().ref_location1_r17.unpack(bref)); + HANDLE_CODE(c.get().ref_location2_r17.unpack(bref)); + HANDLE_CODE( + unpack_integer(c.get().hysteresis_location_r17, bref, (uint16_t)0u, (uint16_t)32768u)); + HANDLE_CODE(c.get().time_to_trigger_r17.unpack(bref)); + } break; + case types::cond_event_t1_r17: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE( + unpack_integer(c.get().t1_thres_r17, bref, (uint64_t)0u, (uint64_t)549755813887u)); + HANDLE_CODE(unpack_integer(c.get().dur_r17, bref, (uint16_t)1u, (uint16_t)6000u)); + } break; + default: + log_invalid_choice_id(type_, "cond_trigger_cfg_r16_s::cond_event_id_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* cond_trigger_cfg_r16_s::cond_event_id_c_::types_opts::to_string() const +{ + static const char* names[] = {"condEventA3", "condEventA5", "condEventA4-r17", "condEventD1-r17", "condEventT1-r17"}; + return convert_enum_idx(names, 5, value, "cond_trigger_cfg_r16_s::cond_event_id_c_::types"); +} + +// ConditionalReconfiguration-r16 ::= SEQUENCE +SRSASN_CODE conditional_recfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(attempt_cond_recfg_r16_present, 1)); + HANDLE_CODE(bref.pack(cond_recfg_to_rem_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(cond_recfg_to_add_mod_list_r16.size() > 0, 1)); + + if (cond_recfg_to_rem_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cond_recfg_to_rem_list_r16, 1, 8, integer_packer(1, 8))); + } + if (cond_recfg_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cond_recfg_to_add_mod_list_r16, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE conditional_recfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(attempt_cond_recfg_r16_present, 1)); + bool cond_recfg_to_rem_list_r16_present; + HANDLE_CODE(bref.unpack(cond_recfg_to_rem_list_r16_present, 1)); + bool cond_recfg_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(cond_recfg_to_add_mod_list_r16_present, 1)); + + if (cond_recfg_to_rem_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(cond_recfg_to_rem_list_r16, bref, 1, 8, integer_packer(1, 8))); + } + if (cond_recfg_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(cond_recfg_to_add_mod_list_r16, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void conditional_recfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (attempt_cond_recfg_r16_present) { + j.write_str("attemptCondReconfig-r16", "true"); + } + if (cond_recfg_to_rem_list_r16.size() > 0) { + j.start_array("condReconfigToRemoveList-r16"); + for (const auto& e1 : cond_recfg_to_rem_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (cond_recfg_to_add_mod_list_r16.size() > 0) { + j.start_array("condReconfigToAddModList-r16"); + for (const auto& e1 : cond_recfg_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + 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(); +} + +// EUTRA-ExcludedCell ::= SEQUENCE +SRSASN_CODE eutra_excluded_cell_s::pack(bit_ref& bref) 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_excluded_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_excluded_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(); +} + +// EventTriggerConfig ::= SEQUENCE +SRSASN_CODE event_trigger_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(report_add_neigh_meas_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 (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)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= meas_rssi_report_cfg_r16.is_present(); + group_flags[0] |= use_t312_r16_present; + group_flags[0] |= include_common_location_info_r16_present; + group_flags[0] |= include_bt_meas_r16.is_present(); + group_flags[0] |= include_wlan_meas_r16.is_present(); + group_flags[0] |= include_sensor_meas_r16.is_present(); + group_flags[1] |= coarse_location_request_r17_present; + group_flags[1] |= report_quant_relay_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(meas_rssi_report_cfg_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(use_t312_r16_present, 1)); + HANDLE_CODE(bref.pack(include_common_location_info_r16_present, 1)); + HANDLE_CODE(bref.pack(include_bt_meas_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(include_wlan_meas_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(include_sensor_meas_r16.is_present(), 1)); + if (meas_rssi_report_cfg_r16.is_present()) { + HANDLE_CODE(meas_rssi_report_cfg_r16->pack(bref)); + } + if (use_t312_r16_present) { + HANDLE_CODE(bref.pack(use_t312_r16, 1)); + } + if (include_bt_meas_r16.is_present()) { + HANDLE_CODE(include_bt_meas_r16->pack(bref)); + } + if (include_wlan_meas_r16.is_present()) { + HANDLE_CODE(include_wlan_meas_r16->pack(bref)); + } + if (include_sensor_meas_r16.is_present()) { + HANDLE_CODE(include_sensor_meas_r16->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(coarse_location_request_r17_present, 1)); + HANDLE_CODE(bref.pack(report_quant_relay_r17.is_present(), 1)); + if (report_quant_relay_r17.is_present()) { + HANDLE_CODE(report_quant_relay_r17->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE event_trigger_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(report_add_neigh_meas_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 (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)); + + 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); + + unpack_presence_flag(meas_rssi_report_cfg_r16, bref); + HANDLE_CODE(bref.unpack(use_t312_r16_present, 1)); + HANDLE_CODE(bref.unpack(include_common_location_info_r16_present, 1)); + unpack_presence_flag(include_bt_meas_r16, bref); + unpack_presence_flag(include_wlan_meas_r16, bref); + unpack_presence_flag(include_sensor_meas_r16, bref); + if (meas_rssi_report_cfg_r16.is_present()) { + HANDLE_CODE(meas_rssi_report_cfg_r16->unpack(bref)); + } + if (use_t312_r16_present) { + HANDLE_CODE(bref.unpack(use_t312_r16, 1)); + } + if (include_bt_meas_r16.is_present()) { + HANDLE_CODE(include_bt_meas_r16->unpack(bref)); + } + if (include_wlan_meas_r16.is_present()) { + HANDLE_CODE(include_wlan_meas_r16->unpack(bref)); + } + if (include_sensor_meas_r16.is_present()) { + HANDLE_CODE(include_sensor_meas_r16->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(coarse_location_request_r17_present, 1)); + unpack_presence_flag(report_quant_relay_r17, bref); + if (report_quant_relay_r17.is_present()) { + HANDLE_CODE(report_quant_relay_r17->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void event_trigger_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("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); + } + j.write_bool("includeBeamMeasurements", include_beam_meass); + if (report_add_neigh_meas_present) { + j.write_str("reportAddNeighMeas", "setup"); + } + if (ext) { + if (meas_rssi_report_cfg_r16.is_present()) { + j.write_fieldname("measRSSI-ReportConfig-r16"); + meas_rssi_report_cfg_r16->to_json(j); + } + if (use_t312_r16_present) { + j.write_bool("useT312-r16", use_t312_r16); + } + if (include_common_location_info_r16_present) { + j.write_str("includeCommonLocationInfo-r16", "true"); + } + if (include_bt_meas_r16.is_present()) { + j.write_fieldname("includeBT-Meas-r16"); + include_bt_meas_r16->to_json(j); + } + if (include_wlan_meas_r16.is_present()) { + j.write_fieldname("includeWLAN-Meas-r16"); + include_wlan_meas_r16->to_json(j); + } + if (include_sensor_meas_r16.is_present()) { + j.write_fieldname("includeSensor-Meas-r16"); + include_sensor_meas_r16->to_json(j); + } + if (coarse_location_request_r17_present) { + j.write_str("coarseLocationRequest-r17", "true"); + } + if (report_quant_relay_r17.is_present()) { + j.write_fieldname("reportQuantityRelay-r17"); + report_quant_relay_r17->to_json(j); + } + } + 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; + case types::event_x1_r17: + c.destroy(); + break; + case types::event_x2_r17: + c.destroy(); + break; + case types::event_d1_r17: + c.destroy(); + break; + default: + break; + } +} +void event_trigger_cfg_s::event_id_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::event_x1_r17: + c.init(); + break; + case types::event_x2_r17: + c.init(); + break; + case types::event_d1_r17: + 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) +{ + 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()); + break; + case types::event_a6: + c.init(other.c.get()); + break; + case types::event_x1_r17: + c.init(other.c.get()); + break; + case types::event_x2_r17: + c.init(other.c.get()); + break; + case types::event_d1_r17: + c.init(other.c.get()); + 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_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::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()); + break; + case types::event_a6: + c.set(other.c.get()); + break; + case types::event_x1_r17: + c.set(other.c.get()); + break; + case types::event_x2_r17: + c.set(other.c.get()); + break; + case types::event_d1_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); + } + + return *this; +} +event_trigger_cfg_s::event_id_c_::event_a1_s_& event_trigger_cfg_s::event_id_c_::set_event_a1() +{ + set(types::event_a1); + return c.get(); +} +event_trigger_cfg_s::event_id_c_::event_a2_s_& event_trigger_cfg_s::event_id_c_::set_event_a2() +{ + set(types::event_a2); + return c.get(); +} +event_trigger_cfg_s::event_id_c_::event_a3_s_& event_trigger_cfg_s::event_id_c_::set_event_a3() +{ + set(types::event_a3); + return c.get(); +} +event_trigger_cfg_s::event_id_c_::event_a4_s_& event_trigger_cfg_s::event_id_c_::set_event_a4() +{ + set(types::event_a4); + return c.get(); +} +event_trigger_cfg_s::event_id_c_::event_a5_s_& event_trigger_cfg_s::event_id_c_::set_event_a5() +{ + set(types::event_a5); + return c.get(); +} +event_trigger_cfg_s::event_id_c_::event_a6_s_& event_trigger_cfg_s::event_id_c_::set_event_a6() +{ + set(types::event_a6); + return c.get(); +} +event_trigger_cfg_s::event_id_c_::event_x1_r17_s_& event_trigger_cfg_s::event_id_c_::set_event_x1_r17() +{ + set(types::event_x1_r17); + return c.get(); +} +event_trigger_cfg_s::event_id_c_::event_x2_r17_s_& event_trigger_cfg_s::event_id_c_::set_event_x2_r17() +{ + set(types::event_x2_r17); + return c.get(); +} +event_trigger_cfg_s::event_id_c_::event_d1_r17_s_& event_trigger_cfg_s::event_id_c_::set_event_d1_r17() +{ + set(types::event_d1_r17); + return c.get(); +} +void event_trigger_cfg_s::event_id_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("useAllowedCellList", c.get().use_allowed_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("useAllowedCellList", c.get().use_allowed_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("useAllowedCellList", c.get().use_allowed_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("useAllowedCellList", c.get().use_allowed_cell_list); + j.end_obj(); + break; + case types::event_x1_r17: + j.write_fieldname("eventX1-r17"); + j.start_obj(); + j.write_fieldname("x1-Threshold1-Relay-r17"); + c.get().x1_thres1_relay_r17.to_json(j); + j.write_fieldname("x1-Threshold2-r17"); + c.get().x1_thres2_r17.to_json(j); + j.write_bool("reportOnLeave-r17", c.get().report_on_leave_r17); + j.write_int("hysteresis-r17", c.get().hysteresis_r17); + j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); + j.write_bool("useAllowedCellList-r17", c.get().use_allowed_cell_list_r17); + j.end_obj(); + break; + case types::event_x2_r17: + j.write_fieldname("eventX2-r17"); + j.start_obj(); + j.write_fieldname("x2-Threshold-Relay-r17"); + c.get().x2_thres_relay_r17.to_json(j); + j.write_bool("reportOnLeave-r17", c.get().report_on_leave_r17); + j.write_int("hysteresis-r17", c.get().hysteresis_r17); + j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); + j.end_obj(); + break; + case types::event_d1_r17: + j.write_fieldname("eventD1-r17"); + j.start_obj(); + j.write_int("distanceThreshFromReference1-r17", c.get().distance_thresh_from_ref1_r17); + j.write_int("distanceThreshFromReference2-r17", c.get().distance_thresh_from_ref2_r17); + j.write_str("referenceLocation1-r17", c.get().ref_location1_r17.to_string()); + j.write_str("referenceLocation2-r17", c.get().ref_location2_r17.to_string()); + j.write_bool("reportOnLeave-r17", c.get().report_on_leave_r17); + j.write_int("hysteresisLocation-r17", c.get().hysteresis_location_r17); + j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); + } + j.end_obj(); +} +SRSASN_CODE event_trigger_cfg_s::event_id_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_allowed_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_allowed_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_allowed_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_allowed_cell_list, 1)); + break; + case types::event_x1_r17: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().x1_thres1_relay_r17.pack(bref)); + HANDLE_CODE(c.get().x1_thres2_r17.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave_r17, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r17, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r17.pack(bref)); + HANDLE_CODE(bref.pack(c.get().use_allowed_cell_list_r17, 1)); + } break; + case types::event_x2_r17: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().x2_thres_relay_r17.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave_r17, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r17, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r17.pack(bref)); + } break; + case types::event_d1_r17: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE( + pack_integer(bref, c.get().distance_thresh_from_ref1_r17, (uint16_t)1u, (uint16_t)65525u)); + HANDLE_CODE( + pack_integer(bref, c.get().distance_thresh_from_ref2_r17, (uint16_t)1u, (uint16_t)65525u)); + HANDLE_CODE(c.get().ref_location1_r17.pack(bref)); + HANDLE_CODE(c.get().ref_location2_r17.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave_r17, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis_location_r17, (uint16_t)0u, (uint16_t)32768u)); + HANDLE_CODE(c.get().time_to_trigger_r17.pack(bref)); + } break; + default: + log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE event_trigger_cfg_s::event_id_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_allowed_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_allowed_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_allowed_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_allowed_cell_list, 1)); + break; + case types::event_x1_r17: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().x1_thres1_relay_r17.unpack(bref)); + HANDLE_CODE(c.get().x1_thres2_r17.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave_r17, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis_r17, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r17.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().use_allowed_cell_list_r17, 1)); + } break; + case types::event_x2_r17: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().x2_thres_relay_r17.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave_r17, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis_r17, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r17.unpack(bref)); + } break; + case types::event_d1_r17: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE( + unpack_integer(c.get().distance_thresh_from_ref1_r17, bref, (uint16_t)1u, (uint16_t)65525u)); + HANDLE_CODE( + unpack_integer(c.get().distance_thresh_from_ref2_r17, bref, (uint16_t)1u, (uint16_t)65525u)); + HANDLE_CODE(c.get().ref_location1_r17.unpack(bref)); + HANDLE_CODE(c.get().ref_location2_r17.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave_r17, 1)); + HANDLE_CODE( + unpack_integer(c.get().hysteresis_location_r17, bref, (uint16_t)0u, (uint16_t)32768u)); + HANDLE_CODE(c.get().time_to_trigger_r17.unpack(bref)); + } break; + default: + log_invalid_choice_id(type_, "event_trigger_cfg_s::event_id_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* event_trigger_cfg_s::event_id_c_::types_opts::to_string() const +{ + static const char* names[] = { + "eventA1", "eventA2", "eventA3", "eventA4", "eventA5", "eventA6", "eventX1-r17", "eventX2-r17", "eventD1-r17"}; + return convert_enum_idx(names, 9, value, "event_trigger_cfg_s::event_id_c_::types"); +} + +const char* event_trigger_cfg_s::report_amount_opts::to_string() const +{ + static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + return convert_enum_idx(names, 8, value, "event_trigger_cfg_s::report_amount_e_"); +} +int8_t event_trigger_cfg_s::report_amount_opts::to_number() const +{ + static const int8_t numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(numbers, 8, value, "event_trigger_cfg_s::report_amount_e_"); +} + +// 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)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= report_quant_utra_fdd_r16.is_present(); + group_flags[1] |= include_common_location_info_r16_present; + group_flags[1] |= include_bt_meas_r16.is_present(); + group_flags[1] |= include_wlan_meas_r16.is_present(); + group_flags[1] |= include_sensor_meas_r16.is_present(); + group_flags[2] |= report_quant_relay_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(report_quant_utra_fdd_r16.is_present(), 1)); + if (report_quant_utra_fdd_r16.is_present()) { + HANDLE_CODE(report_quant_utra_fdd_r16->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(include_common_location_info_r16_present, 1)); + HANDLE_CODE(bref.pack(include_bt_meas_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(include_wlan_meas_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(include_sensor_meas_r16.is_present(), 1)); + if (include_bt_meas_r16.is_present()) { + HANDLE_CODE(include_bt_meas_r16->pack(bref)); + } + if (include_wlan_meas_r16.is_present()) { + HANDLE_CODE(include_wlan_meas_r16->pack(bref)); + } + if (include_sensor_meas_r16.is_present()) { + HANDLE_CODE(include_sensor_meas_r16->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(report_quant_relay_r17.is_present(), 1)); + if (report_quant_relay_r17.is_present()) { + HANDLE_CODE(report_quant_relay_r17->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE event_trigger_cfg_inter_rat_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)); + + if (ext) { + ext_groups_unpacker_guard group_flags(3); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(report_quant_utra_fdd_r16, bref); + if (report_quant_utra_fdd_r16.is_present()) { + HANDLE_CODE(report_quant_utra_fdd_r16->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(include_common_location_info_r16_present, 1)); + unpack_presence_flag(include_bt_meas_r16, bref); + unpack_presence_flag(include_wlan_meas_r16, bref); + unpack_presence_flag(include_sensor_meas_r16, bref); + if (include_bt_meas_r16.is_present()) { + HANDLE_CODE(include_bt_meas_r16->unpack(bref)); + } + if (include_wlan_meas_r16.is_present()) { + HANDLE_CODE(include_wlan_meas_r16->unpack(bref)); + } + if (include_sensor_meas_r16.is_present()) { + HANDLE_CODE(include_sensor_meas_r16->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(report_quant_relay_r17, bref); + if (report_quant_relay_r17.is_present()) { + HANDLE_CODE(report_quant_relay_r17->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void event_trigger_cfg_inter_rat_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 (ext) { + if (report_quant_utra_fdd_r16.is_present()) { + j.write_fieldname("reportQuantityUTRA-FDD-r16"); + report_quant_utra_fdd_r16->to_json(j); + } + if (include_common_location_info_r16_present) { + j.write_str("includeCommonLocationInfo-r16", "true"); + } + if (include_bt_meas_r16.is_present()) { + j.write_fieldname("includeBT-Meas-r16"); + include_bt_meas_r16->to_json(j); + } + if (include_wlan_meas_r16.is_present()) { + j.write_fieldname("includeWLAN-Meas-r16"); + include_wlan_meas_r16->to_json(j); + } + if (include_sensor_meas_r16.is_present()) { + j.write_fieldname("includeSensor-Meas-r16"); + include_sensor_meas_r16->to_json(j); + } + if (report_quant_relay_r17.is_present()) { + j.write_fieldname("reportQuantityRelay-r17"); + report_quant_relay_r17->to_json(j); + } + } + j.end_obj(); +} + +void event_trigger_cfg_inter_rat_s::event_id_c_::destroy_() +{ + switch (type_) { + case types::event_b1: + c.destroy(); + break; + case types::event_b2: + c.destroy(); + break; + case types::event_b1_utra_fdd_r16: + c.destroy(); + break; + case types::event_b2_utra_fdd_r16: + c.destroy(); + break; + case types::event_y1_relay_r17: + c.destroy(); + break; + case types::event_y2_relay_r17: + c.destroy(); + break; + default: + break; + } +} +void event_trigger_cfg_inter_rat_s::event_id_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::event_b1: + c.init(); + break; + case types::event_b2: + c.init(); + break; + case types::event_b1_utra_fdd_r16: + c.init(); + break; + case types::event_b2_utra_fdd_r16: + c.init(); + break; + case types::event_y1_relay_r17: + c.init(); + break; + case types::event_y2_relay_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); + } +} +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::event_b1: + c.init(other.c.get()); + break; + case types::event_b2: + c.init(other.c.get()); + break; + case types::event_b1_utra_fdd_r16: + c.init(other.c.get()); + break; + case types::event_b2_utra_fdd_r16: + c.init(other.c.get()); + break; + case types::event_y1_relay_r17: + c.init(other.c.get()); + break; + case types::event_y2_relay_r17: + 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_"); + } +} +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::event_b1: + c.set(other.c.get()); + break; + case types::event_b2: + c.set(other.c.get()); + break; + case types::event_b1_utra_fdd_r16: + c.set(other.c.get()); + break; + case types::event_b2_utra_fdd_r16: + c.set(other.c.get()); + break; + case types::event_y1_relay_r17: + c.set(other.c.get()); + break; + case types::event_y2_relay_r17: + 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_"); + } + + return *this; +} +event_trigger_cfg_inter_rat_s::event_id_c_::event_b1_s_& event_trigger_cfg_inter_rat_s::event_id_c_::set_event_b1() +{ + set(types::event_b1); + return c.get(); +} +event_trigger_cfg_inter_rat_s::event_id_c_::event_b2_s_& event_trigger_cfg_inter_rat_s::event_id_c_::set_event_b2() +{ + set(types::event_b2); + return c.get(); +} +event_trigger_cfg_inter_rat_s::event_id_c_::event_b1_utra_fdd_r16_s_& +event_trigger_cfg_inter_rat_s::event_id_c_::set_event_b1_utra_fdd_r16() +{ + set(types::event_b1_utra_fdd_r16); + return c.get(); +} +event_trigger_cfg_inter_rat_s::event_id_c_::event_b2_utra_fdd_r16_s_& +event_trigger_cfg_inter_rat_s::event_id_c_::set_event_b2_utra_fdd_r16() +{ + set(types::event_b2_utra_fdd_r16); + return c.get(); +} +event_trigger_cfg_inter_rat_s::event_id_c_::event_y1_relay_r17_s_& +event_trigger_cfg_inter_rat_s::event_id_c_::set_event_y1_relay_r17() +{ + set(types::event_y1_relay_r17); + return c.get(); +} +event_trigger_cfg_inter_rat_s::event_id_c_::event_y2_relay_r17_s_& +event_trigger_cfg_inter_rat_s::event_id_c_::set_event_y2_relay_r17() +{ + set(types::event_y2_relay_r17); + return c.get(); +} +void event_trigger_cfg_inter_rat_s::event_id_c_::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; + case types::event_b1_utra_fdd_r16: + j.write_fieldname("eventB1-UTRA-FDD-r16"); + j.start_obj(); + j.write_fieldname("b1-ThresholdUTRA-FDD-r16"); + c.get().b1_thres_utra_fdd_r16.to_json(j); + j.write_bool("reportOnLeave-r16", c.get().report_on_leave_r16); + j.write_int("hysteresis-r16", c.get().hysteresis_r16); + j.write_str("timeToTrigger-r16", c.get().time_to_trigger_r16.to_string()); + j.end_obj(); + break; + case types::event_b2_utra_fdd_r16: + j.write_fieldname("eventB2-UTRA-FDD-r16"); + j.start_obj(); + j.write_fieldname("b2-Threshold1-r16"); + c.get().b2_thres1_r16.to_json(j); + j.write_fieldname("b2-Threshold2UTRA-FDD-r16"); + c.get().b2_thres2_utra_fdd_r16.to_json(j); + j.write_bool("reportOnLeave-r16", c.get().report_on_leave_r16); + j.write_int("hysteresis-r16", c.get().hysteresis_r16); + j.write_str("timeToTrigger-r16", c.get().time_to_trigger_r16.to_string()); + j.end_obj(); + break; + case types::event_y1_relay_r17: + j.write_fieldname("eventY1-Relay-r17"); + j.start_obj(); + j.write_fieldname("y1-Threshold1-r17"); + c.get().y1_thres1_r17.to_json(j); + j.write_fieldname("y1-Threshold2-Relay-r17"); + c.get().y1_thres2_relay_r17.to_json(j); + j.write_bool("reportOnLeave-r17", c.get().report_on_leave_r17); + j.write_int("hysteresis-r17", c.get().hysteresis_r17); + j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); + j.end_obj(); + break; + case types::event_y2_relay_r17: + j.write_fieldname("eventY2-Relay-r17"); + j.start_obj(); + j.write_fieldname("y2-Threshold-Relay-r17"); + c.get().y2_thres_relay_r17.to_json(j); + j.write_bool("reportOnLeave-r17", c.get().report_on_leave_r17); + j.write_int("hysteresis-r17", c.get().hysteresis_r17); + j.write_str("timeToTrigger-r17", c.get().time_to_trigger_r17.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "event_trigger_cfg_inter_rat_s::event_id_c_"); + } + 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; + case types::event_b1_utra_fdd_r16: { + varlength_field_pack_guard varlen_scope(bref, false); + bref.pack(c.get().ext, 1); + HANDLE_CODE(c.get().b1_thres_utra_fdd_r16.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave_r16, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r16, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r16.pack(bref)); + } break; + case types::event_b2_utra_fdd_r16: { + varlength_field_pack_guard varlen_scope(bref, false); + bref.pack(c.get().ext, 1); + HANDLE_CODE(c.get().b2_thres1_r16.pack(bref)); + HANDLE_CODE(c.get().b2_thres2_utra_fdd_r16.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave_r16, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r16, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r16.pack(bref)); + } break; + case types::event_y1_relay_r17: { + varlength_field_pack_guard varlen_scope(bref, false); + bref.pack(c.get().ext, 1); + HANDLE_CODE(c.get().y1_thres1_r17.pack(bref)); + HANDLE_CODE(c.get().y1_thres2_relay_r17.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave_r17, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r17, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r17.pack(bref)); + } break; + case types::event_y2_relay_r17: { + varlength_field_pack_guard varlen_scope(bref, false); + bref.pack(c.get().ext, 1); + HANDLE_CODE(c.get().y2_thres_relay_r17.pack(bref)); + HANDLE_CODE(bref.pack(c.get().report_on_leave_r17, 1)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r17, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r17.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; + case types::event_b1_utra_fdd_r16: { + varlength_field_unpack_guard varlen_scope(bref, false); + bref.unpack(c.get().ext, 1); + HANDLE_CODE(c.get().b1_thres_utra_fdd_r16.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave_r16, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis_r16, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r16.unpack(bref)); + } break; + case types::event_b2_utra_fdd_r16: { + varlength_field_unpack_guard varlen_scope(bref, false); + bref.unpack(c.get().ext, 1); + HANDLE_CODE(c.get().b2_thres1_r16.unpack(bref)); + HANDLE_CODE(c.get().b2_thres2_utra_fdd_r16.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave_r16, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis_r16, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r16.unpack(bref)); + } break; + case types::event_y1_relay_r17: { + varlength_field_unpack_guard varlen_scope(bref, false); + bref.unpack(c.get().ext, 1); + HANDLE_CODE(c.get().y1_thres1_r17.unpack(bref)); + HANDLE_CODE(c.get().y1_thres2_relay_r17.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave_r17, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis_r17, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r17.unpack(bref)); + } break; + case types::event_y2_relay_r17: { + varlength_field_unpack_guard varlen_scope(bref, false); + bref.unpack(c.get().ext, 1); + HANDLE_CODE(c.get().y2_thres_relay_r17.unpack(bref)); + HANDLE_CODE(bref.unpack(c.get().report_on_leave_r17, 1)); + HANDLE_CODE(unpack_integer(c.get().hysteresis_r17, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r17.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; +} + +const char* event_trigger_cfg_inter_rat_s::event_id_c_::types_opts::to_string() const +{ + static const char* names[] = { + "eventB1", "eventB2", "eventB1-UTRA-FDD-r16", "eventB2-UTRA-FDD-r16", "eventY1-Relay-r17", "eventY2-Relay-r17"}; + return convert_enum_idx(names, 6, value, "event_trigger_cfg_inter_rat_s::event_id_c_::types"); +} + +const char* event_trigger_cfg_inter_rat_s::report_amount_opts::to_string() const +{ + static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + return convert_enum_idx(names, 8, value, "event_trigger_cfg_inter_rat_s::report_amount_e_"); +} +int8_t event_trigger_cfg_inter_rat_s::report_amount_opts::to_number() const +{ + static const int8_t numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(numbers, 8, value, "event_trigger_cfg_inter_rat_s::report_amount_e_"); +} + +// EventTriggerConfigNR-SL-r16 ::= SEQUENCE +SRSASN_CODE event_trigger_cfg_nr_sl_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(event_id_r16.pack(bref)); + HANDLE_CODE(report_interv_r16.pack(bref)); + HANDLE_CODE(report_amount_r16.pack(bref)); + HANDLE_CODE(report_quant_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE event_trigger_cfg_nr_sl_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(event_id_r16.unpack(bref)); + HANDLE_CODE(report_interv_r16.unpack(bref)); + HANDLE_CODE(report_amount_r16.unpack(bref)); + HANDLE_CODE(report_quant_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void event_trigger_cfg_nr_sl_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("eventId-r16"); + event_id_r16.to_json(j); + j.write_str("reportInterval-r16", report_interv_r16.to_string()); + j.write_str("reportAmount-r16", report_amount_r16.to_string()); + j.write_fieldname("reportQuantity-r16"); + report_quant_r16.to_json(j); + j.end_obj(); +} + +void event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::destroy_() +{ + switch (type_) { + case types::event_c1: + c.destroy(); + break; + case types::event_c2_r16: + c.destroy(); + break; + default: + break; + } +} +void event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::event_c1: + c.init(); + break; + case types::event_c2_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_"); + } +} +event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::event_id_r16_c_( + const event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::event_c1: + c.init(other.c.get()); + break; + case types::event_c2_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_"); + } +} +event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_& +event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::operator=(const event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::event_c1: + c.set(other.c.get()); + break; + case types::event_c2_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_"); + } + + return *this; +} +event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::event_c1_s_& +event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::set_event_c1() +{ + set(types::event_c1); + return c.get(); +} +event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::event_c2_r16_s_& +event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::set_event_c2_r16() +{ + set(types::event_c2_r16); + return c.get(); +} +void event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::event_c1: + j.write_fieldname("eventC1"); + j.start_obj(); + j.write_int("c1-Threshold-r16", c.get().c1_thres_r16); + j.write_int("hysteresis-r16", c.get().hysteresis_r16); + j.write_str("timeToTrigger-r16", c.get().time_to_trigger_r16.to_string()); + j.end_obj(); + break; + case types::event_c2_r16: + j.write_fieldname("eventC2-r16"); + j.start_obj(); + j.write_int("c2-Threshold-r16", c.get().c2_thres_r16); + j.write_int("hysteresis-r16", c.get().hysteresis_r16); + j.write_str("timeToTrigger-r16", c.get().time_to_trigger_r16.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::event_c1: + HANDLE_CODE(pack_integer(bref, c.get().c1_thres_r16, (uint8_t)0u, (uint8_t)100u)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r16, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r16.pack(bref)); + break; + case types::event_c2_r16: + HANDLE_CODE(pack_integer(bref, c.get().c2_thres_r16, (uint8_t)0u, (uint8_t)100u)); + HANDLE_CODE(pack_integer(bref, c.get().hysteresis_r16, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r16.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::event_c1: + HANDLE_CODE(unpack_integer(c.get().c1_thres_r16, bref, (uint8_t)0u, (uint8_t)100u)); + HANDLE_CODE(unpack_integer(c.get().hysteresis_r16, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r16.unpack(bref)); + break; + case types::event_c2_r16: + HANDLE_CODE(unpack_integer(c.get().c2_thres_r16, bref, (uint8_t)0u, (uint8_t)100u)); + HANDLE_CODE(unpack_integer(c.get().hysteresis_r16, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.get().time_to_trigger_r16.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"eventC1", "eventC2-r16"}; + return convert_enum_idx(names, 2, value, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::types"); +} +uint8_t event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::types"); +} + +const char* event_trigger_cfg_nr_sl_r16_s::report_amount_r16_opts::to_string() const +{ + static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + return convert_enum_idx(names, 8, value, "event_trigger_cfg_nr_sl_r16_s::report_amount_r16_e_"); +} +int8_t event_trigger_cfg_nr_sl_r16_s::report_amount_r16_opts::to_number() const +{ + static const int8_t numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(numbers, 8, value, "event_trigger_cfg_nr_sl_r16_s::report_amount_r16_e_"); +} + +// FilterConfig ::= SEQUENCE +SRSASN_CODE filt_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)); + + 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 (filt_coef_rs_sinr_present) { + HANDLE_CODE(filt_coef_rs_sinr.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE filt_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)); + + 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 (filt_coef_rs_sinr_present) { + HANDLE_CODE(filt_coef_rs_sinr.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void filt_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 (filt_coef_rs_sinr_present) { + j.write_str("filterCoefficientRS-SINR", filt_coef_rs_sinr.to_string()); + } + j.end_obj(); +} + +// IAB-IP-AddressConfigurationList-r16 ::= SEQUENCE +SRSASN_CODE iab_ip_address_cfg_list_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(iab_ip_address_to_add_mod_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(iab_ip_address_to_release_list_r16.size() > 0, 1)); + + if (iab_ip_address_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, iab_ip_address_to_add_mod_list_r16, 1, 32)); + } + if (iab_ip_address_to_release_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, iab_ip_address_to_release_list_r16, 1, 32, integer_packer(1, 32))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE iab_ip_address_cfg_list_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool iab_ip_address_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(iab_ip_address_to_add_mod_list_r16_present, 1)); + bool iab_ip_address_to_release_list_r16_present; + HANDLE_CODE(bref.unpack(iab_ip_address_to_release_list_r16_present, 1)); + + if (iab_ip_address_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(iab_ip_address_to_add_mod_list_r16, bref, 1, 32)); + } + if (iab_ip_address_to_release_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(iab_ip_address_to_release_list_r16, bref, 1, 32, integer_packer(1, 32))); + } + + return SRSASN_SUCCESS; +} +void iab_ip_address_cfg_list_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (iab_ip_address_to_add_mod_list_r16.size() > 0) { + j.start_array("iab-IP-AddressToAddModList-r16"); + for (const auto& e1 : iab_ip_address_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (iab_ip_address_to_release_list_r16.size() > 0) { + j.start_array("iab-IP-AddressToReleaseList-r16"); + for (const auto& e1 : iab_ip_address_to_release_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} + +// NeedForGapsConfigNR-r16 ::= SEQUENCE +SRSASN_CODE need_for_gaps_cfg_nr_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(requested_target_band_filt_nr_r16.size() > 0, 1)); + + if (requested_target_band_filt_nr_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, requested_target_band_filt_nr_r16, 1, 1024, integer_packer(1, 1024))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE need_for_gaps_cfg_nr_r16_s::unpack(cbit_ref& bref) +{ + bool requested_target_band_filt_nr_r16_present; + HANDLE_CODE(bref.unpack(requested_target_band_filt_nr_r16_present, 1)); + + if (requested_target_band_filt_nr_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(requested_target_band_filt_nr_r16, bref, 1, 1024, integer_packer(1, 1024))); + } + + return SRSASN_SUCCESS; +} +void need_for_gaps_cfg_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (requested_target_band_filt_nr_r16.size() > 0) { + j.start_array("requestedTargetBandFilterNR-r16"); + for (const auto& e1 : requested_target_band_filt_nr_r16) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} + +// OnDemandSIB-Request-r16 ::= SEQUENCE +SRSASN_CODE on_demand_sib_request_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(on_demand_sib_request_prohibit_timer_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE on_demand_sib_request_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(on_demand_sib_request_prohibit_timer_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void on_demand_sib_request_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("onDemandSIB-RequestProhibitTimer-r16", on_demand_sib_request_prohibit_timer_r16.to_string()); + j.end_obj(); +} + +const char* on_demand_sib_request_r16_s::on_demand_sib_request_prohibit_timer_r16_opts::to_string() const +{ + static const char* names[] = {"s0", "s0dot5", "s1", "s2", "s5", "s10", "s20", "s30"}; + return convert_enum_idx(names, 8, value, "on_demand_sib_request_r16_s::on_demand_sib_request_prohibit_timer_r16_e_"); +} +float on_demand_sib_request_r16_s::on_demand_sib_request_prohibit_timer_r16_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 30.0}; + return map_enum_number(numbers, 8, value, "on_demand_sib_request_r16_s::on_demand_sib_request_prohibit_timer_r16_e_"); +} +const char* on_demand_sib_request_r16_s::on_demand_sib_request_prohibit_timer_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.5", "1", "2", "5", "10", "20", "30"}; + return convert_enum_idx( + number_strs, 8, value, "on_demand_sib_request_r16_s::on_demand_sib_request_prohibit_timer_r16_e_"); +} + +// OtherConfig-v1610 ::= SEQUENCE +SRSASN_CODE other_cfg_v1610_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(idc_assist_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(drx_pref_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(max_bw_pref_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(max_cc_pref_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(max_mimo_layer_pref_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(min_sched_offset_pref_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(release_pref_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(ref_time_pref_report_r16_present, 1)); + HANDLE_CODE(bref.pack(bt_name_list_r16_present, 1)); + HANDLE_CODE(bref.pack(wlan_name_list_r16_present, 1)); + HANDLE_CODE(bref.pack(sensor_name_list_r16_present, 1)); + HANDLE_CODE(bref.pack(obtain_common_location_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_assist_cfg_nr_r16_present, 1)); + + if (idc_assist_cfg_r16_present) { + HANDLE_CODE(idc_assist_cfg_r16.pack(bref)); + } + if (drx_pref_cfg_r16_present) { + HANDLE_CODE(drx_pref_cfg_r16.pack(bref)); + } + if (max_bw_pref_cfg_r16_present) { + HANDLE_CODE(max_bw_pref_cfg_r16.pack(bref)); + } + if (max_cc_pref_cfg_r16_present) { + HANDLE_CODE(max_cc_pref_cfg_r16.pack(bref)); + } + if (max_mimo_layer_pref_cfg_r16_present) { + HANDLE_CODE(max_mimo_layer_pref_cfg_r16.pack(bref)); + } + if (min_sched_offset_pref_cfg_r16_present) { + HANDLE_CODE(min_sched_offset_pref_cfg_r16.pack(bref)); + } + if (release_pref_cfg_r16_present) { + HANDLE_CODE(release_pref_cfg_r16.pack(bref)); + } + if (bt_name_list_r16_present) { + HANDLE_CODE(bt_name_list_r16.pack(bref)); + } + if (wlan_name_list_r16_present) { + HANDLE_CODE(wlan_name_list_r16.pack(bref)); + } + if (sensor_name_list_r16_present) { + HANDLE_CODE(sensor_name_list_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE other_cfg_v1610_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(idc_assist_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(drx_pref_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(max_bw_pref_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(max_cc_pref_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(max_mimo_layer_pref_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(min_sched_offset_pref_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(release_pref_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(ref_time_pref_report_r16_present, 1)); + HANDLE_CODE(bref.unpack(bt_name_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(wlan_name_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(sensor_name_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(obtain_common_location_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_assist_cfg_nr_r16_present, 1)); + + if (idc_assist_cfg_r16_present) { + HANDLE_CODE(idc_assist_cfg_r16.unpack(bref)); + } + if (drx_pref_cfg_r16_present) { + HANDLE_CODE(drx_pref_cfg_r16.unpack(bref)); + } + if (max_bw_pref_cfg_r16_present) { + HANDLE_CODE(max_bw_pref_cfg_r16.unpack(bref)); + } + if (max_cc_pref_cfg_r16_present) { + HANDLE_CODE(max_cc_pref_cfg_r16.unpack(bref)); + } + if (max_mimo_layer_pref_cfg_r16_present) { + HANDLE_CODE(max_mimo_layer_pref_cfg_r16.unpack(bref)); + } + if (min_sched_offset_pref_cfg_r16_present) { + HANDLE_CODE(min_sched_offset_pref_cfg_r16.unpack(bref)); + } + if (release_pref_cfg_r16_present) { + HANDLE_CODE(release_pref_cfg_r16.unpack(bref)); + } + if (bt_name_list_r16_present) { + HANDLE_CODE(bt_name_list_r16.unpack(bref)); + } + if (wlan_name_list_r16_present) { + HANDLE_CODE(wlan_name_list_r16.unpack(bref)); + } + if (sensor_name_list_r16_present) { + HANDLE_CODE(sensor_name_list_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void other_cfg_v1610_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (idc_assist_cfg_r16_present) { + j.write_fieldname("idc-AssistanceConfig-r16"); + idc_assist_cfg_r16.to_json(j); + } + if (drx_pref_cfg_r16_present) { + j.write_fieldname("drx-PreferenceConfig-r16"); + drx_pref_cfg_r16.to_json(j); + } + if (max_bw_pref_cfg_r16_present) { + j.write_fieldname("maxBW-PreferenceConfig-r16"); + max_bw_pref_cfg_r16.to_json(j); + } + if (max_cc_pref_cfg_r16_present) { + j.write_fieldname("maxCC-PreferenceConfig-r16"); + max_cc_pref_cfg_r16.to_json(j); + } + if (max_mimo_layer_pref_cfg_r16_present) { + j.write_fieldname("maxMIMO-LayerPreferenceConfig-r16"); + max_mimo_layer_pref_cfg_r16.to_json(j); + } + if (min_sched_offset_pref_cfg_r16_present) { + j.write_fieldname("minSchedulingOffsetPreferenceConfig-r16"); + min_sched_offset_pref_cfg_r16.to_json(j); + } + if (release_pref_cfg_r16_present) { + j.write_fieldname("releasePreferenceConfig-r16"); + release_pref_cfg_r16.to_json(j); + } + if (ref_time_pref_report_r16_present) { + j.write_str("referenceTimePreferenceReporting-r16", "true"); + } + if (bt_name_list_r16_present) { + j.write_fieldname("btNameList-r16"); + bt_name_list_r16.to_json(j); + } + if (wlan_name_list_r16_present) { + j.write_fieldname("wlanNameList-r16"); + wlan_name_list_r16.to_json(j); + } + if (sensor_name_list_r16_present) { + j.write_fieldname("sensorNameList-r16"); + sensor_name_list_r16.to_json(j); + } + if (obtain_common_location_r16_present) { + j.write_str("obtainCommonLocation-r16", "true"); + } + if (sl_assist_cfg_nr_r16_present) { + j.write_str("sl-AssistanceConfigNR-r16", "true"); + } + 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 +{ + 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(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 (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)); + HANDLE_CODE(bref.pack(use_allowed_cell_list, 1)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= meas_rssi_report_cfg_r16.is_present(); + group_flags[0] |= include_common_location_info_r16_present; + group_flags[0] |= include_bt_meas_r16.is_present(); + group_flags[0] |= include_wlan_meas_r16.is_present(); + group_flags[0] |= include_sensor_meas_r16.is_present(); + group_flags[0] |= ul_delay_value_cfg_r16.is_present(); + group_flags[0] |= report_add_neigh_meas_r16_present; + group_flags[1] |= ul_excess_delay_cfg_r17.is_present(); + group_flags[1] |= coarse_location_request_r17_present; + group_flags[1] |= report_quant_relay_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(meas_rssi_report_cfg_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(include_common_location_info_r16_present, 1)); + HANDLE_CODE(bref.pack(include_bt_meas_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(include_wlan_meas_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(include_sensor_meas_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(ul_delay_value_cfg_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(report_add_neigh_meas_r16_present, 1)); + if (meas_rssi_report_cfg_r16.is_present()) { + HANDLE_CODE(meas_rssi_report_cfg_r16->pack(bref)); + } + if (include_bt_meas_r16.is_present()) { + HANDLE_CODE(include_bt_meas_r16->pack(bref)); + } + if (include_wlan_meas_r16.is_present()) { + HANDLE_CODE(include_wlan_meas_r16->pack(bref)); + } + if (include_sensor_meas_r16.is_present()) { + HANDLE_CODE(include_sensor_meas_r16->pack(bref)); + } + if (ul_delay_value_cfg_r16.is_present()) { + HANDLE_CODE(ul_delay_value_cfg_r16->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ul_excess_delay_cfg_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(coarse_location_request_r17_present, 1)); + HANDLE_CODE(bref.pack(report_quant_relay_r17.is_present(), 1)); + if (ul_excess_delay_cfg_r17.is_present()) { + HANDLE_CODE(ul_excess_delay_cfg_r17->pack(bref)); + } + if (report_quant_relay_r17.is_present()) { + HANDLE_CODE(report_quant_relay_r17->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE periodical_report_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(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 (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)); + HANDLE_CODE(bref.unpack(use_allowed_cell_list, 1)); + + 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); + + unpack_presence_flag(meas_rssi_report_cfg_r16, bref); + HANDLE_CODE(bref.unpack(include_common_location_info_r16_present, 1)); + unpack_presence_flag(include_bt_meas_r16, bref); + unpack_presence_flag(include_wlan_meas_r16, bref); + unpack_presence_flag(include_sensor_meas_r16, bref); + unpack_presence_flag(ul_delay_value_cfg_r16, bref); + HANDLE_CODE(bref.unpack(report_add_neigh_meas_r16_present, 1)); + if (meas_rssi_report_cfg_r16.is_present()) { + HANDLE_CODE(meas_rssi_report_cfg_r16->unpack(bref)); + } + if (include_bt_meas_r16.is_present()) { + HANDLE_CODE(include_bt_meas_r16->unpack(bref)); + } + if (include_wlan_meas_r16.is_present()) { + HANDLE_CODE(include_wlan_meas_r16->unpack(bref)); + } + if (include_sensor_meas_r16.is_present()) { + HANDLE_CODE(include_sensor_meas_r16->unpack(bref)); + } + if (ul_delay_value_cfg_r16.is_present()) { + HANDLE_CODE(ul_delay_value_cfg_r16->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(ul_excess_delay_cfg_r17, bref); + HANDLE_CODE(bref.unpack(coarse_location_request_r17_present, 1)); + unpack_presence_flag(report_quant_relay_r17, bref); + if (ul_excess_delay_cfg_r17.is_present()) { + HANDLE_CODE(ul_excess_delay_cfg_r17->unpack(bref)); + } + if (report_quant_relay_r17.is_present()) { + HANDLE_CODE(report_quant_relay_r17->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void periodical_report_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 (max_nrof_rs_idxes_to_report_present) { + j.write_int("maxNrofRS-IndexesToReport", max_nrof_rs_idxes_to_report); + } + j.write_bool("includeBeamMeasurements", include_beam_meass); + j.write_bool("useAllowedCellList", use_allowed_cell_list); + if (ext) { + if (meas_rssi_report_cfg_r16.is_present()) { + j.write_fieldname("measRSSI-ReportConfig-r16"); + meas_rssi_report_cfg_r16->to_json(j); + } + if (include_common_location_info_r16_present) { + j.write_str("includeCommonLocationInfo-r16", "true"); + } + if (include_bt_meas_r16.is_present()) { + j.write_fieldname("includeBT-Meas-r16"); + include_bt_meas_r16->to_json(j); + } + if (include_wlan_meas_r16.is_present()) { + j.write_fieldname("includeWLAN-Meas-r16"); + include_wlan_meas_r16->to_json(j); + } + if (include_sensor_meas_r16.is_present()) { + j.write_fieldname("includeSensor-Meas-r16"); + include_sensor_meas_r16->to_json(j); + } + if (ul_delay_value_cfg_r16.is_present()) { + j.write_fieldname("ul-DelayValueConfig-r16"); + ul_delay_value_cfg_r16->to_json(j); + } + if (report_add_neigh_meas_r16_present) { + j.write_str("reportAddNeighMeas-r16", "setup"); + } + if (ul_excess_delay_cfg_r17.is_present()) { + j.write_fieldname("ul-ExcessDelayConfig-r17"); + ul_excess_delay_cfg_r17->to_json(j); + } + if (coarse_location_request_r17_present) { + j.write_str("coarseLocationRequest-r17", "true"); + } + if (report_quant_relay_r17.is_present()) { + j.write_fieldname("reportQuantityRelay-r17"); + report_quant_relay_r17->to_json(j); + } + } + j.end_obj(); +} + +const char* periodical_report_cfg_s::report_amount_opts::to_string() const +{ + static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + return convert_enum_idx(names, 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 numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(numbers, 8, value, "periodical_report_cfg_s::report_amount_e_"); +} + +// PeriodicalReportConfigInterRAT ::= SEQUENCE +SRSASN_CODE periodical_report_cfg_inter_rat_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)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= report_quant_utra_fdd_r16.is_present(); + group_flags[1] |= include_common_location_info_r16_present; + group_flags[1] |= include_bt_meas_r16.is_present(); + group_flags[1] |= include_wlan_meas_r16.is_present(); + group_flags[1] |= include_sensor_meas_r16.is_present(); + group_flags[2] |= report_quant_relay_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(report_quant_utra_fdd_r16.is_present(), 1)); + if (report_quant_utra_fdd_r16.is_present()) { + HANDLE_CODE(report_quant_utra_fdd_r16->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(include_common_location_info_r16_present, 1)); + HANDLE_CODE(bref.pack(include_bt_meas_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(include_wlan_meas_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(include_sensor_meas_r16.is_present(), 1)); + if (include_bt_meas_r16.is_present()) { + HANDLE_CODE(include_bt_meas_r16->pack(bref)); + } + if (include_wlan_meas_r16.is_present()) { + HANDLE_CODE(include_wlan_meas_r16->pack(bref)); + } + if (include_sensor_meas_r16.is_present()) { + HANDLE_CODE(include_sensor_meas_r16->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(report_quant_relay_r17.is_present(), 1)); + if (report_quant_relay_r17.is_present()) { + HANDLE_CODE(report_quant_relay_r17->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +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)); + + if (ext) { + ext_groups_unpacker_guard group_flags(3); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(report_quant_utra_fdd_r16, bref); + if (report_quant_utra_fdd_r16.is_present()) { + HANDLE_CODE(report_quant_utra_fdd_r16->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(include_common_location_info_r16_present, 1)); + unpack_presence_flag(include_bt_meas_r16, bref); + unpack_presence_flag(include_wlan_meas_r16, bref); + unpack_presence_flag(include_sensor_meas_r16, bref); + if (include_bt_meas_r16.is_present()) { + HANDLE_CODE(include_bt_meas_r16->unpack(bref)); + } + if (include_wlan_meas_r16.is_present()) { + HANDLE_CODE(include_wlan_meas_r16->unpack(bref)); + } + if (include_sensor_meas_r16.is_present()) { + HANDLE_CODE(include_sensor_meas_r16->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(report_quant_relay_r17, bref); + if (report_quant_relay_r17.is_present()) { + HANDLE_CODE(report_quant_relay_r17->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void periodical_report_cfg_inter_rat_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); + if (ext) { + if (report_quant_utra_fdd_r16.is_present()) { + j.write_fieldname("reportQuantityUTRA-FDD-r16"); + report_quant_utra_fdd_r16->to_json(j); + } + if (include_common_location_info_r16_present) { + j.write_str("includeCommonLocationInfo-r16", "true"); + } + if (include_bt_meas_r16.is_present()) { + j.write_fieldname("includeBT-Meas-r16"); + include_bt_meas_r16->to_json(j); + } + if (include_wlan_meas_r16.is_present()) { + j.write_fieldname("includeWLAN-Meas-r16"); + include_wlan_meas_r16->to_json(j); + } + if (include_sensor_meas_r16.is_present()) { + j.write_fieldname("includeSensor-Meas-r16"); + include_sensor_meas_r16->to_json(j); + } + if (report_quant_relay_r17.is_present()) { + j.write_fieldname("reportQuantityRelay-r17"); + report_quant_relay_r17->to_json(j); + } + } + j.end_obj(); +} + +const char* periodical_report_cfg_inter_rat_s::report_amount_opts::to_string() const +{ + static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + return convert_enum_idx(names, 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 numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(numbers, 8, value, "periodical_report_cfg_inter_rat_s::report_amount_e_"); +} + +// PeriodicalReportConfigNR-SL-r16 ::= SEQUENCE +SRSASN_CODE periodical_report_cfg_nr_sl_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(report_interv_r16.pack(bref)); + HANDLE_CODE(report_amount_r16.pack(bref)); + HANDLE_CODE(report_quant_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE periodical_report_cfg_nr_sl_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(report_interv_r16.unpack(bref)); + HANDLE_CODE(report_amount_r16.unpack(bref)); + HANDLE_CODE(report_quant_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void periodical_report_cfg_nr_sl_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("reportInterval-r16", report_interv_r16.to_string()); + j.write_str("reportAmount-r16", report_amount_r16.to_string()); + j.write_fieldname("reportQuantity-r16"); + report_quant_r16.to_json(j); + j.end_obj(); +} + +const char* periodical_report_cfg_nr_sl_r16_s::report_amount_r16_opts::to_string() const +{ + static const char* names[] = {"r1", "r2", "r4", "r8", "r16", "r32", "r64", "infinity"}; + return convert_enum_idx(names, 8, value, "periodical_report_cfg_nr_sl_r16_s::report_amount_r16_e_"); +} +int8_t periodical_report_cfg_nr_sl_r16_s::report_amount_r16_opts::to_number() const +{ + static const int8_t numbers[] = {1, 2, 4, 8, 16, 32, 64, -1}; + return map_enum_number(numbers, 8, value, "periodical_report_cfg_nr_sl_r16_s::report_amount_r16_e_"); +} + +// RAN-AreaConfig ::= SEQUENCE +SRSASN_CODE ran_area_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ran_area_code_list.size() > 0, 1)); + + HANDLE_CODE(tac.pack(bref)); + if (ran_area_code_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, ran_area_code_list, 1, 32, integer_packer(0, 255))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ran_area_cfg_s::unpack(cbit_ref& bref) +{ + bool ran_area_code_list_present; + 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.size() > 0) { + j.start_array("ran-AreaCodeList"); + for (const auto& e1 : ran_area_code_list) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} + +// RMTC-Config-r16 ::= SEQUENCE +SRSASN_CODE rmtc_cfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rmtc_sf_offset_r16_present, 1)); + + HANDLE_CODE(rmtc_periodicity_r16.pack(bref)); + if (rmtc_sf_offset_r16_present) { + HANDLE_CODE(pack_integer(bref, rmtc_sf_offset_r16, (uint16_t)0u, (uint16_t)639u)); + } + HANDLE_CODE(meas_dur_symbols_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, rmtc_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(ref_scs_cp_r16.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= rmtc_bw_r17_present; + group_flags[0] |= meas_dur_symbols_v1700_present; + group_flags[0] |= ref_scs_cp_v1700_present; + group_flags[0] |= tci_state_info_r17.is_present(); + group_flags[1] |= ref_bwp_id_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(rmtc_bw_r17_present, 1)); + HANDLE_CODE(bref.pack(meas_dur_symbols_v1700_present, 1)); + HANDLE_CODE(bref.pack(ref_scs_cp_v1700_present, 1)); + HANDLE_CODE(bref.pack(tci_state_info_r17.is_present(), 1)); + if (rmtc_bw_r17_present) { + HANDLE_CODE(rmtc_bw_r17.pack(bref)); + } + if (meas_dur_symbols_v1700_present) { + HANDLE_CODE(meas_dur_symbols_v1700.pack(bref)); + } + if (ref_scs_cp_v1700_present) { + HANDLE_CODE(ref_scs_cp_v1700.pack(bref)); + } + if (tci_state_info_r17.is_present()) { + HANDLE_CODE(bref.pack(tci_state_info_r17->ref_serv_cell_id_r17_present, 1)); + HANDLE_CODE(pack_integer(bref, tci_state_info_r17->tci_state_id_r17, (uint8_t)0u, (uint8_t)127u)); + if (tci_state_info_r17->ref_serv_cell_id_r17_present) { + HANDLE_CODE(pack_integer(bref, tci_state_info_r17->ref_serv_cell_id_r17, (uint8_t)0u, (uint8_t)31u)); + } + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ref_bwp_id_r17_present, 1)); + if (ref_bwp_id_r17_present) { + HANDLE_CODE(pack_integer(bref, ref_bwp_id_r17, (uint8_t)0u, (uint8_t)4u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rmtc_cfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rmtc_sf_offset_r16_present, 1)); + + HANDLE_CODE(rmtc_periodicity_r16.unpack(bref)); + if (rmtc_sf_offset_r16_present) { + HANDLE_CODE(unpack_integer(rmtc_sf_offset_r16, bref, (uint16_t)0u, (uint16_t)639u)); + } + HANDLE_CODE(meas_dur_symbols_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(rmtc_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(ref_scs_cp_r16.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(rmtc_bw_r17_present, 1)); + HANDLE_CODE(bref.unpack(meas_dur_symbols_v1700_present, 1)); + HANDLE_CODE(bref.unpack(ref_scs_cp_v1700_present, 1)); + unpack_presence_flag(tci_state_info_r17, bref); + if (rmtc_bw_r17_present) { + HANDLE_CODE(rmtc_bw_r17.unpack(bref)); + } + if (meas_dur_symbols_v1700_present) { + HANDLE_CODE(meas_dur_symbols_v1700.unpack(bref)); + } + if (ref_scs_cp_v1700_present) { + HANDLE_CODE(ref_scs_cp_v1700.unpack(bref)); + } + if (tci_state_info_r17.is_present()) { + HANDLE_CODE(bref.unpack(tci_state_info_r17->ref_serv_cell_id_r17_present, 1)); + HANDLE_CODE(unpack_integer(tci_state_info_r17->tci_state_id_r17, bref, (uint8_t)0u, (uint8_t)127u)); + if (tci_state_info_r17->ref_serv_cell_id_r17_present) { + HANDLE_CODE(unpack_integer(tci_state_info_r17->ref_serv_cell_id_r17, bref, (uint8_t)0u, (uint8_t)31u)); + } + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(ref_bwp_id_r17_present, 1)); + if (ref_bwp_id_r17_present) { + HANDLE_CODE(unpack_integer(ref_bwp_id_r17, bref, (uint8_t)0u, (uint8_t)4u)); + } + } + } + return SRSASN_SUCCESS; +} +void rmtc_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("rmtc-Periodicity-r16", rmtc_periodicity_r16.to_string()); + if (rmtc_sf_offset_r16_present) { + j.write_int("rmtc-SubframeOffset-r16", rmtc_sf_offset_r16); + } + j.write_str("measDurationSymbols-r16", meas_dur_symbols_r16.to_string()); + j.write_int("rmtc-Frequency-r16", rmtc_freq_r16); + j.write_str("ref-SCS-CP-r16", ref_scs_cp_r16.to_string()); + if (ext) { + if (rmtc_bw_r17_present) { + j.write_str("rmtc-Bandwidth-r17", rmtc_bw_r17.to_string()); + } + if (meas_dur_symbols_v1700_present) { + j.write_str("measDurationSymbols-v1700", meas_dur_symbols_v1700.to_string()); + } + if (ref_scs_cp_v1700_present) { + j.write_str("ref-SCS-CP-v1700", ref_scs_cp_v1700.to_string()); + } + if (tci_state_info_r17.is_present()) { + j.write_fieldname("tci-StateInfo-r17"); + j.start_obj(); + j.write_int("tci-StateId-r17", tci_state_info_r17->tci_state_id_r17); + if (tci_state_info_r17->ref_serv_cell_id_r17_present) { + j.write_int("ref-ServCellId-r17", tci_state_info_r17->ref_serv_cell_id_r17); + } + j.end_obj(); + } + if (ref_bwp_id_r17_present) { + j.write_int("ref-BWPId-r17", ref_bwp_id_r17); + } + } + j.end_obj(); +} + +const char* rmtc_cfg_r16_s::rmtc_periodicity_r16_opts::to_string() const +{ + static const char* names[] = {"ms40", "ms80", "ms160", "ms320", "ms640"}; + return convert_enum_idx(names, 5, value, "rmtc_cfg_r16_s::rmtc_periodicity_r16_e_"); +} +uint16_t rmtc_cfg_r16_s::rmtc_periodicity_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {40, 80, 160, 320, 640}; + return map_enum_number(numbers, 5, value, "rmtc_cfg_r16_s::rmtc_periodicity_r16_e_"); +} + +const char* rmtc_cfg_r16_s::meas_dur_symbols_r16_opts::to_string() const +{ + static const char* names[] = {"sym1", "sym14or12", "sym28or24", "sym42or36", "sym70or60"}; + return convert_enum_idx(names, 5, value, "rmtc_cfg_r16_s::meas_dur_symbols_r16_e_"); +} +uint8_t rmtc_cfg_r16_s::meas_dur_symbols_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 14, 28, 42, 70}; + return map_enum_number(numbers, 5, value, "rmtc_cfg_r16_s::meas_dur_symbols_r16_e_"); +} + +const char* rmtc_cfg_r16_s::ref_scs_cp_r16_opts::to_string() const +{ + static const char* names[] = {"kHz15", "kHz30", "kHz60-NCP", "kHz60-ECP"}; + return convert_enum_idx(names, 4, value, "rmtc_cfg_r16_s::ref_scs_cp_r16_e_"); +} + +const char* rmtc_cfg_r16_s::rmtc_bw_r17_opts::to_string() const +{ + static const char* names[] = {"mhz100", "mhz400", "mhz800", "mhz1600", "mhz2000"}; + return convert_enum_idx(names, 5, value, "rmtc_cfg_r16_s::rmtc_bw_r17_e_"); +} +uint16_t rmtc_cfg_r16_s::rmtc_bw_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {100, 400, 800, 1600, 2000}; + return map_enum_number(numbers, 5, value, "rmtc_cfg_r16_s::rmtc_bw_r17_e_"); +} + +const char* rmtc_cfg_r16_s::meas_dur_symbols_v1700_opts::to_string() const +{ + static const char* names[] = {"sym140", "sym560", "sym1120"}; + return convert_enum_idx(names, 3, value, "rmtc_cfg_r16_s::meas_dur_symbols_v1700_e_"); +} +uint16_t rmtc_cfg_r16_s::meas_dur_symbols_v1700_opts::to_number() const +{ + static const uint16_t numbers[] = {140, 560, 1120}; + return map_enum_number(numbers, 3, value, "rmtc_cfg_r16_s::meas_dur_symbols_v1700_e_"); +} + +const char* rmtc_cfg_r16_s::ref_scs_cp_v1700_opts::to_string() const +{ + static const char* names[] = {"kHz120", "kHz480", "kHz960"}; + return convert_enum_idx(names, 3, value, "rmtc_cfg_r16_s::ref_scs_cp_v1700_e_"); +} +uint16_t rmtc_cfg_r16_s::ref_scs_cp_v1700_opts::to_number() const +{ + static const uint16_t numbers[] = {120, 480, 960}; + return map_enum_number(numbers, 3, value, "rmtc_cfg_r16_s::ref_scs_cp_v1700_e_"); +} + +// RRCReconfiguration-v1700-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(other_cfg_v1700_present, 1)); + HANDLE_CODE(bref.pack(sl_l2_relay_ue_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_l2_remote_ue_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(ded_paging_delivery_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(need_for_gap_ncsg_cfg_nr_r17_present, 1)); + HANDLE_CODE(bref.pack(need_for_gap_ncsg_cfg_eutra_r17_present, 1)); + HANDLE_CODE(bref.pack(musim_gap_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(ul_gap_fr2_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(scg_state_r17_present, 1)); + HANDLE_CODE(bref.pack(app_layer_meas_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(ue_tx_teg_request_ul_tdoa_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (other_cfg_v1700_present) { + HANDLE_CODE(other_cfg_v1700.pack(bref)); + } + if (sl_l2_relay_ue_cfg_r17_present) { + HANDLE_CODE(sl_l2_relay_ue_cfg_r17.pack(bref)); + } + if (sl_l2_remote_ue_cfg_r17_present) { + HANDLE_CODE(sl_l2_remote_ue_cfg_r17.pack(bref)); + } + if (ded_paging_delivery_r17.size() > 0) { + HANDLE_CODE(ded_paging_delivery_r17.pack(bref)); + } + if (need_for_gap_ncsg_cfg_nr_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_cfg_nr_r17.pack(bref)); + } + if (need_for_gap_ncsg_cfg_eutra_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_cfg_eutra_r17.pack(bref)); + } + if (musim_gap_cfg_r17_present) { + HANDLE_CODE(musim_gap_cfg_r17.pack(bref)); + } + if (ul_gap_fr2_cfg_r17_present) { + HANDLE_CODE(ul_gap_fr2_cfg_r17.pack(bref)); + } + if (app_layer_meas_cfg_r17_present) { + HANDLE_CODE(app_layer_meas_cfg_r17.pack(bref)); + } + if (ue_tx_teg_request_ul_tdoa_cfg_r17_present) { + HANDLE_CODE(ue_tx_teg_request_ul_tdoa_cfg_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_v1700_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(other_cfg_v1700_present, 1)); + HANDLE_CODE(bref.unpack(sl_l2_relay_ue_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_l2_remote_ue_cfg_r17_present, 1)); + bool ded_paging_delivery_r17_present; + HANDLE_CODE(bref.unpack(ded_paging_delivery_r17_present, 1)); + HANDLE_CODE(bref.unpack(need_for_gap_ncsg_cfg_nr_r17_present, 1)); + HANDLE_CODE(bref.unpack(need_for_gap_ncsg_cfg_eutra_r17_present, 1)); + HANDLE_CODE(bref.unpack(musim_gap_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(ul_gap_fr2_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(scg_state_r17_present, 1)); + HANDLE_CODE(bref.unpack(app_layer_meas_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(ue_tx_teg_request_ul_tdoa_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (other_cfg_v1700_present) { + HANDLE_CODE(other_cfg_v1700.unpack(bref)); + } + if (sl_l2_relay_ue_cfg_r17_present) { + HANDLE_CODE(sl_l2_relay_ue_cfg_r17.unpack(bref)); + } + if (sl_l2_remote_ue_cfg_r17_present) { + HANDLE_CODE(sl_l2_remote_ue_cfg_r17.unpack(bref)); + } + if (ded_paging_delivery_r17_present) { + HANDLE_CODE(ded_paging_delivery_r17.unpack(bref)); + } + if (need_for_gap_ncsg_cfg_nr_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_cfg_nr_r17.unpack(bref)); + } + if (need_for_gap_ncsg_cfg_eutra_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_cfg_eutra_r17.unpack(bref)); + } + if (musim_gap_cfg_r17_present) { + HANDLE_CODE(musim_gap_cfg_r17.unpack(bref)); + } + if (ul_gap_fr2_cfg_r17_present) { + HANDLE_CODE(ul_gap_fr2_cfg_r17.unpack(bref)); + } + if (app_layer_meas_cfg_r17_present) { + HANDLE_CODE(app_layer_meas_cfg_r17.unpack(bref)); + } + if (ue_tx_teg_request_ul_tdoa_cfg_r17_present) { + HANDLE_CODE(ue_tx_teg_request_ul_tdoa_cfg_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_recfg_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (other_cfg_v1700_present) { + j.write_fieldname("otherConfig-v1700"); + other_cfg_v1700.to_json(j); + } + if (sl_l2_relay_ue_cfg_r17_present) { + j.write_fieldname("sl-L2RelayUE-Config-r17"); + sl_l2_relay_ue_cfg_r17.to_json(j); + } + if (sl_l2_remote_ue_cfg_r17_present) { + j.write_fieldname("sl-L2RemoteUE-Config-r17"); + sl_l2_remote_ue_cfg_r17.to_json(j); + } + if (ded_paging_delivery_r17.size() > 0) { + j.write_str("dedicatedPagingDelivery-r17", ded_paging_delivery_r17.to_string()); + } + if (need_for_gap_ncsg_cfg_nr_r17_present) { + j.write_fieldname("needForGapNCSG-ConfigNR-r17"); + need_for_gap_ncsg_cfg_nr_r17.to_json(j); + } + if (need_for_gap_ncsg_cfg_eutra_r17_present) { + j.write_fieldname("needForGapNCSG-ConfigEUTRA-r17"); + need_for_gap_ncsg_cfg_eutra_r17.to_json(j); + } + if (musim_gap_cfg_r17_present) { + j.write_fieldname("musim-GapConfig-r17"); + musim_gap_cfg_r17.to_json(j); + } + if (ul_gap_fr2_cfg_r17_present) { + j.write_fieldname("ul-GapFR2-Config-r17"); + ul_gap_fr2_cfg_r17.to_json(j); + } + if (scg_state_r17_present) { + j.write_str("scg-State-r17", "deactivated"); + } + if (app_layer_meas_cfg_r17_present) { + j.write_fieldname("appLayerMeasConfig-r17"); + app_layer_meas_cfg_r17.to_json(j); + } + if (ue_tx_teg_request_ul_tdoa_cfg_r17_present) { + j.write_fieldname("ue-TxTEG-RequestUL-TDOA-Config-r17"); + ue_tx_teg_request_ul_tdoa_cfg_r17.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// ReferenceSignalConfig ::= SEQUENCE +SRSASN_CODE ref_sig_cfg_s::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)); + } + + 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)); + + 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 +{ + 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(); +} + +// ReportCGI ::= SEQUENCE +SRSASN_CODE report_cgi_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)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= use_autonomous_gaps_r16_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(use_autonomous_gaps_r16_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)); + + 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(use_autonomous_gaps_r16_present, 1)); + } + } + 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); + if (ext) { + if (use_autonomous_gaps_r16_present) { + j.write_str("useAutonomousGaps-r16", "setup"); + } + } + 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)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= use_autonomous_gaps_r16_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(use_autonomous_gaps_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cgi_eutra_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)); + + 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(use_autonomous_gaps_r16_present, 1)); + } + } + 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); + if (ext) { + if (use_autonomous_gaps_r16_present) { + j.write_str("useAutonomousGaps-r16", "setup"); + } + } + j.end_obj(); +} + +// ReportSFTD-EUTRA ::= SEQUENCE +SRSASN_CODE report_sftd_eutra_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(report_sftd_meas, 1)); + HANDLE_CODE(bref.pack(report_rsrp, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE report_sftd_eutra_s::unpack(cbit_ref& bref) +{ + 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(); +} + +// ReportSFTD-NR ::= SEQUENCE +SRSASN_CODE report_sftd_nr_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(report_sftd_meas, 1)); + HANDLE_CODE(bref.pack(report_rsrp, 1)); + + 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 report_sftd_nr_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(report_sftd_meas, 1)); + HANDLE_CODE(bref.unpack(report_rsrp, 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(report_sftd_neigh_meas_present, 1)); + HANDLE_CODE(bref.unpack(drx_sftd_neigh_meas_present, 1)); + unpack_presence_flag(cells_for_which_to_report_sftd, bref); + 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 report_sftd_nr_s::to_json(json_writer& j) const +{ + j.start_obj(); + 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.end_obj(); +} + +// RxTxPeriodical-r17 ::= SEQUENCE +SRSASN_CODE rx_tx_periodical_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rx_tx_report_interv_r17_present, 1)); + + if (rx_tx_report_interv_r17_present) { + HANDLE_CODE(rx_tx_report_interv_r17.pack(bref)); + } + HANDLE_CODE(report_amount_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rx_tx_periodical_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rx_tx_report_interv_r17_present, 1)); + + if (rx_tx_report_interv_r17_present) { + HANDLE_CODE(rx_tx_report_interv_r17.unpack(bref)); + } + HANDLE_CODE(report_amount_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rx_tx_periodical_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rx_tx_report_interv_r17_present) { + j.write_str("rxTxReportInterval-r17", rx_tx_report_interv_r17.to_string()); + } + j.write_str("reportAmount-r17", report_amount_r17.to_string()); + j.end_obj(); +} + +const char* rx_tx_periodical_r17_s::report_amount_r17_opts::to_string() const +{ + static const char* names[] = {"r1", "infinity", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "rx_tx_periodical_r17_s::report_amount_r17_e_"); +} +int8_t rx_tx_periodical_r17_s::report_amount_r17_opts::to_number() const +{ + static const int8_t numbers[] = {1, -1}; + return map_enum_number(numbers, 2, value, "rx_tx_periodical_r17_s::report_amount_r17_e_"); +} + +// SL-ConfigDedicatedEUTRA-Info-r16 ::= SEQUENCE +SRSASN_CODE sl_cfg_ded_eutra_info_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sl_cfg_ded_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_time_offset_eutra_list_r16_present, 1)); + + if (sl_cfg_ded_eutra_r16.size() > 0) { + HANDLE_CODE(sl_cfg_ded_eutra_r16.pack(bref)); + } + if (sl_time_offset_eutra_list_r16_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, sl_time_offset_eutra_list_r16, sl_time_offset_eutra_list_r16.size())); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_cfg_ded_eutra_info_r16_s::unpack(cbit_ref& bref) +{ + bool sl_cfg_ded_eutra_r16_present; + HANDLE_CODE(bref.unpack(sl_cfg_ded_eutra_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_time_offset_eutra_list_r16_present, 1)); + + if (sl_cfg_ded_eutra_r16_present) { + HANDLE_CODE(sl_cfg_ded_eutra_r16.unpack(bref)); + } + if (sl_time_offset_eutra_list_r16_present) { + HANDLE_CODE(unpack_fixed_seq_of(sl_time_offset_eutra_list_r16, bref, sl_time_offset_eutra_list_r16.size())); + } + + return SRSASN_SUCCESS; +} +void sl_cfg_ded_eutra_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_cfg_ded_eutra_r16.size() > 0) { + j.write_str("sl-ConfigDedicatedEUTRA-r16", sl_cfg_ded_eutra_r16.to_string()); + } + if (sl_time_offset_eutra_list_r16_present) { + j.start_array("sl-TimeOffsetEUTRA-List-r16"); + for (const auto& e1 : sl_time_offset_eutra_list_r16) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + j.end_obj(); +} + +// SSB-MTC2 ::= SEQUENCE +SRSASN_CODE ssb_mtc2_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pci_list.size() > 0, 1)); + + if (pci_list.size() > 0) { + 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) +{ + bool pci_list_present; + 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(); + if (pci_list.size() > 0) { + 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(); +} + +const char* ssb_mtc2_s::periodicity_opts::to_string() const +{ + static const char* names[] = {"sf5", "sf10", "sf20", "sf40", "sf80", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "ssb_mtc2_s::periodicity_e_"); +} +uint8_t ssb_mtc2_s::periodicity_opts::to_number() const +{ + static const uint8_t numbers[] = {5, 10, 20, 40, 80}; + return map_enum_number(numbers, 5, value, "ssb_mtc2_s::periodicity_e_"); +} + +// SliceInfoDedicated-r17 ::= SEQUENCE +SRSASN_CODE slice_info_ded_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(nsag_cell_resel_prio_r17_present, 1)); + HANDLE_CODE(bref.pack(nsag_cell_resel_sub_prio_r17_present, 1)); + + HANDLE_CODE(nsag_id_info_r17.pack(bref)); + if (nsag_cell_resel_prio_r17_present) { + HANDLE_CODE(pack_integer(bref, nsag_cell_resel_prio_r17, (uint8_t)0u, (uint8_t)7u)); + } + if (nsag_cell_resel_sub_prio_r17_present) { + HANDLE_CODE(nsag_cell_resel_sub_prio_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE slice_info_ded_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(nsag_cell_resel_prio_r17_present, 1)); + HANDLE_CODE(bref.unpack(nsag_cell_resel_sub_prio_r17_present, 1)); + + HANDLE_CODE(nsag_id_info_r17.unpack(bref)); + if (nsag_cell_resel_prio_r17_present) { + HANDLE_CODE(unpack_integer(nsag_cell_resel_prio_r17, bref, (uint8_t)0u, (uint8_t)7u)); + } + if (nsag_cell_resel_sub_prio_r17_present) { + HANDLE_CODE(nsag_cell_resel_sub_prio_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void slice_info_ded_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("nsag-IdentityInfo-r17"); + nsag_id_info_r17.to_json(j); + if (nsag_cell_resel_prio_r17_present) { + j.write_int("nsag-CellReselectionPriority-r17", nsag_cell_resel_prio_r17); + } + if (nsag_cell_resel_sub_prio_r17_present) { + j.write_str("nsag-CellReselectionSubPriority-r17", nsag_cell_resel_sub_prio_r17.to_string()); + } + j.end_obj(); +} + +// T312-r16 ::= ENUMERATED +const char* t312_r16_opts::to_string() const +{ + static const char* names[] = {"ms0", "ms50", "ms100", "ms200", "ms300", "ms400", "ms500", "ms1000"}; + return convert_enum_idx(names, 8, value, "t312_r16_e"); +} +uint16_t t312_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {0, 50, 100, 200, 300, 400, 500, 1000}; + return map_enum_number(numbers, 8, value, "t312_r16_e"); +} + +// T316-r16 ::= ENUMERATED +const char* t316_r16_opts::to_string() const +{ + static const char* names[] = { + "ms50", "ms100", "ms200", "ms300", "ms400", "ms500", "ms600", "ms1000", "ms1500", "ms2000"}; + return convert_enum_idx(names, 10, value, "t316_r16_e"); +} +uint16_t t316_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {50, 100, 200, 300, 400, 500, 600, 1000, 1500, 2000}; + return map_enum_number(numbers, 10, value, "t316_r16_e"); +} + +// TrackingAreaIdentity-r16 ::= SEQUENCE +SRSASN_CODE tracking_area_id_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(plmn_id_r16.pack(bref)); + HANDLE_CODE(tac_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE tracking_area_id_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(plmn_id_r16.unpack(bref)); + HANDLE_CODE(tac_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void tracking_area_id_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Identity-r16"); + plmn_id_r16.to_json(j); + j.write_str("trackingAreaCode-r16", tac_r16.to_string()); + j.end_obj(); +} + +// UTRA-FDD-Q-OffsetRange-r16 ::= ENUMERATED +const char* utra_fdd_q_offset_range_r16_opts::to_string() const +{ + static const char* names[] = {"dB-24", "dB-22", "dB-20", "dB-18", "dB-16", "dB-14", "dB-12", "dB-10", + "dB-8", "dB-6", "dB-5", "dB-4", "dB-3", "dB-2", "dB-1", "dB0", + "dB1", "dB2", "dB3", "dB4", "dB5", "dB6", "dB8", "dB10", + "dB12", "dB14", "dB16", "dB18", "dB20", "dB22", "dB24"}; + return convert_enum_idx(names, 31, value, "utra_fdd_q_offset_range_r16_e"); +} +int8_t utra_fdd_q_offset_range_r16_opts::to_number() const +{ + static const int8_t numbers[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, + 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return map_enum_number(numbers, 31, value, "utra_fdd_q_offset_range_r16_e"); +} + +// ValidityArea-r16 ::= SEQUENCE +SRSASN_CODE validity_area_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(validity_cell_list_r16.size() > 0, 1)); + + HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); + if (validity_cell_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, validity_cell_list_r16, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE validity_area_r16_s::unpack(cbit_ref& bref) +{ + bool validity_cell_list_r16_present; + HANDLE_CODE(bref.unpack(validity_cell_list_r16_present, 1)); + + HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + if (validity_cell_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(validity_cell_list_r16, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void validity_area_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r16", carrier_freq_r16); + if (validity_cell_list_r16.size() > 0) { + j.start_array("validityCellList-r16"); + for (const auto& e1 : validity_cell_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// MRDC-SecondaryCellGroupConfig ::= SEQUENCE +SRSASN_CODE mrdc_secondary_cell_group_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mrdc_release_and_add_present, 1)); + + HANDLE_CODE(mrdc_secondary_cell_group.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mrdc_secondary_cell_group_cfg_s::unpack(cbit_ref& bref) +{ + 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 mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::destroy_() +{ + switch (type_) { + case types::nr_scg: + c.destroy(); + break; + case types::eutra_scg: + c.destroy(); + break; + default: + break; + } +} +void mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nr_scg: + c.init(); + break; + case types::eutra_scg: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); + } +} +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::nr_scg: + c.init(other.c.get()); + break; + case types::eutra_scg: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); + } +} +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::nr_scg: + c.set(other.c.get()); + break; + case types::eutra_scg: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); + } + + return *this; +} +dyn_octstring& mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::set_nr_scg() +{ + set(types::nr_scg); + return c.get(); +} +dyn_octstring& mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::set_eutra_scg() +{ + set(types::eutra_scg); + return c.get(); +} +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::nr_scg: + j.write_str("nr-SCG", c.get().to_string()); + break; + case types::eutra_scg: + j.write_str("eutra-SCG", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); + } + j.end_obj(); +} +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::nr_scg: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eutra_scg: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + 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 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::nr_scg: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eutra_scg: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::types_opts::to_string() const +{ + static const char* names[] = {"nr-SCG", "eutra-SCG"}; + return convert_enum_idx(names, 2, value, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::types"); +} + +// MeasGapSharingScheme ::= ENUMERATED +const char* meas_gap_sharing_scheme_opts::to_string() const +{ + static const char* names[] = {"scheme00", "scheme01", "scheme10", "scheme11"}; + return convert_enum_idx(names, 4, value, "meas_gap_sharing_scheme_e"); +} +float meas_gap_sharing_scheme_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.1, 1.0, 1.1}; + return map_enum_number(numbers, 4, value, "meas_gap_sharing_scheme_e"); +} +const char* meas_gap_sharing_scheme_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.0", "0.1", "1.0", "1.1"}; + return convert_enum_idx(number_strs, 4, value, "meas_gap_sharing_scheme_e"); +} + +// MeasObjectCLI-r16 ::= SEQUENCE +SRSASN_CODE meas_obj_cli_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(cli_res_cfg_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_cli_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(cli_res_cfg_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void meas_obj_cli_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("cli-ResourceConfig-r16"); + cli_res_cfg_r16.to_json(j); + j.end_obj(); +} + +// MeasObjectEUTRA ::= SEQUENCE +SRSASN_CODE meas_obj_eutra_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cells_to_rem_list_eutran.size() > 0, 1)); + HANDLE_CODE(bref.pack(cells_to_add_mod_list_eutran.size() > 0, 1)); + HANDLE_CODE(bref.pack(excluded_cells_to_rem_list_eutran.size() > 0, 1)); + HANDLE_CODE(bref.pack(excluded_cells_to_add_mod_list_eutran.size() > 0, 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.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_add_mod_list_eutran, 1, 32)); + } + if (excluded_cells_to_rem_list_eutran.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, excluded_cells_to_rem_list_eutran, 1, 32, integer_packer(1, 32))); + } + if (excluded_cells_to_add_mod_list_eutran.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, excluded_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)); + } + HANDLE_CODE(bref.pack(wideband_rsrq_meas, 1)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= associated_meas_gap_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(associated_meas_gap_r17_present, 1)); + if (associated_meas_gap_r17_present) { + HANDLE_CODE(pack_integer(bref, associated_meas_gap_r17, (uint8_t)1u, (uint8_t)8u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_eutra_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool cells_to_rem_list_eutran_present; + HANDLE_CODE(bref.unpack(cells_to_rem_list_eutran_present, 1)); + bool cells_to_add_mod_list_eutran_present; + HANDLE_CODE(bref.unpack(cells_to_add_mod_list_eutran_present, 1)); + bool excluded_cells_to_rem_list_eutran_present; + HANDLE_CODE(bref.unpack(excluded_cells_to_rem_list_eutran_present, 1)); + bool excluded_cells_to_add_mod_list_eutran_present; + HANDLE_CODE(bref.unpack(excluded_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)); + } + if (excluded_cells_to_rem_list_eutran_present) { + HANDLE_CODE(unpack_dyn_seq_of(excluded_cells_to_rem_list_eutran, bref, 1, 32, integer_packer(1, 32))); + } + if (excluded_cells_to_add_mod_list_eutran_present) { + HANDLE_CODE(unpack_dyn_seq_of(excluded_cells_to_add_mod_list_eutran, bref, 1, 32)); + } + 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)); + + 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(associated_meas_gap_r17_present, 1)); + if (associated_meas_gap_r17_present) { + HANDLE_CODE(unpack_integer(associated_meas_gap_r17, bref, (uint8_t)1u, (uint8_t)8u)); + } + } + } + return SRSASN_SUCCESS; +} +void meas_obj_eutra_s::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.size() > 0) { + 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.size() > 0) { + j.start_array("cellsToAddModListEUTRAN"); + for (const auto& e1 : cells_to_add_mod_list_eutran) { + e1.to_json(j); + } + j.end_array(); + } + if (excluded_cells_to_rem_list_eutran.size() > 0) { + j.start_array("excludedCellsToRemoveListEUTRAN"); + for (const auto& e1 : excluded_cells_to_rem_list_eutran) { + j.write_int(e1); + } + j.end_array(); + } + if (excluded_cells_to_add_mod_list_eutran.size() > 0) { + j.start_array("excludedCellsToAddModListEUTRAN"); + for (const auto& e1 : excluded_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()); + } + j.write_bool("widebandRSRQ-Meas", wideband_rsrq_meas); + if (ext) { + if (associated_meas_gap_r17_present) { + j.write_int("associatedMeasGap-r17", associated_meas_gap_r17); + } + } + j.end_obj(); +} + +// MeasObjectNR ::= SEQUENCE +SRSASN_CODE meas_obj_nr_s::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.size() > 0, 1)); + HANDLE_CODE(bref.pack(cells_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(excluded_cells_to_rem_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(excluded_cells_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(allowed_cells_to_rem_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(allowed_cells_to_add_mod_list.size() > 0, 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_rem_list, 1, 32, integer_packer(0, 1007))); + } + if (cells_to_add_mod_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_add_mod_list, 1, 32)); + } + if (excluded_cells_to_rem_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, excluded_cells_to_rem_list, 1, 8, integer_packer(1, 8))); + } + if (excluded_cells_to_add_mod_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, excluded_cells_to_add_mod_list, 1, 8)); + } + if (allowed_cells_to_rem_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, allowed_cells_to_rem_list, 1, 8, integer_packer(1, 8))); + } + if (allowed_cells_to_add_mod_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, allowed_cells_to_add_mod_list, 1, 8)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= freq_band_ind_nr_present; + group_flags[0] |= meas_cycle_scell_present; + group_flags[1] |= smtc3list_r16.is_present(); + group_flags[1] |= rmtc_cfg_r16.is_present(); + group_flags[1] |= t312_r16.is_present(); + group_flags[2] |= associated_meas_gap_ssb_r17_present; + group_flags[2] |= associated_meas_gap_csi_rs_r17_present; + group_flags[2] |= smtc4list_r17.is_present(); + group_flags[2] |= meas_cycle_pscell_r17_present; + group_flags[2] |= cells_to_add_mod_list_ext_v1710.is_present(); + group_flags[3] |= associated_meas_gap_ssb2_v1720_present; + group_flags[3] |= associated_meas_gap_csi_rs2_v1720_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_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)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(smtc3list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(rmtc_cfg_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(t312_r16.is_present(), 1)); + if (smtc3list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *smtc3list_r16, 1, 4)); + } + if (rmtc_cfg_r16.is_present()) { + HANDLE_CODE(rmtc_cfg_r16->pack(bref)); + } + if (t312_r16.is_present()) { + HANDLE_CODE(t312_r16->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(associated_meas_gap_ssb_r17_present, 1)); + HANDLE_CODE(bref.pack(associated_meas_gap_csi_rs_r17_present, 1)); + HANDLE_CODE(bref.pack(smtc4list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(meas_cycle_pscell_r17_present, 1)); + HANDLE_CODE(bref.pack(cells_to_add_mod_list_ext_v1710.is_present(), 1)); + if (associated_meas_gap_ssb_r17_present) { + HANDLE_CODE(pack_integer(bref, associated_meas_gap_ssb_r17, (uint8_t)1u, (uint8_t)8u)); + } + if (associated_meas_gap_csi_rs_r17_present) { + HANDLE_CODE(pack_integer(bref, associated_meas_gap_csi_rs_r17, (uint8_t)1u, (uint8_t)8u)); + } + if (smtc4list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *smtc4list_r17, 1, 3)); + } + if (meas_cycle_pscell_r17_present) { + HANDLE_CODE(meas_cycle_pscell_r17.pack(bref)); + } + if (cells_to_add_mod_list_ext_v1710.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cells_to_add_mod_list_ext_v1710, 1, 32)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(associated_meas_gap_ssb2_v1720_present, 1)); + HANDLE_CODE(bref.pack(associated_meas_gap_csi_rs2_v1720_present, 1)); + if (associated_meas_gap_ssb2_v1720_present) { + HANDLE_CODE(pack_integer(bref, associated_meas_gap_ssb2_v1720, (uint8_t)1u, (uint8_t)8u)); + } + if (associated_meas_gap_csi_rs2_v1720_present) { + HANDLE_CODE(pack_integer(bref, associated_meas_gap_csi_rs2_v1720, (uint8_t)1u, (uint8_t)8u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_nr_s::unpack(cbit_ref& bref) +{ + 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)); + bool cells_to_rem_list_present; + HANDLE_CODE(bref.unpack(cells_to_rem_list_present, 1)); + bool cells_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(cells_to_add_mod_list_present, 1)); + bool excluded_cells_to_rem_list_present; + HANDLE_CODE(bref.unpack(excluded_cells_to_rem_list_present, 1)); + bool excluded_cells_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(excluded_cells_to_add_mod_list_present, 1)); + bool allowed_cells_to_rem_list_present; + HANDLE_CODE(bref.unpack(allowed_cells_to_rem_list_present, 1)); + bool allowed_cells_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(allowed_cells_to_add_mod_list_present, 1)); + + if (ssb_freq_present) { + HANDLE_CODE(unpack_integer(ssb_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); + } + 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 (excluded_cells_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(excluded_cells_to_rem_list, bref, 1, 8, integer_packer(1, 8))); + } + if (excluded_cells_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(excluded_cells_to_add_mod_list, bref, 1, 8)); + } + if (allowed_cells_to_rem_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(allowed_cells_to_rem_list, bref, 1, 8, integer_packer(1, 8))); + } + if (allowed_cells_to_add_mod_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(allowed_cells_to_add_mod_list, bref, 1, 8)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + 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)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(smtc3list_r16, bref); + unpack_presence_flag(rmtc_cfg_r16, bref); + unpack_presence_flag(t312_r16, bref); + if (smtc3list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*smtc3list_r16, bref, 1, 4)); + } + if (rmtc_cfg_r16.is_present()) { + HANDLE_CODE(rmtc_cfg_r16->unpack(bref)); + } + if (t312_r16.is_present()) { + HANDLE_CODE(t312_r16->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(associated_meas_gap_ssb_r17_present, 1)); + HANDLE_CODE(bref.unpack(associated_meas_gap_csi_rs_r17_present, 1)); + unpack_presence_flag(smtc4list_r17, bref); + HANDLE_CODE(bref.unpack(meas_cycle_pscell_r17_present, 1)); + unpack_presence_flag(cells_to_add_mod_list_ext_v1710, bref); + if (associated_meas_gap_ssb_r17_present) { + HANDLE_CODE(unpack_integer(associated_meas_gap_ssb_r17, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (associated_meas_gap_csi_rs_r17_present) { + HANDLE_CODE(unpack_integer(associated_meas_gap_csi_rs_r17, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (smtc4list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*smtc4list_r17, bref, 1, 3)); + } + if (meas_cycle_pscell_r17_present) { + HANDLE_CODE(meas_cycle_pscell_r17.unpack(bref)); + } + if (cells_to_add_mod_list_ext_v1710.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*cells_to_add_mod_list_ext_v1710, bref, 1, 32)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(associated_meas_gap_ssb2_v1720_present, 1)); + HANDLE_CODE(bref.unpack(associated_meas_gap_csi_rs2_v1720_present, 1)); + if (associated_meas_gap_ssb2_v1720_present) { + HANDLE_CODE(unpack_integer(associated_meas_gap_ssb2_v1720, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (associated_meas_gap_csi_rs2_v1720_present) { + HANDLE_CODE(unpack_integer(associated_meas_gap_csi_rs2_v1720, bref, (uint8_t)1u, (uint8_t)8u)); + } + } + } + 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.size() > 0) { + 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.size() > 0) { + j.start_array("cellsToAddModList"); + for (const auto& e1 : cells_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); + } + if (excluded_cells_to_rem_list.size() > 0) { + j.start_array("excludedCellsToRemoveList"); + for (const auto& e1 : excluded_cells_to_rem_list) { + j.write_int(e1); + } + j.end_array(); + } + if (excluded_cells_to_add_mod_list.size() > 0) { + j.start_array("excludedCellsToAddModList"); + for (const auto& e1 : excluded_cells_to_add_mod_list) { + e1.to_json(j); + } + j.end_array(); + } + if (allowed_cells_to_rem_list.size() > 0) { + j.start_array("allowedCellsToRemoveList"); + for (const auto& e1 : allowed_cells_to_rem_list) { + j.write_int(e1); + } + j.end_array(); + } + if (allowed_cells_to_add_mod_list.size() > 0) { + j.start_array("allowedCellsToAddModList"); + for (const auto& e1 : allowed_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()); + } + if (smtc3list_r16.is_present()) { + j.start_array("smtc3list-r16"); + for (const auto& e1 : *smtc3list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (rmtc_cfg_r16.is_present()) { + j.write_fieldname("rmtc-Config-r16"); + rmtc_cfg_r16->to_json(j); + } + if (t312_r16.is_present()) { + j.write_fieldname("t312-r16"); + t312_r16->to_json(j); + } + if (associated_meas_gap_ssb_r17_present) { + j.write_int("associatedMeasGapSSB-r17", associated_meas_gap_ssb_r17); + } + if (associated_meas_gap_csi_rs_r17_present) { + j.write_int("associatedMeasGapCSIRS-r17", associated_meas_gap_csi_rs_r17); + } + if (smtc4list_r17.is_present()) { + j.start_array("smtc4list-r17"); + for (const auto& e1 : *smtc4list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_cycle_pscell_r17_present) { + j.write_str("measCyclePSCell-r17", meas_cycle_pscell_r17.to_string()); + } + if (cells_to_add_mod_list_ext_v1710.is_present()) { + j.start_array("cellsToAddModListExt-v1710"); + for (const auto& e1 : *cells_to_add_mod_list_ext_v1710) { + e1.to_json(j); + } + j.end_array(); + } + if (associated_meas_gap_ssb2_v1720_present) { + j.write_int("associatedMeasGapSSB2-v1720", associated_meas_gap_ssb2_v1720); + } + if (associated_meas_gap_csi_rs2_v1720_present) { + j.write_int("associatedMeasGapCSIRS2-v1720", associated_meas_gap_csi_rs2_v1720); + } + } + j.end_obj(); +} + +const char* meas_obj_nr_s::meas_cycle_scell_opts::to_string() const +{ + static const char* names[] = {"sf160", "sf256", "sf320", "sf512", "sf640", "sf1024", "sf1280"}; + return convert_enum_idx(names, 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 numbers[] = {160, 256, 320, 512, 640, 1024, 1280}; + return map_enum_number(numbers, 7, value, "meas_obj_nr_s::meas_cycle_scell_e_"); +} + +const char* meas_obj_nr_s::meas_cycle_pscell_r17_opts::to_string() const +{ + static const char* names[] = {"ms160", "ms256", "ms320", "ms512", "ms640", "ms1024", "ms1280", "spare1"}; + return convert_enum_idx(names, 8, value, "meas_obj_nr_s::meas_cycle_pscell_r17_e_"); +} +uint16_t meas_obj_nr_s::meas_cycle_pscell_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {160, 256, 320, 512, 640, 1024, 1280}; + return map_enum_number(numbers, 7, value, "meas_obj_nr_s::meas_cycle_pscell_r17_e_"); +} + +// MeasObjectNR-SL-r16 ::= SEQUENCE +SRSASN_CODE meas_obj_nr_sl_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tx_pool_meas_to_rem_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(tx_pool_meas_to_add_mod_list_r16.size() > 0, 1)); + + if (tx_pool_meas_to_rem_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, tx_pool_meas_to_rem_list_r16, 1, 8, integer_packer(1, 16))); + } + if (tx_pool_meas_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, tx_pool_meas_to_add_mod_list_r16, 1, 8, integer_packer(1, 16))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_nr_sl_r16_s::unpack(cbit_ref& bref) +{ + bool tx_pool_meas_to_rem_list_r16_present; + HANDLE_CODE(bref.unpack(tx_pool_meas_to_rem_list_r16_present, 1)); + bool tx_pool_meas_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(tx_pool_meas_to_add_mod_list_r16_present, 1)); + + if (tx_pool_meas_to_rem_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(tx_pool_meas_to_rem_list_r16, bref, 1, 8, integer_packer(1, 16))); + } + if (tx_pool_meas_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(tx_pool_meas_to_add_mod_list_r16, bref, 1, 8, integer_packer(1, 16))); + } + + return SRSASN_SUCCESS; +} +void meas_obj_nr_sl_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (tx_pool_meas_to_rem_list_r16.size() > 0) { + j.start_array("tx-PoolMeasToRemoveList-r16"); + for (const auto& e1 : tx_pool_meas_to_rem_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (tx_pool_meas_to_add_mod_list_r16.size() > 0) { + j.start_array("tx-PoolMeasToAddModList-r16"); + for (const auto& e1 : tx_pool_meas_to_add_mod_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} + +// MeasObjectRxTxDiff-r17 ::= SEQUENCE +SRSASN_CODE meas_obj_rx_tx_diff_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(dl_ref_r17_present, 1)); + + if (dl_ref_r17_present) { + HANDLE_CODE(dl_ref_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_rx_tx_diff_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(dl_ref_r17_present, 1)); + + if (dl_ref_r17_present) { + HANDLE_CODE(dl_ref_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_obj_rx_tx_diff_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dl_ref_r17_present) { + j.write_fieldname("dl-Ref-r17"); + dl_ref_r17.to_json(j); + } + j.end_obj(); +} + +void meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::set(types::options e) +{ + type_ = e; +} +void meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::set_prs_ref_r17() +{ + set(types::prs_ref_r17); +} +void meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::set_csi_rs_ref_r17() +{ + set(types::csi_rs_ref_r17); +} +void meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + j.end_obj(); +} +SRSASN_CODE meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + return SRSASN_SUCCESS; +} + +const char* meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"prs-Ref-r17", "csi-RS-Ref-r17"}; + return convert_enum_idx(names, 2, value, "meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::types"); +} + +// MeasObjectUTRA-FDD-r16 ::= SEQUENCE +SRSASN_CODE meas_obj_utra_fdd_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(utra_fdd_q_offset_range_r16_present, 1)); + HANDLE_CODE(bref.pack(cells_to_rem_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(cells_to_add_mod_list_r16.size() > 0, 1)); + + HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint16_t)0u, (uint16_t)16383u)); + if (utra_fdd_q_offset_range_r16_present) { + HANDLE_CODE(utra_fdd_q_offset_range_r16.pack(bref)); + } + if (cells_to_rem_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_rem_list_r16, 1, 32, integer_packer(1, 32))); + } + if (cells_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cells_to_add_mod_list_r16, 1, 32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_obj_utra_fdd_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(utra_fdd_q_offset_range_r16_present, 1)); + bool cells_to_rem_list_r16_present; + HANDLE_CODE(bref.unpack(cells_to_rem_list_r16_present, 1)); + bool cells_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(cells_to_add_mod_list_r16_present, 1)); + + HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint16_t)0u, (uint16_t)16383u)); + if (utra_fdd_q_offset_range_r16_present) { + HANDLE_CODE(utra_fdd_q_offset_range_r16.unpack(bref)); + } + if (cells_to_rem_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(cells_to_rem_list_r16, bref, 1, 32, integer_packer(1, 32))); + } + if (cells_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(cells_to_add_mod_list_r16, bref, 1, 32)); + } + + return SRSASN_SUCCESS; +} +void meas_obj_utra_fdd_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r16", carrier_freq_r16); + if (utra_fdd_q_offset_range_r16_present) { + j.write_str("utra-FDD-Q-OffsetRange-r16", utra_fdd_q_offset_range_r16.to_string()); + } + if (cells_to_rem_list_r16.size() > 0) { + j.start_array("cellsToRemoveList-r16"); + for (const auto& e1 : cells_to_rem_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (cells_to_add_mod_list_r16.size() > 0) { + j.start_array("cellsToAddModList-r16"); + for (const auto& e1 : cells_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// 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(); +} + +const char* overheat_assist_cfg_s::overheat_ind_prohibit_timer_opts::to_string() const +{ + static const char* names[] = {"s0", + "s0dot5", + "s1", + "s2", + "s5", + "s10", + "s20", + "s30", + "s60", + "s90", + "s120", + "s300", + "s600", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 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 numbers[] = {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(numbers, 13, value, "overheat_assist_cfg_s::overheat_ind_prohibit_timer_e_"); +} +const char* overheat_assist_cfg_s::overheat_ind_prohibit_timer_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.5", "1", "2", "5", "10", "20", "30", "60", "90", "120", "300", "600"}; + return convert_enum_idx(number_strs, 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(); +} + +// PosGapConfig-r17 ::= SEQUENCE +SRSASN_CODE pos_gap_cfg_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, meas_pos_pre_cfg_gap_id_r17, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(pack_integer(bref, gap_offset_r17, (uint8_t)0u, (uint8_t)159u)); + HANDLE_CODE(mgl_r17.pack(bref)); + HANDLE_CODE(mgrp_r17.pack(bref)); + HANDLE_CODE(mgta_r17.pack(bref)); + HANDLE_CODE(gap_type_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pos_gap_cfg_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(meas_pos_pre_cfg_gap_id_r17, bref, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(unpack_integer(gap_offset_r17, bref, (uint8_t)0u, (uint8_t)159u)); + HANDLE_CODE(mgl_r17.unpack(bref)); + HANDLE_CODE(mgrp_r17.unpack(bref)); + HANDLE_CODE(mgta_r17.unpack(bref)); + HANDLE_CODE(gap_type_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pos_gap_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("measPosPreConfigGapId-r17", meas_pos_pre_cfg_gap_id_r17); + j.write_int("gapOffset-r17", gap_offset_r17); + j.write_str("mgl-r17", mgl_r17.to_string()); + j.write_str("mgrp-r17", mgrp_r17.to_string()); + j.write_str("mgta-r17", mgta_r17.to_string()); + j.write_str("gapType-r17", gap_type_r17.to_string()); + j.end_obj(); +} + +const char* pos_gap_cfg_r17_s::mgl_r17_opts::to_string() const +{ + static const char* names[] = {"ms1dot5", "ms3", "ms3dot5", "ms4", "ms5dot5", "ms6", "ms10", "ms20"}; + return convert_enum_idx(names, 8, value, "pos_gap_cfg_r17_s::mgl_r17_e_"); +} +float pos_gap_cfg_r17_s::mgl_r17_opts::to_number() const +{ + static const float numbers[] = {1.5, 3.0, 3.5, 4.0, 5.5, 6.0, 10.0, 20.0}; + return map_enum_number(numbers, 8, value, "pos_gap_cfg_r17_s::mgl_r17_e_"); +} +const char* pos_gap_cfg_r17_s::mgl_r17_opts::to_number_string() const +{ + static const char* number_strs[] = {"1.5", "3", "3.5", "4", "5.5", "6", "10", "20"}; + return convert_enum_idx(number_strs, 8, value, "pos_gap_cfg_r17_s::mgl_r17_e_"); +} + +const char* pos_gap_cfg_r17_s::mgrp_r17_opts::to_string() const +{ + static const char* names[] = {"ms20", "ms40", "ms80", "ms160"}; + return convert_enum_idx(names, 4, value, "pos_gap_cfg_r17_s::mgrp_r17_e_"); +} +uint8_t pos_gap_cfg_r17_s::mgrp_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {20, 40, 80, 160}; + return map_enum_number(numbers, 4, value, "pos_gap_cfg_r17_s::mgrp_r17_e_"); +} + +const char* pos_gap_cfg_r17_s::mgta_r17_opts::to_string() const +{ + static const char* names[] = {"ms0", "ms0dot25", "ms0dot5"}; + return convert_enum_idx(names, 3, value, "pos_gap_cfg_r17_s::mgta_r17_e_"); +} +float pos_gap_cfg_r17_s::mgta_r17_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.25, 0.5}; + return map_enum_number(numbers, 3, value, "pos_gap_cfg_r17_s::mgta_r17_e_"); +} +const char* pos_gap_cfg_r17_s::mgta_r17_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.25", "0.5"}; + return convert_enum_idx(number_strs, 3, value, "pos_gap_cfg_r17_s::mgta_r17_e_"); +} + +const char* pos_gap_cfg_r17_s::gap_type_r17_opts::to_string() const +{ + static const char* names[] = {"perUE", "perFR1", "perFR2"}; + return convert_enum_idx(names, 3, value, "pos_gap_cfg_r17_s::gap_type_r17_e_"); +} +uint8_t pos_gap_cfg_r17_s::gap_type_r17_opts::to_number() const +{ + switch (value) { + case per_fr1: + return 1; + case per_fr2: + return 2; + default: + invalid_enum_number(value, "pos_gap_cfg_r17_s::gap_type_r17_e_"); + } + return 0; +} + +// 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(); +} + +// RRCReconfiguration-v1610-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(other_cfg_v1610_present, 1)); + HANDLE_CODE(bref.pack(bap_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(iab_ip_address_cfg_list_r16_present, 1)); + HANDLE_CODE(bref.pack(conditional_recfg_r16_present, 1)); + HANDLE_CODE(bref.pack(daps_source_release_r16_present, 1)); + HANDLE_CODE(bref.pack(t316_r16_present, 1)); + HANDLE_CODE(bref.pack(need_for_gaps_cfg_nr_r16_present, 1)); + HANDLE_CODE(bref.pack(on_demand_sib_request_r16_present, 1)); + HANDLE_CODE(bref.pack(ded_pos_sys_info_delivery_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_cfg_ded_nr_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_cfg_ded_eutra_info_r16_present, 1)); + HANDLE_CODE(bref.pack(target_cell_smtc_scg_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (other_cfg_v1610_present) { + HANDLE_CODE(other_cfg_v1610.pack(bref)); + } + if (bap_cfg_r16_present) { + HANDLE_CODE(bap_cfg_r16.pack(bref)); + } + if (iab_ip_address_cfg_list_r16_present) { + HANDLE_CODE(iab_ip_address_cfg_list_r16.pack(bref)); + } + if (conditional_recfg_r16_present) { + HANDLE_CODE(conditional_recfg_r16.pack(bref)); + } + if (t316_r16_present) { + HANDLE_CODE(t316_r16.pack(bref)); + } + if (need_for_gaps_cfg_nr_r16_present) { + HANDLE_CODE(need_for_gaps_cfg_nr_r16.pack(bref)); + } + if (on_demand_sib_request_r16_present) { + HANDLE_CODE(on_demand_sib_request_r16.pack(bref)); + } + if (ded_pos_sys_info_delivery_r16.size() > 0) { + HANDLE_CODE(ded_pos_sys_info_delivery_r16.pack(bref)); + } + if (sl_cfg_ded_nr_r16_present) { + HANDLE_CODE(sl_cfg_ded_nr_r16.pack(bref)); + } + if (sl_cfg_ded_eutra_info_r16_present) { + HANDLE_CODE(sl_cfg_ded_eutra_info_r16.pack(bref)); + } + if (target_cell_smtc_scg_r16_present) { + HANDLE_CODE(target_cell_smtc_scg_r16.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(other_cfg_v1610_present, 1)); + HANDLE_CODE(bref.unpack(bap_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(iab_ip_address_cfg_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(conditional_recfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(daps_source_release_r16_present, 1)); + HANDLE_CODE(bref.unpack(t316_r16_present, 1)); + HANDLE_CODE(bref.unpack(need_for_gaps_cfg_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(on_demand_sib_request_r16_present, 1)); + bool ded_pos_sys_info_delivery_r16_present; + HANDLE_CODE(bref.unpack(ded_pos_sys_info_delivery_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_cfg_ded_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_cfg_ded_eutra_info_r16_present, 1)); + HANDLE_CODE(bref.unpack(target_cell_smtc_scg_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (other_cfg_v1610_present) { + HANDLE_CODE(other_cfg_v1610.unpack(bref)); + } + if (bap_cfg_r16_present) { + HANDLE_CODE(bap_cfg_r16.unpack(bref)); + } + if (iab_ip_address_cfg_list_r16_present) { + HANDLE_CODE(iab_ip_address_cfg_list_r16.unpack(bref)); + } + if (conditional_recfg_r16_present) { + HANDLE_CODE(conditional_recfg_r16.unpack(bref)); + } + if (t316_r16_present) { + HANDLE_CODE(t316_r16.unpack(bref)); + } + if (need_for_gaps_cfg_nr_r16_present) { + HANDLE_CODE(need_for_gaps_cfg_nr_r16.unpack(bref)); + } + if (on_demand_sib_request_r16_present) { + HANDLE_CODE(on_demand_sib_request_r16.unpack(bref)); + } + if (ded_pos_sys_info_delivery_r16_present) { + HANDLE_CODE(ded_pos_sys_info_delivery_r16.unpack(bref)); + } + if (sl_cfg_ded_nr_r16_present) { + HANDLE_CODE(sl_cfg_ded_nr_r16.unpack(bref)); + } + if (sl_cfg_ded_eutra_info_r16_present) { + HANDLE_CODE(sl_cfg_ded_eutra_info_r16.unpack(bref)); + } + if (target_cell_smtc_scg_r16_present) { + HANDLE_CODE(target_cell_smtc_scg_r16.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_recfg_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (other_cfg_v1610_present) { + j.write_fieldname("otherConfig-v1610"); + other_cfg_v1610.to_json(j); + } + if (bap_cfg_r16_present) { + j.write_fieldname("bap-Config-r16"); + bap_cfg_r16.to_json(j); + } + if (iab_ip_address_cfg_list_r16_present) { + j.write_fieldname("iab-IP-AddressConfigurationList-r16"); + iab_ip_address_cfg_list_r16.to_json(j); + } + if (conditional_recfg_r16_present) { + j.write_fieldname("conditionalReconfiguration-r16"); + conditional_recfg_r16.to_json(j); + } + if (daps_source_release_r16_present) { + j.write_str("daps-SourceRelease-r16", "true"); + } + if (t316_r16_present) { + j.write_fieldname("t316-r16"); + t316_r16.to_json(j); + } + if (need_for_gaps_cfg_nr_r16_present) { + j.write_fieldname("needForGapsConfigNR-r16"); + need_for_gaps_cfg_nr_r16.to_json(j); + } + if (on_demand_sib_request_r16_present) { + j.write_fieldname("onDemandSIB-Request-r16"); + on_demand_sib_request_r16.to_json(j); + } + if (ded_pos_sys_info_delivery_r16.size() > 0) { + j.write_str("dedicatedPosSysInfoDelivery-r16", ded_pos_sys_info_delivery_r16.to_string()); + } + if (sl_cfg_ded_nr_r16_present) { + j.write_fieldname("sl-ConfigDedicatedNR-r16"); + sl_cfg_ded_nr_r16.to_json(j); + } + if (sl_cfg_ded_eutra_info_r16_present) { + j.write_fieldname("sl-ConfigDedicatedEUTRA-Info-r16"); + sl_cfg_ded_eutra_info_r16.to_json(j); + } + if (target_cell_smtc_scg_r16_present) { + j.write_fieldname("targetCellSMTC-SCG-r16"); + target_cell_smtc_scg_r16.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCRelease-v1710-IEs ::= SEQUENCE +SRSASN_CODE rrc_release_v1710_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(no_last_cell_upd_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_release_v1710_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(no_last_cell_upd_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void rrc_release_v1710_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (no_last_cell_upd_r17_present) { + j.write_str("noLastCellUpdate-r17", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + 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_"); + } +} +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::periodical: + c.init(other.c.get()); + break; + 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_, "report_cfg_inter_rat_s::report_type_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) +{ + 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()); + 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_, "report_cfg_inter_rat_s::report_type_c_"); + } + + return *this; +} +periodical_report_cfg_inter_rat_s& report_cfg_inter_rat_s::report_type_c_::set_periodical() +{ + set(types::periodical); + return c.get(); +} +event_trigger_cfg_inter_rat_s& report_cfg_inter_rat_s::report_type_c_::set_event_triggered() +{ + set(types::event_triggered); + return c.get(); +} +report_cgi_eutra_s& report_cfg_inter_rat_s::report_type_c_::set_report_cgi() +{ + set(types::report_cgi); + return c.get(); +} +report_sftd_eutra_s& report_cfg_inter_rat_s::report_type_c_::set_report_sftd() +{ + set(types::report_sftd); + return c.get(); +} +void report_cfg_inter_rat_s::report_type_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); + 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_, "report_cfg_inter_rat_s::report_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE report_cfg_inter_rat_s::report_type_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::periodical: + HANDLE_CODE(c.get().pack(bref)); + break; + 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_, "report_cfg_inter_rat_s::report_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::periodical: + HANDLE_CODE(c.get().unpack(bref)); + break; + 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_, "report_cfg_inter_rat_s::report_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* report_cfg_inter_rat_s::report_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"periodical", "eventTriggered", "reportCGI", "reportSFTD"}; + return convert_enum_idx(names, 4, 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; +} +SRSASN_CODE report_cfg_nr_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(report_type.unpack(bref)); + + return SRSASN_SUCCESS; +} +void report_cfg_nr_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_nr_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; + case types::cond_trigger_cfg_r16: + c.destroy(); + break; + case types::cli_periodical_r16: + c.destroy(); + break; + case types::cli_event_triggered_r16: + c.destroy(); + break; + case types::rx_tx_periodical_r17: + c.destroy(); + break; + default: + break; + } +} +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::event_triggered: + c.init(); + break; + case types::report_cgi: + c.init(); + break; + case types::report_sftd: + c.init(); + break; + case types::cond_trigger_cfg_r16: + c.init(); + break; + case types::cli_periodical_r16: + c.init(); + break; + case types::cli_event_triggered_r16: + c.init(); + break; + case types::rx_tx_periodical_r17: + 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) +{ + type_ = other.type(); + switch (type_) { + case types::periodical: + c.init(other.c.get()); + break; + 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::cond_trigger_cfg_r16: + c.init(other.c.get()); + break; + case types::cli_periodical_r16: + c.init(other.c.get()); + break; + case types::cli_event_triggered_r16: + c.init(other.c.get()); + break; + case types::rx_tx_periodical_r17: + c.init(other.c.get()); + 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_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::periodical: + c.set(other.c.get()); + break; + 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::cond_trigger_cfg_r16: + c.set(other.c.get()); + break; + case types::cli_periodical_r16: + c.set(other.c.get()); + break; + case types::cli_event_triggered_r16: + c.set(other.c.get()); + break; + case types::rx_tx_periodical_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); + } + + return *this; +} +periodical_report_cfg_s& report_cfg_nr_s::report_type_c_::set_periodical() +{ + set(types::periodical); + return c.get(); +} +event_trigger_cfg_s& report_cfg_nr_s::report_type_c_::set_event_triggered() +{ + set(types::event_triggered); + return c.get(); +} +report_cgi_s& report_cfg_nr_s::report_type_c_::set_report_cgi() +{ + set(types::report_cgi); + return c.get(); +} +report_sftd_nr_s& report_cfg_nr_s::report_type_c_::set_report_sftd() +{ + set(types::report_sftd); + return c.get(); +} +cond_trigger_cfg_r16_s& report_cfg_nr_s::report_type_c_::set_cond_trigger_cfg_r16() +{ + set(types::cond_trigger_cfg_r16); + return c.get(); +} +cli_periodical_report_cfg_r16_s& report_cfg_nr_s::report_type_c_::set_cli_periodical_r16() +{ + set(types::cli_periodical_r16); + return c.get(); +} +cli_event_trigger_cfg_r16_s& report_cfg_nr_s::report_type_c_::set_cli_event_triggered_r16() +{ + set(types::cli_event_triggered_r16); + return c.get(); +} +rx_tx_periodical_r17_s& report_cfg_nr_s::report_type_c_::set_rx_tx_periodical_r17() +{ + set(types::rx_tx_periodical_r17); + return c.get(); +} +void report_cfg_nr_s::report_type_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); + 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; + case types::cond_trigger_cfg_r16: + j.write_fieldname("condTriggerConfig-r16"); + c.get().to_json(j); + break; + case types::cli_periodical_r16: + j.write_fieldname("cli-Periodical-r16"); + c.get().to_json(j); + break; + case types::cli_event_triggered_r16: + j.write_fieldname("cli-EventTriggered-r16"); + c.get().to_json(j); + break; + case types::rx_tx_periodical_r17: + j.write_fieldname("rxTxPeriodical-r17"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "report_cfg_nr_s::report_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE report_cfg_nr_s::report_type_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::periodical: + HANDLE_CODE(c.get().pack(bref)); + break; + 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; + case types::cond_trigger_cfg_r16: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::cli_periodical_r16: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::cli_event_triggered_r16: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::rx_tx_periodical_r17: { + 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_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_nr_s::report_type_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::periodical: + HANDLE_CODE(c.get().unpack(bref)); + break; + 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; + case types::cond_trigger_cfg_r16: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::cli_periodical_r16: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::cli_event_triggered_r16: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::rx_tx_periodical_r17: { + 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_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* report_cfg_nr_s::report_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"periodical", + "eventTriggered", + "reportCGI", + "reportSFTD", + "condTriggerConfig-r16", + "cli-Periodical-r16", + "cli-EventTriggered-r16", + "rxTxPeriodical-r17"}; + return convert_enum_idx(names, 8, value, "report_cfg_nr_s::report_type_c_::types"); +} + +// ReportConfigNR-SL-r16 ::= SEQUENCE +SRSASN_CODE report_cfg_nr_sl_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(report_type_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_nr_sl_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(report_type_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void report_cfg_nr_sl_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("reportType-r16"); + report_type_r16.to_json(j); + j.end_obj(); +} + +void report_cfg_nr_sl_r16_s::report_type_r16_c_::destroy_() +{ + switch (type_) { + case types::periodical_r16: + c.destroy(); + break; + case types::event_triggered_r16: + c.destroy(); + break; + default: + break; + } +} +void report_cfg_nr_sl_r16_s::report_type_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::periodical_r16: + c.init(); + break; + case types::event_triggered_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_nr_sl_r16_s::report_type_r16_c_"); + } +} +report_cfg_nr_sl_r16_s::report_type_r16_c_::report_type_r16_c_(const report_cfg_nr_sl_r16_s::report_type_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::periodical_r16: + c.init(other.c.get()); + break; + case types::event_triggered_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_nr_sl_r16_s::report_type_r16_c_"); + } +} +report_cfg_nr_sl_r16_s::report_type_r16_c_& +report_cfg_nr_sl_r16_s::report_type_r16_c_::operator=(const report_cfg_nr_sl_r16_s::report_type_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::periodical_r16: + c.set(other.c.get()); + break; + case types::event_triggered_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_nr_sl_r16_s::report_type_r16_c_"); + } + + return *this; +} +periodical_report_cfg_nr_sl_r16_s& report_cfg_nr_sl_r16_s::report_type_r16_c_::set_periodical_r16() +{ + set(types::periodical_r16); + return c.get(); +} +event_trigger_cfg_nr_sl_r16_s& report_cfg_nr_sl_r16_s::report_type_r16_c_::set_event_triggered_r16() +{ + set(types::event_triggered_r16); + return c.get(); +} +void report_cfg_nr_sl_r16_s::report_type_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::periodical_r16: + j.write_fieldname("periodical-r16"); + c.get().to_json(j); + break; + case types::event_triggered_r16: + j.write_fieldname("eventTriggered-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "report_cfg_nr_sl_r16_s::report_type_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE report_cfg_nr_sl_r16_s::report_type_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::periodical_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::event_triggered_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "report_cfg_nr_sl_r16_s::report_type_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE report_cfg_nr_sl_r16_s::report_type_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::periodical_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::event_triggered_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "report_cfg_nr_sl_r16_s::report_type_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* report_cfg_nr_sl_r16_s::report_type_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"periodical-r16", "eventTriggered-r16"}; + return convert_enum_idx(names, 2, value, "report_cfg_nr_sl_r16_s::report_type_r16_c_::types"); +} + +// AreaConfig-r16 ::= CHOICE +void area_cfg_r16_c::destroy_() +{ + switch (type_) { + case types::cell_global_id_list_r16: + c.destroy(); + break; + case types::tac_list_r16: + c.destroy(); + break; + case types::tracking_area_id_list_r16: + c.destroy(); + break; + default: + break; + } +} +void area_cfg_r16_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_global_id_list_r16: + c.init(); + break; + case types::tac_list_r16: + c.init(); + break; + case types::tracking_area_id_list_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "area_cfg_r16_c"); + } +} +area_cfg_r16_c::area_cfg_r16_c(const area_cfg_r16_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_global_id_list_r16: + c.init(other.c.get()); + break; + case types::tac_list_r16: + c.init(other.c.get()); + break; + case types::tracking_area_id_list_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "area_cfg_r16_c"); + } +} +area_cfg_r16_c& area_cfg_r16_c::operator=(const area_cfg_r16_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_global_id_list_r16: + c.set(other.c.get()); + break; + case types::tac_list_r16: + c.set(other.c.get()); + break; + case types::tracking_area_id_list_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "area_cfg_r16_c"); + } + + return *this; +} +cell_global_id_list_r16_l& area_cfg_r16_c::set_cell_global_id_list_r16() +{ + set(types::cell_global_id_list_r16); + return c.get(); +} +tac_list_r16_l& area_cfg_r16_c::set_tac_list_r16() +{ + set(types::tac_list_r16); + return c.get(); +} +tracking_area_id_list_r16_l& area_cfg_r16_c::set_tracking_area_id_list_r16() +{ + set(types::tracking_area_id_list_r16); + return c.get(); +} +void area_cfg_r16_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_global_id_list_r16: + j.start_array("cellGlobalIdList-r16"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::tac_list_r16: + j.start_array("trackingAreaCodeList-r16"); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); + } + j.end_array(); + break; + case types::tracking_area_id_list_r16: + j.start_array("trackingAreaIdentityList-r16"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "area_cfg_r16_c"); + } + j.end_obj(); +} +SRSASN_CODE area_cfg_r16_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cell_global_id_list_r16: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 32)); + break; + case types::tac_list_r16: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + break; + case types::tracking_area_id_list_r16: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + break; + default: + log_invalid_choice_id(type_, "area_cfg_r16_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE area_cfg_r16_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cell_global_id_list_r16: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 32)); + break; + case types::tac_list_r16: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + break; + case types::tracking_area_id_list_r16: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "area_cfg_r16_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* area_cfg_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"cellGlobalIdList-r16", "trackingAreaCodeList-r16", "trackingAreaIdentityList-r16"}; + return convert_enum_idx(names, 3, value, "area_cfg_r16_c::types"); +} + +// FilterConfigCLI-r16 ::= SEQUENCE +SRSASN_CODE filt_cfg_cli_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(filt_coef_srs_rsrp_r16_present, 1)); + HANDLE_CODE(bref.pack(filt_coef_cli_rssi_r16_present, 1)); + + if (filt_coef_srs_rsrp_r16_present) { + HANDLE_CODE(filt_coef_srs_rsrp_r16.pack(bref)); + } + if (filt_coef_cli_rssi_r16_present) { + HANDLE_CODE(filt_coef_cli_rssi_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE filt_cfg_cli_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(filt_coef_srs_rsrp_r16_present, 1)); + HANDLE_CODE(bref.unpack(filt_coef_cli_rssi_r16_present, 1)); + + if (filt_coef_srs_rsrp_r16_present) { + HANDLE_CODE(filt_coef_srs_rsrp_r16.unpack(bref)); + } + if (filt_coef_cli_rssi_r16_present) { + HANDLE_CODE(filt_coef_cli_rssi_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void filt_cfg_cli_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (filt_coef_srs_rsrp_r16_present) { + j.write_str("filterCoefficientSRS-RSRP-r16", filt_coef_srs_rsrp_r16.to_string()); + } + if (filt_coef_cli_rssi_r16_present) { + j.write_str("filterCoefficientCLI-RSSI-r16", filt_coef_cli_rssi_r16.to_string()); + } + j.end_obj(); +} + +// FreqPriorityDedicatedSlicing-r17 ::= SEQUENCE +SRSASN_CODE freq_prio_ded_slicing_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(slice_info_list_ded_r17.size() > 0, 1)); + + HANDLE_CODE(pack_integer(bref, dl_explicit_carrier_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); + if (slice_info_list_ded_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, slice_info_list_ded_r17, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_prio_ded_slicing_r17_s::unpack(cbit_ref& bref) +{ + bool slice_info_list_ded_r17_present; + HANDLE_CODE(bref.unpack(slice_info_list_ded_r17_present, 1)); + + HANDLE_CODE(unpack_integer(dl_explicit_carrier_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); + if (slice_info_list_ded_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(slice_info_list_ded_r17, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void freq_prio_ded_slicing_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-ExplicitCarrierFreq-r17", dl_explicit_carrier_freq_r17); + if (slice_info_list_ded_r17.size() > 0) { + j.start_array("sliceInfoListDedicated-r17"); + for (const auto& e1 : slice_info_list_ded_r17) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// FreqPriorityEUTRA ::= SEQUENCE +SRSASN_CODE freq_prio_eutra_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)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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_prio_eutra_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)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)); + } + + return SRSASN_SUCCESS; +} +void freq_prio_eutra_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(); +} + +// 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[1] |= ref_fr2_serv_cell_async_ca_r16_present; + group_flags[1] |= mgl_r16_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)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ref_fr2_serv_cell_async_ca_r16_present, 1)); + HANDLE_CODE(bref.pack(mgl_r16_present, 1)); + if (ref_fr2_serv_cell_async_ca_r16_present) { + HANDLE_CODE(pack_integer(bref, ref_fr2_serv_cell_async_ca_r16, (uint8_t)0u, (uint8_t)31u)); + } + if (mgl_r16_present) { + HANDLE_CODE(mgl_r16.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(2); + 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)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(ref_fr2_serv_cell_async_ca_r16_present, 1)); + HANDLE_CODE(bref.unpack(mgl_r16_present, 1)); + if (ref_fr2_serv_cell_async_ca_r16_present) { + HANDLE_CODE(unpack_integer(ref_fr2_serv_cell_async_ca_r16, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (mgl_r16_present) { + HANDLE_CODE(mgl_r16.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()); + } + if (ref_fr2_serv_cell_async_ca_r16_present) { + j.write_int("refFR2ServCellAsyncCA-r16", ref_fr2_serv_cell_async_ca_r16); + } + if (mgl_r16_present) { + j.write_str("mgl-r16", mgl_r16.to_string()); + } + } + j.end_obj(); +} + +const char* gap_cfg_s::mgl_opts::to_string() const +{ + static const char* names[] = {"ms1dot5", "ms3", "ms3dot5", "ms4", "ms5dot5", "ms6"}; + return convert_enum_idx(names, 6, value, "gap_cfg_s::mgl_e_"); +} +float gap_cfg_s::mgl_opts::to_number() const +{ + static const float numbers[] = {1.5, 3.0, 3.5, 4.0, 5.5, 6.0}; + return map_enum_number(numbers, 6, value, "gap_cfg_s::mgl_e_"); +} +const char* gap_cfg_s::mgl_opts::to_number_string() const +{ + static const char* number_strs[] = {"1.5", "3", "3.5", "4", "5.5", "6"}; + return convert_enum_idx(number_strs, 6, value, "gap_cfg_s::mgl_e_"); +} + +const char* gap_cfg_s::mgrp_opts::to_string() const +{ + static const char* names[] = {"ms20", "ms40", "ms80", "ms160"}; + return convert_enum_idx(names, 4, value, "gap_cfg_s::mgrp_e_"); +} +uint8_t gap_cfg_s::mgrp_opts::to_number() const +{ + static const uint8_t numbers[] = {20, 40, 80, 160}; + return map_enum_number(numbers, 4, value, "gap_cfg_s::mgrp_e_"); +} + +const char* gap_cfg_s::mgta_opts::to_string() const +{ + static const char* names[] = {"ms0", "ms0dot25", "ms0dot5"}; + return convert_enum_idx(names, 3, value, "gap_cfg_s::mgta_e_"); +} +float gap_cfg_s::mgta_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.25, 0.5}; + return map_enum_number(numbers, 3, value, "gap_cfg_s::mgta_e_"); +} +const char* gap_cfg_s::mgta_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.25", "0.5"}; + return convert_enum_idx(number_strs, 3, value, "gap_cfg_s::mgta_e_"); +} + +const char* gap_cfg_s::ref_serv_cell_ind_opts::to_string() const +{ + static const char* names[] = {"pCell", "pSCell", "mcg-FR2"}; + return convert_enum_idx(names, 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; +} + +const char* gap_cfg_s::mgl_r16_opts::to_string() const +{ + static const char* names[] = {"ms10", "ms20"}; + return convert_enum_idx(names, 2, value, "gap_cfg_s::mgl_r16_e_"); +} +uint8_t gap_cfg_s::mgl_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {10, 20}; + return map_enum_number(numbers, 2, value, "gap_cfg_s::mgl_r16_e_"); +} + +// GapConfig-r17 ::= SEQUENCE +SRSASN_CODE gap_cfg_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ref_serv_cell_ind_r17_present, 1)); + HANDLE_CODE(bref.pack(ref_fr2_serv_cell_async_ca_r17_present, 1)); + HANDLE_CODE(bref.pack(pre_cfg_ind_r17_present, 1)); + HANDLE_CODE(bref.pack(ncsg_ind_r17_present, 1)); + HANDLE_CODE(bref.pack(gap_assoc_prs_r17_present, 1)); + HANDLE_CODE(bref.pack(gap_sharing_r17_present, 1)); + HANDLE_CODE(bref.pack(gap_prio_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, meas_gap_id_r17, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(gap_type_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, gap_offset_r17, (uint8_t)0u, (uint8_t)159u)); + HANDLE_CODE(mgl_r17.pack(bref)); + HANDLE_CODE(mgrp_r17.pack(bref)); + HANDLE_CODE(mgta_r17.pack(bref)); + if (ref_serv_cell_ind_r17_present) { + HANDLE_CODE(ref_serv_cell_ind_r17.pack(bref)); + } + if (ref_fr2_serv_cell_async_ca_r17_present) { + HANDLE_CODE(pack_integer(bref, ref_fr2_serv_cell_async_ca_r17, (uint8_t)0u, (uint8_t)31u)); + } + if (gap_sharing_r17_present) { + HANDLE_CODE(gap_sharing_r17.pack(bref)); + } + if (gap_prio_r17_present) { + HANDLE_CODE(pack_integer(bref, gap_prio_r17, (uint8_t)1u, (uint8_t)16u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE gap_cfg_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ref_serv_cell_ind_r17_present, 1)); + HANDLE_CODE(bref.unpack(ref_fr2_serv_cell_async_ca_r17_present, 1)); + HANDLE_CODE(bref.unpack(pre_cfg_ind_r17_present, 1)); + HANDLE_CODE(bref.unpack(ncsg_ind_r17_present, 1)); + HANDLE_CODE(bref.unpack(gap_assoc_prs_r17_present, 1)); + HANDLE_CODE(bref.unpack(gap_sharing_r17_present, 1)); + HANDLE_CODE(bref.unpack(gap_prio_r17_present, 1)); + + HANDLE_CODE(unpack_integer(meas_gap_id_r17, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(gap_type_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(gap_offset_r17, bref, (uint8_t)0u, (uint8_t)159u)); + HANDLE_CODE(mgl_r17.unpack(bref)); + HANDLE_CODE(mgrp_r17.unpack(bref)); + HANDLE_CODE(mgta_r17.unpack(bref)); + if (ref_serv_cell_ind_r17_present) { + HANDLE_CODE(ref_serv_cell_ind_r17.unpack(bref)); + } + if (ref_fr2_serv_cell_async_ca_r17_present) { + HANDLE_CODE(unpack_integer(ref_fr2_serv_cell_async_ca_r17, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (gap_sharing_r17_present) { + HANDLE_CODE(gap_sharing_r17.unpack(bref)); + } + if (gap_prio_r17_present) { + HANDLE_CODE(unpack_integer(gap_prio_r17, bref, (uint8_t)1u, (uint8_t)16u)); + } + + return SRSASN_SUCCESS; +} +void gap_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("measGapId-r17", meas_gap_id_r17); + j.write_str("gapType-r17", gap_type_r17.to_string()); + j.write_int("gapOffset-r17", gap_offset_r17); + j.write_str("mgl-r17", mgl_r17.to_string()); + j.write_str("mgrp-r17", mgrp_r17.to_string()); + j.write_str("mgta-r17", mgta_r17.to_string()); + if (ref_serv_cell_ind_r17_present) { + j.write_str("refServCellIndicator-r17", ref_serv_cell_ind_r17.to_string()); + } + if (ref_fr2_serv_cell_async_ca_r17_present) { + j.write_int("refFR2-ServCellAsyncCA-r17", ref_fr2_serv_cell_async_ca_r17); + } + if (pre_cfg_ind_r17_present) { + j.write_str("preConfigInd-r17", "true"); + } + if (ncsg_ind_r17_present) { + j.write_str("ncsgInd-r17", "true"); + } + if (gap_assoc_prs_r17_present) { + j.write_str("gapAssociationPRS-r17", "true"); + } + if (gap_sharing_r17_present) { + j.write_str("gapSharing-r17", gap_sharing_r17.to_string()); + } + if (gap_prio_r17_present) { + j.write_int("gapPriority-r17", gap_prio_r17); + } + j.end_obj(); +} + +const char* gap_cfg_r17_s::gap_type_r17_opts::to_string() const +{ + static const char* names[] = {"perUE", "perFR1", "perFR2"}; + return convert_enum_idx(names, 3, value, "gap_cfg_r17_s::gap_type_r17_e_"); +} +uint8_t gap_cfg_r17_s::gap_type_r17_opts::to_number() const +{ + switch (value) { + case per_fr1: + return 1; + case per_fr2: + return 2; + default: + invalid_enum_number(value, "gap_cfg_r17_s::gap_type_r17_e_"); + } + return 0; +} + +const char* gap_cfg_r17_s::mgl_r17_opts::to_string() const +{ + static const char* names[] = { + "ms1", "ms1dot5", "ms2", "ms3", "ms3dot5", "ms4", "ms5", "ms5dot5", "ms6", "ms10", "ms20"}; + return convert_enum_idx(names, 11, value, "gap_cfg_r17_s::mgl_r17_e_"); +} +float gap_cfg_r17_s::mgl_r17_opts::to_number() const +{ + static const float numbers[] = {1.0, 1.5, 2.0, 3.0, 3.5, 4.0, 5.0, 5.5, 6.0, 10.0, 20.0}; + return map_enum_number(numbers, 11, value, "gap_cfg_r17_s::mgl_r17_e_"); +} +const char* gap_cfg_r17_s::mgl_r17_opts::to_number_string() const +{ + static const char* number_strs[] = {"1", "1.5", "2", "3", "3.5", "4", "5", "5.5", "6", "10", "20"}; + return convert_enum_idx(number_strs, 11, value, "gap_cfg_r17_s::mgl_r17_e_"); +} + +const char* gap_cfg_r17_s::mgrp_r17_opts::to_string() const +{ + static const char* names[] = {"ms20", "ms40", "ms80", "ms160"}; + return convert_enum_idx(names, 4, value, "gap_cfg_r17_s::mgrp_r17_e_"); +} +uint8_t gap_cfg_r17_s::mgrp_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {20, 40, 80, 160}; + return map_enum_number(numbers, 4, value, "gap_cfg_r17_s::mgrp_r17_e_"); +} + +const char* gap_cfg_r17_s::mgta_r17_opts::to_string() const +{ + static const char* names[] = {"ms0", "ms0dot25", "ms0dot5", "ms0dot75"}; + return convert_enum_idx(names, 4, value, "gap_cfg_r17_s::mgta_r17_e_"); +} +float gap_cfg_r17_s::mgta_r17_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.25, 0.5, 0.75}; + return map_enum_number(numbers, 4, value, "gap_cfg_r17_s::mgta_r17_e_"); +} +const char* gap_cfg_r17_s::mgta_r17_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.25", "0.5", "0.75"}; + return convert_enum_idx(number_strs, 4, value, "gap_cfg_r17_s::mgta_r17_e_"); +} + +const char* gap_cfg_r17_s::ref_serv_cell_ind_r17_opts::to_string() const +{ + static const char* names[] = {"pCell", "pSCell", "mcg-FR2"}; + return convert_enum_idx(names, 3, value, "gap_cfg_r17_s::ref_serv_cell_ind_r17_e_"); +} +uint8_t gap_cfg_r17_s::ref_serv_cell_ind_r17_opts::to_number() const +{ + if (value == mcg_fr2) { + return 2; + } + invalid_enum_number(value, "gap_cfg_r17_s::ref_serv_cell_ind_r17_e_"); + return 0; +} + +// InterFreqTargetInfo-r16 ::= SEQUENCE +SRSASN_CODE inter_freq_target_info_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_list_r16.size() > 0, 1)); + + HANDLE_CODE(pack_integer(bref, dl_carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); + if (cell_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cell_list_r16, 1, 32, integer_packer(0, 1007))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_target_info_r16_s::unpack(cbit_ref& bref) +{ + bool cell_list_r16_present; + HANDLE_CODE(bref.unpack(cell_list_r16_present, 1)); + + HANDLE_CODE(unpack_integer(dl_carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + if (cell_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(cell_list_r16, bref, 1, 32, integer_packer(0, 1007))); + } + + return SRSASN_SUCCESS; +} +void inter_freq_target_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-CarrierFreq-r16", dl_carrier_freq_r16); + if (cell_list_r16.size() > 0) { + j.start_array("cellList-r16"); + for (const auto& e1 : cell_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} + +// 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(); +} + +// MeasIdleConfigDedicated-r16 ::= SEQUENCE +SRSASN_CODE meas_idle_cfg_ded_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_idle_carrier_list_nr_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_idle_carrier_list_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(validity_area_list_r16.size() > 0, 1)); + + if (meas_idle_carrier_list_nr_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_carrier_list_nr_r16, 1, 8)); + } + if (meas_idle_carrier_list_eutra_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_carrier_list_eutra_r16, 1, 8)); + } + HANDLE_CODE(meas_idle_dur_r16.pack(bref)); + if (validity_area_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, validity_area_list_r16, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_idle_cfg_ded_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool meas_idle_carrier_list_nr_r16_present; + HANDLE_CODE(bref.unpack(meas_idle_carrier_list_nr_r16_present, 1)); + bool meas_idle_carrier_list_eutra_r16_present; + HANDLE_CODE(bref.unpack(meas_idle_carrier_list_eutra_r16_present, 1)); + bool validity_area_list_r16_present; + HANDLE_CODE(bref.unpack(validity_area_list_r16_present, 1)); + + if (meas_idle_carrier_list_nr_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_idle_carrier_list_nr_r16, bref, 1, 8)); + } + if (meas_idle_carrier_list_eutra_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_idle_carrier_list_eutra_r16, bref, 1, 8)); + } + HANDLE_CODE(meas_idle_dur_r16.unpack(bref)); + if (validity_area_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(validity_area_list_r16, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void meas_idle_cfg_ded_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_idle_carrier_list_nr_r16.size() > 0) { + j.start_array("measIdleCarrierListNR-r16"); + for (const auto& e1 : meas_idle_carrier_list_nr_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_idle_carrier_list_eutra_r16.size() > 0) { + j.start_array("measIdleCarrierListEUTRA-r16"); + for (const auto& e1 : meas_idle_carrier_list_eutra_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.write_str("measIdleDuration-r16", meas_idle_dur_r16.to_string()); + if (validity_area_list_r16.size() > 0) { + j.start_array("validityAreaList-r16"); + for (const auto& e1 : validity_area_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +const char* meas_idle_cfg_ded_r16_s::meas_idle_dur_r16_opts::to_string() const +{ + static const char* names[] = {"sec10", "sec30", "sec60", "sec120", "sec180", "sec240", "sec300", "spare"}; + return convert_enum_idx(names, 8, value, "meas_idle_cfg_ded_r16_s::meas_idle_dur_r16_e_"); +} +uint16_t meas_idle_cfg_ded_r16_s::meas_idle_dur_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {10, 30, 60, 120, 180, 240, 300}; + return map_enum_number(numbers, 7, value, "meas_idle_cfg_ded_r16_s::meas_idle_dur_r16_e_"); +} + +// 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::meas_obj_nr: + c.destroy(); + break; + case types::meas_obj_eutra: + c.destroy(); + break; + case types::meas_obj_utra_fdd_r16: + c.destroy(); + break; + case types::meas_obj_nr_sl_r16: + c.destroy(); + break; + case types::meas_obj_cli_r16: + c.destroy(); + break; + case types::meas_obj_rx_tx_diff_r17: + c.destroy(); + break; + case types::meas_obj_relay_r17: + c.destroy(); + break; + default: + break; + } +} +void meas_obj_to_add_mod_s::meas_obj_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::meas_obj_nr: + c.init(); + break; + case types::meas_obj_eutra: + c.init(); + break; + case types::meas_obj_utra_fdd_r16: + c.init(); + break; + case types::meas_obj_nr_sl_r16: + c.init(); + break; + case types::meas_obj_cli_r16: + c.init(); + break; + case types::meas_obj_rx_tx_diff_r17: + c.init(); + break; + case types::meas_obj_relay_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); + } +} +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::meas_obj_nr: + c.init(other.c.get()); + break; + case types::meas_obj_eutra: + c.init(other.c.get()); + break; + case types::meas_obj_utra_fdd_r16: + c.init(other.c.get()); + break; + case types::meas_obj_nr_sl_r16: + c.init(other.c.get()); + break; + case types::meas_obj_cli_r16: + c.init(other.c.get()); + break; + case types::meas_obj_rx_tx_diff_r17: + c.init(other.c.get()); + break; + case types::meas_obj_relay_r17: + 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_"); + } +} +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::meas_obj_nr: + c.set(other.c.get()); + break; + case types::meas_obj_eutra: + c.set(other.c.get()); + break; + case types::meas_obj_utra_fdd_r16: + c.set(other.c.get()); + break; + case types::meas_obj_nr_sl_r16: + c.set(other.c.get()); + break; + case types::meas_obj_cli_r16: + c.set(other.c.get()); + break; + case types::meas_obj_rx_tx_diff_r17: + c.set(other.c.get()); + break; + case types::meas_obj_relay_r17: + 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_"); + } + + return *this; +} +meas_obj_nr_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_nr() +{ + set(types::meas_obj_nr); + return c.get(); +} +meas_obj_eutra_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_eutra() +{ + set(types::meas_obj_eutra); + return c.get(); +} +meas_obj_utra_fdd_r16_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_utra_fdd_r16() +{ + set(types::meas_obj_utra_fdd_r16); + return c.get(); +} +meas_obj_nr_sl_r16_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_nr_sl_r16() +{ + set(types::meas_obj_nr_sl_r16); + return c.get(); +} +meas_obj_cli_r16_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_cli_r16() +{ + set(types::meas_obj_cli_r16); + return c.get(); +} +meas_obj_rx_tx_diff_r17_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_rx_tx_diff_r17() +{ + set(types::meas_obj_rx_tx_diff_r17); + return c.get(); +} +sl_meas_obj_r16_s& meas_obj_to_add_mod_s::meas_obj_c_::set_meas_obj_relay_r17() +{ + set(types::meas_obj_relay_r17); + return c.get(); +} +void meas_obj_to_add_mod_s::meas_obj_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); + break; + case types::meas_obj_eutra: + j.write_fieldname("measObjectEUTRA"); + c.get().to_json(j); + break; + case types::meas_obj_utra_fdd_r16: + j.write_fieldname("measObjectUTRA-FDD-r16"); + c.get().to_json(j); + break; + case types::meas_obj_nr_sl_r16: + j.write_fieldname("measObjectNR-SL-r16"); + c.get().to_json(j); + break; + case types::meas_obj_cli_r16: + j.write_fieldname("measObjectCLI-r16"); + c.get().to_json(j); + break; + case types::meas_obj_rx_tx_diff_r17: + j.write_fieldname("measObjectRxTxDiff-r17"); + c.get().to_json(j); + break; + case types::meas_obj_relay_r17: + j.write_fieldname("measObjectRelay-r17"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "meas_obj_to_add_mod_s::meas_obj_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_obj_to_add_mod_s::meas_obj_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + 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; + case types::meas_obj_utra_fdd_r16: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::meas_obj_nr_sl_r16: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::meas_obj_cli_r16: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::meas_obj_rx_tx_diff_r17: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::meas_obj_relay_r17: { + 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_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::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; + case types::meas_obj_utra_fdd_r16: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::meas_obj_nr_sl_r16: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::meas_obj_cli_r16: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::meas_obj_rx_tx_diff_r17: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::meas_obj_relay_r17: { + 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_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* meas_obj_to_add_mod_s::meas_obj_c_::types_opts::to_string() const +{ + static const char* names[] = {"measObjectNR", + "measObjectEUTRA", + "measObjectUTRA-FDD-r16", + "measObjectNR-SL-r16", + "measObjectCLI-r16", + "measObjectRxTxDiff-r17", + "measObjectRelay-r17"}; + return convert_enum_idx(names, 7, value, "meas_obj_to_add_mod_s::meas_obj_c_::types"); +} + +// OtherConfig-v1540 ::= SEQUENCE +SRSASN_CODE other_cfg_v1540_s::pack(bit_ref& bref) 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; +} +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 +{ + j.start_obj(); + if (overheat_assist_cfg_present) { + j.write_fieldname("overheatingAssistanceConfig"); + overheat_assist_cfg.to_json(j); + } + j.end_obj(); +} + +// 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) +{ + 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; +} +void quant_cfg_nr_s::to_json(json_writer& j) 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(); +} + +// QuantityConfigUTRA-FDD-r16 ::= SEQUENCE +SRSASN_CODE quant_cfg_utra_fdd_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(filt_coef_rs_cp_r16_present, 1)); + HANDLE_CODE(bref.pack(filt_coef_ec_no_r16_present, 1)); + + if (filt_coef_rs_cp_r16_present) { + HANDLE_CODE(filt_coef_rs_cp_r16.pack(bref)); + } + if (filt_coef_ec_no_r16_present) { + HANDLE_CODE(filt_coef_ec_no_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_utra_fdd_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(filt_coef_rs_cp_r16_present, 1)); + HANDLE_CODE(bref.unpack(filt_coef_ec_no_r16_present, 1)); + + if (filt_coef_rs_cp_r16_present) { + HANDLE_CODE(filt_coef_rs_cp_r16.unpack(bref)); + } + if (filt_coef_ec_no_r16_present) { + HANDLE_CODE(filt_coef_ec_no_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void quant_cfg_utra_fdd_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (filt_coef_rs_cp_r16_present) { + j.write_str("filterCoefficientRSCP-r16", filt_coef_rs_cp_r16.to_string()); + } + if (filt_coef_ec_no_r16_present) { + j.write_str("filterCoefficientEcNO-r16", filt_coef_ec_no_r16.to_string()); + } + j.end_obj(); +} + +// RAT-Type ::= ENUMERATED +const char* rat_type_opts::to_string() const +{ + static const char* names[] = {"nr", "eutra-nr", "eutra", "utra-fdd-v1610"}; + return convert_enum_idx(names, 4, value, "rat_type_e"); +} + +// RRCReconfiguration-v1560-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_v1560_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mrdc_secondary_cell_group_cfg_present, 1)); + HANDLE_CODE(bref.pack(radio_bearer_cfg2.size() > 0, 1)); + HANDLE_CODE(bref.pack(sk_counter_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (mrdc_secondary_cell_group_cfg_present) { + HANDLE_CODE(mrdc_secondary_cell_group_cfg.pack(bref)); + } + if (radio_bearer_cfg2.size() > 0) { + HANDLE_CODE(radio_bearer_cfg2.pack(bref)); + } + if (sk_counter_present) { + HANDLE_CODE(pack_integer(bref, sk_counter, (uint32_t)0u, (uint32_t)65535u)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_v1560_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mrdc_secondary_cell_group_cfg_present, 1)); + bool radio_bearer_cfg2_present; + 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)); + + if (mrdc_secondary_cell_group_cfg_present) { + HANDLE_CODE(mrdc_secondary_cell_group_cfg.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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_recfg_v1560_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mrdc_secondary_cell_group_cfg_present) { + j.write_fieldname("mrdc-SecondaryCellGroupConfig"); + mrdc_secondary_cell_group_cfg.to_json(j); + } + if (radio_bearer_cfg2.size() > 0) { + 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"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCRelease-v1650-IEs ::= SEQUENCE +SRSASN_CODE rrc_release_v1650_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mps_prio_ind_r16_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 rrc_release_v1650_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mps_prio_ind_r16_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 rrc_release_v1650_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mps_prio_ind_r16_present) { + j.write_str("mpsPriorityIndication-r16", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCResume-v1700-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sl_cfg_ded_nr_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_l2_remote_ue_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(need_for_gap_ncsg_cfg_nr_r17_present, 1)); + HANDLE_CODE(bref.pack(need_for_gap_ncsg_cfg_eutra_r17_present, 1)); + HANDLE_CODE(bref.pack(scg_state_r17_present, 1)); + HANDLE_CODE(bref.pack(app_layer_meas_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (sl_cfg_ded_nr_r17_present) { + HANDLE_CODE(sl_cfg_ded_nr_r17.pack(bref)); + } + if (sl_l2_remote_ue_cfg_r17_present) { + HANDLE_CODE(sl_l2_remote_ue_cfg_r17.pack(bref)); + } + if (need_for_gap_ncsg_cfg_nr_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_cfg_nr_r17.pack(bref)); + } + if (need_for_gap_ncsg_cfg_eutra_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_cfg_eutra_r17.pack(bref)); + } + if (app_layer_meas_cfg_r17_present) { + HANDLE_CODE(app_layer_meas_cfg_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_v1700_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sl_cfg_ded_nr_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_l2_remote_ue_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(need_for_gap_ncsg_cfg_nr_r17_present, 1)); + HANDLE_CODE(bref.unpack(need_for_gap_ncsg_cfg_eutra_r17_present, 1)); + HANDLE_CODE(bref.unpack(scg_state_r17_present, 1)); + HANDLE_CODE(bref.unpack(app_layer_meas_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (sl_cfg_ded_nr_r17_present) { + HANDLE_CODE(sl_cfg_ded_nr_r17.unpack(bref)); + } + if (sl_l2_remote_ue_cfg_r17_present) { + HANDLE_CODE(sl_l2_remote_ue_cfg_r17.unpack(bref)); + } + if (need_for_gap_ncsg_cfg_nr_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_cfg_nr_r17.unpack(bref)); + } + if (need_for_gap_ncsg_cfg_eutra_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_cfg_eutra_r17.unpack(bref)); + } + if (app_layer_meas_cfg_r17_present) { + HANDLE_CODE(app_layer_meas_cfg_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_resume_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_cfg_ded_nr_r17_present) { + j.write_fieldname("sl-ConfigDedicatedNR-r17"); + sl_cfg_ded_nr_r17.to_json(j); + } + if (sl_l2_remote_ue_cfg_r17_present) { + j.write_fieldname("sl-L2RemoteUE-Config-r17"); + sl_l2_remote_ue_cfg_r17.to_json(j); + } + if (need_for_gap_ncsg_cfg_nr_r17_present) { + j.write_fieldname("needForGapNCSG-ConfigNR-r17"); + need_for_gap_ncsg_cfg_nr_r17.to_json(j); + } + if (need_for_gap_ncsg_cfg_eutra_r17_present) { + j.write_fieldname("needForGapNCSG-ConfigEUTRA-r17"); + need_for_gap_ncsg_cfg_eutra_r17.to_json(j); + } + if (scg_state_r17_present) { + j.write_str("scg-State-r17", "deactivated"); + } + if (app_layer_meas_cfg_r17_present) { + j.write_fieldname("appLayerMeasConfig-r17"); + app_layer_meas_cfg_r17.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// 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::report_cfg_nr: + c.destroy(); + break; + case types::report_cfg_inter_rat: + c.destroy(); + break; + case types::report_cfg_nr_sl_r16: + 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::report_cfg_nr_sl_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); + } +} +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::report_cfg_nr_sl_r16: + 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_"); + } +} +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::report_cfg_nr: + c.set(other.c.get()); + break; + case types::report_cfg_inter_rat: + c.set(other.c.get()); + break; + case types::report_cfg_nr_sl_r16: + 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_"); + } + + return *this; +} +report_cfg_nr_s& report_cfg_to_add_mod_s::report_cfg_c_::set_report_cfg_nr() +{ + set(types::report_cfg_nr); + return c.get(); +} +report_cfg_inter_rat_s& report_cfg_to_add_mod_s::report_cfg_c_::set_report_cfg_inter_rat() +{ + set(types::report_cfg_inter_rat); + return c.get(); +} +report_cfg_nr_sl_r16_s& report_cfg_to_add_mod_s::report_cfg_c_::set_report_cfg_nr_sl_r16() +{ + set(types::report_cfg_nr_sl_r16); + return c.get(); +} +void report_cfg_to_add_mod_s::report_cfg_c_::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; + case types::report_cfg_nr_sl_r16: + j.write_fieldname("reportConfigNR-SL-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "report_cfg_to_add_mod_s::report_cfg_c_"); + } + j.end_obj(); +} +SRSASN_CODE report_cfg_to_add_mod_s::report_cfg_c_::pack(bit_ref& bref) 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; + case types::report_cfg_nr_sl_r16: { + 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; +} +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::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; + case types::report_cfg_nr_sl_r16: { + 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; +} + +const char* report_cfg_to_add_mod_s::report_cfg_c_::types_opts::to_string() const +{ + static const char* names[] = {"reportConfigNR", "reportConfigInterRAT", "reportConfigNR-SL-r16"}; + return convert_enum_idx(names, 3, value, "report_cfg_to_add_mod_s::report_cfg_c_::types"); +} + +// RxTxTimeDiff-r17 ::= SEQUENCE +SRSASN_CODE rx_tx_time_diff_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(result_k5_r17_present, 1)); + + if (result_k5_r17_present) { + HANDLE_CODE(pack_integer(bref, result_k5_r17, (uint16_t)0u, (uint16_t)61565u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rx_tx_time_diff_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(result_k5_r17_present, 1)); + + if (result_k5_r17_present) { + HANDLE_CODE(unpack_integer(result_k5_r17, bref, (uint16_t)0u, (uint16_t)61565u)); + } + + return SRSASN_SUCCESS; +} +void rx_tx_time_diff_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (result_k5_r17_present) { + j.write_int("result-k5-r17", result_k5_r17); + } + j.end_obj(); +} + +// AreaConfiguration-v1700 ::= SEQUENCE +SRSASN_CODE area_cfg_v1700_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(area_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_target_list_r17.size() > 0, 1)); + + if (area_cfg_r17_present) { + HANDLE_CODE(area_cfg_r17.pack(bref)); + } + if (inter_freq_target_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_target_list_r17, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE area_cfg_v1700_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(area_cfg_r17_present, 1)); + bool inter_freq_target_list_r17_present; + HANDLE_CODE(bref.unpack(inter_freq_target_list_r17_present, 1)); + + if (area_cfg_r17_present) { + HANDLE_CODE(area_cfg_r17.unpack(bref)); + } + if (inter_freq_target_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_target_list_r17, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void area_cfg_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (area_cfg_r17_present) { + j.write_fieldname("areaConfig-r17"); + area_cfg_r17.to_json(j); + } + if (inter_freq_target_list_r17.size() > 0) { + j.start_array("interFreqTargetList-r17"); + for (const auto& e1 : inter_freq_target_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// CarrierInfoNR ::= SEQUENCE +SRSASN_CODE carrier_info_nr_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(smtc_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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_info_nr_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(smtc_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)); + } + + return SRSASN_SUCCESS; +} +void carrier_info_nr_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.end_obj(); +} + +// DLInformationTransfer-v1700-IEs ::= SEQUENCE +SRSASN_CODE dl_info_transfer_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ded_info_f1c_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(rx_tx_time_diff_gnb_r17_present, 1)); + HANDLE_CODE(bref.pack(ta_pdc_r17_present, 1)); + HANDLE_CODE(bref.pack(sib9_fallback_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ded_info_f1c_r17.size() > 0) { + HANDLE_CODE(ded_info_f1c_r17.pack(bref)); + } + if (rx_tx_time_diff_gnb_r17_present) { + HANDLE_CODE(rx_tx_time_diff_gnb_r17.pack(bref)); + } + if (ta_pdc_r17_present) { + HANDLE_CODE(ta_pdc_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_v1700_ies_s::unpack(cbit_ref& bref) +{ + bool ded_info_f1c_r17_present; + HANDLE_CODE(bref.unpack(ded_info_f1c_r17_present, 1)); + HANDLE_CODE(bref.unpack(rx_tx_time_diff_gnb_r17_present, 1)); + HANDLE_CODE(bref.unpack(ta_pdc_r17_present, 1)); + HANDLE_CODE(bref.unpack(sib9_fallback_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ded_info_f1c_r17_present) { + HANDLE_CODE(ded_info_f1c_r17.unpack(bref)); + } + if (rx_tx_time_diff_gnb_r17_present) { + HANDLE_CODE(rx_tx_time_diff_gnb_r17.unpack(bref)); + } + if (ta_pdc_r17_present) { + HANDLE_CODE(ta_pdc_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void dl_info_transfer_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ded_info_f1c_r17.size() > 0) { + j.write_str("dedicatedInfoF1c-r17", ded_info_f1c_r17.to_string()); + } + if (rx_tx_time_diff_gnb_r17_present) { + j.write_fieldname("rxTxTimeDiff-gNB-r17"); + rx_tx_time_diff_gnb_r17.to_json(j); + } + if (ta_pdc_r17_present) { + j.write_str("ta-PDC-r17", ta_pdc_r17.to_string()); + } + if (sib9_fallback_r17_present) { + j.write_str("sib9Fallback-r17", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +const char* dl_info_transfer_v1700_ies_s::ta_pdc_r17_opts::to_string() const +{ + static const char* names[] = {"activate", "deactivate"}; + return convert_enum_idx(names, 2, value, "dl_info_transfer_v1700_ies_s::ta_pdc_r17_e_"); +} + +// 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) +{ + 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; +} +void drb_count_msb_info_s::to_json(json_writer& j) 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(); +} + +// EventType-r16 ::= CHOICE +void event_type_r16_c::set(types::options e) +{ + type_ = e; +} +void event_type_r16_c::set_out_of_coverage() +{ + set(types::out_of_coverage); +} +event_type_r16_c::event_l1_s_& event_type_r16_c::set_event_l1() +{ + set(types::event_l1); + return c; +} +void event_type_r16_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::out_of_coverage: + break; + case types::event_l1: + j.write_fieldname("eventL1"); + j.start_obj(); + j.write_fieldname("l1-Threshold"); + c.l1_thres.to_json(j); + j.write_int("hysteresis", c.hysteresis); + j.write_str("timeToTrigger", c.time_to_trigger.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "event_type_r16_c"); + } + j.end_obj(); +} +SRSASN_CODE event_type_r16_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::out_of_coverage: + break; + case types::event_l1: + HANDLE_CODE(c.l1_thres.pack(bref)); + HANDLE_CODE(pack_integer(bref, c.hysteresis, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.time_to_trigger.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "event_type_r16_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE event_type_r16_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::out_of_coverage: + break; + case types::event_l1: + HANDLE_CODE(c.l1_thres.unpack(bref)); + HANDLE_CODE(unpack_integer(c.hysteresis, bref, (uint8_t)0u, (uint8_t)30u)); + HANDLE_CODE(c.time_to_trigger.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "event_type_r16_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* event_type_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"outOfCoverage", "eventL1"}; + return convert_enum_idx(names, 2, value, "event_type_r16_c::types"); +} +uint8_t event_type_r16_c::types_opts::to_number() const +{ + if (value == event_l1) { + return 1; + } + invalid_enum_number(value, "event_type_r16_c::types"); + return 0; +} + +// ExtendedPagingCycle-r17 ::= ENUMERATED +const char* extended_paging_cycle_r17_opts::to_string() const +{ + static const char* names[] = {"rf256", "rf512", "rf1024", "spare1"}; + return convert_enum_idx(names, 4, value, "extended_paging_cycle_r17_e"); +} +uint16_t extended_paging_cycle_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {256, 512, 1024}; + return map_enum_number(numbers, 3, value, "extended_paging_cycle_r17_e"); +} + +// LoggingInterval-r16 ::= ENUMERATED +const char* logging_interv_r16_opts::to_string() const +{ + static const char* names[] = {"ms320", + "ms640", + "ms1280", + "ms2560", + "ms5120", + "ms10240", + "ms20480", + "ms30720", + "ms40960", + "ms61440", + "infinity"}; + return convert_enum_idx(names, 11, value, "logging_interv_r16_e"); +} +int32_t logging_interv_r16_opts::to_number() const +{ + static const int32_t numbers[] = {320, 640, 1280, 2560, 5120, 10240, 20480, 30720, 40960, 61440, -1}; + return map_enum_number(numbers, 11, value, "logging_interv_r16_e"); +} + +// MasterKeyUpdate ::= SEQUENCE +SRSASN_CODE master_key_upd_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(nas_container.size() > 0, 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.size() > 0) { + HANDLE_CODE(nas_container.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE master_key_upd_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool nas_container_present; + HANDLE_CODE(bref.unpack(nas_container_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)); + } + + return SRSASN_SUCCESS; +} +void master_key_upd_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.size() > 0) { + j.write_str("nas-Container", nas_container.to_string()); + } + j.end_obj(); +} + +// MeasGapConfig ::= SEQUENCE +SRSASN_CODE meas_gap_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(gap_fr2_present, 1)); + + 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[1] |= gap_to_add_mod_list_r17.is_present(); + group_flags[1] |= gap_to_release_list_r17.is_present(); + group_flags[1] |= pos_meas_gap_pre_cfg_to_add_mod_list_r17.is_present(); + group_flags[1] |= pos_meas_gap_pre_cfg_to_release_list_r17.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 (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(gap_to_add_mod_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(gap_to_release_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(pos_meas_gap_pre_cfg_to_add_mod_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(pos_meas_gap_pre_cfg_to_release_list_r17.is_present(), 1)); + if (gap_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *gap_to_add_mod_list_r17, 1, 8)); + } + if (gap_to_release_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *gap_to_release_list_r17, 1, 8, integer_packer(1, 8))); + } + if (pos_meas_gap_pre_cfg_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *pos_meas_gap_pre_cfg_to_add_mod_list_r17, 1, 16)); + } + if (pos_meas_gap_pre_cfg_to_release_list_r17.is_present()) { + HANDLE_CODE( + pack_dyn_seq_of(bref, *pos_meas_gap_pre_cfg_to_release_list_r17, 1, 16, integer_packer(1, 16))); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_gap_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(gap_fr2_present, 1)); + + if (gap_fr2_present) { + HANDLE_CODE(gap_fr2.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); + + unpack_presence_flag(gap_fr1, bref); + unpack_presence_flag(gap_ue, bref); + if (gap_fr1.is_present()) { + HANDLE_CODE(gap_fr1->unpack(bref)); + } + if (gap_ue.is_present()) { + HANDLE_CODE(gap_ue->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(gap_to_add_mod_list_r17, bref); + unpack_presence_flag(gap_to_release_list_r17, bref); + unpack_presence_flag(pos_meas_gap_pre_cfg_to_add_mod_list_r17, bref); + unpack_presence_flag(pos_meas_gap_pre_cfg_to_release_list_r17, bref); + if (gap_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*gap_to_add_mod_list_r17, bref, 1, 8)); + } + if (gap_to_release_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*gap_to_release_list_r17, bref, 1, 8, integer_packer(1, 8))); + } + if (pos_meas_gap_pre_cfg_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*pos_meas_gap_pre_cfg_to_add_mod_list_r17, bref, 1, 16)); + } + if (pos_meas_gap_pre_cfg_to_release_list_r17.is_present()) { + HANDLE_CODE( + unpack_dyn_seq_of(*pos_meas_gap_pre_cfg_to_release_list_r17, bref, 1, 16, integer_packer(1, 16))); + } + } + } + return SRSASN_SUCCESS; +} +void meas_gap_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (gap_fr2_present) { + j.write_fieldname("gapFR2"); + gap_fr2.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 (gap_to_add_mod_list_r17.is_present()) { + j.start_array("gapToAddModList-r17"); + for (const auto& e1 : *gap_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (gap_to_release_list_r17.is_present()) { + j.start_array("gapToReleaseList-r17"); + for (const auto& e1 : *gap_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (pos_meas_gap_pre_cfg_to_add_mod_list_r17.is_present()) { + j.start_array("posMeasGapPreConfigToAddModList-r17"); + for (const auto& e1 : *pos_meas_gap_pre_cfg_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (pos_meas_gap_pre_cfg_to_release_list_r17.is_present()) { + j.start_array("posMeasGapPreConfigToReleaseList-r17"); + for (const auto& e1 : *pos_meas_gap_pre_cfg_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + } + j.end_obj(); +} + +// MeasGapSharingConfig ::= SEQUENCE +SRSASN_CODE meas_gap_sharing_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + 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 meas_gap_sharing_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + 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); + + unpack_presence_flag(gap_sharing_fr1, bref); + unpack_presence_flag(gap_sharing_ue, bref); + 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 meas_gap_sharing_cfg_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); + } + 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_obj(); +} + +// OtherConfig ::= SEQUENCE +SRSASN_CODE other_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(delay_budget_report_cfg_present, 1)); + + if (delay_budget_report_cfg_present) { + HANDLE_CODE(delay_budget_report_cfg.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE other_cfg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(delay_budget_report_cfg_present, 1)); + + if (delay_budget_report_cfg_present) { + HANDLE_CODE(delay_budget_report_cfg.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void other_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); + } + j.end_obj(); +} + +void other_cfg_s::delay_budget_report_cfg_c_::set(types::options e) +{ + type_ = e; +} +void other_cfg_s::delay_budget_report_cfg_c_::set_release() +{ + set(types::release); +} +other_cfg_s::delay_budget_report_cfg_c_::setup_s_& other_cfg_s::delay_budget_report_cfg_c_::set_setup() +{ + set(types::setup); + return c; +} +void other_cfg_s::delay_budget_report_cfg_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("delayBudgetReportingProhibitTimer", c.delay_budget_report_prohibit_timer.to_string()); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "other_cfg_s::delay_budget_report_cfg_c_"); + } + j.end_obj(); +} +SRSASN_CODE other_cfg_s::delay_budget_report_cfg_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.delay_budget_report_prohibit_timer.pack(bref)); + break; + default: + log_invalid_choice_id(type_, "other_cfg_s::delay_budget_report_cfg_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE other_cfg_s::delay_budget_report_cfg_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::release: + break; + case types::setup: + HANDLE_CODE(c.delay_budget_report_prohibit_timer.unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "other_cfg_s::delay_budget_report_cfg_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* +other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_opts::to_string() const +{ + static const char* names[] = {"s0", "s0dot4", "s0dot8", "s1dot6", "s3", "s6", "s12", "s30"}; + return convert_enum_idx( + names, 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 numbers[] = {0.0, 0.4, 0.8, 1.6, 3.0, 6.0, 12.0, 30.0}; + return map_enum_number( + numbers, 8, value, "other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_e_"); +} +const char* +other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_opts::to_number_string() const +{ + static const char* number_strs[] = {"0", "0.4", "0.8", "1.6", "3", "6", "12", "30"}; + return convert_enum_idx(number_strs, + 8, + value, + "other_cfg_s::delay_budget_report_cfg_c_::setup_s_::delay_budget_report_prohibit_timer_e_"); +} + +const char* other_cfg_s::delay_budget_report_cfg_c_::types_opts::to_string() const +{ + static const char* names[] = {"release", "setup"}; + return convert_enum_idx(names, 2, value, "other_cfg_s::delay_budget_report_cfg_c_::types"); +} + +// PeriodicRNAU-TimerValue ::= ENUMERATED +const char* periodic_rnau_timer_value_opts::to_string() const +{ + static const char* names[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min360", "min720"}; + return convert_enum_idx(names, 8, value, "periodic_rnau_timer_value_e"); +} +uint16_t periodic_rnau_timer_value_opts::to_number() const +{ + static const uint16_t numbers[] = {5, 10, 20, 30, 60, 120, 360, 720}; + return map_enum_number(numbers, 8, value, "periodic_rnau_timer_value_e"); +} + +// QuantityConfig ::= SEQUENCE +SRSASN_CODE quant_cfg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(quant_cfg_nr_list.size() > 0, 1)); + + if (quant_cfg_nr_list.size() > 0) { + 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[1] |= quant_cfg_utra_fdd_r16.is_present(); + group_flags[1] |= quant_cfg_cli_r16.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)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(quant_cfg_utra_fdd_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(quant_cfg_cli_r16.is_present(), 1)); + if (quant_cfg_utra_fdd_r16.is_present()) { + HANDLE_CODE(quant_cfg_utra_fdd_r16->pack(bref)); + } + if (quant_cfg_cli_r16.is_present()) { + HANDLE_CODE(quant_cfg_cli_r16->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE quant_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool quant_cfg_nr_list_present; + 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(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(quant_cfg_eutra, bref); + if (quant_cfg_eutra.is_present()) { + HANDLE_CODE(quant_cfg_eutra->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(quant_cfg_utra_fdd_r16, bref); + unpack_presence_flag(quant_cfg_cli_r16, bref); + if (quant_cfg_utra_fdd_r16.is_present()) { + HANDLE_CODE(quant_cfg_utra_fdd_r16->unpack(bref)); + } + if (quant_cfg_cli_r16.is_present()) { + HANDLE_CODE(quant_cfg_cli_r16->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void quant_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (quant_cfg_nr_list.size() > 0) { + 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); + } + if (quant_cfg_utra_fdd_r16.is_present()) { + j.write_fieldname("quantityConfigUTRA-FDD-r16"); + quant_cfg_utra_fdd_r16->to_json(j); + } + if (quant_cfg_cli_r16.is_present()) { + j.write_fieldname("quantityConfigCLI-r16"); + quant_cfg_cli_r16->to_json(j); + } + } + j.end_obj(); +} + +// RAN-NotificationAreaInfo ::= CHOICE +void ran_notif_area_info_c::destroy_() +{ + switch (type_) { + case types::cell_list: + c.destroy(); + break; + case types::ran_area_cfg_list: + c.destroy(); + break; + default: + break; + } +} +void ran_notif_area_info_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) +{ + type_ = other.type(); + switch (type_) { + case types::cell_list: + c.init(other.c.get()); + break; + case types::ran_area_cfg_list: + c.init(other.c.get()); + 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::operator=(const ran_notif_area_info_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_list: + c.set(other.c.get()); + break; + case types::ran_area_cfg_list: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ran_notif_area_info_c"); + } + + return *this; +} +plmn_ran_area_cell_list_l& ran_notif_area_info_c::set_cell_list() +{ + set(types::cell_list); + return c.get(); +} +plmn_ran_area_cfg_list_l& ran_notif_area_info_c::set_ran_area_cfg_list() +{ + set(types::ran_area_cfg_list); + return c.get(); +} +void ran_notif_area_info_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(); + 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(); + break; + default: + log_invalid_choice_id(type_, "ran_notif_area_info_c"); + } + j.end_obj(); +} +SRSASN_CODE ran_notif_area_info_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)); + break; + case types::ran_area_cfg_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + break; + default: + log_invalid_choice_id(type_, "ran_notif_area_info_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ran_notif_area_info_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)); + break; + case types::ran_area_cfg_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + break; + default: + log_invalid_choice_id(type_, "ran_notif_area_info_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ran_notif_area_info_c::types_opts::to_string() const +{ + static const char* names[] = {"cellList", "ran-AreaConfigList"}; + return convert_enum_idx(names, 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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.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 (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + 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 (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCRelease-v1610-IEs ::= SEQUENCE +SRSASN_CODE rrc_release_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(voice_fallback_ind_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_idle_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_idle_cfg_r16_present) { + HANDLE_CODE(meas_idle_cfg_r16.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_release_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(voice_fallback_ind_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_idle_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_idle_cfg_r16_present) { + HANDLE_CODE(meas_idle_cfg_r16.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_release_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (voice_fallback_ind_r16_present) { + j.write_str("voiceFallbackIndication-r16", "true"); + } + if (meas_idle_cfg_r16_present) { + j.write_fieldname("measIdleConfig-r16"); + meas_idle_cfg_r16.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCResume-v1610-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(idle_mode_meas_req_r16_present, 1)); + HANDLE_CODE(bref.pack(restore_mcg_scells_r16_present, 1)); + HANDLE_CODE(bref.pack(restore_scg_r16_present, 1)); + HANDLE_CODE(bref.pack(mrdc_secondary_cell_group_r16_present, 1)); + HANDLE_CODE(bref.pack(need_for_gaps_cfg_nr_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (mrdc_secondary_cell_group_r16_present) { + HANDLE_CODE(mrdc_secondary_cell_group_r16.pack(bref)); + } + if (need_for_gaps_cfg_nr_r16_present) { + HANDLE_CODE(need_for_gaps_cfg_nr_r16.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(idle_mode_meas_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(restore_mcg_scells_r16_present, 1)); + HANDLE_CODE(bref.unpack(restore_scg_r16_present, 1)); + HANDLE_CODE(bref.unpack(mrdc_secondary_cell_group_r16_present, 1)); + HANDLE_CODE(bref.unpack(need_for_gaps_cfg_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (mrdc_secondary_cell_group_r16_present) { + HANDLE_CODE(mrdc_secondary_cell_group_r16.unpack(bref)); + } + if (need_for_gaps_cfg_nr_r16_present) { + HANDLE_CODE(need_for_gaps_cfg_nr_r16.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_resume_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (idle_mode_meas_req_r16_present) { + j.write_str("idleModeMeasurementReq-r16", "true"); + } + if (restore_mcg_scells_r16_present) { + j.write_str("restoreMCG-SCells-r16", "true"); + } + if (restore_scg_r16_present) { + j.write_str("restoreSCG-r16", "true"); + } + if (mrdc_secondary_cell_group_r16_present) { + j.write_fieldname("mrdc-SecondaryCellGroup-r16"); + mrdc_secondary_cell_group_r16.to_json(j); + } + if (need_for_gaps_cfg_nr_r16_present) { + j.write_fieldname("needForGapsConfigNR-r16"); + need_for_gaps_cfg_nr_r16.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +void rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::destroy_() +{ + switch (type_) { + case types::nr_scg_r16: + c.destroy(); + break; + case types::eutra_scg_r16: + c.destroy(); + break; + default: + break; + } +} +void rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nr_scg_r16: + c.init(); + break; + case types::eutra_scg_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_"); + } +} +rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::mrdc_secondary_cell_group_r16_c_( + const rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::nr_scg_r16: + c.init(other.c.get()); + break; + case types::eutra_scg_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_"); + } +} +rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_& +rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::operator=( + const rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nr_scg_r16: + c.set(other.c.get()); + break; + case types::eutra_scg_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_"); + } + + return *this; +} +dyn_octstring& rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::set_nr_scg_r16() +{ + set(types::nr_scg_r16); + return c.get(); +} +dyn_octstring& rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::set_eutra_scg_r16() +{ + set(types::eutra_scg_r16); + return c.get(); +} +void rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nr_scg_r16: + j.write_str("nr-SCG-r16", c.get().to_string()); + break; + case types::eutra_scg_r16: + j.write_str("eutra-SCG-r16", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::nr_scg_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eutra_scg_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::nr_scg_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eutra_scg_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"nr-SCG-r16", "eutra-SCG-r16"}; + return convert_enum_idx(names, 2, value, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::types"); +} + +// 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)); + } + + 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)); + } + + 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()); + } + j.end_obj(); +} + +const char* redirected_carrier_info_eutra_s::cn_type_opts::to_string() const +{ + static const char* names[] = {"epc", "fiveGC"}; + return convert_enum_idx(names, 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; + } + invalid_enum_number(value, "redirected_carrier_info_eutra_s::cn_type_e_"); + return 0; +} + +// SDT-Config-r17 ::= SEQUENCE +SRSASN_CODE sdt_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sdt_drb_list_r17_present, 1)); + HANDLE_CODE(bref.pack(sdt_srb2_ind_r17_present, 1)); + HANDLE_CODE(bref.pack(sdt_mac_phy_cg_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(sdt_drb_continue_rohc_r17_present, 1)); + + if (sdt_drb_list_r17_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, sdt_drb_list_r17, 0, 29, integer_packer(1, 32))); + } + if (sdt_mac_phy_cg_cfg_r17_present) { + HANDLE_CODE(sdt_mac_phy_cg_cfg_r17.pack(bref)); + } + if (sdt_drb_continue_rohc_r17_present) { + HANDLE_CODE(sdt_drb_continue_rohc_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sdt_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sdt_drb_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(sdt_srb2_ind_r17_present, 1)); + HANDLE_CODE(bref.unpack(sdt_mac_phy_cg_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(sdt_drb_continue_rohc_r17_present, 1)); + + if (sdt_drb_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sdt_drb_list_r17, bref, 0, 29, integer_packer(1, 32))); + } + if (sdt_mac_phy_cg_cfg_r17_present) { + HANDLE_CODE(sdt_mac_phy_cg_cfg_r17.unpack(bref)); + } + if (sdt_drb_continue_rohc_r17_present) { + HANDLE_CODE(sdt_drb_continue_rohc_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sdt_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sdt_drb_list_r17_present) { + j.start_array("sdt-DRB-List-r17"); + for (const auto& e1 : sdt_drb_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (sdt_srb2_ind_r17_present) { + j.write_str("sdt-SRB2-Indication-r17", "allowed"); + } + if (sdt_mac_phy_cg_cfg_r17_present) { + j.write_fieldname("sdt-MAC-PHY-CG-Config-r17"); + sdt_mac_phy_cg_cfg_r17.to_json(j); + } + if (sdt_drb_continue_rohc_r17_present) { + j.write_str("sdt-DRB-ContinueROHC-r17", sdt_drb_continue_rohc_r17.to_string()); + } + j.end_obj(); +} + +const char* sdt_cfg_r17_s::sdt_drb_continue_rohc_r17_opts::to_string() const +{ + static const char* names[] = {"cell", "rna"}; + return convert_enum_idx(names, 2, value, "sdt_cfg_r17_s::sdt_drb_continue_rohc_r17_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.size() > 0, 1)); + + HANDLE_CODE(rat_type.pack(bref)); + if (cap_request_filt.size() > 0) { + HANDLE_CODE(cap_request_filt.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_rat_request_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool cap_request_filt_present; + 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; +} +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.size() > 0) { + j.write_str("capabilityRequestFilter", cap_request_filt.to_string()); + } + j.end_obj(); +} + +// AreaConfiguration-r16 ::= SEQUENCE +SRSASN_CODE area_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_freq_target_list_r16.size() > 0, 1)); + + HANDLE_CODE(area_cfg_r16.pack(bref)); + if (inter_freq_target_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_target_list_r16, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE area_cfg_r16_s::unpack(cbit_ref& bref) +{ + bool inter_freq_target_list_r16_present; + HANDLE_CODE(bref.unpack(inter_freq_target_list_r16_present, 1)); + + HANDLE_CODE(area_cfg_r16.unpack(bref)); + if (inter_freq_target_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_target_list_r16, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void area_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("areaConfig-r16"); + area_cfg_r16.to_json(j); + if (inter_freq_target_list_r16.size() > 0) { + j.start_array("interFreqTargetList-r16"); + for (const auto& e1 : inter_freq_target_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(freq_prio_list_nr.size() > 0, 1)); + HANDLE_CODE(bref.pack(t320_present, 1)); + + if (freq_prio_list_eutra.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_eutra, 1, 8)); + } + if (freq_prio_list_nr.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_nr, 1, 8)); + } + if (t320_present) { + HANDLE_CODE(t320.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= freq_prio_list_ded_slicing_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(freq_prio_list_ded_slicing_r17.is_present(), 1)); + if (freq_prio_list_ded_slicing_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *freq_prio_list_ded_slicing_r17, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_resel_priorities_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool freq_prio_list_eutra_present; + HANDLE_CODE(bref.unpack(freq_prio_list_eutra_present, 1)); + bool freq_prio_list_nr_present; + 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)); + } + + 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); + + unpack_presence_flag(freq_prio_list_ded_slicing_r17, bref); + if (freq_prio_list_ded_slicing_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*freq_prio_list_ded_slicing_r17, bref, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +void cell_resel_priorities_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_prio_list_eutra.size() > 0) { + j.start_array("freqPriorityListEUTRA"); + for (const auto& e1 : freq_prio_list_eutra) { + e1.to_json(j); + } + j.end_array(); + } + if (freq_prio_list_nr.size() > 0) { + j.start_array("freqPriorityListNR"); + for (const auto& e1 : freq_prio_list_nr) { + e1.to_json(j); + } + j.end_array(); + } + if (t320_present) { + j.write_str("t320", t320.to_string()); + } + if (ext) { + if (freq_prio_list_ded_slicing_r17.is_present()) { + j.start_array("freqPriorityListDedicatedSlicing-r17"); + for (const auto& e1 : *freq_prio_list_ded_slicing_r17) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +const char* cell_resel_priorities_s::t320_opts::to_string() const +{ + static const char* names[] = {"min5", "min10", "min20", "min30", "min60", "min120", "min180", "spare1"}; + return convert_enum_idx(names, 8, value, "cell_resel_priorities_s::t320_e_"); +} +uint8_t cell_resel_priorities_s::t320_opts::to_number() const +{ + static const uint8_t numbers[] = {5, 10, 20, 30, 60, 120, 180}; + return map_enum_number(numbers, 7, value, "cell_resel_priorities_s::t320_e_"); +} + +// DLInformationTransfer-v1610-IEs ::= SEQUENCE +SRSASN_CODE dl_info_transfer_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ref_time_info_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ref_time_info_r16_present) { + HANDLE_CODE(ref_time_info_r16.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ref_time_info_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ref_time_info_r16_present) { + HANDLE_CODE(ref_time_info_r16.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void dl_info_transfer_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ref_time_info_r16_present) { + j.write_fieldname("referenceTimeInfo-r16"); + ref_time_info_r16.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// LoggedEventTriggerConfig-r16 ::= SEQUENCE +SRSASN_CODE logged_event_trigger_cfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(event_type_r16.pack(bref)); + HANDLE_CODE(logging_interv_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_event_trigger_cfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(event_type_r16.unpack(bref)); + HANDLE_CODE(logging_interv_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void logged_event_trigger_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("eventType-r16"); + event_type_r16.to_json(j); + j.write_str("loggingInterval-r16", logging_interv_r16.to_string()); + j.end_obj(); +} + +// LoggedMeasurementConfiguration-v1700-IEs ::= SEQUENCE +SRSASN_CODE logged_meas_cfg_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sig_logged_meas_type_r17_present, 1)); + HANDLE_CODE(bref.pack(early_meas_ind_r17_present, 1)); + HANDLE_CODE(bref.pack(area_cfg_v1700_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (area_cfg_v1700_present) { + HANDLE_CODE(area_cfg_v1700.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_v1700_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sig_logged_meas_type_r17_present, 1)); + HANDLE_CODE(bref.unpack(early_meas_ind_r17_present, 1)); + HANDLE_CODE(bref.unpack(area_cfg_v1700_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (area_cfg_v1700_present) { + HANDLE_CODE(area_cfg_v1700.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void logged_meas_cfg_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sig_logged_meas_type_r17_present) { + j.write_str("sigLoggedMeasType-r17", "true"); + } + if (early_meas_ind_r17_present) { + j.write_str("earlyMeasIndication-r17", "true"); + } + if (area_cfg_v1700_present) { + j.write_fieldname("areaConfiguration-v1700"); + area_cfg_v1700.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// LoggedPeriodicalReportConfig-r16 ::= SEQUENCE +SRSASN_CODE logged_periodical_report_cfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(logging_interv_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_periodical_report_cfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(logging_interv_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void logged_periodical_report_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("loggingInterval-r16", logging_interv_r16.to_string()); + j.end_obj(); +} + +// LoggingDuration-r16 ::= ENUMERATED +const char* logging_dur_r16_opts::to_string() const +{ + static const char* names[] = {"min10", "min20", "min40", "min60", "min90", "min120", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "logging_dur_r16_e"); +} +uint8_t logging_dur_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {10, 20, 40, 60, 90, 120}; + return map_enum_number(numbers, 6, value, "logging_dur_r16_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.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_obj_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(report_cfg_to_rem_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(report_cfg_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_id_to_rem_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_id_to_add_mod_list.size() > 0, 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 (meas_obj_to_rem_list.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_obj_to_add_mod_list, 1, 64)); + } + if (report_cfg_to_rem_list.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, report_cfg_to_add_mod_list, 1, 64)); + } + if (meas_id_to_rem_list.size() > 0) { + 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.size() > 0) { + 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 (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= interfreq_cfg_no_gap_r16_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(interfreq_cfg_no_gap_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool meas_obj_to_rem_list_present; + HANDLE_CODE(bref.unpack(meas_obj_to_rem_list_present, 1)); + bool meas_obj_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(meas_obj_to_add_mod_list_present, 1)); + bool report_cfg_to_rem_list_present; + HANDLE_CODE(bref.unpack(report_cfg_to_rem_list_present, 1)); + bool report_cfg_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(report_cfg_to_add_mod_list_present, 1)); + bool meas_id_to_rem_list_present; + HANDLE_CODE(bref.unpack(meas_id_to_rem_list_present, 1)); + bool meas_id_to_add_mod_list_present; + 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 (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 (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(interfreq_cfg_no_gap_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void meas_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_obj_to_rem_list.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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 (ext) { + if (interfreq_cfg_no_gap_r16_present) { + j.write_str("interFrequencyConfig-NoGap-r16", "true"); + } + } + j.end_obj(); +} + +void meas_cfg_s::s_measure_cfg_c_::destroy_() {} +void meas_cfg_s::s_measure_cfg_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +meas_cfg_s::s_measure_cfg_c_::s_measure_cfg_c_(const meas_cfg_s::s_measure_cfg_c_& other) +{ + 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_"); + } +} +meas_cfg_s::s_measure_cfg_c_& meas_cfg_s::s_measure_cfg_c_::operator=(const meas_cfg_s::s_measure_cfg_c_& other) +{ + 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_"); + } + + return *this; +} +uint8_t& meas_cfg_s::s_measure_cfg_c_::set_ssb_rsrp() +{ + set(types::ssb_rsrp); + return c.get(); +} +uint8_t& meas_cfg_s::s_measure_cfg_c_::set_csi_rsrp() +{ + set(types::csi_rsrp); + return c.get(); +} +void meas_cfg_s::s_measure_cfg_c_::to_json(json_writer& j) const +{ + 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(); +} +SRSASN_CODE meas_cfg_s::s_measure_cfg_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)); + 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; +} +SRSASN_CODE meas_cfg_s::s_measure_cfg_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)); + 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; +} + +const char* meas_cfg_s::s_measure_cfg_c_::types_opts::to_string() const +{ + static const char* names[] = {"ssb-RSRP", "csi-RSRP"}; + return convert_enum_idx(names, 2, value, "meas_cfg_s::s_measure_cfg_c_::types"); +} + +// MobilityFromNRCommand-v1610-IEs ::= SEQUENCE +SRSASN_CODE mob_from_nr_cmd_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(voice_fallback_ind_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_from_nr_cmd_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(voice_fallback_ind_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void mob_from_nr_cmd_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (voice_fallback_ind_r16_present) { + j.write_str("voiceFallbackIndication-r16", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCReconfiguration-v1530-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(master_cell_group.size() > 0, 1)); + HANDLE_CODE(bref.pack(full_cfg_present, 1)); + HANDLE_CODE(bref.pack(ded_nas_msg_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(master_key_upd_present, 1)); + HANDLE_CODE(bref.pack(ded_sib1_delivery.size() > 0, 1)); + HANDLE_CODE(bref.pack(ded_sys_info_delivery.size() > 0, 1)); + HANDLE_CODE(bref.pack(other_cfg_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (master_cell_group.size() > 0) { + HANDLE_CODE(master_cell_group.pack(bref)); + } + if (ded_nas_msg_list.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(ded_sib1_delivery.pack(bref)); + } + if (ded_sys_info_delivery.size() > 0) { + 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 rrc_recfg_v1530_ies_s::unpack(cbit_ref& bref) +{ + bool master_cell_group_present; + HANDLE_CODE(bref.unpack(master_cell_group_present, 1)); + HANDLE_CODE(bref.unpack(full_cfg_present, 1)); + bool ded_nas_msg_list_present; + HANDLE_CODE(bref.unpack(ded_nas_msg_list_present, 1)); + HANDLE_CODE(bref.unpack(master_key_upd_present, 1)); + bool ded_sib1_delivery_present; + HANDLE_CODE(bref.unpack(ded_sib1_delivery_present, 1)); + bool ded_sys_info_delivery_present; + 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)); + } + 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 rrc_recfg_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (master_cell_group.size() > 0) { + j.write_str("masterCellGroup", master_cell_group.to_string()); + } + if (full_cfg_present) { + j.write_str("fullConfig", "true"); + } + if (ded_nas_msg_list.size() > 0) { + 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.size() > 0) { + j.write_str("dedicatedSIB1-Delivery", ded_sib1_delivery.to_string()); + } + if (ded_sys_info_delivery.size() > 0) { + 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(); +} + +// RRCReestablishment-v1700-IEs ::= SEQUENCE +SRSASN_CODE rrc_reest_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sl_l2_remote_ue_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (sl_l2_remote_ue_cfg_r17_present) { + HANDLE_CODE(sl_l2_remote_ue_cfg_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_reest_v1700_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sl_l2_remote_ue_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (sl_l2_remote_ue_cfg_r17_present) { + HANDLE_CODE(sl_l2_remote_ue_cfg_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_reest_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_l2_remote_ue_cfg_r17_present) { + j.write_fieldname("sl-L2RemoteUE-Config-r17"); + sl_l2_remote_ue_cfg_r17.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCRelease-v1540-IEs ::= SEQUENCE +SRSASN_CODE rrc_release_v1540_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(wait_time_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 (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_release_v1540_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(wait_time_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 (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_release_v1540_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (wait_time_present) { + j.write_int("waitTime", wait_time); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCResume-v1560-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_v1560_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(radio_bearer_cfg2.size() > 0, 1)); + HANDLE_CODE(bref.pack(sk_counter_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (radio_bearer_cfg2.size() > 0) { + HANDLE_CODE(radio_bearer_cfg2.pack(bref)); + } + if (sk_counter_present) { + HANDLE_CODE(pack_integer(bref, sk_counter, (uint32_t)0u, (uint32_t)65535u)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_v1560_ies_s::unpack(cbit_ref& bref) +{ + bool radio_bearer_cfg2_present; + 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)); + + 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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_resume_v1560_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (radio_bearer_cfg2.size() > 0) { + 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"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RedirectedCarrierInfo ::= CHOICE +void redirected_carrier_info_c::destroy_() +{ + switch (type_) { + case types::nr: + c.destroy(); + break; + case types::eutra: + c.destroy(); + break; + default: + break; + } +} +void redirected_carrier_info_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nr: + c.init(); + break; + case types::eutra: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_c"); + } +} +redirected_carrier_info_c::redirected_carrier_info_c(const redirected_carrier_info_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::nr: + c.init(other.c.get()); + break; + case types::eutra: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_c"); + } +} +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::nr: + c.set(other.c.get()); + break; + case types::eutra: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_c"); + } + + return *this; +} +carrier_info_nr_s& redirected_carrier_info_c::set_nr() +{ + set(types::nr); + return c.get(); +} +redirected_carrier_info_eutra_s& redirected_carrier_info_c::set_eutra() +{ + set(types::eutra); + return c.get(); +} +void redirected_carrier_info_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nr: + j.write_fieldname("nr"); + c.get().to_json(j); + break; + case types::eutra: + j.write_fieldname("eutra"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_c"); + } + j.end_obj(); +} +SRSASN_CODE redirected_carrier_info_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::nr: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eutra: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE redirected_carrier_info_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::nr: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eutra: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "redirected_carrier_info_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* redirected_carrier_info_c::types_opts::to_string() const +{ + static const char* names[] = {"nr", "eutra"}; + return convert_enum_idx(names, 2, value, "redirected_carrier_info_c::types"); +} + +// SecurityConfigSMC ::= SEQUENCE +SRSASN_CODE security_cfg_smc_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(security_algorithm_cfg.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_cfg_smc_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(security_algorithm_cfg.unpack(bref)); + + return SRSASN_SUCCESS; +} +void security_cfg_smc_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 (t380_present) { + HANDLE_CODE(t380.pack(bref)); + } + HANDLE_CODE(pack_integer(bref, next_hop_chaining_count, (uint8_t)0u, (uint8_t)7u)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= sl_ue_id_remote_r17_present; + group_flags[0] |= sdt_cfg_r17.is_present(); + group_flags[0] |= srs_pos_rrc_inactive_r17.is_present(); + group_flags[0] |= ran_extended_paging_cycle_r17_present; + group_flags[1] |= ncd_ssb_red_cap_init_bwp_sdt_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sl_ue_id_remote_r17_present, 1)); + HANDLE_CODE(bref.pack(sdt_cfg_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(srs_pos_rrc_inactive_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(ran_extended_paging_cycle_r17_present, 1)); + if (sl_ue_id_remote_r17_present) { + HANDLE_CODE(pack_integer(bref, sl_ue_id_remote_r17, (uint32_t)0u, (uint32_t)65535u)); + } + if (sdt_cfg_r17.is_present()) { + HANDLE_CODE(sdt_cfg_r17->pack(bref)); + } + if (srs_pos_rrc_inactive_r17.is_present()) { + HANDLE_CODE(srs_pos_rrc_inactive_r17->pack(bref)); + } + if (ran_extended_paging_cycle_r17_present) { + HANDLE_CODE(ran_extended_paging_cycle_r17.pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ncd_ssb_red_cap_init_bwp_sdt_r17.is_present(), 1)); + if (ncd_ssb_red_cap_init_bwp_sdt_r17.is_present()) { + HANDLE_CODE(ncd_ssb_red_cap_init_bwp_sdt_r17->pack(bref)); + } + } + } + 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 (t380_present) { + HANDLE_CODE(t380.unpack(bref)); + } + HANDLE_CODE(unpack_integer(next_hop_chaining_count, bref, (uint8_t)0u, (uint8_t)7u)); + + 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(sl_ue_id_remote_r17_present, 1)); + unpack_presence_flag(sdt_cfg_r17, bref); + unpack_presence_flag(srs_pos_rrc_inactive_r17, bref); + HANDLE_CODE(bref.unpack(ran_extended_paging_cycle_r17_present, 1)); + if (sl_ue_id_remote_r17_present) { + HANDLE_CODE(unpack_integer(sl_ue_id_remote_r17, bref, (uint32_t)0u, (uint32_t)65535u)); + } + if (sdt_cfg_r17.is_present()) { + HANDLE_CODE(sdt_cfg_r17->unpack(bref)); + } + if (srs_pos_rrc_inactive_r17.is_present()) { + HANDLE_CODE(srs_pos_rrc_inactive_r17->unpack(bref)); + } + if (ran_extended_paging_cycle_r17_present) { + HANDLE_CODE(ran_extended_paging_cycle_r17.unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(ncd_ssb_red_cap_init_bwp_sdt_r17, bref); + if (ncd_ssb_red_cap_init_bwp_sdt_r17.is_present()) { + HANDLE_CODE(ncd_ssb_red_cap_init_bwp_sdt_r17->unpack(bref)); + } + } + } + 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 (t380_present) { + j.write_str("t380", t380.to_string()); + } + j.write_int("nextHopChainingCount", next_hop_chaining_count); + if (ext) { + if (sl_ue_id_remote_r17_present) { + j.write_int("sl-UEIdentityRemote-r17", sl_ue_id_remote_r17); + } + if (sdt_cfg_r17.is_present()) { + j.write_fieldname("sdt-Config-r17"); + sdt_cfg_r17->to_json(j); + } + if (srs_pos_rrc_inactive_r17.is_present()) { + j.write_fieldname("srs-PosRRC-Inactive-r17"); + srs_pos_rrc_inactive_r17->to_json(j); + } + if (ran_extended_paging_cycle_r17_present) { + j.write_str("ran-ExtendedPagingCycle-r17", ran_extended_paging_cycle_r17.to_string()); + } + if (ncd_ssb_red_cap_init_bwp_sdt_r17.is_present()) { + j.write_fieldname("ncd-SSB-RedCapInitialBWP-SDT-r17"); + ncd_ssb_red_cap_init_bwp_sdt_r17->to_json(j); + } + } + j.end_obj(); +} + +// TraceReference-r16 ::= SEQUENCE +SRSASN_CODE trace_ref_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(plmn_id_r16.pack(bref)); + HANDLE_CODE(trace_id_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE trace_ref_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(plmn_id_r16.unpack(bref)); + HANDLE_CODE(trace_id_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void trace_ref_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Identity-r16"); + plmn_id_r16.to_json(j); + j.write_str("traceId-r16", trace_id_r16.to_string()); + j.end_obj(); +} + +// UEInformationRequest-v1700-IEs ::= SEQUENCE +SRSASN_CODE ue_info_request_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(success_ho_report_req_r17_present, 1)); + HANDLE_CODE(bref.pack(coarse_location_request_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_request_v1700_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(success_ho_report_req_r17_present, 1)); + HANDLE_CODE(bref.unpack(coarse_location_request_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void ue_info_request_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (success_ho_report_req_r17_present) { + j.write_str("successHO-ReportReq-r17", "true"); + } + if (coarse_location_request_r17_present) { + j.write_str("coarseLocationRequest-r17", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// CounterCheck-IEs ::= SEQUENCE +SRSASN_CODE counter_check_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 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.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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; +} +void counter_check_ies_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); + } + j.end_array(); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// DLDedicatedMessageSegment-r16-IEs ::= SEQUENCE +SRSASN_CODE dl_ded_msg_segment_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_integer(bref, segment_num_r16, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(rrc_msg_segment_container_r16.pack(bref)); + HANDLE_CODE(rrc_msg_segment_type_r16.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ded_msg_segment_r16_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_integer(segment_num_r16, bref, (uint8_t)0u, (uint8_t)4u)); + HANDLE_CODE(rrc_msg_segment_container_r16.unpack(bref)); + HANDLE_CODE(rrc_msg_segment_type_r16.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void dl_ded_msg_segment_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("segmentNumber-r16", segment_num_r16); + j.write_str("rrc-MessageSegmentContainer-r16", rrc_msg_segment_container_r16.to_string()); + j.write_str("rrc-MessageSegmentType-r16", rrc_msg_segment_type_r16.to_string()); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +const char* dl_ded_msg_segment_r16_ies_s::rrc_msg_segment_type_r16_opts::to_string() const +{ + static const char* names[] = {"notLastSegment", "lastSegment"}; + return convert_enum_idx(names, 2, value, "dl_ded_msg_segment_r16_ies_s::rrc_msg_segment_type_r16_e_"); +} + +// DLInformationTransfer-IEs ::= SEQUENCE +SRSASN_CODE dl_info_transfer_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ded_nas_msg.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ded_nas_msg.size() > 0) { + HANDLE_CODE(ded_nas_msg.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + 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 dl_info_transfer_ies_s::unpack(cbit_ref& bref) +{ + bool ded_nas_msg_present; + HANDLE_CODE(bref.unpack(ded_nas_msg_present, 1)); + bool late_non_crit_ext_present; + 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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void dl_info_transfer_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ded_nas_msg.size() > 0) { + j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// DLInformationTransferMRDC-r16-IEs ::= SEQUENCE +SRSASN_CODE dl_info_transfer_mrdc_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dl_dcch_msg_nr_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(dl_dcch_msg_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (dl_dcch_msg_nr_r16.size() > 0) { + HANDLE_CODE(dl_dcch_msg_nr_r16.pack(bref)); + } + if (dl_dcch_msg_eutra_r16.size() > 0) { + HANDLE_CODE(dl_dcch_msg_eutra_r16.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_mrdc_r16_ies_s::unpack(cbit_ref& bref) +{ + bool dl_dcch_msg_nr_r16_present; + HANDLE_CODE(bref.unpack(dl_dcch_msg_nr_r16_present, 1)); + bool dl_dcch_msg_eutra_r16_present; + HANDLE_CODE(bref.unpack(dl_dcch_msg_eutra_r16_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (dl_dcch_msg_nr_r16_present) { + HANDLE_CODE(dl_dcch_msg_nr_r16.unpack(bref)); + } + if (dl_dcch_msg_eutra_r16_present) { + HANDLE_CODE(dl_dcch_msg_eutra_r16.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void dl_info_transfer_mrdc_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dl_dcch_msg_nr_r16.size() > 0) { + j.write_str("dl-DCCH-MessageNR-r16", dl_dcch_msg_nr_r16.to_string()); + } + if (dl_dcch_msg_eutra_r16.size() > 0) { + j.write_str("dl-DCCH-MessageEUTRA-r16", dl_dcch_msg_eutra_r16.to_string()); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// LoggedMeasurementConfiguration-r16-IEs ::= SEQUENCE +SRSASN_CODE logged_meas_cfg_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(area_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(plmn_id_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(bt_name_list_r16_present, 1)); + HANDLE_CODE(bref.pack(wlan_name_list_r16_present, 1)); + HANDLE_CODE(bref.pack(sensor_name_list_r16_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(trace_ref_r16.pack(bref)); + HANDLE_CODE(trace_recording_session_ref_r16.pack(bref)); + HANDLE_CODE(tce_id_r16.pack(bref)); + HANDLE_CODE(absolute_time_info_r16.pack(bref)); + if (area_cfg_r16_present) { + HANDLE_CODE(area_cfg_r16.pack(bref)); + } + if (plmn_id_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_r16, 1, 16)); + } + if (bt_name_list_r16_present) { + HANDLE_CODE(bt_name_list_r16.pack(bref)); + } + if (wlan_name_list_r16_present) { + HANDLE_CODE(wlan_name_list_r16.pack(bref)); + } + if (sensor_name_list_r16_present) { + HANDLE_CODE(sensor_name_list_r16.pack(bref)); + } + HANDLE_CODE(logging_dur_r16.pack(bref)); + HANDLE_CODE(report_type.pack(bref)); + if (late_non_crit_ext.size() > 0) { + 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 logged_meas_cfg_r16_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(area_cfg_r16_present, 1)); + bool plmn_id_list_r16_present; + HANDLE_CODE(bref.unpack(plmn_id_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(bt_name_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(wlan_name_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(sensor_name_list_r16_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(trace_ref_r16.unpack(bref)); + HANDLE_CODE(trace_recording_session_ref_r16.unpack(bref)); + HANDLE_CODE(tce_id_r16.unpack(bref)); + HANDLE_CODE(absolute_time_info_r16.unpack(bref)); + if (area_cfg_r16_present) { + HANDLE_CODE(area_cfg_r16.unpack(bref)); + } + if (plmn_id_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_r16, bref, 1, 16)); + } + if (bt_name_list_r16_present) { + HANDLE_CODE(bt_name_list_r16.unpack(bref)); + } + if (wlan_name_list_r16_present) { + HANDLE_CODE(wlan_name_list_r16.unpack(bref)); + } + if (sensor_name_list_r16_present) { + HANDLE_CODE(sensor_name_list_r16.unpack(bref)); + } + HANDLE_CODE(logging_dur_r16.unpack(bref)); + HANDLE_CODE(report_type.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 logged_meas_cfg_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("traceReference-r16"); + trace_ref_r16.to_json(j); + j.write_str("traceRecordingSessionRef-r16", trace_recording_session_ref_r16.to_string()); + j.write_str("tce-Id-r16", tce_id_r16.to_string()); + j.write_str("absoluteTimeInfo-r16", absolute_time_info_r16.to_string()); + if (area_cfg_r16_present) { + j.write_fieldname("areaConfiguration-r16"); + area_cfg_r16.to_json(j); + } + if (plmn_id_list_r16.size() > 0) { + j.start_array("plmn-IdentityList-r16"); + for (const auto& e1 : plmn_id_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (bt_name_list_r16_present) { + j.write_fieldname("bt-NameList-r16"); + bt_name_list_r16.to_json(j); + } + if (wlan_name_list_r16_present) { + j.write_fieldname("wlan-NameList-r16"); + wlan_name_list_r16.to_json(j); + } + if (sensor_name_list_r16_present) { + j.write_fieldname("sensor-NameList-r16"); + sensor_name_list_r16.to_json(j); + } + j.write_str("loggingDuration-r16", logging_dur_r16.to_string()); + j.write_fieldname("reportType"); + report_type.to_json(j); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +void logged_meas_cfg_r16_ies_s::report_type_c_::destroy_() +{ + switch (type_) { + case types::periodical: + c.destroy(); + break; + case types::event_triggered: + c.destroy(); + break; + default: + break; + } +} +void logged_meas_cfg_r16_ies_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::nulltype: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r16_ies_s::report_type_c_"); + } +} +logged_meas_cfg_r16_ies_s::report_type_c_::report_type_c_(const logged_meas_cfg_r16_ies_s::report_type_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()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r16_ies_s::report_type_c_"); + } +} +logged_meas_cfg_r16_ies_s::report_type_c_& +logged_meas_cfg_r16_ies_s::report_type_c_::operator=(const logged_meas_cfg_r16_ies_s::report_type_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()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r16_ies_s::report_type_c_"); + } + + return *this; +} +logged_periodical_report_cfg_r16_s& logged_meas_cfg_r16_ies_s::report_type_c_::set_periodical() +{ + set(types::periodical); + return c.get(); +} +logged_event_trigger_cfg_r16_s& logged_meas_cfg_r16_ies_s::report_type_c_::set_event_triggered() +{ + set(types::event_triggered); + return c.get(); +} +void logged_meas_cfg_r16_ies_s::report_type_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); + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r16_ies_s::report_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE logged_meas_cfg_r16_ies_s::report_type_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::periodical: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::event_triggered: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r16_ies_s::report_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_r16_ies_s::report_type_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::periodical: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::event_triggered: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r16_ies_s::report_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* logged_meas_cfg_r16_ies_s::report_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"periodical", "eventTriggered"}; + return convert_enum_idx(names, 2, value, "logged_meas_cfg_r16_ies_s::report_type_c_::types"); +} + +// MobilityFromNRCommand-IEs ::= SEQUENCE +SRSASN_CODE mob_from_nr_cmd_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(nas_security_param_from_nr.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 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.size() > 0) { + HANDLE_CODE(nas_security_param_from_nr.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + 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 mob_from_nr_cmd_ies_s::unpack(cbit_ref& bref) +{ + bool nas_security_param_from_nr_present; + HANDLE_CODE(bref.unpack(nas_security_param_from_nr_present, 1)); + bool late_non_crit_ext_present; + 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)); + } + 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 mob_from_nr_cmd_ies_s::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.size() > 0) { + j.write_str("nas-SecurityParamFromNR", nas_security_param_from_nr.to_string()); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +const char* mob_from_nr_cmd_ies_s::target_rat_type_opts::to_string() const +{ + static const char* names[] = {"eutra", "utra-fdd-v1610", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "mob_from_nr_cmd_ies_s::target_rat_type_e_"); +} + +// 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_cfg_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (radio_bearer_cfg_present) { + HANDLE_CODE(radio_bearer_cfg.pack(bref)); + } + if (secondary_cell_group.size() > 0) { + HANDLE_CODE(secondary_cell_group.pack(bref)); + } + if (meas_cfg_present) { + HANDLE_CODE(meas_cfg.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + 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_recfg_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(radio_bearer_cfg_present, 1)); + bool secondary_cell_group_present; + HANDLE_CODE(bref.unpack(secondary_cell_group_present, 1)); + HANDLE_CODE(bref.unpack(meas_cfg_present, 1)); + bool late_non_crit_ext_present; + 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 (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)); + } + + return SRSASN_SUCCESS; +} +void rrc_recfg_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 (secondary_cell_group.size() > 0) { + 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.size() > 0) { + 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.size() > 0, 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.size() > 0) { + 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_reest_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(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.size() > 0) { + 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(); +} + +// 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.size() > 0, 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.size() > 0) { + 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)); + bool late_non_crit_ext_present; + 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.size() > 0) { + 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(); +} + +const char* rrc_release_ies_s::depriorit_req_s_::depriorit_type_opts::to_string() const +{ + static const char* names[] = {"frequency", "nr"}; + return convert_enum_idx(names, 2, value, "rrc_release_ies_s::depriorit_req_s_::depriorit_type_e_"); +} + +const char* rrc_release_ies_s::depriorit_req_s_::depriorit_timer_opts::to_string() const +{ + static const char* names[] = {"min5", "min10", "min15", "min30"}; + return convert_enum_idx(names, 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 numbers[] = {5, 10, 15, 30}; + return map_enum_number(numbers, 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.size() > 0, 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.size() > 0, 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.size() > 0) { + HANDLE_CODE(master_cell_group.pack(bref)); + } + if (meas_cfg_present) { + HANDLE_CODE(meas_cfg.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + 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_resume_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(radio_bearer_cfg_present, 1)); + bool master_cell_group_present; + 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)); + bool late_non_crit_ext_present; + 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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(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.size() > 0) { + 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.size() > 0) { + 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(); +} + +// SecurityModeCommand-IEs ::= SEQUENCE +SRSASN_CODE security_mode_cmd_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(security_cfg_smc.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_cmd_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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.size() > 0) { + 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(); +} + +// UECapabilityEnquiry-IEs ::= SEQUENCE +SRSASN_CODE ue_cap_enquiry_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(ue_cap_enquiry_ext.size() > 0, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, ue_cap_rat_request_list, 1, 8)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + if (ue_cap_enquiry_ext.size() > 0) { + HANDLE_CODE(ue_cap_enquiry_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_enquiry_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + bool ue_cap_enquiry_ext_present; + 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 ue_cap_enquiry_ies_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.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (ue_cap_enquiry_ext.size() > 0) { + j.write_str("ue-CapabilityEnquiryExt", ue_cap_enquiry_ext.to_string()); + } + j.end_obj(); +} + +// UEInformationRequest-r16-IEs ::= SEQUENCE +SRSASN_CODE ue_info_request_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(idle_mode_meas_req_r16_present, 1)); + HANDLE_CODE(bref.pack(log_meas_report_req_r16_present, 1)); + HANDLE_CODE(bref.pack(conn_est_fail_report_req_r16_present, 1)); + HANDLE_CODE(bref.pack(ra_report_req_r16_present, 1)); + HANDLE_CODE(bref.pack(rlf_report_req_r16_present, 1)); + HANDLE_CODE(bref.pack(mob_history_report_req_r16_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext.size() > 0) { + 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 ue_info_request_r16_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(idle_mode_meas_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_report_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(conn_est_fail_report_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(ra_report_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(rlf_report_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(mob_history_report_req_r16_present, 1)); + bool late_non_crit_ext_present; + 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 ue_info_request_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (idle_mode_meas_req_r16_present) { + j.write_str("idleModeMeasurementReq-r16", "true"); + } + if (log_meas_report_req_r16_present) { + j.write_str("logMeasReportReq-r16", "true"); + } + if (conn_est_fail_report_req_r16_present) { + j.write_str("connEstFailReportReq-r16", "true"); + } + if (ra_report_req_r16_present) { + j.write_str("ra-ReportReq-r16", "true"); + } + if (rlf_report_req_r16_present) { + j.write_str("rlf-ReportReq-r16", "true"); + } + if (mob_history_report_req_r16_present) { + j.write_str("mobilityHistoryReportReq-r16", "true"); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// 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_::set(types::options e) +{ + type_ = e; +} +counter_check_ies_s& counter_check_s::crit_exts_c_::set_counter_check() +{ + set(types::counter_check); + return c; +} +void counter_check_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void counter_check_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::counter_check: + j.write_fieldname("counterCheck"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE counter_check_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::counter_check: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::counter_check: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "counter_check_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* counter_check_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"counterCheck", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "counter_check_s::crit_exts_c_::types"); +} + +// DLDedicatedMessageSegment-r16 ::= SEQUENCE +SRSASN_CODE dl_ded_msg_segment_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ded_msg_segment_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void dl_ded_msg_segment_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void dl_ded_msg_segment_r16_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +dl_ded_msg_segment_r16_ies_s& dl_ded_msg_segment_r16_s::crit_exts_c_::set_dl_ded_msg_segment_r16() +{ + set(types::dl_ded_msg_segment_r16); + return c; +} +void dl_ded_msg_segment_r16_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void dl_ded_msg_segment_r16_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::dl_ded_msg_segment_r16: + j.write_fieldname("dlDedicatedMessageSegment-r16"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "dl_ded_msg_segment_r16_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_ded_msg_segment_r16_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::dl_ded_msg_segment_r16: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "dl_ded_msg_segment_r16_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_ded_msg_segment_r16_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::dl_ded_msg_segment_r16: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "dl_ded_msg_segment_r16_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* dl_ded_msg_segment_r16_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"dlDedicatedMessageSegment-r16", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "dl_ded_msg_segment_r16_s::crit_exts_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) +{ + HANDLE_CODE(unpack_integer(rrc_transaction_id, bref, (uint8_t)0u, (uint8_t)3u)); + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void dl_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 dl_info_transfer_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +dl_info_transfer_ies_s& dl_info_transfer_s::crit_exts_c_::set_dl_info_transfer() +{ + set(types::dl_info_transfer); + return c; +} +void dl_info_transfer_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void dl_info_transfer_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::dl_info_transfer: + j.write_fieldname("dlInformationTransfer"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_info_transfer_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::dl_info_transfer: + HANDLE_CODE(c.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; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::dl_info_transfer: + HANDLE_CODE(c.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; + } + return SRSASN_SUCCESS; +} + +const char* dl_info_transfer_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"dlInformationTransfer", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "dl_info_transfer_s::crit_exts_c_::types"); +} + +// DLInformationTransferMRDC-r16 ::= SEQUENCE +SRSASN_CODE dl_info_transfer_mrdc_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_mrdc_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void dl_info_transfer_mrdc_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void dl_info_transfer_mrdc_r16_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_& dl_info_transfer_mrdc_r16_s::crit_exts_c_::set_c1() +{ + set(types::c1); + return c; +} +void dl_info_transfer_mrdc_r16_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void dl_info_transfer_mrdc_r16_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_mrdc_r16_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_info_transfer_mrdc_r16_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::c1: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_mrdc_r16_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_mrdc_r16_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_mrdc_r16_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +dl_info_transfer_mrdc_r16_ies_s& dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::set_dl_info_transfer_mrdc_r16() +{ + set(types::dl_info_transfer_mrdc_r16); + return c; +} +void dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::set_spare3() +{ + set(types::spare3); +} +void dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::set_spare2() +{ + set(types::spare2); +} +void dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::set_spare1() +{ + set(types::spare1); +} +void dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::dl_info_transfer_mrdc_r16: + j.write_fieldname("dlInformationTransferMRDC-r16"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::dl_info_transfer_mrdc_r16: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::dl_info_transfer_mrdc_r16: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::types_opts::to_string() const +{ + static const char* names[] = {"dlInformationTransferMRDC-r16", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::types"); +} + +const char* dl_info_transfer_mrdc_r16_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"c1", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "dl_info_transfer_mrdc_r16_s::crit_exts_c_::types"); +} +uint8_t dl_info_transfer_mrdc_r16_s::crit_exts_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "dl_info_transfer_mrdc_r16_s::crit_exts_c_::types"); +} + +// LoggedMeasurementConfiguration-r16 ::= SEQUENCE +SRSASN_CODE logged_meas_cfg_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void logged_meas_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void logged_meas_cfg_r16_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +logged_meas_cfg_r16_ies_s& logged_meas_cfg_r16_s::crit_exts_c_::set_logged_meas_cfg_r16() +{ + set(types::logged_meas_cfg_r16); + return c; +} +void logged_meas_cfg_r16_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void logged_meas_cfg_r16_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::logged_meas_cfg_r16: + j.write_fieldname("loggedMeasurementConfiguration-r16"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r16_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE logged_meas_cfg_r16_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::logged_meas_cfg_r16: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r16_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE logged_meas_cfg_r16_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::logged_meas_cfg_r16: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "logged_meas_cfg_r16_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* logged_meas_cfg_r16_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"loggedMeasurementConfiguration-r16", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "logged_meas_cfg_r16_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_::set(types::options e) +{ + type_ = e; +} +mob_from_nr_cmd_ies_s& mob_from_nr_cmd_s::crit_exts_c_::set_mob_from_nr_cmd() +{ + set(types::mob_from_nr_cmd); + return c; +} +void mob_from_nr_cmd_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void mob_from_nr_cmd_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::mob_from_nr_cmd: + j.write_fieldname("mobilityFromNRCommand"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE mob_from_nr_cmd_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::mob_from_nr_cmd: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::mob_from_nr_cmd: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mob_from_nr_cmd_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* mob_from_nr_cmd_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"mobilityFromNRCommand", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 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_::set(types::options e) +{ + type_ = e; +} +rrc_recfg_ies_s& rrc_recfg_s::crit_exts_c_::set_rrc_recfg() +{ + set(types::rrc_recfg); + return c; +} +void rrc_recfg_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void rrc_recfg_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_recfg: + j.write_fieldname("rrcReconfiguration"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_recfg_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::rrc_recfg: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::rrc_recfg: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_recfg_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rrc_recfg_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcReconfiguration", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 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_::set(types::options e) +{ + type_ = e; +} +rrc_reest_ies_s& rrc_reest_s::crit_exts_c_::set_rrc_reest() +{ + set(types::rrc_reest); + return c; +} +void rrc_reest_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void rrc_reest_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_reest: + j.write_fieldname("rrcReestablishment"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_reest_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::rrc_reest: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + 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.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_reest_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rrc_reest_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcReestablishment", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "rrc_reest_s::crit_exts_c_::types"); +} + +// 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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_release_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_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 rrc_release_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +rrc_release_ies_s& rrc_release_s::crit_exts_c_::set_rrc_release() +{ + set(types::rrc_release); + return c; +} +void rrc_release_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void rrc_release_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_release: + j.write_fieldname("rrcRelease"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_release_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::rrc_release: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_release_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::rrc_release: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_release_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rrc_release_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcRelease", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "rrc_release_s::crit_exts_c_::types"); +} + +// RRCResume ::= SEQUENCE +SRSASN_CODE rrc_resume_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_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)); + + 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_::set(types::options e) +{ + type_ = e; +} +rrc_resume_ies_s& rrc_resume_s::crit_exts_c_::set_rrc_resume() +{ + set(types::rrc_resume); + return c; +} +void rrc_resume_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void rrc_resume_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_resume: + j.write_fieldname("rrcResume"); + c.to_json(j); + break; + case types::crit_exts_future: + 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.pack(bref)); + break; + case types::crit_exts_future: + 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.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_resume_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rrc_resume_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcResume", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 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_::set(types::options e) +{ + type_ = e; +} +security_mode_cmd_ies_s& security_mode_cmd_s::crit_exts_c_::set_security_mode_cmd() +{ + set(types::security_mode_cmd); + return c; +} +void security_mode_cmd_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +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.to_json(j); + break; + case types::crit_exts_future: + 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.pack(bref)); + break; + case types::crit_exts_future: + break; + 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.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "security_mode_cmd_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* security_mode_cmd_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"securityModeCommand", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 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_::set(types::options e) +{ + type_ = e; +} +ue_cap_enquiry_ies_s& ue_cap_enquiry_s::crit_exts_c_::set_ue_cap_enquiry() +{ + set(types::ue_cap_enquiry); + return c; +} +void ue_cap_enquiry_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void ue_cap_enquiry_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_cap_enquiry: + j.write_fieldname("ueCapabilityEnquiry"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + 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.pack(bref)); + break; + case types::crit_exts_future: + break; + 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.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_cap_enquiry_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ue_cap_enquiry_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"ueCapabilityEnquiry", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "ue_cap_enquiry_s::crit_exts_c_::types"); +} + +// UEInformationRequest-r16 ::= SEQUENCE +SRSASN_CODE ue_info_request_r16_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_info_request_r16_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_info_request_r16_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_info_request_r16_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +ue_info_request_r16_ies_s& ue_info_request_r16_s::crit_exts_c_::set_ue_info_request_r16() +{ + set(types::ue_info_request_r16); + return c; +} +void ue_info_request_r16_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void ue_info_request_r16_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_info_request_r16: + j.write_fieldname("ueInformationRequest-r16"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_info_request_r16_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_info_request_r16_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ue_info_request_r16: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_info_request_r16_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_request_r16_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ue_info_request_r16: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_info_request_r16_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ue_info_request_r16_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"ueInformationRequest-r16", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "ue_info_request_r16_s::crit_exts_c_::types"); +} diff --git a/lib/asn1/rrc_nr/nr_sidelink_preconf.cpp b/lib/asn1/rrc_nr/nr_sidelink_preconf.cpp index 1a95d4a80b..4383e60416 100644 --- a/lib/asn1/rrc_nr/nr_sidelink_preconf.cpp +++ b/lib/asn1/rrc_nr/nr_sidelink_preconf.cpp @@ -9,8 +9,6 @@ */ #include "srsran/asn1/rrc_nr/nr_sidelink_preconf.h" -#include - using namespace asn1; using namespace asn1::rrc_nr; diff --git a/lib/asn1/rrc_nr/nr_ue_variables.cpp b/lib/asn1/rrc_nr/nr_ue_variables.cpp index fed5c19988..a905afb4fd 100644 --- a/lib/asn1/rrc_nr/nr_ue_variables.cpp +++ b/lib/asn1/rrc_nr/nr_ue_variables.cpp @@ -9,8 +9,6 @@ */ #include "srsran/asn1/rrc_nr/nr_ue_variables.h" -#include - using namespace asn1; using namespace asn1::rrc_nr; diff --git a/lib/asn1/rrc_nr/pc5_rrc_definitions.cpp b/lib/asn1/rrc_nr/pc5_rrc_definitions.cpp index 4c6e97d574..38704bdf1f 100644 --- a/lib/asn1/rrc_nr/pc5_rrc_definitions.cpp +++ b/lib/asn1/rrc_nr/pc5_rrc_definitions.cpp @@ -9,8 +9,6 @@ */ #include "srsran/asn1/rrc_nr/pc5_rrc_definitions.h" -#include - using namespace asn1; using namespace asn1::rrc_nr; @@ -18,142 +16,6 @@ using namespace asn1::rrc_nr; * Struct Methods ******************************************************************************/ -// SNPN-AccessInfo-r17 ::= SEQUENCE -SRSASN_CODE sn_pn_access_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ext_ch_supported_r17_present, 1)); - HANDLE_CODE(bref.pack(ext_ch_without_cfg_allowed_r17_present, 1)); - HANDLE_CODE(bref.pack(onboarding_enabled_r17_present, 1)); - HANDLE_CODE(bref.pack(ims_emergency_support_for_sn_pn_r17_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sn_pn_access_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ext_ch_supported_r17_present, 1)); - HANDLE_CODE(bref.unpack(ext_ch_without_cfg_allowed_r17_present, 1)); - HANDLE_CODE(bref.unpack(onboarding_enabled_r17_present, 1)); - HANDLE_CODE(bref.unpack(ims_emergency_support_for_sn_pn_r17_present, 1)); - - return SRSASN_SUCCESS; -} -void sn_pn_access_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ext_ch_supported_r17_present) { - j.write_str("extCH-Supported-r17", "true"); - } - if (ext_ch_without_cfg_allowed_r17_present) { - j.write_str("extCH-WithoutConfigAllowed-r17", "true"); - } - if (onboarding_enabled_r17_present) { - j.write_str("onboardingEnabled-r17", "true"); - } - if (ims_emergency_support_for_sn_pn_r17_present) { - j.write_str("imsEmergencySupportForSNPN-r17", "true"); - } - j.end_obj(); -} - -// CellAccessRelatedInfo ::= SEQUENCE -SRSASN_CODE cell_access_related_info_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cell_reserved_for_other_use_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_info_list, 1, 12)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= cell_reserved_for_future_use_r16_present; - group_flags[0] |= npn_id_info_list_r16.is_present(); - group_flags[1] |= snpn_access_info_list_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(cell_reserved_for_future_use_r16_present, 1)); - HANDLE_CODE(bref.pack(npn_id_info_list_r16.is_present(), 1)); - if (npn_id_info_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *npn_id_info_list_r16, 1, 12)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(snpn_access_info_list_r17.is_present(), 1)); - if (snpn_access_info_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *snpn_access_info_list_r17, 1, 12)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cell_access_related_info_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(cell_reserved_for_other_use_present, 1)); - - HANDLE_CODE(unpack_dyn_seq_of(plmn_id_info_list, bref, 1, 12)); - - 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(cell_reserved_for_future_use_r16_present, 1)); - unpack_presence_flag(npn_id_info_list_r16, bref); - if (npn_id_info_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*npn_id_info_list_r16, bref, 1, 12)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(snpn_access_info_list_r17, bref); - if (snpn_access_info_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*snpn_access_info_list_r17, bref, 1, 12)); - } - } - } - return SRSASN_SUCCESS; -} -void cell_access_related_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("plmn-IdentityInfoList"); - for (const auto& e1 : plmn_id_info_list) { - e1.to_json(j); - } - j.end_array(); - if (cell_reserved_for_other_use_present) { - j.write_str("cellReservedForOtherUse", "true"); - } - if (ext) { - if (cell_reserved_for_future_use_r16_present) { - j.write_str("cellReservedForFutureUse-r16", "true"); - } - if (npn_id_info_list_r16.is_present()) { - j.start_array("npn-IdentityInfoList-r16"); - for (const auto& e1 : *npn_id_info_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (snpn_access_info_list_r17.is_present()) { - j.start_array("snpn-AccessInfoList-r17"); - for (const auto& e1 : *snpn_access_info_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - } - j.end_obj(); -} - // BandParametersSidelink-v1710 ::= SEQUENCE SRSASN_CODE band_params_sidelink_v1710_s::pack(bit_ref& bref) const { diff --git a/lib/asn1/rrc_nr/pcch_msg.cpp b/lib/asn1/rrc_nr/pcch_msg.cpp new file mode 100644 index 0000000000..a8eb1f8eec --- /dev/null +++ b/lib/asn1/rrc_nr/pcch_msg.cpp @@ -0,0 +1,186 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/pcch_msg.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// PCCH-MessageType ::= CHOICE +void pcch_msg_type_c::set(types::options e) +{ + type_ = e; +} +pcch_msg_type_c::c1_c_& pcch_msg_type_c::set_c1() +{ + set(types::c1); + return c; +} +void pcch_msg_type_c::set_msg_class_ext() +{ + set(types::msg_class_ext); +} +void pcch_msg_type_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.to_json(j); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "pcch_msg_type_c"); + } + j.end_obj(); +} +SRSASN_CODE pcch_msg_type_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::c1: + HANDLE_CODE(c.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; +} +SRSASN_CODE pcch_msg_type_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.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; +} + +void pcch_msg_type_c::c1_c_::set(types::options e) +{ + type_ = e; +} +paging_s& pcch_msg_type_c::c1_c_::set_paging() +{ + set(types::paging); + return c; +} +void pcch_msg_type_c::c1_c_::set_spare1() +{ + set(types::spare1); +} +void pcch_msg_type_c::c1_c_::to_json(json_writer& j) 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(); +} +SRSASN_CODE pcch_msg_type_c::c1_c_::pack(bit_ref& bref) 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; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pcch_msg_type_c::c1_c_::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; + } + return SRSASN_SUCCESS; +} + +const char* pcch_msg_type_c::c1_c_::types_opts::to_string() const +{ + static const char* names[] = {"paging", "spare1"}; + return convert_enum_idx(names, 2, value, "pcch_msg_type_c::c1_c_::types"); +} + +const char* pcch_msg_type_c::types_opts::to_string() const +{ + static const char* names[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(names, 2, value, "pcch_msg_type_c::types"); +} +uint8_t pcch_msg_type_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "pcch_msg_type_c::types"); +} + +// PCCH-Message ::= SEQUENCE +SRSASN_CODE pcch_msg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pcch_msg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void pcch_msg_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.end_obj(); + j.end_array(); +} diff --git a/lib/asn1/rrc_nr/pcch_msg_ies.cpp b/lib/asn1/rrc_nr/pcch_msg_ies.cpp new file mode 100644 index 0000000000..2a2928a502 --- /dev/null +++ b/lib/asn1/rrc_nr/pcch_msg_ies.cpp @@ -0,0 +1,325 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/pcch_msg_ies.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// PagingRecord-v1700 ::= SEQUENCE +SRSASN_CODE paging_record_v1700_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(paging_cause_r17_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE paging_record_v1700_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(paging_cause_r17_present, 1)); + + return SRSASN_SUCCESS; +} +void paging_record_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (paging_cause_r17_present) { + j.write_str("pagingCause-r17", "voice"); + } + j.end_obj(); +} + +// PagingUE-Identity ::= CHOICE +void paging_ue_id_c::destroy_() +{ + switch (type_) { + case types::ng_5_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) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ng_5_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"); + } +} +paging_ue_id_c::paging_ue_id_c(const paging_ue_id_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::ng_5_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"); + } +} +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_5_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; +} +fixed_bitstring<48>& paging_ue_id_c::set_ng_5_g_s_tmsi() +{ + set(types::ng_5_g_s_tmsi); + return c.get>(); +} +fixed_bitstring<40>& paging_ue_id_c::set_full_i_rnti() +{ + set(types::full_i_rnti); + return c.get>(); +} +void paging_ue_id_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ng_5_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(); +} +SRSASN_CODE paging_ue_id_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ng_5_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; +} +SRSASN_CODE paging_ue_id_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ng_5_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; +} + +const char* paging_ue_id_c::types_opts::to_string() const +{ + static const char* names[] = {"ng-5G-S-TMSI", "fullI-RNTI"}; + return convert_enum_idx(names, 2, value, "paging_ue_id_c::types"); +} +int8_t paging_ue_id_c::types_opts::to_number() const +{ + static const int8_t numbers[] = {-5}; + return map_enum_number(numbers, 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(access_type_present, 1)); + + HANDLE_CODE(ue_id.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE paging_record_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(access_type_present, 1)); + + HANDLE_CODE(ue_id.unpack(bref)); + + return SRSASN_SUCCESS; +} +void paging_record_s::to_json(json_writer& j) 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(); +} + +// Paging-v1700-IEs ::= SEQUENCE +SRSASN_CODE paging_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(paging_record_list_v1700.size() > 0, 1)); + HANDLE_CODE(bref.pack(paging_group_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (paging_record_list_v1700.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, paging_record_list_v1700, 1, 32)); + } + if (paging_group_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, paging_group_list_r17, 1, 32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE paging_v1700_ies_s::unpack(cbit_ref& bref) +{ + bool paging_record_list_v1700_present; + HANDLE_CODE(bref.unpack(paging_record_list_v1700_present, 1)); + bool paging_group_list_r17_present; + HANDLE_CODE(bref.unpack(paging_group_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (paging_record_list_v1700_present) { + HANDLE_CODE(unpack_dyn_seq_of(paging_record_list_v1700, bref, 1, 32)); + } + if (paging_group_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(paging_group_list_r17, bref, 1, 32)); + } + + return SRSASN_SUCCESS; +} +void paging_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (paging_record_list_v1700.size() > 0) { + j.start_array("pagingRecordList-v1700"); + for (const auto& e1 : paging_record_list_v1700) { + e1.to_json(j); + } + j.end_array(); + } + if (paging_group_list_r17.size() > 0) { + j.start_array("pagingGroupList-r17"); + for (const auto& e1 : paging_group_list_r17) { + 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(); +} + +// Paging ::= SEQUENCE +SRSASN_CODE paging_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(paging_record_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (paging_record_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, paging_record_list, 1, 32)); + } + if (late_non_crit_ext.size() > 0) { + 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 paging_s::unpack(cbit_ref& bref) +{ + bool paging_record_list_present; + HANDLE_CODE(bref.unpack(paging_record_list_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (paging_record_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(paging_record_list, bref, 1, 32)); + } + 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 paging_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (paging_record_list.size() > 0) { + j.start_array("pagingRecordList"); + for (const auto& e1 : paging_record_list) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} diff --git a/lib/asn1/rrc_nr/radio_bearer_cfg.cpp b/lib/asn1/rrc_nr/radio_bearer_cfg.cpp new file mode 100644 index 0000000000..9e6e2ed024 --- /dev/null +++ b/lib/asn1/rrc_nr/radio_bearer_cfg.cpp @@ -0,0 +1,1694 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/radio_bearer_cfg.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// DiscardTimerExt-r16 ::= ENUMERATED +const char* discard_timer_ext_r16_opts::to_string() const +{ + static const char* names[] = {"ms0dot5", "ms1", "ms2", "ms4", "ms6", "ms8", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "discard_timer_ext_r16_e"); +} +float discard_timer_ext_r16_opts::to_number() const +{ + static const float numbers[] = {0.5, 1.0, 2.0, 4.0, 6.0, 8.0}; + return map_enum_number(numbers, 6, value, "discard_timer_ext_r16_e"); +} +const char* discard_timer_ext_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.5", "1", "2", "4", "6", "8"}; + return convert_enum_idx(number_strs, 8, value, "discard_timer_ext_r16_e"); +} + +// DiscardTimerExt2-r17 ::= ENUMERATED +const char* discard_timer_ext2_r17_opts::to_string() const +{ + static const char* names[] = {"ms2000", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "discard_timer_ext2_r17_e"); +} +uint16_t discard_timer_ext2_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {2000}; + return map_enum_number(numbers, 1, value, "discard_timer_ext2_r17_e"); +} + +// EthernetHeaderCompression-r16 ::= SEQUENCE +SRSASN_CODE ethernet_hdr_compress_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ehc_dl_r16_present, 1)); + HANDLE_CODE(bref.pack(ehc_ul_r16_present, 1)); + + bref.pack(ehc_common_r16.ext, 1); + HANDLE_CODE(ehc_common_r16.ehc_c_id_len_r16.pack(bref)); + if (ehc_dl_r16_present) { + bref.pack(ehc_dl_r16.ext, 1); + HANDLE_CODE(bref.pack(ehc_dl_r16.drb_continue_ehc_dl_r16_present, 1)); + } + if (ehc_ul_r16_present) { + bref.pack(ehc_ul_r16.ext, 1); + HANDLE_CODE(bref.pack(ehc_ul_r16.drb_continue_ehc_ul_r16_present, 1)); + HANDLE_CODE(pack_integer(bref, ehc_ul_r16.max_c_id_ehc_ul_r16, (uint16_t)1u, (uint16_t)32767u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ethernet_hdr_compress_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ehc_dl_r16_present, 1)); + HANDLE_CODE(bref.unpack(ehc_ul_r16_present, 1)); + + bref.unpack(ehc_common_r16.ext, 1); + HANDLE_CODE(ehc_common_r16.ehc_c_id_len_r16.unpack(bref)); + if (ehc_dl_r16_present) { + bref.unpack(ehc_dl_r16.ext, 1); + HANDLE_CODE(bref.unpack(ehc_dl_r16.drb_continue_ehc_dl_r16_present, 1)); + } + if (ehc_ul_r16_present) { + bref.unpack(ehc_ul_r16.ext, 1); + HANDLE_CODE(bref.unpack(ehc_ul_r16.drb_continue_ehc_ul_r16_present, 1)); + HANDLE_CODE(unpack_integer(ehc_ul_r16.max_c_id_ehc_ul_r16, bref, (uint16_t)1u, (uint16_t)32767u)); + } + + return SRSASN_SUCCESS; +} +void ethernet_hdr_compress_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("ehc-Common-r16"); + j.start_obj(); + j.write_str("ehc-CID-Length-r16", ehc_common_r16.ehc_c_id_len_r16.to_string()); + j.end_obj(); + if (ehc_dl_r16_present) { + j.write_fieldname("ehc-Downlink-r16"); + j.start_obj(); + if (ehc_dl_r16.drb_continue_ehc_dl_r16_present) { + j.write_str("drb-ContinueEHC-DL-r16", "true"); + } + j.end_obj(); + } + if (ehc_ul_r16_present) { + j.write_fieldname("ehc-Uplink-r16"); + j.start_obj(); + j.write_int("maxCID-EHC-UL-r16", ehc_ul_r16.max_c_id_ehc_ul_r16); + if (ehc_ul_r16.drb_continue_ehc_ul_r16_present) { + j.write_str("drb-ContinueEHC-UL-r16", "true"); + } + j.end_obj(); + } + j.end_obj(); +} + +const char* ethernet_hdr_compress_r16_s::ehc_common_r16_s_::ehc_c_id_len_r16_opts::to_string() const +{ + static const char* names[] = {"bits7", "bits15"}; + return convert_enum_idx(names, 2, value, "ethernet_hdr_compress_r16_s::ehc_common_r16_s_::ehc_c_id_len_r16_e_"); +} +uint8_t ethernet_hdr_compress_r16_s::ehc_common_r16_s_::ehc_c_id_len_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {7, 15}; + return map_enum_number(numbers, 2, value, "ethernet_hdr_compress_r16_s::ehc_common_r16_s_::ehc_c_id_len_r16_e_"); +} + +// UL-DataSplitThreshold ::= ENUMERATED +const char* ul_data_split_thres_opts::to_string() const +{ + static const char* names[] = {"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(names, 32, value, "ul_data_split_thres_e"); +} +int32_t ul_data_split_thres_opts::to_number() const +{ + static const int32_t numbers[] = {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(numbers, 24, value, "ul_data_split_thres_e"); +} + +// UplinkDataCompression-r17 ::= CHOICE +void ul_data_compress_r17_c::set(types::options e) +{ + type_ = e; +} +ul_data_compress_r17_c::new_setup_s_& ul_data_compress_r17_c::set_new_setup() +{ + set(types::new_setup); + return c; +} +void ul_data_compress_r17_c::set_drb_continue_udc() +{ + set(types::drb_continue_udc); +} +void ul_data_compress_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::new_setup: + j.write_fieldname("newSetup"); + j.start_obj(); + j.write_str("bufferSize-r17", c.buffer_size_r17.to_string()); + if (c.dictionary_r17_present) { + j.write_str("dictionary-r17", c.dictionary_r17.to_string()); + } + j.end_obj(); + break; + case types::drb_continue_udc: + break; + default: + log_invalid_choice_id(type_, "ul_data_compress_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE ul_data_compress_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::new_setup: + HANDLE_CODE(bref.pack(c.dictionary_r17_present, 1)); + HANDLE_CODE(c.buffer_size_r17.pack(bref)); + if (c.dictionary_r17_present) { + HANDLE_CODE(c.dictionary_r17.pack(bref)); + } + break; + case types::drb_continue_udc: + break; + default: + log_invalid_choice_id(type_, "ul_data_compress_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_data_compress_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::new_setup: + HANDLE_CODE(bref.unpack(c.dictionary_r17_present, 1)); + HANDLE_CODE(c.buffer_size_r17.unpack(bref)); + if (c.dictionary_r17_present) { + HANDLE_CODE(c.dictionary_r17.unpack(bref)); + } + break; + case types::drb_continue_udc: + break; + default: + log_invalid_choice_id(type_, "ul_data_compress_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ul_data_compress_r17_c::new_setup_s_::buffer_size_r17_opts::to_string() const +{ + static const char* names[] = {"kbyte2", "kbyte4", "kbyte8", "spare1"}; + return convert_enum_idx(names, 4, value, "ul_data_compress_r17_c::new_setup_s_::buffer_size_r17_e_"); +} +uint8_t ul_data_compress_r17_c::new_setup_s_::buffer_size_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 8}; + return map_enum_number(numbers, 3, value, "ul_data_compress_r17_c::new_setup_s_::buffer_size_r17_e_"); +} + +const char* ul_data_compress_r17_c::new_setup_s_::dictionary_r17_opts::to_string() const +{ + static const char* names[] = {"sip-SDP", "operator"}; + return convert_enum_idx(names, 2, value, "ul_data_compress_r17_c::new_setup_s_::dictionary_r17_e_"); +} + +const char* ul_data_compress_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"newSetup", "drb-ContinueUDC"}; + return convert_enum_idx(names, 2, value, "ul_data_compress_r17_c::types"); +} + +// CipheringAlgorithm ::= ENUMERATED +const char* ciphering_algorithm_opts::to_string() const +{ + static const char* names[] = {"nea0", "nea1", "nea2", "nea3", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "ciphering_algorithm_e"); +} +uint8_t ciphering_algorithm_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2, 3}; + return map_enum_number(numbers, 4, value, "ciphering_algorithm_e"); +} + +// IntegrityProtAlgorithm ::= ENUMERATED +const char* integrity_prot_algorithm_opts::to_string() const +{ + static const char* names[] = {"nia0", "nia1", "nia2", "nia3", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "integrity_prot_algorithm_e"); +} +uint8_t integrity_prot_algorithm_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2, 3}; + return map_enum_number(numbers, 4, value, "integrity_prot_algorithm_e"); +} + +// PDCP-Config ::= SEQUENCE +SRSASN_CODE pdcp_cfg_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)); + + 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 (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= ciphering_disabled_present; + group_flags[1] |= discard_timer_ext_r16.is_present(); + group_flags[1] |= more_than_two_rlc_drb_r16.is_present(); + group_flags[1] |= ethernet_hdr_compress_r16.is_present(); + group_flags[2] |= survival_time_state_support_r17_present; + group_flags[2] |= ul_data_compress_r17.is_present(); + group_flags[2] |= discard_timer_ext2_r17.is_present(); + group_flags[2] |= init_rx_deliv_r17_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)); + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(discard_timer_ext_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(more_than_two_rlc_drb_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(ethernet_hdr_compress_r16.is_present(), 1)); + if (discard_timer_ext_r16.is_present()) { + HANDLE_CODE(discard_timer_ext_r16->pack(bref)); + } + if (more_than_two_rlc_drb_r16.is_present()) { + HANDLE_CODE(bref.pack(more_than_two_rlc_drb_r16->split_secondary_path_r16_present, 1)); + HANDLE_CODE(bref.pack(more_than_two_rlc_drb_r16->dupl_state_r16_present, 1)); + if (more_than_two_rlc_drb_r16->split_secondary_path_r16_present) { + HANDLE_CODE( + pack_integer(bref, more_than_two_rlc_drb_r16->split_secondary_path_r16, (uint8_t)1u, (uint8_t)32u)); + } + if (more_than_two_rlc_drb_r16->dupl_state_r16_present) { + HANDLE_CODE(pack_fixed_seq_of(bref, + more_than_two_rlc_drb_r16->dupl_state_r16, + more_than_two_rlc_drb_r16->dupl_state_r16.size(), + BitPacker(1))); + } + } + if (ethernet_hdr_compress_r16.is_present()) { + HANDLE_CODE(ethernet_hdr_compress_r16->pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(survival_time_state_support_r17_present, 1)); + HANDLE_CODE(bref.pack(ul_data_compress_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(discard_timer_ext2_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(init_rx_deliv_r17_present, 1)); + if (ul_data_compress_r17.is_present()) { + HANDLE_CODE(ul_data_compress_r17->pack(bref)); + } + if (discard_timer_ext2_r17.is_present()) { + HANDLE_CODE(discard_timer_ext2_r17->pack(bref)); + } + if (init_rx_deliv_r17_present) { + HANDLE_CODE(init_rx_deliv_r17.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_cfg_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)); + + 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 (ext) { + 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(ciphering_disabled_present, 1)); + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(discard_timer_ext_r16, bref); + unpack_presence_flag(more_than_two_rlc_drb_r16, bref); + unpack_presence_flag(ethernet_hdr_compress_r16, bref); + if (discard_timer_ext_r16.is_present()) { + HANDLE_CODE(discard_timer_ext_r16->unpack(bref)); + } + if (more_than_two_rlc_drb_r16.is_present()) { + HANDLE_CODE(bref.unpack(more_than_two_rlc_drb_r16->split_secondary_path_r16_present, 1)); + HANDLE_CODE(bref.unpack(more_than_two_rlc_drb_r16->dupl_state_r16_present, 1)); + if (more_than_two_rlc_drb_r16->split_secondary_path_r16_present) { + HANDLE_CODE( + unpack_integer(more_than_two_rlc_drb_r16->split_secondary_path_r16, bref, (uint8_t)1u, (uint8_t)32u)); + } + if (more_than_two_rlc_drb_r16->dupl_state_r16_present) { + HANDLE_CODE(unpack_fixed_seq_of(more_than_two_rlc_drb_r16->dupl_state_r16, + bref, + more_than_two_rlc_drb_r16->dupl_state_r16.size(), + BitPacker(1))); + } + } + if (ethernet_hdr_compress_r16.is_present()) { + HANDLE_CODE(ethernet_hdr_compress_r16->unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(survival_time_state_support_r17_present, 1)); + unpack_presence_flag(ul_data_compress_r17, bref); + unpack_presence_flag(discard_timer_ext2_r17, bref); + HANDLE_CODE(bref.unpack(init_rx_deliv_r17_present, 1)); + if (ul_data_compress_r17.is_present()) { + HANDLE_CODE(ul_data_compress_r17->unpack(bref)); + } + if (discard_timer_ext2_r17.is_present()) { + HANDLE_CODE(discard_timer_ext2_r17->unpack(bref)); + } + if (init_rx_deliv_r17_present) { + HANDLE_CODE(init_rx_deliv_r17.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void pdcp_cfg_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 (discard_timer_ext_r16.is_present()) { + j.write_fieldname("discardTimerExt-r16"); + discard_timer_ext_r16->to_json(j); + } + if (more_than_two_rlc_drb_r16.is_present()) { + j.write_fieldname("moreThanTwoRLC-DRB-r16"); + j.start_obj(); + if (more_than_two_rlc_drb_r16->split_secondary_path_r16_present) { + j.write_int("splitSecondaryPath-r16", more_than_two_rlc_drb_r16->split_secondary_path_r16); + } + if (more_than_two_rlc_drb_r16->dupl_state_r16_present) { + j.start_array("duplicationState-r16"); + for (const auto& e1 : more_than_two_rlc_drb_r16->dupl_state_r16) { + j.write_bool(e1); + } + j.end_array(); + } + j.end_obj(); + } + if (ethernet_hdr_compress_r16.is_present()) { + j.write_fieldname("ethernetHeaderCompression-r16"); + ethernet_hdr_compress_r16->to_json(j); + } + if (survival_time_state_support_r17_present) { + j.write_str("survivalTimeStateSupport-r17", "true"); + } + if (ul_data_compress_r17.is_present()) { + j.write_fieldname("uplinkDataCompression-r17"); + ul_data_compress_r17->to_json(j); + } + if (discard_timer_ext2_r17.is_present()) { + j.write_fieldname("discardTimerExt2-r17"); + discard_timer_ext2_r17->to_json(j); + } + if (init_rx_deliv_r17_present) { + j.write_str("initialRX-DELIV-r17", init_rx_deliv_r17.to_string()); + } + } + j.end_obj(); +} + +const char* pdcp_cfg_s::drb_s_::discard_timer_opts::to_string() const +{ + static const char* names[] = {"ms10", + "ms20", + "ms30", + "ms40", + "ms50", + "ms60", + "ms75", + "ms100", + "ms150", + "ms200", + "ms250", + "ms300", + "ms500", + "ms750", + "ms1500", + "infinity"}; + return convert_enum_idx(names, 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 numbers[] = {10, 20, 30, 40, 50, 60, 75, 100, 150, 200, 250, 300, 500, 750, 1500, -1}; + return map_enum_number(numbers, 16, value, "pdcp_cfg_s::drb_s_::discard_timer_e_"); +} + +const char* pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_opts::to_string() const +{ + static const char* names[] = {"len12bits", "len18bits"}; + return convert_enum_idx(names, 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 numbers[] = {12, 18}; + return map_enum_number(numbers, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_ul_e_"); +} + +const char* pdcp_cfg_s::drb_s_::pdcp_sn_size_dl_opts::to_string() const +{ + static const char* names[] = {"len12bits", "len18bits"}; + return convert_enum_idx(names, 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 numbers[] = {12, 18}; + return map_enum_number(numbers, 2, value, "pdcp_cfg_s::drb_s_::pdcp_sn_size_dl_e_"); +} + +void pdcp_cfg_s::drb_s_::hdr_compress_c_::destroy_() +{ + switch (type_) { + case types::rohc: + c.destroy(); + break; + case types::ul_only_rohc: + c.destroy(); + break; + default: + break; + } +} +void pdcp_cfg_s::drb_s_::hdr_compress_c_::set(types::options e) +{ + 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_"); + } +} +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_"); + } +} +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) +{ + if (this == &other) { + return *this; + } + 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 *this; +} +void pdcp_cfg_s::drb_s_::hdr_compress_c_::set_not_used() +{ + set(types::not_used); +} +pdcp_cfg_s::drb_s_::hdr_compress_c_::rohc_s_& pdcp_cfg_s::drb_s_::hdr_compress_c_::set_rohc() +{ + set(types::rohc); + return c.get(); +} +pdcp_cfg_s::drb_s_::hdr_compress_c_::ul_only_rohc_s_& pdcp_cfg_s::drb_s_::hdr_compress_c_::set_ul_only_rohc() +{ + set(types::ul_only_rohc); + return c.get(); +} +void pdcp_cfg_s::drb_s_::hdr_compress_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_c_id_present) { + j.write_int("maxCID", c.get().max_c_id); + } + 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_c_id_present) { + j.write_int("maxCID", c.get().max_c_id); + } + 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_c_id_present, 1)); + HANDLE_CODE(bref.pack(c.get().drb_continue_rohc_present, 1)); + if (c.get().max_c_id_present) { + HANDLE_CODE(pack_integer(bref, c.get().max_c_id, (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_c_id_present, 1)); + HANDLE_CODE(bref.pack(c.get().drb_continue_rohc_present, 1)); + if (c.get().max_c_id_present) { + HANDLE_CODE(pack_integer(bref, c.get().max_c_id, (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_c_id_present, 1)); + HANDLE_CODE(bref.unpack(c.get().drb_continue_rohc_present, 1)); + if (c.get().max_c_id_present) { + HANDLE_CODE(unpack_integer(c.get().max_c_id, 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_c_id_present, 1)); + HANDLE_CODE(bref.unpack(c.get().drb_continue_rohc_present, 1)); + if (c.get().max_c_id_present) { + HANDLE_CODE(unpack_integer(c.get().max_c_id, 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; +} + +const char* pdcp_cfg_s::drb_s_::hdr_compress_c_::types_opts::to_string() const +{ + static const char* names[] = {"notUsed", "rohc", "uplinkOnlyROHC"}; + return convert_enum_idx(names, 3, value, "pdcp_cfg_s::drb_s_::hdr_compress_c_::types"); +} + +const char* pdcp_cfg_s::t_reordering_opts::to_string() const +{ + static const char* names[] = {"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(names, 64, value, "pdcp_cfg_s::t_reordering_e_"); +} +uint16_t pdcp_cfg_s::t_reordering_opts::to_number() const +{ + static const uint16_t numbers[] = {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(numbers, 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(mapped_qos_flows_to_add.size() > 0, 1)); + HANDLE_CODE(bref.pack(mapped_qos_flows_to_release.size() > 0, 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, mapped_qos_flows_to_add, 1, 64, integer_packer(0, 63))); + } + if (mapped_qos_flows_to_release.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, mapped_qos_flows_to_release, 1, 64, integer_packer(0, 63))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sdap_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool mapped_qos_flows_to_add_present; + HANDLE_CODE(bref.unpack(mapped_qos_flows_to_add_present, 1)); + bool mapped_qos_flows_to_release_present; + HANDLE_CODE(bref.unpack(mapped_qos_flows_to_release_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))); + } + + return SRSASN_SUCCESS; +} +void sdap_cfg_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.size() > 0) { + j.start_array("mappedQoS-FlowsToAdd"); + for (const auto& e1 : mapped_qos_flows_to_add) { + j.write_int(e1); + } + j.end_array(); + } + if (mapped_qos_flows_to_release.size() > 0) { + j.start_array("mappedQoS-FlowsToRelease"); + for (const auto& e1 : mapped_qos_flows_to_release) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} + +const char* sdap_cfg_s::sdap_hdr_dl_opts::to_string() const +{ + static const char* names[] = {"present", "absent"}; + return convert_enum_idx(names, 2, value, "sdap_cfg_s::sdap_hdr_dl_e_"); +} + +const char* sdap_cfg_s::sdap_hdr_ul_opts::to_string() const +{ + static const char* names[] = {"present", "absent"}; + return convert_enum_idx(names, 2, value, "sdap_cfg_s::sdap_hdr_ul_e_"); +} + +// TMGI-r17 ::= SEQUENCE +SRSASN_CODE tmgi_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(plmn_id_r17.pack(bref)); + HANDLE_CODE(service_id_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE tmgi_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(plmn_id_r17.unpack(bref)); + HANDLE_CODE(service_id_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void tmgi_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Id-r17"); + plmn_id_r17.to_json(j); + j.write_str("serviceId-r17", service_id_r17.to_string()); + j.end_obj(); +} + +void tmgi_r17_s::plmn_id_r17_c_::destroy_() +{ + switch (type_) { + case types::explicit_value: + c.destroy(); + break; + default: + break; + } +} +void tmgi_r17_s::plmn_id_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::plmn_idx: + break; + case types::explicit_value: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tmgi_r17_s::plmn_id_r17_c_"); + } +} +tmgi_r17_s::plmn_id_r17_c_::plmn_id_r17_c_(const tmgi_r17_s::plmn_id_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::plmn_idx: + c.init(other.c.get()); + break; + case types::explicit_value: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tmgi_r17_s::plmn_id_r17_c_"); + } +} +tmgi_r17_s::plmn_id_r17_c_& tmgi_r17_s::plmn_id_r17_c_::operator=(const tmgi_r17_s::plmn_id_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::plmn_idx: + c.set(other.c.get()); + break; + case types::explicit_value: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "tmgi_r17_s::plmn_id_r17_c_"); + } + + return *this; +} +uint8_t& tmgi_r17_s::plmn_id_r17_c_::set_plmn_idx() +{ + set(types::plmn_idx); + return c.get(); +} +plmn_id_s& tmgi_r17_s::plmn_id_r17_c_::set_explicit_value() +{ + set(types::explicit_value); + return c.get(); +} +void tmgi_r17_s::plmn_id_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::plmn_idx: + j.write_int("plmn-Index", c.get()); + break; + case types::explicit_value: + j.write_fieldname("explicitValue"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "tmgi_r17_s::plmn_id_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE tmgi_r17_s::plmn_id_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::plmn_idx: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)12u)); + break; + case types::explicit_value: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "tmgi_r17_s::plmn_id_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE tmgi_r17_s::plmn_id_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::plmn_idx: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)12u)); + break; + case types::explicit_value: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "tmgi_r17_s::plmn_id_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* tmgi_r17_s::plmn_id_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"plmn-Index", "explicitValue"}; + return convert_enum_idx(names, 2, value, "tmgi_r17_s::plmn_id_r17_c_::types"); +} + +// DRB-ToAddMod ::= SEQUENCE +SRSASN_CODE drb_to_add_mod_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)); + + 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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= daps_cfg_r16_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(daps_cfg_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE drb_to_add_mod_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)); + + 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)); + } + + 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(daps_cfg_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void drb_to_add_mod_s::to_json(json_writer& j) const +{ + j.start_obj(); + 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); + } + if (ext) { + if (daps_cfg_r16_present) { + j.write_str("daps-Config-r16", "true"); + } + } + j.end_obj(); +} + +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_"); + } +} +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::eps_bearer_id: + c.init(other.c.get()); + break; + case types::sdap_cfg: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_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) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::eps_bearer_id: + c.set(other.c.get()); + break; + case types::sdap_cfg: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); + } + + return *this; +} +uint8_t& drb_to_add_mod_s::cn_assoc_c_::set_eps_bearer_id() +{ + set(types::eps_bearer_id); + return c.get(); +} +sdap_cfg_s& drb_to_add_mod_s::cn_assoc_c_::set_sdap_cfg() +{ + set(types::sdap_cfg); + return c.get(); +} +void drb_to_add_mod_s::cn_assoc_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::eps_bearer_id: + j.write_int("eps-BearerIdentity", c.get()); + break; + case types::sdap_cfg: + j.write_fieldname("sdap-Config"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); + } + j.end_obj(); +} +SRSASN_CODE drb_to_add_mod_s::cn_assoc_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)); + break; + case types::sdap_cfg: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::eps_bearer_id: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); + break; + case types::sdap_cfg: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "drb_to_add_mod_s::cn_assoc_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* drb_to_add_mod_s::cn_assoc_c_::types_opts::to_string() const +{ + static const char* names[] = {"eps-BearerIdentity", "sdap-Config"}; + return convert_enum_idx(names, 2, value, "drb_to_add_mod_s::cn_assoc_c_::types"); +} + +// MRB-ToAddMod-r17 ::= SEQUENCE +SRSASN_CODE mrb_to_add_mod_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(mbs_session_id_r17_present, 1)); + HANDLE_CODE(bref.pack(mrb_id_new_r17_present, 1)); + HANDLE_CODE(bref.pack(reestablish_pdcp_r17_present, 1)); + HANDLE_CODE(bref.pack(recover_pdcp_r17_present, 1)); + HANDLE_CODE(bref.pack(pdcp_cfg_r17_present, 1)); + + if (mbs_session_id_r17_present) { + HANDLE_CODE(mbs_session_id_r17.pack(bref)); + } + HANDLE_CODE(pack_integer(bref, mrb_id_r17, (uint16_t)1u, (uint16_t)512u)); + if (mrb_id_new_r17_present) { + HANDLE_CODE(pack_integer(bref, mrb_id_new_r17, (uint16_t)1u, (uint16_t)512u)); + } + if (pdcp_cfg_r17_present) { + HANDLE_CODE(pdcp_cfg_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mrb_to_add_mod_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(mbs_session_id_r17_present, 1)); + HANDLE_CODE(bref.unpack(mrb_id_new_r17_present, 1)); + HANDLE_CODE(bref.unpack(reestablish_pdcp_r17_present, 1)); + HANDLE_CODE(bref.unpack(recover_pdcp_r17_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_cfg_r17_present, 1)); + + if (mbs_session_id_r17_present) { + HANDLE_CODE(mbs_session_id_r17.unpack(bref)); + } + HANDLE_CODE(unpack_integer(mrb_id_r17, bref, (uint16_t)1u, (uint16_t)512u)); + if (mrb_id_new_r17_present) { + HANDLE_CODE(unpack_integer(mrb_id_new_r17, bref, (uint16_t)1u, (uint16_t)512u)); + } + if (pdcp_cfg_r17_present) { + HANDLE_CODE(pdcp_cfg_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mrb_to_add_mod_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mbs_session_id_r17_present) { + j.write_fieldname("mbs-SessionId-r17"); + mbs_session_id_r17.to_json(j); + } + j.write_int("mrb-Identity-r17", mrb_id_r17); + if (mrb_id_new_r17_present) { + j.write_int("mrb-IdentityNew-r17", mrb_id_new_r17); + } + if (reestablish_pdcp_r17_present) { + j.write_str("reestablishPDCP-r17", "true"); + } + if (recover_pdcp_r17_present) { + j.write_str("recoverPDCP-r17", "true"); + } + if (pdcp_cfg_r17_present) { + j.write_fieldname("pdcp-Config-r17"); + pdcp_cfg_r17.to_json(j); + } + j.end_obj(); +} + +// SRB-ToAddMod ::= SEQUENCE +SRSASN_CODE srb_to_add_mod_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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= srb_id_v1700_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(srb_id_v1700_present, 1)); + if (srb_id_v1700_present) { + HANDLE_CODE(pack_integer(bref, srb_id_v1700, (uint8_t)4u, (uint8_t)4u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE srb_to_add_mod_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)); + } + + 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(srb_id_v1700_present, 1)); + if (srb_id_v1700_present) { + HANDLE_CODE(unpack_integer(srb_id_v1700, bref, (uint8_t)4u, (uint8_t)4u)); + } + } + } + return SRSASN_SUCCESS; +} +void srb_to_add_mod_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); + } + if (ext) { + if (srb_id_v1700_present) { + j.write_int("srb-Identity-v1700", srb_id_v1700); + } + } + j.end_obj(); +} + +// SecurityAlgorithmConfig ::= SEQUENCE +SRSASN_CODE security_algorithm_cfg_s::pack(bit_ref& bref) const +{ + 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 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)); + } + + return SRSASN_SUCCESS; +} +void security_algorithm_cfg_s::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()); + } + j.end_obj(); +} + +// SecurityConfig ::= SEQUENCE +SRSASN_CODE security_cfg_s::pack(bit_ref& bref) const +{ + 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 security_cfg_s::unpack(cbit_ref& bref) +{ + 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 security_cfg_s::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()); + } + j.end_obj(); +} + +const char* security_cfg_s::key_to_use_opts::to_string() const +{ + static const char* names[] = {"master", "secondary"}; + return convert_enum_idx(names, 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(srb3_to_release_present, 1)); + HANDLE_CODE(bref.pack(drb_to_add_mod_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(drb_to_release_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(security_cfg_present, 1)); + + if (srb_to_add_mod_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, srb_to_add_mod_list, 1, 2)); + } + if (drb_to_add_mod_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, drb_to_add_mod_list, 1, 29)); + } + if (drb_to_release_list.size() > 0) { + 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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= mrb_to_add_mod_list_r17.is_present(); + group_flags[0] |= mrb_to_release_list_r17.is_present(); + group_flags[0] |= srb4_to_add_mod_r17.is_present(); + group_flags[0] |= srb4_to_release_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(mrb_to_add_mod_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(mrb_to_release_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(srb4_to_add_mod_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(srb4_to_release_r17_present, 1)); + if (mrb_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *mrb_to_add_mod_list_r17, 1, 32)); + } + if (mrb_to_release_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *mrb_to_release_list_r17, 1, 32, integer_packer(1, 512))); + } + if (srb4_to_add_mod_r17.is_present()) { + HANDLE_CODE(srb4_to_add_mod_r17->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE radio_bearer_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool srb_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(srb_to_add_mod_list_present, 1)); + HANDLE_CODE(bref.unpack(srb3_to_release_present, 1)); + bool drb_to_add_mod_list_present; + HANDLE_CODE(bref.unpack(drb_to_add_mod_list_present, 1)); + bool drb_to_release_list_present; + 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)); + } + + 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); + + unpack_presence_flag(mrb_to_add_mod_list_r17, bref); + unpack_presence_flag(mrb_to_release_list_r17, bref); + unpack_presence_flag(srb4_to_add_mod_r17, bref); + HANDLE_CODE(bref.unpack(srb4_to_release_r17_present, 1)); + if (mrb_to_add_mod_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*mrb_to_add_mod_list_r17, bref, 1, 32)); + } + if (mrb_to_release_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*mrb_to_release_list_r17, bref, 1, 32, integer_packer(1, 512))); + } + if (srb4_to_add_mod_r17.is_present()) { + HANDLE_CODE(srb4_to_add_mod_r17->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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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); + } + if (ext) { + if (mrb_to_add_mod_list_r17.is_present()) { + j.start_array("mrb-ToAddModList-r17"); + for (const auto& e1 : *mrb_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (mrb_to_release_list_r17.is_present()) { + j.start_array("mrb-ToReleaseList-r17"); + for (const auto& e1 : *mrb_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (srb4_to_add_mod_r17.is_present()) { + j.write_fieldname("srb4-ToAddMod-r17"); + srb4_to_add_mod_r17->to_json(j); + } + if (srb4_to_release_r17_present) { + j.write_str("srb4-ToRelease-r17", "true"); + } + } + j.end_obj(); +} diff --git a/lib/asn1/rrc_nr/rrc_nr.cpp b/lib/asn1/rrc_nr/rrc_nr.cpp index 81dcd3a77d..b6f71a02ac 100644 --- a/lib/asn1/rrc_nr/rrc_nr.cpp +++ b/lib/asn1/rrc_nr/rrc_nr.cpp @@ -9,8 +9,6 @@ */ #include "srsran/asn1/rrc_nr/rrc_nr.h" -#include - using namespace asn1; using namespace asn1::rrc_nr; @@ -18,2125 +16,1479 @@ using namespace asn1::rrc_nr; * Struct Methods ******************************************************************************/ -// MIB ::= SEQUENCE -SRSASN_CODE mib_s::pack(bit_ref& bref) const +// MRB-PDCP-ConfigBroadcast-r17 ::= SEQUENCE +SRSASN_CODE mrb_pdcp_cfg_broadcast_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(sys_frame_num.pack(bref)); - HANDLE_CODE(sub_carrier_spacing_common.pack(bref)); - HANDLE_CODE(pack_integer(bref, ssb_subcarrier_offset, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(dmrs_type_a_position.pack(bref)); - HANDLE_CODE(pdcch_cfg_sib1.pack(bref)); - HANDLE_CODE(cell_barred.pack(bref)); - HANDLE_CODE(intra_freq_resel.pack(bref)); - HANDLE_CODE(spare.pack(bref)); + HANDLE_CODE(bref.pack(pdcp_sn_size_dl_r17_present, 1)); + HANDLE_CODE(bref.pack(t_reordering_r17_present, 1)); + + HANDLE_CODE(hdr_compress_r17.pack(bref)); + if (t_reordering_r17_present) { + HANDLE_CODE(t_reordering_r17.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE mib_s::unpack(cbit_ref& bref) +SRSASN_CODE mrb_pdcp_cfg_broadcast_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(sys_frame_num.unpack(bref)); - HANDLE_CODE(sub_carrier_spacing_common.unpack(bref)); - HANDLE_CODE(unpack_integer(ssb_subcarrier_offset, bref, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(dmrs_type_a_position.unpack(bref)); - HANDLE_CODE(pdcch_cfg_sib1.unpack(bref)); - HANDLE_CODE(cell_barred.unpack(bref)); - HANDLE_CODE(intra_freq_resel.unpack(bref)); - HANDLE_CODE(spare.unpack(bref)); + HANDLE_CODE(bref.unpack(pdcp_sn_size_dl_r17_present, 1)); + HANDLE_CODE(bref.unpack(t_reordering_r17_present, 1)); + + HANDLE_CODE(hdr_compress_r17.unpack(bref)); + if (t_reordering_r17_present) { + HANDLE_CODE(t_reordering_r17.unpack(bref)); + } return SRSASN_SUCCESS; } -void mib_s::to_json(json_writer& j) const +void mrb_pdcp_cfg_broadcast_r17_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("systemFrameNumber", sys_frame_num.to_string()); - j.write_str("subCarrierSpacingCommon", sub_carrier_spacing_common.to_string()); - j.write_int("ssb-SubcarrierOffset", ssb_subcarrier_offset); - j.write_str("dmrs-TypeA-Position", dmrs_type_a_position.to_string()); - j.write_fieldname("pdcch-ConfigSIB1"); - pdcch_cfg_sib1.to_json(j); - j.write_str("cellBarred", cell_barred.to_string()); - j.write_str("intraFreqReselection", intra_freq_resel.to_string()); - j.write_str("spare", spare.to_string()); + if (pdcp_sn_size_dl_r17_present) { + j.write_str("pdcp-SN-SizeDL-r17", "len12bits"); + } + j.write_fieldname("headerCompression-r17"); + hdr_compress_r17.to_json(j); + if (t_reordering_r17_present) { + j.write_str("t-Reordering-r17", t_reordering_r17.to_string()); + } j.end_obj(); } -const char* mib_s::sub_carrier_spacing_common_opts::to_string() const -{ - static const char* names[] = {"scs15or60", "scs30or120"}; - return convert_enum_idx(names, 2, value, "mib_s::sub_carrier_spacing_common_e_"); -} -uint8_t mib_s::sub_carrier_spacing_common_opts::to_number() const -{ - static const uint8_t numbers[] = {15, 30}; - return map_enum_number(numbers, 2, value, "mib_s::sub_carrier_spacing_common_e_"); -} - -const char* mib_s::dmrs_type_a_position_opts::to_string() const -{ - static const char* names[] = {"pos2", "pos3"}; - return convert_enum_idx(names, 2, value, "mib_s::dmrs_type_a_position_e_"); -} -uint8_t mib_s::dmrs_type_a_position_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 3}; - return map_enum_number(numbers, 2, value, "mib_s::dmrs_type_a_position_e_"); -} - -const char* mib_s::cell_barred_opts::to_string() const -{ - static const char* names[] = {"barred", "notBarred"}; - return convert_enum_idx(names, 2, value, "mib_s::cell_barred_e_"); -} - -const char* mib_s::intra_freq_resel_opts::to_string() const -{ - static const char* names[] = {"allowed", "notAllowed"}; - return convert_enum_idx(names, 2, value, "mib_s::intra_freq_resel_e_"); -} - -// BCCH-BCH-MessageType ::= CHOICE -void bcch_bch_msg_type_c::set(types::options e) +void mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::set(types::options e) { type_ = e; } -mib_s& bcch_bch_msg_type_c::set_mib() +void mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::set_not_used() { - set(types::mib); - return c; + set(types::not_used); } -void bcch_bch_msg_type_c::set_msg_class_ext() +mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::rohc_s_& +mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::set_rohc() { - set(types::msg_class_ext); + set(types::rohc); + return c; } -void bcch_bch_msg_type_c::to_json(json_writer& j) const +void mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::mib: - j.write_fieldname("mib"); - c.to_json(j); + case types::not_used: break; - case types::msg_class_ext: + case types::rohc: + j.write_fieldname("rohc"); + j.start_obj(); + if (c.max_c_id_r17_present) { + j.write_int("maxCID-r17", c.max_c_id_r17); + } + j.write_fieldname("profiles-r17"); + j.start_obj(); + j.write_bool("profile0x0000-r17", c.profiles_r17.profile0x0000_r17); + j.write_bool("profile0x0001-r17", c.profiles_r17.profile0x0001_r17); + j.write_bool("profile0x0002-r17", c.profiles_r17.profile0x0002_r17); + j.end_obj(); + j.end_obj(); break; default: - log_invalid_choice_id(type_, "bcch_bch_msg_type_c"); + log_invalid_choice_id(type_, "mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_"); } j.end_obj(); } -SRSASN_CODE bcch_bch_msg_type_c::pack(bit_ref& bref) const +SRSASN_CODE mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::mib: - HANDLE_CODE(c.pack(bref)); + case types::not_used: break; - case types::msg_class_ext: + case types::rohc: + HANDLE_CODE(bref.pack(c.max_c_id_r17_present, 1)); + if (c.max_c_id_r17_present) { + HANDLE_CODE(pack_integer(bref, c.max_c_id_r17, (uint8_t)1u, (uint8_t)16u)); + } + HANDLE_CODE(bref.pack(c.profiles_r17.profile0x0000_r17, 1)); + HANDLE_CODE(bref.pack(c.profiles_r17.profile0x0001_r17, 1)); + HANDLE_CODE(bref.pack(c.profiles_r17.profile0x0002_r17, 1)); break; default: - log_invalid_choice_id(type_, "bcch_bch_msg_type_c"); + log_invalid_choice_id(type_, "mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE bcch_bch_msg_type_c::unpack(cbit_ref& bref) +SRSASN_CODE mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::mib: - HANDLE_CODE(c.unpack(bref)); + case types::not_used: break; - case types::msg_class_ext: + case types::rohc: + HANDLE_CODE(bref.unpack(c.max_c_id_r17_present, 1)); + if (c.max_c_id_r17_present) { + HANDLE_CODE(unpack_integer(c.max_c_id_r17, bref, (uint8_t)1u, (uint8_t)16u)); + } + HANDLE_CODE(bref.unpack(c.profiles_r17.profile0x0000_r17, 1)); + HANDLE_CODE(bref.unpack(c.profiles_r17.profile0x0001_r17, 1)); + HANDLE_CODE(bref.unpack(c.profiles_r17.profile0x0002_r17, 1)); break; default: - log_invalid_choice_id(type_, "bcch_bch_msg_type_c"); + log_invalid_choice_id(type_, "mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -const char* bcch_bch_msg_type_c::types_opts::to_string() const +const char* mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::types_opts::to_string() const { - static const char* names[] = {"mib", "messageClassExtension"}; - return convert_enum_idx(names, 2, value, "bcch_bch_msg_type_c::types"); + static const char* names[] = {"notUsed", "rohc"}; + return convert_enum_idx(names, 2, value, "mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::types"); } -// BCCH-BCH-Message ::= SEQUENCE -SRSASN_CODE bcch_bch_msg_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(msg.pack(bref)); - - bref.align_bytes_zero(); - - return SRSASN_SUCCESS; -} -SRSASN_CODE bcch_bch_msg_s::unpack(cbit_ref& bref) +const char* mrb_pdcp_cfg_broadcast_r17_s::t_reordering_r17_opts::to_string() const { - HANDLE_CODE(msg.unpack(bref)); - - bref.align_bytes(); - - return SRSASN_SUCCESS; + static const char* names[] = {"ms1", "ms10", "ms40", "ms160", "ms500", "ms1000", "ms1250", "ms2750"}; + return convert_enum_idx(names, 8, value, "mrb_pdcp_cfg_broadcast_r17_s::t_reordering_r17_e_"); } -void bcch_bch_msg_s::to_json(json_writer& j) const +uint16_t mrb_pdcp_cfg_broadcast_r17_s::t_reordering_r17_opts::to_number() const { - j.start_array(); - j.start_obj(); - j.start_obj("BCCH-BCH-Message"); - j.write_fieldname("message"); - msg.to_json(j); - j.end_obj(); - j.end_obj(); - j.end_array(); + static const uint16_t numbers[] = {1, 10, 40, 160, 500, 1000, 1250, 2750}; + return map_enum_number(numbers, 8, value, "mrb_pdcp_cfg_broadcast_r17_s::t_reordering_r17_e_"); } -// EUTRA-NS-PmaxValue ::= SEQUENCE -SRSASN_CODE eutra_ns_pmax_value_s::pack(bit_ref& bref) const +// MRB-RLC-ConfigBroadcast-r17 ::= SEQUENCE +SRSASN_CODE mrb_rlc_cfg_broadcast_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(add_pmax_present, 1)); - HANDLE_CODE(bref.pack(add_spec_emission_present, 1)); + HANDLE_CODE(bref.pack(sn_field_len_r17_present, 1)); + HANDLE_CODE(bref.pack(t_reassembly_r17_present, 1)); - if (add_pmax_present) { - HANDLE_CODE(pack_integer(bref, add_pmax, (int8_t)-30, (int8_t)33)); - } - if (add_spec_emission_present) { - HANDLE_CODE(pack_integer(bref, add_spec_emission, (uint16_t)1u, (uint16_t)288u)); + HANDLE_CODE(pack_integer(bref, lc_ch_id_r17, (uint8_t)1u, (uint8_t)32u)); + if (t_reassembly_r17_present) { + HANDLE_CODE(t_reassembly_r17.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE eutra_ns_pmax_value_s::unpack(cbit_ref& bref) +SRSASN_CODE mrb_rlc_cfg_broadcast_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(add_pmax_present, 1)); - HANDLE_CODE(bref.unpack(add_spec_emission_present, 1)); + HANDLE_CODE(bref.unpack(sn_field_len_r17_present, 1)); + HANDLE_CODE(bref.unpack(t_reassembly_r17_present, 1)); - if (add_pmax_present) { - HANDLE_CODE(unpack_integer(add_pmax, bref, (int8_t)-30, (int8_t)33)); - } - if (add_spec_emission_present) { - HANDLE_CODE(unpack_integer(add_spec_emission, bref, (uint16_t)1u, (uint16_t)288u)); + HANDLE_CODE(unpack_integer(lc_ch_id_r17, bref, (uint8_t)1u, (uint8_t)32u)); + if (t_reassembly_r17_present) { + HANDLE_CODE(t_reassembly_r17.unpack(bref)); } return SRSASN_SUCCESS; } -void eutra_ns_pmax_value_s::to_json(json_writer& j) const +void mrb_rlc_cfg_broadcast_r17_s::to_json(json_writer& j) const { j.start_obj(); - if (add_pmax_present) { - j.write_int("additionalPmax", add_pmax); + j.write_int("logicalChannelIdentity-r17", lc_ch_id_r17); + if (sn_field_len_r17_present) { + j.write_str("sn-FieldLength-r17", "size6"); } - if (add_spec_emission_present) { - j.write_int("additionalSpectrumEmission", add_spec_emission); + if (t_reassembly_r17_present) { + j.write_str("t-Reassembly-r17", t_reassembly_r17.to_string()); } j.end_obj(); } -const char* eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types_opts::to_string() const -{ - static const char* names[] = {"oneFrame", "fourFrames"}; - return convert_enum_idx(names, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types"); -} -uint8_t eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 4}; - return map_enum_number(numbers, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types"); -} - -const char* eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types_opts::to_string() const -{ - static const char* names[] = {"oneFrame", "fourFrames"}; - return convert_enum_idx(names, 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 +// MRB-InfoBroadcast-r17 ::= SEQUENCE +SRSASN_CODE mrb_info_broadcast_r17_s::pack(bit_ref& bref) const { - static const uint8_t numbers[] = {1, 4}; - return map_enum_number(numbers, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types"); -} + bref.pack(ext, 1); + HANDLE_CODE(pdcp_cfg_r17.pack(bref)); + HANDLE_CODE(rlc_cfg_r17.pack(bref)); -const char* -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::types_opts::to_string() - const -{ - static const char* names[] = {"oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; - return convert_enum_idx( - names, - 8, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::types"); -} -float rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::types_opts:: - to_number() const -{ - static const float numbers[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; - return map_enum_number( - numbers, - 8, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::types"); + return SRSASN_SUCCESS; } -const char* rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::types_opts:: - to_number_string() const +SRSASN_CODE mrb_info_broadcast_r17_s::unpack(cbit_ref& bref) { - static const char* number_strs[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; - return convert_enum_idx( - number_strs, - 8, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::types"); -} + bref.unpack(ext, 1); + HANDLE_CODE(pdcp_cfg_r17.unpack(bref)); + HANDLE_CODE(rlc_cfg_r17.unpack(bref)); -const char* rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"l839", "l139", "l571", "l1151"}; - return convert_enum_idx(names, 4, value, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::types"); + return SRSASN_SUCCESS; } -uint16_t rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::types_opts::to_number() const +void mrb_info_broadcast_r17_s::to_json(json_writer& j) const { - static const uint16_t numbers[] = {839, 139, 571, 1151}; - return map_enum_number( - numbers, 4, value, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::types"); + j.start_obj(); + j.write_fieldname("pdcp-Config-r17"); + pdcp_cfg_r17.to_json(j); + j.write_fieldname("rlc-Config-r17"); + rlc_cfg_r17.to_json(j); + j.end_obj(); } -// SI-RequestResources ::= SEQUENCE -SRSASN_CODE si_request_res_s::pack(bit_ref& bref) const +// MBS-NeighbourCell-r17 ::= SEQUENCE +SRSASN_CODE mbs_neighbour_cell_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ra_assoc_period_idx_present, 1)); - HANDLE_CODE(bref.pack(ra_ssb_occasion_mask_idx_present, 1)); + HANDLE_CODE(bref.pack(carrier_freq_r17_present, 1)); - HANDLE_CODE(pack_integer(bref, ra_preamb_start_idx, (uint8_t)0u, (uint8_t)63u)); - if (ra_assoc_period_idx_present) { - HANDLE_CODE(pack_integer(bref, ra_assoc_period_idx, (uint8_t)0u, (uint8_t)15u)); - } - if (ra_ssb_occasion_mask_idx_present) { - HANDLE_CODE(pack_integer(bref, ra_ssb_occasion_mask_idx, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(pack_integer(bref, pci_r17, (uint16_t)0u, (uint16_t)1007u)); + if (carrier_freq_r17_present) { + HANDLE_CODE(pack_integer(bref, carrier_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); } return SRSASN_SUCCESS; } -SRSASN_CODE si_request_res_s::unpack(cbit_ref& bref) +SRSASN_CODE mbs_neighbour_cell_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(ra_assoc_period_idx_present, 1)); - HANDLE_CODE(bref.unpack(ra_ssb_occasion_mask_idx_present, 1)); + HANDLE_CODE(bref.unpack(carrier_freq_r17_present, 1)); - HANDLE_CODE(unpack_integer(ra_preamb_start_idx, bref, (uint8_t)0u, (uint8_t)63u)); - if (ra_assoc_period_idx_present) { - HANDLE_CODE(unpack_integer(ra_assoc_period_idx, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (ra_ssb_occasion_mask_idx_present) { - HANDLE_CODE(unpack_integer(ra_ssb_occasion_mask_idx, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(unpack_integer(pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); + if (carrier_freq_r17_present) { + HANDLE_CODE(unpack_integer(carrier_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); } return SRSASN_SUCCESS; } -void si_request_res_s::to_json(json_writer& j) const +void mbs_neighbour_cell_r17_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("ra-PreambleStartIndex", ra_preamb_start_idx); - if (ra_assoc_period_idx_present) { - j.write_int("ra-AssociationPeriodIndex", ra_assoc_period_idx); - } - if (ra_ssb_occasion_mask_idx_present) { - j.write_int("ra-ssb-OccasionMaskIndex", ra_ssb_occasion_mask_idx); + j.write_int("physCellId-r17", pci_r17); + if (carrier_freq_r17_present) { + j.write_int("carrierFreq-r17", carrier_freq_r17); } j.end_obj(); } -// SIB-TypeInfo-v1700 ::= SEQUENCE -SRSASN_CODE sib_type_info_v1700_s::pack(bit_ref& bref) const +// MBS-SessionInfo-r17 ::= SEQUENCE +SRSASN_CODE mbs_session_info_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(value_tag_r17_present, 1)); - HANDLE_CODE(bref.pack(area_scope_r17_present, 1)); + HANDLE_CODE(bref.pack(mtch_sched_info_r17_present, 1)); + HANDLE_CODE(bref.pack(mtch_neighbour_cell_r17_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_idx_r17_present, 1)); + HANDLE_CODE(bref.pack(mtch_ssb_map_win_idx_r17_present, 1)); - HANDLE_CODE(sib_type_r17.pack(bref)); - if (value_tag_r17_present) { - HANDLE_CODE(pack_integer(bref, value_tag_r17, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(mbs_session_id_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, g_rnti_r17, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(pack_dyn_seq_of(bref, mrb_list_broadcast_r17, 1, 4)); + if (mtch_sched_info_r17_present) { + HANDLE_CODE(pack_integer(bref, mtch_sched_info_r17, (uint8_t)0u, (uint8_t)63u)); + } + if (mtch_neighbour_cell_r17_present) { + HANDLE_CODE(mtch_neighbour_cell_r17.pack(bref)); + } + if (pdsch_cfg_idx_r17_present) { + HANDLE_CODE(pack_integer(bref, pdsch_cfg_idx_r17, (uint8_t)0u, (uint8_t)15u)); + } + if (mtch_ssb_map_win_idx_r17_present) { + HANDLE_CODE(pack_integer(bref, mtch_ssb_map_win_idx_r17, (uint8_t)0u, (uint8_t)15u)); } return SRSASN_SUCCESS; } -SRSASN_CODE sib_type_info_v1700_s::unpack(cbit_ref& bref) +SRSASN_CODE mbs_session_info_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(value_tag_r17_present, 1)); - HANDLE_CODE(bref.unpack(area_scope_r17_present, 1)); + HANDLE_CODE(bref.unpack(mtch_sched_info_r17_present, 1)); + HANDLE_CODE(bref.unpack(mtch_neighbour_cell_r17_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_idx_r17_present, 1)); + HANDLE_CODE(bref.unpack(mtch_ssb_map_win_idx_r17_present, 1)); - HANDLE_CODE(sib_type_r17.unpack(bref)); - if (value_tag_r17_present) { - HANDLE_CODE(unpack_integer(value_tag_r17, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(mbs_session_id_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(g_rnti_r17, bref, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(unpack_dyn_seq_of(mrb_list_broadcast_r17, bref, 1, 4)); + if (mtch_sched_info_r17_present) { + HANDLE_CODE(unpack_integer(mtch_sched_info_r17, bref, (uint8_t)0u, (uint8_t)63u)); + } + if (mtch_neighbour_cell_r17_present) { + HANDLE_CODE(mtch_neighbour_cell_r17.unpack(bref)); + } + if (pdsch_cfg_idx_r17_present) { + HANDLE_CODE(unpack_integer(pdsch_cfg_idx_r17, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (mtch_ssb_map_win_idx_r17_present) { + HANDLE_CODE(unpack_integer(mtch_ssb_map_win_idx_r17, bref, (uint8_t)0u, (uint8_t)15u)); } return SRSASN_SUCCESS; } -void sib_type_info_v1700_s::to_json(json_writer& j) const +void mbs_session_info_r17_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("sibType-r17"); - sib_type_r17.to_json(j); - if (value_tag_r17_present) { - j.write_int("valueTag-r17", value_tag_r17); + j.write_fieldname("mbs-SessionId-r17"); + mbs_session_id_r17.to_json(j); + j.write_int("g-RNTI-r17", g_rnti_r17); + j.start_array("mrb-ListBroadcast-r17"); + for (const auto& e1 : mrb_list_broadcast_r17) { + e1.to_json(j); } - if (area_scope_r17_present) { - j.write_str("areaScope-r17", "true"); + j.end_array(); + if (mtch_sched_info_r17_present) { + j.write_int("mtch-SchedulingInfo-r17", mtch_sched_info_r17); } - j.end_obj(); -} - -void sib_type_info_v1700_s::sib_type_r17_c_::destroy_() -{ - switch (type_) { - case types::type2_r17: - c.destroy(); - break; - default: - break; + if (mtch_neighbour_cell_r17_present) { + j.write_str("mtch-NeighbourCell-r17", mtch_neighbour_cell_r17.to_string()); + } + if (pdsch_cfg_idx_r17_present) { + j.write_int("pdsch-ConfigIndex-r17", pdsch_cfg_idx_r17); + } + if (mtch_ssb_map_win_idx_r17_present) { + j.write_int("mtch-SSB-MappingWindowIndex-r17", mtch_ssb_map_win_idx_r17); } + j.end_obj(); } -void sib_type_info_v1700_s::sib_type_r17_c_::set(types::options e) + +// MTCH-SSB-MappingWindowCycleOffset-r17 ::= CHOICE +void mtch_ssb_map_win_cycle_offset_r17_c::destroy_() {} +void mtch_ssb_map_win_cycle_offset_r17_c::set(types::options e) { destroy_(); type_ = e; - switch (type_) { - case types::type1_r17: - break; - case types::type2_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sib_type_info_v1700_s::sib_type_r17_c_"); - } } -sib_type_info_v1700_s::sib_type_r17_c_::sib_type_r17_c_(const sib_type_info_v1700_s::sib_type_r17_c_& other) +mtch_ssb_map_win_cycle_offset_r17_c::mtch_ssb_map_win_cycle_offset_r17_c( + const mtch_ssb_map_win_cycle_offset_r17_c& other) { type_ = other.type(); switch (type_) { - case types::type1_r17: - c.init(other.c.get()); + 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::ms64: + c.init(other.c.get()); + break; + case types::ms128: + c.init(other.c.get()); break; - case types::type2_r17: - c.init(other.c.get()); + case types::ms256: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "sib_type_info_v1700_s::sib_type_r17_c_"); + log_invalid_choice_id(type_, "mtch_ssb_map_win_cycle_offset_r17_c"); } } -sib_type_info_v1700_s::sib_type_r17_c_& -sib_type_info_v1700_s::sib_type_r17_c_::operator=(const sib_type_info_v1700_s::sib_type_r17_c_& other) +mtch_ssb_map_win_cycle_offset_r17_c& +mtch_ssb_map_win_cycle_offset_r17_c::operator=(const mtch_ssb_map_win_cycle_offset_r17_c& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::type1_r17: - 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::ms64: + c.set(other.c.get()); break; - case types::type2_r17: - c.set(other.c.get()); + case types::ms128: + c.set(other.c.get()); + break; + case types::ms256: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "sib_type_info_v1700_s::sib_type_r17_c_"); + log_invalid_choice_id(type_, "mtch_ssb_map_win_cycle_offset_r17_c"); } return *this; } -sib_type_info_v1700_s::sib_type_r17_c_::type1_r17_e_& sib_type_info_v1700_s::sib_type_r17_c_::set_type1_r17() +uint8_t& mtch_ssb_map_win_cycle_offset_r17_c::set_ms10() +{ + set(types::ms10); + return c.get(); +} +uint8_t& mtch_ssb_map_win_cycle_offset_r17_c::set_ms20() +{ + set(types::ms20); + return c.get(); +} +uint8_t& mtch_ssb_map_win_cycle_offset_r17_c::set_ms32() +{ + set(types::ms32); + return c.get(); +} +uint8_t& mtch_ssb_map_win_cycle_offset_r17_c::set_ms64() +{ + set(types::ms64); + return c.get(); +} +uint8_t& mtch_ssb_map_win_cycle_offset_r17_c::set_ms128() { - set(types::type1_r17); - return c.get(); + set(types::ms128); + return c.get(); } -sib_type_info_v1700_s::sib_type_r17_c_::type2_r17_s_& sib_type_info_v1700_s::sib_type_r17_c_::set_type2_r17() +uint16_t& mtch_ssb_map_win_cycle_offset_r17_c::set_ms256() { - set(types::type2_r17); - return c.get(); + set(types::ms256); + return c.get(); } -void sib_type_info_v1700_s::sib_type_r17_c_::to_json(json_writer& j) const +void mtch_ssb_map_win_cycle_offset_r17_c::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::type1_r17: - j.write_str("type1-r17", c.get().to_string()); + case types::ms10: + j.write_int("ms10", c.get()); break; - case types::type2_r17: - j.write_fieldname("type2-r17"); - j.start_obj(); - j.write_str("posSibType-r17", c.get().pos_sib_type_r17.to_string()); - if (c.get().encrypted_r17_present) { - j.write_str("encrypted-r17", "true"); - } - if (c.get().gnss_id_r17_present) { - j.write_fieldname("gnss-id-r17"); - c.get().gnss_id_r17.to_json(j); - } - if (c.get().sbas_id_r17_present) { - j.write_fieldname("sbas-id-r17"); - c.get().sbas_id_r17.to_json(j); - } - 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::ms64: + j.write_int("ms64", c.get()); + break; + case types::ms128: + j.write_int("ms128", c.get()); + break; + case types::ms256: + j.write_int("ms256", c.get()); break; default: - log_invalid_choice_id(type_, "sib_type_info_v1700_s::sib_type_r17_c_"); + log_invalid_choice_id(type_, "mtch_ssb_map_win_cycle_offset_r17_c"); } j.end_obj(); } -SRSASN_CODE sib_type_info_v1700_s::sib_type_r17_c_::pack(bit_ref& bref) const +SRSASN_CODE mtch_ssb_map_win_cycle_offset_r17_c::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::type1_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::type2_r17: - HANDLE_CODE(bref.pack(c.get().encrypted_r17_present, 1)); - HANDLE_CODE(bref.pack(c.get().gnss_id_r17_present, 1)); - HANDLE_CODE(bref.pack(c.get().sbas_id_r17_present, 1)); - HANDLE_CODE(c.get().pos_sib_type_r17.pack(bref)); - if (c.get().gnss_id_r17_present) { - HANDLE_CODE(c.get().gnss_id_r17.pack(bref)); - } - if (c.get().sbas_id_r17_present) { - HANDLE_CODE(c.get().sbas_id_r17.pack(bref)); - } + 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::ms64: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::ms128: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + break; + case types::ms256: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)255u)); break; default: - log_invalid_choice_id(type_, "sib_type_info_v1700_s::sib_type_r17_c_"); + log_invalid_choice_id(type_, "mtch_ssb_map_win_cycle_offset_r17_c"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE sib_type_info_v1700_s::sib_type_r17_c_::unpack(cbit_ref& bref) +SRSASN_CODE mtch_ssb_map_win_cycle_offset_r17_c::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::type1_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::type2_r17: - HANDLE_CODE(bref.unpack(c.get().encrypted_r17_present, 1)); - HANDLE_CODE(bref.unpack(c.get().gnss_id_r17_present, 1)); - HANDLE_CODE(bref.unpack(c.get().sbas_id_r17_present, 1)); - HANDLE_CODE(c.get().pos_sib_type_r17.unpack(bref)); - if (c.get().gnss_id_r17_present) { - HANDLE_CODE(c.get().gnss_id_r17.unpack(bref)); - } - if (c.get().sbas_id_r17_present) { - HANDLE_CODE(c.get().sbas_id_r17.unpack(bref)); - } + 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::ms64: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::ms128: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + break; + case types::ms256: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)255u)); break; default: - log_invalid_choice_id(type_, "sib_type_info_v1700_s::sib_type_r17_c_"); + log_invalid_choice_id(type_, "mtch_ssb_map_win_cycle_offset_r17_c"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -const char* sib_type_info_v1700_s::sib_type_r17_c_::type1_r17_opts::to_string() const -{ - static const char* names[] = {"sibType15", - "sibType16", - "sibType17", - "sibType18", - "sibType19", - "sibType20", - "sibType21", - "spare9", - "spare8", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "sib_type_info_v1700_s::sib_type_r17_c_::type1_r17_e_"); -} -uint8_t sib_type_info_v1700_s::sib_type_r17_c_::type1_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {15, 16, 17, 18, 19, 20, 21}; - return map_enum_number(numbers, 7, value, "sib_type_info_v1700_s::sib_type_r17_c_::type1_r17_e_"); -} - -const char* sib_type_info_v1700_s::sib_type_r17_c_::type2_r17_s_::pos_sib_type_r17_opts::to_string() const -{ - static const char* names[] = {"posSibType1-9", - "posSibType1-10", - "posSibType2-24", - "posSibType2-25", - "posSibType6-4", - "posSibType6-5", - "posSibType6-6", - "spare9", - "spare8", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx( - names, 16, value, "sib_type_info_v1700_s::sib_type_r17_c_::type2_r17_s_::pos_sib_type_r17_e_"); -} - -const char* sib_type_info_v1700_s::sib_type_r17_c_::types_opts::to_string() const +const char* mtch_ssb_map_win_cycle_offset_r17_c::types_opts::to_string() const { - static const char* names[] = {"type1-r17", "type2-r17"}; - return convert_enum_idx(names, 2, value, "sib_type_info_v1700_s::sib_type_r17_c_::types"); + static const char* names[] = {"ms10", "ms20", "ms32", "ms64", "ms128", "ms256"}; + return convert_enum_idx(names, 6, value, "mtch_ssb_map_win_cycle_offset_r17_c::types"); } -uint8_t sib_type_info_v1700_s::sib_type_r17_c_::types_opts::to_number() const +uint16_t mtch_ssb_map_win_cycle_offset_r17_c::types_opts::to_number() const { - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "sib_type_info_v1700_s::sib_type_r17_c_::types"); + static const uint16_t numbers[] = {10, 20, 32, 64, 128, 256}; + return map_enum_number(numbers, 6, value, "mtch_ssb_map_win_cycle_offset_r17_c::types"); } -// EUTRA-FreqNeighCellInfo ::= SEQUENCE -SRSASN_CODE eutra_freq_neigh_cell_info_s::pack(bit_ref& bref) const +// MBSBroadcastConfiguration-r17-IEs ::= SEQUENCE +SRSASN_CODE mbs_broadcast_cfg_r17_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(q_rx_lev_min_offset_cell_present, 1)); - HANDLE_CODE(bref.pack(q_qual_min_offset_cell_present, 1)); + HANDLE_CODE(bref.pack(mbs_session_info_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(mbs_neighbour_cell_list_r17_present, 1)); + HANDLE_CODE(bref.pack(drx_cfg_ptm_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_mtch_r17_present, 1)); + HANDLE_CODE(bref.pack(mtch_ssb_map_win_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)503u)); - 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)); + if (mbs_session_info_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbs_session_info_list_r17, 1, 1024)); + } + if (mbs_neighbour_cell_list_r17_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbs_neighbour_cell_list_r17, 0, 8)); + } + if (drx_cfg_ptm_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, drx_cfg_ptm_list_r17, 1, 64)); + } + if (pdsch_cfg_mtch_r17_present) { + HANDLE_CODE(pdsch_cfg_mtch_r17.pack(bref)); + } + if (mtch_ssb_map_win_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, mtch_ssb_map_win_list_r17, 1, 16)); } - if (q_qual_min_offset_cell_present) { - HANDLE_CODE(pack_integer(bref, q_qual_min_offset_cell, (uint8_t)1u, (uint8_t)8u)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE eutra_freq_neigh_cell_info_s::unpack(cbit_ref& bref) +SRSASN_CODE mbs_broadcast_cfg_r17_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(q_rx_lev_min_offset_cell_present, 1)); - HANDLE_CODE(bref.unpack(q_qual_min_offset_cell_present, 1)); + bool mbs_session_info_list_r17_present; + HANDLE_CODE(bref.unpack(mbs_session_info_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(mbs_neighbour_cell_list_r17_present, 1)); + bool drx_cfg_ptm_list_r17_present; + HANDLE_CODE(bref.unpack(drx_cfg_ptm_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_mtch_r17_present, 1)); + bool mtch_ssb_map_win_list_r17_present; + HANDLE_CODE(bref.unpack(mtch_ssb_map_win_list_r17_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)503u)); - 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)); + if (mbs_session_info_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbs_session_info_list_r17, bref, 1, 1024)); } - if (q_qual_min_offset_cell_present) { - HANDLE_CODE(unpack_integer(q_qual_min_offset_cell, bref, (uint8_t)1u, (uint8_t)8u)); + if (mbs_neighbour_cell_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbs_neighbour_cell_list_r17, bref, 0, 8)); } - - return SRSASN_SUCCESS; -} -void eutra_freq_neigh_cell_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("physCellId", pci); - 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); + if (drx_cfg_ptm_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(drx_cfg_ptm_list_r17, bref, 1, 64)); } - if (q_qual_min_offset_cell_present) { - j.write_int("q-QualMinOffsetCell", q_qual_min_offset_cell); + if (pdsch_cfg_mtch_r17_present) { + HANDLE_CODE(pdsch_cfg_mtch_r17.unpack(bref)); } - j.end_obj(); -} - -// EUTRA-MultiBandInfo ::= SEQUENCE -SRSASN_CODE eutra_multi_band_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(eutra_ns_pmax_list.size() > 0, 1)); - - HANDLE_CODE(pack_integer(bref, eutra_freq_band_ind, (uint16_t)1u, (uint16_t)256u)); - if (eutra_ns_pmax_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, eutra_ns_pmax_list, 1, 8)); + if (mtch_ssb_map_win_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(mtch_ssb_map_win_list_r17, bref, 1, 16)); } - - return SRSASN_SUCCESS; -} -SRSASN_CODE eutra_multi_band_info_s::unpack(cbit_ref& bref) -{ - bool eutra_ns_pmax_list_present; - HANDLE_CODE(bref.unpack(eutra_ns_pmax_list_present, 1)); - - HANDLE_CODE(unpack_integer(eutra_freq_band_ind, bref, (uint16_t)1u, (uint16_t)256u)); - if (eutra_ns_pmax_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(eutra_ns_pmax_list, bref, 1, 8)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void eutra_multi_band_info_s::to_json(json_writer& j) const +void mbs_broadcast_cfg_r17_ies_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("eutra-FreqBandIndicator", eutra_freq_band_ind); - if (eutra_ns_pmax_list.size() > 0) { - j.start_array("eutra-NS-PmaxList"); - for (const auto& e1 : eutra_ns_pmax_list) { + if (mbs_session_info_list_r17.size() > 0) { + j.start_array("mbs-SessionInfoList-r17"); + for (const auto& e1 : mbs_session_info_list_r17) { e1.to_json(j); } j.end_array(); } - j.end_obj(); -} - -const char* ephemeris_info_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"positionVelocity-r17", "orbital-r17"}; - return convert_enum_idx(names, 2, value, "ephemeris_info_r17_c::types"); -} - -// InterFreqNeighCellInfo ::= SEQUENCE -SRSASN_CODE inter_freq_neigh_cell_info_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(q_rx_lev_min_offset_cell_present, 1)); - HANDLE_CODE(bref.pack(q_rx_lev_min_offset_cell_sul_present, 1)); - HANDLE_CODE(bref.pack(q_qual_min_offset_cell_present, 1)); - - HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(q_offset_cell.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)); - } - if (q_rx_lev_min_offset_cell_sul_present) { - HANDLE_CODE(pack_integer(bref, q_rx_lev_min_offset_cell_sul, (uint8_t)1u, (uint8_t)8u)); - } - if (q_qual_min_offset_cell_present) { - HANDLE_CODE(pack_integer(bref, q_qual_min_offset_cell, (uint8_t)1u, (uint8_t)8u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE inter_freq_neigh_cell_info_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(q_rx_lev_min_offset_cell_present, 1)); - HANDLE_CODE(bref.unpack(q_rx_lev_min_offset_cell_sul_present, 1)); - HANDLE_CODE(bref.unpack(q_qual_min_offset_cell_present, 1)); - - HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(q_offset_cell.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)); + if (mbs_neighbour_cell_list_r17_present) { + j.start_array("mbs-NeighbourCellList-r17"); + for (const auto& e1 : mbs_neighbour_cell_list_r17) { + e1.to_json(j); + } + j.end_array(); } - if (q_rx_lev_min_offset_cell_sul_present) { - HANDLE_CODE(unpack_integer(q_rx_lev_min_offset_cell_sul, bref, (uint8_t)1u, (uint8_t)8u)); + if (drx_cfg_ptm_list_r17.size() > 0) { + j.start_array("drx-ConfigPTM-List-r17"); + for (const auto& e1 : drx_cfg_ptm_list_r17) { + e1.to_json(j); + } + j.end_array(); } - if (q_qual_min_offset_cell_present) { - HANDLE_CODE(unpack_integer(q_qual_min_offset_cell, bref, (uint8_t)1u, (uint8_t)8u)); + if (pdsch_cfg_mtch_r17_present) { + j.write_fieldname("pdsch-ConfigMTCH-r17"); + pdsch_cfg_mtch_r17.to_json(j); } - - return SRSASN_SUCCESS; -} -void inter_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()); - if (q_rx_lev_min_offset_cell_present) { - j.write_int("q-RxLevMinOffsetCell", q_rx_lev_min_offset_cell); + if (mtch_ssb_map_win_list_r17.size() > 0) { + j.start_array("mtch-SSB-MappingWindowList-r17"); + for (const auto& e1 : mtch_ssb_map_win_list_r17) { + e1.to_json(j); + } + j.end_array(); } - if (q_rx_lev_min_offset_cell_sul_present) { - j.write_int("q-RxLevMinOffsetCellSUL", q_rx_lev_min_offset_cell_sul); + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - if (q_qual_min_offset_cell_present) { - j.write_int("q-QualMinOffsetCell", q_qual_min_offset_cell); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -// InterFreqNeighCellInfo-v1610 ::= SEQUENCE -SRSASN_CODE inter_freq_neigh_cell_info_v1610_s::pack(bit_ref& bref) const +// MBSBroadcastConfiguration-r17 ::= SEQUENCE +SRSASN_CODE mbs_broadcast_cfg_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ssb_position_qcl_r16_present, 1)); - - if (ssb_position_qcl_r16_present) { - HANDLE_CODE(ssb_position_qcl_r16.pack(bref)); - } + HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE inter_freq_neigh_cell_info_v1610_s::unpack(cbit_ref& bref) +SRSASN_CODE mbs_broadcast_cfg_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(ssb_position_qcl_r16_present, 1)); - - if (ssb_position_qcl_r16_present) { - HANDLE_CODE(ssb_position_qcl_r16.unpack(bref)); - } + HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void inter_freq_neigh_cell_info_v1610_s::to_json(json_writer& j) const +void mbs_broadcast_cfg_r17_s::to_json(json_writer& j) const { j.start_obj(); - if (ssb_position_qcl_r16_present) { - j.write_str("ssb-PositionQCL-r16", ssb_position_qcl_r16.to_string()); - } + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); j.end_obj(); } -// InterFreqNeighCellInfo-v1710 ::= SEQUENCE -SRSASN_CODE inter_freq_neigh_cell_info_v1710_s::pack(bit_ref& bref) const +void mbs_broadcast_cfg_r17_s::crit_exts_c_::set(types::options e) { - HANDLE_CODE(bref.pack(ssb_position_qcl_r17_present, 1)); - - if (ssb_position_qcl_r17_present) { - HANDLE_CODE(ssb_position_qcl_r17.pack(bref)); - } - - return SRSASN_SUCCESS; + type_ = e; } -SRSASN_CODE inter_freq_neigh_cell_info_v1710_s::unpack(cbit_ref& bref) +mbs_broadcast_cfg_r17_ies_s& mbs_broadcast_cfg_r17_s::crit_exts_c_::set_mbs_broadcast_cfg_r17() { - HANDLE_CODE(bref.unpack(ssb_position_qcl_r17_present, 1)); - - if (ssb_position_qcl_r17_present) { - HANDLE_CODE(ssb_position_qcl_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; + set(types::mbs_broadcast_cfg_r17); + return c; +} +void mbs_broadcast_cfg_r17_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); } -void inter_freq_neigh_cell_info_v1710_s::to_json(json_writer& j) const +void mbs_broadcast_cfg_r17_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); - if (ssb_position_qcl_r17_present) { - j.write_str("ssb-PositionQCL-r17", ssb_position_qcl_r17.to_string()); + switch (type_) { + case types::mbs_broadcast_cfg_r17: + j.write_fieldname("mbsBroadcastConfiguration-r17"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mbs_broadcast_cfg_r17_s::crit_exts_c_"); } j.end_obj(); } - -const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types_opts::to_string() const -{ - static const char* names[] = {"oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; - return convert_enum_idx(names, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types"); -} -float rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types_opts::to_number() const -{ - static const float numbers[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; - return map_enum_number( - numbers, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types"); -} -const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types_opts::to_number_string() const -{ - static const char* number_strs[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; - return convert_enum_idx( - number_strs, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::types"); -} - -const char* rach_cfg_common_s::prach_root_seq_idx_c_::types_opts::to_string() const -{ - static const char* names[] = {"l839", "l139"}; - return convert_enum_idx(names, 2, value, "rach_cfg_common_s::prach_root_seq_idx_c_::types"); -} -uint16_t rach_cfg_common_s::prach_root_seq_idx_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {839, 139}; - return map_enum_number(numbers, 2, value, "rach_cfg_common_s::prach_root_seq_idx_c_::types"); -} - -const char* rach_cfg_common_s::prach_root_seq_idx_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"l571", "l1151"}; - return convert_enum_idx(names, 2, value, "rach_cfg_common_s::prach_root_seq_idx_r16_c_::types"); -} -uint16_t rach_cfg_common_s::prach_root_seq_idx_r16_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {571, 1151}; - return map_enum_number(numbers, 2, value, "rach_cfg_common_s::prach_root_seq_idx_r16_c_::types"); -} - -// SI-RequestConfig ::= SEQUENCE -SRSASN_CODE si_request_cfg_s::pack(bit_ref& bref) const +SRSASN_CODE mbs_broadcast_cfg_r17_s::crit_exts_c_::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(rach_occasions_si_present, 1)); - HANDLE_CODE(bref.pack(si_request_period_present, 1)); - - if (rach_occasions_si_present) { - HANDLE_CODE(rach_occasions_si.rach_cfg_si.pack(bref)); - HANDLE_CODE(rach_occasions_si.ssb_per_rach_occasion.pack(bref)); - } - if (si_request_period_present) { - HANDLE_CODE(si_request_period.pack(bref)); + type_.pack(bref); + switch (type_) { + case types::mbs_broadcast_cfg_r17: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mbs_broadcast_cfg_r17_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } - HANDLE_CODE(pack_dyn_seq_of(bref, si_request_res, 1, 32)); - return SRSASN_SUCCESS; } -SRSASN_CODE si_request_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE mbs_broadcast_cfg_r17_s::crit_exts_c_::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(rach_occasions_si_present, 1)); - HANDLE_CODE(bref.unpack(si_request_period_present, 1)); - - if (rach_occasions_si_present) { - HANDLE_CODE(rach_occasions_si.rach_cfg_si.unpack(bref)); - HANDLE_CODE(rach_occasions_si.ssb_per_rach_occasion.unpack(bref)); - } - if (si_request_period_present) { - HANDLE_CODE(si_request_period.unpack(bref)); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::mbs_broadcast_cfg_r17: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mbs_broadcast_cfg_r17_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; } - HANDLE_CODE(unpack_dyn_seq_of(si_request_res, bref, 1, 32)); - return SRSASN_SUCCESS; } -void si_request_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (rach_occasions_si_present) { - j.write_fieldname("rach-OccasionsSI"); - j.start_obj(); - j.write_fieldname("rach-ConfigSI"); - rach_occasions_si.rach_cfg_si.to_json(j); - j.write_str("ssb-perRACH-Occasion", rach_occasions_si.ssb_per_rach_occasion.to_string()); - j.end_obj(); - } - if (si_request_period_present) { - j.write_str("si-RequestPeriod", si_request_period.to_string()); - } - j.start_array("si-RequestResources"); - for (const auto& e1 : si_request_res) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} -const char* si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_opts::to_string() const -{ - static const char* names[] = {"oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; - return convert_enum_idx(names, 8, value, "si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_e_"); -} -float si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_opts::to_number() const -{ - static const float numbers[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; - return map_enum_number(numbers, 8, value, "si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_e_"); -} -const char* si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_opts::to_number_string() const +const char* mbs_broadcast_cfg_r17_s::crit_exts_c_::types_opts::to_string() const { - static const char* number_strs[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; - return convert_enum_idx(number_strs, 8, value, "si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_e_"); + static const char* names[] = {"mbsBroadcastConfiguration-r17", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "mbs_broadcast_cfg_r17_s::crit_exts_c_::types"); } -const char* si_request_cfg_s::si_request_period_opts::to_string() const +// MCCH-MessageType-r17 ::= CHOICE +void mcch_msg_type_r17_c::set(types::options e) { - static const char* names[] = {"one", "two", "four", "six", "eight", "ten", "twelve", "sixteen"}; - return convert_enum_idx(names, 8, value, "si_request_cfg_s::si_request_period_e_"); + type_ = e; } - -// SliceInfo-r17 ::= SEQUENCE -SRSASN_CODE slice_info_r17_s::pack(bit_ref& bref) const +mcch_msg_type_r17_c::c1_c_& mcch_msg_type_r17_c::set_c1() { - HANDLE_CODE(bref.pack(nsag_cell_resel_prio_r17_present, 1)); - HANDLE_CODE(bref.pack(nsag_cell_resel_sub_prio_r17_present, 1)); - HANDLE_CODE(bref.pack(slice_cell_list_nr_r17_present, 1)); - - HANDLE_CODE(nsag_id_info_r17.pack(bref)); - if (nsag_cell_resel_prio_r17_present) { - HANDLE_CODE(pack_integer(bref, nsag_cell_resel_prio_r17, (uint8_t)0u, (uint8_t)7u)); - } - if (nsag_cell_resel_sub_prio_r17_present) { - HANDLE_CODE(nsag_cell_resel_sub_prio_r17.pack(bref)); - } - if (slice_cell_list_nr_r17_present) { - HANDLE_CODE(slice_cell_list_nr_r17.pack(bref)); - } - - return SRSASN_SUCCESS; + set(types::c1); + return c; } -SRSASN_CODE slice_info_r17_s::unpack(cbit_ref& bref) +void mcch_msg_type_r17_c::set_msg_class_ext() { - HANDLE_CODE(bref.unpack(nsag_cell_resel_prio_r17_present, 1)); - HANDLE_CODE(bref.unpack(nsag_cell_resel_sub_prio_r17_present, 1)); - HANDLE_CODE(bref.unpack(slice_cell_list_nr_r17_present, 1)); - - HANDLE_CODE(nsag_id_info_r17.unpack(bref)); - if (nsag_cell_resel_prio_r17_present) { - HANDLE_CODE(unpack_integer(nsag_cell_resel_prio_r17, bref, (uint8_t)0u, (uint8_t)7u)); - } - if (nsag_cell_resel_sub_prio_r17_present) { - HANDLE_CODE(nsag_cell_resel_sub_prio_r17.unpack(bref)); - } - if (slice_cell_list_nr_r17_present) { - HANDLE_CODE(slice_cell_list_nr_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; + set(types::msg_class_ext); } -void slice_info_r17_s::to_json(json_writer& j) const +void mcch_msg_type_r17_c::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("nsag-IdentityInfo-r17"); - nsag_id_info_r17.to_json(j); - if (nsag_cell_resel_prio_r17_present) { - j.write_int("nsag-CellReselectionPriority-r17", nsag_cell_resel_prio_r17); - } - if (nsag_cell_resel_sub_prio_r17_present) { - j.write_str("nsag-CellReselectionSubPriority-r17", nsag_cell_resel_sub_prio_r17.to_string()); - } - if (slice_cell_list_nr_r17_present) { - j.write_fieldname("sliceCellListNR-r17"); - slice_cell_list_nr_r17.to_json(j); - } - j.end_obj(); -} - -void slice_info_r17_s::slice_cell_list_nr_r17_c_::destroy_() -{ switch (type_) { - case types::slice_allowed_cell_list_nr_r17: - c.destroy(); + case types::c1: + j.write_fieldname("c1"); + c.to_json(j); break; - case types::slice_excluded_cell_list_nr_r17: - c.destroy(); + case types::msg_class_ext: break; default: - break; + log_invalid_choice_id(type_, "mcch_msg_type_r17_c"); } + j.end_obj(); } -void slice_info_r17_s::slice_cell_list_nr_r17_c_::set(types::options e) +SRSASN_CODE mcch_msg_type_r17_c::pack(bit_ref& bref) const { - destroy_(); - type_ = e; + type_.pack(bref); switch (type_) { - case types::slice_allowed_cell_list_nr_r17: - c.init(); - break; - case types::slice_excluded_cell_list_nr_r17: - c.init(); + case types::c1: + HANDLE_CODE(c.pack(bref)); break; - case types::nulltype: + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "slice_info_r17_s::slice_cell_list_nr_r17_c_"); + log_invalid_choice_id(type_, "mcch_msg_type_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; } + return SRSASN_SUCCESS; } -slice_info_r17_s::slice_cell_list_nr_r17_c_::slice_cell_list_nr_r17_c_( - const slice_info_r17_s::slice_cell_list_nr_r17_c_& other) +SRSASN_CODE mcch_msg_type_r17_c::unpack(cbit_ref& bref) { - type_ = other.type(); + types e; + e.unpack(bref); + set(e); switch (type_) { - case types::slice_allowed_cell_list_nr_r17: - c.init(other.c.get()); - break; - case types::slice_excluded_cell_list_nr_r17: - c.init(other.c.get()); + case types::c1: + HANDLE_CODE(c.unpack(bref)); break; - case types::nulltype: + case types::msg_class_ext: break; default: - log_invalid_choice_id(type_, "slice_info_r17_s::slice_cell_list_nr_r17_c_"); + log_invalid_choice_id(type_, "mcch_msg_type_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; } + return SRSASN_SUCCESS; } -slice_info_r17_s::slice_cell_list_nr_r17_c_& -slice_info_r17_s::slice_cell_list_nr_r17_c_::operator=(const slice_info_r17_s::slice_cell_list_nr_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::slice_allowed_cell_list_nr_r17: - c.set(other.c.get()); - break; - case types::slice_excluded_cell_list_nr_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "slice_info_r17_s::slice_cell_list_nr_r17_c_"); - } - return *this; +void mcch_msg_type_r17_c::c1_c_::set(types::options e) +{ + type_ = e; } -slice_cell_list_nr_r17_l& slice_info_r17_s::slice_cell_list_nr_r17_c_::set_slice_allowed_cell_list_nr_r17() +mbs_broadcast_cfg_r17_s& mcch_msg_type_r17_c::c1_c_::set_mbs_broadcast_cfg_r17() { - set(types::slice_allowed_cell_list_nr_r17); - return c.get(); + set(types::mbs_broadcast_cfg_r17); + return c; } -slice_cell_list_nr_r17_l& slice_info_r17_s::slice_cell_list_nr_r17_c_::set_slice_excluded_cell_list_nr_r17() +void mcch_msg_type_r17_c::c1_c_::set_spare1() { - set(types::slice_excluded_cell_list_nr_r17); - return c.get(); + set(types::spare1); } -void slice_info_r17_s::slice_cell_list_nr_r17_c_::to_json(json_writer& j) const +void mcch_msg_type_r17_c::c1_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::slice_allowed_cell_list_nr_r17: - j.start_array("sliceAllowedCellListNR-r17"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); + case types::mbs_broadcast_cfg_r17: + j.write_fieldname("mbsBroadcastConfiguration-r17"); + c.to_json(j); break; - case types::slice_excluded_cell_list_nr_r17: - j.start_array("sliceExcludedCellListNR-r17"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); + case types::spare1: break; default: - log_invalid_choice_id(type_, "slice_info_r17_s::slice_cell_list_nr_r17_c_"); + log_invalid_choice_id(type_, "mcch_msg_type_r17_c::c1_c_"); } j.end_obj(); } -SRSASN_CODE slice_info_r17_s::slice_cell_list_nr_r17_c_::pack(bit_ref& bref) const +SRSASN_CODE mcch_msg_type_r17_c::c1_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::slice_allowed_cell_list_nr_r17: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 16)); + case types::mbs_broadcast_cfg_r17: + HANDLE_CODE(c.pack(bref)); break; - case types::slice_excluded_cell_list_nr_r17: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 16)); + case types::spare1: break; default: - log_invalid_choice_id(type_, "slice_info_r17_s::slice_cell_list_nr_r17_c_"); + log_invalid_choice_id(type_, "mcch_msg_type_r17_c::c1_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE slice_info_r17_s::slice_cell_list_nr_r17_c_::unpack(cbit_ref& bref) +SRSASN_CODE mcch_msg_type_r17_c::c1_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::slice_allowed_cell_list_nr_r17: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 16)); + case types::mbs_broadcast_cfg_r17: + HANDLE_CODE(c.unpack(bref)); break; - case types::slice_excluded_cell_list_nr_r17: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 16)); + case types::spare1: break; default: - log_invalid_choice_id(type_, "slice_info_r17_s::slice_cell_list_nr_r17_c_"); + log_invalid_choice_id(type_, "mcch_msg_type_r17_c::c1_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -const char* slice_info_r17_s::slice_cell_list_nr_r17_c_::types_opts::to_string() const +const char* mcch_msg_type_r17_c::c1_c_::types_opts::to_string() const { - static const char* names[] = {"sliceAllowedCellListNR-r17", "sliceExcludedCellListNR-r17"}; - return convert_enum_idx(names, 2, value, "slice_info_r17_s::slice_cell_list_nr_r17_c_::types"); + static const char* names[] = {"mbsBroadcastConfiguration-r17", "spare1"}; + return convert_enum_idx(names, 2, value, "mcch_msg_type_r17_c::c1_c_::types"); } -const char* coreset_s::cce_reg_map_type_c_::types_opts::to_string() const +const char* mcch_msg_type_r17_c::types_opts::to_string() const { - static const char* names[] = {"interleaved", "nonInterleaved"}; - return convert_enum_idx(names, 2, value, "coreset_s::cce_reg_map_type_c_::types"); -} + static const char* names[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(names, 2, value, "mcch_msg_type_r17_c::types"); +} +uint8_t mcch_msg_type_r17_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "mcch_msg_type_r17_c::types"); +} -// InterFreqCAG-CellListPerPLMN-r16 ::= SEQUENCE -SRSASN_CODE inter_freq_cag_cell_list_per_plmn_r16_s::pack(bit_ref& bref) const +// MCCH-Message-r17 ::= SEQUENCE +SRSASN_CODE mcch_msg_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, plmn_id_idx_r16, (uint8_t)1u, (uint8_t)12u)); - HANDLE_CODE(pack_dyn_seq_of(bref, cag_cell_list_r16, 1, 16)); + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); return SRSASN_SUCCESS; } -SRSASN_CODE inter_freq_cag_cell_list_per_plmn_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE mcch_msg_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(plmn_id_idx_r16, bref, (uint8_t)1u, (uint8_t)12u)); - HANDLE_CODE(unpack_dyn_seq_of(cag_cell_list_r16, bref, 1, 16)); + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); return SRSASN_SUCCESS; } -void inter_freq_cag_cell_list_per_plmn_r16_s::to_json(json_writer& j) const +void mcch_msg_r17_s::to_json(json_writer& j) const { + j.start_array(); j.start_obj(); - j.write_int("plmn-IdentityIndex-r16", plmn_id_idx_r16); - j.start_array("cag-CellList-r16"); - for (const auto& e1 : cag_cell_list_r16) { - e1.to_json(j); - } - j.end_array(); + j.start_obj("MCCH-Message-r17"); + j.write_fieldname("message"); + msg.to_json(j); + j.end_obj(); j.end_obj(); + j.end_array(); } -// PDSCH-ConfigPTM-r17 ::= SEQUENCE -SRSASN_CODE pdsch_cfg_ptm_r17_s::pack(bit_ref& bref) const +// PDCCH-BlindDetectionCA-MixedExt-r16 ::= SEQUENCE +SRSASN_CODE pdcch_blind_detection_ca_mixed_ext_r16_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(data_scrambling_id_pdsch_r17_present, 1)); - HANDLE_CODE(bref.pack(dmrs_scrambling_id0_r17_present, 1)); - HANDLE_CODE(bref.pack(pdsch_aggregation_factor_r17_present, 1)); - - if (data_scrambling_id_pdsch_r17_present) { - HANDLE_CODE(pack_integer(bref, data_scrambling_id_pdsch_r17, (uint16_t)0u, (uint16_t)1023u)); - } - if (dmrs_scrambling_id0_r17_present) { - HANDLE_CODE(pack_integer(bref, dmrs_scrambling_id0_r17, (uint32_t)0u, (uint32_t)65535u)); - } - if (pdsch_aggregation_factor_r17_present) { - HANDLE_CODE(pdsch_aggregation_factor_r17.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, pdcch_blind_detection_ca1_r16, (uint8_t)1u, (uint8_t)15u)); + HANDLE_CODE(pack_integer(bref, pdcch_blind_detection_ca2_r16, (uint8_t)1u, (uint8_t)15u)); return SRSASN_SUCCESS; } -SRSASN_CODE pdsch_cfg_ptm_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE pdcch_blind_detection_ca_mixed_ext_r16_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(data_scrambling_id_pdsch_r17_present, 1)); - HANDLE_CODE(bref.unpack(dmrs_scrambling_id0_r17_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_aggregation_factor_r17_present, 1)); - - if (data_scrambling_id_pdsch_r17_present) { - HANDLE_CODE(unpack_integer(data_scrambling_id_pdsch_r17, bref, (uint16_t)0u, (uint16_t)1023u)); - } - if (dmrs_scrambling_id0_r17_present) { - HANDLE_CODE(unpack_integer(dmrs_scrambling_id0_r17, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (pdsch_aggregation_factor_r17_present) { - HANDLE_CODE(pdsch_aggregation_factor_r17.unpack(bref)); - } + HANDLE_CODE(unpack_integer(pdcch_blind_detection_ca1_r16, bref, (uint8_t)1u, (uint8_t)15u)); + HANDLE_CODE(unpack_integer(pdcch_blind_detection_ca2_r16, bref, (uint8_t)1u, (uint8_t)15u)); return SRSASN_SUCCESS; } -void pdsch_cfg_ptm_r17_s::to_json(json_writer& j) const +void pdcch_blind_detection_ca_mixed_ext_r16_s::to_json(json_writer& j) const { j.start_obj(); - if (data_scrambling_id_pdsch_r17_present) { - j.write_int("dataScramblingIdentityPDSCH-r17", data_scrambling_id_pdsch_r17); - } - if (dmrs_scrambling_id0_r17_present) { - j.write_int("dmrs-ScramblingID0-r17", dmrs_scrambling_id0_r17); - } - if (pdsch_aggregation_factor_r17_present) { - j.write_str("pdsch-AggregationFactor-r17", pdsch_aggregation_factor_r17.to_string()); - } + j.write_int("pdcch-BlindDetectionCA1-r16", pdcch_blind_detection_ca1_r16); + j.write_int("pdcch-BlindDetectionCA2-r16", pdcch_blind_detection_ca2_r16); j.end_obj(); } -const char* pdsch_cfg_ptm_r17_s::pdsch_aggregation_factor_r17_opts::to_string() const +// PDCCH-BlindDetectionCG-UE-MixedExt-r16 ::= SEQUENCE +SRSASN_CODE pdcch_blind_detection_cg_ue_mixed_ext_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pdcch_blind_detection_cg_ue1_r16, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(pack_integer(bref, pdcch_blind_detection_cg_ue2_r16, (uint8_t)0u, (uint8_t)15u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcch_blind_detection_cg_ue_mixed_ext_r16_s::unpack(cbit_ref& bref) { - static const char* names[] = {"n2", "n4", "n8"}; - return convert_enum_idx(names, 3, value, "pdsch_cfg_ptm_r17_s::pdsch_aggregation_factor_r17_e_"); + HANDLE_CODE(unpack_integer(pdcch_blind_detection_cg_ue1_r16, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(unpack_integer(pdcch_blind_detection_cg_ue2_r16, bref, (uint8_t)0u, (uint8_t)15u)); + + return SRSASN_SUCCESS; } -uint8_t pdsch_cfg_ptm_r17_s::pdsch_aggregation_factor_r17_opts::to_number() const +void pdcch_blind_detection_cg_ue_mixed_ext_r16_s::to_json(json_writer& j) const { - static const uint8_t numbers[] = {2, 4, 8}; - return map_enum_number(numbers, 3, value, "pdsch_cfg_ptm_r17_s::pdsch_aggregation_factor_r17_e_"); + j.start_obj(); + j.write_int("pdcch-BlindDetectionCG-UE1-r16", pdcch_blind_detection_cg_ue1_r16); + j.write_int("pdcch-BlindDetectionCG-UE2-r16", pdcch_blind_detection_cg_ue2_r16); + j.end_obj(); } -// PosSIB-Type-r16 ::= SEQUENCE -SRSASN_CODE pos_sib_type_r16_s::pack(bit_ref& bref) const +// PDCCH-BlindDetectionMixedList-r16 ::= SEQUENCE +SRSASN_CODE pdcch_blind_detection_mixed_list_r16_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(encrypted_r16_present, 1)); - HANDLE_CODE(bref.pack(gnss_id_r16_present, 1)); - HANDLE_CODE(bref.pack(sbas_id_r16_present, 1)); - HANDLE_CODE(bref.pack(area_scope_r16_present, 1)); + HANDLE_CODE(bref.pack(pdcch_blind_detection_ca_mixed_ext_r16_present, 1)); + HANDLE_CODE(bref.pack(pdcch_blind_detection_cg_ue_mixed_ext_r16_present, 1)); - if (gnss_id_r16_present) { - HANDLE_CODE(gnss_id_r16.pack(bref)); + if (pdcch_blind_detection_ca_mixed_ext_r16_present) { + HANDLE_CODE(pdcch_blind_detection_ca_mixed_ext_r16.pack(bref)); } - if (sbas_id_r16_present) { - HANDLE_CODE(sbas_id_r16.pack(bref)); + if (pdcch_blind_detection_cg_ue_mixed_ext_r16_present) { + HANDLE_CODE(pdcch_blind_detection_cg_ue_mixed_ext_r16.pdcch_blind_detection_mcg_ue_mixed_v16a0.pack(bref)); + HANDLE_CODE(pdcch_blind_detection_cg_ue_mixed_ext_r16.pdcch_blind_detection_scg_ue_mixed_v16a0.pack(bref)); } - HANDLE_CODE(pos_sib_type_r16.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE pos_sib_type_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE pdcch_blind_detection_mixed_list_r16_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(encrypted_r16_present, 1)); - HANDLE_CODE(bref.unpack(gnss_id_r16_present, 1)); - HANDLE_CODE(bref.unpack(sbas_id_r16_present, 1)); - HANDLE_CODE(bref.unpack(area_scope_r16_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_blind_detection_ca_mixed_ext_r16_present, 1)); + HANDLE_CODE(bref.unpack(pdcch_blind_detection_cg_ue_mixed_ext_r16_present, 1)); - if (gnss_id_r16_present) { - HANDLE_CODE(gnss_id_r16.unpack(bref)); + if (pdcch_blind_detection_ca_mixed_ext_r16_present) { + HANDLE_CODE(pdcch_blind_detection_ca_mixed_ext_r16.unpack(bref)); } - if (sbas_id_r16_present) { - HANDLE_CODE(sbas_id_r16.unpack(bref)); + if (pdcch_blind_detection_cg_ue_mixed_ext_r16_present) { + HANDLE_CODE(pdcch_blind_detection_cg_ue_mixed_ext_r16.pdcch_blind_detection_mcg_ue_mixed_v16a0.unpack(bref)); + HANDLE_CODE(pdcch_blind_detection_cg_ue_mixed_ext_r16.pdcch_blind_detection_scg_ue_mixed_v16a0.unpack(bref)); } - HANDLE_CODE(pos_sib_type_r16.unpack(bref)); return SRSASN_SUCCESS; } -void pos_sib_type_r16_s::to_json(json_writer& j) const +void pdcch_blind_detection_mixed_list_r16_s::to_json(json_writer& j) const { j.start_obj(); - if (encrypted_r16_present) { - j.write_str("encrypted-r16", "true"); - } - if (gnss_id_r16_present) { - j.write_fieldname("gnss-id-r16"); - gnss_id_r16.to_json(j); - } - if (sbas_id_r16_present) { - j.write_fieldname("sbas-id-r16"); - sbas_id_r16.to_json(j); + if (pdcch_blind_detection_ca_mixed_ext_r16_present) { + j.write_fieldname("pdcch-BlindDetectionCA-MixedExt-r16"); + pdcch_blind_detection_ca_mixed_ext_r16.to_json(j); } - j.write_str("posSibType-r16", pos_sib_type_r16.to_string()); - if (area_scope_r16_present) { - j.write_str("areaScope-r16", "true"); + if (pdcch_blind_detection_cg_ue_mixed_ext_r16_present) { + j.write_fieldname("pdcch-BlindDetectionCG-UE-MixedExt-r16"); + j.start_obj(); + j.write_fieldname("pdcch-BlindDetectionMCG-UE-Mixed-v16a0"); + pdcch_blind_detection_cg_ue_mixed_ext_r16.pdcch_blind_detection_mcg_ue_mixed_v16a0.to_json(j); + j.write_fieldname("pdcch-BlindDetectionSCG-UE-Mixed-v16a0"); + pdcch_blind_detection_cg_ue_mixed_ext_r16.pdcch_blind_detection_scg_ue_mixed_v16a0.to_json(j); + j.end_obj(); } j.end_obj(); } -const char* pos_sib_type_r16_s::pos_sib_type_r16_opts::to_string() const +void pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::destroy_() { - static const char* names[] = { - "posSibType1-1", "posSibType1-2", "posSibType1-3", "posSibType1-4", "posSibType1-5", "posSibType1-6", - "posSibType1-7", "posSibType1-8", "posSibType2-1", "posSibType2-2", "posSibType2-3", "posSibType2-4", - "posSibType2-5", "posSibType2-6", "posSibType2-7", "posSibType2-8", "posSibType2-9", "posSibType2-10", - "posSibType2-11", "posSibType2-12", "posSibType2-13", "posSibType2-14", "posSibType2-15", "posSibType2-16", - "posSibType2-17", "posSibType2-18", "posSibType2-19", "posSibType2-20", "posSibType2-21", "posSibType2-22", - "posSibType2-23", "posSibType3-1", "posSibType4-1", "posSibType5-1", "posSibType6-1", "posSibType6-2", - "posSibType6-3"}; - return convert_enum_idx(names, 37, value, "pos_sib_type_r16_s::pos_sib_type_r16_e_"); + switch (type_) { + case types::pdcch_blind_detection_ca_mixed_v16a0: + c.destroy(); + break; + case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: + c.destroy(); + break; + default: + break; + } } - -const char* rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::types_opts::to_string() const +void pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::set(types::options e) { - static const char* names[] = {"oneSlot", "twoSlots"}; - return convert_enum_idx( - names, 2, value, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::types"); + destroy_(); + type_ = e; + switch (type_) { + case types::pdcch_blind_detection_ca_mixed_v16a0: + c.init(); + break; + case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_"); + } } -uint8_t rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::types_opts::to_number() const +pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_:: + pdcch_blind_detection_ca_mixed_ext_r16_c_( + const pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_& other) { - static const uint8_t numbers[] = {1, 2}; - return map_enum_number( - numbers, 2, value, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::types"); + type_ = other.type(); + switch (type_) { + case types::pdcch_blind_detection_ca_mixed_v16a0: + c.init(other.c.get()); + break; + case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_"); + } } - -const char* rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types_opts::to_string() const +pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_& +pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::operator=( + const pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_& other) { - static const char* names[] = {"n2", "n4", "n5", "n8", "n10", "n20", "n40"}; - return convert_enum_idx( - names, 7, value, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types"); + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::pdcch_blind_detection_ca_mixed_v16a0: + c.set(other.c.get()); + break; + case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_"); + } + + return *this; } -uint8_t rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types_opts::to_number() const +pdcch_blind_detection_ca_mixed_ext_r16_s& pdcch_blind_detection_mixed_list_r16_s:: + pdcch_blind_detection_ca_mixed_ext_r16_c_::set_pdcch_blind_detection_ca_mixed_v16a0() { - static const uint8_t numbers[] = {2, 4, 5, 8, 10, 20, 40}; - return map_enum_number( - numbers, 7, value, "rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::types"); + set(types::pdcch_blind_detection_ca_mixed_v16a0); + return c.get(); } - -const char* rate_match_pattern_s::pattern_type_c_::types_opts::to_string() const +pdcch_blind_detection_ca_mixed_ext_r16_s& pdcch_blind_detection_mixed_list_r16_s:: + pdcch_blind_detection_ca_mixed_ext_r16_c_::set_pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0() { - static const char* names[] = {"bitmaps", "controlResourceSet"}; - return convert_enum_idx(names, 2, value, "rate_match_pattern_s::pattern_type_c_::types"); + set(types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0); + return c.get(); } - -// SI-SchedulingInfo-v1740 ::= SEQUENCE -SRSASN_CODE si_sched_info_v1740_s::pack(bit_ref& bref) const +void pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::to_json(json_writer& j) const { - HANDLE_CODE(bref.pack(si_request_cfg_red_cap_r17_present, 1)); - - if (si_request_cfg_red_cap_r17_present) { - HANDLE_CODE(si_request_cfg_red_cap_r17.pack(bref)); + j.start_obj(); + switch (type_) { + case types::pdcch_blind_detection_ca_mixed_v16a0: + j.write_fieldname("pdcch-BlindDetectionCA-Mixed-v16a0"); + c.get().to_json(j); + break; + case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: + j.write_fieldname("pdcch-BlindDetectionCA-Mixed-NonAlignedSpan-v16a0"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_"); } - - return SRSASN_SUCCESS; + j.end_obj(); } -SRSASN_CODE si_sched_info_v1740_s::unpack(cbit_ref& bref) +SRSASN_CODE pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::pack(bit_ref& bref) const { - HANDLE_CODE(bref.unpack(si_request_cfg_red_cap_r17_present, 1)); - - if (si_request_cfg_red_cap_r17_present) { - HANDLE_CODE(si_request_cfg_red_cap_r17.unpack(bref)); + type_.pack(bref); + switch (type_) { + case types::pdcch_blind_detection_ca_mixed_v16a0: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } - return SRSASN_SUCCESS; } -void si_sched_info_v1740_s::to_json(json_writer& j) const +SRSASN_CODE pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::unpack(cbit_ref& bref) { - j.start_obj(); - if (si_request_cfg_red_cap_r17_present) { - j.write_fieldname("si-RequestConfigRedCap-r17"); - si_request_cfg_red_cap_r17.to_json(j); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::pdcch_blind_detection_ca_mixed_v16a0: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; } - j.end_obj(); + return SRSASN_SUCCESS; } -const char* ssb_mtc_s::periodicity_and_offset_c_::types_opts::to_string() const -{ - static const char* names[] = {"sf5", "sf10", "sf20", "sf40", "sf80", "sf160"}; - return convert_enum_idx(names, 6, value, "ssb_mtc_s::periodicity_and_offset_c_::types"); -} -uint8_t ssb_mtc_s::periodicity_and_offset_c_::types_opts::to_number() const +const char* +pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::types_opts::to_string() const { - static const uint8_t numbers[] = {5, 10, 20, 40, 80, 160}; - return map_enum_number(numbers, 6, value, "ssb_mtc_s::periodicity_and_offset_c_::types"); + static const char* names[] = {"pdcch-BlindDetectionCA-Mixed-v16a0", + "pdcch-BlindDetectionCA-Mixed-NonAlignedSpan-v16a0"}; + return convert_enum_idx( + names, 2, value, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::types"); } -// SSB-MTC2-LP-r16 ::= SEQUENCE -SRSASN_CODE ssb_mtc2_lp_r16_s::pack(bit_ref& bref) const +// CA-ParametersNR-v16a0 ::= SEQUENCE +SRSASN_CODE ca_params_nr_v16a0_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(pci_list.size() > 0, 1)); - - if (pci_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, pci_list, 1, 64, integer_packer(0, 1007))); - } - HANDLE_CODE(periodicity.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, pdcch_blind_detection_mixed_list_r16, 1, 7)); return SRSASN_SUCCESS; } -SRSASN_CODE ssb_mtc2_lp_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE ca_params_nr_v16a0_s::unpack(cbit_ref& bref) { - bool pci_list_present; - 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)); + HANDLE_CODE(unpack_dyn_seq_of(pdcch_blind_detection_mixed_list_r16, bref, 1, 7)); return SRSASN_SUCCESS; } -void ssb_mtc2_lp_r16_s::to_json(json_writer& j) const +void ca_params_nr_v16a0_s::to_json(json_writer& j) const { j.start_obj(); - if (pci_list.size() > 0) { - j.start_array("pci-List"); - for (const auto& e1 : pci_list) { - j.write_int(e1); - } - j.end_array(); + j.start_array("pdcch-BlindDetectionMixedList-r16"); + for (const auto& e1 : pdcch_blind_detection_mixed_list_r16) { + e1.to_json(j); } - j.write_str("periodicity", periodicity.to_string()); + j.end_array(); j.end_obj(); } -const char* ssb_mtc2_lp_r16_s::periodicity_opts::to_string() const -{ - static const char* names[] = {"sf10", "sf20", "sf40", "sf80", "sf160", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "ssb_mtc2_lp_r16_s::periodicity_e_"); -} -uint8_t ssb_mtc2_lp_r16_s::periodicity_opts::to_number() const +// CA-ParametersNRDC-v16a0 ::= SEQUENCE +SRSASN_CODE ca_params_nrdc_v16a0_s::pack(bit_ref& bref) const { - static const uint8_t numbers[] = {10, 20, 40, 80, 160}; - return map_enum_number(numbers, 5, value, "ssb_mtc2_lp_r16_s::periodicity_e_"); -} - -const char* ssb_to_measure_c::types_opts::to_string() const -{ - static const char* names[] = {"shortBitmap", "mediumBitmap", "longBitmap"}; - return convert_enum_idx(names, 3, value, "ssb_to_measure_c::types"); -} + HANDLE_CODE(bref.pack(ca_params_nr_for_dc_v16a0_present, 1)); -// SchedulingInfo2-r17 ::= SEQUENCE -SRSASN_CODE sched_info2_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(si_broadcast_status_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, si_win_position_r17, (uint16_t)1u, (uint16_t)256u)); - HANDLE_CODE(si_periodicity_r17.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, sib_map_info_r17, 1, 32)); + if (ca_params_nr_for_dc_v16a0_present) { + HANDLE_CODE(ca_params_nr_for_dc_v16a0.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE sched_info2_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE ca_params_nrdc_v16a0_s::unpack(cbit_ref& bref) { - HANDLE_CODE(si_broadcast_status_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(si_win_position_r17, bref, (uint16_t)1u, (uint16_t)256u)); - HANDLE_CODE(si_periodicity_r17.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(sib_map_info_r17, bref, 1, 32)); + HANDLE_CODE(bref.unpack(ca_params_nr_for_dc_v16a0_present, 1)); + + if (ca_params_nr_for_dc_v16a0_present) { + HANDLE_CODE(ca_params_nr_for_dc_v16a0.unpack(bref)); + } return SRSASN_SUCCESS; } -void sched_info2_r17_s::to_json(json_writer& j) const +void ca_params_nrdc_v16a0_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("si-BroadcastStatus-r17", si_broadcast_status_r17.to_string()); - j.write_int("si-WindowPosition-r17", si_win_position_r17); - j.write_str("si-Periodicity-r17", si_periodicity_r17.to_string()); - j.start_array("sib-MappingInfo-r17"); - for (const auto& e1 : sib_map_info_r17) { - e1.to_json(j); + if (ca_params_nr_for_dc_v16a0_present) { + j.write_fieldname("ca-ParametersNR-ForDC-v16a0"); + ca_params_nr_for_dc_v16a0.to_json(j); } - j.end_array(); j.end_obj(); } -const char* sched_info2_r17_s::si_broadcast_status_r17_opts::to_string() const -{ - static const char* names[] = {"broadcasting", "notBroadcasting"}; - return convert_enum_idx(names, 2, value, "sched_info2_r17_s::si_broadcast_status_r17_e_"); -} - -const char* sched_info2_r17_s::si_periodicity_r17_opts::to_string() const -{ - static const char* names[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; - return convert_enum_idx(names, 7, value, "sched_info2_r17_s::si_periodicity_r17_e_"); -} -uint16_t sched_info2_r17_s::si_periodicity_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {8, 16, 32, 64, 128, 256, 512}; - return map_enum_number(numbers, 7, value, "sched_info2_r17_s::si_periodicity_r17_e_"); -} - -const char* search_space_s::monitoring_slot_periodicity_and_offset_c_::types_opts::to_string() const -{ - static const char* names[] = {"sl1", - "sl2", - "sl4", - "sl5", - "sl8", - "sl10", - "sl16", - "sl20", - "sl40", - "sl80", - "sl160", - "sl320", - "sl640", - "sl1280", - "sl2560"}; - return convert_enum_idx(names, 15, value, "search_space_s::monitoring_slot_periodicity_and_offset_c_::types"); -} -uint16_t search_space_s::monitoring_slot_periodicity_and_offset_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {1, 2, 4, 5, 8, 10, 16, 20, 40, 80, 160, 320, 640, 1280, 2560}; - return map_enum_number(numbers, 15, value, "search_space_s::monitoring_slot_periodicity_and_offset_c_::types"); -} - -const char* search_space_s::search_space_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"common", "ue-Specific"}; - return convert_enum_idx(names, 2, value, "search_space_s::search_space_type_c_::types"); -} - -const char* search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::types_opts::to_string() const -{ - static const char* names[] = {"sl32", "sl64", "sl128", "sl5120", "sl10240", "sl20480"}; - return convert_enum_idx( - names, 6, value, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::types"); -} -uint16_t search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {32, 64, 128, 5120, 10240, 20480}; - return map_enum_number( - numbers, 6, value, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::types"); -} - -const char* search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"slotGroupLength4-r17", "slotGroupLength8-r17"}; - return convert_enum_idx( - names, 2, value, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::types"); -} -uint8_t search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::types_opts::to_number() const +// BandCombination-v16a0 ::= SEQUENCE +SRSASN_CODE band_combination_v16a0_s::pack(bit_ref& bref) const { - static const uint8_t numbers[] = {4, 8}; - return map_enum_number( - numbers, 2, value, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::types"); -} + HANDLE_CODE(bref.pack(ca_params_nr_v16a0_present, 1)); + HANDLE_CODE(bref.pack(ca_params_nrdc_v16a0_present, 1)); -// SpeedStateScaleFactors ::= SEQUENCE -SRSASN_CODE speed_state_scale_factors_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(sf_medium.pack(bref)); - HANDLE_CODE(sf_high.pack(bref)); + if (ca_params_nr_v16a0_present) { + HANDLE_CODE(ca_params_nr_v16a0.pack(bref)); + } + if (ca_params_nrdc_v16a0_present) { + HANDLE_CODE(ca_params_nrdc_v16a0.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE speed_state_scale_factors_s::unpack(cbit_ref& bref) +SRSASN_CODE band_combination_v16a0_s::unpack(cbit_ref& bref) { - HANDLE_CODE(sf_medium.unpack(bref)); - HANDLE_CODE(sf_high.unpack(bref)); + HANDLE_CODE(bref.unpack(ca_params_nr_v16a0_present, 1)); + HANDLE_CODE(bref.unpack(ca_params_nrdc_v16a0_present, 1)); + + if (ca_params_nr_v16a0_present) { + HANDLE_CODE(ca_params_nr_v16a0.unpack(bref)); + } + if (ca_params_nrdc_v16a0_present) { + HANDLE_CODE(ca_params_nrdc_v16a0.unpack(bref)); + } return SRSASN_SUCCESS; } -void speed_state_scale_factors_s::to_json(json_writer& j) const +void band_combination_v16a0_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("sf-Medium", sf_medium.to_string()); - j.write_str("sf-High", sf_high.to_string()); + if (ca_params_nr_v16a0_present) { + j.write_fieldname("ca-ParametersNR-v16a0"); + ca_params_nr_v16a0.to_json(j); + } + if (ca_params_nrdc_v16a0_present) { + j.write_fieldname("ca-ParametersNRDC-v16a0"); + ca_params_nrdc_v16a0.to_json(j); + } j.end_obj(); } -const char* speed_state_scale_factors_s::sf_medium_opts::to_string() const -{ - static const char* names[] = {"oDot25", "oDot5", "oDot75", "lDot0"}; - return convert_enum_idx(names, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); -} -float speed_state_scale_factors_s::sf_medium_opts::to_number() const -{ - static const float numbers[] = {0.25, 0.5, 0.75, 1.0}; - return map_enum_number(numbers, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); -} -const char* speed_state_scale_factors_s::sf_medium_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.25", "0.5", "0.75", "1.0"}; - return convert_enum_idx(number_strs, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); -} - -const char* speed_state_scale_factors_s::sf_high_opts::to_string() const -{ - static const char* names[] = {"oDot25", "oDot5", "oDot75", "lDot0"}; - return convert_enum_idx(names, 4, value, "speed_state_scale_factors_s::sf_high_e_"); -} -float speed_state_scale_factors_s::sf_high_opts::to_number() const -{ - static const float numbers[] = {0.25, 0.5, 0.75, 1.0}; - return map_enum_number(numbers, 4, value, "speed_state_scale_factors_s::sf_high_e_"); -} -const char* speed_state_scale_factors_s::sf_high_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.25", "0.5", "0.75", "1.0"}; - return convert_enum_idx(number_strs, 4, value, "speed_state_scale_factors_s::sf_high_e_"); -} - -// UAC-BarringInfoSet-v1700 ::= SEQUENCE -SRSASN_CODE uac_barr_info_set_v1700_s::pack(bit_ref& bref) const +// BandCombination-UplinkTxSwitch-v16a0 ::= SEQUENCE +SRSASN_CODE band_combination_ul_tx_switch_v16a0_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(uac_barr_factor_for_ai3_r17_present, 1)); + HANDLE_CODE(bref.pack(band_combination_v16a0_present, 1)); - if (uac_barr_factor_for_ai3_r17_present) { - HANDLE_CODE(uac_barr_factor_for_ai3_r17.pack(bref)); + if (band_combination_v16a0_present) { + HANDLE_CODE(band_combination_v16a0.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE uac_barr_info_set_v1700_s::unpack(cbit_ref& bref) +SRSASN_CODE band_combination_ul_tx_switch_v16a0_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(uac_barr_factor_for_ai3_r17_present, 1)); + HANDLE_CODE(bref.unpack(band_combination_v16a0_present, 1)); - if (uac_barr_factor_for_ai3_r17_present) { - HANDLE_CODE(uac_barr_factor_for_ai3_r17.unpack(bref)); + if (band_combination_v16a0_present) { + HANDLE_CODE(band_combination_v16a0.unpack(bref)); } return SRSASN_SUCCESS; } -void uac_barr_info_set_v1700_s::to_json(json_writer& j) const +void band_combination_ul_tx_switch_v16a0_s::to_json(json_writer& j) const { j.start_obj(); - if (uac_barr_factor_for_ai3_r17_present) { - j.write_str("uac-BarringFactorForAI3-r17", uac_barr_factor_for_ai3_r17.to_string()); + if (band_combination_v16a0_present) { + j.write_fieldname("bandCombination-v16a0"); + band_combination_v16a0.to_json(j); } j.end_obj(); } -const char* uac_barr_info_set_v1700_s::uac_barr_factor_for_ai3_r17_opts::to_string() const -{ - static const char* names[] = { - "p00", "p05", "p10", "p15", "p20", "p25", "p30", "p40", "p50", "p60", "p70", "p75", "p80", "p85", "p90", "p95"}; - return convert_enum_idx(names, 16, value, "uac_barr_info_set_v1700_s::uac_barr_factor_for_ai3_r17_e_"); -} -float uac_barr_info_set_v1700_s::uac_barr_factor_for_ai3_r17_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; - return map_enum_number(numbers, 16, value, "uac_barr_info_set_v1700_s::uac_barr_factor_for_ai3_r17_e_"); -} -const char* uac_barr_info_set_v1700_s::uac_barr_factor_for_ai3_r17_opts::to_number_string() const -{ - static const char* number_strs[] = { - "0.0", "0.5", "1.0", "1.5", "2.0", "2.5", "3.0", "4.0", "5.0", "6.0", "7.0", "7.5", "8.0", "8.5", "9.0", "9.5"}; - return convert_enum_idx(number_strs, 16, value, "uac_barr_info_set_v1700_s::uac_barr_factor_for_ai3_r17_e_"); -} - -// CarrierFreqEUTRA ::= SEQUENCE -SRSASN_CODE carrier_freq_eutra_s::pack(bit_ref& bref) const +// CG-SDT-ConfigLCH-Restriction-r17 ::= SEQUENCE +SRSASN_CODE cg_sdt_cfg_lch_restrict_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(eutra_multi_band_info_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(eutra_freq_neigh_cell_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(eutra_excluded_cell_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(cell_resel_prio_present, 1)); - HANDLE_CODE(bref.pack(cell_resel_sub_prio_present, 1)); - HANDLE_CODE(bref.pack(thresh_x_q_present, 1)); + HANDLE_CODE(bref.pack(cfg_grant_type1_allowed_r17_present, 1)); + HANDLE_CODE(bref.pack(allowed_cg_list_r17_present, 1)); - HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)262143u)); - if (eutra_multi_band_info_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, eutra_multi_band_info_list, 1, 8)); - } - if (eutra_freq_neigh_cell_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, eutra_freq_neigh_cell_list, 1, 8)); - } - if (eutra_excluded_cell_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, eutra_excluded_cell_list, 1, 16)); - } - HANDLE_CODE(allowed_meas_bw.pack(bref)); - HANDLE_CODE(bref.pack(presence_ant_port1, 1)); - if (cell_resel_prio_present) { - 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, thresh_x_high, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_integer(bref, thresh_x_low, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_integer(bref, q_rx_lev_min, (int8_t)-70, (int8_t)-22)); - HANDLE_CODE(pack_integer(bref, q_qual_min, (int8_t)-34, (int8_t)-3)); - HANDLE_CODE(pack_integer(bref, p_max_eutra, (int8_t)-30, (int8_t)33)); - if (thresh_x_q_present) { - HANDLE_CODE(pack_integer(bref, thresh_x_q.thresh_x_high_q, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_integer(bref, thresh_x_q.thresh_x_low_q, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, lc_ch_id_r17, (uint8_t)1u, (uint8_t)32u)); + if (allowed_cg_list_r17_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, allowed_cg_list_r17, 0, 31, integer_packer(0, 31))); } return SRSASN_SUCCESS; } -SRSASN_CODE carrier_freq_eutra_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_sdt_cfg_lch_restrict_r17_s::unpack(cbit_ref& bref) { - bool eutra_multi_band_info_list_present; - HANDLE_CODE(bref.unpack(eutra_multi_band_info_list_present, 1)); - bool eutra_freq_neigh_cell_list_present; - HANDLE_CODE(bref.unpack(eutra_freq_neigh_cell_list_present, 1)); - bool eutra_excluded_cell_list_present; - HANDLE_CODE(bref.unpack(eutra_excluded_cell_list_present, 1)); - HANDLE_CODE(bref.unpack(cell_resel_prio_present, 1)); - HANDLE_CODE(bref.unpack(cell_resel_sub_prio_present, 1)); - HANDLE_CODE(bref.unpack(thresh_x_q_present, 1)); + HANDLE_CODE(bref.unpack(cfg_grant_type1_allowed_r17_present, 1)); + HANDLE_CODE(bref.unpack(allowed_cg_list_r17_present, 1)); - HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)262143u)); - if (eutra_multi_band_info_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(eutra_multi_band_info_list, bref, 1, 8)); - } - if (eutra_freq_neigh_cell_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(eutra_freq_neigh_cell_list, bref, 1, 8)); - } - if (eutra_excluded_cell_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(eutra_excluded_cell_list, bref, 1, 16)); - } - HANDLE_CODE(allowed_meas_bw.unpack(bref)); - HANDLE_CODE(bref.unpack(presence_ant_port1, 1)); - if (cell_resel_prio_present) { - 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(thresh_x_high, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_integer(thresh_x_low, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_integer(q_rx_lev_min, bref, (int8_t)-70, (int8_t)-22)); - HANDLE_CODE(unpack_integer(q_qual_min, bref, (int8_t)-34, (int8_t)-3)); - HANDLE_CODE(unpack_integer(p_max_eutra, bref, (int8_t)-30, (int8_t)33)); - if (thresh_x_q_present) { - HANDLE_CODE(unpack_integer(thresh_x_q.thresh_x_high_q, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_integer(thresh_x_q.thresh_x_low_q, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(lc_ch_id_r17, bref, (uint8_t)1u, (uint8_t)32u)); + if (allowed_cg_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(allowed_cg_list_r17, bref, 0, 31, integer_packer(0, 31))); } return SRSASN_SUCCESS; } -void carrier_freq_eutra_s::to_json(json_writer& j) const +void cg_sdt_cfg_lch_restrict_r17_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("carrierFreq", carrier_freq); - if (eutra_multi_band_info_list.size() > 0) { - j.start_array("eutra-multiBandInfoList"); - for (const auto& e1 : eutra_multi_band_info_list) { - e1.to_json(j); - } - j.end_array(); - } - if (eutra_freq_neigh_cell_list.size() > 0) { - j.start_array("eutra-FreqNeighCellList"); - for (const auto& e1 : eutra_freq_neigh_cell_list) { - e1.to_json(j); - } - j.end_array(); + j.write_int("logicalChannelIdentity-r17", lc_ch_id_r17); + if (cfg_grant_type1_allowed_r17_present) { + j.write_str("configuredGrantType1Allowed-r17", "true"); } - if (eutra_excluded_cell_list.size() > 0) { - j.start_array("eutra-ExcludedCellList"); - for (const auto& e1 : eutra_excluded_cell_list) { - e1.to_json(j); + if (allowed_cg_list_r17_present) { + j.start_array("allowedCG-List-r17"); + for (const auto& e1 : allowed_cg_list_r17) { + j.write_int(e1); } j.end_array(); } - j.write_str("allowedMeasBandwidth", allowed_meas_bw.to_string()); - j.write_bool("presenceAntennaPort1", presence_ant_port1); - if (cell_resel_prio_present) { - 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("threshX-High", thresh_x_high); - j.write_int("threshX-Low", thresh_x_low); - j.write_int("q-RxLevMin", q_rx_lev_min); - j.write_int("q-QualMin", q_qual_min); - j.write_int("p-MaxEUTRA", p_max_eutra); - if (thresh_x_q_present) { - j.write_fieldname("threshX-Q"); - j.start_obj(); - j.write_int("threshX-HighQ", thresh_x_q.thresh_x_high_q); - j.write_int("threshX-LowQ", thresh_x_q.thresh_x_low_q); - j.end_obj(); - } j.end_obj(); } -// CarrierFreqEUTRA-v1610 ::= SEQUENCE -SRSASN_CODE carrier_freq_eutra_v1610_s::pack(bit_ref& bref) const +// CellGrouping-r16 ::= SEQUENCE +SRSASN_CODE cell_grouping_r16_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(high_speed_eutra_carrier_r16_present, 1)); + HANDLE_CODE(pack_dyn_seq_of(bref, mcg_r16, 1, 1024, integer_packer(1, 1024))); + HANDLE_CODE(pack_dyn_seq_of(bref, scg_r16, 1, 1024, integer_packer(1, 1024))); + HANDLE_CODE(mode_r16.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE carrier_freq_eutra_v1610_s::unpack(cbit_ref& bref) +SRSASN_CODE cell_grouping_r16_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(high_speed_eutra_carrier_r16_present, 1)); + HANDLE_CODE(unpack_dyn_seq_of(mcg_r16, bref, 1, 1024, integer_packer(1, 1024))); + HANDLE_CODE(unpack_dyn_seq_of(scg_r16, bref, 1, 1024, integer_packer(1, 1024))); + HANDLE_CODE(mode_r16.unpack(bref)); return SRSASN_SUCCESS; } -void carrier_freq_eutra_v1610_s::to_json(json_writer& j) const +void cell_grouping_r16_s::to_json(json_writer& j) const { j.start_obj(); - if (high_speed_eutra_carrier_r16_present) { - j.write_str("highSpeedEUTRACarrier-r16", "true"); + j.start_array("mcg-r16"); + for (const auto& e1 : mcg_r16) { + j.write_int(e1); } + j.end_array(); + j.start_array("scg-r16"); + for (const auto& e1 : scg_r16) { + j.write_int(e1); + } + j.end_array(); + j.write_str("mode-r16", mode_r16.to_string()); j.end_obj(); } -// CarrierFreqEUTRA-v1700 ::= SEQUENCE -SRSASN_CODE carrier_freq_eutra_v1700_s::pack(bit_ref& bref) const +const char* cell_grouping_r16_s::mode_r16_opts::to_string() const +{ + static const char* names[] = {"sync", "async"}; + return convert_enum_idx(names, 2, value, "cell_grouping_r16_s::mode_r16_e_"); +} + +// MeasResultSCG-Failure ::= SEQUENCE +SRSASN_CODE meas_result_scg_fail_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(eutra_freq_neigh_hsdn_cell_list_r17.size() > 0, 1)); + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_per_mo_list, 1, 8)); - if (eutra_freq_neigh_hsdn_cell_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, eutra_freq_neigh_hsdn_cell_list_r17, 1, 8)); - } + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= location_info_r16.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(bref.pack(location_info_r16.is_present(), 1)); + if (location_info_r16.is_present()) { + HANDLE_CODE(location_info_r16->pack(bref)); + } + } + } return SRSASN_SUCCESS; } -SRSASN_CODE carrier_freq_eutra_v1700_s::unpack(cbit_ref& bref) +SRSASN_CODE meas_result_scg_fail_s::unpack(cbit_ref& bref) { - bool eutra_freq_neigh_hsdn_cell_list_r17_present; - HANDLE_CODE(bref.unpack(eutra_freq_neigh_hsdn_cell_list_r17_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(meas_result_per_mo_list, bref, 1, 8)); - if (eutra_freq_neigh_hsdn_cell_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(eutra_freq_neigh_hsdn_cell_list_r17, 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); + unpack_presence_flag(location_info_r16, bref); + if (location_info_r16.is_present()) { + HANDLE_CODE(location_info_r16->unpack(bref)); + } + } + } return SRSASN_SUCCESS; } -void carrier_freq_eutra_v1700_s::to_json(json_writer& j) const +void meas_result_scg_fail_s::to_json(json_writer& j) const { j.start_obj(); - if (eutra_freq_neigh_hsdn_cell_list_r17.size() > 0) { - j.start_array("eutra-FreqNeighHSDN-CellList-r17"); - for (const auto& e1 : eutra_freq_neigh_hsdn_cell_list_r17) { - e1.to_json(j); + j.start_array("measResultPerMOList"); + for (const auto& e1 : meas_result_per_mo_list) { + e1.to_json(j); + } + j.end_array(); + if (ext) { + if (location_info_r16.is_present()) { + j.write_fieldname("locationInfo-r16"); + location_info_r16->to_json(j); } - j.end_array(); } j.end_obj(); } -// FreqPrioritySlicing-r17 ::= SEQUENCE -SRSASN_CODE freq_prio_slicing_r17_s::pack(bit_ref& bref) const +// Phy-ParametersCommon-v16a0 ::= SEQUENCE +SRSASN_CODE phy_params_common_v16a0_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(slice_info_list_r17.size() > 0, 1)); - - HANDLE_CODE(pack_integer(bref, dl_implicit_carrier_freq_r17, (uint8_t)0u, (uint8_t)8u)); - if (slice_info_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, slice_info_list_r17, 1, 8)); - } + HANDLE_CODE(bref.pack(srs_periodicity_and_offset_ext_r16_present, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE freq_prio_slicing_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE phy_params_common_v16a0_s::unpack(cbit_ref& bref) { - bool slice_info_list_r17_present; - HANDLE_CODE(bref.unpack(slice_info_list_r17_present, 1)); - - HANDLE_CODE(unpack_integer(dl_implicit_carrier_freq_r17, bref, (uint8_t)0u, (uint8_t)8u)); - if (slice_info_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(slice_info_list_r17, bref, 1, 8)); - } + HANDLE_CODE(bref.unpack(srs_periodicity_and_offset_ext_r16_present, 1)); return SRSASN_SUCCESS; } -void freq_prio_slicing_r17_s::to_json(json_writer& j) const +void phy_params_common_v16a0_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("dl-ImplicitCarrierFreq-r17", dl_implicit_carrier_freq_r17); - if (slice_info_list_r17.size() > 0) { - j.start_array("sliceInfoList-r17"); - for (const auto& e1 : slice_info_list_r17) { - e1.to_json(j); - } - j.end_array(); + if (srs_periodicity_and_offset_ext_r16_present) { + j.write_str("srs-PeriodicityAndOffsetExt-r16", "supported"); } j.end_obj(); } -// HRNN-r16 ::= SEQUENCE -SRSASN_CODE hrnn_r16_s::pack(bit_ref& bref) const +// Phy-Parameters-v16a0 ::= SEQUENCE +SRSASN_CODE phy_params_v16a0_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(hrnn_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(phy_params_common_v16a0_present, 1)); - if (hrnn_r16.size() > 0) { - HANDLE_CODE(hrnn_r16.pack(bref)); + if (phy_params_common_v16a0_present) { + HANDLE_CODE(phy_params_common_v16a0.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE hrnn_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE phy_params_v16a0_s::unpack(cbit_ref& bref) { - bool hrnn_r16_present; - HANDLE_CODE(bref.unpack(hrnn_r16_present, 1)); + HANDLE_CODE(bref.unpack(phy_params_common_v16a0_present, 1)); - if (hrnn_r16_present) { - HANDLE_CODE(hrnn_r16.unpack(bref)); + if (phy_params_common_v16a0_present) { + HANDLE_CODE(phy_params_common_v16a0.unpack(bref)); } return SRSASN_SUCCESS; } -void hrnn_r16_s::to_json(json_writer& j) const +void phy_params_v16a0_s::to_json(json_writer& j) const { j.start_obj(); - if (hrnn_r16.size() > 0) { - j.write_str("hrnn-r16", hrnn_r16.to_string()); + if (phy_params_common_v16a0_present) { + j.write_fieldname("phy-ParametersCommon-v16a0"); + phy_params_common_v16a0.to_json(j); } j.end_obj(); } -// InterFreqCarrierFreqInfo ::= SEQUENCE -SRSASN_CODE inter_freq_carrier_freq_info_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(freq_band_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(freq_band_list_sul.size() > 0, 1)); - HANDLE_CODE(bref.pack(nrof_ss_blocks_to_average_present, 1)); - HANDLE_CODE(bref.pack(abs_thresh_ss_blocks_consolidation_present, 1)); - HANDLE_CODE(bref.pack(smtc_present, 1)); - HANDLE_CODE(bref.pack(ssb_to_measure_present, 1)); - HANDLE_CODE(bref.pack(ss_rssi_meas_present, 1)); - HANDLE_CODE(bref.pack(q_rx_lev_min_sul_present, 1)); - HANDLE_CODE(bref.pack(q_qual_min_present, 1)); - HANDLE_CODE(bref.pack(p_max_present, 1)); - HANDLE_CODE(bref.pack(t_resel_nr_sf_present, 1)); - HANDLE_CODE(bref.pack(thresh_x_q_present, 1)); - HANDLE_CODE(bref.pack(cell_resel_prio_present, 1)); - HANDLE_CODE(bref.pack(cell_resel_sub_prio_present, 1)); - HANDLE_CODE(bref.pack(q_offset_freq_present, 1)); - HANDLE_CODE(bref.pack(inter_freq_neigh_cell_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(inter_freq_excluded_cell_list.size() > 0, 1)); +// RF-Parameters-v15g0 ::= SEQUENCE +SRSASN_CODE rf_params_v15g0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_list_v15g0.size() > 0, 1)); - HANDLE_CODE(pack_integer(bref, dl_carrier_freq, (uint32_t)0u, (uint32_t)3279165u)); - if (freq_band_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8)); - } - if (freq_band_list_sul.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list_sul, 1, 8)); - } - if (nrof_ss_blocks_to_average_present) { - HANDLE_CODE(pack_integer(bref, nrof_ss_blocks_to_average, (uint8_t)2u, (uint8_t)16u)); - } - if (abs_thresh_ss_blocks_consolidation_present) { - HANDLE_CODE(abs_thresh_ss_blocks_consolidation.pack(bref)); - } - if (smtc_present) { - HANDLE_CODE(smtc.pack(bref)); - } - HANDLE_CODE(ssb_subcarrier_spacing.pack(bref)); - if (ssb_to_measure_present) { - HANDLE_CODE(ssb_to_measure.pack(bref)); - } - HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell, 1)); - if (ss_rssi_meas_present) { - HANDLE_CODE(ss_rssi_meas.pack(bref)); - } - HANDLE_CODE(pack_integer(bref, q_rx_lev_min, (int8_t)-70, (int8_t)-22)); - if (q_rx_lev_min_sul_present) { - HANDLE_CODE(pack_integer(bref, q_rx_lev_min_sul, (int8_t)-70, (int8_t)-22)); - } - if (q_qual_min_present) { - HANDLE_CODE(pack_integer(bref, q_qual_min, (int8_t)-43, (int8_t)-12)); - } - if (p_max_present) { - HANDLE_CODE(pack_integer(bref, p_max, (int8_t)-30, (int8_t)33)); - } - HANDLE_CODE(pack_integer(bref, t_resel_nr, (uint8_t)0u, (uint8_t)7u)); - if (t_resel_nr_sf_present) { - HANDLE_CODE(t_resel_nr_sf.pack(bref)); - } - HANDLE_CODE(pack_integer(bref, thresh_x_high_p, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_integer(bref, thresh_x_low_p, (uint8_t)0u, (uint8_t)31u)); - if (thresh_x_q_present) { - HANDLE_CODE(pack_integer(bref, thresh_x_q.thresh_x_high_q, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_integer(bref, thresh_x_q.thresh_x_low_q, (uint8_t)0u, (uint8_t)31u)); - } - if (cell_resel_prio_present) { - 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 (q_offset_freq_present) { - HANDLE_CODE(q_offset_freq.pack(bref)); - } - if (inter_freq_neigh_cell_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_neigh_cell_list, 1, 16)); - } - if (inter_freq_excluded_cell_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_excluded_cell_list, 1, 16)); + if (supported_band_combination_list_v15g0.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_list_v15g0, 1, 65536)); } return SRSASN_SUCCESS; } -SRSASN_CODE inter_freq_carrier_freq_info_s::unpack(cbit_ref& bref) +SRSASN_CODE rf_params_v15g0_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - bool freq_band_list_present; - HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); - bool freq_band_list_sul_present; - HANDLE_CODE(bref.unpack(freq_band_list_sul_present, 1)); - HANDLE_CODE(bref.unpack(nrof_ss_blocks_to_average_present, 1)); - HANDLE_CODE(bref.unpack(abs_thresh_ss_blocks_consolidation_present, 1)); - HANDLE_CODE(bref.unpack(smtc_present, 1)); - HANDLE_CODE(bref.unpack(ssb_to_measure_present, 1)); - HANDLE_CODE(bref.unpack(ss_rssi_meas_present, 1)); - HANDLE_CODE(bref.unpack(q_rx_lev_min_sul_present, 1)); - HANDLE_CODE(bref.unpack(q_qual_min_present, 1)); - HANDLE_CODE(bref.unpack(p_max_present, 1)); - HANDLE_CODE(bref.unpack(t_resel_nr_sf_present, 1)); - HANDLE_CODE(bref.unpack(thresh_x_q_present, 1)); - HANDLE_CODE(bref.unpack(cell_resel_prio_present, 1)); - HANDLE_CODE(bref.unpack(cell_resel_sub_prio_present, 1)); - HANDLE_CODE(bref.unpack(q_offset_freq_present, 1)); - bool inter_freq_neigh_cell_list_present; - HANDLE_CODE(bref.unpack(inter_freq_neigh_cell_list_present, 1)); - bool inter_freq_excluded_cell_list_present; - HANDLE_CODE(bref.unpack(inter_freq_excluded_cell_list_present, 1)); - - HANDLE_CODE(unpack_integer(dl_carrier_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); - if (freq_band_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8)); - } - if (freq_band_list_sul_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_band_list_sul, bref, 1, 8)); - } - if (nrof_ss_blocks_to_average_present) { - HANDLE_CODE(unpack_integer(nrof_ss_blocks_to_average, bref, (uint8_t)2u, (uint8_t)16u)); - } - if (abs_thresh_ss_blocks_consolidation_present) { - HANDLE_CODE(abs_thresh_ss_blocks_consolidation.unpack(bref)); - } - if (smtc_present) { - HANDLE_CODE(smtc.unpack(bref)); - } - HANDLE_CODE(ssb_subcarrier_spacing.unpack(bref)); - if (ssb_to_measure_present) { - HANDLE_CODE(ssb_to_measure.unpack(bref)); - } - HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell, 1)); - if (ss_rssi_meas_present) { - HANDLE_CODE(ss_rssi_meas.unpack(bref)); - } - HANDLE_CODE(unpack_integer(q_rx_lev_min, bref, (int8_t)-70, (int8_t)-22)); - if (q_rx_lev_min_sul_present) { - HANDLE_CODE(unpack_integer(q_rx_lev_min_sul, bref, (int8_t)-70, (int8_t)-22)); - } - if (q_qual_min_present) { - HANDLE_CODE(unpack_integer(q_qual_min, bref, (int8_t)-43, (int8_t)-12)); - } - if (p_max_present) { - HANDLE_CODE(unpack_integer(p_max, bref, (int8_t)-30, (int8_t)33)); - } - HANDLE_CODE(unpack_integer(t_resel_nr, bref, (uint8_t)0u, (uint8_t)7u)); - if (t_resel_nr_sf_present) { - HANDLE_CODE(t_resel_nr_sf.unpack(bref)); - } - HANDLE_CODE(unpack_integer(thresh_x_high_p, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_integer(thresh_x_low_p, bref, (uint8_t)0u, (uint8_t)31u)); - if (thresh_x_q_present) { - HANDLE_CODE(unpack_integer(thresh_x_q.thresh_x_high_q, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_integer(thresh_x_q.thresh_x_low_q, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (cell_resel_prio_present) { - 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 (q_offset_freq_present) { - HANDLE_CODE(q_offset_freq.unpack(bref)); - } - if (inter_freq_neigh_cell_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(inter_freq_neigh_cell_list, bref, 1, 16)); - } - if (inter_freq_excluded_cell_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(inter_freq_excluded_cell_list, bref, 1, 16)); + bool supported_band_combination_list_v15g0_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v15g0_present, 1)); + + if (supported_band_combination_list_v15g0_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_list_v15g0, bref, 1, 65536)); } return SRSASN_SUCCESS; } -void inter_freq_carrier_freq_info_s::to_json(json_writer& j) const +void rf_params_v15g0_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("dl-CarrierFreq", dl_carrier_freq); - if (freq_band_list.size() > 0) { - j.start_array("frequencyBandList"); - for (const auto& e1 : freq_band_list) { - e1.to_json(j); - } - j.end_array(); - } - if (freq_band_list_sul.size() > 0) { - j.start_array("frequencyBandListSUL"); - for (const auto& e1 : freq_band_list_sul) { - e1.to_json(j); - } - j.end_array(); - } - if (nrof_ss_blocks_to_average_present) { - j.write_int("nrofSS-BlocksToAverage", nrof_ss_blocks_to_average); - } - if (abs_thresh_ss_blocks_consolidation_present) { - j.write_fieldname("absThreshSS-BlocksConsolidation"); - abs_thresh_ss_blocks_consolidation.to_json(j); - } - if (smtc_present) { - j.write_fieldname("smtc"); - smtc.to_json(j); - } - j.write_str("ssbSubcarrierSpacing", ssb_subcarrier_spacing.to_string()); - if (ssb_to_measure_present) { - j.write_fieldname("ssb-ToMeasure"); - ssb_to_measure.to_json(j); - } - 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.write_int("q-RxLevMin", q_rx_lev_min); - if (q_rx_lev_min_sul_present) { - j.write_int("q-RxLevMinSUL", q_rx_lev_min_sul); - } - if (q_qual_min_present) { - j.write_int("q-QualMin", q_qual_min); - } - if (p_max_present) { - j.write_int("p-Max", p_max); - } - j.write_int("t-ReselectionNR", t_resel_nr); - if (t_resel_nr_sf_present) { - j.write_fieldname("t-ReselectionNR-SF"); - t_resel_nr_sf.to_json(j); - } - j.write_int("threshX-HighP", thresh_x_high_p); - j.write_int("threshX-LowP", thresh_x_low_p); - if (thresh_x_q_present) { - j.write_fieldname("threshX-Q"); - j.start_obj(); - j.write_int("threshX-HighQ", thresh_x_q.thresh_x_high_q); - j.write_int("threshX-LowQ", thresh_x_q.thresh_x_low_q); - j.end_obj(); - } - if (cell_resel_prio_present) { - j.write_int("cellReselectionPriority", cell_resel_prio); - } - if (cell_resel_sub_prio_present) { - j.write_str("cellReselectionSubPriority", cell_resel_sub_prio.to_string()); - } - if (q_offset_freq_present) { - j.write_str("q-OffsetFreq", q_offset_freq.to_string()); - } - if (inter_freq_neigh_cell_list.size() > 0) { - j.start_array("interFreqNeighCellList"); - for (const auto& e1 : inter_freq_neigh_cell_list) { - e1.to_json(j); - } - j.end_array(); - } - if (inter_freq_excluded_cell_list.size() > 0) { - j.start_array("interFreqExcludedCellList"); - for (const auto& e1 : inter_freq_excluded_cell_list) { + if (supported_band_combination_list_v15g0.size() > 0) { + j.start_array("supportedBandCombinationList-v15g0"); + for (const auto& e1 : supported_band_combination_list_v15g0) { e1.to_json(j); } j.end_array(); @@ -2144,89 +1496,50 @@ void inter_freq_carrier_freq_info_s::to_json(json_writer& j) const j.end_obj(); } -// InterFreqCarrierFreqInfo-v1610 ::= SEQUENCE -SRSASN_CODE inter_freq_carrier_freq_info_v1610_s::pack(bit_ref& bref) const +// RF-Parameters-v16a0 ::= SEQUENCE +SRSASN_CODE rf_params_v16a0_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(inter_freq_neigh_cell_list_v1610.size() > 0, 1)); - HANDLE_CODE(bref.pack(smtc2_lp_r16_present, 1)); - HANDLE_CODE(bref.pack(inter_freq_allowed_cell_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(ssb_position_qcl_common_r16_present, 1)); - HANDLE_CODE(bref.pack(inter_freq_cag_cell_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_v16a0.size() > 0, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v16a0.size() > 0, 1)); - if (inter_freq_neigh_cell_list_v1610.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_neigh_cell_list_v1610, 1, 16)); - } - if (smtc2_lp_r16_present) { - HANDLE_CODE(smtc2_lp_r16.pack(bref)); - } - if (inter_freq_allowed_cell_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_allowed_cell_list_r16, 1, 16)); - } - if (ssb_position_qcl_common_r16_present) { - HANDLE_CODE(ssb_position_qcl_common_r16.pack(bref)); + if (supported_band_combination_list_v16a0.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_list_v16a0, 1, 65536)); } - if (inter_freq_cag_cell_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_cag_cell_list_r16, 1, 12)); + if (supported_band_combination_list_ul_tx_switch_v16a0.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_list_ul_tx_switch_v16a0, 1, 65536)); } return SRSASN_SUCCESS; } -SRSASN_CODE inter_freq_carrier_freq_info_v1610_s::unpack(cbit_ref& bref) +SRSASN_CODE rf_params_v16a0_s::unpack(cbit_ref& bref) { - bool inter_freq_neigh_cell_list_v1610_present; - HANDLE_CODE(bref.unpack(inter_freq_neigh_cell_list_v1610_present, 1)); - HANDLE_CODE(bref.unpack(smtc2_lp_r16_present, 1)); - bool inter_freq_allowed_cell_list_r16_present; - HANDLE_CODE(bref.unpack(inter_freq_allowed_cell_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(ssb_position_qcl_common_r16_present, 1)); - bool inter_freq_cag_cell_list_r16_present; - HANDLE_CODE(bref.unpack(inter_freq_cag_cell_list_r16_present, 1)); + bool supported_band_combination_list_v16a0_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v16a0_present, 1)); + bool supported_band_combination_list_ul_tx_switch_v16a0_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_ul_tx_switch_v16a0_present, 1)); - if (inter_freq_neigh_cell_list_v1610_present) { - HANDLE_CODE(unpack_dyn_seq_of(inter_freq_neigh_cell_list_v1610, bref, 1, 16)); - } - if (smtc2_lp_r16_present) { - HANDLE_CODE(smtc2_lp_r16.unpack(bref)); - } - if (inter_freq_allowed_cell_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(inter_freq_allowed_cell_list_r16, bref, 1, 16)); - } - if (ssb_position_qcl_common_r16_present) { - HANDLE_CODE(ssb_position_qcl_common_r16.unpack(bref)); + if (supported_band_combination_list_v16a0_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_list_v16a0, bref, 1, 65536)); } - if (inter_freq_cag_cell_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(inter_freq_cag_cell_list_r16, bref, 1, 12)); + if (supported_band_combination_list_ul_tx_switch_v16a0_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_list_ul_tx_switch_v16a0, bref, 1, 65536)); } return SRSASN_SUCCESS; } -void inter_freq_carrier_freq_info_v1610_s::to_json(json_writer& j) const +void rf_params_v16a0_s::to_json(json_writer& j) const { j.start_obj(); - if (inter_freq_neigh_cell_list_v1610.size() > 0) { - j.start_array("interFreqNeighCellList-v1610"); - for (const auto& e1 : inter_freq_neigh_cell_list_v1610) { - e1.to_json(j); - } - j.end_array(); - } - if (smtc2_lp_r16_present) { - j.write_fieldname("smtc2-LP-r16"); - smtc2_lp_r16.to_json(j); - } - if (inter_freq_allowed_cell_list_r16.size() > 0) { - j.start_array("interFreqAllowedCellList-r16"); - for (const auto& e1 : inter_freq_allowed_cell_list_r16) { + if (supported_band_combination_list_v16a0.size() > 0) { + j.start_array("supportedBandCombinationList-v16a0"); + for (const auto& e1 : supported_band_combination_list_v16a0) { e1.to_json(j); } j.end_array(); } - if (ssb_position_qcl_common_r16_present) { - j.write_str("ssb-PositionQCL-Common-r16", ssb_position_qcl_common_r16.to_string()); - } - if (inter_freq_cag_cell_list_r16.size() > 0) { - j.start_array("interFreqCAG-CellList-r16"); - for (const auto& e1 : inter_freq_cag_cell_list_r16) { + if (supported_band_combination_list_ul_tx_switch_v16a0.size() > 0) { + j.start_array("supportedBandCombinationList-UplinkTxSwitch-v16a0"); + for (const auto& e1 : supported_band_combination_list_ul_tx_switch_v16a0) { e1.to_json(j); } j.end_array(); @@ -2234,1518 +1547,1254 @@ void inter_freq_carrier_freq_info_v1610_s::to_json(json_writer& j) const j.end_obj(); } -// InterFreqCarrierFreqInfo-v1700 ::= SEQUENCE -SRSASN_CODE inter_freq_carrier_freq_info_v1700_s::pack(bit_ref& bref) const +// BandNR-v16c0 ::= SEQUENCE +SRSASN_CODE band_nr_v16c0_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(inter_freq_neigh_hsdn_cell_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(high_speed_meas_inter_freq_r17_present, 1)); - HANDLE_CODE(bref.pack(red_cap_access_allowed_r17_present, 1)); - HANDLE_CODE(bref.pack(ssb_position_qcl_common_r17_present, 1)); - HANDLE_CODE(bref.pack(inter_freq_neigh_cell_list_v1710.size() > 0, 1)); - - if (inter_freq_neigh_hsdn_cell_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_neigh_hsdn_cell_list_r17, 1, 16)); - } - if (ssb_position_qcl_common_r17_present) { - HANDLE_CODE(ssb_position_qcl_common_r17.pack(bref)); - } - if (inter_freq_neigh_cell_list_v1710.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_neigh_cell_list_v1710, 1, 16)); - } + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pusch_repeat_type_a_v16c0_present, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE inter_freq_carrier_freq_info_v1700_s::unpack(cbit_ref& bref) +SRSASN_CODE band_nr_v16c0_s::unpack(cbit_ref& bref) { - bool inter_freq_neigh_hsdn_cell_list_r17_present; - HANDLE_CODE(bref.unpack(inter_freq_neigh_hsdn_cell_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(high_speed_meas_inter_freq_r17_present, 1)); - HANDLE_CODE(bref.unpack(red_cap_access_allowed_r17_present, 1)); - HANDLE_CODE(bref.unpack(ssb_position_qcl_common_r17_present, 1)); - bool inter_freq_neigh_cell_list_v1710_present; - HANDLE_CODE(bref.unpack(inter_freq_neigh_cell_list_v1710_present, 1)); - - if (inter_freq_neigh_hsdn_cell_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(inter_freq_neigh_hsdn_cell_list_r17, bref, 1, 16)); - } - if (ssb_position_qcl_common_r17_present) { - HANDLE_CODE(ssb_position_qcl_common_r17.unpack(bref)); - } - if (inter_freq_neigh_cell_list_v1710_present) { - HANDLE_CODE(unpack_dyn_seq_of(inter_freq_neigh_cell_list_v1710, bref, 1, 16)); - } + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pusch_repeat_type_a_v16c0_present, 1)); return SRSASN_SUCCESS; } -void inter_freq_carrier_freq_info_v1700_s::to_json(json_writer& j) const +void band_nr_v16c0_s::to_json(json_writer& j) const { j.start_obj(); - if (inter_freq_neigh_hsdn_cell_list_r17.size() > 0) { - j.start_array("interFreqNeighHSDN-CellList-r17"); - for (const auto& e1 : inter_freq_neigh_hsdn_cell_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (high_speed_meas_inter_freq_r17_present) { - j.write_str("highSpeedMeasInterFreq-r17", "true"); - } - if (red_cap_access_allowed_r17_present) { - j.write_str("redCapAccessAllowed-r17", "true"); - } - if (ssb_position_qcl_common_r17_present) { - j.write_str("ssb-PositionQCL-Common-r17", ssb_position_qcl_common_r17.to_string()); - } - if (inter_freq_neigh_cell_list_v1710.size() > 0) { - j.start_array("interFreqNeighCellList-v1710"); - for (const auto& e1 : inter_freq_neigh_cell_list_v1710) { - e1.to_json(j); - } - j.end_array(); + if (pusch_repeat_type_a_v16c0_present) { + j.write_str("pusch-RepetitionTypeA-v16c0", "supported"); } j.end_obj(); } -// InterFreqCarrierFreqInfo-v1720 ::= SEQUENCE -SRSASN_CODE inter_freq_carrier_freq_info_v1720_s::pack(bit_ref& bref) const +// RF-Parameters-v16c0 ::= SEQUENCE +SRSASN_CODE rf_params_v16c0_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(smtc4list_r17.size() > 0, 1)); - - if (smtc4list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, smtc4list_r17, 1, 3)); - } + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_nr_v16c0, 1, 1024)); return SRSASN_SUCCESS; } -SRSASN_CODE inter_freq_carrier_freq_info_v1720_s::unpack(cbit_ref& bref) +SRSASN_CODE rf_params_v16c0_s::unpack(cbit_ref& bref) { - bool smtc4list_r17_present; - HANDLE_CODE(bref.unpack(smtc4list_r17_present, 1)); - - if (smtc4list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(smtc4list_r17, bref, 1, 3)); - } + HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_nr_v16c0, bref, 1, 1024)); return SRSASN_SUCCESS; } -void inter_freq_carrier_freq_info_v1720_s::to_json(json_writer& j) const +void rf_params_v16c0_s::to_json(json_writer& j) const { j.start_obj(); - if (smtc4list_r17.size() > 0) { - j.start_array("smtc4list-r17"); - for (const auto& e1 : smtc4list_r17) { - e1.to_json(j); - } - j.end_array(); + j.start_array("supportedBandListNR-v16c0"); + for (const auto& e1 : supported_band_list_nr_v16c0) { + e1.to_json(j); } + j.end_array(); j.end_obj(); } -// InterFreqCarrierFreqInfo-v1730 ::= SEQUENCE -SRSASN_CODE inter_freq_carrier_freq_info_v1730_s::pack(bit_ref& bref) const +// CG-SDT-TA-ValidationConfig-r17 ::= SEQUENCE +SRSASN_CODE cg_sdt_ta_validation_cfg_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ch_access_mode2_r17_present, 1)); + HANDLE_CODE(cg_sdt_rsrp_change_thres_r17.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE inter_freq_carrier_freq_info_v1730_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_sdt_ta_validation_cfg_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(ch_access_mode2_r17_present, 1)); + HANDLE_CODE(cg_sdt_rsrp_change_thres_r17.unpack(bref)); return SRSASN_SUCCESS; } -void inter_freq_carrier_freq_info_v1730_s::to_json(json_writer& j) const +void cg_sdt_ta_validation_cfg_r17_s::to_json(json_writer& j) const { j.start_obj(); - if (ch_access_mode2_r17_present) { - j.write_str("channelAccessMode2-r17", "enabled"); - } + j.write_str("cg-SDT-RSRP-ChangeThreshold-r17", cg_sdt_rsrp_change_thres_r17.to_string()); j.end_obj(); } -// IntraFreqNeighCellInfo ::= SEQUENCE -SRSASN_CODE intra_freq_neigh_cell_info_s::pack(bit_ref& bref) const +const char* cg_sdt_ta_validation_cfg_r17_s::cg_sdt_rsrp_change_thres_r17_opts::to_string() const +{ + static const char* names[] = {"dB2", + "dB4", + "dB6", + "dB8", + "dB10", + "dB14", + "dB18", + "dB22", + "dB26", + "dB30", + "dB34", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "cg_sdt_ta_validation_cfg_r17_s::cg_sdt_rsrp_change_thres_r17_e_"); +} +uint8_t cg_sdt_ta_validation_cfg_r17_s::cg_sdt_rsrp_change_thres_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 6, 8, 10, 14, 18, 22, 26, 30, 34}; + return map_enum_number(numbers, 11, value, "cg_sdt_ta_validation_cfg_r17_s::cg_sdt_rsrp_change_thres_r17_e_"); +} + +// SDT-MAC-PHY-CG-Config-r17 ::= SEQUENCE +SRSASN_CODE sdt_mac_phy_cg_cfg_r17_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(q_rx_lev_min_offset_cell_present, 1)); - HANDLE_CODE(bref.pack(q_rx_lev_min_offset_cell_sul_present, 1)); - HANDLE_CODE(bref.pack(q_qual_min_offset_cell_present, 1)); + HANDLE_CODE(bref.pack(cg_sdt_cfg_lch_restrict_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(cg_sdt_cfg_lch_restrict_to_release_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(cg_sdt_cfg_init_bwp_n_ul_r17_present, 1)); + HANDLE_CODE(bref.pack(cg_sdt_cfg_init_bwp_sul_r17_present, 1)); + HANDLE_CODE(bref.pack(cg_sdt_cfg_init_bwp_dl_r17_present, 1)); + HANDLE_CODE(bref.pack(cg_sdt_time_align_timer_r17_present, 1)); + HANDLE_CODE(bref.pack(cg_sdt_rsrp_thres_ssb_r17_present, 1)); + HANDLE_CODE(bref.pack(cg_sdt_ta_validation_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(cg_sdt_cs_rnti_r17_present, 1)); - HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(q_offset_cell.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)); + if (cg_sdt_cfg_lch_restrict_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cg_sdt_cfg_lch_restrict_to_add_mod_list_r17, 1, 32)); + } + if (cg_sdt_cfg_lch_restrict_to_release_list_r17.size() > 0) { + HANDLE_CODE( + pack_dyn_seq_of(bref, cg_sdt_cfg_lch_restrict_to_release_list_r17, 1, 32, integer_packer(1, 32))); + } + if (cg_sdt_cfg_init_bwp_n_ul_r17_present) { + HANDLE_CODE(cg_sdt_cfg_init_bwp_n_ul_r17.pack(bref)); + } + if (cg_sdt_cfg_init_bwp_sul_r17_present) { + HANDLE_CODE(cg_sdt_cfg_init_bwp_sul_r17.pack(bref)); + } + if (cg_sdt_cfg_init_bwp_dl_r17_present) { + HANDLE_CODE(cg_sdt_cfg_init_bwp_dl_r17.pack(bref)); + } + if (cg_sdt_time_align_timer_r17_present) { + HANDLE_CODE(cg_sdt_time_align_timer_r17.pack(bref)); + } + if (cg_sdt_rsrp_thres_ssb_r17_present) { + HANDLE_CODE(pack_integer(bref, cg_sdt_rsrp_thres_ssb_r17, (uint8_t)0u, (uint8_t)127u)); } - if (q_rx_lev_min_offset_cell_sul_present) { - HANDLE_CODE(pack_integer(bref, q_rx_lev_min_offset_cell_sul, (uint8_t)1u, (uint8_t)8u)); + if (cg_sdt_ta_validation_cfg_r17_present) { + HANDLE_CODE(cg_sdt_ta_validation_cfg_r17.pack(bref)); } - if (q_qual_min_offset_cell_present) { - HANDLE_CODE(pack_integer(bref, q_qual_min_offset_cell, (uint8_t)1u, (uint8_t)8u)); + if (cg_sdt_cs_rnti_r17_present) { + HANDLE_CODE(pack_integer(bref, cg_sdt_cs_rnti_r17, (uint32_t)0u, (uint32_t)65535u)); } return SRSASN_SUCCESS; } -SRSASN_CODE intra_freq_neigh_cell_info_s::unpack(cbit_ref& bref) +SRSASN_CODE sdt_mac_phy_cg_cfg_r17_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(q_rx_lev_min_offset_cell_present, 1)); - HANDLE_CODE(bref.unpack(q_rx_lev_min_offset_cell_sul_present, 1)); - HANDLE_CODE(bref.unpack(q_qual_min_offset_cell_present, 1)); + bool cg_sdt_cfg_lch_restrict_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(cg_sdt_cfg_lch_restrict_to_add_mod_list_r17_present, 1)); + bool cg_sdt_cfg_lch_restrict_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(cg_sdt_cfg_lch_restrict_to_release_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(cg_sdt_cfg_init_bwp_n_ul_r17_present, 1)); + HANDLE_CODE(bref.unpack(cg_sdt_cfg_init_bwp_sul_r17_present, 1)); + HANDLE_CODE(bref.unpack(cg_sdt_cfg_init_bwp_dl_r17_present, 1)); + HANDLE_CODE(bref.unpack(cg_sdt_time_align_timer_r17_present, 1)); + HANDLE_CODE(bref.unpack(cg_sdt_rsrp_thres_ssb_r17_present, 1)); + HANDLE_CODE(bref.unpack(cg_sdt_ta_validation_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(cg_sdt_cs_rnti_r17_present, 1)); - HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(q_offset_cell.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)); + if (cg_sdt_cfg_lch_restrict_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(cg_sdt_cfg_lch_restrict_to_add_mod_list_r17, bref, 1, 32)); } - if (q_rx_lev_min_offset_cell_sul_present) { - HANDLE_CODE(unpack_integer(q_rx_lev_min_offset_cell_sul, bref, (uint8_t)1u, (uint8_t)8u)); + if (cg_sdt_cfg_lch_restrict_to_release_list_r17_present) { + HANDLE_CODE( + unpack_dyn_seq_of(cg_sdt_cfg_lch_restrict_to_release_list_r17, bref, 1, 32, integer_packer(1, 32))); } - if (q_qual_min_offset_cell_present) { - HANDLE_CODE(unpack_integer(q_qual_min_offset_cell, bref, (uint8_t)1u, (uint8_t)8u)); + if (cg_sdt_cfg_init_bwp_n_ul_r17_present) { + HANDLE_CODE(cg_sdt_cfg_init_bwp_n_ul_r17.unpack(bref)); } - - return SRSASN_SUCCESS; -} -void intra_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()); - if (q_rx_lev_min_offset_cell_present) { - j.write_int("q-RxLevMinOffsetCell", q_rx_lev_min_offset_cell); + if (cg_sdt_cfg_init_bwp_sul_r17_present) { + HANDLE_CODE(cg_sdt_cfg_init_bwp_sul_r17.unpack(bref)); + } + if (cg_sdt_cfg_init_bwp_dl_r17_present) { + HANDLE_CODE(cg_sdt_cfg_init_bwp_dl_r17.unpack(bref)); } - if (q_rx_lev_min_offset_cell_sul_present) { - j.write_int("q-RxLevMinOffsetCellSUL", q_rx_lev_min_offset_cell_sul); + if (cg_sdt_time_align_timer_r17_present) { + HANDLE_CODE(cg_sdt_time_align_timer_r17.unpack(bref)); } - if (q_qual_min_offset_cell_present) { - j.write_int("q-QualMinOffsetCell", q_qual_min_offset_cell); + if (cg_sdt_rsrp_thres_ssb_r17_present) { + HANDLE_CODE(unpack_integer(cg_sdt_rsrp_thres_ssb_r17, bref, (uint8_t)0u, (uint8_t)127u)); } - j.end_obj(); -} - -// IntraFreqNeighCellInfo-v1610 ::= SEQUENCE -SRSASN_CODE intra_freq_neigh_cell_info_v1610_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ssb_position_qcl_r16_present, 1)); - - if (ssb_position_qcl_r16_present) { - HANDLE_CODE(ssb_position_qcl_r16.pack(bref)); + if (cg_sdt_ta_validation_cfg_r17_present) { + HANDLE_CODE(cg_sdt_ta_validation_cfg_r17.unpack(bref)); + } + if (cg_sdt_cs_rnti_r17_present) { + HANDLE_CODE(unpack_integer(cg_sdt_cs_rnti_r17, bref, (uint32_t)0u, (uint32_t)65535u)); } return SRSASN_SUCCESS; } -SRSASN_CODE intra_freq_neigh_cell_info_v1610_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ssb_position_qcl_r16_present, 1)); - - if (ssb_position_qcl_r16_present) { - HANDLE_CODE(ssb_position_qcl_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void intra_freq_neigh_cell_info_v1610_s::to_json(json_writer& j) const +void sdt_mac_phy_cg_cfg_r17_s::to_json(json_writer& j) const { j.start_obj(); - if (ssb_position_qcl_r16_present) { - j.write_str("ssb-PositionQCL-r16", ssb_position_qcl_r16.to_string()); + if (cg_sdt_cfg_lch_restrict_to_add_mod_list_r17.size() > 0) { + j.start_array("cg-SDT-ConfigLCH-RestrictionToAddModList-r17"); + for (const auto& e1 : cg_sdt_cfg_lch_restrict_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (cg_sdt_cfg_lch_restrict_to_release_list_r17.size() > 0) { + j.start_array("cg-SDT-ConfigLCH-RestrictionToReleaseList-r17"); + for (const auto& e1 : cg_sdt_cfg_lch_restrict_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (cg_sdt_cfg_init_bwp_n_ul_r17_present) { + j.write_fieldname("cg-SDT-ConfigInitialBWP-NUL-r17"); + cg_sdt_cfg_init_bwp_n_ul_r17.to_json(j); + } + if (cg_sdt_cfg_init_bwp_sul_r17_present) { + j.write_fieldname("cg-SDT-ConfigInitialBWP-SUL-r17"); + cg_sdt_cfg_init_bwp_sul_r17.to_json(j); + } + if (cg_sdt_cfg_init_bwp_dl_r17_present) { + j.write_fieldname("cg-SDT-ConfigInitialBWP-DL-r17"); + cg_sdt_cfg_init_bwp_dl_r17.to_json(j); + } + if (cg_sdt_time_align_timer_r17_present) { + j.write_str("cg-SDT-TimeAlignmentTimer-r17", cg_sdt_time_align_timer_r17.to_string()); + } + if (cg_sdt_rsrp_thres_ssb_r17_present) { + j.write_int("cg-SDT-RSRP-ThresholdSSB-r17", cg_sdt_rsrp_thres_ssb_r17); + } + if (cg_sdt_ta_validation_cfg_r17_present) { + j.write_fieldname("cg-SDT-TA-ValidationConfig-r17"); + cg_sdt_ta_validation_cfg_r17.to_json(j); + } + if (cg_sdt_cs_rnti_r17_present) { + j.write_int("cg-SDT-CS-RNTI-r17", cg_sdt_cs_rnti_r17); } j.end_obj(); } -// IntraFreqNeighCellInfo-v1710 ::= SEQUENCE -SRSASN_CODE intra_freq_neigh_cell_info_v1710_s::pack(bit_ref& bref) const +// SL-ConfigCommonNR-r16 ::= SEQUENCE +SRSASN_CODE sl_cfg_common_nr_r16_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ssb_position_qcl_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_freq_info_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_ue_sel_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_nr_anchor_carrier_freq_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_eutra_anchor_carrier_freq_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_radio_bearer_cfg_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_rlc_bearer_cfg_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_meas_cfg_common_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_csi_acquisition_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_offset_dfn_r16_present, 1)); + HANDLE_CODE(bref.pack(t400_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_max_num_consecutive_dtx_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_ssb_prio_nr_r16_present, 1)); - if (ssb_position_qcl_r17_present) { - HANDLE_CODE(ssb_position_qcl_r17.pack(bref)); + if (sl_freq_info_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_freq_info_list_r16, 1, 8)); + } + if (sl_ue_sel_cfg_r16_present) { + HANDLE_CODE(sl_ue_sel_cfg_r16.pack(bref)); + } + if (sl_nr_anchor_carrier_freq_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_nr_anchor_carrier_freq_list_r16, 1, 8, integer_packer(0, 3279165))); + } + if (sl_eutra_anchor_carrier_freq_list_r16.size() > 0) { + HANDLE_CODE( + pack_dyn_seq_of(bref, sl_eutra_anchor_carrier_freq_list_r16, 1, 8, integer_packer(0, 262143))); + } + if (sl_radio_bearer_cfg_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_radio_bearer_cfg_list_r16, 1, 512)); + } + if (sl_rlc_bearer_cfg_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_rlc_bearer_cfg_list_r16, 1, 512)); + } + if (sl_meas_cfg_common_r16_present) { + HANDLE_CODE(sl_meas_cfg_common_r16.pack(bref)); + } + if (sl_offset_dfn_r16_present) { + HANDLE_CODE(pack_integer(bref, sl_offset_dfn_r16, (uint16_t)1u, (uint16_t)1000u)); + } + if (t400_r16_present) { + HANDLE_CODE(t400_r16.pack(bref)); + } + if (sl_max_num_consecutive_dtx_r16_present) { + HANDLE_CODE(sl_max_num_consecutive_dtx_r16.pack(bref)); + } + if (sl_ssb_prio_nr_r16_present) { + HANDLE_CODE(pack_integer(bref, sl_ssb_prio_nr_r16, (uint8_t)1u, (uint8_t)8u)); } return SRSASN_SUCCESS; } -SRSASN_CODE intra_freq_neigh_cell_info_v1710_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_cfg_common_nr_r16_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(ssb_position_qcl_r17_present, 1)); + bool sl_freq_info_list_r16_present; + HANDLE_CODE(bref.unpack(sl_freq_info_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_ue_sel_cfg_r16_present, 1)); + bool sl_nr_anchor_carrier_freq_list_r16_present; + HANDLE_CODE(bref.unpack(sl_nr_anchor_carrier_freq_list_r16_present, 1)); + bool sl_eutra_anchor_carrier_freq_list_r16_present; + HANDLE_CODE(bref.unpack(sl_eutra_anchor_carrier_freq_list_r16_present, 1)); + bool sl_radio_bearer_cfg_list_r16_present; + HANDLE_CODE(bref.unpack(sl_radio_bearer_cfg_list_r16_present, 1)); + bool sl_rlc_bearer_cfg_list_r16_present; + HANDLE_CODE(bref.unpack(sl_rlc_bearer_cfg_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_meas_cfg_common_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_csi_acquisition_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_offset_dfn_r16_present, 1)); + HANDLE_CODE(bref.unpack(t400_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_max_num_consecutive_dtx_r16_present, 1)); + HANDLE_CODE(bref.unpack(sl_ssb_prio_nr_r16_present, 1)); - if (ssb_position_qcl_r17_present) { - HANDLE_CODE(ssb_position_qcl_r17.unpack(bref)); + if (sl_freq_info_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_freq_info_list_r16, bref, 1, 8)); + } + if (sl_ue_sel_cfg_r16_present) { + HANDLE_CODE(sl_ue_sel_cfg_r16.unpack(bref)); + } + if (sl_nr_anchor_carrier_freq_list_r16_present) { + HANDLE_CODE( + unpack_dyn_seq_of(sl_nr_anchor_carrier_freq_list_r16, bref, 1, 8, integer_packer(0, 3279165))); + } + if (sl_eutra_anchor_carrier_freq_list_r16_present) { + HANDLE_CODE( + unpack_dyn_seq_of(sl_eutra_anchor_carrier_freq_list_r16, bref, 1, 8, integer_packer(0, 262143))); + } + if (sl_radio_bearer_cfg_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_radio_bearer_cfg_list_r16, bref, 1, 512)); + } + if (sl_rlc_bearer_cfg_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_rlc_bearer_cfg_list_r16, bref, 1, 512)); + } + if (sl_meas_cfg_common_r16_present) { + HANDLE_CODE(sl_meas_cfg_common_r16.unpack(bref)); + } + if (sl_offset_dfn_r16_present) { + HANDLE_CODE(unpack_integer(sl_offset_dfn_r16, bref, (uint16_t)1u, (uint16_t)1000u)); + } + if (t400_r16_present) { + HANDLE_CODE(t400_r16.unpack(bref)); + } + if (sl_max_num_consecutive_dtx_r16_present) { + HANDLE_CODE(sl_max_num_consecutive_dtx_r16.unpack(bref)); + } + if (sl_ssb_prio_nr_r16_present) { + HANDLE_CODE(unpack_integer(sl_ssb_prio_nr_r16, bref, (uint8_t)1u, (uint8_t)8u)); } return SRSASN_SUCCESS; } -void intra_freq_neigh_cell_info_v1710_s::to_json(json_writer& j) const +void sl_cfg_common_nr_r16_s::to_json(json_writer& j) const { j.start_obj(); - if (ssb_position_qcl_r17_present) { - j.write_str("ssb-PositionQCL-r17", ssb_position_qcl_r17.to_string()); + if (sl_freq_info_list_r16.size() > 0) { + j.start_array("sl-FreqInfoList-r16"); + for (const auto& e1 : sl_freq_info_list_r16) { + e1.to_json(j); + } + j.end_array(); } - j.end_obj(); -} - -// LocationAndBandwidthBroadcast-r17 ::= CHOICE -void location_and_bw_broadcast_r17_c::set(types::options e) -{ - type_ = e; -} -void location_and_bw_broadcast_r17_c::set_same_as_sib1_cfg_location_and_bw() -{ - set(types::same_as_sib1_cfg_location_and_bw); -} -uint16_t& location_and_bw_broadcast_r17_c::set_location_and_bw() -{ - set(types::location_and_bw); - return c; -} -void location_and_bw_broadcast_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::same_as_sib1_cfg_location_and_bw: - break; - case types::location_and_bw: - j.write_int("locationAndBandwidth", c); - break; - default: - log_invalid_choice_id(type_, "location_and_bw_broadcast_r17_c"); + if (sl_ue_sel_cfg_r16_present) { + j.write_fieldname("sl-UE-SelectedConfig-r16"); + sl_ue_sel_cfg_r16.to_json(j); + } + if (sl_nr_anchor_carrier_freq_list_r16.size() > 0) { + j.start_array("sl-NR-AnchorCarrierFreqList-r16"); + for (const auto& e1 : sl_nr_anchor_carrier_freq_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_eutra_anchor_carrier_freq_list_r16.size() > 0) { + j.start_array("sl-EUTRA-AnchorCarrierFreqList-r16"); + for (const auto& e1 : sl_eutra_anchor_carrier_freq_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_radio_bearer_cfg_list_r16.size() > 0) { + j.start_array("sl-RadioBearerConfigList-r16"); + for (const auto& e1 : sl_radio_bearer_cfg_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_rlc_bearer_cfg_list_r16.size() > 0) { + j.start_array("sl-RLC-BearerConfigList-r16"); + for (const auto& e1 : sl_rlc_bearer_cfg_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_meas_cfg_common_r16_present) { + j.write_fieldname("sl-MeasConfigCommon-r16"); + sl_meas_cfg_common_r16.to_json(j); + } + if (sl_csi_acquisition_r16_present) { + j.write_str("sl-CSI-Acquisition-r16", "enabled"); + } + if (sl_offset_dfn_r16_present) { + j.write_int("sl-OffsetDFN-r16", sl_offset_dfn_r16); + } + if (t400_r16_present) { + j.write_str("t400-r16", t400_r16.to_string()); + } + if (sl_max_num_consecutive_dtx_r16_present) { + j.write_str("sl-MaxNumConsecutiveDTX-r16", sl_max_num_consecutive_dtx_r16.to_string()); + } + if (sl_ssb_prio_nr_r16_present) { + j.write_int("sl-SSB-PriorityNR-r16", sl_ssb_prio_nr_r16); } j.end_obj(); } -SRSASN_CODE location_and_bw_broadcast_r17_c::pack(bit_ref& bref) const + +const char* sl_cfg_common_nr_r16_s::t400_r16_opts::to_string() const { - type_.pack(bref); - switch (type_) { - case types::same_as_sib1_cfg_location_and_bw: - break; - case types::location_and_bw: - HANDLE_CODE(pack_integer(bref, c, (uint16_t)0u, (uint16_t)37949u)); - break; - default: - log_invalid_choice_id(type_, "location_and_bw_broadcast_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; + static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + return convert_enum_idx(names, 8, value, "sl_cfg_common_nr_r16_s::t400_r16_e_"); } -SRSASN_CODE location_and_bw_broadcast_r17_c::unpack(cbit_ref& bref) +uint16_t sl_cfg_common_nr_r16_s::t400_r16_opts::to_number() const { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::same_as_sib1_cfg_location_and_bw: - break; - case types::location_and_bw: - HANDLE_CODE(unpack_integer(c, bref, (uint16_t)0u, (uint16_t)37949u)); - break; - default: - log_invalid_choice_id(type_, "location_and_bw_broadcast_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; + static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(numbers, 8, value, "sl_cfg_common_nr_r16_s::t400_r16_e_"); } -const char* location_and_bw_broadcast_r17_c::types_opts::to_string() const +const char* sl_cfg_common_nr_r16_s::sl_max_num_consecutive_dtx_r16_opts::to_string() const { - static const char* names[] = {"sameAsSib1ConfiguredLocationAndBW", "locationAndBandwidth"}; - return convert_enum_idx(names, 2, value, "location_and_bw_broadcast_r17_c::types"); + static const char* names[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n16", "n32"}; + return convert_enum_idx(names, 8, value, "sl_cfg_common_nr_r16_s::sl_max_num_consecutive_dtx_r16_e_"); } -uint8_t location_and_bw_broadcast_r17_c::types_opts::to_number() const +uint8_t sl_cfg_common_nr_r16_s::sl_max_num_consecutive_dtx_r16_opts::to_number() const { - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "location_and_bw_broadcast_r17_c::types"); + static const uint8_t numbers[] = {1, 2, 3, 4, 6, 8, 16, 32}; + return map_enum_number(numbers, 8, value, "sl_cfg_common_nr_r16_s::sl_max_num_consecutive_dtx_r16_e_"); } -// MBS-FSAI-InterFreq-r17 ::= SEQUENCE -SRSASN_CODE mbs_fsai_inter_freq_r17_s::pack(bit_ref& bref) const +// SL-DiscConfigCommon-r17 ::= SEQUENCE +SRSASN_CODE sl_disc_cfg_common_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, dl_carrier_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(pack_dyn_seq_of(bref, mbs_fsai_list_r17, 1, 64)); + HANDLE_CODE(sl_relay_ue_cfg_common_r17.pack(bref)); + HANDLE_CODE(sl_remote_ue_cfg_common_r17.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE mbs_fsai_inter_freq_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_disc_cfg_common_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(dl_carrier_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(unpack_dyn_seq_of(mbs_fsai_list_r17, bref, 1, 64)); + HANDLE_CODE(sl_relay_ue_cfg_common_r17.unpack(bref)); + HANDLE_CODE(sl_remote_ue_cfg_common_r17.unpack(bref)); return SRSASN_SUCCESS; } -void mbs_fsai_inter_freq_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("dl-CarrierFreq-r17", dl_carrier_freq_r17); - j.start_array("mbs-FSAI-List-r17"); - for (const auto& e1 : mbs_fsai_list_r17) { - j.write_str(e1.to_string()); - } - j.end_array(); - j.end_obj(); -} - -// MCCH-RepetitionPeriodAndOffset-r17 ::= CHOICE -void mcch_repeat_period_and_offset_r17_c::destroy_() {} -void mcch_repeat_period_and_offset_r17_c::set(types::options e) -{ - destroy_(); - type_ = e; -} -mcch_repeat_period_and_offset_r17_c::mcch_repeat_period_and_offset_r17_c( - const mcch_repeat_period_and_offset_r17_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::rf1_r17: - c.init(other.c.get()); - break; - case types::rf2_r17: - c.init(other.c.get()); - break; - case types::rf4_r17: - c.init(other.c.get()); - break; - case types::rf8_r17: - c.init(other.c.get()); - break; - case types::rf16_r17: - c.init(other.c.get()); - break; - case types::rf32_r17: - c.init(other.c.get()); - break; - case types::rf64_r17: - c.init(other.c.get()); - break; - case types::rf128_r17: - c.init(other.c.get()); - break; - case types::rf256_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "mcch_repeat_period_and_offset_r17_c"); - } -} -mcch_repeat_period_and_offset_r17_c& -mcch_repeat_period_and_offset_r17_c::operator=(const mcch_repeat_period_and_offset_r17_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::rf1_r17: - c.set(other.c.get()); - break; - case types::rf2_r17: - c.set(other.c.get()); - break; - case types::rf4_r17: - c.set(other.c.get()); - break; - case types::rf8_r17: - c.set(other.c.get()); - break; - case types::rf16_r17: - c.set(other.c.get()); - break; - case types::rf32_r17: - c.set(other.c.get()); - break; - case types::rf64_r17: - c.set(other.c.get()); - break; - case types::rf128_r17: - c.set(other.c.get()); - break; - case types::rf256_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "mcch_repeat_period_and_offset_r17_c"); - } - - return *this; -} -uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf1_r17() -{ - set(types::rf1_r17); - return c.get(); -} -uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf2_r17() -{ - set(types::rf2_r17); - return c.get(); -} -uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf4_r17() -{ - set(types::rf4_r17); - return c.get(); -} -uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf8_r17() -{ - set(types::rf8_r17); - return c.get(); -} -uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf16_r17() -{ - set(types::rf16_r17); - return c.get(); -} -uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf32_r17() -{ - set(types::rf32_r17); - return c.get(); -} -uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf64_r17() -{ - set(types::rf64_r17); - return c.get(); -} -uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf128_r17() -{ - set(types::rf128_r17); - return c.get(); -} -uint16_t& mcch_repeat_period_and_offset_r17_c::set_rf256_r17() -{ - set(types::rf256_r17); - return c.get(); -} -void mcch_repeat_period_and_offset_r17_c::to_json(json_writer& j) const +void sl_disc_cfg_common_r17_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::rf1_r17: - j.write_int("rf1-r17", c.get()); - break; - case types::rf2_r17: - j.write_int("rf2-r17", c.get()); - break; - case types::rf4_r17: - j.write_int("rf4-r17", c.get()); - break; - case types::rf8_r17: - j.write_int("rf8-r17", c.get()); - break; - case types::rf16_r17: - j.write_int("rf16-r17", c.get()); - break; - case types::rf32_r17: - j.write_int("rf32-r17", c.get()); - break; - case types::rf64_r17: - j.write_int("rf64-r17", c.get()); - break; - case types::rf128_r17: - j.write_int("rf128-r17", c.get()); - break; - case types::rf256_r17: - j.write_int("rf256-r17", c.get()); - break; - default: - log_invalid_choice_id(type_, "mcch_repeat_period_and_offset_r17_c"); - } + j.write_fieldname("sl-RelayUE-ConfigCommon-r17"); + sl_relay_ue_cfg_common_r17.to_json(j); + j.write_fieldname("sl-RemoteUE-ConfigCommon-r17"); + sl_remote_ue_cfg_common_r17.to_json(j); j.end_obj(); } -SRSASN_CODE mcch_repeat_period_and_offset_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rf1_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)0u)); - break; - case types::rf2_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)1u)); - break; - case types::rf4_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); - break; - case types::rf8_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); - break; - case types::rf16_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); - break; - case types::rf32_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); - break; - case types::rf64_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::rf128_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); - break; - case types::rf256_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)255u)); - break; - default: - log_invalid_choice_id(type_, "mcch_repeat_period_and_offset_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE mcch_repeat_period_and_offset_r17_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rf1_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)0u)); - break; - case types::rf2_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)1u)); - break; - case types::rf4_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); - break; - case types::rf8_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); - break; - case types::rf16_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); - break; - case types::rf32_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); - break; - case types::rf64_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::rf128_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); - break; - case types::rf256_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)255u)); - break; - default: - log_invalid_choice_id(type_, "mcch_repeat_period_and_offset_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* mcch_repeat_period_and_offset_r17_c::types_opts::to_string() const -{ - static const char* names[] = { - "rf1-r17", "rf2-r17", "rf4-r17", "rf8-r17", "rf16-r17", "rf32-r17", "rf64-r17", "rf128-r17", "rf256-r17"}; - return convert_enum_idx(names, 9, value, "mcch_repeat_period_and_offset_r17_c::types"); -} -uint16_t mcch_repeat_period_and_offset_r17_c::types_opts::to_number() const -{ - static const uint16_t numbers[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; - return map_enum_number(numbers, 9, value, "mcch_repeat_period_and_offset_r17_c::types"); -} - -const char* npn_id_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"pni-npn-r16", "snpn-r16"}; - return convert_enum_idx(names, 2, value, "npn_id_r16_c::types"); -} -// NTN-NeighCellConfig-r17 ::= SEQUENCE -SRSASN_CODE ntn_neigh_cell_cfg_r17_s::pack(bit_ref& bref) const +// UE-TimersAndConstantsRemoteUE-r17 ::= SEQUENCE +SRSASN_CODE ue_timers_and_consts_remote_ue_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ntn_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(carrier_freq_r17_present, 1)); - HANDLE_CODE(bref.pack(pci_r17_present, 1)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(t300_remote_ue_r17_present, 1)); + HANDLE_CODE(bref.pack(t301_remote_ue_r17_present, 1)); + HANDLE_CODE(bref.pack(t319_remote_ue_r17_present, 1)); - if (ntn_cfg_r17_present) { - HANDLE_CODE(ntn_cfg_r17.pack(bref)); + if (t300_remote_ue_r17_present) { + HANDLE_CODE(t300_remote_ue_r17.pack(bref)); } - if (carrier_freq_r17_present) { - HANDLE_CODE(pack_integer(bref, carrier_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); + if (t301_remote_ue_r17_present) { + HANDLE_CODE(t301_remote_ue_r17.pack(bref)); } - if (pci_r17_present) { - HANDLE_CODE(pack_integer(bref, pci_r17, (uint16_t)0u, (uint16_t)1007u)); + if (t319_remote_ue_r17_present) { + HANDLE_CODE(t319_remote_ue_r17.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE ntn_neigh_cell_cfg_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_timers_and_consts_remote_ue_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(ntn_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(carrier_freq_r17_present, 1)); - HANDLE_CODE(bref.unpack(pci_r17_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(t300_remote_ue_r17_present, 1)); + HANDLE_CODE(bref.unpack(t301_remote_ue_r17_present, 1)); + HANDLE_CODE(bref.unpack(t319_remote_ue_r17_present, 1)); - if (ntn_cfg_r17_present) { - HANDLE_CODE(ntn_cfg_r17.unpack(bref)); + if (t300_remote_ue_r17_present) { + HANDLE_CODE(t300_remote_ue_r17.unpack(bref)); } - if (carrier_freq_r17_present) { - HANDLE_CODE(unpack_integer(carrier_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); + if (t301_remote_ue_r17_present) { + HANDLE_CODE(t301_remote_ue_r17.unpack(bref)); } - if (pci_r17_present) { - HANDLE_CODE(unpack_integer(pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); + if (t319_remote_ue_r17_present) { + HANDLE_CODE(t319_remote_ue_r17.unpack(bref)); } return SRSASN_SUCCESS; } -void ntn_neigh_cell_cfg_r17_s::to_json(json_writer& j) const +void ue_timers_and_consts_remote_ue_r17_s::to_json(json_writer& j) const { j.start_obj(); - if (ntn_cfg_r17_present) { - j.write_fieldname("ntn-Config-r17"); - ntn_cfg_r17.to_json(j); + if (t300_remote_ue_r17_present) { + j.write_str("t300-RemoteUE-r17", t300_remote_ue_r17.to_string()); } - if (carrier_freq_r17_present) { - j.write_int("carrierFreq-r17", carrier_freq_r17); + if (t301_remote_ue_r17_present) { + j.write_str("t301-RemoteUE-r17", t301_remote_ue_r17.to_string()); } - if (pci_r17_present) { - j.write_int("physCellId-r17", pci_r17); + if (t319_remote_ue_r17_present) { + j.write_str("t319-RemoteUE-r17", t319_remote_ue_r17.to_string()); } j.end_obj(); } -const char* pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::types_opts::to_string() const +const char* ue_timers_and_consts_remote_ue_r17_s::t300_remote_ue_r17_opts::to_string() const { - static const char* names[] = {"sCS15KHZoneT", - "sCS30KHZoneT-SCS15KHZhalfT", - "sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT", - "sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT", - "sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT", - "sCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT", - "sCS120KHZoneEighthT-SCS60KHZoneSixteenthT", - "sCS120KHZoneSixteenthT"}; - return convert_enum_idx(names, 8, value, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::types"); + static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + return convert_enum_idx(names, 8, value, "ue_timers_and_consts_remote_ue_r17_s::t300_remote_ue_r17_e_"); } - -const char* pdcch_cfg_common_s::sdt_search_space_r17_c_::types_opts::to_string() const +uint16_t ue_timers_and_consts_remote_ue_r17_s::t300_remote_ue_r17_opts::to_number() const { - static const char* names[] = {"newSearchSpace", "existingSearchSpace"}; - return convert_enum_idx(names, 2, value, "pdcch_cfg_common_s::sdt_search_space_r17_c_::types"); + static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(numbers, 8, value, "ue_timers_and_consts_remote_ue_r17_s::t300_remote_ue_r17_e_"); } -const char* pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::types_opts::to_string() const +const char* ue_timers_and_consts_remote_ue_r17_s::t301_remote_ue_r17_opts::to_string() const { - static const char* names[] = {"sCS480KHZoneEighthT", "sCS480KHZoneSixteenthT"}; - return convert_enum_idx(names, 2, value, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::types"); + static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + return convert_enum_idx(names, 8, value, "ue_timers_and_consts_remote_ue_r17_s::t301_remote_ue_r17_e_"); } - -const char* -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"sCS15KHZoneT", - "sCS30KHZoneT-SCS15KHZhalfT", - "sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT", - "sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT", - "sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT", - "sCS480KHZoneT-SCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT", - "sCS480KHZhalfT-SCS120KHZoneEighthT-SCS60KHZoneSixteenthT", - "sCS480KHZquarterT-SCS120KHZoneSixteenthT", - "sCS480KHZoneEighthT", - "sCS480KHZoneSixteenthT"}; - return convert_enum_idx( - names, - 10, - value, - "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::types"); +uint16_t ue_timers_and_consts_remote_ue_r17_s::t301_remote_ue_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(numbers, 8, value, "ue_timers_and_consts_remote_ue_r17_s::t301_remote_ue_r17_e_"); } -// PDSCH-ConfigBroadcast-r17 ::= SEQUENCE -SRSASN_CODE pdsch_cfg_broadcast_r17_s::pack(bit_ref& bref) const +const char* ue_timers_and_consts_remote_ue_r17_s::t319_remote_ue_r17_opts::to_string() const { - HANDLE_CODE(bref.pack(pdsch_time_domain_alloc_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(lte_crs_to_match_around_r17_present, 1)); - HANDLE_CODE(bref.pack(mcs_table_r17_present, 1)); - HANDLE_CODE(bref.pack(xoverhead_r17_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, pdsch_cfg_list_r17, 1, 16)); - if (pdsch_time_domain_alloc_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, pdsch_time_domain_alloc_list_r17, 1, 16)); - } - if (rate_match_pattern_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_add_mod_list_r17, 1, 4)); - } - if (lte_crs_to_match_around_r17_present) { - HANDLE_CODE(lte_crs_to_match_around_r17.pack(bref)); - } - if (mcs_table_r17_present) { - HANDLE_CODE(mcs_table_r17.pack(bref)); - } - if (xoverhead_r17_present) { - HANDLE_CODE(xoverhead_r17.pack(bref)); - } - - return SRSASN_SUCCESS; + static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + return convert_enum_idx(names, 8, value, "ue_timers_and_consts_remote_ue_r17_s::t319_remote_ue_r17_e_"); } -SRSASN_CODE pdsch_cfg_broadcast_r17_s::unpack(cbit_ref& bref) +uint16_t ue_timers_and_consts_remote_ue_r17_s::t319_remote_ue_r17_opts::to_number() const { - bool pdsch_time_domain_alloc_list_r17_present; - HANDLE_CODE(bref.unpack(pdsch_time_domain_alloc_list_r17_present, 1)); - bool rate_match_pattern_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(rate_match_pattern_to_add_mod_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(lte_crs_to_match_around_r17_present, 1)); - HANDLE_CODE(bref.unpack(mcs_table_r17_present, 1)); - HANDLE_CODE(bref.unpack(xoverhead_r17_present, 1)); - - HANDLE_CODE(unpack_dyn_seq_of(pdsch_cfg_list_r17, bref, 1, 16)); - if (pdsch_time_domain_alloc_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(pdsch_time_domain_alloc_list_r17, bref, 1, 16)); - } - if (rate_match_pattern_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_to_add_mod_list_r17, bref, 1, 4)); - } - if (lte_crs_to_match_around_r17_present) { - HANDLE_CODE(lte_crs_to_match_around_r17.unpack(bref)); - } - if (mcs_table_r17_present) { - HANDLE_CODE(mcs_table_r17.unpack(bref)); - } - if (xoverhead_r17_present) { - HANDLE_CODE(xoverhead_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; + static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(numbers, 8, value, "ue_timers_and_consts_remote_ue_r17_s::t319_remote_ue_r17_e_"); } -void pdsch_cfg_broadcast_r17_s::to_json(json_writer& j) const + +// SIB12-IEs-r16 ::= SEQUENCE +SRSASN_CODE sib12_ies_r16_s::pack(bit_ref& bref) const { - j.start_obj(); - j.start_array("pdschConfigList-r17"); - for (const auto& e1 : pdsch_cfg_list_r17) { - e1.to_json(j); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + HANDLE_CODE(sl_cfg_common_nr_r16.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } - j.end_array(); - if (pdsch_time_domain_alloc_list_r17.size() > 0) { - j.start_array("pdsch-TimeDomainAllocationList-r17"); - for (const auto& e1 : pdsch_time_domain_alloc_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (rate_match_pattern_to_add_mod_list_r17.size() > 0) { - j.start_array("rateMatchPatternToAddModList-r17"); - for (const auto& e1 : rate_match_pattern_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (lte_crs_to_match_around_r17_present) { - j.write_fieldname("lte-CRS-ToMatchAround-r17"); - lte_crs_to_match_around_r17.to_json(j); - } - if (mcs_table_r17_present) { - j.write_str("mcs-Table-r17", mcs_table_r17.to_string()); - } - if (xoverhead_r17_present) { - j.write_str("xOverhead-r17", xoverhead_r17.to_string()); - } - j.end_obj(); -} - -const char* pdsch_cfg_broadcast_r17_s::mcs_table_r17_opts::to_string() const -{ - static const char* names[] = {"qam256", "qam64LowSE"}; - return convert_enum_idx(names, 2, value, "pdsch_cfg_broadcast_r17_s::mcs_table_r17_e_"); -} -uint16_t pdsch_cfg_broadcast_r17_s::mcs_table_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {256, 64}; - return map_enum_number(numbers, 2, value, "pdsch_cfg_broadcast_r17_s::mcs_table_r17_e_"); -} -const char* pdsch_cfg_broadcast_r17_s::xoverhead_r17_opts::to_string() const -{ - static const char* names[] = {"xOh6", "xOh12", "xOh18"}; - return convert_enum_idx(names, 3, value, "pdsch_cfg_broadcast_r17_s::xoverhead_r17_e_"); -} -uint8_t pdsch_cfg_broadcast_r17_s::xoverhead_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {6, 12, 18}; - return map_enum_number(numbers, 3, value, "pdsch_cfg_broadcast_r17_s::xoverhead_r17_e_"); -} + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= sl_drx_cfg_common_gc_bc_r17.is_present(); + group_flags[0] |= sl_disc_cfg_common_r17.is_present(); + group_flags[0] |= sl_l2_u2_n_relay_r17_present; + group_flags[0] |= sl_non_relay_discovery_r17_present; + group_flags[0] |= sl_l3_u2_n_relay_discovery_r17_present; + group_flags[0] |= sl_timers_and_consts_remote_ue_r17.is_present(); + group_flags.pack(bref); -// RedCap-ConfigCommonSIB-r17 ::= SEQUENCE -SRSASN_CODE red_cap_cfg_common_sib_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(half_duplex_red_cap_allowed_r17_present, 1)); - HANDLE_CODE(bref.pack(cell_barred_red_cap_r17_present, 1)); + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); - if (cell_barred_red_cap_r17_present) { - HANDLE_CODE(cell_barred_red_cap_r17.cell_barred_red_cap1_rx_r17.pack(bref)); - HANDLE_CODE(cell_barred_red_cap_r17.cell_barred_red_cap2_rx_r17.pack(bref)); + HANDLE_CODE(bref.pack(sl_drx_cfg_common_gc_bc_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(sl_disc_cfg_common_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(sl_l2_u2_n_relay_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_non_relay_discovery_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_l3_u2_n_relay_discovery_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_timers_and_consts_remote_ue_r17.is_present(), 1)); + if (sl_drx_cfg_common_gc_bc_r17.is_present()) { + HANDLE_CODE(sl_drx_cfg_common_gc_bc_r17->pack(bref)); + } + if (sl_disc_cfg_common_r17.is_present()) { + HANDLE_CODE(sl_disc_cfg_common_r17->pack(bref)); + } + if (sl_timers_and_consts_remote_ue_r17.is_present()) { + HANDLE_CODE(sl_timers_and_consts_remote_ue_r17->pack(bref)); + } + } } - return SRSASN_SUCCESS; } -SRSASN_CODE red_cap_cfg_common_sib_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE sib12_ies_r16_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(half_duplex_red_cap_allowed_r17_present, 1)); - HANDLE_CODE(bref.unpack(cell_barred_red_cap_r17_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - if (cell_barred_red_cap_r17_present) { - HANDLE_CODE(cell_barred_red_cap_r17.cell_barred_red_cap1_rx_r17.unpack(bref)); - HANDLE_CODE(cell_barred_red_cap_r17.cell_barred_red_cap2_rx_r17.unpack(bref)); + HANDLE_CODE(sl_cfg_common_nr_r16.unpack(bref)); + 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); + + unpack_presence_flag(sl_drx_cfg_common_gc_bc_r17, bref); + unpack_presence_flag(sl_disc_cfg_common_r17, bref); + HANDLE_CODE(bref.unpack(sl_l2_u2_n_relay_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_non_relay_discovery_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_l3_u2_n_relay_discovery_r17_present, 1)); + unpack_presence_flag(sl_timers_and_consts_remote_ue_r17, bref); + if (sl_drx_cfg_common_gc_bc_r17.is_present()) { + HANDLE_CODE(sl_drx_cfg_common_gc_bc_r17->unpack(bref)); + } + if (sl_disc_cfg_common_r17.is_present()) { + HANDLE_CODE(sl_disc_cfg_common_r17->unpack(bref)); + } + if (sl_timers_and_consts_remote_ue_r17.is_present()) { + HANDLE_CODE(sl_timers_and_consts_remote_ue_r17->unpack(bref)); + } + } + } return SRSASN_SUCCESS; } -void red_cap_cfg_common_sib_r17_s::to_json(json_writer& j) const +void sib12_ies_r16_s::to_json(json_writer& j) const { j.start_obj(); - if (half_duplex_red_cap_allowed_r17_present) { - j.write_str("halfDuplexRedCapAllowed-r17", "true"); + j.write_fieldname("sl-ConfigCommonNR-r16"); + sl_cfg_common_nr_r16.to_json(j); + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } - if (cell_barred_red_cap_r17_present) { - j.write_fieldname("cellBarredRedCap-r17"); - j.start_obj(); - j.write_str("cellBarredRedCap1Rx-r17", cell_barred_red_cap_r17.cell_barred_red_cap1_rx_r17.to_string()); - j.write_str("cellBarredRedCap2Rx-r17", cell_barred_red_cap_r17.cell_barred_red_cap2_rx_r17.to_string()); - j.end_obj(); + if (ext) { + if (sl_drx_cfg_common_gc_bc_r17.is_present()) { + j.write_fieldname("sl-DRX-ConfigCommonGC-BC-r17"); + sl_drx_cfg_common_gc_bc_r17->to_json(j); + } + if (sl_disc_cfg_common_r17.is_present()) { + j.write_fieldname("sl-DiscConfigCommon-r17"); + sl_disc_cfg_common_r17->to_json(j); + } + if (sl_l2_u2_n_relay_r17_present) { + j.write_str("sl-L2U2N-Relay-r17", "enabled"); + } + if (sl_non_relay_discovery_r17_present) { + j.write_str("sl-NonRelayDiscovery-r17", "enabled"); + } + if (sl_l3_u2_n_relay_discovery_r17_present) { + j.write_str("sl-L3U2N-RelayDiscovery-r17", "enabled"); + } + if (sl_timers_and_consts_remote_ue_r17.is_present()) { + j.write_fieldname("sl-TimersAndConstantsRemoteUE-r17"); + sl_timers_and_consts_remote_ue_r17->to_json(j); + } } j.end_obj(); } -const char* -red_cap_cfg_common_sib_r17_s::cell_barred_red_cap_r17_s_::cell_barred_red_cap1_rx_r17_opts::to_string() const -{ - static const char* names[] = {"barred", "notBarred"}; - return convert_enum_idx( - names, 2, value, "red_cap_cfg_common_sib_r17_s::cell_barred_red_cap_r17_s_::cell_barred_red_cap1_rx_r17_e_"); -} - -const char* -red_cap_cfg_common_sib_r17_s::cell_barred_red_cap_r17_s_::cell_barred_red_cap2_rx_r17_opts::to_string() const -{ - static const char* names[] = {"barred", "notBarred"}; - return convert_enum_idx( - names, 2, value, "red_cap_cfg_common_sib_r17_s::cell_barred_red_cap_r17_s_::cell_barred_red_cap2_rx_r17_e_"); -} - -// SDT-ConfigCommonSIB-r17 ::= SEQUENCE -SRSASN_CODE sdt_cfg_common_sib_r17_s::pack(bit_ref& bref) const +// TRS-ResourceSet-r17 ::= SEQUENCE +SRSASN_CODE trs_res_set_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(sdt_rsrp_thres_r17_present, 1)); - HANDLE_CODE(bref.pack(sdt_lc_ch_sr_delay_timer_r17_present, 1)); - - if (sdt_rsrp_thres_r17_present) { - HANDLE_CODE(pack_integer(bref, sdt_rsrp_thres_r17, (uint8_t)0u, (uint8_t)127u)); - } - if (sdt_lc_ch_sr_delay_timer_r17_present) { - HANDLE_CODE(sdt_lc_ch_sr_delay_timer_r17.pack(bref)); - } - HANDLE_CODE(sdt_data_volume_thres_r17.pack(bref)); - HANDLE_CODE(t319a_r17.pack(bref)); + HANDLE_CODE(pwr_ctrl_offset_ss_r17.pack(bref)); + HANDLE_CODE(scrambling_id_info_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, first_ofdm_symbol_in_time_domain_r17, (uint8_t)0u, (uint8_t)9u)); + HANDLE_CODE(pack_integer(bref, start_rb_r17, (uint16_t)0u, (uint16_t)274u)); + HANDLE_CODE(pack_integer(bref, nrof_rbs_r17, (uint16_t)24u, (uint16_t)276u)); + HANDLE_CODE(pack_integer(bref, ssb_idx_r17, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(periodicity_and_offset_r17.pack(bref)); + HANDLE_CODE(freq_domain_alloc_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, ind_bit_id_r17, (uint8_t)0u, (uint8_t)5u)); + HANDLE_CODE(nrof_res_r17.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE sdt_cfg_common_sib_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE trs_res_set_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(sdt_rsrp_thres_r17_present, 1)); - HANDLE_CODE(bref.unpack(sdt_lc_ch_sr_delay_timer_r17_present, 1)); - - if (sdt_rsrp_thres_r17_present) { - HANDLE_CODE(unpack_integer(sdt_rsrp_thres_r17, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (sdt_lc_ch_sr_delay_timer_r17_present) { - HANDLE_CODE(sdt_lc_ch_sr_delay_timer_r17.unpack(bref)); - } - HANDLE_CODE(sdt_data_volume_thres_r17.unpack(bref)); - HANDLE_CODE(t319a_r17.unpack(bref)); + HANDLE_CODE(pwr_ctrl_offset_ss_r17.unpack(bref)); + HANDLE_CODE(scrambling_id_info_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(first_ofdm_symbol_in_time_domain_r17, bref, (uint8_t)0u, (uint8_t)9u)); + HANDLE_CODE(unpack_integer(start_rb_r17, bref, (uint16_t)0u, (uint16_t)274u)); + HANDLE_CODE(unpack_integer(nrof_rbs_r17, bref, (uint16_t)24u, (uint16_t)276u)); + HANDLE_CODE(unpack_integer(ssb_idx_r17, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(periodicity_and_offset_r17.unpack(bref)); + HANDLE_CODE(freq_domain_alloc_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(ind_bit_id_r17, bref, (uint8_t)0u, (uint8_t)5u)); + HANDLE_CODE(nrof_res_r17.unpack(bref)); return SRSASN_SUCCESS; } -void sdt_cfg_common_sib_r17_s::to_json(json_writer& j) const +void trs_res_set_r17_s::to_json(json_writer& j) const { j.start_obj(); - if (sdt_rsrp_thres_r17_present) { - j.write_int("sdt-RSRP-Threshold-r17", sdt_rsrp_thres_r17); - } - if (sdt_lc_ch_sr_delay_timer_r17_present) { - j.write_str("sdt-LogicalChannelSR-DelayTimer-r17", sdt_lc_ch_sr_delay_timer_r17.to_string()); - } - j.write_str("sdt-DataVolumeThreshold-r17", sdt_data_volume_thres_r17.to_string()); - j.write_str("t319a-r17", t319a_r17.to_string()); + j.write_str("powerControlOffsetSS-r17", pwr_ctrl_offset_ss_r17.to_string()); + j.write_fieldname("scramblingID-Info-r17"); + scrambling_id_info_r17.to_json(j); + j.write_int("firstOFDMSymbolInTimeDomain-r17", first_ofdm_symbol_in_time_domain_r17); + j.write_int("startingRB-r17", start_rb_r17); + j.write_int("nrofRBs-r17", nrof_rbs_r17); + j.write_int("ssb-Index-r17", ssb_idx_r17); + j.write_fieldname("periodicityAndOffset-r17"); + periodicity_and_offset_r17.to_json(j); + j.write_str("frequencyDomainAllocation-r17", freq_domain_alloc_r17.to_string()); + j.write_int("indBitID-r17", ind_bit_id_r17); + j.write_str("nrofResources-r17", nrof_res_r17.to_string()); j.end_obj(); } -const char* sdt_cfg_common_sib_r17_s::sdt_lc_ch_sr_delay_timer_r17_opts::to_string() const -{ - static const char* names[] = {"sf20", "sf40", "sf64", "sf128", "sf512", "sf1024", "sf2560", "spare1"}; - return convert_enum_idx(names, 8, value, "sdt_cfg_common_sib_r17_s::sdt_lc_ch_sr_delay_timer_r17_e_"); -} -uint16_t sdt_cfg_common_sib_r17_s::sdt_lc_ch_sr_delay_timer_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {20, 40, 64, 128, 512, 1024, 2560}; - return map_enum_number(numbers, 7, value, "sdt_cfg_common_sib_r17_s::sdt_lc_ch_sr_delay_timer_r17_e_"); -} - -const char* sdt_cfg_common_sib_r17_s::sdt_data_volume_thres_r17_opts::to_string() const +const char* trs_res_set_r17_s::pwr_ctrl_offset_ss_r17_opts::to_string() const { - static const char* names[] = {"byte32", - "byte100", - "byte200", - "byte400", - "byte600", - "byte800", - "byte1000", - "byte2000", - "byte4000", - "byte8000", - "byte9000", - "byte10000", - "byte12000", - "byte24000", - "byte48000", - "byte96000"}; - return convert_enum_idx(names, 16, value, "sdt_cfg_common_sib_r17_s::sdt_data_volume_thres_r17_e_"); + static const char* names[] = {"db-3", "db0", "db3", "db6"}; + return convert_enum_idx(names, 4, value, "trs_res_set_r17_s::pwr_ctrl_offset_ss_r17_e_"); } -uint32_t sdt_cfg_common_sib_r17_s::sdt_data_volume_thres_r17_opts::to_number() const +int8_t trs_res_set_r17_s::pwr_ctrl_offset_ss_r17_opts::to_number() const { - static const uint32_t numbers[] = { - 32, 100, 200, 400, 600, 800, 1000, 2000, 4000, 8000, 9000, 10000, 12000, 24000, 48000, 96000}; - return map_enum_number(numbers, 16, value, "sdt_cfg_common_sib_r17_s::sdt_data_volume_thres_r17_e_"); + static const int8_t numbers[] = {-3, 0, 3, 6}; + return map_enum_number(numbers, 4, value, "trs_res_set_r17_s::pwr_ctrl_offset_ss_r17_e_"); } -const char* sdt_cfg_common_sib_r17_s::t319a_r17_opts::to_string() const +void trs_res_set_r17_s::scrambling_id_info_r17_c_::destroy_() { - static const char* names[] = {"ms100", - "ms200", - "ms300", - "ms400", - "ms600", - "ms1000", - "ms2000", - "ms3000", - "ms4000", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "sdt_cfg_common_sib_r17_s::t319a_r17_e_"); + switch (type_) { + case types::scrambling_id_per_res_list_with2_r17: + c.destroy(); + break; + case types::scrambling_id_per_res_list_with4_r17: + c.destroy(); + break; + default: + break; + } } -uint16_t sdt_cfg_common_sib_r17_s::t319a_r17_opts::to_number() const +void trs_res_set_r17_s::scrambling_id_info_r17_c_::set(types::options e) { - static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 2000, 3000, 4000}; - return map_enum_number(numbers, 9, value, "sdt_cfg_common_sib_r17_s::t319a_r17_e_"); + destroy_(); + type_ = e; + switch (type_) { + case types::scrambling_id_for_common_r17: + break; + case types::scrambling_id_per_res_list_with2_r17: + c.init(); + break; + case types::scrambling_id_per_res_list_with4_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "trs_res_set_r17_s::scrambling_id_info_r17_c_"); + } } - -// SI-SchedulingInfo-v1700 ::= SEQUENCE -SRSASN_CODE si_sched_info_v1700_s::pack(bit_ref& bref) const +trs_res_set_r17_s::scrambling_id_info_r17_c_::scrambling_id_info_r17_c_( + const trs_res_set_r17_s::scrambling_id_info_r17_c_& other) { - HANDLE_CODE(bref.pack(dummy_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, sched_info_list2_r17, 1, 32)); - if (dummy_present) { - HANDLE_CODE(dummy.pack(bref)); + type_ = other.type(); + switch (type_) { + case types::scrambling_id_for_common_r17: + c.init(other.c.get()); + break; + case types::scrambling_id_per_res_list_with2_r17: + c.init(other.c.get()); + break; + case types::scrambling_id_per_res_list_with4_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "trs_res_set_r17_s::scrambling_id_info_r17_c_"); } - - return SRSASN_SUCCESS; } -SRSASN_CODE si_sched_info_v1700_s::unpack(cbit_ref& bref) +trs_res_set_r17_s::scrambling_id_info_r17_c_& +trs_res_set_r17_s::scrambling_id_info_r17_c_::operator=(const trs_res_set_r17_s::scrambling_id_info_r17_c_& other) { - HANDLE_CODE(bref.unpack(dummy_present, 1)); - - HANDLE_CODE(unpack_dyn_seq_of(sched_info_list2_r17, bref, 1, 32)); - if (dummy_present) { - HANDLE_CODE(dummy.unpack(bref)); + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::scrambling_id_for_common_r17: + c.set(other.c.get()); + break; + case types::scrambling_id_per_res_list_with2_r17: + c.set(other.c.get()); + break; + case types::scrambling_id_per_res_list_with4_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "trs_res_set_r17_s::scrambling_id_info_r17_c_"); } - return SRSASN_SUCCESS; + return *this; } -void si_sched_info_v1700_s::to_json(json_writer& j) const +uint16_t& trs_res_set_r17_s::scrambling_id_info_r17_c_::set_scrambling_id_for_common_r17() { - j.start_obj(); - j.start_array("schedulingInfoList2-r17"); - for (const auto& e1 : sched_info_list2_r17) { - e1.to_json(j); - } - j.end_array(); - if (dummy_present) { - j.write_fieldname("dummy"); - dummy.to_json(j); - } - j.end_obj(); + set(types::scrambling_id_for_common_r17); + return c.get(); } - -// SIB-TypeInfo ::= SEQUENCE -SRSASN_CODE sib_type_info_s::pack(bit_ref& bref) const +trs_res_set_r17_s::scrambling_id_info_r17_c_::scrambling_id_per_res_list_with2_r17_l_& +trs_res_set_r17_s::scrambling_id_info_r17_c_::set_scrambling_id_per_res_list_with2_r17() { - HANDLE_CODE(bref.pack(value_tag_present, 1)); - HANDLE_CODE(bref.pack(area_scope_present, 1)); - - HANDLE_CODE(type.pack(bref)); - if (value_tag_present) { - HANDLE_CODE(pack_integer(bref, value_tag, (uint8_t)0u, (uint8_t)31u)); - } - - return SRSASN_SUCCESS; + set(types::scrambling_id_per_res_list_with2_r17); + return c.get(); } -SRSASN_CODE sib_type_info_s::unpack(cbit_ref& bref) +trs_res_set_r17_s::scrambling_id_info_r17_c_::scrambling_id_per_res_list_with4_r17_l_& +trs_res_set_r17_s::scrambling_id_info_r17_c_::set_scrambling_id_per_res_list_with4_r17() { - HANDLE_CODE(bref.unpack(value_tag_present, 1)); - HANDLE_CODE(bref.unpack(area_scope_present, 1)); - - HANDLE_CODE(type.unpack(bref)); - if (value_tag_present) { - HANDLE_CODE(unpack_integer(value_tag, bref, (uint8_t)0u, (uint8_t)31u)); - } - - return SRSASN_SUCCESS; + set(types::scrambling_id_per_res_list_with4_r17); + return c.get(); } -void sib_type_info_s::to_json(json_writer& j) const +void trs_res_set_r17_s::scrambling_id_info_r17_c_::to_json(json_writer& j) const { j.start_obj(); - j.write_str("type", type.to_string()); - if (value_tag_present) { - j.write_int("valueTag", value_tag); - } - if (area_scope_present) { - j.write_str("areaScope", "true"); + switch (type_) { + case types::scrambling_id_for_common_r17: + j.write_int("scramblingIDforCommon-r17", c.get()); + break; + case types::scrambling_id_per_res_list_with2_r17: + j.start_array("scramblingIDperResourceListWith2-r17"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scrambling_id_per_res_list_with4_r17: + j.start_array("scramblingIDperResourceListWith4-r17"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "trs_res_set_r17_s::scrambling_id_info_r17_c_"); } j.end_obj(); } - -const char* sib_type_info_s::type_opts::to_string() const -{ - static const char* names[] = {"sibType2", - "sibType3", - "sibType4", - "sibType5", - "sibType6", - "sibType7", - "sibType8", - "sibType9", - "sibType10-v1610", - "sibType11-v1610", - "sibType12-v1610", - "sibType13-v1610", - "sibType14-v1610", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "sib_type_info_s::type_e_"); -} -uint8_t sib_type_info_s::type_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}; - return map_enum_number(numbers, 13, value, "sib_type_info_s::type_e_"); -} - -// SIB1-v1740-IEs ::= SEQUENCE -SRSASN_CODE sib1_v1740_ies_s::pack(bit_ref& bref) const +SRSASN_CODE trs_res_set_r17_s::scrambling_id_info_r17_c_::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(si_sched_info_v1740_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (si_sched_info_v1740_present) { - HANDLE_CODE(si_sched_info_v1740.pack(bref)); + type_.pack(bref); + switch (type_) { + case types::scrambling_id_for_common_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1023u)); + break; + case types::scrambling_id_per_res_list_with2_r17: + HANDLE_CODE(pack_fixed_seq_of(bref, + c.get(), + c.get().size(), + integer_packer(0, 1023))); + break; + case types::scrambling_id_per_res_list_with4_r17: + HANDLE_CODE(pack_fixed_seq_of(bref, + c.get(), + c.get().size(), + integer_packer(0, 1023))); + break; + default: + log_invalid_choice_id(type_, "trs_res_set_r17_s::scrambling_id_info_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } - return SRSASN_SUCCESS; } -SRSASN_CODE sib1_v1740_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE trs_res_set_r17_s::scrambling_id_info_r17_c_::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(si_sched_info_v1740_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (si_sched_info_v1740_present) { - HANDLE_CODE(si_sched_info_v1740.unpack(bref)); + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::scrambling_id_for_common_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1023u)); + break; + case types::scrambling_id_per_res_list_with2_r17: + HANDLE_CODE(unpack_fixed_seq_of(c.get(), + bref, + c.get().size(), + integer_packer(0, 1023))); + break; + case types::scrambling_id_per_res_list_with4_r17: + HANDLE_CODE(unpack_fixed_seq_of(c.get(), + bref, + c.get().size(), + integer_packer(0, 1023))); + break; + default: + log_invalid_choice_id(type_, "trs_res_set_r17_s::scrambling_id_info_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; } - return SRSASN_SUCCESS; } -void sib1_v1740_ies_s::to_json(json_writer& j) const + +const char* trs_res_set_r17_s::scrambling_id_info_r17_c_::types_opts::to_string() const { - j.start_obj(); - if (si_sched_info_v1740_present) { - j.write_fieldname("si-SchedulingInfo-v1740"); - si_sched_info_v1740.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); + static const char* names[] = { + "scramblingIDforCommon-r17", "scramblingIDperResourceListWith2-r17", "scramblingIDperResourceListWith4-r17"}; + return convert_enum_idx(names, 3, value, "trs_res_set_r17_s::scrambling_id_info_r17_c_::types"); +} +uint8_t trs_res_set_r17_s::scrambling_id_info_r17_c_::types_opts::to_number() const +{ + switch (value) { + case scrambling_id_per_res_list_with2_r17: + return 2; + case scrambling_id_per_res_list_with4_r17: + return 4; + default: + invalid_enum_number(value, "trs_res_set_r17_s::scrambling_id_info_r17_c_::types"); } - j.end_obj(); + return 0; } -// UAC-BarringPerCat ::= SEQUENCE -SRSASN_CODE uac_barr_per_cat_s::pack(bit_ref& bref) const +void trs_res_set_r17_s::periodicity_and_offset_r17_c_::destroy_() {} +void trs_res_set_r17_s::periodicity_and_offset_r17_c_::set(types::options e) { - HANDLE_CODE(pack_integer(bref, access_category, (uint8_t)1u, (uint8_t)63u)); - HANDLE_CODE(pack_integer(bref, uac_barr_info_set_idx, (uint8_t)1u, (uint8_t)8u)); - - return SRSASN_SUCCESS; + destroy_(); + type_ = e; } -SRSASN_CODE uac_barr_per_cat_s::unpack(cbit_ref& bref) +trs_res_set_r17_s::periodicity_and_offset_r17_c_::periodicity_and_offset_r17_c_( + const trs_res_set_r17_s::periodicity_and_offset_r17_c_& other) { - HANDLE_CODE(unpack_integer(access_category, bref, (uint8_t)1u, (uint8_t)63u)); - HANDLE_CODE(unpack_integer(uac_barr_info_set_idx, bref, (uint8_t)1u, (uint8_t)8u)); - - return SRSASN_SUCCESS; + type_ = other.type(); + switch (type_) { + case types::slots10: + 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::nulltype: + break; + default: + log_invalid_choice_id(type_, "trs_res_set_r17_s::periodicity_and_offset_r17_c_"); + } } -void uac_barr_per_cat_s::to_json(json_writer& j) const +trs_res_set_r17_s::periodicity_and_offset_r17_c_& trs_res_set_r17_s::periodicity_and_offset_r17_c_::operator=( + const trs_res_set_r17_s::periodicity_and_offset_r17_c_& other) { - j.start_obj(); - j.write_int("accessCategory", access_category); - j.write_int("uac-barringInfoSetIndex", uac_barr_info_set_idx); - j.end_obj(); -} + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::slots10: + 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::nulltype: + break; + default: + log_invalid_choice_id(type_, "trs_res_set_r17_s::periodicity_and_offset_r17_c_"); + } -// ApplicableDisasterInfo-r17 ::= CHOICE -void applicable_disaster_info_r17_c::set(types::options e) -{ - type_ = e; + return *this; } -void applicable_disaster_info_r17_c::set_no_disaster_roaming_r17() +uint8_t& trs_res_set_r17_s::periodicity_and_offset_r17_c_::set_slots10() { - set(types::no_disaster_roaming_r17); + set(types::slots10); + return c.get(); } -void applicable_disaster_info_r17_c::set_disaster_related_ind_r17() +uint8_t& trs_res_set_r17_s::periodicity_and_offset_r17_c_::set_slots20() { - set(types::disaster_related_ind_r17); + set(types::slots20); + return c.get(); } -void applicable_disaster_info_r17_c::set_common_plmns_r17() +uint8_t& trs_res_set_r17_s::periodicity_and_offset_r17_c_::set_slots40() { - set(types::common_plmns_r17); + set(types::slots40); + return c.get(); } -applicable_disaster_info_r17_c::ded_plmns_r17_l_& applicable_disaster_info_r17_c::set_ded_plmns_r17() +uint8_t& trs_res_set_r17_s::periodicity_and_offset_r17_c_::set_slots80() { - set(types::ded_plmns_r17); - return c; + set(types::slots80); + return c.get(); } -void applicable_disaster_info_r17_c::to_json(json_writer& j) const +void trs_res_set_r17_s::periodicity_and_offset_r17_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::no_disaster_roaming_r17: + case types::slots10: + j.write_int("slots10", c.get()); break; - case types::disaster_related_ind_r17: + case types::slots20: + j.write_int("slots20", c.get()); break; - case types::common_plmns_r17: + case types::slots40: + j.write_int("slots40", c.get()); break; - case types::ded_plmns_r17: - j.start_array("dedicatedPLMNs-r17"); - for (const auto& e1 : c) { - e1.to_json(j); - } - j.end_array(); + case types::slots80: + j.write_int("slots80", c.get()); break; default: - log_invalid_choice_id(type_, "applicable_disaster_info_r17_c"); + log_invalid_choice_id(type_, "trs_res_set_r17_s::periodicity_and_offset_r17_c_"); } j.end_obj(); } -SRSASN_CODE applicable_disaster_info_r17_c::pack(bit_ref& bref) const +SRSASN_CODE trs_res_set_r17_s::periodicity_and_offset_r17_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::no_disaster_roaming_r17: + case types::slots10: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); break; - case types::disaster_related_ind_r17: + case types::slots20: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); break; - case types::common_plmns_r17: + case types::slots40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); break; - case types::ded_plmns_r17: - HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 12)); + case types::slots80: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); break; default: - log_invalid_choice_id(type_, "applicable_disaster_info_r17_c"); + log_invalid_choice_id(type_, "trs_res_set_r17_s::periodicity_and_offset_r17_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE applicable_disaster_info_r17_c::unpack(cbit_ref& bref) +SRSASN_CODE trs_res_set_r17_s::periodicity_and_offset_r17_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::no_disaster_roaming_r17: + case types::slots10: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); break; - case types::disaster_related_ind_r17: + case types::slots20: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); break; - case types::common_plmns_r17: + case types::slots40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); break; - case types::ded_plmns_r17: - HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 12)); + case types::slots80: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); break; default: - log_invalid_choice_id(type_, "applicable_disaster_info_r17_c"); + log_invalid_choice_id(type_, "trs_res_set_r17_s::periodicity_and_offset_r17_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -const char* applicable_disaster_info_r17_c::types_opts::to_string() const +const char* trs_res_set_r17_s::periodicity_and_offset_r17_c_::types_opts::to_string() const { - static const char* names[] = { - "noDisasterRoaming-r17", "disasterRelatedIndication-r17", "commonPLMNs-r17", "dedicatedPLMNs-r17"}; - return convert_enum_idx(names, 4, value, "applicable_disaster_info_r17_c::types"); + static const char* names[] = {"slots10", "slots20", "slots40", "slots80"}; + return convert_enum_idx(names, 4, value, "trs_res_set_r17_s::periodicity_and_offset_r17_c_::types"); } - -// CFR-ConfigMCCH-MTCH-r17 ::= SEQUENCE -SRSASN_CODE cfr_cfg_mcch_mtch_r17_s::pack(bit_ref& bref) const +uint8_t trs_res_set_r17_s::periodicity_and_offset_r17_c_::types_opts::to_number() const { - HANDLE_CODE(bref.pack(location_and_bw_broadcast_r17_present, 1)); - HANDLE_CODE(bref.pack(pdsch_cfg_mcch_r17_present, 1)); - HANDLE_CODE(bref.pack(common_coreset_ext_r17_present, 1)); - - if (location_and_bw_broadcast_r17_present) { - HANDLE_CODE(location_and_bw_broadcast_r17.pack(bref)); - } - if (pdsch_cfg_mcch_r17_present) { - HANDLE_CODE(pdsch_cfg_mcch_r17.pack(bref)); - } - if (common_coreset_ext_r17_present) { - HANDLE_CODE(common_coreset_ext_r17.pack(bref)); - } - - return SRSASN_SUCCESS; + static const uint8_t numbers[] = {10, 20, 40, 80}; + return map_enum_number(numbers, 4, value, "trs_res_set_r17_s::periodicity_and_offset_r17_c_::types"); } -SRSASN_CODE cfr_cfg_mcch_mtch_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(location_and_bw_broadcast_r17_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_cfg_mcch_r17_present, 1)); - HANDLE_CODE(bref.unpack(common_coreset_ext_r17_present, 1)); - - if (location_and_bw_broadcast_r17_present) { - HANDLE_CODE(location_and_bw_broadcast_r17.unpack(bref)); - } - if (pdsch_cfg_mcch_r17_present) { - HANDLE_CODE(pdsch_cfg_mcch_r17.unpack(bref)); - } - if (common_coreset_ext_r17_present) { - HANDLE_CODE(common_coreset_ext_r17.unpack(bref)); - } - return SRSASN_SUCCESS; +const char* trs_res_set_r17_s::nrof_res_r17_opts::to_string() const +{ + static const char* names[] = {"n2", "n4"}; + return convert_enum_idx(names, 2, value, "trs_res_set_r17_s::nrof_res_r17_e_"); } -void cfr_cfg_mcch_mtch_r17_s::to_json(json_writer& j) const +uint8_t trs_res_set_r17_s::nrof_res_r17_opts::to_number() const { - j.start_obj(); - if (location_and_bw_broadcast_r17_present) { - j.write_fieldname("locationAndBandwidthBroadcast-r17"); - location_and_bw_broadcast_r17.to_json(j); - } - if (pdsch_cfg_mcch_r17_present) { - j.write_fieldname("pdsch-ConfigMCCH-r17"); - pdsch_cfg_mcch_r17.to_json(j); - } - if (common_coreset_ext_r17_present) { - j.write_fieldname("commonControlResourceSetExt-r17"); - common_coreset_ext_r17.to_json(j); - } - j.end_obj(); + static const uint8_t numbers[] = {2, 4}; + return map_enum_number(numbers, 2, value, "trs_res_set_r17_s::nrof_res_r17_e_"); } -// GIN-Element-r17 ::= SEQUENCE -SRSASN_CODE gin_elem_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(plmn_id_r17.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, nid_list_r17, 1, 24)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE gin_elem_r17_s::unpack(cbit_ref& bref) +// SIB17-IEs-r17 ::= SEQUENCE +SRSASN_CODE sib17_ies_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(plmn_id_r17.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(nid_list_r17, bref, 1, 24)); + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(validity_dur_r17_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - return SRSASN_SUCCESS; -} -void gin_elem_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("plmn-Identity-r17"); - plmn_id_r17.to_json(j); - j.start_array("nid-List-r17"); - for (const auto& e1 : nid_list_r17) { - j.write_str(e1.to_string()); + HANDLE_CODE(pack_dyn_seq_of(bref, trs_res_set_cfg_r17, 1, 64)); + if (validity_dur_r17_present) { + HANDLE_CODE(validity_dur_r17.pack(bref)); } - j.end_array(); - j.end_obj(); -} - -// GINs-PerSNPN-r17 ::= SEQUENCE -SRSASN_CODE gi_ns_per_sn_pn_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(supported_gi_ns_r17_present, 1)); - - if (supported_gi_ns_r17_present) { - HANDLE_CODE(supported_gi_ns_r17.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE gi_ns_per_sn_pn_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE sib17_ies_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(supported_gi_ns_r17_present, 1)); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(validity_dur_r17_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - if (supported_gi_ns_r17_present) { - HANDLE_CODE(supported_gi_ns_r17.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(trs_res_set_cfg_r17, bref, 1, 64)); + if (validity_dur_r17_present) { + HANDLE_CODE(validity_dur_r17.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void gi_ns_per_sn_pn_r17_s::to_json(json_writer& j) const +void sib17_ies_r17_s::to_json(json_writer& j) const { j.start_obj(); - if (supported_gi_ns_r17_present) { - j.write_str("supportedGINs-r17", supported_gi_ns_r17.to_string()); + j.start_array("trs-ResourceSetConfig-r17"); + for (const auto& e1 : trs_res_set_cfg_r17) { + e1.to_json(j); + } + j.end_array(); + if (validity_dur_r17_present) { + j.write_str("validityDuration-r17", validity_dur_r17.to_string()); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); } j.end_obj(); } -// IntraFreqCAG-CellListPerPLMN-r16 ::= SEQUENCE -SRSASN_CODE intra_freq_cag_cell_list_per_plmn_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, plmn_id_idx_r16, (uint8_t)1u, (uint8_t)12u)); - HANDLE_CODE(pack_dyn_seq_of(bref, cag_cell_list_r16, 1, 16)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE intra_freq_cag_cell_list_per_plmn_r16_s::unpack(cbit_ref& bref) +const char* sib17_ies_r17_s::validity_dur_r17_opts::to_string() const { - HANDLE_CODE(unpack_integer(plmn_id_idx_r16, bref, (uint8_t)1u, (uint8_t)12u)); - HANDLE_CODE(unpack_dyn_seq_of(cag_cell_list_r16, bref, 1, 16)); - - return SRSASN_SUCCESS; + static const char* names[] = {"t1", + "t2", + "t4", + "t8", + "t16", + "t32", + "t64", + "t128", + "t256", + "t512", + "infinity", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "sib17_ies_r17_s::validity_dur_r17_e_"); } -void intra_freq_cag_cell_list_per_plmn_r16_s::to_json(json_writer& j) const +int16_t sib17_ies_r17_s::validity_dur_r17_opts::to_number() const { - j.start_obj(); - j.write_int("plmn-IdentityIndex-r16", plmn_id_idx_r16); - j.start_array("cag-CellList-r16"); - for (const auto& e1 : cag_cell_list_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); + static const int16_t numbers[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, -1}; + return map_enum_number(numbers, 11, value, "sib17_ies_r17_s::validity_dur_r17_e_"); } -// MCCH-Config-r17 ::= SEQUENCE -SRSASN_CODE mcch_cfg_r17_s::pack(bit_ref& bref) const +// SL-ServingCellInfo-r17 ::= SEQUENCE +SRSASN_CODE sl_serving_cell_info_r17_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(mcch_win_dur_r17_present, 1)); - - HANDLE_CODE(mcch_repeat_period_and_offset_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, mcch_win_start_slot_r17, (uint8_t)0u, (uint8_t)79u)); - if (mcch_win_dur_r17_present) { - HANDLE_CODE(mcch_win_dur_r17.pack(bref)); - } - HANDLE_CODE(mcch_mod_period_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, sl_pci_r17, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(pack_integer(bref, sl_carrier_freq_nr_r17, (uint32_t)0u, (uint32_t)3279165u)); return SRSASN_SUCCESS; } -SRSASN_CODE mcch_cfg_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE sl_serving_cell_info_r17_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(mcch_win_dur_r17_present, 1)); - - HANDLE_CODE(mcch_repeat_period_and_offset_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(mcch_win_start_slot_r17, bref, (uint8_t)0u, (uint8_t)79u)); - if (mcch_win_dur_r17_present) { - HANDLE_CODE(mcch_win_dur_r17.unpack(bref)); - } - HANDLE_CODE(mcch_mod_period_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(sl_pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(unpack_integer(sl_carrier_freq_nr_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); return SRSASN_SUCCESS; } -void mcch_cfg_r17_s::to_json(json_writer& j) const +void sl_serving_cell_info_r17_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("mcch-RepetitionPeriodAndOffset-r17"); - mcch_repeat_period_and_offset_r17.to_json(j); - j.write_int("mcch-WindowStartSlot-r17", mcch_win_start_slot_r17); - if (mcch_win_dur_r17_present) { - j.write_str("mcch-WindowDuration-r17", mcch_win_dur_r17.to_string()); - } - j.write_str("mcch-ModificationPeriod-r17", mcch_mod_period_r17.to_string()); + j.write_int("sl-PhysCellId-r17", sl_pci_r17); + j.write_int("sl-CarrierFreqNR-r17", sl_carrier_freq_nr_r17); j.end_obj(); } -const char* mcch_cfg_r17_s::mcch_win_dur_r17_opts::to_string() const -{ - static const char* names[] = {"sl2", "sl4", "sl8", "sl10", "sl20", "sl40", "sl80", "sl160"}; - return convert_enum_idx(names, 8, value, "mcch_cfg_r17_s::mcch_win_dur_r17_e_"); -} -uint8_t mcch_cfg_r17_s::mcch_win_dur_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 8, 10, 20, 40, 80, 160}; - return map_enum_number(numbers, 8, value, "mcch_cfg_r17_s::mcch_win_dur_r17_e_"); -} - -const char* mcch_cfg_r17_s::mcch_mod_period_r17_opts::to_string() const -{ - static const char* names[] = {"rf2", - "rf4", - "rf8", - "rf16", - "rf32", - "rf64", - "rf128", - "rf256", - "rf512", - "rf1024", - "r2048", - "rf4096", - "rf8192", - "rf16384", - "rf32768", - "rf65536"}; - return convert_enum_idx(names, 16, value, "mcch_cfg_r17_s::mcch_mod_period_r17_e_"); -} -uint32_t mcch_cfg_r17_s::mcch_mod_period_r17_opts::to_number() const -{ - static const uint32_t numbers[] = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536}; - return map_enum_number(numbers, 16, value, "mcch_cfg_r17_s::mcch_mod_period_r17_e_"); -} - -// MeasIdleConfigSIB-r16 ::= SEQUENCE -SRSASN_CODE meas_idle_cfg_sib_r16_s::pack(bit_ref& bref) const +// SRS-PosConfig-r17 ::= SEQUENCE +SRSASN_CODE srs_pos_cfg_r17_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_idle_carrier_list_nr_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_idle_carrier_list_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(srs_pos_res_set_to_release_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(srs_pos_res_set_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(srs_pos_res_to_release_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(srs_pos_res_to_add_mod_list_r17.size() > 0, 1)); - if (meas_idle_carrier_list_nr_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_carrier_list_nr_r16, 1, 8)); + if (srs_pos_res_set_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_pos_res_set_to_release_list_r17, 1, 16, integer_packer(0, 15))); + } + if (srs_pos_res_set_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_pos_res_set_to_add_mod_list_r17, 1, 16)); + } + if (srs_pos_res_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_pos_res_to_release_list_r17, 1, 64, integer_packer(0, 63))); } - if (meas_idle_carrier_list_eutra_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_carrier_list_eutra_r16, 1, 8)); + if (srs_pos_res_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, srs_pos_res_to_add_mod_list_r17, 1, 64)); } return SRSASN_SUCCESS; } -SRSASN_CODE meas_idle_cfg_sib_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE srs_pos_cfg_r17_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - bool meas_idle_carrier_list_nr_r16_present; - HANDLE_CODE(bref.unpack(meas_idle_carrier_list_nr_r16_present, 1)); - bool meas_idle_carrier_list_eutra_r16_present; - HANDLE_CODE(bref.unpack(meas_idle_carrier_list_eutra_r16_present, 1)); + bool srs_pos_res_set_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(srs_pos_res_set_to_release_list_r17_present, 1)); + bool srs_pos_res_set_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(srs_pos_res_set_to_add_mod_list_r17_present, 1)); + bool srs_pos_res_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(srs_pos_res_to_release_list_r17_present, 1)); + bool srs_pos_res_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(srs_pos_res_to_add_mod_list_r17_present, 1)); - if (meas_idle_carrier_list_nr_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_idle_carrier_list_nr_r16, bref, 1, 8)); + if (srs_pos_res_set_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_pos_res_set_to_release_list_r17, bref, 1, 16, integer_packer(0, 15))); + } + if (srs_pos_res_set_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_pos_res_set_to_add_mod_list_r17, bref, 1, 16)); + } + if (srs_pos_res_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_pos_res_to_release_list_r17, bref, 1, 64, integer_packer(0, 63))); } - if (meas_idle_carrier_list_eutra_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_idle_carrier_list_eutra_r16, bref, 1, 8)); + if (srs_pos_res_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(srs_pos_res_to_add_mod_list_r17, bref, 1, 64)); } return SRSASN_SUCCESS; } -void meas_idle_cfg_sib_r16_s::to_json(json_writer& j) const +void srs_pos_cfg_r17_s::to_json(json_writer& j) const { j.start_obj(); - if (meas_idle_carrier_list_nr_r16.size() > 0) { - j.start_array("measIdleCarrierListNR-r16"); - for (const auto& e1 : meas_idle_carrier_list_nr_r16) { + if (srs_pos_res_set_to_release_list_r17.size() > 0) { + j.start_array("srs-PosResourceSetToReleaseList-r17"); + for (const auto& e1 : srs_pos_res_set_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (srs_pos_res_set_to_add_mod_list_r17.size() > 0) { + j.start_array("srs-PosResourceSetToAddModList-r17"); + for (const auto& e1 : srs_pos_res_set_to_add_mod_list_r17) { e1.to_json(j); } j.end_array(); } - if (meas_idle_carrier_list_eutra_r16.size() > 0) { - j.start_array("measIdleCarrierListEUTRA-r16"); - for (const auto& e1 : meas_idle_carrier_list_eutra_r16) { + if (srs_pos_res_to_release_list_r17.size() > 0) { + j.start_array("srs-PosResourceToReleaseList-r17"); + for (const auto& e1 : srs_pos_res_to_release_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (srs_pos_res_to_add_mod_list_r17.size() > 0) { + j.start_array("srs-PosResourceToAddModList-r17"); + for (const auto& e1 : srs_pos_res_to_add_mod_list_r17) { e1.to_json(j); } j.end_array(); @@ -3753,18298 +2802,1377 @@ void meas_idle_cfg_sib_r16_s::to_json(json_writer& j) const j.end_obj(); } -// MobilityStateParameters ::= SEQUENCE -SRSASN_CODE mob_state_params_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(t_eval.pack(bref)); - HANDLE_CODE(t_hyst_normal.pack(bref)); - HANDLE_CODE(pack_integer(bref, n_cell_change_medium, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(pack_integer(bref, n_cell_change_high, (uint8_t)1u, (uint8_t)16u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mob_state_params_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(t_eval.unpack(bref)); - HANDLE_CODE(t_hyst_normal.unpack(bref)); - HANDLE_CODE(unpack_integer(n_cell_change_medium, bref, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(unpack_integer(n_cell_change_high, bref, (uint8_t)1u, (uint8_t)16u)); - - return SRSASN_SUCCESS; -} -void mob_state_params_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("t-Evaluation", t_eval.to_string()); - j.write_str("t-HystNormal", t_hyst_normal.to_string()); - j.write_int("n-CellChangeMedium", n_cell_change_medium); - j.write_int("n-CellChangeHigh", n_cell_change_high); - j.end_obj(); -} - -const char* mob_state_params_s::t_eval_opts::to_string() const -{ - static const char* names[] = {"s30", "s60", "s120", "s180", "s240", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "mob_state_params_s::t_eval_e_"); -} -uint8_t mob_state_params_s::t_eval_opts::to_number() const -{ - static const uint8_t numbers[] = {30, 60, 120, 180, 240}; - return map_enum_number(numbers, 5, value, "mob_state_params_s::t_eval_e_"); -} - -const char* mob_state_params_s::t_hyst_normal_opts::to_string() const -{ - static const char* names[] = {"s30", "s60", "s120", "s180", "s240", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "mob_state_params_s::t_hyst_normal_e_"); -} -uint8_t mob_state_params_s::t_hyst_normal_opts::to_number() const -{ - static const uint8_t numbers[] = {30, 60, 120, 180, 240}; - return map_enum_number(numbers, 5, value, "mob_state_params_s::t_hyst_normal_e_"); -} - -const char* pcch_cfg_s::nand_paging_frame_offset_c_::types_opts::to_string() const -{ - static const char* names[] = {"oneT", "halfT", "quarterT", "oneEighthT", "oneSixteenthT"}; - return convert_enum_idx(names, 5, value, "pcch_cfg_s::nand_paging_frame_offset_c_::types"); -} -float pcch_cfg_s::nand_paging_frame_offset_c_::types_opts::to_number() const -{ - static const float numbers[] = {1.0, 0.5, 0.25, 0.125, 0.0625}; - return map_enum_number(numbers, 5, value, "pcch_cfg_s::nand_paging_frame_offset_c_::types"); -} -const char* pcch_cfg_s::nand_paging_frame_offset_c_::types_opts::to_number_string() const -{ - static const char* number_strs[] = {"1", "0.5", "0.25", "1/8", "1/16"}; - return convert_enum_idx(number_strs, 5, value, "pcch_cfg_s::nand_paging_frame_offset_c_::types"); -} - -const char* pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::types_opts::to_string() const +// RSRP-ChangeThreshold-r17 ::= ENUMERATED +const char* rsrp_change_thres_r17_opts::to_string() const { - static const char* names[] = {"sCS15KHZoneT", - "sCS30KHZoneT-SCS15KHZhalfT", - "sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT", - "sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT", - "sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT", - "sCS480KHZoneT-SCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT", - "sCS480KHZhalfT-SCS120KHZoneEighthT-SCS60KHZoneSixteenthT", - "sCS480KHZquarterT-SCS120KHZoneSixteenthT"}; - return convert_enum_idx(names, 8, value, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::types"); + static const char* names[] = {"dB4", + "dB6", + "dB8", + "dB10", + "dB14", + "dB18", + "dB22", + "dB26", + "dB30", + "dB34", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "rsrp_change_thres_r17_e"); } - -const char* pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::types_opts::to_string() const +uint8_t rsrp_change_thres_r17_opts::to_number() const { - static const char* names[] = {"sCS480KHZoneEighthT", "sCS480KHZoneSixteenthT"}; - return convert_enum_idx(names, 2, value, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::types"); + static const uint8_t numbers[] = {4, 6, 8, 10, 14, 18, 22, 26, 30, 34}; + return map_enum_number(numbers, 10, value, "rsrp_change_thres_r17_e"); } -// PosSchedulingInfo-r16 ::= SEQUENCE -SRSASN_CODE pos_sched_info_r16_s::pack(bit_ref& bref) const +// SRS-PosRRC-InactiveConfig-r17 ::= SEQUENCE +SRSASN_CODE srs_pos_rrc_inactive_cfg_r17_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(offset_to_si_used_r16_present, 1)); + HANDLE_CODE(bref.pack(srs_pos_cfg_n_ul_r17_present, 1)); + HANDLE_CODE(bref.pack(srs_pos_cfg_sul_r17_present, 1)); + HANDLE_CODE(bref.pack(bwp_n_ul_r17_present, 1)); + HANDLE_CODE(bref.pack(bwp_sul_r17_present, 1)); + HANDLE_CODE(bref.pack(inactive_pos_srs_time_align_timer_r17_present, 1)); + HANDLE_CODE(bref.pack(inactive_pos_srs_rsrp_change_thres_r17_present, 1)); - HANDLE_CODE(pos_si_periodicity_r16.pack(bref)); - HANDLE_CODE(pos_si_broadcast_status_r16.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, pos_sib_map_info_r16, 1, 32)); + if (srs_pos_cfg_n_ul_r17_present) { + HANDLE_CODE(srs_pos_cfg_n_ul_r17.pack(bref)); + } + if (srs_pos_cfg_sul_r17_present) { + HANDLE_CODE(srs_pos_cfg_sul_r17.pack(bref)); + } + if (bwp_n_ul_r17_present) { + HANDLE_CODE(bwp_n_ul_r17.pack(bref)); + } + if (bwp_sul_r17_present) { + HANDLE_CODE(bwp_sul_r17.pack(bref)); + } + if (inactive_pos_srs_time_align_timer_r17_present) { + HANDLE_CODE(inactive_pos_srs_time_align_timer_r17.pack(bref)); + } + if (inactive_pos_srs_rsrp_change_thres_r17_present) { + HANDLE_CODE(inactive_pos_srs_rsrp_change_thres_r17.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE pos_sched_info_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE srs_pos_rrc_inactive_cfg_r17_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(offset_to_si_used_r16_present, 1)); - - HANDLE_CODE(pos_si_periodicity_r16.unpack(bref)); - HANDLE_CODE(pos_si_broadcast_status_r16.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(pos_sib_map_info_r16, bref, 1, 32)); + HANDLE_CODE(bref.unpack(srs_pos_cfg_n_ul_r17_present, 1)); + HANDLE_CODE(bref.unpack(srs_pos_cfg_sul_r17_present, 1)); + HANDLE_CODE(bref.unpack(bwp_n_ul_r17_present, 1)); + HANDLE_CODE(bref.unpack(bwp_sul_r17_present, 1)); + HANDLE_CODE(bref.unpack(inactive_pos_srs_time_align_timer_r17_present, 1)); + HANDLE_CODE(bref.unpack(inactive_pos_srs_rsrp_change_thres_r17_present, 1)); - return SRSASN_SUCCESS; -} -void pos_sched_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (offset_to_si_used_r16_present) { - j.write_str("offsetToSI-Used-r16", "true"); - } - j.write_str("posSI-Periodicity-r16", pos_si_periodicity_r16.to_string()); - j.write_str("posSI-BroadcastStatus-r16", pos_si_broadcast_status_r16.to_string()); - j.start_array("posSIB-MappingInfo-r16"); - for (const auto& e1 : pos_sib_map_info_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -const char* pos_sched_info_r16_s::pos_si_periodicity_r16_opts::to_string() const -{ - static const char* names[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; - return convert_enum_idx(names, 7, value, "pos_sched_info_r16_s::pos_si_periodicity_r16_e_"); -} -uint16_t pos_sched_info_r16_s::pos_si_periodicity_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {8, 16, 32, 64, 128, 256, 512}; - return map_enum_number(numbers, 7, value, "pos_sched_info_r16_s::pos_si_periodicity_r16_e_"); -} - -const char* pos_sched_info_r16_s::pos_si_broadcast_status_r16_opts::to_string() const -{ - static const char* names[] = {"broadcasting", "notBroadcasting"}; - return convert_enum_idx(names, 2, value, "pos_sched_info_r16_s::pos_si_broadcast_status_r16_e_"); -} - -// SIB1-v1700-IEs ::= SEQUENCE -SRSASN_CODE sib1_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(hsdn_cell_r17_present, 1)); - HANDLE_CODE(bref.pack(uac_barr_info_v1700_present, 1)); - HANDLE_CODE(bref.pack(sdt_cfg_common_r17_present, 1)); - HANDLE_CODE(bref.pack(red_cap_cfg_common_r17_present, 1)); - HANDLE_CODE(bref.pack(feature_priorities_r17_present, 1)); - HANDLE_CODE(bref.pack(si_sched_info_v1700_present, 1)); - HANDLE_CODE(bref.pack(hyper_sfn_r17_present, 1)); - HANDLE_CODE(bref.pack(edrx_allowed_idle_r17_present, 1)); - HANDLE_CODE(bref.pack(edrx_allowed_inactive_r17_present, 1)); - HANDLE_CODE(bref.pack(intra_freq_resel_red_cap_r17_present, 1)); - HANDLE_CODE(bref.pack(cell_barred_ntn_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (uac_barr_info_v1700_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_info_v1700.uac_barr_info_set_list_v1700, 1, 8)); - } - if (sdt_cfg_common_r17_present) { - HANDLE_CODE(sdt_cfg_common_r17.pack(bref)); - } - if (red_cap_cfg_common_r17_present) { - HANDLE_CODE(red_cap_cfg_common_r17.pack(bref)); - } - if (feature_priorities_r17_present) { - HANDLE_CODE(bref.pack(feature_priorities_r17.red_cap_prio_r17_present, 1)); - HANDLE_CODE(bref.pack(feature_priorities_r17.slicing_prio_r17_present, 1)); - HANDLE_CODE(bref.pack(feature_priorities_r17.msg3_repeats_prio_r17_present, 1)); - HANDLE_CODE(bref.pack(feature_priorities_r17.sdt_prio_r17_present, 1)); - if (feature_priorities_r17.red_cap_prio_r17_present) { - HANDLE_CODE(pack_integer(bref, feature_priorities_r17.red_cap_prio_r17, (uint8_t)0u, (uint8_t)7u)); - } - if (feature_priorities_r17.slicing_prio_r17_present) { - HANDLE_CODE(pack_integer(bref, feature_priorities_r17.slicing_prio_r17, (uint8_t)0u, (uint8_t)7u)); - } - if (feature_priorities_r17.msg3_repeats_prio_r17_present) { - HANDLE_CODE(pack_integer(bref, feature_priorities_r17.msg3_repeats_prio_r17, (uint8_t)0u, (uint8_t)7u)); - } - if (feature_priorities_r17.sdt_prio_r17_present) { - HANDLE_CODE(pack_integer(bref, feature_priorities_r17.sdt_prio_r17, (uint8_t)0u, (uint8_t)7u)); - } - } - if (si_sched_info_v1700_present) { - HANDLE_CODE(si_sched_info_v1700.pack(bref)); - } - if (hyper_sfn_r17_present) { - HANDLE_CODE(hyper_sfn_r17.pack(bref)); - } - if (intra_freq_resel_red_cap_r17_present) { - HANDLE_CODE(intra_freq_resel_red_cap_r17.pack(bref)); - } - if (cell_barred_ntn_r17_present) { - HANDLE_CODE(cell_barred_ntn_r17.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sib1_v1700_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(hsdn_cell_r17_present, 1)); - HANDLE_CODE(bref.unpack(uac_barr_info_v1700_present, 1)); - HANDLE_CODE(bref.unpack(sdt_cfg_common_r17_present, 1)); - HANDLE_CODE(bref.unpack(red_cap_cfg_common_r17_present, 1)); - HANDLE_CODE(bref.unpack(feature_priorities_r17_present, 1)); - HANDLE_CODE(bref.unpack(si_sched_info_v1700_present, 1)); - HANDLE_CODE(bref.unpack(hyper_sfn_r17_present, 1)); - HANDLE_CODE(bref.unpack(edrx_allowed_idle_r17_present, 1)); - HANDLE_CODE(bref.unpack(edrx_allowed_inactive_r17_present, 1)); - HANDLE_CODE(bref.unpack(intra_freq_resel_red_cap_r17_present, 1)); - HANDLE_CODE(bref.unpack(cell_barred_ntn_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (uac_barr_info_v1700_present) { - HANDLE_CODE(unpack_dyn_seq_of(uac_barr_info_v1700.uac_barr_info_set_list_v1700, bref, 1, 8)); - } - if (sdt_cfg_common_r17_present) { - HANDLE_CODE(sdt_cfg_common_r17.unpack(bref)); - } - if (red_cap_cfg_common_r17_present) { - HANDLE_CODE(red_cap_cfg_common_r17.unpack(bref)); - } - if (feature_priorities_r17_present) { - HANDLE_CODE(bref.unpack(feature_priorities_r17.red_cap_prio_r17_present, 1)); - HANDLE_CODE(bref.unpack(feature_priorities_r17.slicing_prio_r17_present, 1)); - HANDLE_CODE(bref.unpack(feature_priorities_r17.msg3_repeats_prio_r17_present, 1)); - HANDLE_CODE(bref.unpack(feature_priorities_r17.sdt_prio_r17_present, 1)); - if (feature_priorities_r17.red_cap_prio_r17_present) { - HANDLE_CODE(unpack_integer(feature_priorities_r17.red_cap_prio_r17, bref, (uint8_t)0u, (uint8_t)7u)); - } - if (feature_priorities_r17.slicing_prio_r17_present) { - HANDLE_CODE(unpack_integer(feature_priorities_r17.slicing_prio_r17, bref, (uint8_t)0u, (uint8_t)7u)); - } - if (feature_priorities_r17.msg3_repeats_prio_r17_present) { - HANDLE_CODE(unpack_integer(feature_priorities_r17.msg3_repeats_prio_r17, bref, (uint8_t)0u, (uint8_t)7u)); - } - if (feature_priorities_r17.sdt_prio_r17_present) { - HANDLE_CODE(unpack_integer(feature_priorities_r17.sdt_prio_r17, bref, (uint8_t)0u, (uint8_t)7u)); - } + if (srs_pos_cfg_n_ul_r17_present) { + HANDLE_CODE(srs_pos_cfg_n_ul_r17.unpack(bref)); } - if (si_sched_info_v1700_present) { - HANDLE_CODE(si_sched_info_v1700.unpack(bref)); + if (srs_pos_cfg_sul_r17_present) { + HANDLE_CODE(srs_pos_cfg_sul_r17.unpack(bref)); } - if (hyper_sfn_r17_present) { - HANDLE_CODE(hyper_sfn_r17.unpack(bref)); + if (bwp_n_ul_r17_present) { + HANDLE_CODE(bwp_n_ul_r17.unpack(bref)); } - if (intra_freq_resel_red_cap_r17_present) { - HANDLE_CODE(intra_freq_resel_red_cap_r17.unpack(bref)); + if (bwp_sul_r17_present) { + HANDLE_CODE(bwp_sul_r17.unpack(bref)); } - if (cell_barred_ntn_r17_present) { - HANDLE_CODE(cell_barred_ntn_r17.unpack(bref)); + if (inactive_pos_srs_time_align_timer_r17_present) { + HANDLE_CODE(inactive_pos_srs_time_align_timer_r17.unpack(bref)); } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); + if (inactive_pos_srs_rsrp_change_thres_r17_present) { + HANDLE_CODE(inactive_pos_srs_rsrp_change_thres_r17.unpack(bref)); } return SRSASN_SUCCESS; } -void sib1_v1700_ies_s::to_json(json_writer& j) const +void srs_pos_rrc_inactive_cfg_r17_s::to_json(json_writer& j) const { j.start_obj(); - if (hsdn_cell_r17_present) { - j.write_str("hsdn-Cell-r17", "true"); - } - if (uac_barr_info_v1700_present) { - j.write_fieldname("uac-BarringInfo-v1700"); - j.start_obj(); - j.start_array("uac-BarringInfoSetList-v1700"); - for (const auto& e1 : uac_barr_info_v1700.uac_barr_info_set_list_v1700) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); - } - if (sdt_cfg_common_r17_present) { - j.write_fieldname("sdt-ConfigCommon-r17"); - sdt_cfg_common_r17.to_json(j); - } - if (red_cap_cfg_common_r17_present) { - j.write_fieldname("redCap-ConfigCommon-r17"); - red_cap_cfg_common_r17.to_json(j); - } - if (feature_priorities_r17_present) { - j.write_fieldname("featurePriorities-r17"); - j.start_obj(); - if (feature_priorities_r17.red_cap_prio_r17_present) { - j.write_int("redCapPriority-r17", feature_priorities_r17.red_cap_prio_r17); - } - if (feature_priorities_r17.slicing_prio_r17_present) { - j.write_int("slicingPriority-r17", feature_priorities_r17.slicing_prio_r17); - } - if (feature_priorities_r17.msg3_repeats_prio_r17_present) { - j.write_int("msg3-Repetitions-Priority-r17", feature_priorities_r17.msg3_repeats_prio_r17); - } - if (feature_priorities_r17.sdt_prio_r17_present) { - j.write_int("sdt-Priority-r17", feature_priorities_r17.sdt_prio_r17); - } - j.end_obj(); - } - if (si_sched_info_v1700_present) { - j.write_fieldname("si-SchedulingInfo-v1700"); - si_sched_info_v1700.to_json(j); - } - if (hyper_sfn_r17_present) { - j.write_str("hyperSFN-r17", hyper_sfn_r17.to_string()); + if (srs_pos_cfg_n_ul_r17_present) { + j.write_fieldname("srs-PosConfigNUL-r17"); + srs_pos_cfg_n_ul_r17.to_json(j); } - if (edrx_allowed_idle_r17_present) { - j.write_str("eDRX-AllowedIdle-r17", "true"); + if (srs_pos_cfg_sul_r17_present) { + j.write_fieldname("srs-PosConfigSUL-r17"); + srs_pos_cfg_sul_r17.to_json(j); } - if (edrx_allowed_inactive_r17_present) { - j.write_str("eDRX-AllowedInactive-r17", "true"); + if (bwp_n_ul_r17_present) { + j.write_fieldname("bwp-NUL-r17"); + bwp_n_ul_r17.to_json(j); } - if (intra_freq_resel_red_cap_r17_present) { - j.write_str("intraFreqReselectionRedCap-r17", intra_freq_resel_red_cap_r17.to_string()); + if (bwp_sul_r17_present) { + j.write_fieldname("bwp-SUL-r17"); + bwp_sul_r17.to_json(j); } - if (cell_barred_ntn_r17_present) { - j.write_str("cellBarredNTN-r17", cell_barred_ntn_r17.to_string()); + if (inactive_pos_srs_time_align_timer_r17_present) { + j.write_str("inactivePosSRS-TimeAlignmentTimer-r17", inactive_pos_srs_time_align_timer_r17.to_string()); } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); + if (inactive_pos_srs_rsrp_change_thres_r17_present) { + j.write_str("inactivePosSRS-RSRP-ChangeThreshold-r17", inactive_pos_srs_rsrp_change_thres_r17.to_string()); } j.end_obj(); } -const char* sib1_v1700_ies_s::intra_freq_resel_red_cap_r17_opts::to_string() const -{ - static const char* names[] = {"allowed", "notAllowed"}; - return convert_enum_idx(names, 2, value, "sib1_v1700_ies_s::intra_freq_resel_red_cap_r17_e_"); -} - -const char* sib1_v1700_ies_s::cell_barred_ntn_r17_opts::to_string() const -{ - static const char* names[] = {"barred", "notBarred"}; - return convert_enum_idx(names, 2, value, "sib1_v1700_ies_s::cell_barred_ntn_r17_e_"); -} - -// UAC-AC1-SelectAssistInfo-r16 ::= ENUMERATED -const char* uac_ac1_select_assist_info_r16_opts::to_string() const -{ - static const char* names[] = {"a", "b", "c", "notConfigured"}; - return convert_enum_idx(names, 4, value, "uac_ac1_select_assist_info_r16_e"); -} - -// PosSI-SchedulingInfo-r16 ::= SEQUENCE -SRSASN_CODE pos_si_sched_info_r16_s::pack(bit_ref& bref) const +// UE-CapabilityRequestFilterCommon ::= SEQUENCE +SRSASN_CODE ue_cap_request_filt_common_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pos_si_request_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(pos_si_request_cfg_sul_r16_present, 1)); + HANDLE_CODE(bref.pack(mrdc_request_present, 1)); - HANDLE_CODE(pack_dyn_seq_of(bref, pos_sched_info_list_r16, 1, 32)); - if (pos_si_request_cfg_r16_present) { - HANDLE_CODE(pos_si_request_cfg_r16.pack(bref)); - } - if (pos_si_request_cfg_sul_r16_present) { - HANDLE_CODE(pos_si_request_cfg_sul_r16.pack(bref)); + 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)); } if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= pos_si_request_cfg_red_cap_r17.is_present(); + group_flags[0] |= codebook_type_request_r16.is_present(); + group_flags[0] |= ul_tx_switch_request_r16_present; + group_flags[1] |= requested_cell_grouping_r16.is_present(); + group_flags[2] |= fallback_group_five_request_r17_present; group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(pos_si_request_cfg_red_cap_r17.is_present(), 1)); - if (pos_si_request_cfg_red_cap_r17.is_present()) { - HANDLE_CODE(pos_si_request_cfg_red_cap_r17->pack(bref)); + HANDLE_CODE(bref.pack(codebook_type_request_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(ul_tx_switch_request_r16_present, 1)); + if (codebook_type_request_r16.is_present()) { + HANDLE_CODE(bref.pack(codebook_type_request_r16->type1_single_panel_r16_present, 1)); + HANDLE_CODE(bref.pack(codebook_type_request_r16->type1_multi_panel_r16_present, 1)); + HANDLE_CODE(bref.pack(codebook_type_request_r16->type2_r16_present, 1)); + HANDLE_CODE(bref.pack(codebook_type_request_r16->type2_port_sel_r16_present, 1)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(requested_cell_grouping_r16.is_present(), 1)); + if (requested_cell_grouping_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *requested_cell_grouping_r16, 1, 32)); } } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(fallback_group_five_request_r17_present, 1)); + } } return SRSASN_SUCCESS; } -SRSASN_CODE pos_si_sched_info_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_cap_request_filt_common_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pos_si_request_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(pos_si_request_cfg_sul_r16_present, 1)); + HANDLE_CODE(bref.unpack(mrdc_request_present, 1)); - HANDLE_CODE(unpack_dyn_seq_of(pos_sched_info_list_r16, bref, 1, 32)); - if (pos_si_request_cfg_r16_present) { - HANDLE_CODE(pos_si_request_cfg_r16.unpack(bref)); - } - if (pos_si_request_cfg_sul_r16_present) { - HANDLE_CODE(pos_si_request_cfg_sul_r16.unpack(bref)); + 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)); } if (ext) { - ext_groups_unpacker_guard group_flags(1); + ext_groups_unpacker_guard group_flags(3); group_flags.unpack(bref); if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - unpack_presence_flag(pos_si_request_cfg_red_cap_r17, bref); - if (pos_si_request_cfg_red_cap_r17.is_present()) { - HANDLE_CODE(pos_si_request_cfg_red_cap_r17->unpack(bref)); + unpack_presence_flag(codebook_type_request_r16, bref); + HANDLE_CODE(bref.unpack(ul_tx_switch_request_r16_present, 1)); + if (codebook_type_request_r16.is_present()) { + HANDLE_CODE(bref.unpack(codebook_type_request_r16->type1_single_panel_r16_present, 1)); + HANDLE_CODE(bref.unpack(codebook_type_request_r16->type1_multi_panel_r16_present, 1)); + HANDLE_CODE(bref.unpack(codebook_type_request_r16->type2_r16_present, 1)); + HANDLE_CODE(bref.unpack(codebook_type_request_r16->type2_port_sel_r16_present, 1)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(requested_cell_grouping_r16, bref); + if (requested_cell_grouping_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*requested_cell_grouping_r16, bref, 1, 32)); } } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(fallback_group_five_request_r17_present, 1)); + } } return SRSASN_SUCCESS; } -void pos_si_sched_info_r16_s::to_json(json_writer& j) const +void ue_cap_request_filt_common_s::to_json(json_writer& j) const { j.start_obj(); - j.start_array("posSchedulingInfoList-r16"); - for (const auto& e1 : pos_sched_info_list_r16) { - e1.to_json(j); - } - j.end_array(); - if (pos_si_request_cfg_r16_present) { - j.write_fieldname("posSI-RequestConfig-r16"); - pos_si_request_cfg_r16.to_json(j); - } - if (pos_si_request_cfg_sul_r16_present) { - j.write_fieldname("posSI-RequestConfigSUL-r16"); - pos_si_request_cfg_sul_r16.to_json(j); + 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(); } if (ext) { - if (pos_si_request_cfg_red_cap_r17.is_present()) { - j.write_fieldname("posSI-RequestConfigRedCap-r17"); - pos_si_request_cfg_red_cap_r17->to_json(j); + if (codebook_type_request_r16.is_present()) { + j.write_fieldname("codebookTypeRequest-r16"); + j.start_obj(); + if (codebook_type_request_r16->type1_single_panel_r16_present) { + j.write_str("type1-SinglePanel-r16", "true"); + } + if (codebook_type_request_r16->type1_multi_panel_r16_present) { + j.write_str("type1-MultiPanel-r16", "true"); + } + if (codebook_type_request_r16->type2_r16_present) { + j.write_str("type2-r16", "true"); + } + if (codebook_type_request_r16->type2_port_sel_r16_present) { + j.write_str("type2-PortSelection-r16", "true"); + } + j.end_obj(); + } + if (ul_tx_switch_request_r16_present) { + j.write_str("uplinkTxSwitchRequest-r16", "true"); + } + if (requested_cell_grouping_r16.is_present()) { + j.start_array("requestedCellGrouping-r16"); + for (const auto& e1 : *requested_cell_grouping_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (fallback_group_five_request_r17_present) { + j.write_str("fallbackGroupFiveRequest-r17", "true"); } } j.end_obj(); } -// SIB1-v1630-IEs ::= SEQUENCE -SRSASN_CODE sib1_v1630_ies_s::pack(bit_ref& bref) const +// UE-CapabilityRequestFilterNR-v1710 ::= SEQUENCE +SRSASN_CODE ue_cap_request_filt_nr_v1710_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(uac_barr_info_v1630_present, 1)); + HANDLE_CODE(bref.pack(sidelink_request_r17_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (uac_barr_info_v1630_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_info_v1630.uac_ac1_select_assist_info_r16, 2, 12)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - return SRSASN_SUCCESS; } -SRSASN_CODE sib1_v1630_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_cap_request_filt_nr_v1710_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(uac_barr_info_v1630_present, 1)); + HANDLE_CODE(bref.unpack(sidelink_request_r17_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (uac_barr_info_v1630_present) { - HANDLE_CODE(unpack_dyn_seq_of(uac_barr_info_v1630.uac_ac1_select_assist_info_r16, bref, 2, 12)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - return SRSASN_SUCCESS; } -void sib1_v1630_ies_s::to_json(json_writer& j) const +void ue_cap_request_filt_nr_v1710_s::to_json(json_writer& j) const { j.start_obj(); - if (uac_barr_info_v1630_present) { - j.write_fieldname("uac-BarringInfo-v1630"); - j.start_obj(); - j.start_array("uac-AC1-SelectAssistInfo-r16"); - for (const auto& e1 : uac_barr_info_v1630.uac_ac1_select_assist_info_r16) { - j.write_str(e1.to_string()); - } - j.end_array(); - j.end_obj(); + if (sidelink_request_r17_present) { + j.write_str("sidelinkRequest-r17", "true"); } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -// SIB10-r16 ::= SEQUENCE -SRSASN_CODE sib10_r16_s::pack(bit_ref& bref) const +// UE-CapabilityRequestFilterNR-v1540 ::= SEQUENCE +SRSASN_CODE ue_cap_request_filt_nr_v1540_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(hrnn_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(srs_switching_time_request_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (hrnn_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, hrnn_list_r16, 1, 12)); - } - if (late_non_crit_ext.size() > 0) { - 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 sib10_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_cap_request_filt_nr_v1540_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - bool hrnn_list_r16_present; - HANDLE_CODE(bref.unpack(hrnn_list_r16_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(srs_switching_time_request_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (hrnn_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(hrnn_list_r16, bref, 1, 12)); - } - 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 sib10_r16_s::to_json(json_writer& j) const +void ue_cap_request_filt_nr_v1540_s::to_json(json_writer& j) const { j.start_obj(); - if (hrnn_list_r16.size() > 0) { - j.start_array("hrnn-List-r16"); - for (const auto& e1 : hrnn_list_r16) { - e1.to_json(j); - } - j.end_array(); + if (srs_switching_time_request_present) { + j.write_str("srs-SwitchingTimeRequest", "true"); } - if (late_non_crit_ext.size() > 0) { - 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(); } -// SIB11-r16 ::= SEQUENCE -SRSASN_CODE sib11_r16_s::pack(bit_ref& bref) const +// UE-CapabilityRequestFilterNR ::= SEQUENCE +SRSASN_CODE ue_cap_request_filt_nr_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_idle_cfg_sib_r16_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(freq_band_list_filt.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (meas_idle_cfg_sib_r16_present) { - HANDLE_CODE(meas_idle_cfg_sib_r16.pack(bref)); + if (freq_band_list_filt.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list_filt, 1, 1280)); } - if (late_non_crit_ext.size() > 0) { - 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 sib11_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_cap_request_filt_nr_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(meas_idle_cfg_sib_r16_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + bool freq_band_list_filt_present; + HANDLE_CODE(bref.unpack(freq_band_list_filt_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (meas_idle_cfg_sib_r16_present) { - HANDLE_CODE(meas_idle_cfg_sib_r16.unpack(bref)); + if (freq_band_list_filt_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list_filt, bref, 1, 1280)); } - 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 sib11_r16_s::to_json(json_writer& j) const +void ue_cap_request_filt_nr_s::to_json(json_writer& j) const { j.start_obj(); - if (meas_idle_cfg_sib_r16_present) { - j.write_fieldname("measIdleConfigSIB-r16"); - meas_idle_cfg_sib_r16.to_json(j); + if (freq_band_list_filt.size() > 0) { + j.start_array("frequencyBandListFilter"); + for (const auto& e1 : freq_band_list_filt) { + e1.to_json(j); + } + j.end_array(); } - if (late_non_crit_ext.size() > 0) { - 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(); } -// SIB12-r16 ::= SEQUENCE -SRSASN_CODE sib12_r16_s::pack(bit_ref& bref) const +// UE-NR-Capability-v16c0 ::= SEQUENCE +SRSASN_CODE ue_nr_cap_v16c0_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, segment_num_r16, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(segment_type_r16.pack(bref)); - HANDLE_CODE(segment_container_r16.pack(bref)); + HANDLE_CODE(bref.pack(rf_params_v16c0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_v16c0_present) { + HANDLE_CODE(rf_params_v16c0.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE sib12_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_nr_cap_v16c0_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(segment_num_r16, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(segment_type_r16.unpack(bref)); - HANDLE_CODE(segment_container_r16.unpack(bref)); + HANDLE_CODE(bref.unpack(rf_params_v16c0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_v16c0_present) { + HANDLE_CODE(rf_params_v16c0.unpack(bref)); + } return SRSASN_SUCCESS; } -void sib12_r16_s::to_json(json_writer& j) const +void ue_nr_cap_v16c0_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("segmentNumber-r16", segment_num_r16); - j.write_str("segmentType-r16", segment_type_r16.to_string()); - j.write_str("segmentContainer-r16", segment_container_r16.to_string()); + if (rf_params_v16c0_present) { + j.write_fieldname("rf-Parameters-v16c0"); + rf_params_v16c0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } j.end_obj(); } -const char* sib12_r16_s::segment_type_r16_opts::to_string() const -{ - static const char* names[] = {"notLastSegment", "lastSegment"}; - return convert_enum_idx(names, 2, value, "sib12_r16_s::segment_type_r16_e_"); -} - -// SIB13-r16 ::= SEQUENCE -SRSASN_CODE sib13_r16_s::pack(bit_ref& bref) const +// UE-NR-Capability-v16a0 ::= SEQUENCE +SRSASN_CODE ue_nr_cap_v16a0_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(phy_params_v16a0_present, 1)); + HANDLE_CODE(bref.pack(rf_params_v16a0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - HANDLE_CODE(sl_v2x_cfg_common_r16.pack(bref)); - HANDLE_CODE(dummy.pack(bref)); - HANDLE_CODE(tdd_cfg_r16.pack(bref)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); + if (phy_params_v16a0_present) { + HANDLE_CODE(phy_params_v16a0.pack(bref)); + } + if (rf_params_v16a0_present) { + HANDLE_CODE(rf_params_v16a0.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); } return SRSASN_SUCCESS; } -SRSASN_CODE sib13_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_nr_cap_v16a0_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(phy_params_v16a0_present, 1)); + HANDLE_CODE(bref.unpack(rf_params_v16a0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - HANDLE_CODE(sl_v2x_cfg_common_r16.unpack(bref)); - HANDLE_CODE(dummy.unpack(bref)); - HANDLE_CODE(tdd_cfg_r16.unpack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); + if (phy_params_v16a0_present) { + HANDLE_CODE(phy_params_v16a0.unpack(bref)); + } + if (rf_params_v16a0_present) { + HANDLE_CODE(rf_params_v16a0.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); } return SRSASN_SUCCESS; } -void sib13_r16_s::to_json(json_writer& j) const +void ue_nr_cap_v16a0_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("sl-V2X-ConfigCommon-r16", sl_v2x_cfg_common_r16.to_string()); - j.write_str("dummy", dummy.to_string()); - j.write_str("tdd-Config-r16", tdd_cfg_r16.to_string()); - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + if (phy_params_v16a0_present) { + j.write_fieldname("phy-Parameters-v16a0"); + phy_params_v16a0.to_json(j); + } + if (rf_params_v16a0_present) { + j.write_fieldname("rf-Parameters-v16a0"); + rf_params_v16a0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } j.end_obj(); } -// SIB14-r16 ::= SEQUENCE -SRSASN_CODE sib14_r16_s::pack(bit_ref& bref) const +// UE-NR-Capability-v15j0 ::= SEQUENCE +SRSASN_CODE ue_nr_cap_v15j0_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - HANDLE_CODE(sl_v2x_cfg_common_ext_r16.pack(bref)); if (late_non_crit_ext.size() > 0) { 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 sib14_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_nr_cap_v15j0_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); bool late_non_crit_ext_present; HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - HANDLE_CODE(sl_v2x_cfg_common_ext_r16.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 sib14_r16_s::to_json(json_writer& j) const +void ue_nr_cap_v15j0_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("sl-V2X-ConfigCommonExt-r16", sl_v2x_cfg_common_ext_r16.to_string()); if (late_non_crit_ext.size() > 0) { 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(); } -// SIB15-r17 ::= SEQUENCE -SRSASN_CODE sib15_r17_s::pack(bit_ref& bref) const +// NRDC-Parameters-v15c0 ::= SEQUENCE +SRSASN_CODE nrdc_params_v15c0_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(common_plmns_with_disaster_condition_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(applicable_disaster_info_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - - if (common_plmns_with_disaster_condition_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, common_plmns_with_disaster_condition_r17, 1, 12)); - } - if (applicable_disaster_info_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, applicable_disaster_info_list_r17, 1, 12)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } + HANDLE_CODE(bref.pack(pdcp_dupl_split_srb_present, 1)); + HANDLE_CODE(bref.pack(pdcp_dupl_split_drb_present, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE sib15_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE nrdc_params_v15c0_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - bool common_plmns_with_disaster_condition_r17_present; - HANDLE_CODE(bref.unpack(common_plmns_with_disaster_condition_r17_present, 1)); - bool applicable_disaster_info_list_r17_present; - HANDLE_CODE(bref.unpack(applicable_disaster_info_list_r17_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - - if (common_plmns_with_disaster_condition_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(common_plmns_with_disaster_condition_r17, bref, 1, 12)); - } - if (applicable_disaster_info_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(applicable_disaster_info_list_r17, bref, 1, 12)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } + HANDLE_CODE(bref.unpack(pdcp_dupl_split_srb_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_dupl_split_drb_present, 1)); return SRSASN_SUCCESS; } -void sib15_r17_s::to_json(json_writer& j) const +void nrdc_params_v15c0_s::to_json(json_writer& j) const { j.start_obj(); - if (common_plmns_with_disaster_condition_r17.size() > 0) { - j.start_array("commonPLMNsWithDisasterCondition-r17"); - for (const auto& e1 : common_plmns_with_disaster_condition_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (applicable_disaster_info_list_r17.size() > 0) { - j.start_array("applicableDisasterInfoList-r17"); - for (const auto& e1 : applicable_disaster_info_list_r17) { - e1.to_json(j); - } - j.end_array(); + if (pdcp_dupl_split_srb_present) { + j.write_str("pdcp-DuplicationSplitSRB", "supported"); } - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + if (pdcp_dupl_split_drb_present) { + j.write_str("pdcp-DuplicationSplitDRB", "supported"); } j.end_obj(); } -// SIB16-r17 ::= SEQUENCE -SRSASN_CODE sib16_r17_s::pack(bit_ref& bref) const +// UE-NR-Capability-v15g0 ::= SEQUENCE +SRSASN_CODE ue_nr_cap_v15g0_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(freq_prio_list_slicing_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(rf_params_v15g0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (freq_prio_list_slicing_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_slicing_r17, 1, 9)); + if (rf_params_v15g0_present) { + HANDLE_CODE(rf_params_v15g0.pack(bref)); } - if (late_non_crit_ext.size() > 0) { - 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 sib16_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_nr_cap_v15g0_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - bool freq_prio_list_slicing_r17_present; - HANDLE_CODE(bref.unpack(freq_prio_list_slicing_r17_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(rf_params_v15g0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (freq_prio_list_slicing_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_prio_list_slicing_r17, bref, 1, 9)); + if (rf_params_v15g0_present) { + HANDLE_CODE(rf_params_v15g0.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 sib16_r17_s::to_json(json_writer& j) const +void ue_nr_cap_v15g0_s::to_json(json_writer& j) const { j.start_obj(); - if (freq_prio_list_slicing_r17.size() > 0) { - j.start_array("freqPriorityListSlicing-r17"); - for (const auto& e1 : freq_prio_list_slicing_r17) { - e1.to_json(j); - } - j.end_array(); + if (rf_params_v15g0_present) { + j.write_fieldname("rf-Parameters-v15g0"); + rf_params_v15g0.to_json(j); } - if (late_non_crit_ext.size() > 0) { - 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(); } -// SIB17-r17 ::= SEQUENCE -SRSASN_CODE sib17_r17_s::pack(bit_ref& bref) const +// UE-NR-Capability-v15c0 ::= SEQUENCE +SRSASN_CODE ue_nr_cap_v15c0_s::pack(bit_ref& bref) const { - HANDLE_CODE(pack_integer(bref, segment_num_r17, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(segment_type_r17.pack(bref)); - HANDLE_CODE(segment_container_r17.pack(bref)); + HANDLE_CODE(bref.pack(nrdc_params_v15c0_present, 1)); + HANDLE_CODE(bref.pack(partial_fr2_fallback_rx_req_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (nrdc_params_v15c0_present) { + HANDLE_CODE(nrdc_params_v15c0.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE sib17_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_nr_cap_v15c0_s::unpack(cbit_ref& bref) { - HANDLE_CODE(unpack_integer(segment_num_r17, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(segment_type_r17.unpack(bref)); - HANDLE_CODE(segment_container_r17.unpack(bref)); + HANDLE_CODE(bref.unpack(nrdc_params_v15c0_present, 1)); + HANDLE_CODE(bref.unpack(partial_fr2_fallback_rx_req_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (nrdc_params_v15c0_present) { + HANDLE_CODE(nrdc_params_v15c0.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } return SRSASN_SUCCESS; } -void sib17_r17_s::to_json(json_writer& j) const +void ue_nr_cap_v15c0_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("segmentNumber-r17", segment_num_r17); - j.write_str("segmentType-r17", segment_type_r17.to_string()); - j.write_str("segmentContainer-r17", segment_container_r17.to_string()); - j.end_obj(); -} - -const char* sib17_r17_s::segment_type_r17_opts::to_string() const -{ - static const char* names[] = {"notLastSegment", "lastSegment"}; - return convert_enum_idx(names, 2, value, "sib17_r17_s::segment_type_r17_e_"); -} - -// SIB18-r17 ::= SEQUENCE -SRSASN_CODE sib18_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(gin_elem_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(gins_per_sn_pn_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - - if (gin_elem_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, gin_elem_list_r17, 1, 24)); + if (nrdc_params_v15c0_present) { + j.write_fieldname("nrdc-Parameters-v15c0"); + nrdc_params_v15c0.to_json(j); } - if (gins_per_sn_pn_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, gins_per_sn_pn_list_r17, 1, 12)); + if (partial_fr2_fallback_rx_req_present) { + j.write_str("partialFR2-FallbackRX-Req", "true"); } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); } + j.end_obj(); +} + +// UECapabilityEnquiry-v1610-IEs ::= SEQUENCE +SRSASN_CODE ue_cap_enquiry_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rrc_seg_allowed_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); return SRSASN_SUCCESS; } -SRSASN_CODE sib18_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_cap_enquiry_v1610_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - bool gin_elem_list_r17_present; - HANDLE_CODE(bref.unpack(gin_elem_list_r17_present, 1)); - bool gins_per_sn_pn_list_r17_present; - HANDLE_CODE(bref.unpack(gins_per_sn_pn_list_r17_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - - if (gin_elem_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(gin_elem_list_r17, bref, 1, 24)); - } - if (gins_per_sn_pn_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(gins_per_sn_pn_list_r17, bref, 1, 12)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } + HANDLE_CODE(bref.unpack(rrc_seg_allowed_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); return SRSASN_SUCCESS; } -void sib18_r17_s::to_json(json_writer& j) const +void ue_cap_enquiry_v1610_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (gin_elem_list_r17.size() > 0) { - j.start_array("gin-ElementList-r17"); - for (const auto& e1 : gin_elem_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (gins_per_sn_pn_list_r17.size() > 0) { - j.start_array("gins-PerSNPN-List-r17"); - for (const auto& e1 : gins_per_sn_pn_list_r17) { - e1.to_json(j); - } - j.end_array(); + if (rrc_seg_allowed_r16_present) { + j.write_str("rrc-SegAllowed-r16", "enabled"); } - if (late_non_crit_ext.size() > 0) { - 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(); } -// SIB19-r17 ::= SEQUENCE -SRSASN_CODE sib19_r17_s::pack(bit_ref& bref) const +// UECapabilityEnquiry-v1560-IEs ::= SEQUENCE +SRSASN_CODE ue_cap_enquiry_v1560_ies_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ntn_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(t_service_r17_present, 1)); - HANDLE_CODE(bref.pack(ref_location_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(distance_thresh_r17_present, 1)); - HANDLE_CODE(bref.pack(ntn_neigh_cell_cfg_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(cap_request_filt_common_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (ntn_cfg_r17_present) { - HANDLE_CODE(ntn_cfg_r17.pack(bref)); - } - if (t_service_r17_present) { - HANDLE_CODE(pack_integer(bref, t_service_r17, (uint64_t)0u, (uint64_t)549755813887u)); - } - if (ref_location_r17.size() > 0) { - HANDLE_CODE(ref_location_r17.pack(bref)); - } - if (distance_thresh_r17_present) { - HANDLE_CODE(pack_integer(bref, distance_thresh_r17, (uint16_t)0u, (uint16_t)65525u)); - } - if (ntn_neigh_cell_cfg_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, ntn_neigh_cell_cfg_list_r17, 1, 4)); + if (cap_request_filt_common_present) { + HANDLE_CODE(cap_request_filt_common.pack(bref)); } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.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] |= ntn_neigh_cell_cfg_list_ext_v1720.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ntn_neigh_cell_cfg_list_ext_v1720.is_present(), 1)); - if (ntn_neigh_cell_cfg_list_ext_v1720.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *ntn_neigh_cell_cfg_list_ext_v1720, 1, 4)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE sib19_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE ue_cap_enquiry_v1560_ies_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ntn_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(t_service_r17_present, 1)); - bool ref_location_r17_present; - HANDLE_CODE(bref.unpack(ref_location_r17_present, 1)); - HANDLE_CODE(bref.unpack(distance_thresh_r17_present, 1)); - bool ntn_neigh_cell_cfg_list_r17_present; - HANDLE_CODE(bref.unpack(ntn_neigh_cell_cfg_list_r17_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(cap_request_filt_common_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (ntn_cfg_r17_present) { - HANDLE_CODE(ntn_cfg_r17.unpack(bref)); - } - if (t_service_r17_present) { - HANDLE_CODE(unpack_integer(t_service_r17, bref, (uint64_t)0u, (uint64_t)549755813887u)); - } - if (ref_location_r17_present) { - HANDLE_CODE(ref_location_r17.unpack(bref)); - } - if (distance_thresh_r17_present) { - HANDLE_CODE(unpack_integer(distance_thresh_r17, bref, (uint16_t)0u, (uint16_t)65525u)); - } - if (ntn_neigh_cell_cfg_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(ntn_neigh_cell_cfg_list_r17, bref, 1, 4)); + if (cap_request_filt_common_present) { + HANDLE_CODE(cap_request_filt_common.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)); } - 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); - - unpack_presence_flag(ntn_neigh_cell_cfg_list_ext_v1720, bref); - if (ntn_neigh_cell_cfg_list_ext_v1720.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*ntn_neigh_cell_cfg_list_ext_v1720, bref, 1, 4)); - } - } - } return SRSASN_SUCCESS; } -void sib19_r17_s::to_json(json_writer& j) const +void ue_cap_enquiry_v1560_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (ntn_cfg_r17_present) { - j.write_fieldname("ntn-Config-r17"); - ntn_cfg_r17.to_json(j); - } - if (t_service_r17_present) { - j.write_int("t-Service-r17", t_service_r17); - } - if (ref_location_r17.size() > 0) { - j.write_str("referenceLocation-r17", ref_location_r17.to_string()); - } - if (distance_thresh_r17_present) { - j.write_int("distanceThresh-r17", distance_thresh_r17); - } - if (ntn_neigh_cell_cfg_list_r17.size() > 0) { - j.start_array("ntn-NeighCellConfigList-r17"); - for (const auto& e1 : ntn_neigh_cell_cfg_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + if (cap_request_filt_common_present) { + j.write_fieldname("capabilityRequestFilterCommon"); + cap_request_filt_common.to_json(j); } - if (ext) { - if (ntn_neigh_cell_cfg_list_ext_v1720.is_present()) { - j.start_array("ntn-NeighCellConfigListExt-v1720"); - for (const auto& e1 : *ntn_neigh_cell_cfg_list_ext_v1720) { - 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(); } -// SIB2 ::= SEQUENCE -SRSASN_CODE sib2_s::pack(bit_ref& bref) const +// AS-Config ::= SEQUENCE +SRSASN_CODE as_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - bref.pack(cell_resel_info_common.ext, 1); - HANDLE_CODE(bref.pack(cell_resel_info_common.nrof_ss_blocks_to_average_present, 1)); - HANDLE_CODE(bref.pack(cell_resel_info_common.abs_thresh_ss_blocks_consolidation_present, 1)); - HANDLE_CODE(bref.pack(cell_resel_info_common.range_to_best_cell_present, 1)); - HANDLE_CODE(bref.pack(cell_resel_info_common.speed_state_resel_pars_present, 1)); - if (cell_resel_info_common.nrof_ss_blocks_to_average_present) { - HANDLE_CODE(pack_integer(bref, cell_resel_info_common.nrof_ss_blocks_to_average, (uint8_t)2u, (uint8_t)16u)); - } - if (cell_resel_info_common.abs_thresh_ss_blocks_consolidation_present) { - HANDLE_CODE(cell_resel_info_common.abs_thresh_ss_blocks_consolidation.pack(bref)); - } - if (cell_resel_info_common.range_to_best_cell_present) { - HANDLE_CODE(cell_resel_info_common.range_to_best_cell.pack(bref)); - } - HANDLE_CODE(cell_resel_info_common.q_hyst.pack(bref)); - if (cell_resel_info_common.speed_state_resel_pars_present) { - HANDLE_CODE(cell_resel_info_common.speed_state_resel_pars.mob_state_params.pack(bref)); - HANDLE_CODE(cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_medium.pack(bref)); - HANDLE_CODE(cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_high.pack(bref)); - } - bref.pack(cell_resel_serving_freq_info.ext, 1); - HANDLE_CODE(bref.pack(cell_resel_serving_freq_info.s_non_intra_search_p_present, 1)); - HANDLE_CODE(bref.pack(cell_resel_serving_freq_info.s_non_intra_search_q_present, 1)); - HANDLE_CODE(bref.pack(cell_resel_serving_freq_info.thresh_serving_low_q_present, 1)); - HANDLE_CODE(bref.pack(cell_resel_serving_freq_info.cell_resel_sub_prio_present, 1)); - if (cell_resel_serving_freq_info.s_non_intra_search_p_present) { - HANDLE_CODE(pack_integer(bref, cell_resel_serving_freq_info.s_non_intra_search_p, (uint8_t)0u, (uint8_t)31u)); - } - if (cell_resel_serving_freq_info.s_non_intra_search_q_present) { - HANDLE_CODE(pack_integer(bref, cell_resel_serving_freq_info.s_non_intra_search_q, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(pack_integer(bref, cell_resel_serving_freq_info.thresh_serving_low_p, (uint8_t)0u, (uint8_t)31u)); - if (cell_resel_serving_freq_info.thresh_serving_low_q_present) { - HANDLE_CODE(pack_integer(bref, cell_resel_serving_freq_info.thresh_serving_low_q, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(pack_integer(bref, cell_resel_serving_freq_info.cell_resel_prio, (uint8_t)0u, (uint8_t)7u)); - if (cell_resel_serving_freq_info.cell_resel_sub_prio_present) { - HANDLE_CODE(cell_resel_serving_freq_info.cell_resel_sub_prio.pack(bref)); - } - HANDLE_CODE(intra_freq_cell_resel_info.pack(bref)); + HANDLE_CODE(rrc_recfg.pack(bref)); if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= relaxed_meas_r16.is_present(); - group_flags[1] |= cell_equivalent_size_r17_present; - group_flags[1] |= relaxed_meas_r17.is_present(); + group_flags[0] |= source_rb_sn_cfg.size() > 0; + group_flags[0] |= source_scg_nr_cfg.size() > 0; + group_flags[0] |= source_scg_eutra_cfg.size() > 0; + group_flags[1] |= source_scg_cfg_present; + group_flags[2] |= sdt_cfg_r17.is_present(); group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(relaxed_meas_r16.is_present(), 1)); - if (relaxed_meas_r16.is_present()) { - HANDLE_CODE(bref.pack(relaxed_meas_r16->low_mob_eval_r16_present, 1)); - HANDLE_CODE(bref.pack(relaxed_meas_r16->cell_edge_eval_r16_present, 1)); - HANDLE_CODE(bref.pack(relaxed_meas_r16->combine_relaxed_meas_condition_r16_present, 1)); - HANDLE_CODE(bref.pack(relaxed_meas_r16->high_prio_meas_relax_r16_present, 1)); - if (relaxed_meas_r16->low_mob_eval_r16_present) { - HANDLE_CODE(relaxed_meas_r16->low_mob_eval_r16.s_search_delta_p_r16.pack(bref)); - HANDLE_CODE(relaxed_meas_r16->low_mob_eval_r16.t_search_delta_p_r16.pack(bref)); - } - if (relaxed_meas_r16->cell_edge_eval_r16_present) { - HANDLE_CODE(bref.pack(relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16_present, 1)); - HANDLE_CODE( - pack_integer(bref, relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_p_r16, (uint8_t)0u, (uint8_t)31u)); - if (relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16_present) { - HANDLE_CODE(pack_integer( - bref, relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16, (uint8_t)0u, (uint8_t)31u)); - } - } + HANDLE_CODE(bref.pack(source_rb_sn_cfg.size() > 0, 1)); + HANDLE_CODE(bref.pack(source_scg_nr_cfg.size() > 0, 1)); + HANDLE_CODE(bref.pack(source_scg_eutra_cfg.size() > 0, 1)); + if (source_rb_sn_cfg.size() > 0) { + HANDLE_CODE(source_rb_sn_cfg.pack(bref)); + } + if (source_scg_nr_cfg.size() > 0) { + HANDLE_CODE(source_scg_nr_cfg.pack(bref)); + } + if (source_scg_eutra_cfg.size() > 0) { + HANDLE_CODE(source_scg_eutra_cfg.pack(bref)); } } if (group_flags[1]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(cell_equivalent_size_r17_present, 1)); - HANDLE_CODE(bref.pack(relaxed_meas_r17.is_present(), 1)); - if (cell_equivalent_size_r17_present) { - HANDLE_CODE(pack_integer(bref, cell_equivalent_size_r17, (uint8_t)2u, (uint8_t)16u)); - } - if (relaxed_meas_r17.is_present()) { - HANDLE_CODE(bref.pack(relaxed_meas_r17->cell_edge_eval_while_stationary_r17_present, 1)); - HANDLE_CODE(bref.pack(relaxed_meas_r17->combine_relaxed_meas_condition2_r17_present, 1)); - HANDLE_CODE(relaxed_meas_r17->stationary_mob_eval_r17.s_search_delta_p_stationary_r17.pack(bref)); - HANDLE_CODE(relaxed_meas_r17->stationary_mob_eval_r17.t_search_delta_p_stationary_r17.pack(bref)); - if (relaxed_meas_r17->cell_edge_eval_while_stationary_r17_present) { - HANDLE_CODE( - bref.pack(relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17_present, 1)); - HANDLE_CODE(pack_integer(bref, - relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_p2_r17, - (uint8_t)0u, - (uint8_t)31u)); - if (relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17_present) { - HANDLE_CODE(pack_integer(bref, - relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17, - (uint8_t)0u, - (uint8_t)31u)); - } - } + HANDLE_CODE(bref.pack(source_scg_cfg_present, 1)); + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sdt_cfg_r17.is_present(), 1)); + if (sdt_cfg_r17.is_present()) { + HANDLE_CODE(sdt_cfg_r17->pack(bref)); } } } return SRSASN_SUCCESS; } -SRSASN_CODE sib2_s::unpack(cbit_ref& bref) +SRSASN_CODE as_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - bref.unpack(cell_resel_info_common.ext, 1); - HANDLE_CODE(bref.unpack(cell_resel_info_common.nrof_ss_blocks_to_average_present, 1)); - HANDLE_CODE(bref.unpack(cell_resel_info_common.abs_thresh_ss_blocks_consolidation_present, 1)); - HANDLE_CODE(bref.unpack(cell_resel_info_common.range_to_best_cell_present, 1)); - HANDLE_CODE(bref.unpack(cell_resel_info_common.speed_state_resel_pars_present, 1)); - if (cell_resel_info_common.nrof_ss_blocks_to_average_present) { - HANDLE_CODE(unpack_integer(cell_resel_info_common.nrof_ss_blocks_to_average, bref, (uint8_t)2u, (uint8_t)16u)); - } - if (cell_resel_info_common.abs_thresh_ss_blocks_consolidation_present) { - HANDLE_CODE(cell_resel_info_common.abs_thresh_ss_blocks_consolidation.unpack(bref)); - } - if (cell_resel_info_common.range_to_best_cell_present) { - HANDLE_CODE(cell_resel_info_common.range_to_best_cell.unpack(bref)); - } - HANDLE_CODE(cell_resel_info_common.q_hyst.unpack(bref)); - if (cell_resel_info_common.speed_state_resel_pars_present) { - HANDLE_CODE(cell_resel_info_common.speed_state_resel_pars.mob_state_params.unpack(bref)); - HANDLE_CODE(cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_medium.unpack(bref)); - HANDLE_CODE(cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_high.unpack(bref)); - } - bref.unpack(cell_resel_serving_freq_info.ext, 1); - HANDLE_CODE(bref.unpack(cell_resel_serving_freq_info.s_non_intra_search_p_present, 1)); - HANDLE_CODE(bref.unpack(cell_resel_serving_freq_info.s_non_intra_search_q_present, 1)); - HANDLE_CODE(bref.unpack(cell_resel_serving_freq_info.thresh_serving_low_q_present, 1)); - HANDLE_CODE(bref.unpack(cell_resel_serving_freq_info.cell_resel_sub_prio_present, 1)); - if (cell_resel_serving_freq_info.s_non_intra_search_p_present) { - HANDLE_CODE(unpack_integer(cell_resel_serving_freq_info.s_non_intra_search_p, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (cell_resel_serving_freq_info.s_non_intra_search_q_present) { - HANDLE_CODE(unpack_integer(cell_resel_serving_freq_info.s_non_intra_search_q, bref, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(unpack_integer(cell_resel_serving_freq_info.thresh_serving_low_p, bref, (uint8_t)0u, (uint8_t)31u)); - if (cell_resel_serving_freq_info.thresh_serving_low_q_present) { - HANDLE_CODE(unpack_integer(cell_resel_serving_freq_info.thresh_serving_low_q, bref, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(unpack_integer(cell_resel_serving_freq_info.cell_resel_prio, bref, (uint8_t)0u, (uint8_t)7u)); - if (cell_resel_serving_freq_info.cell_resel_sub_prio_present) { - HANDLE_CODE(cell_resel_serving_freq_info.cell_resel_sub_prio.unpack(bref)); - } - HANDLE_CODE(intra_freq_cell_resel_info.unpack(bref)); + HANDLE_CODE(rrc_recfg.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); - unpack_presence_flag(relaxed_meas_r16, bref); - if (relaxed_meas_r16.is_present()) { - HANDLE_CODE(bref.unpack(relaxed_meas_r16->low_mob_eval_r16_present, 1)); - HANDLE_CODE(bref.unpack(relaxed_meas_r16->cell_edge_eval_r16_present, 1)); - HANDLE_CODE(bref.unpack(relaxed_meas_r16->combine_relaxed_meas_condition_r16_present, 1)); - HANDLE_CODE(bref.unpack(relaxed_meas_r16->high_prio_meas_relax_r16_present, 1)); - if (relaxed_meas_r16->low_mob_eval_r16_present) { - HANDLE_CODE(relaxed_meas_r16->low_mob_eval_r16.s_search_delta_p_r16.unpack(bref)); - HANDLE_CODE(relaxed_meas_r16->low_mob_eval_r16.t_search_delta_p_r16.unpack(bref)); - } - if (relaxed_meas_r16->cell_edge_eval_r16_present) { - HANDLE_CODE(bref.unpack(relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16_present, 1)); - HANDLE_CODE(unpack_integer( - relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_p_r16, bref, (uint8_t)0u, (uint8_t)31u)); - if (relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16_present) { - HANDLE_CODE(unpack_integer( - relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16, bref, (uint8_t)0u, (uint8_t)31u)); - } - } + bool source_rb_sn_cfg_present; + HANDLE_CODE(bref.unpack(source_rb_sn_cfg_present, 1)); + bool source_scg_nr_cfg_present; + HANDLE_CODE(bref.unpack(source_scg_nr_cfg_present, 1)); + bool source_scg_eutra_cfg_present; + 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(cell_equivalent_size_r17_present, 1)); - unpack_presence_flag(relaxed_meas_r17, bref); - if (cell_equivalent_size_r17_present) { - HANDLE_CODE(unpack_integer(cell_equivalent_size_r17, bref, (uint8_t)2u, (uint8_t)16u)); - } - if (relaxed_meas_r17.is_present()) { - HANDLE_CODE(bref.unpack(relaxed_meas_r17->cell_edge_eval_while_stationary_r17_present, 1)); - HANDLE_CODE(bref.unpack(relaxed_meas_r17->combine_relaxed_meas_condition2_r17_present, 1)); - HANDLE_CODE(relaxed_meas_r17->stationary_mob_eval_r17.s_search_delta_p_stationary_r17.unpack(bref)); - HANDLE_CODE(relaxed_meas_r17->stationary_mob_eval_r17.t_search_delta_p_stationary_r17.unpack(bref)); - if (relaxed_meas_r17->cell_edge_eval_while_stationary_r17_present) { - HANDLE_CODE( - bref.unpack(relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17_present, 1)); - HANDLE_CODE(unpack_integer(relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_p2_r17, - bref, - (uint8_t)0u, - (uint8_t)31u)); - if (relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17_present) { - HANDLE_CODE(unpack_integer(relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17, - bref, - (uint8_t)0u, - (uint8_t)31u)); - } - } + HANDLE_CODE(bref.unpack(source_scg_cfg_present, 1)); + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(sdt_cfg_r17, bref); + if (sdt_cfg_r17.is_present()) { + HANDLE_CODE(sdt_cfg_r17->unpack(bref)); } } } return SRSASN_SUCCESS; } -void sib2_s::to_json(json_writer& j) const +void as_cfg_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("cellReselectionInfoCommon"); - j.start_obj(); - if (cell_resel_info_common.nrof_ss_blocks_to_average_present) { - j.write_int("nrofSS-BlocksToAverage", cell_resel_info_common.nrof_ss_blocks_to_average); - } - if (cell_resel_info_common.abs_thresh_ss_blocks_consolidation_present) { - j.write_fieldname("absThreshSS-BlocksConsolidation"); - cell_resel_info_common.abs_thresh_ss_blocks_consolidation.to_json(j); - } - if (cell_resel_info_common.range_to_best_cell_present) { - j.write_str("rangeToBestCell", cell_resel_info_common.range_to_best_cell.to_string()); - } - j.write_str("q-Hyst", cell_resel_info_common.q_hyst.to_string()); - if (cell_resel_info_common.speed_state_resel_pars_present) { - j.write_fieldname("speedStateReselectionPars"); - j.start_obj(); - j.write_fieldname("mobilityStateParameters"); - cell_resel_info_common.speed_state_resel_pars.mob_state_params.to_json(j); - j.write_fieldname("q-HystSF"); - j.start_obj(); - j.write_str("sf-Medium", cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_medium.to_string()); - j.write_str("sf-High", cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_high.to_string()); - j.end_obj(); - j.end_obj(); - } - j.end_obj(); - j.write_fieldname("cellReselectionServingFreqInfo"); - j.start_obj(); - if (cell_resel_serving_freq_info.s_non_intra_search_p_present) { - j.write_int("s-NonIntraSearchP", cell_resel_serving_freq_info.s_non_intra_search_p); - } - if (cell_resel_serving_freq_info.s_non_intra_search_q_present) { - j.write_int("s-NonIntraSearchQ", cell_resel_serving_freq_info.s_non_intra_search_q); - } - j.write_int("threshServingLowP", cell_resel_serving_freq_info.thresh_serving_low_p); - if (cell_resel_serving_freq_info.thresh_serving_low_q_present) { - j.write_int("threshServingLowQ", cell_resel_serving_freq_info.thresh_serving_low_q); - } - j.write_int("cellReselectionPriority", cell_resel_serving_freq_info.cell_resel_prio); - if (cell_resel_serving_freq_info.cell_resel_sub_prio_present) { - j.write_str("cellReselectionSubPriority", cell_resel_serving_freq_info.cell_resel_sub_prio.to_string()); - } - j.end_obj(); - j.write_fieldname("intraFreqCellReselectionInfo"); - intra_freq_cell_resel_info.to_json(j); + j.write_str("rrcReconfiguration", rrc_recfg.to_string()); if (ext) { - if (relaxed_meas_r16.is_present()) { - j.write_fieldname("relaxedMeasurement-r16"); - j.start_obj(); - if (relaxed_meas_r16->low_mob_eval_r16_present) { - j.write_fieldname("lowMobilityEvaluation-r16"); - j.start_obj(); - j.write_str("s-SearchDeltaP-r16", relaxed_meas_r16->low_mob_eval_r16.s_search_delta_p_r16.to_string()); - j.write_str("t-SearchDeltaP-r16", relaxed_meas_r16->low_mob_eval_r16.t_search_delta_p_r16.to_string()); - j.end_obj(); - } - if (relaxed_meas_r16->cell_edge_eval_r16_present) { - j.write_fieldname("cellEdgeEvaluation-r16"); - j.start_obj(); - j.write_int("s-SearchThresholdP-r16", relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_p_r16); - if (relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16_present) { - j.write_int("s-SearchThresholdQ-r16", relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16); - } - j.end_obj(); - } - if (relaxed_meas_r16->combine_relaxed_meas_condition_r16_present) { - j.write_str("combineRelaxedMeasCondition-r16", "true"); - } - if (relaxed_meas_r16->high_prio_meas_relax_r16_present) { - j.write_str("highPriorityMeasRelax-r16", "true"); - } - j.end_obj(); + if (source_rb_sn_cfg.size() > 0) { + j.write_str("sourceRB-SN-Config", source_rb_sn_cfg.to_string()); } - if (cell_equivalent_size_r17_present) { - j.write_int("cellEquivalentSize-r17", cell_equivalent_size_r17); + if (source_scg_nr_cfg.size() > 0) { + j.write_str("sourceSCG-NR-Config", source_scg_nr_cfg.to_string()); } - if (relaxed_meas_r17.is_present()) { - j.write_fieldname("relaxedMeasurement-r17"); - j.start_obj(); - j.write_fieldname("stationaryMobilityEvaluation-r17"); - j.start_obj(); - j.write_str("s-SearchDeltaP-Stationary-r17", - relaxed_meas_r17->stationary_mob_eval_r17.s_search_delta_p_stationary_r17.to_string()); - j.write_str("t-SearchDeltaP-Stationary-r17", - relaxed_meas_r17->stationary_mob_eval_r17.t_search_delta_p_stationary_r17.to_string()); - j.end_obj(); - if (relaxed_meas_r17->cell_edge_eval_while_stationary_r17_present) { - j.write_fieldname("cellEdgeEvaluationWhileStationary-r17"); - j.start_obj(); - j.write_int("s-SearchThresholdP2-r17", - relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_p2_r17); - if (relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17_present) { - j.write_int("s-SearchThresholdQ2-r17", - relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17); - } - j.end_obj(); - } - if (relaxed_meas_r17->combine_relaxed_meas_condition2_r17_present) { - j.write_str("combineRelaxedMeasCondition2-r17", "true"); - } - j.end_obj(); + if (source_scg_eutra_cfg.size() > 0) { + j.write_str("sourceSCG-EUTRA-Config", source_scg_eutra_cfg.to_string()); + } + if (source_scg_cfg_present) { + j.write_str("sourceSCG-Configured", "true"); + } + if (sdt_cfg_r17.is_present()) { + j.write_fieldname("sdt-Config-r17"); + sdt_cfg_r17->to_json(j); } } j.end_obj(); } -const char* sib2_s::cell_resel_info_common_s_::q_hyst_opts::to_string() const -{ - static const char* names[] = {"dB0", - "dB1", - "dB2", - "dB3", - "dB4", - "dB5", - "dB6", - "dB8", - "dB10", - "dB12", - "dB14", - "dB16", - "dB18", - "dB20", - "dB22", - "dB24"}; - return convert_enum_idx(names, 16, value, "sib2_s::cell_resel_info_common_s_::q_hyst_e_"); -} -uint8_t sib2_s::cell_resel_info_common_s_::q_hyst_opts::to_number() const +// ReestabNCellInfo ::= SEQUENCE +SRSASN_CODE reestab_ncell_info_s::pack(bit_ref& bref) const { - static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; - return map_enum_number(numbers, 16, value, "sib2_s::cell_resel_info_common_s_::q_hyst_e_"); -} + HANDLE_CODE(cell_id.pack(bref)); + HANDLE_CODE(key_g_node_b_star.pack(bref)); + HANDLE_CODE(short_mac_i.pack(bref)); -const char* -sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_opts::to_string() const -{ - static const char* names[] = {"dB-6", "dB-4", "dB-2", "dB0"}; - return convert_enum_idx( - names, 4, value, "sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_e_"); + return SRSASN_SUCCESS; } -int8_t sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_opts::to_number() const +SRSASN_CODE reestab_ncell_info_s::unpack(cbit_ref& bref) { - static const int8_t numbers[] = {-6, -4, -2, 0}; - return map_enum_number( - numbers, 4, value, "sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_e_"); -} + HANDLE_CODE(cell_id.unpack(bref)); + HANDLE_CODE(key_g_node_b_star.unpack(bref)); + HANDLE_CODE(short_mac_i.unpack(bref)); -const char* sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_opts::to_string() const -{ - static const char* names[] = {"dB-6", "dB-4", "dB-2", "dB0"}; - return convert_enum_idx( - names, 4, value, "sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_e_"); + return SRSASN_SUCCESS; } -int8_t sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_opts::to_number() const +void reestab_ncell_info_s::to_json(json_writer& j) const { - static const int8_t numbers[] = {-6, -4, -2, 0}; - return map_enum_number( - numbers, 4, value, "sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_e_"); + j.start_obj(); + j.write_str("cellIdentity", cell_id.to_string()); + j.write_str("key-gNodeB-Star", key_g_node_b_star.to_string()); + j.write_str("shortMAC-I", short_mac_i.to_string()); + j.end_obj(); } -SRSASN_CODE sib2_s::intra_freq_cell_resel_info_s_::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(q_rx_lev_min_sul_present, 1)); - HANDLE_CODE(bref.pack(q_qual_min_present, 1)); - HANDLE_CODE(bref.pack(s_intra_search_q_present, 1)); - HANDLE_CODE(bref.pack(freq_band_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(freq_band_list_sul.size() > 0, 1)); - HANDLE_CODE(bref.pack(p_max_present, 1)); - HANDLE_CODE(bref.pack(smtc_present, 1)); - HANDLE_CODE(bref.pack(ss_rssi_meas_present, 1)); - HANDLE_CODE(bref.pack(ssb_to_measure_present, 1)); - - HANDLE_CODE(pack_integer(bref, q_rx_lev_min, (int8_t)-70, (int8_t)-22)); - if (q_rx_lev_min_sul_present) { - HANDLE_CODE(pack_integer(bref, q_rx_lev_min_sul, (int8_t)-70, (int8_t)-22)); - } - if (q_qual_min_present) { - HANDLE_CODE(pack_integer(bref, q_qual_min, (int8_t)-43, (int8_t)-12)); - } - HANDLE_CODE(pack_integer(bref, s_intra_search_p, (uint8_t)0u, (uint8_t)31u)); - if (s_intra_search_q_present) { - HANDLE_CODE(pack_integer(bref, s_intra_search_q, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(pack_integer(bref, t_resel_nr, (uint8_t)0u, (uint8_t)7u)); - if (freq_band_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8)); - } - if (freq_band_list_sul.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list_sul, 1, 8)); - } - if (p_max_present) { - HANDLE_CODE(pack_integer(bref, p_max, (int8_t)-30, (int8_t)33)); - } - if (smtc_present) { - HANDLE_CODE(smtc.pack(bref)); - } - if (ss_rssi_meas_present) { - HANDLE_CODE(ss_rssi_meas.pack(bref)); - } - if (ssb_to_measure_present) { - HANDLE_CODE(ssb_to_measure.pack(bref)); - } - HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell, 1)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= t_resel_nr_sf.is_present(); - group_flags[1] |= smtc2_lp_r16.is_present(); - group_flags[1] |= ssb_position_qcl_common_r16_present; - group_flags[2] |= ssb_position_qcl_common_r17_present; - group_flags[3] |= smtc4list_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(t_resel_nr_sf.is_present(), 1)); - if (t_resel_nr_sf.is_present()) { - HANDLE_CODE(t_resel_nr_sf->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(smtc2_lp_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(ssb_position_qcl_common_r16_present, 1)); - if (smtc2_lp_r16.is_present()) { - HANDLE_CODE(smtc2_lp_r16->pack(bref)); - } - if (ssb_position_qcl_common_r16_present) { - HANDLE_CODE(ssb_position_qcl_common_r16.pack(bref)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ssb_position_qcl_common_r17_present, 1)); - if (ssb_position_qcl_common_r17_present) { - HANDLE_CODE(ssb_position_qcl_common_r17.pack(bref)); - } - } - if (group_flags[3]) { - varlength_field_pack_guard varlen_scope(bref, false); +// 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)); - HANDLE_CODE(bref.pack(smtc4list_r17.is_present(), 1)); - if (smtc4list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *smtc4list_r17, 1, 3)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE sib2_s::intra_freq_cell_resel_info_s_::unpack(cbit_ref& bref) +SRSASN_CODE band_combination_info_sn_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(q_rx_lev_min_sul_present, 1)); - HANDLE_CODE(bref.unpack(q_qual_min_present, 1)); - HANDLE_CODE(bref.unpack(s_intra_search_q_present, 1)); - bool freq_band_list_present; - HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); - bool freq_band_list_sul_present; - HANDLE_CODE(bref.unpack(freq_band_list_sul_present, 1)); - HANDLE_CODE(bref.unpack(p_max_present, 1)); - HANDLE_CODE(bref.unpack(smtc_present, 1)); - HANDLE_CODE(bref.unpack(ss_rssi_meas_present, 1)); - HANDLE_CODE(bref.unpack(ssb_to_measure_present, 1)); - - HANDLE_CODE(unpack_integer(q_rx_lev_min, bref, (int8_t)-70, (int8_t)-22)); - if (q_rx_lev_min_sul_present) { - HANDLE_CODE(unpack_integer(q_rx_lev_min_sul, bref, (int8_t)-70, (int8_t)-22)); - } - if (q_qual_min_present) { - HANDLE_CODE(unpack_integer(q_qual_min, bref, (int8_t)-43, (int8_t)-12)); - } - HANDLE_CODE(unpack_integer(s_intra_search_p, bref, (uint8_t)0u, (uint8_t)31u)); - if (s_intra_search_q_present) { - HANDLE_CODE(unpack_integer(s_intra_search_q, bref, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(unpack_integer(t_resel_nr, bref, (uint8_t)0u, (uint8_t)7u)); - if (freq_band_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8)); - } - if (freq_band_list_sul_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_band_list_sul, bref, 1, 8)); - } - if (p_max_present) { - HANDLE_CODE(unpack_integer(p_max, bref, (int8_t)-30, (int8_t)33)); - } - if (smtc_present) { - HANDLE_CODE(smtc.unpack(bref)); - } - if (ss_rssi_meas_present) { - HANDLE_CODE(ss_rssi_meas.unpack(bref)); - } - if (ssb_to_measure_present) { - HANDLE_CODE(ssb_to_measure.unpack(bref)); - } - HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell, 1)); - - if (ext) { - ext_groups_unpacker_guard group_flags(4); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(t_resel_nr_sf, bref); - if (t_resel_nr_sf.is_present()) { - HANDLE_CODE(t_resel_nr_sf->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(smtc2_lp_r16, bref); - HANDLE_CODE(bref.unpack(ssb_position_qcl_common_r16_present, 1)); - if (smtc2_lp_r16.is_present()) { - HANDLE_CODE(smtc2_lp_r16->unpack(bref)); - } - if (ssb_position_qcl_common_r16_present) { - HANDLE_CODE(ssb_position_qcl_common_r16.unpack(bref)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(ssb_position_qcl_common_r17_present, 1)); - if (ssb_position_qcl_common_r17_present) { - HANDLE_CODE(ssb_position_qcl_common_r17.unpack(bref)); - } - } - if (group_flags[3]) { - varlength_field_unpack_guard varlen_scope(bref, false); + 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)); - unpack_presence_flag(smtc4list_r17, bref); - if (smtc4list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*smtc4list_r17, bref, 1, 3)); - } - } - } return SRSASN_SUCCESS; } -void sib2_s::intra_freq_cell_resel_info_s_::to_json(json_writer& j) const +void band_combination_info_sn_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("q-RxLevMin", q_rx_lev_min); - if (q_rx_lev_min_sul_present) { - j.write_int("q-RxLevMinSUL", q_rx_lev_min_sul); - } - if (q_qual_min_present) { - j.write_int("q-QualMin", q_qual_min); - } - j.write_int("s-IntraSearchP", s_intra_search_p); - if (s_intra_search_q_present) { - j.write_int("s-IntraSearchQ", s_intra_search_q); - } - j.write_int("t-ReselectionNR", t_resel_nr); - if (freq_band_list.size() > 0) { - j.start_array("frequencyBandList"); - for (const auto& e1 : freq_band_list) { - e1.to_json(j); - } - j.end_array(); - } - if (freq_band_list_sul.size() > 0) { - j.start_array("frequencyBandListSUL"); - for (const auto& e1 : freq_band_list_sul) { - e1.to_json(j); - } - j.end_array(); - } - if (p_max_present) { - j.write_int("p-Max", p_max); - } - if (smtc_present) { - j.write_fieldname("smtc"); - smtc.to_json(j); - } - if (ss_rssi_meas_present) { - j.write_fieldname("ss-RSSI-Measurement"); - ss_rssi_meas.to_json(j); - } - if (ssb_to_measure_present) { - j.write_fieldname("ssb-ToMeasure"); - ssb_to_measure.to_json(j); - } - j.write_bool("deriveSSB-IndexFromCell", derive_ssb_idx_from_cell); - if (ext) { - if (t_resel_nr_sf.is_present()) { - j.write_fieldname("t-ReselectionNR-SF"); - t_resel_nr_sf->to_json(j); - } - if (smtc2_lp_r16.is_present()) { - j.write_fieldname("smtc2-LP-r16"); - smtc2_lp_r16->to_json(j); - } - if (ssb_position_qcl_common_r16_present) { - j.write_str("ssb-PositionQCL-Common-r16", ssb_position_qcl_common_r16.to_string()); - } - if (ssb_position_qcl_common_r17_present) { - j.write_str("ssb-PositionQCL-Common-r17", ssb_position_qcl_common_r17.to_string()); - } - if (smtc4list_r17.is_present()) { - j.start_array("smtc4list-r17"); - for (const auto& e1 : *smtc4list_r17) { - e1.to_json(j); - } - j.end_array(); - } - } + j.write_int("bandCombinationIndex", band_combination_idx); + j.write_int("requestedFeatureSets", requested_feature_sets); j.end_obj(); } -const char* sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::s_search_delta_p_r16_opts::to_string() const -{ - static const char* names[] = {"dB3", "dB6", "dB9", "dB12", "dB15", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::s_search_delta_p_r16_e_"); -} -uint8_t sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::s_search_delta_p_r16_opts::to_number() const +// ConfigRestrictInfoDAPS-r16 ::= SEQUENCE +SRSASN_CODE cfg_restrict_info_daps_r16_s::pack(bit_ref& bref) const { - static const uint8_t numbers[] = {3, 6, 9, 12, 15}; - return map_enum_number( - numbers, 5, value, "sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::s_search_delta_p_r16_e_"); -} + HANDLE_CODE(bref.pack(pwr_coordination_r16_present, 1)); -const char* sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::t_search_delta_p_r16_opts::to_string() const -{ - static const char* names[] = {"s5", - "s10", - "s20", - "s30", - "s60", - "s120", - "s180", - "s240", - "s300", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx( - names, 16, value, "sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::t_search_delta_p_r16_e_"); + if (pwr_coordination_r16_present) { + HANDLE_CODE(pack_integer(bref, pwr_coordination_r16.p_daps_source_r16, (int8_t)-30, (int8_t)33)); + HANDLE_CODE(pack_integer(bref, pwr_coordination_r16.p_daps_target_r16, (int8_t)-30, (int8_t)33)); + HANDLE_CODE(pwr_coordination_r16.ul_pwr_sharing_daps_mode_r16.pack(bref)); + } + + return SRSASN_SUCCESS; } -uint16_t sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::t_search_delta_p_r16_opts::to_number() const +SRSASN_CODE cfg_restrict_info_daps_r16_s::unpack(cbit_ref& bref) { - static const uint16_t numbers[] = {5, 10, 20, 30, 60, 120, 180, 240, 300}; - return map_enum_number( - numbers, 9, value, "sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::t_search_delta_p_r16_e_"); -} + HANDLE_CODE(bref.unpack(pwr_coordination_r16_present, 1)); -const char* -sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::s_search_delta_p_stationary_r17_opts::to_string() const -{ - static const char* names[] = {"dB2", "dB3", "dB6", "dB9", "dB12", "dB15", "spare2", "spare1"}; - return convert_enum_idx( - names, 8, value, "sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::s_search_delta_p_stationary_r17_e_"); + if (pwr_coordination_r16_present) { + HANDLE_CODE(unpack_integer(pwr_coordination_r16.p_daps_source_r16, bref, (int8_t)-30, (int8_t)33)); + HANDLE_CODE(unpack_integer(pwr_coordination_r16.p_daps_target_r16, bref, (int8_t)-30, (int8_t)33)); + HANDLE_CODE(pwr_coordination_r16.ul_pwr_sharing_daps_mode_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; } -uint8_t sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::s_search_delta_p_stationary_r17_opts::to_number() const +void cfg_restrict_info_daps_r16_s::to_json(json_writer& j) const { - static const uint8_t numbers[] = {2, 3, 6, 9, 12, 15}; - return map_enum_number( - numbers, 6, value, "sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::s_search_delta_p_stationary_r17_e_"); + j.start_obj(); + if (pwr_coordination_r16_present) { + j.write_fieldname("powerCoordination-r16"); + j.start_obj(); + j.write_int("p-DAPS-Source-r16", pwr_coordination_r16.p_daps_source_r16); + j.write_int("p-DAPS-Target-r16", pwr_coordination_r16.p_daps_target_r16); + j.write_str("uplinkPowerSharingDAPS-Mode-r16", pwr_coordination_r16.ul_pwr_sharing_daps_mode_r16.to_string()); + j.end_obj(); + } + j.end_obj(); } -const char* -sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::t_search_delta_p_stationary_r17_opts::to_string() const -{ - static const char* names[] = {"s5", - "s10", - "s20", - "s30", - "s60", - "s120", - "s180", - "s240", - "s300", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; +const char* cfg_restrict_info_daps_r16_s::pwr_coordination_r16_s_::ul_pwr_sharing_daps_mode_r16_opts::to_string() const +{ + static const char* names[] = {"semi-static-mode1", "semi-static-mode2", "dynamic"}; return convert_enum_idx( - names, 16, value, "sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::t_search_delta_p_stationary_r17_e_"); + names, 3, value, "cfg_restrict_info_daps_r16_s::pwr_coordination_r16_s_::ul_pwr_sharing_daps_mode_r16_e_"); } -uint16_t -sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::t_search_delta_p_stationary_r17_opts::to_number() const +uint8_t cfg_restrict_info_daps_r16_s::pwr_coordination_r16_s_::ul_pwr_sharing_daps_mode_r16_opts::to_number() const { - static const uint16_t numbers[] = {5, 10, 20, 30, 60, 120, 180, 240, 300}; + static const uint8_t numbers[] = {1, 2}; return map_enum_number( - numbers, 9, value, "sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::t_search_delta_p_stationary_r17_e_"); + numbers, 2, value, "cfg_restrict_info_daps_r16_s::pwr_coordination_r16_s_::ul_pwr_sharing_daps_mode_r16_e_"); } -// SIB20-r17 ::= SEQUENCE -SRSASN_CODE sib20_r17_s::pack(bit_ref& bref) const +// ConfigRestrictInfoDAPS-v1640 ::= SEQUENCE +SRSASN_CODE cfg_restrict_info_daps_v1640_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cfr_cfg_mcch_mtch_r17_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - - HANDLE_CODE(mcch_cfg_r17.pack(bref)); - if (cfr_cfg_mcch_mtch_r17_present) { - HANDLE_CODE(cfr_cfg_mcch_mtch_r17.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, source_feature_set_per_dl_cc_r16, (uint16_t)1u, (uint16_t)1024u)); + HANDLE_CODE(pack_integer(bref, source_feature_set_per_ul_cc_r16, (uint16_t)1u, (uint16_t)1024u)); return SRSASN_SUCCESS; } -SRSASN_CODE sib20_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE cfg_restrict_info_daps_v1640_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(cfr_cfg_mcch_mtch_r17_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - - HANDLE_CODE(mcch_cfg_r17.unpack(bref)); - if (cfr_cfg_mcch_mtch_r17_present) { - HANDLE_CODE(cfr_cfg_mcch_mtch_r17.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } + HANDLE_CODE(unpack_integer(source_feature_set_per_dl_cc_r16, bref, (uint16_t)1u, (uint16_t)1024u)); + HANDLE_CODE(unpack_integer(source_feature_set_per_ul_cc_r16, bref, (uint16_t)1u, (uint16_t)1024u)); return SRSASN_SUCCESS; } -void sib20_r17_s::to_json(json_writer& j) const +void cfg_restrict_info_daps_v1640_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("mcch-Config-r17"); - mcch_cfg_r17.to_json(j); - if (cfr_cfg_mcch_mtch_r17_present) { - j.write_fieldname("cfr-ConfigMCCH-MTCH-r17"); - cfr_cfg_mcch_mtch_r17.to_json(j); - } - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } + j.write_int("sourceFeatureSetPerDownlinkCC-r16", source_feature_set_per_dl_cc_r16); + j.write_int("sourceFeatureSetPerUplinkCC-r16", source_feature_set_per_ul_cc_r16); j.end_obj(); } -// SIB21-r17 ::= SEQUENCE -SRSASN_CODE sib21_r17_s::pack(bit_ref& bref) const +// ReestablishmentInfo ::= SEQUENCE +SRSASN_CODE reest_info_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(mbs_fsai_intra_freq_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(mbs_fsai_inter_freq_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(add_reestab_info_list.size() > 0, 1)); - if (mbs_fsai_intra_freq_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, mbs_fsai_intra_freq_r17, 1, 64)); - } - if (mbs_fsai_inter_freq_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, mbs_fsai_inter_freq_list_r17, 1, 8)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); + HANDLE_CODE(pack_integer(bref, source_pci, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(target_cell_short_mac_i.pack(bref)); + if (add_reestab_info_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, add_reestab_info_list, 1, 32)); } return SRSASN_SUCCESS; } -SRSASN_CODE sib21_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE reest_info_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - bool mbs_fsai_intra_freq_r17_present; - HANDLE_CODE(bref.unpack(mbs_fsai_intra_freq_r17_present, 1)); - bool mbs_fsai_inter_freq_list_r17_present; - HANDLE_CODE(bref.unpack(mbs_fsai_inter_freq_list_r17_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + bool add_reestab_info_list_present; + HANDLE_CODE(bref.unpack(add_reestab_info_list_present, 1)); - if (mbs_fsai_intra_freq_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(mbs_fsai_intra_freq_r17, bref, 1, 64)); - } - if (mbs_fsai_inter_freq_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(mbs_fsai_inter_freq_list_r17, bref, 1, 8)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); + HANDLE_CODE(unpack_integer(source_pci, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(target_cell_short_mac_i.unpack(bref)); + if (add_reestab_info_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(add_reestab_info_list, bref, 1, 32)); } return SRSASN_SUCCESS; } -void sib21_r17_s::to_json(json_writer& j) const +void reest_info_s::to_json(json_writer& j) const { j.start_obj(); - if (mbs_fsai_intra_freq_r17.size() > 0) { - j.start_array("mbs-FSAI-IntraFreq-r17"); - for (const auto& e1 : mbs_fsai_intra_freq_r17) { - j.write_str(e1.to_string()); - } - j.end_array(); - } - if (mbs_fsai_inter_freq_list_r17.size() > 0) { - j.start_array("mbs-FSAI-InterFreqList-r17"); - for (const auto& e1 : mbs_fsai_inter_freq_list_r17) { + j.write_int("sourcePhysCellId", source_pci); + j.write_str("targetCellShortMAC-I", target_cell_short_mac_i.to_string()); + if (add_reestab_info_list.size() > 0) { + j.start_array("additionalReestabInfoList"); + for (const auto& e1 : add_reestab_info_list) { e1.to_json(j); } j.end_array(); } - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } j.end_obj(); } -// SIB3 ::= SEQUENCE -SRSASN_CODE sib3_s::pack(bit_ref& bref) const +// AS-Context ::= SEQUENCE +SRSASN_CODE as_context_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(intra_freq_neigh_cell_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(intra_freq_excluded_cell_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(reest_info_present, 1)); + HANDLE_CODE(bref.pack(cfg_restrict_info_present, 1)); - if (intra_freq_neigh_cell_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, intra_freq_neigh_cell_list, 1, 16)); - } - if (intra_freq_excluded_cell_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, intra_freq_excluded_cell_list, 1, 16)); + if (reest_info_present) { + HANDLE_CODE(reest_info.pack(bref)); } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); + if (cfg_restrict_info_present) { + HANDLE_CODE(cfg_restrict_info.pack(bref)); } if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= intra_freq_neigh_cell_list_v1610.is_present(); - group_flags[0] |= intra_freq_allowed_cell_list_r16.is_present(); - group_flags[0] |= intra_freq_cag_cell_list_r16.is_present(); - group_flags[1] |= intra_freq_neigh_hsdn_cell_list_r17.is_present(); - group_flags[1] |= intra_freq_neigh_cell_list_v1710.is_present(); - group_flags[2] |= ch_access_mode2_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(intra_freq_neigh_cell_list_v1610.is_present(), 1)); - HANDLE_CODE(bref.pack(intra_freq_allowed_cell_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(intra_freq_cag_cell_list_r16.is_present(), 1)); - if (intra_freq_neigh_cell_list_v1610.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *intra_freq_neigh_cell_list_v1610, 1, 16)); - } - if (intra_freq_allowed_cell_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *intra_freq_allowed_cell_list_r16, 1, 16)); - } - if (intra_freq_cag_cell_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *intra_freq_cag_cell_list_r16, 1, 12)); + group_flags[0] |= ran_notif_area_info.is_present(); + group_flags[1] |= ue_assist_info.size() > 0; + group_flags[2] |= sel_band_combination_sn.is_present(); + group_flags[3] |= cfg_restrict_info_daps_r16.is_present(); + group_flags[3] |= sidelink_ue_info_nr_r16.size() > 0; + group_flags[3] |= sidelink_ue_info_eutra_r16.size() > 0; + group_flags[3] |= ue_assist_info_eutra_r16.size() > 0; + group_flags[3] |= ue_assist_info_scg_r16.size() > 0; + group_flags[3] |= need_for_gaps_info_nr_r16.is_present(); + group_flags[4] |= cfg_restrict_info_daps_v1640.is_present(); + group_flags[5] |= need_for_gap_ncsg_info_nr_r17.is_present(); + group_flags[5] |= need_for_gap_ncsg_info_eutra_r17.is_present(); + group_flags[5] |= mbs_interest_ind_r17.size() > 0; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ran_notif_area_info.is_present(), 1)); + if (ran_notif_area_info.is_present()) { + HANDLE_CODE(ran_notif_area_info->pack(bref)); } } if (group_flags[1]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(intra_freq_neigh_hsdn_cell_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(intra_freq_neigh_cell_list_v1710.is_present(), 1)); - if (intra_freq_neigh_hsdn_cell_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *intra_freq_neigh_hsdn_cell_list_r17, 1, 16)); - } - if (intra_freq_neigh_cell_list_v1710.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *intra_freq_neigh_cell_list_v1710, 1, 16)); + HANDLE_CODE(bref.pack(ue_assist_info.size() > 0, 1)); + if (ue_assist_info.size() > 0) { + HANDLE_CODE(ue_assist_info.pack(bref)); } } if (group_flags[2]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(ch_access_mode2_r17_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sib3_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool intra_freq_neigh_cell_list_present; - HANDLE_CODE(bref.unpack(intra_freq_neigh_cell_list_present, 1)); - bool intra_freq_excluded_cell_list_present; - HANDLE_CODE(bref.unpack(intra_freq_excluded_cell_list_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - - if (intra_freq_neigh_cell_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(intra_freq_neigh_cell_list, bref, 1, 16)); - } - if (intra_freq_excluded_cell_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(intra_freq_excluded_cell_list, bref, 1, 16)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(3); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(intra_freq_neigh_cell_list_v1610, bref); - unpack_presence_flag(intra_freq_allowed_cell_list_r16, bref); - unpack_presence_flag(intra_freq_cag_cell_list_r16, bref); - if (intra_freq_neigh_cell_list_v1610.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*intra_freq_neigh_cell_list_v1610, bref, 1, 16)); - } - if (intra_freq_allowed_cell_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*intra_freq_allowed_cell_list_r16, bref, 1, 16)); - } - if (intra_freq_cag_cell_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*intra_freq_cag_cell_list_r16, bref, 1, 12)); + 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)); } } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); - unpack_presence_flag(intra_freq_neigh_hsdn_cell_list_r17, bref); - unpack_presence_flag(intra_freq_neigh_cell_list_v1710, bref); - if (intra_freq_neigh_hsdn_cell_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*intra_freq_neigh_hsdn_cell_list_r17, bref, 1, 16)); - } - if (intra_freq_neigh_cell_list_v1710.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*intra_freq_neigh_cell_list_v1710, bref, 1, 16)); + HANDLE_CODE(bref.pack(cfg_restrict_info_daps_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(sidelink_ue_info_nr_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sidelink_ue_info_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(ue_assist_info_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(ue_assist_info_scg_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(need_for_gaps_info_nr_r16.is_present(), 1)); + if (cfg_restrict_info_daps_r16.is_present()) { + HANDLE_CODE(cfg_restrict_info_daps_r16->pack(bref)); } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(ch_access_mode2_r17_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void sib3_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (intra_freq_neigh_cell_list.size() > 0) { - j.start_array("intraFreqNeighCellList"); - for (const auto& e1 : intra_freq_neigh_cell_list) { - e1.to_json(j); - } - j.end_array(); - } - if (intra_freq_excluded_cell_list.size() > 0) { - j.start_array("intraFreqExcludedCellList"); - for (const auto& e1 : intra_freq_excluded_cell_list) { - e1.to_json(j); - } - j.end_array(); - } - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (ext) { - if (intra_freq_neigh_cell_list_v1610.is_present()) { - j.start_array("intraFreqNeighCellList-v1610"); - for (const auto& e1 : *intra_freq_neigh_cell_list_v1610) { - e1.to_json(j); + if (sidelink_ue_info_nr_r16.size() > 0) { + HANDLE_CODE(sidelink_ue_info_nr_r16.pack(bref)); } - j.end_array(); - } - if (intra_freq_allowed_cell_list_r16.is_present()) { - j.start_array("intraFreqAllowedCellList-r16"); - for (const auto& e1 : *intra_freq_allowed_cell_list_r16) { - e1.to_json(j); + if (sidelink_ue_info_eutra_r16.size() > 0) { + HANDLE_CODE(sidelink_ue_info_eutra_r16.pack(bref)); } - j.end_array(); - } - if (intra_freq_cag_cell_list_r16.is_present()) { - j.start_array("intraFreqCAG-CellList-r16"); - for (const auto& e1 : *intra_freq_cag_cell_list_r16) { - e1.to_json(j); + if (ue_assist_info_eutra_r16.size() > 0) { + HANDLE_CODE(ue_assist_info_eutra_r16.pack(bref)); } - j.end_array(); - } - if (intra_freq_neigh_hsdn_cell_list_r17.is_present()) { - j.start_array("intraFreqNeighHSDN-CellList-r17"); - for (const auto& e1 : *intra_freq_neigh_hsdn_cell_list_r17) { - e1.to_json(j); + if (ue_assist_info_scg_r16.size() > 0) { + HANDLE_CODE(ue_assist_info_scg_r16.pack(bref)); } - j.end_array(); - } - if (intra_freq_neigh_cell_list_v1710.is_present()) { - j.start_array("intraFreqNeighCellList-v1710"); - for (const auto& e1 : *intra_freq_neigh_cell_list_v1710) { - e1.to_json(j); + if (need_for_gaps_info_nr_r16.is_present()) { + HANDLE_CODE(need_for_gaps_info_nr_r16->pack(bref)); } - j.end_array(); - } - if (ch_access_mode2_r17_present) { - j.write_str("channelAccessMode2-r17", "enabled"); } - } - j.end_obj(); -} - -// SIB4 ::= SEQUENCE -SRSASN_CODE sib4_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_carrier_freq_list, 1, 8)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= inter_freq_carrier_freq_list_v1610.is_present(); - group_flags[1] |= inter_freq_carrier_freq_list_v1700.is_present(); - group_flags[2] |= inter_freq_carrier_freq_list_v1720.is_present(); - group_flags[3] |= inter_freq_carrier_freq_list_v1730.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { + if (group_flags[4]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v1610.is_present(), 1)); - if (inter_freq_carrier_freq_list_v1610.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_v1610, 1, 8)); + HANDLE_CODE(bref.pack(cfg_restrict_info_daps_v1640.is_present(), 1)); + if (cfg_restrict_info_daps_v1640.is_present()) { + HANDLE_CODE(cfg_restrict_info_daps_v1640->pack(bref)); } } - if (group_flags[1]) { + if (group_flags[5]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v1700.is_present(), 1)); - if (inter_freq_carrier_freq_list_v1700.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_v1700, 1, 8)); + HANDLE_CODE(bref.pack(need_for_gap_ncsg_info_nr_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(need_for_gap_ncsg_info_eutra_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(mbs_interest_ind_r17.size() > 0, 1)); + if (need_for_gap_ncsg_info_nr_r17.is_present()) { + HANDLE_CODE(need_for_gap_ncsg_info_nr_r17->pack(bref)); } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v1720.is_present(), 1)); - if (inter_freq_carrier_freq_list_v1720.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_v1720, 1, 8)); + if (need_for_gap_ncsg_info_eutra_r17.is_present()) { + HANDLE_CODE(need_for_gap_ncsg_info_eutra_r17->pack(bref)); } - } - if (group_flags[3]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v1730.is_present(), 1)); - if (inter_freq_carrier_freq_list_v1730.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_v1730, 1, 8)); + if (mbs_interest_ind_r17.size() > 0) { + HANDLE_CODE(mbs_interest_ind_r17.pack(bref)); } } } return SRSASN_SUCCESS; } -SRSASN_CODE sib4_s::unpack(cbit_ref& bref) +SRSASN_CODE as_context_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(reest_info_present, 1)); + HANDLE_CODE(bref.unpack(cfg_restrict_info_present, 1)); - HANDLE_CODE(unpack_dyn_seq_of(inter_freq_carrier_freq_list, bref, 1, 8)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); + if (reest_info_present) { + HANDLE_CODE(reest_info.unpack(bref)); + } + if (cfg_restrict_info_present) { + HANDLE_CODE(cfg_restrict_info.unpack(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]) { varlength_field_unpack_guard varlen_scope(bref, false); - unpack_presence_flag(inter_freq_carrier_freq_list_v1610, bref); - if (inter_freq_carrier_freq_list_v1610.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_v1610, bref, 1, 8)); + unpack_presence_flag(ran_notif_area_info, bref); + if (ran_notif_area_info.is_present()) { + HANDLE_CODE(ran_notif_area_info->unpack(bref)); } } if (group_flags[1]) { varlength_field_unpack_guard varlen_scope(bref, false); - unpack_presence_flag(inter_freq_carrier_freq_list_v1700, bref); - if (inter_freq_carrier_freq_list_v1700.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_v1700, bref, 1, 8)); + bool ue_assist_info_present; + HANDLE_CODE(bref.unpack(ue_assist_info_present, 1)); + if (ue_assist_info_present) { + HANDLE_CODE(ue_assist_info.unpack(bref)); } } if (group_flags[2]) { varlength_field_unpack_guard varlen_scope(bref, false); - unpack_presence_flag(inter_freq_carrier_freq_list_v1720, bref); - if (inter_freq_carrier_freq_list_v1720.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_v1720, bref, 1, 8)); + unpack_presence_flag(sel_band_combination_sn, bref); + if (sel_band_combination_sn.is_present()) { + HANDLE_CODE(sel_band_combination_sn->unpack(bref)); } } if (group_flags[3]) { varlength_field_unpack_guard varlen_scope(bref, false); - unpack_presence_flag(inter_freq_carrier_freq_list_v1730, bref); - if (inter_freq_carrier_freq_list_v1730.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_v1730, bref, 1, 8)); + unpack_presence_flag(cfg_restrict_info_daps_r16, bref); + bool sidelink_ue_info_nr_r16_present; + HANDLE_CODE(bref.unpack(sidelink_ue_info_nr_r16_present, 1)); + bool sidelink_ue_info_eutra_r16_present; + HANDLE_CODE(bref.unpack(sidelink_ue_info_eutra_r16_present, 1)); + bool ue_assist_info_eutra_r16_present; + HANDLE_CODE(bref.unpack(ue_assist_info_eutra_r16_present, 1)); + bool ue_assist_info_scg_r16_present; + HANDLE_CODE(bref.unpack(ue_assist_info_scg_r16_present, 1)); + unpack_presence_flag(need_for_gaps_info_nr_r16, bref); + if (cfg_restrict_info_daps_r16.is_present()) { + HANDLE_CODE(cfg_restrict_info_daps_r16->unpack(bref)); } - } - } - return SRSASN_SUCCESS; -} -void sib4_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("interFreqCarrierFreqList"); - for (const auto& e1 : inter_freq_carrier_freq_list) { - e1.to_json(j); - } - j.end_array(); - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (ext) { - if (inter_freq_carrier_freq_list_v1610.is_present()) { - j.start_array("interFreqCarrierFreqList-v1610"); - for (const auto& e1 : *inter_freq_carrier_freq_list_v1610) { - e1.to_json(j); + if (sidelink_ue_info_nr_r16_present) { + HANDLE_CODE(sidelink_ue_info_nr_r16.unpack(bref)); } - j.end_array(); - } - if (inter_freq_carrier_freq_list_v1700.is_present()) { - j.start_array("interFreqCarrierFreqList-v1700"); - for (const auto& e1 : *inter_freq_carrier_freq_list_v1700) { - e1.to_json(j); + if (sidelink_ue_info_eutra_r16_present) { + HANDLE_CODE(sidelink_ue_info_eutra_r16.unpack(bref)); + } + if (ue_assist_info_eutra_r16_present) { + HANDLE_CODE(ue_assist_info_eutra_r16.unpack(bref)); + } + if (ue_assist_info_scg_r16_present) { + HANDLE_CODE(ue_assist_info_scg_r16.unpack(bref)); + } + if (need_for_gaps_info_nr_r16.is_present()) { + HANDLE_CODE(need_for_gaps_info_nr_r16->unpack(bref)); } - j.end_array(); } - if (inter_freq_carrier_freq_list_v1720.is_present()) { - j.start_array("interFreqCarrierFreqList-v1720"); - for (const auto& e1 : *inter_freq_carrier_freq_list_v1720) { - e1.to_json(j); + if (group_flags[4]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(cfg_restrict_info_daps_v1640, bref); + if (cfg_restrict_info_daps_v1640.is_present()) { + HANDLE_CODE(cfg_restrict_info_daps_v1640->unpack(bref)); } - j.end_array(); } - if (inter_freq_carrier_freq_list_v1730.is_present()) { - j.start_array("interFreqCarrierFreqList-v1730"); - for (const auto& e1 : *inter_freq_carrier_freq_list_v1730) { - e1.to_json(j); + if (group_flags[5]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(need_for_gap_ncsg_info_nr_r17, bref); + unpack_presence_flag(need_for_gap_ncsg_info_eutra_r17, bref); + bool mbs_interest_ind_r17_present; + HANDLE_CODE(bref.unpack(mbs_interest_ind_r17_present, 1)); + if (need_for_gap_ncsg_info_nr_r17.is_present()) { + HANDLE_CODE(need_for_gap_ncsg_info_nr_r17->unpack(bref)); + } + if (need_for_gap_ncsg_info_eutra_r17.is_present()) { + HANDLE_CODE(need_for_gap_ncsg_info_eutra_r17->unpack(bref)); + } + if (mbs_interest_ind_r17_present) { + HANDLE_CODE(mbs_interest_ind_r17.unpack(bref)); } - j.end_array(); } } - j.end_obj(); + return SRSASN_SUCCESS; } - -// SIB5 ::= SEQUENCE -SRSASN_CODE sib5_s::pack(bit_ref& bref) const +void as_context_s::to_json(json_writer& j) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(carrier_freq_list_eutra.size() > 0, 1)); - HANDLE_CODE(bref.pack(t_resel_eutra_sf_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - - if (carrier_freq_list_eutra.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, carrier_freq_list_eutra, 1, 8)); + j.start_obj(); + if (reest_info_present) { + j.write_fieldname("reestablishmentInfo"); + reest_info.to_json(j); } - HANDLE_CODE(pack_integer(bref, t_resel_eutra, (uint8_t)0u, (uint8_t)7u)); - if (t_resel_eutra_sf_present) { - HANDLE_CODE(t_resel_eutra_sf.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= carrier_freq_list_eutra_v1610.is_present(); - group_flags[1] |= carrier_freq_list_eutra_v1700.is_present(); - group_flags[1] |= idle_mode_meas_voice_fallback_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(carrier_freq_list_eutra_v1610.is_present(), 1)); - if (carrier_freq_list_eutra_v1610.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *carrier_freq_list_eutra_v1610, 1, 8)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(carrier_freq_list_eutra_v1700.is_present(), 1)); - HANDLE_CODE(bref.pack(idle_mode_meas_voice_fallback_r17_present, 1)); - if (carrier_freq_list_eutra_v1700.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *carrier_freq_list_eutra_v1700, 1, 8)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sib5_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool carrier_freq_list_eutra_present; - HANDLE_CODE(bref.unpack(carrier_freq_list_eutra_present, 1)); - HANDLE_CODE(bref.unpack(t_resel_eutra_sf_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - - if (carrier_freq_list_eutra_present) { - HANDLE_CODE(unpack_dyn_seq_of(carrier_freq_list_eutra, bref, 1, 8)); - } - HANDLE_CODE(unpack_integer(t_resel_eutra, bref, (uint8_t)0u, (uint8_t)7u)); - if (t_resel_eutra_sf_present) { - HANDLE_CODE(t_resel_eutra_sf.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.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); - - unpack_presence_flag(carrier_freq_list_eutra_v1610, bref); - if (carrier_freq_list_eutra_v1610.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*carrier_freq_list_eutra_v1610, bref, 1, 8)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(carrier_freq_list_eutra_v1700, bref); - HANDLE_CODE(bref.unpack(idle_mode_meas_voice_fallback_r17_present, 1)); - if (carrier_freq_list_eutra_v1700.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*carrier_freq_list_eutra_v1700, bref, 1, 8)); - } - } - } - return SRSASN_SUCCESS; -} -void sib5_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (carrier_freq_list_eutra.size() > 0) { - j.start_array("carrierFreqListEUTRA"); - for (const auto& e1 : carrier_freq_list_eutra) { - e1.to_json(j); - } - j.end_array(); - } - j.write_int("t-ReselectionEUTRA", t_resel_eutra); - if (t_resel_eutra_sf_present) { - j.write_fieldname("t-ReselectionEUTRA-SF"); - t_resel_eutra_sf.to_json(j); - } - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (ext) { - if (carrier_freq_list_eutra_v1610.is_present()) { - j.start_array("carrierFreqListEUTRA-v1610"); - for (const auto& e1 : *carrier_freq_list_eutra_v1610) { - e1.to_json(j); - } - j.end_array(); - } - if (carrier_freq_list_eutra_v1700.is_present()) { - j.start_array("carrierFreqListEUTRA-v1700"); - for (const auto& e1 : *carrier_freq_list_eutra_v1700) { - e1.to_json(j); - } - j.end_array(); - } - if (idle_mode_meas_voice_fallback_r17_present) { - j.write_str("idleModeMeasVoiceFallback-r17", "true"); - } - } - j.end_obj(); -} - -// SIB6 ::= SEQUENCE -SRSASN_CODE sib6_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - - HANDLE_CODE(msg_id.pack(bref)); - HANDLE_CODE(serial_num.pack(bref)); - HANDLE_CODE(warning_type.pack(bref)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sib6_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - - HANDLE_CODE(msg_id.unpack(bref)); - HANDLE_CODE(serial_num.unpack(bref)); - HANDLE_CODE(warning_type.unpack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sib6_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("messageIdentifier", msg_id.to_string()); - j.write_str("serialNumber", serial_num.to_string()); - j.write_str("warningType", warning_type.to_string()); - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - j.end_obj(); -} - -// SIB7 ::= SEQUENCE -SRSASN_CODE sib7_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(data_coding_scheme_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - - HANDLE_CODE(msg_id.pack(bref)); - HANDLE_CODE(serial_num.pack(bref)); - HANDLE_CODE(warning_msg_segment_type.pack(bref)); - HANDLE_CODE(pack_integer(bref, warning_msg_segment_num, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(warning_msg_segment.pack(bref)); - if (data_coding_scheme_present) { - HANDLE_CODE(data_coding_scheme.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sib7_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(data_coding_scheme_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - - HANDLE_CODE(msg_id.unpack(bref)); - HANDLE_CODE(serial_num.unpack(bref)); - HANDLE_CODE(warning_msg_segment_type.unpack(bref)); - HANDLE_CODE(unpack_integer(warning_msg_segment_num, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(warning_msg_segment.unpack(bref)); - if (data_coding_scheme_present) { - HANDLE_CODE(data_coding_scheme.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sib7_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("messageIdentifier", msg_id.to_string()); - j.write_str("serialNumber", serial_num.to_string()); - j.write_str("warningMessageSegmentType", warning_msg_segment_type.to_string()); - j.write_int("warningMessageSegmentNumber", warning_msg_segment_num); - j.write_str("warningMessageSegment", warning_msg_segment.to_string()); - if (data_coding_scheme_present) { - j.write_str("dataCodingScheme", data_coding_scheme.to_string()); - } - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - j.end_obj(); -} - -const char* sib7_s::warning_msg_segment_type_opts::to_string() const -{ - static const char* names[] = {"notLastSegment", "lastSegment"}; - return convert_enum_idx(names, 2, value, "sib7_s::warning_msg_segment_type_e_"); -} - -// SIB8 ::= SEQUENCE -SRSASN_CODE sib8_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(data_coding_scheme_present, 1)); - HANDLE_CODE(bref.pack(warning_area_coordinates_segment.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - - HANDLE_CODE(msg_id.pack(bref)); - HANDLE_CODE(serial_num.pack(bref)); - HANDLE_CODE(warning_msg_segment_type.pack(bref)); - HANDLE_CODE(pack_integer(bref, warning_msg_segment_num, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(warning_msg_segment.pack(bref)); - if (data_coding_scheme_present) { - HANDLE_CODE(data_coding_scheme.pack(bref)); - } - if (warning_area_coordinates_segment.size() > 0) { - HANDLE_CODE(warning_area_coordinates_segment.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sib8_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(data_coding_scheme_present, 1)); - bool warning_area_coordinates_segment_present; - HANDLE_CODE(bref.unpack(warning_area_coordinates_segment_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - - HANDLE_CODE(msg_id.unpack(bref)); - HANDLE_CODE(serial_num.unpack(bref)); - HANDLE_CODE(warning_msg_segment_type.unpack(bref)); - HANDLE_CODE(unpack_integer(warning_msg_segment_num, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(warning_msg_segment.unpack(bref)); - if (data_coding_scheme_present) { - HANDLE_CODE(data_coding_scheme.unpack(bref)); - } - if (warning_area_coordinates_segment_present) { - HANDLE_CODE(warning_area_coordinates_segment.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sib8_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("messageIdentifier", msg_id.to_string()); - j.write_str("serialNumber", serial_num.to_string()); - j.write_str("warningMessageSegmentType", warning_msg_segment_type.to_string()); - j.write_int("warningMessageSegmentNumber", warning_msg_segment_num); - j.write_str("warningMessageSegment", warning_msg_segment.to_string()); - if (data_coding_scheme_present) { - j.write_str("dataCodingScheme", data_coding_scheme.to_string()); - } - if (warning_area_coordinates_segment.size() > 0) { - j.write_str("warningAreaCoordinatesSegment", warning_area_coordinates_segment.to_string()); - } - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - j.end_obj(); -} - -const char* sib8_s::warning_msg_segment_type_opts::to_string() const -{ - static const char* names[] = {"notLastSegment", "lastSegment"}; - return convert_enum_idx(names, 2, value, "sib8_s::warning_msg_segment_type_e_"); -} - -// SIB9 ::= SEQUENCE -SRSASN_CODE sib9_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(time_info_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - - if (time_info_present) { - HANDLE_CODE(bref.pack(time_info.day_light_saving_time_present, 1)); - HANDLE_CODE(bref.pack(time_info.leap_seconds_present, 1)); - HANDLE_CODE(bref.pack(time_info.local_time_offset_present, 1)); - HANDLE_CODE(pack_integer(bref, time_info.time_info_utc, (uint64_t)0u, (uint64_t)549755813887u)); - if (time_info.day_light_saving_time_present) { - HANDLE_CODE(time_info.day_light_saving_time.pack(bref)); - } - if (time_info.leap_seconds_present) { - HANDLE_CODE(pack_integer(bref, time_info.leap_seconds, (int16_t)-127, (int16_t)128)); - } - if (time_info.local_time_offset_present) { - HANDLE_CODE(pack_integer(bref, time_info.local_time_offset, (int8_t)-63, (int8_t)64)); - } - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); + if (cfg_restrict_info_present) { + j.write_fieldname("configRestrictInfo"); + cfg_restrict_info.to_json(j); } - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= ref_time_info_r16.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ref_time_info_r16.is_present(), 1)); - if (ref_time_info_r16.is_present()) { - HANDLE_CODE(ref_time_info_r16->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sib9_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(time_info_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - - if (time_info_present) { - HANDLE_CODE(bref.unpack(time_info.day_light_saving_time_present, 1)); - HANDLE_CODE(bref.unpack(time_info.leap_seconds_present, 1)); - HANDLE_CODE(bref.unpack(time_info.local_time_offset_present, 1)); - HANDLE_CODE(unpack_integer(time_info.time_info_utc, bref, (uint64_t)0u, (uint64_t)549755813887u)); - if (time_info.day_light_saving_time_present) { - HANDLE_CODE(time_info.day_light_saving_time.unpack(bref)); + if (ran_notif_area_info.is_present()) { + j.write_fieldname("ran-NotificationAreaInfo"); + ran_notif_area_info->to_json(j); } - if (time_info.leap_seconds_present) { - HANDLE_CODE(unpack_integer(time_info.leap_seconds, bref, (int16_t)-127, (int16_t)128)); + if (ue_assist_info.size() > 0) { + j.write_str("ueAssistanceInformation", ue_assist_info.to_string()); } - if (time_info.local_time_offset_present) { - HANDLE_CODE(unpack_integer(time_info.local_time_offset, bref, (int8_t)-63, (int8_t)64)); + if (sel_band_combination_sn.is_present()) { + j.write_fieldname("selectedBandCombinationSN"); + sel_band_combination_sn->to_json(j); } - } - 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); - - unpack_presence_flag(ref_time_info_r16, bref); - if (ref_time_info_r16.is_present()) { - HANDLE_CODE(ref_time_info_r16->unpack(bref)); - } + if (cfg_restrict_info_daps_r16.is_present()) { + j.write_fieldname("configRestrictInfoDAPS-r16"); + cfg_restrict_info_daps_r16->to_json(j); } - } - return SRSASN_SUCCESS; -} -void sib9_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (time_info_present) { - j.write_fieldname("timeInfo"); - j.start_obj(); - j.write_int("timeInfoUTC", time_info.time_info_utc); - if (time_info.day_light_saving_time_present) { - j.write_str("dayLightSavingTime", time_info.day_light_saving_time.to_string()); + if (sidelink_ue_info_nr_r16.size() > 0) { + j.write_str("sidelinkUEInformationNR-r16", sidelink_ue_info_nr_r16.to_string()); } - if (time_info.leap_seconds_present) { - j.write_int("leapSeconds", time_info.leap_seconds); + if (sidelink_ue_info_eutra_r16.size() > 0) { + j.write_str("sidelinkUEInformationEUTRA-r16", sidelink_ue_info_eutra_r16.to_string()); } - if (time_info.local_time_offset_present) { - j.write_int("localTimeOffset", time_info.local_time_offset); + if (ue_assist_info_eutra_r16.size() > 0) { + j.write_str("ueAssistanceInformationEUTRA-r16", ue_assist_info_eutra_r16.to_string()); } - j.end_obj(); - } - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (ext) { - if (ref_time_info_r16.is_present()) { - j.write_fieldname("referenceTimeInfo-r16"); - ref_time_info_r16->to_json(j); + if (ue_assist_info_scg_r16.size() > 0) { + j.write_str("ueAssistanceInformationSCG-r16", ue_assist_info_scg_r16.to_string()); + } + if (need_for_gaps_info_nr_r16.is_present()) { + j.write_fieldname("needForGapsInfoNR-r16"); + need_for_gaps_info_nr_r16->to_json(j); + } + if (cfg_restrict_info_daps_v1640.is_present()) { + j.write_fieldname("configRestrictInfoDAPS-v1640"); + cfg_restrict_info_daps_v1640->to_json(j); + } + if (need_for_gap_ncsg_info_nr_r17.is_present()) { + j.write_fieldname("needForGapNCSG-InfoNR-r17"); + need_for_gap_ncsg_info_nr_r17->to_json(j); + } + if (need_for_gap_ncsg_info_eutra_r17.is_present()) { + j.write_fieldname("needForGapNCSG-InfoEUTRA-r17"); + need_for_gap_ncsg_info_eutra_r17->to_json(j); + } + if (mbs_interest_ind_r17.size() > 0) { + j.write_str("mbsInterestIndication-r17", mbs_interest_ind_r17.to_string()); } } - j.end_obj(); -} - -// SIBpos-r16 ::= SEQUENCE -SRSASN_CODE sib_pos_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - - HANDLE_CODE(assist_data_sib_elem_r16.pack(bref)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sib_pos_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - - HANDLE_CODE(assist_data_sib_elem_r16.unpack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sib_pos_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("assistanceDataSIB-Element-r16", assist_data_sib_elem_r16.to_string()); - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - j.end_obj(); -} - -// SchedulingInfo ::= SEQUENCE -SRSASN_CODE sched_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(si_broadcast_status.pack(bref)); - HANDLE_CODE(si_periodicity.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, sib_map_info, 1, 32)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sched_info_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(si_broadcast_status.unpack(bref)); - HANDLE_CODE(si_periodicity.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(sib_map_info, bref, 1, 32)); - - return SRSASN_SUCCESS; -} -void sched_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("si-BroadcastStatus", si_broadcast_status.to_string()); - j.write_str("si-Periodicity", si_periodicity.to_string()); - j.start_array("sib-MappingInfo"); - for (const auto& e1 : sib_map_info) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -const char* sched_info_s::si_broadcast_status_opts::to_string() const -{ - static const char* names[] = {"broadcasting", "notBroadcasting"}; - return convert_enum_idx(names, 2, value, "sched_info_s::si_broadcast_status_e_"); -} - -const char* sched_info_s::si_periodicity_opts::to_string() const -{ - static const char* names[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; - return convert_enum_idx(names, 7, value, "sched_info_s::si_periodicity_e_"); -} -uint16_t sched_info_s::si_periodicity_opts::to_number() const -{ - static const uint16_t numbers[] = {8, 16, 32, 64, 128, 256, 512}; - return map_enum_number(numbers, 7, value, "sched_info_s::si_periodicity_e_"); -} - -// UAC-BarringInfoSet ::= SEQUENCE -SRSASN_CODE uac_barr_info_set_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(uac_barr_factor.pack(bref)); - HANDLE_CODE(uac_barr_time.pack(bref)); - HANDLE_CODE(uac_barr_for_access_id.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE uac_barr_info_set_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(uac_barr_factor.unpack(bref)); - HANDLE_CODE(uac_barr_time.unpack(bref)); - HANDLE_CODE(uac_barr_for_access_id.unpack(bref)); - - return SRSASN_SUCCESS; -} -void uac_barr_info_set_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("uac-BarringFactor", uac_barr_factor.to_string()); - j.write_str("uac-BarringTime", uac_barr_time.to_string()); - j.write_str("uac-BarringForAccessIdentity", uac_barr_for_access_id.to_string()); - j.end_obj(); -} - -const char* uac_barr_info_set_s::uac_barr_factor_opts::to_string() const -{ - static const char* names[] = { - "p00", "p05", "p10", "p15", "p20", "p25", "p30", "p40", "p50", "p60", "p70", "p75", "p80", "p85", "p90", "p95"}; - return convert_enum_idx(names, 16, value, "uac_barr_info_set_s::uac_barr_factor_e_"); -} -float uac_barr_info_set_s::uac_barr_factor_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; - return map_enum_number(numbers, 16, value, "uac_barr_info_set_s::uac_barr_factor_e_"); -} -const char* uac_barr_info_set_s::uac_barr_factor_opts::to_number_string() const -{ - static const char* number_strs[] = { - "0.0", "0.5", "1.0", "1.5", "2.0", "2.5", "3.0", "4.0", "5.0", "6.0", "7.0", "7.5", "8.0", "8.5", "9.0", "9.5"}; - return convert_enum_idx(number_strs, 16, value, "uac_barr_info_set_s::uac_barr_factor_e_"); -} - -const char* uac_barr_info_set_s::uac_barr_time_opts::to_string() const -{ - static const char* names[] = {"s4", "s8", "s16", "s32", "s64", "s128", "s256", "s512"}; - return convert_enum_idx(names, 8, value, "uac_barr_info_set_s::uac_barr_time_e_"); -} -uint16_t uac_barr_info_set_s::uac_barr_time_opts::to_number() const -{ - static const uint16_t numbers[] = {4, 8, 16, 32, 64, 128, 256, 512}; - return map_enum_number(numbers, 8, value, "uac_barr_info_set_s::uac_barr_time_e_"); -} - -// UAC-BarringPerPLMN ::= SEQUENCE -SRSASN_CODE uac_barr_per_plmn_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(uac_ac_barr_list_type_present, 1)); - - HANDLE_CODE(pack_integer(bref, plmn_id_idx, (uint8_t)1u, (uint8_t)12u)); - if (uac_ac_barr_list_type_present) { - HANDLE_CODE(uac_ac_barr_list_type.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE uac_barr_per_plmn_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(uac_ac_barr_list_type_present, 1)); - - HANDLE_CODE(unpack_integer(plmn_id_idx, bref, (uint8_t)1u, (uint8_t)12u)); - if (uac_ac_barr_list_type_present) { - HANDLE_CODE(uac_ac_barr_list_type.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void uac_barr_per_plmn_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("plmn-IdentityIndex", plmn_id_idx); - if (uac_ac_barr_list_type_present) { - j.write_fieldname("uac-ACBarringListType"); - uac_ac_barr_list_type.to_json(j); - } - j.end_obj(); -} - -void uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::destroy_() -{ - switch (type_) { - case types::uac_implicit_ac_barr_list: - c.destroy(); - break; - case types::uac_explicit_ac_barr_list: - c.destroy(); - break; - default: - break; - } -} -void uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::uac_implicit_ac_barr_list: - c.init(); - break; - case types::uac_explicit_ac_barr_list: - c.init(); - break; - case types::nulltype: - break; - default: - 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_ac_barr_list_type_c_( - const uac_barr_per_plmn_s::uac_ac_barr_list_type_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::uac_implicit_ac_barr_list: - c.init(other.c.get()); - break; - case types::uac_explicit_ac_barr_list: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - 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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::uac_implicit_ac_barr_list: - c.set(other.c.get()); - break; - case types::uac_explicit_ac_barr_list: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "uac_barr_per_plmn_s::uac_ac_barr_list_type_c_"); - } - - return *this; -} -uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::uac_implicit_ac_barr_list_l_& -uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::set_uac_implicit_ac_barr_list() -{ - set(types::uac_implicit_ac_barr_list); - return c.get(); -} -uac_barr_per_cat_list_l& uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::set_uac_explicit_ac_barr_list() -{ - set(types::uac_explicit_ac_barr_list); - return c.get(); -} -void uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::uac_implicit_ac_barr_list: - j.start_array("uac-ImplicitACBarringList"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::uac_explicit_ac_barr_list: - j.start_array("uac-ExplicitACBarringList"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "uac_barr_per_plmn_s::uac_ac_barr_list_type_c_"); - } - j.end_obj(); -} -SRSASN_CODE uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::uac_implicit_ac_barr_list: - HANDLE_CODE(pack_fixed_seq_of(bref, - c.get(), - c.get().size(), - integer_packer(1, 8))); - break; - case types::uac_explicit_ac_barr_list: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 63)); - break; - default: - log_invalid_choice_id(type_, "uac_barr_per_plmn_s::uac_ac_barr_list_type_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::uac_implicit_ac_barr_list: - HANDLE_CODE(unpack_fixed_seq_of(c.get(), - bref, - c.get().size(), - integer_packer(1, 8))); - break; - case types::uac_explicit_ac_barr_list: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 63)); - break; - default: - log_invalid_choice_id(type_, "uac_barr_per_plmn_s::uac_ac_barr_list_type_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"uac-ImplicitACBarringList", "uac-ExplicitACBarringList"}; - return convert_enum_idx(names, 2, value, "uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::types"); -} - -// ConnEstFailureControl ::= SEQUENCE -SRSASN_CODE conn_est_fail_ctrl_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(conn_est_fail_offset_present, 1)); - - HANDLE_CODE(conn_est_fail_count.pack(bref)); - HANDLE_CODE(conn_est_fail_offset_validity.pack(bref)); - if (conn_est_fail_offset_present) { - HANDLE_CODE(pack_integer(bref, conn_est_fail_offset, (uint8_t)0u, (uint8_t)15u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE conn_est_fail_ctrl_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(conn_est_fail_offset_present, 1)); - - HANDLE_CODE(conn_est_fail_count.unpack(bref)); - HANDLE_CODE(conn_est_fail_offset_validity.unpack(bref)); - if (conn_est_fail_offset_present) { - HANDLE_CODE(unpack_integer(conn_est_fail_offset, bref, (uint8_t)0u, (uint8_t)15u)); - } - - return SRSASN_SUCCESS; -} -void conn_est_fail_ctrl_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("connEstFailCount", conn_est_fail_count.to_string()); - j.write_str("connEstFailOffsetValidity", conn_est_fail_offset_validity.to_string()); - if (conn_est_fail_offset_present) { - j.write_int("connEstFailOffset", conn_est_fail_offset); - } - j.end_obj(); -} - -const char* conn_est_fail_ctrl_s::conn_est_fail_count_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n3", "n4"}; - return convert_enum_idx(names, 4, value, "conn_est_fail_ctrl_s::conn_est_fail_count_e_"); -} -uint8_t conn_est_fail_ctrl_s::conn_est_fail_count_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4}; - return map_enum_number(numbers, 4, value, "conn_est_fail_ctrl_s::conn_est_fail_count_e_"); -} - -const char* conn_est_fail_ctrl_s::conn_est_fail_offset_validity_opts::to_string() const -{ - static const char* names[] = {"s30", "s60", "s120", "s240", "s300", "s420", "s600", "s900"}; - return convert_enum_idx(names, 8, value, "conn_est_fail_ctrl_s::conn_est_fail_offset_validity_e_"); -} -uint16_t conn_est_fail_ctrl_s::conn_est_fail_offset_validity_opts::to_number() const -{ - static const uint16_t numbers[] = {30, 60, 120, 240, 300, 420, 600, 900}; - return map_enum_number(numbers, 8, value, "conn_est_fail_ctrl_s::conn_est_fail_offset_validity_e_"); -} - -// PosSystemInformation-r16-IEs ::= SEQUENCE -SRSASN_CODE pos_sys_info_r16_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, pos_sib_type_and_info_r16, 1, 32)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pos_sys_info_r16_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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(pos_sib_type_and_info_r16, bref, 1, 32)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void pos_sys_info_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("posSIB-TypeAndInfo-r16"); - for (const auto& e1 : pos_sib_type_and_info_r16) { - e1.to_json(j); - } - j.end_array(); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -void pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::destroy_() -{ - switch (type_) { - case types::pos_sib1_1_r16: - c.destroy(); - break; - case types::pos_sib1_2_r16: - c.destroy(); - break; - case types::pos_sib1_3_r16: - c.destroy(); - break; - case types::pos_sib1_4_r16: - c.destroy(); - break; - case types::pos_sib1_5_r16: - c.destroy(); - break; - case types::pos_sib1_6_r16: - c.destroy(); - break; - case types::pos_sib1_7_r16: - c.destroy(); - break; - case types::pos_sib1_8_r16: - c.destroy(); - break; - case types::pos_sib2_1_r16: - c.destroy(); - break; - case types::pos_sib2_2_r16: - c.destroy(); - break; - case types::pos_sib2_3_r16: - c.destroy(); - break; - case types::pos_sib2_4_r16: - c.destroy(); - break; - case types::pos_sib2_5_r16: - c.destroy(); - break; - case types::pos_sib2_6_r16: - c.destroy(); - break; - case types::pos_sib2_7_r16: - c.destroy(); - break; - case types::pos_sib2_8_r16: - c.destroy(); - break; - case types::pos_sib2_9_r16: - c.destroy(); - break; - case types::pos_sib2_10_r16: - c.destroy(); - break; - case types::pos_sib2_11_r16: - c.destroy(); - break; - case types::pos_sib2_12_r16: - c.destroy(); - break; - case types::pos_sib2_13_r16: - c.destroy(); - break; - case types::pos_sib2_14_r16: - c.destroy(); - break; - case types::pos_sib2_15_r16: - c.destroy(); - break; - case types::pos_sib2_16_r16: - c.destroy(); - break; - case types::pos_sib2_17_r16: - c.destroy(); - break; - case types::pos_sib2_18_r16: - c.destroy(); - break; - case types::pos_sib2_19_r16: - c.destroy(); - break; - case types::pos_sib2_20_r16: - c.destroy(); - break; - case types::pos_sib2_21_r16: - c.destroy(); - break; - case types::pos_sib2_22_r16: - c.destroy(); - break; - case types::pos_sib2_23_r16: - c.destroy(); - break; - case types::pos_sib3_1_r16: - c.destroy(); - break; - case types::pos_sib4_1_r16: - c.destroy(); - break; - case types::pos_sib5_1_r16: - c.destroy(); - break; - case types::pos_sib6_1_r16: - c.destroy(); - break; - case types::pos_sib6_2_r16: - c.destroy(); - break; - case types::pos_sib6_3_r16: - c.destroy(); - break; - case types::pos_sib1_9_v1700: - c.destroy(); - break; - case types::pos_sib1_10_v1700: - c.destroy(); - break; - case types::pos_sib2_24_v1700: - c.destroy(); - break; - case types::pos_sib2_25_v1700: - c.destroy(); - break; - case types::pos_sib6_4_v1700: - c.destroy(); - break; - case types::pos_sib6_5_v1700: - c.destroy(); - break; - case types::pos_sib6_6_v1700: - c.destroy(); - break; - default: - break; - } -} -void pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::pos_sib1_1_r16: - c.init(); - break; - case types::pos_sib1_2_r16: - c.init(); - break; - case types::pos_sib1_3_r16: - c.init(); - break; - case types::pos_sib1_4_r16: - c.init(); - break; - case types::pos_sib1_5_r16: - c.init(); - break; - case types::pos_sib1_6_r16: - c.init(); - break; - case types::pos_sib1_7_r16: - c.init(); - break; - case types::pos_sib1_8_r16: - c.init(); - break; - case types::pos_sib2_1_r16: - c.init(); - break; - case types::pos_sib2_2_r16: - c.init(); - break; - case types::pos_sib2_3_r16: - c.init(); - break; - case types::pos_sib2_4_r16: - c.init(); - break; - case types::pos_sib2_5_r16: - c.init(); - break; - case types::pos_sib2_6_r16: - c.init(); - break; - case types::pos_sib2_7_r16: - c.init(); - break; - case types::pos_sib2_8_r16: - c.init(); - break; - case types::pos_sib2_9_r16: - c.init(); - break; - case types::pos_sib2_10_r16: - c.init(); - break; - case types::pos_sib2_11_r16: - c.init(); - break; - case types::pos_sib2_12_r16: - c.init(); - break; - case types::pos_sib2_13_r16: - c.init(); - break; - case types::pos_sib2_14_r16: - c.init(); - break; - case types::pos_sib2_15_r16: - c.init(); - break; - case types::pos_sib2_16_r16: - c.init(); - break; - case types::pos_sib2_17_r16: - c.init(); - break; - case types::pos_sib2_18_r16: - c.init(); - break; - case types::pos_sib2_19_r16: - c.init(); - break; - case types::pos_sib2_20_r16: - c.init(); - break; - case types::pos_sib2_21_r16: - c.init(); - break; - case types::pos_sib2_22_r16: - c.init(); - break; - case types::pos_sib2_23_r16: - c.init(); - break; - case types::pos_sib3_1_r16: - c.init(); - break; - case types::pos_sib4_1_r16: - c.init(); - break; - case types::pos_sib5_1_r16: - c.init(); - break; - case types::pos_sib6_1_r16: - c.init(); - break; - case types::pos_sib6_2_r16: - c.init(); - break; - case types::pos_sib6_3_r16: - c.init(); - break; - case types::pos_sib1_9_v1700: - c.init(); - break; - case types::pos_sib1_10_v1700: - c.init(); - break; - case types::pos_sib2_24_v1700: - c.init(); - break; - case types::pos_sib2_25_v1700: - c.init(); - break; - case types::pos_sib6_4_v1700: - c.init(); - break; - case types::pos_sib6_5_v1700: - c.init(); - break; - case types::pos_sib6_6_v1700: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_"); - } -} -pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::pos_sib_type_and_info_r16_item_c_( - const pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::pos_sib1_1_r16: - c.init(other.c.get()); - break; - case types::pos_sib1_2_r16: - c.init(other.c.get()); - break; - case types::pos_sib1_3_r16: - c.init(other.c.get()); - break; - case types::pos_sib1_4_r16: - c.init(other.c.get()); - break; - case types::pos_sib1_5_r16: - c.init(other.c.get()); - break; - case types::pos_sib1_6_r16: - c.init(other.c.get()); - break; - case types::pos_sib1_7_r16: - c.init(other.c.get()); - break; - case types::pos_sib1_8_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_1_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_2_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_3_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_4_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_5_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_6_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_7_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_8_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_9_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_10_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_11_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_12_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_13_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_14_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_15_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_16_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_17_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_18_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_19_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_20_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_21_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_22_r16: - c.init(other.c.get()); - break; - case types::pos_sib2_23_r16: - c.init(other.c.get()); - break; - case types::pos_sib3_1_r16: - c.init(other.c.get()); - break; - case types::pos_sib4_1_r16: - c.init(other.c.get()); - break; - case types::pos_sib5_1_r16: - c.init(other.c.get()); - break; - case types::pos_sib6_1_r16: - c.init(other.c.get()); - break; - case types::pos_sib6_2_r16: - c.init(other.c.get()); - break; - case types::pos_sib6_3_r16: - c.init(other.c.get()); - break; - case types::pos_sib1_9_v1700: - c.init(other.c.get()); - break; - case types::pos_sib1_10_v1700: - c.init(other.c.get()); - break; - case types::pos_sib2_24_v1700: - c.init(other.c.get()); - break; - case types::pos_sib2_25_v1700: - c.init(other.c.get()); - break; - case types::pos_sib6_4_v1700: - c.init(other.c.get()); - break; - case types::pos_sib6_5_v1700: - c.init(other.c.get()); - break; - case types::pos_sib6_6_v1700: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_"); - } -} -pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_& -pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::operator=( - const pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::pos_sib1_1_r16: - c.set(other.c.get()); - break; - case types::pos_sib1_2_r16: - c.set(other.c.get()); - break; - case types::pos_sib1_3_r16: - c.set(other.c.get()); - break; - case types::pos_sib1_4_r16: - c.set(other.c.get()); - break; - case types::pos_sib1_5_r16: - c.set(other.c.get()); - break; - case types::pos_sib1_6_r16: - c.set(other.c.get()); - break; - case types::pos_sib1_7_r16: - c.set(other.c.get()); - break; - case types::pos_sib1_8_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_1_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_2_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_3_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_4_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_5_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_6_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_7_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_8_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_9_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_10_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_11_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_12_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_13_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_14_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_15_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_16_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_17_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_18_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_19_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_20_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_21_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_22_r16: - c.set(other.c.get()); - break; - case types::pos_sib2_23_r16: - c.set(other.c.get()); - break; - case types::pos_sib3_1_r16: - c.set(other.c.get()); - break; - case types::pos_sib4_1_r16: - c.set(other.c.get()); - break; - case types::pos_sib5_1_r16: - c.set(other.c.get()); - break; - case types::pos_sib6_1_r16: - c.set(other.c.get()); - break; - case types::pos_sib6_2_r16: - c.set(other.c.get()); - break; - case types::pos_sib6_3_r16: - c.set(other.c.get()); - break; - case types::pos_sib1_9_v1700: - c.set(other.c.get()); - break; - case types::pos_sib1_10_v1700: - c.set(other.c.get()); - break; - case types::pos_sib2_24_v1700: - c.set(other.c.get()); - break; - case types::pos_sib2_25_v1700: - c.set(other.c.get()); - break; - case types::pos_sib6_4_v1700: - c.set(other.c.get()); - break; - case types::pos_sib6_5_v1700: - c.set(other.c.get()); - break; - case types::pos_sib6_6_v1700: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_"); - } - - return *this; -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_1_r16() -{ - set(types::pos_sib1_1_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_2_r16() -{ - set(types::pos_sib1_2_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_3_r16() -{ - set(types::pos_sib1_3_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_4_r16() -{ - set(types::pos_sib1_4_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_5_r16() -{ - set(types::pos_sib1_5_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_6_r16() -{ - set(types::pos_sib1_6_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_7_r16() -{ - set(types::pos_sib1_7_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_8_r16() -{ - set(types::pos_sib1_8_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_1_r16() -{ - set(types::pos_sib2_1_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_2_r16() -{ - set(types::pos_sib2_2_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_3_r16() -{ - set(types::pos_sib2_3_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_4_r16() -{ - set(types::pos_sib2_4_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_5_r16() -{ - set(types::pos_sib2_5_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_6_r16() -{ - set(types::pos_sib2_6_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_7_r16() -{ - set(types::pos_sib2_7_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_8_r16() -{ - set(types::pos_sib2_8_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_9_r16() -{ - set(types::pos_sib2_9_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_10_r16() -{ - set(types::pos_sib2_10_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_11_r16() -{ - set(types::pos_sib2_11_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_12_r16() -{ - set(types::pos_sib2_12_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_13_r16() -{ - set(types::pos_sib2_13_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_14_r16() -{ - set(types::pos_sib2_14_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_15_r16() -{ - set(types::pos_sib2_15_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_16_r16() -{ - set(types::pos_sib2_16_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_17_r16() -{ - set(types::pos_sib2_17_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_18_r16() -{ - set(types::pos_sib2_18_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_19_r16() -{ - set(types::pos_sib2_19_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_20_r16() -{ - set(types::pos_sib2_20_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_21_r16() -{ - set(types::pos_sib2_21_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_22_r16() -{ - set(types::pos_sib2_22_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_23_r16() -{ - set(types::pos_sib2_23_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib3_1_r16() -{ - set(types::pos_sib3_1_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib4_1_r16() -{ - set(types::pos_sib4_1_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib5_1_r16() -{ - set(types::pos_sib5_1_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib6_1_r16() -{ - set(types::pos_sib6_1_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib6_2_r16() -{ - set(types::pos_sib6_2_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib6_3_r16() -{ - set(types::pos_sib6_3_r16); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_9_v1700() -{ - set(types::pos_sib1_9_v1700); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_10_v1700() -{ - set(types::pos_sib1_10_v1700); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_24_v1700() -{ - set(types::pos_sib2_24_v1700); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_25_v1700() -{ - set(types::pos_sib2_25_v1700); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib6_4_v1700() -{ - set(types::pos_sib6_4_v1700); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib6_5_v1700() -{ - set(types::pos_sib6_5_v1700); - return c.get(); -} -sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib6_6_v1700() -{ - set(types::pos_sib6_6_v1700); - return c.get(); -} -void pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::pos_sib1_1_r16: - j.write_fieldname("posSib1-1-r16"); - c.get().to_json(j); - break; - case types::pos_sib1_2_r16: - j.write_fieldname("posSib1-2-r16"); - c.get().to_json(j); - break; - case types::pos_sib1_3_r16: - j.write_fieldname("posSib1-3-r16"); - c.get().to_json(j); - break; - case types::pos_sib1_4_r16: - j.write_fieldname("posSib1-4-r16"); - c.get().to_json(j); - break; - case types::pos_sib1_5_r16: - j.write_fieldname("posSib1-5-r16"); - c.get().to_json(j); - break; - case types::pos_sib1_6_r16: - j.write_fieldname("posSib1-6-r16"); - c.get().to_json(j); - break; - case types::pos_sib1_7_r16: - j.write_fieldname("posSib1-7-r16"); - c.get().to_json(j); - break; - case types::pos_sib1_8_r16: - j.write_fieldname("posSib1-8-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_1_r16: - j.write_fieldname("posSib2-1-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_2_r16: - j.write_fieldname("posSib2-2-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_3_r16: - j.write_fieldname("posSib2-3-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_4_r16: - j.write_fieldname("posSib2-4-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_5_r16: - j.write_fieldname("posSib2-5-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_6_r16: - j.write_fieldname("posSib2-6-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_7_r16: - j.write_fieldname("posSib2-7-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_8_r16: - j.write_fieldname("posSib2-8-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_9_r16: - j.write_fieldname("posSib2-9-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_10_r16: - j.write_fieldname("posSib2-10-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_11_r16: - j.write_fieldname("posSib2-11-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_12_r16: - j.write_fieldname("posSib2-12-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_13_r16: - j.write_fieldname("posSib2-13-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_14_r16: - j.write_fieldname("posSib2-14-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_15_r16: - j.write_fieldname("posSib2-15-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_16_r16: - j.write_fieldname("posSib2-16-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_17_r16: - j.write_fieldname("posSib2-17-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_18_r16: - j.write_fieldname("posSib2-18-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_19_r16: - j.write_fieldname("posSib2-19-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_20_r16: - j.write_fieldname("posSib2-20-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_21_r16: - j.write_fieldname("posSib2-21-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_22_r16: - j.write_fieldname("posSib2-22-r16"); - c.get().to_json(j); - break; - case types::pos_sib2_23_r16: - j.write_fieldname("posSib2-23-r16"); - c.get().to_json(j); - break; - case types::pos_sib3_1_r16: - j.write_fieldname("posSib3-1-r16"); - c.get().to_json(j); - break; - case types::pos_sib4_1_r16: - j.write_fieldname("posSib4-1-r16"); - c.get().to_json(j); - break; - case types::pos_sib5_1_r16: - j.write_fieldname("posSib5-1-r16"); - c.get().to_json(j); - break; - case types::pos_sib6_1_r16: - j.write_fieldname("posSib6-1-r16"); - c.get().to_json(j); - break; - case types::pos_sib6_2_r16: - j.write_fieldname("posSib6-2-r16"); - c.get().to_json(j); - break; - case types::pos_sib6_3_r16: - j.write_fieldname("posSib6-3-r16"); - c.get().to_json(j); - break; - case types::pos_sib1_9_v1700: - j.write_fieldname("posSib1-9-v1700"); - c.get().to_json(j); - break; - case types::pos_sib1_10_v1700: - j.write_fieldname("posSib1-10-v1700"); - c.get().to_json(j); - break; - case types::pos_sib2_24_v1700: - j.write_fieldname("posSib2-24-v1700"); - c.get().to_json(j); - break; - case types::pos_sib2_25_v1700: - j.write_fieldname("posSib2-25-v1700"); - c.get().to_json(j); - break; - case types::pos_sib6_4_v1700: - j.write_fieldname("posSib6-4-v1700"); - c.get().to_json(j); - break; - case types::pos_sib6_5_v1700: - j.write_fieldname("posSib6-5-v1700"); - c.get().to_json(j); - break; - case types::pos_sib6_6_v1700: - j.write_fieldname("posSib6-6-v1700"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_"); - } - j.end_obj(); -} -SRSASN_CODE pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::pos_sib1_1_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib1_2_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib1_3_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib1_4_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib1_5_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib1_6_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib1_7_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib1_8_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_1_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_2_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_3_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_4_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_5_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_6_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_7_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_8_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_9_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_10_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_11_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_12_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_13_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_14_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_15_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_16_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_17_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_18_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_19_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_20_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_21_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_22_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib2_23_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib3_1_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib4_1_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib5_1_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib6_1_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib6_2_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib6_3_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pos_sib1_9_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::pos_sib1_10_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::pos_sib2_24_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::pos_sib2_25_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::pos_sib6_4_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::pos_sib6_5_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::pos_sib6_6_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - default: - log_invalid_choice_id(type_, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::pos_sib1_1_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib1_2_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib1_3_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib1_4_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib1_5_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib1_6_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib1_7_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib1_8_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_1_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_2_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_3_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_4_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_5_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_6_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_7_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_8_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_9_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_10_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_11_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_12_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_13_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_14_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_15_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_16_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_17_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_18_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_19_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_20_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_21_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_22_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib2_23_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib3_1_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib4_1_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib5_1_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib6_1_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib6_2_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib6_3_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pos_sib1_9_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::pos_sib1_10_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::pos_sib2_24_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::pos_sib2_25_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::pos_sib6_4_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::pos_sib6_5_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::pos_sib6_6_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - default: - log_invalid_choice_id(type_, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::types_opts::to_string() const -{ - static const char* names[] = { - "posSib1-1-r16", "posSib1-2-r16", "posSib1-3-r16", "posSib1-4-r16", "posSib1-5-r16", - "posSib1-6-r16", "posSib1-7-r16", "posSib1-8-r16", "posSib2-1-r16", "posSib2-2-r16", - "posSib2-3-r16", "posSib2-4-r16", "posSib2-5-r16", "posSib2-6-r16", "posSib2-7-r16", - "posSib2-8-r16", "posSib2-9-r16", "posSib2-10-r16", "posSib2-11-r16", "posSib2-12-r16", - "posSib2-13-r16", "posSib2-14-r16", "posSib2-15-r16", "posSib2-16-r16", "posSib2-17-r16", - "posSib2-18-r16", "posSib2-19-r16", "posSib2-20-r16", "posSib2-21-r16", "posSib2-22-r16", - "posSib2-23-r16", "posSib3-1-r16", "posSib4-1-r16", "posSib5-1-r16", "posSib6-1-r16", - "posSib6-2-r16", "posSib6-3-r16", "posSib1-9-v1700", "posSib1-10-v1700", "posSib2-24-v1700", - "posSib2-25-v1700", "posSib6-4-v1700", "posSib6-5-v1700", "posSib6-6-v1700"}; - return convert_enum_idx(names, 44, value, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::types"); -} - -// SI-SchedulingInfo ::= SEQUENCE -SRSASN_CODE si_sched_info_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(si_request_cfg_present, 1)); - HANDLE_CODE(bref.pack(si_request_cfg_sul_present, 1)); - HANDLE_CODE(bref.pack(sys_info_area_id_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, sched_info_list, 1, 32)); - HANDLE_CODE(si_win_len.pack(bref)); - if (si_request_cfg_present) { - HANDLE_CODE(si_request_cfg.pack(bref)); - } - if (si_request_cfg_sul_present) { - HANDLE_CODE(si_request_cfg_sul.pack(bref)); - } - if (sys_info_area_id_present) { - HANDLE_CODE(sys_info_area_id.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE si_sched_info_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(si_request_cfg_present, 1)); - HANDLE_CODE(bref.unpack(si_request_cfg_sul_present, 1)); - HANDLE_CODE(bref.unpack(sys_info_area_id_present, 1)); - - HANDLE_CODE(unpack_dyn_seq_of(sched_info_list, bref, 1, 32)); - HANDLE_CODE(si_win_len.unpack(bref)); - if (si_request_cfg_present) { - HANDLE_CODE(si_request_cfg.unpack(bref)); - } - if (si_request_cfg_sul_present) { - HANDLE_CODE(si_request_cfg_sul.unpack(bref)); - } - if (sys_info_area_id_present) { - HANDLE_CODE(sys_info_area_id.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void si_sched_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("schedulingInfoList"); - for (const auto& e1 : sched_info_list) { - e1.to_json(j); - } - j.end_array(); - j.write_str("si-WindowLength", si_win_len.to_string()); - if (si_request_cfg_present) { - j.write_fieldname("si-RequestConfig"); - si_request_cfg.to_json(j); - } - if (si_request_cfg_sul_present) { - j.write_fieldname("si-RequestConfigSUL"); - si_request_cfg_sul.to_json(j); - } - if (sys_info_area_id_present) { - j.write_str("systemInformationAreaID", sys_info_area_id.to_string()); - } - j.end_obj(); -} - -const char* si_sched_info_s::si_win_len_opts::to_string() const -{ - static const char* names[] = { - "s5", "s10", "s20", "s40", "s80", "s160", "s320", "s640", "s1280", "s2560-v1710", "s5120-v1710"}; - return convert_enum_idx(names, 11, value, "si_sched_info_s::si_win_len_e_"); -} -uint16_t si_sched_info_s::si_win_len_opts::to_number() const -{ - static const uint16_t numbers[] = {5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120}; - return map_enum_number(numbers, 11, value, "si_sched_info_s::si_win_len_e_"); -} - -// SIB1-v1610-IEs ::= SEQUENCE -SRSASN_CODE sib1_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(idle_mode_meass_eutra_r16_present, 1)); - HANDLE_CODE(bref.pack(idle_mode_meass_nr_r16_present, 1)); - HANDLE_CODE(bref.pack(pos_si_sched_info_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (pos_si_sched_info_r16_present) { - HANDLE_CODE(pos_si_sched_info_r16.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sib1_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(idle_mode_meass_eutra_r16_present, 1)); - HANDLE_CODE(bref.unpack(idle_mode_meass_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(pos_si_sched_info_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (pos_si_sched_info_r16_present) { - HANDLE_CODE(pos_si_sched_info_r16.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sib1_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (idle_mode_meass_eutra_r16_present) { - j.write_str("idleModeMeasurementsEUTRA-r16", "true"); - } - if (idle_mode_meass_nr_r16_present) { - j.write_str("idleModeMeasurementsNR-r16", "true"); - } - if (pos_si_sched_info_r16_present) { - j.write_fieldname("posSI-SchedulingInfo-r16"); - pos_si_sched_info_r16.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -const char* serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"dynamic", "semiStatic"}; - return convert_enum_idx(names, 2, value, "serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::types"); -} - -// SystemInformation-IEs ::= SEQUENCE -SRSASN_CODE sys_info_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, sib_type_and_info, 1, 32)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sys_info_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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(sib_type_and_info, bref, 1, 32)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sys_info_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("sib-TypeAndInfo"); - for (const auto& e1 : sib_type_and_info) { - e1.to_json(j); - } - j.end_array(); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -void sys_info_ies_s::sib_type_and_info_item_c_::destroy_() -{ - switch (type_) { - case types::sib2: - c.destroy(); - break; - case types::sib3: - c.destroy(); - break; - case types::sib4: - c.destroy(); - break; - case types::sib5: - c.destroy(); - break; - case types::sib6: - c.destroy(); - break; - case types::sib7: - c.destroy(); - break; - case types::sib8: - c.destroy(); - break; - case types::sib9: - c.destroy(); - break; - case types::sib10_v1610: - c.destroy(); - break; - case types::sib11_v1610: - c.destroy(); - break; - case types::sib12_v1610: - c.destroy(); - break; - case types::sib13_v1610: - c.destroy(); - break; - case types::sib14_v1610: - c.destroy(); - break; - case types::sib15_v1700: - c.destroy(); - break; - case types::sib16_v1700: - c.destroy(); - break; - case types::sib17_v1700: - c.destroy(); - break; - case types::sib18_v1700: - c.destroy(); - break; - case types::sib19_v1700: - c.destroy(); - break; - case types::sib20_v1700: - c.destroy(); - break; - case types::sib21_v1700: - c.destroy(); - break; - default: - break; - } -} -void sys_info_ies_s::sib_type_and_info_item_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::sib2: - c.init(); - break; - case types::sib3: - c.init(); - break; - case types::sib4: - c.init(); - break; - case types::sib5: - c.init(); - break; - case types::sib6: - c.init(); - break; - case types::sib7: - c.init(); - break; - case types::sib8: - c.init(); - break; - case types::sib9: - c.init(); - break; - case types::sib10_v1610: - c.init(); - break; - case types::sib11_v1610: - c.init(); - break; - case types::sib12_v1610: - c.init(); - break; - case types::sib13_v1610: - c.init(); - break; - case types::sib14_v1610: - c.init(); - break; - case types::sib15_v1700: - c.init(); - break; - case types::sib16_v1700: - c.init(); - break; - case types::sib17_v1700: - c.init(); - break; - case types::sib18_v1700: - c.init(); - break; - case types::sib19_v1700: - c.init(); - break; - case types::sib20_v1700: - c.init(); - break; - case types::sib21_v1700: - c.init(); - break; - case types::nulltype: - break; - default: - 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_::sib_type_and_info_item_c_( - const sys_info_ies_s::sib_type_and_info_item_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::sib2: - c.init(other.c.get()); - break; - case types::sib3: - c.init(other.c.get()); - break; - case types::sib4: - c.init(other.c.get()); - break; - case types::sib5: - c.init(other.c.get()); - break; - case types::sib6: - c.init(other.c.get()); - break; - case types::sib7: - c.init(other.c.get()); - break; - case types::sib8: - c.init(other.c.get()); - break; - case types::sib9: - c.init(other.c.get()); - break; - case types::sib10_v1610: - c.init(other.c.get()); - break; - case types::sib11_v1610: - c.init(other.c.get()); - break; - case types::sib12_v1610: - c.init(other.c.get()); - break; - case types::sib13_v1610: - c.init(other.c.get()); - break; - case types::sib14_v1610: - c.init(other.c.get()); - break; - case types::sib15_v1700: - c.init(other.c.get()); - break; - case types::sib16_v1700: - c.init(other.c.get()); - break; - case types::sib17_v1700: - c.init(other.c.get()); - break; - case types::sib18_v1700: - c.init(other.c.get()); - break; - case types::sib19_v1700: - c.init(other.c.get()); - break; - case types::sib20_v1700: - c.init(other.c.get()); - break; - case types::sib21_v1700: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - 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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::sib2: - c.set(other.c.get()); - break; - case types::sib3: - c.set(other.c.get()); - break; - case types::sib4: - c.set(other.c.get()); - break; - case types::sib5: - c.set(other.c.get()); - break; - case types::sib6: - c.set(other.c.get()); - break; - case types::sib7: - c.set(other.c.get()); - break; - case types::sib8: - c.set(other.c.get()); - break; - case types::sib9: - c.set(other.c.get()); - break; - case types::sib10_v1610: - c.set(other.c.get()); - break; - case types::sib11_v1610: - c.set(other.c.get()); - break; - case types::sib12_v1610: - c.set(other.c.get()); - break; - case types::sib13_v1610: - c.set(other.c.get()); - break; - case types::sib14_v1610: - c.set(other.c.get()); - break; - case types::sib15_v1700: - c.set(other.c.get()); - break; - case types::sib16_v1700: - c.set(other.c.get()); - break; - case types::sib17_v1700: - c.set(other.c.get()); - break; - case types::sib18_v1700: - c.set(other.c.get()); - break; - case types::sib19_v1700: - c.set(other.c.get()); - break; - case types::sib20_v1700: - c.set(other.c.get()); - break; - case types::sib21_v1700: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sys_info_ies_s::sib_type_and_info_item_c_"); - } - - return *this; -} -sib2_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib2() -{ - set(types::sib2); - return c.get(); -} -sib3_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib3() -{ - set(types::sib3); - return c.get(); -} -sib4_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib4() -{ - set(types::sib4); - return c.get(); -} -sib5_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib5() -{ - set(types::sib5); - return c.get(); -} -sib6_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib6() -{ - set(types::sib6); - return c.get(); -} -sib7_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib7() -{ - set(types::sib7); - return c.get(); -} -sib8_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib8() -{ - set(types::sib8); - return c.get(); -} -sib9_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib9() -{ - set(types::sib9); - return c.get(); -} -sib10_r16_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib10_v1610() -{ - set(types::sib10_v1610); - return c.get(); -} -sib11_r16_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib11_v1610() -{ - set(types::sib11_v1610); - return c.get(); -} -sib12_r16_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib12_v1610() -{ - set(types::sib12_v1610); - return c.get(); -} -sib13_r16_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib13_v1610() -{ - set(types::sib13_v1610); - return c.get(); -} -sib14_r16_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib14_v1610() -{ - set(types::sib14_v1610); - return c.get(); -} -sib15_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib15_v1700() -{ - set(types::sib15_v1700); - return c.get(); -} -sib16_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib16_v1700() -{ - set(types::sib16_v1700); - return c.get(); -} -sib17_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib17_v1700() -{ - set(types::sib17_v1700); - return c.get(); -} -sib18_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib18_v1700() -{ - set(types::sib18_v1700); - return c.get(); -} -sib19_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib19_v1700() -{ - set(types::sib19_v1700); - return c.get(); -} -sib20_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib20_v1700() -{ - set(types::sib20_v1700); - return c.get(); -} -sib21_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib21_v1700() -{ - set(types::sib21_v1700); - return c.get(); -} -void sys_info_ies_s::sib_type_and_info_item_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::sib2: - j.write_fieldname("sib2"); - c.get().to_json(j); - break; - case types::sib3: - j.write_fieldname("sib3"); - c.get().to_json(j); - break; - case types::sib4: - j.write_fieldname("sib4"); - c.get().to_json(j); - break; - case types::sib5: - j.write_fieldname("sib5"); - c.get().to_json(j); - break; - case types::sib6: - j.write_fieldname("sib6"); - c.get().to_json(j); - break; - case types::sib7: - j.write_fieldname("sib7"); - c.get().to_json(j); - break; - case types::sib8: - j.write_fieldname("sib8"); - c.get().to_json(j); - break; - case types::sib9: - j.write_fieldname("sib9"); - c.get().to_json(j); - break; - case types::sib10_v1610: - j.write_fieldname("sib10-v1610"); - c.get().to_json(j); - break; - case types::sib11_v1610: - j.write_fieldname("sib11-v1610"); - c.get().to_json(j); - break; - case types::sib12_v1610: - j.write_fieldname("sib12-v1610"); - c.get().to_json(j); - break; - case types::sib13_v1610: - j.write_fieldname("sib13-v1610"); - c.get().to_json(j); - break; - case types::sib14_v1610: - j.write_fieldname("sib14-v1610"); - c.get().to_json(j); - break; - case types::sib15_v1700: - j.write_fieldname("sib15-v1700"); - c.get().to_json(j); - break; - case types::sib16_v1700: - j.write_fieldname("sib16-v1700"); - c.get().to_json(j); - break; - case types::sib17_v1700: - j.write_fieldname("sib17-v1700"); - c.get().to_json(j); - break; - case types::sib18_v1700: - j.write_fieldname("sib18-v1700"); - c.get().to_json(j); - break; - case types::sib19_v1700: - j.write_fieldname("sib19-v1700"); - c.get().to_json(j); - break; - case types::sib20_v1700: - j.write_fieldname("sib20-v1700"); - c.get().to_json(j); - break; - case types::sib21_v1700: - j.write_fieldname("sib21-v1700"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "sys_info_ies_s::sib_type_and_info_item_c_"); - } - j.end_obj(); -} -SRSASN_CODE sys_info_ies_s::sib_type_and_info_item_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::sib2: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::sib3: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::sib4: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::sib5: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::sib6: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::sib7: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::sib8: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::sib9: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::sib10_v1610: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::sib11_v1610: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::sib12_v1610: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::sib13_v1610: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::sib14_v1610: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::sib15_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::sib16_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::sib17_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::sib18_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::sib19_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::sib20_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - case types::sib21_v1700: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - default: - log_invalid_choice_id(type_, "sys_info_ies_s::sib_type_and_info_item_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sys_info_ies_s::sib_type_and_info_item_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::sib2: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::sib3: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::sib4: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::sib5: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::sib6: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::sib7: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::sib8: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::sib9: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::sib10_v1610: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::sib11_v1610: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::sib12_v1610: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::sib13_v1610: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::sib14_v1610: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::sib15_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::sib16_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::sib17_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::sib18_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::sib19_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::sib20_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - case types::sib21_v1700: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - default: - log_invalid_choice_id(type_, "sys_info_ies_s::sib_type_and_info_item_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* sys_info_ies_s::sib_type_and_info_item_c_::types_opts::to_string() const -{ - static const char* names[] = {"sib2", "sib3", "sib4", "sib5", "sib6", - "sib7", "sib8", "sib9", "sib10-v1610", "sib11-v1610", - "sib12-v1610", "sib13-v1610", "sib14-v1610", "sib15-v1700", "sib16-v1700", - "sib17-v1700", "sib18-v1700", "sib19-v1700", "sib20-v1700", "sib21-v1700"}; - return convert_enum_idx(names, 20, value, "sys_info_ies_s::sib_type_and_info_item_c_::types"); -} -uint8_t sys_info_ies_s::sib_type_and_info_item_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21}; - return map_enum_number(numbers, 20, value, "sys_info_ies_s::sib_type_and_info_item_c_::types"); -} - -// UAC-AccessCategory1-SelectionAssistanceInfo ::= ENUMERATED -const char* uac_access_category1_sel_assist_info_opts::to_string() const -{ - static const char* names[] = {"a", "b", "c"}; - return convert_enum_idx(names, 3, value, "uac_access_category1_sel_assist_info_e"); -} - -// UE-TimersAndConstants ::= SEQUENCE -SRSASN_CODE ue_timers_and_consts_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(t300.pack(bref)); - HANDLE_CODE(t301.pack(bref)); - HANDLE_CODE(t310.pack(bref)); - HANDLE_CODE(n310.pack(bref)); - HANDLE_CODE(t311.pack(bref)); - HANDLE_CODE(n311.pack(bref)); - HANDLE_CODE(t319.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_timers_and_consts_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(t300.unpack(bref)); - HANDLE_CODE(t301.unpack(bref)); - HANDLE_CODE(t310.unpack(bref)); - HANDLE_CODE(n310.unpack(bref)); - HANDLE_CODE(t311.unpack(bref)); - HANDLE_CODE(n311.unpack(bref)); - HANDLE_CODE(t319.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ue_timers_and_consts_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("t300", t300.to_string()); - j.write_str("t301", t301.to_string()); - j.write_str("t310", t310.to_string()); - j.write_str("n310", n310.to_string()); - j.write_str("t311", t311.to_string()); - j.write_str("n311", n311.to_string()); - j.write_str("t319", t319.to_string()); - j.end_obj(); -} - -const char* ue_timers_and_consts_s::t300_opts::to_string() const -{ - static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; - return convert_enum_idx(names, 8, value, "ue_timers_and_consts_s::t300_e_"); -} -uint16_t ue_timers_and_consts_s::t300_opts::to_number() const -{ - static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return map_enum_number(numbers, 8, value, "ue_timers_and_consts_s::t300_e_"); -} - -const char* ue_timers_and_consts_s::t301_opts::to_string() const -{ - static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; - return convert_enum_idx(names, 8, value, "ue_timers_and_consts_s::t301_e_"); -} -uint16_t ue_timers_and_consts_s::t301_opts::to_number() const -{ - static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return map_enum_number(numbers, 8, value, "ue_timers_and_consts_s::t301_e_"); -} - -const char* ue_timers_and_consts_s::t310_opts::to_string() const -{ - static const char* names[] = {"ms0", "ms50", "ms100", "ms200", "ms500", "ms1000", "ms2000"}; - return convert_enum_idx(names, 7, value, "ue_timers_and_consts_s::t310_e_"); -} -uint16_t ue_timers_and_consts_s::t310_opts::to_number() const -{ - static const uint16_t numbers[] = {0, 50, 100, 200, 500, 1000, 2000}; - return map_enum_number(numbers, 7, value, "ue_timers_and_consts_s::t310_e_"); -} - -const char* ue_timers_and_consts_s::n310_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n10", "n20"}; - return convert_enum_idx(names, 8, value, "ue_timers_and_consts_s::n310_e_"); -} -uint8_t ue_timers_and_consts_s::n310_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 6, 8, 10, 20}; - return map_enum_number(numbers, 8, value, "ue_timers_and_consts_s::n310_e_"); -} - -const char* ue_timers_and_consts_s::t311_opts::to_string() const -{ - static const char* names[] = {"ms1000", "ms3000", "ms5000", "ms10000", "ms15000", "ms20000", "ms30000"}; - return convert_enum_idx(names, 7, value, "ue_timers_and_consts_s::t311_e_"); -} -uint16_t ue_timers_and_consts_s::t311_opts::to_number() const -{ - static const uint16_t numbers[] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; - return map_enum_number(numbers, 7, value, "ue_timers_and_consts_s::t311_e_"); -} - -const char* ue_timers_and_consts_s::n311_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; - return convert_enum_idx(names, 8, value, "ue_timers_and_consts_s::n311_e_"); -} -uint8_t ue_timers_and_consts_s::n311_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 5, 6, 8, 10}; - return map_enum_number(numbers, 8, value, "ue_timers_and_consts_s::n311_e_"); -} - -const char* ue_timers_and_consts_s::t319_opts::to_string() const -{ - static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; - return convert_enum_idx(names, 8, value, "ue_timers_and_consts_s::t319_e_"); -} -uint16_t ue_timers_and_consts_s::t319_opts::to_number() const -{ - static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return map_enum_number(numbers, 8, value, "ue_timers_and_consts_s::t319_e_"); -} - -// SIB1 ::= SEQUENCE -SRSASN_CODE sib1_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(cell_sel_info_present, 1)); - HANDLE_CODE(bref.pack(conn_est_fail_ctrl_present, 1)); - HANDLE_CODE(bref.pack(si_sched_info_present, 1)); - HANDLE_CODE(bref.pack(serving_cell_cfg_common_present, 1)); - HANDLE_CODE(bref.pack(ims_emergency_support_present, 1)); - HANDLE_CODE(bref.pack(ecall_over_ims_support_present, 1)); - HANDLE_CODE(bref.pack(ue_timers_and_consts_present, 1)); - HANDLE_CODE(bref.pack(uac_barr_info_present, 1)); - HANDLE_CODE(bref.pack(use_full_resume_id_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (cell_sel_info_present) { - HANDLE_CODE(bref.pack(cell_sel_info.q_rx_lev_min_offset_present, 1)); - HANDLE_CODE(bref.pack(cell_sel_info.q_rx_lev_min_sul_present, 1)); - HANDLE_CODE(bref.pack(cell_sel_info.q_qual_min_present, 1)); - HANDLE_CODE(bref.pack(cell_sel_info.q_qual_min_offset_present, 1)); - HANDLE_CODE(pack_integer(bref, cell_sel_info.q_rx_lev_min, (int8_t)-70, (int8_t)-22)); - if (cell_sel_info.q_rx_lev_min_offset_present) { - HANDLE_CODE(pack_integer(bref, cell_sel_info.q_rx_lev_min_offset, (uint8_t)1u, (uint8_t)8u)); - } - if (cell_sel_info.q_rx_lev_min_sul_present) { - HANDLE_CODE(pack_integer(bref, cell_sel_info.q_rx_lev_min_sul, (int8_t)-70, (int8_t)-22)); - } - if (cell_sel_info.q_qual_min_present) { - HANDLE_CODE(pack_integer(bref, cell_sel_info.q_qual_min, (int8_t)-43, (int8_t)-12)); - } - if (cell_sel_info.q_qual_min_offset_present) { - HANDLE_CODE(pack_integer(bref, cell_sel_info.q_qual_min_offset, (uint8_t)1u, (uint8_t)8u)); - } - } - HANDLE_CODE(cell_access_related_info.pack(bref)); - if (conn_est_fail_ctrl_present) { - HANDLE_CODE(conn_est_fail_ctrl.pack(bref)); - } - if (si_sched_info_present) { - HANDLE_CODE(si_sched_info.pack(bref)); - } - if (serving_cell_cfg_common_present) { - HANDLE_CODE(serving_cell_cfg_common.pack(bref)); - } - if (ue_timers_and_consts_present) { - HANDLE_CODE(ue_timers_and_consts.pack(bref)); - } - if (uac_barr_info_present) { - HANDLE_CODE(bref.pack(uac_barr_info.uac_barr_for_common.size() > 0, 1)); - HANDLE_CODE(bref.pack(uac_barr_info.uac_barr_per_plmn_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(uac_barr_info.uac_access_category1_sel_assist_info_present, 1)); - if (uac_barr_info.uac_barr_for_common.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_info.uac_barr_for_common, 1, 63)); - } - if (uac_barr_info.uac_barr_per_plmn_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_info.uac_barr_per_plmn_list, 1, 12)); - } - HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_info.uac_barr_info_set_list, 1, 8)); - if (uac_barr_info.uac_access_category1_sel_assist_info_present) { - HANDLE_CODE(uac_barr_info.uac_access_category1_sel_assist_info.pack(bref)); - } - } - if (late_non_crit_ext.size() > 0) { - 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 sib1_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(cell_sel_info_present, 1)); - HANDLE_CODE(bref.unpack(conn_est_fail_ctrl_present, 1)); - HANDLE_CODE(bref.unpack(si_sched_info_present, 1)); - HANDLE_CODE(bref.unpack(serving_cell_cfg_common_present, 1)); - HANDLE_CODE(bref.unpack(ims_emergency_support_present, 1)); - HANDLE_CODE(bref.unpack(ecall_over_ims_support_present, 1)); - HANDLE_CODE(bref.unpack(ue_timers_and_consts_present, 1)); - HANDLE_CODE(bref.unpack(uac_barr_info_present, 1)); - HANDLE_CODE(bref.unpack(use_full_resume_id_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (cell_sel_info_present) { - HANDLE_CODE(bref.unpack(cell_sel_info.q_rx_lev_min_offset_present, 1)); - HANDLE_CODE(bref.unpack(cell_sel_info.q_rx_lev_min_sul_present, 1)); - HANDLE_CODE(bref.unpack(cell_sel_info.q_qual_min_present, 1)); - HANDLE_CODE(bref.unpack(cell_sel_info.q_qual_min_offset_present, 1)); - HANDLE_CODE(unpack_integer(cell_sel_info.q_rx_lev_min, bref, (int8_t)-70, (int8_t)-22)); - if (cell_sel_info.q_rx_lev_min_offset_present) { - HANDLE_CODE(unpack_integer(cell_sel_info.q_rx_lev_min_offset, bref, (uint8_t)1u, (uint8_t)8u)); - } - if (cell_sel_info.q_rx_lev_min_sul_present) { - HANDLE_CODE(unpack_integer(cell_sel_info.q_rx_lev_min_sul, bref, (int8_t)-70, (int8_t)-22)); - } - if (cell_sel_info.q_qual_min_present) { - HANDLE_CODE(unpack_integer(cell_sel_info.q_qual_min, bref, (int8_t)-43, (int8_t)-12)); - } - if (cell_sel_info.q_qual_min_offset_present) { - HANDLE_CODE(unpack_integer(cell_sel_info.q_qual_min_offset, bref, (uint8_t)1u, (uint8_t)8u)); - } - } - HANDLE_CODE(cell_access_related_info.unpack(bref)); - if (conn_est_fail_ctrl_present) { - HANDLE_CODE(conn_est_fail_ctrl.unpack(bref)); - } - if (si_sched_info_present) { - HANDLE_CODE(si_sched_info.unpack(bref)); - } - if (serving_cell_cfg_common_present) { - HANDLE_CODE(serving_cell_cfg_common.unpack(bref)); - } - if (ue_timers_and_consts_present) { - HANDLE_CODE(ue_timers_and_consts.unpack(bref)); - } - if (uac_barr_info_present) { - bool uac_barr_for_common_present; - HANDLE_CODE(bref.unpack(uac_barr_for_common_present, 1)); - bool uac_barr_per_plmn_list_present; - HANDLE_CODE(bref.unpack(uac_barr_per_plmn_list_present, 1)); - HANDLE_CODE(bref.unpack(uac_barr_info.uac_access_category1_sel_assist_info_present, 1)); - if (uac_barr_for_common_present) { - HANDLE_CODE(unpack_dyn_seq_of(uac_barr_info.uac_barr_for_common, bref, 1, 63)); - } - if (uac_barr_per_plmn_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(uac_barr_info.uac_barr_per_plmn_list, bref, 1, 12)); - } - HANDLE_CODE(unpack_dyn_seq_of(uac_barr_info.uac_barr_info_set_list, bref, 1, 8)); - if (uac_barr_info.uac_access_category1_sel_assist_info_present) { - HANDLE_CODE(uac_barr_info.uac_access_category1_sel_assist_info.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 sib1_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (cell_sel_info_present) { - j.write_fieldname("cellSelectionInfo"); - j.start_obj(); - j.write_int("q-RxLevMin", cell_sel_info.q_rx_lev_min); - if (cell_sel_info.q_rx_lev_min_offset_present) { - j.write_int("q-RxLevMinOffset", cell_sel_info.q_rx_lev_min_offset); - } - if (cell_sel_info.q_rx_lev_min_sul_present) { - j.write_int("q-RxLevMinSUL", cell_sel_info.q_rx_lev_min_sul); - } - if (cell_sel_info.q_qual_min_present) { - j.write_int("q-QualMin", cell_sel_info.q_qual_min); - } - if (cell_sel_info.q_qual_min_offset_present) { - j.write_int("q-QualMinOffset", cell_sel_info.q_qual_min_offset); - } - j.end_obj(); - } - j.write_fieldname("cellAccessRelatedInfo"); - cell_access_related_info.to_json(j); - if (conn_est_fail_ctrl_present) { - j.write_fieldname("connEstFailureControl"); - conn_est_fail_ctrl.to_json(j); - } - if (si_sched_info_present) { - j.write_fieldname("si-SchedulingInfo"); - si_sched_info.to_json(j); - } - if (serving_cell_cfg_common_present) { - j.write_fieldname("servingCellConfigCommon"); - serving_cell_cfg_common.to_json(j); - } - if (ims_emergency_support_present) { - j.write_str("ims-EmergencySupport", "true"); - } - if (ecall_over_ims_support_present) { - j.write_str("eCallOverIMS-Support", "true"); - } - if (ue_timers_and_consts_present) { - j.write_fieldname("ue-TimersAndConstants"); - ue_timers_and_consts.to_json(j); - } - if (uac_barr_info_present) { - j.write_fieldname("uac-BarringInfo"); - j.start_obj(); - if (uac_barr_info.uac_barr_for_common.size() > 0) { - j.start_array("uac-BarringForCommon"); - for (const auto& e1 : uac_barr_info.uac_barr_for_common) { - e1.to_json(j); - } - j.end_array(); - } - if (uac_barr_info.uac_barr_per_plmn_list.size() > 0) { - j.start_array("uac-BarringPerPLMN-List"); - for (const auto& e1 : uac_barr_info.uac_barr_per_plmn_list) { - e1.to_json(j); - } - j.end_array(); - } - j.start_array("uac-BarringInfoSetList"); - for (const auto& e1 : uac_barr_info.uac_barr_info_set_list) { - e1.to_json(j); - } - j.end_array(); - if (uac_barr_info.uac_access_category1_sel_assist_info_present) { - j.write_fieldname("uac-AccessCategory1-SelectionAssistanceInfo"); - uac_barr_info.uac_access_category1_sel_assist_info.to_json(j); - } - j.end_obj(); - } - if (use_full_resume_id_present) { - j.write_str("useFullResumeID", "true"); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -void sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::destroy_() -{ - switch (type_) { - case types::individual_plmn_list: - c.destroy(); - break; - default: - break; - } -} -void sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::plmn_common: - break; - case types::individual_plmn_list: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "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_::uac_access_category1_sel_assist_info_c_( - const sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::plmn_common: - c.init(other.c.get()); - break; - case types::individual_plmn_list: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "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_& -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; - } - set(other.type()); - switch (type_) { - case types::plmn_common: - c.set(other.c.get()); - break; - case types::individual_plmn_list: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_"); - } - - return *this; -} -uac_access_category1_sel_assist_info_e& -sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::set_plmn_common() -{ - set(types::plmn_common); - return c.get(); -} -sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::individual_plmn_list_l_& -sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::set_individual_plmn_list() -{ - set(types::individual_plmn_list); - return c.get(); -} -void sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::plmn_common: - j.write_str("plmnCommon", c.get().to_string()); - break; - case types::individual_plmn_list: - j.start_array("individualPLMNList"); - for (const auto& e1 : c.get()) { - j.write_str(e1.to_string()); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_"); - } - j.end_obj(); -} -SRSASN_CODE sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::plmn_common: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::individual_plmn_list: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 2, 12)); - break; - default: - log_invalid_choice_id(type_, "sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::plmn_common: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::individual_plmn_list: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 2, 12)); - break; - default: - log_invalid_choice_id(type_, "sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::types_opts::to_string() const -{ - static const char* names[] = {"plmnCommon", "individualPLMNList"}; - return convert_enum_idx(names, 2, value, "sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::types"); -} - -// SystemInformation ::= SEQUENCE -SRSASN_CODE sys_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sys_info_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void sys_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void sys_info_s::crit_exts_c_::destroy_() -{ - switch (type_) { - case types::sys_info: - c.destroy(); - break; - case types::crit_exts_future_r16: - c.destroy(); - break; - default: - break; - } -} -void sys_info_s::crit_exts_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::sys_info: - c.init(); - break; - case types::crit_exts_future_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); - } -} -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: - c.init(other.c.get()); - break; - case types::crit_exts_future_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); - } -} -sys_info_s::crit_exts_c_& sys_info_s::crit_exts_c_::operator=(const sys_info_s::crit_exts_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::sys_info: - c.set(other.c.get()); - break; - case types::crit_exts_future_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); - } - - return *this; -} -sys_info_ies_s& sys_info_s::crit_exts_c_::set_sys_info() -{ - set(types::sys_info); - return c.get(); -} -sys_info_s::crit_exts_c_::crit_exts_future_r16_c_& sys_info_s::crit_exts_c_::set_crit_exts_future_r16() -{ - set(types::crit_exts_future_r16); - return c.get(); -} -void sys_info_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::sys_info: - j.write_fieldname("systemInformation"); - c.get().to_json(j); - break; - case types::crit_exts_future_r16: - j.write_fieldname("criticalExtensionsFuture-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE sys_info_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::sys_info: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::crit_exts_future_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sys_info_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::sys_info: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::crit_exts_future_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::set(types::options e) -{ - type_ = e; -} -pos_sys_info_r16_ies_s& sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::set_pos_sys_info_r16() -{ - set(types::pos_sys_info_r16); - return c; -} -void sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::pos_sys_info_r16: - j.write_fieldname("posSystemInformation-r16"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_::crit_exts_future_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::pos_sys_info_r16: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_::crit_exts_future_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::pos_sys_info_r16: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_::crit_exts_future_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"posSystemInformation-r16", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::types"); -} - -const char* sys_info_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"systemInformation", "criticalExtensionsFuture-r16"}; - return convert_enum_idx(names, 2, value, "sys_info_s::crit_exts_c_::types"); -} - -// BCCH-DL-SCH-MessageType ::= CHOICE -void bcch_dl_sch_msg_type_c::set(types::options e) -{ - type_ = e; -} -bcch_dl_sch_msg_type_c::c1_c_& bcch_dl_sch_msg_type_c::set_c1() -{ - set(types::c1); - return c; -} -void bcch_dl_sch_msg_type_c::set_msg_class_ext() -{ - set(types::msg_class_ext); -} -void bcch_dl_sch_msg_type_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.to_json(j); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c"); - } - j.end_obj(); -} -SRSASN_CODE bcch_dl_sch_msg_type_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::c1: - HANDLE_CODE(c.pack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE bcch_dl_sch_msg_type_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.unpack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void bcch_dl_sch_msg_type_c::c1_c_::destroy_() -{ - switch (type_) { - case types::sys_info: - c.destroy(); - break; - case types::sib_type1: - c.destroy(); - break; - default: - break; - } -} -void bcch_dl_sch_msg_type_c::c1_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::sys_info: - c.init(); - break; - case types::sib_type1: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c::c1_c_"); - } -} -bcch_dl_sch_msg_type_c::c1_c_::c1_c_(const bcch_dl_sch_msg_type_c::c1_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::sys_info: - c.init(other.c.get()); - break; - case types::sib_type1: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c::c1_c_"); - } -} -bcch_dl_sch_msg_type_c::c1_c_& bcch_dl_sch_msg_type_c::c1_c_::operator=(const bcch_dl_sch_msg_type_c::c1_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::sys_info: - c.set(other.c.get()); - break; - case types::sib_type1: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c::c1_c_"); - } - - return *this; -} -sys_info_s& bcch_dl_sch_msg_type_c::c1_c_::set_sys_info() -{ - set(types::sys_info); - return c.get(); -} -sib1_s& bcch_dl_sch_msg_type_c::c1_c_::set_sib_type1() -{ - set(types::sib_type1); - return c.get(); -} -void bcch_dl_sch_msg_type_c::c1_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::sys_info: - j.write_fieldname("systemInformation"); - c.get().to_json(j); - break; - case types::sib_type1: - j.write_fieldname("systemInformationBlockType1"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c::c1_c_"); - } - j.end_obj(); -} -SRSASN_CODE bcch_dl_sch_msg_type_c::c1_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::sys_info: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::sib_type1: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c::c1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE bcch_dl_sch_msg_type_c::c1_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::sys_info: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::sib_type1: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "bcch_dl_sch_msg_type_c::c1_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* bcch_dl_sch_msg_type_c::c1_c_::types_opts::to_string() const -{ - static const char* names[] = {"systemInformation", "systemInformationBlockType1"}; - return convert_enum_idx(names, 2, value, "bcch_dl_sch_msg_type_c::c1_c_::types"); -} -uint8_t bcch_dl_sch_msg_type_c::c1_c_::types_opts::to_number() const -{ - if (value == sib_type1) { - return 1; - } - invalid_enum_number(value, "bcch_dl_sch_msg_type_c::c1_c_::types"); - return 0; -} - -const char* bcch_dl_sch_msg_type_c::types_opts::to_string() const -{ - static const char* names[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(names, 2, value, "bcch_dl_sch_msg_type_c::types"); -} -uint8_t bcch_dl_sch_msg_type_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "bcch_dl_sch_msg_type_c::types"); -} - -// BCCH-DL-SCH-Message ::= SEQUENCE -SRSASN_CODE bcch_dl_sch_msg_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(msg.pack(bref)); - - bref.align_bytes_zero(); - - return SRSASN_SUCCESS; -} -SRSASN_CODE bcch_dl_sch_msg_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(msg.unpack(bref)); - - bref.align_bytes(); - - return SRSASN_SUCCESS; -} -void bcch_dl_sch_msg_s::to_json(json_writer& j) const -{ - j.start_array(); - j.start_obj(); - j.start_obj("BCCH-DL-SCH-Message"); - j.write_fieldname("message"); - msg.to_json(j); - j.end_obj(); - j.end_obj(); - j.end_array(); -} - -const char* sl_res_reserve_period_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"sl-ResourceReservePeriod1-r16", "sl-ResourceReservePeriod2-r16"}; - return convert_enum_idx(names, 2, value, "sl_res_reserve_period_r16_c::types"); -} -uint8_t sl_res_reserve_period_r16_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "sl_res_reserve_period_r16_c::types"); -} - -const char* sl_meas_report_quant_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"sl-RSRP-r16"}; - return convert_enum_idx(names, 1, value, "sl_meas_report_quant_r16_c::types"); -} - -const char* sl_meas_trigger_quant_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"sl-RSRP-r16"}; - return convert_enum_idx(names, 1, value, "sl_meas_trigger_quant_r16_c::types"); -} - -const char* sl_event_trigger_cfg_r16_s::sl_event_id_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"eventS1-r16", "eventS2-r16"}; - return convert_enum_idx(names, 2, value, "sl_event_trigger_cfg_r16_s::sl_event_id_r16_c_::types"); -} -uint8_t sl_event_trigger_cfg_r16_s::sl_event_id_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "sl_event_trigger_cfg_r16_s::sl_event_id_r16_c_::types"); -} - -const char* sl_pqi_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"sl-StandardizedPQI-r16", "sl-Non-StandardizedPQI-r16"}; - return convert_enum_idx(names, 2, value, "sl_pqi_r16_c::types"); -} - -const char* sl_tx_pwr_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"minusinfinity-r16", "txPower-r16"}; - return convert_enum_idx(names, 2, value, "sl_tx_pwr_r16_c::types"); -} -int8_t sl_tx_pwr_r16_c::types_opts::to_number() const -{ - static const int8_t numbers[] = {-1}; - return map_enum_number(numbers, 1, value, "sl_tx_pwr_r16_c::types"); -} - -const char* sl_period_cg_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"sl-PeriodCG1-r16", "sl-PeriodCG2-r16"}; - return convert_enum_idx(names, 2, value, "sl_period_cg_r16_c::types"); -} -uint8_t sl_period_cg_r16_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "sl_period_cg_r16_c::types"); -} - -const char* sl_report_cfg_r16_s::sl_report_type_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"sl-Periodical-r16", "sl-EventTriggered-r16"}; - return convert_enum_idx(names, 2, value, "sl_report_cfg_r16_s::sl_report_type_r16_c_::types"); -} - -const char* sl_drx_cfg_uc_r17_s::sl_drx_on_dur_timer_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"subMilliSeconds", "milliSeconds"}; - return convert_enum_idx(names, 2, value, "sl_drx_cfg_uc_r17_s::sl_drx_on_dur_timer_r17_c_::types"); -} - -const char* sl_drx_cfg_uc_r17_s::sl_drx_cycle_start_offset_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", - "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", - "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; - return convert_enum_idx(names, 20, value, "sl_drx_cfg_uc_r17_s::sl_drx_cycle_start_offset_r17_c_::types"); -} -uint16_t sl_drx_cfg_uc_r17_s::sl_drx_cycle_start_offset_r17_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, - 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; - return map_enum_number(numbers, 20, value, "sl_drx_cfg_uc_r17_s::sl_drx_cycle_start_offset_r17_c_::types"); -} - -const char* sl_drx_gc_bc_qos_r17_s::sl_drx_gc_bc_on_dur_timer_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"subMilliSeconds", "milliSeconds"}; - return convert_enum_idx(names, 2, value, "sl_drx_gc_bc_qos_r17_s::sl_drx_gc_bc_on_dur_timer_r17_c_::types"); -} - -const char* sl_rlc_cfg_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"sl-AM-RLC-r16", "sl-UM-RLC-r16"}; - return convert_enum_idx(names, 2, value, "sl_rlc_cfg_r16_c::types"); -} - -const char* sl_remote_ue_rb_id_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"srb-Identity-r17", "drb-Identity-r17"}; - return convert_enum_idx(names, 2, value, "sl_remote_ue_rb_id_r17_c::types"); -} - -const char* ul_data_compress_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"newSetup", "drb-ContinueUDC"}; - return convert_enum_idx(names, 2, value, "ul_data_compress_r17_c::types"); -} - -const char* pdcp_cfg_s::drb_s_::hdr_compress_c_::types_opts::to_string() const -{ - static const char* names[] = {"notUsed", "rohc", "uplinkOnlyROHC"}; - return convert_enum_idx(names, 3, value, "pdcp_cfg_s::drb_s_::hdr_compress_c_::types"); -} - -const char* sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"sl-MappedQoS-FlowsList-r16", "sl-MappedQoS-FlowsListDedicated-r16"}; - return convert_enum_idx(names, 2, value, "sl_sdap_cfg_r16_s::sl_mapped_qos_flows_r16_c_::types"); -} - -const char* tmgi_r17_s::plmn_id_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"plmn-Index", "explicitValue"}; - return convert_enum_idx(names, 2, value, "tmgi_r17_s::plmn_id_r17_c_::types"); -} - -const char* drb_to_add_mod_s::cn_assoc_c_::types_opts::to_string() const -{ - static const char* names[] = {"eps-BearerIdentity", "sdap-Config"}; - return convert_enum_idx(names, 2, value, "drb_to_add_mod_s::cn_assoc_c_::types"); -} - -const char* rrc_reject_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcReject", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "rrc_reject_s::crit_exts_c_::types"); -} - -const char* rrc_setup_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcSetup", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "rrc_setup_s::crit_exts_c_::types"); -} - -const char* dl_ccch_msg_type_c::c1_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcReject", "rrcSetup", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "dl_ccch_msg_type_c::c1_c_::types"); -} - -const char* dl_ccch_msg_type_c::types_opts::to_string() const -{ - static const char* names[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(names, 2, value, "dl_ccch_msg_type_c::types"); -} -uint8_t dl_ccch_msg_type_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "dl_ccch_msg_type_c::types"); -} - -const char* srs_periodicity_and_offset_c::types_opts::to_string() const -{ - static const char* names[] = {"sl1", - "sl2", - "sl4", - "sl5", - "sl8", - "sl10", - "sl16", - "sl20", - "sl32", - "sl40", - "sl64", - "sl80", - "sl160", - "sl320", - "sl640", - "sl1280", - "sl2560"}; - return convert_enum_idx(names, 17, value, "srs_periodicity_and_offset_c::types"); -} -uint16_t srs_periodicity_and_offset_c::types_opts::to_number() const -{ - static const uint16_t numbers[] = {1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560}; - return map_enum_number(numbers, 17, value, "srs_periodicity_and_offset_c::types"); -} - -const char* srs_spatial_relation_info_s::ref_sig_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-Index", "csi-RS-Index", "srs"}; - return convert_enum_idx(names, 3, value, "srs_spatial_relation_info_s::ref_sig_c_::types"); -} - -const char* spatial_relation_info_pdc_r17_s::ref_sig_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-Index", "csi-RS-Index", "dl-PRS-PDC", "srs"}; - return convert_enum_idx(names, 4, value, "spatial_relation_info_pdc_r17_s::ref_sig_c_::types"); -} - -const char* csi_rs_res_mob_s::slot_cfg_c_::types_opts::to_string() const -{ - static const char* names[] = {"ms4", "ms5", "ms10", "ms20", "ms40"}; - return convert_enum_idx(names, 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 numbers[] = {4, 5, 10, 20, 40}; - return map_enum_number(numbers, 5, value, "csi_rs_res_mob_s::slot_cfg_c_::types"); -} - -const char* csi_rs_res_mob_s::freq_domain_alloc_c_::types_opts::to_string() const -{ - static const char* names[] = {"row1", "row2"}; - return convert_enum_idx(names, 2, value, "csi_rs_res_mob_s::freq_domain_alloc_c_::types"); -} -uint8_t csi_rs_res_mob_s::freq_domain_alloc_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "csi_rs_res_mob_s::freq_domain_alloc_c_::types"); -} - -const char* csi_rs_res_mob_s::slot_cfg_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"ms4", "ms5", "ms10", "ms20", "ms40"}; - return convert_enum_idx(names, 5, value, "csi_rs_res_mob_s::slot_cfg_r17_c_::types"); -} -uint8_t csi_rs_res_mob_s::slot_cfg_r17_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {4, 5, 10, 20, 40}; - return map_enum_number(numbers, 5, value, "csi_rs_res_mob_s::slot_cfg_r17_c_::types"); -} - -const char* mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"ms20-r17", - "ms40-r17", - "ms80-r17", - "ms160-r17", - "ms320-r17", - "ms640-r17", - "ms1280-r17", - "ms2560-r17", - "ms5120-r17"}; - return convert_enum_idx(names, 9, value, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::types"); -} -uint16_t mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {20, 40, 80, 160, 320, 640, 1280, 2560, 5120}; - return map_enum_number(numbers, 9, value, "mu_si_m_gap_info_r17_s::musim_gap_repeat_and_offset_r17_c_::types"); -} - -const char* rssi_periodicity_and_offset_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"sl10", "sl20", "sl40", "sl80", "sl160", "sl320", "s1640"}; - return convert_enum_idx(names, 7, value, "rssi_periodicity_and_offset_r16_c::types"); -} -uint16_t rssi_periodicity_and_offset_r16_c::types_opts::to_number() const -{ - static const uint16_t numbers[] = {10, 20, 40, 80, 160, 320, 1640}; - return map_enum_number(numbers, 7, value, "rssi_periodicity_and_offset_r16_c::types"); -} - -const char* srs_res_s::tx_comb_c_::types_opts::to_string() const -{ - static const char* names[] = {"n2", "n4"}; - return convert_enum_idx(names, 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 numbers[] = {2, 4}; - return map_enum_number(numbers, 2, value, "srs_res_s::tx_comb_c_::types"); -} - -const char* srs_res_s::res_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"aperiodic", "semi-persistent", "periodic"}; - return convert_enum_idx(names, 3, value, "srs_res_s::res_type_c_::types"); -} - -const char* srs_res_s::partial_freq_sr17_s_::start_rb_idx_f_scaling_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"startRBIndexAndFreqScalingFactor2-r17", "startRBIndexAndFreqScalingFactor4-r17"}; - return convert_enum_idx(names, 2, value, "srs_res_s::partial_freq_sr17_s_::start_rb_idx_f_scaling_r17_c_::types"); -} -uint8_t srs_res_s::partial_freq_sr17_s_::start_rb_idx_f_scaling_r17_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4}; - return map_enum_number(numbers, 2, value, "srs_res_s::partial_freq_sr17_s_::start_rb_idx_f_scaling_r17_c_::types"); -} - -const char* srs_res_s::srs_tci_state_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"srs-UL-TCI-State", "srs-DLorJointTCI-State"}; - return convert_enum_idx(names, 2, value, "srs_res_s::srs_tci_state_r17_c_::types"); -} - -const char* iab_ip_address_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"iPv4-Address-r16", "iPv6-Address-r16", "iPv6-Prefix-r16"}; - return convert_enum_idx(names, 3, value, "iab_ip_address_r16_c::types"); -} - -const char* meas_trigger_quant_c::types_opts::to_string() const -{ - static const char* names[] = {"rsrp", "rsrq", "sinr"}; - return convert_enum_idx(names, 3, value, "meas_trigger_quant_c::types"); -} - -const char* meas_trigger_quant_cli_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"srs-RSRP-r16", "cli-RSSI-r16"}; - return convert_enum_idx(names, 2, value, "meas_trigger_quant_cli_r16_c::types"); -} - -const char* meas_trigger_quant_eutra_c::types_opts::to_string() const -{ - static const char* names[] = {"rsrp", "rsrq", "sinr"}; - return convert_enum_idx(names, 3, value, "meas_trigger_quant_eutra_c::types"); -} - -const char* meas_trigger_quant_offset_c::types_opts::to_string() const -{ - static const char* names[] = {"rsrp", "rsrq", "sinr"}; - return convert_enum_idx(names, 3, value, "meas_trigger_quant_offset_c::types"); -} - -const char* meas_trigger_quant_utra_fdd_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"utra-FDD-RSCP-r16", "utra-FDD-EcN0-r16"}; - return convert_enum_idx(names, 2, value, "meas_trigger_quant_utra_fdd_r16_c::types"); -} -uint8_t meas_trigger_quant_utra_fdd_r16_c::types_opts::to_number() const -{ - if (value == utra_fdd_ec_n0_r16) { - return 0; - } - invalid_enum_number(value, "meas_trigger_quant_utra_fdd_r16_c::types"); - return 0; -} - -const char* ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::types_opts::to_string() const -{ - static const char* names[] = { - "sf5-r16", "sf10-r16", "sf20-r16", "sf40-r16", "sf80-r16", "sf160-r16", "sf320-r16", "sf640-r16", "sf1280-r16"}; - return convert_enum_idx(names, 9, value, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::types"); -} -uint16_t ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {5, 10, 20, 40, 80, 160, 320, 640, 1280}; - return map_enum_number(numbers, 9, value, "ssb_mtc3_r16_s::periodicity_and_offset_r16_c_::types"); -} - -const char* ue_tx_teg_request_ul_tdoa_cfg_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"oneShot-r17", "periodicReporting-r17"}; - return convert_enum_idx(names, 2, value, "ue_tx_teg_request_ul_tdoa_cfg_r17_c::types"); -} -uint8_t ue_tx_teg_request_ul_tdoa_cfg_r17_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "ue_tx_teg_request_ul_tdoa_cfg_r17_c::types"); -} - -const char* cli_event_trigger_cfg_r16_s::event_id_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"eventI1-r16"}; - return convert_enum_idx(names, 1, value, "cli_event_trigger_cfg_r16_s::event_id_r16_c_::types"); -} -uint8_t cli_event_trigger_cfg_r16_s::event_id_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "cli_event_trigger_cfg_r16_s::event_id_r16_c_::types"); -} - -const char* cond_trigger_cfg_r16_s::cond_event_id_c_::types_opts::to_string() const -{ - static const char* names[] = {"condEventA3", "condEventA5", "condEventA4-r17", "condEventD1-r17", "condEventT1-r17"}; - return convert_enum_idx(names, 5, value, "cond_trigger_cfg_r16_s::cond_event_id_c_::types"); -} - -const char* event_trigger_cfg_s::event_id_c_::types_opts::to_string() const -{ - static const char* names[] = { - "eventA1", "eventA2", "eventA3", "eventA4", "eventA5", "eventA6", "eventX1-r17", "eventX2-r17", "eventD1-r17"}; - return convert_enum_idx(names, 9, value, "event_trigger_cfg_s::event_id_c_::types"); -} - -const char* event_trigger_cfg_inter_rat_s::event_id_c_::types_opts::to_string() const -{ - static const char* names[] = { - "eventB1", "eventB2", "eventB1-UTRA-FDD-r16", "eventB2-UTRA-FDD-r16", "eventY1-Relay-r17", "eventY2-Relay-r17"}; - return convert_enum_idx(names, 6, value, "event_trigger_cfg_inter_rat_s::event_id_c_::types"); -} - -const char* event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"eventC1", "eventC2-r16"}; - return convert_enum_idx(names, 2, value, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::types"); -} -uint8_t event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "event_trigger_cfg_nr_sl_r16_s::event_id_r16_c_::types"); -} - -const char* mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::types_opts::to_string() const -{ - static const char* names[] = {"nr-SCG", "eutra-SCG"}; - return convert_enum_idx(names, 2, value, "mrdc_secondary_cell_group_cfg_s::mrdc_secondary_cell_group_c_::types"); -} - -const char* meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"prs-Ref-r17", "csi-RS-Ref-r17"}; - return convert_enum_idx(names, 2, value, "meas_obj_rx_tx_diff_r17_s::dl_ref_r17_c_::types"); -} - -const char* report_cfg_inter_rat_s::report_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"periodical", "eventTriggered", "reportCGI", "reportSFTD"}; - return convert_enum_idx(names, 4, value, "report_cfg_inter_rat_s::report_type_c_::types"); -} - -const char* report_cfg_nr_s::report_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"periodical", - "eventTriggered", - "reportCGI", - "reportSFTD", - "condTriggerConfig-r16", - "cli-Periodical-r16", - "cli-EventTriggered-r16", - "rxTxPeriodical-r17"}; - return convert_enum_idx(names, 8, value, "report_cfg_nr_s::report_type_c_::types"); -} - -const char* report_cfg_nr_sl_r16_s::report_type_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"periodical-r16", "eventTriggered-r16"}; - return convert_enum_idx(names, 2, value, "report_cfg_nr_sl_r16_s::report_type_r16_c_::types"); -} - -const char* area_cfg_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"cellGlobalIdList-r16", "trackingAreaCodeList-r16", "trackingAreaIdentityList-r16"}; - return convert_enum_idx(names, 3, value, "area_cfg_r16_c::types"); -} - -const char* meas_obj_to_add_mod_s::meas_obj_c_::types_opts::to_string() const -{ - static const char* names[] = {"measObjectNR", - "measObjectEUTRA", - "measObjectUTRA-FDD-r16", - "measObjectNR-SL-r16", - "measObjectCLI-r16", - "measObjectRxTxDiff-r17", - "measObjectRelay-r17"}; - return convert_enum_idx(names, 7, value, "meas_obj_to_add_mod_s::meas_obj_c_::types"); -} - -const char* report_cfg_to_add_mod_s::report_cfg_c_::types_opts::to_string() const -{ - static const char* names[] = {"reportConfigNR", "reportConfigInterRAT", "reportConfigNR-SL-r16"}; - return convert_enum_idx(names, 3, value, "report_cfg_to_add_mod_s::report_cfg_c_::types"); -} - -const char* event_type_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"outOfCoverage", "eventL1"}; - return convert_enum_idx(names, 2, value, "event_type_r16_c::types"); -} -uint8_t event_type_r16_c::types_opts::to_number() const -{ - if (value == event_l1) { - return 1; - } - invalid_enum_number(value, "event_type_r16_c::types"); - return 0; -} - -const char* other_cfg_s::delay_budget_report_cfg_c_::types_opts::to_string() const -{ - static const char* names[] = {"release", "setup"}; - return convert_enum_idx(names, 2, value, "other_cfg_s::delay_budget_report_cfg_c_::types"); -} - -const char* ran_notif_area_info_c::types_opts::to_string() const -{ - static const char* names[] = {"cellList", "ran-AreaConfigList"}; - return convert_enum_idx(names, 2, value, "ran_notif_area_info_c::types"); -} - -const char* rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"nr-SCG-r16", "eutra-SCG-r16"}; - return convert_enum_idx(names, 2, value, "rrc_resume_v1610_ies_s::mrdc_secondary_cell_group_r16_c_::types"); -} - -const char* meas_cfg_s::s_measure_cfg_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-RSRP", "csi-RSRP"}; - return convert_enum_idx(names, 2, value, "meas_cfg_s::s_measure_cfg_c_::types"); -} - -const char* redirected_carrier_info_c::types_opts::to_string() const -{ - static const char* names[] = {"nr", "eutra"}; - return convert_enum_idx(names, 2, value, "redirected_carrier_info_c::types"); -} - -const char* logged_meas_cfg_r16_ies_s::report_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"periodical", "eventTriggered"}; - return convert_enum_idx(names, 2, value, "logged_meas_cfg_r16_ies_s::report_type_c_::types"); -} - -const char* counter_check_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"counterCheck", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "counter_check_s::crit_exts_c_::types"); -} - -const char* dl_ded_msg_segment_r16_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"dlDedicatedMessageSegment-r16", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "dl_ded_msg_segment_r16_s::crit_exts_c_::types"); -} - -const char* dl_info_transfer_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"dlInformationTransfer", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "dl_info_transfer_s::crit_exts_c_::types"); -} - -const char* dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::types_opts::to_string() const -{ - static const char* names[] = {"dlInformationTransferMRDC-r16", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "dl_info_transfer_mrdc_r16_s::crit_exts_c_::c1_c_::types"); -} - -const char* dl_info_transfer_mrdc_r16_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"c1", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "dl_info_transfer_mrdc_r16_s::crit_exts_c_::types"); -} -uint8_t dl_info_transfer_mrdc_r16_s::crit_exts_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "dl_info_transfer_mrdc_r16_s::crit_exts_c_::types"); -} - -const char* logged_meas_cfg_r16_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"loggedMeasurementConfiguration-r16", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "logged_meas_cfg_r16_s::crit_exts_c_::types"); -} - -const char* mob_from_nr_cmd_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"mobilityFromNRCommand", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "mob_from_nr_cmd_s::crit_exts_c_::types"); -} - -const char* rrc_recfg_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcReconfiguration", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "rrc_recfg_s::crit_exts_c_::types"); -} - -const char* rrc_reest_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcReestablishment", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "rrc_reest_s::crit_exts_c_::types"); -} - -const char* rrc_release_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcRelease", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "rrc_release_s::crit_exts_c_::types"); -} - -const char* rrc_resume_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcResume", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "rrc_resume_s::crit_exts_c_::types"); -} - -const char* security_mode_cmd_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"securityModeCommand", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "security_mode_cmd_s::crit_exts_c_::types"); -} - -const char* ue_cap_enquiry_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"ueCapabilityEnquiry", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "ue_cap_enquiry_s::crit_exts_c_::types"); -} - -const char* ue_info_request_r16_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"ueInformationRequest-r16", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "ue_info_request_r16_s::crit_exts_c_::types"); -} - -const char* dl_dcch_msg_type_c::c1_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcReconfiguration", - "rrcResume", - "rrcRelease", - "rrcReestablishment", - "securityModeCommand", - "dlInformationTransfer", - "ueCapabilityEnquiry", - "counterCheck", - "mobilityFromNRCommand", - "dlDedicatedMessageSegment-r16", - "ueInformationRequest-r16", - "dlInformationTransferMRDC-r16", - "loggedMeasurementConfiguration-r16", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "dl_dcch_msg_type_c::c1_c_::types"); -} - -const char* dl_dcch_msg_type_c::types_opts::to_string() const -{ - static const char* names[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(names, 2, value, "dl_dcch_msg_type_c::types"); -} -uint8_t dl_dcch_msg_type_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "dl_dcch_msg_type_c::types"); -} - -// MRB-PDCP-ConfigBroadcast-r17 ::= SEQUENCE -SRSASN_CODE mrb_pdcp_cfg_broadcast_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(pdcp_sn_size_dl_r17_present, 1)); - HANDLE_CODE(bref.pack(t_reordering_r17_present, 1)); - - HANDLE_CODE(hdr_compress_r17.pack(bref)); - if (t_reordering_r17_present) { - HANDLE_CODE(t_reordering_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mrb_pdcp_cfg_broadcast_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(pdcp_sn_size_dl_r17_present, 1)); - HANDLE_CODE(bref.unpack(t_reordering_r17_present, 1)); - - HANDLE_CODE(hdr_compress_r17.unpack(bref)); - if (t_reordering_r17_present) { - HANDLE_CODE(t_reordering_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void mrb_pdcp_cfg_broadcast_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pdcp_sn_size_dl_r17_present) { - j.write_str("pdcp-SN-SizeDL-r17", "len12bits"); - } - j.write_fieldname("headerCompression-r17"); - hdr_compress_r17.to_json(j); - if (t_reordering_r17_present) { - j.write_str("t-Reordering-r17", t_reordering_r17.to_string()); - } - j.end_obj(); -} - -void mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::set(types::options e) -{ - type_ = e; -} -void mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::set_not_used() -{ - set(types::not_used); -} -mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::rohc_s_& -mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::set_rohc() -{ - set(types::rohc); - return c; -} -void mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_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.max_c_id_r17_present) { - j.write_int("maxCID-r17", c.max_c_id_r17); - } - j.write_fieldname("profiles-r17"); - j.start_obj(); - j.write_bool("profile0x0000-r17", c.profiles_r17.profile0x0000_r17); - j.write_bool("profile0x0001-r17", c.profiles_r17.profile0x0001_r17); - j.write_bool("profile0x0002-r17", c.profiles_r17.profile0x0002_r17); - j.end_obj(); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::not_used: - break; - case types::rohc: - HANDLE_CODE(bref.pack(c.max_c_id_r17_present, 1)); - if (c.max_c_id_r17_present) { - HANDLE_CODE(pack_integer(bref, c.max_c_id_r17, (uint8_t)1u, (uint8_t)16u)); - } - HANDLE_CODE(bref.pack(c.profiles_r17.profile0x0000_r17, 1)); - HANDLE_CODE(bref.pack(c.profiles_r17.profile0x0001_r17, 1)); - HANDLE_CODE(bref.pack(c.profiles_r17.profile0x0002_r17, 1)); - break; - default: - log_invalid_choice_id(type_, "mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_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.max_c_id_r17_present, 1)); - if (c.max_c_id_r17_present) { - HANDLE_CODE(unpack_integer(c.max_c_id_r17, bref, (uint8_t)1u, (uint8_t)16u)); - } - HANDLE_CODE(bref.unpack(c.profiles_r17.profile0x0000_r17, 1)); - HANDLE_CODE(bref.unpack(c.profiles_r17.profile0x0001_r17, 1)); - HANDLE_CODE(bref.unpack(c.profiles_r17.profile0x0002_r17, 1)); - break; - default: - log_invalid_choice_id(type_, "mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"notUsed", "rohc"}; - return convert_enum_idx(names, 2, value, "mrb_pdcp_cfg_broadcast_r17_s::hdr_compress_r17_c_::types"); -} - -const char* mrb_pdcp_cfg_broadcast_r17_s::t_reordering_r17_opts::to_string() const -{ - static const char* names[] = {"ms1", "ms10", "ms40", "ms160", "ms500", "ms1000", "ms1250", "ms2750"}; - return convert_enum_idx(names, 8, value, "mrb_pdcp_cfg_broadcast_r17_s::t_reordering_r17_e_"); -} -uint16_t mrb_pdcp_cfg_broadcast_r17_s::t_reordering_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {1, 10, 40, 160, 500, 1000, 1250, 2750}; - return map_enum_number(numbers, 8, value, "mrb_pdcp_cfg_broadcast_r17_s::t_reordering_r17_e_"); -} - -// MRB-RLC-ConfigBroadcast-r17 ::= SEQUENCE -SRSASN_CODE mrb_rlc_cfg_broadcast_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sn_field_len_r17_present, 1)); - HANDLE_CODE(bref.pack(t_reassembly_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, lc_ch_id_r17, (uint8_t)1u, (uint8_t)32u)); - if (t_reassembly_r17_present) { - HANDLE_CODE(t_reassembly_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mrb_rlc_cfg_broadcast_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sn_field_len_r17_present, 1)); - HANDLE_CODE(bref.unpack(t_reassembly_r17_present, 1)); - - HANDLE_CODE(unpack_integer(lc_ch_id_r17, bref, (uint8_t)1u, (uint8_t)32u)); - if (t_reassembly_r17_present) { - HANDLE_CODE(t_reassembly_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void mrb_rlc_cfg_broadcast_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("logicalChannelIdentity-r17", lc_ch_id_r17); - if (sn_field_len_r17_present) { - j.write_str("sn-FieldLength-r17", "size6"); - } - if (t_reassembly_r17_present) { - j.write_str("t-Reassembly-r17", t_reassembly_r17.to_string()); - } - j.end_obj(); -} - -// MRB-InfoBroadcast-r17 ::= SEQUENCE -SRSASN_CODE mrb_info_broadcast_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pdcp_cfg_r17.pack(bref)); - HANDLE_CODE(rlc_cfg_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mrb_info_broadcast_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(pdcp_cfg_r17.unpack(bref)); - HANDLE_CODE(rlc_cfg_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void mrb_info_broadcast_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("pdcp-Config-r17"); - pdcp_cfg_r17.to_json(j); - j.write_fieldname("rlc-Config-r17"); - rlc_cfg_r17.to_json(j); - j.end_obj(); -} - -// MBS-NeighbourCell-r17 ::= SEQUENCE -SRSASN_CODE mbs_neighbour_cell_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(carrier_freq_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, pci_r17, (uint16_t)0u, (uint16_t)1007u)); - if (carrier_freq_r17_present) { - HANDLE_CODE(pack_integer(bref, carrier_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mbs_neighbour_cell_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(carrier_freq_r17_present, 1)); - - HANDLE_CODE(unpack_integer(pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); - if (carrier_freq_r17_present) { - HANDLE_CODE(unpack_integer(carrier_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); - } - - return SRSASN_SUCCESS; -} -void mbs_neighbour_cell_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("physCellId-r17", pci_r17); - if (carrier_freq_r17_present) { - j.write_int("carrierFreq-r17", carrier_freq_r17); - } - j.end_obj(); -} - -// MBS-SessionInfo-r17 ::= SEQUENCE -SRSASN_CODE mbs_session_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(mtch_sched_info_r17_present, 1)); - HANDLE_CODE(bref.pack(mtch_neighbour_cell_r17_present, 1)); - HANDLE_CODE(bref.pack(pdsch_cfg_idx_r17_present, 1)); - HANDLE_CODE(bref.pack(mtch_ssb_map_win_idx_r17_present, 1)); - - HANDLE_CODE(mbs_session_id_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, g_rnti_r17, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(pack_dyn_seq_of(bref, mrb_list_broadcast_r17, 1, 4)); - if (mtch_sched_info_r17_present) { - HANDLE_CODE(pack_integer(bref, mtch_sched_info_r17, (uint8_t)0u, (uint8_t)63u)); - } - if (mtch_neighbour_cell_r17_present) { - HANDLE_CODE(mtch_neighbour_cell_r17.pack(bref)); - } - if (pdsch_cfg_idx_r17_present) { - HANDLE_CODE(pack_integer(bref, pdsch_cfg_idx_r17, (uint8_t)0u, (uint8_t)15u)); - } - if (mtch_ssb_map_win_idx_r17_present) { - HANDLE_CODE(pack_integer(bref, mtch_ssb_map_win_idx_r17, (uint8_t)0u, (uint8_t)15u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mbs_session_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(mtch_sched_info_r17_present, 1)); - HANDLE_CODE(bref.unpack(mtch_neighbour_cell_r17_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_cfg_idx_r17_present, 1)); - HANDLE_CODE(bref.unpack(mtch_ssb_map_win_idx_r17_present, 1)); - - HANDLE_CODE(mbs_session_id_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(g_rnti_r17, bref, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(unpack_dyn_seq_of(mrb_list_broadcast_r17, bref, 1, 4)); - if (mtch_sched_info_r17_present) { - HANDLE_CODE(unpack_integer(mtch_sched_info_r17, bref, (uint8_t)0u, (uint8_t)63u)); - } - if (mtch_neighbour_cell_r17_present) { - HANDLE_CODE(mtch_neighbour_cell_r17.unpack(bref)); - } - if (pdsch_cfg_idx_r17_present) { - HANDLE_CODE(unpack_integer(pdsch_cfg_idx_r17, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (mtch_ssb_map_win_idx_r17_present) { - HANDLE_CODE(unpack_integer(mtch_ssb_map_win_idx_r17, bref, (uint8_t)0u, (uint8_t)15u)); - } - - return SRSASN_SUCCESS; -} -void mbs_session_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("mbs-SessionId-r17"); - mbs_session_id_r17.to_json(j); - j.write_int("g-RNTI-r17", g_rnti_r17); - j.start_array("mrb-ListBroadcast-r17"); - for (const auto& e1 : mrb_list_broadcast_r17) { - e1.to_json(j); - } - j.end_array(); - if (mtch_sched_info_r17_present) { - j.write_int("mtch-SchedulingInfo-r17", mtch_sched_info_r17); - } - if (mtch_neighbour_cell_r17_present) { - j.write_str("mtch-NeighbourCell-r17", mtch_neighbour_cell_r17.to_string()); - } - if (pdsch_cfg_idx_r17_present) { - j.write_int("pdsch-ConfigIndex-r17", pdsch_cfg_idx_r17); - } - if (mtch_ssb_map_win_idx_r17_present) { - j.write_int("mtch-SSB-MappingWindowIndex-r17", mtch_ssb_map_win_idx_r17); - } - j.end_obj(); -} - -// MTCH-SSB-MappingWindowCycleOffset-r17 ::= CHOICE -void mtch_ssb_map_win_cycle_offset_r17_c::destroy_() {} -void mtch_ssb_map_win_cycle_offset_r17_c::set(types::options e) -{ - destroy_(); - type_ = e; -} -mtch_ssb_map_win_cycle_offset_r17_c::mtch_ssb_map_win_cycle_offset_r17_c( - const mtch_ssb_map_win_cycle_offset_r17_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::ms64: - c.init(other.c.get()); - break; - case types::ms128: - c.init(other.c.get()); - break; - case types::ms256: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "mtch_ssb_map_win_cycle_offset_r17_c"); - } -} -mtch_ssb_map_win_cycle_offset_r17_c& -mtch_ssb_map_win_cycle_offset_r17_c::operator=(const mtch_ssb_map_win_cycle_offset_r17_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::ms64: - c.set(other.c.get()); - break; - case types::ms128: - c.set(other.c.get()); - break; - case types::ms256: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "mtch_ssb_map_win_cycle_offset_r17_c"); - } - - return *this; -} -uint8_t& mtch_ssb_map_win_cycle_offset_r17_c::set_ms10() -{ - set(types::ms10); - return c.get(); -} -uint8_t& mtch_ssb_map_win_cycle_offset_r17_c::set_ms20() -{ - set(types::ms20); - return c.get(); -} -uint8_t& mtch_ssb_map_win_cycle_offset_r17_c::set_ms32() -{ - set(types::ms32); - return c.get(); -} -uint8_t& mtch_ssb_map_win_cycle_offset_r17_c::set_ms64() -{ - set(types::ms64); - return c.get(); -} -uint8_t& mtch_ssb_map_win_cycle_offset_r17_c::set_ms128() -{ - set(types::ms128); - return c.get(); -} -uint16_t& mtch_ssb_map_win_cycle_offset_r17_c::set_ms256() -{ - set(types::ms256); - return c.get(); -} -void mtch_ssb_map_win_cycle_offset_r17_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::ms64: - j.write_int("ms64", c.get()); - break; - case types::ms128: - j.write_int("ms128", c.get()); - break; - case types::ms256: - j.write_int("ms256", c.get()); - break; - default: - log_invalid_choice_id(type_, "mtch_ssb_map_win_cycle_offset_r17_c"); - } - j.end_obj(); -} -SRSASN_CODE mtch_ssb_map_win_cycle_offset_r17_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::ms64: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::ms128: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); - break; - case types::ms256: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)255u)); - break; - default: - log_invalid_choice_id(type_, "mtch_ssb_map_win_cycle_offset_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE mtch_ssb_map_win_cycle_offset_r17_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::ms64: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::ms128: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); - break; - case types::ms256: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)255u)); - break; - default: - log_invalid_choice_id(type_, "mtch_ssb_map_win_cycle_offset_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* mtch_ssb_map_win_cycle_offset_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"ms10", "ms20", "ms32", "ms64", "ms128", "ms256"}; - return convert_enum_idx(names, 6, value, "mtch_ssb_map_win_cycle_offset_r17_c::types"); -} -uint16_t mtch_ssb_map_win_cycle_offset_r17_c::types_opts::to_number() const -{ - static const uint16_t numbers[] = {10, 20, 32, 64, 128, 256}; - return map_enum_number(numbers, 6, value, "mtch_ssb_map_win_cycle_offset_r17_c::types"); -} - -const char* drx_cfg_ptm_r17_s::drx_on_dur_timer_ptm_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"subMilliSeconds", "milliSeconds"}; - return convert_enum_idx(names, 2, value, "drx_cfg_ptm_r17_s::drx_on_dur_timer_ptm_r17_c_::types"); -} - -const char* drx_cfg_ptm_r17_s::drx_long_cycle_start_offset_ptm_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", - "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", - "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; - return convert_enum_idx(names, 20, value, "drx_cfg_ptm_r17_s::drx_long_cycle_start_offset_ptm_r17_c_::types"); -} -uint16_t drx_cfg_ptm_r17_s::drx_long_cycle_start_offset_ptm_r17_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, - 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; - return map_enum_number(numbers, 20, value, "drx_cfg_ptm_r17_s::drx_long_cycle_start_offset_ptm_r17_c_::types"); -} - -// MBSBroadcastConfiguration-r17-IEs ::= SEQUENCE -SRSASN_CODE mbs_broadcast_cfg_r17_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(mbs_session_info_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(mbs_neighbour_cell_list_r17_present, 1)); - HANDLE_CODE(bref.pack(drx_cfg_ptm_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(pdsch_cfg_mtch_r17_present, 1)); - HANDLE_CODE(bref.pack(mtch_ssb_map_win_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (mbs_session_info_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, mbs_session_info_list_r17, 1, 1024)); - } - if (mbs_neighbour_cell_list_r17_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, mbs_neighbour_cell_list_r17, 0, 8)); - } - if (drx_cfg_ptm_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, drx_cfg_ptm_list_r17, 1, 64)); - } - if (pdsch_cfg_mtch_r17_present) { - HANDLE_CODE(pdsch_cfg_mtch_r17.pack(bref)); - } - if (mtch_ssb_map_win_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, mtch_ssb_map_win_list_r17, 1, 16)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mbs_broadcast_cfg_r17_ies_s::unpack(cbit_ref& bref) -{ - bool mbs_session_info_list_r17_present; - HANDLE_CODE(bref.unpack(mbs_session_info_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(mbs_neighbour_cell_list_r17_present, 1)); - bool drx_cfg_ptm_list_r17_present; - HANDLE_CODE(bref.unpack(drx_cfg_ptm_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_cfg_mtch_r17_present, 1)); - bool mtch_ssb_map_win_list_r17_present; - HANDLE_CODE(bref.unpack(mtch_ssb_map_win_list_r17_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (mbs_session_info_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(mbs_session_info_list_r17, bref, 1, 1024)); - } - if (mbs_neighbour_cell_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(mbs_neighbour_cell_list_r17, bref, 0, 8)); - } - if (drx_cfg_ptm_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(drx_cfg_ptm_list_r17, bref, 1, 64)); - } - if (pdsch_cfg_mtch_r17_present) { - HANDLE_CODE(pdsch_cfg_mtch_r17.unpack(bref)); - } - if (mtch_ssb_map_win_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(mtch_ssb_map_win_list_r17, bref, 1, 16)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void mbs_broadcast_cfg_r17_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (mbs_session_info_list_r17.size() > 0) { - j.start_array("mbs-SessionInfoList-r17"); - for (const auto& e1 : mbs_session_info_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (mbs_neighbour_cell_list_r17_present) { - j.start_array("mbs-NeighbourCellList-r17"); - for (const auto& e1 : mbs_neighbour_cell_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (drx_cfg_ptm_list_r17.size() > 0) { - j.start_array("drx-ConfigPTM-List-r17"); - for (const auto& e1 : drx_cfg_ptm_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (pdsch_cfg_mtch_r17_present) { - j.write_fieldname("pdsch-ConfigMTCH-r17"); - pdsch_cfg_mtch_r17.to_json(j); - } - if (mtch_ssb_map_win_list_r17.size() > 0) { - j.start_array("mtch-SSB-MappingWindowList-r17"); - for (const auto& e1 : mtch_ssb_map_win_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// MBSBroadcastConfiguration-r17 ::= SEQUENCE -SRSASN_CODE mbs_broadcast_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mbs_broadcast_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void mbs_broadcast_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void mbs_broadcast_cfg_r17_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -mbs_broadcast_cfg_r17_ies_s& mbs_broadcast_cfg_r17_s::crit_exts_c_::set_mbs_broadcast_cfg_r17() -{ - set(types::mbs_broadcast_cfg_r17); - return c; -} -void mbs_broadcast_cfg_r17_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void mbs_broadcast_cfg_r17_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::mbs_broadcast_cfg_r17: - j.write_fieldname("mbsBroadcastConfiguration-r17"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "mbs_broadcast_cfg_r17_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE mbs_broadcast_cfg_r17_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::mbs_broadcast_cfg_r17: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "mbs_broadcast_cfg_r17_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE mbs_broadcast_cfg_r17_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::mbs_broadcast_cfg_r17: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "mbs_broadcast_cfg_r17_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* mbs_broadcast_cfg_r17_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"mbsBroadcastConfiguration-r17", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "mbs_broadcast_cfg_r17_s::crit_exts_c_::types"); -} - -// MCCH-MessageType-r17 ::= CHOICE -void mcch_msg_type_r17_c::set(types::options e) -{ - type_ = e; -} -mcch_msg_type_r17_c::c1_c_& mcch_msg_type_r17_c::set_c1() -{ - set(types::c1); - return c; -} -void mcch_msg_type_r17_c::set_msg_class_ext() -{ - set(types::msg_class_ext); -} -void mcch_msg_type_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.to_json(j); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "mcch_msg_type_r17_c"); - } - j.end_obj(); -} -SRSASN_CODE mcch_msg_type_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::c1: - HANDLE_CODE(c.pack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "mcch_msg_type_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE mcch_msg_type_r17_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.unpack(bref)); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "mcch_msg_type_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void mcch_msg_type_r17_c::c1_c_::set(types::options e) -{ - type_ = e; -} -mbs_broadcast_cfg_r17_s& mcch_msg_type_r17_c::c1_c_::set_mbs_broadcast_cfg_r17() -{ - set(types::mbs_broadcast_cfg_r17); - return c; -} -void mcch_msg_type_r17_c::c1_c_::set_spare1() -{ - set(types::spare1); -} -void mcch_msg_type_r17_c::c1_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::mbs_broadcast_cfg_r17: - j.write_fieldname("mbsBroadcastConfiguration-r17"); - c.to_json(j); - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "mcch_msg_type_r17_c::c1_c_"); - } - j.end_obj(); -} -SRSASN_CODE mcch_msg_type_r17_c::c1_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::mbs_broadcast_cfg_r17: - HANDLE_CODE(c.pack(bref)); - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "mcch_msg_type_r17_c::c1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE mcch_msg_type_r17_c::c1_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::mbs_broadcast_cfg_r17: - HANDLE_CODE(c.unpack(bref)); - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "mcch_msg_type_r17_c::c1_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* mcch_msg_type_r17_c::c1_c_::types_opts::to_string() const -{ - static const char* names[] = {"mbsBroadcastConfiguration-r17", "spare1"}; - return convert_enum_idx(names, 2, value, "mcch_msg_type_r17_c::c1_c_::types"); -} - -const char* mcch_msg_type_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(names, 2, value, "mcch_msg_type_r17_c::types"); -} -uint8_t mcch_msg_type_r17_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "mcch_msg_type_r17_c::types"); -} - -// MCCH-Message-r17 ::= SEQUENCE -SRSASN_CODE mcch_msg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(msg.pack(bref)); - - bref.align_bytes_zero(); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mcch_msg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(msg.unpack(bref)); - - bref.align_bytes(); - - return SRSASN_SUCCESS; -} -void mcch_msg_r17_s::to_json(json_writer& j) const -{ - j.start_array(); - j.start_obj(); - j.start_obj("MCCH-Message-r17"); - j.write_fieldname("message"); - msg.to_json(j); - j.end_obj(); - j.end_obj(); - j.end_array(); -} - -// PagingRecord-v1700 ::= SEQUENCE -SRSASN_CODE paging_record_v1700_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(paging_cause_r17_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE paging_record_v1700_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(paging_cause_r17_present, 1)); - - return SRSASN_SUCCESS; -} -void paging_record_v1700_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (paging_cause_r17_present) { - j.write_str("pagingCause-r17", "voice"); - } - j.end_obj(); -} - -// PagingUE-Identity ::= CHOICE -void paging_ue_id_c::destroy_() -{ - switch (type_) { - case types::ng_5_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) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::ng_5_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"); - } -} -paging_ue_id_c::paging_ue_id_c(const paging_ue_id_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::ng_5_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"); - } -} -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_5_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; -} -fixed_bitstring<48>& paging_ue_id_c::set_ng_5_g_s_tmsi() -{ - set(types::ng_5_g_s_tmsi); - return c.get>(); -} -fixed_bitstring<40>& paging_ue_id_c::set_full_i_rnti() -{ - set(types::full_i_rnti); - return c.get>(); -} -void paging_ue_id_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ng_5_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(); -} -SRSASN_CODE paging_ue_id_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ng_5_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; -} -SRSASN_CODE paging_ue_id_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ng_5_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; -} - -const char* paging_ue_id_c::types_opts::to_string() const -{ - static const char* names[] = {"ng-5G-S-TMSI", "fullI-RNTI"}; - return convert_enum_idx(names, 2, value, "paging_ue_id_c::types"); -} -int8_t paging_ue_id_c::types_opts::to_number() const -{ - static const int8_t numbers[] = {-5}; - return map_enum_number(numbers, 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(access_type_present, 1)); - - HANDLE_CODE(ue_id.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE paging_record_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(access_type_present, 1)); - - HANDLE_CODE(ue_id.unpack(bref)); - - return SRSASN_SUCCESS; -} -void paging_record_s::to_json(json_writer& j) 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(); -} - -// Paging-v1700-IEs ::= SEQUENCE -SRSASN_CODE paging_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(paging_record_list_v1700.size() > 0, 1)); - HANDLE_CODE(bref.pack(paging_group_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (paging_record_list_v1700.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, paging_record_list_v1700, 1, 32)); - } - if (paging_group_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, paging_group_list_r17, 1, 32)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE paging_v1700_ies_s::unpack(cbit_ref& bref) -{ - bool paging_record_list_v1700_present; - HANDLE_CODE(bref.unpack(paging_record_list_v1700_present, 1)); - bool paging_group_list_r17_present; - HANDLE_CODE(bref.unpack(paging_group_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (paging_record_list_v1700_present) { - HANDLE_CODE(unpack_dyn_seq_of(paging_record_list_v1700, bref, 1, 32)); - } - if (paging_group_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(paging_group_list_r17, bref, 1, 32)); - } - - return SRSASN_SUCCESS; -} -void paging_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (paging_record_list_v1700.size() > 0) { - j.start_array("pagingRecordList-v1700"); - for (const auto& e1 : paging_record_list_v1700) { - e1.to_json(j); - } - j.end_array(); - } - if (paging_group_list_r17.size() > 0) { - j.start_array("pagingGroupList-r17"); - for (const auto& e1 : paging_group_list_r17) { - 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(); -} - -// Paging ::= SEQUENCE -SRSASN_CODE paging_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(paging_record_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (paging_record_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, paging_record_list, 1, 32)); - } - if (late_non_crit_ext.size() > 0) { - 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 paging_s::unpack(cbit_ref& bref) -{ - bool paging_record_list_present; - HANDLE_CODE(bref.unpack(paging_record_list_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (paging_record_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(paging_record_list, bref, 1, 32)); - } - 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 paging_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (paging_record_list.size() > 0) { - j.start_array("pagingRecordList"); - for (const auto& e1 : paging_record_list) { - e1.to_json(j); - } - j.end_array(); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// PCCH-MessageType ::= CHOICE -void pcch_msg_type_c::set(types::options e) -{ - type_ = e; -} -pcch_msg_type_c::c1_c_& pcch_msg_type_c::set_c1() -{ - set(types::c1); - return c; -} -void pcch_msg_type_c::set_msg_class_ext() -{ - set(types::msg_class_ext); -} -void pcch_msg_type_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.to_json(j); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "pcch_msg_type_c"); - } - j.end_obj(); -} -SRSASN_CODE pcch_msg_type_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::c1: - HANDLE_CODE(c.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; -} -SRSASN_CODE pcch_msg_type_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.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; -} - -void pcch_msg_type_c::c1_c_::set(types::options e) -{ - type_ = e; -} -paging_s& pcch_msg_type_c::c1_c_::set_paging() -{ - set(types::paging); - return c; -} -void pcch_msg_type_c::c1_c_::set_spare1() -{ - set(types::spare1); -} -void pcch_msg_type_c::c1_c_::to_json(json_writer& j) 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(); -} -SRSASN_CODE pcch_msg_type_c::c1_c_::pack(bit_ref& bref) 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; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pcch_msg_type_c::c1_c_::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; - } - return SRSASN_SUCCESS; -} - -const char* pcch_msg_type_c::c1_c_::types_opts::to_string() const -{ - static const char* names[] = {"paging", "spare1"}; - return convert_enum_idx(names, 2, value, "pcch_msg_type_c::c1_c_::types"); -} - -const char* pcch_msg_type_c::types_opts::to_string() const -{ - static const char* names[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(names, 2, value, "pcch_msg_type_c::types"); -} -uint8_t pcch_msg_type_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "pcch_msg_type_c::types"); -} - -// PCCH-Message ::= SEQUENCE -SRSASN_CODE pcch_msg_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(msg.pack(bref)); - - bref.align_bytes_zero(); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pcch_msg_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(msg.unpack(bref)); - - bref.align_bytes(); - - return SRSASN_SUCCESS; -} -void pcch_msg_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.end_obj(); - j.end_array(); -} - -const char* init_ue_id_c::types_opts::to_string() const -{ - static const char* names[] = {"ng-5G-S-TMSI-Part1", "randomValue"}; - return convert_enum_idx(names, 2, value, "init_ue_id_c::types"); -} -int8_t init_ue_id_c::types_opts::to_number() const -{ - static const int8_t numbers[] = {-5}; - return map_enum_number(numbers, 1, value, "init_ue_id_c::types"); -} - -const char* rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcPosSystemInfoRequest-r16", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::types"); -} - -const char* rrc_sys_info_request_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcSystemInfoRequest", "criticalExtensionsFuture-r16"}; - return convert_enum_idx(names, 2, value, "rrc_sys_info_request_s::crit_exts_c_::types"); -} - -const char* ul_ccch_msg_type_c::c1_c_::types_opts::to_string() const -{ - static const char* names[] = { - "rrcSetupRequest", "rrcResumeRequest", "rrcReestablishmentRequest", "rrcSystemInfoRequest"}; - return convert_enum_idx(names, 4, value, "ul_ccch_msg_type_c::c1_c_::types"); -} - -const char* ul_ccch_msg_type_c::types_opts::to_string() const -{ - static const char* names[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(names, 2, value, "ul_ccch_msg_type_c::types"); -} -uint8_t ul_ccch_msg_type_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "ul_ccch_msg_type_c::types"); -} - -// RRCResumeRequest1-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_request1_ies_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)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_request1_ies_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)); - - return SRSASN_SUCCESS; -} -void rrc_resume_request1_ies_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()); - j.end_obj(); -} - -// RRCResumeRequest1 ::= SEQUENCE -SRSASN_CODE rrc_resume_request1_s::pack(bit_ref& bref) const -{ - 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)); - - return SRSASN_SUCCESS; -} -void rrc_resume_request1_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("rrcResumeRequest1"); - rrc_resume_request1.to_json(j); - j.end_obj(); -} - -// UL-CCCH1-MessageType ::= CHOICE -void ul_ccch1_msg_type_c::set(types::options e) -{ - type_ = e; -} -ul_ccch1_msg_type_c::c1_c_& ul_ccch1_msg_type_c::set_c1() -{ - set(types::c1); - return c; -} -void ul_ccch1_msg_type_c::set_msg_class_ext() -{ - set(types::msg_class_ext); -} -void ul_ccch1_msg_type_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.to_json(j); - break; - case types::msg_class_ext: - break; - default: - log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); - } - j.end_obj(); -} -SRSASN_CODE ul_ccch1_msg_type_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::c1: - HANDLE_CODE(c.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; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_ccch1_msg_type_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.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; - } - return SRSASN_SUCCESS; -} - -void ul_ccch1_msg_type_c::c1_c_::set(types::options e) -{ - type_ = e; -} -rrc_resume_request1_s& ul_ccch1_msg_type_c::c1_c_::set_rrc_resume_request1() -{ - set(types::rrc_resume_request1); - return c; -} -void ul_ccch1_msg_type_c::c1_c_::set_spare3() -{ - set(types::spare3); -} -void ul_ccch1_msg_type_c::c1_c_::set_spare2() -{ - set(types::spare2); -} -void ul_ccch1_msg_type_c::c1_c_::set_spare1() -{ - set(types::spare1); -} -void ul_ccch1_msg_type_c::c1_c_::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_"); - } - j.end_obj(); -} -SRSASN_CODE ul_ccch1_msg_type_c::c1_c_::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; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_ccch1_msg_type_c::c1_c_::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; -} - -const char* ul_ccch1_msg_type_c::c1_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcResumeRequest1", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 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 numbers[] = {1}; - return map_enum_number(numbers, 1, value, "ul_ccch1_msg_type_c::c1_c_::types"); -} - -const char* ul_ccch1_msg_type_c::types_opts::to_string() const -{ - static const char* names[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(names, 2, value, "ul_ccch1_msg_type_c::types"); -} -uint8_t ul_ccch1_msg_type_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "ul_ccch1_msg_type_c::types"); -} - -// UL-CCCH1-Message ::= SEQUENCE -SRSASN_CODE ul_ccch1_msg_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(msg.pack(bref)); - - bref.align_bytes_zero(); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_ccch1_msg_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(msg.unpack(bref)); - - bref.align_bytes(); - - return SRSASN_SUCCESS; -} -void ul_ccch1_msg_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.end_obj(); - j.end_array(); -} - -const char* plmn_id_eutra_5_gc_c::types_opts::to_string() const -{ - static const char* names[] = {"plmn-Identity-EUTRA-5GC", "plmn-index"}; - return convert_enum_idx(names, 2, value, "plmn_id_eutra_5_gc_c::types"); -} -int8_t plmn_id_eutra_5_gc_c::types_opts::to_number() const -{ - static const int8_t numbers[] = {-5}; - return map_enum_number(numbers, 1, value, "plmn_id_eutra_5_gc_c::types"); -} - -const char* cell_id_eutra_5_gc_c::types_opts::to_string() const -{ - static const char* names[] = {"cellIdentity-EUTRA", "cellId-index"}; - return convert_enum_idx(names, 2, value, "cell_id_eutra_5_gc_c::types"); -} - -const char* default_dc_location_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"ul", "dl", "ulAndDL"}; - return convert_enum_idx(names, 3, value, "default_dc_location_r17_c::types"); -} - -const char* cc_group_r17_s::offset_to_default_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"offsetValue", "offsetlist"}; - return convert_enum_idx(names, 2, value, "cc_group_r17_s::offset_to_default_r17_c_::types"); -} - -const char* ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"bwp-Id-r16", "deactivatedCarrier-r16"}; - return convert_enum_idx(names, 2, value, "ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::types"); -} - -const char* sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"sl-AM-Mode-r16", "sl-UM-Mode-r16"}; - return convert_enum_idx(names, 2, value, "sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::types"); -} - -const char* per_ra_info_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"perRASSBInfoList-r16", "perRACSI-RSInfoList-r16"}; - return convert_enum_idx(names, 2, value, "per_ra_info_r16_c::types"); -} - -const char* sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"subMilliSeconds", "milliSeconds"}; - return convert_enum_idx(names, 2, value, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::types"); -} - -const char* sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", - "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", - "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; - return convert_enum_idx(names, 20, value, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::types"); -} -uint16_t sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, - 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; - return map_enum_number( - numbers, 20, value, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::types"); -} - -const char* visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"cgi-Info-r17", "pci-arfcn-r17"}; - return convert_enum_idx( - names, 2, value, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::types"); -} - -const char* visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"cellGlobalId-r17", "pci-arfcn-r17"}; - return convert_enum_idx( - names, 2, value, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::types"); -} - -const char* visited_pscell_info_r17_s::visited_cell_id_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"nr-CellId-r17", "eutra-CellId-r17"}; - return convert_enum_idx(names, 2, value, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::types"); -} - -const char* sl_tx_res_req_comm_relay_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"sl-TxResourceReqL2U2N-Relay-r17", "sl-TxResourceReqL3U2N-Relay-r17"}; - return convert_enum_idx(names, 2, value, "sl_tx_res_req_comm_relay_r17_c::types"); -} -uint8_t sl_tx_res_req_comm_relay_r17_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 3}; - return map_enum_number(numbers, 2, value, "sl_tx_res_req_comm_relay_r17_c::types"); -} - -const char* cho_candidate_cell_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"cellGlobalId-r17", "pci-arfcn-r17"}; - return convert_enum_idx(names, 2, value, "cho_candidate_cell_r17_c::types"); -} - -const char* nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"ms20-r16", "ms40-r16", "ms80-r16", "ms160-r16"}; - return convert_enum_idx(names, 4, value, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::types"); -} -uint8_t nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {20, 40, 80, 160}; - return map_enum_number(numbers, 4, value, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::types"); -} - -const char* nr_time_stamp_r17_s::nr_slot_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"scs15-r17", "scs30-r17", "scs60-r17", "scs120-r17"}; - return convert_enum_idx(names, 4, value, "nr_time_stamp_r17_s::nr_slot_r17_c_::types"); -} -uint8_t nr_time_stamp_r17_s::nr_slot_r17_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {15, 30, 60, 120}; - return map_enum_number(numbers, 4, value, "nr_time_stamp_r17_s::nr_slot_r17_c_::types"); -} - -const char* visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"cgi-Info", "pci-arfcn-r16"}; - return convert_enum_idx(names, 2, value, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::types"); -} - -const char* visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"cellGlobalId-r16", "pci-arfcn-r16"}; - return convert_enum_idx( - names, 2, value, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::types"); -} - -const char* visited_cell_info_r16_s::visited_cell_id_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"nr-CellId-r16", "eutra-CellId-r16"}; - return convert_enum_idx(names, 2, value, "visited_cell_info_r16_s::visited_cell_id_r16_c_::types"); -} - -const char* meas_results_sl_r16_s::meas_results_list_sl_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"measResultNR-SL-r16"}; - return convert_enum_idx(names, 1, value, "meas_results_sl_r16_s::meas_results_list_sl_r16_c_::types"); -} - -const char* ra_report_r16_s::cell_id_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"cellGlobalId-r16", "pci-arfcn-r16"}; - return convert_enum_idx(names, 2, value, "ra_report_r16_s::cell_id_r16_c_::types"); -} - -const char* rrc_recfg_complete_v1560_ies_s::scg_resp_c_::types_opts::to_string() const -{ - static const char* names[] = {"nr-SCG-Response", "eutra-SCG-Response"}; - return convert_enum_idx(names, 2, value, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_::types"); -} - -const char* delay_budget_report_c::types_opts::to_string() const -{ - static const char* names[] = {"type1"}; - return convert_enum_idx(names, 1, value, "delay_budget_report_c::types"); -} -uint8_t delay_budget_report_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "delay_budget_report_c::types"); -} - -const char* location_meas_info_c::types_opts::to_string() const -{ - static const char* names[] = {"eutra-RSTD", "eutra-FineTimingDetection", "nr-PRS-Measurement-r16"}; - return convert_enum_idx(names, 3, value, "location_meas_info_c::types"); -} - -const char* meas_results_s::meas_result_neigh_cells_c_::types_opts::to_string() const -{ - static const char* names[] = { - "measResultListNR", "measResultListEUTRA", "measResultListUTRA-FDD-r16", "sl-MeasResultsCandRelay-r17"}; - return convert_enum_idx(names, 4, value, "meas_results_s::meas_result_neigh_cells_c_::types"); -} - -const char* rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"nrPreviousCell-r16", "eutraPreviousCell-r16"}; - return convert_enum_idx(names, 2, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::types"); -} - -const char* -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"cellGlobalId-r16", "pci-arfcn-r16"}; - return convert_enum_idx( - names, - 2, - value, - "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::types"); -} - -const char* -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::types_opts::to_string() - const -{ - static const char* names[] = {"cellGlobalId-r16", "pci-arfcn-r16"}; - return convert_enum_idx( - names, - 2, - value, - "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::types"); -} - -const char* rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"nrFailedPCellId-r16", "eutraFailedPCellId-r16"}; - return convert_enum_idx(names, 2, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::types"); -} - -const char* rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"nrReconnectCellId-r16", "eutraReconnectCellId-r16"}; - return convert_enum_idx(names, 2, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::types"); -} - -const char* rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"cellGlobalId-r17", "pci-arfcn-r17"}; - return convert_enum_idx(names, 2, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::types"); -} - -const char* rlf_report_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"nr-RLF-Report-r16", "eutra-RLF-Report-r16"}; - return convert_enum_idx(names, 2, value, "rlf_report_r16_c::types"); -} - -const char* rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"nr-SCG-Response", "eutra-SCG-Response"}; - return convert_enum_idx(names, 2, value, "rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::types"); -} - -const char* s_nssai_c::types_opts::to_string() const -{ - static const char* names[] = {"sst", "sst-SD"}; - return convert_enum_idx(names, 2, value, "s_nssai_c::types"); -} - -const char* iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_:: - types_opts::to_string() const -{ - static const char* names[] = {"iab-IPv6-AddressNumReq-r16", "iab-IPv6-AddressPrefixReq-r16"}; - return convert_enum_idx( - names, - 2, - value, - "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::types"); -} - -const char* -iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::types_opts::to_string() - const -{ - static const char* names[] = {"iab-IPv6-AddressReport-r16", "iab-IPv6-PrefixReport-r16"}; - return convert_enum_idx( - names, - 2, - value, - "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::types"); -} - -const char* iab_other_info_r16_ies_s::ip_info_type_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"iab-IP-Request-r16", "iab-IP-Report-r16"}; - return convert_enum_idx(names, 2, value, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::types"); -} - -// MeasurementReportAppLayer-r17-IEs ::= SEQUENCE -SRSASN_CODE meas_report_app_layer_r17_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, meas_report_app_layer_list_r17, 1, 16)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_report_app_layer_r17_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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(meas_report_app_layer_list_r17, bref, 1, 16)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void meas_report_app_layer_r17_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("measurementReportAppLayerList-r17"); - for (const auto& e1 : meas_report_app_layer_list_r17) { - e1.to_json(j); - } - j.end_array(); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -const char* rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::types_opts::to_string() const -{ - static const char* names[] = {"ng-5G-S-TMSI", "ng-5G-S-TMSI-Part2"}; - return convert_enum_idx(names, 2, value, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::types"); -} - -const char* counter_check_resp_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"counterCheckResponse", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "counter_check_resp_s::crit_exts_c_::types"); -} - -const char* ded_sib_request_r16_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"dedicatedSIBRequest-r16", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "ded_sib_request_r16_s::crit_exts_c_::types"); -} - -const char* fail_info_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"failureInformation", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "fail_info_s::crit_exts_c_::types"); -} - -const char* iab_other_info_r16_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"iabOtherInformation-r16", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "iab_other_info_r16_s::crit_exts_c_::types"); -} - -const char* location_meas_ind_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"locationMeasurementIndication", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "location_meas_ind_s::crit_exts_c_::types"); -} - -const char* mb_si_nterest_ind_r17_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"mbsInterestIndication-r17", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "mb_si_nterest_ind_r17_s::crit_exts_c_::types"); -} - -const char* mcg_fail_info_r16_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"mcgFailureInformation-r16", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "mcg_fail_info_r16_s::crit_exts_c_::types"); -} - -const char* meas_report_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"measurementReport", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "meas_report_s::crit_exts_c_::types"); -} - -const char* rrc_recfg_complete_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcReconfigurationComplete", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "rrc_recfg_complete_s::crit_exts_c_::types"); -} - -const char* rrc_reest_complete_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcReestablishmentComplete", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "rrc_reest_complete_s::crit_exts_c_::types"); -} - -const char* rrc_resume_complete_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcResumeComplete", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "rrc_resume_complete_s::crit_exts_c_::types"); -} - -const char* rrc_setup_complete_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"rrcSetupComplete", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "rrc_setup_complete_s::crit_exts_c_::types"); -} - -const char* scg_fail_info_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"scgFailureInformation", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "scg_fail_info_s::crit_exts_c_::types"); -} - -const char* scg_fail_info_eutra_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"scgFailureInformationEUTRA", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "scg_fail_info_eutra_s::crit_exts_c_::types"); -} - -const char* security_mode_complete_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"securityModeComplete", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "security_mode_complete_s::crit_exts_c_::types"); -} - -const char* security_mode_fail_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"securityModeFailure", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "security_mode_fail_s::crit_exts_c_::types"); -} - -const char* sidelink_ue_info_nr_r16_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"sidelinkUEInformationNR-r16", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "sidelink_ue_info_nr_r16_s::crit_exts_c_::types"); -} - -const char* ue_assist_info_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"ueAssistanceInformation", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "ue_assist_info_s::crit_exts_c_::types"); -} - -const char* ue_cap_info_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"ueCapabilityInformation", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "ue_cap_info_s::crit_exts_c_::types"); -} - -const char* ue_info_resp_r16_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"ueInformationResponse-r16", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "ue_info_resp_r16_s::crit_exts_c_::types"); -} - -const char* ue_positioning_assist_info_r17_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"uePositioningAssistanceInfo-r17", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "ue_positioning_assist_info_r17_s::crit_exts_c_::types"); -} - -const char* ul_ded_msg_segment_r16_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"ulDedicatedMessageSegment-r16", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "ul_ded_msg_segment_r16_s::crit_exts_c_::types"); -} - -const char* ul_info_transfer_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"ulInformationTransfer", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "ul_info_transfer_s::crit_exts_c_::types"); -} - -const char* ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::types_opts::to_string() const -{ - static const char* names[] = {"ulInformationTransferIRAT-r16", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::types"); -} - -const char* ul_info_transfer_irat_r16_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"c1", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "ul_info_transfer_irat_r16_s::crit_exts_c_::types"); -} -uint8_t ul_info_transfer_irat_r16_s::crit_exts_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "ul_info_transfer_irat_r16_s::crit_exts_c_::types"); -} - -const char* ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::types_opts::to_string() const -{ - static const char* names[] = {"ulInformationTransferMRDC", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::types"); -} - -const char* ul_info_transfer_mrdc_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"c1", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 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 numbers[] = {1}; - return map_enum_number(numbers, 1, value, "ul_info_transfer_mrdc_s::crit_exts_c_::types"); -} - -const char* ul_dcch_msg_type_c::c1_c_::types_opts::to_string() const -{ - static const char* names[] = {"measurementReport", - "rrcReconfigurationComplete", - "rrcSetupComplete", - "rrcReestablishmentComplete", - "rrcResumeComplete", - "securityModeComplete", - "securityModeFailure", - "ulInformationTransfer", - "locationMeasurementIndication", - "ueCapabilityInformation", - "counterCheckResponse", - "ueAssistanceInformation", - "failureInformation", - "ulInformationTransferMRDC", - "scgFailureInformation", - "scgFailureInformationEUTRA"}; - return convert_enum_idx(names, 16, value, "ul_dcch_msg_type_c::c1_c_::types"); -} - -const char* ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::types_opts::to_string() const -{ - static const char* names[] = {"ulDedicatedMessageSegment-r16", - "dedicatedSIBRequest-r16", - "mcgFailureInformation-r16", - "ueInformationResponse-r16", - "sidelinkUEInformationNR-r16", - "ulInformationTransferIRAT-r16", - "iabOtherInformation-r16", - "mbsInterestIndication-r17", - "uePositioningAssistanceInfo-r17", - "measurementReportAppLayer-r17", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::types"); -} - -const char* ul_dcch_msg_type_c::msg_class_ext_c_::types_opts::to_string() const -{ - static const char* names[] = {"c2", "messageClassExtensionFuture-r16"}; - return convert_enum_idx(names, 2, value, "ul_dcch_msg_type_c::msg_class_ext_c_::types"); -} -uint8_t ul_dcch_msg_type_c::msg_class_ext_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {2}; - return map_enum_number(numbers, 1, value, "ul_dcch_msg_type_c::msg_class_ext_c_::types"); -} - -const char* ul_dcch_msg_type_c::types_opts::to_string() const -{ - static const char* names[] = {"c1", "messageClassExtension"}; - return convert_enum_idx(names, 2, value, "ul_dcch_msg_type_c::types"); -} -uint8_t ul_dcch_msg_type_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "ul_dcch_msg_type_c::types"); -} - -const char* bh_lc_ch_id_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"bh-LogicalChannelIdentity-r16", "bh-LogicalChannelIdentityExt-r16"}; - return convert_enum_idx(names, 2, value, "bh_lc_ch_id_r16_c::types"); -} - -const char* rlc_cfg_c::types_opts::to_string() const -{ - static const char* names[] = {"am", "um-Bi-Directional", "um-Uni-Directional-UL", "um-Uni-Directional-DL"}; - return convert_enum_idx(names, 4, value, "rlc_cfg_c::types"); -} - -const char* beam_link_monitoring_rs_r17_s::detection_res_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-Index", "csi-RS-Index"}; - return convert_enum_idx(names, 2, value, "beam_link_monitoring_rs_r17_s::detection_res_r17_c_::types"); -} - -const char* csi_rs_res_map_s::freq_domain_alloc_c_::types_opts::to_string() const -{ - static const char* names[] = {"row1", "row2", "row4", "other"}; - return convert_enum_idx(names, 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 numbers[] = {1, 2, 4}; - return map_enum_number(numbers, 3, value, "csi_rs_res_map_s::freq_domain_alloc_c_::types"); -} - -const char* csi_rs_res_map_s::density_c_::types_opts::to_string() const -{ - static const char* names[] = {"dot5", "one", "three", "spare"}; - return convert_enum_idx(names, 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 numbers[] = {5, 1, 3}; - return map_enum_number(numbers, 3, value, "csi_rs_res_map_s::density_c_::types"); -} - -const char* csi_res_periodicity_and_offset_c::types_opts::to_string() const -{ - static const char* names[] = {"slots4", - "slots5", - "slots8", - "slots10", - "slots16", - "slots20", - "slots32", - "slots40", - "slots64", - "slots80", - "slots160", - "slots320", - "slots640"}; - return convert_enum_idx(names, 13, value, "csi_res_periodicity_and_offset_c::types"); -} -uint16_t csi_res_periodicity_and_offset_c::types_opts::to_number() const -{ - static const uint16_t numbers[] = {4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640}; - return map_enum_number(numbers, 13, value, "csi_res_periodicity_and_offset_c::types"); -} - -const char* qcl_info_s::ref_sig_c_::types_opts::to_string() const -{ - static const char* names[] = {"csi-rs", "ssb"}; - return convert_enum_idx(names, 2, value, "qcl_info_s::ref_sig_c_::types"); -} - -const char* dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::types_opts::to_string() const -{ - static const char* names[] = {"n4", - "n5", - "n8", - "n10", - "n16", - "n20", - "n32", - "n40", - "n64", - "n80", - "n160", - "n320", - "n640", - "n1280", - "n2560", - "n5120", - "n10240"}; - return convert_enum_idx(names, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::types"); -} -uint16_t dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560, 5120, 10240}; - return map_enum_number(numbers, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::types"); -} - -const char* dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::types_opts::to_string() const -{ - static const char* names[] = {"n8", - "n10", - "n16", - "n20", - "n32", - "n40", - "n64", - "n80", - "n128", - "n160", - "n320", - "n640", - "n1280", - "n2560", - "n5120", - "n10240", - "n20480"}; - return convert_enum_idx(names, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::types"); -} -uint16_t dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {8, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1280, 2560, 5120, 10240, 20480}; - return map_enum_number(numbers, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::types"); -} - -const char* dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::types_opts::to_string() const -{ - static const char* names[] = {"n16", - "n20", - "n32", - "n40", - "n64", - "n80", - "n128", - "n160", - "n256", - "n320", - "n640", - "n1280", - "n2560", - "n5120", - "n10240", - "n20480", - "n40960"}; - return convert_enum_idx(names, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::types"); -} -uint16_t dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = { - 16, 20, 32, 40, 64, 80, 128, 160, 256, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960}; - return map_enum_number(numbers, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::types"); -} - -const char* dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::types_opts::to_string() const -{ - static const char* names[] = {"n32", - "n40", - "n64", - "n80", - "n128", - "n160", - "n256", - "n320", - "n512", - "n640", - "n1280", - "n2560", - "n5120", - "n10240", - "n20480", - "n40960", - "n81920"}; - return convert_enum_idx(names, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::types"); -} -uint32_t dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::types_opts::to_number() const -{ - static const uint32_t numbers[] = { - 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920}; - return map_enum_number(numbers, 17, value, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::types"); -} - -const char* dl_ppw_periodicity_and_start_slot_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"scs15", "scs30", "scs60", "scs120"}; - return convert_enum_idx(names, 4, value, "dl_ppw_periodicity_and_start_slot_r17_c::types"); -} -uint8_t dl_ppw_periodicity_and_start_slot_r17_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {15, 30, 60, 120}; - return map_enum_number(numbers, 4, value, "dl_ppw_periodicity_and_start_slot_r17_c::types"); -} - -const char* rate_match_pattern_group_item_c_::types_opts::to_string() const -{ - static const char* names[] = {"cellLevel", "bwpLevel"}; - return convert_enum_idx(names, 2, value, "rate_match_pattern_group_item_c_::types"); -} - -const char* repeat_scheme_cfg_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"fdm-TDM-r16", "slotBased-r16"}; - return convert_enum_idx(names, 2, value, "repeat_scheme_cfg_r16_c::types"); -} - -const char* candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-r16", "csi-RS-r16"}; - return convert_enum_idx(names, 2, value, "candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::types"); -} - -const char* pdsch_cfg_s::prb_bundling_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"staticBundling", "dynamicBundling"}; - return convert_enum_idx(names, 2, value, "pdsch_cfg_s::prb_bundling_type_c_::types"); -} - -const char* pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"staticBundling-r16", "dynamicBundling-r16"}; - return convert_enum_idx(names, 2, value, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::types"); -} - -const char* pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"explicitlist", "unifiedTCI-StateRef-r17"}; - return convert_enum_idx(names, 2, value, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::types"); -} - -const char* radio_link_monitoring_rs_s::detection_res_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-Index", "csi-RS-Index"}; - return convert_enum_idx(names, 2, value, "radio_link_monitoring_rs_s::detection_res_c_::types"); -} - -// BWP-DownlinkDedicatedSDT-r17 ::= SEQUENCE -SRSASN_CODE bwp_dl_ded_sdt_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pdcch_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(pdsch_cfg_r17_present, 1)); - - if (pdcch_cfg_r17_present) { - HANDLE_CODE(pdcch_cfg_r17.pack(bref)); - } - if (pdsch_cfg_r17_present) { - HANDLE_CODE(pdsch_cfg_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE bwp_dl_ded_sdt_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pdcch_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_cfg_r17_present, 1)); - - if (pdcch_cfg_r17_present) { - HANDLE_CODE(pdcch_cfg_r17.unpack(bref)); - } - if (pdsch_cfg_r17_present) { - HANDLE_CODE(pdsch_cfg_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void bwp_dl_ded_sdt_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pdcch_cfg_r17_present) { - j.write_fieldname("pdcch-Config-r17"); - pdcch_cfg_r17.to_json(j); - } - if (pdsch_cfg_r17_present) { - j.write_fieldname("pdsch-Config-r17"); - pdsch_cfg_r17.to_json(j); - } - j.end_obj(); -} - -const char* pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-Index-r16", "csi-RS-Index-r16"}; - return convert_enum_idx(names, 2, value, "pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::types"); -} - -const char* pathloss_ref_rs_cfg_c::types_opts::to_string() const -{ - static const char* names[] = {"ssb-Index", "csi-RS-Index"}; - return convert_enum_idx(names, 2, value, "pathloss_ref_rs_cfg_c::types"); -} - -const char* pucch_pathloss_ref_rs_s::ref_sig_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-Index", "csi-RS-Index"}; - return convert_enum_idx(names, 2, value, "pucch_pathloss_ref_rs_s::ref_sig_c_::types"); -} - -const char* beta_offsets_cross_pri_sel_cg_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"dynamic-r17", "semiStatic-r17"}; - return convert_enum_idx(names, 2, value, "beta_offsets_cross_pri_sel_cg_r17_c::types"); -} - -const char* cg_cot_sharing_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"noCOT-Sharing-r16", "cot-Sharing-r16"}; - return convert_enum_idx(names, 2, value, "cg_cot_sharing_r16_c::types"); -} - -const char* cg_cot_sharing_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"noCOT-Sharing-r17", "cot-Sharing-r17"}; - return convert_enum_idx(names, 2, value, "cg_cot_sharing_r17_c::types"); -} - -const char* cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"shortBitmap-r17", "mediumBitmap-r17", "longBitmap-r17"}; - return convert_enum_idx(names, 3, value, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::types"); -} - -const char* cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"dmrsType1-r17", "dmrsType2-r17"}; - return convert_enum_idx(names, 2, value, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::types"); -} -uint8_t cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::types"); -} - -const char* cg_uci_on_pusch_c::types_opts::to_string() const -{ - static const char* names[] = {"dynamic", "semiStatic"}; - return convert_enum_idx(names, 2, value, "cg_uci_on_pusch_c::types"); -} - -const char* prach_res_ded_bfr_c::types_opts::to_string() const -{ - static const char* names[] = {"ssb", "csi-RS"}; - return convert_enum_idx(names, 2, value, "prach_res_ded_bfr_c::types"); -} - -const char* pucch_res_s::format_c_::types_opts::to_string() const -{ - static const char* names[] = {"format0", "format1", "format2", "format3", "format4"}; - return convert_enum_idx(names, 5, value, "pucch_res_s::format_c_::types"); -} -uint8_t pucch_res_s::format_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 2, 3, 4}; - return map_enum_number(numbers, 5, value, "pucch_res_s::format_c_::types"); -} - -const char* pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"scs15", "scs30"}; - return convert_enum_idx(names, 2, value, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::types"); -} -uint8_t pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {15, 30}; - return map_enum_number(numbers, 2, value, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::types"); -} - -const char* pucch_res_ext_v1610_s::format_v1610_c_::types_opts::to_string() const -{ - static const char* names[] = {"interlace1-v1610", "occ-v1610"}; - return convert_enum_idx(names, 2, value, "pucch_res_ext_v1610_s::format_v1610_c_::types"); -} -uint8_t pucch_res_ext_v1610_s::format_v1610_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "pucch_res_ext_v1610_s::format_v1610_c_::types"); -} - -const char* pucch_spatial_relation_info_s::ref_sig_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-Index", "csi-RS-Index", "srs"}; - return convert_enum_idx(names, 3, value, "pucch_spatial_relation_info_s::ref_sig_c_::types"); -} - -const char* pusch_pathloss_ref_rs_s::ref_sig_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-Index", "csi-RS-Index"}; - return convert_enum_idx(names, 2, value, "pusch_pathloss_ref_rs_s::ref_sig_c_::types"); -} - -const char* pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-Index-r16", "csi-RS-Index-r16"}; - return convert_enum_idx(names, 2, value, "pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::types"); -} - -const char* srs_periodicity_and_offset_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"sl1", "sl2", "sl4", "sl5", "sl8", "sl10", "sl16", - "sl20", "sl32", "sl40", "sl64", "sl80", "sl160", "sl320", - "sl640", "sl1280", "sl2560", "sl5120", "sl10240", "sl40960", "sl81920"}; - return convert_enum_idx(names, 21, value, "srs_periodicity_and_offset_r16_c::types"); -} -uint32_t srs_periodicity_and_offset_r16_c::types_opts::to_number() const -{ - static const uint32_t numbers[] = {1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, - 80, 160, 320, 640, 1280, 2560, 5120, 10240, 40960, 81920}; - return map_enum_number(numbers, 21, value, "srs_periodicity_and_offset_r16_c::types"); -} - -const char* srs_periodicity_and_offset_ext_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"sl128", "sl256", "sl512", "sl20480"}; - return convert_enum_idx(names, 4, value, "srs_periodicity_and_offset_ext_r16_c::types"); -} -uint16_t srs_periodicity_and_offset_ext_r16_c::types_opts::to_number() const -{ - static const uint16_t numbers[] = {128, 256, 512, 20480}; - return map_enum_number(numbers, 4, value, "srs_periodicity_and_offset_ext_r16_c::types"); -} - -const char* srs_spatial_relation_info_pos_r16_c::serving_rs_r16_s_::ref_sig_r16_c_::srs_spatial_relation_r16_s_:: - res_sel_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"srs-ResourceId-r16", "srs-PosResourceId-r16"}; - return convert_enum_idx(names, - 2, - value, - "srs_spatial_relation_info_pos_r16_c::serving_rs_r16_s_::ref_sig_r16_c_::srs_spatial_" - "relation_r16_s_::res_sel_r16_c_::types"); -} - -const char* srs_spatial_relation_info_pos_r16_c::serving_rs_r16_s_::ref_sig_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-IndexServing-r16", "csi-RS-IndexServing-r16", "srs-SpatialRelation-r16"}; - return convert_enum_idx( - names, 3, value, "srs_spatial_relation_info_pos_r16_c::serving_rs_r16_s_::ref_sig_r16_c_::types"); -} - -const char* srs_spatial_relation_info_pos_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"servingRS-r16", "ssb-Ncell-r16", "dl-PRS-r16"}; - return convert_enum_idx(names, 3, value, "srs_spatial_relation_info_pos_r16_c::types"); -} - -const char* sched_request_res_cfg_s::periodicity_and_offset_c_::types_opts::to_string() const -{ - static const char* names[] = {"sym2", - "sym6or7", - "sl1", - "sl2", - "sl4", - "sl5", - "sl8", - "sl10", - "sl16", - "sl20", - "sl40", - "sl80", - "sl160", - "sl320", - "sl640"}; - return convert_enum_idx(names, 15, value, "sched_request_res_cfg_s::periodicity_and_offset_c_::types"); -} - -const char* sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"sl1280", "sl2560", "sl5120"}; - return convert_enum_idx(names, 3, value, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::types"); -} -uint16_t sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {1280, 2560, 5120}; - return map_enum_number(numbers, 3, value, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::types"); -} - -const char* uci_on_pusch_s::beta_offsets_c_::types_opts::to_string() const -{ - static const char* names[] = {"dynamic", "semiStatic"}; - return convert_enum_idx(names, 2, value, "uci_on_pusch_s::beta_offsets_c_::types"); -} - -const char* uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"oneBit-r16", "twoBits-r16"}; - return convert_enum_idx( - names, 2, value, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::types"); -} -uint8_t uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number( - numbers, 2, value, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::types"); -} - -const char* uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"dynamicDCI-0-2-r16", "semiStaticDCI-0-2-r16"}; - return convert_enum_idx(names, 2, value, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::types"); -} - -const char* beta_offsets_cross_pri_sel_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"dynamic-r17", "semiStatic-r17"}; - return convert_enum_idx(names, 2, value, "beta_offsets_cross_pri_sel_r17_c::types"); -} - -const char* beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"oneBit-r17", "twoBits-r17"}; - return convert_enum_idx(names, 2, value, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::types"); -} -uint8_t beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::types"); -} - -const char* beta_offsets_cross_pri_sel_dci_0_2_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"dynamicDCI-0-2-r17", "semiStaticDCI-0-2-r17"}; - return convert_enum_idx(names, 2, value, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::types"); -} - -const char* invalid_symbol_pattern_r16_s::symbols_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"oneSlot", "twoSlots"}; - return convert_enum_idx(names, 2, value, "invalid_symbol_pattern_r16_s::symbols_r16_c_::types"); -} -uint8_t invalid_symbol_pattern_r16_s::symbols_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "invalid_symbol_pattern_r16_s::symbols_r16_c_::types"); -} - -const char* invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"n2", "n4", "n5", "n8", "n10", "n20", "n40"}; - return convert_enum_idx(names, 7, value, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::types"); -} -uint8_t invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 5, 8, 10, 20, 40}; - return map_enum_number(numbers, 7, value, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::types"); -} - -const char* mpe_res_r17_s::mpe_ref_sig_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"csi-RS-Resource-r17", "ssb-Resource-r17"}; - return convert_enum_idx(names, 2, value, "mpe_res_r17_s::mpe_ref_sig_r17_c_::types"); -} - -const char* pucch_cfg_s::subslot_len_for_pucch_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"normalCP-r16", "extendedCP-r16"}; - return convert_enum_idx(names, 2, value, "pucch_cfg_s::subslot_len_for_pucch_r16_c_::types"); -} - -const char* srs_pos_res_r16_s::tx_comb_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"n2-r16", "n4-r16", "n8-r16"}; - return convert_enum_idx(names, 3, value, "srs_pos_res_r16_s::tx_comb_r16_c_::types"); -} -uint8_t srs_pos_res_r16_s::tx_comb_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 8}; - return map_enum_number(numbers, 3, value, "srs_pos_res_r16_s::tx_comb_r16_c_::types"); -} - -const char* srs_pos_res_r16_s::res_type_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"aperiodic-r16", "semi-persistent-r16", "periodic-r16"}; - return convert_enum_idx(names, 3, value, "srs_pos_res_r16_s::res_type_r16_c_::types"); -} - -const char* srs_pos_res_set_r16_s::res_type_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"aperiodic-r16", "semi-persistent-r16", "periodic-r16"}; - return convert_enum_idx(names, 3, value, "srs_pos_res_set_r16_s::res_type_r16_c_::types"); -} - -const char* srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-IndexServing-r16", "ssb-Ncell-r16", "dl-PRS-r16"}; - return convert_enum_idx(names, 3, value, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::types"); -} - -const char* srs_res_set_s::res_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"aperiodic", "semi-persistent", "periodic"}; - return convert_enum_idx(names, 3, value, "srs_res_set_s::res_type_c_::types"); -} - -const char* pusch_cfg_s::freq_hop_dci_0_2_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"pusch-RepTypeA", "pusch-RepTypeB"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_::types"); -} - -const char* pathloss_ref_rs_r17_s::ref_sig_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-Index", "csi-RS-Index"}; - return convert_enum_idx(names, 2, value, "pathloss_ref_rs_r17_s::ref_sig_r17_c_::types"); -} - -const char* tci_ul_state_r17_s::ref_sig_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb-Index-r17", "csi-RS-Index-r17", "srs-r17"}; - return convert_enum_idx(names, 3, value, "tci_ul_state_r17_s::ref_sig_r17_c_::types"); -} - -const char* bwp_ul_ded_s::ul_tci_state_list_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"explicitlist", "unifiedTCI-StateRef-r17"}; - return convert_enum_idx(names, 2, value, "bwp_ul_ded_s::ul_tci_state_list_r17_c_::types"); -} - -// BWP-UplinkDedicatedSDT-r17 ::= SEQUENCE -SRSASN_CODE bwp_ul_ded_sdt_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pusch_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(cfg_grant_cfg_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(cfg_grant_cfg_to_release_list_r17.size() > 0, 1)); - - if (pusch_cfg_r17_present) { - HANDLE_CODE(pusch_cfg_r17.pack(bref)); - } - if (cfg_grant_cfg_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cfg_grant_cfg_to_add_mod_list_r17, 1, 12)); - } - if (cfg_grant_cfg_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cfg_grant_cfg_to_release_list_r17, 1, 12, integer_packer(0, 11))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE bwp_ul_ded_sdt_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pusch_cfg_r17_present, 1)); - bool cfg_grant_cfg_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(cfg_grant_cfg_to_add_mod_list_r17_present, 1)); - bool cfg_grant_cfg_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(cfg_grant_cfg_to_release_list_r17_present, 1)); - - if (pusch_cfg_r17_present) { - HANDLE_CODE(pusch_cfg_r17.unpack(bref)); - } - if (cfg_grant_cfg_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(cfg_grant_cfg_to_add_mod_list_r17, bref, 1, 12)); - } - if (cfg_grant_cfg_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(cfg_grant_cfg_to_release_list_r17, bref, 1, 12, integer_packer(0, 11))); - } - - return SRSASN_SUCCESS; -} -void bwp_ul_ded_sdt_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pusch_cfg_r17_present) { - j.write_fieldname("pusch-Config-r17"); - pusch_cfg_r17.to_json(j); - } - if (cfg_grant_cfg_to_add_mod_list_r17.size() > 0) { - j.start_array("configuredGrantConfigToAddModList-r17"); - for (const auto& e1 : cfg_grant_cfg_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (cfg_grant_cfg_to_release_list_r17.size() > 0) { - j.start_array("configuredGrantConfigToReleaseList-r17"); - for (const auto& e1 : cfg_grant_cfg_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -const char* band_params_c::types_opts::to_string() const -{ - static const char* names[] = {"eutra", "nr"}; - return convert_enum_idx(names, 2, value, "band_params_c::types"); -} - -const char* band_params_v1540_s::srs_carrier_switch_c_::types_opts::to_string() const -{ - static const char* names[] = {"nr", "eutra"}; - return convert_enum_idx(names, 2, value, "band_params_v1540_s::srs_carrier_switch_c_::types"); -} - -// PDCCH-BlindDetectionCA-MixedExt-r16 ::= SEQUENCE -SRSASN_CODE pdcch_blind_detection_ca_mixed_ext_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pdcch_blind_detection_ca1_r16, (uint8_t)1u, (uint8_t)15u)); - HANDLE_CODE(pack_integer(bref, pdcch_blind_detection_ca2_r16, (uint8_t)1u, (uint8_t)15u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcch_blind_detection_ca_mixed_ext_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(pdcch_blind_detection_ca1_r16, bref, (uint8_t)1u, (uint8_t)15u)); - HANDLE_CODE(unpack_integer(pdcch_blind_detection_ca2_r16, bref, (uint8_t)1u, (uint8_t)15u)); - - return SRSASN_SUCCESS; -} -void pdcch_blind_detection_ca_mixed_ext_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("pdcch-BlindDetectionCA1-r16", pdcch_blind_detection_ca1_r16); - j.write_int("pdcch-BlindDetectionCA2-r16", pdcch_blind_detection_ca2_r16); - j.end_obj(); -} - -// PDCCH-BlindDetectionCG-UE-MixedExt-r16 ::= SEQUENCE -SRSASN_CODE pdcch_blind_detection_cg_ue_mixed_ext_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pdcch_blind_detection_cg_ue1_r16, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(pack_integer(bref, pdcch_blind_detection_cg_ue2_r16, (uint8_t)0u, (uint8_t)15u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcch_blind_detection_cg_ue_mixed_ext_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(pdcch_blind_detection_cg_ue1_r16, bref, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(unpack_integer(pdcch_blind_detection_cg_ue2_r16, bref, (uint8_t)0u, (uint8_t)15u)); - - return SRSASN_SUCCESS; -} -void pdcch_blind_detection_cg_ue_mixed_ext_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("pdcch-BlindDetectionCG-UE1-r16", pdcch_blind_detection_cg_ue1_r16); - j.write_int("pdcch-BlindDetectionCG-UE2-r16", pdcch_blind_detection_cg_ue2_r16); - j.end_obj(); -} - -// PDCCH-BlindDetectionMixedList-r16 ::= SEQUENCE -SRSASN_CODE pdcch_blind_detection_mixed_list_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(pdcch_blind_detection_ca_mixed_ext_r16_present, 1)); - HANDLE_CODE(bref.pack(pdcch_blind_detection_cg_ue_mixed_ext_r16_present, 1)); - - if (pdcch_blind_detection_ca_mixed_ext_r16_present) { - HANDLE_CODE(pdcch_blind_detection_ca_mixed_ext_r16.pack(bref)); - } - if (pdcch_blind_detection_cg_ue_mixed_ext_r16_present) { - HANDLE_CODE(pdcch_blind_detection_cg_ue_mixed_ext_r16.pdcch_blind_detection_mcg_ue_mixed_v16a0.pack(bref)); - HANDLE_CODE(pdcch_blind_detection_cg_ue_mixed_ext_r16.pdcch_blind_detection_scg_ue_mixed_v16a0.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcch_blind_detection_mixed_list_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(pdcch_blind_detection_ca_mixed_ext_r16_present, 1)); - HANDLE_CODE(bref.unpack(pdcch_blind_detection_cg_ue_mixed_ext_r16_present, 1)); - - if (pdcch_blind_detection_ca_mixed_ext_r16_present) { - HANDLE_CODE(pdcch_blind_detection_ca_mixed_ext_r16.unpack(bref)); - } - if (pdcch_blind_detection_cg_ue_mixed_ext_r16_present) { - HANDLE_CODE(pdcch_blind_detection_cg_ue_mixed_ext_r16.pdcch_blind_detection_mcg_ue_mixed_v16a0.unpack(bref)); - HANDLE_CODE(pdcch_blind_detection_cg_ue_mixed_ext_r16.pdcch_blind_detection_scg_ue_mixed_v16a0.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void pdcch_blind_detection_mixed_list_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pdcch_blind_detection_ca_mixed_ext_r16_present) { - j.write_fieldname("pdcch-BlindDetectionCA-MixedExt-r16"); - pdcch_blind_detection_ca_mixed_ext_r16.to_json(j); - } - if (pdcch_blind_detection_cg_ue_mixed_ext_r16_present) { - j.write_fieldname("pdcch-BlindDetectionCG-UE-MixedExt-r16"); - j.start_obj(); - j.write_fieldname("pdcch-BlindDetectionMCG-UE-Mixed-v16a0"); - pdcch_blind_detection_cg_ue_mixed_ext_r16.pdcch_blind_detection_mcg_ue_mixed_v16a0.to_json(j); - j.write_fieldname("pdcch-BlindDetectionSCG-UE-Mixed-v16a0"); - pdcch_blind_detection_cg_ue_mixed_ext_r16.pdcch_blind_detection_scg_ue_mixed_v16a0.to_json(j); - j.end_obj(); - } - j.end_obj(); -} - -void pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::destroy_() -{ - switch (type_) { - case types::pdcch_blind_detection_ca_mixed_v16a0: - c.destroy(); - break; - case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: - c.destroy(); - break; - default: - break; - } -} -void pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::pdcch_blind_detection_ca_mixed_v16a0: - c.init(); - break; - case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_"); - } -} -pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_:: - pdcch_blind_detection_ca_mixed_ext_r16_c_( - const pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::pdcch_blind_detection_ca_mixed_v16a0: - c.init(other.c.get()); - break; - case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_"); - } -} -pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_& -pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::operator=( - const pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::pdcch_blind_detection_ca_mixed_v16a0: - c.set(other.c.get()); - break; - case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_"); - } - - return *this; -} -pdcch_blind_detection_ca_mixed_ext_r16_s& pdcch_blind_detection_mixed_list_r16_s:: - pdcch_blind_detection_ca_mixed_ext_r16_c_::set_pdcch_blind_detection_ca_mixed_v16a0() -{ - set(types::pdcch_blind_detection_ca_mixed_v16a0); - return c.get(); -} -pdcch_blind_detection_ca_mixed_ext_r16_s& pdcch_blind_detection_mixed_list_r16_s:: - pdcch_blind_detection_ca_mixed_ext_r16_c_::set_pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0() -{ - set(types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0); - return c.get(); -} -void pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::pdcch_blind_detection_ca_mixed_v16a0: - j.write_fieldname("pdcch-BlindDetectionCA-Mixed-v16a0"); - c.get().to_json(j); - break; - case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: - j.write_fieldname("pdcch-BlindDetectionCA-Mixed-NonAlignedSpan-v16a0"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::pdcch_blind_detection_ca_mixed_v16a0: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::pdcch_blind_detection_ca_mixed_v16a0: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pdcch_blind_detection_ca_mixed_non_aligned_span_v16a0: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* -pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"pdcch-BlindDetectionCA-Mixed-v16a0", - "pdcch-BlindDetectionCA-Mixed-NonAlignedSpan-v16a0"}; - return convert_enum_idx( - names, 2, value, "pdcch_blind_detection_mixed_list_r16_s::pdcch_blind_detection_ca_mixed_ext_r16_c_::types"); -} - -// CA-ParametersNR-v16a0 ::= SEQUENCE -SRSASN_CODE ca_params_nr_v16a0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_dyn_seq_of(bref, pdcch_blind_detection_mixed_list_r16, 1, 7)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ca_params_nr_v16a0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_dyn_seq_of(pdcch_blind_detection_mixed_list_r16, bref, 1, 7)); - - return SRSASN_SUCCESS; -} -void ca_params_nr_v16a0_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("pdcch-BlindDetectionMixedList-r16"); - for (const auto& e1 : pdcch_blind_detection_mixed_list_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// CA-ParametersNRDC-v16a0 ::= SEQUENCE -SRSASN_CODE ca_params_nrdc_v16a0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ca_params_nr_for_dc_v16a0_present, 1)); - - if (ca_params_nr_for_dc_v16a0_present) { - HANDLE_CODE(ca_params_nr_for_dc_v16a0.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ca_params_nrdc_v16a0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ca_params_nr_for_dc_v16a0_present, 1)); - - if (ca_params_nr_for_dc_v16a0_present) { - HANDLE_CODE(ca_params_nr_for_dc_v16a0.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ca_params_nrdc_v16a0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ca_params_nr_for_dc_v16a0_present) { - j.write_fieldname("ca-ParametersNR-ForDC-v16a0"); - ca_params_nr_for_dc_v16a0.to_json(j); - } - j.end_obj(); -} - -// BandCombination-v16a0 ::= SEQUENCE -SRSASN_CODE band_combination_v16a0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ca_params_nr_v16a0_present, 1)); - HANDLE_CODE(bref.pack(ca_params_nrdc_v16a0_present, 1)); - - if (ca_params_nr_v16a0_present) { - HANDLE_CODE(ca_params_nr_v16a0.pack(bref)); - } - if (ca_params_nrdc_v16a0_present) { - HANDLE_CODE(ca_params_nrdc_v16a0.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE band_combination_v16a0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ca_params_nr_v16a0_present, 1)); - HANDLE_CODE(bref.unpack(ca_params_nrdc_v16a0_present, 1)); - - if (ca_params_nr_v16a0_present) { - HANDLE_CODE(ca_params_nr_v16a0.unpack(bref)); - } - if (ca_params_nrdc_v16a0_present) { - HANDLE_CODE(ca_params_nrdc_v16a0.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void band_combination_v16a0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ca_params_nr_v16a0_present) { - j.write_fieldname("ca-ParametersNR-v16a0"); - ca_params_nr_v16a0.to_json(j); - } - if (ca_params_nrdc_v16a0_present) { - j.write_fieldname("ca-ParametersNRDC-v16a0"); - ca_params_nrdc_v16a0.to_json(j); - } - j.end_obj(); -} - -// BandCombination-UplinkTxSwitch-v16a0 ::= SEQUENCE -SRSASN_CODE band_combination_ul_tx_switch_v16a0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(band_combination_v16a0_present, 1)); - - if (band_combination_v16a0_present) { - HANDLE_CODE(band_combination_v16a0.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE band_combination_ul_tx_switch_v16a0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(band_combination_v16a0_present, 1)); - - if (band_combination_v16a0_present) { - HANDLE_CODE(band_combination_v16a0.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void band_combination_ul_tx_switch_v16a0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (band_combination_v16a0_present) { - j.write_fieldname("bandCombination-v16a0"); - band_combination_v16a0.to_json(j); - } - j.end_obj(); -} - -const char* band_params_sidelink_discovery_r17_s::sl_tx_mode2_partial_sensing_r17_s_:: - scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"fr1-r17", "fr2-r17"}; - return convert_enum_idx(names, - 2, - value, - "band_params_sidelink_discovery_r17_s::sl_tx_mode2_partial_sensing_r17_s_::scs_cp_pattern_tx_" - "sidelink_mode_two_r17_c_::types"); -} -uint8_t band_params_sidelink_discovery_r17_s::sl_tx_mode2_partial_sensing_r17_s_:: - scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "band_params_sidelink_discovery_r17_s::sl_tx_mode2_partial_sensing_r17_s_::scs_cp_pattern_tx_" - "sidelink_mode_two_r17_c_::types"); -} - -const char* band_params_sidelink_eutra_nr_r16_c::types_opts::to_string() const -{ - static const char* names[] = {"eutra", "nr"}; - return convert_enum_idx(names, 2, value, "band_params_sidelink_eutra_nr_r16_c::types"); -} - -const char* band_params_sidelink_eutra_nr_v1630_c::types_opts::to_string() const -{ - static const char* names[] = {"eutra", "nr"}; - return convert_enum_idx(names, 2, value, "band_params_sidelink_eutra_nr_v1630_c::types"); -} - -const char* band_params_sidelink_eutra_nr_v1710_c::nr_s_::sl_tx_mode2_partial_sensing_r17_s_:: - scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"fr1-r17", "fr2-r17"}; - return convert_enum_idx(names, - 2, - value, - "band_params_sidelink_eutra_nr_v1710_c::nr_s_::sl_tx_mode2_partial_sensing_r17_s_::scs_cp_" - "pattern_tx_sidelink_mode_two_r17_c_::types"); -} -uint8_t band_params_sidelink_eutra_nr_v1710_c::nr_s_::sl_tx_mode2_partial_sensing_r17_s_:: - scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "band_params_sidelink_eutra_nr_v1710_c::nr_s_::sl_tx_mode2_partial_sensing_r17_s_::scs_cp_" - "pattern_tx_sidelink_mode_two_r17_c_::types"); -} - -const char* band_params_sidelink_eutra_nr_v1710_c::types_opts::to_string() const -{ - static const char* names[] = {"eutra", "nr"}; - return convert_enum_idx(names, 2, value, "band_params_sidelink_eutra_nr_v1710_c::types"); -} - -const char* -prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_dur_of_prs_processing_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"ppw-durationOfPRS-Processing1-r17", "ppw-durationOfPRS-Processing2-r17"}; - return convert_enum_idx( - names, 2, value, "prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_dur_of_prs_processing_r17_c_::types"); -} -uint8_t -prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_dur_of_prs_processing_r17_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number( - numbers, - 2, - value, - "prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_dur_of_prs_processing_r17_c_::types"); -} - -const char* -prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_max_num_of_dl_bw_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"fr1-r17", "fr2-r17"}; - return convert_enum_idx( - names, 2, value, "prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_max_num_of_dl_bw_r17_c_::types"); -} -uint8_t prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_max_num_of_dl_bw_r17_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number( - numbers, 2, value, "prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_max_num_of_dl_bw_r17_c_::types"); -} - -const char* band_nr_s::ch_bws_dl_c_::types_opts::to_string() const -{ - static const char* names[] = {"fr1", "fr2"}; - return convert_enum_idx(names, 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 numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "band_nr_s::ch_bws_dl_c_::types"); -} - -const char* band_nr_s::ch_bws_ul_c_::types_opts::to_string() const -{ - static const char* names[] = {"fr1", "fr2"}; - return convert_enum_idx(names, 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 numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "band_nr_s::ch_bws_ul_c_::types"); -} - -const char* band_nr_s::ch_bws_dl_v1590_c_::types_opts::to_string() const -{ - static const char* names[] = {"fr1", "fr2"}; - return convert_enum_idx(names, 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 numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "band_nr_s::ch_bws_dl_v1590_c_::types"); -} - -const char* band_nr_s::ch_bws_ul_v1590_c_::types_opts::to_string() const -{ - static const char* names[] = {"fr1", "fr2"}; - return convert_enum_idx(names, 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 numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "band_nr_s::ch_bws_ul_v1590_c_::types"); -} - -const char* band_nr_s::ch_bw_dl_iab_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"fr1-100mhz", "fr2-200mhz"}; - return convert_enum_idx(names, 2, value, "band_nr_s::ch_bw_dl_iab_r16_c_::types"); -} -uint8_t band_nr_s::ch_bw_dl_iab_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "band_nr_s::ch_bw_dl_iab_r16_c_::types"); -} - -const char* band_nr_s::ch_bw_ul_iab_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"fr1-100mhz", "fr2-200mhz"}; - return convert_enum_idx(names, 2, value, "band_nr_s::ch_bw_ul_iab_r16_c_::types"); -} -uint8_t band_nr_s::ch_bw_ul_iab_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "band_nr_s::ch_bw_ul_iab_r16_c_::types"); -} - -const char* band_nr_s::max_mod_order_for_multicast_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"fr1-r17", "fr2-r17"}; - return convert_enum_idx(names, 2, value, "band_nr_s::max_mod_order_for_multicast_r17_c_::types"); -} -uint8_t band_nr_s::max_mod_order_for_multicast_r17_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "band_nr_s::max_mod_order_for_multicast_r17_c_::types"); -} - -const char* band_sidelink_r16_s::sl_reception_r16_s_::scs_cp_pattern_rx_sidelink_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"fr1-r16", "fr2-r16"}; - return convert_enum_idx( - names, 2, value, "band_sidelink_r16_s::sl_reception_r16_s_::scs_cp_pattern_rx_sidelink_r16_c_::types"); -} -uint8_t band_sidelink_r16_s::sl_reception_r16_s_::scs_cp_pattern_rx_sidelink_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number( - numbers, 2, value, "band_sidelink_r16_s::sl_reception_r16_s_::scs_cp_pattern_rx_sidelink_r16_c_::types"); -} - -const char* -band_sidelink_r16_s::sl_tx_mode1_r16_s_::scs_cp_pattern_tx_sidelink_mode_one_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"fr1-r16", "fr2-r16"}; - return convert_enum_idx( - names, 2, value, "band_sidelink_r16_s::sl_tx_mode1_r16_s_::scs_cp_pattern_tx_sidelink_mode_one_r16_c_::types"); -} -uint8_t -band_sidelink_r16_s::sl_tx_mode1_r16_s_::scs_cp_pattern_tx_sidelink_mode_one_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number( - numbers, 2, value, "band_sidelink_r16_s::sl_tx_mode1_r16_s_::scs_cp_pattern_tx_sidelink_mode_one_r16_c_::types"); -} - -const char* band_sidelink_r16_s::sl_tx_mode2_random_res_sel_r17_s_::scs_cp_pattern_tx_sidelink_mode_two_r17_c_:: - types_opts::to_string() const -{ - static const char* names[] = {"fr1-r17", "fr2-r17"}; - return convert_enum_idx( - names, - 2, - value, - "band_sidelink_r16_s::sl_tx_mode2_random_res_sel_r17_s_::scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types"); -} -uint8_t band_sidelink_r16_s::sl_tx_mode2_random_res_sel_r17_s_::scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types_opts:: - to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number( - numbers, - 2, - value, - "band_sidelink_r16_s::sl_tx_mode2_random_res_sel_r17_s_::scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types"); -} - -const char* carrier_state_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"deActivated-r17", "activeBWP-r17"}; - return convert_enum_idx(names, 2, value, "carrier_state_r17_c::types"); -} - -const char* cfra_s::res_c_::types_opts::to_string() const -{ - static const char* names[] = {"ssb", "csirs"}; - return convert_enum_idx(names, 2, value, "cfra_s::res_c_::types"); -} - -// CG-SDT-ConfigLCH-Restriction-r17 ::= SEQUENCE -SRSASN_CODE cg_sdt_cfg_lch_restrict_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(cfg_grant_type1_allowed_r17_present, 1)); - HANDLE_CODE(bref.pack(allowed_cg_list_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, lc_ch_id_r17, (uint8_t)1u, (uint8_t)32u)); - if (allowed_cg_list_r17_present) { - HANDLE_CODE(pack_dyn_seq_of(bref, allowed_cg_list_r17, 0, 31, integer_packer(0, 31))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_sdt_cfg_lch_restrict_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(cfg_grant_type1_allowed_r17_present, 1)); - HANDLE_CODE(bref.unpack(allowed_cg_list_r17_present, 1)); - - HANDLE_CODE(unpack_integer(lc_ch_id_r17, bref, (uint8_t)1u, (uint8_t)32u)); - if (allowed_cg_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(allowed_cg_list_r17, bref, 0, 31, integer_packer(0, 31))); - } - - return SRSASN_SUCCESS; -} -void cg_sdt_cfg_lch_restrict_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("logicalChannelIdentity-r17", lc_ch_id_r17); - if (cfg_grant_type1_allowed_r17_present) { - j.write_str("configuredGrantType1Allowed-r17", "true"); - } - if (allowed_cg_list_r17_present) { - j.start_array("allowedCG-List-r17"); - for (const auto& e1 : allowed_cg_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -const char* csi_associated_report_cfg_info_s::res_for_ch_c_::types_opts::to_string() const -{ - static const char* names[] = {"nzp-CSI-RS", "csi-SSB-ResourceSet"}; - return convert_enum_idx(names, 2, value, "csi_associated_report_cfg_info_s::res_for_ch_c_::types"); -} - -const char* csi_associated_report_cfg_info_s::res_for_ch2_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"nzp-CSI-RS2-r17", "csi-SSB-ResourceSet2-r17"}; - return convert_enum_idx(names, 2, value, "csi_associated_report_cfg_info_s::res_for_ch2_r17_c_::types"); -} - -const char* csi_im_res_s::csi_im_res_elem_pattern_c_::types_opts::to_string() const -{ - static const char* names[] = {"pattern0", "pattern1"}; - return convert_enum_idx(names, 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 numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "csi_im_res_s::csi_im_res_elem_pattern_c_::types"); -} - -const char* csi_report_periodicity_and_offset_c::types_opts::to_string() const -{ - static const char* names[] = { - "slots4", "slots5", "slots8", "slots10", "slots16", "slots20", "slots40", "slots80", "slots160", "slots320"}; - return convert_enum_idx(names, 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 numbers[] = {4, 5, 8, 10, 16, 20, 40, 80, 160, 320}; - return map_enum_number(numbers, 10, value, "csi_report_periodicity_and_offset_c::types"); -} - -const char* 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* names[] = {"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(names, - 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"); -} - -const char* 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* names[] = {"two", "moreThanTwo"}; - return convert_enum_idx( - names, - 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 numbers[] = {2}; - return map_enum_number( - numbers, - 1, - value, - "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_single_panel_s_::nr_of_ant_ports_c_::types"); -} - -const char* -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 char* names[] = {"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( - names, - 8, - value, - "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::types"); -} - -const char* codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"typeI-SinglePanel", "typeI-MultiPanel"}; - return convert_enum_idx(names, 2, value, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::types"); -} - -const char* 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* names[] = {"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( - names, - 13, - value, - "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::types"); -} - -const char* codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"typeII", "typeII-PortSelection"}; - return convert_enum_idx(names, 2, value, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::types"); -} - -const char* codebook_cfg_s::codebook_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"type1", "type2"}; - return convert_enum_idx(names, 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 numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "codebook_cfg_s::codebook_type_c_::types"); -} - -const char* codebook_cfg_r16_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_r16_s_:: - n1_n2_codebook_subset_restrict_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"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(names, - 13, - value, - "codebook_cfg_r16_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_r16_s_::n1_n2_codebook_" - "subset_restrict_r16_c_::types"); -} - -const char* codebook_cfg_r16_s::codebook_type_c_::type2_s_::sub_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"typeII-r16", "typeII-PortSelection-r16"}; - return convert_enum_idx(names, 2, value, "codebook_cfg_r16_s::codebook_type_c_::type2_s_::sub_type_c_::types"); -} - -const char* codebook_cfg_r16_s::codebook_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"type2"}; - return convert_enum_idx(names, 1, value, "codebook_cfg_r16_s::codebook_type_c_::types"); -} -uint8_t codebook_cfg_r16_s::codebook_type_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {2}; - return map_enum_number(numbers, 1, value, "codebook_cfg_r16_s::codebook_type_c_::types"); -} - -const char* codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group1_r17_s_::nr_of_ant_ports_c_:: - more_than_two_s_::n1_n2_c_::types_opts::to_string() const -{ - static const char* names[] = {"two-one-TypeI-SinglePanel-Restriction1-r17", - "two-two-TypeI-SinglePanel-Restriction1-r17", - "four-one-TypeI-SinglePanel-Restriction1-r17", - "three-two-TypeI-SinglePanel-Restriction1-r17", - "six-one-TypeI-SinglePanel-Restriction1-r17", - "four-two-TypeI-SinglePanel-Restriction1-r17", - "eight-one-TypeI-SinglePanel-Restriction1-r17", - "four-three-TypeI-SinglePanel-Restriction1-r17", - "six-two-TypeI-SinglePanel-Restriction1-r17", - "twelve-one-TypeI-SinglePanel-Restriction1-r17", - "four-four-TypeI-SinglePanel-Restriction1-r17", - "eight-two-TypeI-SinglePanel-Restriction1-r17", - "sixteen-one-TypeI-SinglePanel-Restriction1-r17"}; - return convert_enum_idx(names, - 13, - value, - "codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group1_r17_s_::nr_of_" - "ant_ports_c_::more_than_two_s_::n1_n2_c_::types"); -} - -const char* codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group1_r17_s_::nr_of_ant_ports_c_:: - types_opts::to_string() const -{ - static const char* names[] = {"two", "moreThanTwo"}; - return convert_enum_idx( - names, - 2, - value, - "codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group1_r17_s_::nr_of_ant_ports_c_::types"); -} -uint8_t codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group1_r17_s_::nr_of_ant_ports_c_:: - types_opts::to_number() const -{ - static const uint8_t numbers[] = {2}; - return map_enum_number( - numbers, - 1, - value, - "codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group1_r17_s_::nr_of_ant_ports_c_::types"); -} - -const char* codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_ant_ports_c_:: - more_than_two_s_::n1_n2_c_::types_opts::to_string() const -{ - static const char* names[] = {"two-one-TypeI-SinglePanel-Restriction2-r17", - "two-two-TypeI-SinglePanel-Restriction2-r17", - "four-one-TypeI-SinglePanel-Restriction2-r17", - "three-two-TypeI-SinglePanel-Restriction2-r17", - "six-one-TypeI-SinglePanel-Restriction2-r17", - "four-two-TypeI-SinglePanel-Restriction2-r17", - "eight-one-TypeI-SinglePanel-Restriction2-r17", - "four-three-TypeI-SinglePanel-Restriction2-r17", - "six-two-TypeI-SinglePanel-Restriction2-r17", - "twelve-one-TypeI-SinglePanel-Restriction2-r17", - "four-four-TypeI-SinglePanel-Restriction2-r17", - "eight-two-TypeI-SinglePanel-Restriction2-r17", - "sixteen-one-TypeI-SinglePanel-Restriction2-r17"}; - return convert_enum_idx(names, - 13, - value, - "codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_" - "ant_ports_c_::more_than_two_s_::n1_n2_c_::types"); -} - -const char* codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_ant_ports_c_:: - types_opts::to_string() const -{ - static const char* names[] = {"two", "moreThanTwo"}; - return convert_enum_idx( - names, - 2, - value, - "codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_ant_ports_c_::types"); -} -uint8_t codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_ant_ports_c_:: - types_opts::to_number() const -{ - static const uint8_t numbers[] = {2}; - return map_enum_number( - numbers, - 1, - value, - "codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_ant_ports_c_::types"); -} - -const char* codebook_cfg_r17_s::codebook_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"type1", "type2"}; - return convert_enum_idx(names, 2, value, "codebook_cfg_r17_s::codebook_type_c_::types"); -} -uint8_t codebook_cfg_r17_s::codebook_type_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "codebook_cfg_r17_s::codebook_type_c_::types"); -} - -const char* codebook_cfg_v1730_s::codebook_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"type1"}; - return convert_enum_idx(names, 1, value, "codebook_cfg_v1730_s::codebook_type_c_::types"); -} -uint8_t codebook_cfg_v1730_s::codebook_type_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "codebook_cfg_v1730_s::codebook_type_c_::types"); -} - -const char* port_idx_for8_ranks_c::types_opts::to_string() const -{ - static const char* names[] = {"portIndex8", "portIndex4", "portIndex2", "portIndex1"}; - return convert_enum_idx(names, 4, value, "port_idx_for8_ranks_c::types"); -} -uint8_t port_idx_for8_ranks_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {8, 4, 2, 1}; - return map_enum_number(numbers, 4, value, "port_idx_for8_ranks_c::types"); -} - -const char* csi_report_cfg_s::report_cfg_type_c_::types_opts::to_string() const -{ - static const char* names[] = {"periodic", "semiPersistentOnPUCCH", "semiPersistentOnPUSCH", "aperiodic"}; - return convert_enum_idx(names, 4, value, "csi_report_cfg_s::report_cfg_type_c_::types"); -} - -const char* csi_report_cfg_s::report_quant_c_::types_opts::to_string() const -{ - static const char* names[] = {"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(names, 8, value, "csi_report_cfg_s::report_quant_c_::types"); -} - -const char* csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::types_opts::to_string() const -{ - static const char* names[] = {"subbands3", - "subbands4", - "subbands5", - "subbands6", - "subbands7", - "subbands8", - "subbands9", - "subbands10", - "subbands11", - "subbands12", - "subbands13", - "subbands14", - "subbands15", - "subbands16", - "subbands17", - "subbands18", - "subbands19-v1530"}; - return convert_enum_idx(names, 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 numbers[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; - return map_enum_number(numbers, 17, value, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::types"); -} - -const char* csi_report_cfg_s::group_based_beam_report_c_::types_opts::to_string() const -{ - static const char* names[] = {"enabled", "disabled"}; - return convert_enum_idx(names, 2, value, "csi_report_cfg_s::group_based_beam_report_c_::types"); -} - -const char* csi_report_cfg_s::report_quant_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"cri-SINR-r16", "ssb-Index-SINR-r16"}; - return convert_enum_idx(names, 2, value, "csi_report_cfg_s::report_quant_r16_c_::types"); -} - -const char* csi_report_cfg_s::report_quant_r17_c_::types_opts::to_string() const -{ - static const char* names[] = { - "cri-RSRP-Index-r17", "ssb-Index-RSRP-Index-r17", "cri-SINR-Index-r17", "ssb-Index-SINR-Index-r17"}; - return convert_enum_idx(names, 4, value, "csi_report_cfg_s::report_quant_r17_c_::types"); -} - -const char* csi_res_cfg_s::csi_rs_res_set_list_c_::types_opts::to_string() const -{ - static const char* names[] = {"nzp-CSI-RS-SSB", "csi-IM-ResourceSetList"}; - return convert_enum_idx(names, 2, value, "csi_res_cfg_s::csi_rs_res_set_list_c_::types"); -} - -const char* dl_prs_qcl_info_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"ssb-r17", "dl-PRS-r17"}; - return convert_enum_idx(names, 2, value, "dl_prs_qcl_info_r17_c::types"); -} - -const char* nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs15_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"n4-r17", - "n5-r17", - "n8-r17", - "n10-r17", - "n16-r17", - "n20-r17", - "n32-r17", - "n40-r17", - "n64-r17", - "n80-r17", - "n160-r17", - "n320-r17", - "n640-r17", - "n1280-r17", - "n2560-r17", - "n5120-r17", - "n10240-r17"}; - return convert_enum_idx(names, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs15_r17_c_::types"); -} -uint16_t nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs15_r17_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560, 5120, 10240}; - return map_enum_number( - numbers, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs15_r17_c_::types"); -} - -const char* nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs30_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"n8-r17", - "n10-r17", - "n16-r17", - "n20-r17", - "n32-r17", - "n40-r17", - "n64-r17", - "n80-r17", - "n128-r17", - "n160-r17", - "n320-r17", - "n640-r17", - "n1280-r17", - "n2560-r17", - "n5120-r17", - "n10240-r17", - "n20480-r17"}; - return convert_enum_idx(names, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs30_r17_c_::types"); -} -uint16_t nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs30_r17_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = {8, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1280, 2560, 5120, 10240, 20480}; - return map_enum_number( - numbers, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs30_r17_c_::types"); -} - -const char* nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs60_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"n16-r17", - "n20-r17", - "n32-r17", - "n40-r17", - "n64-r17", - "n80-r17", - "n128-r17", - "n160-r17", - "n256-r17", - "n320-r17", - "n640-r17", - "n1280-r17", - "n2560-r17", - "n5120-r17", - "n10240-r17", - "n20480-r17", - "n40960-r17"}; - return convert_enum_idx(names, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs60_r17_c_::types"); -} -uint16_t nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs60_r17_c_::types_opts::to_number() const -{ - static const uint16_t numbers[] = { - 16, 20, 32, 40, 64, 80, 128, 160, 256, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960}; - return map_enum_number( - numbers, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs60_r17_c_::types"); -} - -const char* nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs120_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"n32-r17", - "n40-r17", - "n64-r17", - "n80-r17", - "n128-r17", - "n160-r17", - "n256-r17", - "n320-r17", - "n512-r17", - "n640-r17", - "n1280-r17", - "n2560-r17", - "n5120-r17", - "n10240-r17", - "n20480-r17", - "n40960-r17", - "n81920-r17"}; - return convert_enum_idx( - names, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs120_r17_c_::types"); -} -uint32_t nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs120_r17_c_::types_opts::to_number() const -{ - static const uint32_t numbers[] = { - 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920}; - return map_enum_number( - numbers, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs120_r17_c_::types"); -} - -const char* nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::types_opts::to_string() const -{ - static const char* names[] = {"scs15-r17", "scs30-r17", "scs60-r17", "scs120-r17"}; - return convert_enum_idx(names, 4, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::types"); -} -uint8_t nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {15, 30, 60, 120}; - return map_enum_number(numbers, 4, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::types"); -} - -const char* nr_dl_prs_res_r17_s::dl_prs_comb_size_n_and_re_offset_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"n2-r17", "n4-r17", "n6-r17", "n12-r17"}; - return convert_enum_idx(names, 4, value, "nr_dl_prs_res_r17_s::dl_prs_comb_size_n_and_re_offset_r17_c_::types"); -} -uint8_t nr_dl_prs_res_r17_s::dl_prs_comb_size_n_and_re_offset_r17_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 6, 12}; - return map_enum_number(numbers, 4, value, "nr_dl_prs_res_r17_s::dl_prs_comb_size_n_and_re_offset_r17_c_::types"); -} - -const char* srs_carrier_switching_s::srs_tpc_pdcch_group_c_::types_opts::to_string() const -{ - static const char* names[] = {"typeA", "typeB"}; - return convert_enum_idx(names, 2, value, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_::types"); -} - -const char* ssb_mtc_add_pci_r17_s::ssb_positions_in_burst_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"shortBitmap", "mediumBitmap", "longBitmap"}; - return convert_enum_idx(names, 3, value, "ssb_mtc_add_pci_r17_s::ssb_positions_in_burst_r17_c_::types"); -} - -const char* tdd_ul_dl_slot_cfg_s::symbols_c_::types_opts::to_string() const -{ - static const char* names[] = {"allDownlink", "allUplink", "explicit"}; - return convert_enum_idx(names, 3, value, "tdd_ul_dl_slot_cfg_s::symbols_c_::types"); -} - -const char* tdd_ul_dl_slot_cfg_iab_mt_r16_s::symbols_iab_mt_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"allDownlink-r16", "allUplink-r16", "explicit-r16", "explicit-IAB-MT-r16"}; - return convert_enum_idx(names, 4, value, "tdd_ul_dl_slot_cfg_iab_mt_r16_s::symbols_iab_mt_r16_c_::types"); -} - -const char* ch_access_cfg_r16_s::energy_detection_cfg_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"maxEnergyDetectionThreshold-r16", "energyDetectionThresholdOffset-r16"}; - return convert_enum_idx(names, 2, value, "ch_access_cfg_r16_s::energy_detection_cfg_r16_c_::types"); -} - -const char* cross_carrier_sched_cfg_s::sched_cell_info_c_::types_opts::to_string() const -{ - static const char* names[] = {"own", "other"}; - return convert_enum_idx(names, 2, value, "cross_carrier_sched_cfg_s::sched_cell_info_c_::types"); -} - -const char* serving_cell_cfg_common_s::ssb_positions_in_burst_c_::types_opts::to_string() const -{ - static const char* names[] = {"shortBitmap", "mediumBitmap", "longBitmap"}; - return convert_enum_idx(names, 3, value, "serving_cell_cfg_common_s::ssb_positions_in_burst_c_::types"); -} - -const char* serving_cell_cfg_common_s::ch_access_mode_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"dynamic", "semiStatic"}; - return convert_enum_idx(names, 2, value, "serving_cell_cfg_common_s::ch_access_mode_r16_c_::types"); -} - -const char* drx_cfg_s::drx_on_dur_timer_c_::types_opts::to_string() const -{ - static const char* names[] = {"subMilliSeconds", "milliSeconds"}; - return convert_enum_idx(names, 2, value, "drx_cfg_s::drx_on_dur_timer_c_::types"); -} - -const char* drx_cfg_s::drx_long_cycle_start_offset_c_::types_opts::to_string() const -{ - static const char* names[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", - "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", - "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; - return convert_enum_idx(names, 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 numbers[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, - 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; - return map_enum_number(numbers, 20, value, "drx_cfg_s::drx_long_cycle_start_offset_c_::types"); -} - -const char* drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"subMilliSeconds", "milliSeconds"}; - return convert_enum_idx(names, 2, value, "drx_cfg_secondary_group_r16_s::drx_on_dur_timer_r16_c_::types"); -} - -const char* mbs_rnti_specific_cfg_r17_s::group_common_rnti_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"g-RNTI", "g-CS-RNTI"}; - return convert_enum_idx(names, 2, value, "mbs_rnti_specific_cfg_r17_s::group_common_rnti_r17_c_::types"); -} - -const char* pdsch_harq_ack_enh_type3_r17_s::applicable_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"perCC", "perHARQ"}; - return convert_enum_idx(names, 2, value, "pdsch_harq_ack_enh_type3_r17_s::applicable_r17_c_::types"); -} - -const char* recfg_with_sync_s::rach_cfg_ded_c_::types_opts::to_string() const -{ - static const char* names[] = {"uplink", "supplementaryUplink"}; - return convert_enum_idx(names, 2, value, "recfg_with_sync_s::rach_cfg_ded_c_::types"); -} - -const char* serving_cell_cfg_s::ca_slot_offset_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"refSCS15kHz", "refSCS30KHz", "refSCS60KHz", "refSCS120KHz"}; - return convert_enum_idx(names, 4, value, "serving_cell_cfg_s::ca_slot_offset_r16_c_::types"); -} -uint8_t serving_cell_cfg_s::ca_slot_offset_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {15, 30, 60, 120}; - return map_enum_number(numbers, 4, value, "serving_cell_cfg_s::ca_slot_offset_r16_c_::types"); -} - -const char* rlc_bearer_cfg_s::served_radio_bearer_c_::types_opts::to_string() const -{ - static const char* names[] = {"srb-Identity", "drb-Identity"}; - return convert_enum_idx(names, 2, value, "rlc_bearer_cfg_s::served_radio_bearer_c_::types"); -} - -// CellGrouping-r16 ::= SEQUENCE -SRSASN_CODE cell_grouping_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_dyn_seq_of(bref, mcg_r16, 1, 1024, integer_packer(1, 1024))); - HANDLE_CODE(pack_dyn_seq_of(bref, scg_r16, 1, 1024, integer_packer(1, 1024))); - HANDLE_CODE(mode_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cell_grouping_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_dyn_seq_of(mcg_r16, bref, 1, 1024, integer_packer(1, 1024))); - HANDLE_CODE(unpack_dyn_seq_of(scg_r16, bref, 1, 1024, integer_packer(1, 1024))); - HANDLE_CODE(mode_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void cell_grouping_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("mcg-r16"); - for (const auto& e1 : mcg_r16) { - j.write_int(e1); - } - j.end_array(); - j.start_array("scg-r16"); - for (const auto& e1 : scg_r16) { - j.write_int(e1); - } - j.end_array(); - j.write_str("mode-r16", mode_r16.to_string()); - j.end_obj(); -} - -const char* cell_grouping_r16_s::mode_r16_opts::to_string() const -{ - static const char* names[] = {"sync", "async"}; - return convert_enum_idx(names, 2, value, "cell_grouping_r16_s::mode_r16_e_"); -} - -const char* feature_set_c::types_opts::to_string() const -{ - static const char* names[] = {"eutra", "nr"}; - return convert_enum_idx(names, 2, value, "feature_set_c::types"); -} - -const char* supported_bw_c::types_opts::to_string() const -{ - static const char* names[] = {"fr1", "fr2"}; - return convert_enum_idx(names, 2, value, "supported_bw_c::types"); -} -uint8_t supported_bw_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "supported_bw_c::types"); -} - -const char* supported_bw_v1700_c::types_opts::to_string() const -{ - static const char* names[] = {"fr1-r17", "fr2-r17"}; - return convert_enum_idx(names, 2, value, "supported_bw_v1700_c::types"); -} -uint8_t supported_bw_v1700_c::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "supported_bw_v1700_c::types"); -} - -const char* freq_band_info_c::types_opts::to_string() const -{ - static const char* names[] = {"bandInformationEUTRA", "bandInformationNR"}; - return convert_enum_idx(names, 2, value, "freq_band_info_c::types"); -} - -const char* meas_and_mob_params_common_s::concurrent_meas_gap_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"concurrentPerUE-OnlyMeasGap-r17", "concurrentPerUE-PerFRCombMeasGap-r17"}; - return convert_enum_idx(names, 2, value, "meas_and_mob_params_common_s::concurrent_meas_gap_r17_c_::types"); -} - -// MeasAndMobParametersMRDC-XDD-Diff-v1560 ::= SEQUENCE -SRSASN_CODE meas_and_mob_params_mrdc_xdd_diff_v1560_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sftd_meas_pscell_nedc_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_and_mob_params_mrdc_xdd_diff_v1560_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sftd_meas_pscell_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_pscell_nedc_present) { - j.write_str("sftd-MeasPSCell-NEDC", "supported"); - } - 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)); - } - - 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)); - } - - 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(); -} - -// MeasAndMobParametersMRDC-Common-v1730 ::= SEQUENCE -SRSASN_CODE meas_and_mob_params_mrdc_common_v1730_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(independent_gap_cfg_max_cc_r17.fr1_only_r17_present, 1)); - HANDLE_CODE(bref.pack(independent_gap_cfg_max_cc_r17.fr2_only_r17_present, 1)); - HANDLE_CODE(bref.pack(independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17_present, 1)); - if (independent_gap_cfg_max_cc_r17.fr1_only_r17_present) { - HANDLE_CODE(pack_integer(bref, independent_gap_cfg_max_cc_r17.fr1_only_r17, (uint8_t)1u, (uint8_t)32u)); - } - if (independent_gap_cfg_max_cc_r17.fr2_only_r17_present) { - HANDLE_CODE(pack_integer(bref, independent_gap_cfg_max_cc_r17.fr2_only_r17, (uint8_t)1u, (uint8_t)32u)); - } - if (independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17_present) { - HANDLE_CODE(pack_integer(bref, independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17, (uint8_t)1u, (uint8_t)32u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_and_mob_params_mrdc_common_v1730_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(independent_gap_cfg_max_cc_r17.fr1_only_r17_present, 1)); - HANDLE_CODE(bref.unpack(independent_gap_cfg_max_cc_r17.fr2_only_r17_present, 1)); - HANDLE_CODE(bref.unpack(independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17_present, 1)); - if (independent_gap_cfg_max_cc_r17.fr1_only_r17_present) { - HANDLE_CODE(unpack_integer(independent_gap_cfg_max_cc_r17.fr1_only_r17, bref, (uint8_t)1u, (uint8_t)32u)); - } - if (independent_gap_cfg_max_cc_r17.fr2_only_r17_present) { - HANDLE_CODE(unpack_integer(independent_gap_cfg_max_cc_r17.fr2_only_r17, bref, (uint8_t)1u, (uint8_t)32u)); - } - if (independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17_present) { - HANDLE_CODE(unpack_integer(independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17, bref, (uint8_t)1u, (uint8_t)32u)); - } - - return SRSASN_SUCCESS; -} -void meas_and_mob_params_mrdc_common_v1730_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("independentGapConfig-maxCC-r17"); - j.start_obj(); - if (independent_gap_cfg_max_cc_r17.fr1_only_r17_present) { - j.write_int("fr1-Only-r17", independent_gap_cfg_max_cc_r17.fr1_only_r17); - } - if (independent_gap_cfg_max_cc_r17.fr2_only_r17_present) { - j.write_int("fr2-Only-r17", independent_gap_cfg_max_cc_r17.fr2_only_r17); - } - if (independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17_present) { - j.write_int("fr1-AndFR2-r17", independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17); - } - j.end_obj(); - j.end_obj(); -} - -// MeasAndMobParametersMRDC-v1730 ::= SEQUENCE -SRSASN_CODE meas_and_mob_params_mrdc_v1730_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_common_v1730_present, 1)); - - if (meas_and_mob_params_mrdc_common_v1730_present) { - HANDLE_CODE(meas_and_mob_params_mrdc_common_v1730.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_and_mob_params_mrdc_v1730_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_common_v1730_present, 1)); - - if (meas_and_mob_params_mrdc_common_v1730_present) { - HANDLE_CODE(meas_and_mob_params_mrdc_common_v1730.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void meas_and_mob_params_mrdc_v1730_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (meas_and_mob_params_mrdc_common_v1730_present) { - j.write_fieldname("measAndMobParametersMRDC-Common-v1730"); - meas_and_mob_params_mrdc_common_v1730.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)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= location_info_r16.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(location_info_r16.is_present(), 1)); - if (location_info_r16.is_present()) { - HANDLE_CODE(location_info_r16->pack(bref)); - } - } - } - 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)); - - 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); - - unpack_presence_flag(location_info_r16, bref); - if (location_info_r16.is_present()) { - HANDLE_CODE(location_info_r16->unpack(bref)); - } - } - } - 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(); - if (ext) { - if (location_info_r16.is_present()) { - j.write_fieldname("locationInfo-r16"); - location_info_r16->to_json(j); - } - } - j.end_obj(); -} - -const char* phy_params_common_s::bwp_switching_multi_ccs_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"type1-r16", "type2-r16"}; - return convert_enum_idx(names, 2, value, "phy_params_common_s::bwp_switching_multi_ccs_r16_c_::types"); -} -uint8_t phy_params_common_s::bwp_switching_multi_ccs_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "phy_params_common_s::bwp_switching_multi_ccs_r16_c_::types"); -} - -const char* phy_params_common_s::bwp_switching_multi_dormancy_ccs_r16_c_::types_opts::to_string() const -{ - static const char* names[] = {"type1-r16", "type2-r16"}; - return convert_enum_idx(names, 2, value, "phy_params_common_s::bwp_switching_multi_dormancy_ccs_r16_c_::types"); -} -uint8_t phy_params_common_s::bwp_switching_multi_dormancy_ccs_r16_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "phy_params_common_s::bwp_switching_multi_dormancy_ccs_r16_c_::types"); -} - -// Phy-ParametersCommon-v16a0 ::= SEQUENCE -SRSASN_CODE phy_params_common_v16a0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(srs_periodicity_and_offset_ext_r16_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE phy_params_common_v16a0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(srs_periodicity_and_offset_ext_r16_present, 1)); - - return SRSASN_SUCCESS; -} -void phy_params_common_v16a0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (srs_periodicity_and_offset_ext_r16_present) { - j.write_str("srs-PeriodicityAndOffsetExt-r16", "supported"); - } - j.end_obj(); -} - -// Phy-Parameters-v16a0 ::= SEQUENCE -SRSASN_CODE phy_params_v16a0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(phy_params_common_v16a0_present, 1)); - - if (phy_params_common_v16a0_present) { - HANDLE_CODE(phy_params_common_v16a0.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE phy_params_v16a0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(phy_params_common_v16a0_present, 1)); - - if (phy_params_common_v16a0_present) { - HANDLE_CODE(phy_params_common_v16a0.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void phy_params_v16a0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (phy_params_common_v16a0_present) { - j.write_fieldname("phy-ParametersCommon-v16a0"); - phy_params_common_v16a0.to_json(j); - } - j.end_obj(); -} - -// NAICS-Capability-Entry ::= SEQUENCE -SRSASN_CODE naics_cap_entry_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, nof_naics_capable_cc, (uint8_t)1u, (uint8_t)5u)); - HANDLE_CODE(nof_aggr_prb.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE naics_cap_entry_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(nof_naics_capable_cc, bref, (uint8_t)1u, (uint8_t)5u)); - HANDLE_CODE(nof_aggr_prb.unpack(bref)); - - return SRSASN_SUCCESS; -} -void naics_cap_entry_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("numberOfNAICS-CapableCC", nof_naics_capable_cc); - j.write_str("numberOfAggregatedPRB", nof_aggr_prb.to_string()); - j.end_obj(); -} - -const char* naics_cap_entry_s::nof_aggr_prb_opts::to_string() const -{ - static const char* names[] = {"n50", - "n75", - "n100", - "n125", - "n150", - "n175", - "n200", - "n225", - "n250", - "n275", - "n300", - "n350", - "n400", - "n450", - "n500", - "spare"}; - return convert_enum_idx(names, 16, value, "naics_cap_entry_s::nof_aggr_prb_e_"); -} -uint16_t naics_cap_entry_s::nof_aggr_prb_opts::to_number() const -{ - static const uint16_t numbers[] = {50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 350, 400, 450, 500}; - return map_enum_number(numbers, 15, value, "naics_cap_entry_s::nof_aggr_prb_e_"); -} - -// Phy-ParametersMRDC ::= SEQUENCE -SRSASN_CODE phy_params_mrdc_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(naics_cap_list.size() > 0, 1)); - - if (naics_cap_list.size() > 0) { - 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[1] |= tdd_pcell_ul_tx_all_ul_sf_r16_present; - group_flags[1] |= fdd_pcell_ul_tx_all_ul_sf_r16_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)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(tdd_pcell_ul_tx_all_ul_sf_r16_present, 1)); - HANDLE_CODE(bref.pack(fdd_pcell_ul_tx_all_ul_sf_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE phy_params_mrdc_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool naics_cap_list_present; - HANDLE_CODE(bref.unpack(naics_cap_list_present, 1)); - - if (naics_cap_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(naics_cap_list, bref, 1, 8)); - } - - 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); - - unpack_presence_flag(sp_cell_placement, bref); - if (sp_cell_placement.is_present()) { - HANDLE_CODE(sp_cell_placement->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(tdd_pcell_ul_tx_all_ul_sf_r16_present, 1)); - HANDLE_CODE(bref.unpack(fdd_pcell_ul_tx_all_ul_sf_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void phy_params_mrdc_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (naics_cap_list.size() > 0) { - j.start_array("naics-Capability-List"); - for (const auto& e1 : naics_cap_list) { - e1.to_json(j); - } - j.end_array(); - } - if (ext) { - if (sp_cell_placement.is_present()) { - j.write_fieldname("spCellPlacement"); - sp_cell_placement->to_json(j); - } - if (tdd_pcell_ul_tx_all_ul_sf_r16_present) { - j.write_str("tdd-PCellUL-TX-AllUL-Subframe-r16", "supported"); - } - if (fdd_pcell_ul_tx_all_ul_sf_r16_present) { - j.write_str("fdd-PCellUL-TX-AllUL-Subframe-r16", "supported"); - } - } - j.end_obj(); -} - -// RF-Parameters-v15g0 ::= SEQUENCE -SRSASN_CODE rf_params_v15g0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(supported_band_combination_list_v15g0.size() > 0, 1)); - - if (supported_band_combination_list_v15g0.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_list_v15g0, 1, 65536)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rf_params_v15g0_s::unpack(cbit_ref& bref) -{ - bool supported_band_combination_list_v15g0_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_v15g0_present, 1)); - - if (supported_band_combination_list_v15g0_present) { - HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_list_v15g0, bref, 1, 65536)); - } - - return SRSASN_SUCCESS; -} -void rf_params_v15g0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (supported_band_combination_list_v15g0.size() > 0) { - j.start_array("supportedBandCombinationList-v15g0"); - for (const auto& e1 : supported_band_combination_list_v15g0) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// RF-Parameters-v16a0 ::= SEQUENCE -SRSASN_CODE rf_params_v16a0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(supported_band_combination_list_v16a0.size() > 0, 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v16a0.size() > 0, 1)); - - if (supported_band_combination_list_v16a0.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_list_v16a0, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_v16a0.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_list_ul_tx_switch_v16a0, 1, 65536)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rf_params_v16a0_s::unpack(cbit_ref& bref) -{ - bool supported_band_combination_list_v16a0_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_v16a0_present, 1)); - bool supported_band_combination_list_ul_tx_switch_v16a0_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_ul_tx_switch_v16a0_present, 1)); - - if (supported_band_combination_list_v16a0_present) { - HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_list_v16a0, bref, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_v16a0_present) { - HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_list_ul_tx_switch_v16a0, bref, 1, 65536)); - } - - return SRSASN_SUCCESS; -} -void rf_params_v16a0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (supported_band_combination_list_v16a0.size() > 0) { - j.start_array("supportedBandCombinationList-v16a0"); - for (const auto& e1 : supported_band_combination_list_v16a0) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_ul_tx_switch_v16a0.size() > 0) { - j.start_array("supportedBandCombinationList-UplinkTxSwitch-v16a0"); - for (const auto& e1 : supported_band_combination_list_ul_tx_switch_v16a0) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// BandNR-v16c0 ::= SEQUENCE -SRSASN_CODE band_nr_v16c0_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pusch_repeat_type_a_v16c0_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE band_nr_v16c0_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pusch_repeat_type_a_v16c0_present, 1)); - - return SRSASN_SUCCESS; -} -void band_nr_v16c0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pusch_repeat_type_a_v16c0_present) { - j.write_str("pusch-RepetitionTypeA-v16c0", "supported"); - } - j.end_obj(); -} - -// RF-Parameters-v16c0 ::= SEQUENCE -SRSASN_CODE rf_params_v16c0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_list_nr_v16c0, 1, 1024)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE rf_params_v16c0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_dyn_seq_of(supported_band_list_nr_v16c0, bref, 1, 1024)); - - return SRSASN_SUCCESS; -} -void rf_params_v16c0_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("supportedBandListNR-v16c0"); - for (const auto& e1 : supported_band_list_nr_v16c0) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// RF-ParametersMRDC ::= SEQUENCE -SRSASN_CODE rf_params_mrdc_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(supported_band_combination_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(applied_freq_band_list_filt.size() > 0, 1)); - - if (supported_band_combination_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_list, 1, 65536)); - } - if (applied_freq_band_list_filt.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, applied_freq_band_list_filt, 1, 1280)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - 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[7] |= supported_band_combination_list_v1610.is_present(); - group_flags[7] |= supported_band_combination_list_nedc_only_v1610.is_present(); - group_flags[7] |= supported_band_combination_list_ul_tx_switch_r16.is_present(); - group_flags[8] |= supported_band_combination_list_v1630.is_present(); - group_flags[8] |= supported_band_combination_list_nedc_only_v1630.is_present(); - group_flags[8] |= supported_band_combination_list_ul_tx_switch_v1630.is_present(); - group_flags[9] |= supported_band_combination_list_v1640.is_present(); - group_flags[9] |= supported_band_combination_list_nedc_only_v1640.is_present(); - group_flags[9] |= supported_band_combination_list_ul_tx_switch_v1640.is_present(); - group_flags[10] |= supported_band_combination_list_ul_tx_switch_v1670.is_present(); - group_flags[11] |= supported_band_combination_list_v1700.is_present(); - group_flags[11] |= supported_band_combination_list_ul_tx_switch_v1700.is_present(); - group_flags[12] |= supported_band_combination_list_v1720.is_present(); - group_flags[12] |= supported_band_combination_list_nedc_only_v1720.is_present(); - group_flags[12] |= supported_band_combination_list_ul_tx_switch_v1720.is_present(); - group_flags[13] |= supported_band_combination_list_v1730.is_present(); - group_flags[13] |= supported_band_combination_list_nedc_only_v1730.is_present(); - group_flags[13] |= supported_band_combination_list_ul_tx_switch_v1730.is_present(); - group_flags[14] |= supported_band_combination_list_v1740.is_present(); - group_flags[14] |= supported_band_combination_list_nedc_only_v1740.is_present(); - group_flags[14] |= supported_band_combination_list_ul_tx_switch_v1740.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(srs_switching_time_requested_present, 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_v1540.is_present(), 1)); - if (supported_band_combination_list_v1540.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1540, 1, 65536)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(supported_band_combination_list_v1550.is_present(), 1)); - if (supported_band_combination_list_v1550.is_present()) { - 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.size() > 0, 1)); - HANDLE_CODE(bref.pack( - supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1560.size() > 0, 1)); - HANDLE_CODE(bref.pack( - supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1570.size() > 0, 1)); - HANDLE_CODE(bref.pack( - supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1580.size() > 0, 1)); - HANDLE_CODE(bref.pack( - supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590.size() > 0, 1)); - if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1540.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of( - bref, supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590, 1, 65536)); - } - } - } - if (group_flags[7]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(supported_band_combination_list_v1610.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v1610.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_r16.is_present(), 1)); - if (supported_band_combination_list_v1610.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1610, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1610.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_nedc_only_v1610, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_r16, 1, 65536)); - } - } - if (group_flags[8]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(supported_band_combination_list_v1630.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v1630.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1630.is_present(), 1)); - if (supported_band_combination_list_v1630.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1630, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1630.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_nedc_only_v1630, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_v1630.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1630, 1, 65536)); - } - } - if (group_flags[9]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(supported_band_combination_list_v1640.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v1640.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1640.is_present(), 1)); - if (supported_band_combination_list_v1640.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1640, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1640.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_nedc_only_v1640, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_v1640.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1640, 1, 65536)); - } - } - if (group_flags[10]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1670.is_present(), 1)); - if (supported_band_combination_list_ul_tx_switch_v1670.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1670, 1, 65536)); - } - } - if (group_flags[11]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(supported_band_combination_list_v1700.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1700.is_present(), 1)); - if (supported_band_combination_list_v1700.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1700, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_v1700.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1700, 1, 65536)); - } - } - if (group_flags[12]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(supported_band_combination_list_v1720.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v1720.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1720.is_present(), 1)); - if (supported_band_combination_list_v1720.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1720, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1720.is_present()) { - HANDLE_CODE(bref.pack( - supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1700.size() > 0, 1)); - HANDLE_CODE(bref.pack( - supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1720.size() > 0, 1)); - if (supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1700.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of( - bref, supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1700, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1720.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of( - bref, supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1720, 1, 65536)); - } - } - if (supported_band_combination_list_ul_tx_switch_v1720.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1720, 1, 65536)); - } - } - if (group_flags[13]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(supported_band_combination_list_v1730.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v1730.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1730.is_present(), 1)); - if (supported_band_combination_list_v1730.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1730, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1730.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_nedc_only_v1730, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_v1730.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1730, 1, 65536)); - } - } - if (group_flags[14]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(supported_band_combination_list_v1740.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v1740.is_present(), 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1740.is_present(), 1)); - if (supported_band_combination_list_v1740.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1740, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1740.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_nedc_only_v1740, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_v1740.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1740, 1, 65536)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rf_params_mrdc_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool supported_band_combination_list_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_present, 1)); - bool applied_freq_band_list_filt_present; - HANDLE_CODE(bref.unpack(applied_freq_band_list_filt_present, 1)); - - if (supported_band_combination_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_list, bref, 1, 65536)); - } - if (applied_freq_band_list_filt_present) { - HANDLE_CODE(unpack_dyn_seq_of(applied_freq_band_list_filt, bref, 1, 1280)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(15); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(srs_switching_time_requested_present, 1)); - unpack_presence_flag(supported_band_combination_list_v1540, bref); - if (supported_band_combination_list_v1540.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1540, bref, 1, 65536)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(supported_band_combination_list_v1550, bref); - if (supported_band_combination_list_v1550.is_present()) { - 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); - - unpack_presence_flag(supported_band_combination_list_v1560, bref); - unpack_presence_flag(supported_band_combination_list_nedc_only, bref); - 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); - - unpack_presence_flag(supported_band_combination_list_v1570, bref); - 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); - - unpack_presence_flag(supported_band_combination_list_v1580, bref); - 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); - - unpack_presence_flag(supported_band_combination_list_v1590, bref); - 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); - - unpack_presence_flag(supported_band_combination_list_nedc_only_v15a0, bref); - if (supported_band_combination_list_nedc_only_v15a0.is_present()) { - bool supported_band_combination_list_v1540_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_v1540_present, 1)); - bool supported_band_combination_list_v1560_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_v1560_present, 1)); - bool supported_band_combination_list_v1570_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_v1570_present, 1)); - bool supported_band_combination_list_v1580_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_v1580_present, 1)); - bool supported_band_combination_list_v1590_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_v1590_present, 1)); - if (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_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_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_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_v1590_present) { - HANDLE_CODE(unpack_dyn_seq_of( - supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590, bref, 1, 65536)); - } - } - } - if (group_flags[7]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(supported_band_combination_list_v1610, bref); - unpack_presence_flag(supported_band_combination_list_nedc_only_v1610, bref); - unpack_presence_flag(supported_band_combination_list_ul_tx_switch_r16, bref); - if (supported_band_combination_list_v1610.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1610, bref, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1610.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_nedc_only_v1610, bref, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_r16, bref, 1, 65536)); - } - } - if (group_flags[8]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(supported_band_combination_list_v1630, bref); - unpack_presence_flag(supported_band_combination_list_nedc_only_v1630, bref); - unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1630, bref); - if (supported_band_combination_list_v1630.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1630, bref, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1630.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_nedc_only_v1630, bref, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_v1630.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1630, bref, 1, 65536)); - } - } - if (group_flags[9]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(supported_band_combination_list_v1640, bref); - unpack_presence_flag(supported_band_combination_list_nedc_only_v1640, bref); - unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1640, bref); - if (supported_band_combination_list_v1640.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1640, bref, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1640.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_nedc_only_v1640, bref, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_v1640.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1640, bref, 1, 65536)); - } - } - if (group_flags[10]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1670, bref); - if (supported_band_combination_list_ul_tx_switch_v1670.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1670, bref, 1, 65536)); - } - } - if (group_flags[11]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(supported_band_combination_list_v1700, bref); - unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1700, bref); - if (supported_band_combination_list_v1700.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1700, bref, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_v1700.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1700, bref, 1, 65536)); - } - } - if (group_flags[12]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(supported_band_combination_list_v1720, bref); - unpack_presence_flag(supported_band_combination_list_nedc_only_v1720, bref); - unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1720, bref); - if (supported_band_combination_list_v1720.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1720, bref, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1720.is_present()) { - bool supported_band_combination_list_v1700_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_v1700_present, 1)); - bool supported_band_combination_list_v1720_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_v1720_present, 1)); - if (supported_band_combination_list_v1700_present) { - HANDLE_CODE(unpack_dyn_seq_of( - supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1700, bref, 1, 65536)); - } - if (supported_band_combination_list_v1720_present) { - HANDLE_CODE(unpack_dyn_seq_of( - supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1720, bref, 1, 65536)); - } - } - if (supported_band_combination_list_ul_tx_switch_v1720.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1720, bref, 1, 65536)); - } - } - if (group_flags[13]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(supported_band_combination_list_v1730, bref); - unpack_presence_flag(supported_band_combination_list_nedc_only_v1730, bref); - unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1730, bref); - if (supported_band_combination_list_v1730.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1730, bref, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1730.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_nedc_only_v1730, bref, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_v1730.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1730, bref, 1, 65536)); - } - } - if (group_flags[14]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(supported_band_combination_list_v1740, bref); - unpack_presence_flag(supported_band_combination_list_nedc_only_v1740, bref); - unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1740, bref); - if (supported_band_combination_list_v1740.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1740, bref, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v1740.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_nedc_only_v1740, bref, 1, 65536)); - } - if (supported_band_combination_list_ul_tx_switch_v1740.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1740, bref, 1, 65536)); - } - } - } - return SRSASN_SUCCESS; -} -void rf_params_mrdc_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (supported_band_combination_list.size() > 0) { - j.start_array("supportedBandCombinationList"); - for (const auto& e1 : supported_band_combination_list) { - e1.to_json(j); - } - j.end_array(); - } - if (applied_freq_band_list_filt.size() > 0) { - j.start_array("appliedFreqBandListFilter"); - for (const auto& e1 : applied_freq_band_list_filt) { - e1.to_json(j); - } - j.end_array(); - } - if (ext) { - if (srs_switching_time_requested_present) { - j.write_str("srs-SwitchingTimeRequested", "true"); - } - if (supported_band_combination_list_v1540.is_present()) { - j.start_array("supportedBandCombinationList-v1540"); - for (const auto& e1 : *supported_band_combination_list_v1540) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_v1550.is_present()) { - j.start_array("supportedBandCombinationList-v1550"); - for (const auto& e1 : *supported_band_combination_list_v1550) { - e1.to_json(j); - } - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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(); - } - if (supported_band_combination_list_v1610.is_present()) { - j.start_array("supportedBandCombinationList-v1610"); - for (const auto& e1 : *supported_band_combination_list_v1610) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_nedc_only_v1610.is_present()) { - j.start_array("supportedBandCombinationListNEDC-Only-v1610"); - for (const auto& e1 : *supported_band_combination_list_nedc_only_v1610) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_ul_tx_switch_r16.is_present()) { - j.start_array("supportedBandCombinationList-UplinkTxSwitch-r16"); - for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_v1630.is_present()) { - j.start_array("supportedBandCombinationList-v1630"); - for (const auto& e1 : *supported_band_combination_list_v1630) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_nedc_only_v1630.is_present()) { - j.start_array("supportedBandCombinationListNEDC-Only-v1630"); - for (const auto& e1 : *supported_band_combination_list_nedc_only_v1630) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_ul_tx_switch_v1630.is_present()) { - j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1630"); - for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1630) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_v1640.is_present()) { - j.start_array("supportedBandCombinationList-v1640"); - for (const auto& e1 : *supported_band_combination_list_v1640) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_nedc_only_v1640.is_present()) { - j.start_array("supportedBandCombinationListNEDC-Only-v1640"); - for (const auto& e1 : *supported_band_combination_list_nedc_only_v1640) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_ul_tx_switch_v1640.is_present()) { - j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1640"); - for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1640) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_ul_tx_switch_v1670.is_present()) { - j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1670"); - for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1670) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_v1700.is_present()) { - j.start_array("supportedBandCombinationList-v1700"); - for (const auto& e1 : *supported_band_combination_list_v1700) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_ul_tx_switch_v1700.is_present()) { - j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1700"); - for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1700) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_v1720.is_present()) { - j.start_array("supportedBandCombinationList-v1720"); - for (const auto& e1 : *supported_band_combination_list_v1720) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_nedc_only_v1720.is_present()) { - j.write_fieldname("supportedBandCombinationListNEDC-Only-v1720"); - j.start_obj(); - if (supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1700.size() > 0) { - j.start_array("supportedBandCombinationList-v1700"); - for (const auto& e1 : supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1700) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1720.size() > 0) { - j.start_array("supportedBandCombinationList-v1720"); - for (const auto& e1 : supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1720) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); - } - if (supported_band_combination_list_ul_tx_switch_v1720.is_present()) { - j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1720"); - for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1720) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_v1730.is_present()) { - j.start_array("supportedBandCombinationList-v1730"); - for (const auto& e1 : *supported_band_combination_list_v1730) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_nedc_only_v1730.is_present()) { - j.start_array("supportedBandCombinationListNEDC-Only-v1730"); - for (const auto& e1 : *supported_band_combination_list_nedc_only_v1730) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_ul_tx_switch_v1730.is_present()) { - j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1730"); - for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1730) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_v1740.is_present()) { - j.start_array("supportedBandCombinationList-v1740"); - for (const auto& e1 : *supported_band_combination_list_v1740) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_nedc_only_v1740.is_present()) { - j.start_array("supportedBandCombinationListNEDC-Only-v1740"); - for (const auto& e1 : *supported_band_combination_list_nedc_only_v1740) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_ul_tx_switch_v1740.is_present()) { - j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1740"); - for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1740) { - e1.to_json(j); - } - j.end_array(); - } - } - j.end_obj(); -} - -// RF-ParametersMRDC-v15g0 ::= SEQUENCE -SRSASN_CODE rf_params_mrdc_v15g0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(supported_band_combination_list_v15g0.size() > 0, 1)); - HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v15g0.size() > 0, 1)); - - if (supported_band_combination_list_v15g0.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_list_v15g0, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v15g0.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_list_nedc_only_v15g0, 1, 65536)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rf_params_mrdc_v15g0_s::unpack(cbit_ref& bref) -{ - bool supported_band_combination_list_v15g0_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_v15g0_present, 1)); - bool supported_band_combination_list_nedc_only_v15g0_present; - HANDLE_CODE(bref.unpack(supported_band_combination_list_nedc_only_v15g0_present, 1)); - - if (supported_band_combination_list_v15g0_present) { - HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_list_v15g0, bref, 1, 65536)); - } - if (supported_band_combination_list_nedc_only_v15g0_present) { - HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_list_nedc_only_v15g0, bref, 1, 65536)); - } - - return SRSASN_SUCCESS; -} -void rf_params_mrdc_v15g0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (supported_band_combination_list_v15g0.size() > 0) { - j.start_array("supportedBandCombinationList-v15g0"); - for (const auto& e1 : supported_band_combination_list_v15g0) { - e1.to_json(j); - } - j.end_array(); - } - if (supported_band_combination_list_nedc_only_v15g0.size() > 0) { - j.start_array("supportedBandCombinationListNEDC-Only-v15g0"); - for (const auto& e1 : supported_band_combination_list_nedc_only_v15g0) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// CG-SDT-TA-ValidationConfig-r17 ::= SEQUENCE -SRSASN_CODE cg_sdt_ta_validation_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(cg_sdt_rsrp_change_thres_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_sdt_ta_validation_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(cg_sdt_rsrp_change_thres_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void cg_sdt_ta_validation_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("cg-SDT-RSRP-ChangeThreshold-r17", cg_sdt_rsrp_change_thres_r17.to_string()); - j.end_obj(); -} - -const char* cg_sdt_ta_validation_cfg_r17_s::cg_sdt_rsrp_change_thres_r17_opts::to_string() const -{ - static const char* names[] = {"dB2", - "dB4", - "dB6", - "dB8", - "dB10", - "dB14", - "dB18", - "dB22", - "dB26", - "dB30", - "dB34", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "cg_sdt_ta_validation_cfg_r17_s::cg_sdt_rsrp_change_thres_r17_e_"); -} -uint8_t cg_sdt_ta_validation_cfg_r17_s::cg_sdt_rsrp_change_thres_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 6, 8, 10, 14, 18, 22, 26, 30, 34}; - return map_enum_number(numbers, 11, value, "cg_sdt_ta_validation_cfg_r17_s::cg_sdt_rsrp_change_thres_r17_e_"); -} - -// SDT-MAC-PHY-CG-Config-r17 ::= SEQUENCE -SRSASN_CODE sdt_mac_phy_cg_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cg_sdt_cfg_lch_restrict_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(cg_sdt_cfg_lch_restrict_to_release_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(cg_sdt_cfg_init_bwp_n_ul_r17_present, 1)); - HANDLE_CODE(bref.pack(cg_sdt_cfg_init_bwp_sul_r17_present, 1)); - HANDLE_CODE(bref.pack(cg_sdt_cfg_init_bwp_dl_r17_present, 1)); - HANDLE_CODE(bref.pack(cg_sdt_time_align_timer_r17_present, 1)); - HANDLE_CODE(bref.pack(cg_sdt_rsrp_thres_ssb_r17_present, 1)); - HANDLE_CODE(bref.pack(cg_sdt_ta_validation_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(cg_sdt_cs_rnti_r17_present, 1)); - - if (cg_sdt_cfg_lch_restrict_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cg_sdt_cfg_lch_restrict_to_add_mod_list_r17, 1, 32)); - } - if (cg_sdt_cfg_lch_restrict_to_release_list_r17.size() > 0) { - HANDLE_CODE( - pack_dyn_seq_of(bref, cg_sdt_cfg_lch_restrict_to_release_list_r17, 1, 32, integer_packer(1, 32))); - } - if (cg_sdt_cfg_init_bwp_n_ul_r17_present) { - HANDLE_CODE(cg_sdt_cfg_init_bwp_n_ul_r17.pack(bref)); - } - if (cg_sdt_cfg_init_bwp_sul_r17_present) { - HANDLE_CODE(cg_sdt_cfg_init_bwp_sul_r17.pack(bref)); - } - if (cg_sdt_cfg_init_bwp_dl_r17_present) { - HANDLE_CODE(cg_sdt_cfg_init_bwp_dl_r17.pack(bref)); - } - if (cg_sdt_time_align_timer_r17_present) { - HANDLE_CODE(cg_sdt_time_align_timer_r17.pack(bref)); - } - if (cg_sdt_rsrp_thres_ssb_r17_present) { - HANDLE_CODE(pack_integer(bref, cg_sdt_rsrp_thres_ssb_r17, (uint8_t)0u, (uint8_t)127u)); - } - if (cg_sdt_ta_validation_cfg_r17_present) { - HANDLE_CODE(cg_sdt_ta_validation_cfg_r17.pack(bref)); - } - if (cg_sdt_cs_rnti_r17_present) { - HANDLE_CODE(pack_integer(bref, cg_sdt_cs_rnti_r17, (uint32_t)0u, (uint32_t)65535u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sdt_mac_phy_cg_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool cg_sdt_cfg_lch_restrict_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(cg_sdt_cfg_lch_restrict_to_add_mod_list_r17_present, 1)); - bool cg_sdt_cfg_lch_restrict_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(cg_sdt_cfg_lch_restrict_to_release_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(cg_sdt_cfg_init_bwp_n_ul_r17_present, 1)); - HANDLE_CODE(bref.unpack(cg_sdt_cfg_init_bwp_sul_r17_present, 1)); - HANDLE_CODE(bref.unpack(cg_sdt_cfg_init_bwp_dl_r17_present, 1)); - HANDLE_CODE(bref.unpack(cg_sdt_time_align_timer_r17_present, 1)); - HANDLE_CODE(bref.unpack(cg_sdt_rsrp_thres_ssb_r17_present, 1)); - HANDLE_CODE(bref.unpack(cg_sdt_ta_validation_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(cg_sdt_cs_rnti_r17_present, 1)); - - if (cg_sdt_cfg_lch_restrict_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(cg_sdt_cfg_lch_restrict_to_add_mod_list_r17, bref, 1, 32)); - } - if (cg_sdt_cfg_lch_restrict_to_release_list_r17_present) { - HANDLE_CODE( - unpack_dyn_seq_of(cg_sdt_cfg_lch_restrict_to_release_list_r17, bref, 1, 32, integer_packer(1, 32))); - } - if (cg_sdt_cfg_init_bwp_n_ul_r17_present) { - HANDLE_CODE(cg_sdt_cfg_init_bwp_n_ul_r17.unpack(bref)); - } - if (cg_sdt_cfg_init_bwp_sul_r17_present) { - HANDLE_CODE(cg_sdt_cfg_init_bwp_sul_r17.unpack(bref)); - } - if (cg_sdt_cfg_init_bwp_dl_r17_present) { - HANDLE_CODE(cg_sdt_cfg_init_bwp_dl_r17.unpack(bref)); - } - if (cg_sdt_time_align_timer_r17_present) { - HANDLE_CODE(cg_sdt_time_align_timer_r17.unpack(bref)); - } - if (cg_sdt_rsrp_thres_ssb_r17_present) { - HANDLE_CODE(unpack_integer(cg_sdt_rsrp_thres_ssb_r17, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (cg_sdt_ta_validation_cfg_r17_present) { - HANDLE_CODE(cg_sdt_ta_validation_cfg_r17.unpack(bref)); - } - if (cg_sdt_cs_rnti_r17_present) { - HANDLE_CODE(unpack_integer(cg_sdt_cs_rnti_r17, bref, (uint32_t)0u, (uint32_t)65535u)); - } - - return SRSASN_SUCCESS; -} -void sdt_mac_phy_cg_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (cg_sdt_cfg_lch_restrict_to_add_mod_list_r17.size() > 0) { - j.start_array("cg-SDT-ConfigLCH-RestrictionToAddModList-r17"); - for (const auto& e1 : cg_sdt_cfg_lch_restrict_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (cg_sdt_cfg_lch_restrict_to_release_list_r17.size() > 0) { - j.start_array("cg-SDT-ConfigLCH-RestrictionToReleaseList-r17"); - for (const auto& e1 : cg_sdt_cfg_lch_restrict_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (cg_sdt_cfg_init_bwp_n_ul_r17_present) { - j.write_fieldname("cg-SDT-ConfigInitialBWP-NUL-r17"); - cg_sdt_cfg_init_bwp_n_ul_r17.to_json(j); - } - if (cg_sdt_cfg_init_bwp_sul_r17_present) { - j.write_fieldname("cg-SDT-ConfigInitialBWP-SUL-r17"); - cg_sdt_cfg_init_bwp_sul_r17.to_json(j); - } - if (cg_sdt_cfg_init_bwp_dl_r17_present) { - j.write_fieldname("cg-SDT-ConfigInitialBWP-DL-r17"); - cg_sdt_cfg_init_bwp_dl_r17.to_json(j); - } - if (cg_sdt_time_align_timer_r17_present) { - j.write_str("cg-SDT-TimeAlignmentTimer-r17", cg_sdt_time_align_timer_r17.to_string()); - } - if (cg_sdt_rsrp_thres_ssb_r17_present) { - j.write_int("cg-SDT-RSRP-ThresholdSSB-r17", cg_sdt_rsrp_thres_ssb_r17); - } - if (cg_sdt_ta_validation_cfg_r17_present) { - j.write_fieldname("cg-SDT-TA-ValidationConfig-r17"); - cg_sdt_ta_validation_cfg_r17.to_json(j); - } - if (cg_sdt_cs_rnti_r17_present) { - j.write_int("cg-SDT-CS-RNTI-r17", cg_sdt_cs_rnti_r17); - } - j.end_obj(); -} - -// SL-ConfigCommonNR-r16 ::= SEQUENCE -SRSASN_CODE sl_cfg_common_nr_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sl_freq_info_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_ue_sel_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_nr_anchor_carrier_freq_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_eutra_anchor_carrier_freq_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_radio_bearer_cfg_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_rlc_bearer_cfg_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_meas_cfg_common_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_csi_acquisition_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_offset_dfn_r16_present, 1)); - HANDLE_CODE(bref.pack(t400_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_max_num_consecutive_dtx_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_ssb_prio_nr_r16_present, 1)); - - if (sl_freq_info_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_freq_info_list_r16, 1, 8)); - } - if (sl_ue_sel_cfg_r16_present) { - HANDLE_CODE(sl_ue_sel_cfg_r16.pack(bref)); - } - if (sl_nr_anchor_carrier_freq_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_nr_anchor_carrier_freq_list_r16, 1, 8, integer_packer(0, 3279165))); - } - if (sl_eutra_anchor_carrier_freq_list_r16.size() > 0) { - HANDLE_CODE( - pack_dyn_seq_of(bref, sl_eutra_anchor_carrier_freq_list_r16, 1, 8, integer_packer(0, 262143))); - } - if (sl_radio_bearer_cfg_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_radio_bearer_cfg_list_r16, 1, 512)); - } - if (sl_rlc_bearer_cfg_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_rlc_bearer_cfg_list_r16, 1, 512)); - } - if (sl_meas_cfg_common_r16_present) { - HANDLE_CODE(sl_meas_cfg_common_r16.pack(bref)); - } - if (sl_offset_dfn_r16_present) { - HANDLE_CODE(pack_integer(bref, sl_offset_dfn_r16, (uint16_t)1u, (uint16_t)1000u)); - } - if (t400_r16_present) { - HANDLE_CODE(t400_r16.pack(bref)); - } - if (sl_max_num_consecutive_dtx_r16_present) { - HANDLE_CODE(sl_max_num_consecutive_dtx_r16.pack(bref)); - } - if (sl_ssb_prio_nr_r16_present) { - HANDLE_CODE(pack_integer(bref, sl_ssb_prio_nr_r16, (uint8_t)1u, (uint8_t)8u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_cfg_common_nr_r16_s::unpack(cbit_ref& bref) -{ - bool sl_freq_info_list_r16_present; - HANDLE_CODE(bref.unpack(sl_freq_info_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_ue_sel_cfg_r16_present, 1)); - bool sl_nr_anchor_carrier_freq_list_r16_present; - HANDLE_CODE(bref.unpack(sl_nr_anchor_carrier_freq_list_r16_present, 1)); - bool sl_eutra_anchor_carrier_freq_list_r16_present; - HANDLE_CODE(bref.unpack(sl_eutra_anchor_carrier_freq_list_r16_present, 1)); - bool sl_radio_bearer_cfg_list_r16_present; - HANDLE_CODE(bref.unpack(sl_radio_bearer_cfg_list_r16_present, 1)); - bool sl_rlc_bearer_cfg_list_r16_present; - HANDLE_CODE(bref.unpack(sl_rlc_bearer_cfg_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_meas_cfg_common_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_csi_acquisition_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_offset_dfn_r16_present, 1)); - HANDLE_CODE(bref.unpack(t400_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_max_num_consecutive_dtx_r16_present, 1)); - HANDLE_CODE(bref.unpack(sl_ssb_prio_nr_r16_present, 1)); - - if (sl_freq_info_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_freq_info_list_r16, bref, 1, 8)); - } - if (sl_ue_sel_cfg_r16_present) { - HANDLE_CODE(sl_ue_sel_cfg_r16.unpack(bref)); - } - if (sl_nr_anchor_carrier_freq_list_r16_present) { - HANDLE_CODE( - unpack_dyn_seq_of(sl_nr_anchor_carrier_freq_list_r16, bref, 1, 8, integer_packer(0, 3279165))); - } - if (sl_eutra_anchor_carrier_freq_list_r16_present) { - HANDLE_CODE( - unpack_dyn_seq_of(sl_eutra_anchor_carrier_freq_list_r16, bref, 1, 8, integer_packer(0, 262143))); - } - if (sl_radio_bearer_cfg_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_radio_bearer_cfg_list_r16, bref, 1, 512)); - } - if (sl_rlc_bearer_cfg_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_rlc_bearer_cfg_list_r16, bref, 1, 512)); - } - if (sl_meas_cfg_common_r16_present) { - HANDLE_CODE(sl_meas_cfg_common_r16.unpack(bref)); - } - if (sl_offset_dfn_r16_present) { - HANDLE_CODE(unpack_integer(sl_offset_dfn_r16, bref, (uint16_t)1u, (uint16_t)1000u)); - } - if (t400_r16_present) { - HANDLE_CODE(t400_r16.unpack(bref)); - } - if (sl_max_num_consecutive_dtx_r16_present) { - HANDLE_CODE(sl_max_num_consecutive_dtx_r16.unpack(bref)); - } - if (sl_ssb_prio_nr_r16_present) { - HANDLE_CODE(unpack_integer(sl_ssb_prio_nr_r16, bref, (uint8_t)1u, (uint8_t)8u)); - } - - return SRSASN_SUCCESS; -} -void sl_cfg_common_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_freq_info_list_r16.size() > 0) { - j.start_array("sl-FreqInfoList-r16"); - for (const auto& e1 : sl_freq_info_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_ue_sel_cfg_r16_present) { - j.write_fieldname("sl-UE-SelectedConfig-r16"); - sl_ue_sel_cfg_r16.to_json(j); - } - if (sl_nr_anchor_carrier_freq_list_r16.size() > 0) { - j.start_array("sl-NR-AnchorCarrierFreqList-r16"); - for (const auto& e1 : sl_nr_anchor_carrier_freq_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_eutra_anchor_carrier_freq_list_r16.size() > 0) { - j.start_array("sl-EUTRA-AnchorCarrierFreqList-r16"); - for (const auto& e1 : sl_eutra_anchor_carrier_freq_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_radio_bearer_cfg_list_r16.size() > 0) { - j.start_array("sl-RadioBearerConfigList-r16"); - for (const auto& e1 : sl_radio_bearer_cfg_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_rlc_bearer_cfg_list_r16.size() > 0) { - j.start_array("sl-RLC-BearerConfigList-r16"); - for (const auto& e1 : sl_rlc_bearer_cfg_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_meas_cfg_common_r16_present) { - j.write_fieldname("sl-MeasConfigCommon-r16"); - sl_meas_cfg_common_r16.to_json(j); - } - if (sl_csi_acquisition_r16_present) { - j.write_str("sl-CSI-Acquisition-r16", "enabled"); - } - if (sl_offset_dfn_r16_present) { - j.write_int("sl-OffsetDFN-r16", sl_offset_dfn_r16); - } - if (t400_r16_present) { - j.write_str("t400-r16", t400_r16.to_string()); - } - if (sl_max_num_consecutive_dtx_r16_present) { - j.write_str("sl-MaxNumConsecutiveDTX-r16", sl_max_num_consecutive_dtx_r16.to_string()); - } - if (sl_ssb_prio_nr_r16_present) { - j.write_int("sl-SSB-PriorityNR-r16", sl_ssb_prio_nr_r16); - } - j.end_obj(); -} - -const char* sl_cfg_common_nr_r16_s::t400_r16_opts::to_string() const -{ - static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; - return convert_enum_idx(names, 8, value, "sl_cfg_common_nr_r16_s::t400_r16_e_"); -} -uint16_t sl_cfg_common_nr_r16_s::t400_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return map_enum_number(numbers, 8, value, "sl_cfg_common_nr_r16_s::t400_r16_e_"); -} - -const char* sl_cfg_common_nr_r16_s::sl_max_num_consecutive_dtx_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n16", "n32"}; - return convert_enum_idx(names, 8, value, "sl_cfg_common_nr_r16_s::sl_max_num_consecutive_dtx_r16_e_"); -} -uint8_t sl_cfg_common_nr_r16_s::sl_max_num_consecutive_dtx_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 6, 8, 16, 32}; - return map_enum_number(numbers, 8, value, "sl_cfg_common_nr_r16_s::sl_max_num_consecutive_dtx_r16_e_"); -} - -// SL-DiscConfigCommon-r17 ::= SEQUENCE -SRSASN_CODE sl_disc_cfg_common_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(sl_relay_ue_cfg_common_r17.pack(bref)); - HANDLE_CODE(sl_remote_ue_cfg_common_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_disc_cfg_common_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(sl_relay_ue_cfg_common_r17.unpack(bref)); - HANDLE_CODE(sl_remote_ue_cfg_common_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void sl_disc_cfg_common_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("sl-RelayUE-ConfigCommon-r17"); - sl_relay_ue_cfg_common_r17.to_json(j); - j.write_fieldname("sl-RemoteUE-ConfigCommon-r17"); - sl_remote_ue_cfg_common_r17.to_json(j); - j.end_obj(); -} - -// UE-TimersAndConstantsRemoteUE-r17 ::= SEQUENCE -SRSASN_CODE ue_timers_and_consts_remote_ue_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(t300_remote_ue_r17_present, 1)); - HANDLE_CODE(bref.pack(t301_remote_ue_r17_present, 1)); - HANDLE_CODE(bref.pack(t319_remote_ue_r17_present, 1)); - - if (t300_remote_ue_r17_present) { - HANDLE_CODE(t300_remote_ue_r17.pack(bref)); - } - if (t301_remote_ue_r17_present) { - HANDLE_CODE(t301_remote_ue_r17.pack(bref)); - } - if (t319_remote_ue_r17_present) { - HANDLE_CODE(t319_remote_ue_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_timers_and_consts_remote_ue_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(t300_remote_ue_r17_present, 1)); - HANDLE_CODE(bref.unpack(t301_remote_ue_r17_present, 1)); - HANDLE_CODE(bref.unpack(t319_remote_ue_r17_present, 1)); - - if (t300_remote_ue_r17_present) { - HANDLE_CODE(t300_remote_ue_r17.unpack(bref)); - } - if (t301_remote_ue_r17_present) { - HANDLE_CODE(t301_remote_ue_r17.unpack(bref)); - } - if (t319_remote_ue_r17_present) { - HANDLE_CODE(t319_remote_ue_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_timers_and_consts_remote_ue_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (t300_remote_ue_r17_present) { - j.write_str("t300-RemoteUE-r17", t300_remote_ue_r17.to_string()); - } - if (t301_remote_ue_r17_present) { - j.write_str("t301-RemoteUE-r17", t301_remote_ue_r17.to_string()); - } - if (t319_remote_ue_r17_present) { - j.write_str("t319-RemoteUE-r17", t319_remote_ue_r17.to_string()); - } - j.end_obj(); -} - -const char* ue_timers_and_consts_remote_ue_r17_s::t300_remote_ue_r17_opts::to_string() const -{ - static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; - return convert_enum_idx(names, 8, value, "ue_timers_and_consts_remote_ue_r17_s::t300_remote_ue_r17_e_"); -} -uint16_t ue_timers_and_consts_remote_ue_r17_s::t300_remote_ue_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return map_enum_number(numbers, 8, value, "ue_timers_and_consts_remote_ue_r17_s::t300_remote_ue_r17_e_"); -} - -const char* ue_timers_and_consts_remote_ue_r17_s::t301_remote_ue_r17_opts::to_string() const -{ - static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; - return convert_enum_idx(names, 8, value, "ue_timers_and_consts_remote_ue_r17_s::t301_remote_ue_r17_e_"); -} -uint16_t ue_timers_and_consts_remote_ue_r17_s::t301_remote_ue_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return map_enum_number(numbers, 8, value, "ue_timers_and_consts_remote_ue_r17_s::t301_remote_ue_r17_e_"); -} - -const char* ue_timers_and_consts_remote_ue_r17_s::t319_remote_ue_r17_opts::to_string() const -{ - static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; - return convert_enum_idx(names, 8, value, "ue_timers_and_consts_remote_ue_r17_s::t319_remote_ue_r17_e_"); -} -uint16_t ue_timers_and_consts_remote_ue_r17_s::t319_remote_ue_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; - return map_enum_number(numbers, 8, value, "ue_timers_and_consts_remote_ue_r17_s::t319_remote_ue_r17_e_"); -} - -// SIB12-IEs-r16 ::= SEQUENCE -SRSASN_CODE sib12_ies_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - - HANDLE_CODE(sl_cfg_common_nr_r16.pack(bref)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= sl_drx_cfg_common_gc_bc_r17.is_present(); - group_flags[0] |= sl_disc_cfg_common_r17.is_present(); - group_flags[0] |= sl_l2_u2_n_relay_r17_present; - group_flags[0] |= sl_non_relay_discovery_r17_present; - group_flags[0] |= sl_l3_u2_n_relay_discovery_r17_present; - group_flags[0] |= sl_timers_and_consts_remote_ue_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(sl_drx_cfg_common_gc_bc_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(sl_disc_cfg_common_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(sl_l2_u2_n_relay_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_non_relay_discovery_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_l3_u2_n_relay_discovery_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_timers_and_consts_remote_ue_r17.is_present(), 1)); - if (sl_drx_cfg_common_gc_bc_r17.is_present()) { - HANDLE_CODE(sl_drx_cfg_common_gc_bc_r17->pack(bref)); - } - if (sl_disc_cfg_common_r17.is_present()) { - HANDLE_CODE(sl_disc_cfg_common_r17->pack(bref)); - } - if (sl_timers_and_consts_remote_ue_r17.is_present()) { - HANDLE_CODE(sl_timers_and_consts_remote_ue_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sib12_ies_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - - HANDLE_CODE(sl_cfg_common_nr_r16.unpack(bref)); - 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); - - unpack_presence_flag(sl_drx_cfg_common_gc_bc_r17, bref); - unpack_presence_flag(sl_disc_cfg_common_r17, bref); - HANDLE_CODE(bref.unpack(sl_l2_u2_n_relay_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_non_relay_discovery_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_l3_u2_n_relay_discovery_r17_present, 1)); - unpack_presence_flag(sl_timers_and_consts_remote_ue_r17, bref); - if (sl_drx_cfg_common_gc_bc_r17.is_present()) { - HANDLE_CODE(sl_drx_cfg_common_gc_bc_r17->unpack(bref)); - } - if (sl_disc_cfg_common_r17.is_present()) { - HANDLE_CODE(sl_disc_cfg_common_r17->unpack(bref)); - } - if (sl_timers_and_consts_remote_ue_r17.is_present()) { - HANDLE_CODE(sl_timers_and_consts_remote_ue_r17->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void sib12_ies_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("sl-ConfigCommonNR-r16"); - sl_cfg_common_nr_r16.to_json(j); - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - if (ext) { - if (sl_drx_cfg_common_gc_bc_r17.is_present()) { - j.write_fieldname("sl-DRX-ConfigCommonGC-BC-r17"); - sl_drx_cfg_common_gc_bc_r17->to_json(j); - } - if (sl_disc_cfg_common_r17.is_present()) { - j.write_fieldname("sl-DiscConfigCommon-r17"); - sl_disc_cfg_common_r17->to_json(j); - } - if (sl_l2_u2_n_relay_r17_present) { - j.write_str("sl-L2U2N-Relay-r17", "enabled"); - } - if (sl_non_relay_discovery_r17_present) { - j.write_str("sl-NonRelayDiscovery-r17", "enabled"); - } - if (sl_l3_u2_n_relay_discovery_r17_present) { - j.write_str("sl-L3U2N-RelayDiscovery-r17", "enabled"); - } - if (sl_timers_and_consts_remote_ue_r17.is_present()) { - j.write_fieldname("sl-TimersAndConstantsRemoteUE-r17"); - sl_timers_and_consts_remote_ue_r17->to_json(j); - } - } - j.end_obj(); -} - -// TRS-ResourceSet-r17 ::= SEQUENCE -SRSASN_CODE trs_res_set_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pwr_ctrl_offset_ss_r17.pack(bref)); - HANDLE_CODE(scrambling_id_info_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, first_ofdm_symbol_in_time_domain_r17, (uint8_t)0u, (uint8_t)9u)); - HANDLE_CODE(pack_integer(bref, start_rb_r17, (uint16_t)0u, (uint16_t)274u)); - HANDLE_CODE(pack_integer(bref, nrof_rbs_r17, (uint16_t)24u, (uint16_t)276u)); - HANDLE_CODE(pack_integer(bref, ssb_idx_r17, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(periodicity_and_offset_r17.pack(bref)); - HANDLE_CODE(freq_domain_alloc_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, ind_bit_id_r17, (uint8_t)0u, (uint8_t)5u)); - HANDLE_CODE(nrof_res_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE trs_res_set_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(pwr_ctrl_offset_ss_r17.unpack(bref)); - HANDLE_CODE(scrambling_id_info_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(first_ofdm_symbol_in_time_domain_r17, bref, (uint8_t)0u, (uint8_t)9u)); - HANDLE_CODE(unpack_integer(start_rb_r17, bref, (uint16_t)0u, (uint16_t)274u)); - HANDLE_CODE(unpack_integer(nrof_rbs_r17, bref, (uint16_t)24u, (uint16_t)276u)); - HANDLE_CODE(unpack_integer(ssb_idx_r17, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(periodicity_and_offset_r17.unpack(bref)); - HANDLE_CODE(freq_domain_alloc_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(ind_bit_id_r17, bref, (uint8_t)0u, (uint8_t)5u)); - HANDLE_CODE(nrof_res_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void trs_res_set_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("powerControlOffsetSS-r17", pwr_ctrl_offset_ss_r17.to_string()); - j.write_fieldname("scramblingID-Info-r17"); - scrambling_id_info_r17.to_json(j); - j.write_int("firstOFDMSymbolInTimeDomain-r17", first_ofdm_symbol_in_time_domain_r17); - j.write_int("startingRB-r17", start_rb_r17); - j.write_int("nrofRBs-r17", nrof_rbs_r17); - j.write_int("ssb-Index-r17", ssb_idx_r17); - j.write_fieldname("periodicityAndOffset-r17"); - periodicity_and_offset_r17.to_json(j); - j.write_str("frequencyDomainAllocation-r17", freq_domain_alloc_r17.to_string()); - j.write_int("indBitID-r17", ind_bit_id_r17); - j.write_str("nrofResources-r17", nrof_res_r17.to_string()); - j.end_obj(); -} - -const char* trs_res_set_r17_s::pwr_ctrl_offset_ss_r17_opts::to_string() const -{ - static const char* names[] = {"db-3", "db0", "db3", "db6"}; - return convert_enum_idx(names, 4, value, "trs_res_set_r17_s::pwr_ctrl_offset_ss_r17_e_"); -} -int8_t trs_res_set_r17_s::pwr_ctrl_offset_ss_r17_opts::to_number() const -{ - static const int8_t numbers[] = {-3, 0, 3, 6}; - return map_enum_number(numbers, 4, value, "trs_res_set_r17_s::pwr_ctrl_offset_ss_r17_e_"); -} - -void trs_res_set_r17_s::scrambling_id_info_r17_c_::destroy_() -{ - switch (type_) { - case types::scrambling_id_per_res_list_with2_r17: - c.destroy(); - break; - case types::scrambling_id_per_res_list_with4_r17: - c.destroy(); - break; - default: - break; - } -} -void trs_res_set_r17_s::scrambling_id_info_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::scrambling_id_for_common_r17: - break; - case types::scrambling_id_per_res_list_with2_r17: - c.init(); - break; - case types::scrambling_id_per_res_list_with4_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "trs_res_set_r17_s::scrambling_id_info_r17_c_"); - } -} -trs_res_set_r17_s::scrambling_id_info_r17_c_::scrambling_id_info_r17_c_( - const trs_res_set_r17_s::scrambling_id_info_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::scrambling_id_for_common_r17: - c.init(other.c.get()); - break; - case types::scrambling_id_per_res_list_with2_r17: - c.init(other.c.get()); - break; - case types::scrambling_id_per_res_list_with4_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "trs_res_set_r17_s::scrambling_id_info_r17_c_"); - } -} -trs_res_set_r17_s::scrambling_id_info_r17_c_& -trs_res_set_r17_s::scrambling_id_info_r17_c_::operator=(const trs_res_set_r17_s::scrambling_id_info_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::scrambling_id_for_common_r17: - c.set(other.c.get()); - break; - case types::scrambling_id_per_res_list_with2_r17: - c.set(other.c.get()); - break; - case types::scrambling_id_per_res_list_with4_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "trs_res_set_r17_s::scrambling_id_info_r17_c_"); - } - - return *this; -} -uint16_t& trs_res_set_r17_s::scrambling_id_info_r17_c_::set_scrambling_id_for_common_r17() -{ - set(types::scrambling_id_for_common_r17); - return c.get(); -} -trs_res_set_r17_s::scrambling_id_info_r17_c_::scrambling_id_per_res_list_with2_r17_l_& -trs_res_set_r17_s::scrambling_id_info_r17_c_::set_scrambling_id_per_res_list_with2_r17() -{ - set(types::scrambling_id_per_res_list_with2_r17); - return c.get(); -} -trs_res_set_r17_s::scrambling_id_info_r17_c_::scrambling_id_per_res_list_with4_r17_l_& -trs_res_set_r17_s::scrambling_id_info_r17_c_::set_scrambling_id_per_res_list_with4_r17() -{ - set(types::scrambling_id_per_res_list_with4_r17); - return c.get(); -} -void trs_res_set_r17_s::scrambling_id_info_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::scrambling_id_for_common_r17: - j.write_int("scramblingIDforCommon-r17", c.get()); - break; - case types::scrambling_id_per_res_list_with2_r17: - j.start_array("scramblingIDperResourceListWith2-r17"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scrambling_id_per_res_list_with4_r17: - j.start_array("scramblingIDperResourceListWith4-r17"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "trs_res_set_r17_s::scrambling_id_info_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE trs_res_set_r17_s::scrambling_id_info_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::scrambling_id_for_common_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1023u)); - break; - case types::scrambling_id_per_res_list_with2_r17: - HANDLE_CODE(pack_fixed_seq_of(bref, - c.get(), - c.get().size(), - integer_packer(0, 1023))); - break; - case types::scrambling_id_per_res_list_with4_r17: - HANDLE_CODE(pack_fixed_seq_of(bref, - c.get(), - c.get().size(), - integer_packer(0, 1023))); - break; - default: - log_invalid_choice_id(type_, "trs_res_set_r17_s::scrambling_id_info_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE trs_res_set_r17_s::scrambling_id_info_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::scrambling_id_for_common_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1023u)); - break; - case types::scrambling_id_per_res_list_with2_r17: - HANDLE_CODE(unpack_fixed_seq_of(c.get(), - bref, - c.get().size(), - integer_packer(0, 1023))); - break; - case types::scrambling_id_per_res_list_with4_r17: - HANDLE_CODE(unpack_fixed_seq_of(c.get(), - bref, - c.get().size(), - integer_packer(0, 1023))); - break; - default: - log_invalid_choice_id(type_, "trs_res_set_r17_s::scrambling_id_info_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* trs_res_set_r17_s::scrambling_id_info_r17_c_::types_opts::to_string() const -{ - static const char* names[] = { - "scramblingIDforCommon-r17", "scramblingIDperResourceListWith2-r17", "scramblingIDperResourceListWith4-r17"}; - return convert_enum_idx(names, 3, value, "trs_res_set_r17_s::scrambling_id_info_r17_c_::types"); -} -uint8_t trs_res_set_r17_s::scrambling_id_info_r17_c_::types_opts::to_number() const -{ - switch (value) { - case scrambling_id_per_res_list_with2_r17: - return 2; - case scrambling_id_per_res_list_with4_r17: - return 4; - default: - invalid_enum_number(value, "trs_res_set_r17_s::scrambling_id_info_r17_c_::types"); - } - return 0; -} - -void trs_res_set_r17_s::periodicity_and_offset_r17_c_::destroy_() {} -void trs_res_set_r17_s::periodicity_and_offset_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -trs_res_set_r17_s::periodicity_and_offset_r17_c_::periodicity_and_offset_r17_c_( - const trs_res_set_r17_s::periodicity_and_offset_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::slots10: - 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::nulltype: - break; - default: - log_invalid_choice_id(type_, "trs_res_set_r17_s::periodicity_and_offset_r17_c_"); - } -} -trs_res_set_r17_s::periodicity_and_offset_r17_c_& trs_res_set_r17_s::periodicity_and_offset_r17_c_::operator=( - const trs_res_set_r17_s::periodicity_and_offset_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::slots10: - 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::nulltype: - break; - default: - log_invalid_choice_id(type_, "trs_res_set_r17_s::periodicity_and_offset_r17_c_"); - } - - return *this; -} -uint8_t& trs_res_set_r17_s::periodicity_and_offset_r17_c_::set_slots10() -{ - set(types::slots10); - return c.get(); -} -uint8_t& trs_res_set_r17_s::periodicity_and_offset_r17_c_::set_slots20() -{ - set(types::slots20); - return c.get(); -} -uint8_t& trs_res_set_r17_s::periodicity_and_offset_r17_c_::set_slots40() -{ - set(types::slots40); - return c.get(); -} -uint8_t& trs_res_set_r17_s::periodicity_and_offset_r17_c_::set_slots80() -{ - set(types::slots80); - return c.get(); -} -void trs_res_set_r17_s::periodicity_and_offset_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::slots10: - j.write_int("slots10", 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; - default: - log_invalid_choice_id(type_, "trs_res_set_r17_s::periodicity_and_offset_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE trs_res_set_r17_s::periodicity_and_offset_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::slots10: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - 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; - default: - log_invalid_choice_id(type_, "trs_res_set_r17_s::periodicity_and_offset_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE trs_res_set_r17_s::periodicity_and_offset_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::slots10: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - 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; - default: - log_invalid_choice_id(type_, "trs_res_set_r17_s::periodicity_and_offset_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* trs_res_set_r17_s::periodicity_and_offset_r17_c_::types_opts::to_string() const -{ - static const char* names[] = {"slots10", "slots20", "slots40", "slots80"}; - return convert_enum_idx(names, 4, value, "trs_res_set_r17_s::periodicity_and_offset_r17_c_::types"); -} -uint8_t trs_res_set_r17_s::periodicity_and_offset_r17_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {10, 20, 40, 80}; - return map_enum_number(numbers, 4, value, "trs_res_set_r17_s::periodicity_and_offset_r17_c_::types"); -} - -const char* trs_res_set_r17_s::nrof_res_r17_opts::to_string() const -{ - static const char* names[] = {"n2", "n4"}; - return convert_enum_idx(names, 2, value, "trs_res_set_r17_s::nrof_res_r17_e_"); -} -uint8_t trs_res_set_r17_s::nrof_res_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4}; - return map_enum_number(numbers, 2, value, "trs_res_set_r17_s::nrof_res_r17_e_"); -} - -// SIB17-IEs-r17 ::= SEQUENCE -SRSASN_CODE sib17_ies_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(validity_dur_r17_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, trs_res_set_cfg_r17, 1, 64)); - if (validity_dur_r17_present) { - HANDLE_CODE(validity_dur_r17.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sib17_ies_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(validity_dur_r17_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - - HANDLE_CODE(unpack_dyn_seq_of(trs_res_set_cfg_r17, bref, 1, 64)); - if (validity_dur_r17_present) { - HANDLE_CODE(validity_dur_r17.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sib17_ies_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("trs-ResourceSetConfig-r17"); - for (const auto& e1 : trs_res_set_cfg_r17) { - e1.to_json(j); - } - j.end_array(); - if (validity_dur_r17_present) { - j.write_str("validityDuration-r17", validity_dur_r17.to_string()); - } - if (late_non_crit_ext.size() > 0) { - j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); - } - j.end_obj(); -} - -const char* sib17_ies_r17_s::validity_dur_r17_opts::to_string() const -{ - static const char* names[] = {"t1", - "t2", - "t4", - "t8", - "t16", - "t32", - "t64", - "t128", - "t256", - "t512", - "infinity", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "sib17_ies_r17_s::validity_dur_r17_e_"); -} -int16_t sib17_ies_r17_s::validity_dur_r17_opts::to_number() const -{ - static const int16_t numbers[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, -1}; - return map_enum_number(numbers, 11, value, "sib17_ies_r17_s::validity_dur_r17_e_"); -} - -// SL-ServingCellInfo-r17 ::= SEQUENCE -SRSASN_CODE sl_serving_cell_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, sl_pci_r17, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(pack_integer(bref, sl_carrier_freq_nr_r17, (uint32_t)0u, (uint32_t)3279165u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_serving_cell_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(sl_pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(unpack_integer(sl_carrier_freq_nr_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); - - return SRSASN_SUCCESS; -} -void sl_serving_cell_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("sl-PhysCellId-r17", sl_pci_r17); - j.write_int("sl-CarrierFreqNR-r17", sl_carrier_freq_nr_r17); - j.end_obj(); -} - -// SRS-PosConfig-r17 ::= SEQUENCE -SRSASN_CODE srs_pos_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(srs_pos_res_set_to_release_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(srs_pos_res_set_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(srs_pos_res_to_release_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(srs_pos_res_to_add_mod_list_r17.size() > 0, 1)); - - if (srs_pos_res_set_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_pos_res_set_to_release_list_r17, 1, 16, integer_packer(0, 15))); - } - if (srs_pos_res_set_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_pos_res_set_to_add_mod_list_r17, 1, 16)); - } - if (srs_pos_res_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_pos_res_to_release_list_r17, 1, 64, integer_packer(0, 63))); - } - if (srs_pos_res_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_pos_res_to_add_mod_list_r17, 1, 64)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE srs_pos_cfg_r17_s::unpack(cbit_ref& bref) -{ - bool srs_pos_res_set_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(srs_pos_res_set_to_release_list_r17_present, 1)); - bool srs_pos_res_set_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(srs_pos_res_set_to_add_mod_list_r17_present, 1)); - bool srs_pos_res_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(srs_pos_res_to_release_list_r17_present, 1)); - bool srs_pos_res_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(srs_pos_res_to_add_mod_list_r17_present, 1)); - - if (srs_pos_res_set_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(srs_pos_res_set_to_release_list_r17, bref, 1, 16, integer_packer(0, 15))); - } - if (srs_pos_res_set_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(srs_pos_res_set_to_add_mod_list_r17, bref, 1, 16)); - } - if (srs_pos_res_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(srs_pos_res_to_release_list_r17, bref, 1, 64, integer_packer(0, 63))); - } - if (srs_pos_res_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(srs_pos_res_to_add_mod_list_r17, bref, 1, 64)); - } - - return SRSASN_SUCCESS; -} -void srs_pos_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (srs_pos_res_set_to_release_list_r17.size() > 0) { - j.start_array("srs-PosResourceSetToReleaseList-r17"); - for (const auto& e1 : srs_pos_res_set_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (srs_pos_res_set_to_add_mod_list_r17.size() > 0) { - j.start_array("srs-PosResourceSetToAddModList-r17"); - for (const auto& e1 : srs_pos_res_set_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (srs_pos_res_to_release_list_r17.size() > 0) { - j.start_array("srs-PosResourceToReleaseList-r17"); - for (const auto& e1 : srs_pos_res_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (srs_pos_res_to_add_mod_list_r17.size() > 0) { - j.start_array("srs-PosResourceToAddModList-r17"); - for (const auto& e1 : srs_pos_res_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// RSRP-ChangeThreshold-r17 ::= ENUMERATED -const char* rsrp_change_thres_r17_opts::to_string() const -{ - static const char* names[] = {"dB4", - "dB6", - "dB8", - "dB10", - "dB14", - "dB18", - "dB22", - "dB26", - "dB30", - "dB34", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "rsrp_change_thres_r17_e"); -} -uint8_t rsrp_change_thres_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {4, 6, 8, 10, 14, 18, 22, 26, 30, 34}; - return map_enum_number(numbers, 10, value, "rsrp_change_thres_r17_e"); -} - -// SRS-PosRRC-InactiveConfig-r17 ::= SEQUENCE -SRSASN_CODE srs_pos_rrc_inactive_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(srs_pos_cfg_n_ul_r17_present, 1)); - HANDLE_CODE(bref.pack(srs_pos_cfg_sul_r17_present, 1)); - HANDLE_CODE(bref.pack(bwp_n_ul_r17_present, 1)); - HANDLE_CODE(bref.pack(bwp_sul_r17_present, 1)); - HANDLE_CODE(bref.pack(inactive_pos_srs_time_align_timer_r17_present, 1)); - HANDLE_CODE(bref.pack(inactive_pos_srs_rsrp_change_thres_r17_present, 1)); - - if (srs_pos_cfg_n_ul_r17_present) { - HANDLE_CODE(srs_pos_cfg_n_ul_r17.pack(bref)); - } - if (srs_pos_cfg_sul_r17_present) { - HANDLE_CODE(srs_pos_cfg_sul_r17.pack(bref)); - } - if (bwp_n_ul_r17_present) { - HANDLE_CODE(bwp_n_ul_r17.pack(bref)); - } - if (bwp_sul_r17_present) { - HANDLE_CODE(bwp_sul_r17.pack(bref)); - } - if (inactive_pos_srs_time_align_timer_r17_present) { - HANDLE_CODE(inactive_pos_srs_time_align_timer_r17.pack(bref)); - } - if (inactive_pos_srs_rsrp_change_thres_r17_present) { - HANDLE_CODE(inactive_pos_srs_rsrp_change_thres_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE srs_pos_rrc_inactive_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(srs_pos_cfg_n_ul_r17_present, 1)); - HANDLE_CODE(bref.unpack(srs_pos_cfg_sul_r17_present, 1)); - HANDLE_CODE(bref.unpack(bwp_n_ul_r17_present, 1)); - HANDLE_CODE(bref.unpack(bwp_sul_r17_present, 1)); - HANDLE_CODE(bref.unpack(inactive_pos_srs_time_align_timer_r17_present, 1)); - HANDLE_CODE(bref.unpack(inactive_pos_srs_rsrp_change_thres_r17_present, 1)); - - if (srs_pos_cfg_n_ul_r17_present) { - HANDLE_CODE(srs_pos_cfg_n_ul_r17.unpack(bref)); - } - if (srs_pos_cfg_sul_r17_present) { - HANDLE_CODE(srs_pos_cfg_sul_r17.unpack(bref)); - } - if (bwp_n_ul_r17_present) { - HANDLE_CODE(bwp_n_ul_r17.unpack(bref)); - } - if (bwp_sul_r17_present) { - HANDLE_CODE(bwp_sul_r17.unpack(bref)); - } - if (inactive_pos_srs_time_align_timer_r17_present) { - HANDLE_CODE(inactive_pos_srs_time_align_timer_r17.unpack(bref)); - } - if (inactive_pos_srs_rsrp_change_thres_r17_present) { - HANDLE_CODE(inactive_pos_srs_rsrp_change_thres_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void srs_pos_rrc_inactive_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (srs_pos_cfg_n_ul_r17_present) { - j.write_fieldname("srs-PosConfigNUL-r17"); - srs_pos_cfg_n_ul_r17.to_json(j); - } - if (srs_pos_cfg_sul_r17_present) { - j.write_fieldname("srs-PosConfigSUL-r17"); - srs_pos_cfg_sul_r17.to_json(j); - } - if (bwp_n_ul_r17_present) { - j.write_fieldname("bwp-NUL-r17"); - bwp_n_ul_r17.to_json(j); - } - if (bwp_sul_r17_present) { - j.write_fieldname("bwp-SUL-r17"); - bwp_sul_r17.to_json(j); - } - if (inactive_pos_srs_time_align_timer_r17_present) { - j.write_str("inactivePosSRS-TimeAlignmentTimer-r17", inactive_pos_srs_time_align_timer_r17.to_string()); - } - if (inactive_pos_srs_rsrp_change_thres_r17_present) { - j.write_str("inactivePosSRS-RSRP-ChangeThreshold-r17", inactive_pos_srs_rsrp_change_thres_r17.to_string()); - } - 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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= codebook_type_request_r16.is_present(); - group_flags[0] |= ul_tx_switch_request_r16_present; - group_flags[1] |= requested_cell_grouping_r16.is_present(); - group_flags[2] |= fallback_group_five_request_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(codebook_type_request_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(ul_tx_switch_request_r16_present, 1)); - if (codebook_type_request_r16.is_present()) { - HANDLE_CODE(bref.pack(codebook_type_request_r16->type1_single_panel_r16_present, 1)); - HANDLE_CODE(bref.pack(codebook_type_request_r16->type1_multi_panel_r16_present, 1)); - HANDLE_CODE(bref.pack(codebook_type_request_r16->type2_r16_present, 1)); - HANDLE_CODE(bref.pack(codebook_type_request_r16->type2_port_sel_r16_present, 1)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(requested_cell_grouping_r16.is_present(), 1)); - if (requested_cell_grouping_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *requested_cell_grouping_r16, 1, 32)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(fallback_group_five_request_r17_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)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(3); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(codebook_type_request_r16, bref); - HANDLE_CODE(bref.unpack(ul_tx_switch_request_r16_present, 1)); - if (codebook_type_request_r16.is_present()) { - HANDLE_CODE(bref.unpack(codebook_type_request_r16->type1_single_panel_r16_present, 1)); - HANDLE_CODE(bref.unpack(codebook_type_request_r16->type1_multi_panel_r16_present, 1)); - HANDLE_CODE(bref.unpack(codebook_type_request_r16->type2_r16_present, 1)); - HANDLE_CODE(bref.unpack(codebook_type_request_r16->type2_port_sel_r16_present, 1)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(requested_cell_grouping_r16, bref); - if (requested_cell_grouping_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*requested_cell_grouping_r16, bref, 1, 32)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(fallback_group_five_request_r17_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(); - } - if (ext) { - if (codebook_type_request_r16.is_present()) { - j.write_fieldname("codebookTypeRequest-r16"); - j.start_obj(); - if (codebook_type_request_r16->type1_single_panel_r16_present) { - j.write_str("type1-SinglePanel-r16", "true"); - } - if (codebook_type_request_r16->type1_multi_panel_r16_present) { - j.write_str("type1-MultiPanel-r16", "true"); - } - if (codebook_type_request_r16->type2_r16_present) { - j.write_str("type2-r16", "true"); - } - if (codebook_type_request_r16->type2_port_sel_r16_present) { - j.write_str("type2-PortSelection-r16", "true"); - } - j.end_obj(); - } - if (ul_tx_switch_request_r16_present) { - j.write_str("uplinkTxSwitchRequest-r16", "true"); - } - if (requested_cell_grouping_r16.is_present()) { - j.start_array("requestedCellGrouping-r16"); - for (const auto& e1 : *requested_cell_grouping_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (fallback_group_five_request_r17_present) { - j.write_str("fallbackGroupFiveRequest-r17", "true"); - } - } - j.end_obj(); -} - -// UE-CapabilityRequestFilterNR-v1710 ::= SEQUENCE -SRSASN_CODE ue_cap_request_filt_nr_v1710_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sidelink_request_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_cap_request_filt_nr_v1710_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sidelink_request_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - return SRSASN_SUCCESS; -} -void ue_cap_request_filt_nr_v1710_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sidelink_request_r17_present) { - j.write_str("sidelinkRequest-r17", "true"); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// UE-CapabilityRequestFilterNR-v1540 ::= SEQUENCE -SRSASN_CODE ue_cap_request_filt_nr_v1540_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(srs_switching_time_request_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_request_filt_nr_v1540_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(srs_switching_time_request_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_request_filt_nr_v1540_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (srs_switching_time_request_present) { - j.write_str("srs-SwitchingTimeRequest", "true"); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// UE-CapabilityRequestFilterNR ::= SEQUENCE -SRSASN_CODE ue_cap_request_filt_nr_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(freq_band_list_filt.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (freq_band_list_filt.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list_filt, 1, 1280)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_cap_request_filt_nr_s::unpack(cbit_ref& bref) -{ - bool freq_band_list_filt_present; - HANDLE_CODE(bref.unpack(freq_band_list_filt_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (freq_band_list_filt_present) { - HANDLE_CODE(unpack_dyn_seq_of(freq_band_list_filt, bref, 1, 1280)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_cap_request_filt_nr_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (freq_band_list_filt.size() > 0) { - j.start_array("frequencyBandListFilter"); - for (const auto& e1 : freq_band_list_filt) { - 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(); -} - -// UE-MRDC-Capability-v1730 ::= SEQUENCE -SRSASN_CODE ue_mrdc_cap_v1730_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_v1730_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (meas_and_mob_params_mrdc_v1730_present) { - HANDLE_CODE(meas_and_mob_params_mrdc_v1730.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_mrdc_cap_v1730_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_v1730_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (meas_and_mob_params_mrdc_v1730_present) { - HANDLE_CODE(meas_and_mob_params_mrdc_v1730.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_mrdc_cap_v1730_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (meas_and_mob_params_mrdc_v1730_present) { - j.write_fieldname("measAndMobParametersMRDC-v1730"); - meas_and_mob_params_mrdc_v1730.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// GeneralParametersMRDC-v1610 ::= SEQUENCE -SRSASN_CODE general_params_mrdc_v1610_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(f1c_over_eutra_r16_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE general_params_mrdc_v1610_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(f1c_over_eutra_r16_present, 1)); - - return SRSASN_SUCCESS; -} -void general_params_mrdc_v1610_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (f1c_over_eutra_r16_present) { - j.write_str("f1c-OverEUTRA-r16", "supported"); - } - j.end_obj(); -} - -// PDCP-ParametersMRDC-v1610 ::= SEQUENCE -SRSASN_CODE pdcp_params_mrdc_v1610_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(scg_drb_nr_iab_r16_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcp_params_mrdc_v1610_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(scg_drb_nr_iab_r16_present, 1)); - - return SRSASN_SUCCESS; -} -void pdcp_params_mrdc_v1610_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (scg_drb_nr_iab_r16_present) { - j.write_str("scg-DRB-NR-IAB-r16", "supported"); - } - j.end_obj(); -} - -// UE-MRDC-Capability-v1700 ::= SEQUENCE -SRSASN_CODE ue_mrdc_cap_v1700_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(meas_and_mob_params_mrdc_v1700.pack(bref)); - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_mrdc_cap_v1700_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(meas_and_mob_params_mrdc_v1700.unpack(bref)); - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_mrdc_cap_v1700_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("measAndMobParametersMRDC-v1700"); - meas_and_mob_params_mrdc_v1700.to_json(j); - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// UE-MRDC-Capability-v1610 ::= SEQUENCE -SRSASN_CODE ue_mrdc_cap_v1610_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_v1610_present, 1)); - HANDLE_CODE(bref.pack(general_params_mrdc_v1610_present, 1)); - HANDLE_CODE(bref.pack(pdcp_params_mrdc_v1610_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (meas_and_mob_params_mrdc_v1610_present) { - HANDLE_CODE(meas_and_mob_params_mrdc_v1610.pack(bref)); - } - if (general_params_mrdc_v1610_present) { - HANDLE_CODE(general_params_mrdc_v1610.pack(bref)); - } - if (pdcp_params_mrdc_v1610_present) { - HANDLE_CODE(pdcp_params_mrdc_v1610.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_mrdc_cap_v1610_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_v1610_present, 1)); - HANDLE_CODE(bref.unpack(general_params_mrdc_v1610_present, 1)); - HANDLE_CODE(bref.unpack(pdcp_params_mrdc_v1610_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (meas_and_mob_params_mrdc_v1610_present) { - HANDLE_CODE(meas_and_mob_params_mrdc_v1610.unpack(bref)); - } - if (general_params_mrdc_v1610_present) { - HANDLE_CODE(general_params_mrdc_v1610.unpack(bref)); - } - if (pdcp_params_mrdc_v1610_present) { - HANDLE_CODE(pdcp_params_mrdc_v1610.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_mrdc_cap_v1610_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (meas_and_mob_params_mrdc_v1610_present) { - j.write_fieldname("measAndMobParametersMRDC-v1610"); - meas_and_mob_params_mrdc_v1610.to_json(j); - } - if (general_params_mrdc_v1610_present) { - j.write_fieldname("generalParametersMRDC-v1610"); - general_params_mrdc_v1610.to_json(j); - } - if (pdcp_params_mrdc_v1610_present) { - j.write_fieldname("pdcp-ParametersMRDC-v1610"); - pdcp_params_mrdc_v1610.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// UE-MRDC-CapabilityAddXDD-Mode-v1560 ::= SEQUENCE -SRSASN_CODE ue_mrdc_cap_add_xdd_mode_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)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_mrdc_cap_add_xdd_mode_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)); - } - - return SRSASN_SUCCESS; -} -void ue_mrdc_cap_add_xdd_mode_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(); -} - -// PDCP-ParametersMRDC ::= SEQUENCE -SRSASN_CODE pdcp_params_mrdc_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(pdcp_dupl_split_srb_present, 1)); - HANDLE_CODE(bref.pack(pdcp_dupl_split_drb_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcp_params_mrdc_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(pdcp_dupl_split_srb_present, 1)); - HANDLE_CODE(bref.unpack(pdcp_dupl_split_drb_present, 1)); - - return SRSASN_SUCCESS; -} -void pdcp_params_mrdc_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pdcp_dupl_split_srb_present) { - j.write_str("pdcp-DuplicationSplitSRB", "supported"); - } - if (pdcp_dupl_split_drb_present) { - j.write_str("pdcp-DuplicationSplitDRB", "supported"); - } - j.end_obj(); -} - -// UE-MRDC-Capability-v1560 ::= SEQUENCE -SRSASN_CODE ue_mrdc_cap_v1560_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(rx_filts.size() > 0, 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 (rx_filts.size() > 0) { - HANDLE_CODE(rx_filts.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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_mrdc_cap_v1560_s::unpack(cbit_ref& bref) -{ - bool rx_filts_present; - 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 (rx_filts_present) { - HANDLE_CODE(rx_filts.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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_mrdc_cap_v1560_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (rx_filts.size() > 0) { - j.write_str("receivedFilters", rx_filts.to_string()); - } - 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"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// UE-MRDC-Capability ::= SEQUENCE -SRSASN_CODE ue_mrdc_cap_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_present, 1)); - HANDLE_CODE(bref.pack(phy_params_mrdc_v1530_present, 1)); - HANDLE_CODE(bref.pack(general_params_mrdc_present, 1)); - HANDLE_CODE(bref.pack(fdd_add_ue_mrdc_cap_present, 1)); - HANDLE_CODE(bref.pack(tdd_add_ue_mrdc_cap_present, 1)); - HANDLE_CODE(bref.pack(fr1_add_ue_mrdc_cap_present, 1)); - HANDLE_CODE(bref.pack(fr2_add_ue_mrdc_cap_present, 1)); - HANDLE_CODE(bref.pack(feature_set_combinations.size() > 0, 1)); - HANDLE_CODE(bref.pack(pdcp_params_mrdc_v1530_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (meas_and_mob_params_mrdc_present) { - HANDLE_CODE(meas_and_mob_params_mrdc.pack(bref)); - } - if (phy_params_mrdc_v1530_present) { - HANDLE_CODE(phy_params_mrdc_v1530.pack(bref)); - } - HANDLE_CODE(rf_params_mrdc.pack(bref)); - if (general_params_mrdc_present) { - HANDLE_CODE(general_params_mrdc.pack(bref)); - } - if (fdd_add_ue_mrdc_cap_present) { - HANDLE_CODE(fdd_add_ue_mrdc_cap.pack(bref)); - } - if (tdd_add_ue_mrdc_cap_present) { - HANDLE_CODE(tdd_add_ue_mrdc_cap.pack(bref)); - } - if (fr1_add_ue_mrdc_cap_present) { - HANDLE_CODE(fr1_add_ue_mrdc_cap.pack(bref)); - } - if (fr2_add_ue_mrdc_cap_present) { - HANDLE_CODE(fr2_add_ue_mrdc_cap.pack(bref)); - } - if (feature_set_combinations.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, - feature_set_combinations, - 1, - 1024, - SeqOfPacker>(1, 32, SeqOfPacker(1, 128, Packer())))); - } - if (pdcp_params_mrdc_v1530_present) { - HANDLE_CODE(pdcp_params_mrdc_v1530.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - 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 ue_mrdc_cap_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_present, 1)); - HANDLE_CODE(bref.unpack(phy_params_mrdc_v1530_present, 1)); - HANDLE_CODE(bref.unpack(general_params_mrdc_present, 1)); - HANDLE_CODE(bref.unpack(fdd_add_ue_mrdc_cap_present, 1)); - HANDLE_CODE(bref.unpack(tdd_add_ue_mrdc_cap_present, 1)); - HANDLE_CODE(bref.unpack(fr1_add_ue_mrdc_cap_present, 1)); - HANDLE_CODE(bref.unpack(fr2_add_ue_mrdc_cap_present, 1)); - bool feature_set_combinations_present; - HANDLE_CODE(bref.unpack(feature_set_combinations_present, 1)); - HANDLE_CODE(bref.unpack(pdcp_params_mrdc_v1530_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (meas_and_mob_params_mrdc_present) { - HANDLE_CODE(meas_and_mob_params_mrdc.unpack(bref)); - } - if (phy_params_mrdc_v1530_present) { - HANDLE_CODE(phy_params_mrdc_v1530.unpack(bref)); - } - HANDLE_CODE(rf_params_mrdc.unpack(bref)); - if (general_params_mrdc_present) { - HANDLE_CODE(general_params_mrdc.unpack(bref)); - } - if (fdd_add_ue_mrdc_cap_present) { - HANDLE_CODE(fdd_add_ue_mrdc_cap.unpack(bref)); - } - if (tdd_add_ue_mrdc_cap_present) { - HANDLE_CODE(tdd_add_ue_mrdc_cap.unpack(bref)); - } - if (fr1_add_ue_mrdc_cap_present) { - HANDLE_CODE(fr1_add_ue_mrdc_cap.unpack(bref)); - } - if (fr2_add_ue_mrdc_cap_present) { - HANDLE_CODE(fr2_add_ue_mrdc_cap.unpack(bref)); - } - if (feature_set_combinations_present) { - HANDLE_CODE(unpack_dyn_seq_of(feature_set_combinations, - bref, - 1, - 1024, - SeqOfPacker>(1, 32, SeqOfPacker(1, 128, Packer())))); - } - if (pdcp_params_mrdc_v1530_present) { - HANDLE_CODE(pdcp_params_mrdc_v1530.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 ue_mrdc_cap_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (meas_and_mob_params_mrdc_present) { - j.write_fieldname("measAndMobParametersMRDC"); - meas_and_mob_params_mrdc.to_json(j); - } - if (phy_params_mrdc_v1530_present) { - j.write_fieldname("phy-ParametersMRDC-v1530"); - phy_params_mrdc_v1530.to_json(j); - } - j.write_fieldname("rf-ParametersMRDC"); - rf_params_mrdc.to_json(j); - if (general_params_mrdc_present) { - j.write_fieldname("generalParametersMRDC"); - general_params_mrdc.to_json(j); - } - if (fdd_add_ue_mrdc_cap_present) { - j.write_fieldname("fdd-Add-UE-MRDC-Capabilities"); - fdd_add_ue_mrdc_cap.to_json(j); - } - if (tdd_add_ue_mrdc_cap_present) { - j.write_fieldname("tdd-Add-UE-MRDC-Capabilities"); - tdd_add_ue_mrdc_cap.to_json(j); - } - if (fr1_add_ue_mrdc_cap_present) { - j.write_fieldname("fr1-Add-UE-MRDC-Capabilities"); - fr1_add_ue_mrdc_cap.to_json(j); - } - if (fr2_add_ue_mrdc_cap_present) { - j.write_fieldname("fr2-Add-UE-MRDC-Capabilities"); - fr2_add_ue_mrdc_cap.to_json(j); - } - if (feature_set_combinations.size() > 0) { - j.start_array("featureSetCombinations"); - for (const auto& e1 : feature_set_combinations) { - j.start_array(); - for (const auto& e2 : e1) { - j.start_array(); - for (const auto& e3 : e2) { - e3.to_json(j); - } - j.end_array(); - } - j.end_array(); - } - j.end_array(); - } - if (pdcp_params_mrdc_v1530_present) { - j.write_fieldname("pdcp-ParametersMRDC-v1530"); - pdcp_params_mrdc_v1530.to_json(j); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// UE-MRDC-Capability-v15g0 ::= SEQUENCE -SRSASN_CODE ue_mrdc_cap_v15g0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(rf_params_mrdc_v15g0_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (rf_params_mrdc_v15g0_present) { - HANDLE_CODE(rf_params_mrdc_v15g0.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_mrdc_cap_v15g0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(rf_params_mrdc_v15g0_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (rf_params_mrdc_v15g0_present) { - HANDLE_CODE(rf_params_mrdc_v15g0.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_mrdc_cap_v15g0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (rf_params_mrdc_v15g0_present) { - j.write_fieldname("rf-ParametersMRDC-v15g0"); - rf_params_mrdc_v15g0.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -const char* high_speed_params_v1650_c::types_opts::to_string() const -{ - static const char* names[] = {"intraNR-MeasurementEnhancement-r16", "interRAT-MeasurementEnhancement-r16"}; - return convert_enum_idx(names, 2, value, "high_speed_params_v1650_c::types"); -} - -// UE-NR-Capability-v16c0 ::= SEQUENCE -SRSASN_CODE ue_nr_cap_v16c0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(rf_params_v16c0_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (rf_params_v16c0_present) { - HANDLE_CODE(rf_params_v16c0.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_nr_cap_v16c0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(rf_params_v16c0_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (rf_params_v16c0_present) { - HANDLE_CODE(rf_params_v16c0.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_nr_cap_v16c0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (rf_params_v16c0_present) { - j.write_fieldname("rf-Parameters-v16c0"); - rf_params_v16c0.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// UE-NR-Capability-v16a0 ::= SEQUENCE -SRSASN_CODE ue_nr_cap_v16a0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(phy_params_v16a0_present, 1)); - HANDLE_CODE(bref.pack(rf_params_v16a0_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (phy_params_v16a0_present) { - HANDLE_CODE(phy_params_v16a0.pack(bref)); - } - if (rf_params_v16a0_present) { - HANDLE_CODE(rf_params_v16a0.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_nr_cap_v16a0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(phy_params_v16a0_present, 1)); - HANDLE_CODE(bref.unpack(rf_params_v16a0_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (phy_params_v16a0_present) { - HANDLE_CODE(phy_params_v16a0.unpack(bref)); - } - if (rf_params_v16a0_present) { - HANDLE_CODE(rf_params_v16a0.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_nr_cap_v16a0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (phy_params_v16a0_present) { - j.write_fieldname("phy-Parameters-v16a0"); - phy_params_v16a0.to_json(j); - } - if (rf_params_v16a0_present) { - j.write_fieldname("rf-Parameters-v16a0"); - rf_params_v16a0.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// UE-NR-Capability-v15j0 ::= SEQUENCE -SRSASN_CODE ue_nr_cap_v15j0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (late_non_crit_ext.size() > 0) { - 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 ue_nr_cap_v15j0_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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 ue_nr_cap_v15j0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (late_non_crit_ext.size() > 0) { - 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-v15c0 ::= SEQUENCE -SRSASN_CODE nrdc_params_v15c0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(pdcp_dupl_split_srb_present, 1)); - HANDLE_CODE(bref.pack(pdcp_dupl_split_drb_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE nrdc_params_v15c0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(pdcp_dupl_split_srb_present, 1)); - HANDLE_CODE(bref.unpack(pdcp_dupl_split_drb_present, 1)); - - return SRSASN_SUCCESS; -} -void nrdc_params_v15c0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pdcp_dupl_split_srb_present) { - j.write_str("pdcp-DuplicationSplitSRB", "supported"); - } - if (pdcp_dupl_split_drb_present) { - j.write_str("pdcp-DuplicationSplitDRB", "supported"); - } - j.end_obj(); -} - -// UE-NR-Capability-v15g0 ::= SEQUENCE -SRSASN_CODE ue_nr_cap_v15g0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(rf_params_v15g0_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (rf_params_v15g0_present) { - HANDLE_CODE(rf_params_v15g0.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_nr_cap_v15g0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(rf_params_v15g0_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (rf_params_v15g0_present) { - HANDLE_CODE(rf_params_v15g0.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_nr_cap_v15g0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (rf_params_v15g0_present) { - j.write_fieldname("rf-Parameters-v15g0"); - rf_params_v15g0.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// UE-NR-Capability-v15c0 ::= SEQUENCE -SRSASN_CODE ue_nr_cap_v15c0_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(nrdc_params_v15c0_present, 1)); - HANDLE_CODE(bref.pack(partial_fr2_fallback_rx_req_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (nrdc_params_v15c0_present) { - HANDLE_CODE(nrdc_params_v15c0.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_nr_cap_v15c0_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(nrdc_params_v15c0_present, 1)); - HANDLE_CODE(bref.unpack(partial_fr2_fallback_rx_req_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (nrdc_params_v15c0_present) { - HANDLE_CODE(nrdc_params_v15c0.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_nr_cap_v15c0_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (nrdc_params_v15c0_present) { - j.write_fieldname("nrdc-Parameters-v15c0"); - nrdc_params_v15c0.to_json(j); - } - if (partial_fr2_fallback_rx_req_present) { - j.write_str("partialFR2-FallbackRX-Req", "true"); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// UECapabilityEnquiry-v1610-IEs ::= SEQUENCE -SRSASN_CODE ue_cap_enquiry_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(rrc_seg_allowed_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_cap_enquiry_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(rrc_seg_allowed_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - return SRSASN_SUCCESS; -} -void ue_cap_enquiry_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (rrc_seg_allowed_r16_present) { - j.write_str("rrc-SegAllowed-r16", "enabled"); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - 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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.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"); - non_crit_ext.to_json(j); - } - 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.size() > 0; - group_flags[0] |= source_scg_nr_cfg.size() > 0; - group_flags[0] |= source_scg_eutra_cfg.size() > 0; - group_flags[1] |= source_scg_cfg_present; - group_flags[2] |= sdt_cfg_r17.is_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.size() > 0, 1)); - HANDLE_CODE(bref.pack(source_scg_nr_cfg.size() > 0, 1)); - HANDLE_CODE(bref.pack(source_scg_eutra_cfg.size() > 0, 1)); - if (source_rb_sn_cfg.size() > 0) { - HANDLE_CODE(source_rb_sn_cfg.pack(bref)); - } - if (source_scg_nr_cfg.size() > 0) { - HANDLE_CODE(source_scg_nr_cfg.pack(bref)); - } - if (source_scg_eutra_cfg.size() > 0) { - 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_cfg_present, 1)); - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(sdt_cfg_r17.is_present(), 1)); - if (sdt_cfg_r17.is_present()) { - HANDLE_CODE(sdt_cfg_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -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(3); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - bool source_rb_sn_cfg_present; - HANDLE_CODE(bref.unpack(source_rb_sn_cfg_present, 1)); - bool source_scg_nr_cfg_present; - HANDLE_CODE(bref.unpack(source_scg_nr_cfg_present, 1)); - bool source_scg_eutra_cfg_present; - 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_cfg_present, 1)); - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(sdt_cfg_r17, bref); - if (sdt_cfg_r17.is_present()) { - HANDLE_CODE(sdt_cfg_r17->unpack(bref)); - } - } - } - 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.size() > 0) { - j.write_str("sourceRB-SN-Config", source_rb_sn_cfg.to_string()); - } - if (source_scg_nr_cfg.size() > 0) { - j.write_str("sourceSCG-NR-Config", source_scg_nr_cfg.to_string()); - } - if (source_scg_eutra_cfg.size() > 0) { - j.write_str("sourceSCG-EUTRA-Config", source_scg_eutra_cfg.to_string()); - } - if (source_scg_cfg_present) { - j.write_str("sourceSCG-Configured", "true"); - } - if (sdt_cfg_r17.is_present()) { - j.write_fieldname("sdt-Config-r17"); - sdt_cfg_r17->to_json(j); - } - } - j.end_obj(); -} - -// BandCombinationInfo ::= SEQUENCE -SRSASN_CODE band_combination_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, band_combination_idx, (uint32_t)1u, (uint32_t)65536u)); - HANDLE_CODE(pack_dyn_seq_of(bref, allowed_feature_sets_list, 1, 128, integer_packer(1, 128))); - - return SRSASN_SUCCESS; -} -SRSASN_CODE band_combination_info_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(band_combination_idx, bref, (uint32_t)1u, (uint32_t)65536u)); - HANDLE_CODE(unpack_dyn_seq_of(allowed_feature_sets_list, bref, 1, 128, integer_packer(1, 128))); - - return SRSASN_SUCCESS; -} -void band_combination_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("bandCombinationIndex", band_combination_idx); - j.start_array("allowedFeatureSetsList"); - for (const auto& e1 : allowed_feature_sets_list) { - j.write_int(e1); - } - j.end_array(); - j.end_obj(); -} - -// ReestabNCellInfo ::= SEQUENCE -SRSASN_CODE reestab_ncell_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(cell_id.pack(bref)); - HANDLE_CODE(key_g_node_b_star.pack(bref)); - HANDLE_CODE(short_mac_i.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE reestab_ncell_info_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(cell_id.unpack(bref)); - HANDLE_CODE(key_g_node_b_star.unpack(bref)); - HANDLE_CODE(short_mac_i.unpack(bref)); - - return SRSASN_SUCCESS; -} -void reestab_ncell_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("cellIdentity", cell_id.to_string()); - j.write_str("key-gNodeB-Star", key_g_node_b_star.to_string()); - j.write_str("shortMAC-I", short_mac_i.to_string()); - j.end_obj(); -} - -// T-Offset-r16 ::= ENUMERATED -const char* t_offset_r16_opts::to_string() const -{ - static const char* names[] = {"ms0dot5", "ms0dot75", "ms1", "ms1dot5", "ms2", "ms2dot5", "ms3", "spare1"}; - return convert_enum_idx(names, 8, value, "t_offset_r16_e"); -} -float t_offset_r16_opts::to_number() const -{ - static const float numbers[] = {0.5, 0.75, 1.0, 1.5, 2.0, 2.5, 3.0}; - return map_enum_number(numbers, 7, value, "t_offset_r16_e"); -} -const char* t_offset_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.5", "0.75", "1", "1.5", "2", "2.5", "3"}; - return convert_enum_idx(number_strs, 8, value, "t_offset_r16_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(); -} - -// ConfigRestrictInfoDAPS-r16 ::= SEQUENCE -SRSASN_CODE cfg_restrict_info_daps_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(pwr_coordination_r16_present, 1)); - - if (pwr_coordination_r16_present) { - HANDLE_CODE(pack_integer(bref, pwr_coordination_r16.p_daps_source_r16, (int8_t)-30, (int8_t)33)); - HANDLE_CODE(pack_integer(bref, pwr_coordination_r16.p_daps_target_r16, (int8_t)-30, (int8_t)33)); - HANDLE_CODE(pwr_coordination_r16.ul_pwr_sharing_daps_mode_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cfg_restrict_info_daps_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(pwr_coordination_r16_present, 1)); - - if (pwr_coordination_r16_present) { - HANDLE_CODE(unpack_integer(pwr_coordination_r16.p_daps_source_r16, bref, (int8_t)-30, (int8_t)33)); - HANDLE_CODE(unpack_integer(pwr_coordination_r16.p_daps_target_r16, bref, (int8_t)-30, (int8_t)33)); - HANDLE_CODE(pwr_coordination_r16.ul_pwr_sharing_daps_mode_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void cfg_restrict_info_daps_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pwr_coordination_r16_present) { - j.write_fieldname("powerCoordination-r16"); - j.start_obj(); - j.write_int("p-DAPS-Source-r16", pwr_coordination_r16.p_daps_source_r16); - j.write_int("p-DAPS-Target-r16", pwr_coordination_r16.p_daps_target_r16); - j.write_str("uplinkPowerSharingDAPS-Mode-r16", pwr_coordination_r16.ul_pwr_sharing_daps_mode_r16.to_string()); - j.end_obj(); - } - j.end_obj(); -} - -const char* cfg_restrict_info_daps_r16_s::pwr_coordination_r16_s_::ul_pwr_sharing_daps_mode_r16_opts::to_string() const -{ - static const char* names[] = {"semi-static-mode1", "semi-static-mode2", "dynamic"}; - return convert_enum_idx( - names, 3, value, "cfg_restrict_info_daps_r16_s::pwr_coordination_r16_s_::ul_pwr_sharing_daps_mode_r16_e_"); -} -uint8_t cfg_restrict_info_daps_r16_s::pwr_coordination_r16_s_::ul_pwr_sharing_daps_mode_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number( - numbers, 2, value, "cfg_restrict_info_daps_r16_s::pwr_coordination_r16_s_::ul_pwr_sharing_daps_mode_r16_e_"); -} - -// ConfigRestrictInfoDAPS-v1640 ::= SEQUENCE -SRSASN_CODE cfg_restrict_info_daps_v1640_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, source_feature_set_per_dl_cc_r16, (uint16_t)1u, (uint16_t)1024u)); - HANDLE_CODE(pack_integer(bref, source_feature_set_per_ul_cc_r16, (uint16_t)1u, (uint16_t)1024u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cfg_restrict_info_daps_v1640_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(source_feature_set_per_dl_cc_r16, bref, (uint16_t)1u, (uint16_t)1024u)); - HANDLE_CODE(unpack_integer(source_feature_set_per_ul_cc_r16, bref, (uint16_t)1u, (uint16_t)1024u)); - - return SRSASN_SUCCESS; -} -void cfg_restrict_info_daps_v1640_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("sourceFeatureSetPerDownlinkCC-r16", source_feature_set_per_dl_cc_r16); - j.write_int("sourceFeatureSetPerUplinkCC-r16", source_feature_set_per_ul_cc_r16); - j.end_obj(); -} - -// ConfigRestrictInfoSCG ::= SEQUENCE -SRSASN_CODE cfg_restrict_info_scg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(allowed_bc_list_mrdc.size() > 0, 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_present, 1)); - HANDLE_CODE(bref.pack(dummy_present, 1)); - - if (allowed_bc_list_mrdc.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, allowed_bc_list_mrdc, 1, 65536)); - } - if (pwr_coordination_fr1_present) { - HANDLE_CODE(bref.pack(pwr_coordination_fr1.p_max_nr_fr1_present, 1)); - HANDLE_CODE(bref.pack(pwr_coordination_fr1.p_max_eutra_present, 1)); - HANDLE_CODE(bref.pack(pwr_coordination_fr1.p_max_ue_fr1_present, 1)); - if (pwr_coordination_fr1.p_max_nr_fr1_present) { - HANDLE_CODE(pack_integer(bref, pwr_coordination_fr1.p_max_nr_fr1, (int8_t)-30, (int8_t)33)); - } - if (pwr_coordination_fr1.p_max_eutra_present) { - HANDLE_CODE(pack_integer(bref, pwr_coordination_fr1.p_max_eutra, (int8_t)-30, (int8_t)33)); - } - if (pwr_coordination_fr1.p_max_ue_fr1_present) { - HANDLE_CODE(pack_integer(bref, pwr_coordination_fr1.p_max_ue_fr1, (int8_t)-30, (int8_t)33)); - } - } - if (serv_cell_idx_range_scg_present) { - 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_present) { - HANDLE_CODE(pack_integer(bref, max_meas_freqs_scg, (uint8_t)1u, (uint8_t)32u)); - } - 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[2] |= p_max_nr_fr1_mcg_r16_present; - group_flags[2] |= pwr_coordination_fr2_r16.is_present(); - group_flags[2] |= nrdc_pc_mode_fr1_r16_present; - group_flags[2] |= nrdc_pc_mode_fr2_r16_present; - group_flags[2] |= max_meas_srs_res_scg_r16_present; - group_flags[2] |= max_meas_cli_res_scg_r16_present; - group_flags[2] |= max_num_ehc_contexts_sn_r16_present; - group_flags[2] |= allowed_reduced_cfg_for_overheat_r16.is_present(); - group_flags[2] |= max_toffset_r16_present; - group_flags[3] |= allowed_reduced_cfg_for_overheat_r17.is_present(); - group_flags[3] |= max_num_udc_drb_r17_present; - group_flags[3] |= max_num_cp_cc_andidates_r17_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)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(p_max_nr_fr1_mcg_r16_present, 1)); - HANDLE_CODE(bref.pack(pwr_coordination_fr2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(nrdc_pc_mode_fr1_r16_present, 1)); - HANDLE_CODE(bref.pack(nrdc_pc_mode_fr2_r16_present, 1)); - HANDLE_CODE(bref.pack(max_meas_srs_res_scg_r16_present, 1)); - HANDLE_CODE(bref.pack(max_meas_cli_res_scg_r16_present, 1)); - HANDLE_CODE(bref.pack(max_num_ehc_contexts_sn_r16_present, 1)); - HANDLE_CODE(bref.pack(allowed_reduced_cfg_for_overheat_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(max_toffset_r16_present, 1)); - if (p_max_nr_fr1_mcg_r16_present) { - HANDLE_CODE(pack_integer(bref, p_max_nr_fr1_mcg_r16, (int8_t)-30, (int8_t)33)); - } - if (pwr_coordination_fr2_r16.is_present()) { - HANDLE_CODE(bref.pack(pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16_present, 1)); - HANDLE_CODE(bref.pack(pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16_present, 1)); - HANDLE_CODE(bref.pack(pwr_coordination_fr2_r16->p_max_ue_fr2_r16_present, 1)); - if (pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16_present) { - HANDLE_CODE(pack_integer(bref, pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16, (int8_t)-30, (int8_t)33)); - } - if (pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16_present) { - HANDLE_CODE(pack_integer(bref, pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16, (int8_t)-30, (int8_t)33)); - } - if (pwr_coordination_fr2_r16->p_max_ue_fr2_r16_present) { - HANDLE_CODE(pack_integer(bref, pwr_coordination_fr2_r16->p_max_ue_fr2_r16, (int8_t)-30, (int8_t)33)); - } - } - if (nrdc_pc_mode_fr1_r16_present) { - HANDLE_CODE(nrdc_pc_mode_fr1_r16.pack(bref)); - } - if (nrdc_pc_mode_fr2_r16_present) { - HANDLE_CODE(nrdc_pc_mode_fr2_r16.pack(bref)); - } - if (max_meas_srs_res_scg_r16_present) { - HANDLE_CODE(pack_integer(bref, max_meas_srs_res_scg_r16, (uint8_t)0u, (uint8_t)32u)); - } - if (max_meas_cli_res_scg_r16_present) { - HANDLE_CODE(pack_integer(bref, max_meas_cli_res_scg_r16, (uint8_t)0u, (uint8_t)64u)); - } - if (max_num_ehc_contexts_sn_r16_present) { - HANDLE_CODE(pack_integer(bref, max_num_ehc_contexts_sn_r16, (uint32_t)0u, (uint32_t)65536u)); - } - if (allowed_reduced_cfg_for_overheat_r16.is_present()) { - HANDLE_CODE(allowed_reduced_cfg_for_overheat_r16->pack(bref)); - } - if (max_toffset_r16_present) { - HANDLE_CODE(max_toffset_r16.pack(bref)); - } - } - if (group_flags[3]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(allowed_reduced_cfg_for_overheat_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(max_num_udc_drb_r17_present, 1)); - HANDLE_CODE(bref.pack(max_num_cp_cc_andidates_r17_present, 1)); - if (allowed_reduced_cfg_for_overheat_r17.is_present()) { - HANDLE_CODE(allowed_reduced_cfg_for_overheat_r17->pack(bref)); - } - if (max_num_udc_drb_r17_present) { - HANDLE_CODE(pack_integer(bref, max_num_udc_drb_r17, (uint8_t)0u, (uint8_t)2u)); - } - if (max_num_cp_cc_andidates_r17_present) { - HANDLE_CODE(pack_integer(bref, max_num_cp_cc_andidates_r17, (uint8_t)0u, (uint8_t)7u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cfg_restrict_info_scg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool allowed_bc_list_mrdc_present; - 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_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)); - } - if (pwr_coordination_fr1_present) { - HANDLE_CODE(bref.unpack(pwr_coordination_fr1.p_max_nr_fr1_present, 1)); - HANDLE_CODE(bref.unpack(pwr_coordination_fr1.p_max_eutra_present, 1)); - HANDLE_CODE(bref.unpack(pwr_coordination_fr1.p_max_ue_fr1_present, 1)); - if (pwr_coordination_fr1.p_max_nr_fr1_present) { - HANDLE_CODE(unpack_integer(pwr_coordination_fr1.p_max_nr_fr1, bref, (int8_t)-30, (int8_t)33)); - } - if (pwr_coordination_fr1.p_max_eutra_present) { - HANDLE_CODE(unpack_integer(pwr_coordination_fr1.p_max_eutra, bref, (int8_t)-30, (int8_t)33)); - } - if (pwr_coordination_fr1.p_max_ue_fr1_present) { - HANDLE_CODE(unpack_integer(pwr_coordination_fr1.p_max_ue_fr1, bref, (int8_t)-30, (int8_t)33)); - } - } - if (serv_cell_idx_range_scg_present) { - 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_present) { - HANDLE_CODE(unpack_integer(max_meas_freqs_scg, bref, (uint8_t)1u, (uint8_t)32u)); - } - if (dummy_present) { - HANDLE_CODE(unpack_integer(dummy, bref, (uint8_t)1u, (uint8_t)62u)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(4); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(sel_band_entries_mn_list, bref); - 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)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(p_max_nr_fr1_mcg_r16_present, 1)); - unpack_presence_flag(pwr_coordination_fr2_r16, bref); - HANDLE_CODE(bref.unpack(nrdc_pc_mode_fr1_r16_present, 1)); - HANDLE_CODE(bref.unpack(nrdc_pc_mode_fr2_r16_present, 1)); - HANDLE_CODE(bref.unpack(max_meas_srs_res_scg_r16_present, 1)); - HANDLE_CODE(bref.unpack(max_meas_cli_res_scg_r16_present, 1)); - HANDLE_CODE(bref.unpack(max_num_ehc_contexts_sn_r16_present, 1)); - unpack_presence_flag(allowed_reduced_cfg_for_overheat_r16, bref); - HANDLE_CODE(bref.unpack(max_toffset_r16_present, 1)); - if (p_max_nr_fr1_mcg_r16_present) { - HANDLE_CODE(unpack_integer(p_max_nr_fr1_mcg_r16, bref, (int8_t)-30, (int8_t)33)); - } - if (pwr_coordination_fr2_r16.is_present()) { - HANDLE_CODE(bref.unpack(pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16_present, 1)); - HANDLE_CODE(bref.unpack(pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16_present, 1)); - HANDLE_CODE(bref.unpack(pwr_coordination_fr2_r16->p_max_ue_fr2_r16_present, 1)); - if (pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16_present) { - HANDLE_CODE(unpack_integer(pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16, bref, (int8_t)-30, (int8_t)33)); - } - if (pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16_present) { - HANDLE_CODE(unpack_integer(pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16, bref, (int8_t)-30, (int8_t)33)); - } - if (pwr_coordination_fr2_r16->p_max_ue_fr2_r16_present) { - HANDLE_CODE(unpack_integer(pwr_coordination_fr2_r16->p_max_ue_fr2_r16, bref, (int8_t)-30, (int8_t)33)); - } - } - if (nrdc_pc_mode_fr1_r16_present) { - HANDLE_CODE(nrdc_pc_mode_fr1_r16.unpack(bref)); - } - if (nrdc_pc_mode_fr2_r16_present) { - HANDLE_CODE(nrdc_pc_mode_fr2_r16.unpack(bref)); - } - if (max_meas_srs_res_scg_r16_present) { - HANDLE_CODE(unpack_integer(max_meas_srs_res_scg_r16, bref, (uint8_t)0u, (uint8_t)32u)); - } - if (max_meas_cli_res_scg_r16_present) { - HANDLE_CODE(unpack_integer(max_meas_cli_res_scg_r16, bref, (uint8_t)0u, (uint8_t)64u)); - } - if (max_num_ehc_contexts_sn_r16_present) { - HANDLE_CODE(unpack_integer(max_num_ehc_contexts_sn_r16, bref, (uint32_t)0u, (uint32_t)65536u)); - } - if (allowed_reduced_cfg_for_overheat_r16.is_present()) { - HANDLE_CODE(allowed_reduced_cfg_for_overheat_r16->unpack(bref)); - } - if (max_toffset_r16_present) { - HANDLE_CODE(max_toffset_r16.unpack(bref)); - } - } - if (group_flags[3]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(allowed_reduced_cfg_for_overheat_r17, bref); - HANDLE_CODE(bref.unpack(max_num_udc_drb_r17_present, 1)); - HANDLE_CODE(bref.unpack(max_num_cp_cc_andidates_r17_present, 1)); - if (allowed_reduced_cfg_for_overheat_r17.is_present()) { - HANDLE_CODE(allowed_reduced_cfg_for_overheat_r17->unpack(bref)); - } - if (max_num_udc_drb_r17_present) { - HANDLE_CODE(unpack_integer(max_num_udc_drb_r17, bref, (uint8_t)0u, (uint8_t)2u)); - } - if (max_num_cp_cc_andidates_r17_present) { - HANDLE_CODE(unpack_integer(max_num_cp_cc_andidates_r17, bref, (uint8_t)0u, (uint8_t)7u)); - } - } - } - return SRSASN_SUCCESS; -} -void cfg_restrict_info_scg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (allowed_bc_list_mrdc.size() > 0) { - j.start_array("allowedBC-ListMRDC"); - for (const auto& e1 : allowed_bc_list_mrdc) { - e1.to_json(j); - } - j.end_array(); - } - if (pwr_coordination_fr1_present) { - j.write_fieldname("powerCoordination-FR1"); - j.start_obj(); - if (pwr_coordination_fr1.p_max_nr_fr1_present) { - j.write_int("p-maxNR-FR1", pwr_coordination_fr1.p_max_nr_fr1); - } - if (pwr_coordination_fr1.p_max_eutra_present) { - j.write_int("p-maxEUTRA", pwr_coordination_fr1.p_max_eutra); - } - if (pwr_coordination_fr1.p_max_ue_fr1_present) { - j.write_int("p-maxUE-FR1", pwr_coordination_fr1.p_max_ue_fr1); - } - j.end_obj(); - } - if (serv_cell_idx_range_scg_present) { - j.write_fieldname("servCellIndexRangeSCG"); - j.start_obj(); - j.write_int("lowBound", serv_cell_idx_range_scg.low_bound); - j.write_int("upBound", serv_cell_idx_range_scg.up_bound); - j.end_obj(); - } - if (max_meas_freqs_scg_present) { - j.write_int("maxMeasFreqsSCG", max_meas_freqs_scg); - } - 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); - } - if (p_max_nr_fr1_mcg_r16_present) { - j.write_int("p-maxNR-FR1-MCG-r16", p_max_nr_fr1_mcg_r16); - } - if (pwr_coordination_fr2_r16.is_present()) { - j.write_fieldname("powerCoordination-FR2-r16"); - j.start_obj(); - if (pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16_present) { - j.write_int("p-maxNR-FR2-MCG-r16", pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16); - } - if (pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16_present) { - j.write_int("p-maxNR-FR2-SCG-r16", pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16); - } - if (pwr_coordination_fr2_r16->p_max_ue_fr2_r16_present) { - j.write_int("p-maxUE-FR2-r16", pwr_coordination_fr2_r16->p_max_ue_fr2_r16); - } - j.end_obj(); - } - if (nrdc_pc_mode_fr1_r16_present) { - j.write_str("nrdc-PC-mode-FR1-r16", nrdc_pc_mode_fr1_r16.to_string()); - } - if (nrdc_pc_mode_fr2_r16_present) { - j.write_str("nrdc-PC-mode-FR2-r16", nrdc_pc_mode_fr2_r16.to_string()); - } - if (max_meas_srs_res_scg_r16_present) { - j.write_int("maxMeasSRS-ResourceSCG-r16", max_meas_srs_res_scg_r16); - } - if (max_meas_cli_res_scg_r16_present) { - j.write_int("maxMeasCLI-ResourceSCG-r16", max_meas_cli_res_scg_r16); - } - if (max_num_ehc_contexts_sn_r16_present) { - j.write_int("maxNumberEHC-ContextsSN-r16", max_num_ehc_contexts_sn_r16); - } - if (allowed_reduced_cfg_for_overheat_r16.is_present()) { - j.write_fieldname("allowedReducedConfigForOverheating-r16"); - allowed_reduced_cfg_for_overheat_r16->to_json(j); - } - if (max_toffset_r16_present) { - j.write_str("maxToffset-r16", max_toffset_r16.to_string()); - } - if (allowed_reduced_cfg_for_overheat_r17.is_present()) { - j.write_fieldname("allowedReducedConfigForOverheating-r17"); - allowed_reduced_cfg_for_overheat_r17->to_json(j); - } - if (max_num_udc_drb_r17_present) { - j.write_int("maxNumberUDC-DRB-r17", max_num_udc_drb_r17); - } - if (max_num_cp_cc_andidates_r17_present) { - j.write_int("maxNumberCPCCandidates-r17", max_num_cp_cc_andidates_r17); - } - } - j.end_obj(); -} - -const char* cfg_restrict_info_scg_s::nrdc_pc_mode_fr1_r16_opts::to_string() const -{ - static const char* names[] = {"semi-static-mode1", "semi-static-mode2", "dynamic"}; - return convert_enum_idx(names, 3, value, "cfg_restrict_info_scg_s::nrdc_pc_mode_fr1_r16_e_"); -} -uint8_t cfg_restrict_info_scg_s::nrdc_pc_mode_fr1_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "cfg_restrict_info_scg_s::nrdc_pc_mode_fr1_r16_e_"); -} - -const char* cfg_restrict_info_scg_s::nrdc_pc_mode_fr2_r16_opts::to_string() const -{ - static const char* names[] = {"semi-static-mode1", "semi-static-mode2", "dynamic"}; - return convert_enum_idx(names, 3, value, "cfg_restrict_info_scg_s::nrdc_pc_mode_fr2_r16_e_"); -} -uint8_t cfg_restrict_info_scg_s::nrdc_pc_mode_fr2_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "cfg_restrict_info_scg_s::nrdc_pc_mode_fr2_r16_e_"); -} - -// ReestablishmentInfo ::= SEQUENCE -SRSASN_CODE reest_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(add_reestab_info_list.size() > 0, 1)); - - HANDLE_CODE(pack_integer(bref, source_pci, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(target_cell_short_mac_i.pack(bref)); - if (add_reestab_info_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, add_reestab_info_list, 1, 32)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE reest_info_s::unpack(cbit_ref& bref) -{ - bool add_reestab_info_list_present; - HANDLE_CODE(bref.unpack(add_reestab_info_list_present, 1)); - - HANDLE_CODE(unpack_integer(source_pci, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(target_cell_short_mac_i.unpack(bref)); - if (add_reestab_info_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(add_reestab_info_list, bref, 1, 32)); - } - - return SRSASN_SUCCESS; -} -void reest_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("sourcePhysCellId", source_pci); - j.write_str("targetCellShortMAC-I", target_cell_short_mac_i.to_string()); - if (add_reestab_info_list.size() > 0) { - j.start_array("additionalReestabInfoList"); - for (const auto& e1 : add_reestab_info_list) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// AS-Context ::= SEQUENCE -SRSASN_CODE as_context_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(reest_info_present, 1)); - HANDLE_CODE(bref.pack(cfg_restrict_info_present, 1)); - - if (reest_info_present) { - HANDLE_CODE(reest_info.pack(bref)); - } - if (cfg_restrict_info_present) { - HANDLE_CODE(cfg_restrict_info.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= ran_notif_area_info.is_present(); - group_flags[1] |= ue_assist_info.size() > 0; - group_flags[2] |= sel_band_combination_sn.is_present(); - group_flags[3] |= cfg_restrict_info_daps_r16.is_present(); - group_flags[3] |= sidelink_ue_info_nr_r16.size() > 0; - group_flags[3] |= sidelink_ue_info_eutra_r16.size() > 0; - group_flags[3] |= ue_assist_info_eutra_r16.size() > 0; - group_flags[3] |= ue_assist_info_scg_r16.size() > 0; - group_flags[3] |= need_for_gaps_info_nr_r16.is_present(); - group_flags[4] |= cfg_restrict_info_daps_v1640.is_present(); - group_flags[5] |= need_for_gap_ncsg_info_nr_r17.is_present(); - group_flags[5] |= need_for_gap_ncsg_info_eutra_r17.is_present(); - group_flags[5] |= mbs_interest_ind_r17.size() > 0; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ran_notif_area_info.is_present(), 1)); - if (ran_notif_area_info.is_present()) { - HANDLE_CODE(ran_notif_area_info->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ue_assist_info.size() > 0, 1)); - if (ue_assist_info.size() > 0) { - 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)); - } - } - if (group_flags[3]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(cfg_restrict_info_daps_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(sidelink_ue_info_nr_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sidelink_ue_info_eutra_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(ue_assist_info_eutra_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(ue_assist_info_scg_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(need_for_gaps_info_nr_r16.is_present(), 1)); - if (cfg_restrict_info_daps_r16.is_present()) { - HANDLE_CODE(cfg_restrict_info_daps_r16->pack(bref)); - } - if (sidelink_ue_info_nr_r16.size() > 0) { - HANDLE_CODE(sidelink_ue_info_nr_r16.pack(bref)); - } - if (sidelink_ue_info_eutra_r16.size() > 0) { - HANDLE_CODE(sidelink_ue_info_eutra_r16.pack(bref)); - } - if (ue_assist_info_eutra_r16.size() > 0) { - HANDLE_CODE(ue_assist_info_eutra_r16.pack(bref)); - } - if (ue_assist_info_scg_r16.size() > 0) { - HANDLE_CODE(ue_assist_info_scg_r16.pack(bref)); - } - if (need_for_gaps_info_nr_r16.is_present()) { - HANDLE_CODE(need_for_gaps_info_nr_r16->pack(bref)); - } - } - if (group_flags[4]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(cfg_restrict_info_daps_v1640.is_present(), 1)); - if (cfg_restrict_info_daps_v1640.is_present()) { - HANDLE_CODE(cfg_restrict_info_daps_v1640->pack(bref)); - } - } - if (group_flags[5]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(need_for_gap_ncsg_info_nr_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(need_for_gap_ncsg_info_eutra_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(mbs_interest_ind_r17.size() > 0, 1)); - if (need_for_gap_ncsg_info_nr_r17.is_present()) { - HANDLE_CODE(need_for_gap_ncsg_info_nr_r17->pack(bref)); - } - if (need_for_gap_ncsg_info_eutra_r17.is_present()) { - HANDLE_CODE(need_for_gap_ncsg_info_eutra_r17->pack(bref)); - } - if (mbs_interest_ind_r17.size() > 0) { - HANDLE_CODE(mbs_interest_ind_r17.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE as_context_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(reest_info_present, 1)); - HANDLE_CODE(bref.unpack(cfg_restrict_info_present, 1)); - - if (reest_info_present) { - HANDLE_CODE(reest_info.unpack(bref)); - } - if (cfg_restrict_info_present) { - HANDLE_CODE(cfg_restrict_info.unpack(bref)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(6); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(ran_notif_area_info, bref); - if (ran_notif_area_info.is_present()) { - HANDLE_CODE(ran_notif_area_info->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - bool ue_assist_info_present; - HANDLE_CODE(bref.unpack(ue_assist_info_present, 1)); - if (ue_assist_info_present) { - HANDLE_CODE(ue_assist_info.unpack(bref)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(sel_band_combination_sn, bref); - if (sel_band_combination_sn.is_present()) { - HANDLE_CODE(sel_band_combination_sn->unpack(bref)); - } - } - if (group_flags[3]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(cfg_restrict_info_daps_r16, bref); - bool sidelink_ue_info_nr_r16_present; - HANDLE_CODE(bref.unpack(sidelink_ue_info_nr_r16_present, 1)); - bool sidelink_ue_info_eutra_r16_present; - HANDLE_CODE(bref.unpack(sidelink_ue_info_eutra_r16_present, 1)); - bool ue_assist_info_eutra_r16_present; - HANDLE_CODE(bref.unpack(ue_assist_info_eutra_r16_present, 1)); - bool ue_assist_info_scg_r16_present; - HANDLE_CODE(bref.unpack(ue_assist_info_scg_r16_present, 1)); - unpack_presence_flag(need_for_gaps_info_nr_r16, bref); - if (cfg_restrict_info_daps_r16.is_present()) { - HANDLE_CODE(cfg_restrict_info_daps_r16->unpack(bref)); - } - if (sidelink_ue_info_nr_r16_present) { - HANDLE_CODE(sidelink_ue_info_nr_r16.unpack(bref)); - } - if (sidelink_ue_info_eutra_r16_present) { - HANDLE_CODE(sidelink_ue_info_eutra_r16.unpack(bref)); - } - if (ue_assist_info_eutra_r16_present) { - HANDLE_CODE(ue_assist_info_eutra_r16.unpack(bref)); - } - if (ue_assist_info_scg_r16_present) { - HANDLE_CODE(ue_assist_info_scg_r16.unpack(bref)); - } - if (need_for_gaps_info_nr_r16.is_present()) { - HANDLE_CODE(need_for_gaps_info_nr_r16->unpack(bref)); - } - } - if (group_flags[4]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(cfg_restrict_info_daps_v1640, bref); - if (cfg_restrict_info_daps_v1640.is_present()) { - HANDLE_CODE(cfg_restrict_info_daps_v1640->unpack(bref)); - } - } - if (group_flags[5]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(need_for_gap_ncsg_info_nr_r17, bref); - unpack_presence_flag(need_for_gap_ncsg_info_eutra_r17, bref); - bool mbs_interest_ind_r17_present; - HANDLE_CODE(bref.unpack(mbs_interest_ind_r17_present, 1)); - if (need_for_gap_ncsg_info_nr_r17.is_present()) { - HANDLE_CODE(need_for_gap_ncsg_info_nr_r17->unpack(bref)); - } - if (need_for_gap_ncsg_info_eutra_r17.is_present()) { - HANDLE_CODE(need_for_gap_ncsg_info_eutra_r17->unpack(bref)); - } - if (mbs_interest_ind_r17_present) { - HANDLE_CODE(mbs_interest_ind_r17.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void as_context_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (reest_info_present) { - j.write_fieldname("reestablishmentInfo"); - reest_info.to_json(j); - } - if (cfg_restrict_info_present) { - j.write_fieldname("configRestrictInfo"); - cfg_restrict_info.to_json(j); - } - if (ext) { - if (ran_notif_area_info.is_present()) { - j.write_fieldname("ran-NotificationAreaInfo"); - ran_notif_area_info->to_json(j); - } - if (ue_assist_info.size() > 0) { - 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); - } - if (cfg_restrict_info_daps_r16.is_present()) { - j.write_fieldname("configRestrictInfoDAPS-r16"); - cfg_restrict_info_daps_r16->to_json(j); - } - if (sidelink_ue_info_nr_r16.size() > 0) { - j.write_str("sidelinkUEInformationNR-r16", sidelink_ue_info_nr_r16.to_string()); - } - if (sidelink_ue_info_eutra_r16.size() > 0) { - j.write_str("sidelinkUEInformationEUTRA-r16", sidelink_ue_info_eutra_r16.to_string()); - } - if (ue_assist_info_eutra_r16.size() > 0) { - j.write_str("ueAssistanceInformationEUTRA-r16", ue_assist_info_eutra_r16.to_string()); - } - if (ue_assist_info_scg_r16.size() > 0) { - j.write_str("ueAssistanceInformationSCG-r16", ue_assist_info_scg_r16.to_string()); - } - if (need_for_gaps_info_nr_r16.is_present()) { - j.write_fieldname("needForGapsInfoNR-r16"); - need_for_gaps_info_nr_r16->to_json(j); - } - if (cfg_restrict_info_daps_v1640.is_present()) { - j.write_fieldname("configRestrictInfoDAPS-v1640"); - cfg_restrict_info_daps_v1640->to_json(j); - } - if (need_for_gap_ncsg_info_nr_r17.is_present()) { - j.write_fieldname("needForGapNCSG-InfoNR-r17"); - need_for_gap_ncsg_info_nr_r17->to_json(j); - } - if (need_for_gap_ncsg_info_eutra_r17.is_present()) { - j.write_fieldname("needForGapNCSG-InfoEUTRA-r17"); - need_for_gap_ncsg_info_eutra_r17->to_json(j); - } - if (mbs_interest_ind_r17.size() > 0) { - j.write_str("mbsInterestIndication-r17", mbs_interest_ind_r17.to_string()); - } - } - j.end_obj(); -} - -// VictimSystemType ::= SEQUENCE -SRSASN_CODE victim_sys_type_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(gps_present, 1)); - HANDLE_CODE(bref.pack(glonass_present, 1)); - HANDLE_CODE(bref.pack(bds_present, 1)); - HANDLE_CODE(bref.pack(galileo_present, 1)); - HANDLE_CODE(bref.pack(wlan_present, 1)); - HANDLE_CODE(bref.pack(bluetooth_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE victim_sys_type_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(gps_present, 1)); - HANDLE_CODE(bref.unpack(glonass_present, 1)); - HANDLE_CODE(bref.unpack(bds_present, 1)); - HANDLE_CODE(bref.unpack(galileo_present, 1)); - HANDLE_CODE(bref.unpack(wlan_present, 1)); - HANDLE_CODE(bref.unpack(bluetooth_present, 1)); - - return SRSASN_SUCCESS; -} -void victim_sys_type_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (gps_present) { - j.write_str("gps", "true"); - } - if (glonass_present) { - j.write_str("glonass", "true"); - } - if (bds_present) { - j.write_str("bds", "true"); - } - if (galileo_present) { - j.write_str("galileo", "true"); - } - if (wlan_present) { - j.write_str("wlan", "true"); - } - if (bluetooth_present) { - j.write_str("bluetooth", "true"); - } - j.end_obj(); -} - -// AffectedCarrierFreqCombInfoMRDC ::= SEQUENCE -SRSASN_CODE affected_carrier_freq_comb_info_mrdc_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(affected_carrier_freq_comb_mrdc_present, 1)); - - HANDLE_CODE(victim_sys_type.pack(bref)); - HANDLE_CODE(interference_direction_mrdc.pack(bref)); - if (affected_carrier_freq_comb_mrdc_present) { - HANDLE_CODE(bref.pack(affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra.size() > 0, 1)); - if (affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, - affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra, - 1, - 32, - integer_packer(0, 262143))); - } - HANDLE_CODE(pack_dyn_seq_of(bref, - affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_nr, - 1, - 32, - integer_packer(0, 3279165))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE affected_carrier_freq_comb_info_mrdc_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(affected_carrier_freq_comb_mrdc_present, 1)); - - HANDLE_CODE(victim_sys_type.unpack(bref)); - HANDLE_CODE(interference_direction_mrdc.unpack(bref)); - if (affected_carrier_freq_comb_mrdc_present) { - bool affected_carrier_freq_comb_eutra_present; - HANDLE_CODE(bref.unpack(affected_carrier_freq_comb_eutra_present, 1)); - if (affected_carrier_freq_comb_eutra_present) { - HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra, - bref, - 1, - 32, - integer_packer(0, 262143))); - } - HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_nr, - bref, - 1, - 32, - integer_packer(0, 3279165))); - } - - return SRSASN_SUCCESS; -} -void affected_carrier_freq_comb_info_mrdc_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("victimSystemType"); - victim_sys_type.to_json(j); - j.write_str("interferenceDirectionMRDC", interference_direction_mrdc.to_string()); - if (affected_carrier_freq_comb_mrdc_present) { - j.write_fieldname("affectedCarrierFreqCombMRDC"); - j.start_obj(); - if (affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra.size() > 0) { - j.start_array("affectedCarrierFreqCombEUTRA"); - for (const auto& e1 : affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra) { - j.write_int(e1); - } - j.end_array(); - } - j.start_array("affectedCarrierFreqCombNR"); - for (const auto& e1 : affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_nr) { - j.write_int(e1); - } - j.end_array(); - j.end_obj(); - } - j.end_obj(); -} - -const char* affected_carrier_freq_comb_info_mrdc_s::interference_direction_mrdc_opts::to_string() const -{ - static const char* names[] = {"eutra-nr", "nr", "other", "utra-nr-other", "nr-other", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "affected_carrier_freq_comb_info_mrdc_s::interference_direction_mrdc_e_"); -} - -// CG-CandidateInfoId-r17 ::= SEQUENCE -SRSASN_CODE cg_candidate_info_id_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, ssb_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(pack_integer(bref, pci_r17, (uint16_t)0u, (uint16_t)1007u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_candidate_info_id_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(ssb_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(unpack_integer(pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); - - return SRSASN_SUCCESS; -} -void cg_candidate_info_id_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("ssbFrequency-r17", ssb_freq_r17); - j.write_int("physCellId-r17", pci_r17); - j.end_obj(); -} - -// CG-CandidateInfo-r17 ::= SEQUENCE -SRSASN_CODE cg_candidate_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(cg_candidate_info_id_r17.pack(bref)); - HANDLE_CODE(candidate_cg_cfg_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_candidate_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(cg_candidate_info_id_r17.unpack(bref)); - HANDLE_CODE(candidate_cg_cfg_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void cg_candidate_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("cg-CandidateInfoId-r17"); - cg_candidate_info_id_r17.to_json(j); - j.write_str("candidateCG-Config-r17", candidate_cg_cfg_r17.to_string()); - j.end_obj(); -} - -// CG-CandidateList-r17-IEs ::= SEQUENCE -SRSASN_CODE cg_candidate_list_r17_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(cg_candidate_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(cg_candidate_to_release_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (cg_candidate_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cg_candidate_to_add_mod_list_r17, 1, 8)); - } - if (cg_candidate_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cg_candidate_to_release_list_r17, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_candidate_list_r17_ies_s::unpack(cbit_ref& bref) -{ - bool cg_candidate_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(cg_candidate_to_add_mod_list_r17_present, 1)); - bool cg_candidate_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(cg_candidate_to_release_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (cg_candidate_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(cg_candidate_to_add_mod_list_r17, bref, 1, 8)); - } - if (cg_candidate_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(cg_candidate_to_release_list_r17, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -void cg_candidate_list_r17_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (cg_candidate_to_add_mod_list_r17.size() > 0) { - j.start_array("cg-CandidateToAddModList-r17"); - for (const auto& e1 : cg_candidate_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (cg_candidate_to_release_list_r17.size() > 0) { - j.start_array("cg-CandidateToReleaseList-r17"); - for (const auto& e1 : cg_candidate_to_release_list_r17) { - 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(); -} - -// CG-CandidateList ::= SEQUENCE -SRSASN_CODE cg_candidate_list_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_candidate_list_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void cg_candidate_list_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void cg_candidate_list_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -cg_candidate_list_s::crit_exts_c_::c1_c_& cg_candidate_list_s::crit_exts_c_::set_c1() -{ - set(types::c1); - return c; -} -void cg_candidate_list_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void cg_candidate_list_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "cg_candidate_list_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE cg_candidate_list_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::c1: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "cg_candidate_list_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_candidate_list_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "cg_candidate_list_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void cg_candidate_list_s::crit_exts_c_::c1_c_::set(types::options e) -{ - type_ = e; -} -cg_candidate_list_r17_ies_s& cg_candidate_list_s::crit_exts_c_::c1_c_::set_cg_candidate_list_r17() -{ - set(types::cg_candidate_list_r17); - return c; -} -void cg_candidate_list_s::crit_exts_c_::c1_c_::set_spare3() -{ - set(types::spare3); -} -void cg_candidate_list_s::crit_exts_c_::c1_c_::set_spare2() -{ - set(types::spare2); -} -void cg_candidate_list_s::crit_exts_c_::c1_c_::set_spare1() -{ - set(types::spare1); -} -void cg_candidate_list_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::cg_candidate_list_r17: - j.write_fieldname("cg-CandidateList-r17"); - c.to_json(j); - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "cg_candidate_list_s::crit_exts_c_::c1_c_"); - } - j.end_obj(); -} -SRSASN_CODE cg_candidate_list_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cg_candidate_list_r17: - HANDLE_CODE(c.pack(bref)); - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "cg_candidate_list_s::crit_exts_c_::c1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_candidate_list_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cg_candidate_list_r17: - HANDLE_CODE(c.unpack(bref)); - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "cg_candidate_list_s::crit_exts_c_::c1_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* cg_candidate_list_s::crit_exts_c_::c1_c_::types_opts::to_string() const -{ - static const char* names[] = {"cg-CandidateList-r17", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "cg_candidate_list_s::crit_exts_c_::c1_c_::types"); -} - -const char* cg_candidate_list_s::crit_exts_c_::types_opts::to_string() const -{ - static const char* names[] = {"c1", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "cg_candidate_list_s::crit_exts_c_::types"); -} -uint8_t cg_candidate_list_s::crit_exts_c_::types_opts::to_number() const -{ - static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "cg_candidate_list_s::crit_exts_c_::types"); -} - -// CandidateCell-r17 ::= SEQUENCE -SRSASN_CODE candidate_cell_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(cond_execution_cond_scg_r17.size() > 0, 1)); - - HANDLE_CODE(pack_integer(bref, pci_r17, (uint16_t)0u, (uint16_t)1007u)); - if (cond_execution_cond_scg_r17.size() > 0) { - HANDLE_CODE(cond_execution_cond_scg_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE candidate_cell_r17_s::unpack(cbit_ref& bref) -{ - bool cond_execution_cond_scg_r17_present; - HANDLE_CODE(bref.unpack(cond_execution_cond_scg_r17_present, 1)); - - HANDLE_CODE(unpack_integer(pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); - if (cond_execution_cond_scg_r17_present) { - HANDLE_CODE(cond_execution_cond_scg_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void candidate_cell_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("physCellId-r17", pci_r17); - if (cond_execution_cond_scg_r17.size() > 0) { - j.write_str("condExecutionCondSCG-r17", cond_execution_cond_scg_r17.to_string()); - } - j.end_obj(); -} - -// CandidateCellInfo-r17 ::= SEQUENCE -SRSASN_CODE candidate_cell_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, ssb_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(pack_dyn_seq_of(bref, candidate_list_r17, 1, 8)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE candidate_cell_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(ssb_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(unpack_dyn_seq_of(candidate_list_r17, bref, 1, 8)); - - return SRSASN_SUCCESS; -} -void candidate_cell_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("ssbFrequency-r17", ssb_freq_r17); - j.start_array("candidateList-r17"); - for (const auto& e1 : candidate_list_r17) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// FrequencyConfig-NR-r16 ::= SEQUENCE -SRSASN_CODE freq_cfg_nr_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, freq_band_ind_nr_r16, (uint16_t)1u, (uint16_t)1024u)); - HANDLE_CODE(pack_integer(bref, carrier_center_freq_nr_r16, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(pack_integer(bref, carrier_bw_nr_r16, (uint16_t)1u, (uint16_t)275u)); - HANDLE_CODE(subcarrier_spacing_nr_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE freq_cfg_nr_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(freq_band_ind_nr_r16, bref, (uint16_t)1u, (uint16_t)1024u)); - HANDLE_CODE(unpack_integer(carrier_center_freq_nr_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(unpack_integer(carrier_bw_nr_r16, bref, (uint16_t)1u, (uint16_t)275u)); - HANDLE_CODE(subcarrier_spacing_nr_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void freq_cfg_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("freqBandIndicatorNR-r16", freq_band_ind_nr_r16); - j.write_int("carrierCenterFreq-NR-r16", carrier_center_freq_nr_r16); - j.write_int("carrierBandwidth-NR-r16", carrier_bw_nr_r16); - j.write_str("subcarrierSpacing-NR-r16", subcarrier_spacing_nr_r16.to_string()); - j.end_obj(); -} - -// TransmissionBandwidth-EUTRA-r16 ::= ENUMERATED -const char* tx_bw_eutra_r16_opts::to_string() const -{ - static const char* names[] = {"rb6", "rb15", "rb25", "rb50", "rb75", "rb100"}; - return convert_enum_idx(names, 6, value, "tx_bw_eutra_r16_e"); -} -uint8_t tx_bw_eutra_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {6, 15, 25, 50, 75, 100}; - return map_enum_number(numbers, 6, value, "tx_bw_eutra_r16_e"); -} - -// CG-Config-v1730-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_v1730_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(fr1_carriers_scg_r17_present, 1)); - HANDLE_CODE(bref.pack(fr2_carriers_scg_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (fr1_carriers_scg_r17_present) { - HANDLE_CODE(pack_integer(bref, fr1_carriers_scg_r17, (uint8_t)1u, (uint8_t)32u)); - } - if (fr2_carriers_scg_r17_present) { - HANDLE_CODE(pack_integer(bref, fr2_carriers_scg_r17, (uint8_t)1u, (uint8_t)32u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_cfg_v1730_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(fr1_carriers_scg_r17_present, 1)); - HANDLE_CODE(bref.unpack(fr2_carriers_scg_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (fr1_carriers_scg_r17_present) { - HANDLE_CODE(unpack_integer(fr1_carriers_scg_r17, bref, (uint8_t)1u, (uint8_t)32u)); - } - if (fr2_carriers_scg_r17_present) { - HANDLE_CODE(unpack_integer(fr2_carriers_scg_r17, bref, (uint8_t)1u, (uint8_t)32u)); - } - - return SRSASN_SUCCESS; -} -void cg_cfg_v1730_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (fr1_carriers_scg_r17_present) { - j.write_int("fr1-Carriers-SCG-r17", fr1_carriers_scg_r17); - } - if (fr2_carriers_scg_r17_present) { - j.write_int("fr2-Carriers-SCG-r17", fr2_carriers_scg_r17); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// ServCellInfoXCG-EUTRA-r16 ::= SEQUENCE -SRSASN_CODE serv_cell_info_xcg_eutra_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(dl_carrier_freq_eutra_r16_present, 1)); - HANDLE_CODE(bref.pack(ul_carrier_freq_eutra_r16_present, 1)); - HANDLE_CODE(bref.pack(tx_bw_eutra_r16_present, 1)); - - if (dl_carrier_freq_eutra_r16_present) { - HANDLE_CODE(pack_integer(bref, dl_carrier_freq_eutra_r16, (uint32_t)0u, (uint32_t)262143u)); - } - if (ul_carrier_freq_eutra_r16_present) { - HANDLE_CODE(pack_integer(bref, ul_carrier_freq_eutra_r16, (uint32_t)0u, (uint32_t)262143u)); - } - if (tx_bw_eutra_r16_present) { - HANDLE_CODE(tx_bw_eutra_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE serv_cell_info_xcg_eutra_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(dl_carrier_freq_eutra_r16_present, 1)); - HANDLE_CODE(bref.unpack(ul_carrier_freq_eutra_r16_present, 1)); - HANDLE_CODE(bref.unpack(tx_bw_eutra_r16_present, 1)); - - if (dl_carrier_freq_eutra_r16_present) { - HANDLE_CODE(unpack_integer(dl_carrier_freq_eutra_r16, bref, (uint32_t)0u, (uint32_t)262143u)); - } - if (ul_carrier_freq_eutra_r16_present) { - HANDLE_CODE(unpack_integer(ul_carrier_freq_eutra_r16, bref, (uint32_t)0u, (uint32_t)262143u)); - } - if (tx_bw_eutra_r16_present) { - HANDLE_CODE(tx_bw_eutra_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void serv_cell_info_xcg_eutra_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (dl_carrier_freq_eutra_r16_present) { - j.write_int("dl-CarrierFreq-EUTRA-r16", dl_carrier_freq_eutra_r16); - } - if (ul_carrier_freq_eutra_r16_present) { - j.write_int("ul-CarrierFreq-EUTRA-r16", ul_carrier_freq_eutra_r16); - } - if (tx_bw_eutra_r16_present) { - j.write_str("transmissionBandwidth-EUTRA-r16", tx_bw_eutra_r16.to_string()); - } - j.end_obj(); -} - -// ServCellInfoXCG-NR-r16 ::= SEQUENCE -SRSASN_CODE serv_cell_info_xcg_nr_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(dl_freq_info_nr_r16_present, 1)); - HANDLE_CODE(bref.pack(ul_freq_info_nr_r16_present, 1)); - - if (dl_freq_info_nr_r16_present) { - HANDLE_CODE(dl_freq_info_nr_r16.pack(bref)); - } - if (ul_freq_info_nr_r16_present) { - HANDLE_CODE(ul_freq_info_nr_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE serv_cell_info_xcg_nr_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(dl_freq_info_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(ul_freq_info_nr_r16_present, 1)); - - if (dl_freq_info_nr_r16_present) { - HANDLE_CODE(dl_freq_info_nr_r16.unpack(bref)); - } - if (ul_freq_info_nr_r16_present) { - HANDLE_CODE(ul_freq_info_nr_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void serv_cell_info_xcg_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (dl_freq_info_nr_r16_present) { - j.write_fieldname("dl-FreqInfo-NR-r16"); - dl_freq_info_nr_r16.to_json(j); - } - if (ul_freq_info_nr_r16_present) { - j.write_fieldname("ul-FreqInfo-NR-r16"); - ul_freq_info_nr_r16.to_json(j); - } - j.end_obj(); -} - -// CG-Config-v1700-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(candidate_cell_info_list_cp_c_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(two_phr_mode_scg_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (candidate_cell_info_list_cp_c_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, candidate_cell_info_list_cp_c_r17, 1, 8)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_cfg_v1700_ies_s::unpack(cbit_ref& bref) -{ - bool candidate_cell_info_list_cp_c_r17_present; - HANDLE_CODE(bref.unpack(candidate_cell_info_list_cp_c_r17_present, 1)); - HANDLE_CODE(bref.unpack(two_phr_mode_scg_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (candidate_cell_info_list_cp_c_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(candidate_cell_info_list_cp_c_r17, bref, 1, 8)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void cg_cfg_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (candidate_cell_info_list_cp_c_r17.size() > 0) { - j.start_array("candidateCellInfoListCPC-r17"); - for (const auto& e1 : candidate_cell_info_list_cp_c_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (two_phr_mode_scg_r17_present) { - j.write_str("twoPHRModeSCG-r17", "enabled"); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// CG-Config-v1640-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_v1640_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(serv_cell_info_list_scg_nr_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(serv_cell_info_list_scg_eutra_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (serv_cell_info_list_scg_nr_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, serv_cell_info_list_scg_nr_r16, 1, 32)); - } - if (serv_cell_info_list_scg_eutra_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, serv_cell_info_list_scg_eutra_r16, 1, 32)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_cfg_v1640_ies_s::unpack(cbit_ref& bref) -{ - bool serv_cell_info_list_scg_nr_r16_present; - HANDLE_CODE(bref.unpack(serv_cell_info_list_scg_nr_r16_present, 1)); - bool serv_cell_info_list_scg_eutra_r16_present; - HANDLE_CODE(bref.unpack(serv_cell_info_list_scg_eutra_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (serv_cell_info_list_scg_nr_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(serv_cell_info_list_scg_nr_r16, bref, 1, 32)); - } - if (serv_cell_info_list_scg_eutra_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(serv_cell_info_list_scg_eutra_r16, bref, 1, 32)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void cg_cfg_v1640_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (serv_cell_info_list_scg_nr_r16.size() > 0) { - j.start_array("servCellInfoListSCG-NR-r16"); - for (const auto& e1 : serv_cell_info_list_scg_nr_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (serv_cell_info_list_scg_eutra_r16.size() > 0) { - j.start_array("servCellInfoListSCG-EUTRA-r16"); - for (const auto& e1 : serv_cell_info_list_scg_eutra_r16) { - 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(); -} - -// CG-Config-v1630-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_v1630_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sel_toffset_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (sel_toffset_r16_present) { - HANDLE_CODE(sel_toffset_r16.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_cfg_v1630_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sel_toffset_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (sel_toffset_r16_present) { - HANDLE_CODE(sel_toffset_r16.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void cg_cfg_v1630_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sel_toffset_r16_present) { - j.write_str("selectedToffset-r16", sel_toffset_r16.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// CG-Config-v1620-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_v1620_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ue_assist_info_scg_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ue_assist_info_scg_r16.size() > 0) { - HANDLE_CODE(ue_assist_info_scg_r16.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_cfg_v1620_ies_s::unpack(cbit_ref& bref) -{ - bool ue_assist_info_scg_r16_present; - HANDLE_CODE(bref.unpack(ue_assist_info_scg_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ue_assist_info_scg_r16_present) { - HANDLE_CODE(ue_assist_info_scg_r16.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void cg_cfg_v1620_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ue_assist_info_scg_r16.size() > 0) { - j.write_str("ueAssistanceInformationSCG-r16", ue_assist_info_scg_r16.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// DRX-Info2 ::= SEQUENCE -SRSASN_CODE drx_info2_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(drx_on_dur_timer.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE drx_info2_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(drx_on_dur_timer.unpack(bref)); - - return SRSASN_SUCCESS; -} -void drx_info2_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("drx-onDurationTimer"); - drx_on_dur_timer.to_json(j); - j.end_obj(); -} - -void drx_info2_s::drx_on_dur_timer_c_::destroy_() {} -void drx_info2_s::drx_on_dur_timer_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -drx_info2_s::drx_on_dur_timer_c_::drx_on_dur_timer_c_(const drx_info2_s::drx_on_dur_timer_c_& other) -{ - 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_info2_s::drx_on_dur_timer_c_"); - } -} -drx_info2_s::drx_on_dur_timer_c_& -drx_info2_s::drx_on_dur_timer_c_::operator=(const drx_info2_s::drx_on_dur_timer_c_& other) -{ - if (this == &other) { - return *this; - } - 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_info2_s::drx_on_dur_timer_c_"); - } - - return *this; -} -uint8_t& drx_info2_s::drx_on_dur_timer_c_::set_sub_milli_seconds() -{ - set(types::sub_milli_seconds); - return c.get(); -} -drx_info2_s::drx_on_dur_timer_c_::milli_seconds_e_& drx_info2_s::drx_on_dur_timer_c_::set_milli_seconds() -{ - set(types::milli_seconds); - return c.get(); -} -void drx_info2_s::drx_on_dur_timer_c_::to_json(json_writer& j) const -{ - j.start_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_info2_s::drx_on_dur_timer_c_"); - } - j.end_obj(); -} -SRSASN_CODE drx_info2_s::drx_on_dur_timer_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)); - break; - case types::milli_seconds: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "drx_info2_s::drx_on_dur_timer_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE drx_info2_s::drx_on_dur_timer_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)); - break; - case types::milli_seconds: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "drx_info2_s::drx_on_dur_timer_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* drx_info2_s::drx_on_dur_timer_c_::milli_seconds_opts::to_string() const -{ - static const char* names[] = {"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(names, 32, value, "drx_info2_s::drx_on_dur_timer_c_::milli_seconds_e_"); -} -uint16_t drx_info2_s::drx_on_dur_timer_c_::milli_seconds_opts::to_number() const -{ - static const uint16_t numbers[] = {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(numbers, 24, value, "drx_info2_s::drx_on_dur_timer_c_::milli_seconds_e_"); -} - -const char* drx_info2_s::drx_on_dur_timer_c_::types_opts::to_string() const -{ - static const char* names[] = {"subMilliSeconds", "milliSeconds"}; - return convert_enum_idx(names, 2, value, "drx_info2_s::drx_on_dur_timer_c_::types"); -} - -// CG-Config-v1610-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(drx_info_scg2_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (drx_info_scg2_present) { - HANDLE_CODE(drx_info_scg2.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_cfg_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(drx_info_scg2_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (drx_info_scg2_present) { - HANDLE_CODE(drx_info_scg2.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void cg_cfg_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (drx_info_scg2_present) { - j.write_fieldname("drx-InfoSCG2"); - drx_info_scg2.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// PH-UplinkCarrierSCG ::= SEQUENCE -SRSASN_CODE ph_ul_carrier_scg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(ph_type1or3.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ph_ul_carrier_scg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(ph_type1or3.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ph_ul_carrier_scg_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("ph-Type1or3", ph_type1or3.to_string()); - j.end_obj(); -} - -const char* ph_ul_carrier_scg_s::ph_type1or3_opts::to_string() const -{ - static const char* names[] = {"type1", "type3"}; - return convert_enum_idx(names, 2, value, "ph_ul_carrier_scg_s::ph_type1or3_e_"); -} -uint8_t ph_ul_carrier_scg_s::ph_type1or3_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 3}; - return map_enum_number(numbers, 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(scell_frequencies_sn_eutra.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (scell_frequencies_sn_nr.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, scell_frequencies_sn_nr, 1, 31, integer_packer(0, 3279165))); - } - if (scell_frequencies_sn_eutra.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, scell_frequencies_sn_eutra, 1, 31, integer_packer(0, 262143))); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_cfg_v1590_ies_s::unpack(cbit_ref& bref) -{ - bool scell_frequencies_sn_nr_present; - HANDLE_CODE(bref.unpack(scell_frequencies_sn_nr_present, 1)); - bool scell_frequencies_sn_eutra_present; - 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))); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void cg_cfg_v1590_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (scell_frequencies_sn_nr.size() > 0) { - 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.size() > 0) { - 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"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// PH-InfoSCG ::= SEQUENCE -SRSASN_CODE ph_info_scg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ph_supplementary_ul_present, 1)); - - HANDLE_CODE(pack_integer(bref, serv_cell_idx, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(ph_ul.pack(bref)); - if (ph_supplementary_ul_present) { - HANDLE_CODE(ph_supplementary_ul.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= two_srs_pusch_repeat_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(two_srs_pusch_repeat_r17_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ph_info_scg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ph_supplementary_ul_present, 1)); - - HANDLE_CODE(unpack_integer(serv_cell_idx, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(ph_ul.unpack(bref)); - if (ph_supplementary_ul_present) { - HANDLE_CODE(ph_supplementary_ul.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(two_srs_pusch_repeat_r17_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void ph_info_scg_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("servCellIndex", serv_cell_idx); - j.write_fieldname("ph-Uplink"); - ph_ul.to_json(j); - if (ph_supplementary_ul_present) { - j.write_fieldname("ph-SupplementaryUplink"); - ph_supplementary_ul.to_json(j); - } - if (ext) { - if (two_srs_pusch_repeat_r17_present) { - j.write_str("twoSRS-PUSCH-Repetition-r17", "enabled"); - } - } - 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(candidate_cell_info_list_sn_eutra.size() > 0, 1)); - HANDLE_CODE(bref.pack(candidate_serving_freq_list_eutra.size() > 0, 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.size() > 0) { - HANDLE_CODE(scg_cell_group_cfg_eutra.pack(bref)); - } - if (candidate_cell_info_list_sn_eutra.size() > 0) { - HANDLE_CODE(candidate_cell_info_list_sn_eutra.pack(bref)); - } - if (candidate_serving_freq_list_eutra.size() > 0) { - 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)); - bool scg_cell_group_cfg_eutra_present; - HANDLE_CODE(bref.unpack(scg_cell_group_cfg_eutra_present, 1)); - bool candidate_cell_info_list_sn_eutra_present; - HANDLE_CODE(bref.unpack(candidate_cell_info_list_sn_eutra_present, 1)); - bool candidate_serving_freq_list_eutra_present; - 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.size() > 0) { - j.write_str("scg-CellGroupConfigEUTRA", scg_cell_group_cfg_eutra.to_string()); - } - if (candidate_cell_info_list_sn_eutra.size() > 0) { - j.write_str("candidateCellInfoListSN-EUTRA", candidate_cell_info_list_sn_eutra.to_string()); - } - if (candidate_serving_freq_list_eutra.size() > 0) { - 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 -{ - HANDLE_CODE(pack_integer(bref, serv_cell_idx, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(fr_type.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE fr_info_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(serv_cell_idx, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(fr_type.unpack(bref)); - - return SRSASN_SUCCESS; -} -void fr_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("servCellIndex", serv_cell_idx); - j.write_str("fr-Type", fr_type.to_string()); - j.end_obj(); -} - -const char* fr_info_s::fr_type_opts::to_string() const -{ - static const char* names[] = {"fr1", "fr2"}; - return convert_enum_idx(names, 2, value, "fr_info_s::fr_type_e_"); -} -uint8_t fr_info_s::fr_type_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "fr_info_s::fr_type_e_"); -} - -// NR-FreqInfo ::= SEQUENCE -SRSASN_CODE nr_freq_info_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(measured_freq_present, 1)); - - if (measured_freq_present) { - HANDLE_CODE(pack_integer(bref, measured_freq, (uint32_t)0u, (uint32_t)3279165u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE nr_freq_info_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(measured_freq_present, 1)); - - if (measured_freq_present) { - HANDLE_CODE(unpack_integer(measured_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); - } - - return SRSASN_SUCCESS; -} -void nr_freq_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (measured_freq_present) { - j.write_int("measuredFrequency", measured_freq); - } - j.end_obj(); -} - -// CG-Config-v1540-IEs ::= SEQUENCE -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_nr_present, 1)); - HANDLE_CODE(bref.pack(ph_info_scg.size() > 0, 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_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_nr.requested_cell_info.ssb_freq, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(pack_integer( - bref, report_cgi_request_nr.requested_cell_info.cell_for_which_to_report_cgi, (uint16_t)0u, (uint16_t)1007u)); - } - } - if (ph_info_scg.size() > 0) { - 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_nr_present, 1)); - bool ph_info_scg_present; - 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_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_nr.requested_cell_info.ssb_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(unpack_integer( - 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; -} -void cg_cfg_v1540_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pscell_freq_present) { - j.write_int("pSCellFrequency", pscell_freq); - } - if (report_cgi_request_nr_present) { - j.write_fieldname("reportCGI-RequestNR"); - j.start_obj(); - if (report_cgi_request_nr.requested_cell_info_present) { - j.write_fieldname("requestedCellInfo"); - j.start_obj(); - 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(); - } - if (ph_info_scg.size() > 0) { - j.start_array("ph-InfoSCG"); - for (const auto& e1 : ph_info_scg) { - 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(); -} - -// ConfigRestrictModReqSCG ::= SEQUENCE -SRSASN_CODE cfg_restrict_mod_req_scg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(requested_bc_mrdc_present, 1)); - HANDLE_CODE(bref.pack(requested_p_max_fr1_present, 1)); - - if (requested_bc_mrdc_present) { - HANDLE_CODE(requested_bc_mrdc.pack(bref)); - } - if (requested_p_max_fr1_present) { - 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[1] |= requested_p_max_fr2_r16_present; - group_flags[1] |= requested_max_inter_freq_meas_id_scg_r16_present; - group_flags[1] |= requested_max_intra_freq_meas_id_scg_r16_present; - group_flags[1] |= requested_toffset_r16_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)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(requested_p_max_fr2_r16_present, 1)); - HANDLE_CODE(bref.pack(requested_max_inter_freq_meas_id_scg_r16_present, 1)); - HANDLE_CODE(bref.pack(requested_max_intra_freq_meas_id_scg_r16_present, 1)); - HANDLE_CODE(bref.pack(requested_toffset_r16_present, 1)); - if (requested_p_max_fr2_r16_present) { - HANDLE_CODE(pack_integer(bref, requested_p_max_fr2_r16, (int8_t)-30, (int8_t)33)); - } - if (requested_max_inter_freq_meas_id_scg_r16_present) { - HANDLE_CODE(pack_integer(bref, requested_max_inter_freq_meas_id_scg_r16, (uint8_t)1u, (uint8_t)62u)); - } - if (requested_max_intra_freq_meas_id_scg_r16_present) { - HANDLE_CODE(pack_integer(bref, requested_max_intra_freq_meas_id_scg_r16, (uint8_t)1u, (uint8_t)62u)); - } - if (requested_toffset_r16_present) { - HANDLE_CODE(requested_toffset_r16.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cfg_restrict_mod_req_scg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(requested_bc_mrdc_present, 1)); - HANDLE_CODE(bref.unpack(requested_p_max_fr1_present, 1)); - - if (requested_bc_mrdc_present) { - HANDLE_CODE(requested_bc_mrdc.unpack(bref)); - } - if (requested_p_max_fr1_present) { - HANDLE_CODE(unpack_integer(requested_p_max_fr1, bref, (int8_t)-30, (int8_t)33)); - } - - 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(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)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(requested_p_max_fr2_r16_present, 1)); - HANDLE_CODE(bref.unpack(requested_max_inter_freq_meas_id_scg_r16_present, 1)); - HANDLE_CODE(bref.unpack(requested_max_intra_freq_meas_id_scg_r16_present, 1)); - HANDLE_CODE(bref.unpack(requested_toffset_r16_present, 1)); - if (requested_p_max_fr2_r16_present) { - HANDLE_CODE(unpack_integer(requested_p_max_fr2_r16, bref, (int8_t)-30, (int8_t)33)); - } - if (requested_max_inter_freq_meas_id_scg_r16_present) { - HANDLE_CODE(unpack_integer(requested_max_inter_freq_meas_id_scg_r16, bref, (uint8_t)1u, (uint8_t)62u)); - } - if (requested_max_intra_freq_meas_id_scg_r16_present) { - HANDLE_CODE(unpack_integer(requested_max_intra_freq_meas_id_scg_r16, bref, (uint8_t)1u, (uint8_t)62u)); - } - if (requested_toffset_r16_present) { - HANDLE_CODE(requested_toffset_r16.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void cfg_restrict_mod_req_scg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (requested_bc_mrdc_present) { - j.write_fieldname("requestedBC-MRDC"); - requested_bc_mrdc.to_json(j); - } - 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); - } - if (requested_p_max_fr2_r16_present) { - j.write_int("requestedP-MaxFR2-r16", requested_p_max_fr2_r16); - } - if (requested_max_inter_freq_meas_id_scg_r16_present) { - j.write_int("requestedMaxInterFreqMeasIdSCG-r16", requested_max_inter_freq_meas_id_scg_r16); - } - if (requested_max_intra_freq_meas_id_scg_r16_present) { - j.write_int("requestedMaxIntraFreqMeasIdSCG-r16", requested_max_intra_freq_meas_id_scg_r16); - } - if (requested_toffset_r16_present) { - j.write_str("requestedToffset-r16", requested_toffset_r16.to_string()); - } - } - j.end_obj(); -} - -// DRX-Info ::= SEQUENCE -SRSASN_CODE drx_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(short_drx_present, 1)); - - 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)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE drx_info_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(short_drx_present, 1)); - - 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)); - } - - return SRSASN_SUCCESS; -} -void drx_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - 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.end_obj(); -} - -void drx_info_s::drx_long_cycle_start_offset_c_::destroy_() {} -void drx_info_s::drx_long_cycle_start_offset_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -drx_info_s::drx_long_cycle_start_offset_c_::drx_long_cycle_start_offset_c_( - const drx_info_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()); - 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_, "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) -{ - 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()); - break; - case types::ms10240: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "drx_info_s::drx_long_cycle_start_offset_c_"); - } - - return *this; -} -uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms10() -{ - set(types::ms10); - return c.get(); -} -uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms20() -{ - set(types::ms20); - return c.get(); -} -uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms32() -{ - set(types::ms32); - return c.get(); -} -uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms40() -{ - set(types::ms40); - return c.get(); -} -uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms60() -{ - set(types::ms60); - return c.get(); -} -uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms64() -{ - set(types::ms64); - return c.get(); -} -uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms70() -{ - set(types::ms70); - return c.get(); -} -uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms80() -{ - set(types::ms80); - return c.get(); -} -uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms128() -{ - set(types::ms128); - return c.get(); -} -uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms160() -{ - set(types::ms160); - return c.get(); -} -uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms256() -{ - set(types::ms256); - return c.get(); -} -uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms320() -{ - set(types::ms320); - return c.get(); -} -uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms512() -{ - set(types::ms512); - return c.get(); -} -uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms640() -{ - set(types::ms640); - return c.get(); -} -uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms1024() -{ - set(types::ms1024); - return c.get(); -} -uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms1280() -{ - set(types::ms1280); - return c.get(); -} -uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms2048() -{ - set(types::ms2048); - return c.get(); -} -uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms2560() -{ - set(types::ms2560); - return c.get(); -} -uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms5120() -{ - set(types::ms5120); - return c.get(); -} -uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms10240() -{ - set(types::ms10240); - return c.get(); -} -void drx_info_s::drx_long_cycle_start_offset_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()); - break; - case types::ms10240: - j.write_int("ms10240", c.get()); - break; - default: - log_invalid_choice_id(type_, "drx_info_s::drx_long_cycle_start_offset_c_"); - } - j.end_obj(); -} -SRSASN_CODE drx_info_s::drx_long_cycle_start_offset_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)); - break; - case types::ms10240: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); - break; - default: - log_invalid_choice_id(type_, "drx_info_s::drx_long_cycle_start_offset_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE drx_info_s::drx_long_cycle_start_offset_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)); - break; - case types::ms10240: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); - break; - default: - log_invalid_choice_id(type_, "drx_info_s::drx_long_cycle_start_offset_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; + j.end_obj(); } -const char* drx_info_s::drx_long_cycle_start_offset_c_::types_opts::to_string() const +// CG-CandidateInfoId-r17 ::= SEQUENCE +SRSASN_CODE cg_candidate_info_id_r17_s::pack(bit_ref& bref) const { - static const char* names[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", - "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", - "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; - return convert_enum_idx(names, 20, value, "drx_info_s::drx_long_cycle_start_offset_c_::types"); + HANDLE_CODE(pack_integer(bref, ssb_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(pack_integer(bref, pci_r17, (uint16_t)0u, (uint16_t)1007u)); + + return SRSASN_SUCCESS; } -uint16_t drx_info_s::drx_long_cycle_start_offset_c_::types_opts::to_number() const +SRSASN_CODE cg_candidate_info_id_r17_s::unpack(cbit_ref& bref) { - static const uint16_t numbers[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, - 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; - return map_enum_number(numbers, 20, value, "drx_info_s::drx_long_cycle_start_offset_c_::types"); -} + HANDLE_CODE(unpack_integer(ssb_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(unpack_integer(pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); -const char* drx_info_s::short_drx_s_::drx_short_cycle_opts::to_string() const -{ - static const char* names[] = {"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(names, 32, value, "drx_info_s::short_drx_s_::drx_short_cycle_e_"); + return SRSASN_SUCCESS; } -uint16_t drx_info_s::short_drx_s_::drx_short_cycle_opts::to_number() const +void cg_candidate_info_id_r17_s::to_json(json_writer& j) const { - static const uint16_t numbers[] = {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(numbers, 23, value, "drx_info_s::short_drx_s_::drx_short_cycle_e_"); + j.start_obj(); + j.write_int("ssbFrequency-r17", ssb_freq_r17); + j.write_int("physCellId-r17", pci_r17); + j.end_obj(); } -// MeasConfigSN ::= SEQUENCE -SRSASN_CODE meas_cfg_sn_s::pack(bit_ref& bref) const +// CG-CandidateInfo-r17 ::= SEQUENCE +SRSASN_CODE cg_candidate_info_r17_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(measured_frequencies_sn.size() > 0, 1)); - - if (measured_frequencies_sn.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, measured_frequencies_sn, 1, 32)); - } + HANDLE_CODE(cg_candidate_info_id_r17.pack(bref)); + HANDLE_CODE(candidate_cg_cfg_r17.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE meas_cfg_sn_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_candidate_info_r17_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - bool measured_frequencies_sn_present; - HANDLE_CODE(bref.unpack(measured_frequencies_sn_present, 1)); - - if (measured_frequencies_sn_present) { - HANDLE_CODE(unpack_dyn_seq_of(measured_frequencies_sn, bref, 1, 32)); - } + HANDLE_CODE(cg_candidate_info_id_r17.unpack(bref)); + HANDLE_CODE(candidate_cg_cfg_r17.unpack(bref)); return SRSASN_SUCCESS; } -void meas_cfg_sn_s::to_json(json_writer& j) const +void cg_candidate_info_r17_s::to_json(json_writer& j) const { j.start_obj(); - if (measured_frequencies_sn.size() > 0) { - j.start_array("measuredFrequenciesSN"); - for (const auto& e1 : measured_frequencies_sn) { - e1.to_json(j); - } - j.end_array(); - } + j.write_fieldname("cg-CandidateInfoId-r17"); + cg_candidate_info_id_r17.to_json(j); + j.write_str("candidateCG-Config-r17", candidate_cg_cfg_r17.to_string()); j.end_obj(); } -// CG-Config-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_ies_s::pack(bit_ref& bref) const +// CG-CandidateList-r17-IEs ::= SEQUENCE +SRSASN_CODE cg_candidate_list_r17_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(scg_cell_group_cfg.size() > 0, 1)); - HANDLE_CODE(bref.pack(scg_rb_cfg.size() > 0, 1)); - HANDLE_CODE(bref.pack(cfg_restrict_mod_req_present, 1)); - HANDLE_CODE(bref.pack(drx_info_scg_present, 1)); - HANDLE_CODE(bref.pack(candidate_cell_info_list_sn.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_cfg_sn_present, 1)); - HANDLE_CODE(bref.pack(sel_band_combination_present, 1)); - HANDLE_CODE(bref.pack(fr_info_list_scg.size() > 0, 1)); - HANDLE_CODE(bref.pack(candidate_serving_freq_list_nr.size() > 0, 1)); + HANDLE_CODE(bref.pack(cg_candidate_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(cg_candidate_to_release_list_r17.size() > 0, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (scg_cell_group_cfg.size() > 0) { - HANDLE_CODE(scg_cell_group_cfg.pack(bref)); - } - if (scg_rb_cfg.size() > 0) { - HANDLE_CODE(scg_rb_cfg.pack(bref)); - } - if (cfg_restrict_mod_req_present) { - HANDLE_CODE(cfg_restrict_mod_req.pack(bref)); - } - if (drx_info_scg_present) { - HANDLE_CODE(drx_info_scg.pack(bref)); - } - if (candidate_cell_info_list_sn.size() > 0) { - HANDLE_CODE(candidate_cell_info_list_sn.pack(bref)); - } - if (meas_cfg_sn_present) { - HANDLE_CODE(meas_cfg_sn.pack(bref)); - } - if (sel_band_combination_present) { - HANDLE_CODE(sel_band_combination.pack(bref)); - } - if (fr_info_list_scg.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, fr_info_list_scg, 1, 31)); - } - if (candidate_serving_freq_list_nr.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, candidate_serving_freq_list_nr, 1, 32, integer_packer(0, 3279165))); + if (cg_candidate_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cg_candidate_to_add_mod_list_r17, 1, 8)); } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); + if (cg_candidate_to_release_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cg_candidate_to_release_list_r17, 1, 8)); } return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_candidate_list_r17_ies_s::unpack(cbit_ref& bref) { - bool scg_cell_group_cfg_present; - HANDLE_CODE(bref.unpack(scg_cell_group_cfg_present, 1)); - bool scg_rb_cfg_present; - HANDLE_CODE(bref.unpack(scg_rb_cfg_present, 1)); - HANDLE_CODE(bref.unpack(cfg_restrict_mod_req_present, 1)); - HANDLE_CODE(bref.unpack(drx_info_scg_present, 1)); - bool candidate_cell_info_list_sn_present; - 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_present, 1)); - bool fr_info_list_scg_present; - HANDLE_CODE(bref.unpack(fr_info_list_scg_present, 1)); - bool candidate_serving_freq_list_nr_present; - HANDLE_CODE(bref.unpack(candidate_serving_freq_list_nr_present, 1)); + bool cg_candidate_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(cg_candidate_to_add_mod_list_r17_present, 1)); + bool cg_candidate_to_release_list_r17_present; + HANDLE_CODE(bref.unpack(cg_candidate_to_release_list_r17_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (scg_cell_group_cfg_present) { - HANDLE_CODE(scg_cell_group_cfg.unpack(bref)); - } - if (scg_rb_cfg_present) { - HANDLE_CODE(scg_rb_cfg.unpack(bref)); - } - if (cfg_restrict_mod_req_present) { - HANDLE_CODE(cfg_restrict_mod_req.unpack(bref)); - } - if (drx_info_scg_present) { - HANDLE_CODE(drx_info_scg.unpack(bref)); - } - if (candidate_cell_info_list_sn_present) { - HANDLE_CODE(candidate_cell_info_list_sn.unpack(bref)); - } - if (meas_cfg_sn_present) { - HANDLE_CODE(meas_cfg_sn.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)); - } - if (candidate_serving_freq_list_nr_present) { - HANDLE_CODE(unpack_dyn_seq_of(candidate_serving_freq_list_nr, bref, 1, 32, integer_packer(0, 3279165))); + if (cg_candidate_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(cg_candidate_to_add_mod_list_r17, bref, 1, 8)); } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); + if (cg_candidate_to_release_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(cg_candidate_to_release_list_r17, bref, 1, 8)); } return SRSASN_SUCCESS; } -void cg_cfg_ies_s::to_json(json_writer& j) const +void cg_candidate_list_r17_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (scg_cell_group_cfg.size() > 0) { - j.write_str("scg-CellGroupConfig", scg_cell_group_cfg.to_string()); - } - if (scg_rb_cfg.size() > 0) { - j.write_str("scg-RB-Config", scg_rb_cfg.to_string()); - } - if (cfg_restrict_mod_req_present) { - j.write_fieldname("configRestrictModReq"); - cfg_restrict_mod_req.to_json(j); - } - if (drx_info_scg_present) { - j.write_fieldname("drx-InfoSCG"); - drx_info_scg.to_json(j); - } - if (candidate_cell_info_list_sn.size() > 0) { - j.write_str("candidateCellInfoListSN", candidate_cell_info_list_sn.to_string()); - } - if (meas_cfg_sn_present) { - j.write_fieldname("measConfigSN"); - meas_cfg_sn.to_json(j); - } - if (sel_band_combination_present) { - j.write_fieldname("selectedBandCombination"); - sel_band_combination.to_json(j); - } - if (fr_info_list_scg.size() > 0) { - j.start_array("fr-InfoListSCG"); - for (const auto& e1 : fr_info_list_scg) { + if (cg_candidate_to_add_mod_list_r17.size() > 0) { + j.start_array("cg-CandidateToAddModList-r17"); + for (const auto& e1 : cg_candidate_to_add_mod_list_r17) { e1.to_json(j); } j.end_array(); } - if (candidate_serving_freq_list_nr.size() > 0) { - j.start_array("candidateServingFreqListNR"); - for (const auto& e1 : candidate_serving_freq_list_nr) { - j.write_int(e1); + if (cg_candidate_to_release_list_r17.size() > 0) { + j.start_array("cg-CandidateToReleaseList-r17"); + for (const auto& e1 : cg_candidate_to_release_list_r17) { + e1.to_json(j); } j.end_array(); } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); + j.start_obj(); + j.end_obj(); } j.end_obj(); } -// CG-Config ::= SEQUENCE -SRSASN_CODE cg_cfg_s::pack(bit_ref& bref) const +// CG-CandidateList ::= SEQUENCE +SRSASN_CODE cg_candidate_list_s::pack(bit_ref& bref) const { HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_candidate_list_s::unpack(cbit_ref& bref) { HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void cg_cfg_s::to_json(json_writer& j) const +void cg_candidate_list_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("criticalExtensions"); @@ -22052,20 +4180,20 @@ void cg_cfg_s::to_json(json_writer& j) const j.end_obj(); } -void cg_cfg_s::crit_exts_c_::set(types::options e) +void cg_candidate_list_s::crit_exts_c_::set(types::options e) { type_ = e; } -cg_cfg_s::crit_exts_c_::c1_c_& cg_cfg_s::crit_exts_c_::set_c1() +cg_candidate_list_s::crit_exts_c_::c1_c_& cg_candidate_list_s::crit_exts_c_::set_c1() { set(types::c1); return c; } -void cg_cfg_s::crit_exts_c_::set_crit_exts_future() +void cg_candidate_list_s::crit_exts_c_::set_crit_exts_future() { set(types::crit_exts_future); } -void cg_cfg_s::crit_exts_c_::to_json(json_writer& j) const +void cg_candidate_list_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { @@ -22076,11 +4204,11 @@ void cg_cfg_s::crit_exts_c_::to_json(json_writer& j) const case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "cg_cfg_s::crit_exts_c_"); + log_invalid_choice_id(type_, "cg_candidate_list_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE cg_cfg_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE cg_candidate_list_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { @@ -22090,12 +4218,12 @@ SRSASN_CODE cg_cfg_s::crit_exts_c_::pack(bit_ref& bref) const case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "cg_cfg_s::crit_exts_c_"); + log_invalid_choice_id(type_, "cg_candidate_list_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE cg_candidate_list_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); @@ -22107,39 +4235,39 @@ SRSASN_CODE cg_cfg_s::crit_exts_c_::unpack(cbit_ref& bref) case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "cg_cfg_s::crit_exts_c_"); + log_invalid_choice_id(type_, "cg_candidate_list_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void cg_cfg_s::crit_exts_c_::c1_c_::set(types::options e) +void cg_candidate_list_s::crit_exts_c_::c1_c_::set(types::options e) { type_ = e; } -cg_cfg_ies_s& cg_cfg_s::crit_exts_c_::c1_c_::set_cg_cfg() +cg_candidate_list_r17_ies_s& cg_candidate_list_s::crit_exts_c_::c1_c_::set_cg_candidate_list_r17() { - set(types::cg_cfg); + set(types::cg_candidate_list_r17); return c; } -void cg_cfg_s::crit_exts_c_::c1_c_::set_spare3() +void cg_candidate_list_s::crit_exts_c_::c1_c_::set_spare3() { set(types::spare3); } -void cg_cfg_s::crit_exts_c_::c1_c_::set_spare2() +void cg_candidate_list_s::crit_exts_c_::c1_c_::set_spare2() { set(types::spare2); } -void cg_cfg_s::crit_exts_c_::c1_c_::set_spare1() +void cg_candidate_list_s::crit_exts_c_::c1_c_::set_spare1() { set(types::spare1); } -void cg_cfg_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +void cg_candidate_list_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::cg_cfg: - j.write_fieldname("cg-Config"); + case types::cg_candidate_list_r17: + j.write_fieldname("cg-CandidateList-r17"); c.to_json(j); break; case types::spare3: @@ -22149,15 +4277,15 @@ void cg_cfg_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const case types::spare1: break; default: - log_invalid_choice_id(type_, "cg_cfg_s::crit_exts_c_::c1_c_"); + log_invalid_choice_id(type_, "cg_candidate_list_s::crit_exts_c_::c1_c_"); } j.end_obj(); } -SRSASN_CODE cg_cfg_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +SRSASN_CODE cg_candidate_list_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::cg_cfg: + case types::cg_candidate_list_r17: HANDLE_CODE(c.pack(bref)); break; case types::spare3: @@ -22167,18 +4295,18 @@ SRSASN_CODE cg_cfg_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const case types::spare1: break; default: - log_invalid_choice_id(type_, "cg_cfg_s::crit_exts_c_::c1_c_"); + log_invalid_choice_id(type_, "cg_candidate_list_s::crit_exts_c_::c1_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) +SRSASN_CODE cg_candidate_list_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::cg_cfg: + case types::cg_candidate_list_r17: HANDLE_CODE(c.unpack(bref)); break; case types::spare3: @@ -22188,95 +4316,129 @@ SRSASN_CODE cg_cfg_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) case types::spare1: break; default: - log_invalid_choice_id(type_, "cg_cfg_s::crit_exts_c_::c1_c_"); + log_invalid_choice_id(type_, "cg_candidate_list_s::crit_exts_c_::c1_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -const char* cg_cfg_s::crit_exts_c_::c1_c_::types_opts::to_string() const +const char* cg_candidate_list_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static const char* names[] = {"cg-Config", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "cg_cfg_s::crit_exts_c_::c1_c_::types"); + static const char* names[] = {"cg-CandidateList-r17", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "cg_candidate_list_s::crit_exts_c_::c1_c_::types"); } -const char* cg_cfg_s::crit_exts_c_::types_opts::to_string() const +const char* cg_candidate_list_s::crit_exts_c_::types_opts::to_string() const { static const char* names[] = {"c1", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "cg_cfg_s::crit_exts_c_::types"); + return convert_enum_idx(names, 2, value, "cg_candidate_list_s::crit_exts_c_::types"); } -uint8_t cg_cfg_s::crit_exts_c_::types_opts::to_number() const +uint8_t cg_candidate_list_s::crit_exts_c_::types_opts::to_number() const { static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "cg_cfg_s::crit_exts_c_::types"); + return map_enum_number(numbers, 1, value, "cg_candidate_list_s::crit_exts_c_::types"); +} + +// CandidateCell-r17 ::= SEQUENCE +SRSASN_CODE candidate_cell_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cond_execution_cond_scg_r17.size() > 0, 1)); + + HANDLE_CODE(pack_integer(bref, pci_r17, (uint16_t)0u, (uint16_t)1007u)); + if (cond_execution_cond_scg_r17.size() > 0) { + HANDLE_CODE(cond_execution_cond_scg_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE candidate_cell_r17_s::unpack(cbit_ref& bref) +{ + bool cond_execution_cond_scg_r17_present; + HANDLE_CODE(bref.unpack(cond_execution_cond_scg_r17_present, 1)); + + HANDLE_CODE(unpack_integer(pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); + if (cond_execution_cond_scg_r17_present) { + HANDLE_CODE(cond_execution_cond_scg_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void candidate_cell_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r17", pci_r17); + if (cond_execution_cond_scg_r17.size() > 0) { + j.write_str("condExecutionCondSCG-r17", cond_execution_cond_scg_r17.to_string()); + } + j.end_obj(); } -// CandidateCellCPC-r17 ::= SEQUENCE -SRSASN_CODE candidate_cell_cp_c_r17_s::pack(bit_ref& bref) const +// CandidateCellInfo-r17 ::= SEQUENCE +SRSASN_CODE candidate_cell_info_r17_s::pack(bit_ref& bref) const { HANDLE_CODE(pack_integer(bref, ssb_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(pack_dyn_seq_of(bref, candidate_cell_list_r17, 1, 8, integer_packer(0, 1007))); + HANDLE_CODE(pack_dyn_seq_of(bref, candidate_list_r17, 1, 8)); return SRSASN_SUCCESS; } -SRSASN_CODE candidate_cell_cp_c_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE candidate_cell_info_r17_s::unpack(cbit_ref& bref) { HANDLE_CODE(unpack_integer(ssb_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(unpack_dyn_seq_of(candidate_cell_list_r17, bref, 1, 8, integer_packer(0, 1007))); + HANDLE_CODE(unpack_dyn_seq_of(candidate_list_r17, bref, 1, 8)); return SRSASN_SUCCESS; } -void candidate_cell_cp_c_r17_s::to_json(json_writer& j) const +void candidate_cell_info_r17_s::to_json(json_writer& j) const { j.start_obj(); j.write_int("ssbFrequency-r17", ssb_freq_r17); - j.start_array("candidateCellList-r17"); - for (const auto& e1 : candidate_cell_list_r17) { - j.write_int(e1); + j.start_array("candidateList-r17"); + for (const auto& e1 : candidate_list_r17) { + e1.to_json(j); } j.end_array(); j.end_obj(); } -// CG-ConfigInfo-v1730-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_info_v1730_ies_s::pack(bit_ref& bref) const +// CG-Config-v1730-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_v1730_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(fr1_carriers_mcg_r17_present, 1)); - HANDLE_CODE(bref.pack(fr2_carriers_mcg_r17_present, 1)); + HANDLE_CODE(bref.pack(fr1_carriers_scg_r17_present, 1)); + HANDLE_CODE(bref.pack(fr2_carriers_scg_r17_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (fr1_carriers_mcg_r17_present) { - HANDLE_CODE(pack_integer(bref, fr1_carriers_mcg_r17, (uint8_t)1u, (uint8_t)32u)); + if (fr1_carriers_scg_r17_present) { + HANDLE_CODE(pack_integer(bref, fr1_carriers_scg_r17, (uint8_t)1u, (uint8_t)32u)); } - if (fr2_carriers_mcg_r17_present) { - HANDLE_CODE(pack_integer(bref, fr2_carriers_mcg_r17, (uint8_t)1u, (uint8_t)32u)); + if (fr2_carriers_scg_r17_present) { + HANDLE_CODE(pack_integer(bref, fr2_carriers_scg_r17, (uint8_t)1u, (uint8_t)32u)); } return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_v1730_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_v1730_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(fr1_carriers_mcg_r17_present, 1)); - HANDLE_CODE(bref.unpack(fr2_carriers_mcg_r17_present, 1)); + HANDLE_CODE(bref.unpack(fr1_carriers_scg_r17_present, 1)); + HANDLE_CODE(bref.unpack(fr2_carriers_scg_r17_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (fr1_carriers_mcg_r17_present) { - HANDLE_CODE(unpack_integer(fr1_carriers_mcg_r17, bref, (uint8_t)1u, (uint8_t)32u)); + if (fr1_carriers_scg_r17_present) { + HANDLE_CODE(unpack_integer(fr1_carriers_scg_r17, bref, (uint8_t)1u, (uint8_t)32u)); } - if (fr2_carriers_mcg_r17_present) { - HANDLE_CODE(unpack_integer(fr2_carriers_mcg_r17, bref, (uint8_t)1u, (uint8_t)32u)); + if (fr2_carriers_scg_r17_present) { + HANDLE_CODE(unpack_integer(fr2_carriers_scg_r17, bref, (uint8_t)1u, (uint8_t)32u)); } return SRSASN_SUCCESS; } -void cg_cfg_info_v1730_ies_s::to_json(json_writer& j) const +void cg_cfg_v1730_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (fr1_carriers_mcg_r17_present) { - j.write_int("fr1-Carriers-MCG-r17", fr1_carriers_mcg_r17); + if (fr1_carriers_scg_r17_present) { + j.write_int("fr1-Carriers-SCG-r17", fr1_carriers_scg_r17); } - if (fr2_carriers_mcg_r17_present) { - j.write_int("fr2-Carriers-MCG-r17", fr2_carriers_mcg_r17); + if (fr2_carriers_scg_r17_present) { + j.write_int("fr2-Carriers-SCG-r17", fr2_carriers_scg_r17); } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); @@ -22286,16 +4448,15 @@ void cg_cfg_info_v1730_ies_s::to_json(json_writer& j) const j.end_obj(); } -// CG-ConfigInfo-v1700-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_info_v1700_ies_s::pack(bit_ref& bref) const +// CG-Config-v1700-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_v1700_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(candidate_cell_list_cp_c_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(two_phr_mode_mcg_r17_present, 1)); - HANDLE_CODE(bref.pack(low_mob_eval_connected_in_pcell_r17_present, 1)); + HANDLE_CODE(bref.pack(candidate_cell_info_list_cp_c_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(two_phr_mode_scg_r17_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (candidate_cell_list_cp_c_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, candidate_cell_list_cp_c_r17, 1, 8)); + if (candidate_cell_info_list_cp_c_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, candidate_cell_info_list_cp_c_r17, 1, 8)); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.pack(bref)); @@ -22303,16 +4464,15 @@ SRSASN_CODE cg_cfg_info_v1700_ies_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_v1700_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_v1700_ies_s::unpack(cbit_ref& bref) { - bool candidate_cell_list_cp_c_r17_present; - HANDLE_CODE(bref.unpack(candidate_cell_list_cp_c_r17_present, 1)); - HANDLE_CODE(bref.unpack(two_phr_mode_mcg_r17_present, 1)); - HANDLE_CODE(bref.unpack(low_mob_eval_connected_in_pcell_r17_present, 1)); + bool candidate_cell_info_list_cp_c_r17_present; + HANDLE_CODE(bref.unpack(candidate_cell_info_list_cp_c_r17_present, 1)); + HANDLE_CODE(bref.unpack(two_phr_mode_scg_r17_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (candidate_cell_list_cp_c_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(candidate_cell_list_cp_c_r17, bref, 1, 8)); + if (candidate_cell_info_list_cp_c_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(candidate_cell_info_list_cp_c_r17, bref, 1, 8)); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.unpack(bref)); @@ -22320,21 +4480,18 @@ SRSASN_CODE cg_cfg_info_v1700_ies_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void cg_cfg_info_v1700_ies_s::to_json(json_writer& j) const +void cg_cfg_v1700_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (candidate_cell_list_cp_c_r17.size() > 0) { - j.start_array("candidateCellListCPC-r17"); - for (const auto& e1 : candidate_cell_list_cp_c_r17) { + if (candidate_cell_info_list_cp_c_r17.size() > 0) { + j.start_array("candidateCellInfoListCPC-r17"); + for (const auto& e1 : candidate_cell_info_list_cp_c_r17) { e1.to_json(j); } j.end_array(); } - if (two_phr_mode_mcg_r17_present) { - j.write_str("twoPHRModeMCG-r17", "enabled"); - } - if (low_mob_eval_connected_in_pcell_r17_present) { - j.write_str("lowMobilityEvaluationConnectedInPCell-r17", "enabled"); + if (two_phr_mode_scg_r17_present) { + j.write_str("twoPHRModeSCG-r17", "enabled"); } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); @@ -22343,18 +4500,18 @@ void cg_cfg_info_v1700_ies_s::to_json(json_writer& j) const j.end_obj(); } -// CG-ConfigInfo-v1640-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_info_v1640_ies_s::pack(bit_ref& bref) const +// CG-Config-v1640-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_v1640_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(serv_cell_info_list_mcg_nr_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(serv_cell_info_list_mcg_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(serv_cell_info_list_scg_nr_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(serv_cell_info_list_scg_eutra_r16.size() > 0, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (serv_cell_info_list_mcg_nr_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, serv_cell_info_list_mcg_nr_r16, 1, 32)); + if (serv_cell_info_list_scg_nr_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, serv_cell_info_list_scg_nr_r16, 1, 32)); } - if (serv_cell_info_list_mcg_eutra_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, serv_cell_info_list_mcg_eutra_r16, 1, 32)); + if (serv_cell_info_list_scg_eutra_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, serv_cell_info_list_scg_eutra_r16, 1, 32)); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.pack(bref)); @@ -22362,19 +4519,19 @@ SRSASN_CODE cg_cfg_info_v1640_ies_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_v1640_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_v1640_ies_s::unpack(cbit_ref& bref) { - bool serv_cell_info_list_mcg_nr_r16_present; - HANDLE_CODE(bref.unpack(serv_cell_info_list_mcg_nr_r16_present, 1)); - bool serv_cell_info_list_mcg_eutra_r16_present; - HANDLE_CODE(bref.unpack(serv_cell_info_list_mcg_eutra_r16_present, 1)); + bool serv_cell_info_list_scg_nr_r16_present; + HANDLE_CODE(bref.unpack(serv_cell_info_list_scg_nr_r16_present, 1)); + bool serv_cell_info_list_scg_eutra_r16_present; + HANDLE_CODE(bref.unpack(serv_cell_info_list_scg_eutra_r16_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (serv_cell_info_list_mcg_nr_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(serv_cell_info_list_mcg_nr_r16, bref, 1, 32)); + if (serv_cell_info_list_scg_nr_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(serv_cell_info_list_scg_nr_r16, bref, 1, 32)); } - if (serv_cell_info_list_mcg_eutra_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(serv_cell_info_list_mcg_eutra_r16, bref, 1, 32)); + if (serv_cell_info_list_scg_eutra_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(serv_cell_info_list_scg_eutra_r16, bref, 1, 32)); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.unpack(bref)); @@ -22382,19 +4539,19 @@ SRSASN_CODE cg_cfg_info_v1640_ies_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void cg_cfg_info_v1640_ies_s::to_json(json_writer& j) const +void cg_cfg_v1640_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (serv_cell_info_list_mcg_nr_r16.size() > 0) { - j.start_array("servCellInfoListMCG-NR-r16"); - for (const auto& e1 : serv_cell_info_list_mcg_nr_r16) { + if (serv_cell_info_list_scg_nr_r16.size() > 0) { + j.start_array("servCellInfoListSCG-NR-r16"); + for (const auto& e1 : serv_cell_info_list_scg_nr_r16) { e1.to_json(j); } j.end_array(); } - if (serv_cell_info_list_mcg_eutra_r16.size() > 0) { - j.start_array("servCellInfoListMCG-EUTRA-r16"); - for (const auto& e1 : serv_cell_info_list_mcg_eutra_r16) { + if (serv_cell_info_list_scg_eutra_r16.size() > 0) { + j.start_array("servCellInfoListSCG-EUTRA-r16"); + for (const auto& e1 : serv_cell_info_list_scg_eutra_r16) { e1.to_json(j); } j.end_array(); @@ -22406,14 +4563,14 @@ void cg_cfg_info_v1640_ies_s::to_json(json_writer& j) const j.end_obj(); } -// CG-ConfigInfo-v1620-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_info_v1620_ies_s::pack(bit_ref& bref) const +// CG-Config-v1630-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_v1630_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ue_assist_info_source_scg_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sel_toffset_r16_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (ue_assist_info_source_scg_r16.size() > 0) { - HANDLE_CODE(ue_assist_info_source_scg_r16.pack(bref)); + if (sel_toffset_r16_present) { + HANDLE_CODE(sel_toffset_r16.pack(bref)); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.pack(bref)); @@ -22421,14 +4578,13 @@ SRSASN_CODE cg_cfg_info_v1620_ies_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_v1620_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_v1630_ies_s::unpack(cbit_ref& bref) { - bool ue_assist_info_source_scg_r16_present; - HANDLE_CODE(bref.unpack(ue_assist_info_source_scg_r16_present, 1)); + HANDLE_CODE(bref.unpack(sel_toffset_r16_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (ue_assist_info_source_scg_r16_present) { - HANDLE_CODE(ue_assist_info_source_scg_r16.unpack(bref)); + if (sel_toffset_r16_present) { + HANDLE_CODE(sel_toffset_r16.unpack(bref)); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.unpack(bref)); @@ -22436,11 +4592,11 @@ SRSASN_CODE cg_cfg_info_v1620_ies_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void cg_cfg_info_v1620_ies_s::to_json(json_writer& j) const +void cg_cfg_v1630_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (ue_assist_info_source_scg_r16.size() > 0) { - j.write_str("ueAssistanceInformationSourceSCG-r16", ue_assist_info_source_scg_r16.to_string()); + if (sel_toffset_r16_present) { + j.write_str("selectedToffset-r16", sel_toffset_r16.to_string()); } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); @@ -22449,33 +4605,14 @@ void cg_cfg_info_v1620_ies_s::to_json(json_writer& j) const j.end_obj(); } -// CG-ConfigInfo-v1610-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_info_v1610_ies_s::pack(bit_ref& bref) const +// CG-Config-v1620-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_v1620_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(drx_info_mcg2_present, 1)); - HANDLE_CODE(bref.pack(aligned_drx_ind_present, 1)); - HANDLE_CODE(bref.pack(scg_fail_info_r16_present, 1)); - HANDLE_CODE(bref.pack(dummy1_present, 1)); - HANDLE_CODE(bref.pack(sidelink_ue_info_nr_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sidelink_ue_info_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(ue_assist_info_scg_r16.size() > 0, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (drx_info_mcg2_present) { - HANDLE_CODE(drx_info_mcg2.pack(bref)); - } - if (scg_fail_info_r16_present) { - HANDLE_CODE(scg_fail_info_r16.fail_type_r16.pack(bref)); - HANDLE_CODE(scg_fail_info_r16.meas_result_scg_r16.pack(bref)); - } - if (dummy1_present) { - HANDLE_CODE(dummy1.fail_type_eutra_r16.pack(bref)); - HANDLE_CODE(dummy1.meas_result_scg_eutra_r16.pack(bref)); - } - if (sidelink_ue_info_nr_r16.size() > 0) { - HANDLE_CODE(sidelink_ue_info_nr_r16.pack(bref)); - } - if (sidelink_ue_info_eutra_r16.size() > 0) { - HANDLE_CODE(sidelink_ue_info_eutra_r16.pack(bref)); + if (ue_assist_info_scg_r16.size() > 0) { + HANDLE_CODE(ue_assist_info_scg_r16.pack(bref)); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.pack(bref)); @@ -22483,34 +4620,14 @@ SRSASN_CODE cg_cfg_info_v1610_ies_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_v1610_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_v1620_ies_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(drx_info_mcg2_present, 1)); - HANDLE_CODE(bref.unpack(aligned_drx_ind_present, 1)); - HANDLE_CODE(bref.unpack(scg_fail_info_r16_present, 1)); - HANDLE_CODE(bref.unpack(dummy1_present, 1)); - bool sidelink_ue_info_nr_r16_present; - HANDLE_CODE(bref.unpack(sidelink_ue_info_nr_r16_present, 1)); - bool sidelink_ue_info_eutra_r16_present; - HANDLE_CODE(bref.unpack(sidelink_ue_info_eutra_r16_present, 1)); + bool ue_assist_info_scg_r16_present; + HANDLE_CODE(bref.unpack(ue_assist_info_scg_r16_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (drx_info_mcg2_present) { - HANDLE_CODE(drx_info_mcg2.unpack(bref)); - } - if (scg_fail_info_r16_present) { - HANDLE_CODE(scg_fail_info_r16.fail_type_r16.unpack(bref)); - HANDLE_CODE(scg_fail_info_r16.meas_result_scg_r16.unpack(bref)); - } - if (dummy1_present) { - HANDLE_CODE(dummy1.fail_type_eutra_r16.unpack(bref)); - HANDLE_CODE(dummy1.meas_result_scg_eutra_r16.unpack(bref)); - } - if (sidelink_ue_info_nr_r16_present) { - HANDLE_CODE(sidelink_ue_info_nr_r16.unpack(bref)); - } - if (sidelink_ue_info_eutra_r16_present) { - HANDLE_CODE(sidelink_ue_info_eutra_r16.unpack(bref)); + if (ue_assist_info_scg_r16_present) { + HANDLE_CODE(ue_assist_info_scg_r16.unpack(bref)); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.unpack(bref)); @@ -22518,35 +4635,11 @@ SRSASN_CODE cg_cfg_info_v1610_ies_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void cg_cfg_info_v1610_ies_s::to_json(json_writer& j) const +void cg_cfg_v1620_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (drx_info_mcg2_present) { - j.write_fieldname("drx-InfoMCG2"); - drx_info_mcg2.to_json(j); - } - if (aligned_drx_ind_present) { - j.write_str("alignedDRX-Indication", "true"); - } - if (scg_fail_info_r16_present) { - j.write_fieldname("scgFailureInfo-r16"); - j.start_obj(); - j.write_str("failureType-r16", scg_fail_info_r16.fail_type_r16.to_string()); - j.write_str("measResultSCG-r16", scg_fail_info_r16.meas_result_scg_r16.to_string()); - j.end_obj(); - } - if (dummy1_present) { - j.write_fieldname("dummy1"); - j.start_obj(); - j.write_str("failureTypeEUTRA-r16", dummy1.fail_type_eutra_r16.to_string()); - j.write_str("measResultSCG-EUTRA-r16", dummy1.meas_result_scg_eutra_r16.to_string()); - j.end_obj(); - } - if (sidelink_ue_info_nr_r16.size() > 0) { - j.write_str("sidelinkUEInformationNR-r16", sidelink_ue_info_nr_r16.to_string()); - } - if (sidelink_ue_info_eutra_r16.size() > 0) { - j.write_str("sidelinkUEInformationEUTRA-r16", sidelink_ue_info_eutra_r16.to_string()); + if (ue_assist_info_scg_r16.size() > 0) { + j.write_str("ueAssistanceInformationSCG-r16", ue_assist_info_scg_r16.to_string()); } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); @@ -22555,56 +4648,14 @@ void cg_cfg_info_v1610_ies_s::to_json(json_writer& j) const j.end_obj(); } -const char* cg_cfg_info_v1610_ies_s::scg_fail_info_r16_s_::fail_type_r16_opts::to_string() const -{ - static const char* names[] = {"scg-lbtFailure-r16", - "beamFailureRecoveryFailure-r16", - "t312-Expiry-r16", - "bh-RLF-r16", - "beamFailure-r17", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 8, value, "cg_cfg_info_v1610_ies_s::scg_fail_info_r16_s_::fail_type_r16_e_"); -} -uint16_t cg_cfg_info_v1610_ies_s::scg_fail_info_r16_s_::fail_type_r16_opts::to_number() const -{ - if (value == t312_expiry_r16) { - return 312; - } - invalid_enum_number(value, "cg_cfg_info_v1610_ies_s::scg_fail_info_r16_s_::fail_type_r16_e_"); - return 0; -} - -const char* cg_cfg_info_v1610_ies_s::dummy1_s_::fail_type_eutra_r16_opts::to_string() const -{ - static const char* names[] = {"scg-lbtFailure-r16", - "beamFailureRecoveryFailure-r16", - "t312-Expiry-r16", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 8, value, "cg_cfg_info_v1610_ies_s::dummy1_s_::fail_type_eutra_r16_e_"); -} -uint16_t cg_cfg_info_v1610_ies_s::dummy1_s_::fail_type_eutra_r16_opts::to_number() const -{ - if (value == t312_expiry_r16) { - return 312; - } - invalid_enum_number(value, "cg_cfg_info_v1610_ies_s::dummy1_s_::fail_type_eutra_r16_e_"); - return 0; -} - -// CG-ConfigInfo-v1590-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_info_v1590_ies_s::pack(bit_ref& bref) const +// CG-Config-v1610-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_v1610_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(serv_frequencies_mn_nr.size() > 0, 1)); + HANDLE_CODE(bref.pack(drx_info_scg2_present, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (serv_frequencies_mn_nr.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, serv_frequencies_mn_nr, 1, 31, integer_packer(0, 3279165))); + if (drx_info_scg2_present) { + HANDLE_CODE(drx_info_scg2.pack(bref)); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.pack(bref)); @@ -22612,14 +4663,13 @@ SRSASN_CODE cg_cfg_info_v1590_ies_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_v1590_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_v1610_ies_s::unpack(cbit_ref& bref) { - bool serv_frequencies_mn_nr_present; - HANDLE_CODE(bref.unpack(serv_frequencies_mn_nr_present, 1)); + HANDLE_CODE(bref.unpack(drx_info_scg2_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))); + if (drx_info_scg2_present) { + HANDLE_CODE(drx_info_scg2.unpack(bref)); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.unpack(bref)); @@ -22627,15 +4677,12 @@ SRSASN_CODE cg_cfg_info_v1590_ies_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void cg_cfg_info_v1590_ies_s::to_json(json_writer& j) const +void cg_cfg_v1610_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (serv_frequencies_mn_nr.size() > 0) { - j.start_array("servFrequenciesMN-NR"); - for (const auto& e1 : serv_frequencies_mn_nr) { - j.write_int(e1); - } - j.end_array(); + if (drx_info_scg2_present) { + j.write_fieldname("drx-InfoSCG2"); + drx_info_scg2.to_json(j); } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); @@ -22644,51 +4691,51 @@ void cg_cfg_info_v1590_ies_s::to_json(json_writer& j) const j.end_obj(); } -// PH-UplinkCarrierMCG ::= SEQUENCE -SRSASN_CODE ph_ul_carrier_mcg_s::pack(bit_ref& bref) const +// PH-UplinkCarrierSCG ::= SEQUENCE +SRSASN_CODE ph_ul_carrier_scg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); HANDLE_CODE(ph_type1or3.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE ph_ul_carrier_mcg_s::unpack(cbit_ref& bref) +SRSASN_CODE ph_ul_carrier_scg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); HANDLE_CODE(ph_type1or3.unpack(bref)); return SRSASN_SUCCESS; } -void ph_ul_carrier_mcg_s::to_json(json_writer& j) const +void ph_ul_carrier_scg_s::to_json(json_writer& j) const { j.start_obj(); j.write_str("ph-Type1or3", ph_type1or3.to_string()); j.end_obj(); } -const char* ph_ul_carrier_mcg_s::ph_type1or3_opts::to_string() const +const char* ph_ul_carrier_scg_s::ph_type1or3_opts::to_string() const { static const char* names[] = {"type1", "type3"}; - return convert_enum_idx(names, 2, value, "ph_ul_carrier_mcg_s::ph_type1or3_e_"); + return convert_enum_idx(names, 2, value, "ph_ul_carrier_scg_s::ph_type1or3_e_"); } -uint8_t ph_ul_carrier_mcg_s::ph_type1or3_opts::to_number() const +uint8_t ph_ul_carrier_scg_s::ph_type1or3_opts::to_number() const { static const uint8_t numbers[] = {1, 3}; - return map_enum_number(numbers, 2, value, "ph_ul_carrier_mcg_s::ph_type1or3_e_"); + return map_enum_number(numbers, 2, value, "ph_ul_carrier_scg_s::ph_type1or3_e_"); } -// CG-ConfigInfo-v1570-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_info_v1570_ies_s::pack(bit_ref& bref) const +// CG-Config-v1590-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_v1590_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(sftd_freq_list_nr.size() > 0, 1)); - HANDLE_CODE(bref.pack(sftd_freq_list_eutra.size() > 0, 1)); + HANDLE_CODE(bref.pack(scell_frequencies_sn_nr.size() > 0, 1)); + HANDLE_CODE(bref.pack(scell_frequencies_sn_eutra.size() > 0, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (sftd_freq_list_nr.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sftd_freq_list_nr, 1, 3, integer_packer(0, 3279165))); + if (scell_frequencies_sn_nr.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, scell_frequencies_sn_nr, 1, 31, integer_packer(0, 3279165))); } - if (sftd_freq_list_eutra.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sftd_freq_list_eutra, 1, 3, integer_packer(0, 262143))); + if (scell_frequencies_sn_eutra.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, scell_frequencies_sn_eutra, 1, 31, integer_packer(0, 262143))); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.pack(bref)); @@ -22696,19 +4743,19 @@ SRSASN_CODE cg_cfg_info_v1570_ies_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_v1570_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_v1590_ies_s::unpack(cbit_ref& bref) { - bool sftd_freq_list_nr_present; - HANDLE_CODE(bref.unpack(sftd_freq_list_nr_present, 1)); - bool sftd_freq_list_eutra_present; - HANDLE_CODE(bref.unpack(sftd_freq_list_eutra_present, 1)); + bool scell_frequencies_sn_nr_present; + HANDLE_CODE(bref.unpack(scell_frequencies_sn_nr_present, 1)); + bool scell_frequencies_sn_eutra_present; + HANDLE_CODE(bref.unpack(scell_frequencies_sn_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 (scell_frequencies_sn_nr_present) { + HANDLE_CODE(unpack_dyn_seq_of(scell_frequencies_sn_nr, bref, 1, 31, 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 (scell_frequencies_sn_eutra_present) { + HANDLE_CODE(unpack_dyn_seq_of(scell_frequencies_sn_eutra, bref, 1, 31, integer_packer(0, 262143))); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.unpack(bref)); @@ -22716,19 +4763,19 @@ SRSASN_CODE cg_cfg_info_v1570_ies_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void cg_cfg_info_v1570_ies_s::to_json(json_writer& j) const +void cg_cfg_v1590_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (sftd_freq_list_nr.size() > 0) { - j.start_array("sftdFrequencyList-NR"); - for (const auto& e1 : sftd_freq_list_nr) { + if (scell_frequencies_sn_nr.size() > 0) { + j.start_array("scellFrequenciesSN-NR"); + for (const auto& e1 : scell_frequencies_sn_nr) { j.write_int(e1); } j.end_array(); } - if (sftd_freq_list_eutra.size() > 0) { - j.start_array("sftdFrequencyList-EUTRA"); - for (const auto& e1 : sftd_freq_list_eutra) { + if (scell_frequencies_sn_eutra.size() > 0) { + j.start_array("scellFrequenciesSN-EUTRA"); + for (const auto& e1 : scell_frequencies_sn_eutra) { j.write_int(e1); } j.end_array(); @@ -22740,8 +4787,8 @@ void cg_cfg_info_v1570_ies_s::to_json(json_writer& j) const j.end_obj(); } -// PH-InfoMCG ::= SEQUENCE -SRSASN_CODE ph_info_mcg_s::pack(bit_ref& bref) const +// PH-InfoSCG ::= SEQUENCE +SRSASN_CODE ph_info_scg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); HANDLE_CODE(bref.pack(ph_supplementary_ul_present, 1)); @@ -22765,7 +4812,7 @@ SRSASN_CODE ph_info_mcg_s::pack(bit_ref& bref) const } return SRSASN_SUCCESS; } -SRSASN_CODE ph_info_mcg_s::unpack(cbit_ref& bref) +SRSASN_CODE ph_info_scg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); HANDLE_CODE(bref.unpack(ph_supplementary_ul_present, 1)); @@ -22788,7 +4835,7 @@ SRSASN_CODE ph_info_mcg_s::unpack(cbit_ref& bref) } return SRSASN_SUCCESS; } -void ph_info_mcg_s::to_json(json_writer& j) const +void ph_info_scg_s::to_json(json_writer& j) const { j.start_obj(); j.write_int("servCellIndex", serv_cell_idx); @@ -22806,46 +4853,43 @@ 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 +// CG-Config-v1560-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_v1560_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(candidate_cell_info_list_mn_eutra.size() > 0, 1)); + HANDLE_CODE(bref.pack(pscell_freq_eutra_present, 1)); + HANDLE_CODE(bref.pack(scg_cell_group_cfg_eutra.size() > 0, 1)); HANDLE_CODE(bref.pack(candidate_cell_info_list_sn_eutra.size() > 0, 1)); - HANDLE_CODE(bref.pack(source_cfg_scg_eutra.size() > 0, 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(fr_info_list_mcg.size() > 0, 1)); + HANDLE_CODE(bref.pack(candidate_serving_freq_list_eutra.size() > 0, 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 (candidate_cell_info_list_mn_eutra.size() > 0) { - HANDLE_CODE(candidate_cell_info_list_mn_eutra.pack(bref)); + 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.size() > 0) { + HANDLE_CODE(scg_cell_group_cfg_eutra.pack(bref)); } if (candidate_cell_info_list_sn_eutra.size() > 0) { HANDLE_CODE(candidate_cell_info_list_sn_eutra.pack(bref)); } - if (source_cfg_scg_eutra.size() > 0) { - 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 (candidate_serving_freq_list_eutra.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, candidate_serving_freq_list_eutra, 1, 32, integer_packer(0, 262143))); } - if (meas_result_cell_list_sftd_eutra.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_cell_list_sftd_eutra, 1, 3)); + if (drx_cfg_scg_present) { + HANDLE_CODE(drx_cfg_scg.pack(bref)); } - if (fr_info_list_mcg.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, fr_info_list_mcg, 1, 31)); + 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)); @@ -22853,50 +4897,45 @@ SRSASN_CODE cg_cfg_info_v1560_ies_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_v1560_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_v1560_ies_s::unpack(cbit_ref& bref) { - bool candidate_cell_info_list_mn_eutra_present; - HANDLE_CODE(bref.unpack(candidate_cell_info_list_mn_eutra_present, 1)); + HANDLE_CODE(bref.unpack(pscell_freq_eutra_present, 1)); + bool scg_cell_group_cfg_eutra_present; + HANDLE_CODE(bref.unpack(scg_cell_group_cfg_eutra_present, 1)); bool candidate_cell_info_list_sn_eutra_present; HANDLE_CODE(bref.unpack(candidate_cell_info_list_sn_eutra_present, 1)); - bool source_cfg_scg_eutra_present; - 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)); - bool meas_result_cell_list_sftd_eutra_present; - HANDLE_CODE(bref.unpack(meas_result_cell_list_sftd_eutra_present, 1)); - bool fr_info_list_mcg_present; - HANDLE_CODE(bref.unpack(fr_info_list_mcg_present, 1)); + bool candidate_serving_freq_list_eutra_present; + 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 (candidate_cell_info_list_mn_eutra_present) { - HANDLE_CODE(candidate_cell_info_list_mn_eutra.unpack(bref)); + 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 (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 (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 (meas_result_cell_list_sftd_eutra_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_cell_list_sftd_eutra, bref, 1, 3)); + if (drx_cfg_scg_present) { + HANDLE_CODE(drx_cfg_scg.unpack(bref)); } - if (fr_info_list_mcg_present) { - HANDLE_CODE(unpack_dyn_seq_of(fr_info_list_mcg, bref, 1, 31)); + 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)); @@ -22904,51 +4943,44 @@ SRSASN_CODE cg_cfg_info_v1560_ies_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void cg_cfg_info_v1560_ies_s::to_json(json_writer& j) const +void cg_cfg_v1560_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (candidate_cell_info_list_mn_eutra.size() > 0) { - j.write_str("candidateCellInfoListMN-EUTRA", candidate_cell_info_list_mn_eutra.to_string()); + if (pscell_freq_eutra_present) { + j.write_int("pSCellFrequencyEUTRA", pscell_freq_eutra); + } + if (scg_cell_group_cfg_eutra.size() > 0) { + j.write_str("scg-CellGroupConfigEUTRA", scg_cell_group_cfg_eutra.to_string()); } if (candidate_cell_info_list_sn_eutra.size() > 0) { j.write_str("candidateCellInfoListSN-EUTRA", candidate_cell_info_list_sn_eutra.to_string()); } - if (source_cfg_scg_eutra.size() > 0) { - j.write_str("sourceConfigSCG-EUTRA", source_cfg_scg_eutra.to_string()); + if (candidate_serving_freq_list_eutra.size() > 0) { + j.start_array("candidateServingFreqListEUTRA"); + for (const auto& e1 : candidate_serving_freq_list_eutra) { + j.write_int(e1); + } + j.end_array(); } - 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 (need_for_gaps_present) { + j.write_str("needForGaps", "true"); } - if (drx_cfg_mcg_present) { - j.write_fieldname("drx-ConfigMCG"); - drx_cfg_mcg.to_json(j); + if (drx_cfg_scg_present) { + j.write_fieldname("drx-ConfigSCG"); + drx_cfg_scg.to_json(j); } - if (meas_result_report_cgi_eutra_present) { - j.write_fieldname("measResultReportCGI-EUTRA"); + if (report_cgi_request_eutra_present) { + j.write_fieldname("reportCGI-RequestEUTRA"); 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.size() > 0) { - 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.size() > 0) { - j.start_array("fr-InfoListMCG"); - for (const auto& e1 : fr_info_list_mcg) { - e1.to_json(j); + 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_array(); + j.end_obj(); } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); @@ -22957,31 +4989,28 @@ void cg_cfg_info_v1560_ies_s::to_json(json_writer& j) const j.end_obj(); } -const char* cg_cfg_info_v1560_ies_s::scg_fail_info_eutra_s_::fail_type_eutra_opts::to_string() const -{ - static const char* names[] = {"t313-Expiry", "randomAccessProblem", "rlc-MaxNumRetx", "scg-ChangeFailure"}; - return convert_enum_idx(names, 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 numbers[] = {313}; - return map_enum_number(numbers, 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 +// CG-Config-v1540-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_v1540_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ph_info_mcg.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_report_cgi_present, 1)); + HANDLE_CODE(bref.pack(pscell_freq_present, 1)); + HANDLE_CODE(bref.pack(report_cgi_request_nr_present, 1)); + HANDLE_CODE(bref.pack(ph_info_scg.size() > 0, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (ph_info_mcg.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, ph_info_mcg, 1, 32)); + if (pscell_freq_present) { + HANDLE_CODE(pack_integer(bref, pscell_freq, (uint32_t)0u, (uint32_t)3279165u)); + } + 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_nr.requested_cell_info.ssb_freq, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(pack_integer( + bref, report_cgi_request_nr.requested_cell_info.cell_for_which_to_report_cgi, (uint16_t)0u, (uint16_t)1007u)); + } } - if (meas_result_report_cgi_present) { - HANDLE_CODE(pack_integer(bref, meas_result_report_cgi.ssb_freq, (uint32_t)0u, (uint32_t)3279165u)); - 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 (ph_info_scg.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, ph_info_scg, 1, 32)); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.pack(bref)); @@ -22989,21 +5018,28 @@ SRSASN_CODE cg_cfg_info_v1540_ies_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_v1540_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_v1540_ies_s::unpack(cbit_ref& bref) { - bool ph_info_mcg_present; - HANDLE_CODE(bref.unpack(ph_info_mcg_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_report_cgi_present, 1)); + HANDLE_CODE(bref.unpack(pscell_freq_present, 1)); + HANDLE_CODE(bref.unpack(report_cgi_request_nr_present, 1)); + bool ph_info_scg_present; + HANDLE_CODE(bref.unpack(ph_info_scg_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (ph_info_mcg_present) { - HANDLE_CODE(unpack_dyn_seq_of(ph_info_mcg, bref, 1, 32)); + if (pscell_freq_present) { + HANDLE_CODE(unpack_integer(pscell_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); } - if (meas_result_report_cgi_present) { - HANDLE_CODE(unpack_integer(meas_result_report_cgi.ssb_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE( - 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 (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_nr.requested_cell_info.ssb_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(unpack_integer( + 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)); @@ -23011,25 +5047,31 @@ SRSASN_CODE cg_cfg_info_v1540_ies_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void cg_cfg_info_v1540_ies_s::to_json(json_writer& j) const +void cg_cfg_v1540_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (ph_info_mcg.size() > 0) { - j.start_array("ph-InfoMCG"); - for (const auto& e1 : ph_info_mcg) { - e1.to_json(j); - } - j.end_array(); + if (pscell_freq_present) { + j.write_int("pSCellFrequency", pscell_freq); } - if (meas_result_report_cgi_present) { - j.write_fieldname("measResultReportCGI"); + if (report_cgi_request_nr_present) { + j.write_fieldname("reportCGI-RequestNR"); j.start_obj(); - j.write_int("ssbFrequency", meas_result_report_cgi.ssb_freq); - j.write_int("cellForWhichToReportCGI", meas_result_report_cgi.cell_for_which_to_report_cgi); - j.write_fieldname("cgi-Info"); - meas_result_report_cgi.cgi_info.to_json(j); + if (report_cgi_request_nr.requested_cell_info_present) { + j.write_fieldname("requestedCellInfo"); + j.start_obj(); + 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(); } + if (ph_info_scg.size() > 0) { + j.start_array("ph-InfoSCG"); + for (const auto& e1 : ph_info_scg) { + e1.to_json(j); + } + j.end_array(); + } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); non_crit_ext.to_json(j); @@ -23037,142 +5079,76 @@ void cg_cfg_info_v1540_ies_s::to_json(json_writer& j) const j.end_obj(); } -// MRDC-AssistanceInfo ::= SEQUENCE -SRSASN_CODE mrdc_assist_info_s::pack(bit_ref& bref) const +// ConfigRestrictModReqSCG ::= SEQUENCE +SRSASN_CODE cfg_restrict_mod_req_scg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_comb_info_list_mrdc, 1, 128)); + HANDLE_CODE(bref.pack(requested_bc_mrdc_present, 1)); + HANDLE_CODE(bref.pack(requested_p_max_fr1_present, 1)); + + if (requested_bc_mrdc_present) { + HANDLE_CODE(requested_bc_mrdc.pack(bref)); + } + if (requested_p_max_fr1_present) { + 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] |= overheat_assist_scg_r16.size() > 0; - group_flags[1] |= overheat_assist_scg_fr2_2_r17.size() > 0; + group_flags[0] |= requested_pdcch_blind_detection_scg_present; + group_flags[0] |= requested_p_max_eutra_present; + group_flags[1] |= requested_p_max_fr2_r16_present; + group_flags[1] |= requested_max_inter_freq_meas_id_scg_r16_present; + group_flags[1] |= requested_max_intra_freq_meas_id_scg_r16_present; + group_flags[1] |= requested_toffset_r16_present; group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(overheat_assist_scg_r16.size() > 0, 1)); - if (overheat_assist_scg_r16.size() > 0) { - HANDLE_CODE(overheat_assist_scg_r16.pack(bref)); + 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)); } } if (group_flags[1]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(overheat_assist_scg_fr2_2_r17.size() > 0, 1)); - if (overheat_assist_scg_fr2_2_r17.size() > 0) { - HANDLE_CODE(overheat_assist_scg_fr2_2_r17.pack(bref)); + HANDLE_CODE(bref.pack(requested_p_max_fr2_r16_present, 1)); + HANDLE_CODE(bref.pack(requested_max_inter_freq_meas_id_scg_r16_present, 1)); + HANDLE_CODE(bref.pack(requested_max_intra_freq_meas_id_scg_r16_present, 1)); + HANDLE_CODE(bref.pack(requested_toffset_r16_present, 1)); + if (requested_p_max_fr2_r16_present) { + HANDLE_CODE(pack_integer(bref, requested_p_max_fr2_r16, (int8_t)-30, (int8_t)33)); } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE mrdc_assist_info_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_info_list_mrdc, bref, 1, 128)); - - 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 overheat_assist_scg_r16_present; - HANDLE_CODE(bref.unpack(overheat_assist_scg_r16_present, 1)); - if (overheat_assist_scg_r16_present) { - HANDLE_CODE(overheat_assist_scg_r16.unpack(bref)); + if (requested_max_inter_freq_meas_id_scg_r16_present) { + HANDLE_CODE(pack_integer(bref, requested_max_inter_freq_meas_id_scg_r16, (uint8_t)1u, (uint8_t)62u)); } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - bool overheat_assist_scg_fr2_2_r17_present; - HANDLE_CODE(bref.unpack(overheat_assist_scg_fr2_2_r17_present, 1)); - if (overheat_assist_scg_fr2_2_r17_present) { - HANDLE_CODE(overheat_assist_scg_fr2_2_r17.unpack(bref)); + if (requested_max_intra_freq_meas_id_scg_r16_present) { + HANDLE_CODE(pack_integer(bref, requested_max_intra_freq_meas_id_scg_r16, (uint8_t)1u, (uint8_t)62u)); } - } - } - return SRSASN_SUCCESS; -} -void mrdc_assist_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("affectedCarrierFreqCombInfoListMRDC"); - for (const auto& e1 : affected_carrier_freq_comb_info_list_mrdc) { - e1.to_json(j); - } - j.end_array(); - if (ext) { - if (overheat_assist_scg_r16.size() > 0) { - j.write_str("overheatingAssistanceSCG-r16", overheat_assist_scg_r16.to_string()); - } - if (overheat_assist_scg_fr2_2_r17.size() > 0) { - j.write_str("overheatingAssistanceSCG-FR2-2-r17", overheat_assist_scg_fr2_2_r17.to_string()); - } - } - j.end_obj(); -} - -// MeasConfigMN ::= SEQUENCE -SRSASN_CODE meas_cfg_mn_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(measured_frequencies_mn.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_gap_cfg_present, 1)); - HANDLE_CODE(bref.pack(gap_purpose_present, 1)); - - if (measured_frequencies_mn.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, measured_frequencies_mn, 1, 32)); - } - if (meas_gap_cfg_present) { - HANDLE_CODE(meas_gap_cfg.pack(bref)); - } - if (gap_purpose_present) { - 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[1] |= inter_freq_no_gap_r16_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)); + if (requested_toffset_r16_present) { + HANDLE_CODE(requested_toffset_r16.pack(bref)); } } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(inter_freq_no_gap_r16_present, 1)); - } } return SRSASN_SUCCESS; } -SRSASN_CODE meas_cfg_mn_s::unpack(cbit_ref& bref) +SRSASN_CODE cfg_restrict_mod_req_scg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - bool measured_frequencies_mn_present; - HANDLE_CODE(bref.unpack(measured_frequencies_mn_present, 1)); - HANDLE_CODE(bref.unpack(meas_gap_cfg_present, 1)); - HANDLE_CODE(bref.unpack(gap_purpose_present, 1)); + HANDLE_CODE(bref.unpack(requested_bc_mrdc_present, 1)); + HANDLE_CODE(bref.unpack(requested_p_max_fr1_present, 1)); - if (measured_frequencies_mn_present) { - HANDLE_CODE(unpack_dyn_seq_of(measured_frequencies_mn, bref, 1, 32)); - } - if (meas_gap_cfg_present) { - HANDLE_CODE(meas_gap_cfg.unpack(bref)); + if (requested_bc_mrdc_present) { + HANDLE_CODE(requested_bc_mrdc.unpack(bref)); } - if (gap_purpose_present) { - HANDLE_CODE(gap_purpose.unpack(bref)); + if (requested_p_max_fr1_present) { + HANDLE_CODE(unpack_integer(requested_p_max_fr1, bref, (int8_t)-30, (int8_t)33)); } if (ext) { @@ -23182,115 +5158,148 @@ SRSASN_CODE meas_cfg_mn_s::unpack(cbit_ref& bref) if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - unpack_presence_flag(meas_gap_cfg_fr2, bref); - if (meas_gap_cfg_fr2.is_present()) { - HANDLE_CODE(meas_gap_cfg_fr2->unpack(bref)); + 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)); } } if (group_flags[1]) { varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.unpack(inter_freq_no_gap_r16_present, 1)); + HANDLE_CODE(bref.unpack(requested_p_max_fr2_r16_present, 1)); + HANDLE_CODE(bref.unpack(requested_max_inter_freq_meas_id_scg_r16_present, 1)); + HANDLE_CODE(bref.unpack(requested_max_intra_freq_meas_id_scg_r16_present, 1)); + HANDLE_CODE(bref.unpack(requested_toffset_r16_present, 1)); + if (requested_p_max_fr2_r16_present) { + HANDLE_CODE(unpack_integer(requested_p_max_fr2_r16, bref, (int8_t)-30, (int8_t)33)); + } + if (requested_max_inter_freq_meas_id_scg_r16_present) { + HANDLE_CODE(unpack_integer(requested_max_inter_freq_meas_id_scg_r16, bref, (uint8_t)1u, (uint8_t)62u)); + } + if (requested_max_intra_freq_meas_id_scg_r16_present) { + HANDLE_CODE(unpack_integer(requested_max_intra_freq_meas_id_scg_r16, bref, (uint8_t)1u, (uint8_t)62u)); + } + if (requested_toffset_r16_present) { + HANDLE_CODE(requested_toffset_r16.unpack(bref)); + } } } return SRSASN_SUCCESS; } -void meas_cfg_mn_s::to_json(json_writer& j) const +void cfg_restrict_mod_req_scg_s::to_json(json_writer& j) const { j.start_obj(); - if (measured_frequencies_mn.size() > 0) { - j.start_array("measuredFrequenciesMN"); - for (const auto& e1 : measured_frequencies_mn) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_gap_cfg_present) { - j.write_fieldname("measGapConfig"); - meas_gap_cfg.to_json(j); + if (requested_bc_mrdc_present) { + j.write_fieldname("requestedBC-MRDC"); + requested_bc_mrdc.to_json(j); } - if (gap_purpose_present) { - j.write_str("gapPurpose", gap_purpose.to_string()); + if (requested_p_max_fr1_present) { + j.write_int("requestedP-MaxFR1", requested_p_max_fr1); } if (ext) { - if (meas_gap_cfg_fr2.is_present()) { - j.write_fieldname("measGapConfigFR2"); - meas_gap_cfg_fr2->to_json(j); + 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); + } + if (requested_p_max_fr2_r16_present) { + j.write_int("requestedP-MaxFR2-r16", requested_p_max_fr2_r16); + } + if (requested_max_inter_freq_meas_id_scg_r16_present) { + j.write_int("requestedMaxInterFreqMeasIdSCG-r16", requested_max_inter_freq_meas_id_scg_r16); + } + if (requested_max_intra_freq_meas_id_scg_r16_present) { + j.write_int("requestedMaxIntraFreqMeasIdSCG-r16", requested_max_intra_freq_meas_id_scg_r16); } - if (inter_freq_no_gap_r16_present) { - j.write_str("interFreqNoGap-r16", "true"); + if (requested_toffset_r16_present) { + j.write_str("requestedToffset-r16", requested_toffset_r16.to_string()); } } j.end_obj(); } -const char* meas_cfg_mn_s::gap_purpose_opts::to_string() const +// MeasConfigSN ::= SEQUENCE +SRSASN_CODE meas_cfg_sn_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(measured_frequencies_sn.size() > 0, 1)); + + if (measured_frequencies_sn.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, measured_frequencies_sn, 1, 32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_cfg_sn_s::unpack(cbit_ref& bref) { - static const char* names[] = {"perUE", "perFR1"}; - return convert_enum_idx(names, 2, value, "meas_cfg_mn_s::gap_purpose_e_"); + bref.unpack(ext, 1); + bool measured_frequencies_sn_present; + HANDLE_CODE(bref.unpack(measured_frequencies_sn_present, 1)); + + if (measured_frequencies_sn_present) { + HANDLE_CODE(unpack_dyn_seq_of(measured_frequencies_sn, bref, 1, 32)); + } + + return SRSASN_SUCCESS; } -uint8_t meas_cfg_mn_s::gap_purpose_opts::to_number() const +void meas_cfg_sn_s::to_json(json_writer& j) const { - if (value == per_fr1) { - return 1; + j.start_obj(); + if (measured_frequencies_sn.size() > 0) { + j.start_array("measuredFrequenciesSN"); + for (const auto& e1 : measured_frequencies_sn) { + e1.to_json(j); + } + j.end_array(); } - invalid_enum_number(value, "meas_cfg_mn_s::gap_purpose_e_"); - return 0; + j.end_obj(); } -// CG-ConfigInfo-IEs ::= SEQUENCE -SRSASN_CODE cg_cfg_info_ies_s::pack(bit_ref& bref) const +// CG-Config-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_ies_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(ue_cap_info.size() > 0, 1)); - HANDLE_CODE(bref.pack(candidate_cell_info_list_mn.size() > 0, 1)); - HANDLE_CODE(bref.pack(candidate_cell_info_list_sn.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_cell_list_sftd_nr.size() > 0, 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)); - HANDLE_CODE(bref.pack(meas_cfg_mn_present, 1)); - HANDLE_CODE(bref.pack(source_cfg_scg.size() > 0, 1)); + HANDLE_CODE(bref.pack(scg_cell_group_cfg.size() > 0, 1)); HANDLE_CODE(bref.pack(scg_rb_cfg.size() > 0, 1)); - HANDLE_CODE(bref.pack(mcg_rb_cfg.size() > 0, 1)); - HANDLE_CODE(bref.pack(mrdc_assist_info_present, 1)); + HANDLE_CODE(bref.pack(cfg_restrict_mod_req_present, 1)); + HANDLE_CODE(bref.pack(drx_info_scg_present, 1)); + HANDLE_CODE(bref.pack(candidate_cell_info_list_sn.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_cfg_sn_present, 1)); + HANDLE_CODE(bref.pack(sel_band_combination_present, 1)); + HANDLE_CODE(bref.pack(fr_info_list_scg.size() > 0, 1)); + HANDLE_CODE(bref.pack(candidate_serving_freq_list_nr.size() > 0, 1)); HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - if (ue_cap_info.size() > 0) { - HANDLE_CODE(ue_cap_info.pack(bref)); - } - if (candidate_cell_info_list_mn.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, candidate_cell_info_list_mn, 1, 8)); - } - if (candidate_cell_info_list_sn.size() > 0) { - HANDLE_CODE(candidate_cell_info_list_sn.pack(bref)); - } - if (meas_result_cell_list_sftd_nr.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_cell_list_sftd_nr, 1, 3)); + if (scg_cell_group_cfg.size() > 0) { + HANDLE_CODE(scg_cell_group_cfg.pack(bref)); } - if (scg_fail_info_present) { - HANDLE_CODE(scg_fail_info.fail_type.pack(bref)); - HANDLE_CODE(scg_fail_info.meas_result_scg.pack(bref)); + if (scg_rb_cfg.size() > 0) { + HANDLE_CODE(scg_rb_cfg.pack(bref)); } - if (cfg_restrict_info_present) { - HANDLE_CODE(cfg_restrict_info.pack(bref)); + if (cfg_restrict_mod_req_present) { + HANDLE_CODE(cfg_restrict_mod_req.pack(bref)); } - if (drx_info_mcg_present) { - HANDLE_CODE(drx_info_mcg.pack(bref)); + if (drx_info_scg_present) { + HANDLE_CODE(drx_info_scg.pack(bref)); } - if (meas_cfg_mn_present) { - HANDLE_CODE(meas_cfg_mn.pack(bref)); + if (candidate_cell_info_list_sn.size() > 0) { + HANDLE_CODE(candidate_cell_info_list_sn.pack(bref)); } - if (source_cfg_scg.size() > 0) { - HANDLE_CODE(source_cfg_scg.pack(bref)); + if (meas_cfg_sn_present) { + HANDLE_CODE(meas_cfg_sn.pack(bref)); } - if (scg_rb_cfg.size() > 0) { - HANDLE_CODE(scg_rb_cfg.pack(bref)); + if (sel_band_combination_present) { + HANDLE_CODE(sel_band_combination.pack(bref)); } - if (mcg_rb_cfg.size() > 0) { - HANDLE_CODE(mcg_rb_cfg.pack(bref)); + if (fr_info_list_scg.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, fr_info_list_scg, 1, 31)); } - if (mrdc_assist_info_present) { - HANDLE_CODE(mrdc_assist_info.pack(bref)); + if (candidate_serving_freq_list_nr.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, candidate_serving_freq_list_nr, 1, 32, integer_packer(0, 3279165))); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.pack(bref)); @@ -23298,65 +5307,50 @@ SRSASN_CODE cg_cfg_info_ies_s::pack(bit_ref& bref) const return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_ies_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_ies_s::unpack(cbit_ref& bref) { - bool ue_cap_info_present; - HANDLE_CODE(bref.unpack(ue_cap_info_present, 1)); - bool candidate_cell_info_list_mn_present; - HANDLE_CODE(bref.unpack(candidate_cell_info_list_mn_present, 1)); - bool candidate_cell_info_list_sn_present; - HANDLE_CODE(bref.unpack(candidate_cell_info_list_sn_present, 1)); - bool meas_result_cell_list_sftd_nr_present; - 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)); - HANDLE_CODE(bref.unpack(meas_cfg_mn_present, 1)); - bool source_cfg_scg_present; - HANDLE_CODE(bref.unpack(source_cfg_scg_present, 1)); + bool scg_cell_group_cfg_present; + HANDLE_CODE(bref.unpack(scg_cell_group_cfg_present, 1)); bool scg_rb_cfg_present; HANDLE_CODE(bref.unpack(scg_rb_cfg_present, 1)); - bool mcg_rb_cfg_present; - HANDLE_CODE(bref.unpack(mcg_rb_cfg_present, 1)); - HANDLE_CODE(bref.unpack(mrdc_assist_info_present, 1)); + HANDLE_CODE(bref.unpack(cfg_restrict_mod_req_present, 1)); + HANDLE_CODE(bref.unpack(drx_info_scg_present, 1)); + bool candidate_cell_info_list_sn_present; + 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_present, 1)); + bool fr_info_list_scg_present; + HANDLE_CODE(bref.unpack(fr_info_list_scg_present, 1)); + bool candidate_serving_freq_list_nr_present; + HANDLE_CODE(bref.unpack(candidate_serving_freq_list_nr_present, 1)); HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - if (ue_cap_info_present) { - HANDLE_CODE(ue_cap_info.unpack(bref)); - } - if (candidate_cell_info_list_mn_present) { - HANDLE_CODE(unpack_dyn_seq_of(candidate_cell_info_list_mn, bref, 1, 8)); - } - if (candidate_cell_info_list_sn_present) { - HANDLE_CODE(candidate_cell_info_list_sn.unpack(bref)); - } - 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_cell_group_cfg_present) { + HANDLE_CODE(scg_cell_group_cfg.unpack(bref)); } - if (scg_fail_info_present) { - HANDLE_CODE(scg_fail_info.fail_type.unpack(bref)); - HANDLE_CODE(scg_fail_info.meas_result_scg.unpack(bref)); + if (scg_rb_cfg_present) { + HANDLE_CODE(scg_rb_cfg.unpack(bref)); } - if (cfg_restrict_info_present) { - HANDLE_CODE(cfg_restrict_info.unpack(bref)); + if (cfg_restrict_mod_req_present) { + HANDLE_CODE(cfg_restrict_mod_req.unpack(bref)); } - if (drx_info_mcg_present) { - HANDLE_CODE(drx_info_mcg.unpack(bref)); + if (drx_info_scg_present) { + HANDLE_CODE(drx_info_scg.unpack(bref)); } - if (meas_cfg_mn_present) { - HANDLE_CODE(meas_cfg_mn.unpack(bref)); + if (candidate_cell_info_list_sn_present) { + HANDLE_CODE(candidate_cell_info_list_sn.unpack(bref)); } - if (source_cfg_scg_present) { - HANDLE_CODE(source_cfg_scg.unpack(bref)); + if (meas_cfg_sn_present) { + HANDLE_CODE(meas_cfg_sn.unpack(bref)); } - if (scg_rb_cfg_present) { - HANDLE_CODE(scg_rb_cfg.unpack(bref)); + if (sel_band_combination_present) { + HANDLE_CODE(sel_band_combination.unpack(bref)); } - if (mcg_rb_cfg_present) { - HANDLE_CODE(mcg_rb_cfg.unpack(bref)); + if (fr_info_list_scg_present) { + HANDLE_CODE(unpack_dyn_seq_of(fr_info_list_scg, bref, 1, 31)); } - if (mrdc_assist_info_present) { - HANDLE_CODE(mrdc_assist_info.unpack(bref)); + if (candidate_serving_freq_list_nr_present) { + HANDLE_CODE(unpack_dyn_seq_of(candidate_serving_freq_list_nr, bref, 1, 32, integer_packer(0, 3279165))); } if (non_crit_ext_present) { HANDLE_CODE(non_crit_ext.unpack(bref)); @@ -23364,60 +5358,47 @@ SRSASN_CODE cg_cfg_info_ies_s::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void cg_cfg_info_ies_s::to_json(json_writer& j) const +void cg_cfg_ies_s::to_json(json_writer& j) const { j.start_obj(); - if (ue_cap_info.size() > 0) { - j.write_str("ue-CapabilityInfo", ue_cap_info.to_string()); + if (scg_cell_group_cfg.size() > 0) { + j.write_str("scg-CellGroupConfig", scg_cell_group_cfg.to_string()); } - if (candidate_cell_info_list_mn.size() > 0) { - j.start_array("candidateCellInfoListMN"); - for (const auto& e1 : candidate_cell_info_list_mn) { - e1.to_json(j); - } - j.end_array(); + if (scg_rb_cfg.size() > 0) { + j.write_str("scg-RB-Config", scg_rb_cfg.to_string()); + } + if (cfg_restrict_mod_req_present) { + j.write_fieldname("configRestrictModReq"); + cfg_restrict_mod_req.to_json(j); + } + if (drx_info_scg_present) { + j.write_fieldname("drx-InfoSCG"); + drx_info_scg.to_json(j); } if (candidate_cell_info_list_sn.size() > 0) { j.write_str("candidateCellInfoListSN", candidate_cell_info_list_sn.to_string()); } - if (meas_result_cell_list_sftd_nr.size() > 0) { - j.start_array("measResultCellListSFTD-NR"); - for (const auto& e1 : meas_result_cell_list_sftd_nr) { + if (meas_cfg_sn_present) { + j.write_fieldname("measConfigSN"); + meas_cfg_sn.to_json(j); + } + if (sel_band_combination_present) { + j.write_fieldname("selectedBandCombination"); + sel_band_combination.to_json(j); + } + if (fr_info_list_scg.size() > 0) { + j.start_array("fr-InfoListSCG"); + for (const auto& e1 : fr_info_list_scg) { e1.to_json(j); } j.end_array(); } - if (scg_fail_info_present) { - j.write_fieldname("scgFailureInfo"); - j.start_obj(); - j.write_str("failureType", scg_fail_info.fail_type.to_string()); - j.write_str("measResultSCG", scg_fail_info.meas_result_scg.to_string()); - j.end_obj(); - } - if (cfg_restrict_info_present) { - j.write_fieldname("configRestrictInfo"); - cfg_restrict_info.to_json(j); - } - if (drx_info_mcg_present) { - j.write_fieldname("drx-InfoMCG"); - drx_info_mcg.to_json(j); - } - if (meas_cfg_mn_present) { - j.write_fieldname("measConfigMN"); - meas_cfg_mn.to_json(j); - } - if (source_cfg_scg.size() > 0) { - j.write_str("sourceConfigSCG", source_cfg_scg.to_string()); - } - if (scg_rb_cfg.size() > 0) { - j.write_str("scg-RB-Config", scg_rb_cfg.to_string()); - } - if (mcg_rb_cfg.size() > 0) { - j.write_str("mcg-RB-Config", mcg_rb_cfg.to_string()); - } - if (mrdc_assist_info_present) { - j.write_fieldname("mrdc-AssistanceInfo"); - mrdc_assist_info.to_json(j); + if (candidate_serving_freq_list_nr.size() > 0) { + j.start_array("candidateServingFreqListNR"); + for (const auto& e1 : candidate_serving_freq_list_nr) { + j.write_int(e1); + } + j.end_array(); } if (non_crit_ext_present) { j.write_fieldname("nonCriticalExtension"); @@ -23426,43 +5407,20 @@ void cg_cfg_info_ies_s::to_json(json_writer& j) const j.end_obj(); } -const char* cg_cfg_info_ies_s::scg_fail_info_s_::fail_type_opts::to_string() const -{ - static const char* names[] = {"t310-Expiry", - "randomAccessProblem", - "rlc-MaxNumRetx", - "synchReconfigFailure-SCG", - "scg-reconfigFailure", - "srb3-IntegrityFailure"}; - return convert_enum_idx(names, 6, value, "cg_cfg_info_ies_s::scg_fail_info_s_::fail_type_e_"); -} -uint16_t cg_cfg_info_ies_s::scg_fail_info_s_::fail_type_opts::to_number() const -{ - switch (value) { - case t310_expiry: - return 310; - case srb3_integrity_fail: - return 3; - default: - invalid_enum_number(value, "cg_cfg_info_ies_s::scg_fail_info_s_::fail_type_e_"); - } - return 0; -} - -// CG-ConfigInfo ::= SEQUENCE -SRSASN_CODE cg_cfg_info_s::pack(bit_ref& bref) const +// CG-Config ::= SEQUENCE +SRSASN_CODE cg_cfg_s::pack(bit_ref& bref) const { HANDLE_CODE(crit_exts.pack(bref)); return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_s::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_s::unpack(cbit_ref& bref) { HANDLE_CODE(crit_exts.unpack(bref)); return SRSASN_SUCCESS; } -void cg_cfg_info_s::to_json(json_writer& j) const +void cg_cfg_s::to_json(json_writer& j) const { j.start_obj(); j.write_fieldname("criticalExtensions"); @@ -23470,20 +5428,20 @@ void cg_cfg_info_s::to_json(json_writer& j) const j.end_obj(); } -void cg_cfg_info_s::crit_exts_c_::set(types::options e) +void cg_cfg_s::crit_exts_c_::set(types::options e) { type_ = e; } -cg_cfg_info_s::crit_exts_c_::c1_c_& cg_cfg_info_s::crit_exts_c_::set_c1() +cg_cfg_s::crit_exts_c_::c1_c_& cg_cfg_s::crit_exts_c_::set_c1() { set(types::c1); return c; } -void cg_cfg_info_s::crit_exts_c_::set_crit_exts_future() +void cg_cfg_s::crit_exts_c_::set_crit_exts_future() { set(types::crit_exts_future); } -void cg_cfg_info_s::crit_exts_c_::to_json(json_writer& j) const +void cg_cfg_s::crit_exts_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { @@ -23494,11 +5452,11 @@ void cg_cfg_info_s::crit_exts_c_::to_json(json_writer& j) const case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "cg_cfg_info_s::crit_exts_c_"); + log_invalid_choice_id(type_, "cg_cfg_s::crit_exts_c_"); } j.end_obj(); } -SRSASN_CODE cg_cfg_info_s::crit_exts_c_::pack(bit_ref& bref) const +SRSASN_CODE cg_cfg_s::crit_exts_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { @@ -23508,12 +5466,12 @@ SRSASN_CODE cg_cfg_info_s::crit_exts_c_::pack(bit_ref& bref) const case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "cg_cfg_info_s::crit_exts_c_"); + log_invalid_choice_id(type_, "cg_cfg_s::crit_exts_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_s::crit_exts_c_::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_s::crit_exts_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); @@ -23525,39 +5483,39 @@ SRSASN_CODE cg_cfg_info_s::crit_exts_c_::unpack(cbit_ref& bref) case types::crit_exts_future: break; default: - log_invalid_choice_id(type_, "cg_cfg_info_s::crit_exts_c_"); + log_invalid_choice_id(type_, "cg_cfg_s::crit_exts_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void cg_cfg_info_s::crit_exts_c_::c1_c_::set(types::options e) +void cg_cfg_s::crit_exts_c_::c1_c_::set(types::options e) { type_ = e; } -cg_cfg_info_ies_s& cg_cfg_info_s::crit_exts_c_::c1_c_::set_cg_cfg_info() +cg_cfg_ies_s& cg_cfg_s::crit_exts_c_::c1_c_::set_cg_cfg() { - set(types::cg_cfg_info); + set(types::cg_cfg); return c; } -void cg_cfg_info_s::crit_exts_c_::c1_c_::set_spare3() +void cg_cfg_s::crit_exts_c_::c1_c_::set_spare3() { set(types::spare3); } -void cg_cfg_info_s::crit_exts_c_::c1_c_::set_spare2() +void cg_cfg_s::crit_exts_c_::c1_c_::set_spare2() { set(types::spare2); } -void cg_cfg_info_s::crit_exts_c_::c1_c_::set_spare1() +void cg_cfg_s::crit_exts_c_::c1_c_::set_spare1() { set(types::spare1); } -void cg_cfg_info_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +void cg_cfg_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::cg_cfg_info: - j.write_fieldname("cg-ConfigInfo"); + case types::cg_cfg: + j.write_fieldname("cg-Config"); c.to_json(j); break; case types::spare3: @@ -23567,15 +5525,15 @@ void cg_cfg_info_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const case types::spare1: break; default: - log_invalid_choice_id(type_, "cg_cfg_info_s::crit_exts_c_::c1_c_"); + log_invalid_choice_id(type_, "cg_cfg_s::crit_exts_c_::c1_c_"); } j.end_obj(); } -SRSASN_CODE cg_cfg_info_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +SRSASN_CODE cg_cfg_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::cg_cfg_info: + case types::cg_cfg: HANDLE_CODE(c.pack(bref)); break; case types::spare3: @@ -23585,18 +5543,18 @@ SRSASN_CODE cg_cfg_info_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const case types::spare1: break; default: - log_invalid_choice_id(type_, "cg_cfg_info_s::crit_exts_c_::c1_c_"); + log_invalid_choice_id(type_, "cg_cfg_s::crit_exts_c_::c1_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE cg_cfg_info_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) +SRSASN_CODE cg_cfg_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::cg_cfg_info: + case types::cg_cfg: HANDLE_CODE(c.unpack(bref)); break; case types::spare3: @@ -23606,27 +5564,27 @@ SRSASN_CODE cg_cfg_info_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) case types::spare1: break; default: - log_invalid_choice_id(type_, "cg_cfg_info_s::crit_exts_c_::c1_c_"); + log_invalid_choice_id(type_, "cg_cfg_s::crit_exts_c_::c1_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -const char* cg_cfg_info_s::crit_exts_c_::c1_c_::types_opts::to_string() const +const char* cg_cfg_s::crit_exts_c_::c1_c_::types_opts::to_string() const { - static const char* names[] = {"cg-ConfigInfo", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "cg_cfg_info_s::crit_exts_c_::c1_c_::types"); + static const char* names[] = {"cg-Config", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "cg_cfg_s::crit_exts_c_::c1_c_::types"); } -const char* cg_cfg_info_s::crit_exts_c_::types_opts::to_string() const +const char* cg_cfg_s::crit_exts_c_::types_opts::to_string() const { static const char* names[] = {"c1", "criticalExtensionsFuture"}; - return convert_enum_idx(names, 2, value, "cg_cfg_info_s::crit_exts_c_::types"); + return convert_enum_idx(names, 2, value, "cg_cfg_s::crit_exts_c_::types"); } -uint8_t cg_cfg_info_s::crit_exts_c_::types_opts::to_number() const +uint8_t cg_cfg_s::crit_exts_c_::types_opts::to_number() const { static const uint8_t numbers[] = {1}; - return map_enum_number(numbers, 1, value, "cg_cfg_info_s::crit_exts_c_::types"); + return map_enum_number(numbers, 1, value, "cg_cfg_s::crit_exts_c_::types"); } // HandoverCommand-IEs ::= SEQUENCE diff --git a/lib/asn1/rrc_nr/serving_cell.cpp b/lib/asn1/rrc_nr/serving_cell.cpp index 28997ab4f7..5549b5434c 100644 --- a/lib/asn1/rrc_nr/serving_cell.cpp +++ b/lib/asn1/rrc_nr/serving_cell.cpp @@ -9,8 +9,6 @@ */ #include "srsran/asn1/rrc_nr/serving_cell.h" -#include - using namespace asn1; using namespace asn1::rrc_nr; @@ -18,884 +16,539 @@ using namespace asn1::rrc_nr; * Struct Methods ******************************************************************************/ -// MsgA-DMRS-Config-r16 ::= SEQUENCE -SRSASN_CODE msg_a_dmrs_cfg_r16_s::pack(bit_ref& bref) const +// NR-NS-PmaxValue ::= SEQUENCE +SRSASN_CODE nr_ns_pmax_value_s::pack(bit_ref& bref) const { - HANDLE_CODE(bref.pack(msg_a_dmrs_add_position_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_max_len_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_pusch_dmrs_cdm_group_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_pusch_nrof_ports_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_scrambling_id0_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_scrambling_id1_r16_present, 1)); + HANDLE_CODE(bref.pack(add_pmax_present, 1)); - if (msg_a_dmrs_add_position_r16_present) { - HANDLE_CODE(msg_a_dmrs_add_position_r16.pack(bref)); - } - if (msg_a_pusch_dmrs_cdm_group_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_pusch_dmrs_cdm_group_r16, (uint8_t)0u, (uint8_t)1u)); - } - if (msg_a_pusch_nrof_ports_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_pusch_nrof_ports_r16, (uint8_t)0u, (uint8_t)1u)); - } - if (msg_a_scrambling_id0_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_scrambling_id0_r16, (uint32_t)0u, (uint32_t)65535u)); - } - if (msg_a_scrambling_id1_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_scrambling_id1_r16, (uint32_t)0u, (uint32_t)65535u)); + if (add_pmax_present) { + HANDLE_CODE(pack_integer(bref, add_pmax, (int8_t)-30, (int8_t)33)); } + HANDLE_CODE(pack_integer(bref, add_spec_emission, (uint8_t)0u, (uint8_t)7u)); return SRSASN_SUCCESS; } -SRSASN_CODE msg_a_dmrs_cfg_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE nr_ns_pmax_value_s::unpack(cbit_ref& bref) { - HANDLE_CODE(bref.unpack(msg_a_dmrs_add_position_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_max_len_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_pusch_dmrs_cdm_group_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_pusch_nrof_ports_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_scrambling_id0_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_scrambling_id1_r16_present, 1)); + HANDLE_CODE(bref.unpack(add_pmax_present, 1)); - if (msg_a_dmrs_add_position_r16_present) { - HANDLE_CODE(msg_a_dmrs_add_position_r16.unpack(bref)); - } - if (msg_a_pusch_dmrs_cdm_group_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_pusch_dmrs_cdm_group_r16, bref, (uint8_t)0u, (uint8_t)1u)); - } - if (msg_a_pusch_nrof_ports_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_pusch_nrof_ports_r16, bref, (uint8_t)0u, (uint8_t)1u)); - } - if (msg_a_scrambling_id0_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_scrambling_id0_r16, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (msg_a_scrambling_id1_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_scrambling_id1_r16, bref, (uint32_t)0u, (uint32_t)65535u)); + if (add_pmax_present) { + HANDLE_CODE(unpack_integer(add_pmax, bref, (int8_t)-30, (int8_t)33)); } + HANDLE_CODE(unpack_integer(add_spec_emission, bref, (uint8_t)0u, (uint8_t)7u)); return SRSASN_SUCCESS; } -void msg_a_dmrs_cfg_r16_s::to_json(json_writer& j) const +void nr_ns_pmax_value_s::to_json(json_writer& j) const { j.start_obj(); - if (msg_a_dmrs_add_position_r16_present) { - j.write_str("msgA-DMRS-AdditionalPosition-r16", msg_a_dmrs_add_position_r16.to_string()); - } - if (msg_a_max_len_r16_present) { - j.write_str("msgA-MaxLength-r16", "len2"); - } - if (msg_a_pusch_dmrs_cdm_group_r16_present) { - j.write_int("msgA-PUSCH-DMRS-CDM-Group-r16", msg_a_pusch_dmrs_cdm_group_r16); - } - if (msg_a_pusch_nrof_ports_r16_present) { - j.write_int("msgA-PUSCH-NrofPorts-r16", msg_a_pusch_nrof_ports_r16); - } - if (msg_a_scrambling_id0_r16_present) { - j.write_int("msgA-ScramblingID0-r16", msg_a_scrambling_id0_r16); - } - if (msg_a_scrambling_id1_r16_present) { - j.write_int("msgA-ScramblingID1-r16", msg_a_scrambling_id1_r16); + if (add_pmax_present) { + j.write_int("additionalPmax", add_pmax); } + j.write_int("additionalSpectrumEmission", add_spec_emission); j.end_obj(); } -const char* msg_a_dmrs_cfg_r16_s::msg_a_dmrs_add_position_r16_opts::to_string() const -{ - static const char* names[] = {"pos0", "pos1", "pos3"}; - return convert_enum_idx(names, 3, value, "msg_a_dmrs_cfg_r16_s::msg_a_dmrs_add_position_r16_e_"); -} -uint8_t msg_a_dmrs_cfg_r16_s::msg_a_dmrs_add_position_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 3}; - return map_enum_number(numbers, 3, value, "msg_a_dmrs_cfg_r16_s::msg_a_dmrs_add_position_r16_e_"); -} - -// RA-Prioritization ::= SEQUENCE -SRSASN_CODE ra_prioritization_s::pack(bit_ref& bref) const +// EUTRA-MBSFN-SubframeConfig ::= SEQUENCE +SRSASN_CODE eutra_mbsfn_sf_cfg_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(scaling_factor_bi_present, 1)); + HANDLE_CODE(bref.pack(sf_alloc2_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(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 ra_prioritization_s::unpack(cbit_ref& bref) +SRSASN_CODE eutra_mbsfn_sf_cfg_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(scaling_factor_bi_present, 1)); + HANDLE_CODE(bref.unpack(sf_alloc2_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(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 ra_prioritization_s::to_json(json_writer& j) const +void eutra_mbsfn_sf_cfg_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_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(); } -const char* ra_prioritization_s::pwr_ramp_step_high_prio_opts::to_string() const +const char* eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_opts::to_string() const { - static const char* names[] = {"dB0", "dB2", "dB4", "dB6"}; - return convert_enum_idx(names, 4, value, "ra_prioritization_s::pwr_ramp_step_high_prio_e_"); + static const char* names[] = {"n1", "n2", "n4", "n8", "n16", "n32"}; + return convert_enum_idx(names, 6, value, "eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_e_"); } -uint8_t ra_prioritization_s::pwr_ramp_step_high_prio_opts::to_number() const +uint8_t eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_opts::to_number() const { - static const uint8_t numbers[] = {0, 2, 4, 6}; - return map_enum_number(numbers, 4, value, "ra_prioritization_s::pwr_ramp_step_high_prio_e_"); + static const uint8_t numbers[] = {1, 2, 4, 8, 16, 32}; + return map_enum_number(numbers, 6, value, "eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_e_"); } -const char* ra_prioritization_s::scaling_factor_bi_opts::to_string() const -{ - static const char* names[] = {"zero", "dot25", "dot5", "dot75"}; - return convert_enum_idx(names, 4, value, "ra_prioritization_s::scaling_factor_bi_e_"); -} -uint8_t ra_prioritization_s::scaling_factor_bi_opts::to_number() const +void eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::destroy_() { - static const uint8_t numbers[] = {0, 25, 5, 75}; - return map_enum_number(numbers, 4, value, "ra_prioritization_s::scaling_factor_bi_e_"); + switch (type_) { + case types::one_frame: + c.destroy>(); + break; + case types::four_frames: + c.destroy>(); + break; + default: + break; + } } - -// MsgA-PUSCH-Resource-r16 ::= SEQUENCE -SRSASN_CODE msg_a_pusch_res_r16_s::pack(bit_ref& bref) const +void eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::set(types::options e) { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(msg_a_pusch_time_domain_alloc_r16_present, 1)); - HANDLE_CODE(bref.pack(start_symbol_and_len_msg_a_po_r16_present, 1)); - HANDLE_CODE(bref.pack(map_type_msg_a_pusch_r16_present, 1)); - HANDLE_CODE(bref.pack(guard_period_msg_a_pusch_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_intra_slot_freq_hop_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_hop_bits_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_alpha_r16_present, 1)); - HANDLE_CODE(bref.pack(interlace_idx_first_po_msg_a_pusch_r16_present, 1)); - HANDLE_CODE(bref.pack(nrof_interlaces_per_msg_a_po_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, msg_a_mcs_r16, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(pack_integer(bref, nrof_slots_msg_a_pusch_r16, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(nrof_msg_a_po_per_slot_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, msg_a_pusch_time_domain_offset_r16, (uint8_t)1u, (uint8_t)32u)); - if (msg_a_pusch_time_domain_alloc_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_pusch_time_domain_alloc_r16, (uint8_t)1u, (uint8_t)16u)); - } - if (start_symbol_and_len_msg_a_po_r16_present) { - HANDLE_CODE(pack_integer(bref, start_symbol_and_len_msg_a_po_r16, (uint8_t)0u, (uint8_t)127u)); - } - if (map_type_msg_a_pusch_r16_present) { - HANDLE_CODE(map_type_msg_a_pusch_r16.pack(bref)); - } - if (guard_period_msg_a_pusch_r16_present) { - HANDLE_CODE(pack_integer(bref, guard_period_msg_a_pusch_r16, (uint8_t)0u, (uint8_t)3u)); - } - HANDLE_CODE(pack_integer(bref, guard_band_msg_a_pusch_r16, (uint8_t)0u, (uint8_t)1u)); - HANDLE_CODE(pack_integer(bref, freq_start_msg_a_pusch_r16, (uint16_t)0u, (uint16_t)274u)); - HANDLE_CODE(pack_integer(bref, nrof_prbs_per_msg_a_po_r16, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(nrof_msg_a_po_fdm_r16.pack(bref)); - if (msg_a_hop_bits_r16_present) { - HANDLE_CODE(msg_a_hop_bits_r16.pack(bref)); - } - HANDLE_CODE(msg_a_dmrs_cfg_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, nrof_dmrs_seqs_r16, (uint8_t)1u, (uint8_t)2u)); - if (msg_a_alpha_r16_present) { - HANDLE_CODE(msg_a_alpha_r16.pack(bref)); - } - if (interlace_idx_first_po_msg_a_pusch_r16_present) { - HANDLE_CODE(pack_integer(bref, interlace_idx_first_po_msg_a_pusch_r16, (uint8_t)1u, (uint8_t)10u)); - } - if (nrof_interlaces_per_msg_a_po_r16_present) { - HANDLE_CODE(pack_integer(bref, nrof_interlaces_per_msg_a_po_r16, (uint8_t)1u, (uint8_t)10u)); + destroy_(); + type_ = e; + switch (type_) { + case types::one_frame: + c.init>(); + break; + case types::four_frames: + c.init>(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); } - - return SRSASN_SUCCESS; } -SRSASN_CODE msg_a_pusch_res_r16_s::unpack(cbit_ref& bref) +eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::sf_alloc1_c_(const eutra_mbsfn_sf_cfg_s::sf_alloc1_c_& other) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(msg_a_pusch_time_domain_alloc_r16_present, 1)); - HANDLE_CODE(bref.unpack(start_symbol_and_len_msg_a_po_r16_present, 1)); - HANDLE_CODE(bref.unpack(map_type_msg_a_pusch_r16_present, 1)); - HANDLE_CODE(bref.unpack(guard_period_msg_a_pusch_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_intra_slot_freq_hop_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_hop_bits_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_alpha_r16_present, 1)); - HANDLE_CODE(bref.unpack(interlace_idx_first_po_msg_a_pusch_r16_present, 1)); - HANDLE_CODE(bref.unpack(nrof_interlaces_per_msg_a_po_r16_present, 1)); - - HANDLE_CODE(unpack_integer(msg_a_mcs_r16, bref, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(unpack_integer(nrof_slots_msg_a_pusch_r16, bref, (uint8_t)1u, (uint8_t)4u)); - HANDLE_CODE(nrof_msg_a_po_per_slot_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(msg_a_pusch_time_domain_offset_r16, bref, (uint8_t)1u, (uint8_t)32u)); - if (msg_a_pusch_time_domain_alloc_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_pusch_time_domain_alloc_r16, bref, (uint8_t)1u, (uint8_t)16u)); - } - if (start_symbol_and_len_msg_a_po_r16_present) { - HANDLE_CODE(unpack_integer(start_symbol_and_len_msg_a_po_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (map_type_msg_a_pusch_r16_present) { - HANDLE_CODE(map_type_msg_a_pusch_r16.unpack(bref)); - } - if (guard_period_msg_a_pusch_r16_present) { - HANDLE_CODE(unpack_integer(guard_period_msg_a_pusch_r16, bref, (uint8_t)0u, (uint8_t)3u)); - } - HANDLE_CODE(unpack_integer(guard_band_msg_a_pusch_r16, bref, (uint8_t)0u, (uint8_t)1u)); - HANDLE_CODE(unpack_integer(freq_start_msg_a_pusch_r16, bref, (uint16_t)0u, (uint16_t)274u)); - HANDLE_CODE(unpack_integer(nrof_prbs_per_msg_a_po_r16, bref, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(nrof_msg_a_po_fdm_r16.unpack(bref)); - if (msg_a_hop_bits_r16_present) { - HANDLE_CODE(msg_a_hop_bits_r16.unpack(bref)); - } - HANDLE_CODE(msg_a_dmrs_cfg_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(nrof_dmrs_seqs_r16, bref, (uint8_t)1u, (uint8_t)2u)); - if (msg_a_alpha_r16_present) { - HANDLE_CODE(msg_a_alpha_r16.unpack(bref)); - } - if (interlace_idx_first_po_msg_a_pusch_r16_present) { - HANDLE_CODE(unpack_integer(interlace_idx_first_po_msg_a_pusch_r16, bref, (uint8_t)1u, (uint8_t)10u)); - } - if (nrof_interlaces_per_msg_a_po_r16_present) { - HANDLE_CODE(unpack_integer(nrof_interlaces_per_msg_a_po_r16, bref, (uint8_t)1u, (uint8_t)10u)); + type_ = other.type(); + switch (type_) { + case types::one_frame: + c.init(other.c.get>()); + break; + case types::four_frames: + c.init(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); } - - return SRSASN_SUCCESS; } -void msg_a_pusch_res_r16_s::to_json(json_writer& j) const +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) { - j.start_obj(); - j.write_int("msgA-MCS-r16", msg_a_mcs_r16); - j.write_int("nrofSlotsMsgA-PUSCH-r16", nrof_slots_msg_a_pusch_r16); - j.write_str("nrofMsgA-PO-PerSlot-r16", nrof_msg_a_po_per_slot_r16.to_string()); - j.write_int("msgA-PUSCH-TimeDomainOffset-r16", msg_a_pusch_time_domain_offset_r16); - if (msg_a_pusch_time_domain_alloc_r16_present) { - j.write_int("msgA-PUSCH-TimeDomainAllocation-r16", msg_a_pusch_time_domain_alloc_r16); - } - if (start_symbol_and_len_msg_a_po_r16_present) { - j.write_int("startSymbolAndLengthMsgA-PO-r16", start_symbol_and_len_msg_a_po_r16); - } - if (map_type_msg_a_pusch_r16_present) { - j.write_str("mappingTypeMsgA-PUSCH-r16", map_type_msg_a_pusch_r16.to_string()); - } - if (guard_period_msg_a_pusch_r16_present) { - j.write_int("guardPeriodMsgA-PUSCH-r16", guard_period_msg_a_pusch_r16); - } - j.write_int("guardBandMsgA-PUSCH-r16", guard_band_msg_a_pusch_r16); - j.write_int("frequencyStartMsgA-PUSCH-r16", freq_start_msg_a_pusch_r16); - j.write_int("nrofPRBs-PerMsgA-PO-r16", nrof_prbs_per_msg_a_po_r16); - j.write_str("nrofMsgA-PO-FDM-r16", nrof_msg_a_po_fdm_r16.to_string()); - if (msg_a_intra_slot_freq_hop_r16_present) { - j.write_str("msgA-IntraSlotFrequencyHopping-r16", "enabled"); - } - if (msg_a_hop_bits_r16_present) { - j.write_str("msgA-HoppingBits-r16", msg_a_hop_bits_r16.to_string()); - } - j.write_fieldname("msgA-DMRS-Config-r16"); - msg_a_dmrs_cfg_r16.to_json(j); - j.write_int("nrofDMRS-Sequences-r16", nrof_dmrs_seqs_r16); - if (msg_a_alpha_r16_present) { - j.write_str("msgA-Alpha-r16", msg_a_alpha_r16.to_string()); - } - if (interlace_idx_first_po_msg_a_pusch_r16_present) { - j.write_int("interlaceIndexFirstPO-MsgA-PUSCH-r16", interlace_idx_first_po_msg_a_pusch_r16); + if (this == &other) { + return *this; } - if (nrof_interlaces_per_msg_a_po_r16_present) { - j.write_int("nrofInterlacesPerMsgA-PO-r16", nrof_interlaces_per_msg_a_po_r16); + 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_"); } - j.end_obj(); -} - -const char* msg_a_pusch_res_r16_s::nrof_msg_a_po_per_slot_r16_opts::to_string() const -{ - static const char* names[] = {"one", "two", "three", "six"}; - return convert_enum_idx(names, 4, value, "msg_a_pusch_res_r16_s::nrof_msg_a_po_per_slot_r16_e_"); -} -uint8_t msg_a_pusch_res_r16_s::nrof_msg_a_po_per_slot_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 6}; - return map_enum_number(numbers, 4, value, "msg_a_pusch_res_r16_s::nrof_msg_a_po_per_slot_r16_e_"); -} - -const char* msg_a_pusch_res_r16_s::map_type_msg_a_pusch_r16_opts::to_string() const -{ - static const char* names[] = {"typeA", "typeB"}; - return convert_enum_idx(names, 2, value, "msg_a_pusch_res_r16_s::map_type_msg_a_pusch_r16_e_"); -} -const char* msg_a_pusch_res_r16_s::nrof_msg_a_po_fdm_r16_opts::to_string() const -{ - static const char* names[] = {"one", "two", "four", "eight"}; - return convert_enum_idx(names, 4, value, "msg_a_pusch_res_r16_s::nrof_msg_a_po_fdm_r16_e_"); + return *this; } -uint8_t msg_a_pusch_res_r16_s::nrof_msg_a_po_fdm_r16_opts::to_number() const +fixed_bitstring<6>& eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::set_one_frame() { - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "msg_a_pusch_res_r16_s::nrof_msg_a_po_fdm_r16_e_"); + set(types::one_frame); + return c.get>(); } - -const char* msg_a_pusch_res_r16_s::msg_a_alpha_r16_opts::to_string() const +fixed_bitstring<24>& eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::set_four_frames() { - static const char* names[] = {"alpha0", "alpha04", "alpha05", "alpha06", "alpha07", "alpha08", "alpha09", "alpha1"}; - return convert_enum_idx(names, 8, value, "msg_a_pusch_res_r16_s::msg_a_alpha_r16_e_"); + set(types::four_frames); + return c.get>(); } -float msg_a_pusch_res_r16_s::msg_a_alpha_r16_opts::to_number() const +void eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::to_json(json_writer& j) const { - static const float numbers[] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; - return map_enum_number(numbers, 8, value, "msg_a_pusch_res_r16_s::msg_a_alpha_r16_e_"); + 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(); } -const char* msg_a_pusch_res_r16_s::msg_a_alpha_r16_opts::to_number_string() const +SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::pack(bit_ref& bref) const { - static const char* number_strs[] = {"0", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"}; - return convert_enum_idx(number_strs, 8, value, "msg_a_pusch_res_r16_s::msg_a_alpha_r16_e_"); + 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; } - -// RA-PrioritizationSliceInfo-r17 ::= SEQUENCE -SRSASN_CODE ra_prioritization_slice_info_r17_s::pack(bit_ref& bref) const +SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::unpack(cbit_ref& bref) { - bref.pack(ext, 1); - HANDLE_CODE(pack_dyn_seq_of(bref, nsag_id_list_r17, 1, 8)); - HANDLE_CODE(ra_prioritization_r17.pack(bref)); - + 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; + } return SRSASN_SUCCESS; } -SRSASN_CODE ra_prioritization_slice_info_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_dyn_seq_of(nsag_id_list_r17, bref, 1, 8)); - HANDLE_CODE(ra_prioritization_r17.unpack(bref)); - return SRSASN_SUCCESS; +const char* eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types_opts::to_string() const +{ + static const char* names[] = {"oneFrame", "fourFrames"}; + return convert_enum_idx(names, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types"); } -void ra_prioritization_slice_info_r17_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.start_array("nsag-ID-List-r17"); - for (const auto& e1 : nsag_id_list_r17) { - j.write_str(e1.to_string()); - } - j.end_array(); - j.write_fieldname("ra-Prioritization-r17"); - ra_prioritization_r17.to_json(j); - j.end_obj(); + static const uint8_t numbers[] = {1, 4}; + return map_enum_number(numbers, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::types"); } -// FeatureCombination-r17 ::= SEQUENCE -SRSASN_CODE feature_combination_r17_s::pack(bit_ref& bref) const +void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::destroy_() { - HANDLE_CODE(bref.pack(red_cap_r17_present, 1)); - HANDLE_CODE(bref.pack(small_data_r17_present, 1)); - HANDLE_CODE(bref.pack(nsag_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(msg3_repeats_r17_present, 1)); - HANDLE_CODE(bref.pack(spare4_present, 1)); - HANDLE_CODE(bref.pack(spare3_present, 1)); - HANDLE_CODE(bref.pack(spare2_present, 1)); - HANDLE_CODE(bref.pack(spare1_present, 1)); - - if (nsag_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, nsag_r17, 1, 8)); + switch (type_) { + case types::one_frame: + c.destroy>(); + break; + case types::four_frames: + c.destroy>(); + break; + default: + break; } - - return SRSASN_SUCCESS; } -SRSASN_CODE feature_combination_r17_s::unpack(cbit_ref& bref) +void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::set(types::options e) { - HANDLE_CODE(bref.unpack(red_cap_r17_present, 1)); - HANDLE_CODE(bref.unpack(small_data_r17_present, 1)); - bool nsag_r17_present; - HANDLE_CODE(bref.unpack(nsag_r17_present, 1)); - HANDLE_CODE(bref.unpack(msg3_repeats_r17_present, 1)); - HANDLE_CODE(bref.unpack(spare4_present, 1)); - HANDLE_CODE(bref.unpack(spare3_present, 1)); - HANDLE_CODE(bref.unpack(spare2_present, 1)); - HANDLE_CODE(bref.unpack(spare1_present, 1)); - - if (nsag_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(nsag_r17, bref, 1, 8)); + destroy_(); + type_ = e; + switch (type_) { + case types::one_frame: + c.init>(); + break; + case types::four_frames: + c.init>(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); } - - return SRSASN_SUCCESS; } -void feature_combination_r17_s::to_json(json_writer& j) const +eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::sf_alloc2_c_(const eutra_mbsfn_sf_cfg_s::sf_alloc2_c_& other) { - j.start_obj(); - if (red_cap_r17_present) { - j.write_str("redCap-r17", "true"); - } - if (small_data_r17_present) { - j.write_str("smallData-r17", "true"); - } - if (nsag_r17.size() > 0) { - j.start_array("nsag-r17"); - for (const auto& e1 : nsag_r17) { - j.write_str(e1.to_string()); - } - j.end_array(); - } - if (msg3_repeats_r17_present) { - j.write_str("msg3-Repetitions-r17", "true"); - } - if (spare4_present) { - j.write_str("spare4", "true"); - } - if (spare3_present) { - j.write_str("spare3", "true"); - } - if (spare2_present) { - j.write_str("spare2", "true"); - } - if (spare1_present) { - j.write_str("spare1", "true"); + type_ = other.type(); + switch (type_) { + case types::one_frame: + c.init(other.c.get>()); + break; + case types::four_frames: + c.init(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); } - j.end_obj(); } - -// MsgA-PUSCH-Config-r16 ::= SEQUENCE -SRSASN_CODE msg_a_pusch_cfg_r16_s::pack(bit_ref& bref) const +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) { - HANDLE_CODE(bref.pack(msg_a_pusch_res_group_a_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_pusch_res_group_b_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_transform_precoder_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_data_scrambling_idx_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_delta_preamb_r16_present, 1)); - - if (msg_a_pusch_res_group_a_r16_present) { - HANDLE_CODE(msg_a_pusch_res_group_a_r16.pack(bref)); - } - if (msg_a_pusch_res_group_b_r16_present) { - HANDLE_CODE(msg_a_pusch_res_group_b_r16.pack(bref)); - } - if (msg_a_transform_precoder_r16_present) { - HANDLE_CODE(msg_a_transform_precoder_r16.pack(bref)); - } - if (msg_a_data_scrambling_idx_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_data_scrambling_idx_r16, (uint16_t)0u, (uint16_t)1023u)); + if (this == &other) { + return *this; } - if (msg_a_delta_preamb_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_delta_preamb_r16, (int8_t)-1, (int8_t)6)); + 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_alloc2_c_"); } - return SRSASN_SUCCESS; + return *this; } -SRSASN_CODE msg_a_pusch_cfg_r16_s::unpack(cbit_ref& bref) +fixed_bitstring<2>& eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::set_one_frame() { - HANDLE_CODE(bref.unpack(msg_a_pusch_res_group_a_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_pusch_res_group_b_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_transform_precoder_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_data_scrambling_idx_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_delta_preamb_r16_present, 1)); - - if (msg_a_pusch_res_group_a_r16_present) { - HANDLE_CODE(msg_a_pusch_res_group_a_r16.unpack(bref)); - } - if (msg_a_pusch_res_group_b_r16_present) { - HANDLE_CODE(msg_a_pusch_res_group_b_r16.unpack(bref)); - } - if (msg_a_transform_precoder_r16_present) { - HANDLE_CODE(msg_a_transform_precoder_r16.unpack(bref)); - } - if (msg_a_data_scrambling_idx_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_data_scrambling_idx_r16, bref, (uint16_t)0u, (uint16_t)1023u)); - } - if (msg_a_delta_preamb_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_delta_preamb_r16, bref, (int8_t)-1, (int8_t)6)); - } - - return SRSASN_SUCCESS; + set(types::one_frame); + return c.get>(); } -void msg_a_pusch_cfg_r16_s::to_json(json_writer& j) const +fixed_bitstring<8>& eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::set_four_frames() +{ + set(types::four_frames); + return c.get>(); +} +void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::to_json(json_writer& j) const { j.start_obj(); - if (msg_a_pusch_res_group_a_r16_present) { - j.write_fieldname("msgA-PUSCH-ResourceGroupA-r16"); - msg_a_pusch_res_group_a_r16.to_json(j); - } - if (msg_a_pusch_res_group_b_r16_present) { - j.write_fieldname("msgA-PUSCH-ResourceGroupB-r16"); - msg_a_pusch_res_group_b_r16.to_json(j); - } - if (msg_a_transform_precoder_r16_present) { - j.write_str("msgA-TransformPrecoder-r16", msg_a_transform_precoder_r16.to_string()); + 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_alloc2_c_"); } - if (msg_a_data_scrambling_idx_r16_present) { - j.write_int("msgA-DataScramblingIndex-r16", msg_a_data_scrambling_idx_r16); + j.end_obj(); +} +SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::pack(bit_ref& bref) 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_alloc2_c_"); + return SRSASN_ERROR_ENCODE_FAIL; } - if (msg_a_delta_preamb_r16_present) { - j.write_int("msgA-DeltaPreamble-r16", msg_a_delta_preamb_r16); + return SRSASN_SUCCESS; +} +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::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_alloc2_c_"); + return SRSASN_ERROR_DECODE_FAIL; } - j.end_obj(); + return SRSASN_SUCCESS; } -const char* msg_a_pusch_cfg_r16_s::msg_a_transform_precoder_r16_opts::to_string() const +const char* eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types_opts::to_string() const { - static const char* names[] = {"enabled", "disabled"}; - return convert_enum_idx(names, 2, value, "msg_a_pusch_cfg_r16_s::msg_a_transform_precoder_r16_e_"); + static const char* names[] = {"oneFrame", "fourFrames"}; + return convert_enum_idx(names, 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 numbers[] = {1, 4}; + return map_enum_number(numbers, 2, value, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::types"); } -// FeatureCombinationPreambles-r17 ::= SEQUENCE -SRSASN_CODE feature_combination_preambs_r17_s::pack(bit_ref& bref) const +// NR-MultiBandInfo ::= SEQUENCE +SRSASN_CODE nr_multi_band_info_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ssb_shared_ro_mask_idx_r17_present, 1)); - HANDLE_CODE(bref.pack(group_bcfg_r17_present, 1)); - HANDLE_CODE(bref.pack(separate_msg_a_pusch_cfg_r17_present, 1)); - HANDLE_CODE(bref.pack(msg_a_rsrp_thres_r17_present, 1)); - HANDLE_CODE(bref.pack(rsrp_thres_ssb_r17_present, 1)); - HANDLE_CODE(bref.pack(delta_preamb_r17_present, 1)); + HANDLE_CODE(bref.pack(freq_band_ind_nr_present, 1)); + HANDLE_CODE(bref.pack(nr_ns_pmax_list.size() > 0, 1)); - HANDLE_CODE(feature_combination_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, start_preamb_for_this_partition_r17, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_integer(bref, nof_preambs_per_ssb_for_this_partition_r17, (uint8_t)1u, (uint8_t)64u)); - if (ssb_shared_ro_mask_idx_r17_present) { - HANDLE_CODE(pack_integer(bref, ssb_shared_ro_mask_idx_r17, (uint8_t)1u, (uint8_t)15u)); - } - if (group_bcfg_r17_present) { - HANDLE_CODE(group_bcfg_r17.ra_size_group_a_r17.pack(bref)); - HANDLE_CODE(group_bcfg_r17.msg_pwr_offset_group_b_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, group_bcfg_r17.nof_ra_preambs_group_a_r17, (uint8_t)1u, (uint8_t)64u)); - } - if (separate_msg_a_pusch_cfg_r17_present) { - HANDLE_CODE(separate_msg_a_pusch_cfg_r17.pack(bref)); - } - if (msg_a_rsrp_thres_r17_present) { - HANDLE_CODE(pack_integer(bref, msg_a_rsrp_thres_r17, (uint8_t)0u, (uint8_t)127u)); - } - if (rsrp_thres_ssb_r17_present) { - HANDLE_CODE(pack_integer(bref, rsrp_thres_ssb_r17, (uint8_t)0u, (uint8_t)127u)); + if (freq_band_ind_nr_present) { + HANDLE_CODE(pack_integer(bref, freq_band_ind_nr, (uint16_t)1u, (uint16_t)1024u)); } - if (delta_preamb_r17_present) { - HANDLE_CODE(pack_integer(bref, delta_preamb_r17, (int8_t)-1, (int8_t)6)); + if (nr_ns_pmax_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, nr_ns_pmax_list, 1, 8)); } return SRSASN_SUCCESS; } -SRSASN_CODE feature_combination_preambs_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE nr_multi_band_info_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ssb_shared_ro_mask_idx_r17_present, 1)); - HANDLE_CODE(bref.unpack(group_bcfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(separate_msg_a_pusch_cfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_rsrp_thres_r17_present, 1)); - HANDLE_CODE(bref.unpack(rsrp_thres_ssb_r17_present, 1)); - HANDLE_CODE(bref.unpack(delta_preamb_r17_present, 1)); + HANDLE_CODE(bref.unpack(freq_band_ind_nr_present, 1)); + bool nr_ns_pmax_list_present; + HANDLE_CODE(bref.unpack(nr_ns_pmax_list_present, 1)); - HANDLE_CODE(feature_combination_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(start_preamb_for_this_partition_r17, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_integer(nof_preambs_per_ssb_for_this_partition_r17, bref, (uint8_t)1u, (uint8_t)64u)); - if (ssb_shared_ro_mask_idx_r17_present) { - HANDLE_CODE(unpack_integer(ssb_shared_ro_mask_idx_r17, bref, (uint8_t)1u, (uint8_t)15u)); - } - if (group_bcfg_r17_present) { - HANDLE_CODE(group_bcfg_r17.ra_size_group_a_r17.unpack(bref)); - HANDLE_CODE(group_bcfg_r17.msg_pwr_offset_group_b_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(group_bcfg_r17.nof_ra_preambs_group_a_r17, bref, (uint8_t)1u, (uint8_t)64u)); - } - if (separate_msg_a_pusch_cfg_r17_present) { - HANDLE_CODE(separate_msg_a_pusch_cfg_r17.unpack(bref)); - } - if (msg_a_rsrp_thres_r17_present) { - HANDLE_CODE(unpack_integer(msg_a_rsrp_thres_r17, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (rsrp_thres_ssb_r17_present) { - HANDLE_CODE(unpack_integer(rsrp_thres_ssb_r17, bref, (uint8_t)0u, (uint8_t)127u)); + if (freq_band_ind_nr_present) { + HANDLE_CODE(unpack_integer(freq_band_ind_nr, bref, (uint16_t)1u, (uint16_t)1024u)); } - if (delta_preamb_r17_present) { - HANDLE_CODE(unpack_integer(delta_preamb_r17, bref, (int8_t)-1, (int8_t)6)); + if (nr_ns_pmax_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(nr_ns_pmax_list, bref, 1, 8)); } return SRSASN_SUCCESS; } -void feature_combination_preambs_r17_s::to_json(json_writer& j) const +void nr_multi_band_info_s::to_json(json_writer& j) const { j.start_obj(); - j.write_fieldname("featureCombination-r17"); - feature_combination_r17.to_json(j); - j.write_int("startPreambleForThisPartition-r17", start_preamb_for_this_partition_r17); - j.write_int("numberOfPreamblesPerSSB-ForThisPartition-r17", nof_preambs_per_ssb_for_this_partition_r17); - if (ssb_shared_ro_mask_idx_r17_present) { - j.write_int("ssb-SharedRO-MaskIndex-r17", ssb_shared_ro_mask_idx_r17); - } - if (group_bcfg_r17_present) { - j.write_fieldname("groupBconfigured-r17"); - j.start_obj(); - j.write_str("ra-SizeGroupA-r17", group_bcfg_r17.ra_size_group_a_r17.to_string()); - j.write_str("messagePowerOffsetGroupB-r17", group_bcfg_r17.msg_pwr_offset_group_b_r17.to_string()); - j.write_int("numberOfRA-PreamblesGroupA-r17", group_bcfg_r17.nof_ra_preambs_group_a_r17); - j.end_obj(); - } - if (separate_msg_a_pusch_cfg_r17_present) { - j.write_fieldname("separateMsgA-PUSCH-Config-r17"); - separate_msg_a_pusch_cfg_r17.to_json(j); - } - if (msg_a_rsrp_thres_r17_present) { - j.write_int("msgA-RSRP-Threshold-r17", msg_a_rsrp_thres_r17); - } - if (rsrp_thres_ssb_r17_present) { - j.write_int("rsrp-ThresholdSSB-r17", rsrp_thres_ssb_r17); + if (freq_band_ind_nr_present) { + j.write_int("freqBandIndicatorNR", freq_band_ind_nr); } - if (delta_preamb_r17_present) { - j.write_int("deltaPreamble-r17", delta_preamb_r17); + if (nr_ns_pmax_list.size() > 0) { + j.start_array("nr-NS-PmaxList"); + for (const auto& e1 : nr_ns_pmax_list) { + e1.to_json(j); + } + j.end_array(); } j.end_obj(); } -const char* feature_combination_preambs_r17_s::group_bcfg_r17_s_::ra_size_group_a_r17_opts::to_string() const -{ - static const char* names[] = {"b56", - "b144", - "b208", - "b256", - "b282", - "b480", - "b640", - "b800", - "b1000", - "b72", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx( - names, 16, value, "feature_combination_preambs_r17_s::group_bcfg_r17_s_::ra_size_group_a_r17_e_"); -} -uint16_t feature_combination_preambs_r17_s::group_bcfg_r17_s_::ra_size_group_a_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {56, 144, 208, 256, 282, 480, 640, 800, 1000, 72}; - return map_enum_number( - numbers, 10, value, "feature_combination_preambs_r17_s::group_bcfg_r17_s_::ra_size_group_a_r17_e_"); -} - -const char* feature_combination_preambs_r17_s::group_bcfg_r17_s_::msg_pwr_offset_group_b_r17_opts::to_string() const -{ - static const char* names[] = {"minusinfinity", "dB0", "dB5", "dB8", "dB10", "dB12", "dB15", "dB18"}; - return convert_enum_idx( - names, 8, value, "feature_combination_preambs_r17_s::group_bcfg_r17_s_::msg_pwr_offset_group_b_r17_e_"); -} -int8_t feature_combination_preambs_r17_s::group_bcfg_r17_s_::msg_pwr_offset_group_b_r17_opts::to_number() const +// RateMatchPatternLTE-CRS ::= SEQUENCE +SRSASN_CODE rate_match_pattern_lte_crs_s::pack(bit_ref& bref) const { - static const int8_t numbers[] = {-1, 0, 5, 8, 10, 12, 15, 18}; - return map_enum_number( - numbers, 8, value, "feature_combination_preambs_r17_s::group_bcfg_r17_s_::msg_pwr_offset_group_b_r17_e_"); -} + HANDLE_CODE(bref.pack(mbsfn_sf_cfg_list.size() > 0, 1)); -// GroupB-ConfiguredTwoStepRA-r16 ::= SEQUENCE -SRSASN_CODE group_b_cfg_two_step_ra_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(ra_msg_a_size_group_a.pack(bref)); - HANDLE_CODE(msg_pwr_offset_group_b.pack(bref)); - HANDLE_CODE(pack_integer(bref, nof_ra_preambs_group_a, (uint8_t)1u, (uint8_t)64u)); + 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.size() > 0) { + 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 group_b_cfg_two_step_ra_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE rate_match_pattern_lte_crs_s::unpack(cbit_ref& bref) { - HANDLE_CODE(ra_msg_a_size_group_a.unpack(bref)); - HANDLE_CODE(msg_pwr_offset_group_b.unpack(bref)); - HANDLE_CODE(unpack_integer(nof_ra_preambs_group_a, bref, (uint8_t)1u, (uint8_t)64u)); + bool mbsfn_sf_cfg_list_present; + 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 group_b_cfg_two_step_ra_r16_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_str("ra-MsgA-SizeGroupA", ra_msg_a_size_group_a.to_string()); - j.write_str("messagePowerOffsetGroupB", msg_pwr_offset_group_b.to_string()); - j.write_int("numberOfRA-PreamblesGroupA", nof_ra_preambs_group_a); + j.write_int("carrierFreqDL", carrier_freq_dl); + j.write_str("carrierBandwidthDL", carrier_bw_dl.to_string()); + if (mbsfn_sf_cfg_list.size() > 0) { + 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(); } -const char* group_b_cfg_two_step_ra_r16_s::ra_msg_a_size_group_a_opts::to_string() const -{ - static const char* names[] = {"b56", - "b144", - "b208", - "b256", - "b282", - "b480", - "b640", - "b800", - "b1000", - "b72", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "group_b_cfg_two_step_ra_r16_s::ra_msg_a_size_group_a_e_"); +const char* rate_match_pattern_lte_crs_s::carrier_bw_dl_opts::to_string() const +{ + static const char* names[] = {"n6", "n15", "n25", "n50", "n75", "n100", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "rate_match_pattern_lte_crs_s::carrier_bw_dl_e_"); } -uint16_t group_b_cfg_two_step_ra_r16_s::ra_msg_a_size_group_a_opts::to_number() const +uint8_t rate_match_pattern_lte_crs_s::carrier_bw_dl_opts::to_number() const { - static const uint16_t numbers[] = {56, 144, 208, 256, 282, 480, 640, 800, 1000, 72}; - return map_enum_number(numbers, 10, value, "group_b_cfg_two_step_ra_r16_s::ra_msg_a_size_group_a_e_"); + static const uint8_t numbers[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(numbers, 6, value, "rate_match_pattern_lte_crs_s::carrier_bw_dl_e_"); } -const char* group_b_cfg_two_step_ra_r16_s::msg_pwr_offset_group_b_opts::to_string() const +const char* rate_match_pattern_lte_crs_s::nrof_crs_ports_opts::to_string() const { - static const char* names[] = {"minusinfinity", "dB0", "dB5", "dB8", "dB10", "dB12", "dB15", "dB18"}; - return convert_enum_idx(names, 8, value, "group_b_cfg_two_step_ra_r16_s::msg_pwr_offset_group_b_e_"); + static const char* names[] = {"n1", "n2", "n4"}; + return convert_enum_idx(names, 3, value, "rate_match_pattern_lte_crs_s::nrof_crs_ports_e_"); } -int8_t group_b_cfg_two_step_ra_r16_s::msg_pwr_offset_group_b_opts::to_number() const +uint8_t rate_match_pattern_lte_crs_s::nrof_crs_ports_opts::to_number() const { - static const int8_t numbers[] = {-1, 0, 5, 8, 10, 12, 15, 18}; - return map_enum_number(numbers, 8, value, "group_b_cfg_two_step_ra_r16_s::msg_pwr_offset_group_b_e_"); + static const uint8_t numbers[] = {1, 2, 4}; + return map_enum_number(numbers, 3, value, "rate_match_pattern_lte_crs_s::nrof_crs_ports_e_"); } -// NR-NS-PmaxValue ::= SEQUENCE -SRSASN_CODE nr_ns_pmax_value_s::pack(bit_ref& bref) const +const char* rate_match_pattern_lte_crs_s::v_shift_opts::to_string() const { - HANDLE_CODE(bref.pack(add_pmax_present, 1)); - - if (add_pmax_present) { - HANDLE_CODE(pack_integer(bref, add_pmax, (int8_t)-30, (int8_t)33)); - } - HANDLE_CODE(pack_integer(bref, add_spec_emission, (uint8_t)0u, (uint8_t)7u)); - - return SRSASN_SUCCESS; + static const char* names[] = {"n0", "n1", "n2", "n3", "n4", "n5"}; + return convert_enum_idx(names, 6, value, "rate_match_pattern_lte_crs_s::v_shift_e_"); } -SRSASN_CODE nr_ns_pmax_value_s::unpack(cbit_ref& bref) +uint8_t rate_match_pattern_lte_crs_s::v_shift_opts::to_number() const { - HANDLE_CODE(bref.unpack(add_pmax_present, 1)); - - if (add_pmax_present) { - HANDLE_CODE(unpack_integer(add_pmax, bref, (int8_t)-30, (int8_t)33)); - } - HANDLE_CODE(unpack_integer(add_spec_emission, bref, (uint8_t)0u, (uint8_t)7u)); + static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5}; + return map_enum_number(numbers, 6, value, "rate_match_pattern_lte_crs_s::v_shift_e_"); +} - return SRSASN_SUCCESS; +// PagingCycle ::= ENUMERATED +const char* paging_cycle_opts::to_string() const +{ + static const char* names[] = {"rf32", "rf64", "rf128", "rf256"}; + return convert_enum_idx(names, 4, value, "paging_cycle_e"); } -void nr_ns_pmax_value_s::to_json(json_writer& j) const +uint16_t paging_cycle_opts::to_number() const { - j.start_obj(); - if (add_pmax_present) { - j.write_int("additionalPmax", add_pmax); - } - j.write_int("additionalSpectrumEmission", add_spec_emission); - j.end_obj(); + static const uint16_t numbers[] = {32, 64, 128, 256}; + return map_enum_number(numbers, 4, value, "paging_cycle_e"); } -// RA-PrioritizationForSlicing-r17 ::= SEQUENCE -SRSASN_CODE ra_prioritization_for_slicing_r17_s::pack(bit_ref& bref) const +// SCS-SpecificCarrier ::= SEQUENCE +SRSASN_CODE scs_specific_carrier_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(pack_dyn_seq_of(bref, ra_prioritization_slice_info_list_r17, 1, 8)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ra_prioritization_for_slicing_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_dyn_seq_of(ra_prioritization_slice_info_list_r17, bref, 1, 8)); - - return SRSASN_SUCCESS; -} -void ra_prioritization_for_slicing_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("ra-PrioritizationSliceInfoList-r17"); - for (const auto& e1 : ra_prioritization_slice_info_list_r17) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// RACH-ConfigGenericTwoStepRA-r16 ::= SEQUENCE -SRSASN_CODE rach_cfg_generic_two_step_ra_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(msg_a_prach_cfg_idx_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_ro_fdm_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_ro_freq_start_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_zero_correlation_zone_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_preamb_pwr_ramp_step_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_preamb_rx_target_pwr_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_b_resp_win_r16_present, 1)); - HANDLE_CODE(bref.pack(preamb_trans_max_r16_present, 1)); - - if (msg_a_prach_cfg_idx_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_prach_cfg_idx_r16, (uint16_t)0u, (uint16_t)262u)); - } - if (msg_a_ro_fdm_r16_present) { - HANDLE_CODE(msg_a_ro_fdm_r16.pack(bref)); - } - if (msg_a_ro_freq_start_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_ro_freq_start_r16, (uint16_t)0u, (uint16_t)274u)); - } - if (msg_a_zero_correlation_zone_cfg_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_zero_correlation_zone_cfg_r16, (uint8_t)0u, (uint8_t)15u)); - } - if (msg_a_preamb_pwr_ramp_step_r16_present) { - HANDLE_CODE(msg_a_preamb_pwr_ramp_step_r16.pack(bref)); - } - if (msg_a_preamb_rx_target_pwr_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_preamb_rx_target_pwr_r16, (int16_t)-202, (int16_t)-60)); - } - if (msg_b_resp_win_r16_present) { - HANDLE_CODE(msg_b_resp_win_r16.pack(bref)); - } - if (preamb_trans_max_r16_present) { - HANDLE_CODE(preamb_trans_max_r16.pack(bref)); - } + HANDLE_CODE(pack_integer(bref, offset_to_carrier, (uint16_t)0u, (uint16_t)2199u)); + HANDLE_CODE(subcarrier_spacing.pack(bref)); + HANDLE_CODE(pack_integer(bref, carrier_bw, (uint16_t)1u, (uint16_t)275u)); if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= msg_b_resp_win_v1700_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(msg_b_resp_win_v1700_present, 1)); - if (msg_b_resp_win_v1700_present) { - HANDLE_CODE(msg_b_resp_win_v1700.pack(bref)); + 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)); } } } return SRSASN_SUCCESS; } -SRSASN_CODE rach_cfg_generic_two_step_ra_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE scs_specific_carrier_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(msg_a_prach_cfg_idx_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_ro_fdm_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_ro_freq_start_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_zero_correlation_zone_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_preamb_pwr_ramp_step_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_preamb_rx_target_pwr_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_b_resp_win_r16_present, 1)); - HANDLE_CODE(bref.unpack(preamb_trans_max_r16_present, 1)); - - if (msg_a_prach_cfg_idx_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_prach_cfg_idx_r16, bref, (uint16_t)0u, (uint16_t)262u)); - } - if (msg_a_ro_fdm_r16_present) { - HANDLE_CODE(msg_a_ro_fdm_r16.unpack(bref)); - } - if (msg_a_ro_freq_start_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_ro_freq_start_r16, bref, (uint16_t)0u, (uint16_t)274u)); - } - if (msg_a_zero_correlation_zone_cfg_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_zero_correlation_zone_cfg_r16, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (msg_a_preamb_pwr_ramp_step_r16_present) { - HANDLE_CODE(msg_a_preamb_pwr_ramp_step_r16.unpack(bref)); - } - if (msg_a_preamb_rx_target_pwr_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_preamb_rx_target_pwr_r16, bref, (int16_t)-202, (int16_t)-60)); - } - if (msg_b_resp_win_r16_present) { - HANDLE_CODE(msg_b_resp_win_r16.unpack(bref)); - } - if (preamb_trans_max_r16_present) { - HANDLE_CODE(preamb_trans_max_r16.unpack(bref)); - } + HANDLE_CODE(unpack_integer(offset_to_carrier, bref, (uint16_t)0u, (uint16_t)2199u)); + HANDLE_CODE(subcarrier_spacing.unpack(bref)); + HANDLE_CODE(unpack_integer(carrier_bw, bref, (uint16_t)1u, (uint16_t)275u)); if (ext) { ext_groups_unpacker_guard group_flags(1); @@ -904,29001 +557,2157 @@ SRSASN_CODE rach_cfg_generic_two_step_ra_r16_s::unpack(cbit_ref& bref) if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.unpack(msg_b_resp_win_v1700_present, 1)); - if (msg_b_resp_win_v1700_present) { - HANDLE_CODE(msg_b_resp_win_v1700.unpack(bref)); + 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)); } } } return SRSASN_SUCCESS; } -void rach_cfg_generic_two_step_ra_r16_s::to_json(json_writer& j) const +void scs_specific_carrier_s::to_json(json_writer& j) const { j.start_obj(); - if (msg_a_prach_cfg_idx_r16_present) { - j.write_int("msgA-PRACH-ConfigurationIndex-r16", msg_a_prach_cfg_idx_r16); - } - if (msg_a_ro_fdm_r16_present) { - j.write_str("msgA-RO-FDM-r16", msg_a_ro_fdm_r16.to_string()); - } - if (msg_a_ro_freq_start_r16_present) { - j.write_int("msgA-RO-FrequencyStart-r16", msg_a_ro_freq_start_r16); - } - if (msg_a_zero_correlation_zone_cfg_r16_present) { - j.write_int("msgA-ZeroCorrelationZoneConfig-r16", msg_a_zero_correlation_zone_cfg_r16); - } - if (msg_a_preamb_pwr_ramp_step_r16_present) { - j.write_str("msgA-PreamblePowerRampingStep-r16", msg_a_preamb_pwr_ramp_step_r16.to_string()); - } - if (msg_a_preamb_rx_target_pwr_r16_present) { - j.write_int("msgA-PreambleReceivedTargetPower-r16", msg_a_preamb_rx_target_pwr_r16); - } - if (msg_b_resp_win_r16_present) { - j.write_str("msgB-ResponseWindow-r16", msg_b_resp_win_r16.to_string()); - } - if (preamb_trans_max_r16_present) { - j.write_str("preambleTransMax-r16", preamb_trans_max_r16.to_string()); - } + j.write_int("offsetToCarrier", offset_to_carrier); + j.write_str("subcarrierSpacing", subcarrier_spacing.to_string()); + j.write_int("carrierBandwidth", carrier_bw); if (ext) { - if (msg_b_resp_win_v1700_present) { - j.write_str("msgB-ResponseWindow-v1700", msg_b_resp_win_v1700.to_string()); + if (tx_direct_current_location_present) { + j.write_int("txDirectCurrentLocation", tx_direct_current_location); } } j.end_obj(); } -const char* rach_cfg_generic_two_step_ra_r16_s::msg_a_ro_fdm_r16_opts::to_string() const +// SubgroupConfig-r17 ::= SEQUENCE +SRSASN_CODE subgroup_cfg_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(subgroups_num_for_ue_id_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, subgroups_num_per_po_r17, (uint8_t)1u, (uint8_t)8u)); + if (subgroups_num_for_ue_id_r17_present) { + HANDLE_CODE(pack_integer(bref, subgroups_num_for_ue_id_r17, (uint8_t)1u, (uint8_t)8u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE subgroup_cfg_r17_s::unpack(cbit_ref& bref) { - static const char* names[] = {"one", "two", "four", "eight"}; - return convert_enum_idx(names, 4, value, "rach_cfg_generic_two_step_ra_r16_s::msg_a_ro_fdm_r16_e_"); + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(subgroups_num_for_ue_id_r17_present, 1)); + + HANDLE_CODE(unpack_integer(subgroups_num_per_po_r17, bref, (uint8_t)1u, (uint8_t)8u)); + if (subgroups_num_for_ue_id_r17_present) { + HANDLE_CODE(unpack_integer(subgroups_num_for_ue_id_r17, bref, (uint8_t)1u, (uint8_t)8u)); + } + + return SRSASN_SUCCESS; } -uint8_t rach_cfg_generic_two_step_ra_r16_s::msg_a_ro_fdm_r16_opts::to_number() const +void subgroup_cfg_r17_s::to_json(json_writer& j) const { - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "rach_cfg_generic_two_step_ra_r16_s::msg_a_ro_fdm_r16_e_"); + j.start_obj(); + j.write_int("subgroupsNumPerPO-r17", subgroups_num_per_po_r17); + if (subgroups_num_for_ue_id_r17_present) { + j.write_int("subgroupsNumForUEID-r17", subgroups_num_for_ue_id_r17); + } + j.end_obj(); } -const char* rach_cfg_generic_two_step_ra_r16_s::msg_a_preamb_pwr_ramp_step_r16_opts::to_string() const +// BCCH-Config ::= SEQUENCE +SRSASN_CODE bcch_cfg_s::pack(bit_ref& bref) const { - static const char* names[] = {"dB0", "dB2", "dB4", "dB6"}; - return convert_enum_idx(names, 4, value, "rach_cfg_generic_two_step_ra_r16_s::msg_a_preamb_pwr_ramp_step_r16_e_"); + bref.pack(ext, 1); + HANDLE_CODE(mod_period_coeff.pack(bref)); + + return SRSASN_SUCCESS; } -uint8_t rach_cfg_generic_two_step_ra_r16_s::msg_a_preamb_pwr_ramp_step_r16_opts::to_number() const +SRSASN_CODE bcch_cfg_s::unpack(cbit_ref& bref) { - static const uint8_t numbers[] = {0, 2, 4, 6}; - return map_enum_number(numbers, 4, value, "rach_cfg_generic_two_step_ra_r16_s::msg_a_preamb_pwr_ramp_step_r16_e_"); -} + bref.unpack(ext, 1); + HANDLE_CODE(mod_period_coeff.unpack(bref)); -const char* rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_r16_opts::to_string() const -{ - static const char* names[] = {"sl1", "sl2", "sl4", "sl8", "sl10", "sl20", "sl40", "sl80", "sl160", "sl320"}; - return convert_enum_idx(names, 10, value, "rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_r16_e_"); + return SRSASN_SUCCESS; } -uint16_t rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_r16_opts::to_number() const +void bcch_cfg_s::to_json(json_writer& j) const { - static const uint16_t numbers[] = {1, 2, 4, 8, 10, 20, 40, 80, 160, 320}; - return map_enum_number(numbers, 10, value, "rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_r16_e_"); + j.start_obj(); + j.write_str("modificationPeriodCoeff", mod_period_coeff.to_string()); + j.end_obj(); } -const char* rach_cfg_generic_two_step_ra_r16_s::preamb_trans_max_r16_opts::to_string() const +const char* bcch_cfg_s::mod_period_coeff_opts::to_string() const { - static const char* names[] = {"n3", "n4", "n5", "n6", "n7", "n8", "n10", "n20", "n50", "n100", "n200"}; - return convert_enum_idx(names, 11, value, "rach_cfg_generic_two_step_ra_r16_s::preamb_trans_max_r16_e_"); + static const char* names[] = {"n2", "n4", "n8", "n16"}; + return convert_enum_idx(names, 4, value, "bcch_cfg_s::mod_period_coeff_e_"); } -uint8_t rach_cfg_generic_two_step_ra_r16_s::preamb_trans_max_r16_opts::to_number() const +uint8_t bcch_cfg_s::mod_period_coeff_opts::to_number() const { - static const uint8_t numbers[] = {3, 4, 5, 6, 7, 8, 10, 20, 50, 100, 200}; - return map_enum_number(numbers, 11, value, "rach_cfg_generic_two_step_ra_r16_s::preamb_trans_max_r16_e_"); + static const uint8_t numbers[] = {2, 4, 8, 16}; + return map_enum_number(numbers, 4, value, "bcch_cfg_s::mod_period_coeff_e_"); } -const char* rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_v1700_opts::to_string() const +// FrequencyInfoDL-SIB ::= SEQUENCE +SRSASN_CODE freq_info_dl_sib_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8)); + HANDLE_CODE(pack_integer(bref, offset_to_point_a, (uint16_t)0u, (uint16_t)2199u)); + HANDLE_CODE(pack_dyn_seq_of(bref, scs_specific_carrier_list, 1, 5)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_info_dl_sib_s::unpack(cbit_ref& bref) { - static const char* names[] = {"sl240", "sl640", "sl960", "sl1280", "sl1920", "sl2560"}; - return convert_enum_idx(names, 6, value, "rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_v1700_e_"); + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8)); + HANDLE_CODE(unpack_integer(offset_to_point_a, bref, (uint16_t)0u, (uint16_t)2199u)); + HANDLE_CODE(unpack_dyn_seq_of(scs_specific_carrier_list, bref, 1, 5)); + + return SRSASN_SUCCESS; } -uint16_t rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_v1700_opts::to_number() const +void freq_info_dl_sib_s::to_json(json_writer& j) const { - static const uint16_t numbers[] = {240, 640, 960, 1280, 1920, 2560}; - return map_enum_number(numbers, 6, value, "rach_cfg_generic_two_step_ra_r16_s::msg_b_resp_win_v1700_e_"); + j.start_obj(); + j.start_array("frequencyBandList"); + for (const auto& e1 : freq_band_list) { + e1.to_json(j); + } + j.end_array(); + j.write_int("offsetToPointA", offset_to_point_a); + j.start_array("scs-SpecificCarrierList"); + for (const auto& e1 : scs_specific_carrier_list) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); } -// EUTRA-MBSFN-SubframeConfig ::= SEQUENCE -SRSASN_CODE eutra_mbsfn_sf_cfg_s::pack(bit_ref& bref) const +// FrequencyInfoUL-SIB ::= SEQUENCE +SRSASN_CODE freq_info_ul_sib_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sf_alloc2_present, 1)); + HANDLE_CODE(bref.pack(freq_band_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(absolute_freq_point_a_present, 1)); + HANDLE_CODE(bref.pack(p_max_present, 1)); + HANDLE_CODE(bref.pack(freq_shift7p5khz_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 (freq_band_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8)); + } + 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 (p_max_present) { + HANDLE_CODE(pack_integer(bref, p_max, (int8_t)-30, (int8_t)33)); } return SRSASN_SUCCESS; } -SRSASN_CODE eutra_mbsfn_sf_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE freq_info_ul_sib_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sf_alloc2_present, 1)); + bool freq_band_list_present; + HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); + HANDLE_CODE(bref.unpack(absolute_freq_point_a_present, 1)); + HANDLE_CODE(bref.unpack(p_max_present, 1)); + HANDLE_CODE(bref.unpack(freq_shift7p5khz_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 (freq_band_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8)); + } + 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 (p_max_present) { + HANDLE_CODE(unpack_integer(p_max, bref, (int8_t)-30, (int8_t)33)); } return SRSASN_SUCCESS; } -void eutra_mbsfn_sf_cfg_s::to_json(json_writer& j) const +void freq_info_ul_sib_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 (freq_band_list.size() > 0) { + j.start_array("frequencyBandList"); + for (const auto& e1 : freq_band_list) { + e1.to_json(j); + } + 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 (p_max_present) { + j.write_int("p-Max", p_max); + } + if (freq_shift7p5khz_present) { + j.write_str("frequencyShift7p5khz", "true"); } j.end_obj(); } -const char* eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n4", "n8", "n16", "n32"}; - return convert_enum_idx(names, 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 +// PCCH-Config ::= SEQUENCE +SRSASN_CODE pcch_cfg_s::pack(bit_ref& bref) const { - static const uint8_t numbers[] = {1, 2, 4, 8, 16, 32}; - return map_enum_number(numbers, 6, value, "eutra_mbsfn_sf_cfg_s::radioframe_alloc_period_e_"); -} + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(first_pdcch_monitoring_occasion_of_po_present, 1)); -void eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::destroy_() -{ - switch (type_) { - case types::one_frame: - c.destroy>(); - break; - case types::four_frames: - c.destroy>(); - break; - default: - break; + HANDLE_CODE(default_paging_cycle.pack(bref)); + HANDLE_CODE(nand_paging_frame_offset.pack(bref)); + HANDLE_CODE(ns.pack(bref)); + if (first_pdcch_monitoring_occasion_of_po_present) { + HANDLE_CODE(first_pdcch_monitoring_occasion_of_po.pack(bref)); } -} -void eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::one_frame: - c.init>(); - break; - case types::four_frames: - c.init>(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present; + group_flags[1] |= ran_paging_in_idle_po_r17_present; + group_flags[1] |= first_pdcch_monitoring_occasion_of_po_v1710.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present, 1)); + if (nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present) { + HANDLE_CODE(pack_integer(bref, nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16, (uint8_t)2u, (uint8_t)4u)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ran_paging_in_idle_po_r17_present, 1)); + HANDLE_CODE(bref.pack(first_pdcch_monitoring_occasion_of_po_v1710.is_present(), 1)); + if (first_pdcch_monitoring_occasion_of_po_v1710.is_present()) { + HANDLE_CODE(first_pdcch_monitoring_occasion_of_po_v1710->pack(bref)); + } + } } + 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 pcch_cfg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(first_pdcch_monitoring_occasion_of_po_present, 1)); + + HANDLE_CODE(default_paging_cycle.unpack(bref)); + HANDLE_CODE(nand_paging_frame_offset.unpack(bref)); + HANDLE_CODE(ns.unpack(bref)); + if (first_pdcch_monitoring_occasion_of_po_present) { + HANDLE_CODE(first_pdcch_monitoring_occasion_of_po.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(nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present, 1)); + if (nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present) { + HANDLE_CODE(unpack_integer(nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16, bref, (uint8_t)2u, (uint8_t)4u)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(ran_paging_in_idle_po_r17_present, 1)); + unpack_presence_flag(first_pdcch_monitoring_occasion_of_po_v1710, bref); + if (first_pdcch_monitoring_occasion_of_po_v1710.is_present()) { + HANDLE_CODE(first_pdcch_monitoring_occasion_of_po_v1710->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void pcch_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("defaultPagingCycle", default_paging_cycle.to_string()); + j.write_fieldname("nAndPagingFrameOffset"); + nand_paging_frame_offset.to_json(j); + j.write_str("ns", ns.to_string()); + if (first_pdcch_monitoring_occasion_of_po_present) { + j.write_fieldname("firstPDCCH-MonitoringOccasionOfPO"); + first_pdcch_monitoring_occasion_of_po.to_json(j); + } + if (ext) { + if (nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present) { + j.write_int("nrofPDCCH-MonitoringOccasionPerSSB-InPO-r16", nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16); + } + if (ran_paging_in_idle_po_r17_present) { + j.write_str("ranPagingInIdlePO-r17", "true"); + } + if (first_pdcch_monitoring_occasion_of_po_v1710.is_present()) { + j.write_fieldname("firstPDCCH-MonitoringOccasionOfPO-v1710"); + first_pdcch_monitoring_occasion_of_po_v1710->to_json(j); + } + } + j.end_obj(); +} + +void pcch_cfg_s::nand_paging_frame_offset_c_::destroy_() {} +void pcch_cfg_s::nand_paging_frame_offset_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +pcch_cfg_s::nand_paging_frame_offset_c_::nand_paging_frame_offset_c_( + const pcch_cfg_s::nand_paging_frame_offset_c_& other) { type_ = other.type(); switch (type_) { - case types::one_frame: - c.init(other.c.get>()); + case types::one_t: break; - case types::four_frames: - c.init(other.c.get>()); + case types::half_t: + c.init(other.c.get()); + break; + case types::quarter_t: + c.init(other.c.get()); + break; + case types::one_eighth_t: + c.init(other.c.get()); + break; + case types::one_sixteenth_t: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::nand_paging_frame_offset_c_"); } } -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) +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; } set(other.type()); switch (type_) { - case types::one_frame: - c.set(other.c.get>()); + case types::one_t: break; - case types::four_frames: - c.set(other.c.get>()); + case types::half_t: + c.set(other.c.get()); + break; + case types::quarter_t: + c.set(other.c.get()); + break; + case types::one_eighth_t: + c.set(other.c.get()); + break; + case types::one_sixteenth_t: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::nand_paging_frame_offset_c_"); } return *this; } -fixed_bitstring<6>& eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::set_one_frame() +void pcch_cfg_s::nand_paging_frame_offset_c_::set_one_t() { - set(types::one_frame); - return c.get>(); + set(types::one_t); } -fixed_bitstring<24>& eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::set_four_frames() +uint8_t& pcch_cfg_s::nand_paging_frame_offset_c_::set_half_t() { - set(types::four_frames); - return c.get>(); + set(types::half_t); + return c.get(); } -void eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::to_json(json_writer& j) const +uint8_t& pcch_cfg_s::nand_paging_frame_offset_c_::set_quarter_t() +{ + set(types::quarter_t); + return c.get(); +} +uint8_t& pcch_cfg_s::nand_paging_frame_offset_c_::set_one_eighth_t() +{ + set(types::one_eighth_t); + return c.get(); +} +uint8_t& pcch_cfg_s::nand_paging_frame_offset_c_::set_one_sixteenth_t() +{ + set(types::one_sixteenth_t); + return c.get(); +} +void pcch_cfg_s::nand_paging_frame_offset_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::one_t: break; - case types::four_frames: - j.write_str("fourFrames", c.get>().to_string()); + case types::half_t: + j.write_int("halfT", c.get()); + break; + case types::quarter_t: + j.write_int("quarterT", c.get()); + break; + case types::one_eighth_t: + j.write_int("oneEighthT", c.get()); + break; + case types::one_sixteenth_t: + j.write_int("oneSixteenthT", c.get()); break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::nand_paging_frame_offset_c_"); } j.end_obj(); } -SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::pack(bit_ref& bref) const +SRSASN_CODE pcch_cfg_s::nand_paging_frame_offset_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::one_frame: - HANDLE_CODE(c.get>().pack(bref)); + case types::one_t: break; - case types::four_frames: - HANDLE_CODE(c.get>().pack(bref)); + case types::half_t: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)1u)); + break; + case types::quarter_t: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); + break; + case types::one_eighth_t: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); + break; + case types::one_sixteenth_t: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::nand_paging_frame_offset_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc1_c_::unpack(cbit_ref& bref) +SRSASN_CODE pcch_cfg_s::nand_paging_frame_offset_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::one_t: break; - case types::four_frames: - HANDLE_CODE(c.get>().unpack(bref)); + case types::half_t: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)1u)); + break; + case types::quarter_t: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); + break; + case types::one_eighth_t: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); + break; + case types::one_sixteenth_t: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); break; default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc1_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::nand_paging_frame_offset_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::destroy_() +const char* pcch_cfg_s::nand_paging_frame_offset_c_::types_opts::to_string() const { - switch (type_) { - case types::one_frame: - c.destroy>(); - break; - case types::four_frames: - c.destroy>(); - break; - default: - break; - } + static const char* names[] = {"oneT", "halfT", "quarterT", "oneEighthT", "oneSixteenthT"}; + return convert_enum_idx(names, 5, value, "pcch_cfg_s::nand_paging_frame_offset_c_::types"); } -void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::set(types::options e) +float pcch_cfg_s::nand_paging_frame_offset_c_::types_opts::to_number() const { - destroy_(); - type_ = e; - switch (type_) { - case types::one_frame: - c.init>(); - break; - case types::four_frames: - c.init>(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_c_"); - } + static const float numbers[] = {1.0, 0.5, 0.25, 0.125, 0.0625}; + return map_enum_number(numbers, 5, value, "pcch_cfg_s::nand_paging_frame_offset_c_::types"); } -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::one_frame: - c.init(other.c.get>()); - break; - case types::four_frames: - c.init(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "eutra_mbsfn_sf_cfg_s::sf_alloc2_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) -{ - 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_alloc2_c_"); - } - - return *this; -} -fixed_bitstring<2>& eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::set_one_frame() -{ - set(types::one_frame); - return c.get>(); -} -fixed_bitstring<8>& eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::set_four_frames() -{ - set(types::four_frames); - return c.get>(); -} -void eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::to_json(json_writer& j) 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_alloc2_c_"); - } - j.end_obj(); -} -SRSASN_CODE eutra_mbsfn_sf_cfg_s::sf_alloc2_c_::pack(bit_ref& bref) 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_alloc2_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::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_alloc2_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// RACH-ConfigCommonTwoStepRA-r16 ::= SEQUENCE -SRSASN_CODE rach_cfg_common_two_step_ra_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(msg_a_total_nof_ra_preambs_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_cb_preambs_per_ssb_per_shared_ro_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_ssb_shared_ro_mask_idx_r16_present, 1)); - HANDLE_CODE(bref.pack(group_b_cfg_two_step_ra_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_prach_root_seq_idx_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_trans_max_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_rsrp_thres_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_rsrp_thres_ssb_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_subcarrier_spacing_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_restricted_set_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(ra_prioritization_for_access_id_two_step_r16_present, 1)); - HANDLE_CODE(bref.pack(ra_contention_resolution_timer_r16_present, 1)); - - HANDLE_CODE(rach_cfg_generic_two_step_ra_r16.pack(bref)); - if (msg_a_total_nof_ra_preambs_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_total_nof_ra_preambs_r16, (uint8_t)1u, (uint8_t)63u)); - } - if (msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_present) { - HANDLE_CODE(msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16.pack(bref)); - } - if (msg_a_cb_preambs_per_ssb_per_shared_ro_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_cb_preambs_per_ssb_per_shared_ro_r16, (uint8_t)1u, (uint8_t)60u)); - } - if (msg_a_ssb_shared_ro_mask_idx_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_ssb_shared_ro_mask_idx_r16, (uint8_t)1u, (uint8_t)15u)); - } - if (group_b_cfg_two_step_ra_r16_present) { - HANDLE_CODE(group_b_cfg_two_step_ra_r16.pack(bref)); - } - if (msg_a_prach_root_seq_idx_r16_present) { - HANDLE_CODE(msg_a_prach_root_seq_idx_r16.pack(bref)); - } - if (msg_a_trans_max_r16_present) { - HANDLE_CODE(msg_a_trans_max_r16.pack(bref)); - } - if (msg_a_rsrp_thres_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_rsrp_thres_r16, (uint8_t)0u, (uint8_t)127u)); - } - if (msg_a_rsrp_thres_ssb_r16_present) { - HANDLE_CODE(pack_integer(bref, msg_a_rsrp_thres_ssb_r16, (uint8_t)0u, (uint8_t)127u)); - } - if (msg_a_subcarrier_spacing_r16_present) { - HANDLE_CODE(msg_a_subcarrier_spacing_r16.pack(bref)); - } - if (msg_a_restricted_set_cfg_r16_present) { - HANDLE_CODE(msg_a_restricted_set_cfg_r16.pack(bref)); - } - if (ra_prioritization_for_access_id_two_step_r16_present) { - HANDLE_CODE(ra_prioritization_for_access_id_two_step_r16.ra_prioritization_r16.pack(bref)); - HANDLE_CODE(ra_prioritization_for_access_id_two_step_r16.ra_prioritization_for_ai_r16.pack(bref)); - } - if (ra_contention_resolution_timer_r16_present) { - HANDLE_CODE(ra_contention_resolution_timer_r16.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= ra_prioritization_for_slicing_two_step_r17.is_present(); - group_flags[0] |= feature_combination_preambs_list_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ra_prioritization_for_slicing_two_step_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(feature_combination_preambs_list_r17.is_present(), 1)); - if (ra_prioritization_for_slicing_two_step_r17.is_present()) { - HANDLE_CODE(ra_prioritization_for_slicing_two_step_r17->pack(bref)); - } - if (feature_combination_preambs_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *feature_combination_preambs_list_r17, 1, 256)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rach_cfg_common_two_step_ra_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(msg_a_total_nof_ra_preambs_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_cb_preambs_per_ssb_per_shared_ro_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_ssb_shared_ro_mask_idx_r16_present, 1)); - HANDLE_CODE(bref.unpack(group_b_cfg_two_step_ra_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_prach_root_seq_idx_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_trans_max_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_rsrp_thres_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_rsrp_thres_ssb_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_subcarrier_spacing_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_restricted_set_cfg_r16_present, 1)); - HANDLE_CODE(bref.unpack(ra_prioritization_for_access_id_two_step_r16_present, 1)); - HANDLE_CODE(bref.unpack(ra_contention_resolution_timer_r16_present, 1)); - - HANDLE_CODE(rach_cfg_generic_two_step_ra_r16.unpack(bref)); - if (msg_a_total_nof_ra_preambs_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_total_nof_ra_preambs_r16, bref, (uint8_t)1u, (uint8_t)63u)); - } - if (msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_present) { - HANDLE_CODE(msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16.unpack(bref)); - } - if (msg_a_cb_preambs_per_ssb_per_shared_ro_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_cb_preambs_per_ssb_per_shared_ro_r16, bref, (uint8_t)1u, (uint8_t)60u)); - } - if (msg_a_ssb_shared_ro_mask_idx_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_ssb_shared_ro_mask_idx_r16, bref, (uint8_t)1u, (uint8_t)15u)); - } - if (group_b_cfg_two_step_ra_r16_present) { - HANDLE_CODE(group_b_cfg_two_step_ra_r16.unpack(bref)); - } - if (msg_a_prach_root_seq_idx_r16_present) { - HANDLE_CODE(msg_a_prach_root_seq_idx_r16.unpack(bref)); - } - if (msg_a_trans_max_r16_present) { - HANDLE_CODE(msg_a_trans_max_r16.unpack(bref)); - } - if (msg_a_rsrp_thres_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_rsrp_thres_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (msg_a_rsrp_thres_ssb_r16_present) { - HANDLE_CODE(unpack_integer(msg_a_rsrp_thres_ssb_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (msg_a_subcarrier_spacing_r16_present) { - HANDLE_CODE(msg_a_subcarrier_spacing_r16.unpack(bref)); - } - if (msg_a_restricted_set_cfg_r16_present) { - HANDLE_CODE(msg_a_restricted_set_cfg_r16.unpack(bref)); - } - if (ra_prioritization_for_access_id_two_step_r16_present) { - HANDLE_CODE(ra_prioritization_for_access_id_two_step_r16.ra_prioritization_r16.unpack(bref)); - HANDLE_CODE(ra_prioritization_for_access_id_two_step_r16.ra_prioritization_for_ai_r16.unpack(bref)); - } - if (ra_contention_resolution_timer_r16_present) { - HANDLE_CODE(ra_contention_resolution_timer_r16.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); - - unpack_presence_flag(ra_prioritization_for_slicing_two_step_r17, bref); - unpack_presence_flag(feature_combination_preambs_list_r17, bref); - if (ra_prioritization_for_slicing_two_step_r17.is_present()) { - HANDLE_CODE(ra_prioritization_for_slicing_two_step_r17->unpack(bref)); - } - if (feature_combination_preambs_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*feature_combination_preambs_list_r17, bref, 1, 256)); - } - } - } - return SRSASN_SUCCESS; -} -void rach_cfg_common_two_step_ra_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("rach-ConfigGenericTwoStepRA-r16"); - rach_cfg_generic_two_step_ra_r16.to_json(j); - if (msg_a_total_nof_ra_preambs_r16_present) { - j.write_int("msgA-TotalNumberOfRA-Preambles-r16", msg_a_total_nof_ra_preambs_r16); - } - if (msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_present) { - j.write_fieldname("msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16"); - msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16.to_json(j); - } - if (msg_a_cb_preambs_per_ssb_per_shared_ro_r16_present) { - j.write_int("msgA-CB-PreamblesPerSSB-PerSharedRO-r16", msg_a_cb_preambs_per_ssb_per_shared_ro_r16); - } - if (msg_a_ssb_shared_ro_mask_idx_r16_present) { - j.write_int("msgA-SSB-SharedRO-MaskIndex-r16", msg_a_ssb_shared_ro_mask_idx_r16); - } - if (group_b_cfg_two_step_ra_r16_present) { - j.write_fieldname("groupB-ConfiguredTwoStepRA-r16"); - group_b_cfg_two_step_ra_r16.to_json(j); - } - if (msg_a_prach_root_seq_idx_r16_present) { - j.write_fieldname("msgA-PRACH-RootSequenceIndex-r16"); - msg_a_prach_root_seq_idx_r16.to_json(j); - } - if (msg_a_trans_max_r16_present) { - j.write_str("msgA-TransMax-r16", msg_a_trans_max_r16.to_string()); - } - if (msg_a_rsrp_thres_r16_present) { - j.write_int("msgA-RSRP-Threshold-r16", msg_a_rsrp_thres_r16); - } - if (msg_a_rsrp_thres_ssb_r16_present) { - j.write_int("msgA-RSRP-ThresholdSSB-r16", msg_a_rsrp_thres_ssb_r16); - } - if (msg_a_subcarrier_spacing_r16_present) { - j.write_str("msgA-SubcarrierSpacing-r16", msg_a_subcarrier_spacing_r16.to_string()); - } - if (msg_a_restricted_set_cfg_r16_present) { - j.write_str("msgA-RestrictedSetConfig-r16", msg_a_restricted_set_cfg_r16.to_string()); - } - if (ra_prioritization_for_access_id_two_step_r16_present) { - j.write_fieldname("ra-PrioritizationForAccessIdentityTwoStep-r16"); - j.start_obj(); - j.write_fieldname("ra-Prioritization-r16"); - ra_prioritization_for_access_id_two_step_r16.ra_prioritization_r16.to_json(j); - j.write_str("ra-PrioritizationForAI-r16", - ra_prioritization_for_access_id_two_step_r16.ra_prioritization_for_ai_r16.to_string()); - j.end_obj(); - } - if (ra_contention_resolution_timer_r16_present) { - j.write_str("ra-ContentionResolutionTimer-r16", ra_contention_resolution_timer_r16.to_string()); - } - if (ext) { - if (ra_prioritization_for_slicing_two_step_r17.is_present()) { - j.write_fieldname("ra-PrioritizationForSlicingTwoStep-r17"); - ra_prioritization_for_slicing_two_step_r17->to_json(j); - } - if (feature_combination_preambs_list_r17.is_present()) { - j.start_array("featureCombinationPreamblesList-r17"); - for (const auto& e1 : *feature_combination_preambs_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - } - j.end_obj(); -} - -void rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::destroy_() {} -void rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_:: - msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_( - const rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::one_eighth: - c.init(other.c.get()); - break; - case types::one_fourth: - c.init(other.c.get()); - break; - case types::one_half: - c.init(other.c.get()); - break; - case types::one: - c.init(other.c.get()); - break; - case types::two: - c.init(other.c.get()); - break; - case types::four: - c.init(other.c.get()); - break; - case types::eight: - c.init(other.c.get()); - break; - case types::sixteen: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_"); - } -} -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_& -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::operator=( - const rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::one_eighth: - c.set(other.c.get()); - break; - case types::one_fourth: - c.set(other.c.get()); - break; - case types::one_half: - c.set(other.c.get()); - break; - case types::one: - c.set(other.c.get()); - break; - case types::two: - c.set(other.c.get()); - break; - case types::four: - c.set(other.c.get()); - break; - case types::eight: - c.set(other.c.get()); - break; - case types::sixteen: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_"); - } - - return *this; -} -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_eighth_e_& -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_one_eighth() -{ - set(types::one_eighth); - return c.get(); -} -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_fourth_e_& -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_one_fourth() -{ - set(types::one_fourth); - return c.get(); -} -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_half_e_& -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_one_half() -{ - set(types::one_half); - return c.get(); -} -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_e_& -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_one() -{ - set(types::one); - return c.get(); -} -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::two_e_& -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_two() -{ - set(types::two); - return c.get(); -} -uint8_t& rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_four() -{ - set(types::four); - return c.get(); -} -uint8_t& rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_eight() -{ - set(types::eight); - return c.get(); -} -uint8_t& rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::set_sixteen() -{ - set(types::sixteen); - return c.get(); -} -void rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::to_json( - json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::one_eighth: - j.write_str("oneEighth", c.get().to_string()); - break; - case types::one_fourth: - j.write_str("oneFourth", c.get().to_string()); - break; - case types::one_half: - j.write_str("oneHalf", c.get().to_string()); - break; - case types::one: - j.write_str("one", c.get().to_string()); - break; - case types::two: - j.write_str("two", c.get().to_string()); - break; - case types::four: - j.write_int("four", c.get()); - break; - case types::eight: - j.write_int("eight", c.get()); - break; - case types::sixteen: - j.write_int("sixteen", c.get()); - break; - default: - log_invalid_choice_id( - type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::one_eighth: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::one_fourth: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::one_half: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::one: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::two: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::four: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)16u)); - break; - case types::eight: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)8u)); - break; - case types::sixteen: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)4u)); - break; - default: - log_invalid_choice_id( - type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::one_eighth: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::one_fourth: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::one_half: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::one: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::two: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::four: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)16u)); - break; - case types::eight: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)8u)); - break; - case types::sixteen: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)4u)); - break; - default: - log_invalid_choice_id( - type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_:: - one_eighth_opts::to_string() const -{ - static const char* names[] = { - "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; - return convert_enum_idx( - names, - 16, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_eighth_e_"); -} -uint8_t rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_eighth_opts:: - to_number() const -{ - static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return map_enum_number( - numbers, - 16, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_eighth_e_"); -} - -const char* rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_:: - one_fourth_opts::to_string() const -{ - static const char* names[] = { - "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; - return convert_enum_idx( - names, - 16, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_fourth_e_"); -} -uint8_t rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_fourth_opts:: - to_number() const -{ - static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return map_enum_number( - numbers, - 16, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_fourth_e_"); -} - -const char* -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_half_opts::to_string() - const -{ - static const char* names[] = { - "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; - return convert_enum_idx( - names, - 16, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_half_e_"); -} -uint8_t -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_half_opts::to_number() - const -{ - static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return map_enum_number( - numbers, - 16, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_half_e_"); -} - -const char* -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_opts::to_string() - const -{ - static const char* names[] = { - "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; - return convert_enum_idx( - names, - 16, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_e_"); -} -uint8_t -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_opts::to_number() - const -{ - static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return map_enum_number( - numbers, - 16, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::one_e_"); -} - -const char* -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::two_opts::to_string() - const -{ - static const char* names[] = {"n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32"}; - return convert_enum_idx( - names, - 8, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::two_e_"); -} -uint8_t -rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::two_opts::to_number() - const -{ - static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32}; - return map_enum_number( - numbers, - 8, - value, - "rach_cfg_common_two_step_ra_r16_s::msg_a_ssb_per_rach_occasion_and_cb_preambs_per_ssb_r16_c_::two_e_"); -} - -void rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::destroy_() {} -void rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::msg_a_prach_root_seq_idx_r16_c_( - const rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::l839: - c.init(other.c.get()); - break; - case types::l139: - c.init(other.c.get()); - break; - case types::l571: - c.init(other.c.get()); - break; - case types::l1151: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_"); - } -} -rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_& -rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::operator=( - const rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::l839: - c.set(other.c.get()); - break; - case types::l139: - c.set(other.c.get()); - break; - case types::l571: - c.set(other.c.get()); - break; - case types::l1151: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_"); - } - - return *this; -} -uint16_t& rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::set_l839() -{ - set(types::l839); - return c.get(); -} -uint8_t& rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::set_l139() -{ - set(types::l139); - return c.get(); -} -uint16_t& rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::set_l571() -{ - set(types::l571); - return c.get(); -} -uint16_t& rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::set_l1151() -{ - set(types::l1151); - return c.get(); -} -void rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::l839: - j.write_int("l839", c.get()); - break; - case types::l139: - j.write_int("l139", c.get()); - break; - case types::l571: - j.write_int("l571", c.get()); - break; - case types::l1151: - j.write_int("l1151", c.get()); - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::l839: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)837u)); - break; - case types::l139: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)137u)); - break; - case types::l571: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)569u)); - break; - case types::l1151: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1149u)); - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::l839: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)837u)); - break; - case types::l139: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)137u)); - break; - case types::l571: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)569u)); - break; - case types::l1151: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1149u)); - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_two_step_ra_r16_s::msg_a_prach_root_seq_idx_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* rach_cfg_common_two_step_ra_r16_s::msg_a_trans_max_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n4", "n6", "n8", "n10", "n20", "n50", "n100", "n200"}; - return convert_enum_idx(names, 10, value, "rach_cfg_common_two_step_ra_r16_s::msg_a_trans_max_r16_e_"); -} -uint8_t rach_cfg_common_two_step_ra_r16_s::msg_a_trans_max_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 6, 8, 10, 20, 50, 100, 200}; - return map_enum_number(numbers, 10, value, "rach_cfg_common_two_step_ra_r16_s::msg_a_trans_max_r16_e_"); -} - -const char* rach_cfg_common_two_step_ra_r16_s::msg_a_restricted_set_cfg_r16_opts::to_string() const -{ - static const char* names[] = {"unrestrictedSet", "restrictedSetTypeA", "restrictedSetTypeB"}; - return convert_enum_idx(names, 3, value, "rach_cfg_common_two_step_ra_r16_s::msg_a_restricted_set_cfg_r16_e_"); -} - -const char* rach_cfg_common_two_step_ra_r16_s::ra_contention_resolution_timer_r16_opts::to_string() const -{ - static const char* names[] = {"sf8", "sf16", "sf24", "sf32", "sf40", "sf48", "sf56", "sf64"}; - return convert_enum_idx(names, 8, value, "rach_cfg_common_two_step_ra_r16_s::ra_contention_resolution_timer_r16_e_"); -} -uint8_t rach_cfg_common_two_step_ra_r16_s::ra_contention_resolution_timer_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {8, 16, 24, 32, 40, 48, 56, 64}; - return map_enum_number(numbers, 8, value, "rach_cfg_common_two_step_ra_r16_s::ra_contention_resolution_timer_r16_e_"); -} - -// RACH-ConfigGeneric ::= SEQUENCE -SRSASN_CODE rach_cfg_generic_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, prach_cfg_idx, (uint16_t)0u, (uint16_t)255u)); - HANDLE_CODE(msg1_fdm.pack(bref)); - HANDLE_CODE(pack_integer(bref, msg1_freq_start, (uint16_t)0u, (uint16_t)274u)); - HANDLE_CODE(pack_integer(bref, zero_correlation_zone_cfg, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(pack_integer(bref, preamb_rx_target_pwr, (int16_t)-202, (int16_t)-60)); - HANDLE_CODE(preamb_trans_max.pack(bref)); - HANDLE_CODE(pwr_ramp_step.pack(bref)); - HANDLE_CODE(ra_resp_win.pack(bref)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= prach_cfg_period_scaling_iab_r16_present; - group_flags[0] |= prach_cfg_frame_offset_iab_r16_present; - group_flags[0] |= prach_cfg_s_offset_iab_r16_present; - group_flags[0] |= ra_resp_win_v1610_present; - group_flags[0] |= prach_cfg_idx_v1610_present; - group_flags[1] |= ra_resp_win_v1700_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(prach_cfg_period_scaling_iab_r16_present, 1)); - HANDLE_CODE(bref.pack(prach_cfg_frame_offset_iab_r16_present, 1)); - HANDLE_CODE(bref.pack(prach_cfg_s_offset_iab_r16_present, 1)); - HANDLE_CODE(bref.pack(ra_resp_win_v1610_present, 1)); - HANDLE_CODE(bref.pack(prach_cfg_idx_v1610_present, 1)); - if (prach_cfg_period_scaling_iab_r16_present) { - HANDLE_CODE(prach_cfg_period_scaling_iab_r16.pack(bref)); - } - if (prach_cfg_frame_offset_iab_r16_present) { - HANDLE_CODE(pack_integer(bref, prach_cfg_frame_offset_iab_r16, (uint8_t)0u, (uint8_t)63u)); - } - if (prach_cfg_s_offset_iab_r16_present) { - HANDLE_CODE(pack_integer(bref, prach_cfg_s_offset_iab_r16, (uint8_t)0u, (uint8_t)39u)); - } - if (ra_resp_win_v1610_present) { - HANDLE_CODE(ra_resp_win_v1610.pack(bref)); - } - if (prach_cfg_idx_v1610_present) { - HANDLE_CODE(pack_integer(bref, prach_cfg_idx_v1610, (uint16_t)256u, (uint16_t)262u)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ra_resp_win_v1700_present, 1)); - if (ra_resp_win_v1700_present) { - HANDLE_CODE(ra_resp_win_v1700.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rach_cfg_generic_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(prach_cfg_idx, bref, (uint16_t)0u, (uint16_t)255u)); - HANDLE_CODE(msg1_fdm.unpack(bref)); - HANDLE_CODE(unpack_integer(msg1_freq_start, bref, (uint16_t)0u, (uint16_t)274u)); - HANDLE_CODE(unpack_integer(zero_correlation_zone_cfg, bref, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(unpack_integer(preamb_rx_target_pwr, bref, (int16_t)-202, (int16_t)-60)); - HANDLE_CODE(preamb_trans_max.unpack(bref)); - HANDLE_CODE(pwr_ramp_step.unpack(bref)); - HANDLE_CODE(ra_resp_win.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(prach_cfg_period_scaling_iab_r16_present, 1)); - HANDLE_CODE(bref.unpack(prach_cfg_frame_offset_iab_r16_present, 1)); - HANDLE_CODE(bref.unpack(prach_cfg_s_offset_iab_r16_present, 1)); - HANDLE_CODE(bref.unpack(ra_resp_win_v1610_present, 1)); - HANDLE_CODE(bref.unpack(prach_cfg_idx_v1610_present, 1)); - if (prach_cfg_period_scaling_iab_r16_present) { - HANDLE_CODE(prach_cfg_period_scaling_iab_r16.unpack(bref)); - } - if (prach_cfg_frame_offset_iab_r16_present) { - HANDLE_CODE(unpack_integer(prach_cfg_frame_offset_iab_r16, bref, (uint8_t)0u, (uint8_t)63u)); - } - if (prach_cfg_s_offset_iab_r16_present) { - HANDLE_CODE(unpack_integer(prach_cfg_s_offset_iab_r16, bref, (uint8_t)0u, (uint8_t)39u)); - } - if (ra_resp_win_v1610_present) { - HANDLE_CODE(ra_resp_win_v1610.unpack(bref)); - } - if (prach_cfg_idx_v1610_present) { - HANDLE_CODE(unpack_integer(prach_cfg_idx_v1610, bref, (uint16_t)256u, (uint16_t)262u)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(ra_resp_win_v1700_present, 1)); - if (ra_resp_win_v1700_present) { - HANDLE_CODE(ra_resp_win_v1700.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void rach_cfg_generic_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("prach-ConfigurationIndex", prach_cfg_idx); - j.write_str("msg1-FDM", msg1_fdm.to_string()); - j.write_int("msg1-FrequencyStart", msg1_freq_start); - j.write_int("zeroCorrelationZoneConfig", zero_correlation_zone_cfg); - j.write_int("preambleReceivedTargetPower", preamb_rx_target_pwr); - j.write_str("preambleTransMax", preamb_trans_max.to_string()); - j.write_str("powerRampingStep", pwr_ramp_step.to_string()); - j.write_str("ra-ResponseWindow", ra_resp_win.to_string()); - if (ext) { - if (prach_cfg_period_scaling_iab_r16_present) { - j.write_str("prach-ConfigurationPeriodScaling-IAB-r16", prach_cfg_period_scaling_iab_r16.to_string()); - } - if (prach_cfg_frame_offset_iab_r16_present) { - j.write_int("prach-ConfigurationFrameOffset-IAB-r16", prach_cfg_frame_offset_iab_r16); - } - if (prach_cfg_s_offset_iab_r16_present) { - j.write_int("prach-ConfigurationSOffset-IAB-r16", prach_cfg_s_offset_iab_r16); - } - if (ra_resp_win_v1610_present) { - j.write_str("ra-ResponseWindow-v1610", ra_resp_win_v1610.to_string()); - } - if (prach_cfg_idx_v1610_present) { - j.write_int("prach-ConfigurationIndex-v1610", prach_cfg_idx_v1610); - } - if (ra_resp_win_v1700_present) { - j.write_str("ra-ResponseWindow-v1700", ra_resp_win_v1700.to_string()); - } - } - j.end_obj(); -} - -const char* rach_cfg_generic_s::msg1_fdm_opts::to_string() const -{ - static const char* names[] = {"one", "two", "four", "eight"}; - return convert_enum_idx(names, 4, value, "rach_cfg_generic_s::msg1_fdm_e_"); -} -uint8_t rach_cfg_generic_s::msg1_fdm_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "rach_cfg_generic_s::msg1_fdm_e_"); -} - -const char* rach_cfg_generic_s::preamb_trans_max_opts::to_string() const -{ - static const char* names[] = {"n3", "n4", "n5", "n6", "n7", "n8", "n10", "n20", "n50", "n100", "n200"}; - return convert_enum_idx(names, 11, value, "rach_cfg_generic_s::preamb_trans_max_e_"); -} -uint8_t rach_cfg_generic_s::preamb_trans_max_opts::to_number() const -{ - static const uint8_t numbers[] = {3, 4, 5, 6, 7, 8, 10, 20, 50, 100, 200}; - return map_enum_number(numbers, 11, value, "rach_cfg_generic_s::preamb_trans_max_e_"); -} - -const char* rach_cfg_generic_s::pwr_ramp_step_opts::to_string() const -{ - static const char* names[] = {"dB0", "dB2", "dB4", "dB6"}; - return convert_enum_idx(names, 4, value, "rach_cfg_generic_s::pwr_ramp_step_e_"); -} -uint8_t rach_cfg_generic_s::pwr_ramp_step_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 2, 4, 6}; - return map_enum_number(numbers, 4, value, "rach_cfg_generic_s::pwr_ramp_step_e_"); -} - -const char* rach_cfg_generic_s::ra_resp_win_opts::to_string() const -{ - static const char* names[] = {"sl1", "sl2", "sl4", "sl8", "sl10", "sl20", "sl40", "sl80"}; - return convert_enum_idx(names, 8, value, "rach_cfg_generic_s::ra_resp_win_e_"); -} -uint8_t rach_cfg_generic_s::ra_resp_win_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8, 10, 20, 40, 80}; - return map_enum_number(numbers, 8, value, "rach_cfg_generic_s::ra_resp_win_e_"); -} - -const char* rach_cfg_generic_s::prach_cfg_period_scaling_iab_r16_opts::to_string() const -{ - static const char* names[] = {"scf1", "scf2", "scf4", "scf8", "scf16", "scf32", "scf64"}; - return convert_enum_idx(names, 7, value, "rach_cfg_generic_s::prach_cfg_period_scaling_iab_r16_e_"); -} -uint8_t rach_cfg_generic_s::prach_cfg_period_scaling_iab_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8, 16, 32, 64}; - return map_enum_number(numbers, 7, value, "rach_cfg_generic_s::prach_cfg_period_scaling_iab_r16_e_"); -} - -const char* rach_cfg_generic_s::ra_resp_win_v1610_opts::to_string() const -{ - static const char* names[] = {"sl60", "sl160"}; - return convert_enum_idx(names, 2, value, "rach_cfg_generic_s::ra_resp_win_v1610_e_"); -} -uint8_t rach_cfg_generic_s::ra_resp_win_v1610_opts::to_number() const -{ - static const uint8_t numbers[] = {60, 160}; - return map_enum_number(numbers, 2, value, "rach_cfg_generic_s::ra_resp_win_v1610_e_"); -} - -const char* rach_cfg_generic_s::ra_resp_win_v1700_opts::to_string() const -{ - static const char* names[] = {"sl240", "sl320", "sl640", "sl960", "sl1280", "sl1920", "sl2560"}; - return convert_enum_idx(names, 7, value, "rach_cfg_generic_s::ra_resp_win_v1700_e_"); -} -uint16_t rach_cfg_generic_s::ra_resp_win_v1700_opts::to_number() const -{ - static const uint16_t numbers[] = {240, 320, 640, 960, 1280, 1920, 2560}; - return map_enum_number(numbers, 7, value, "rach_cfg_generic_s::ra_resp_win_v1700_e_"); -} - -// MsgA-ConfigCommon-r16 ::= SEQUENCE -SRSASN_CODE msg_a_cfg_common_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(msg_a_pusch_cfg_r16_present, 1)); - - HANDLE_CODE(rach_cfg_common_two_step_ra_r16.pack(bref)); - if (msg_a_pusch_cfg_r16_present) { - HANDLE_CODE(msg_a_pusch_cfg_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE msg_a_cfg_common_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(msg_a_pusch_cfg_r16_present, 1)); - - HANDLE_CODE(rach_cfg_common_two_step_ra_r16.unpack(bref)); - if (msg_a_pusch_cfg_r16_present) { - HANDLE_CODE(msg_a_pusch_cfg_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void msg_a_cfg_common_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("rach-ConfigCommonTwoStepRA-r16"); - rach_cfg_common_two_step_ra_r16.to_json(j); - if (msg_a_pusch_cfg_r16_present) { - j.write_fieldname("msgA-PUSCH-Config-r16"); - msg_a_pusch_cfg_r16.to_json(j); - } - j.end_obj(); -} - -// NR-MultiBandInfo ::= SEQUENCE -SRSASN_CODE nr_multi_band_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(freq_band_ind_nr_present, 1)); - HANDLE_CODE(bref.pack(nr_ns_pmax_list.size() > 0, 1)); - - if (freq_band_ind_nr_present) { - HANDLE_CODE(pack_integer(bref, freq_band_ind_nr, (uint16_t)1u, (uint16_t)1024u)); - } - if (nr_ns_pmax_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, nr_ns_pmax_list, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE nr_multi_band_info_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(freq_band_ind_nr_present, 1)); - bool nr_ns_pmax_list_present; - HANDLE_CODE(bref.unpack(nr_ns_pmax_list_present, 1)); - - if (freq_band_ind_nr_present) { - HANDLE_CODE(unpack_integer(freq_band_ind_nr, bref, (uint16_t)1u, (uint16_t)1024u)); - } - if (nr_ns_pmax_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(nr_ns_pmax_list, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -void nr_multi_band_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (freq_band_ind_nr_present) { - j.write_int("freqBandIndicatorNR", freq_band_ind_nr); - } - if (nr_ns_pmax_list.size() > 0) { - j.start_array("nr-NS-PmaxList"); - for (const auto& e1 : nr_ns_pmax_list) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// PDSCH-TimeDomainResourceAllocation ::= SEQUENCE -SRSASN_CODE pdsch_time_domain_res_alloc_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(k0_present, 1)); - - if (k0_present) { - HANDLE_CODE(pack_integer(bref, k0, (uint8_t)0u, (uint8_t)32u)); - } - HANDLE_CODE(map_type.pack(bref)); - HANDLE_CODE(pack_integer(bref, start_symbol_and_len, (uint8_t)0u, (uint8_t)127u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pdsch_time_domain_res_alloc_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(k0_present, 1)); - - if (k0_present) { - HANDLE_CODE(unpack_integer(k0, bref, (uint8_t)0u, (uint8_t)32u)); - } - HANDLE_CODE(map_type.unpack(bref)); - HANDLE_CODE(unpack_integer(start_symbol_and_len, bref, (uint8_t)0u, (uint8_t)127u)); - - return SRSASN_SUCCESS; -} -void pdsch_time_domain_res_alloc_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (k0_present) { - j.write_int("k0", k0); - } - j.write_str("mappingType", map_type.to_string()); - j.write_int("startSymbolAndLength", start_symbol_and_len); - j.end_obj(); -} - -const char* pdsch_time_domain_res_alloc_s::map_type_opts::to_string() const -{ - static const char* names[] = {"typeA", "typeB"}; - return convert_enum_idx(names, 2, value, "pdsch_time_domain_res_alloc_s::map_type_e_"); -} - -// PDSCH-TimeDomainResourceAllocation-r16 ::= SEQUENCE -SRSASN_CODE pdsch_time_domain_res_alloc_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(k0_r16_present, 1)); - HANDLE_CODE(bref.pack(repeat_num_r16_present, 1)); - - if (k0_r16_present) { - HANDLE_CODE(pack_integer(bref, k0_r16, (uint8_t)0u, (uint8_t)32u)); - } - HANDLE_CODE(map_type_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, start_symbol_and_len_r16, (uint8_t)0u, (uint8_t)127u)); - if (repeat_num_r16_present) { - HANDLE_CODE(repeat_num_r16.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= k0_v1710_present; - group_flags[1] |= repeat_num_v1730_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(k0_v1710_present, 1)); - if (k0_v1710_present) { - HANDLE_CODE(pack_integer(bref, k0_v1710, (uint8_t)33u, (uint8_t)128u)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(repeat_num_v1730_present, 1)); - if (repeat_num_v1730_present) { - HANDLE_CODE(repeat_num_v1730.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pdsch_time_domain_res_alloc_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(k0_r16_present, 1)); - HANDLE_CODE(bref.unpack(repeat_num_r16_present, 1)); - - if (k0_r16_present) { - HANDLE_CODE(unpack_integer(k0_r16, bref, (uint8_t)0u, (uint8_t)32u)); - } - HANDLE_CODE(map_type_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(start_symbol_and_len_r16, bref, (uint8_t)0u, (uint8_t)127u)); - if (repeat_num_r16_present) { - HANDLE_CODE(repeat_num_r16.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(k0_v1710_present, 1)); - if (k0_v1710_present) { - HANDLE_CODE(unpack_integer(k0_v1710, bref, (uint8_t)33u, (uint8_t)128u)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(repeat_num_v1730_present, 1)); - if (repeat_num_v1730_present) { - HANDLE_CODE(repeat_num_v1730.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void pdsch_time_domain_res_alloc_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (k0_r16_present) { - j.write_int("k0-r16", k0_r16); - } - j.write_str("mappingType-r16", map_type_r16.to_string()); - j.write_int("startSymbolAndLength-r16", start_symbol_and_len_r16); - if (repeat_num_r16_present) { - j.write_str("repetitionNumber-r16", repeat_num_r16.to_string()); - } - if (ext) { - if (k0_v1710_present) { - j.write_int("k0-v1710", k0_v1710); - } - if (repeat_num_v1730_present) { - j.write_str("repetitionNumber-v1730", repeat_num_v1730.to_string()); - } - } - j.end_obj(); -} - -const char* pdsch_time_domain_res_alloc_r16_s::map_type_r16_opts::to_string() const -{ - static const char* names[] = {"typeA", "typeB"}; - return convert_enum_idx(names, 2, value, "pdsch_time_domain_res_alloc_r16_s::map_type_r16_e_"); -} - -const char* pdsch_time_domain_res_alloc_r16_s::repeat_num_r16_opts::to_string() const -{ - static const char* names[] = {"n2", "n3", "n4", "n5", "n6", "n7", "n8", "n16"}; - return convert_enum_idx(names, 8, value, "pdsch_time_domain_res_alloc_r16_s::repeat_num_r16_e_"); -} -uint8_t pdsch_time_domain_res_alloc_r16_s::repeat_num_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 3, 4, 5, 6, 7, 8, 16}; - return map_enum_number(numbers, 8, value, "pdsch_time_domain_res_alloc_r16_s::repeat_num_r16_e_"); -} - -const char* pdsch_time_domain_res_alloc_r16_s::repeat_num_v1730_opts::to_string() const -{ - static const char* names[] = {"n2", "n3", "n4", "n5", "n6", "n7", "n8", "n16"}; - return convert_enum_idx(names, 8, value, "pdsch_time_domain_res_alloc_r16_s::repeat_num_v1730_e_"); -} -uint8_t pdsch_time_domain_res_alloc_r16_s::repeat_num_v1730_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 3, 4, 5, 6, 7, 8, 16}; - return map_enum_number(numbers, 8, value, "pdsch_time_domain_res_alloc_r16_s::repeat_num_v1730_e_"); -} - -// PUSCH-TimeDomainResourceAllocation ::= SEQUENCE -SRSASN_CODE pusch_time_domain_res_alloc_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(k2_present, 1)); - - if (k2_present) { - HANDLE_CODE(pack_integer(bref, k2, (uint8_t)0u, (uint8_t)32u)); - } - HANDLE_CODE(map_type.pack(bref)); - HANDLE_CODE(pack_integer(bref, start_symbol_and_len, (uint8_t)0u, (uint8_t)127u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pusch_time_domain_res_alloc_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(k2_present, 1)); - - if (k2_present) { - HANDLE_CODE(unpack_integer(k2, bref, (uint8_t)0u, (uint8_t)32u)); - } - HANDLE_CODE(map_type.unpack(bref)); - HANDLE_CODE(unpack_integer(start_symbol_and_len, bref, (uint8_t)0u, (uint8_t)127u)); - - return SRSASN_SUCCESS; -} -void pusch_time_domain_res_alloc_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (k2_present) { - j.write_int("k2", k2); - } - j.write_str("mappingType", map_type.to_string()); - j.write_int("startSymbolAndLength", start_symbol_and_len); - j.end_obj(); -} - -const char* pusch_time_domain_res_alloc_s::map_type_opts::to_string() const -{ - static const char* names[] = {"typeA", "typeB"}; - return convert_enum_idx(names, 2, value, "pusch_time_domain_res_alloc_s::map_type_e_"); -} - -// RACH-ConfigCommon ::= SEQUENCE -SRSASN_CODE rach_cfg_common_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(total_nof_ra_preambs_present, 1)); - HANDLE_CODE(bref.pack(ssb_per_rach_occasion_and_cb_preambs_per_ssb_present, 1)); - HANDLE_CODE(bref.pack(group_bcfg_present, 1)); - HANDLE_CODE(bref.pack(rsrp_thres_ssb_present, 1)); - HANDLE_CODE(bref.pack(rsrp_thres_ssb_sul_present, 1)); - HANDLE_CODE(bref.pack(msg1_subcarrier_spacing_present, 1)); - HANDLE_CODE(bref.pack(msg3_transform_precoder_present, 1)); - - HANDLE_CODE(rach_cfg_generic.pack(bref)); - if (total_nof_ra_preambs_present) { - HANDLE_CODE(pack_integer(bref, total_nof_ra_preambs, (uint8_t)1u, (uint8_t)63u)); - } - if (ssb_per_rach_occasion_and_cb_preambs_per_ssb_present) { - HANDLE_CODE(ssb_per_rach_occasion_and_cb_preambs_per_ssb.pack(bref)); - } - if (group_bcfg_present) { - HANDLE_CODE(group_bcfg.ra_msg3_size_group_a.pack(bref)); - HANDLE_CODE(group_bcfg.msg_pwr_offset_group_b.pack(bref)); - HANDLE_CODE(pack_integer(bref, group_bcfg.nof_ra_preambs_group_a, (uint8_t)1u, (uint8_t)64u)); - } - HANDLE_CODE(ra_contention_resolution_timer.pack(bref)); - if (rsrp_thres_ssb_present) { - HANDLE_CODE(pack_integer(bref, rsrp_thres_ssb, (uint8_t)0u, (uint8_t)127u)); - } - if (rsrp_thres_ssb_sul_present) { - HANDLE_CODE(pack_integer(bref, rsrp_thres_ssb_sul, (uint8_t)0u, (uint8_t)127u)); - } - HANDLE_CODE(prach_root_seq_idx.pack(bref)); - if (msg1_subcarrier_spacing_present) { - HANDLE_CODE(msg1_subcarrier_spacing.pack(bref)); - } - HANDLE_CODE(restricted_set_cfg.pack(bref)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= ra_prioritization_for_access_id_r16.is_present(); - group_flags[0] |= prach_root_seq_idx_r16.is_present(); - group_flags[1] |= ra_prioritization_for_slicing_r17.is_present(); - group_flags[1] |= feature_combination_preambs_list_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ra_prioritization_for_access_id_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(prach_root_seq_idx_r16.is_present(), 1)); - if (ra_prioritization_for_access_id_r16.is_present()) { - HANDLE_CODE(ra_prioritization_for_access_id_r16->ra_prioritization_r16.pack(bref)); - HANDLE_CODE(ra_prioritization_for_access_id_r16->ra_prioritization_for_ai_r16.pack(bref)); - } - if (prach_root_seq_idx_r16.is_present()) { - HANDLE_CODE(prach_root_seq_idx_r16->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ra_prioritization_for_slicing_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(feature_combination_preambs_list_r17.is_present(), 1)); - if (ra_prioritization_for_slicing_r17.is_present()) { - HANDLE_CODE(ra_prioritization_for_slicing_r17->pack(bref)); - } - if (feature_combination_preambs_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *feature_combination_preambs_list_r17, 1, 256)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rach_cfg_common_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(total_nof_ra_preambs_present, 1)); - HANDLE_CODE(bref.unpack(ssb_per_rach_occasion_and_cb_preambs_per_ssb_present, 1)); - HANDLE_CODE(bref.unpack(group_bcfg_present, 1)); - HANDLE_CODE(bref.unpack(rsrp_thres_ssb_present, 1)); - HANDLE_CODE(bref.unpack(rsrp_thres_ssb_sul_present, 1)); - HANDLE_CODE(bref.unpack(msg1_subcarrier_spacing_present, 1)); - HANDLE_CODE(bref.unpack(msg3_transform_precoder_present, 1)); - - HANDLE_CODE(rach_cfg_generic.unpack(bref)); - if (total_nof_ra_preambs_present) { - HANDLE_CODE(unpack_integer(total_nof_ra_preambs, bref, (uint8_t)1u, (uint8_t)63u)); - } - if (ssb_per_rach_occasion_and_cb_preambs_per_ssb_present) { - HANDLE_CODE(ssb_per_rach_occasion_and_cb_preambs_per_ssb.unpack(bref)); - } - if (group_bcfg_present) { - HANDLE_CODE(group_bcfg.ra_msg3_size_group_a.unpack(bref)); - HANDLE_CODE(group_bcfg.msg_pwr_offset_group_b.unpack(bref)); - HANDLE_CODE(unpack_integer(group_bcfg.nof_ra_preambs_group_a, bref, (uint8_t)1u, (uint8_t)64u)); - } - HANDLE_CODE(ra_contention_resolution_timer.unpack(bref)); - if (rsrp_thres_ssb_present) { - HANDLE_CODE(unpack_integer(rsrp_thres_ssb, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (rsrp_thres_ssb_sul_present) { - HANDLE_CODE(unpack_integer(rsrp_thres_ssb_sul, bref, (uint8_t)0u, (uint8_t)127u)); - } - HANDLE_CODE(prach_root_seq_idx.unpack(bref)); - if (msg1_subcarrier_spacing_present) { - HANDLE_CODE(msg1_subcarrier_spacing.unpack(bref)); - } - HANDLE_CODE(restricted_set_cfg.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); - - unpack_presence_flag(ra_prioritization_for_access_id_r16, bref); - unpack_presence_flag(prach_root_seq_idx_r16, bref); - if (ra_prioritization_for_access_id_r16.is_present()) { - HANDLE_CODE(ra_prioritization_for_access_id_r16->ra_prioritization_r16.unpack(bref)); - HANDLE_CODE(ra_prioritization_for_access_id_r16->ra_prioritization_for_ai_r16.unpack(bref)); - } - if (prach_root_seq_idx_r16.is_present()) { - HANDLE_CODE(prach_root_seq_idx_r16->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(ra_prioritization_for_slicing_r17, bref); - unpack_presence_flag(feature_combination_preambs_list_r17, bref); - if (ra_prioritization_for_slicing_r17.is_present()) { - HANDLE_CODE(ra_prioritization_for_slicing_r17->unpack(bref)); - } - if (feature_combination_preambs_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*feature_combination_preambs_list_r17, bref, 1, 256)); - } - } - } - return SRSASN_SUCCESS; -} -void rach_cfg_common_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("rach-ConfigGeneric"); - rach_cfg_generic.to_json(j); - if (total_nof_ra_preambs_present) { - j.write_int("totalNumberOfRA-Preambles", total_nof_ra_preambs); - } - if (ssb_per_rach_occasion_and_cb_preambs_per_ssb_present) { - j.write_fieldname("ssb-perRACH-OccasionAndCB-PreamblesPerSSB"); - ssb_per_rach_occasion_and_cb_preambs_per_ssb.to_json(j); - } - if (group_bcfg_present) { - j.write_fieldname("groupBconfigured"); - j.start_obj(); - j.write_str("ra-Msg3SizeGroupA", group_bcfg.ra_msg3_size_group_a.to_string()); - j.write_str("messagePowerOffsetGroupB", group_bcfg.msg_pwr_offset_group_b.to_string()); - j.write_int("numberOfRA-PreamblesGroupA", group_bcfg.nof_ra_preambs_group_a); - j.end_obj(); - } - j.write_str("ra-ContentionResolutionTimer", ra_contention_resolution_timer.to_string()); - if (rsrp_thres_ssb_present) { - j.write_int("rsrp-ThresholdSSB", rsrp_thres_ssb); - } - if (rsrp_thres_ssb_sul_present) { - j.write_int("rsrp-ThresholdSSB-SUL", rsrp_thres_ssb_sul); - } - j.write_fieldname("prach-RootSequenceIndex"); - prach_root_seq_idx.to_json(j); - if (msg1_subcarrier_spacing_present) { - j.write_str("msg1-SubcarrierSpacing", msg1_subcarrier_spacing.to_string()); - } - j.write_str("restrictedSetConfig", restricted_set_cfg.to_string()); - if (msg3_transform_precoder_present) { - j.write_str("msg3-transformPrecoder", "enabled"); - } - if (ext) { - if (ra_prioritization_for_access_id_r16.is_present()) { - j.write_fieldname("ra-PrioritizationForAccessIdentity-r16"); - j.start_obj(); - j.write_fieldname("ra-Prioritization-r16"); - ra_prioritization_for_access_id_r16->ra_prioritization_r16.to_json(j); - j.write_str("ra-PrioritizationForAI-r16", - ra_prioritization_for_access_id_r16->ra_prioritization_for_ai_r16.to_string()); - j.end_obj(); - } - if (prach_root_seq_idx_r16.is_present()) { - j.write_fieldname("prach-RootSequenceIndex-r16"); - prach_root_seq_idx_r16->to_json(j); - } - if (ra_prioritization_for_slicing_r17.is_present()) { - j.write_fieldname("ra-PrioritizationForSlicing-r17"); - ra_prioritization_for_slicing_r17->to_json(j); - } - if (feature_combination_preambs_list_r17.is_present()) { - j.start_array("featureCombinationPreamblesList-r17"); - for (const auto& e1 : *feature_combination_preambs_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - } - j.end_obj(); -} - -void rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::destroy_() {} -void rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_( - const rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::one_eighth: - c.init(other.c.get()); - break; - case types::one_fourth: - c.init(other.c.get()); - break; - case types::one_half: - c.init(other.c.get()); - break; - case types::one: - c.init(other.c.get()); - break; - case types::two: - c.init(other.c.get()); - break; - case types::four: - c.init(other.c.get()); - break; - case types::eight: - c.init(other.c.get()); - break; - case types::sixteen: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "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_& -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; - } - set(other.type()); - switch (type_) { - case types::one_eighth: - c.set(other.c.get()); - break; - case types::one_fourth: - c.set(other.c.get()); - break; - case types::one_half: - c.set(other.c.get()); - break; - case types::one: - c.set(other.c.get()); - break; - case types::two: - c.set(other.c.get()); - break; - case types::four: - c.set(other.c.get()); - break; - case types::eight: - c.set(other.c.get()); - break; - case types::sixteen: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_"); - } - - return *this; -} -rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_e_& -rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_one_eighth() -{ - set(types::one_eighth); - return c.get(); -} -rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_e_& -rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_one_fourth() -{ - set(types::one_fourth); - return c.get(); -} -rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_e_& -rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_one_half() -{ - set(types::one_half); - return c.get(); -} -rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_e_& -rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_one() -{ - set(types::one); - return c.get(); -} -rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_e_& -rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_two() -{ - set(types::two); - return c.get(); -} -uint8_t& rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_four() -{ - set(types::four); - return c.get(); -} -uint8_t& rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_eight() -{ - set(types::eight); - return c.get(); -} -uint8_t& rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::set_sixteen() -{ - set(types::sixteen); - return c.get(); -} -void rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::one_eighth: - j.write_str("oneEighth", c.get().to_string()); - break; - case types::one_fourth: - j.write_str("oneFourth", c.get().to_string()); - break; - case types::one_half: - j.write_str("oneHalf", c.get().to_string()); - break; - case types::one: - j.write_str("one", c.get().to_string()); - break; - case types::two: - j.write_str("two", c.get().to_string()); - break; - case types::four: - j.write_int("four", c.get()); - break; - case types::eight: - j.write_int("eight", c.get()); - break; - case types::sixteen: - j.write_int("sixteen", c.get()); - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_"); - } - j.end_obj(); -} -SRSASN_CODE rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::one_eighth: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::one_fourth: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::one_half: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::one: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::two: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::four: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)16u)); - break; - case types::eight: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)8u)); - break; - case types::sixteen: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)1u, (uint8_t)4u)); - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::one_eighth: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::one_fourth: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::one_half: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::one: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::two: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::four: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)16u)); - break; - case types::eight: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)8u)); - break; - case types::sixteen: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)1u, (uint8_t)4u)); - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_opts::to_string() const -{ - static const char* names[] = { - "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; - return convert_enum_idx( - names, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_e_"); -} -uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_opts::to_number() const -{ - static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return map_enum_number( - numbers, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_eighth_e_"); -} - -const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_opts::to_string() const -{ - static const char* names[] = { - "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; - return convert_enum_idx( - names, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_e_"); -} -uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_opts::to_number() const -{ - static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return map_enum_number( - numbers, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_fourth_e_"); -} - -const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_opts::to_string() const -{ - static const char* names[] = { - "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; - return convert_enum_idx( - names, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_e_"); -} -uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_opts::to_number() const -{ - static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return map_enum_number( - numbers, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_half_e_"); -} - -const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_opts::to_string() const -{ - static const char* names[] = { - "n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32", "n36", "n40", "n44", "n48", "n52", "n56", "n60", "n64"}; - return convert_enum_idx( - names, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_e_"); -} -uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_opts::to_number() const -{ - static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64}; - return map_enum_number( - numbers, 16, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::one_e_"); -} - -const char* rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_opts::to_string() const -{ - static const char* names[] = {"n4", "n8", "n12", "n16", "n20", "n24", "n28", "n32"}; - return convert_enum_idx( - names, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_e_"); -} -uint8_t rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_opts::to_number() const -{ - static const uint8_t numbers[] = {4, 8, 12, 16, 20, 24, 28, 32}; - return map_enum_number( - numbers, 8, value, "rach_cfg_common_s::ssb_per_rach_occasion_and_cb_preambs_per_ssb_c_::two_e_"); -} - -const char* rach_cfg_common_s::group_bcfg_s_::ra_msg3_size_group_a_opts::to_string() const -{ - static const char* names[] = {"b56", - "b144", - "b208", - "b256", - "b282", - "b480", - "b640", - "b800", - "b1000", - "b72", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "rach_cfg_common_s::group_bcfg_s_::ra_msg3_size_group_a_e_"); -} -uint16_t rach_cfg_common_s::group_bcfg_s_::ra_msg3_size_group_a_opts::to_number() const -{ - static const uint16_t numbers[] = {56, 144, 208, 256, 282, 480, 640, 800, 1000, 72}; - return map_enum_number(numbers, 10, value, "rach_cfg_common_s::group_bcfg_s_::ra_msg3_size_group_a_e_"); -} - -const char* rach_cfg_common_s::group_bcfg_s_::msg_pwr_offset_group_b_opts::to_string() const -{ - static const char* names[] = {"minusinfinity", "dB0", "dB5", "dB8", "dB10", "dB12", "dB15", "dB18"}; - return convert_enum_idx(names, 8, value, "rach_cfg_common_s::group_bcfg_s_::msg_pwr_offset_group_b_e_"); -} -int8_t rach_cfg_common_s::group_bcfg_s_::msg_pwr_offset_group_b_opts::to_number() const -{ - static const int8_t numbers[] = {-1, 0, 5, 8, 10, 12, 15, 18}; - return map_enum_number(numbers, 8, value, "rach_cfg_common_s::group_bcfg_s_::msg_pwr_offset_group_b_e_"); -} - -const char* rach_cfg_common_s::ra_contention_resolution_timer_opts::to_string() const -{ - static const char* names[] = {"sf8", "sf16", "sf24", "sf32", "sf40", "sf48", "sf56", "sf64"}; - return convert_enum_idx(names, 8, value, "rach_cfg_common_s::ra_contention_resolution_timer_e_"); -} -uint8_t rach_cfg_common_s::ra_contention_resolution_timer_opts::to_number() const -{ - static const uint8_t numbers[] = {8, 16, 24, 32, 40, 48, 56, 64}; - return map_enum_number(numbers, 8, value, "rach_cfg_common_s::ra_contention_resolution_timer_e_"); -} - -void rach_cfg_common_s::prach_root_seq_idx_c_::destroy_() {} -void rach_cfg_common_s::prach_root_seq_idx_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -rach_cfg_common_s::prach_root_seq_idx_c_::prach_root_seq_idx_c_(const rach_cfg_common_s::prach_root_seq_idx_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::l839: - c.init(other.c.get()); - break; - case types::l139: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - 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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::l839: - c.set(other.c.get()); - break; - case types::l139: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_c_"); - } - - return *this; -} -uint16_t& rach_cfg_common_s::prach_root_seq_idx_c_::set_l839() -{ - set(types::l839); - return c.get(); -} -uint8_t& rach_cfg_common_s::prach_root_seq_idx_c_::set_l139() -{ - set(types::l139); - return c.get(); -} -void rach_cfg_common_s::prach_root_seq_idx_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::l839: - j.write_int("l839", c.get()); - break; - case types::l139: - j.write_int("l139", c.get()); - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_c_"); - } - j.end_obj(); -} -SRSASN_CODE rach_cfg_common_s::prach_root_seq_idx_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::l839: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)837u)); - break; - case types::l139: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)137u)); - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rach_cfg_common_s::prach_root_seq_idx_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::l839: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)837u)); - break; - case types::l139: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)137u)); - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* rach_cfg_common_s::restricted_set_cfg_opts::to_string() const -{ - static const char* names[] = {"unrestrictedSet", "restrictedSetTypeA", "restrictedSetTypeB"}; - return convert_enum_idx(names, 3, value, "rach_cfg_common_s::restricted_set_cfg_e_"); -} - -void rach_cfg_common_s::prach_root_seq_idx_r16_c_::destroy_() {} -void rach_cfg_common_s::prach_root_seq_idx_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -rach_cfg_common_s::prach_root_seq_idx_r16_c_::prach_root_seq_idx_r16_c_( - const rach_cfg_common_s::prach_root_seq_idx_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::l571: - c.init(other.c.get()); - break; - case types::l1151: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_r16_c_"); - } -} -rach_cfg_common_s::prach_root_seq_idx_r16_c_& -rach_cfg_common_s::prach_root_seq_idx_r16_c_::operator=(const rach_cfg_common_s::prach_root_seq_idx_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::l571: - c.set(other.c.get()); - break; - case types::l1151: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_r16_c_"); - } - - return *this; -} -uint16_t& rach_cfg_common_s::prach_root_seq_idx_r16_c_::set_l571() -{ - set(types::l571); - return c.get(); -} -uint16_t& rach_cfg_common_s::prach_root_seq_idx_r16_c_::set_l1151() -{ - set(types::l1151); - return c.get(); -} -void rach_cfg_common_s::prach_root_seq_idx_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::l571: - j.write_int("l571", c.get()); - break; - case types::l1151: - j.write_int("l1151", c.get()); - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE rach_cfg_common_s::prach_root_seq_idx_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::l571: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)569u)); - break; - case types::l1151: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1149u)); - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rach_cfg_common_s::prach_root_seq_idx_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::l571: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)569u)); - break; - case types::l1151: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1149u)); - break; - default: - log_invalid_choice_id(type_, "rach_cfg_common_s::prach_root_seq_idx_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// AdditionalRACH-Config-r17 ::= SEQUENCE -SRSASN_CODE add_rach_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(rach_cfg_common_r17_present, 1)); - HANDLE_CODE(bref.pack(msg_a_cfg_common_r17_present, 1)); - - if (rach_cfg_common_r17_present) { - HANDLE_CODE(rach_cfg_common_r17.pack(bref)); - } - if (msg_a_cfg_common_r17_present) { - HANDLE_CODE(msg_a_cfg_common_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE add_rach_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(rach_cfg_common_r17_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_cfg_common_r17_present, 1)); - - if (rach_cfg_common_r17_present) { - HANDLE_CODE(rach_cfg_common_r17.unpack(bref)); - } - if (msg_a_cfg_common_r17_present) { - HANDLE_CODE(msg_a_cfg_common_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void add_rach_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (rach_cfg_common_r17_present) { - j.write_fieldname("rach-ConfigCommon-r17"); - rach_cfg_common_r17.to_json(j); - } - if (msg_a_cfg_common_r17_present) { - j.write_fieldname("msgA-ConfigCommon-r17"); - msg_a_cfg_common_r17.to_json(j); - } - j.end_obj(); -} - -// ControlResourceSet ::= SEQUENCE -SRSASN_CODE coreset_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(tci_states_pdcch_to_add_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(tci_states_pdcch_to_release_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(tci_present_in_dci_present, 1)); - HANDLE_CODE(bref.pack(pdcch_dmrs_scrambling_id_present, 1)); - - HANDLE_CODE(pack_integer(bref, coreset_id, (uint8_t)0u, (uint8_t)11u)); - HANDLE_CODE(freq_domain_res.pack(bref)); - HANDLE_CODE(pack_integer(bref, dur, (uint8_t)1u, (uint8_t)3u)); - HANDLE_CODE(cce_reg_map_type.pack(bref)); - HANDLE_CODE(precoder_granularity.pack(bref)); - if (tci_states_pdcch_to_add_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, tci_states_pdcch_to_add_list, 1, 64, integer_packer(0, 127))); - } - if (tci_states_pdcch_to_release_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, tci_states_pdcch_to_release_list, 1, 64, integer_packer(0, 127))); - } - if (pdcch_dmrs_scrambling_id_present) { - HANDLE_CODE(pack_integer(bref, pdcch_dmrs_scrambling_id, (uint32_t)0u, (uint32_t)65535u)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= rb_offset_r16_present; - group_flags[0] |= tci_present_dci_1_2_r16_present; - group_flags[0] |= coreset_pool_idx_r16_present; - group_flags[0] |= coreset_id_v1610_present; - group_flags[1] |= follow_unified_tci_state_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(rb_offset_r16_present, 1)); - HANDLE_CODE(bref.pack(tci_present_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(coreset_pool_idx_r16_present, 1)); - HANDLE_CODE(bref.pack(coreset_id_v1610_present, 1)); - if (rb_offset_r16_present) { - HANDLE_CODE(pack_integer(bref, rb_offset_r16, (uint8_t)0u, (uint8_t)5u)); - } - if (tci_present_dci_1_2_r16_present) { - HANDLE_CODE(pack_integer(bref, tci_present_dci_1_2_r16, (uint8_t)1u, (uint8_t)3u)); - } - if (coreset_pool_idx_r16_present) { - HANDLE_CODE(pack_integer(bref, coreset_pool_idx_r16, (uint8_t)0u, (uint8_t)1u)); - } - if (coreset_id_v1610_present) { - HANDLE_CODE(pack_integer(bref, coreset_id_v1610, (uint8_t)12u, (uint8_t)15u)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(follow_unified_tci_state_r17_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE coreset_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool tci_states_pdcch_to_add_list_present; - HANDLE_CODE(bref.unpack(tci_states_pdcch_to_add_list_present, 1)); - bool tci_states_pdcch_to_release_list_present; - HANDLE_CODE(bref.unpack(tci_states_pdcch_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(tci_present_in_dci_present, 1)); - HANDLE_CODE(bref.unpack(pdcch_dmrs_scrambling_id_present, 1)); - - HANDLE_CODE(unpack_integer(coreset_id, bref, (uint8_t)0u, (uint8_t)11u)); - HANDLE_CODE(freq_domain_res.unpack(bref)); - HANDLE_CODE(unpack_integer(dur, bref, (uint8_t)1u, (uint8_t)3u)); - HANDLE_CODE(cce_reg_map_type.unpack(bref)); - HANDLE_CODE(precoder_granularity.unpack(bref)); - if (tci_states_pdcch_to_add_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(tci_states_pdcch_to_add_list, bref, 1, 64, integer_packer(0, 127))); - } - if (tci_states_pdcch_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(tci_states_pdcch_to_release_list, bref, 1, 64, integer_packer(0, 127))); - } - if (pdcch_dmrs_scrambling_id_present) { - HANDLE_CODE(unpack_integer(pdcch_dmrs_scrambling_id, bref, (uint32_t)0u, (uint32_t)65535u)); - } - - 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(rb_offset_r16_present, 1)); - HANDLE_CODE(bref.unpack(tci_present_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(coreset_pool_idx_r16_present, 1)); - HANDLE_CODE(bref.unpack(coreset_id_v1610_present, 1)); - if (rb_offset_r16_present) { - HANDLE_CODE(unpack_integer(rb_offset_r16, bref, (uint8_t)0u, (uint8_t)5u)); - } - if (tci_present_dci_1_2_r16_present) { - HANDLE_CODE(unpack_integer(tci_present_dci_1_2_r16, bref, (uint8_t)1u, (uint8_t)3u)); - } - if (coreset_pool_idx_r16_present) { - HANDLE_CODE(unpack_integer(coreset_pool_idx_r16, bref, (uint8_t)0u, (uint8_t)1u)); - } - if (coreset_id_v1610_present) { - HANDLE_CODE(unpack_integer(coreset_id_v1610, bref, (uint8_t)12u, (uint8_t)15u)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(follow_unified_tci_state_r17_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void coreset_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("controlResourceSetId", coreset_id); - j.write_str("frequencyDomainResources", freq_domain_res.to_string()); - j.write_int("duration", dur); - j.write_fieldname("cce-REG-MappingType"); - cce_reg_map_type.to_json(j); - j.write_str("precoderGranularity", precoder_granularity.to_string()); - if (tci_states_pdcch_to_add_list.size() > 0) { - j.start_array("tci-StatesPDCCH-ToAddList"); - for (const auto& e1 : tci_states_pdcch_to_add_list) { - j.write_int(e1); - } - j.end_array(); - } - if (tci_states_pdcch_to_release_list.size() > 0) { - j.start_array("tci-StatesPDCCH-ToReleaseList"); - for (const auto& e1 : tci_states_pdcch_to_release_list) { - j.write_int(e1); - } - j.end_array(); - } - if (tci_present_in_dci_present) { - j.write_str("tci-PresentInDCI", "enabled"); - } - if (pdcch_dmrs_scrambling_id_present) { - j.write_int("pdcch-DMRS-ScramblingID", pdcch_dmrs_scrambling_id); - } - if (ext) { - if (rb_offset_r16_present) { - j.write_int("rb-Offset-r16", rb_offset_r16); - } - if (tci_present_dci_1_2_r16_present) { - j.write_int("tci-PresentDCI-1-2-r16", tci_present_dci_1_2_r16); - } - if (coreset_pool_idx_r16_present) { - j.write_int("coresetPoolIndex-r16", coreset_pool_idx_r16); - } - if (coreset_id_v1610_present) { - j.write_int("controlResourceSetId-v1610", coreset_id_v1610); - } - if (follow_unified_tci_state_r17_present) { - j.write_str("followUnifiedTCI-State-r17", "enabled"); - } - } - j.end_obj(); -} - -void coreset_s::cce_reg_map_type_c_::set(types::options e) -{ - type_ = e; -} -coreset_s::cce_reg_map_type_c_::interleaved_s_& coreset_s::cce_reg_map_type_c_::set_interleaved() -{ - set(types::interleaved); - return c; -} -void coreset_s::cce_reg_map_type_c_::set_non_interleaved() -{ - set(types::non_interleaved); -} -void coreset_s::cce_reg_map_type_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::interleaved: - j.write_fieldname("interleaved"); - j.start_obj(); - j.write_str("reg-BundleSize", c.reg_bundle_size.to_string()); - j.write_str("interleaverSize", c.interleaver_size.to_string()); - if (c.shift_idx_present) { - j.write_int("shiftIndex", c.shift_idx); - } - j.end_obj(); - break; - case types::non_interleaved: - break; - default: - log_invalid_choice_id(type_, "coreset_s::cce_reg_map_type_c_"); - } - j.end_obj(); -} -SRSASN_CODE coreset_s::cce_reg_map_type_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::interleaved: - HANDLE_CODE(bref.pack(c.shift_idx_present, 1)); - HANDLE_CODE(c.reg_bundle_size.pack(bref)); - HANDLE_CODE(c.interleaver_size.pack(bref)); - if (c.shift_idx_present) { - HANDLE_CODE(pack_integer(bref, c.shift_idx, (uint16_t)0u, (uint16_t)274u)); - } - break; - case types::non_interleaved: - break; - default: - log_invalid_choice_id(type_, "coreset_s::cce_reg_map_type_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE coreset_s::cce_reg_map_type_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::interleaved: - HANDLE_CODE(bref.unpack(c.shift_idx_present, 1)); - HANDLE_CODE(c.reg_bundle_size.unpack(bref)); - HANDLE_CODE(c.interleaver_size.unpack(bref)); - if (c.shift_idx_present) { - HANDLE_CODE(unpack_integer(c.shift_idx, bref, (uint16_t)0u, (uint16_t)274u)); - } - break; - case types::non_interleaved: - break; - default: - log_invalid_choice_id(type_, "coreset_s::cce_reg_map_type_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* coreset_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_opts::to_string() const -{ - static const char* names[] = {"n2", "n3", "n6"}; - return convert_enum_idx(names, 3, value, "coreset_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_e_"); -} -uint8_t coreset_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 3, 6}; - return map_enum_number(numbers, 3, value, "coreset_s::cce_reg_map_type_c_::interleaved_s_::reg_bundle_size_e_"); -} - -const char* coreset_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_opts::to_string() const -{ - static const char* names[] = {"n2", "n3", "n6"}; - return convert_enum_idx(names, 3, value, "coreset_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_e_"); -} -uint8_t coreset_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 3, 6}; - return map_enum_number(numbers, 3, value, "coreset_s::cce_reg_map_type_c_::interleaved_s_::interleaver_size_e_"); -} - -const char* coreset_s::precoder_granularity_opts::to_string() const -{ - static const char* names[] = {"sameAsREG-bundle", "allContiguousRBs"}; - return convert_enum_idx(names, 2, value, "coreset_s::precoder_granularity_e_"); -} - -// RateMatchPattern ::= SEQUENCE -SRSASN_CODE rate_match_pattern_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(subcarrier_spacing_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)); - } - HANDLE_CODE(dummy.pack(bref)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= coreset_r16_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(coreset_r16_present, 1)); - if (coreset_r16_present) { - HANDLE_CODE(pack_integer(bref, coreset_r16, (uint8_t)0u, (uint8_t)15u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rate_match_pattern_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - 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)); - - 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(coreset_r16_present, 1)); - if (coreset_r16_present) { - HANDLE_CODE(unpack_integer(coreset_r16, bref, (uint8_t)0u, (uint8_t)15u)); - } - } - } - return SRSASN_SUCCESS; -} -void rate_match_pattern_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()); - } - j.write_str("dummy", dummy.to_string()); - if (ext) { - if (coreset_r16_present) { - j.write_int("controlResourceSet-r16", coreset_r16); - } - } - j.end_obj(); -} - -void rate_match_pattern_s::pattern_type_c_::destroy_() -{ - switch (type_) { - case types::bitmaps: - c.destroy(); - break; - default: - break; - } -} -void rate_match_pattern_s::pattern_type_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::bitmaps: - c.init(); - break; - case types::coreset: - 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::coreset: - 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::coreset: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); - } - - return *this; -} -rate_match_pattern_s::pattern_type_c_::bitmaps_s_& rate_match_pattern_s::pattern_type_c_::set_bitmaps() -{ - set(types::bitmaps); - return c.get(); -} -uint8_t& rate_match_pattern_s::pattern_type_c_::set_coreset() -{ - set(types::coreset); - return c.get(); -} -void rate_match_pattern_s::pattern_type_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(); - break; - case types::coreset: - j.write_int("controlResourceSet", c.get()); - break; - default: - log_invalid_choice_id(type_, "rate_match_pattern_s::pattern_type_c_"); - } - j.end_obj(); -} -SRSASN_CODE rate_match_pattern_s::pattern_type_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)); - } - break; - case types::coreset: - 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; -} -SRSASN_CODE rate_match_pattern_s::pattern_type_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)); - } - break; - case types::coreset: - 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; -} - -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) -{ - 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_"); - } -} -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_"); - } -} -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; - } - 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_"); - } - - return *this; -} -fixed_bitstring<14>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::set_one_slot() -{ - set(types::one_slot); - return c.get>(); -} -fixed_bitstring<28>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::set_two_slots() -{ - set(types::two_slots); - return c.get>(); -} -void rate_match_pattern_s::pattern_type_c_::bitmaps_s_::symbols_in_res_block_c_::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.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; -} - -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_"); - } -} -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_"); - } -} -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::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_"); - } - - return *this; -} -fixed_bitstring<2>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n2() -{ - set(types::n2); - return c.get>(); -} -fixed_bitstring<4>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n4() -{ - set(types::n4); - return c.get>(); -} -fixed_bitstring<5>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n5() -{ - set(types::n5); - return c.get>(); -} -fixed_bitstring<8>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n8() -{ - set(types::n8); - return c.get>(); -} -fixed_bitstring<10>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n10() -{ - set(types::n10); - return c.get>(); -} -fixed_bitstring<20>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n20() -{ - set(types::n20); - return c.get>(); -} -fixed_bitstring<40>& rate_match_pattern_s::pattern_type_c_::bitmaps_s_::periodicity_and_pattern_c_::set_n40() -{ - set(types::n40); - return c.get>(); -} -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::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.end_obj(); -} -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::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; - } - return SRSASN_SUCCESS; -} -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::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; - } - return SRSASN_SUCCESS; -} - -const char* rate_match_pattern_s::dummy_opts::to_string() const -{ - static const char* names[] = {"dynamic", "semiStatic"}; - return convert_enum_idx(names, 2, value, "rate_match_pattern_s::dummy_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.size() > 0, 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.size() > 0) { - 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 rate_match_pattern_lte_crs_s::unpack(cbit_ref& bref) -{ - bool mbsfn_sf_cfg_list_present; - 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 rate_match_pattern_lte_crs_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.size() > 0) { - 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(); -} - -const char* rate_match_pattern_lte_crs_s::carrier_bw_dl_opts::to_string() const -{ - static const char* names[] = {"n6", "n15", "n25", "n50", "n75", "n100", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "rate_match_pattern_lte_crs_s::carrier_bw_dl_e_"); -} -uint8_t rate_match_pattern_lte_crs_s::carrier_bw_dl_opts::to_number() const -{ - static const uint8_t numbers[] = {6, 15, 25, 50, 75, 100}; - return map_enum_number(numbers, 6, value, "rate_match_pattern_lte_crs_s::carrier_bw_dl_e_"); -} - -const char* rate_match_pattern_lte_crs_s::nrof_crs_ports_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n4"}; - return convert_enum_idx(names, 3, value, "rate_match_pattern_lte_crs_s::nrof_crs_ports_e_"); -} -uint8_t rate_match_pattern_lte_crs_s::nrof_crs_ports_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4}; - return map_enum_number(numbers, 3, value, "rate_match_pattern_lte_crs_s::nrof_crs_ports_e_"); -} - -const char* rate_match_pattern_lte_crs_s::v_shift_opts::to_string() const -{ - static const char* names[] = {"n0", "n1", "n2", "n3", "n4", "n5"}; - return convert_enum_idx(names, 6, value, "rate_match_pattern_lte_crs_s::v_shift_e_"); -} -uint8_t rate_match_pattern_lte_crs_s::v_shift_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5}; - return map_enum_number(numbers, 6, value, "rate_match_pattern_lte_crs_s::v_shift_e_"); -} - -// SearchSpace ::= SEQUENCE -SRSASN_CODE search_space_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(coreset_id_present, 1)); - HANDLE_CODE(bref.pack(monitoring_slot_periodicity_and_offset_present, 1)); - HANDLE_CODE(bref.pack(dur_present, 1)); - HANDLE_CODE(bref.pack(monitoring_symbols_within_slot_present, 1)); - HANDLE_CODE(bref.pack(nrof_candidates_present, 1)); - HANDLE_CODE(bref.pack(search_space_type_present, 1)); - - HANDLE_CODE(pack_integer(bref, search_space_id, (uint8_t)0u, (uint8_t)39u)); - if (coreset_id_present) { - HANDLE_CODE(pack_integer(bref, coreset_id, (uint8_t)0u, (uint8_t)11u)); - } - if (monitoring_slot_periodicity_and_offset_present) { - HANDLE_CODE(monitoring_slot_periodicity_and_offset.pack(bref)); - } - if (dur_present) { - HANDLE_CODE(pack_integer(bref, dur, (uint16_t)2u, (uint16_t)2559u)); - } - if (monitoring_symbols_within_slot_present) { - HANDLE_CODE(monitoring_symbols_within_slot.pack(bref)); - } - if (nrof_candidates_present) { - HANDLE_CODE(nrof_candidates.aggregation_level1.pack(bref)); - HANDLE_CODE(nrof_candidates.aggregation_level2.pack(bref)); - HANDLE_CODE(nrof_candidates.aggregation_level4.pack(bref)); - HANDLE_CODE(nrof_candidates.aggregation_level8.pack(bref)); - HANDLE_CODE(nrof_candidates.aggregation_level16.pack(bref)); - } - if (search_space_type_present) { - HANDLE_CODE(search_space_type.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE search_space_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(coreset_id_present, 1)); - HANDLE_CODE(bref.unpack(monitoring_slot_periodicity_and_offset_present, 1)); - HANDLE_CODE(bref.unpack(dur_present, 1)); - HANDLE_CODE(bref.unpack(monitoring_symbols_within_slot_present, 1)); - HANDLE_CODE(bref.unpack(nrof_candidates_present, 1)); - HANDLE_CODE(bref.unpack(search_space_type_present, 1)); - - HANDLE_CODE(unpack_integer(search_space_id, bref, (uint8_t)0u, (uint8_t)39u)); - if (coreset_id_present) { - HANDLE_CODE(unpack_integer(coreset_id, bref, (uint8_t)0u, (uint8_t)11u)); - } - if (monitoring_slot_periodicity_and_offset_present) { - HANDLE_CODE(monitoring_slot_periodicity_and_offset.unpack(bref)); - } - if (dur_present) { - HANDLE_CODE(unpack_integer(dur, bref, (uint16_t)2u, (uint16_t)2559u)); - } - if (monitoring_symbols_within_slot_present) { - HANDLE_CODE(monitoring_symbols_within_slot.unpack(bref)); - } - if (nrof_candidates_present) { - HANDLE_CODE(nrof_candidates.aggregation_level1.unpack(bref)); - HANDLE_CODE(nrof_candidates.aggregation_level2.unpack(bref)); - HANDLE_CODE(nrof_candidates.aggregation_level4.unpack(bref)); - HANDLE_CODE(nrof_candidates.aggregation_level8.unpack(bref)); - HANDLE_CODE(nrof_candidates.aggregation_level16.unpack(bref)); - } - if (search_space_type_present) { - HANDLE_CODE(search_space_type.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void search_space_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("searchSpaceId", search_space_id); - if (coreset_id_present) { - j.write_int("controlResourceSetId", coreset_id); - } - if (monitoring_slot_periodicity_and_offset_present) { - j.write_fieldname("monitoringSlotPeriodicityAndOffset"); - monitoring_slot_periodicity_and_offset.to_json(j); - } - if (dur_present) { - j.write_int("duration", dur); - } - if (monitoring_symbols_within_slot_present) { - j.write_str("monitoringSymbolsWithinSlot", monitoring_symbols_within_slot.to_string()); - } - if (nrof_candidates_present) { - j.write_fieldname("nrofCandidates"); - j.start_obj(); - j.write_str("aggregationLevel1", nrof_candidates.aggregation_level1.to_string()); - j.write_str("aggregationLevel2", nrof_candidates.aggregation_level2.to_string()); - j.write_str("aggregationLevel4", nrof_candidates.aggregation_level4.to_string()); - j.write_str("aggregationLevel8", nrof_candidates.aggregation_level8.to_string()); - j.write_str("aggregationLevel16", nrof_candidates.aggregation_level16.to_string()); - j.end_obj(); - } - if (search_space_type_present) { - j.write_fieldname("searchSpaceType"); - search_space_type.to_json(j); - } - j.end_obj(); -} - -void search_space_s::monitoring_slot_periodicity_and_offset_c_::destroy_() {} -void search_space_s::monitoring_slot_periodicity_and_offset_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -search_space_s::monitoring_slot_periodicity_and_offset_c_::monitoring_slot_periodicity_and_offset_c_( - const search_space_s::monitoring_slot_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::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::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_, "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) -{ - if (this == &other) { - return *this; - } - 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::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::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_, "search_space_s::monitoring_slot_periodicity_and_offset_c_"); - } - - return *this; -} -void search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl1() -{ - set(types::sl1); -} -uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl2() -{ - set(types::sl2); - return c.get(); -} -uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl4() -{ - set(types::sl4); - return c.get(); -} -uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl5() -{ - set(types::sl5); - return c.get(); -} -uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl8() -{ - set(types::sl8); - return c.get(); -} -uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl10() -{ - set(types::sl10); - return c.get(); -} -uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl16() -{ - set(types::sl16); - return c.get(); -} -uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl20() -{ - set(types::sl20); - return c.get(); -} -uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl40() -{ - set(types::sl40); - return c.get(); -} -uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl80() -{ - set(types::sl80); - return c.get(); -} -uint8_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl160() -{ - set(types::sl160); - return c.get(); -} -uint16_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl320() -{ - set(types::sl320); - return c.get(); -} -uint16_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl640() -{ - set(types::sl640); - return c.get(); -} -uint16_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl1280() -{ - set(types::sl1280); - return c.get(); -} -uint16_t& search_space_s::monitoring_slot_periodicity_and_offset_c_::set_sl2560() -{ - set(types::sl2560); - return c.get(); -} -void search_space_s::monitoring_slot_periodicity_and_offset_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::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; - 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_, "search_space_s::monitoring_slot_periodicity_and_offset_c_"); - } - j.end_obj(); -} -SRSASN_CODE search_space_s::monitoring_slot_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::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)); - 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_, "search_space_s::monitoring_slot_periodicity_and_offset_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE search_space_s::monitoring_slot_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::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; - 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_, "search_space_s::monitoring_slot_periodicity_and_offset_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* search_space_s::nrof_candidates_s_::aggregation_level1_opts::to_string() const -{ - static const char* names[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; - return convert_enum_idx(names, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level1_e_"); -} -uint8_t search_space_s::nrof_candidates_s_::aggregation_level1_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5, 6, 8}; - return map_enum_number(numbers, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level1_e_"); -} - -const char* search_space_s::nrof_candidates_s_::aggregation_level2_opts::to_string() const -{ - static const char* names[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; - return convert_enum_idx(names, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level2_e_"); -} -uint8_t search_space_s::nrof_candidates_s_::aggregation_level2_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5, 6, 8}; - return map_enum_number(numbers, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level2_e_"); -} - -const char* search_space_s::nrof_candidates_s_::aggregation_level4_opts::to_string() const -{ - static const char* names[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; - return convert_enum_idx(names, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level4_e_"); -} -uint8_t search_space_s::nrof_candidates_s_::aggregation_level4_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5, 6, 8}; - return map_enum_number(numbers, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level4_e_"); -} - -const char* search_space_s::nrof_candidates_s_::aggregation_level8_opts::to_string() const -{ - static const char* names[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; - return convert_enum_idx(names, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level8_e_"); -} -uint8_t search_space_s::nrof_candidates_s_::aggregation_level8_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5, 6, 8}; - return map_enum_number(numbers, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level8_e_"); -} - -const char* search_space_s::nrof_candidates_s_::aggregation_level16_opts::to_string() const -{ - static const char* names[] = {"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n8"}; - return convert_enum_idx(names, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level16_e_"); -} -uint8_t search_space_s::nrof_candidates_s_::aggregation_level16_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5, 6, 8}; - return map_enum_number(numbers, 8, value, "search_space_s::nrof_candidates_s_::aggregation_level16_e_"); -} - -void search_space_s::search_space_type_c_::destroy_() -{ - switch (type_) { - case types::common: - c.destroy(); - break; - case types::ue_specific: - c.destroy(); - break; - default: - break; - } -} -void search_space_s::search_space_type_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::common: - c.init(); - break; - case types::ue_specific: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "search_space_s::search_space_type_c_"); - } -} -search_space_s::search_space_type_c_::search_space_type_c_(const search_space_s::search_space_type_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::common: - c.init(other.c.get()); - break; - case types::ue_specific: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - 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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::common: - c.set(other.c.get()); - break; - case types::ue_specific: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "search_space_s::search_space_type_c_"); - } - - return *this; -} -search_space_s::search_space_type_c_::common_s_& search_space_s::search_space_type_c_::set_common() -{ - set(types::common); - return c.get(); -} -search_space_s::search_space_type_c_::ue_specific_s_& search_space_s::search_space_type_c_::set_ue_specific() -{ - set(types::ue_specific); - return c.get(); -} -void search_space_s::search_space_type_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::common: - j.write_fieldname("common"); - j.start_obj(); - if (c.get().dci_format0_0_and_format1_0_present) { - j.write_fieldname("dci-Format0-0-AndFormat1-0"); - j.start_obj(); - j.end_obj(); - } - if (c.get().dci_format2_0_present) { - j.write_fieldname("dci-Format2-0"); - j.start_obj(); - j.write_fieldname("nrofCandidates-SFI"); - j.start_obj(); - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1_present) { - j.write_str("aggregationLevel1", - c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1.to_string()); - } - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2_present) { - j.write_str("aggregationLevel2", - c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2.to_string()); - } - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4_present) { - j.write_str("aggregationLevel4", - c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4.to_string()); - } - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8_present) { - j.write_str("aggregationLevel8", - c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8.to_string()); - } - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16_present) { - j.write_str("aggregationLevel16", - c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16.to_string()); - } - j.end_obj(); - j.end_obj(); - } - if (c.get().dci_format2_1_present) { - j.write_fieldname("dci-Format2-1"); - j.start_obj(); - j.end_obj(); - } - if (c.get().dci_format2_2_present) { - j.write_fieldname("dci-Format2-2"); - j.start_obj(); - j.end_obj(); - } - if (c.get().dci_format2_3_present) { - j.write_fieldname("dci-Format2-3"); - j.start_obj(); - if (c.get().dci_format2_3.dummy1_present) { - j.write_str("dummy1", c.get().dci_format2_3.dummy1.to_string()); - } - j.write_str("dummy2", c.get().dci_format2_3.dummy2.to_string()); - j.end_obj(); - } - j.end_obj(); - break; - case types::ue_specific: - j.write_fieldname("ue-Specific"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "search_space_s::search_space_type_c_"); - } - j.end_obj(); -} -SRSASN_CODE search_space_s::search_space_type_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::common: - HANDLE_CODE(bref.pack(c.get().dci_format0_0_and_format1_0_present, 1)); - HANDLE_CODE(bref.pack(c.get().dci_format2_0_present, 1)); - HANDLE_CODE(bref.pack(c.get().dci_format2_1_present, 1)); - HANDLE_CODE(bref.pack(c.get().dci_format2_2_present, 1)); - HANDLE_CODE(bref.pack(c.get().dci_format2_3_present, 1)); - if (c.get().dci_format0_0_and_format1_0_present) { - bref.pack(c.get().dci_format0_0_and_format1_0.ext, 1); - } - if (c.get().dci_format2_0_present) { - bref.pack(c.get().dci_format2_0.ext, 1); - HANDLE_CODE(bref.pack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1_present, 1)); - HANDLE_CODE(bref.pack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2_present, 1)); - HANDLE_CODE(bref.pack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4_present, 1)); - HANDLE_CODE(bref.pack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8_present, 1)); - HANDLE_CODE(bref.pack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16_present, 1)); - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1_present) { - HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1.pack(bref)); - } - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2_present) { - HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2.pack(bref)); - } - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4_present) { - HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4.pack(bref)); - } - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8_present) { - HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8.pack(bref)); - } - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16_present) { - HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16.pack(bref)); - } - } - if (c.get().dci_format2_1_present) { - bref.pack(c.get().dci_format2_1.ext, 1); - } - if (c.get().dci_format2_2_present) { - bref.pack(c.get().dci_format2_2.ext, 1); - } - if (c.get().dci_format2_3_present) { - bref.pack(c.get().dci_format2_3.ext, 1); - HANDLE_CODE(bref.pack(c.get().dci_format2_3.dummy1_present, 1)); - if (c.get().dci_format2_3.dummy1_present) { - HANDLE_CODE(c.get().dci_format2_3.dummy1.pack(bref)); - } - HANDLE_CODE(c.get().dci_format2_3.dummy2.pack(bref)); - } - break; - case types::ue_specific: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "search_space_s::search_space_type_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE search_space_s::search_space_type_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::common: - HANDLE_CODE(bref.unpack(c.get().dci_format0_0_and_format1_0_present, 1)); - HANDLE_CODE(bref.unpack(c.get().dci_format2_0_present, 1)); - HANDLE_CODE(bref.unpack(c.get().dci_format2_1_present, 1)); - HANDLE_CODE(bref.unpack(c.get().dci_format2_2_present, 1)); - HANDLE_CODE(bref.unpack(c.get().dci_format2_3_present, 1)); - if (c.get().dci_format0_0_and_format1_0_present) { - bref.unpack(c.get().dci_format0_0_and_format1_0.ext, 1); - } - if (c.get().dci_format2_0_present) { - bref.unpack(c.get().dci_format2_0.ext, 1); - HANDLE_CODE(bref.unpack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1_present, 1)); - HANDLE_CODE(bref.unpack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2_present, 1)); - HANDLE_CODE(bref.unpack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4_present, 1)); - HANDLE_CODE(bref.unpack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8_present, 1)); - HANDLE_CODE(bref.unpack(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16_present, 1)); - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1_present) { - HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level1.unpack(bref)); - } - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2_present) { - HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level2.unpack(bref)); - } - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4_present) { - HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level4.unpack(bref)); - } - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8_present) { - HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level8.unpack(bref)); - } - if (c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16_present) { - HANDLE_CODE(c.get().dci_format2_0.nrof_candidates_sfi.aggregation_level16.unpack(bref)); - } - } - if (c.get().dci_format2_1_present) { - bref.unpack(c.get().dci_format2_1.ext, 1); - } - if (c.get().dci_format2_2_present) { - bref.unpack(c.get().dci_format2_2.ext, 1); - } - if (c.get().dci_format2_3_present) { - bref.unpack(c.get().dci_format2_3.ext, 1); - HANDLE_CODE(bref.unpack(c.get().dci_format2_3.dummy1_present, 1)); - if (c.get().dci_format2_3.dummy1_present) { - HANDLE_CODE(c.get().dci_format2_3.dummy1.unpack(bref)); - } - HANDLE_CODE(c.get().dci_format2_3.dummy2.unpack(bref)); - } - break; - case types::ue_specific: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "search_space_s::search_space_type_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: - aggregation_level1_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" - "aggregation_level1_e_"); -} -uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: - aggregation_level1_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" - "aggregation_level1_e_"); -} - -const char* search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: - aggregation_level2_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" - "aggregation_level2_e_"); -} -uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: - aggregation_level2_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" - "aggregation_level2_e_"); -} - -const char* search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: - aggregation_level4_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" - "aggregation_level4_e_"); -} -uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: - aggregation_level4_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" - "aggregation_level4_e_"); -} - -const char* search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: - aggregation_level8_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" - "aggregation_level8_e_"); -} -uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: - aggregation_level8_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" - "aggregation_level8_e_"); -} - -const char* search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: - aggregation_level16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" - "aggregation_level16_e_"); -} -uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_:: - aggregation_level16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_s::search_space_type_c_::common_s_::dci_format2_0_s_::nrof_candidates_sfi_s_::" - "aggregation_level16_e_"); -} - -const char* search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy1_opts::to_string() const -{ - static const char* names[] = {"sl1", "sl2", "sl4", "sl5", "sl8", "sl10", "sl16", "sl20"}; - return convert_enum_idx( - names, 8, value, "search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy1_e_"); -} -uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy1_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 5, 8, 10, 16, 20}; - return map_enum_number( - numbers, 8, value, "search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy1_e_"); -} - -const char* search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy2_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx( - names, 2, value, "search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy2_e_"); -} -uint8_t search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy2_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number( - numbers, 2, value, "search_space_s::search_space_type_c_::common_s_::dci_format2_3_s_::dummy2_e_"); -} - -SRSASN_CODE search_space_s::search_space_type_c_::ue_specific_s_::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(dci_formats.pack(bref)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= dci_formats_mt_r16_present; - group_flags[0] |= dci_formats_sl_r16_present; - group_flags[0] |= dci_formats_ext_r16_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(dci_formats_mt_r16_present, 1)); - HANDLE_CODE(bref.pack(dci_formats_sl_r16_present, 1)); - HANDLE_CODE(bref.pack(dci_formats_ext_r16_present, 1)); - if (dci_formats_sl_r16_present) { - HANDLE_CODE(dci_formats_sl_r16.pack(bref)); - } - if (dci_formats_ext_r16_present) { - HANDLE_CODE(dci_formats_ext_r16.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE search_space_s::search_space_type_c_::ue_specific_s_::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(dci_formats.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(dci_formats_mt_r16_present, 1)); - HANDLE_CODE(bref.unpack(dci_formats_sl_r16_present, 1)); - HANDLE_CODE(bref.unpack(dci_formats_ext_r16_present, 1)); - if (dci_formats_sl_r16_present) { - HANDLE_CODE(dci_formats_sl_r16.unpack(bref)); - } - if (dci_formats_ext_r16_present) { - HANDLE_CODE(dci_formats_ext_r16.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void search_space_s::search_space_type_c_::ue_specific_s_::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("dci-Formats", dci_formats.to_string()); - if (ext) { - if (dci_formats_mt_r16_present) { - j.write_str("dci-Formats-MT-r16", "formats2-5"); - } - if (dci_formats_sl_r16_present) { - j.write_str("dci-FormatsSL-r16", dci_formats_sl_r16.to_string()); - } - if (dci_formats_ext_r16_present) { - j.write_str("dci-FormatsExt-r16", dci_formats_ext_r16.to_string()); - } - } - j.end_obj(); -} - -const char* search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_opts::to_string() const -{ - static const char* names[] = {"formats0-0-And-1-0", "formats0-1-And-1-1"}; - return convert_enum_idx(names, 2, value, "search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_e_"); -} - -const char* search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_sl_r16_opts::to_string() const -{ - static const char* names[] = { - "formats0-0-And-1-0", "formats0-1-And-1-1", "formats3-0", "formats3-1", "formats3-0-And-3-1"}; - return convert_enum_idx( - names, 5, value, "search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_sl_r16_e_"); -} - -const char* search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_ext_r16_opts::to_string() const -{ - static const char* names[] = {"formats0-2-And-1-2", "formats0-1-And-1-1And-0-2-And-1-2"}; - return convert_enum_idx( - names, 2, value, "search_space_s::search_space_type_c_::ue_specific_s_::dci_formats_ext_r16_e_"); -} - -// SearchSpaceExt-r16 ::= SEQUENCE -SRSASN_CODE search_space_ext_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(coreset_id_r16_present, 1)); - HANDLE_CODE(bref.pack(search_space_type_r16_present, 1)); - HANDLE_CODE(bref.pack(search_space_group_id_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(freq_monitor_locations_r16_present, 1)); - - if (coreset_id_r16_present) { - HANDLE_CODE(pack_integer(bref, coreset_id_r16, (uint8_t)0u, (uint8_t)15u)); - } - if (search_space_type_r16_present) { - bref.pack(search_space_type_r16.common_r16.ext, 1); - HANDLE_CODE(bref.pack(search_space_type_r16.common_r16.dci_format2_4_r16_present, 1)); - HANDLE_CODE(bref.pack(search_space_type_r16.common_r16.dci_format2_5_r16_present, 1)); - HANDLE_CODE(bref.pack(search_space_type_r16.common_r16.dci_format2_6_r16_present, 1)); - if (search_space_type_r16.common_r16.dci_format2_4_r16_present) { - bref.pack(search_space_type_r16.common_r16.dci_format2_4_r16.ext, 1); - HANDLE_CODE(bref.pack( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16_present, 1)); - HANDLE_CODE(bref.pack( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16_present, 1)); - HANDLE_CODE(bref.pack( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16_present, 1)); - HANDLE_CODE(bref.pack( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16_present, 1)); - HANDLE_CODE(bref.pack( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16_present, - 1)); - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16.pack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16.pack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16.pack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16.pack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16.pack( - bref)); - } - } - if (search_space_type_r16.common_r16.dci_format2_5_r16_present) { - bref.pack(search_space_type_r16.common_r16.dci_format2_5_r16.ext, 1); - HANDLE_CODE(bref.pack( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16_present, - 1)); - HANDLE_CODE(bref.pack( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16_present, - 1)); - HANDLE_CODE(bref.pack( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16_present, - 1)); - HANDLE_CODE(bref.pack( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16_present, - 1)); - HANDLE_CODE(bref.pack( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16_present, - 1)); - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16.pack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16.pack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16.pack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16.pack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16.pack( - bref)); - } - } - if (search_space_type_r16.common_r16.dci_format2_6_r16_present) { - bref.pack(search_space_type_r16.common_r16.dci_format2_6_r16.ext, 1); - } - } - if (search_space_group_id_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, search_space_group_id_list_r16, 1, 2, integer_packer(0, 1))); - } - if (freq_monitor_locations_r16_present) { - HANDLE_CODE(freq_monitor_locations_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE search_space_ext_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(coreset_id_r16_present, 1)); - HANDLE_CODE(bref.unpack(search_space_type_r16_present, 1)); - bool search_space_group_id_list_r16_present; - HANDLE_CODE(bref.unpack(search_space_group_id_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(freq_monitor_locations_r16_present, 1)); - - if (coreset_id_r16_present) { - HANDLE_CODE(unpack_integer(coreset_id_r16, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (search_space_type_r16_present) { - bref.unpack(search_space_type_r16.common_r16.ext, 1); - HANDLE_CODE(bref.unpack(search_space_type_r16.common_r16.dci_format2_4_r16_present, 1)); - HANDLE_CODE(bref.unpack(search_space_type_r16.common_r16.dci_format2_5_r16_present, 1)); - HANDLE_CODE(bref.unpack(search_space_type_r16.common_r16.dci_format2_6_r16_present, 1)); - if (search_space_type_r16.common_r16.dci_format2_4_r16_present) { - bref.unpack(search_space_type_r16.common_r16.dci_format2_4_r16.ext, 1); - HANDLE_CODE(bref.unpack( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16_present, 1)); - HANDLE_CODE(bref.unpack( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16_present, 1)); - HANDLE_CODE(bref.unpack( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16_present, 1)); - HANDLE_CODE(bref.unpack( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16_present, 1)); - HANDLE_CODE(bref.unpack( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16_present, - 1)); - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16.unpack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16.unpack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16.unpack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16.unpack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16.unpack( - bref)); - } - } - if (search_space_type_r16.common_r16.dci_format2_5_r16_present) { - bref.unpack(search_space_type_r16.common_r16.dci_format2_5_r16.ext, 1); - HANDLE_CODE(bref.unpack( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16_present, - 1)); - HANDLE_CODE(bref.unpack( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16_present, - 1)); - HANDLE_CODE(bref.unpack( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16_present, - 1)); - HANDLE_CODE(bref.unpack( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16_present, - 1)); - HANDLE_CODE(bref.unpack( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16_present, - 1)); - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16.unpack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16.unpack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16.unpack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16.unpack( - bref)); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16_present) { - HANDLE_CODE( - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16.unpack( - bref)); - } - } - if (search_space_type_r16.common_r16.dci_format2_6_r16_present) { - bref.unpack(search_space_type_r16.common_r16.dci_format2_6_r16.ext, 1); - } - } - if (search_space_group_id_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(search_space_group_id_list_r16, bref, 1, 2, integer_packer(0, 1))); - } - if (freq_monitor_locations_r16_present) { - HANDLE_CODE(freq_monitor_locations_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void search_space_ext_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (coreset_id_r16_present) { - j.write_int("controlResourceSetId-r16", coreset_id_r16); - } - if (search_space_type_r16_present) { - j.write_fieldname("searchSpaceType-r16"); - j.start_obj(); - j.write_fieldname("common-r16"); - j.start_obj(); - if (search_space_type_r16.common_r16.dci_format2_4_r16_present) { - j.write_fieldname("dci-Format2-4-r16"); - j.start_obj(); - j.write_fieldname("nrofCandidates-CI-r16"); - j.start_obj(); - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16_present) { - j.write_str("aggregationLevel1-r16", - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level1_r16 - .to_string()); - } - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16_present) { - j.write_str("aggregationLevel2-r16", - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level2_r16 - .to_string()); - } - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16_present) { - j.write_str("aggregationLevel4-r16", - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level4_r16 - .to_string()); - } - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16_present) { - j.write_str("aggregationLevel8-r16", - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level8_r16 - .to_string()); - } - if (search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16_present) { - j.write_str("aggregationLevel16-r16", - search_space_type_r16.common_r16.dci_format2_4_r16.nrof_candidates_ci_r16.aggregation_level16_r16 - .to_string()); - } - j.end_obj(); - j.end_obj(); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16_present) { - j.write_fieldname("dci-Format2-5-r16"); - j.start_obj(); - j.write_fieldname("nrofCandidates-IAB-r16"); - j.start_obj(); - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16_present) { - j.write_str("aggregationLevel1-r16", - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level1_r16 - .to_string()); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16_present) { - j.write_str("aggregationLevel2-r16", - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level2_r16 - .to_string()); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16_present) { - j.write_str("aggregationLevel4-r16", - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level4_r16 - .to_string()); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16_present) { - j.write_str("aggregationLevel8-r16", - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level8_r16 - .to_string()); - } - if (search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16_present) { - j.write_str("aggregationLevel16-r16", - search_space_type_r16.common_r16.dci_format2_5_r16.nrof_candidates_iab_r16.aggregation_level16_r16 - .to_string()); - } - j.end_obj(); - j.end_obj(); - } - if (search_space_type_r16.common_r16.dci_format2_6_r16_present) { - j.write_fieldname("dci-Format2-6-r16"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); - j.end_obj(); - } - if (search_space_group_id_list_r16.size() > 0) { - j.start_array("searchSpaceGroupIdList-r16"); - for (const auto& e1 : search_space_group_id_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (freq_monitor_locations_r16_present) { - j.write_str("freqMonitorLocations-r16", freq_monitor_locations_r16.to_string()); - } - j.end_obj(); -} - -const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: - nrof_candidates_ci_r16_s_::aggregation_level1_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" - "candidates_ci_r16_s_::aggregation_level1_r16_e_"); -} -uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: - nrof_candidates_ci_r16_s_::aggregation_level1_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" - "candidates_ci_r16_s_::aggregation_level1_r16_e_"); -} - -const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: - nrof_candidates_ci_r16_s_::aggregation_level2_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" - "candidates_ci_r16_s_::aggregation_level2_r16_e_"); -} -uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: - nrof_candidates_ci_r16_s_::aggregation_level2_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" - "candidates_ci_r16_s_::aggregation_level2_r16_e_"); -} - -const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: - nrof_candidates_ci_r16_s_::aggregation_level4_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" - "candidates_ci_r16_s_::aggregation_level4_r16_e_"); -} -uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: - nrof_candidates_ci_r16_s_::aggregation_level4_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" - "candidates_ci_r16_s_::aggregation_level4_r16_e_"); -} - -const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: - nrof_candidates_ci_r16_s_::aggregation_level8_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" - "candidates_ci_r16_s_::aggregation_level8_r16_e_"); -} -uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: - nrof_candidates_ci_r16_s_::aggregation_level8_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" - "candidates_ci_r16_s_::aggregation_level8_r16_e_"); -} - -const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: - nrof_candidates_ci_r16_s_::aggregation_level16_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" - "candidates_ci_r16_s_::aggregation_level16_r16_e_"); -} -uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_:: - nrof_candidates_ci_r16_s_::aggregation_level16_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_4_r16_s_::nrof_" - "candidates_ci_r16_s_::aggregation_level16_r16_e_"); -} - -const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: - nrof_candidates_iab_r16_s_::aggregation_level1_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" - "candidates_iab_r16_s_::aggregation_level1_r16_e_"); -} -uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: - nrof_candidates_iab_r16_s_::aggregation_level1_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" - "candidates_iab_r16_s_::aggregation_level1_r16_e_"); -} - -const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: - nrof_candidates_iab_r16_s_::aggregation_level2_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" - "candidates_iab_r16_s_::aggregation_level2_r16_e_"); -} -uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: - nrof_candidates_iab_r16_s_::aggregation_level2_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" - "candidates_iab_r16_s_::aggregation_level2_r16_e_"); -} - -const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: - nrof_candidates_iab_r16_s_::aggregation_level4_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" - "candidates_iab_r16_s_::aggregation_level4_r16_e_"); -} -uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: - nrof_candidates_iab_r16_s_::aggregation_level4_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" - "candidates_iab_r16_s_::aggregation_level4_r16_e_"); -} - -const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: - nrof_candidates_iab_r16_s_::aggregation_level8_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" - "candidates_iab_r16_s_::aggregation_level8_r16_e_"); -} -uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: - nrof_candidates_iab_r16_s_::aggregation_level8_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" - "candidates_iab_r16_s_::aggregation_level8_r16_e_"); -} - -const char* search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: - nrof_candidates_iab_r16_s_::aggregation_level16_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" - "candidates_iab_r16_s_::aggregation_level16_r16_e_"); -} -uint8_t search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_:: - nrof_candidates_iab_r16_s_::aggregation_level16_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, - 2, - value, - "search_space_ext_r16_s::search_space_type_r16_s_::common_r16_s_::dci_format2_5_r16_s_::nrof_" - "candidates_iab_r16_s_::aggregation_level16_r16_e_"); -} - -// SearchSpaceExt-v1700 ::= SEQUENCE -SRSASN_CODE search_space_ext_v1700_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(monitoring_slot_periodicity_and_offset_v1710_present, 1)); - HANDLE_CODE(bref.pack(monitoring_slots_within_slot_group_r17_present, 1)); - HANDLE_CODE(bref.pack(dur_r17_present, 1)); - HANDLE_CODE(bref.pack(search_space_type_r17_present, 1)); - HANDLE_CODE(bref.pack(search_space_group_id_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(search_space_linking_id_r17_present, 1)); - - if (monitoring_slot_periodicity_and_offset_v1710_present) { - HANDLE_CODE(monitoring_slot_periodicity_and_offset_v1710.pack(bref)); - } - if (monitoring_slots_within_slot_group_r17_present) { - HANDLE_CODE(monitoring_slots_within_slot_group_r17.pack(bref)); - } - if (dur_r17_present) { - HANDLE_CODE(pack_integer(bref, dur_r17, (uint16_t)4u, (uint16_t)20476u)); - } - if (search_space_type_r17_present) { - HANDLE_CODE(bref.pack(search_space_type_r17.common_r17.dci_format4_0_r17_present, 1)); - HANDLE_CODE(bref.pack(search_space_type_r17.common_r17.dci_format4_1_r17_present, 1)); - HANDLE_CODE(bref.pack(search_space_type_r17.common_r17.dci_format4_2_r17_present, 1)); - HANDLE_CODE(bref.pack(search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17_present, 1)); - HANDLE_CODE(bref.pack(search_space_type_r17.common_r17.dci_format2_7_r17_present, 1)); - if (search_space_type_r17.common_r17.dci_format4_0_r17_present) { - bref.pack(search_space_type_r17.common_r17.dci_format4_0_r17.ext, 1); - } - if (search_space_type_r17.common_r17.dci_format4_1_r17_present) { - bref.pack(search_space_type_r17.common_r17.dci_format4_1_r17.ext, 1); - } - if (search_space_type_r17.common_r17.dci_format4_2_r17_present) { - bref.pack(search_space_type_r17.common_r17.dci_format4_2_r17.ext, 1); - } - if (search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17_present) { - bref.pack(search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17.ext, 1); - } - if (search_space_type_r17.common_r17.dci_format2_7_r17_present) { - bref.pack(search_space_type_r17.common_r17.dci_format2_7_r17.ext, 1); - HANDLE_CODE(bref.pack( - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17_present, - 1)); - HANDLE_CODE(bref.pack( - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17_present, - 1)); - HANDLE_CODE(bref.pack( - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17_present, - 1)); - if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17_present) { - HANDLE_CODE( - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17.pack( - bref)); - } - if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17_present) { - HANDLE_CODE( - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17.pack( - bref)); - } - if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17_present) { - HANDLE_CODE( - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17.pack( - bref)); - } - } - } - if (search_space_group_id_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, search_space_group_id_list_r17, 1, 3, integer_packer(0, 2))); - } - if (search_space_linking_id_r17_present) { - HANDLE_CODE(pack_integer(bref, search_space_linking_id_r17, (uint8_t)0u, (uint8_t)39u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE search_space_ext_v1700_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(monitoring_slot_periodicity_and_offset_v1710_present, 1)); - HANDLE_CODE(bref.unpack(monitoring_slots_within_slot_group_r17_present, 1)); - HANDLE_CODE(bref.unpack(dur_r17_present, 1)); - HANDLE_CODE(bref.unpack(search_space_type_r17_present, 1)); - bool search_space_group_id_list_r17_present; - HANDLE_CODE(bref.unpack(search_space_group_id_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(search_space_linking_id_r17_present, 1)); - - if (monitoring_slot_periodicity_and_offset_v1710_present) { - HANDLE_CODE(monitoring_slot_periodicity_and_offset_v1710.unpack(bref)); - } - if (monitoring_slots_within_slot_group_r17_present) { - HANDLE_CODE(monitoring_slots_within_slot_group_r17.unpack(bref)); - } - if (dur_r17_present) { - HANDLE_CODE(unpack_integer(dur_r17, bref, (uint16_t)4u, (uint16_t)20476u)); - } - if (search_space_type_r17_present) { - HANDLE_CODE(bref.unpack(search_space_type_r17.common_r17.dci_format4_0_r17_present, 1)); - HANDLE_CODE(bref.unpack(search_space_type_r17.common_r17.dci_format4_1_r17_present, 1)); - HANDLE_CODE(bref.unpack(search_space_type_r17.common_r17.dci_format4_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(search_space_type_r17.common_r17.dci_format2_7_r17_present, 1)); - if (search_space_type_r17.common_r17.dci_format4_0_r17_present) { - bref.unpack(search_space_type_r17.common_r17.dci_format4_0_r17.ext, 1); - } - if (search_space_type_r17.common_r17.dci_format4_1_r17_present) { - bref.unpack(search_space_type_r17.common_r17.dci_format4_1_r17.ext, 1); - } - if (search_space_type_r17.common_r17.dci_format4_2_r17_present) { - bref.unpack(search_space_type_r17.common_r17.dci_format4_2_r17.ext, 1); - } - if (search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17_present) { - bref.unpack(search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17.ext, 1); - } - if (search_space_type_r17.common_r17.dci_format2_7_r17_present) { - bref.unpack(search_space_type_r17.common_r17.dci_format2_7_r17.ext, 1); - HANDLE_CODE(bref.unpack( - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17_present, - 1)); - HANDLE_CODE(bref.unpack( - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17_present, - 1)); - HANDLE_CODE(bref.unpack( - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17_present, - 1)); - if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17_present) { - HANDLE_CODE( - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17.unpack( - bref)); - } - if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17_present) { - HANDLE_CODE( - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17.unpack( - bref)); - } - if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17_present) { - HANDLE_CODE( - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17.unpack( - bref)); - } - } - } - if (search_space_group_id_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(search_space_group_id_list_r17, bref, 1, 3, integer_packer(0, 2))); - } - if (search_space_linking_id_r17_present) { - HANDLE_CODE(unpack_integer(search_space_linking_id_r17, bref, (uint8_t)0u, (uint8_t)39u)); - } - - return SRSASN_SUCCESS; -} -void search_space_ext_v1700_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (monitoring_slot_periodicity_and_offset_v1710_present) { - j.write_fieldname("monitoringSlotPeriodicityAndOffset-v1710"); - monitoring_slot_periodicity_and_offset_v1710.to_json(j); - } - if (monitoring_slots_within_slot_group_r17_present) { - j.write_fieldname("monitoringSlotsWithinSlotGroup-r17"); - monitoring_slots_within_slot_group_r17.to_json(j); - } - if (dur_r17_present) { - j.write_int("duration-r17", dur_r17); - } - if (search_space_type_r17_present) { - j.write_fieldname("searchSpaceType-r17"); - j.start_obj(); - j.write_fieldname("common-r17"); - j.start_obj(); - if (search_space_type_r17.common_r17.dci_format4_0_r17_present) { - j.write_fieldname("dci-Format4-0-r17"); - j.start_obj(); - j.end_obj(); - } - if (search_space_type_r17.common_r17.dci_format4_1_r17_present) { - j.write_fieldname("dci-Format4-1-r17"); - j.start_obj(); - j.end_obj(); - } - if (search_space_type_r17.common_r17.dci_format4_2_r17_present) { - j.write_fieldname("dci-Format4-2-r17"); - j.start_obj(); - j.end_obj(); - } - if (search_space_type_r17.common_r17.dci_format4_1_and_format4_2_r17_present) { - j.write_fieldname("dci-Format4-1-AndFormat4-2-r17"); - j.start_obj(); - j.end_obj(); - } - if (search_space_type_r17.common_r17.dci_format2_7_r17_present) { - j.write_fieldname("dci-Format2-7-r17"); - j.start_obj(); - j.write_fieldname("nrofCandidates-PEI-r17"); - j.start_obj(); - if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17_present) { - j.write_str("aggregationLevel4-r17", - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level4_r17 - .to_string()); - } - if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17_present) { - j.write_str("aggregationLevel8-r17", - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level8_r17 - .to_string()); - } - if (search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17_present) { - j.write_str("aggregationLevel16-r17", - search_space_type_r17.common_r17.dci_format2_7_r17.nrof_candidates_pei_r17.aggregation_level16_r17 - .to_string()); - } - j.end_obj(); - j.end_obj(); - } - j.end_obj(); - j.end_obj(); - } - if (search_space_group_id_list_r17.size() > 0) { - j.start_array("searchSpaceGroupIdList-r17"); - for (const auto& e1 : search_space_group_id_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (search_space_linking_id_r17_present) { - j.write_int("searchSpaceLinkingId-r17", search_space_linking_id_r17); - } - j.end_obj(); -} - -void search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::destroy_() {} -void search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_:: - monitoring_slot_periodicity_and_offset_v1710_c_( - const search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::sl32: - c.init(other.c.get()); - break; - case types::sl64: - c.init(other.c.get()); - break; - case types::sl128: - c.init(other.c.get()); - break; - case types::sl5120: - c.init(other.c.get()); - break; - case types::sl10240: - c.init(other.c.get()); - break; - case types::sl20480: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_"); - } -} -search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_& -search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::operator=( - const search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::sl32: - c.set(other.c.get()); - break; - case types::sl64: - c.set(other.c.get()); - break; - case types::sl128: - c.set(other.c.get()); - break; - case types::sl5120: - c.set(other.c.get()); - break; - case types::sl10240: - c.set(other.c.get()); - break; - case types::sl20480: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_"); - } - - return *this; -} -uint8_t& search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set_sl32() -{ - set(types::sl32); - return c.get(); -} -uint8_t& search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set_sl64() -{ - set(types::sl64); - return c.get(); -} -uint8_t& search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set_sl128() -{ - set(types::sl128); - return c.get(); -} -uint16_t& search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set_sl5120() -{ - set(types::sl5120); - return c.get(); -} -uint16_t& search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set_sl10240() -{ - set(types::sl10240); - return c.get(); -} -uint16_t& search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::set_sl20480() -{ - set(types::sl20480); - return c.get(); -} -void search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::sl32: - j.write_int("sl32", c.get()); - break; - case types::sl64: - j.write_int("sl64", c.get()); - break; - case types::sl128: - j.write_int("sl128", c.get()); - break; - case types::sl5120: - j.write_int("sl5120", c.get()); - break; - case types::sl10240: - j.write_int("sl10240", c.get()); - break; - case types::sl20480: - j.write_int("sl20480", c.get()); - break; - default: - log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_"); - } - j.end_obj(); -} -SRSASN_CODE search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::sl32: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); - break; - case types::sl64: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::sl128: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); - break; - case types::sl5120: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); - break; - case types::sl10240: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); - break; - case types::sl20480: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)20479u)); - break; - default: - log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::sl32: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); - break; - case types::sl64: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::sl128: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); - break; - case types::sl5120: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); - break; - case types::sl10240: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); - break; - case types::sl20480: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)20479u)); - break; - default: - log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slot_periodicity_and_offset_v1710_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::destroy_() -{ - switch (type_) { - case types::slot_group_len4_r17: - c.destroy>(); - break; - case types::slot_group_len8_r17: - c.destroy>(); - break; - default: - break; - } -} -void search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::slot_group_len4_r17: - c.init>(); - break; - case types::slot_group_len8_r17: - c.init>(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_"); - } -} -search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::monitoring_slots_within_slot_group_r17_c_( - const search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::slot_group_len4_r17: - c.init(other.c.get>()); - break; - case types::slot_group_len8_r17: - c.init(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_"); - } -} -search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_& -search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::operator=( - const search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::slot_group_len4_r17: - c.set(other.c.get>()); - break; - case types::slot_group_len8_r17: - c.set(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_"); - } - - return *this; -} -fixed_bitstring<4>& search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::set_slot_group_len4_r17() -{ - set(types::slot_group_len4_r17); - return c.get>(); -} -fixed_bitstring<8>& search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::set_slot_group_len8_r17() -{ - set(types::slot_group_len8_r17); - return c.get>(); -} -void search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::slot_group_len4_r17: - j.write_str("slotGroupLength4-r17", c.get>().to_string()); - break; - case types::slot_group_len8_r17: - j.write_str("slotGroupLength8-r17", c.get>().to_string()); - break; - default: - log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::slot_group_len4_r17: - HANDLE_CODE(c.get>().pack(bref)); - break; - case types::slot_group_len8_r17: - HANDLE_CODE(c.get>().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::slot_group_len4_r17: - HANDLE_CODE(c.get>().unpack(bref)); - break; - case types::slot_group_len8_r17: - HANDLE_CODE(c.get>().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "search_space_ext_v1700_s::monitoring_slots_within_slot_group_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_:: - nrof_candidates_pei_r17_s_::aggregation_level4_r17_opts::to_string() const -{ - static const char* names[] = {"n0", "n1", "n2", "n3", "n4"}; - return convert_enum_idx(names, - 5, - value, - "search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_::" - "nrof_candidates_pei_r17_s_::aggregation_level4_r17_e_"); -} -uint8_t search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_:: - nrof_candidates_pei_r17_s_::aggregation_level4_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 2, 3, 4}; - return map_enum_number(numbers, - 5, - value, - "search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_::" - "nrof_candidates_pei_r17_s_::aggregation_level4_r17_e_"); -} - -const char* search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_:: - nrof_candidates_pei_r17_s_::aggregation_level8_r17_opts::to_string() const -{ - static const char* names[] = {"n0", "n1", "n2"}; - return convert_enum_idx(names, - 3, - value, - "search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_::" - "nrof_candidates_pei_r17_s_::aggregation_level8_r17_e_"); -} -uint8_t search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_:: - nrof_candidates_pei_r17_s_::aggregation_level8_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 2}; - return map_enum_number(numbers, - 3, - value, - "search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_::" - "nrof_candidates_pei_r17_s_::aggregation_level8_r17_e_"); -} - -const char* search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_:: - nrof_candidates_pei_r17_s_::aggregation_level16_r17_opts::to_string() const -{ - static const char* names[] = {"n0", "n1"}; - return convert_enum_idx(names, - 2, - value, - "search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_::" - "nrof_candidates_pei_r17_s_::aggregation_level16_r17_e_"); -} -uint8_t search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_:: - nrof_candidates_pei_r17_s_::aggregation_level16_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, - 2, - value, - "search_space_ext_v1700_s::search_space_type_r17_s_::common_r17_s_::dci_format2_7_r17_s_::" - "nrof_candidates_pei_r17_s_::aggregation_level16_r17_e_"); -} - -// BWP ::= SEQUENCE -SRSASN_CODE bwp_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(cp_present, 1)); - - HANDLE_CODE(pack_integer(bref, location_and_bw, (uint16_t)0u, (uint16_t)37949u)); - HANDLE_CODE(subcarrier_spacing.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE bwp_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(cp_present, 1)); - - HANDLE_CODE(unpack_integer(location_and_bw, bref, (uint16_t)0u, (uint16_t)37949u)); - HANDLE_CODE(subcarrier_spacing.unpack(bref)); - - return SRSASN_SUCCESS; -} -void bwp_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("locationAndBandwidth", location_and_bw); - j.write_str("subcarrierSpacing", subcarrier_spacing.to_string()); - if (cp_present) { - j.write_str("cyclicPrefix", "extended"); - } - j.end_obj(); -} - -// NumberOfMsg3-Repetitions-r17 ::= ENUMERATED -const char* nof_msg3_repeats_r17_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n3", "n4", "n7", "n8", "n12", "n16"}; - return convert_enum_idx(names, 8, value, "nof_msg3_repeats_r17_e"); -} -uint8_t nof_msg3_repeats_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 7, 8, 12, 16}; - return map_enum_number(numbers, 8, value, "nof_msg3_repeats_r17_e"); -} - -// PDCCH-ConfigCommon ::= SEQUENCE -SRSASN_CODE pdcch_cfg_common_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(coreset_zero_present, 1)); - HANDLE_CODE(bref.pack(common_coreset_present, 1)); - HANDLE_CODE(bref.pack(search_space_zero_present, 1)); - HANDLE_CODE(bref.pack(common_search_space_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(search_space_sib1_present, 1)); - HANDLE_CODE(bref.pack(search_space_other_sys_info_present, 1)); - HANDLE_CODE(bref.pack(paging_search_space_present, 1)); - HANDLE_CODE(bref.pack(ra_search_space_present, 1)); - - if (coreset_zero_present) { - HANDLE_CODE(pack_integer(bref, coreset_zero, (uint8_t)0u, (uint8_t)15u)); - } - if (common_coreset_present) { - HANDLE_CODE(common_coreset.pack(bref)); - } - if (search_space_zero_present) { - HANDLE_CODE(pack_integer(bref, search_space_zero, (uint8_t)0u, (uint8_t)15u)); - } - if (common_search_space_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, common_search_space_list, 1, 4)); - } - if (search_space_sib1_present) { - HANDLE_CODE(pack_integer(bref, search_space_sib1, (uint8_t)0u, (uint8_t)39u)); - } - if (search_space_other_sys_info_present) { - HANDLE_CODE(pack_integer(bref, search_space_other_sys_info, (uint8_t)0u, (uint8_t)39u)); - } - if (paging_search_space_present) { - HANDLE_CODE(pack_integer(bref, paging_search_space, (uint8_t)0u, (uint8_t)39u)); - } - if (ra_search_space_present) { - HANDLE_CODE(pack_integer(bref, ra_search_space, (uint8_t)0u, (uint8_t)39u)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= first_pdcch_monitoring_occasion_of_po.is_present(); - group_flags[1] |= common_search_space_list_ext_r16.is_present(); - group_flags[2] |= sdt_search_space_r17.is_present(); - group_flags[2] |= search_space_mcch_r17_present; - group_flags[2] |= search_space_mtch_r17_present; - group_flags[2] |= common_search_space_list_ext2_r17.is_present(); - group_flags[2] |= first_pdcch_monitoring_occasion_of_po_v1710.is_present(); - group_flags[2] |= pei_cfg_bwp_r17.is_present(); - group_flags[3] |= follow_unified_tci_state_v1720_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(first_pdcch_monitoring_occasion_of_po.is_present(), 1)); - if (first_pdcch_monitoring_occasion_of_po.is_present()) { - HANDLE_CODE(first_pdcch_monitoring_occasion_of_po->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(common_search_space_list_ext_r16.is_present(), 1)); - if (common_search_space_list_ext_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *common_search_space_list_ext_r16, 1, 4)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(sdt_search_space_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(search_space_mcch_r17_present, 1)); - HANDLE_CODE(bref.pack(search_space_mtch_r17_present, 1)); - HANDLE_CODE(bref.pack(common_search_space_list_ext2_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(first_pdcch_monitoring_occasion_of_po_v1710.is_present(), 1)); - HANDLE_CODE(bref.pack(pei_cfg_bwp_r17.is_present(), 1)); - if (sdt_search_space_r17.is_present()) { - HANDLE_CODE(sdt_search_space_r17->pack(bref)); - } - if (search_space_mcch_r17_present) { - HANDLE_CODE(pack_integer(bref, search_space_mcch_r17, (uint8_t)0u, (uint8_t)39u)); - } - if (search_space_mtch_r17_present) { - HANDLE_CODE(pack_integer(bref, search_space_mtch_r17, (uint8_t)0u, (uint8_t)39u)); - } - if (common_search_space_list_ext2_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *common_search_space_list_ext2_r17, 1, 4)); - } - if (first_pdcch_monitoring_occasion_of_po_v1710.is_present()) { - HANDLE_CODE(first_pdcch_monitoring_occasion_of_po_v1710->pack(bref)); - } - if (pei_cfg_bwp_r17.is_present()) { - HANDLE_CODE(pack_integer(bref, pei_cfg_bwp_r17->pei_search_space_r17, (uint8_t)0u, (uint8_t)39u)); - HANDLE_CODE(pei_cfg_bwp_r17->first_pdcch_monitoring_occasion_of_pei_o_r17.pack(bref)); - } - } - if (group_flags[3]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(follow_unified_tci_state_v1720_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcch_cfg_common_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(coreset_zero_present, 1)); - HANDLE_CODE(bref.unpack(common_coreset_present, 1)); - HANDLE_CODE(bref.unpack(search_space_zero_present, 1)); - bool common_search_space_list_present; - HANDLE_CODE(bref.unpack(common_search_space_list_present, 1)); - HANDLE_CODE(bref.unpack(search_space_sib1_present, 1)); - HANDLE_CODE(bref.unpack(search_space_other_sys_info_present, 1)); - HANDLE_CODE(bref.unpack(paging_search_space_present, 1)); - HANDLE_CODE(bref.unpack(ra_search_space_present, 1)); - - if (coreset_zero_present) { - HANDLE_CODE(unpack_integer(coreset_zero, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (common_coreset_present) { - HANDLE_CODE(common_coreset.unpack(bref)); - } - if (search_space_zero_present) { - HANDLE_CODE(unpack_integer(search_space_zero, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (common_search_space_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(common_search_space_list, bref, 1, 4)); - } - if (search_space_sib1_present) { - HANDLE_CODE(unpack_integer(search_space_sib1, bref, (uint8_t)0u, (uint8_t)39u)); - } - if (search_space_other_sys_info_present) { - HANDLE_CODE(unpack_integer(search_space_other_sys_info, bref, (uint8_t)0u, (uint8_t)39u)); - } - if (paging_search_space_present) { - HANDLE_CODE(unpack_integer(paging_search_space, bref, (uint8_t)0u, (uint8_t)39u)); - } - if (ra_search_space_present) { - HANDLE_CODE(unpack_integer(ra_search_space, bref, (uint8_t)0u, (uint8_t)39u)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(4); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(first_pdcch_monitoring_occasion_of_po, bref); - if (first_pdcch_monitoring_occasion_of_po.is_present()) { - HANDLE_CODE(first_pdcch_monitoring_occasion_of_po->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(common_search_space_list_ext_r16, bref); - if (common_search_space_list_ext_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*common_search_space_list_ext_r16, bref, 1, 4)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(sdt_search_space_r17, bref); - HANDLE_CODE(bref.unpack(search_space_mcch_r17_present, 1)); - HANDLE_CODE(bref.unpack(search_space_mtch_r17_present, 1)); - unpack_presence_flag(common_search_space_list_ext2_r17, bref); - unpack_presence_flag(first_pdcch_monitoring_occasion_of_po_v1710, bref); - unpack_presence_flag(pei_cfg_bwp_r17, bref); - if (sdt_search_space_r17.is_present()) { - HANDLE_CODE(sdt_search_space_r17->unpack(bref)); - } - if (search_space_mcch_r17_present) { - HANDLE_CODE(unpack_integer(search_space_mcch_r17, bref, (uint8_t)0u, (uint8_t)39u)); - } - if (search_space_mtch_r17_present) { - HANDLE_CODE(unpack_integer(search_space_mtch_r17, bref, (uint8_t)0u, (uint8_t)39u)); - } - if (common_search_space_list_ext2_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*common_search_space_list_ext2_r17, bref, 1, 4)); - } - if (first_pdcch_monitoring_occasion_of_po_v1710.is_present()) { - HANDLE_CODE(first_pdcch_monitoring_occasion_of_po_v1710->unpack(bref)); - } - if (pei_cfg_bwp_r17.is_present()) { - HANDLE_CODE(unpack_integer(pei_cfg_bwp_r17->pei_search_space_r17, bref, (uint8_t)0u, (uint8_t)39u)); - HANDLE_CODE(pei_cfg_bwp_r17->first_pdcch_monitoring_occasion_of_pei_o_r17.unpack(bref)); - } - } - if (group_flags[3]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(follow_unified_tci_state_v1720_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void pdcch_cfg_common_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (coreset_zero_present) { - j.write_int("controlResourceSetZero", coreset_zero); - } - if (common_coreset_present) { - j.write_fieldname("commonControlResourceSet"); - common_coreset.to_json(j); - } - if (search_space_zero_present) { - j.write_int("searchSpaceZero", search_space_zero); - } - if (common_search_space_list.size() > 0) { - j.start_array("commonSearchSpaceList"); - for (const auto& e1 : common_search_space_list) { - e1.to_json(j); - } - j.end_array(); - } - if (search_space_sib1_present) { - j.write_int("searchSpaceSIB1", search_space_sib1); - } - if (search_space_other_sys_info_present) { - j.write_int("searchSpaceOtherSystemInformation", search_space_other_sys_info); - } - if (paging_search_space_present) { - j.write_int("pagingSearchSpace", paging_search_space); - } - if (ra_search_space_present) { - j.write_int("ra-SearchSpace", ra_search_space); - } - if (ext) { - if (first_pdcch_monitoring_occasion_of_po.is_present()) { - j.write_fieldname("firstPDCCH-MonitoringOccasionOfPO"); - first_pdcch_monitoring_occasion_of_po->to_json(j); - } - if (common_search_space_list_ext_r16.is_present()) { - j.start_array("commonSearchSpaceListExt-r16"); - for (const auto& e1 : *common_search_space_list_ext_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sdt_search_space_r17.is_present()) { - j.write_fieldname("sdt-SearchSpace-r17"); - sdt_search_space_r17->to_json(j); - } - if (search_space_mcch_r17_present) { - j.write_int("searchSpaceMCCH-r17", search_space_mcch_r17); - } - if (search_space_mtch_r17_present) { - j.write_int("searchSpaceMTCH-r17", search_space_mtch_r17); - } - if (common_search_space_list_ext2_r17.is_present()) { - j.start_array("commonSearchSpaceListExt2-r17"); - for (const auto& e1 : *common_search_space_list_ext2_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (first_pdcch_monitoring_occasion_of_po_v1710.is_present()) { - j.write_fieldname("firstPDCCH-MonitoringOccasionOfPO-v1710"); - first_pdcch_monitoring_occasion_of_po_v1710->to_json(j); - } - if (pei_cfg_bwp_r17.is_present()) { - j.write_fieldname("pei-ConfigBWP-r17"); - j.start_obj(); - j.write_int("pei-SearchSpace-r17", pei_cfg_bwp_r17->pei_search_space_r17); - j.write_fieldname("firstPDCCH-MonitoringOccasionOfPEI-O-r17"); - pei_cfg_bwp_r17->first_pdcch_monitoring_occasion_of_pei_o_r17.to_json(j); - j.end_obj(); - } - if (follow_unified_tci_state_v1720_present) { - j.write_str("followUnifiedTCI-State-v1720", "enabled"); - } - } - j.end_obj(); -} - -void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::destroy_() -{ - switch (type_) { - case types::scs15_kh_zone_t: - c.destroy(); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - c.destroy(); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - c.destroy(); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - c.destroy(); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - c.destroy(); - break; - case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - c.destroy(); - break; - case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - c.destroy(); - break; - case types::scs120_kh_zone_sixteenth_t: - c.destroy(); - break; - default: - break; - } -} -void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::scs15_kh_zone_t: - c.init(); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - c.init(); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - c.init(); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - c.init(); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - c.init(); - break; - case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - c.init(); - break; - case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - c.init(); - break; - case types::scs120_kh_zone_sixteenth_t: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_"); - } -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::first_pdcch_monitoring_occasion_of_po_c_( - const pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::scs15_kh_zone_t: - c.init(other.c.get()); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - c.init(other.c.get()); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - c.init(other.c.get()); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - c.init(other.c.get()); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::scs120_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_"); - } -} -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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::scs15_kh_zone_t: - c.set(other.c.get()); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - c.set(other.c.get()); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - c.set(other.c.get()); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - c.set(other.c.get()); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::scs120_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_"); - } - - return *this; -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::scs15_kh_zone_t_l_& -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs15_kh_zone_t() -{ - set(types::scs15_kh_zone_t); - return c.get(); -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::scs30_kh_zone_t_scs15_kh_zhalf_t_l_& -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs30_kh_zone_t_scs15_kh_zhalf_t() -{ - set(types::scs30_kh_zone_t_scs15_kh_zhalf_t); - return c.get(); -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() -{ - set(types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t); - return c.get(); -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& - pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: - set_scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() -{ - set(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t); - return c.get(); -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& - pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: - set_scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() -{ - set(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t); - return c.get(); -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: - scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& - pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_:: - set_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() -{ - set(types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t); - return c.get(); -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() -{ - set(types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t); - return c.get(); -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::scs120_kh_zone_sixteenth_t_l_& -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs120_kh_zone_sixteenth_t() -{ - set(types::scs120_kh_zone_sixteenth_t); - return c.get(); -} -void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::scs15_kh_zone_t: - j.start_array("sCS15KHZoneT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - j.start_array("sCS30KHZoneT-SCS15KHZhalfT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - j.start_array("sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - j.start_array("sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - j.start_array("sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT"); - for (const auto& e1 : - c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - j.start_array("sCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - j.start_array("sCS120KHZoneEighthT-SCS60KHZoneSixteenthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs120_kh_zone_sixteenth_t: - j.start_array("sCS120KHZoneSixteenthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_"); - } - j.end_obj(); -} -SRSASN_CODE pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::scs15_kh_zone_t: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 139))); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - HANDLE_CODE( - pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 279))); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - HANDLE_CODE(pack_dyn_seq_of(bref, - c.get(), - 1, - 4, - integer_packer(0, 559))); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - HANDLE_CODE( - pack_dyn_seq_of(bref, - c.get(), - 1, - 4, - integer_packer(0, 1119))); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - HANDLE_CODE(pack_dyn_seq_of( - bref, - c.get(), - 1, - 4, - integer_packer(0, 2239))); - break; - case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - HANDLE_CODE(pack_dyn_seq_of(bref, - c.get(), - 1, - 4, - integer_packer(0, 4479))); - break; - case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - HANDLE_CODE(pack_dyn_seq_of(bref, - c.get(), - 1, - 4, - integer_packer(0, 8959))); - break; - case types::scs120_kh_zone_sixteenth_t: - HANDLE_CODE( - pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 17919))); - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::scs15_kh_zone_t: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 139))); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - HANDLE_CODE(unpack_dyn_seq_of( - c.get(), bref, 1, 4, integer_packer(0, 279))); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), - bref, - 1, - 4, - integer_packer(0, 559))); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - HANDLE_CODE( - unpack_dyn_seq_of(c.get(), - bref, - 1, - 4, - integer_packer(0, 1119))); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - HANDLE_CODE(unpack_dyn_seq_of( - c.get(), - bref, - 1, - 4, - integer_packer(0, 2239))); - break; - case types::scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), - bref, - 1, - 4, - integer_packer(0, 4479))); - break; - case types::scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), - bref, - 1, - 4, - integer_packer(0, 8959))); - break; - case types::scs120_kh_zone_sixteenth_t: - HANDLE_CODE( - unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 17919))); - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void pdcch_cfg_common_s::sdt_search_space_r17_c_::destroy_() -{ - switch (type_) { - case types::new_search_space: - c.destroy(); - break; - default: - break; - } -} -void pdcch_cfg_common_s::sdt_search_space_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::new_search_space: - c.init(); - break; - case types::existing_search_space: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::sdt_search_space_r17_c_"); - } -} -pdcch_cfg_common_s::sdt_search_space_r17_c_::sdt_search_space_r17_c_( - const pdcch_cfg_common_s::sdt_search_space_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::new_search_space: - c.init(other.c.get()); - break; - case types::existing_search_space: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::sdt_search_space_r17_c_"); - } -} -pdcch_cfg_common_s::sdt_search_space_r17_c_& -pdcch_cfg_common_s::sdt_search_space_r17_c_::operator=(const pdcch_cfg_common_s::sdt_search_space_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::new_search_space: - c.set(other.c.get()); - break; - case types::existing_search_space: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::sdt_search_space_r17_c_"); - } - - return *this; -} -search_space_s& pdcch_cfg_common_s::sdt_search_space_r17_c_::set_new_search_space() -{ - set(types::new_search_space); - return c.get(); -} -uint8_t& pdcch_cfg_common_s::sdt_search_space_r17_c_::set_existing_search_space() -{ - set(types::existing_search_space); - return c.get(); -} -void pdcch_cfg_common_s::sdt_search_space_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::new_search_space: - j.write_fieldname("newSearchSpace"); - c.get().to_json(j); - break; - case types::existing_search_space: - j.write_int("existingSearchSpace", c.get()); - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::sdt_search_space_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE pdcch_cfg_common_s::sdt_search_space_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::new_search_space: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::existing_search_space: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::sdt_search_space_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcch_cfg_common_s::sdt_search_space_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::new_search_space: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::existing_search_space: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::sdt_search_space_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::destroy_() -{ - switch (type_) { - case types::scs480_kh_zone_eighth_t: - c.destroy(); - break; - case types::scs480_kh_zone_sixteenth_t: - c.destroy(); - break; - default: - break; - } -} -void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::scs480_kh_zone_eighth_t: - c.init(); - break; - case types::scs480_kh_zone_sixteenth_t: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); - } -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::first_pdcch_monitoring_occasion_of_po_v1710_c_( - const pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::scs480_kh_zone_eighth_t: - c.init(other.c.get()); - break; - case types::scs480_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); - } -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_& -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::operator=( - const pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::scs480_kh_zone_eighth_t: - c.set(other.c.get()); - break; - case types::scs480_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); - } - - return *this; -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::scs480_kh_zone_eighth_t_l_& -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::set_scs480_kh_zone_eighth_t() -{ - set(types::scs480_kh_zone_eighth_t); - return c.get(); -} -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::scs480_kh_zone_sixteenth_t_l_& -pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::set_scs480_kh_zone_sixteenth_t() -{ - set(types::scs480_kh_zone_sixteenth_t); - return c.get(); -} -void pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::scs480_kh_zone_eighth_t: - j.start_array("sCS480KHZoneEighthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs480_kh_zone_sixteenth_t: - j.start_array("sCS480KHZoneSixteenthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); - } - j.end_obj(); -} -SRSASN_CODE pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::scs480_kh_zone_eighth_t: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 35839))); - break; - case types::scs480_kh_zone_sixteenth_t: - HANDLE_CODE( - pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 71679))); - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::scs480_kh_zone_eighth_t: - HANDLE_CODE( - unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 35839))); - break; - case types::scs480_kh_zone_sixteenth_t: - HANDLE_CODE( - unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 71679))); - break; - default: - log_invalid_choice_id(type_, "pdcch_cfg_common_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::destroy_() -{ - switch (type_) { - case types::scs15_kh_zone_t: - c.destroy(); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - c.destroy(); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - c.destroy(); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - c.destroy(); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - c.destroy(); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - c.destroy(); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - c.destroy(); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - c.destroy(); - break; - case types::scs480_kh_zone_eighth_t: - c.destroy(); - break; - case types::scs480_kh_zone_sixteenth_t: - c.destroy(); - break; - default: - break; - } -} -void pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::scs15_kh_zone_t: - c.init(); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - c.init(); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - c.init(); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - c.init(); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - c.init(); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - c.init(); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - c.init(); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - c.init(); - break; - case types::scs480_kh_zone_eighth_t: - c.init(); - break; - case types::scs480_kh_zone_sixteenth_t: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, - "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_"); - } -} -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - first_pdcch_monitoring_occasion_of_pei_o_r17_c_( - const pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::scs15_kh_zone_t: - c.init(other.c.get()); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - c.init(other.c.get()); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - c.init(other.c.get()); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - c.init(other.c.get()); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::scs480_kh_zone_eighth_t: - c.init(other.c.get()); - break; - case types::scs480_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, - "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_"); - } -} -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_& -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::operator=( - const pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::scs15_kh_zone_t: - c.set(other.c.get()); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - c.set(other.c.get()); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - c.set(other.c.get()); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - c.set(other.c.get()); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::scs480_kh_zone_eighth_t: - c.set(other.c.get()); - break; - case types::scs480_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, - "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_"); - } - - return *this; -} -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::scs15_kh_zone_t_l_& -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::set_scs15_kh_zone_t() -{ - set(types::scs15_kh_zone_t); - return c.get(); -} -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - scs30_kh_zone_t_scs15_kh_zhalf_t_l_& - pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - set_scs30_kh_zone_t_scs15_kh_zhalf_t() -{ - set(types::scs30_kh_zone_t_scs15_kh_zhalf_t); - return c.get(); -} -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& - pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - set_scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() -{ - set(types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t); - return c.get(); -} -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& - pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - set_scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() -{ - set(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t); - return c.get(); -} -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& - pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - set_scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() -{ - set(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t); - return c.get(); -} -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& - pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - set_scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() -{ - set(types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t); - return c.get(); -} -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& - pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - set_scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() -{ - set(types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t); - return c.get(); -} -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& - pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - set_scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t() -{ - set(types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t); - return c.get(); -} -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::scs480_kh_zone_eighth_t_l_& -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::set_scs480_kh_zone_eighth_t() -{ - set(types::scs480_kh_zone_eighth_t); - return c.get(); -} -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::scs480_kh_zone_sixteenth_t_l_& -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_:: - set_scs480_kh_zone_sixteenth_t() -{ - set(types::scs480_kh_zone_sixteenth_t); - return c.get(); -} -void pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::to_json( - json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::scs15_kh_zone_t: - j.start_array("sCS15KHZoneT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - j.start_array("sCS30KHZoneT-SCS15KHZhalfT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - j.start_array("sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - j.start_array("sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - j.start_array("sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT"); - for (const auto& e1 : - c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - j.start_array("sCS480KHZoneT-SCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT"); - for (const auto& e1 : - c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - j.start_array("sCS480KHZhalfT-SCS120KHZoneEighthT-SCS60KHZoneSixteenthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - j.start_array("sCS480KHZquarterT-SCS120KHZoneSixteenthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs480_kh_zone_eighth_t: - j.start_array("sCS480KHZoneEighthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs480_kh_zone_sixteenth_t: - j.start_array("sCS480KHZoneSixteenthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, - "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::scs15_kh_zone_t: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 139))); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - HANDLE_CODE( - pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 279))); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - HANDLE_CODE(pack_dyn_seq_of(bref, - c.get(), - 1, - 4, - integer_packer(0, 559))); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - HANDLE_CODE( - pack_dyn_seq_of(bref, - c.get(), - 1, - 4, - integer_packer(0, 1119))); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - HANDLE_CODE(pack_dyn_seq_of( - bref, - c.get(), - 1, - 4, - integer_packer(0, 2239))); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - HANDLE_CODE(pack_dyn_seq_of( - bref, - c.get(), - 1, - 4, - integer_packer(0, 4479))); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - HANDLE_CODE(pack_dyn_seq_of(bref, - c.get(), - 1, - 4, - integer_packer(0, 8959))); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - HANDLE_CODE(pack_dyn_seq_of( - bref, c.get(), 1, 4, integer_packer(0, 17919))); - break; - case types::scs480_kh_zone_eighth_t: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 35839))); - break; - case types::scs480_kh_zone_sixteenth_t: - HANDLE_CODE( - pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 71679))); - break; - default: - log_invalid_choice_id(type_, - "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE -pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::scs15_kh_zone_t: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 139))); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - HANDLE_CODE(unpack_dyn_seq_of( - c.get(), bref, 1, 4, integer_packer(0, 279))); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), - bref, - 1, - 4, - integer_packer(0, 559))); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - HANDLE_CODE( - unpack_dyn_seq_of(c.get(), - bref, - 1, - 4, - integer_packer(0, 1119))); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - HANDLE_CODE(unpack_dyn_seq_of( - c.get(), - bref, - 1, - 4, - integer_packer(0, 2239))); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - HANDLE_CODE(unpack_dyn_seq_of( - c.get(), - bref, - 1, - 4, - integer_packer(0, 4479))); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), - bref, - 1, - 4, - integer_packer(0, 8959))); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - HANDLE_CODE(unpack_dyn_seq_of( - c.get(), bref, 1, 4, integer_packer(0, 17919))); - break; - case types::scs480_kh_zone_eighth_t: - HANDLE_CODE( - unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 35839))); - break; - case types::scs480_kh_zone_sixteenth_t: - HANDLE_CODE( - unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 71679))); - break; - default: - log_invalid_choice_id(type_, - "pdcch_cfg_common_s::pei_cfg_bwp_r17_s_::first_pdcch_monitoring_occasion_of_pei_o_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// PDSCH-ConfigCommon ::= SEQUENCE -SRSASN_CODE pdsch_cfg_common_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pdsch_time_domain_alloc_list.size() > 0, 1)); - - if (pdsch_time_domain_alloc_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, pdsch_time_domain_alloc_list, 1, 16)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pdsch_cfg_common_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool pdsch_time_domain_alloc_list_present; - HANDLE_CODE(bref.unpack(pdsch_time_domain_alloc_list_present, 1)); - - if (pdsch_time_domain_alloc_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(pdsch_time_domain_alloc_list, bref, 1, 16)); - } - - return SRSASN_SUCCESS; -} -void pdsch_cfg_common_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pdsch_time_domain_alloc_list.size() > 0) { - j.start_array("pdsch-TimeDomainAllocationList"); - for (const auto& e1 : pdsch_time_domain_alloc_list) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// PUCCH-ConfigCommon ::= SEQUENCE -SRSASN_CODE pucch_cfg_common_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pucch_res_common_present, 1)); - HANDLE_CODE(bref.pack(hop_id_present, 1)); - HANDLE_CODE(bref.pack(p0_nominal_present, 1)); - - if (pucch_res_common_present) { - HANDLE_CODE(pack_integer(bref, pucch_res_common, (uint8_t)0u, (uint8_t)15u)); - } - HANDLE_CODE(pucch_group_hop.pack(bref)); - if (hop_id_present) { - HANDLE_CODE(pack_integer(bref, hop_id, (uint16_t)0u, (uint16_t)1023u)); - } - if (p0_nominal_present) { - HANDLE_CODE(pack_integer(bref, p0_nominal, (int16_t)-202, (int16_t)24)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= nrof_prbs_present; - group_flags[0] |= intra_slot_fh_r17_present; - group_flags[0] |= pucch_res_common_red_cap_r17_present; - group_flags[0] |= add_prb_offset_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(nrof_prbs_present, 1)); - HANDLE_CODE(bref.pack(intra_slot_fh_r17_present, 1)); - HANDLE_CODE(bref.pack(pucch_res_common_red_cap_r17_present, 1)); - HANDLE_CODE(bref.pack(add_prb_offset_r17_present, 1)); - if (nrof_prbs_present) { - HANDLE_CODE(pack_integer(bref, nrof_prbs, (uint8_t)1u, (uint8_t)16u)); - } - if (intra_slot_fh_r17_present) { - HANDLE_CODE(intra_slot_fh_r17.pack(bref)); - } - if (pucch_res_common_red_cap_r17_present) { - HANDLE_CODE(pack_integer(bref, pucch_res_common_red_cap_r17, (uint8_t)0u, (uint8_t)15u)); - } - if (add_prb_offset_r17_present) { - HANDLE_CODE(add_prb_offset_r17.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_cfg_common_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pucch_res_common_present, 1)); - HANDLE_CODE(bref.unpack(hop_id_present, 1)); - HANDLE_CODE(bref.unpack(p0_nominal_present, 1)); - - if (pucch_res_common_present) { - HANDLE_CODE(unpack_integer(pucch_res_common, bref, (uint8_t)0u, (uint8_t)15u)); - } - HANDLE_CODE(pucch_group_hop.unpack(bref)); - if (hop_id_present) { - HANDLE_CODE(unpack_integer(hop_id, bref, (uint16_t)0u, (uint16_t)1023u)); - } - if (p0_nominal_present) { - HANDLE_CODE(unpack_integer(p0_nominal, bref, (int16_t)-202, (int16_t)24)); - } - - 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(nrof_prbs_present, 1)); - HANDLE_CODE(bref.unpack(intra_slot_fh_r17_present, 1)); - HANDLE_CODE(bref.unpack(pucch_res_common_red_cap_r17_present, 1)); - HANDLE_CODE(bref.unpack(add_prb_offset_r17_present, 1)); - if (nrof_prbs_present) { - HANDLE_CODE(unpack_integer(nrof_prbs, bref, (uint8_t)1u, (uint8_t)16u)); - } - if (intra_slot_fh_r17_present) { - HANDLE_CODE(intra_slot_fh_r17.unpack(bref)); - } - if (pucch_res_common_red_cap_r17_present) { - HANDLE_CODE(unpack_integer(pucch_res_common_red_cap_r17, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (add_prb_offset_r17_present) { - HANDLE_CODE(add_prb_offset_r17.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void pucch_cfg_common_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pucch_res_common_present) { - j.write_int("pucch-ResourceCommon", pucch_res_common); - } - j.write_str("pucch-GroupHopping", pucch_group_hop.to_string()); - if (hop_id_present) { - j.write_int("hoppingId", hop_id); - } - if (p0_nominal_present) { - j.write_int("p0-nominal", p0_nominal); - } - if (ext) { - if (nrof_prbs_present) { - j.write_int("nrofPRBs", nrof_prbs); - } - if (intra_slot_fh_r17_present) { - j.write_str("intra-SlotFH-r17", intra_slot_fh_r17.to_string()); - } - if (pucch_res_common_red_cap_r17_present) { - j.write_int("pucch-ResourceCommonRedCap-r17", pucch_res_common_red_cap_r17); - } - if (add_prb_offset_r17_present) { - j.write_str("additionalPRBOffset-r17", add_prb_offset_r17.to_string()); - } - } - j.end_obj(); -} - -const char* pucch_cfg_common_s::pucch_group_hop_opts::to_string() const -{ - static const char* names[] = {"neither", "enable", "disable"}; - return convert_enum_idx(names, 3, value, "pucch_cfg_common_s::pucch_group_hop_e_"); -} - -const char* pucch_cfg_common_s::intra_slot_fh_r17_opts::to_string() const -{ - static const char* names[] = {"fromLowerEdge", "fromUpperEdge"}; - return convert_enum_idx(names, 2, value, "pucch_cfg_common_s::intra_slot_fh_r17_e_"); -} - -const char* pucch_cfg_common_s::add_prb_offset_r17_opts::to_string() const -{ - static const char* names[] = {"n2", "n3", "n4", "n6", "n8", "n9", "n10", "n12"}; - return convert_enum_idx(names, 8, value, "pucch_cfg_common_s::add_prb_offset_r17_e_"); -} -uint8_t pucch_cfg_common_s::add_prb_offset_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 3, 4, 6, 8, 9, 10, 12}; - return map_enum_number(numbers, 8, value, "pucch_cfg_common_s::add_prb_offset_r17_e_"); -} - -// PUSCH-ConfigCommon ::= SEQUENCE -SRSASN_CODE pusch_cfg_common_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(group_hop_enabled_transform_precoding_present, 1)); - HANDLE_CODE(bref.pack(pusch_time_domain_alloc_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(msg3_delta_preamb_present, 1)); - HANDLE_CODE(bref.pack(p0_nominal_with_grant_present, 1)); - - if (pusch_time_domain_alloc_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, pusch_time_domain_alloc_list, 1, 16)); - } - if (msg3_delta_preamb_present) { - HANDLE_CODE(pack_integer(bref, msg3_delta_preamb, (int8_t)-1, (int8_t)6)); - } - if (p0_nominal_with_grant_present) { - HANDLE_CODE(pack_integer(bref, p0_nominal_with_grant, (int16_t)-202, (int16_t)24)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pusch_cfg_common_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(group_hop_enabled_transform_precoding_present, 1)); - bool pusch_time_domain_alloc_list_present; - HANDLE_CODE(bref.unpack(pusch_time_domain_alloc_list_present, 1)); - HANDLE_CODE(bref.unpack(msg3_delta_preamb_present, 1)); - HANDLE_CODE(bref.unpack(p0_nominal_with_grant_present, 1)); - - if (pusch_time_domain_alloc_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(pusch_time_domain_alloc_list, bref, 1, 16)); - } - if (msg3_delta_preamb_present) { - HANDLE_CODE(unpack_integer(msg3_delta_preamb, bref, (int8_t)-1, (int8_t)6)); - } - if (p0_nominal_with_grant_present) { - HANDLE_CODE(unpack_integer(p0_nominal_with_grant, bref, (int16_t)-202, (int16_t)24)); - } - - return SRSASN_SUCCESS; -} -void pusch_cfg_common_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (group_hop_enabled_transform_precoding_present) { - j.write_str("groupHoppingEnabledTransformPrecoding", "enabled"); - } - if (pusch_time_domain_alloc_list.size() > 0) { - j.start_array("pusch-TimeDomainAllocationList"); - for (const auto& e1 : pusch_time_domain_alloc_list) { - e1.to_json(j); - } - j.end_array(); - } - if (msg3_delta_preamb_present) { - j.write_int("msg3-DeltaPreamble", msg3_delta_preamb); - } - if (p0_nominal_with_grant_present) { - j.write_int("p0-NominalWithGrant", p0_nominal_with_grant); - } - j.end_obj(); -} - -// PagingCycle ::= ENUMERATED -const char* paging_cycle_opts::to_string() const -{ - static const char* names[] = {"rf32", "rf64", "rf128", "rf256"}; - return convert_enum_idx(names, 4, value, "paging_cycle_e"); -} -uint16_t paging_cycle_opts::to_number() const -{ - static const uint16_t numbers[] = {32, 64, 128, 256}; - return map_enum_number(numbers, 4, value, "paging_cycle_e"); -} - -// SCS-SpecificCarrier ::= SEQUENCE -SRSASN_CODE scs_specific_carrier_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, offset_to_carrier, (uint16_t)0u, (uint16_t)2199u)); - HANDLE_CODE(subcarrier_spacing.pack(bref)); - HANDLE_CODE(pack_integer(bref, carrier_bw, (uint16_t)1u, (uint16_t)275u)); - - if (ext) { - ext_groups_packer_guard group_flags; - 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_present, 1)); - if (tx_direct_current_location_present) { - HANDLE_CODE(pack_integer(bref, tx_direct_current_location, (uint16_t)0u, (uint16_t)4095u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE scs_specific_carrier_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(offset_to_carrier, bref, (uint16_t)0u, (uint16_t)2199u)); - HANDLE_CODE(subcarrier_spacing.unpack(bref)); - HANDLE_CODE(unpack_integer(carrier_bw, bref, (uint16_t)1u, (uint16_t)275u)); - - 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(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)); - } - } - } - return SRSASN_SUCCESS; -} -void scs_specific_carrier_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("offsetToCarrier", offset_to_carrier); - j.write_str("subcarrierSpacing", subcarrier_spacing.to_string()); - j.write_int("carrierBandwidth", carrier_bw); - if (ext) { - if (tx_direct_current_location_present) { - j.write_int("txDirectCurrentLocation", tx_direct_current_location); - } - } - j.end_obj(); -} - -// SubgroupConfig-r17 ::= SEQUENCE -SRSASN_CODE subgroup_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(subgroups_num_for_ue_id_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, subgroups_num_per_po_r17, (uint8_t)1u, (uint8_t)8u)); - if (subgroups_num_for_ue_id_r17_present) { - HANDLE_CODE(pack_integer(bref, subgroups_num_for_ue_id_r17, (uint8_t)1u, (uint8_t)8u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE subgroup_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(subgroups_num_for_ue_id_r17_present, 1)); - - HANDLE_CODE(unpack_integer(subgroups_num_per_po_r17, bref, (uint8_t)1u, (uint8_t)8u)); - if (subgroups_num_for_ue_id_r17_present) { - HANDLE_CODE(unpack_integer(subgroups_num_for_ue_id_r17, bref, (uint8_t)1u, (uint8_t)8u)); - } - - return SRSASN_SUCCESS; -} -void subgroup_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("subgroupsNumPerPO-r17", subgroups_num_per_po_r17); - if (subgroups_num_for_ue_id_r17_present) { - j.write_int("subgroupsNumForUEID-r17", subgroups_num_for_ue_id_r17); - } - j.end_obj(); -} - -// BCCH-Config ::= SEQUENCE -SRSASN_CODE bcch_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(mod_period_coeff.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE bcch_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(mod_period_coeff.unpack(bref)); - - return SRSASN_SUCCESS; -} -void bcch_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("modificationPeriodCoeff", mod_period_coeff.to_string()); - j.end_obj(); -} - -const char* bcch_cfg_s::mod_period_coeff_opts::to_string() const -{ - static const char* names[] = {"n2", "n4", "n8", "n16"}; - return convert_enum_idx(names, 4, value, "bcch_cfg_s::mod_period_coeff_e_"); -} -uint8_t bcch_cfg_s::mod_period_coeff_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 8, 16}; - return map_enum_number(numbers, 4, value, "bcch_cfg_s::mod_period_coeff_e_"); -} - -// BWP-DownlinkCommon ::= SEQUENCE -SRSASN_CODE bwp_dl_common_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pdcch_cfg_common_present, 1)); - HANDLE_CODE(bref.pack(pdsch_cfg_common_present, 1)); - - HANDLE_CODE(generic_params.pack(bref)); - if (pdcch_cfg_common_present) { - HANDLE_CODE(pdcch_cfg_common.pack(bref)); - } - if (pdsch_cfg_common_present) { - HANDLE_CODE(pdsch_cfg_common.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE bwp_dl_common_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pdcch_cfg_common_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_cfg_common_present, 1)); - - HANDLE_CODE(generic_params.unpack(bref)); - if (pdcch_cfg_common_present) { - HANDLE_CODE(pdcch_cfg_common.unpack(bref)); - } - if (pdsch_cfg_common_present) { - HANDLE_CODE(pdsch_cfg_common.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void bwp_dl_common_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("genericParameters"); - generic_params.to_json(j); - if (pdcch_cfg_common_present) { - j.write_fieldname("pdcch-ConfigCommon"); - pdcch_cfg_common.to_json(j); - } - if (pdsch_cfg_common_present) { - j.write_fieldname("pdsch-ConfigCommon"); - pdsch_cfg_common.to_json(j); - } - j.end_obj(); -} - -// BWP-UplinkCommon ::= SEQUENCE -SRSASN_CODE bwp_ul_common_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(rach_cfg_common_present, 1)); - HANDLE_CODE(bref.pack(pusch_cfg_common_present, 1)); - HANDLE_CODE(bref.pack(pucch_cfg_common_present, 1)); - - HANDLE_CODE(generic_params.pack(bref)); - if (rach_cfg_common_present) { - HANDLE_CODE(rach_cfg_common.pack(bref)); - } - if (pusch_cfg_common_present) { - HANDLE_CODE(pusch_cfg_common.pack(bref)); - } - if (pucch_cfg_common_present) { - HANDLE_CODE(pucch_cfg_common.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= rach_cfg_common_iab_r16.is_present(); - group_flags[0] |= use_interlace_pucch_pusch_r16_present; - group_flags[0] |= msg_a_cfg_common_r16.is_present(); - group_flags[1] |= enable_ra_prioritization_for_slicing_r17_present; - group_flags[1] |= add_rach_cfg_list_r17.is_present(); - group_flags[1] |= rsrp_thres_msg3_r17_present; - group_flags[1] |= nof_msg3_repeats_list_r17.is_present(); - group_flags[1] |= mcs_msg3_repeats_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(rach_cfg_common_iab_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(use_interlace_pucch_pusch_r16_present, 1)); - HANDLE_CODE(bref.pack(msg_a_cfg_common_r16.is_present(), 1)); - if (rach_cfg_common_iab_r16.is_present()) { - HANDLE_CODE(rach_cfg_common_iab_r16->pack(bref)); - } - if (msg_a_cfg_common_r16.is_present()) { - HANDLE_CODE(msg_a_cfg_common_r16->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(enable_ra_prioritization_for_slicing_r17_present, 1)); - HANDLE_CODE(bref.pack(add_rach_cfg_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(rsrp_thres_msg3_r17_present, 1)); - HANDLE_CODE(bref.pack(nof_msg3_repeats_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(mcs_msg3_repeats_r17.is_present(), 1)); - if (enable_ra_prioritization_for_slicing_r17_present) { - HANDLE_CODE(bref.pack(enable_ra_prioritization_for_slicing_r17, 1)); - } - if (add_rach_cfg_list_r17.is_present()) { - HANDLE_CODE(add_rach_cfg_list_r17->pack(bref)); - } - if (rsrp_thres_msg3_r17_present) { - HANDLE_CODE(pack_integer(bref, rsrp_thres_msg3_r17, (uint8_t)0u, (uint8_t)127u)); - } - if (nof_msg3_repeats_list_r17.is_present()) { - HANDLE_CODE(pack_fixed_seq_of(bref, *nof_msg3_repeats_list_r17, nof_msg3_repeats_list_r17->size())); - } - if (mcs_msg3_repeats_r17.is_present()) { - HANDLE_CODE(pack_fixed_seq_of( - bref, *mcs_msg3_repeats_r17, mcs_msg3_repeats_r17->size(), integer_packer(0, 31))); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE bwp_ul_common_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(rach_cfg_common_present, 1)); - HANDLE_CODE(bref.unpack(pusch_cfg_common_present, 1)); - HANDLE_CODE(bref.unpack(pucch_cfg_common_present, 1)); - - HANDLE_CODE(generic_params.unpack(bref)); - if (rach_cfg_common_present) { - HANDLE_CODE(rach_cfg_common.unpack(bref)); - } - if (pusch_cfg_common_present) { - HANDLE_CODE(pusch_cfg_common.unpack(bref)); - } - if (pucch_cfg_common_present) { - HANDLE_CODE(pucch_cfg_common.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); - - unpack_presence_flag(rach_cfg_common_iab_r16, bref); - HANDLE_CODE(bref.unpack(use_interlace_pucch_pusch_r16_present, 1)); - unpack_presence_flag(msg_a_cfg_common_r16, bref); - if (rach_cfg_common_iab_r16.is_present()) { - HANDLE_CODE(rach_cfg_common_iab_r16->unpack(bref)); - } - if (msg_a_cfg_common_r16.is_present()) { - HANDLE_CODE(msg_a_cfg_common_r16->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(enable_ra_prioritization_for_slicing_r17_present, 1)); - unpack_presence_flag(add_rach_cfg_list_r17, bref); - HANDLE_CODE(bref.unpack(rsrp_thres_msg3_r17_present, 1)); - unpack_presence_flag(nof_msg3_repeats_list_r17, bref); - unpack_presence_flag(mcs_msg3_repeats_r17, bref); - if (enable_ra_prioritization_for_slicing_r17_present) { - HANDLE_CODE(bref.unpack(enable_ra_prioritization_for_slicing_r17, 1)); - } - if (add_rach_cfg_list_r17.is_present()) { - HANDLE_CODE(add_rach_cfg_list_r17->unpack(bref)); - } - if (rsrp_thres_msg3_r17_present) { - HANDLE_CODE(unpack_integer(rsrp_thres_msg3_r17, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (nof_msg3_repeats_list_r17.is_present()) { - HANDLE_CODE(unpack_fixed_seq_of(*nof_msg3_repeats_list_r17, bref, nof_msg3_repeats_list_r17->size())); - } - if (mcs_msg3_repeats_r17.is_present()) { - HANDLE_CODE(unpack_fixed_seq_of( - *mcs_msg3_repeats_r17, bref, mcs_msg3_repeats_r17->size(), integer_packer(0, 31))); - } - } - } - return SRSASN_SUCCESS; -} -void bwp_ul_common_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("genericParameters"); - generic_params.to_json(j); - if (rach_cfg_common_present) { - j.write_fieldname("rach-ConfigCommon"); - rach_cfg_common.to_json(j); - } - if (pusch_cfg_common_present) { - j.write_fieldname("pusch-ConfigCommon"); - pusch_cfg_common.to_json(j); - } - if (pucch_cfg_common_present) { - j.write_fieldname("pucch-ConfigCommon"); - pucch_cfg_common.to_json(j); - } - if (ext) { - if (rach_cfg_common_iab_r16.is_present()) { - j.write_fieldname("rach-ConfigCommonIAB-r16"); - rach_cfg_common_iab_r16->to_json(j); - } - if (use_interlace_pucch_pusch_r16_present) { - j.write_str("useInterlacePUCCH-PUSCH-r16", "enabled"); - } - if (msg_a_cfg_common_r16.is_present()) { - j.write_fieldname("msgA-ConfigCommon-r16"); - msg_a_cfg_common_r16->to_json(j); - } - if (enable_ra_prioritization_for_slicing_r17_present) { - j.write_bool("enableRA-PrioritizationForSlicing-r17", enable_ra_prioritization_for_slicing_r17); - } - if (add_rach_cfg_list_r17.is_present()) { - j.write_fieldname("additionalRACH-ConfigList-r17"); - add_rach_cfg_list_r17->to_json(j); - } - if (rsrp_thres_msg3_r17_present) { - j.write_int("rsrp-ThresholdMsg3-r17", rsrp_thres_msg3_r17); - } - if (nof_msg3_repeats_list_r17.is_present()) { - j.start_array("numberOfMsg3-RepetitionsList-r17"); - for (const auto& e1 : *nof_msg3_repeats_list_r17) { - j.write_str(e1.to_string()); - } - j.end_array(); - } - if (mcs_msg3_repeats_r17.is_present()) { - j.start_array("mcs-Msg3-Repetitions-r17"); - for (const auto& e1 : *mcs_msg3_repeats_r17) { - j.write_int(e1); - } - j.end_array(); - } - } - j.end_obj(); -} - -// FrequencyInfoDL-SIB ::= SEQUENCE -SRSASN_CODE freq_info_dl_sib_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8)); - HANDLE_CODE(pack_integer(bref, offset_to_point_a, (uint16_t)0u, (uint16_t)2199u)); - HANDLE_CODE(pack_dyn_seq_of(bref, scs_specific_carrier_list, 1, 5)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE freq_info_dl_sib_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8)); - HANDLE_CODE(unpack_integer(offset_to_point_a, bref, (uint16_t)0u, (uint16_t)2199u)); - HANDLE_CODE(unpack_dyn_seq_of(scs_specific_carrier_list, bref, 1, 5)); - - return SRSASN_SUCCESS; -} -void freq_info_dl_sib_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("frequencyBandList"); - for (const auto& e1 : freq_band_list) { - e1.to_json(j); - } - j.end_array(); - j.write_int("offsetToPointA", offset_to_point_a); - j.start_array("scs-SpecificCarrierList"); - for (const auto& e1 : scs_specific_carrier_list) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// FrequencyInfoUL-SIB ::= SEQUENCE -SRSASN_CODE freq_info_ul_sib_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(freq_band_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(absolute_freq_point_a_present, 1)); - HANDLE_CODE(bref.pack(p_max_present, 1)); - HANDLE_CODE(bref.pack(freq_shift7p5khz_present, 1)); - - if (freq_band_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8)); - } - 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 (p_max_present) { - HANDLE_CODE(pack_integer(bref, p_max, (int8_t)-30, (int8_t)33)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE freq_info_ul_sib_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool freq_band_list_present; - HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); - HANDLE_CODE(bref.unpack(absolute_freq_point_a_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)); - } - 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 (p_max_present) { - HANDLE_CODE(unpack_integer(p_max, bref, (int8_t)-30, (int8_t)33)); - } - - return SRSASN_SUCCESS; -} -void freq_info_ul_sib_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (freq_band_list.size() > 0) { - j.start_array("frequencyBandList"); - for (const auto& e1 : freq_band_list) { - e1.to_json(j); - } - 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 (p_max_present) { - j.write_int("p-Max", p_max); - } - if (freq_shift7p5khz_present) { - j.write_str("frequencyShift7p5khz", "true"); - } - j.end_obj(); -} - -// PCCH-Config ::= SEQUENCE -SRSASN_CODE pcch_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(first_pdcch_monitoring_occasion_of_po_present, 1)); - - HANDLE_CODE(default_paging_cycle.pack(bref)); - HANDLE_CODE(nand_paging_frame_offset.pack(bref)); - HANDLE_CODE(ns.pack(bref)); - if (first_pdcch_monitoring_occasion_of_po_present) { - HANDLE_CODE(first_pdcch_monitoring_occasion_of_po.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present; - group_flags[1] |= ran_paging_in_idle_po_r17_present; - group_flags[1] |= first_pdcch_monitoring_occasion_of_po_v1710.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present, 1)); - if (nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present) { - HANDLE_CODE(pack_integer(bref, nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16, (uint8_t)2u, (uint8_t)4u)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ran_paging_in_idle_po_r17_present, 1)); - HANDLE_CODE(bref.pack(first_pdcch_monitoring_occasion_of_po_v1710.is_present(), 1)); - if (first_pdcch_monitoring_occasion_of_po_v1710.is_present()) { - HANDLE_CODE(first_pdcch_monitoring_occasion_of_po_v1710->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pcch_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(first_pdcch_monitoring_occasion_of_po_present, 1)); - - HANDLE_CODE(default_paging_cycle.unpack(bref)); - HANDLE_CODE(nand_paging_frame_offset.unpack(bref)); - HANDLE_CODE(ns.unpack(bref)); - if (first_pdcch_monitoring_occasion_of_po_present) { - HANDLE_CODE(first_pdcch_monitoring_occasion_of_po.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(nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present, 1)); - if (nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present) { - HANDLE_CODE(unpack_integer(nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16, bref, (uint8_t)2u, (uint8_t)4u)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(ran_paging_in_idle_po_r17_present, 1)); - unpack_presence_flag(first_pdcch_monitoring_occasion_of_po_v1710, bref); - if (first_pdcch_monitoring_occasion_of_po_v1710.is_present()) { - HANDLE_CODE(first_pdcch_monitoring_occasion_of_po_v1710->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void pcch_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("defaultPagingCycle", default_paging_cycle.to_string()); - j.write_fieldname("nAndPagingFrameOffset"); - nand_paging_frame_offset.to_json(j); - j.write_str("ns", ns.to_string()); - if (first_pdcch_monitoring_occasion_of_po_present) { - j.write_fieldname("firstPDCCH-MonitoringOccasionOfPO"); - first_pdcch_monitoring_occasion_of_po.to_json(j); - } - if (ext) { - if (nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16_present) { - j.write_int("nrofPDCCH-MonitoringOccasionPerSSB-InPO-r16", nrof_pdcch_monitoring_occasion_per_ssb_in_po_r16); - } - if (ran_paging_in_idle_po_r17_present) { - j.write_str("ranPagingInIdlePO-r17", "true"); - } - if (first_pdcch_monitoring_occasion_of_po_v1710.is_present()) { - j.write_fieldname("firstPDCCH-MonitoringOccasionOfPO-v1710"); - first_pdcch_monitoring_occasion_of_po_v1710->to_json(j); - } - } - j.end_obj(); -} - -void pcch_cfg_s::nand_paging_frame_offset_c_::destroy_() {} -void pcch_cfg_s::nand_paging_frame_offset_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -pcch_cfg_s::nand_paging_frame_offset_c_::nand_paging_frame_offset_c_( - const pcch_cfg_s::nand_paging_frame_offset_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::one_t: - break; - case types::half_t: - c.init(other.c.get()); - break; - case types::quarter_t: - c.init(other.c.get()); - break; - case types::one_eighth_t: - c.init(other.c.get()); - break; - case types::one_sixteenth_t: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - 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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::one_t: - break; - case types::half_t: - c.set(other.c.get()); - break; - case types::quarter_t: - c.set(other.c.get()); - break; - case types::one_eighth_t: - c.set(other.c.get()); - break; - case types::one_sixteenth_t: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::nand_paging_frame_offset_c_"); - } - - return *this; -} -void pcch_cfg_s::nand_paging_frame_offset_c_::set_one_t() -{ - set(types::one_t); -} -uint8_t& pcch_cfg_s::nand_paging_frame_offset_c_::set_half_t() -{ - set(types::half_t); - return c.get(); -} -uint8_t& pcch_cfg_s::nand_paging_frame_offset_c_::set_quarter_t() -{ - set(types::quarter_t); - return c.get(); -} -uint8_t& pcch_cfg_s::nand_paging_frame_offset_c_::set_one_eighth_t() -{ - set(types::one_eighth_t); - return c.get(); -} -uint8_t& pcch_cfg_s::nand_paging_frame_offset_c_::set_one_sixteenth_t() -{ - set(types::one_sixteenth_t); - return c.get(); -} -void pcch_cfg_s::nand_paging_frame_offset_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::one_t: - break; - case types::half_t: - j.write_int("halfT", c.get()); - break; - case types::quarter_t: - j.write_int("quarterT", c.get()); - break; - case types::one_eighth_t: - j.write_int("oneEighthT", c.get()); - break; - case types::one_sixteenth_t: - j.write_int("oneSixteenthT", c.get()); - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::nand_paging_frame_offset_c_"); - } - j.end_obj(); -} -SRSASN_CODE pcch_cfg_s::nand_paging_frame_offset_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::one_t: - break; - case types::half_t: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)1u)); - break; - case types::quarter_t: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); - break; - case types::one_eighth_t: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); - break; - case types::one_sixteenth_t: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::nand_paging_frame_offset_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pcch_cfg_s::nand_paging_frame_offset_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::one_t: - break; - case types::half_t: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)1u)); - break; - case types::quarter_t: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); - break; - case types::one_eighth_t: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); - break; - case types::one_sixteenth_t: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::nand_paging_frame_offset_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* pcch_cfg_s::ns_opts::to_string() const -{ - static const char* names[] = {"four", "two", "one"}; - return convert_enum_idx(names, 3, value, "pcch_cfg_s::ns_e_"); -} -uint8_t pcch_cfg_s::ns_opts::to_number() const -{ - static const uint8_t numbers[] = {4, 2, 1}; - return map_enum_number(numbers, 3, value, "pcch_cfg_s::ns_e_"); -} - -void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::destroy_() -{ - switch (type_) { - case types::scs15_kh_zone_t: - c.destroy(); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - c.destroy(); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - c.destroy(); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - c.destroy(); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - c.destroy(); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - c.destroy(); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - c.destroy(); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - c.destroy(); - break; - default: - break; - } -} -void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::scs15_kh_zone_t: - c.init(); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - c.init(); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - c.init(); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - c.init(); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - c.init(); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - c.init(); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - c.init(); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - c.init(); - break; - case types::nulltype: - break; - default: - 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_::first_pdcch_monitoring_occasion_of_po_c_( - const pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::scs15_kh_zone_t: - c.init(other.c.get()); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - c.init(other.c.get()); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - c.init(other.c.get()); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - c.init(other.c.get()); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - 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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::scs15_kh_zone_t: - c.set(other.c.get()); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - c.set(other.c.get()); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - c.set(other.c.get()); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - c.set(other.c.get()); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_"); - } - - return *this; -} -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::scs15_kh_zone_t_l_& -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs15_kh_zone_t() -{ - set(types::scs15_kh_zone_t); - return c.get(); -} -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::scs30_kh_zone_t_scs15_kh_zhalf_t_l_& -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs30_kh_zone_t_scs15_kh_zhalf_t() -{ - set(types::scs30_kh_zone_t_scs15_kh_zhalf_t); - return c.get(); -} -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() -{ - set(types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t); - return c.get(); -} -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: - scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& - pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: - set_scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() -{ - set(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t); - return c.get(); -} -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: - scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& - pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: - set_scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() -{ - set(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t); - return c.get(); -} -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: - scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& - pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: - set_scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() -{ - set(types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t); - return c.get(); -} -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: - scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& - pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: - set_scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() -{ - set(types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t); - return c.get(); -} -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t() -{ - set(types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t); - return c.get(); -} -void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::scs15_kh_zone_t: - j.start_array("sCS15KHZoneT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - j.start_array("sCS30KHZoneT-SCS15KHZhalfT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - j.start_array("sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - j.start_array("sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - j.start_array("sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT"); - for (const auto& e1 : - c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - j.start_array("sCS480KHZoneT-SCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT"); - for (const auto& e1 : - c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - j.start_array("sCS480KHZhalfT-SCS120KHZoneEighthT-SCS60KHZoneSixteenthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - j.start_array("sCS480KHZquarterT-SCS120KHZoneSixteenthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_"); - } - j.end_obj(); -} -SRSASN_CODE pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::scs15_kh_zone_t: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 139))); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - HANDLE_CODE( - pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 279))); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - HANDLE_CODE(pack_dyn_seq_of(bref, - c.get(), - 1, - 4, - integer_packer(0, 559))); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - HANDLE_CODE( - pack_dyn_seq_of(bref, - c.get(), - 1, - 4, - integer_packer(0, 1119))); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - HANDLE_CODE(pack_dyn_seq_of( - bref, - c.get(), - 1, - 4, - integer_packer(0, 2239))); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - HANDLE_CODE(pack_dyn_seq_of( - bref, - c.get(), - 1, - 4, - integer_packer(0, 4479))); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - HANDLE_CODE(pack_dyn_seq_of(bref, - c.get(), - 1, - 4, - integer_packer(0, 8959))); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - HANDLE_CODE(pack_dyn_seq_of( - bref, c.get(), 1, 4, integer_packer(0, 17919))); - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::scs15_kh_zone_t: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 139))); - break; - case types::scs30_kh_zone_t_scs15_kh_zhalf_t: - HANDLE_CODE(unpack_dyn_seq_of( - c.get(), bref, 1, 4, integer_packer(0, 279))); - break; - case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), - bref, - 1, - 4, - integer_packer(0, 559))); - break; - case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: - HANDLE_CODE( - unpack_dyn_seq_of(c.get(), - bref, - 1, - 4, - integer_packer(0, 1119))); - break; - case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: - HANDLE_CODE(unpack_dyn_seq_of( - c.get(), - bref, - 1, - 4, - integer_packer(0, 2239))); - break; - case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: - HANDLE_CODE(unpack_dyn_seq_of( - c.get(), - bref, - 1, - 4, - integer_packer(0, 4479))); - break; - case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), - bref, - 1, - 4, - integer_packer(0, 8959))); - break; - case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: - HANDLE_CODE(unpack_dyn_seq_of( - c.get(), bref, 1, 4, integer_packer(0, 17919))); - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::destroy_() -{ - switch (type_) { - case types::scs480_kh_zone_eighth_t: - c.destroy(); - break; - case types::scs480_kh_zone_sixteenth_t: - c.destroy(); - break; - default: - break; - } -} -void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::scs480_kh_zone_eighth_t: - c.init(); - break; - case types::scs480_kh_zone_sixteenth_t: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); - } -} -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::first_pdcch_monitoring_occasion_of_po_v1710_c_( - const pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::scs480_kh_zone_eighth_t: - c.init(other.c.get()); - break; - case types::scs480_kh_zone_sixteenth_t: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); - } -} -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_& -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::operator=( - const pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::scs480_kh_zone_eighth_t: - c.set(other.c.get()); - break; - case types::scs480_kh_zone_sixteenth_t: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); - } - - return *this; -} -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::scs480_kh_zone_eighth_t_l_& -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::set_scs480_kh_zone_eighth_t() -{ - set(types::scs480_kh_zone_eighth_t); - return c.get(); -} -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::scs480_kh_zone_sixteenth_t_l_& -pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::set_scs480_kh_zone_sixteenth_t() -{ - set(types::scs480_kh_zone_sixteenth_t); - return c.get(); -} -void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::scs480_kh_zone_eighth_t: - j.start_array("sCS480KHZoneEighthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - case types::scs480_kh_zone_sixteenth_t: - j.start_array("sCS480KHZoneSixteenthT"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); - } - j.end_obj(); -} -SRSASN_CODE pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::scs480_kh_zone_eighth_t: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 35839))); - break; - case types::scs480_kh_zone_sixteenth_t: - HANDLE_CODE( - pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 71679))); - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::scs480_kh_zone_eighth_t: - HANDLE_CODE( - unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 35839))); - break; - case types::scs480_kh_zone_sixteenth_t: - HANDLE_CODE( - unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 71679))); - break; - default: - log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// PEI-Config-r17 ::= SEQUENCE -SRSASN_CODE pei_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(last_used_cell_only_r17_present, 1)); - - HANDLE_CODE(po_num_per_pei_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, payload_size_dci_2_7_r17, (uint8_t)1u, (uint8_t)43u)); - HANDLE_CODE(pack_integer(bref, pei_frame_offset_r17, (uint8_t)0u, (uint8_t)16u)); - HANDLE_CODE(subgroup_cfg_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pei_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(last_used_cell_only_r17_present, 1)); - - HANDLE_CODE(po_num_per_pei_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(payload_size_dci_2_7_r17, bref, (uint8_t)1u, (uint8_t)43u)); - HANDLE_CODE(unpack_integer(pei_frame_offset_r17, bref, (uint8_t)0u, (uint8_t)16u)); - HANDLE_CODE(subgroup_cfg_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void pei_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("po-NumPerPEI-r17", po_num_per_pei_r17.to_string()); - j.write_int("payloadSizeDCI-2-7-r17", payload_size_dci_2_7_r17); - j.write_int("pei-FrameOffset-r17", pei_frame_offset_r17); - j.write_fieldname("subgroupConfig-r17"); - subgroup_cfg_r17.to_json(j); - if (last_used_cell_only_r17_present) { - j.write_str("lastUsedCellOnly-r17", "true"); - } - j.end_obj(); -} - -const char* pei_cfg_r17_s::po_num_per_pei_r17_opts::to_string() const -{ - static const char* names[] = {"po1", "po2", "po4", "po8"}; - return convert_enum_idx(names, 4, value, "pei_cfg_r17_s::po_num_per_pei_r17_e_"); -} -uint8_t pei_cfg_r17_s::po_num_per_pei_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "pei_cfg_r17_s::po_num_per_pei_r17_e_"); -} - -// TDD-UL-DL-Pattern ::= SEQUENCE -SRSASN_CODE tdd_ul_dl_pattern_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(dl_ul_tx_periodicity.pack(bref)); - HANDLE_CODE(pack_integer(bref, nrof_dl_slots, (uint16_t)0u, (uint16_t)320u)); - HANDLE_CODE(pack_integer(bref, nrof_dl_symbols, (uint8_t)0u, (uint8_t)13u)); - HANDLE_CODE(pack_integer(bref, nrof_ul_slots, (uint16_t)0u, (uint16_t)320u)); - HANDLE_CODE(pack_integer(bref, nrof_ul_symbols, (uint8_t)0u, (uint8_t)13u)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= dl_ul_tx_periodicity_v1530_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(dl_ul_tx_periodicity_v1530_present, 1)); - if (dl_ul_tx_periodicity_v1530_present) { - HANDLE_CODE(dl_ul_tx_periodicity_v1530.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE tdd_ul_dl_pattern_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(dl_ul_tx_periodicity.unpack(bref)); - HANDLE_CODE(unpack_integer(nrof_dl_slots, bref, (uint16_t)0u, (uint16_t)320u)); - HANDLE_CODE(unpack_integer(nrof_dl_symbols, bref, (uint8_t)0u, (uint8_t)13u)); - HANDLE_CODE(unpack_integer(nrof_ul_slots, bref, (uint16_t)0u, (uint16_t)320u)); - HANDLE_CODE(unpack_integer(nrof_ul_symbols, bref, (uint8_t)0u, (uint8_t)13u)); - - 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(dl_ul_tx_periodicity_v1530_present, 1)); - if (dl_ul_tx_periodicity_v1530_present) { - HANDLE_CODE(dl_ul_tx_periodicity_v1530.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void tdd_ul_dl_pattern_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("dl-UL-TransmissionPeriodicity", dl_ul_tx_periodicity.to_string()); - j.write_int("nrofDownlinkSlots", nrof_dl_slots); - j.write_int("nrofDownlinkSymbols", nrof_dl_symbols); - j.write_int("nrofUplinkSlots", nrof_ul_slots); - j.write_int("nrofUplinkSymbols", nrof_ul_symbols); - if (ext) { - if (dl_ul_tx_periodicity_v1530_present) { - j.write_str("dl-UL-TransmissionPeriodicity-v1530", dl_ul_tx_periodicity_v1530.to_string()); - } - } - j.end_obj(); -} - -const char* tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_opts::to_string() const -{ - static const char* names[] = {"ms0p5", "ms0p625", "ms1", "ms1p25", "ms2", "ms2p5", "ms5", "ms10"}; - return convert_enum_idx(names, 8, value, "tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_e_"); -} - -const char* tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_opts::to_string() const -{ - static const char* names[] = {"ms3", "ms4"}; - return convert_enum_idx(names, 2, value, "tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_e_"); -} -uint8_t tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_opts::to_number() const -{ - static const uint8_t numbers[] = {3, 4}; - return map_enum_number(numbers, 2, value, "tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_e_"); -} - -// TimeAlignmentTimer ::= ENUMERATED -const char* time_align_timer_opts::to_string() const -{ - static const char* names[] = {"ms500", "ms750", "ms1280", "ms1920", "ms2560", "ms5120", "ms10240", "infinity"}; - return convert_enum_idx(names, 8, value, "time_align_timer_e"); -} -int16_t time_align_timer_opts::to_number() const -{ - static const int16_t numbers[] = {500, 750, 1280, 1920, 2560, 5120, 10240, -1}; - return map_enum_number(numbers, 8, value, "time_align_timer_e"); -} - -// DownlinkConfigCommonSIB ::= SEQUENCE -SRSASN_CODE dl_cfg_common_sib_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(freq_info_dl.pack(bref)); - HANDLE_CODE(init_dl_bwp.pack(bref)); - HANDLE_CODE(bcch_cfg.pack(bref)); - HANDLE_CODE(pcch_cfg.pack(bref)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= pei_cfg_r17.is_present(); - group_flags[0] |= init_dl_bwp_red_cap_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(pei_cfg_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(init_dl_bwp_red_cap_r17.is_present(), 1)); - if (pei_cfg_r17.is_present()) { - HANDLE_CODE(pei_cfg_r17->pack(bref)); - } - if (init_dl_bwp_red_cap_r17.is_present()) { - HANDLE_CODE(init_dl_bwp_red_cap_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_cfg_common_sib_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(freq_info_dl.unpack(bref)); - HANDLE_CODE(init_dl_bwp.unpack(bref)); - HANDLE_CODE(bcch_cfg.unpack(bref)); - HANDLE_CODE(pcch_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); - - unpack_presence_flag(pei_cfg_r17, bref); - unpack_presence_flag(init_dl_bwp_red_cap_r17, bref); - if (pei_cfg_r17.is_present()) { - HANDLE_CODE(pei_cfg_r17->unpack(bref)); - } - if (init_dl_bwp_red_cap_r17.is_present()) { - HANDLE_CODE(init_dl_bwp_red_cap_r17->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void dl_cfg_common_sib_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("frequencyInfoDL"); - freq_info_dl.to_json(j); - j.write_fieldname("initialDownlinkBWP"); - init_dl_bwp.to_json(j); - j.write_fieldname("bcch-Config"); - bcch_cfg.to_json(j); - j.write_fieldname("pcch-Config"); - pcch_cfg.to_json(j); - if (ext) { - if (pei_cfg_r17.is_present()) { - j.write_fieldname("pei-Config-r17"); - pei_cfg_r17->to_json(j); - } - if (init_dl_bwp_red_cap_r17.is_present()) { - j.write_fieldname("initialDownlinkBWP-RedCap-r17"); - init_dl_bwp_red_cap_r17->to_json(j); - } - } - j.end_obj(); -} - -// HighSpeedConfig-r16 ::= SEQUENCE -SRSASN_CODE high_speed_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(high_speed_meas_flag_r16_present, 1)); - HANDLE_CODE(bref.pack(high_speed_demod_flag_r16_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE high_speed_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(high_speed_meas_flag_r16_present, 1)); - HANDLE_CODE(bref.unpack(high_speed_demod_flag_r16_present, 1)); - - return SRSASN_SUCCESS; -} -void high_speed_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (high_speed_meas_flag_r16_present) { - j.write_str("highSpeedMeasFlag-r16", "true"); - } - if (high_speed_demod_flag_r16_present) { - j.write_str("highSpeedDemodFlag-r16", "true"); - } - j.end_obj(); -} - -// HighSpeedConfigFR2-r17 ::= SEQUENCE -SRSASN_CODE high_speed_cfg_fr2_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(high_speed_meas_flag_fr2_r17_present, 1)); - HANDLE_CODE(bref.pack(high_speed_deployment_type_fr2_r17_present, 1)); - HANDLE_CODE(bref.pack(high_speed_large_one_step_ul_timing_fr2_r17_present, 1)); - - if (high_speed_meas_flag_fr2_r17_present) { - HANDLE_CODE(high_speed_meas_flag_fr2_r17.pack(bref)); - } - if (high_speed_deployment_type_fr2_r17_present) { - HANDLE_CODE(high_speed_deployment_type_fr2_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE high_speed_cfg_fr2_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(high_speed_meas_flag_fr2_r17_present, 1)); - HANDLE_CODE(bref.unpack(high_speed_deployment_type_fr2_r17_present, 1)); - HANDLE_CODE(bref.unpack(high_speed_large_one_step_ul_timing_fr2_r17_present, 1)); - - if (high_speed_meas_flag_fr2_r17_present) { - HANDLE_CODE(high_speed_meas_flag_fr2_r17.unpack(bref)); - } - if (high_speed_deployment_type_fr2_r17_present) { - HANDLE_CODE(high_speed_deployment_type_fr2_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void high_speed_cfg_fr2_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (high_speed_meas_flag_fr2_r17_present) { - j.write_str("highSpeedMeasFlagFR2-r17", high_speed_meas_flag_fr2_r17.to_string()); - } - if (high_speed_deployment_type_fr2_r17_present) { - j.write_str("highSpeedDeploymentTypeFR2-r17", high_speed_deployment_type_fr2_r17.to_string()); - } - if (high_speed_large_one_step_ul_timing_fr2_r17_present) { - j.write_str("highSpeedLargeOneStepUL-TimingFR2-r17", "true"); - } - j.end_obj(); -} - -const char* high_speed_cfg_fr2_r17_s::high_speed_meas_flag_fr2_r17_opts::to_string() const -{ - static const char* names[] = {"set1", "set2"}; - return convert_enum_idx(names, 2, value, "high_speed_cfg_fr2_r17_s::high_speed_meas_flag_fr2_r17_e_"); -} -uint8_t high_speed_cfg_fr2_r17_s::high_speed_meas_flag_fr2_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "high_speed_cfg_fr2_r17_s::high_speed_meas_flag_fr2_r17_e_"); -} - -const char* high_speed_cfg_fr2_r17_s::high_speed_deployment_type_fr2_r17_opts::to_string() const -{ - static const char* names[] = {"unidirectional", "bidirectional"}; - return convert_enum_idx(names, 2, value, "high_speed_cfg_fr2_r17_s::high_speed_deployment_type_fr2_r17_e_"); -} - -// SemiStaticChannelAccessConfig-r16 ::= SEQUENCE -SRSASN_CODE semi_static_ch_access_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(period.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE semi_static_ch_access_cfg_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(period.unpack(bref)); - - return SRSASN_SUCCESS; -} -void semi_static_ch_access_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("period", period.to_string()); - j.end_obj(); -} - -const char* semi_static_ch_access_cfg_r16_s::period_opts::to_string() const -{ - static const char* names[] = {"ms1", "ms2", "ms2dot5", "ms4", "ms5", "ms10"}; - return convert_enum_idx(names, 6, value, "semi_static_ch_access_cfg_r16_s::period_e_"); -} -float semi_static_ch_access_cfg_r16_s::period_opts::to_number() const -{ - static const float numbers[] = {1.0, 2.0, 2.5, 4.0, 5.0, 10.0}; - return map_enum_number(numbers, 6, value, "semi_static_ch_access_cfg_r16_s::period_e_"); -} -const char* semi_static_ch_access_cfg_r16_s::period_opts::to_number_string() const -{ - static const char* number_strs[] = {"1", "2", "2.5", "4", "5", "10"}; - return convert_enum_idx(number_strs, 6, value, "semi_static_ch_access_cfg_r16_s::period_e_"); -} - -// TDD-UL-DL-ConfigCommon ::= SEQUENCE -SRSASN_CODE tdd_ul_dl_cfg_common_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pattern2_present, 1)); - - HANDLE_CODE(ref_subcarrier_spacing.pack(bref)); - HANDLE_CODE(pattern1.pack(bref)); - if (pattern2_present) { - HANDLE_CODE(pattern2.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE tdd_ul_dl_cfg_common_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pattern2_present, 1)); - - HANDLE_CODE(ref_subcarrier_spacing.unpack(bref)); - HANDLE_CODE(pattern1.unpack(bref)); - if (pattern2_present) { - HANDLE_CODE(pattern2.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void tdd_ul_dl_cfg_common_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("referenceSubcarrierSpacing", ref_subcarrier_spacing.to_string()); - j.write_fieldname("pattern1"); - pattern1.to_json(j); - if (pattern2_present) { - j.write_fieldname("pattern2"); - pattern2.to_json(j); - } - j.end_obj(); -} - -// UplinkConfigCommonSIB ::= SEQUENCE -SRSASN_CODE ul_cfg_common_sib_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(freq_info_ul.pack(bref)); - HANDLE_CODE(init_ul_bwp.pack(bref)); - HANDLE_CODE(time_align_timer_common.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_cfg_common_sib_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(freq_info_ul.unpack(bref)); - HANDLE_CODE(init_ul_bwp.unpack(bref)); - HANDLE_CODE(time_align_timer_common.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ul_cfg_common_sib_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("frequencyInfoUL"); - freq_info_ul.to_json(j); - j.write_fieldname("initialUplinkBWP"); - init_ul_bwp.to_json(j); - j.write_str("timeAlignmentTimerCommon", time_align_timer_common.to_string()); - j.end_obj(); -} - -// UplinkConfigCommonSIB-v1700 ::= SEQUENCE -SRSASN_CODE ul_cfg_common_sib_v1700_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(init_ul_bwp_red_cap_r17_present, 1)); - - if (init_ul_bwp_red_cap_r17_present) { - HANDLE_CODE(init_ul_bwp_red_cap_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_cfg_common_sib_v1700_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(init_ul_bwp_red_cap_r17_present, 1)); - - if (init_ul_bwp_red_cap_r17_present) { - HANDLE_CODE(init_ul_bwp_red_cap_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ul_cfg_common_sib_v1700_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (init_ul_bwp_red_cap_r17_present) { - j.write_fieldname("initialUplinkBWP-RedCap-r17"); - init_ul_bwp_red_cap_r17.to_json(j); - } - j.end_obj(); -} - -// ServingCellConfigCommonSIB ::= SEQUENCE -SRSASN_CODE serving_cell_cfg_common_sib_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ul_cfg_common_present, 1)); - HANDLE_CODE(bref.pack(supplementary_ul_present, 1)); - HANDLE_CODE(bref.pack(n_timing_advance_offset_present, 1)); - HANDLE_CODE(bref.pack(tdd_ul_dl_cfg_common_present, 1)); - - HANDLE_CODE(dl_cfg_common.pack(bref)); - if (ul_cfg_common_present) { - HANDLE_CODE(ul_cfg_common.pack(bref)); - } - if (supplementary_ul_present) { - HANDLE_CODE(supplementary_ul.pack(bref)); - } - if (n_timing_advance_offset_present) { - HANDLE_CODE(n_timing_advance_offset.pack(bref)); - } - HANDLE_CODE(bref.pack(ssb_positions_in_burst.group_presence_present, 1)); - HANDLE_CODE(ssb_positions_in_burst.in_one_group.pack(bref)); - if (ssb_positions_in_burst.group_presence_present) { - HANDLE_CODE(ssb_positions_in_burst.group_presence.pack(bref)); - } - HANDLE_CODE(ssb_periodicity_serving_cell.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)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= ch_access_mode_r16.is_present(); - group_flags[0] |= discovery_burst_win_len_r16_present; - group_flags[0] |= high_speed_cfg_r16.is_present(); - group_flags[1] |= ch_access_mode2_r17_present; - group_flags[1] |= discovery_burst_win_len_v1700_present; - group_flags[1] |= high_speed_cfg_fr2_r17.is_present(); - group_flags[1] |= ul_cfg_common_v1700.is_present(); - group_flags[2] |= enhanced_meas_leo_r17_present; - group_flags[3] |= ra_ch_access_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ch_access_mode_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(discovery_burst_win_len_r16_present, 1)); - HANDLE_CODE(bref.pack(high_speed_cfg_r16.is_present(), 1)); - if (ch_access_mode_r16.is_present()) { - HANDLE_CODE(ch_access_mode_r16->pack(bref)); - } - if (discovery_burst_win_len_r16_present) { - HANDLE_CODE(discovery_burst_win_len_r16.pack(bref)); - } - if (high_speed_cfg_r16.is_present()) { - HANDLE_CODE(high_speed_cfg_r16->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ch_access_mode2_r17_present, 1)); - HANDLE_CODE(bref.pack(discovery_burst_win_len_v1700_present, 1)); - HANDLE_CODE(bref.pack(high_speed_cfg_fr2_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(ul_cfg_common_v1700.is_present(), 1)); - if (discovery_burst_win_len_v1700_present) { - HANDLE_CODE(discovery_burst_win_len_v1700.pack(bref)); - } - if (high_speed_cfg_fr2_r17.is_present()) { - HANDLE_CODE(high_speed_cfg_fr2_r17->pack(bref)); - } - if (ul_cfg_common_v1700.is_present()) { - HANDLE_CODE(ul_cfg_common_v1700->pack(bref)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(enhanced_meas_leo_r17_present, 1)); - } - if (group_flags[3]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ra_ch_access_r17_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE serving_cell_cfg_common_sib_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ul_cfg_common_present, 1)); - HANDLE_CODE(bref.unpack(supplementary_ul_present, 1)); - HANDLE_CODE(bref.unpack(n_timing_advance_offset_present, 1)); - HANDLE_CODE(bref.unpack(tdd_ul_dl_cfg_common_present, 1)); - - HANDLE_CODE(dl_cfg_common.unpack(bref)); - if (ul_cfg_common_present) { - HANDLE_CODE(ul_cfg_common.unpack(bref)); - } - if (supplementary_ul_present) { - HANDLE_CODE(supplementary_ul.unpack(bref)); - } - if (n_timing_advance_offset_present) { - HANDLE_CODE(n_timing_advance_offset.unpack(bref)); - } - HANDLE_CODE(bref.unpack(ssb_positions_in_burst.group_presence_present, 1)); - HANDLE_CODE(ssb_positions_in_burst.in_one_group.unpack(bref)); - if (ssb_positions_in_burst.group_presence_present) { - HANDLE_CODE(ssb_positions_in_burst.group_presence.unpack(bref)); - } - HANDLE_CODE(ssb_periodicity_serving_cell.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)); - - if (ext) { - ext_groups_unpacker_guard group_flags(4); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(ch_access_mode_r16, bref); - HANDLE_CODE(bref.unpack(discovery_burst_win_len_r16_present, 1)); - unpack_presence_flag(high_speed_cfg_r16, bref); - if (ch_access_mode_r16.is_present()) { - HANDLE_CODE(ch_access_mode_r16->unpack(bref)); - } - if (discovery_burst_win_len_r16_present) { - HANDLE_CODE(discovery_burst_win_len_r16.unpack(bref)); - } - if (high_speed_cfg_r16.is_present()) { - HANDLE_CODE(high_speed_cfg_r16->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(ch_access_mode2_r17_present, 1)); - HANDLE_CODE(bref.unpack(discovery_burst_win_len_v1700_present, 1)); - unpack_presence_flag(high_speed_cfg_fr2_r17, bref); - unpack_presence_flag(ul_cfg_common_v1700, bref); - if (discovery_burst_win_len_v1700_present) { - HANDLE_CODE(discovery_burst_win_len_v1700.unpack(bref)); - } - if (high_speed_cfg_fr2_r17.is_present()) { - HANDLE_CODE(high_speed_cfg_fr2_r17->unpack(bref)); - } - if (ul_cfg_common_v1700.is_present()) { - HANDLE_CODE(ul_cfg_common_v1700->unpack(bref)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(enhanced_meas_leo_r17_present, 1)); - } - if (group_flags[3]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(ra_ch_access_r17_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void serving_cell_cfg_common_sib_s::to_json(json_writer& j) const -{ - j.start_obj(); - 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_present) { - j.write_fieldname("supplementaryUplink"); - supplementary_ul.to_json(j); - } - if (n_timing_advance_offset_present) { - j.write_str("n-TimingAdvanceOffset", n_timing_advance_offset.to_string()); - } - j.write_fieldname("ssb-PositionsInBurst"); - j.start_obj(); - j.write_str("inOneGroup", ssb_positions_in_burst.in_one_group.to_string()); - if (ssb_positions_in_burst.group_presence_present) { - j.write_str("groupPresence", ssb_positions_in_burst.group_presence.to_string()); - } - j.end_obj(); - j.write_str("ssb-PeriodicityServingCell", ssb_periodicity_serving_cell.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); - if (ext) { - if (ch_access_mode_r16.is_present()) { - j.write_fieldname("channelAccessMode-r16"); - ch_access_mode_r16->to_json(j); - } - if (discovery_burst_win_len_r16_present) { - j.write_str("discoveryBurstWindowLength-r16", discovery_burst_win_len_r16.to_string()); - } - if (high_speed_cfg_r16.is_present()) { - j.write_fieldname("highSpeedConfig-r16"); - high_speed_cfg_r16->to_json(j); - } - if (ch_access_mode2_r17_present) { - j.write_str("channelAccessMode2-r17", "enabled"); - } - if (discovery_burst_win_len_v1700_present) { - j.write_str("discoveryBurstWindowLength-v1700", discovery_burst_win_len_v1700.to_string()); - } - if (high_speed_cfg_fr2_r17.is_present()) { - j.write_fieldname("highSpeedConfigFR2-r17"); - high_speed_cfg_fr2_r17->to_json(j); - } - if (ul_cfg_common_v1700.is_present()) { - j.write_fieldname("uplinkConfigCommon-v1700"); - ul_cfg_common_v1700->to_json(j); - } - if (enhanced_meas_leo_r17_present) { - j.write_str("enhancedMeasurementLEO-r17", "true"); - } - if (ra_ch_access_r17_present) { - j.write_str("ra-ChannelAccess-r17", "enabled"); - } - } - j.end_obj(); -} - -const char* serving_cell_cfg_common_sib_s::n_timing_advance_offset_opts::to_string() const -{ - static const char* names[] = {"n0", "n25600", "n39936"}; - return convert_enum_idx(names, 3, value, "serving_cell_cfg_common_sib_s::n_timing_advance_offset_e_"); -} -uint16_t serving_cell_cfg_common_sib_s::n_timing_advance_offset_opts::to_number() const -{ - static const uint16_t numbers[] = {0, 25600, 39936}; - return map_enum_number(numbers, 3, value, "serving_cell_cfg_common_sib_s::n_timing_advance_offset_e_"); -} - -const char* serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_opts::to_string() const -{ - static const char* names[] = {"ms5", "ms10", "ms20", "ms40", "ms80", "ms160"}; - return convert_enum_idx(names, 6, value, "serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_e_"); -} -uint8_t serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_opts::to_number() const -{ - static const uint8_t numbers[] = {5, 10, 20, 40, 80, 160}; - return map_enum_number(numbers, 6, value, "serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_e_"); -} - -void serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::set(types::options e) -{ - type_ = e; -} -void serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::set_dyn() -{ - set(types::dyn); -} -semi_static_ch_access_cfg_r16_s& serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::set_semi_static() -{ - set(types::semi_static); - return c; -} -void serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::dyn: - break; - case types::semi_static: - j.write_fieldname("semiStatic"); - c.to_json(j); - break; - default: - log_invalid_choice_id(type_, "serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::dyn: - break; - case types::semi_static: - HANDLE_CODE(c.pack(bref)); - break; - default: - log_invalid_choice_id(type_, "serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::dyn: - break; - case types::semi_static: - HANDLE_CODE(c.unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* serving_cell_cfg_common_sib_s::discovery_burst_win_len_r16_opts::to_string() const -{ - static const char* names[] = {"ms0dot5", "ms1", "ms2", "ms3", "ms4", "ms5"}; - return convert_enum_idx(names, 6, value, "serving_cell_cfg_common_sib_s::discovery_burst_win_len_r16_e_"); -} -float serving_cell_cfg_common_sib_s::discovery_burst_win_len_r16_opts::to_number() const -{ - static const float numbers[] = {0.5, 1.0, 2.0, 3.0, 4.0, 5.0}; - return map_enum_number(numbers, 6, value, "serving_cell_cfg_common_sib_s::discovery_burst_win_len_r16_e_"); -} -const char* serving_cell_cfg_common_sib_s::discovery_burst_win_len_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.5", "1", "2", "3", "4", "5"}; - return convert_enum_idx(number_strs, 6, value, "serving_cell_cfg_common_sib_s::discovery_burst_win_len_r16_e_"); -} - -const char* serving_cell_cfg_common_sib_s::discovery_burst_win_len_v1700_opts::to_string() const -{ - static const char* names[] = {"ms0dot125", "ms0dot25", "ms0dot5", "ms0dot75", "ms1", "ms1dot25"}; - return convert_enum_idx(names, 6, value, "serving_cell_cfg_common_sib_s::discovery_burst_win_len_v1700_e_"); -} -float serving_cell_cfg_common_sib_s::discovery_burst_win_len_v1700_opts::to_number() const -{ - static const float numbers[] = {0.125, 0.25, 0.5, 0.75, 1.0, 1.25}; - return map_enum_number(numbers, 6, value, "serving_cell_cfg_common_sib_s::discovery_burst_win_len_v1700_e_"); -} -const char* serving_cell_cfg_common_sib_s::discovery_burst_win_len_v1700_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.125", "0.25", "0.5", "0.75", "1", "1.25"}; - return convert_enum_idx(number_strs, 6, value, "serving_cell_cfg_common_sib_s::discovery_burst_win_len_v1700_e_"); -} - -// NonCellDefiningSSB-r17 ::= SEQUENCE -SRSASN_CODE non_cell_defining_ssb_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ssb_periodicity_r17_present, 1)); - HANDLE_CODE(bref.pack(ssb_time_offset_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, absolute_freq_ssb_r17, (uint32_t)0u, (uint32_t)3279165u)); - if (ssb_periodicity_r17_present) { - HANDLE_CODE(ssb_periodicity_r17.pack(bref)); - } - if (ssb_time_offset_r17_present) { - HANDLE_CODE(ssb_time_offset_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE non_cell_defining_ssb_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ssb_periodicity_r17_present, 1)); - HANDLE_CODE(bref.unpack(ssb_time_offset_r17_present, 1)); - - HANDLE_CODE(unpack_integer(absolute_freq_ssb_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); - if (ssb_periodicity_r17_present) { - HANDLE_CODE(ssb_periodicity_r17.unpack(bref)); - } - if (ssb_time_offset_r17_present) { - HANDLE_CODE(ssb_time_offset_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void non_cell_defining_ssb_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("absoluteFrequencySSB-r17", absolute_freq_ssb_r17); - if (ssb_periodicity_r17_present) { - j.write_str("ssb-Periodicity-r17", ssb_periodicity_r17.to_string()); - } - if (ssb_time_offset_r17_present) { - j.write_str("ssb-TimeOffset-r17", ssb_time_offset_r17.to_string()); - } - j.end_obj(); -} - -const char* non_cell_defining_ssb_r17_s::ssb_periodicity_r17_opts::to_string() const -{ - static const char* names[] = {"ms5", "ms10", "ms20", "ms40", "ms80", "ms160", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "non_cell_defining_ssb_r17_s::ssb_periodicity_r17_e_"); -} -uint8_t non_cell_defining_ssb_r17_s::ssb_periodicity_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {5, 10, 20, 40, 80, 160}; - return map_enum_number(numbers, 6, value, "non_cell_defining_ssb_r17_s::ssb_periodicity_r17_e_"); -} - -const char* non_cell_defining_ssb_r17_s::ssb_time_offset_r17_opts::to_string() const -{ - static const char* names[] = {"ms5", "ms10", "ms15", "ms20", "ms40", "ms80", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "non_cell_defining_ssb_r17_s::ssb_time_offset_r17_e_"); -} -uint8_t non_cell_defining_ssb_r17_s::ssb_time_offset_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {5, 10, 15, 20, 40, 80}; - return map_enum_number(numbers, 6, value, "non_cell_defining_ssb_r17_s::ssb_time_offset_r17_e_"); -} - -// AvailabilityCombination-r16 ::= SEQUENCE -SRSASN_CODE availability_combination_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, availability_combination_id_r16, (uint16_t)0u, (uint16_t)511u)); - HANDLE_CODE(pack_dyn_seq_of(bref, res_availability_r16, 1, 256, integer_packer(0, 7))); - - return SRSASN_SUCCESS; -} -SRSASN_CODE availability_combination_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(availability_combination_id_r16, bref, (uint16_t)0u, (uint16_t)511u)); - HANDLE_CODE(unpack_dyn_seq_of(res_availability_r16, bref, 1, 256, integer_packer(0, 7))); - - return SRSASN_SUCCESS; -} -void availability_combination_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("availabilityCombinationId-r16", availability_combination_id_r16); - j.start_array("resourceAvailability-r16"); - for (const auto& e1 : res_availability_r16) { - j.write_int(e1); - } - j.end_array(); - j.end_obj(); -} - -// RB-SetGroup-r17 ::= SEQUENCE -SRSASN_CODE rb_set_group_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(res_availability_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(rb_sets_r17.size() > 0, 1)); - - if (res_availability_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, res_availability_r17, 1, 256, integer_packer(0, 7))); - } - if (rb_sets_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, rb_sets_r17, 1, 8, integer_packer(0, 7))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rb_set_group_r17_s::unpack(cbit_ref& bref) -{ - bool res_availability_r17_present; - HANDLE_CODE(bref.unpack(res_availability_r17_present, 1)); - bool rb_sets_r17_present; - HANDLE_CODE(bref.unpack(rb_sets_r17_present, 1)); - - if (res_availability_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(res_availability_r17, bref, 1, 256, integer_packer(0, 7))); - } - if (rb_sets_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(rb_sets_r17, bref, 1, 8, integer_packer(0, 7))); - } - - return SRSASN_SUCCESS; -} -void rb_set_group_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (res_availability_r17.size() > 0) { - j.start_array("resourceAvailability-r17"); - for (const auto& e1 : res_availability_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (rb_sets_r17.size() > 0) { - j.start_array("rb-Sets-r17"); - for (const auto& e1 : rb_sets_r17) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// AvailabilityCombinationRB-Groups-r17 ::= SEQUENCE -SRSASN_CODE availability_combination_rb_groups_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(rb_set_groups_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(res_availability_r17.size() > 0, 1)); - - HANDLE_CODE(pack_integer(bref, availability_combination_id_r17, (uint16_t)0u, (uint16_t)511u)); - if (rb_set_groups_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, rb_set_groups_r17, 1, 8)); - } - if (res_availability_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, res_availability_r17, 1, 256, integer_packer(0, 7))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE availability_combination_rb_groups_r17_s::unpack(cbit_ref& bref) -{ - bool rb_set_groups_r17_present; - HANDLE_CODE(bref.unpack(rb_set_groups_r17_present, 1)); - bool res_availability_r17_present; - HANDLE_CODE(bref.unpack(res_availability_r17_present, 1)); - - HANDLE_CODE(unpack_integer(availability_combination_id_r17, bref, (uint16_t)0u, (uint16_t)511u)); - if (rb_set_groups_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(rb_set_groups_r17, bref, 1, 8)); - } - if (res_availability_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(res_availability_r17, bref, 1, 256, integer_packer(0, 7))); - } - - return SRSASN_SUCCESS; -} -void availability_combination_rb_groups_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("availabilityCombinationId-r17", availability_combination_id_r17); - if (rb_set_groups_r17.size() > 0) { - j.start_array("rb-SetGroups-r17"); - for (const auto& e1 : rb_set_groups_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (res_availability_r17.size() > 0) { - j.start_array("resourceAvailability-r17"); - for (const auto& e1 : res_availability_r17) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// AvailabilityCombinationsPerCell-r16 ::= SEQUENCE -SRSASN_CODE availability_combinations_per_cell_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(position_in_dci_ai_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, availability_combinations_per_cell_idx_r16, (uint16_t)0u, (uint16_t)512u)); - HANDLE_CODE(iab_du_cell_id_r16.pack(bref)); - if (position_in_dci_ai_r16_present) { - HANDLE_CODE(pack_integer(bref, position_in_dci_ai_r16, (uint8_t)0u, (uint8_t)127u)); - } - HANDLE_CODE(pack_dyn_seq_of(bref, availability_combinations_r16, 1, 512)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= availability_combinations_rb_groups_r17.is_present(); - group_flags[1] |= position_in_dci_ai_rb_groups_v1720_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(availability_combinations_rb_groups_r17.is_present(), 1)); - if (availability_combinations_rb_groups_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *availability_combinations_rb_groups_r17, 1, 512)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(position_in_dci_ai_rb_groups_v1720_present, 1)); - if (position_in_dci_ai_rb_groups_v1720_present) { - HANDLE_CODE(pack_integer(bref, position_in_dci_ai_rb_groups_v1720, (uint8_t)0u, (uint8_t)127u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE availability_combinations_per_cell_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(position_in_dci_ai_r16_present, 1)); - - HANDLE_CODE(unpack_integer(availability_combinations_per_cell_idx_r16, bref, (uint16_t)0u, (uint16_t)512u)); - HANDLE_CODE(iab_du_cell_id_r16.unpack(bref)); - if (position_in_dci_ai_r16_present) { - HANDLE_CODE(unpack_integer(position_in_dci_ai_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - HANDLE_CODE(unpack_dyn_seq_of(availability_combinations_r16, bref, 1, 512)); - - 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); - - unpack_presence_flag(availability_combinations_rb_groups_r17, bref); - if (availability_combinations_rb_groups_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*availability_combinations_rb_groups_r17, bref, 1, 512)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(position_in_dci_ai_rb_groups_v1720_present, 1)); - if (position_in_dci_ai_rb_groups_v1720_present) { - HANDLE_CODE(unpack_integer(position_in_dci_ai_rb_groups_v1720, bref, (uint8_t)0u, (uint8_t)127u)); - } - } - } - return SRSASN_SUCCESS; -} -void availability_combinations_per_cell_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("availabilityCombinationsPerCellIndex-r16", availability_combinations_per_cell_idx_r16); - j.write_str("iab-DU-CellIdentity-r16", iab_du_cell_id_r16.to_string()); - if (position_in_dci_ai_r16_present) { - j.write_int("positionInDCI-AI-r16", position_in_dci_ai_r16); - } - j.start_array("availabilityCombinations-r16"); - for (const auto& e1 : availability_combinations_r16) { - e1.to_json(j); - } - j.end_array(); - if (ext) { - if (availability_combinations_rb_groups_r17.is_present()) { - j.start_array("availabilityCombinationsRB-Groups-r17"); - for (const auto& e1 : *availability_combinations_rb_groups_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (position_in_dci_ai_rb_groups_v1720_present) { - j.write_int("positionInDCI-AI-RBGroups-v1720", position_in_dci_ai_rb_groups_v1720); - } - } - j.end_obj(); -} - -// AvailabilityIndicator-r16 ::= SEQUENCE -SRSASN_CODE availability_ind_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(available_comb_to_add_mod_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(available_comb_to_release_list_r16.size() > 0, 1)); - - HANDLE_CODE(pack_integer(bref, ai_rnti_r16, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(pack_integer(bref, dci_payload_size_ai_r16, (uint8_t)1u, (uint8_t)128u)); - if (available_comb_to_add_mod_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, available_comb_to_add_mod_list_r16, 1, 512)); - } - if (available_comb_to_release_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, available_comb_to_release_list_r16, 1, 512, integer_packer(0, 512))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE availability_ind_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool available_comb_to_add_mod_list_r16_present; - HANDLE_CODE(bref.unpack(available_comb_to_add_mod_list_r16_present, 1)); - bool available_comb_to_release_list_r16_present; - HANDLE_CODE(bref.unpack(available_comb_to_release_list_r16_present, 1)); - - HANDLE_CODE(unpack_integer(ai_rnti_r16, bref, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(unpack_integer(dci_payload_size_ai_r16, bref, (uint8_t)1u, (uint8_t)128u)); - if (available_comb_to_add_mod_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(available_comb_to_add_mod_list_r16, bref, 1, 512)); - } - if (available_comb_to_release_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(available_comb_to_release_list_r16, bref, 1, 512, integer_packer(0, 512))); - } - - return SRSASN_SUCCESS; -} -void availability_ind_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("ai-RNTI-r16", ai_rnti_r16); - j.write_int("dci-PayloadSizeAI-r16", dci_payload_size_ai_r16); - if (available_comb_to_add_mod_list_r16.size() > 0) { - j.start_array("availableCombToAddModList-r16"); - for (const auto& e1 : available_comb_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (available_comb_to_release_list_r16.size() > 0) { - j.start_array("availableCombToReleaseList-r16"); - for (const auto& e1 : available_comb_to_release_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// AvailableRB-SetsPerCell-r16 ::= SEQUENCE -SRSASN_CODE available_rb_sets_per_cell_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, serving_cell_id_r16, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_integer(bref, position_in_dci_r16, (uint8_t)0u, (uint8_t)127u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE available_rb_sets_per_cell_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(serving_cell_id_r16, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_integer(position_in_dci_r16, bref, (uint8_t)0u, (uint8_t)127u)); - - return SRSASN_SUCCESS; -} -void available_rb_sets_per_cell_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("servingCellId-r16", serving_cell_id_r16); - j.write_int("positionInDCI-r16", position_in_dci_r16); - j.end_obj(); -} - -// BFR-CSIRS-Resource ::= SEQUENCE -SRSASN_CODE bfr_csi_rs_res_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ra_occasion_list.size() > 0, 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.size() > 0) { - 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_csi_rs_res_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool ra_occasion_list_present; - 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; -} -void bfr_csi_rs_res_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("csi-RS", csi_rs); - if (ra_occasion_list.size() > 0) { - 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(); -} - -// 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) -{ - 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 bfr_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(); -} - -// CSI-FrequencyOccupation ::= SEQUENCE -SRSASN_CODE csi_freq_occupation_s::pack(bit_ref& bref) 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; -} -SRSASN_CODE csi_freq_occupation_s::unpack(cbit_ref& 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 csi_freq_occupation_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("startingRB", start_rb); - j.write_int("nrofRBs", nrof_rbs); - j.end_obj(); -} - -// BeamLinkMonitoringRS-r17 ::= SEQUENCE -SRSASN_CODE beam_link_monitoring_rs_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, beam_link_monitoring_rs_id_r17, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(detection_res_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE beam_link_monitoring_rs_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(beam_link_monitoring_rs_id_r17, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(detection_res_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void beam_link_monitoring_rs_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("beamLinkMonitoringRS-Id-r17", beam_link_monitoring_rs_id_r17); - j.write_fieldname("detectionResource-r17"); - detection_res_r17.to_json(j); - j.end_obj(); -} - -void beam_link_monitoring_rs_r17_s::detection_res_r17_c_::destroy_() {} -void beam_link_monitoring_rs_r17_s::detection_res_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -beam_link_monitoring_rs_r17_s::detection_res_r17_c_::detection_res_r17_c_( - const beam_link_monitoring_rs_r17_s::detection_res_r17_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_, "beam_link_monitoring_rs_r17_s::detection_res_r17_c_"); - } -} -beam_link_monitoring_rs_r17_s::detection_res_r17_c_& beam_link_monitoring_rs_r17_s::detection_res_r17_c_::operator=( - const beam_link_monitoring_rs_r17_s::detection_res_r17_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_, "beam_link_monitoring_rs_r17_s::detection_res_r17_c_"); - } - - return *this; -} -uint8_t& beam_link_monitoring_rs_r17_s::detection_res_r17_c_::set_ssb_idx() -{ - set(types::ssb_idx); - return c.get(); -} -uint8_t& beam_link_monitoring_rs_r17_s::detection_res_r17_c_::set_csi_rs_idx() -{ - set(types::csi_rs_idx); - return c.get(); -} -void beam_link_monitoring_rs_r17_s::detection_res_r17_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()); - break; - default: - log_invalid_choice_id(type_, "beam_link_monitoring_rs_r17_s::detection_res_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE beam_link_monitoring_rs_r17_s::detection_res_r17_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_, "beam_link_monitoring_rs_r17_s::detection_res_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE beam_link_monitoring_rs_r17_s::detection_res_r17_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_, "beam_link_monitoring_rs_r17_s::detection_res_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// CI-ConfigurationPerServingCell-r16 ::= SEQUENCE -SRSASN_CODE ci_cfg_per_serving_cell_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(position_in_dci_for_sul_r16_present, 1)); - HANDLE_CODE(bref.pack(ul_cancellation_prio_v1610_present, 1)); - - HANDLE_CODE(pack_integer(bref, serving_cell_id, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_integer(bref, position_in_dci_r16, (uint8_t)0u, (uint8_t)125u)); - if (position_in_dci_for_sul_r16_present) { - HANDLE_CODE(pack_integer(bref, position_in_dci_for_sul_r16, (uint8_t)0u, (uint8_t)125u)); - } - HANDLE_CODE(ci_payload_size_r16.pack(bref)); - bref.pack(time_freq_region_r16.ext, 1); - HANDLE_CODE(bref.pack(time_freq_region_r16.time_dur_for_ci_r16_present, 1)); - if (time_freq_region_r16.time_dur_for_ci_r16_present) { - HANDLE_CODE(time_freq_region_r16.time_dur_for_ci_r16.pack(bref)); - } - HANDLE_CODE(time_freq_region_r16.time_granularity_for_ci_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, time_freq_region_r16.freq_region_for_ci_r16, (uint16_t)0u, (uint16_t)37949u)); - HANDLE_CODE(pack_integer(bref, time_freq_region_r16.delta_offset_r16, (uint8_t)0u, (uint8_t)2u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ci_cfg_per_serving_cell_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(position_in_dci_for_sul_r16_present, 1)); - HANDLE_CODE(bref.unpack(ul_cancellation_prio_v1610_present, 1)); - - HANDLE_CODE(unpack_integer(serving_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_integer(position_in_dci_r16, bref, (uint8_t)0u, (uint8_t)125u)); - if (position_in_dci_for_sul_r16_present) { - HANDLE_CODE(unpack_integer(position_in_dci_for_sul_r16, bref, (uint8_t)0u, (uint8_t)125u)); - } - HANDLE_CODE(ci_payload_size_r16.unpack(bref)); - bref.unpack(time_freq_region_r16.ext, 1); - HANDLE_CODE(bref.unpack(time_freq_region_r16.time_dur_for_ci_r16_present, 1)); - if (time_freq_region_r16.time_dur_for_ci_r16_present) { - HANDLE_CODE(time_freq_region_r16.time_dur_for_ci_r16.unpack(bref)); - } - HANDLE_CODE(time_freq_region_r16.time_granularity_for_ci_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(time_freq_region_r16.freq_region_for_ci_r16, bref, (uint16_t)0u, (uint16_t)37949u)); - HANDLE_CODE(unpack_integer(time_freq_region_r16.delta_offset_r16, bref, (uint8_t)0u, (uint8_t)2u)); - - return SRSASN_SUCCESS; -} -void ci_cfg_per_serving_cell_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("servingCellId", serving_cell_id); - j.write_int("positionInDCI-r16", position_in_dci_r16); - if (position_in_dci_for_sul_r16_present) { - j.write_int("positionInDCI-ForSUL-r16", position_in_dci_for_sul_r16); - } - j.write_str("ci-PayloadSize-r16", ci_payload_size_r16.to_string()); - j.write_fieldname("timeFrequencyRegion-r16"); - j.start_obj(); - if (time_freq_region_r16.time_dur_for_ci_r16_present) { - j.write_str("timeDurationForCI-r16", time_freq_region_r16.time_dur_for_ci_r16.to_string()); - } - j.write_str("timeGranularityForCI-r16", time_freq_region_r16.time_granularity_for_ci_r16.to_string()); - j.write_int("frequencyRegionForCI-r16", time_freq_region_r16.freq_region_for_ci_r16); - j.write_int("deltaOffset-r16", time_freq_region_r16.delta_offset_r16); - j.end_obj(); - if (ul_cancellation_prio_v1610_present) { - j.write_str("uplinkCancellationPriority-v1610", "enabled"); - } - j.end_obj(); -} - -const char* ci_cfg_per_serving_cell_r16_s::ci_payload_size_r16_opts::to_string() const -{ - static const char* names[] = { - "n1", "n2", "n4", "n5", "n7", "n8", "n10", "n14", "n16", "n20", "n28", "n32", "n35", "n42", "n56", "n112"}; - return convert_enum_idx(names, 16, value, "ci_cfg_per_serving_cell_r16_s::ci_payload_size_r16_e_"); -} -uint8_t ci_cfg_per_serving_cell_r16_s::ci_payload_size_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 5, 7, 8, 10, 14, 16, 20, 28, 32, 35, 42, 56, 112}; - return map_enum_number(numbers, 16, value, "ci_cfg_per_serving_cell_r16_s::ci_payload_size_r16_e_"); -} - -const char* ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_dur_for_ci_r16_opts::to_string() const -{ - static const char* names[] = {"n2", "n4", "n7", "n14"}; - return convert_enum_idx( - names, 4, value, "ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_dur_for_ci_r16_e_"); -} -uint8_t ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_dur_for_ci_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 7, 14}; - return map_enum_number( - numbers, 4, value, "ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_dur_for_ci_r16_e_"); -} - -const char* ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_granularity_for_ci_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n4", "n7", "n14", "n28"}; - return convert_enum_idx( - names, 6, value, "ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_granularity_for_ci_r16_e_"); -} -uint8_t ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_granularity_for_ci_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 7, 14, 28}; - return map_enum_number( - numbers, 6, value, "ci_cfg_per_serving_cell_r16_s::time_freq_region_r16_s_::time_granularity_for_ci_r16_e_"); -} - -// CSI-RS-ResourceMapping ::= SEQUENCE -SRSASN_CODE csi_rs_res_map_s::pack(bit_ref& bref) 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; -} -SRSASN_CODE csi_rs_res_map_s::unpack(cbit_ref& bref) -{ - 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 csi_rs_res_map_s::to_json(json_writer& j) const -{ - j.start_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_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(); -} - -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_"); - } -} -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::row1: - c.init(other.c.get>()); - break; - 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_"); - } -} -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::row1: - c.set(other.c.get>()); - break; - 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_"); - } - - return *this; -} -fixed_bitstring<4>& csi_rs_res_map_s::freq_domain_alloc_c_::set_row1() -{ - set(types::row1); - return c.get>(); -} -fixed_bitstring<12>& csi_rs_res_map_s::freq_domain_alloc_c_::set_row2() -{ - set(types::row2); - return c.get>(); -} -fixed_bitstring<3>& csi_rs_res_map_s::freq_domain_alloc_c_::set_row4() -{ - set(types::row4); - return c.get>(); -} -fixed_bitstring<6>& csi_rs_res_map_s::freq_domain_alloc_c_::set_other() -{ - set(types::other); - return c.get>(); -} -void csi_rs_res_map_s::freq_domain_alloc_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::row1: - j.write_str("row1", c.get>().to_string()); - break; - 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_"); - } - j.end_obj(); -} -SRSASN_CODE csi_rs_res_map_s::freq_domain_alloc_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::row1: - HANDLE_CODE(c.get>().pack(bref)); - break; - 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_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::row1: - HANDLE_CODE(c.get>().unpack(bref)); - break; - 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_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* csi_rs_res_map_s::nrof_ports_opts::to_string() const -{ - static const char* names[] = {"p1", "p2", "p4", "p8", "p12", "p16", "p24", "p32"}; - return convert_enum_idx(names, 8, value, "csi_rs_res_map_s::nrof_ports_e_"); -} -uint8_t csi_rs_res_map_s::nrof_ports_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8, 12, 16, 24, 32}; - return map_enum_number(numbers, 8, value, "csi_rs_res_map_s::nrof_ports_e_"); -} - -const char* csi_rs_res_map_s::cdm_type_opts::to_string() const -{ - static const char* names[] = {"noCDM", "fd-CDM2", "cdm4-FD2-TD2", "cdm8-FD2-TD4"}; - return convert_enum_idx(names, 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: - invalid_enum_number(value, "csi_rs_res_map_s::cdm_type_e_"); - } - return 0; -} - -void csi_rs_res_map_s::density_c_::set(types::options e) -{ - type_ = e; -} -csi_rs_res_map_s::density_c_::dot5_e_& csi_rs_res_map_s::density_c_::set_dot5() -{ - set(types::dot5); - return c; -} -void csi_rs_res_map_s::density_c_::set_one() -{ - set(types::one); -} -void csi_rs_res_map_s::density_c_::set_three() -{ - set(types::three); -} -void csi_rs_res_map_s::density_c_::set_spare() -{ - set(types::spare); -} -void csi_rs_res_map_s::density_c_::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.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; - } - 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; - } - return SRSASN_SUCCESS; -} - -const char* csi_rs_res_map_s::density_c_::dot5_opts::to_string() const -{ - static const char* names[] = {"evenPRBs", "oddPRBs"}; - return convert_enum_idx(names, 2, value, "csi_rs_res_map_s::density_c_::dot5_e_"); -} - -// 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; -} -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::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: - 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_, "csi_res_periodicity_and_offset_c"); - } -} -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::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: - 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_, "csi_res_periodicity_and_offset_c"); - } - - return *this; -} -uint8_t& csi_res_periodicity_and_offset_c::set_slots4() -{ - set(types::slots4); - return c.get(); -} -uint8_t& csi_res_periodicity_and_offset_c::set_slots5() -{ - set(types::slots5); - return c.get(); -} -uint8_t& csi_res_periodicity_and_offset_c::set_slots8() -{ - set(types::slots8); - return c.get(); -} -uint8_t& csi_res_periodicity_and_offset_c::set_slots10() -{ - set(types::slots10); - return c.get(); -} -uint8_t& csi_res_periodicity_and_offset_c::set_slots16() -{ - set(types::slots16); - return c.get(); -} -uint8_t& csi_res_periodicity_and_offset_c::set_slots20() -{ - set(types::slots20); - return c.get(); -} -uint8_t& csi_res_periodicity_and_offset_c::set_slots32() -{ - set(types::slots32); - return c.get(); -} -uint8_t& csi_res_periodicity_and_offset_c::set_slots40() -{ - set(types::slots40); - return c.get(); -} -uint8_t& csi_res_periodicity_and_offset_c::set_slots64() -{ - set(types::slots64); - return c.get(); -} -uint8_t& csi_res_periodicity_and_offset_c::set_slots80() -{ - set(types::slots80); - return c.get(); -} -uint8_t& csi_res_periodicity_and_offset_c::set_slots160() -{ - set(types::slots160); - return c.get(); -} -uint16_t& csi_res_periodicity_and_offset_c::set_slots320() -{ - set(types::slots320); - return c.get(); -} -uint16_t& csi_res_periodicity_and_offset_c::set_slots640() -{ - set(types::slots640); - return c.get(); -} -void csi_res_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::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_, "csi_res_periodicity_and_offset_c"); - } - j.end_obj(); -} -SRSASN_CODE csi_res_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::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_, "csi_res_periodicity_and_offset_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE csi_res_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::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_, "csi_res_periodicity_and_offset_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// FDM-TDM-r16 ::= SEQUENCE -SRSASN_CODE fdm_tdm_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(start_symbol_offset_k_r16_present, 1)); - - HANDLE_CODE(repeat_scheme_r16.pack(bref)); - if (start_symbol_offset_k_r16_present) { - HANDLE_CODE(pack_integer(bref, start_symbol_offset_k_r16, (uint8_t)0u, (uint8_t)7u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE fdm_tdm_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(start_symbol_offset_k_r16_present, 1)); - - HANDLE_CODE(repeat_scheme_r16.unpack(bref)); - if (start_symbol_offset_k_r16_present) { - HANDLE_CODE(unpack_integer(start_symbol_offset_k_r16, bref, (uint8_t)0u, (uint8_t)7u)); - } - - return SRSASN_SUCCESS; -} -void fdm_tdm_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("repetitionScheme-r16", repeat_scheme_r16.to_string()); - if (start_symbol_offset_k_r16_present) { - j.write_int("startingSymbolOffsetK-r16", start_symbol_offset_k_r16); - } - j.end_obj(); -} - -const char* fdm_tdm_r16_s::repeat_scheme_r16_opts::to_string() const -{ - static const char* names[] = {"fdmSchemeA", "fdmSchemeB", "tdmSchemeA"}; - return convert_enum_idx(names, 3, value, "fdm_tdm_r16_s::repeat_scheme_r16_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(); -} - -// MultiPDSCH-TDRA-r17 ::= SEQUENCE -SRSASN_CODE multi_pdsch_tdra_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_dyn_seq_of(bref, pdsch_tdra_list_r17, 1, 8)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE multi_pdsch_tdra_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_dyn_seq_of(pdsch_tdra_list_r17, bref, 1, 8)); - - return SRSASN_SUCCESS; -} -void multi_pdsch_tdra_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("pdsch-TDRA-List-r17"); - for (const auto& e1 : pdsch_tdra_list_r17) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// PTRS-DownlinkConfig ::= SEQUENCE -SRSASN_CODE ptrs_dl_cfg_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)); - - if (freq_density_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, freq_density, freq_density.size(), integer_packer(1, 276))); - } - if (time_density_present) { - HANDLE_CODE(pack_fixed_seq_of(bref, time_density, 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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= max_nrof_ports_r16_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(max_nrof_ports_r16_present, 1)); - if (max_nrof_ports_r16_present) { - HANDLE_CODE(max_nrof_ports_r16.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ptrs_dl_cfg_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)); - - if (freq_density_present) { - HANDLE_CODE(unpack_fixed_seq_of(freq_density, bref, freq_density.size(), integer_packer(1, 276))); - } - if (time_density_present) { - HANDLE_CODE(unpack_fixed_seq_of(time_density, 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)); - } - - 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_nrof_ports_r16_present, 1)); - if (max_nrof_ports_r16_present) { - HANDLE_CODE(max_nrof_ports_r16.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void ptrs_dl_cfg_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 (res_elem_offset_present) { - j.write_str("resourceElementOffset", res_elem_offset.to_string()); - } - if (ext) { - if (max_nrof_ports_r16_present) { - j.write_str("maxNrofPorts-r16", max_nrof_ports_r16.to_string()); - } - } - j.end_obj(); -} - -const char* ptrs_dl_cfg_s::res_elem_offset_opts::to_string() const -{ - static const char* names[] = {"offset01", "offset10", "offset11"}; - return convert_enum_idx(names, 3, value, "ptrs_dl_cfg_s::res_elem_offset_e_"); -} -float ptrs_dl_cfg_s::res_elem_offset_opts::to_number() const -{ - static const float numbers[] = {0.1, 1.0, 1.1}; - return map_enum_number(numbers, 3, value, "ptrs_dl_cfg_s::res_elem_offset_e_"); -} -const char* ptrs_dl_cfg_s::res_elem_offset_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.1", "1.0", "1.1"}; - return convert_enum_idx(number_strs, 3, value, "ptrs_dl_cfg_s::res_elem_offset_e_"); -} - -const char* ptrs_dl_cfg_s::max_nrof_ports_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, 2, value, "ptrs_dl_cfg_s::max_nrof_ports_r16_e_"); -} -uint8_t ptrs_dl_cfg_s::max_nrof_ports_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "ptrs_dl_cfg_s::max_nrof_ports_r16_e_"); -} - -// QCL-Info ::= SEQUENCE -SRSASN_CODE qcl_info_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)); - - if (cell_present) { - HANDLE_CODE(pack_integer(bref, cell, (uint8_t)0u, (uint8_t)31u)); - } - if (bwp_id_present) { - HANDLE_CODE(pack_integer(bref, bwp_id, (uint8_t)0u, (uint8_t)4u)); - } - HANDLE_CODE(ref_sig.pack(bref)); - HANDLE_CODE(qcl_type.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE qcl_info_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(cell_present, 1)); - HANDLE_CODE(bref.unpack(bwp_id_present, 1)); - - if (cell_present) { - HANDLE_CODE(unpack_integer(cell, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (bwp_id_present) { - HANDLE_CODE(unpack_integer(bwp_id, bref, (uint8_t)0u, (uint8_t)4u)); - } - HANDLE_CODE(ref_sig.unpack(bref)); - HANDLE_CODE(qcl_type.unpack(bref)); - - return SRSASN_SUCCESS; -} -void qcl_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (cell_present) { - j.write_int("cell", cell); - } - 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 qcl_info_s::ref_sig_c_::destroy_() {} -void qcl_info_s::ref_sig_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -qcl_info_s::ref_sig_c_::ref_sig_c_(const qcl_info_s::ref_sig_c_& other) -{ - 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_"); - } -} -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::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_"); - } - - return *this; -} -uint8_t& qcl_info_s::ref_sig_c_::set_csi_rs() -{ - set(types::csi_rs); - return c.get(); -} -uint8_t& qcl_info_s::ref_sig_c_::set_ssb() -{ - set(types::ssb); - return c.get(); -} -void qcl_info_s::ref_sig_c_::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.end_obj(); -} -SRSASN_CODE qcl_info_s::ref_sig_c_::pack(bit_ref& bref) 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; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE qcl_info_s::ref_sig_c_::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; - } - return SRSASN_SUCCESS; -} - -const char* qcl_info_s::qcl_type_opts::to_string() const -{ - static const char* names[] = {"typeA", "typeB", "typeC", "typeD"}; - return convert_enum_idx(names, 4, value, "qcl_info_s::qcl_type_e_"); -} - -// SlotBased-r16 ::= SEQUENCE -SRSASN_CODE slot_based_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(tci_map_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, seq_offset_for_rv_r16, (uint8_t)1u, (uint8_t)3u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE slot_based_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(tci_map_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(seq_offset_for_rv_r16, bref, (uint8_t)1u, (uint8_t)3u)); - - return SRSASN_SUCCESS; -} -void slot_based_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("tciMapping-r16", tci_map_r16.to_string()); - j.write_int("sequenceOffsetForRV-r16", seq_offset_for_rv_r16); - j.end_obj(); -} - -const char* slot_based_r16_s::tci_map_r16_opts::to_string() const -{ - static const char* names[] = {"cyclicMapping", "sequentialMapping"}; - return convert_enum_idx(names, 2, value, "slot_based_r16_s::tci_map_r16_e_"); -} - -// SlotBased-v1630 ::= SEQUENCE -SRSASN_CODE slot_based_v1630_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(tci_map_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, seq_offset_for_rv_r16, (uint8_t)0u, (uint8_t)0u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE slot_based_v1630_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(tci_map_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(seq_offset_for_rv_r16, bref, (uint8_t)0u, (uint8_t)0u)); - - return SRSASN_SUCCESS; -} -void slot_based_v1630_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("tciMapping-r16", tci_map_r16.to_string()); - j.write_int("sequenceOffsetForRV-r16", seq_offset_for_rv_r16); - j.end_obj(); -} - -const char* slot_based_v1630_s::tci_map_r16_opts::to_string() const -{ - static const char* names[] = {"cyclicMapping", "sequentialMapping"}; - return convert_enum_idx(names, 2, value, "slot_based_v1630_s::tci_map_r16_e_"); -} - -// BeamFailureDetectionSet-r17 ::= SEQUENCE -SRSASN_CODE beam_fail_detection_set_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(bfd_res_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(bfd_res_to_release_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(beam_fail_instance_max_count_r17_present, 1)); - HANDLE_CODE(bref.pack(beam_fail_detection_timer_r17_present, 1)); - - if (bfd_res_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, bfd_res_to_add_mod_list_r17, 1, 64)); - } - if (bfd_res_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, bfd_res_to_release_list_r17, 1, 64, integer_packer(0, 63))); - } - if (beam_fail_instance_max_count_r17_present) { - HANDLE_CODE(beam_fail_instance_max_count_r17.pack(bref)); - } - if (beam_fail_detection_timer_r17_present) { - HANDLE_CODE(beam_fail_detection_timer_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE beam_fail_detection_set_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool bfd_res_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(bfd_res_to_add_mod_list_r17_present, 1)); - bool bfd_res_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(bfd_res_to_release_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(beam_fail_instance_max_count_r17_present, 1)); - HANDLE_CODE(bref.unpack(beam_fail_detection_timer_r17_present, 1)); - - if (bfd_res_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(bfd_res_to_add_mod_list_r17, bref, 1, 64)); - } - if (bfd_res_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(bfd_res_to_release_list_r17, bref, 1, 64, integer_packer(0, 63))); - } - if (beam_fail_instance_max_count_r17_present) { - HANDLE_CODE(beam_fail_instance_max_count_r17.unpack(bref)); - } - if (beam_fail_detection_timer_r17_present) { - HANDLE_CODE(beam_fail_detection_timer_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void beam_fail_detection_set_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (bfd_res_to_add_mod_list_r17.size() > 0) { - j.start_array("bfdResourcesToAddModList-r17"); - for (const auto& e1 : bfd_res_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (bfd_res_to_release_list_r17.size() > 0) { - j.start_array("bfdResourcesToReleaseList-r17"); - for (const auto& e1 : bfd_res_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (beam_fail_instance_max_count_r17_present) { - j.write_str("beamFailureInstanceMaxCount-r17", beam_fail_instance_max_count_r17.to_string()); - } - if (beam_fail_detection_timer_r17_present) { - j.write_str("beamFailureDetectionTimer-r17", beam_fail_detection_timer_r17.to_string()); - } - j.end_obj(); -} - -const char* beam_fail_detection_set_r17_s::beam_fail_instance_max_count_r17_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; - return convert_enum_idx(names, 8, value, "beam_fail_detection_set_r17_s::beam_fail_instance_max_count_r17_e_"); -} -uint8_t beam_fail_detection_set_r17_s::beam_fail_instance_max_count_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 5, 6, 8, 10}; - return map_enum_number(numbers, 8, value, "beam_fail_detection_set_r17_s::beam_fail_instance_max_count_r17_e_"); -} - -const char* beam_fail_detection_set_r17_s::beam_fail_detection_timer_r17_opts::to_string() const -{ - static const char* names[] = {"pbfd1", "pbfd2", "pbfd3", "pbfd4", "pbfd5", "pbfd6", "pbfd8", "pbfd10"}; - return convert_enum_idx(names, 8, value, "beam_fail_detection_set_r17_s::beam_fail_detection_timer_r17_e_"); -} -uint8_t beam_fail_detection_set_r17_s::beam_fail_detection_timer_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 5, 6, 8, 10}; - return map_enum_number(numbers, 8, value, "beam_fail_detection_set_r17_s::beam_fail_detection_timer_r17_e_"); -} - -// DL-PPW-PeriodicityAndStartSlot-r17 ::= CHOICE -void dl_ppw_periodicity_and_start_slot_r17_c::destroy_() -{ - switch (type_) { - case types::scs15: - c.destroy(); - break; - case types::scs30: - c.destroy(); - break; - case types::scs60: - c.destroy(); - break; - case types::scs120: - c.destroy(); - break; - default: - break; - } -} -void dl_ppw_periodicity_and_start_slot_r17_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::scs15: - c.init(); - break; - case types::scs30: - c.init(); - break; - case types::scs60: - c.init(); - break; - case types::scs120: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c"); - } -} -dl_ppw_periodicity_and_start_slot_r17_c::dl_ppw_periodicity_and_start_slot_r17_c( - const dl_ppw_periodicity_and_start_slot_r17_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::scs15: - c.init(other.c.get()); - break; - case types::scs30: - c.init(other.c.get()); - break; - case types::scs60: - c.init(other.c.get()); - break; - case types::scs120: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c"); - } -} -dl_ppw_periodicity_and_start_slot_r17_c& -dl_ppw_periodicity_and_start_slot_r17_c::operator=(const dl_ppw_periodicity_and_start_slot_r17_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::scs15: - c.set(other.c.get()); - break; - case types::scs30: - c.set(other.c.get()); - break; - case types::scs60: - c.set(other.c.get()); - break; - case types::scs120: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c"); - } - - return *this; -} -dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_& dl_ppw_periodicity_and_start_slot_r17_c::set_scs15() -{ - set(types::scs15); - return c.get(); -} -dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_& dl_ppw_periodicity_and_start_slot_r17_c::set_scs30() -{ - set(types::scs30); - return c.get(); -} -dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_& dl_ppw_periodicity_and_start_slot_r17_c::set_scs60() -{ - set(types::scs60); - return c.get(); -} -dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_& dl_ppw_periodicity_and_start_slot_r17_c::set_scs120() -{ - set(types::scs120); - return c.get(); -} -void dl_ppw_periodicity_and_start_slot_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::scs15: - j.write_fieldname("scs15"); - c.get().to_json(j); - break; - case types::scs30: - j.write_fieldname("scs30"); - c.get().to_json(j); - break; - case types::scs60: - j.write_fieldname("scs60"); - c.get().to_json(j); - break; - case types::scs120: - j.write_fieldname("scs120"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c"); - } - j.end_obj(); -} -SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::scs15: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::scs30: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::scs60: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::scs120: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::scs15: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::scs30: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::scs60: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::scs120: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::destroy_() {} -void dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::scs15_c_( - const dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_& other) -{ - type_ = other.type(); - switch (type_) { - 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::n16: - c.init(other.c.get()); - break; - case types::n20: - c.init(other.c.get()); - break; - case types::n32: - c.init(other.c.get()); - break; - case types::n40: - c.init(other.c.get()); - break; - case types::n64: - c.init(other.c.get()); - break; - case types::n80: - c.init(other.c.get()); - break; - case types::n160: - c.init(other.c.get()); - break; - case types::n320: - c.init(other.c.get()); - break; - case types::n640: - c.init(other.c.get()); - break; - case types::n1280: - c.init(other.c.get()); - break; - case types::n2560: - c.init(other.c.get()); - break; - case types::n5120: - c.init(other.c.get()); - break; - case types::n10240: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_"); - } -} -dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::operator=( - const dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - 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::n16: - c.set(other.c.get()); - break; - case types::n20: - c.set(other.c.get()); - break; - case types::n32: - c.set(other.c.get()); - break; - case types::n40: - c.set(other.c.get()); - break; - case types::n64: - c.set(other.c.get()); - break; - case types::n80: - c.set(other.c.get()); - break; - case types::n160: - c.set(other.c.get()); - break; - case types::n320: - c.set(other.c.get()); - break; - case types::n640: - c.set(other.c.get()); - break; - case types::n1280: - c.set(other.c.get()); - break; - case types::n2560: - c.set(other.c.get()); - break; - case types::n5120: - c.set(other.c.get()); - break; - case types::n10240: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_"); - } - - return *this; -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n4() -{ - set(types::n4); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n5() -{ - set(types::n5); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n8() -{ - set(types::n8); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n10() -{ - set(types::n10); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n16() -{ - set(types::n16); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n20() -{ - set(types::n20); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n32() -{ - set(types::n32); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n40() -{ - set(types::n40); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n64() -{ - set(types::n64); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n80() -{ - set(types::n80); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n160() -{ - set(types::n160); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n320() -{ - set(types::n320); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n640() -{ - set(types::n640); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n1280() -{ - set(types::n1280); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n2560() -{ - set(types::n2560); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n5120() -{ - set(types::n5120); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::set_n10240() -{ - set(types::n10240); - return c.get(); -} -void dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::n4: - j.write_int("n4", c.get()); - break; - case types::n5: - j.write_int("n5", c.get()); - break; - case types::n8: - j.write_int("n8", c.get()); - break; - case types::n10: - j.write_int("n10", c.get()); - break; - case types::n16: - j.write_int("n16", c.get()); - break; - case types::n20: - j.write_int("n20", c.get()); - break; - case types::n32: - j.write_int("n32", c.get()); - break; - case types::n40: - j.write_int("n40", c.get()); - break; - case types::n64: - j.write_int("n64", c.get()); - break; - case types::n80: - j.write_int("n80", c.get()); - break; - case types::n160: - j.write_int("n160", c.get()); - break; - case types::n320: - j.write_int("n320", c.get()); - break; - case types::n640: - j.write_int("n640", c.get()); - break; - case types::n1280: - j.write_int("n1280", c.get()); - break; - case types::n2560: - j.write_int("n2560", c.get()); - break; - case types::n5120: - j.write_int("n5120", c.get()); - break; - case types::n10240: - j.write_int("n10240", c.get()); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_"); - } - j.end_obj(); -} -SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::n4: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); - break; - case types::n5: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); - break; - case types::n8: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); - break; - case types::n10: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - break; - case types::n16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); - break; - case types::n20: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); - break; - case types::n32: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); - break; - case types::n40: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::n64: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::n80: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - case types::n160: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); - break; - case types::n320: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); - break; - case types::n640: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); - break; - case types::n1280: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); - break; - case types::n2560: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); - break; - case types::n5120: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); - break; - case types::n10240: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::n4: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); - break; - case types::n5: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); - break; - case types::n8: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); - break; - case types::n10: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - break; - case types::n16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); - break; - case types::n20: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::n32: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); - break; - case types::n40: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::n64: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::n80: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::n160: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); - break; - case types::n320: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); - break; - case types::n640: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); - break; - case types::n1280: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); - break; - case types::n2560: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); - break; - case types::n5120: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); - break; - case types::n10240: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs15_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::destroy_() {} -void dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::scs30_c_( - const dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::n8: - c.init(other.c.get()); - break; - case types::n10: - c.init(other.c.get()); - break; - case types::n16: - c.init(other.c.get()); - break; - case types::n20: - c.init(other.c.get()); - break; - case types::n32: - c.init(other.c.get()); - break; - case types::n40: - c.init(other.c.get()); - break; - case types::n64: - c.init(other.c.get()); - break; - case types::n80: - c.init(other.c.get()); - break; - case types::n128: - c.init(other.c.get()); - break; - case types::n160: - c.init(other.c.get()); - break; - case types::n320: - c.init(other.c.get()); - break; - case types::n640: - c.init(other.c.get()); - break; - case types::n1280: - c.init(other.c.get()); - break; - case types::n2560: - c.init(other.c.get()); - break; - case types::n5120: - c.init(other.c.get()); - break; - case types::n10240: - c.init(other.c.get()); - break; - case types::n20480: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_"); - } -} -dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::operator=( - const dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::n8: - c.set(other.c.get()); - break; - case types::n10: - c.set(other.c.get()); - break; - case types::n16: - c.set(other.c.get()); - break; - case types::n20: - c.set(other.c.get()); - break; - case types::n32: - c.set(other.c.get()); - break; - case types::n40: - c.set(other.c.get()); - break; - case types::n64: - c.set(other.c.get()); - break; - case types::n80: - c.set(other.c.get()); - break; - case types::n128: - c.set(other.c.get()); - break; - case types::n160: - c.set(other.c.get()); - break; - case types::n320: - c.set(other.c.get()); - break; - case types::n640: - c.set(other.c.get()); - break; - case types::n1280: - c.set(other.c.get()); - break; - case types::n2560: - c.set(other.c.get()); - break; - case types::n5120: - c.set(other.c.get()); - break; - case types::n10240: - c.set(other.c.get()); - break; - case types::n20480: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_"); - } - - return *this; -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n8() -{ - set(types::n8); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n10() -{ - set(types::n10); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n16() -{ - set(types::n16); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n20() -{ - set(types::n20); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n32() -{ - set(types::n32); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n40() -{ - set(types::n40); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n64() -{ - set(types::n64); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n80() -{ - set(types::n80); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n128() -{ - set(types::n128); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n160() -{ - set(types::n160); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n320() -{ - set(types::n320); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n640() -{ - set(types::n640); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n1280() -{ - set(types::n1280); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n2560() -{ - set(types::n2560); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n5120() -{ - set(types::n5120); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n10240() -{ - set(types::n10240); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::set_n20480() -{ - set(types::n20480); - return c.get(); -} -void dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::n8: - j.write_int("n8", c.get()); - break; - case types::n10: - j.write_int("n10", c.get()); - break; - case types::n16: - j.write_int("n16", c.get()); - break; - case types::n20: - j.write_int("n20", c.get()); - break; - case types::n32: - j.write_int("n32", c.get()); - break; - case types::n40: - j.write_int("n40", c.get()); - break; - case types::n64: - j.write_int("n64", c.get()); - break; - case types::n80: - j.write_int("n80", c.get()); - break; - case types::n128: - j.write_int("n128", c.get()); - break; - case types::n160: - j.write_int("n160", c.get()); - break; - case types::n320: - j.write_int("n320", c.get()); - break; - case types::n640: - j.write_int("n640", c.get()); - break; - case types::n1280: - j.write_int("n1280", c.get()); - break; - case types::n2560: - j.write_int("n2560", c.get()); - break; - case types::n5120: - j.write_int("n5120", c.get()); - break; - case types::n10240: - j.write_int("n10240", c.get()); - break; - case types::n20480: - j.write_int("n20480", c.get()); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_"); - } - j.end_obj(); -} -SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::n8: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); - break; - case types::n10: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - break; - case types::n16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); - break; - case types::n20: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); - break; - case types::n32: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); - break; - case types::n40: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::n64: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::n80: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - case types::n128: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); - break; - case types::n160: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); - break; - case types::n320: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); - break; - case types::n640: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); - break; - case types::n1280: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); - break; - case types::n2560: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); - break; - case types::n5120: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); - break; - case types::n10240: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); - break; - case types::n20480: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)20479u)); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::n8: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); - break; - case types::n10: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - break; - case types::n16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); - break; - case types::n20: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::n32: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); - break; - case types::n40: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::n64: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::n80: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::n128: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); - break; - case types::n160: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); - break; - case types::n320: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); - break; - case types::n640: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); - break; - case types::n1280: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); - break; - case types::n2560: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); - break; - case types::n5120: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); - break; - case types::n10240: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); - break; - case types::n20480: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)20479u)); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs30_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::destroy_() {} -void dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::scs60_c_( - const dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::n16: - c.init(other.c.get()); - break; - case types::n20: - c.init(other.c.get()); - break; - case types::n32: - c.init(other.c.get()); - break; - case types::n40: - c.init(other.c.get()); - break; - case types::n64: - c.init(other.c.get()); - break; - case types::n80: - c.init(other.c.get()); - break; - case types::n128: - c.init(other.c.get()); - break; - case types::n160: - c.init(other.c.get()); - break; - case types::n256: - c.init(other.c.get()); - break; - case types::n320: - c.init(other.c.get()); - break; - case types::n640: - c.init(other.c.get()); - break; - case types::n1280: - c.init(other.c.get()); - break; - case types::n2560: - c.init(other.c.get()); - break; - case types::n5120: - c.init(other.c.get()); - break; - case types::n10240: - c.init(other.c.get()); - break; - case types::n20480: - c.init(other.c.get()); - break; - case types::n40960: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_"); - } -} -dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::operator=( - const dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::n16: - c.set(other.c.get()); - break; - case types::n20: - c.set(other.c.get()); - break; - case types::n32: - c.set(other.c.get()); - break; - case types::n40: - c.set(other.c.get()); - break; - case types::n64: - c.set(other.c.get()); - break; - case types::n80: - c.set(other.c.get()); - break; - case types::n128: - c.set(other.c.get()); - break; - case types::n160: - c.set(other.c.get()); - break; - case types::n256: - c.set(other.c.get()); - break; - case types::n320: - c.set(other.c.get()); - break; - case types::n640: - c.set(other.c.get()); - break; - case types::n1280: - c.set(other.c.get()); - break; - case types::n2560: - c.set(other.c.get()); - break; - case types::n5120: - c.set(other.c.get()); - break; - case types::n10240: - c.set(other.c.get()); - break; - case types::n20480: - c.set(other.c.get()); - break; - case types::n40960: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_"); - } - - return *this; -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n16() -{ - set(types::n16); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n20() -{ - set(types::n20); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n32() -{ - set(types::n32); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n40() -{ - set(types::n40); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n64() -{ - set(types::n64); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n80() -{ - set(types::n80); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n128() -{ - set(types::n128); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n160() -{ - set(types::n160); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n256() -{ - set(types::n256); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n320() -{ - set(types::n320); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n640() -{ - set(types::n640); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n1280() -{ - set(types::n1280); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n2560() -{ - set(types::n2560); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n5120() -{ - set(types::n5120); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n10240() -{ - set(types::n10240); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n20480() -{ - set(types::n20480); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::set_n40960() -{ - set(types::n40960); - return c.get(); -} -void dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::n16: - j.write_int("n16", c.get()); - break; - case types::n20: - j.write_int("n20", c.get()); - break; - case types::n32: - j.write_int("n32", c.get()); - break; - case types::n40: - j.write_int("n40", c.get()); - break; - case types::n64: - j.write_int("n64", c.get()); - break; - case types::n80: - j.write_int("n80", c.get()); - break; - case types::n128: - j.write_int("n128", c.get()); - break; - case types::n160: - j.write_int("n160", c.get()); - break; - case types::n256: - j.write_int("n256", c.get()); - break; - case types::n320: - j.write_int("n320", c.get()); - break; - case types::n640: - j.write_int("n640", c.get()); - break; - case types::n1280: - j.write_int("n1280", c.get()); - break; - case types::n2560: - j.write_int("n2560", c.get()); - break; - case types::n5120: - j.write_int("n5120", c.get()); - break; - case types::n10240: - j.write_int("n10240", c.get()); - break; - case types::n20480: - j.write_int("n20480", c.get()); - break; - case types::n40960: - j.write_int("n40960", c.get()); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_"); - } - j.end_obj(); -} -SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::n16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); - break; - case types::n20: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); - break; - case types::n32: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); - break; - case types::n40: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::n64: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::n80: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - case types::n128: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); - break; - case types::n160: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); - break; - case types::n256: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)255u)); - break; - case types::n320: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); - break; - case types::n640: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); - break; - case types::n1280: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); - break; - case types::n2560: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); - break; - case types::n5120: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); - break; - case types::n10240: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); - break; - case types::n20480: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)20479u)); - break; - case types::n40960: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)40959u)); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::n16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); - break; - case types::n20: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::n32: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); - break; - case types::n40: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::n64: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::n80: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::n128: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); - break; - case types::n160: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); - break; - case types::n256: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)255u)); - break; - case types::n320: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); - break; - case types::n640: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); - break; - case types::n1280: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); - break; - case types::n2560: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); - break; - case types::n5120: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); - break; - case types::n10240: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); - break; - case types::n20480: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)20479u)); - break; - case types::n40960: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)40959u)); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs60_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::destroy_() {} -void dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::scs120_c_( - const dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::n32: - c.init(other.c.get()); - break; - case types::n40: - c.init(other.c.get()); - break; - case types::n64: - c.init(other.c.get()); - break; - case types::n80: - c.init(other.c.get()); - break; - case types::n128: - c.init(other.c.get()); - break; - case types::n160: - c.init(other.c.get()); - break; - case types::n256: - c.init(other.c.get()); - break; - case types::n320: - c.init(other.c.get()); - break; - case types::n512: - c.init(other.c.get()); - break; - case types::n640: - c.init(other.c.get()); - break; - case types::n1280: - c.init(other.c.get()); - break; - case types::n2560: - c.init(other.c.get()); - break; - case types::n5120: - c.init(other.c.get()); - break; - case types::n10240: - c.init(other.c.get()); - break; - case types::n20480: - c.init(other.c.get()); - break; - case types::n40960: - c.init(other.c.get()); - break; - case types::n81920: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_"); - } -} -dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::operator=( - const dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::n32: - c.set(other.c.get()); - break; - case types::n40: - c.set(other.c.get()); - break; - case types::n64: - c.set(other.c.get()); - break; - case types::n80: - c.set(other.c.get()); - break; - case types::n128: - c.set(other.c.get()); - break; - case types::n160: - c.set(other.c.get()); - break; - case types::n256: - c.set(other.c.get()); - break; - case types::n320: - c.set(other.c.get()); - break; - case types::n512: - c.set(other.c.get()); - break; - case types::n640: - c.set(other.c.get()); - break; - case types::n1280: - c.set(other.c.get()); - break; - case types::n2560: - c.set(other.c.get()); - break; - case types::n5120: - c.set(other.c.get()); - break; - case types::n10240: - c.set(other.c.get()); - break; - case types::n20480: - c.set(other.c.get()); - break; - case types::n40960: - c.set(other.c.get()); - break; - case types::n81920: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_"); - } - - return *this; -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n32() -{ - set(types::n32); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n40() -{ - set(types::n40); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n64() -{ - set(types::n64); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n80() -{ - set(types::n80); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n128() -{ - set(types::n128); - return c.get(); -} -uint8_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n160() -{ - set(types::n160); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n256() -{ - set(types::n256); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n320() -{ - set(types::n320); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n512() -{ - set(types::n512); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n640() -{ - set(types::n640); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n1280() -{ - set(types::n1280); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n2560() -{ - set(types::n2560); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n5120() -{ - set(types::n5120); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n10240() -{ - set(types::n10240); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n20480() -{ - set(types::n20480); - return c.get(); -} -uint16_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n40960() -{ - set(types::n40960); - return c.get(); -} -uint32_t& dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::set_n81920() -{ - set(types::n81920); - return c.get(); -} -void dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::n32: - j.write_int("n32", c.get()); - break; - case types::n40: - j.write_int("n40", c.get()); - break; - case types::n64: - j.write_int("n64", c.get()); - break; - case types::n80: - j.write_int("n80", c.get()); - break; - case types::n128: - j.write_int("n128", c.get()); - break; - case types::n160: - j.write_int("n160", c.get()); - break; - case types::n256: - j.write_int("n256", c.get()); - break; - case types::n320: - j.write_int("n320", c.get()); - break; - case types::n512: - j.write_int("n512", c.get()); - break; - case types::n640: - j.write_int("n640", c.get()); - break; - case types::n1280: - j.write_int("n1280", c.get()); - break; - case types::n2560: - j.write_int("n2560", c.get()); - break; - case types::n5120: - j.write_int("n5120", c.get()); - break; - case types::n10240: - j.write_int("n10240", c.get()); - break; - case types::n20480: - j.write_int("n20480", c.get()); - break; - case types::n40960: - j.write_int("n40960", c.get()); - break; - case types::n81920: - j.write_int("n81920", c.get()); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_"); - } - j.end_obj(); -} -SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::n32: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); - break; - case types::n40: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::n64: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::n80: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - case types::n128: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); - break; - case types::n160: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); - break; - case types::n256: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)255u)); - break; - case types::n320: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)319u)); - break; - case types::n512: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)511u)); - break; - case types::n640: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); - break; - case types::n1280: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)1279u)); - break; - case types::n2560: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)2559u)); - break; - case types::n5120: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); - break; - case types::n10240: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); - break; - case types::n20480: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)20479u)); - break; - case types::n40960: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)40959u)); - break; - case types::n81920: - HANDLE_CODE(pack_integer(bref, c.get(), (uint32_t)0u, (uint32_t)81919u)); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::n32: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); - break; - case types::n40: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::n64: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::n80: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::n128: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); - break; - case types::n160: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); - break; - case types::n256: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)255u)); - break; - case types::n320: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)319u)); - break; - case types::n512: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)511u)); - break; - case types::n640: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); - break; - case types::n1280: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)1279u)); - break; - case types::n2560: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)2559u)); - break; - case types::n5120: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); - break; - case types::n10240: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); - break; - case types::n20480: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)20479u)); - break; - case types::n40960: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)40959u)); - break; - case types::n81920: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint32_t)0u, (uint32_t)81919u)); - break; - default: - log_invalid_choice_id(type_, "dl_ppw_periodicity_and_start_slot_r17_c::scs120_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// DMRS-DownlinkConfig ::= SEQUENCE -SRSASN_CODE dmrs_dl_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)); - - 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 (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= dmrs_dl_r16_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(dmrs_dl_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dmrs_dl_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)); - - 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 (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(dmrs_dl_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void dmrs_dl_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 (phase_tracking_rs_present) { - j.write_fieldname("phaseTrackingRS"); - phase_tracking_rs.to_json(j); - } - if (ext) { - if (dmrs_dl_r16_present) { - j.write_str("dmrs-Downlink-r16", "enabled"); - } - } - j.end_obj(); -} - -const char* dmrs_dl_cfg_s::dmrs_add_position_opts::to_string() const -{ - static const char* names[] = {"pos0", "pos1", "pos3"}; - return convert_enum_idx(names, 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 numbers[] = {0, 1, 3}; - return map_enum_number(numbers, 3, value, "dmrs_dl_cfg_s::dmrs_add_position_e_"); -} - -// DownlinkPreemption ::= SEQUENCE -SRSASN_CODE dl_preemption_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)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_preemption_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)); - - return SRSASN_SUCCESS; -} -void dl_preemption_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); - } - j.end_array(); - j.end_obj(); -} - -const char* dl_preemption_s::time_freq_set_opts::to_string() const -{ - static const char* names[] = {"set0", "set1"}; - return convert_enum_idx(names, 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 numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "dl_preemption_s::time_freq_set_e_"); -} - -// 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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= tpc_idx_pucch_s_scell_r17_present; - group_flags[0] |= tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(tpc_idx_pucch_s_scell_r17_present, 1)); - HANDLE_CODE(bref.pack(tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present, 1)); - if (tpc_idx_pucch_s_scell_r17_present) { - HANDLE_CODE(pack_integer(bref, tpc_idx_pucch_s_scell_r17, (uint8_t)1u, (uint8_t)15u)); - } - if (tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present) { - HANDLE_CODE(pack_integer(bref, tpc_idx_pucch_s_scell_secondary_pucch_group_r17, (uint8_t)1u, (uint8_t)15u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_tpc_cmd_cfg_s::unpack(cbit_ref& bref) -{ - 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)); - } - - 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(tpc_idx_pucch_s_scell_r17_present, 1)); - HANDLE_CODE(bref.unpack(tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present, 1)); - if (tpc_idx_pucch_s_scell_r17_present) { - HANDLE_CODE(unpack_integer(tpc_idx_pucch_s_scell_r17, bref, (uint8_t)1u, (uint8_t)15u)); - } - if (tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present) { - HANDLE_CODE(unpack_integer(tpc_idx_pucch_s_scell_secondary_pucch_group_r17, bref, (uint8_t)1u, (uint8_t)15u)); - } - } - } - return SRSASN_SUCCESS; -} -void pucch_tpc_cmd_cfg_s::to_json(json_writer& j) 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); - } - if (ext) { - if (tpc_idx_pucch_s_scell_r17_present) { - j.write_int("tpc-IndexPUCCH-sSCell-r17", tpc_idx_pucch_s_scell_r17); - } - if (tpc_idx_pucch_s_scell_secondary_pucch_group_r17_present) { - j.write_int("tpc-IndexPUCCH-sScellSecondaryPUCCHgroup-r17", tpc_idx_pucch_s_scell_secondary_pucch_group_r17); - } - } - j.end_obj(); -} - -// PUSCH-TPC-CommandConfig ::= SEQUENCE -SRSASN_CODE pusch_tpc_cmd_cfg_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)); - - if (tpc_idx_present) { - HANDLE_CODE(pack_integer(bref, tpc_idx, (uint8_t)1u, (uint8_t)15u)); - } - 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)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pusch_tpc_cmd_cfg_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)); - - if (tpc_idx_present) { - HANDLE_CODE(unpack_integer(tpc_idx, bref, (uint8_t)1u, (uint8_t)15u)); - } - 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)); - } - - return SRSASN_SUCCESS; -} -void pusch_tpc_cmd_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (tpc_idx_present) { - j.write_int("tpc-Index", tpc_idx); - } - if (tpc_idx_sul_present) { - j.write_int("tpc-IndexSUL", tpc_idx_sul); - } - if (target_cell_present) { - j.write_int("targetCell", target_cell); - } - j.end_obj(); -} - -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_"); - } -} -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::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_"); - } - - return *this; -} -uint8_t& rate_match_pattern_group_item_c_::set_cell_level() -{ - set(types::cell_level); - return c.get(); -} -uint8_t& rate_match_pattern_group_item_c_::set_bwp_level() -{ - set(types::bwp_level); - return c.get(); -} -void rate_match_pattern_group_item_c_::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_"); - } - 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; - } - 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; - } - return SRSASN_SUCCESS; -} - -// RepetitionSchemeConfig-r16 ::= CHOICE -void repeat_scheme_cfg_r16_c::destroy_() -{ - switch (type_) { - case types::fdm_tdm_r16: - c.destroy>(); - break; - case types::slot_based_r16: - c.destroy>(); - break; - default: - break; - } -} -void repeat_scheme_cfg_r16_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::fdm_tdm_r16: - c.init>(); - break; - case types::slot_based_r16: - c.init>(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "repeat_scheme_cfg_r16_c"); - } -} -repeat_scheme_cfg_r16_c::repeat_scheme_cfg_r16_c(const repeat_scheme_cfg_r16_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::fdm_tdm_r16: - c.init(other.c.get>()); - break; - case types::slot_based_r16: - c.init(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "repeat_scheme_cfg_r16_c"); - } -} -repeat_scheme_cfg_r16_c& repeat_scheme_cfg_r16_c::operator=(const repeat_scheme_cfg_r16_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::fdm_tdm_r16: - c.set(other.c.get>()); - break; - case types::slot_based_r16: - c.set(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "repeat_scheme_cfg_r16_c"); - } - - return *this; -} -setup_release_c& repeat_scheme_cfg_r16_c::set_fdm_tdm_r16() -{ - set(types::fdm_tdm_r16); - return c.get>(); -} -setup_release_c& repeat_scheme_cfg_r16_c::set_slot_based_r16() -{ - set(types::slot_based_r16); - return c.get>(); -} -void repeat_scheme_cfg_r16_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::fdm_tdm_r16: - j.write_fieldname("fdm-TDM-r16"); - c.get>().to_json(j); - break; - case types::slot_based_r16: - j.write_fieldname("slotBased-r16"); - c.get>().to_json(j); - break; - default: - log_invalid_choice_id(type_, "repeat_scheme_cfg_r16_c"); - } - j.end_obj(); -} -SRSASN_CODE repeat_scheme_cfg_r16_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::fdm_tdm_r16: - HANDLE_CODE(c.get>().pack(bref)); - break; - case types::slot_based_r16: - HANDLE_CODE(c.get>().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "repeat_scheme_cfg_r16_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE repeat_scheme_cfg_r16_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::fdm_tdm_r16: - HANDLE_CODE(c.get>().unpack(bref)); - break; - case types::slot_based_r16: - HANDLE_CODE(c.get>().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "repeat_scheme_cfg_r16_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// RepetitionSchemeConfig-v1630 ::= SEQUENCE -SRSASN_CODE repeat_scheme_cfg_v1630_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(slot_based_v1630.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE repeat_scheme_cfg_v1630_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(slot_based_v1630.unpack(bref)); - - return SRSASN_SUCCESS; -} -void repeat_scheme_cfg_v1630_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("slotBased-v1630"); - slot_based_v1630.to_json(j); - j.end_obj(); -} - -// SPS-Config ::= SEQUENCE -SRSASN_CODE sps_cfg_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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= sps_cfg_idx_r16_present; - group_flags[0] |= harq_proc_id_offset_r16_present; - group_flags[0] |= periodicity_ext_r16_present; - group_flags[0] |= harq_codebook_id_r16_present; - group_flags[0] |= pdsch_aggregation_factor_r16_present; - group_flags[1] |= sps_harq_deferral_r17_present; - group_flags[1] |= n1_pucch_an_pucch_s_scell_r17_present; - group_flags[1] |= periodicity_ext_r17_present; - group_flags[1] |= nrof_harq_processes_v1710_present; - group_flags[1] |= harq_proc_id_offset_v1700_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(sps_cfg_idx_r16_present, 1)); - HANDLE_CODE(bref.pack(harq_proc_id_offset_r16_present, 1)); - HANDLE_CODE(bref.pack(periodicity_ext_r16_present, 1)); - HANDLE_CODE(bref.pack(harq_codebook_id_r16_present, 1)); - HANDLE_CODE(bref.pack(pdsch_aggregation_factor_r16_present, 1)); - if (sps_cfg_idx_r16_present) { - HANDLE_CODE(pack_integer(bref, sps_cfg_idx_r16, (uint8_t)0u, (uint8_t)7u)); - } - if (harq_proc_id_offset_r16_present) { - HANDLE_CODE(pack_integer(bref, harq_proc_id_offset_r16, (uint8_t)0u, (uint8_t)15u)); - } - if (periodicity_ext_r16_present) { - HANDLE_CODE(pack_integer(bref, periodicity_ext_r16, (uint16_t)1u, (uint16_t)5120u)); - } - if (harq_codebook_id_r16_present) { - HANDLE_CODE(pack_integer(bref, harq_codebook_id_r16, (uint8_t)1u, (uint8_t)2u)); - } - if (pdsch_aggregation_factor_r16_present) { - HANDLE_CODE(pdsch_aggregation_factor_r16.pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(sps_harq_deferral_r17_present, 1)); - HANDLE_CODE(bref.pack(n1_pucch_an_pucch_s_scell_r17_present, 1)); - HANDLE_CODE(bref.pack(periodicity_ext_r17_present, 1)); - HANDLE_CODE(bref.pack(nrof_harq_processes_v1710_present, 1)); - HANDLE_CODE(bref.pack(harq_proc_id_offset_v1700_present, 1)); - if (sps_harq_deferral_r17_present) { - HANDLE_CODE(pack_integer(bref, sps_harq_deferral_r17, (uint8_t)1u, (uint8_t)32u)); - } - if (n1_pucch_an_pucch_s_scell_r17_present) { - HANDLE_CODE(pack_integer(bref, n1_pucch_an_pucch_s_scell_r17, (uint8_t)0u, (uint8_t)127u)); - } - if (periodicity_ext_r17_present) { - HANDLE_CODE(pack_integer(bref, periodicity_ext_r17, (uint16_t)1u, (uint16_t)40960u)); - } - if (nrof_harq_processes_v1710_present) { - HANDLE_CODE(pack_integer(bref, nrof_harq_processes_v1710, (uint8_t)9u, (uint8_t)32u)); - } - if (harq_proc_id_offset_v1700_present) { - HANDLE_CODE(pack_integer(bref, harq_proc_id_offset_v1700, (uint8_t)16u, (uint8_t)31u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sps_cfg_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)); - } - - 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(sps_cfg_idx_r16_present, 1)); - HANDLE_CODE(bref.unpack(harq_proc_id_offset_r16_present, 1)); - HANDLE_CODE(bref.unpack(periodicity_ext_r16_present, 1)); - HANDLE_CODE(bref.unpack(harq_codebook_id_r16_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_aggregation_factor_r16_present, 1)); - if (sps_cfg_idx_r16_present) { - HANDLE_CODE(unpack_integer(sps_cfg_idx_r16, bref, (uint8_t)0u, (uint8_t)7u)); - } - if (harq_proc_id_offset_r16_present) { - HANDLE_CODE(unpack_integer(harq_proc_id_offset_r16, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (periodicity_ext_r16_present) { - HANDLE_CODE(unpack_integer(periodicity_ext_r16, bref, (uint16_t)1u, (uint16_t)5120u)); - } - if (harq_codebook_id_r16_present) { - HANDLE_CODE(unpack_integer(harq_codebook_id_r16, bref, (uint8_t)1u, (uint8_t)2u)); - } - if (pdsch_aggregation_factor_r16_present) { - HANDLE_CODE(pdsch_aggregation_factor_r16.unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(sps_harq_deferral_r17_present, 1)); - HANDLE_CODE(bref.unpack(n1_pucch_an_pucch_s_scell_r17_present, 1)); - HANDLE_CODE(bref.unpack(periodicity_ext_r17_present, 1)); - HANDLE_CODE(bref.unpack(nrof_harq_processes_v1710_present, 1)); - HANDLE_CODE(bref.unpack(harq_proc_id_offset_v1700_present, 1)); - if (sps_harq_deferral_r17_present) { - HANDLE_CODE(unpack_integer(sps_harq_deferral_r17, bref, (uint8_t)1u, (uint8_t)32u)); - } - if (n1_pucch_an_pucch_s_scell_r17_present) { - HANDLE_CODE(unpack_integer(n1_pucch_an_pucch_s_scell_r17, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (periodicity_ext_r17_present) { - HANDLE_CODE(unpack_integer(periodicity_ext_r17, bref, (uint16_t)1u, (uint16_t)40960u)); - } - if (nrof_harq_processes_v1710_present) { - HANDLE_CODE(unpack_integer(nrof_harq_processes_v1710, bref, (uint8_t)9u, (uint8_t)32u)); - } - if (harq_proc_id_offset_v1700_present) { - HANDLE_CODE(unpack_integer(harq_proc_id_offset_v1700, bref, (uint8_t)16u, (uint8_t)31u)); - } - } - } - return SRSASN_SUCCESS; -} -void sps_cfg_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"); - } - if (ext) { - if (sps_cfg_idx_r16_present) { - j.write_int("sps-ConfigIndex-r16", sps_cfg_idx_r16); - } - if (harq_proc_id_offset_r16_present) { - j.write_int("harq-ProcID-Offset-r16", harq_proc_id_offset_r16); - } - if (periodicity_ext_r16_present) { - j.write_int("periodicityExt-r16", periodicity_ext_r16); - } - if (harq_codebook_id_r16_present) { - j.write_int("harq-CodebookID-r16", harq_codebook_id_r16); - } - if (pdsch_aggregation_factor_r16_present) { - j.write_str("pdsch-AggregationFactor-r16", pdsch_aggregation_factor_r16.to_string()); - } - if (sps_harq_deferral_r17_present) { - j.write_int("sps-HARQ-Deferral-r17", sps_harq_deferral_r17); - } - if (n1_pucch_an_pucch_s_scell_r17_present) { - j.write_int("n1PUCCH-AN-PUCCHsSCell-r17", n1_pucch_an_pucch_s_scell_r17); - } - if (periodicity_ext_r17_present) { - j.write_int("periodicityExt-r17", periodicity_ext_r17); - } - if (nrof_harq_processes_v1710_present) { - j.write_int("nrofHARQ-Processes-v1710", nrof_harq_processes_v1710); - } - if (harq_proc_id_offset_v1700_present) { - j.write_int("harq-ProcID-Offset-v1700", harq_proc_id_offset_v1700); - } - } - j.end_obj(); -} - -const char* sps_cfg_s::periodicity_opts::to_string() const -{ - static const char* names[] = {"ms10", - "ms20", - "ms32", - "ms40", - "ms64", - "ms80", - "ms128", - "ms160", - "ms320", - "ms640", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "sps_cfg_s::periodicity_e_"); -} -uint16_t sps_cfg_s::periodicity_opts::to_number() const -{ - static const uint16_t numbers[] = {10, 20, 32, 40, 64, 80, 128, 160, 320, 640}; - return map_enum_number(numbers, 10, value, "sps_cfg_s::periodicity_e_"); -} - -const char* sps_cfg_s::pdsch_aggregation_factor_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n4", "n8"}; - return convert_enum_idx(names, 4, value, "sps_cfg_s::pdsch_aggregation_factor_r16_e_"); -} -uint8_t sps_cfg_s::pdsch_aggregation_factor_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "sps_cfg_s::pdsch_aggregation_factor_r16_e_"); -} - -// SRS-TPC-CommandConfig ::= SEQUENCE -SRSASN_CODE srs_tpc_cmd_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(start_bit_of_format2_3_present, 1)); - HANDLE_CODE(bref.pack(field_type_format2_3_present, 1)); - - if (start_bit_of_format2_3_present) { - HANDLE_CODE(pack_integer(bref, start_bit_of_format2_3, (uint8_t)1u, (uint8_t)31u)); - } - if (field_type_format2_3_present) { - HANDLE_CODE(pack_integer(bref, field_type_format2_3, (uint8_t)0u, (uint8_t)1u)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= start_bit_of_format2_3_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_3_sul_present, 1)); - if (start_bit_of_format2_3_sul_present) { - HANDLE_CODE(pack_integer(bref, start_bit_of_format2_3_sul, (uint8_t)1u, (uint8_t)31u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE srs_tpc_cmd_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(start_bit_of_format2_3_present, 1)); - HANDLE_CODE(bref.unpack(field_type_format2_3_present, 1)); - - if (start_bit_of_format2_3_present) { - HANDLE_CODE(unpack_integer(start_bit_of_format2_3, bref, (uint8_t)1u, (uint8_t)31u)); - } - if (field_type_format2_3_present) { - HANDLE_CODE(unpack_integer(field_type_format2_3, 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_3_sul_present, 1)); - if (start_bit_of_format2_3_sul_present) { - HANDLE_CODE(unpack_integer(start_bit_of_format2_3_sul, bref, (uint8_t)1u, (uint8_t)31u)); - } - } - } - return SRSASN_SUCCESS; -} -void srs_tpc_cmd_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (start_bit_of_format2_3_present) { - j.write_int("startingBitOfFormat2-3", start_bit_of_format2_3); - } - if (field_type_format2_3_present) { - j.write_int("fieldTypeFormat2-3", field_type_format2_3); - } - if (ext) { - if (start_bit_of_format2_3_sul_present) { - j.write_int("startingBitOfFormat2-3SUL", start_bit_of_format2_3_sul); - } - } - j.end_obj(); -} - -// SearchSpaceSwitchConfig-r16 ::= SEQUENCE -SRSASN_CODE search_space_switch_cfg_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(cell_groups_for_switch_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(search_space_switch_delay_r16_present, 1)); - - if (cell_groups_for_switch_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, - cell_groups_for_switch_list_r16, - 1, - 4, - SeqOfPacker>(1, 16, integer_packer(0, 31)))); - } - if (search_space_switch_delay_r16_present) { - HANDLE_CODE(pack_integer(bref, search_space_switch_delay_r16, (uint8_t)10u, (uint8_t)52u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE search_space_switch_cfg_r16_s::unpack(cbit_ref& bref) -{ - bool cell_groups_for_switch_list_r16_present; - HANDLE_CODE(bref.unpack(cell_groups_for_switch_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(search_space_switch_delay_r16_present, 1)); - - if (cell_groups_for_switch_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(cell_groups_for_switch_list_r16, - bref, - 1, - 4, - SeqOfPacker>(1, 16, integer_packer(0, 31)))); - } - if (search_space_switch_delay_r16_present) { - HANDLE_CODE(unpack_integer(search_space_switch_delay_r16, bref, (uint8_t)10u, (uint8_t)52u)); - } - - return SRSASN_SUCCESS; -} -void search_space_switch_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (cell_groups_for_switch_list_r16.size() > 0) { - j.start_array("cellGroupsForSwitchList-r16"); - for (const auto& e1 : cell_groups_for_switch_list_r16) { - j.start_array(); - for (const auto& e2 : e1) { - j.write_int(e2); - } - j.end_array(); - } - j.end_array(); - } - if (search_space_switch_delay_r16_present) { - j.write_int("searchSpaceSwitchDelay-r16", search_space_switch_delay_r16); - } - j.end_obj(); -} - -// SearchSpaceSwitchConfig-r17 ::= SEQUENCE -SRSASN_CODE search_space_switch_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(search_space_switch_timer_r17_present, 1)); - HANDLE_CODE(bref.pack(search_space_switch_delay_r17_present, 1)); - - if (search_space_switch_timer_r17_present) { - HANDLE_CODE(pack_integer(bref, search_space_switch_timer_r17, (uint8_t)1u, (uint8_t)166u)); - } - if (search_space_switch_delay_r17_present) { - HANDLE_CODE(pack_integer(bref, search_space_switch_delay_r17, (uint8_t)10u, (uint8_t)52u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE search_space_switch_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(search_space_switch_timer_r17_present, 1)); - HANDLE_CODE(bref.unpack(search_space_switch_delay_r17_present, 1)); - - if (search_space_switch_timer_r17_present) { - HANDLE_CODE(unpack_integer(search_space_switch_timer_r17, bref, (uint8_t)1u, (uint8_t)166u)); - } - if (search_space_switch_delay_r17_present) { - HANDLE_CODE(unpack_integer(search_space_switch_delay_r17, bref, (uint8_t)10u, (uint8_t)52u)); - } - - return SRSASN_SUCCESS; -} -void search_space_switch_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (search_space_switch_timer_r17_present) { - j.write_int("searchSpaceSwitchTimer-r17", search_space_switch_timer_r17); - } - if (search_space_switch_delay_r17_present) { - j.write_int("searchSpaceSwitchDelay-r17", search_space_switch_delay_r17); - } - j.end_obj(); -} - -// TCI-State ::= SEQUENCE -SRSASN_CODE tci_state_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(qcl_type2_present, 1)); - - 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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= add_pci_r17_present; - group_flags[0] |= pathloss_ref_rs_id_r17_present; - group_flags[0] |= ul_pwr_ctrl_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(add_pci_r17_present, 1)); - HANDLE_CODE(bref.pack(pathloss_ref_rs_id_r17_present, 1)); - HANDLE_CODE(bref.pack(ul_pwr_ctrl_r17_present, 1)); - if (add_pci_r17_present) { - HANDLE_CODE(pack_integer(bref, add_pci_r17, (uint8_t)1u, (uint8_t)7u)); - } - if (pathloss_ref_rs_id_r17_present) { - HANDLE_CODE(pack_integer(bref, pathloss_ref_rs_id_r17, (uint8_t)0u, (uint8_t)63u)); - } - if (ul_pwr_ctrl_r17_present) { - HANDLE_CODE(pack_integer(bref, ul_pwr_ctrl_r17, (uint8_t)1u, (uint8_t)64u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE tci_state_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(qcl_type2_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 (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(add_pci_r17_present, 1)); - HANDLE_CODE(bref.unpack(pathloss_ref_rs_id_r17_present, 1)); - HANDLE_CODE(bref.unpack(ul_pwr_ctrl_r17_present, 1)); - if (add_pci_r17_present) { - HANDLE_CODE(unpack_integer(add_pci_r17, bref, (uint8_t)1u, (uint8_t)7u)); - } - if (pathloss_ref_rs_id_r17_present) { - HANDLE_CODE(unpack_integer(pathloss_ref_rs_id_r17, bref, (uint8_t)0u, (uint8_t)63u)); - } - if (ul_pwr_ctrl_r17_present) { - HANDLE_CODE(unpack_integer(ul_pwr_ctrl_r17, bref, (uint8_t)1u, (uint8_t)64u)); - } - } - } - return SRSASN_SUCCESS; -} -void tci_state_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 (ext) { - if (add_pci_r17_present) { - j.write_int("additionalPCI-r17", add_pci_r17); - } - if (pathloss_ref_rs_id_r17_present) { - j.write_int("pathlossReferenceRS-Id-r17", pathloss_ref_rs_id_r17); - } - if (ul_pwr_ctrl_r17_present) { - j.write_int("ul-powerControl-r17", ul_pwr_ctrl_r17); - } - } - j.end_obj(); -} - -// UplinkCancellation-r16 ::= SEQUENCE -SRSASN_CODE ul_cancellation_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, ci_rnti_r16, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(pack_integer(bref, dci_payload_size_for_ci_r16, (uint8_t)0u, (uint8_t)126u)); - HANDLE_CODE(pack_dyn_seq_of(bref, ci_cfg_per_serving_cell_r16, 1, 32)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_cancellation_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(ci_rnti_r16, bref, (uint32_t)0u, (uint32_t)65535u)); - HANDLE_CODE(unpack_integer(dci_payload_size_for_ci_r16, bref, (uint8_t)0u, (uint8_t)126u)); - HANDLE_CODE(unpack_dyn_seq_of(ci_cfg_per_serving_cell_r16, bref, 1, 32)); - - return SRSASN_SUCCESS; -} -void ul_cancellation_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("ci-RNTI-r16", ci_rnti_r16); - j.write_int("dci-PayloadSizeForCI-r16", dci_payload_size_for_ci_r16); - j.start_array("ci-ConfigurationPerServingCell-r16"); - for (const auto& e1 : ci_cfg_per_serving_cell_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// ZP-CSI-RS-Resource ::= SEQUENCE -SRSASN_CODE zp_csi_rs_res_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - 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 zp_csi_rs_res_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - 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 zp_csi_rs_res_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.end_obj(); -} - -// ZP-CSI-RS-ResourceSet ::= SEQUENCE -SRSASN_CODE zp_csi_rs_res_set_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))); - - return SRSASN_SUCCESS; -} -SRSASN_CODE zp_csi_rs_res_set_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))); - - return SRSASN_SUCCESS; -} -void zp_csi_rs_res_set_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("zp-CSI-RS-ResourceSetId", zp_csi_rs_res_set_id); - j.start_array("zp-CSI-RS-ResourceIdList"); - for (const auto& e1 : zp_csi_rs_res_id_list) { - j.write_int(e1); - } - j.end_array(); - j.end_obj(); -} - -// BeamFailureDetection-r17 ::= SEQUENCE -SRSASN_CODE beam_fail_detection_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(fail_detection_set1_r17_present, 1)); - HANDLE_CODE(bref.pack(fail_detection_set2_r17_present, 1)); - HANDLE_CODE(bref.pack(add_pci_r17_present, 1)); - - if (fail_detection_set1_r17_present) { - HANDLE_CODE(fail_detection_set1_r17.pack(bref)); - } - if (fail_detection_set2_r17_present) { - HANDLE_CODE(fail_detection_set2_r17.pack(bref)); - } - if (add_pci_r17_present) { - HANDLE_CODE(pack_integer(bref, add_pci_r17, (uint8_t)1u, (uint8_t)7u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE beam_fail_detection_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(fail_detection_set1_r17_present, 1)); - HANDLE_CODE(bref.unpack(fail_detection_set2_r17_present, 1)); - HANDLE_CODE(bref.unpack(add_pci_r17_present, 1)); - - if (fail_detection_set1_r17_present) { - HANDLE_CODE(fail_detection_set1_r17.unpack(bref)); - } - if (fail_detection_set2_r17_present) { - HANDLE_CODE(fail_detection_set2_r17.unpack(bref)); - } - if (add_pci_r17_present) { - HANDLE_CODE(unpack_integer(add_pci_r17, bref, (uint8_t)1u, (uint8_t)7u)); - } - - return SRSASN_SUCCESS; -} -void beam_fail_detection_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (fail_detection_set1_r17_present) { - j.write_fieldname("failureDetectionSet1-r17"); - fail_detection_set1_r17.to_json(j); - } - if (fail_detection_set2_r17_present) { - j.write_fieldname("failureDetectionSet2-r17"); - fail_detection_set2_r17.to_json(j); - } - if (add_pci_r17_present) { - j.write_int("additionalPCI-r17", add_pci_r17); - } - j.end_obj(); -} - -// CandidateBeamRS-r16 ::= SEQUENCE -SRSASN_CODE candidate_beam_rs_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(serving_cell_id_present, 1)); - - HANDLE_CODE(candidate_beam_cfg_r16.pack(bref)); - if (serving_cell_id_present) { - HANDLE_CODE(pack_integer(bref, serving_cell_id, (uint8_t)0u, (uint8_t)31u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE candidate_beam_rs_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(serving_cell_id_present, 1)); - - HANDLE_CODE(candidate_beam_cfg_r16.unpack(bref)); - if (serving_cell_id_present) { - HANDLE_CODE(unpack_integer(serving_cell_id, bref, (uint8_t)0u, (uint8_t)31u)); - } - - return SRSASN_SUCCESS; -} -void candidate_beam_rs_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("candidateBeamConfig-r16"); - candidate_beam_cfg_r16.to_json(j); - if (serving_cell_id_present) { - j.write_int("servingCellId", serving_cell_id); - } - j.end_obj(); -} - -void candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::destroy_() {} -void candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::candidate_beam_cfg_r16_c_( - const candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::ssb_r16: - c.init(other.c.get()); - break; - case types::csi_rs_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_"); - } -} -candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_& candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::operator=( - const candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ssb_r16: - c.set(other.c.get()); - break; - case types::csi_rs_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_"); - } - - return *this; -} -uint8_t& candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::set_ssb_r16() -{ - set(types::ssb_r16); - return c.get(); -} -uint8_t& candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::set_csi_rs_r16() -{ - set(types::csi_rs_r16); - return c.get(); -} -void candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ssb_r16: - j.write_int("ssb-r16", c.get()); - break; - case types::csi_rs_r16: - j.write_int("csi-RS-r16", c.get()); - break; - default: - log_invalid_choice_id(type_, "candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ssb_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); - break; - default: - log_invalid_choice_id(type_, "candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ssb_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); - break; - default: - log_invalid_choice_id(type_, "candidate_beam_rs_r16_s::candidate_beam_cfg_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// DL-PPW-PreConfig-r17 ::= SEQUENCE -SRSASN_CODE dl_ppw_pre_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(type_r17_present, 1)); - HANDLE_CODE(bref.pack(prio_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, dl_ppw_id_r17, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(dl_ppw_periodicity_and_start_slot_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, len_r17, (uint8_t)1u, (uint8_t)160u)); - if (type_r17_present) { - HANDLE_CODE(type_r17.pack(bref)); - } - if (prio_r17_present) { - HANDLE_CODE(prio_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE dl_ppw_pre_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(type_r17_present, 1)); - HANDLE_CODE(bref.unpack(prio_r17_present, 1)); - - HANDLE_CODE(unpack_integer(dl_ppw_id_r17, bref, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(dl_ppw_periodicity_and_start_slot_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(len_r17, bref, (uint8_t)1u, (uint8_t)160u)); - if (type_r17_present) { - HANDLE_CODE(type_r17.unpack(bref)); - } - if (prio_r17_present) { - HANDLE_CODE(prio_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void dl_ppw_pre_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("dl-PPW-ID-r17", dl_ppw_id_r17); - j.write_fieldname("dl-PPW-PeriodicityAndStartSlot-r17"); - dl_ppw_periodicity_and_start_slot_r17.to_json(j); - j.write_int("length-r17", len_r17); - if (type_r17_present) { - j.write_str("type-r17", type_r17.to_string()); - } - if (prio_r17_present) { - j.write_str("priority-r17", prio_r17.to_string()); - } - j.end_obj(); -} - -const char* dl_ppw_pre_cfg_r17_s::type_r17_opts::to_string() const -{ - static const char* names[] = {"type1A", "type1B", "type2"}; - return convert_enum_idx(names, 3, value, "dl_ppw_pre_cfg_r17_s::type_r17_e_"); -} - -const char* dl_ppw_pre_cfg_r17_s::prio_r17_opts::to_string() const -{ - static const char* names[] = {"st1", "st2", "st3"}; - return convert_enum_idx(names, 3, value, "dl_ppw_pre_cfg_r17_s::prio_r17_e_"); -} -uint8_t dl_ppw_pre_cfg_r17_s::prio_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3}; - return map_enum_number(numbers, 3, value, "dl_ppw_pre_cfg_r17_s::prio_r17_e_"); -} - -// PDCCH-Config ::= SEQUENCE -SRSASN_CODE pdcch_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(coreset_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(coreset_to_release_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(search_spaces_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(search_spaces_to_release_list.size() > 0, 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 (coreset_to_add_mod_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, coreset_to_add_mod_list, 1, 3)); - } - if (coreset_to_release_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, coreset_to_release_list, 1, 3, integer_packer(0, 11))); - } - if (search_spaces_to_add_mod_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, search_spaces_to_add_mod_list, 1, 10)); - } - if (search_spaces_to_release_list.size() > 0) { - 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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= coreset_to_add_mod_list_size_ext_v1610.is_present(); - group_flags[0] |= coreset_to_release_list_size_ext_r16.is_present(); - group_flags[0] |= search_spaces_to_add_mod_list_ext_r16.is_present(); - group_flags[0] |= ul_cancellation_r16.is_present(); - group_flags[0] |= monitoring_cap_cfg_r16_present; - group_flags[0] |= search_space_switch_cfg_r16.is_present(); - group_flags[1] |= search_spaces_to_add_mod_list_ext_v1700.is_present(); - group_flags[1] |= monitoring_cap_cfg_v1710_present; - group_flags[1] |= search_space_switch_cfg_r17.is_present(); - group_flags[1] |= pdcch_skipping_dur_list_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(coreset_to_add_mod_list_size_ext_v1610.is_present(), 1)); - HANDLE_CODE(bref.pack(coreset_to_release_list_size_ext_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(search_spaces_to_add_mod_list_ext_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(ul_cancellation_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(monitoring_cap_cfg_r16_present, 1)); - HANDLE_CODE(bref.pack(search_space_switch_cfg_r16.is_present(), 1)); - if (coreset_to_add_mod_list_size_ext_v1610.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *coreset_to_add_mod_list_size_ext_v1610, 1, 2)); - } - if (coreset_to_release_list_size_ext_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *coreset_to_release_list_size_ext_r16, 1, 5, integer_packer(0, 15))); - } - if (search_spaces_to_add_mod_list_ext_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *search_spaces_to_add_mod_list_ext_r16, 1, 10)); - } - if (ul_cancellation_r16.is_present()) { - HANDLE_CODE(ul_cancellation_r16->pack(bref)); - } - if (monitoring_cap_cfg_r16_present) { - HANDLE_CODE(monitoring_cap_cfg_r16.pack(bref)); - } - if (search_space_switch_cfg_r16.is_present()) { - HANDLE_CODE(search_space_switch_cfg_r16->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(search_spaces_to_add_mod_list_ext_v1700.is_present(), 1)); - HANDLE_CODE(bref.pack(monitoring_cap_cfg_v1710_present, 1)); - HANDLE_CODE(bref.pack(search_space_switch_cfg_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(pdcch_skipping_dur_list_r17.is_present(), 1)); - if (search_spaces_to_add_mod_list_ext_v1700.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *search_spaces_to_add_mod_list_ext_v1700, 1, 10)); - } - if (search_space_switch_cfg_r17.is_present()) { - HANDLE_CODE(search_space_switch_cfg_r17->pack(bref)); - } - if (pdcch_skipping_dur_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *pdcch_skipping_dur_list_r17, 1, 3, integer_packer(1, 166))); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcch_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool coreset_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(coreset_to_add_mod_list_present, 1)); - bool coreset_to_release_list_present; - HANDLE_CODE(bref.unpack(coreset_to_release_list_present, 1)); - bool search_spaces_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(search_spaces_to_add_mod_list_present, 1)); - bool search_spaces_to_release_list_present; - 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 (coreset_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(coreset_to_add_mod_list, bref, 1, 3)); - } - if (coreset_to_release_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(coreset_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)); - } - - 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); - - unpack_presence_flag(coreset_to_add_mod_list_size_ext_v1610, bref); - unpack_presence_flag(coreset_to_release_list_size_ext_r16, bref); - unpack_presence_flag(search_spaces_to_add_mod_list_ext_r16, bref); - unpack_presence_flag(ul_cancellation_r16, bref); - HANDLE_CODE(bref.unpack(monitoring_cap_cfg_r16_present, 1)); - unpack_presence_flag(search_space_switch_cfg_r16, bref); - if (coreset_to_add_mod_list_size_ext_v1610.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*coreset_to_add_mod_list_size_ext_v1610, bref, 1, 2)); - } - if (coreset_to_release_list_size_ext_r16.is_present()) { - HANDLE_CODE( - unpack_dyn_seq_of(*coreset_to_release_list_size_ext_r16, bref, 1, 5, integer_packer(0, 15))); - } - if (search_spaces_to_add_mod_list_ext_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*search_spaces_to_add_mod_list_ext_r16, bref, 1, 10)); - } - if (ul_cancellation_r16.is_present()) { - HANDLE_CODE(ul_cancellation_r16->unpack(bref)); - } - if (monitoring_cap_cfg_r16_present) { - HANDLE_CODE(monitoring_cap_cfg_r16.unpack(bref)); - } - if (search_space_switch_cfg_r16.is_present()) { - HANDLE_CODE(search_space_switch_cfg_r16->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(search_spaces_to_add_mod_list_ext_v1700, bref); - HANDLE_CODE(bref.unpack(monitoring_cap_cfg_v1710_present, 1)); - unpack_presence_flag(search_space_switch_cfg_r17, bref); - unpack_presence_flag(pdcch_skipping_dur_list_r17, bref); - if (search_spaces_to_add_mod_list_ext_v1700.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*search_spaces_to_add_mod_list_ext_v1700, bref, 1, 10)); - } - if (search_space_switch_cfg_r17.is_present()) { - HANDLE_CODE(search_space_switch_cfg_r17->unpack(bref)); - } - if (pdcch_skipping_dur_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*pdcch_skipping_dur_list_r17, bref, 1, 3, integer_packer(1, 166))); - } - } - } - return SRSASN_SUCCESS; -} -void pdcch_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (coreset_to_add_mod_list.size() > 0) { - j.start_array("controlResourceSetToAddModList"); - for (const auto& e1 : coreset_to_add_mod_list) { - e1.to_json(j); - } - j.end_array(); - } - if (coreset_to_release_list.size() > 0) { - j.start_array("controlResourceSetToReleaseList"); - for (const auto& e1 : coreset_to_release_list) { - j.write_int(e1); - } - j.end_array(); - } - if (search_spaces_to_add_mod_list.size() > 0) { - 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.size() > 0) { - 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); - } - if (ext) { - if (coreset_to_add_mod_list_size_ext_v1610.is_present()) { - j.start_array("controlResourceSetToAddModListSizeExt-v1610"); - for (const auto& e1 : *coreset_to_add_mod_list_size_ext_v1610) { - e1.to_json(j); - } - j.end_array(); - } - if (coreset_to_release_list_size_ext_r16.is_present()) { - j.start_array("controlResourceSetToReleaseListSizeExt-r16"); - for (const auto& e1 : *coreset_to_release_list_size_ext_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (search_spaces_to_add_mod_list_ext_r16.is_present()) { - j.start_array("searchSpacesToAddModListExt-r16"); - for (const auto& e1 : *search_spaces_to_add_mod_list_ext_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (ul_cancellation_r16.is_present()) { - j.write_fieldname("uplinkCancellation-r16"); - ul_cancellation_r16->to_json(j); - } - if (monitoring_cap_cfg_r16_present) { - j.write_str("monitoringCapabilityConfig-r16", monitoring_cap_cfg_r16.to_string()); - } - if (search_space_switch_cfg_r16.is_present()) { - j.write_fieldname("searchSpaceSwitchConfig-r16"); - search_space_switch_cfg_r16->to_json(j); - } - if (search_spaces_to_add_mod_list_ext_v1700.is_present()) { - j.start_array("searchSpacesToAddModListExt-v1700"); - for (const auto& e1 : *search_spaces_to_add_mod_list_ext_v1700) { - e1.to_json(j); - } - j.end_array(); - } - if (monitoring_cap_cfg_v1710_present) { - j.write_str("monitoringCapabilityConfig-v1710", "r17monitoringcapability"); - } - if (search_space_switch_cfg_r17.is_present()) { - j.write_fieldname("searchSpaceSwitchConfig-r17"); - search_space_switch_cfg_r17->to_json(j); - } - if (pdcch_skipping_dur_list_r17.is_present()) { - j.start_array("pdcch-SkippingDurationList-r17"); - for (const auto& e1 : *pdcch_skipping_dur_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - } - j.end_obj(); -} - -const char* pdcch_cfg_s::monitoring_cap_cfg_r16_opts::to_string() const -{ - static const char* names[] = {"r15monitoringcapability", "r16monitoringcapability"}; - return convert_enum_idx(names, 2, value, "pdcch_cfg_s::monitoring_cap_cfg_r16_e_"); -} -uint8_t pdcch_cfg_s::monitoring_cap_cfg_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {15, 16}; - return map_enum_number(numbers, 2, value, "pdcch_cfg_s::monitoring_cap_cfg_r16_e_"); -} - -// PDSCH-Config ::= SEQUENCE -SRSASN_CODE pdsch_cfg_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.size() > 0, 1)); - HANDLE_CODE(bref.pack(tci_states_to_release_list.size() > 0, 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_to_release_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_group1.size() > 0, 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_group2.size() > 0, 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(zp_csi_rs_res_to_release_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(aperiodic_zp_csi_rs_res_sets_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(aperiodic_zp_csi_rs_res_sets_to_release_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(sp_zp_csi_rs_res_sets_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(sp_zp_csi_rs_res_sets_to_release_list.size() > 0, 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, tci_states_to_add_mod_list, 1, 128)); - } - if (tci_states_to_release_list.size() > 0) { - 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_add_mod_list, 1, 4)); - } - if (rate_match_pattern_to_release_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_release_list, 1, 4, integer_packer(0, 3))); - } - if (rate_match_pattern_group1.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_group1, 1, 8)); - } - if (rate_match_pattern_group2.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= max_mimo_layers_r16.is_present(); - group_flags[0] |= minimum_sched_offset_k0_r16.is_present(); - group_flags[0] |= ant_ports_field_presence_dci_1_2_r16_present; - group_flags[0] |= aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16.is_present(); - group_flags[0] |= aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16.is_present(); - group_flags[0] |= dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16.is_present(); - group_flags[0] |= dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16.is_present(); - group_flags[0] |= dmrs_seq_initization_dci_1_2_r16_present; - group_flags[0] |= harq_process_num_size_dci_1_2_r16_present; - group_flags[0] |= mcs_table_dci_1_2_r16_present; - group_flags[0] |= nof_bits_for_rv_dci_1_2_r16_present; - group_flags[0] |= pdsch_time_domain_alloc_list_dci_1_2_r16.is_present(); - group_flags[0] |= prb_bundling_type_dci_1_2_r16.is_present(); - group_flags[0] |= prio_ind_dci_1_2_r16_present; - group_flags[0] |= rate_match_pattern_group1_dci_1_2_r16.is_present(); - group_flags[0] |= rate_match_pattern_group2_dci_1_2_r16.is_present(); - group_flags[0] |= res_alloc_type1_granularity_dci_1_2_r16_present; - group_flags[0] |= vrb_to_prb_interleaver_dci_1_2_r16_present; - group_flags[0] |= ref_of_slivdci_1_2_r16_present; - group_flags[0] |= res_alloc_dci_1_2_r16_present; - group_flags[0] |= prio_ind_dci_1_1_r16_present; - group_flags[0] |= data_scrambling_id_pdsch2_r16_present; - group_flags[0] |= pdsch_time_domain_alloc_list_r16.is_present(); - group_flags[0] |= repeat_scheme_cfg_r16.is_present(); - group_flags[1] |= repeat_scheme_cfg_v1630.is_present(); - group_flags[2] |= pdsch_harq_ack_one_shot_feedback_dci_1_2_r17_present; - group_flags[2] |= pdsch_harq_ack_enh_type3_dci_1_2_r17_present; - group_flags[2] |= pdsch_harq_ack_enh_type3_dci_field_1_2_r17_present; - group_flags[2] |= pdsch_harq_ack_retx_dci_1_2_r17_present; - group_flags[2] |= pucch_s_scell_dyn_dci_1_2_r17_present; - group_flags[2] |= dl_or_joint_tci_state_list_r17.is_present(); - group_flags[2] |= beam_app_time_r17_present; - group_flags[2] |= dummy.is_present(); - group_flags[2] |= dmrs_fd_occ_disabled_for_rank1_pdsch_r17_present; - group_flags[2] |= minimum_sched_offset_k0_r17.is_present(); - group_flags[2] |= harq_process_num_size_dci_1_2_v1700_present; - group_flags[2] |= harq_process_num_size_dci_1_1_r17_present; - group_flags[2] |= mcs_table_r17_present; - group_flags[2] |= mcs_table_dci_1_2_r17_present; - group_flags[2] |= xoverhead_multicast_r17_present; - group_flags[2] |= prio_ind_dci_4_2_r17_present; - group_flags[2] |= size_dci_4_2_r17_present; - group_flags[3] |= pdsch_time_domain_alloc_list_for_multi_pdsch_r17.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_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(minimum_sched_offset_k0_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(ant_ports_field_presence_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(dmrs_seq_initization_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(harq_process_num_size_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(mcs_table_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(nof_bits_for_rv_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(pdsch_time_domain_alloc_list_dci_1_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(prb_bundling_type_dci_1_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(prio_ind_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_group1_dci_1_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(rate_match_pattern_group2_dci_1_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(res_alloc_type1_granularity_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(vrb_to_prb_interleaver_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(ref_of_slivdci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(res_alloc_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(prio_ind_dci_1_1_r16_present, 1)); - HANDLE_CODE(bref.pack(data_scrambling_id_pdsch2_r16_present, 1)); - HANDLE_CODE(bref.pack(pdsch_time_domain_alloc_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(repeat_scheme_cfg_r16.is_present(), 1)); - if (max_mimo_layers_r16.is_present()) { - HANDLE_CODE(max_mimo_layers_r16->pack(bref)); - } - if (minimum_sched_offset_k0_r16.is_present()) { - HANDLE_CODE(minimum_sched_offset_k0_r16->pack(bref)); - } - if (aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16, 1, 16)); - } - if (aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of( - bref, *aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16, 1, 16, integer_packer(0, 15))); - } - if (dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16.is_present()) { - HANDLE_CODE(dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16->pack(bref)); - } - if (dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16.is_present()) { - HANDLE_CODE(dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16->pack(bref)); - } - if (harq_process_num_size_dci_1_2_r16_present) { - HANDLE_CODE(pack_integer(bref, harq_process_num_size_dci_1_2_r16, (uint8_t)0u, (uint8_t)4u)); - } - if (mcs_table_dci_1_2_r16_present) { - HANDLE_CODE(mcs_table_dci_1_2_r16.pack(bref)); - } - if (nof_bits_for_rv_dci_1_2_r16_present) { - HANDLE_CODE(pack_integer(bref, nof_bits_for_rv_dci_1_2_r16, (uint8_t)0u, (uint8_t)2u)); - } - if (pdsch_time_domain_alloc_list_dci_1_2_r16.is_present()) { - HANDLE_CODE(pdsch_time_domain_alloc_list_dci_1_2_r16->pack(bref)); - } - if (prb_bundling_type_dci_1_2_r16.is_present()) { - HANDLE_CODE(prb_bundling_type_dci_1_2_r16->pack(bref)); - } - if (rate_match_pattern_group1_dci_1_2_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *rate_match_pattern_group1_dci_1_2_r16, 1, 8)); - } - if (rate_match_pattern_group2_dci_1_2_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *rate_match_pattern_group2_dci_1_2_r16, 1, 8)); - } - if (res_alloc_type1_granularity_dci_1_2_r16_present) { - HANDLE_CODE(res_alloc_type1_granularity_dci_1_2_r16.pack(bref)); - } - if (vrb_to_prb_interleaver_dci_1_2_r16_present) { - HANDLE_CODE(vrb_to_prb_interleaver_dci_1_2_r16.pack(bref)); - } - if (res_alloc_dci_1_2_r16_present) { - HANDLE_CODE(res_alloc_dci_1_2_r16.pack(bref)); - } - if (data_scrambling_id_pdsch2_r16_present) { - HANDLE_CODE(pack_integer(bref, data_scrambling_id_pdsch2_r16, (uint16_t)0u, (uint16_t)1023u)); - } - if (pdsch_time_domain_alloc_list_r16.is_present()) { - HANDLE_CODE(pdsch_time_domain_alloc_list_r16->pack(bref)); - } - if (repeat_scheme_cfg_r16.is_present()) { - HANDLE_CODE(repeat_scheme_cfg_r16->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(repeat_scheme_cfg_v1630.is_present(), 1)); - if (repeat_scheme_cfg_v1630.is_present()) { - HANDLE_CODE(repeat_scheme_cfg_v1630->pack(bref)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(pdsch_harq_ack_one_shot_feedback_dci_1_2_r17_present, 1)); - HANDLE_CODE(bref.pack(pdsch_harq_ack_enh_type3_dci_1_2_r17_present, 1)); - HANDLE_CODE(bref.pack(pdsch_harq_ack_enh_type3_dci_field_1_2_r17_present, 1)); - HANDLE_CODE(bref.pack(pdsch_harq_ack_retx_dci_1_2_r17_present, 1)); - HANDLE_CODE(bref.pack(pucch_s_scell_dyn_dci_1_2_r17_present, 1)); - HANDLE_CODE(bref.pack(dl_or_joint_tci_state_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(beam_app_time_r17_present, 1)); - HANDLE_CODE(bref.pack(dummy.is_present(), 1)); - HANDLE_CODE(bref.pack(dmrs_fd_occ_disabled_for_rank1_pdsch_r17_present, 1)); - HANDLE_CODE(bref.pack(minimum_sched_offset_k0_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(harq_process_num_size_dci_1_2_v1700_present, 1)); - HANDLE_CODE(bref.pack(harq_process_num_size_dci_1_1_r17_present, 1)); - HANDLE_CODE(bref.pack(mcs_table_r17_present, 1)); - HANDLE_CODE(bref.pack(mcs_table_dci_1_2_r17_present, 1)); - HANDLE_CODE(bref.pack(xoverhead_multicast_r17_present, 1)); - HANDLE_CODE(bref.pack(prio_ind_dci_4_2_r17_present, 1)); - HANDLE_CODE(bref.pack(size_dci_4_2_r17_present, 1)); - if (dl_or_joint_tci_state_list_r17.is_present()) { - HANDLE_CODE(dl_or_joint_tci_state_list_r17->pack(bref)); - } - if (beam_app_time_r17_present) { - HANDLE_CODE(beam_app_time_r17.pack(bref)); - } - if (dummy.is_present()) { - HANDLE_CODE(dummy->pack(bref)); - } - if (minimum_sched_offset_k0_r17.is_present()) { - HANDLE_CODE(minimum_sched_offset_k0_r17->pack(bref)); - } - if (harq_process_num_size_dci_1_2_v1700_present) { - HANDLE_CODE(pack_integer(bref, harq_process_num_size_dci_1_2_v1700, (uint8_t)0u, (uint8_t)5u)); - } - if (harq_process_num_size_dci_1_1_r17_present) { - HANDLE_CODE(pack_integer(bref, harq_process_num_size_dci_1_1_r17, (uint8_t)5u, (uint8_t)5u)); - } - if (xoverhead_multicast_r17_present) { - HANDLE_CODE(xoverhead_multicast_r17.pack(bref)); - } - if (size_dci_4_2_r17_present) { - HANDLE_CODE(pack_integer(bref, size_dci_4_2_r17, (uint8_t)20u, (uint8_t)140u)); - } - } - if (group_flags[3]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(pdsch_time_domain_alloc_list_for_multi_pdsch_r17.is_present(), 1)); - if (pdsch_time_domain_alloc_list_for_multi_pdsch_r17.is_present()) { - HANDLE_CODE(pdsch_time_domain_alloc_list_for_multi_pdsch_r17->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)); - bool tci_states_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(tci_states_to_add_mod_list_present, 1)); - bool tci_states_to_release_list_present; - 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)); - bool rate_match_pattern_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(rate_match_pattern_to_add_mod_list_present, 1)); - bool rate_match_pattern_to_release_list_present; - HANDLE_CODE(bref.unpack(rate_match_pattern_to_release_list_present, 1)); - bool rate_match_pattern_group1_present; - HANDLE_CODE(bref.unpack(rate_match_pattern_group1_present, 1)); - bool rate_match_pattern_group2_present; - 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)); - bool zp_csi_rs_res_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(zp_csi_rs_res_to_add_mod_list_present, 1)); - bool zp_csi_rs_res_to_release_list_present; - HANDLE_CODE(bref.unpack(zp_csi_rs_res_to_release_list_present, 1)); - bool aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(aperiodic_zp_csi_rs_res_sets_to_add_mod_list_present, 1)); - bool aperiodic_zp_csi_rs_res_sets_to_release_list_present; - HANDLE_CODE(bref.unpack(aperiodic_zp_csi_rs_res_sets_to_release_list_present, 1)); - bool sp_zp_csi_rs_res_sets_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(sp_zp_csi_rs_res_sets_to_add_mod_list_present, 1)); - bool sp_zp_csi_rs_res_sets_to_release_list_present; - 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)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(4); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(max_mimo_layers_r16, bref); - unpack_presence_flag(minimum_sched_offset_k0_r16, bref); - HANDLE_CODE(bref.unpack(ant_ports_field_presence_dci_1_2_r16_present, 1)); - unpack_presence_flag(aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16, bref); - unpack_presence_flag(aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16, bref); - unpack_presence_flag(dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16, bref); - unpack_presence_flag(dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16, bref); - HANDLE_CODE(bref.unpack(dmrs_seq_initization_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(harq_process_num_size_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(mcs_table_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(nof_bits_for_rv_dci_1_2_r16_present, 1)); - unpack_presence_flag(pdsch_time_domain_alloc_list_dci_1_2_r16, bref); - unpack_presence_flag(prb_bundling_type_dci_1_2_r16, bref); - HANDLE_CODE(bref.unpack(prio_ind_dci_1_2_r16_present, 1)); - unpack_presence_flag(rate_match_pattern_group1_dci_1_2_r16, bref); - unpack_presence_flag(rate_match_pattern_group2_dci_1_2_r16, bref); - HANDLE_CODE(bref.unpack(res_alloc_type1_granularity_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(vrb_to_prb_interleaver_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(ref_of_slivdci_1_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(res_alloc_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(prio_ind_dci_1_1_r16_present, 1)); - HANDLE_CODE(bref.unpack(data_scrambling_id_pdsch2_r16_present, 1)); - unpack_presence_flag(pdsch_time_domain_alloc_list_r16, bref); - unpack_presence_flag(repeat_scheme_cfg_r16, bref); - if (max_mimo_layers_r16.is_present()) { - HANDLE_CODE(max_mimo_layers_r16->unpack(bref)); - } - if (minimum_sched_offset_k0_r16.is_present()) { - HANDLE_CODE(minimum_sched_offset_k0_r16->unpack(bref)); - } - if (aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16, bref, 1, 16)); - } - if (aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of( - *aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16, bref, 1, 16, integer_packer(0, 15))); - } - if (dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16.is_present()) { - HANDLE_CODE(dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16->unpack(bref)); - } - if (dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16.is_present()) { - HANDLE_CODE(dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16->unpack(bref)); - } - if (harq_process_num_size_dci_1_2_r16_present) { - HANDLE_CODE(unpack_integer(harq_process_num_size_dci_1_2_r16, bref, (uint8_t)0u, (uint8_t)4u)); - } - if (mcs_table_dci_1_2_r16_present) { - HANDLE_CODE(mcs_table_dci_1_2_r16.unpack(bref)); - } - if (nof_bits_for_rv_dci_1_2_r16_present) { - HANDLE_CODE(unpack_integer(nof_bits_for_rv_dci_1_2_r16, bref, (uint8_t)0u, (uint8_t)2u)); - } - if (pdsch_time_domain_alloc_list_dci_1_2_r16.is_present()) { - HANDLE_CODE(pdsch_time_domain_alloc_list_dci_1_2_r16->unpack(bref)); - } - if (prb_bundling_type_dci_1_2_r16.is_present()) { - HANDLE_CODE(prb_bundling_type_dci_1_2_r16->unpack(bref)); - } - if (rate_match_pattern_group1_dci_1_2_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*rate_match_pattern_group1_dci_1_2_r16, bref, 1, 8)); - } - if (rate_match_pattern_group2_dci_1_2_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*rate_match_pattern_group2_dci_1_2_r16, bref, 1, 8)); - } - if (res_alloc_type1_granularity_dci_1_2_r16_present) { - HANDLE_CODE(res_alloc_type1_granularity_dci_1_2_r16.unpack(bref)); - } - if (vrb_to_prb_interleaver_dci_1_2_r16_present) { - HANDLE_CODE(vrb_to_prb_interleaver_dci_1_2_r16.unpack(bref)); - } - if (res_alloc_dci_1_2_r16_present) { - HANDLE_CODE(res_alloc_dci_1_2_r16.unpack(bref)); - } - if (data_scrambling_id_pdsch2_r16_present) { - HANDLE_CODE(unpack_integer(data_scrambling_id_pdsch2_r16, bref, (uint16_t)0u, (uint16_t)1023u)); - } - if (pdsch_time_domain_alloc_list_r16.is_present()) { - HANDLE_CODE(pdsch_time_domain_alloc_list_r16->unpack(bref)); - } - if (repeat_scheme_cfg_r16.is_present()) { - HANDLE_CODE(repeat_scheme_cfg_r16->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(repeat_scheme_cfg_v1630, bref); - if (repeat_scheme_cfg_v1630.is_present()) { - HANDLE_CODE(repeat_scheme_cfg_v1630->unpack(bref)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(pdsch_harq_ack_one_shot_feedback_dci_1_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_harq_ack_enh_type3_dci_1_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_harq_ack_enh_type3_dci_field_1_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_harq_ack_retx_dci_1_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(pucch_s_scell_dyn_dci_1_2_r17_present, 1)); - unpack_presence_flag(dl_or_joint_tci_state_list_r17, bref); - HANDLE_CODE(bref.unpack(beam_app_time_r17_present, 1)); - unpack_presence_flag(dummy, bref); - HANDLE_CODE(bref.unpack(dmrs_fd_occ_disabled_for_rank1_pdsch_r17_present, 1)); - unpack_presence_flag(minimum_sched_offset_k0_r17, bref); - HANDLE_CODE(bref.unpack(harq_process_num_size_dci_1_2_v1700_present, 1)); - HANDLE_CODE(bref.unpack(harq_process_num_size_dci_1_1_r17_present, 1)); - HANDLE_CODE(bref.unpack(mcs_table_r17_present, 1)); - HANDLE_CODE(bref.unpack(mcs_table_dci_1_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(xoverhead_multicast_r17_present, 1)); - HANDLE_CODE(bref.unpack(prio_ind_dci_4_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(size_dci_4_2_r17_present, 1)); - if (dl_or_joint_tci_state_list_r17.is_present()) { - HANDLE_CODE(dl_or_joint_tci_state_list_r17->unpack(bref)); - } - if (beam_app_time_r17_present) { - HANDLE_CODE(beam_app_time_r17.unpack(bref)); - } - if (dummy.is_present()) { - HANDLE_CODE(dummy->unpack(bref)); - } - if (minimum_sched_offset_k0_r17.is_present()) { - HANDLE_CODE(minimum_sched_offset_k0_r17->unpack(bref)); - } - if (harq_process_num_size_dci_1_2_v1700_present) { - HANDLE_CODE(unpack_integer(harq_process_num_size_dci_1_2_v1700, bref, (uint8_t)0u, (uint8_t)5u)); - } - if (harq_process_num_size_dci_1_1_r17_present) { - HANDLE_CODE(unpack_integer(harq_process_num_size_dci_1_1_r17, bref, (uint8_t)5u, (uint8_t)5u)); - } - if (xoverhead_multicast_r17_present) { - HANDLE_CODE(xoverhead_multicast_r17.unpack(bref)); - } - if (size_dci_4_2_r17_present) { - HANDLE_CODE(unpack_integer(size_dci_4_2_r17, bref, (uint8_t)20u, (uint8_t)140u)); - } - } - if (group_flags[3]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(pdsch_time_domain_alloc_list_for_multi_pdsch_r17, bref); - if (pdsch_time_domain_alloc_list_for_multi_pdsch_r17.is_present()) { - HANDLE_CODE(pdsch_time_domain_alloc_list_for_multi_pdsch_r17->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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - j.start_array("rateMatchPatternGroup1"); - for (const auto& e1 : rate_match_pattern_group1) { - e1.to_json(j); - } - j.end_array(); - } - if (rate_match_pattern_group2.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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); - } - if (ext) { - if (max_mimo_layers_r16.is_present()) { - j.write_fieldname("maxMIMO-Layers-r16"); - max_mimo_layers_r16->to_json(j); - } - if (minimum_sched_offset_k0_r16.is_present()) { - j.write_fieldname("minimumSchedulingOffsetK0-r16"); - minimum_sched_offset_k0_r16->to_json(j); - } - if (ant_ports_field_presence_dci_1_2_r16_present) { - j.write_str("antennaPortsFieldPresenceDCI-1-2-r16", "enabled"); - } - if (aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16.is_present()) { - j.start_array("aperiodicZP-CSI-RS-ResourceSetsToAddModListDCI-1-2-r16"); - for (const auto& e1 : *aperiodic_zp_csi_rs_res_sets_to_add_mod_list_dci_1_2_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16.is_present()) { - j.start_array("aperiodicZP-CSI-RS-ResourceSetsToReleaseListDCI-1-2-r16"); - for (const auto& e1 : *aperiodic_zp_csi_rs_res_sets_to_release_list_dci_1_2_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16.is_present()) { - j.write_fieldname("dmrs-DownlinkForPDSCH-MappingTypeA-DCI-1-2-r16"); - dmrs_dl_for_pdsch_map_type_a_dci_1_2_r16->to_json(j); - } - if (dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16.is_present()) { - j.write_fieldname("dmrs-DownlinkForPDSCH-MappingTypeB-DCI-1-2-r16"); - dmrs_dl_for_pdsch_map_type_b_dci_1_2_r16->to_json(j); - } - if (dmrs_seq_initization_dci_1_2_r16_present) { - j.write_str("dmrs-SequenceInitializationDCI-1-2-r16", "enabled"); - } - if (harq_process_num_size_dci_1_2_r16_present) { - j.write_int("harq-ProcessNumberSizeDCI-1-2-r16", harq_process_num_size_dci_1_2_r16); - } - if (mcs_table_dci_1_2_r16_present) { - j.write_str("mcs-TableDCI-1-2-r16", mcs_table_dci_1_2_r16.to_string()); - } - if (nof_bits_for_rv_dci_1_2_r16_present) { - j.write_int("numberOfBitsForRV-DCI-1-2-r16", nof_bits_for_rv_dci_1_2_r16); - } - if (pdsch_time_domain_alloc_list_dci_1_2_r16.is_present()) { - j.write_fieldname("pdsch-TimeDomainAllocationListDCI-1-2-r16"); - pdsch_time_domain_alloc_list_dci_1_2_r16->to_json(j); - } - if (prb_bundling_type_dci_1_2_r16.is_present()) { - j.write_fieldname("prb-BundlingTypeDCI-1-2-r16"); - prb_bundling_type_dci_1_2_r16->to_json(j); - } - if (prio_ind_dci_1_2_r16_present) { - j.write_str("priorityIndicatorDCI-1-2-r16", "enabled"); - } - if (rate_match_pattern_group1_dci_1_2_r16.is_present()) { - j.start_array("rateMatchPatternGroup1DCI-1-2-r16"); - for (const auto& e1 : *rate_match_pattern_group1_dci_1_2_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (rate_match_pattern_group2_dci_1_2_r16.is_present()) { - j.start_array("rateMatchPatternGroup2DCI-1-2-r16"); - for (const auto& e1 : *rate_match_pattern_group2_dci_1_2_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (res_alloc_type1_granularity_dci_1_2_r16_present) { - j.write_str("resourceAllocationType1GranularityDCI-1-2-r16", res_alloc_type1_granularity_dci_1_2_r16.to_string()); - } - if (vrb_to_prb_interleaver_dci_1_2_r16_present) { - j.write_str("vrb-ToPRB-InterleaverDCI-1-2-r16", vrb_to_prb_interleaver_dci_1_2_r16.to_string()); - } - if (ref_of_slivdci_1_2_r16_present) { - j.write_str("referenceOfSLIVDCI-1-2-r16", "enabled"); - } - if (res_alloc_dci_1_2_r16_present) { - j.write_str("resourceAllocationDCI-1-2-r16", res_alloc_dci_1_2_r16.to_string()); - } - if (prio_ind_dci_1_1_r16_present) { - j.write_str("priorityIndicatorDCI-1-1-r16", "enabled"); - } - if (data_scrambling_id_pdsch2_r16_present) { - j.write_int("dataScramblingIdentityPDSCH2-r16", data_scrambling_id_pdsch2_r16); - } - if (pdsch_time_domain_alloc_list_r16.is_present()) { - j.write_fieldname("pdsch-TimeDomainAllocationList-r16"); - pdsch_time_domain_alloc_list_r16->to_json(j); - } - if (repeat_scheme_cfg_r16.is_present()) { - j.write_fieldname("repetitionSchemeConfig-r16"); - repeat_scheme_cfg_r16->to_json(j); - } - if (repeat_scheme_cfg_v1630.is_present()) { - j.write_fieldname("repetitionSchemeConfig-v1630"); - repeat_scheme_cfg_v1630->to_json(j); - } - if (pdsch_harq_ack_one_shot_feedback_dci_1_2_r17_present) { - j.write_str("pdsch-HARQ-ACK-OneShotFeedbackDCI-1-2-r17", "enabled"); - } - if (pdsch_harq_ack_enh_type3_dci_1_2_r17_present) { - j.write_str("pdsch-HARQ-ACK-EnhType3DCI-1-2-r17", "enabled"); - } - if (pdsch_harq_ack_enh_type3_dci_field_1_2_r17_present) { - j.write_str("pdsch-HARQ-ACK-EnhType3DCI-Field-1-2-r17", "enabled"); - } - if (pdsch_harq_ack_retx_dci_1_2_r17_present) { - j.write_str("pdsch-HARQ-ACK-RetxDCI-1-2-r17", "enabled"); - } - if (pucch_s_scell_dyn_dci_1_2_r17_present) { - j.write_str("pucch-sSCellDynDCI-1-2-r17", "enabled"); - } - if (dl_or_joint_tci_state_list_r17.is_present()) { - j.write_fieldname("dl-OrJointTCI-StateList-r17"); - dl_or_joint_tci_state_list_r17->to_json(j); - } - if (beam_app_time_r17_present) { - j.write_str("beamAppTime-r17", beam_app_time_r17.to_string()); - } - if (dummy.is_present()) { - j.write_fieldname("dummy"); - dummy->to_json(j); - } - if (dmrs_fd_occ_disabled_for_rank1_pdsch_r17_present) { - j.write_str("dmrs-FD-OCC-DisabledForRank1-PDSCH-r17", "true"); - } - if (minimum_sched_offset_k0_r17.is_present()) { - j.write_fieldname("minimumSchedulingOffsetK0-r17"); - minimum_sched_offset_k0_r17->to_json(j); - } - if (harq_process_num_size_dci_1_2_v1700_present) { - j.write_int("harq-ProcessNumberSizeDCI-1-2-v1700", harq_process_num_size_dci_1_2_v1700); - } - if (harq_process_num_size_dci_1_1_r17_present) { - j.write_int("harq-ProcessNumberSizeDCI-1-1-r17", harq_process_num_size_dci_1_1_r17); - } - if (mcs_table_r17_present) { - j.write_str("mcs-Table-r17", "qam1024"); - } - if (mcs_table_dci_1_2_r17_present) { - j.write_str("mcs-TableDCI-1-2-r17", "qam1024"); - } - if (xoverhead_multicast_r17_present) { - j.write_str("xOverheadMulticast-r17", xoverhead_multicast_r17.to_string()); - } - if (prio_ind_dci_4_2_r17_present) { - j.write_str("priorityIndicatorDCI-4-2-r17", "enabled"); - } - if (size_dci_4_2_r17_present) { - j.write_int("sizeDCI-4-2-r17", size_dci_4_2_r17); - } - if (pdsch_time_domain_alloc_list_for_multi_pdsch_r17.is_present()) { - j.write_fieldname("pdsch-TimeDomainAllocationListForMultiPDSCH-r17"); - pdsch_time_domain_alloc_list_for_multi_pdsch_r17->to_json(j); - } - } - j.end_obj(); -} - -const char* pdsch_cfg_s::vrb_to_prb_interleaver_opts::to_string() const -{ - static const char* names[] = {"n2", "n4"}; - return convert_enum_idx(names, 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 numbers[] = {2, 4}; - return map_enum_number(numbers, 2, value, "pdsch_cfg_s::vrb_to_prb_interleaver_e_"); -} - -const char* pdsch_cfg_s::res_alloc_opts::to_string() const -{ - static const char* names[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; - return convert_enum_idx(names, 3, value, "pdsch_cfg_s::res_alloc_e_"); -} -uint8_t pdsch_cfg_s::res_alloc_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "pdsch_cfg_s::res_alloc_e_"); -} - -const char* pdsch_cfg_s::pdsch_aggregation_factor_opts::to_string() const -{ - static const char* names[] = {"n2", "n4", "n8"}; - return convert_enum_idx(names, 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 numbers[] = {2, 4, 8}; - return map_enum_number(numbers, 3, value, "pdsch_cfg_s::pdsch_aggregation_factor_e_"); -} - -const char* pdsch_cfg_s::rbg_size_opts::to_string() const -{ - static const char* names[] = {"config1", "config2"}; - return convert_enum_idx(names, 2, value, "pdsch_cfg_s::rbg_size_e_"); -} -uint8_t pdsch_cfg_s::rbg_size_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "pdsch_cfg_s::rbg_size_e_"); -} - -const char* pdsch_cfg_s::mcs_table_opts::to_string() const -{ - static const char* names[] = {"qam256", "qam64LowSE"}; - return convert_enum_idx(names, 2, value, "pdsch_cfg_s::mcs_table_e_"); -} -uint16_t pdsch_cfg_s::mcs_table_opts::to_number() const -{ - static const uint16_t numbers[] = {256, 64}; - return map_enum_number(numbers, 2, value, "pdsch_cfg_s::mcs_table_e_"); -} - -const char* pdsch_cfg_s::max_nrof_code_words_sched_by_dci_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, 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 numbers[] = {1, 2}; - return map_enum_number(numbers, 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::dyn_bundling: - c.destroy(); - break; - default: - break; - } -} -void pdsch_cfg_s::prb_bundling_type_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::static_bundling: - c.init(); - break; - case types::dyn_bundling: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); - } -} -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::static_bundling: - c.init(other.c.get()); - break; - case types::dyn_bundling: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::static_bundling: - c.set(other.c.get()); - break; - case types::dyn_bundling: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); - } - - return *this; -} -pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_& pdsch_cfg_s::prb_bundling_type_c_::set_static_bundling() -{ - set(types::static_bundling); - return c.get(); -} -pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_& pdsch_cfg_s::prb_bundling_type_c_::set_dyn_bundling() -{ - set(types::dyn_bundling); - return c.get(); -} -void pdsch_cfg_s::prb_bundling_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(); - break; - case types::dyn_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_, "pdsch_cfg_s::prb_bundling_type_c_"); - } - j.end_obj(); -} -SRSASN_CODE pdsch_cfg_s::prb_bundling_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)); - } - break; - case types::dyn_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; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pdsch_cfg_s::prb_bundling_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)); - } - break; - case types::dyn_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; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_opts::to_string() const -{ - static const char* names[] = {"n4", "wideband"}; - return convert_enum_idx(names, 2, value, "pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_e_"); -} -uint8_t pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_opts::to_number() const -{ - static const uint8_t numbers[] = {4}; - return map_enum_number(numbers, 1, value, "pdsch_cfg_s::prb_bundling_type_c_::static_bundling_s_::bundle_size_e_"); -} - -const char* pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_::bundle_size_set1_opts::to_string() const -{ - static const char* names[] = {"n4", "wideband", "n2-wideband", "n4-wideband"}; - return convert_enum_idx(names, 4, value, "pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_::bundle_size_set1_e_"); -} - -const char* pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_::bundle_size_set2_opts::to_string() const -{ - static const char* names[] = {"n4", "wideband"}; - return convert_enum_idx(names, 2, value, "pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_::bundle_size_set2_e_"); -} -uint8_t pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_::bundle_size_set2_opts::to_number() const -{ - static const uint8_t numbers[] = {4}; - return map_enum_number(numbers, 1, value, "pdsch_cfg_s::prb_bundling_type_c_::dyn_bundling_s_::bundle_size_set2_e_"); -} - -const char* pdsch_cfg_s::mcs_table_dci_1_2_r16_opts::to_string() const -{ - static const char* names[] = {"qam256", "qam64LowSE"}; - return convert_enum_idx(names, 2, value, "pdsch_cfg_s::mcs_table_dci_1_2_r16_e_"); -} -uint16_t pdsch_cfg_s::mcs_table_dci_1_2_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {256, 64}; - return map_enum_number(numbers, 2, value, "pdsch_cfg_s::mcs_table_dci_1_2_r16_e_"); -} - -void pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::destroy_() -{ - switch (type_) { - case types::static_bundling_r16: - c.destroy(); - break; - case types::dyn_bundling_r16: - c.destroy(); - break; - default: - break; - } -} -void pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::static_bundling_r16: - c.init(); - break; - case types::dyn_bundling_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_"); - } -} -pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::prb_bundling_type_dci_1_2_r16_c_( - const pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::static_bundling_r16: - c.init(other.c.get()); - break; - case types::dyn_bundling_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_"); - } -} -pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_& -pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::operator=(const pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::static_bundling_r16: - c.set(other.c.get()); - break; - case types::dyn_bundling_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_"); - } - - return *this; -} -pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::static_bundling_r16_s_& -pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::set_static_bundling_r16() -{ - set(types::static_bundling_r16); - return c.get(); -} -pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_& -pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::set_dyn_bundling_r16() -{ - set(types::dyn_bundling_r16); - return c.get(); -} -void pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::static_bundling_r16: - j.write_fieldname("staticBundling-r16"); - j.start_obj(); - if (c.get().bundle_size_r16_present) { - j.write_str("bundleSize-r16", c.get().bundle_size_r16.to_string()); - } - j.end_obj(); - break; - case types::dyn_bundling_r16: - j.write_fieldname("dynamicBundling-r16"); - j.start_obj(); - if (c.get().bundle_size_set1_r16_present) { - j.write_str("bundleSizeSet1-r16", c.get().bundle_size_set1_r16.to_string()); - } - if (c.get().bundle_size_set2_r16_present) { - j.write_str("bundleSizeSet2-r16", c.get().bundle_size_set2_r16.to_string()); - } - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::static_bundling_r16: - HANDLE_CODE(bref.pack(c.get().bundle_size_r16_present, 1)); - if (c.get().bundle_size_r16_present) { - HANDLE_CODE(c.get().bundle_size_r16.pack(bref)); - } - break; - case types::dyn_bundling_r16: - HANDLE_CODE(bref.pack(c.get().bundle_size_set1_r16_present, 1)); - HANDLE_CODE(bref.pack(c.get().bundle_size_set2_r16_present, 1)); - if (c.get().bundle_size_set1_r16_present) { - HANDLE_CODE(c.get().bundle_size_set1_r16.pack(bref)); - } - if (c.get().bundle_size_set2_r16_present) { - HANDLE_CODE(c.get().bundle_size_set2_r16.pack(bref)); - } - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::static_bundling_r16: - HANDLE_CODE(bref.unpack(c.get().bundle_size_r16_present, 1)); - if (c.get().bundle_size_r16_present) { - HANDLE_CODE(c.get().bundle_size_r16.unpack(bref)); - } - break; - case types::dyn_bundling_r16: - HANDLE_CODE(bref.unpack(c.get().bundle_size_set1_r16_present, 1)); - HANDLE_CODE(bref.unpack(c.get().bundle_size_set2_r16_present, 1)); - if (c.get().bundle_size_set1_r16_present) { - HANDLE_CODE(c.get().bundle_size_set1_r16.unpack(bref)); - } - if (c.get().bundle_size_set2_r16_present) { - HANDLE_CODE(c.get().bundle_size_set2_r16.unpack(bref)); - } - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* -pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::static_bundling_r16_s_::bundle_size_r16_opts::to_string() const -{ - static const char* names[] = {"n4", "wideband"}; - return convert_enum_idx( - names, 2, value, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::static_bundling_r16_s_::bundle_size_r16_e_"); -} -uint8_t pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::static_bundling_r16_s_::bundle_size_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {4}; - return map_enum_number( - numbers, 1, value, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::static_bundling_r16_s_::bundle_size_r16_e_"); -} - -const char* -pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_::bundle_size_set1_r16_opts::to_string() const -{ - static const char* names[] = {"n4", "wideband", "n2-wideband", "n4-wideband"}; - return convert_enum_idx( - names, 4, value, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_::bundle_size_set1_r16_e_"); -} - -const char* -pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_::bundle_size_set2_r16_opts::to_string() const -{ - static const char* names[] = {"n4", "wideband"}; - return convert_enum_idx( - names, 2, value, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_::bundle_size_set2_r16_e_"); -} -uint8_t pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_::bundle_size_set2_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {4}; - return map_enum_number( - numbers, 1, value, "pdsch_cfg_s::prb_bundling_type_dci_1_2_r16_c_::dyn_bundling_r16_s_::bundle_size_set2_r16_e_"); -} - -const char* pdsch_cfg_s::res_alloc_type1_granularity_dci_1_2_r16_opts::to_string() const -{ - static const char* names[] = {"n2", "n4", "n8", "n16"}; - return convert_enum_idx(names, 4, value, "pdsch_cfg_s::res_alloc_type1_granularity_dci_1_2_r16_e_"); -} -uint8_t pdsch_cfg_s::res_alloc_type1_granularity_dci_1_2_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 8, 16}; - return map_enum_number(numbers, 4, value, "pdsch_cfg_s::res_alloc_type1_granularity_dci_1_2_r16_e_"); -} - -const char* pdsch_cfg_s::vrb_to_prb_interleaver_dci_1_2_r16_opts::to_string() const -{ - static const char* names[] = {"n2", "n4"}; - return convert_enum_idx(names, 2, value, "pdsch_cfg_s::vrb_to_prb_interleaver_dci_1_2_r16_e_"); -} -uint8_t pdsch_cfg_s::vrb_to_prb_interleaver_dci_1_2_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4}; - return map_enum_number(numbers, 2, value, "pdsch_cfg_s::vrb_to_prb_interleaver_dci_1_2_r16_e_"); -} - -const char* pdsch_cfg_s::res_alloc_dci_1_2_r16_opts::to_string() const -{ - static const char* names[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; - return convert_enum_idx(names, 3, value, "pdsch_cfg_s::res_alloc_dci_1_2_r16_e_"); -} -uint8_t pdsch_cfg_s::res_alloc_dci_1_2_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "pdsch_cfg_s::res_alloc_dci_1_2_r16_e_"); -} - -void pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::destroy_() -{ - switch (type_) { - case types::explicitlist: - c.destroy(); - break; - case types::unified_tci_state_ref_r17: - c.destroy(); - break; - default: - break; - } -} -void pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::explicitlist: - c.init(); - break; - case types::unified_tci_state_ref_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_"); - } -} -pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::dl_or_joint_tci_state_list_r17_c_( - const pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::explicitlist: - c.init(other.c.get()); - break; - case types::unified_tci_state_ref_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_"); - } -} -pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_& -pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::operator=(const pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::explicitlist: - c.set(other.c.get()); - break; - case types::unified_tci_state_ref_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_"); - } - - return *this; -} -pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::explicitlist_s_& -pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::set_explicitlist() -{ - set(types::explicitlist); - return c.get(); -} -serving_cell_and_bwp_id_r17_s& pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::set_unified_tci_state_ref_r17() -{ - set(types::unified_tci_state_ref_r17); - return c.get(); -} -void pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::explicitlist: - j.write_fieldname("explicitlist"); - j.start_obj(); - if (c.get().dl_or_joint_tci_state_to_add_mod_list_r17.size() > 0) { - j.start_array("dl-OrJointTCI-StateToAddModList-r17"); - for (const auto& e1 : c.get().dl_or_joint_tci_state_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (c.get().dl_or_joint_tci_state_to_release_list_r17.size() > 0) { - j.start_array("dl-OrJointTCI-StateToReleaseList-r17"); - for (const auto& e1 : c.get().dl_or_joint_tci_state_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); - break; - case types::unified_tci_state_ref_r17: - j.write_fieldname("unifiedTCI-StateRef-r17"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::explicitlist: - HANDLE_CODE(bref.pack(c.get().dl_or_joint_tci_state_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(c.get().dl_or_joint_tci_state_to_release_list_r17.size() > 0, 1)); - if (c.get().dl_or_joint_tci_state_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, c.get().dl_or_joint_tci_state_to_add_mod_list_r17, 1, 128)); - } - if (c.get().dl_or_joint_tci_state_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, - c.get().dl_or_joint_tci_state_to_release_list_r17, - 1, - 128, - integer_packer(0, 127))); - } - break; - case types::unified_tci_state_ref_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::explicitlist: - bool dl_or_joint_tci_state_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(dl_or_joint_tci_state_to_add_mod_list_r17_present, 1)); - bool dl_or_joint_tci_state_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(dl_or_joint_tci_state_to_release_list_r17_present, 1)); - if (dl_or_joint_tci_state_to_add_mod_list_r17_present) { - HANDLE_CODE( - unpack_dyn_seq_of(c.get().dl_or_joint_tci_state_to_add_mod_list_r17, bref, 1, 128)); - } - if (dl_or_joint_tci_state_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(c.get().dl_or_joint_tci_state_to_release_list_r17, - bref, - 1, - 128, - integer_packer(0, 127))); - } - break; - case types::unified_tci_state_ref_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "pdsch_cfg_s::dl_or_joint_tci_state_list_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* pdsch_cfg_s::beam_app_time_r17_opts::to_string() const -{ - static const char* names[] = {"n1", - "n2", - "n4", - "n7", - "n14", - "n28", - "n42", - "n56", - "n70", - "n84", - "n98", - "n112", - "n224", - "n336", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "pdsch_cfg_s::beam_app_time_r17_e_"); -} -uint16_t pdsch_cfg_s::beam_app_time_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {1, 2, 4, 7, 14, 28, 42, 56, 70, 84, 98, 112, 224, 336}; - return map_enum_number(numbers, 14, value, "pdsch_cfg_s::beam_app_time_r17_e_"); -} - -const char* pdsch_cfg_s::xoverhead_multicast_r17_opts::to_string() const -{ - static const char* names[] = {"xOh6", "xOh12", "xOh18"}; - return convert_enum_idx(names, 3, value, "pdsch_cfg_s::xoverhead_multicast_r17_e_"); -} -uint8_t pdsch_cfg_s::xoverhead_multicast_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {6, 12, 18}; - return map_enum_number(numbers, 3, value, "pdsch_cfg_s::xoverhead_multicast_r17_e_"); -} - -// RadioLinkMonitoringRS ::= SEQUENCE -SRSASN_CODE radio_link_monitoring_rs_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)); - - 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)); - - 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(); -} - -const char* radio_link_monitoring_rs_s::purpose_opts::to_string() const -{ - static const char* names[] = {"beamFailure", "rlf", "both"}; - return convert_enum_idx(names, 3, value, "radio_link_monitoring_rs_s::purpose_e_"); -} - -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_"); - } - - return *this; -} -uint8_t& radio_link_monitoring_rs_s::detection_res_c_::set_ssb_idx() -{ - set(types::ssb_idx); - return c.get(); -} -uint8_t& radio_link_monitoring_rs_s::detection_res_c_::set_csi_rs_idx() -{ - set(types::csi_rs_idx); - return c.get(); -} -void radio_link_monitoring_rs_s::detection_res_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()); - 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; - } - 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; - } - return SRSASN_SUCCESS; -} - -// BeamFailureRecoveryRSConfig-r16 ::= SEQUENCE -SRSASN_CODE beam_fail_recovery_rs_cfg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(rsrp_thres_bfr_r16_present, 1)); - HANDLE_CODE(bref.pack(candidate_beam_rs_list_r16.size() > 0, 1)); - - if (rsrp_thres_bfr_r16_present) { - HANDLE_CODE(pack_integer(bref, rsrp_thres_bfr_r16, (uint8_t)0u, (uint8_t)127u)); - } - if (candidate_beam_rs_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, candidate_beam_rs_list_r16, 1, 64)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= candidate_beam_rs_list2_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(candidate_beam_rs_list2_r17.is_present(), 1)); - if (candidate_beam_rs_list2_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *candidate_beam_rs_list2_r17, 1, 64)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE beam_fail_recovery_rs_cfg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(rsrp_thres_bfr_r16_present, 1)); - bool candidate_beam_rs_list_r16_present; - HANDLE_CODE(bref.unpack(candidate_beam_rs_list_r16_present, 1)); - - if (rsrp_thres_bfr_r16_present) { - HANDLE_CODE(unpack_integer(rsrp_thres_bfr_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (candidate_beam_rs_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(candidate_beam_rs_list_r16, bref, 1, 64)); - } - - 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); - - unpack_presence_flag(candidate_beam_rs_list2_r17, bref); - if (candidate_beam_rs_list2_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*candidate_beam_rs_list2_r17, bref, 1, 64)); - } - } - } - return SRSASN_SUCCESS; -} -void beam_fail_recovery_rs_cfg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (rsrp_thres_bfr_r16_present) { - j.write_int("rsrp-ThresholdBFR-r16", rsrp_thres_bfr_r16); - } - if (candidate_beam_rs_list_r16.size() > 0) { - j.start_array("candidateBeamRS-List-r16"); - for (const auto& e1 : candidate_beam_rs_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (ext) { - if (candidate_beam_rs_list2_r17.is_present()) { - j.start_array("candidateBeamRS-List2-r17"); - for (const auto& e1 : *candidate_beam_rs_list2_r17) { - e1.to_json(j); - } - j.end_array(); - } - } - j.end_obj(); -} - -// CFR-ConfigMulticast-r17 ::= SEQUENCE -SRSASN_CODE cfr_cfg_multicast_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(location_and_bw_multicast_r17_present, 1)); - HANDLE_CODE(bref.pack(pdcch_cfg_multicast_r17_present, 1)); - HANDLE_CODE(bref.pack(pdsch_cfg_multicast_r17_present, 1)); - HANDLE_CODE(bref.pack(sps_cfg_multicast_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(sps_cfg_multicast_to_release_list_r17.size() > 0, 1)); - - if (location_and_bw_multicast_r17_present) { - HANDLE_CODE(pack_integer(bref, location_and_bw_multicast_r17, (uint16_t)0u, (uint16_t)37949u)); - } - if (pdcch_cfg_multicast_r17_present) { - HANDLE_CODE(pdcch_cfg_multicast_r17.pack(bref)); - } - if (pdsch_cfg_multicast_r17_present) { - HANDLE_CODE(pdsch_cfg_multicast_r17.pack(bref)); - } - if (sps_cfg_multicast_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sps_cfg_multicast_to_add_mod_list_r17, 1, 8)); - } - if (sps_cfg_multicast_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sps_cfg_multicast_to_release_list_r17, 1, 8, integer_packer(0, 7))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cfr_cfg_multicast_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(location_and_bw_multicast_r17_present, 1)); - HANDLE_CODE(bref.unpack(pdcch_cfg_multicast_r17_present, 1)); - HANDLE_CODE(bref.unpack(pdsch_cfg_multicast_r17_present, 1)); - bool sps_cfg_multicast_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(sps_cfg_multicast_to_add_mod_list_r17_present, 1)); - bool sps_cfg_multicast_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(sps_cfg_multicast_to_release_list_r17_present, 1)); - - if (location_and_bw_multicast_r17_present) { - HANDLE_CODE(unpack_integer(location_and_bw_multicast_r17, bref, (uint16_t)0u, (uint16_t)37949u)); - } - if (pdcch_cfg_multicast_r17_present) { - HANDLE_CODE(pdcch_cfg_multicast_r17.unpack(bref)); - } - if (pdsch_cfg_multicast_r17_present) { - HANDLE_CODE(pdsch_cfg_multicast_r17.unpack(bref)); - } - if (sps_cfg_multicast_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sps_cfg_multicast_to_add_mod_list_r17, bref, 1, 8)); - } - if (sps_cfg_multicast_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sps_cfg_multicast_to_release_list_r17, bref, 1, 8, integer_packer(0, 7))); - } - - return SRSASN_SUCCESS; -} -void cfr_cfg_multicast_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (location_and_bw_multicast_r17_present) { - j.write_int("locationAndBandwidthMulticast-r17", location_and_bw_multicast_r17); - } - if (pdcch_cfg_multicast_r17_present) { - j.write_fieldname("pdcch-ConfigMulticast-r17"); - pdcch_cfg_multicast_r17.to_json(j); - } - if (pdsch_cfg_multicast_r17_present) { - j.write_fieldname("pdsch-ConfigMulticast-r17"); - pdsch_cfg_multicast_r17.to_json(j); - } - if (sps_cfg_multicast_to_add_mod_list_r17.size() > 0) { - j.start_array("sps-ConfigMulticastToAddModList-r17"); - for (const auto& e1 : sps_cfg_multicast_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (sps_cfg_multicast_to_release_list_r17.size() > 0) { - j.start_array("sps-ConfigMulticastToReleaseList-r17"); - for (const auto& e1 : sps_cfg_multicast_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// RadioLinkMonitoringConfig ::= SEQUENCE -SRSASN_CODE radio_link_monitoring_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(fail_detection_res_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(fail_detection_res_to_release_list.size() > 0, 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, fail_detection_res_to_add_mod_list, 1, 10)); - } - if (fail_detection_res_to_release_list.size() > 0) { - 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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= beam_fail_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(beam_fail_r17.is_present(), 1)); - if (beam_fail_r17.is_present()) { - HANDLE_CODE(beam_fail_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE radio_link_monitoring_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool fail_detection_res_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(fail_detection_res_to_add_mod_list_present, 1)); - bool fail_detection_res_to_release_list_present; - 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)); - } - - 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); - - unpack_presence_flag(beam_fail_r17, bref); - if (beam_fail_r17.is_present()) { - HANDLE_CODE(beam_fail_r17->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void radio_link_monitoring_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (fail_detection_res_to_add_mod_list.size() > 0) { - 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.size() > 0) { - 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()); - } - if (ext) { - if (beam_fail_r17.is_present()) { - j.write_fieldname("beamFailure-r17"); - beam_fail_r17->to_json(j); - } - } - j.end_obj(); -} - -const char* radio_link_monitoring_cfg_s::beam_fail_instance_max_count_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; - return convert_enum_idx(names, 8, value, "radio_link_monitoring_cfg_s::beam_fail_instance_max_count_e_"); -} -uint8_t radio_link_monitoring_cfg_s::beam_fail_instance_max_count_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 5, 6, 8, 10}; - return map_enum_number(numbers, 8, value, "radio_link_monitoring_cfg_s::beam_fail_instance_max_count_e_"); -} - -const char* radio_link_monitoring_cfg_s::beam_fail_detection_timer_opts::to_string() const -{ - static const char* names[] = {"pbfd1", "pbfd2", "pbfd3", "pbfd4", "pbfd5", "pbfd6", "pbfd8", "pbfd10"}; - return convert_enum_idx(names, 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 numbers[] = {1, 2, 3, 4, 5, 6, 8, 10}; - return map_enum_number(numbers, 8, value, "radio_link_monitoring_cfg_s::beam_fail_detection_timer_e_"); -} - -// BWP-DownlinkDedicated ::= SEQUENCE -SRSASN_CODE bwp_dl_ded_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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= sps_cfg_to_add_mod_list_r16.is_present(); - group_flags[0] |= sps_cfg_to_release_list_r16.is_present(); - group_flags[0] |= sps_cfg_deactivation_state_list_r16.is_present(); - group_flags[0] |= beam_fail_recovery_scell_cfg_r16.is_present(); - group_flags[0] |= sl_pdcch_cfg_r16.is_present(); - group_flags[0] |= sl_v2x_pdcch_cfg_r16.is_present(); - group_flags[1] |= pre_conf_gap_status_r17_present; - group_flags[1] |= beam_fail_recovery_sp_cell_cfg_r17.is_present(); - group_flags[1] |= harq_feedback_enablingfor_sp_sactive_r17_present; - group_flags[1] |= cfr_cfg_multicast_r17.is_present(); - group_flags[1] |= dl_ppw_pre_cfg_to_add_mod_list_r17.is_present(); - group_flags[1] |= dl_ppw_pre_cfg_to_release_list_r17.is_present(); - group_flags[1] |= non_cell_defining_ssb_r17.is_present(); - group_flags[1] |= serving_cell_mo_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(sps_cfg_to_add_mod_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(sps_cfg_to_release_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(sps_cfg_deactivation_state_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(beam_fail_recovery_scell_cfg_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(sl_pdcch_cfg_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(sl_v2x_pdcch_cfg_r16.is_present(), 1)); - if (sps_cfg_to_add_mod_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *sps_cfg_to_add_mod_list_r16, 1, 8)); - } - if (sps_cfg_to_release_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *sps_cfg_to_release_list_r16, 1, 8, integer_packer(0, 7))); - } - if (sps_cfg_deactivation_state_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, - *sps_cfg_deactivation_state_list_r16, - 1, - 16, - SeqOfPacker>(1, 8, integer_packer(0, 7)))); - } - if (beam_fail_recovery_scell_cfg_r16.is_present()) { - HANDLE_CODE(beam_fail_recovery_scell_cfg_r16->pack(bref)); - } - if (sl_pdcch_cfg_r16.is_present()) { - HANDLE_CODE(sl_pdcch_cfg_r16->pack(bref)); - } - if (sl_v2x_pdcch_cfg_r16.is_present()) { - HANDLE_CODE(sl_v2x_pdcch_cfg_r16->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(pre_conf_gap_status_r17_present, 1)); - HANDLE_CODE(bref.pack(beam_fail_recovery_sp_cell_cfg_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(harq_feedback_enablingfor_sp_sactive_r17_present, 1)); - HANDLE_CODE(bref.pack(cfr_cfg_multicast_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(dl_ppw_pre_cfg_to_add_mod_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(dl_ppw_pre_cfg_to_release_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(non_cell_defining_ssb_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(serving_cell_mo_r17_present, 1)); - if (pre_conf_gap_status_r17_present) { - HANDLE_CODE(pre_conf_gap_status_r17.pack(bref)); - } - if (beam_fail_recovery_sp_cell_cfg_r17.is_present()) { - HANDLE_CODE(beam_fail_recovery_sp_cell_cfg_r17->pack(bref)); - } - if (harq_feedback_enablingfor_sp_sactive_r17_present) { - HANDLE_CODE(bref.pack(harq_feedback_enablingfor_sp_sactive_r17, 1)); - } - if (cfr_cfg_multicast_r17.is_present()) { - HANDLE_CODE(cfr_cfg_multicast_r17->pack(bref)); - } - if (dl_ppw_pre_cfg_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *dl_ppw_pre_cfg_to_add_mod_list_r17, 1, 4)); - } - if (dl_ppw_pre_cfg_to_release_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *dl_ppw_pre_cfg_to_release_list_r17, 1, 4, integer_packer(0, 15))); - } - if (non_cell_defining_ssb_r17.is_present()) { - HANDLE_CODE(non_cell_defining_ssb_r17->pack(bref)); - } - if (serving_cell_mo_r17_present) { - HANDLE_CODE(pack_integer(bref, serving_cell_mo_r17, (uint8_t)1u, (uint8_t)64u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE bwp_dl_ded_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)); - } - - 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); - - unpack_presence_flag(sps_cfg_to_add_mod_list_r16, bref); - unpack_presence_flag(sps_cfg_to_release_list_r16, bref); - unpack_presence_flag(sps_cfg_deactivation_state_list_r16, bref); - unpack_presence_flag(beam_fail_recovery_scell_cfg_r16, bref); - unpack_presence_flag(sl_pdcch_cfg_r16, bref); - unpack_presence_flag(sl_v2x_pdcch_cfg_r16, bref); - if (sps_cfg_to_add_mod_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*sps_cfg_to_add_mod_list_r16, bref, 1, 8)); - } - if (sps_cfg_to_release_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*sps_cfg_to_release_list_r16, bref, 1, 8, integer_packer(0, 7))); - } - if (sps_cfg_deactivation_state_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*sps_cfg_deactivation_state_list_r16, - bref, - 1, - 16, - SeqOfPacker>(1, 8, integer_packer(0, 7)))); - } - if (beam_fail_recovery_scell_cfg_r16.is_present()) { - HANDLE_CODE(beam_fail_recovery_scell_cfg_r16->unpack(bref)); - } - if (sl_pdcch_cfg_r16.is_present()) { - HANDLE_CODE(sl_pdcch_cfg_r16->unpack(bref)); - } - if (sl_v2x_pdcch_cfg_r16.is_present()) { - HANDLE_CODE(sl_v2x_pdcch_cfg_r16->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(pre_conf_gap_status_r17_present, 1)); - unpack_presence_flag(beam_fail_recovery_sp_cell_cfg_r17, bref); - HANDLE_CODE(bref.unpack(harq_feedback_enablingfor_sp_sactive_r17_present, 1)); - unpack_presence_flag(cfr_cfg_multicast_r17, bref); - unpack_presence_flag(dl_ppw_pre_cfg_to_add_mod_list_r17, bref); - unpack_presence_flag(dl_ppw_pre_cfg_to_release_list_r17, bref); - unpack_presence_flag(non_cell_defining_ssb_r17, bref); - HANDLE_CODE(bref.unpack(serving_cell_mo_r17_present, 1)); - if (pre_conf_gap_status_r17_present) { - HANDLE_CODE(pre_conf_gap_status_r17.unpack(bref)); - } - if (beam_fail_recovery_sp_cell_cfg_r17.is_present()) { - HANDLE_CODE(beam_fail_recovery_sp_cell_cfg_r17->unpack(bref)); - } - if (harq_feedback_enablingfor_sp_sactive_r17_present) { - HANDLE_CODE(bref.unpack(harq_feedback_enablingfor_sp_sactive_r17, 1)); - } - if (cfr_cfg_multicast_r17.is_present()) { - HANDLE_CODE(cfr_cfg_multicast_r17->unpack(bref)); - } - if (dl_ppw_pre_cfg_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*dl_ppw_pre_cfg_to_add_mod_list_r17, bref, 1, 4)); - } - if (dl_ppw_pre_cfg_to_release_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*dl_ppw_pre_cfg_to_release_list_r17, bref, 1, 4, integer_packer(0, 15))); - } - if (non_cell_defining_ssb_r17.is_present()) { - HANDLE_CODE(non_cell_defining_ssb_r17->unpack(bref)); - } - if (serving_cell_mo_r17_present) { - HANDLE_CODE(unpack_integer(serving_cell_mo_r17, bref, (uint8_t)1u, (uint8_t)64u)); - } - } - } - return SRSASN_SUCCESS; -} -void bwp_dl_ded_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); - } - if (ext) { - if (sps_cfg_to_add_mod_list_r16.is_present()) { - j.start_array("sps-ConfigToAddModList-r16"); - for (const auto& e1 : *sps_cfg_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sps_cfg_to_release_list_r16.is_present()) { - j.start_array("sps-ConfigToReleaseList-r16"); - for (const auto& e1 : *sps_cfg_to_release_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sps_cfg_deactivation_state_list_r16.is_present()) { - j.start_array("sps-ConfigDeactivationStateList-r16"); - for (const auto& e1 : *sps_cfg_deactivation_state_list_r16) { - j.start_array(); - for (const auto& e2 : e1) { - j.write_int(e2); - } - j.end_array(); - } - j.end_array(); - } - if (beam_fail_recovery_scell_cfg_r16.is_present()) { - j.write_fieldname("beamFailureRecoverySCellConfig-r16"); - beam_fail_recovery_scell_cfg_r16->to_json(j); - } - if (sl_pdcch_cfg_r16.is_present()) { - j.write_fieldname("sl-PDCCH-Config-r16"); - sl_pdcch_cfg_r16->to_json(j); - } - if (sl_v2x_pdcch_cfg_r16.is_present()) { - j.write_fieldname("sl-V2X-PDCCH-Config-r16"); - sl_v2x_pdcch_cfg_r16->to_json(j); - } - if (pre_conf_gap_status_r17_present) { - j.write_str("preConfGapStatus-r17", pre_conf_gap_status_r17.to_string()); - } - if (beam_fail_recovery_sp_cell_cfg_r17.is_present()) { - j.write_fieldname("beamFailureRecoverySpCellConfig-r17"); - beam_fail_recovery_sp_cell_cfg_r17->to_json(j); - } - if (harq_feedback_enablingfor_sp_sactive_r17_present) { - j.write_bool("harq-FeedbackEnablingforSPSactive-r17", harq_feedback_enablingfor_sp_sactive_r17); - } - if (cfr_cfg_multicast_r17.is_present()) { - j.write_fieldname("cfr-ConfigMulticast-r17"); - cfr_cfg_multicast_r17->to_json(j); - } - if (dl_ppw_pre_cfg_to_add_mod_list_r17.is_present()) { - j.start_array("dl-PPW-PreConfigToAddModList-r17"); - for (const auto& e1 : *dl_ppw_pre_cfg_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (dl_ppw_pre_cfg_to_release_list_r17.is_present()) { - j.start_array("dl-PPW-PreConfigToReleaseList-r17"); - for (const auto& e1 : *dl_ppw_pre_cfg_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (non_cell_defining_ssb_r17.is_present()) { - j.write_fieldname("nonCellDefiningSSB-r17"); - non_cell_defining_ssb_r17->to_json(j); - } - if (serving_cell_mo_r17_present) { - j.write_int("servingCellMO-r17", serving_cell_mo_r17); - } - } - j.end_obj(); -} - -// BWP-Downlink ::= SEQUENCE -SRSASN_CODE bwp_dl_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)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE bwp_dl_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)); - } - - return SRSASN_SUCCESS; -} -void bwp_dl_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.end_obj(); -} - -// PUCCH-PathlossReferenceRS-r16 ::= SEQUENCE -SRSASN_CODE pucch_pathloss_ref_rs_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pucch_pathloss_ref_rs_id_r16, (uint8_t)4u, (uint8_t)63u)); - HANDLE_CODE(ref_sig_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_pathloss_ref_rs_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(pucch_pathloss_ref_rs_id_r16, bref, (uint8_t)4u, (uint8_t)63u)); - HANDLE_CODE(ref_sig_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void pucch_pathloss_ref_rs_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("pucch-PathlossReferenceRS-Id-r16", pucch_pathloss_ref_rs_id_r16); - j.write_fieldname("referenceSignal-r16"); - ref_sig_r16.to_json(j); - j.end_obj(); -} - -void pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::destroy_() {} -void pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::ref_sig_r16_c_(const pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::ssb_idx_r16: - c.init(other.c.get()); - break; - case types::csi_rs_idx_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); - } -} -pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_& -pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::operator=(const pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ssb_idx_r16: - c.set(other.c.get()); - break; - case types::csi_rs_idx_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); - } - - return *this; -} -uint8_t& pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::set_ssb_idx_r16() -{ - set(types::ssb_idx_r16); - return c.get(); -} -uint8_t& pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::set_csi_rs_idx_r16() -{ - set(types::csi_rs_idx_r16); - return c.get(); -} -void pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ssb_idx_r16: - j.write_int("ssb-Index-r16", c.get()); - break; - case types::csi_rs_idx_r16: - j.write_int("csi-RS-Index-r16", c.get()); - break; - default: - log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ssb_idx_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_idx_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); - break; - default: - log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ssb_idx_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_idx_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); - break; - default: - log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// PathlossReferenceRS-Config ::= CHOICE -void pathloss_ref_rs_cfg_c::destroy_() {} -void pathloss_ref_rs_cfg_c::set(types::options e) -{ - destroy_(); - type_ = e; -} -pathloss_ref_rs_cfg_c::pathloss_ref_rs_cfg_c(const pathloss_ref_rs_cfg_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_, "pathloss_ref_rs_cfg_c"); - } -} -pathloss_ref_rs_cfg_c& pathloss_ref_rs_cfg_c::operator=(const pathloss_ref_rs_cfg_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_, "pathloss_ref_rs_cfg_c"); - } - - return *this; -} -uint8_t& pathloss_ref_rs_cfg_c::set_ssb_idx() -{ - set(types::ssb_idx); - return c.get(); -} -uint8_t& pathloss_ref_rs_cfg_c::set_csi_rs_idx() -{ - set(types::csi_rs_idx); - return c.get(); -} -void pathloss_ref_rs_cfg_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()); - break; - default: - log_invalid_choice_id(type_, "pathloss_ref_rs_cfg_c"); - } - j.end_obj(); -} -SRSASN_CODE pathloss_ref_rs_cfg_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_, "pathloss_ref_rs_cfg_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pathloss_ref_rs_cfg_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_, "pathloss_ref_rs_cfg_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// Alpha ::= ENUMERATED -const char* alpha_opts::to_string() const -{ - static const char* names[] = {"alpha0", "alpha04", "alpha05", "alpha06", "alpha07", "alpha08", "alpha09", "alpha1"}; - return convert_enum_idx(names, 8, value, "alpha_e"); -} -float alpha_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; - return map_enum_number(numbers, 8, value, "alpha_e"); -} -const char* alpha_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"}; - return convert_enum_idx(number_strs, 8, value, "alpha_e"); -} - -// 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)); - } - - 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 (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)); - } - - 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(); -} - -// DMRS-UplinkTransformPrecoding-r16 ::= SEQUENCE -SRSASN_CODE dmrs_ul_transform_precoding_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(pi2_bpsk_scrambling_id0_present, 1)); - HANDLE_CODE(bref.pack(pi2_bpsk_scrambling_id1_present, 1)); - - if (pi2_bpsk_scrambling_id0_present) { - HANDLE_CODE(pack_integer(bref, pi2_bpsk_scrambling_id0, (uint32_t)0u, (uint32_t)65535u)); - } - if (pi2_bpsk_scrambling_id1_present) { - HANDLE_CODE(pack_integer(bref, pi2_bpsk_scrambling_id1, (uint32_t)0u, (uint32_t)65535u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE dmrs_ul_transform_precoding_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(pi2_bpsk_scrambling_id0_present, 1)); - HANDLE_CODE(bref.unpack(pi2_bpsk_scrambling_id1_present, 1)); - - if (pi2_bpsk_scrambling_id0_present) { - HANDLE_CODE(unpack_integer(pi2_bpsk_scrambling_id0, bref, (uint32_t)0u, (uint32_t)65535u)); - } - if (pi2_bpsk_scrambling_id1_present) { - HANDLE_CODE(unpack_integer(pi2_bpsk_scrambling_id1, bref, (uint32_t)0u, (uint32_t)65535u)); - } - - return SRSASN_SUCCESS; -} -void dmrs_ul_transform_precoding_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pi2_bpsk_scrambling_id0_present) { - j.write_int("pi2BPSK-ScramblingID0", pi2_bpsk_scrambling_id0); - } - if (pi2_bpsk_scrambling_id1_present) { - j.write_int("pi2BPSK-ScramblingID1", pi2_bpsk_scrambling_id1); - } - 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 p0_pucch_s::unpack(cbit_ref& bref) -{ - 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; -} -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(); -} - -// PTRS-UplinkConfig ::= SEQUENCE -SRSASN_CODE ptrs_ul_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)); - - 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, - 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, - 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, - transform_precoder_enabled.sample_density.size(), - integer_packer(1, 276))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ptrs_ul_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)); - - 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, - 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, - 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, - bref, - transform_precoder_enabled.sample_density.size(), - integer_packer(1, 276))); - } - - return SRSASN_SUCCESS; -} -void ptrs_ul_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_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(); -} - -const char* ptrs_ul_cfg_s::transform_precoder_disabled_s_::max_nrof_ports_opts::to_string() const -{ - static const char* names[] = {"n1", "n2"}; - return convert_enum_idx(names, 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 numbers[] = {1, 2}; - return map_enum_number(numbers, 2, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::max_nrof_ports_e_"); -} - -const char* ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_opts::to_string() const -{ - static const char* names[] = {"offset01", "offset10", "offset11"}; - return convert_enum_idx(names, 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 numbers[] = {0.1, 1.0, 1.1}; - return map_enum_number(numbers, 3, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_e_"); -} -const char* ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.1", "1.0", "1.1"}; - return convert_enum_idx(number_strs, 3, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::res_elem_offset_e_"); -} - -const char* ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_opts::to_string() const -{ - static const char* names[] = {"p00", "p01", "p10", "p11"}; - return convert_enum_idx(names, 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 numbers[] = {0.0, 0.1, 1.0, 1.1}; - return map_enum_number(numbers, 4, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_e_"); -} -const char* ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.0", "0.1", "1.0", "1.1"}; - return convert_enum_idx(number_strs, 4, value, "ptrs_ul_cfg_s::transform_precoder_disabled_s_::ptrs_pwr_e_"); -} - -// PUCCH-MaxCodeRate ::= ENUMERATED -const char* pucch_max_code_rate_opts::to_string() const -{ - static const char* names[] = { - "zeroDot08", "zeroDot15", "zeroDot25", "zeroDot35", "zeroDot45", "zeroDot60", "zeroDot80"}; - return convert_enum_idx(names, 7, value, "pucch_max_code_rate_e"); -} -float pucch_max_code_rate_opts::to_number() const -{ - static const float numbers[] = {0.08, 0.15, 0.25, 0.35, 0.45, 0.6, 0.8}; - return map_enum_number(numbers, 7, value, "pucch_max_code_rate_e"); -} -const char* pucch_max_code_rate_opts::to_number_string() const -{ - static const char* number_strs[] = {"0.08", "0.15", "0.25", "0.35", "0.45", "0.60", "0.80"}; - return convert_enum_idx(number_strs, 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; -} -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; -} -uint8_t& pucch_pathloss_ref_rs_s::ref_sig_c_::set_ssb_idx() -{ - set(types::ssb_idx); - return c.get(); -} -uint8_t& pucch_pathloss_ref_rs_s::ref_sig_c_::set_csi_rs_idx() -{ - set(types::csi_rs_idx); - return c.get(); -} -void pucch_pathloss_ref_rs_s::ref_sig_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()); - break; - default: - log_invalid_choice_id(type_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); - } - j.end_obj(); -} -SRSASN_CODE pucch_pathloss_ref_rs_s::ref_sig_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_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::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_, "pucch_pathloss_ref_rs_s::ref_sig_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// PUCCH-SRS ::= SEQUENCE -SRSASN_CODE pucch_srs_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, res, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_integer(bref, ul_bwp, (uint8_t)0u, (uint8_t)4u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_srs_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(res, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_integer(ul_bwp, bref, (uint8_t)0u, (uint8_t)4u)); - - return SRSASN_SUCCESS; -} -void pucch_srs_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("resource", res); - j.write_int("uplinkBWP", ul_bwp); - j.end_obj(); -} - -// PUCCH-format0 ::= SEQUENCE -SRSASN_CODE pucch_format0_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)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_format0_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)); - - return SRSASN_SUCCESS; -} -void pucch_format0_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(); -} - -// PUCCH-format1 ::= SEQUENCE -SRSASN_CODE pucch_format1_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)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_format1_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)); - - 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(); -} - -// PUCCH-format2 ::= SEQUENCE -SRSASN_CODE pucch_format2_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)); - - 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)); - - 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(); -} - -// 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)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_format3_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)); - - 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(); -} - -// 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)); - - 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)); - - return SRSASN_SUCCESS; -} -void pucch_format4_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); - j.end_obj(); -} - -const char* pucch_format4_s::occ_len_opts::to_string() const -{ - static const char* names[] = {"n2", "n4"}; - return convert_enum_idx(names, 2, value, "pucch_format4_s::occ_len_e_"); -} -uint8_t pucch_format4_s::occ_len_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4}; - return map_enum_number(numbers, 2, value, "pucch_format4_s::occ_len_e_"); -} - -const char* pucch_format4_s::occ_idx_opts::to_string() const -{ - static const char* names[] = {"n0", "n1", "n2", "n3"}; - return convert_enum_idx(names, 4, value, "pucch_format4_s::occ_idx_e_"); -} -uint8_t pucch_format4_s::occ_idx_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 2, 3}; - return map_enum_number(numbers, 4, value, "pucch_format4_s::occ_idx_e_"); -} - -// PUSCH-Allocation-r16 ::= SEQUENCE -SRSASN_CODE pusch_alloc_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(map_type_r16_present, 1)); - HANDLE_CODE(bref.pack(start_symbol_and_len_r16_present, 1)); - HANDLE_CODE(bref.pack(start_symbol_r16_present, 1)); - HANDLE_CODE(bref.pack(len_r16_present, 1)); - HANDLE_CODE(bref.pack(nof_repeats_r16_present, 1)); - - if (map_type_r16_present) { - HANDLE_CODE(map_type_r16.pack(bref)); - } - if (start_symbol_and_len_r16_present) { - HANDLE_CODE(pack_integer(bref, start_symbol_and_len_r16, (uint8_t)0u, (uint8_t)127u)); - } - if (start_symbol_r16_present) { - HANDLE_CODE(pack_integer(bref, start_symbol_r16, (uint8_t)0u, (uint8_t)13u)); - } - if (len_r16_present) { - HANDLE_CODE(pack_integer(bref, len_r16, (uint8_t)1u, (uint8_t)14u)); - } - if (nof_repeats_r16_present) { - HANDLE_CODE(nof_repeats_r16.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= nof_repeats_ext_r17_present; - group_flags[0] |= nof_slots_t_bo_ms_r17_present; - group_flags[0] |= extended_k2_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(nof_repeats_ext_r17_present, 1)); - HANDLE_CODE(bref.pack(nof_slots_t_bo_ms_r17_present, 1)); - HANDLE_CODE(bref.pack(extended_k2_r17_present, 1)); - if (nof_repeats_ext_r17_present) { - HANDLE_CODE(nof_repeats_ext_r17.pack(bref)); - } - if (nof_slots_t_bo_ms_r17_present) { - HANDLE_CODE(nof_slots_t_bo_ms_r17.pack(bref)); - } - if (extended_k2_r17_present) { - HANDLE_CODE(pack_integer(bref, extended_k2_r17, (uint8_t)0u, (uint8_t)128u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pusch_alloc_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(map_type_r16_present, 1)); - HANDLE_CODE(bref.unpack(start_symbol_and_len_r16_present, 1)); - HANDLE_CODE(bref.unpack(start_symbol_r16_present, 1)); - HANDLE_CODE(bref.unpack(len_r16_present, 1)); - HANDLE_CODE(bref.unpack(nof_repeats_r16_present, 1)); - - if (map_type_r16_present) { - HANDLE_CODE(map_type_r16.unpack(bref)); - } - if (start_symbol_and_len_r16_present) { - HANDLE_CODE(unpack_integer(start_symbol_and_len_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (start_symbol_r16_present) { - HANDLE_CODE(unpack_integer(start_symbol_r16, bref, (uint8_t)0u, (uint8_t)13u)); - } - if (len_r16_present) { - HANDLE_CODE(unpack_integer(len_r16, bref, (uint8_t)1u, (uint8_t)14u)); - } - if (nof_repeats_r16_present) { - HANDLE_CODE(nof_repeats_r16.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(nof_repeats_ext_r17_present, 1)); - HANDLE_CODE(bref.unpack(nof_slots_t_bo_ms_r17_present, 1)); - HANDLE_CODE(bref.unpack(extended_k2_r17_present, 1)); - if (nof_repeats_ext_r17_present) { - HANDLE_CODE(nof_repeats_ext_r17.unpack(bref)); - } - if (nof_slots_t_bo_ms_r17_present) { - HANDLE_CODE(nof_slots_t_bo_ms_r17.unpack(bref)); - } - if (extended_k2_r17_present) { - HANDLE_CODE(unpack_integer(extended_k2_r17, bref, (uint8_t)0u, (uint8_t)128u)); - } - } - } - return SRSASN_SUCCESS; -} -void pusch_alloc_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (map_type_r16_present) { - j.write_str("mappingType-r16", map_type_r16.to_string()); - } - if (start_symbol_and_len_r16_present) { - j.write_int("startSymbolAndLength-r16", start_symbol_and_len_r16); - } - if (start_symbol_r16_present) { - j.write_int("startSymbol-r16", start_symbol_r16); - } - if (len_r16_present) { - j.write_int("length-r16", len_r16); - } - if (nof_repeats_r16_present) { - j.write_str("numberOfRepetitions-r16", nof_repeats_r16.to_string()); - } - if (ext) { - if (nof_repeats_ext_r17_present) { - j.write_str("numberOfRepetitionsExt-r17", nof_repeats_ext_r17.to_string()); - } - if (nof_slots_t_bo_ms_r17_present) { - j.write_str("numberOfSlotsTBoMS-r17", nof_slots_t_bo_ms_r17.to_string()); - } - if (extended_k2_r17_present) { - j.write_int("extendedK2-r17", extended_k2_r17); - } - } - j.end_obj(); -} - -const char* pusch_alloc_r16_s::map_type_r16_opts::to_string() const -{ - static const char* names[] = {"typeA", "typeB"}; - return convert_enum_idx(names, 2, value, "pusch_alloc_r16_s::map_type_r16_e_"); -} - -const char* pusch_alloc_r16_s::nof_repeats_r16_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n3", "n4", "n7", "n8", "n12", "n16"}; - return convert_enum_idx(names, 8, value, "pusch_alloc_r16_s::nof_repeats_r16_e_"); -} -uint8_t pusch_alloc_r16_s::nof_repeats_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 7, 8, 12, 16}; - return map_enum_number(numbers, 8, value, "pusch_alloc_r16_s::nof_repeats_r16_e_"); -} - -const char* pusch_alloc_r16_s::nof_repeats_ext_r17_opts::to_string() const -{ - static const char* names[] = {"n1", - "n2", - "n3", - "n4", - "n7", - "n8", - "n12", - "n16", - "n20", - "n24", - "n28", - "n32", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "pusch_alloc_r16_s::nof_repeats_ext_r17_e_"); -} -uint8_t pusch_alloc_r16_s::nof_repeats_ext_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3, 4, 7, 8, 12, 16, 20, 24, 28, 32}; - return map_enum_number(numbers, 12, value, "pusch_alloc_r16_s::nof_repeats_ext_r17_e_"); -} - -const char* pusch_alloc_r16_s::nof_slots_t_bo_ms_r17_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n4", "n8", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "pusch_alloc_r16_s::nof_slots_t_bo_ms_r17_e_"); -} -uint8_t pusch_alloc_r16_s::nof_slots_t_bo_ms_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "pusch_alloc_r16_s::nof_slots_t_bo_ms_r17_e_"); -} - -// PathlossReferenceRS-r16 ::= SEQUENCE -SRSASN_CODE pathloss_ref_rs_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, srs_pathloss_ref_rs_id_r16, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pathloss_ref_rs_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pathloss_ref_rs_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(srs_pathloss_ref_rs_id_r16, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pathloss_ref_rs_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void pathloss_ref_rs_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("srs-PathlossReferenceRS-Id-r16", srs_pathloss_ref_rs_id_r16); - j.write_fieldname("pathlossReferenceRS-r16"); - pathloss_ref_rs_r16.to_json(j); - j.end_obj(); -} - -// SPS-PUCCH-AN-r16 ::= SEQUENCE -SRSASN_CODE sps_pucch_an_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(max_payload_size_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, sps_pucch_an_res_id_r16, (uint8_t)0u, (uint8_t)127u)); - if (max_payload_size_r16_present) { - HANDLE_CODE(pack_integer(bref, max_payload_size_r16, (uint16_t)4u, (uint16_t)256u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sps_pucch_an_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(max_payload_size_r16_present, 1)); - - HANDLE_CODE(unpack_integer(sps_pucch_an_res_id_r16, bref, (uint8_t)0u, (uint8_t)127u)); - if (max_payload_size_r16_present) { - HANDLE_CODE(unpack_integer(max_payload_size_r16, bref, (uint16_t)4u, (uint16_t)256u)); - } - - return SRSASN_SUCCESS; -} -void sps_pucch_an_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("sps-PUCCH-AN-ResourceID-r16", sps_pucch_an_res_id_r16); - if (max_payload_size_r16_present) { - j.write_int("maxPayloadSize-r16", max_payload_size_r16); - } - j.end_obj(); -} - -// BetaOffsetsCrossPriSelCG-r17 ::= CHOICE -void beta_offsets_cross_pri_sel_cg_r17_c::destroy_() -{ - switch (type_) { - case types::dyn_r17: - c.destroy(); - break; - case types::semi_static_r17: - c.destroy(); - break; - default: - break; - } -} -void beta_offsets_cross_pri_sel_cg_r17_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::dyn_r17: - c.init(); - break; - case types::semi_static_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_cg_r17_c"); - } -} -beta_offsets_cross_pri_sel_cg_r17_c::beta_offsets_cross_pri_sel_cg_r17_c( - const beta_offsets_cross_pri_sel_cg_r17_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::dyn_r17: - c.init(other.c.get()); - break; - case types::semi_static_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_cg_r17_c"); - } -} -beta_offsets_cross_pri_sel_cg_r17_c& -beta_offsets_cross_pri_sel_cg_r17_c::operator=(const beta_offsets_cross_pri_sel_cg_r17_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::dyn_r17: - c.set(other.c.get()); - break; - case types::semi_static_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_cg_r17_c"); - } - - return *this; -} -beta_offsets_cross_pri_sel_cg_r17_c::dyn_r17_l_& beta_offsets_cross_pri_sel_cg_r17_c::set_dyn_r17() -{ - set(types::dyn_r17); - return c.get(); -} -beta_offsets_cross_pri_r17_l& beta_offsets_cross_pri_sel_cg_r17_c::set_semi_static_r17() -{ - set(types::semi_static_r17); - return c.get(); -} -void beta_offsets_cross_pri_sel_cg_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::dyn_r17: - j.start_array("dynamic-r17"); - for (const auto& e1 : c.get()) { - j.start_array(); - for (const auto& e2 : e1) { - j.write_int(e2); - } - j.end_array(); - } - j.end_array(); - break; - case types::semi_static_r17: - j.start_array("semiStatic-r17"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_cg_r17_c"); - } - j.end_obj(); -} -SRSASN_CODE beta_offsets_cross_pri_sel_cg_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::dyn_r17: - HANDLE_CODE(pack_dyn_seq_of(bref, - c.get(), - 1, - 4, - FixedSeqOfPacker>(3, integer_packer(0, 31)))); - break; - case types::semi_static_r17: - HANDLE_CODE(pack_fixed_seq_of(bref, - c.get(), - c.get().size(), - integer_packer(0, 31))); - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_cg_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE beta_offsets_cross_pri_sel_cg_r17_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::dyn_r17: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), - bref, - 1, - 4, - FixedSeqOfPacker>(3, integer_packer(0, 31)))); - break; - case types::semi_static_r17: - HANDLE_CODE(unpack_fixed_seq_of(c.get(), - bref, - c.get().size(), - integer_packer(0, 31))); - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_cg_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// CG-COT-Sharing-r16 ::= CHOICE -void cg_cot_sharing_r16_c::set(types::options e) -{ - type_ = e; -} -void cg_cot_sharing_r16_c::set_no_cot_sharing_r16() -{ - set(types::no_cot_sharing_r16); -} -cg_cot_sharing_r16_c::cot_sharing_r16_s_& cg_cot_sharing_r16_c::set_cot_sharing_r16() -{ - set(types::cot_sharing_r16); - return c; -} -void cg_cot_sharing_r16_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::no_cot_sharing_r16: - break; - case types::cot_sharing_r16: - j.write_fieldname("cot-Sharing-r16"); - j.start_obj(); - j.write_int("duration-r16", c.dur_r16); - j.write_int("offset-r16", c.offset_r16); - j.write_int("channelAccessPriority-r16", c.ch_access_prio_r16); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "cg_cot_sharing_r16_c"); - } - j.end_obj(); -} -SRSASN_CODE cg_cot_sharing_r16_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::no_cot_sharing_r16: - break; - case types::cot_sharing_r16: - HANDLE_CODE(pack_integer(bref, c.dur_r16, (uint8_t)1u, (uint8_t)39u)); - HANDLE_CODE(pack_integer(bref, c.offset_r16, (uint8_t)1u, (uint8_t)39u)); - HANDLE_CODE(pack_integer(bref, c.ch_access_prio_r16, (uint8_t)1u, (uint8_t)4u)); - break; - default: - log_invalid_choice_id(type_, "cg_cot_sharing_r16_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_cot_sharing_r16_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::no_cot_sharing_r16: - break; - case types::cot_sharing_r16: - HANDLE_CODE(unpack_integer(c.dur_r16, bref, (uint8_t)1u, (uint8_t)39u)); - HANDLE_CODE(unpack_integer(c.offset_r16, bref, (uint8_t)1u, (uint8_t)39u)); - HANDLE_CODE(unpack_integer(c.ch_access_prio_r16, bref, (uint8_t)1u, (uint8_t)4u)); - break; - default: - log_invalid_choice_id(type_, "cg_cot_sharing_r16_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// CG-COT-Sharing-r17 ::= CHOICE -void cg_cot_sharing_r17_c::set(types::options e) -{ - type_ = e; -} -void cg_cot_sharing_r17_c::set_no_cot_sharing_r17() -{ - set(types::no_cot_sharing_r17); -} -cg_cot_sharing_r17_c::cot_sharing_r17_s_& cg_cot_sharing_r17_c::set_cot_sharing_r17() -{ - set(types::cot_sharing_r17); - return c; -} -void cg_cot_sharing_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::no_cot_sharing_r17: - break; - case types::cot_sharing_r17: - j.write_fieldname("cot-Sharing-r17"); - j.start_obj(); - j.write_int("duration-r17", c.dur_r17); - j.write_int("offset-r17", c.offset_r17); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "cg_cot_sharing_r17_c"); - } - j.end_obj(); -} -SRSASN_CODE cg_cot_sharing_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::no_cot_sharing_r17: - break; - case types::cot_sharing_r17: - HANDLE_CODE(pack_integer(bref, c.dur_r17, (uint16_t)1u, (uint16_t)319u)); - HANDLE_CODE(pack_integer(bref, c.offset_r17, (uint16_t)1u, (uint16_t)319u)); - break; - default: - log_invalid_choice_id(type_, "cg_cot_sharing_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_cot_sharing_r17_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::no_cot_sharing_r17: - break; - case types::cot_sharing_r17: - HANDLE_CODE(unpack_integer(c.dur_r17, bref, (uint16_t)1u, (uint16_t)319u)); - HANDLE_CODE(unpack_integer(c.offset_r17, bref, (uint16_t)1u, (uint16_t)319u)); - break; - default: - log_invalid_choice_id(type_, "cg_cot_sharing_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// CG-SDT-Configuration-r17 ::= SEQUENCE -SRSASN_CODE cg_sdt_cfg_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(cg_sdt_retx_timer_present, 1)); - HANDLE_CODE(bref.pack(sdt_ssb_subset_r17_present, 1)); - HANDLE_CODE(bref.pack(sdt_ssb_per_cg_pusch_r17_present, 1)); - HANDLE_CODE(bref.pack(sdt_p0_pusch_r17_present, 1)); - HANDLE_CODE(bref.pack(sdt_alpha_r17_present, 1)); - HANDLE_CODE(bref.pack(sdt_dmrs_ports_r17_present, 1)); - HANDLE_CODE(bref.pack(sdt_nrof_dmrs_seqs_r17_present, 1)); - - if (cg_sdt_retx_timer_present) { - HANDLE_CODE(pack_integer(bref, cg_sdt_retx_timer, (uint8_t)1u, (uint8_t)64u)); - } - if (sdt_ssb_subset_r17_present) { - HANDLE_CODE(sdt_ssb_subset_r17.pack(bref)); - } - if (sdt_ssb_per_cg_pusch_r17_present) { - HANDLE_CODE(sdt_ssb_per_cg_pusch_r17.pack(bref)); - } - if (sdt_p0_pusch_r17_present) { - HANDLE_CODE(pack_integer(bref, sdt_p0_pusch_r17, (int8_t)-16, (int8_t)15)); - } - if (sdt_alpha_r17_present) { - HANDLE_CODE(sdt_alpha_r17.pack(bref)); - } - if (sdt_dmrs_ports_r17_present) { - HANDLE_CODE(sdt_dmrs_ports_r17.pack(bref)); - } - if (sdt_nrof_dmrs_seqs_r17_present) { - HANDLE_CODE(pack_integer(bref, sdt_nrof_dmrs_seqs_r17, (uint8_t)1u, (uint8_t)2u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_sdt_cfg_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(cg_sdt_retx_timer_present, 1)); - HANDLE_CODE(bref.unpack(sdt_ssb_subset_r17_present, 1)); - HANDLE_CODE(bref.unpack(sdt_ssb_per_cg_pusch_r17_present, 1)); - HANDLE_CODE(bref.unpack(sdt_p0_pusch_r17_present, 1)); - HANDLE_CODE(bref.unpack(sdt_alpha_r17_present, 1)); - HANDLE_CODE(bref.unpack(sdt_dmrs_ports_r17_present, 1)); - HANDLE_CODE(bref.unpack(sdt_nrof_dmrs_seqs_r17_present, 1)); - - if (cg_sdt_retx_timer_present) { - HANDLE_CODE(unpack_integer(cg_sdt_retx_timer, bref, (uint8_t)1u, (uint8_t)64u)); - } - if (sdt_ssb_subset_r17_present) { - HANDLE_CODE(sdt_ssb_subset_r17.unpack(bref)); - } - if (sdt_ssb_per_cg_pusch_r17_present) { - HANDLE_CODE(sdt_ssb_per_cg_pusch_r17.unpack(bref)); - } - if (sdt_p0_pusch_r17_present) { - HANDLE_CODE(unpack_integer(sdt_p0_pusch_r17, bref, (int8_t)-16, (int8_t)15)); - } - if (sdt_alpha_r17_present) { - HANDLE_CODE(sdt_alpha_r17.unpack(bref)); - } - if (sdt_dmrs_ports_r17_present) { - HANDLE_CODE(sdt_dmrs_ports_r17.unpack(bref)); - } - if (sdt_nrof_dmrs_seqs_r17_present) { - HANDLE_CODE(unpack_integer(sdt_nrof_dmrs_seqs_r17, bref, (uint8_t)1u, (uint8_t)2u)); - } - - return SRSASN_SUCCESS; -} -void cg_sdt_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (cg_sdt_retx_timer_present) { - j.write_int("cg-SDT-RetransmissionTimer", cg_sdt_retx_timer); - } - if (sdt_ssb_subset_r17_present) { - j.write_fieldname("sdt-SSB-Subset-r17"); - sdt_ssb_subset_r17.to_json(j); - } - if (sdt_ssb_per_cg_pusch_r17_present) { - j.write_str("sdt-SSB-PerCG-PUSCH-r17", sdt_ssb_per_cg_pusch_r17.to_string()); - } - if (sdt_p0_pusch_r17_present) { - j.write_int("sdt-P0-PUSCH-r17", sdt_p0_pusch_r17); - } - if (sdt_alpha_r17_present) { - j.write_str("sdt-Alpha-r17", sdt_alpha_r17.to_string()); - } - if (sdt_dmrs_ports_r17_present) { - j.write_fieldname("sdt-DMRS-Ports-r17"); - sdt_dmrs_ports_r17.to_json(j); - } - if (sdt_nrof_dmrs_seqs_r17_present) { - j.write_int("sdt-NrofDMRS-Sequences-r17", sdt_nrof_dmrs_seqs_r17); - } - j.end_obj(); -} - -void cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::destroy_() -{ - switch (type_) { - case types::short_bitmap_r17: - c.destroy>(); - break; - case types::medium_bitmap_r17: - c.destroy>(); - break; - case types::long_bitmap_r17: - c.destroy>(); - break; - default: - break; - } -} -void cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::short_bitmap_r17: - c.init>(); - break; - case types::medium_bitmap_r17: - c.init>(); - break; - case types::long_bitmap_r17: - c.init>(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_"); - } -} -cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::sdt_ssb_subset_r17_c_(const cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::short_bitmap_r17: - c.init(other.c.get>()); - break; - case types::medium_bitmap_r17: - c.init(other.c.get>()); - break; - case types::long_bitmap_r17: - c.init(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_"); - } -} -cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_& -cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::operator=(const cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::short_bitmap_r17: - c.set(other.c.get>()); - break; - case types::medium_bitmap_r17: - c.set(other.c.get>()); - break; - case types::long_bitmap_r17: - c.set(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_"); - } - - return *this; -} -fixed_bitstring<4>& cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::set_short_bitmap_r17() -{ - set(types::short_bitmap_r17); - return c.get>(); -} -fixed_bitstring<8>& cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::set_medium_bitmap_r17() -{ - set(types::medium_bitmap_r17); - return c.get>(); -} -fixed_bitstring<64>& cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::set_long_bitmap_r17() -{ - set(types::long_bitmap_r17); - return c.get>(); -} -void cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::short_bitmap_r17: - j.write_str("shortBitmap-r17", c.get>().to_string()); - break; - case types::medium_bitmap_r17: - j.write_str("mediumBitmap-r17", c.get>().to_string()); - break; - case types::long_bitmap_r17: - j.write_str("longBitmap-r17", c.get>().to_string()); - break; - default: - log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::short_bitmap_r17: - HANDLE_CODE(c.get>().pack(bref)); - break; - case types::medium_bitmap_r17: - HANDLE_CODE(c.get>().pack(bref)); - break; - case types::long_bitmap_r17: - HANDLE_CODE(c.get>().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::short_bitmap_r17: - HANDLE_CODE(c.get>().unpack(bref)); - break; - case types::medium_bitmap_r17: - HANDLE_CODE(c.get>().unpack(bref)); - break; - case types::long_bitmap_r17: - HANDLE_CODE(c.get>().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_ssb_subset_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* cg_sdt_cfg_r17_s::sdt_ssb_per_cg_pusch_r17_opts::to_string() const -{ - static const char* names[] = {"oneEighth", "oneFourth", "half", "one", "two", "four", "eight", "sixteen"}; - return convert_enum_idx(names, 8, value, "cg_sdt_cfg_r17_s::sdt_ssb_per_cg_pusch_r17_e_"); -} -float cg_sdt_cfg_r17_s::sdt_ssb_per_cg_pusch_r17_opts::to_number() const -{ - static const float numbers[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; - return map_enum_number(numbers, 8, value, "cg_sdt_cfg_r17_s::sdt_ssb_per_cg_pusch_r17_e_"); -} -const char* cg_sdt_cfg_r17_s::sdt_ssb_per_cg_pusch_r17_opts::to_number_string() const -{ - static const char* number_strs[] = {"1/8", "1/4", "0.5", "1", "2", "4", "8", "6"}; - return convert_enum_idx(number_strs, 8, value, "cg_sdt_cfg_r17_s::sdt_ssb_per_cg_pusch_r17_e_"); -} - -const char* cg_sdt_cfg_r17_s::sdt_alpha_r17_opts::to_string() const -{ - static const char* names[] = {"alpha0", "alpha04", "alpha05", "alpha06", "alpha07", "alpha08", "alpha09", "alpha1"}; - return convert_enum_idx(names, 8, value, "cg_sdt_cfg_r17_s::sdt_alpha_r17_e_"); -} -float cg_sdt_cfg_r17_s::sdt_alpha_r17_opts::to_number() const -{ - static const float numbers[] = {0.0, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; - return map_enum_number(numbers, 8, value, "cg_sdt_cfg_r17_s::sdt_alpha_r17_e_"); -} -const char* cg_sdt_cfg_r17_s::sdt_alpha_r17_opts::to_number_string() const -{ - static const char* number_strs[] = {"0", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"}; - return convert_enum_idx(number_strs, 8, value, "cg_sdt_cfg_r17_s::sdt_alpha_r17_e_"); -} - -void cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::destroy_() -{ - switch (type_) { - case types::dmrs_type1_r17: - c.destroy>(); - break; - case types::dmrs_type2_r17: - c.destroy>(); - break; - default: - break; - } -} -void cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::dmrs_type1_r17: - c.init>(); - break; - case types::dmrs_type2_r17: - c.init>(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_"); - } -} -cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::sdt_dmrs_ports_r17_c_(const cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::dmrs_type1_r17: - c.init(other.c.get>()); - break; - case types::dmrs_type2_r17: - c.init(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_"); - } -} -cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_& -cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::operator=(const cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::dmrs_type1_r17: - c.set(other.c.get>()); - break; - case types::dmrs_type2_r17: - c.set(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_"); - } - - return *this; -} -fixed_bitstring<8>& cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::set_dmrs_type1_r17() -{ - set(types::dmrs_type1_r17); - return c.get>(); -} -fixed_bitstring<12>& cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::set_dmrs_type2_r17() -{ - set(types::dmrs_type2_r17); - return c.get>(); -} -void cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::dmrs_type1_r17: - j.write_str("dmrsType1-r17", c.get>().to_string()); - break; - case types::dmrs_type2_r17: - j.write_str("dmrsType2-r17", c.get>().to_string()); - break; - default: - log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::dmrs_type1_r17: - HANDLE_CODE(c.get>().pack(bref)); - break; - case types::dmrs_type2_r17: - HANDLE_CODE(c.get>().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::dmrs_type1_r17: - HANDLE_CODE(c.get>().unpack(bref)); - break; - case types::dmrs_type2_r17: - HANDLE_CODE(c.get>().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "cg_sdt_cfg_r17_s::sdt_dmrs_ports_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// CG-StartingOffsets-r16 ::= SEQUENCE -SRSASN_CODE cg_start_offsets_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(cg_start_full_bw_inside_cot_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(cg_start_full_bw_outside_cot_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(cg_start_partial_bw_inside_cot_r16_present, 1)); - HANDLE_CODE(bref.pack(cg_start_partial_bw_outside_cot_r16_present, 1)); - - if (cg_start_full_bw_inside_cot_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cg_start_full_bw_inside_cot_r16, 1, 7, integer_packer(0, 6))); - } - if (cg_start_full_bw_outside_cot_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cg_start_full_bw_outside_cot_r16, 1, 7, integer_packer(0, 6))); - } - if (cg_start_partial_bw_inside_cot_r16_present) { - HANDLE_CODE(pack_integer(bref, cg_start_partial_bw_inside_cot_r16, (uint8_t)0u, (uint8_t)6u)); - } - if (cg_start_partial_bw_outside_cot_r16_present) { - HANDLE_CODE(pack_integer(bref, cg_start_partial_bw_outside_cot_r16, (uint8_t)0u, (uint8_t)6u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cg_start_offsets_r16_s::unpack(cbit_ref& bref) -{ - bool cg_start_full_bw_inside_cot_r16_present; - HANDLE_CODE(bref.unpack(cg_start_full_bw_inside_cot_r16_present, 1)); - bool cg_start_full_bw_outside_cot_r16_present; - HANDLE_CODE(bref.unpack(cg_start_full_bw_outside_cot_r16_present, 1)); - HANDLE_CODE(bref.unpack(cg_start_partial_bw_inside_cot_r16_present, 1)); - HANDLE_CODE(bref.unpack(cg_start_partial_bw_outside_cot_r16_present, 1)); - - if (cg_start_full_bw_inside_cot_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(cg_start_full_bw_inside_cot_r16, bref, 1, 7, integer_packer(0, 6))); - } - if (cg_start_full_bw_outside_cot_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(cg_start_full_bw_outside_cot_r16, bref, 1, 7, integer_packer(0, 6))); - } - if (cg_start_partial_bw_inside_cot_r16_present) { - HANDLE_CODE(unpack_integer(cg_start_partial_bw_inside_cot_r16, bref, (uint8_t)0u, (uint8_t)6u)); - } - if (cg_start_partial_bw_outside_cot_r16_present) { - HANDLE_CODE(unpack_integer(cg_start_partial_bw_outside_cot_r16, bref, (uint8_t)0u, (uint8_t)6u)); - } - - return SRSASN_SUCCESS; -} -void cg_start_offsets_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (cg_start_full_bw_inside_cot_r16.size() > 0) { - j.start_array("cg-StartingFullBW-InsideCOT-r16"); - for (const auto& e1 : cg_start_full_bw_inside_cot_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (cg_start_full_bw_outside_cot_r16.size() > 0) { - j.start_array("cg-StartingFullBW-OutsideCOT-r16"); - for (const auto& e1 : cg_start_full_bw_outside_cot_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (cg_start_partial_bw_inside_cot_r16_present) { - j.write_int("cg-StartingPartialBW-InsideCOT-r16", cg_start_partial_bw_inside_cot_r16); - } - if (cg_start_partial_bw_outside_cot_r16_present) { - j.write_int("cg-StartingPartialBW-OutsideCOT-r16", cg_start_partial_bw_outside_cot_r16); - } - j.end_obj(); -} - -// CG-UCI-OnPUSCH ::= CHOICE -void cg_uci_on_pusch_c::destroy_() -{ - switch (type_) { - case types::dyn: - c.destroy(); - break; - case types::semi_static: - c.destroy(); - break; - default: - break; - } -} -void cg_uci_on_pusch_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::dyn: - 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"); - } -} -cg_uci_on_pusch_c::cg_uci_on_pusch_c(const cg_uci_on_pusch_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::dyn: - 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"); - } -} -cg_uci_on_pusch_c& cg_uci_on_pusch_c::operator=(const cg_uci_on_pusch_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::dyn: - 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 *this; -} -cg_uci_on_pusch_c::dyn_l_& cg_uci_on_pusch_c::set_dyn() -{ - set(types::dyn); - return c.get(); -} -beta_offsets_s& cg_uci_on_pusch_c::set_semi_static() -{ - set(types::semi_static); - return c.get(); -} -void cg_uci_on_pusch_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::dyn: - 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"); - } - j.end_obj(); -} -SRSASN_CODE cg_uci_on_pusch_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::dyn: - 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; - } - 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::dyn: - 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; - } - return SRSASN_SUCCESS; -} - -// DMRS-BundlingPUCCH-Config-r17 ::= SEQUENCE -SRSASN_CODE dmrs_bundling_pucch_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pucch_dmrs_bundling_r17_present, 1)); - HANDLE_CODE(bref.pack(pucch_time_domain_win_len_r17_present, 1)); - HANDLE_CODE(bref.pack(pucch_win_restart_r17_present, 1)); - HANDLE_CODE(bref.pack(pucch_freq_hop_interv_r17_present, 1)); - - if (pucch_time_domain_win_len_r17_present) { - HANDLE_CODE(pack_integer(bref, pucch_time_domain_win_len_r17, (uint8_t)2u, (uint8_t)8u)); - } - if (pucch_freq_hop_interv_r17_present) { - HANDLE_CODE(pucch_freq_hop_interv_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE dmrs_bundling_pucch_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pucch_dmrs_bundling_r17_present, 1)); - HANDLE_CODE(bref.unpack(pucch_time_domain_win_len_r17_present, 1)); - HANDLE_CODE(bref.unpack(pucch_win_restart_r17_present, 1)); - HANDLE_CODE(bref.unpack(pucch_freq_hop_interv_r17_present, 1)); - - if (pucch_time_domain_win_len_r17_present) { - HANDLE_CODE(unpack_integer(pucch_time_domain_win_len_r17, bref, (uint8_t)2u, (uint8_t)8u)); - } - if (pucch_freq_hop_interv_r17_present) { - HANDLE_CODE(pucch_freq_hop_interv_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void dmrs_bundling_pucch_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pucch_dmrs_bundling_r17_present) { - j.write_str("pucch-DMRS-Bundling-r17", "enabled"); - } - if (pucch_time_domain_win_len_r17_present) { - j.write_int("pucch-TimeDomainWindowLength-r17", pucch_time_domain_win_len_r17); - } - if (pucch_win_restart_r17_present) { - j.write_str("pucch-WindowRestart-r17", "enabled"); - } - if (pucch_freq_hop_interv_r17_present) { - j.write_str("pucch-FrequencyHoppingInterval-r17", pucch_freq_hop_interv_r17.to_string()); - } - j.end_obj(); -} - -const char* dmrs_bundling_pucch_cfg_r17_s::pucch_freq_hop_interv_r17_opts::to_string() const -{ - static const char* names[] = {"s2", "s4", "s5", "s10"}; - return convert_enum_idx(names, 4, value, "dmrs_bundling_pucch_cfg_r17_s::pucch_freq_hop_interv_r17_e_"); -} -uint8_t dmrs_bundling_pucch_cfg_r17_s::pucch_freq_hop_interv_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 5, 10}; - return map_enum_number(numbers, 4, value, "dmrs_bundling_pucch_cfg_r17_s::pucch_freq_hop_interv_r17_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) { - HANDLE_CODE(transform_precoding_disabled.pack(bref)); - } - if (transform_precoding_enabled_present) { - HANDLE_CODE(transform_precoding_enabled.pack(bref)); - } - - 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) { - HANDLE_CODE(transform_precoding_disabled.unpack(bref)); - } - if (transform_precoding_enabled_present) { - HANDLE_CODE(transform_precoding_enabled.unpack(bref)); - } - - 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"); - transform_precoding_disabled.to_json(j); - } - if (transform_precoding_enabled_present) { - j.write_fieldname("transformPrecodingEnabled"); - transform_precoding_enabled.to_json(j); - } - j.end_obj(); -} - -const char* dmrs_ul_cfg_s::dmrs_add_position_opts::to_string() const -{ - static const char* names[] = {"pos0", "pos1", "pos3"}; - return convert_enum_idx(names, 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 numbers[] = {0, 1, 3}; - return map_enum_number(numbers, 3, value, "dmrs_ul_cfg_s::dmrs_add_position_e_"); -} - -SRSASN_CODE dmrs_ul_cfg_s::transform_precoding_disabled_s_::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(scrambling_id0_present, 1)); - HANDLE_CODE(bref.pack(scrambling_id1_present, 1)); - - 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 (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= dmrs_ul_r16_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(dmrs_ul_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dmrs_ul_cfg_s::transform_precoding_disabled_s_::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(scrambling_id0_present, 1)); - HANDLE_CODE(bref.unpack(scrambling_id1_present, 1)); - - 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 (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(dmrs_ul_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void dmrs_ul_cfg_s::transform_precoding_disabled_s_::to_json(json_writer& j) const -{ - j.start_obj(); - if (scrambling_id0_present) { - j.write_int("scramblingID0", scrambling_id0); - } - if (scrambling_id1_present) { - j.write_int("scramblingID1", scrambling_id1); - } - if (ext) { - if (dmrs_ul_r16_present) { - j.write_str("dmrs-Uplink-r16", "enabled"); - } - } - j.end_obj(); -} - -SRSASN_CODE dmrs_ul_cfg_s::transform_precoding_enabled_s_::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(npusch_id_present, 1)); - HANDLE_CODE(bref.pack(seq_group_hop_present, 1)); - HANDLE_CODE(bref.pack(seq_hop_present, 1)); - - if (npusch_id_present) { - HANDLE_CODE(pack_integer(bref, npusch_id, (uint16_t)0u, (uint16_t)1007u)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= dmrs_ul_transform_precoding_r16.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(dmrs_ul_transform_precoding_r16.is_present(), 1)); - if (dmrs_ul_transform_precoding_r16.is_present()) { - HANDLE_CODE(dmrs_ul_transform_precoding_r16->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE dmrs_ul_cfg_s::transform_precoding_enabled_s_::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(npusch_id_present, 1)); - HANDLE_CODE(bref.unpack(seq_group_hop_present, 1)); - HANDLE_CODE(bref.unpack(seq_hop_present, 1)); - - if (npusch_id_present) { - HANDLE_CODE(unpack_integer(npusch_id, bref, (uint16_t)0u, (uint16_t)1007u)); - } - - 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); - - unpack_presence_flag(dmrs_ul_transform_precoding_r16, bref); - if (dmrs_ul_transform_precoding_r16.is_present()) { - HANDLE_CODE(dmrs_ul_transform_precoding_r16->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void dmrs_ul_cfg_s::transform_precoding_enabled_s_::to_json(json_writer& j) const -{ - j.start_obj(); - if (npusch_id_present) { - j.write_int("nPUSCH-Identity", npusch_id); - } - if (seq_group_hop_present) { - j.write_str("sequenceGroupHopping", "disabled"); - } - if (seq_hop_present) { - j.write_str("sequenceHopping", "enabled"); - } - if (ext) { - if (dmrs_ul_transform_precoding_r16.is_present()) { - j.write_fieldname("dmrs-UplinkTransformPrecoding-r16"); - dmrs_ul_transform_precoding_r16->to_json(j); - } - } - j.end_obj(); -} - -// DummyPathlossReferenceRS-v1710 ::= SEQUENCE -SRSASN_CODE dummy_pathloss_ref_rs_v1710_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(add_pci_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, pusch_pathloss_ref_rs_id_r17, (uint8_t)0u, (uint8_t)63u)); - if (add_pci_r17_present) { - HANDLE_CODE(pack_integer(bref, add_pci_r17, (uint8_t)1u, (uint8_t)7u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE dummy_pathloss_ref_rs_v1710_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(add_pci_r17_present, 1)); - - HANDLE_CODE(unpack_integer(pusch_pathloss_ref_rs_id_r17, bref, (uint8_t)0u, (uint8_t)63u)); - if (add_pci_r17_present) { - HANDLE_CODE(unpack_integer(add_pci_r17, bref, (uint8_t)1u, (uint8_t)7u)); - } - - return SRSASN_SUCCESS; -} -void dummy_pathloss_ref_rs_v1710_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("pusch-PathlossReferenceRS-Id-r17", pusch_pathloss_ref_rs_id_r17); - if (add_pci_r17_present) { - j.write_int("additionalPCI-r17", add_pci_r17); - } - j.end_obj(); -} - -// 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)); - - 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)); - } - - 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 p0_pusch_alpha_set_s::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(); -} - -// P0-PUSCH-Set-r16 ::= SEQUENCE -SRSASN_CODE p0_pusch_set_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(p0_list_r16.size() > 0, 1)); - - HANDLE_CODE(pack_integer(bref, p0_pusch_set_id_r16, (uint8_t)0u, (uint8_t)15u)); - if (p0_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, p0_list_r16, 1, 2, integer_packer(-16, 15))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE p0_pusch_set_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool p0_list_r16_present; - HANDLE_CODE(bref.unpack(p0_list_r16_present, 1)); - - HANDLE_CODE(unpack_integer(p0_pusch_set_id_r16, bref, (uint8_t)0u, (uint8_t)15u)); - if (p0_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(p0_list_r16, bref, 1, 2, integer_packer(-16, 15))); - } - - return SRSASN_SUCCESS; -} -void p0_pusch_set_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("p0-PUSCH-SetId-r16", p0_pusch_set_id_r16); - if (p0_list_r16.size() > 0) { - j.start_array("p0-List-r16"); - for (const auto& e1 : p0_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - 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) -{ - type_ = other.type(); - switch (type_) { - case types::ssb: - c.init(other.c.get()); - break; - case types::csi_rs: - c.init(other.c.get()); - 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::operator=(const prach_res_ded_bfr_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ssb: - c.set(other.c.get()); - break; - case types::csi_rs: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); - } - - return *this; -} -bfr_ssb_res_s& prach_res_ded_bfr_c::set_ssb() -{ - set(types::ssb); - return c.get(); -} -bfr_csi_rs_res_s& prach_res_ded_bfr_c::set_csi_rs() -{ - set(types::csi_rs); - return c.get(); -} -void prach_res_ded_bfr_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ssb: - j.write_fieldname("ssb"); - c.get().to_json(j); - break; - case types::csi_rs: - j.write_fieldname("csi-RS"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); - } - j.end_obj(); -} -SRSASN_CODE prach_res_ded_bfr_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ssb: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::csi_rs: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE prach_res_ded_bfr_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ssb: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::csi_rs: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "prach_res_ded_bfr_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// PUCCH-FormatConfig ::= SEQUENCE -SRSASN_CODE pucch_format_cfg_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)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_format_cfg_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)); - } - - return SRSASN_SUCCESS; -} -void pucch_format_cfg_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.end_obj(); -} - -const char* pucch_format_cfg_s::nrof_slots_opts::to_string() const -{ - static const char* names[] = {"n2", "n4", "n8"}; - return convert_enum_idx(names, 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 numbers[] = {2, 4, 8}; - return map_enum_number(numbers, 3, value, "pucch_format_cfg_s::nrof_slots_e_"); -} - -// PUCCH-FormatConfigExt-r17 ::= SEQUENCE -SRSASN_CODE pucch_format_cfg_ext_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(max_code_rate_lp_r17_present, 1)); - - if (max_code_rate_lp_r17_present) { - HANDLE_CODE(max_code_rate_lp_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_format_cfg_ext_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(max_code_rate_lp_r17_present, 1)); - - if (max_code_rate_lp_r17_present) { - HANDLE_CODE(max_code_rate_lp_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void pucch_format_cfg_ext_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (max_code_rate_lp_r17_present) { - j.write_str("maxCodeRateLP-r17", max_code_rate_lp_r17.to_string()); - } - j.end_obj(); -} - -// 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(pathloss_ref_rss.size() > 0, 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, p0_set, 1, 8)); - } - if (pathloss_ref_rss.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, pathloss_ref_rss, 1, 4)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= pathloss_ref_rss_v1610.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(pathloss_ref_rss_v1610.is_present(), 1)); - if (pathloss_ref_rss_v1610.is_present()) { - HANDLE_CODE(pathloss_ref_rss_v1610->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_pwr_ctrl_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)); - bool p0_set_present; - HANDLE_CODE(bref.unpack(p0_set_present, 1)); - bool pathloss_ref_rss_present; - HANDLE_CODE(bref.unpack(pathloss_ref_rss_present, 1)); - HANDLE_CODE(bref.unpack(two_pucch_pc_adjustment_states_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)); - } - if (pathloss_ref_rss_present) { - HANDLE_CODE(unpack_dyn_seq_of(pathloss_ref_rss, 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); - - unpack_presence_flag(pathloss_ref_rss_v1610, bref); - if (pathloss_ref_rss_v1610.is_present()) { - HANDLE_CODE(pathloss_ref_rss_v1610->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void pucch_pwr_ctrl_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.size() > 0) { - j.start_array("p0-Set"); - for (const auto& e1 : p0_set) { - e1.to_json(j); - } - j.end_array(); - } - if (pathloss_ref_rss.size() > 0) { - 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"); - } - if (ext) { - if (pathloss_ref_rss_v1610.is_present()) { - j.write_fieldname("pathlossReferenceRSs-v1610"); - pathloss_ref_rss_v1610->to_json(j); - } - } - j.end_obj(); -} - -// PUCCH-PowerControlSetInfo-r17 ::= SEQUENCE -SRSASN_CODE pucch_pwr_ctrl_set_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pucch_pwr_ctrl_set_info_id_r17, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(pack_integer(bref, p0_pucch_id_r17, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(pucch_closed_loop_idx_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, pucch_pathloss_ref_rs_id_r17, (uint8_t)0u, (uint8_t)7u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_pwr_ctrl_set_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(pucch_pwr_ctrl_set_info_id_r17, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(unpack_integer(p0_pucch_id_r17, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(pucch_closed_loop_idx_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(pucch_pathloss_ref_rs_id_r17, bref, (uint8_t)0u, (uint8_t)7u)); - - return SRSASN_SUCCESS; -} -void pucch_pwr_ctrl_set_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("pucch-PowerControlSetInfoId-r17", pucch_pwr_ctrl_set_info_id_r17); - j.write_int("p0-PUCCH-Id-r17", p0_pucch_id_r17); - j.write_str("pucch-ClosedLoopIndex-r17", pucch_closed_loop_idx_r17.to_string()); - j.write_int("pucch-PathlossReferenceRS-Id-r17", pucch_pathloss_ref_rs_id_r17); - j.end_obj(); -} - -const char* pucch_pwr_ctrl_set_info_r17_s::pucch_closed_loop_idx_r17_opts::to_string() const -{ - static const char* names[] = {"i0", "i1"}; - return convert_enum_idx(names, 2, value, "pucch_pwr_ctrl_set_info_r17_s::pucch_closed_loop_idx_r17_e_"); -} -uint8_t pucch_pwr_ctrl_set_info_r17_s::pucch_closed_loop_idx_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "pucch_pwr_ctrl_set_info_r17_s::pucch_closed_loop_idx_r17_e_"); -} - -// 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)); - } - 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 (second_hop_prb_present) { - j.write_int("secondHopPRB", second_hop_prb); - } - j.write_fieldname("format"); - format.to_json(j); - j.end_obj(); -} - -void pucch_res_s::format_c_::destroy_() -{ - 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; - } -} -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_"); - } -} -pucch_res_s::format_c_::format_c_(const pucch_res_s::format_c_& other) -{ - 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_"); - } -} -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 *this; -} -pucch_format0_s& pucch_res_s::format_c_::set_format0() -{ - set(types::format0); - return c.get(); -} -pucch_format1_s& pucch_res_s::format_c_::set_format1() -{ - set(types::format1); - return c.get(); -} -pucch_format2_s& pucch_res_s::format_c_::set_format2() -{ - set(types::format2); - return c.get(); -} -pucch_format3_s& pucch_res_s::format_c_::set_format3() -{ - set(types::format3); - return c.get(); -} -pucch_format4_s& pucch_res_s::format_c_::set_format4() -{ - set(types::format4); - return c.get(); -} -void pucch_res_s::format_c_::to_json(json_writer& j) const -{ - j.start_obj(); - 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_"); - } - 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; - } - 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; - } - return SRSASN_SUCCESS; -} - -// PUCCH-ResourceExt-v1610 ::= SEQUENCE -SRSASN_CODE pucch_res_ext_v1610_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(interlace_alloc_r16_present, 1)); - HANDLE_CODE(bref.pack(format_v1610_present, 1)); - - if (interlace_alloc_r16_present) { - HANDLE_CODE(pack_integer(bref, interlace_alloc_r16.rb_set_idx_r16, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(interlace_alloc_r16.interlace0_r16.pack(bref)); - } - if (format_v1610_present) { - HANDLE_CODE(format_v1610.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= format_v1700.is_present(); - group_flags[0] |= pucch_repeat_nrof_slots_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(format_v1700.is_present(), 1)); - HANDLE_CODE(bref.pack(pucch_repeat_nrof_slots_r17_present, 1)); - if (format_v1700.is_present()) { - HANDLE_CODE(pack_integer(bref, format_v1700->nrof_prbs_r17, (uint8_t)1u, (uint8_t)16u)); - } - if (pucch_repeat_nrof_slots_r17_present) { - HANDLE_CODE(pucch_repeat_nrof_slots_r17.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_res_ext_v1610_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(interlace_alloc_r16_present, 1)); - HANDLE_CODE(bref.unpack(format_v1610_present, 1)); - - if (interlace_alloc_r16_present) { - HANDLE_CODE(unpack_integer(interlace_alloc_r16.rb_set_idx_r16, bref, (uint8_t)0u, (uint8_t)4u)); - HANDLE_CODE(interlace_alloc_r16.interlace0_r16.unpack(bref)); - } - if (format_v1610_present) { - HANDLE_CODE(format_v1610.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); - - unpack_presence_flag(format_v1700, bref); - HANDLE_CODE(bref.unpack(pucch_repeat_nrof_slots_r17_present, 1)); - if (format_v1700.is_present()) { - HANDLE_CODE(unpack_integer(format_v1700->nrof_prbs_r17, bref, (uint8_t)1u, (uint8_t)16u)); - } - if (pucch_repeat_nrof_slots_r17_present) { - HANDLE_CODE(pucch_repeat_nrof_slots_r17.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void pucch_res_ext_v1610_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (interlace_alloc_r16_present) { - j.write_fieldname("interlaceAllocation-r16"); - j.start_obj(); - j.write_int("rb-SetIndex-r16", interlace_alloc_r16.rb_set_idx_r16); - j.write_fieldname("interlace0-r16"); - interlace_alloc_r16.interlace0_r16.to_json(j); - j.end_obj(); - } - if (format_v1610_present) { - j.write_fieldname("format-v1610"); - format_v1610.to_json(j); - } - if (ext) { - if (format_v1700.is_present()) { - j.write_fieldname("format-v1700"); - j.start_obj(); - j.write_int("nrofPRBs-r17", format_v1700->nrof_prbs_r17); - j.end_obj(); - } - if (pucch_repeat_nrof_slots_r17_present) { - j.write_str("pucch-RepetitionNrofSlots-r17", pucch_repeat_nrof_slots_r17.to_string()); - } - } - j.end_obj(); -} - -void pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::destroy_() {} -void pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::interlace0_r16_c_( - const pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::scs15: - c.init(other.c.get()); - break; - case types::scs30: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_"); - } -} -pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_& -pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::operator=( - const pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::scs15: - c.set(other.c.get()); - break; - case types::scs30: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_"); - } - - return *this; -} -uint8_t& pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::set_scs15() -{ - set(types::scs15); - return c.get(); -} -uint8_t& pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::set_scs30() -{ - set(types::scs30); - return c.get(); -} -void pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::scs15: - j.write_int("scs15", c.get()); - break; - case types::scs30: - j.write_int("scs30", c.get()); - break; - default: - log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::scs15: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - break; - case types::scs30: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); - break; - default: - log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::scs15: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - break; - case types::scs30: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); - break; - default: - log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::interlace_alloc_r16_s_::interlace0_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void pucch_res_ext_v1610_s::format_v1610_c_::destroy_() -{ - switch (type_) { - case types::occ_v1610: - c.destroy(); - break; - default: - break; - } -} -void pucch_res_ext_v1610_s::format_v1610_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::interlace1_v1610: - break; - case types::occ_v1610: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::format_v1610_c_"); - } -} -pucch_res_ext_v1610_s::format_v1610_c_::format_v1610_c_(const pucch_res_ext_v1610_s::format_v1610_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::interlace1_v1610: - c.init(other.c.get()); - break; - case types::occ_v1610: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::format_v1610_c_"); - } -} -pucch_res_ext_v1610_s::format_v1610_c_& -pucch_res_ext_v1610_s::format_v1610_c_::operator=(const pucch_res_ext_v1610_s::format_v1610_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::interlace1_v1610: - c.set(other.c.get()); - break; - case types::occ_v1610: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::format_v1610_c_"); - } - - return *this; -} -uint8_t& pucch_res_ext_v1610_s::format_v1610_c_::set_interlace1_v1610() -{ - set(types::interlace1_v1610); - return c.get(); -} -pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_& pucch_res_ext_v1610_s::format_v1610_c_::set_occ_v1610() -{ - set(types::occ_v1610); - return c.get(); -} -void pucch_res_ext_v1610_s::format_v1610_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::interlace1_v1610: - j.write_int("interlace1-v1610", c.get()); - break; - case types::occ_v1610: - j.write_fieldname("occ-v1610"); - j.start_obj(); - if (c.get().occ_len_v1610_present) { - j.write_str("occ-Length-v1610", c.get().occ_len_v1610.to_string()); - } - if (c.get().occ_idx_v1610_present) { - j.write_str("occ-Index-v1610", c.get().occ_idx_v1610.to_string()); - } - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::format_v1610_c_"); - } - j.end_obj(); -} -SRSASN_CODE pucch_res_ext_v1610_s::format_v1610_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::interlace1_v1610: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - break; - case types::occ_v1610: - HANDLE_CODE(bref.pack(c.get().occ_len_v1610_present, 1)); - HANDLE_CODE(bref.pack(c.get().occ_idx_v1610_present, 1)); - if (c.get().occ_len_v1610_present) { - HANDLE_CODE(c.get().occ_len_v1610.pack(bref)); - } - if (c.get().occ_idx_v1610_present) { - HANDLE_CODE(c.get().occ_idx_v1610.pack(bref)); - } - break; - default: - log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::format_v1610_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_res_ext_v1610_s::format_v1610_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::interlace1_v1610: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - break; - case types::occ_v1610: - HANDLE_CODE(bref.unpack(c.get().occ_len_v1610_present, 1)); - HANDLE_CODE(bref.unpack(c.get().occ_idx_v1610_present, 1)); - if (c.get().occ_len_v1610_present) { - HANDLE_CODE(c.get().occ_len_v1610.unpack(bref)); - } - if (c.get().occ_idx_v1610_present) { - HANDLE_CODE(c.get().occ_idx_v1610.unpack(bref)); - } - break; - default: - log_invalid_choice_id(type_, "pucch_res_ext_v1610_s::format_v1610_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_len_v1610_opts::to_string() const -{ - static const char* names[] = {"n2", "n4"}; - return convert_enum_idx(names, 2, value, "pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_len_v1610_e_"); -} -uint8_t pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_len_v1610_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4}; - return map_enum_number(numbers, 2, value, "pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_len_v1610_e_"); -} - -const char* pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_idx_v1610_opts::to_string() const -{ - static const char* names[] = {"n0", "n1", "n2", "n3"}; - return convert_enum_idx(names, 4, value, "pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_idx_v1610_e_"); -} -uint8_t pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_idx_v1610_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1, 2, 3}; - return map_enum_number(numbers, 4, value, "pucch_res_ext_v1610_s::format_v1610_c_::occ_v1610_s_::occ_idx_v1610_e_"); -} - -const char* pucch_res_ext_v1610_s::pucch_repeat_nrof_slots_r17_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n4", "n8"}; - return convert_enum_idx(names, 4, value, "pucch_res_ext_v1610_s::pucch_repeat_nrof_slots_r17_e_"); -} -uint8_t pucch_res_ext_v1610_s::pucch_repeat_nrof_slots_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "pucch_res_ext_v1610_s::pucch_repeat_nrof_slots_r17_e_"); -} - -// PUCCH-ResourceGroup-r16 ::= SEQUENCE -SRSASN_CODE pucch_res_group_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pucch_res_group_id_r16, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(pack_dyn_seq_of(bref, res_per_group_list_r16, 1, 128, integer_packer(0, 127))); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_res_group_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(pucch_res_group_id_r16, bref, (uint8_t)0u, (uint8_t)3u)); - HANDLE_CODE(unpack_dyn_seq_of(res_per_group_list_r16, bref, 1, 128, integer_packer(0, 127))); - - return SRSASN_SUCCESS; -} -void pucch_res_group_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("pucch-ResourceGroupId-r16", pucch_res_group_id_r16); - j.start_array("resourcePerGroupList-r16"); - for (const auto& e1 : res_per_group_list_r16) { - j.write_int(e1); - } - j.end_array(); - j.end_obj(); -} - -// PUCCH-ResourceSet ::= SEQUENCE -SRSASN_CODE pucch_res_set_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(max_payload_size_present, 1)); - - 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 pucch_res_set_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(max_payload_size_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_size_present) { - HANDLE_CODE(unpack_integer(max_payload_size, bref, (uint16_t)4u, (uint16_t)256u)); - } - - return SRSASN_SUCCESS; -} -void pucch_res_set_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("pucch-ResourceSetId", pucch_res_set_id); - j.start_array("resourceList"); - for (const auto& e1 : res_list) { - j.write_int(e1); - } - j.end_array(); - if (max_payload_size_present) { - j.write_int("maxPayloadSize", max_payload_size); - } - 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_() -{ - switch (type_) { - case types::srs: - c.destroy(); - break; - default: - break; - } -} -void pucch_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_, "pucch_spatial_relation_info_s::ref_sig_c_"); - } -} -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::ssb_idx: - c.init(other.c.get()); - break; - 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_, "pucch_spatial_relation_info_s::ref_sig_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) -{ - 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::srs: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); - } - - return *this; -} -uint8_t& pucch_spatial_relation_info_s::ref_sig_c_::set_ssb_idx() -{ - set(types::ssb_idx); - return c.get(); -} -uint8_t& pucch_spatial_relation_info_s::ref_sig_c_::set_csi_rs_idx() -{ - set(types::csi_rs_idx); - return c.get(); -} -pucch_srs_s& pucch_spatial_relation_info_s::ref_sig_c_::set_srs() -{ - set(types::srs); - return c.get(); -} -void pucch_spatial_relation_info_s::ref_sig_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()); - break; - case types::srs: - j.write_fieldname("srs"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); - } - j.end_obj(); -} -SRSASN_CODE pucch_spatial_relation_info_s::ref_sig_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; - case types::srs: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::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; - case types::srs: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "pucch_spatial_relation_info_s::ref_sig_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* pucch_spatial_relation_info_s::closed_loop_idx_opts::to_string() const -{ - static const char* names[] = {"i0", "i1"}; - return convert_enum_idx(names, 2, value, "pucch_spatial_relation_info_s::closed_loop_idx_e_"); -} -uint8_t pucch_spatial_relation_info_s::closed_loop_idx_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "pucch_spatial_relation_info_s::closed_loop_idx_e_"); -} - -// PUCCH-SpatialRelationInfoExt-r16 ::= SEQUENCE -SRSASN_CODE pucch_spatial_relation_info_ext_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pucch_spatial_relation_info_id_v1610_present, 1)); - HANDLE_CODE(bref.pack(pucch_pathloss_ref_rs_id_v1610_present, 1)); - - if (pucch_spatial_relation_info_id_v1610_present) { - HANDLE_CODE(pack_integer(bref, pucch_spatial_relation_info_id_v1610, (uint8_t)9u, (uint8_t)64u)); - } - if (pucch_pathloss_ref_rs_id_v1610_present) { - HANDLE_CODE(pack_integer(bref, pucch_pathloss_ref_rs_id_v1610, (uint8_t)4u, (uint8_t)63u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_spatial_relation_info_ext_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pucch_spatial_relation_info_id_v1610_present, 1)); - HANDLE_CODE(bref.unpack(pucch_pathloss_ref_rs_id_v1610_present, 1)); - - if (pucch_spatial_relation_info_id_v1610_present) { - HANDLE_CODE(unpack_integer(pucch_spatial_relation_info_id_v1610, bref, (uint8_t)9u, (uint8_t)64u)); - } - if (pucch_pathloss_ref_rs_id_v1610_present) { - HANDLE_CODE(unpack_integer(pucch_pathloss_ref_rs_id_v1610, bref, (uint8_t)4u, (uint8_t)63u)); - } - - return SRSASN_SUCCESS; -} -void pucch_spatial_relation_info_ext_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pucch_spatial_relation_info_id_v1610_present) { - j.write_int("pucch-SpatialRelationInfoId-v1610", pucch_spatial_relation_info_id_v1610); - } - if (pucch_pathloss_ref_rs_id_v1610_present) { - j.write_int("pucch-PathlossReferenceRS-Id-v1610", pucch_pathloss_ref_rs_id_v1610); - } - j.end_obj(); -} - -// 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; -} -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::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_, "pusch_pathloss_ref_rs_s::ref_sig_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) -{ - 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_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); - } - - return *this; -} -uint8_t& pusch_pathloss_ref_rs_s::ref_sig_c_::set_ssb_idx() -{ - set(types::ssb_idx); - return c.get(); -} -uint8_t& pusch_pathloss_ref_rs_s::ref_sig_c_::set_csi_rs_idx() -{ - set(types::csi_rs_idx); - return c.get(); -} -void pusch_pathloss_ref_rs_s::ref_sig_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()); - break; - default: - log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); - } - j.end_obj(); -} -SRSASN_CODE pusch_pathloss_ref_rs_s::ref_sig_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_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::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_, "pusch_pathloss_ref_rs_s::ref_sig_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// PUSCH-PathlossReferenceRS-r16 ::= SEQUENCE -SRSASN_CODE pusch_pathloss_ref_rs_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pusch_pathloss_ref_rs_id_r16, (uint8_t)4u, (uint8_t)63u)); - HANDLE_CODE(ref_sig_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pusch_pathloss_ref_rs_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(pusch_pathloss_ref_rs_id_r16, bref, (uint8_t)4u, (uint8_t)63u)); - HANDLE_CODE(ref_sig_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void pusch_pathloss_ref_rs_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("pusch-PathlossReferenceRS-Id-r16", pusch_pathloss_ref_rs_id_r16); - j.write_fieldname("referenceSignal-r16"); - ref_sig_r16.to_json(j); - j.end_obj(); -} - -void pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::destroy_() {} -void pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::ref_sig_r16_c_(const pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::ssb_idx_r16: - c.init(other.c.get()); - break; - case types::csi_rs_idx_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); - } -} -pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_& -pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::operator=(const pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ssb_idx_r16: - c.set(other.c.get()); - break; - case types::csi_rs_idx_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); - } - - return *this; -} -uint8_t& pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::set_ssb_idx_r16() -{ - set(types::ssb_idx_r16); - return c.get(); -} -uint8_t& pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::set_csi_rs_idx_r16() -{ - set(types::csi_rs_idx_r16); - return c.get(); -} -void pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ssb_idx_r16: - j.write_int("ssb-Index-r16", c.get()); - break; - case types::csi_rs_idx_r16: - j.write_int("csi-RS-Index-r16", c.get()); - break; - default: - log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ssb_idx_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_idx_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); - break; - default: - log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ssb_idx_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_idx_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); - break; - default: - log_invalid_choice_id(type_, "pusch_pathloss_ref_rs_r16_s::ref_sig_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// PUSCH-TimeDomainResourceAllocation-r16 ::= SEQUENCE -SRSASN_CODE pusch_time_domain_res_alloc_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(k2_r16_present, 1)); - - if (k2_r16_present) { - HANDLE_CODE(pack_integer(bref, k2_r16, (uint8_t)0u, (uint8_t)32u)); - } - HANDLE_CODE(pack_dyn_seq_of(bref, pusch_alloc_list_r16, 1, 8)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pusch_time_domain_res_alloc_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(k2_r16_present, 1)); - - if (k2_r16_present) { - HANDLE_CODE(unpack_integer(k2_r16, bref, (uint8_t)0u, (uint8_t)32u)); - } - HANDLE_CODE(unpack_dyn_seq_of(pusch_alloc_list_r16, bref, 1, 8)); - - return SRSASN_SUCCESS; -} -void pusch_time_domain_res_alloc_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (k2_r16_present) { - j.write_int("k2-r16", k2_r16); - } - j.start_array("puschAllocationList-r16"); - for (const auto& e1 : pusch_alloc_list_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// SRI-PUSCH-PowerControl ::= SEQUENCE -SRSASN_CODE sri_pusch_pwr_ctrl_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)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sri_pusch_pwr_ctrl_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)); - - return SRSASN_SUCCESS; -} -void sri_pusch_pwr_ctrl_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.end_obj(); -} - -const char* sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_opts::to_string() const -{ - static const char* names[] = {"i0", "i1"}; - return convert_enum_idx(names, 2, value, "sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_e_"); -} -uint8_t sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "sri_pusch_pwr_ctrl_s::sri_pusch_closed_loop_idx_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 sched_request_res_cfg_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)); - } - - return SRSASN_SUCCESS; -} -void sched_request_res_cfg_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.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) -{ - type_ = other.type(); - switch (type_) { - case types::sym2: - break; - 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_, "sched_request_res_cfg_s::periodicity_and_offset_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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::sym2: - break; - 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_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); - } - - return *this; -} -void sched_request_res_cfg_s::periodicity_and_offset_c_::set_sym2() -{ - set(types::sym2); -} -void sched_request_res_cfg_s::periodicity_and_offset_c_::set_sym6or7() -{ - set(types::sym6or7); -} -void sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl1() -{ - set(types::sl1); -} -uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl2() -{ - set(types::sl2); - return c.get(); -} -uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl4() -{ - set(types::sl4); - return c.get(); -} -uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl5() -{ - set(types::sl5); - return c.get(); -} -uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl8() -{ - set(types::sl8); - return c.get(); -} -uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl10() -{ - set(types::sl10); - return c.get(); -} -uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl16() -{ - set(types::sl16); - return c.get(); -} -uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl20() -{ - set(types::sl20); - return c.get(); -} -uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl40() -{ - set(types::sl40); - return c.get(); -} -uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl80() -{ - set(types::sl80); - return c.get(); -} -uint8_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl160() -{ - set(types::sl160); - return c.get(); -} -uint16_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl320() -{ - set(types::sl320); - return c.get(); -} -uint16_t& sched_request_res_cfg_s::periodicity_and_offset_c_::set_sl640() -{ - set(types::sl640); - return c.get(); -} -void sched_request_res_cfg_s::periodicity_and_offset_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()); - 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_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); - } - j.end_obj(); -} -SRSASN_CODE sched_request_res_cfg_s::periodicity_and_offset_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)); - break; - case types::sl640: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)639u)); - break; - default: - log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::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)); - break; - case types::sl640: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)639u)); - break; - default: - log_invalid_choice_id(type_, "sched_request_res_cfg_s::periodicity_and_offset_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// SchedulingRequestResourceConfigExt-v1610 ::= SEQUENCE -SRSASN_CODE sched_request_res_cfg_ext_v1610_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(phy_prio_idx_r16_present, 1)); - - if (phy_prio_idx_r16_present) { - HANDLE_CODE(phy_prio_idx_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sched_request_res_cfg_ext_v1610_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(phy_prio_idx_r16_present, 1)); - - if (phy_prio_idx_r16_present) { - HANDLE_CODE(phy_prio_idx_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sched_request_res_cfg_ext_v1610_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (phy_prio_idx_r16_present) { - j.write_str("phy-PriorityIndex-r16", phy_prio_idx_r16.to_string()); - } - j.end_obj(); -} - -const char* sched_request_res_cfg_ext_v1610_s::phy_prio_idx_r16_opts::to_string() const -{ - static const char* names[] = {"p0", "p1"}; - return convert_enum_idx(names, 2, value, "sched_request_res_cfg_ext_v1610_s::phy_prio_idx_r16_e_"); -} -uint8_t sched_request_res_cfg_ext_v1610_s::phy_prio_idx_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "sched_request_res_cfg_ext_v1610_s::phy_prio_idx_r16_e_"); -} - -// SchedulingRequestResourceConfigExt-v1700 ::= SEQUENCE -SRSASN_CODE sched_request_res_cfg_ext_v1700_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(periodicity_and_offset_r17_present, 1)); - - if (periodicity_and_offset_r17_present) { - HANDLE_CODE(periodicity_and_offset_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sched_request_res_cfg_ext_v1700_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(periodicity_and_offset_r17_present, 1)); - - if (periodicity_and_offset_r17_present) { - HANDLE_CODE(periodicity_and_offset_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sched_request_res_cfg_ext_v1700_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (periodicity_and_offset_r17_present) { - j.write_fieldname("periodicityAndOffset-r17"); - periodicity_and_offset_r17.to_json(j); - } - j.end_obj(); -} - -void sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::destroy_() {} -void sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::periodicity_and_offset_r17_c_( - const sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::sl1280: - c.init(other.c.get()); - break; - case types::sl2560: - c.init(other.c.get()); - break; - case types::sl5120: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_"); - } -} -sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_& -sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::operator=( - const sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::sl1280: - c.set(other.c.get()); - break; - case types::sl2560: - c.set(other.c.get()); - break; - case types::sl5120: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_"); - } - - return *this; -} -uint16_t& sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::set_sl1280() -{ - set(types::sl1280); - return c.get(); -} -uint16_t& sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::set_sl2560() -{ - set(types::sl2560); - return c.get(); -} -uint16_t& sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::set_sl5120() -{ - set(types::sl5120); - return c.get(); -} -void sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::sl1280: - j.write_int("sl1280", c.get()); - break; - case types::sl2560: - j.write_int("sl2560", c.get()); - break; - case types::sl5120: - j.write_int("sl5120", c.get()); - break; - default: - log_invalid_choice_id(type_, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - 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; - case types::sl5120: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)5119u)); - break; - default: - log_invalid_choice_id(type_, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - 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; - case types::sl5120: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)5119u)); - break; - default: - log_invalid_choice_id(type_, "sched_request_res_cfg_ext_v1700_s::periodicity_and_offset_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// UCI-OnPUSCH ::= SEQUENCE -SRSASN_CODE uci_on_pusch_s::pack(bit_ref& bref) const -{ - 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 uci_on_pusch_s::unpack(cbit_ref& 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 uci_on_pusch_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_str("scaling", scaling.to_string()); - j.end_obj(); -} - -void uci_on_pusch_s::beta_offsets_c_::destroy_() -{ - switch (type_) { - case types::dyn: - c.destroy(); - break; - case types::semi_static: - c.destroy(); - break; - default: - break; - } -} -void uci_on_pusch_s::beta_offsets_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::dyn: - c.init(); - break; - case types::semi_static: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); - } -} -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::dyn: - 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_, "uci_on_pusch_s::beta_offsets_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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::dyn: - 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_, "uci_on_pusch_s::beta_offsets_c_"); - } - - return *this; -} -uci_on_pusch_s::beta_offsets_c_::dyn_l_& uci_on_pusch_s::beta_offsets_c_::set_dyn() -{ - set(types::dyn); - return c.get(); -} -beta_offsets_s& uci_on_pusch_s::beta_offsets_c_::set_semi_static() -{ - set(types::semi_static); - return c.get(); -} -void uci_on_pusch_s::beta_offsets_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::dyn: - 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_, "uci_on_pusch_s::beta_offsets_c_"); - } - j.end_obj(); -} -SRSASN_CODE uci_on_pusch_s::beta_offsets_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::dyn: - HANDLE_CODE(pack_fixed_seq_of(bref, c.get(), c.get().size())); - break; - case types::semi_static: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE uci_on_pusch_s::beta_offsets_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::dyn: - HANDLE_CODE(unpack_fixed_seq_of(c.get(), bref, c.get().size())); - break; - case types::semi_static: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_s::beta_offsets_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* uci_on_pusch_s::scaling_opts::to_string() const -{ - static const char* names[] = {"f0p5", "f0p65", "f0p8", "f1"}; - return convert_enum_idx(names, 4, value, "uci_on_pusch_s::scaling_e_"); -} - -// UCI-OnPUSCH-DCI-0-2-r16 ::= SEQUENCE -SRSASN_CODE uci_on_pusch_dci_0_2_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(beta_offsets_dci_0_2_r16_present, 1)); - - if (beta_offsets_dci_0_2_r16_present) { - HANDLE_CODE(beta_offsets_dci_0_2_r16.pack(bref)); - } - HANDLE_CODE(scaling_dci_0_2_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE uci_on_pusch_dci_0_2_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(beta_offsets_dci_0_2_r16_present, 1)); - - if (beta_offsets_dci_0_2_r16_present) { - HANDLE_CODE(beta_offsets_dci_0_2_r16.unpack(bref)); - } - HANDLE_CODE(scaling_dci_0_2_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void uci_on_pusch_dci_0_2_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (beta_offsets_dci_0_2_r16_present) { - j.write_fieldname("betaOffsetsDCI-0-2-r16"); - beta_offsets_dci_0_2_r16.to_json(j); - } - j.write_str("scalingDCI-0-2-r16", scaling_dci_0_2_r16.to_string()); - j.end_obj(); -} - -void uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::destroy_() -{ - switch (type_) { - case types::dyn_dci_0_2_r16: - c.destroy(); - break; - case types::semi_static_dci_0_2_r16: - c.destroy(); - break; - default: - break; - } -} -void uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::dyn_dci_0_2_r16: - c.init(); - break; - case types::semi_static_dci_0_2_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_"); - } -} -uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::beta_offsets_dci_0_2_r16_c_( - const uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::dyn_dci_0_2_r16: - c.init(other.c.get()); - break; - case types::semi_static_dci_0_2_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_"); - } -} -uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_& -uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::operator=( - const uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::dyn_dci_0_2_r16: - c.set(other.c.get()); - break; - case types::semi_static_dci_0_2_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_"); - } - - return *this; -} -uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_& -uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::set_dyn_dci_0_2_r16() -{ - set(types::dyn_dci_0_2_r16); - return c.get(); -} -beta_offsets_s& uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::set_semi_static_dci_0_2_r16() -{ - set(types::semi_static_dci_0_2_r16); - return c.get(); -} -void uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::dyn_dci_0_2_r16: - j.write_fieldname("dynamicDCI-0-2-r16"); - c.get().to_json(j); - break; - case types::semi_static_dci_0_2_r16: - j.write_fieldname("semiStaticDCI-0-2-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::dyn_dci_0_2_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::semi_static_dci_0_2_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::dyn_dci_0_2_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::semi_static_dci_0_2_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::destroy_() -{ - switch (type_) { - case types::one_bit_r16: - c.destroy(); - break; - case types::two_bits_r16: - c.destroy(); - break; - default: - break; - } -} -void uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::one_bit_r16: - c.init(); - break; - case types::two_bits_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_"); - } -} -uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_( - const uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::one_bit_r16: - c.init(other.c.get()); - break; - case types::two_bits_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_"); - } -} -uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_& -uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::operator=( - const uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::one_bit_r16: - c.set(other.c.get()); - break; - case types::two_bits_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_"); - } - - return *this; -} -uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::one_bit_r16_l_& -uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::set_one_bit_r16() -{ - set(types::one_bit_r16); - return c.get(); -} -uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::two_bits_r16_l_& -uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::set_two_bits_r16() -{ - set(types::two_bits_r16); - return c.get(); -} -void uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::one_bit_r16: - j.start_array("oneBit-r16"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); - break; - case types::two_bits_r16: - j.start_array("twoBits-r16"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::one_bit_r16: - HANDLE_CODE(pack_fixed_seq_of(bref, c.get(), c.get().size())); - break; - case types::two_bits_r16: - HANDLE_CODE(pack_fixed_seq_of(bref, c.get(), c.get().size())); - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::one_bit_r16: - HANDLE_CODE(unpack_fixed_seq_of(c.get(), bref, c.get().size())); - break; - case types::two_bits_r16: - HANDLE_CODE(unpack_fixed_seq_of(c.get(), bref, c.get().size())); - break; - default: - log_invalid_choice_id(type_, "uci_on_pusch_dci_0_2_r16_s::beta_offsets_dci_0_2_r16_c_::dyn_dci_0_2_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* uci_on_pusch_dci_0_2_r16_s::scaling_dci_0_2_r16_opts::to_string() const -{ - static const char* names[] = {"f0p5", "f0p65", "f0p8", "f1"}; - return convert_enum_idx(names, 4, value, "uci_on_pusch_dci_0_2_r16_s::scaling_dci_0_2_r16_e_"); -} - -// BetaOffsetsCrossPriSel-r17 ::= CHOICE -void beta_offsets_cross_pri_sel_r17_c::destroy_() -{ - switch (type_) { - case types::dyn_r17: - c.destroy(); - break; - case types::semi_static_r17: - c.destroy(); - break; - default: - break; - } -} -void beta_offsets_cross_pri_sel_r17_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::dyn_r17: - c.init(); - break; - case types::semi_static_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_r17_c"); - } -} -beta_offsets_cross_pri_sel_r17_c::beta_offsets_cross_pri_sel_r17_c(const beta_offsets_cross_pri_sel_r17_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::dyn_r17: - c.init(other.c.get()); - break; - case types::semi_static_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_r17_c"); - } -} -beta_offsets_cross_pri_sel_r17_c& -beta_offsets_cross_pri_sel_r17_c::operator=(const beta_offsets_cross_pri_sel_r17_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::dyn_r17: - c.set(other.c.get()); - break; - case types::semi_static_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_r17_c"); - } - - return *this; -} -beta_offsets_cross_pri_sel_r17_c::dyn_r17_l_& beta_offsets_cross_pri_sel_r17_c::set_dyn_r17() -{ - set(types::dyn_r17); - return c.get(); -} -beta_offsets_cross_pri_r17_l& beta_offsets_cross_pri_sel_r17_c::set_semi_static_r17() -{ - set(types::semi_static_r17); - return c.get(); -} -void beta_offsets_cross_pri_sel_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::dyn_r17: - j.start_array("dynamic-r17"); - for (const auto& e1 : c.get()) { - j.start_array(); - for (const auto& e2 : e1) { - j.write_int(e2); - } - j.end_array(); - } - j.end_array(); - break; - case types::semi_static_r17: - j.start_array("semiStatic-r17"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_r17_c"); - } - j.end_obj(); -} -SRSASN_CODE beta_offsets_cross_pri_sel_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::dyn_r17: - HANDLE_CODE(pack_fixed_seq_of(bref, - c.get(), - c.get().size(), - FixedSeqOfPacker>(3, integer_packer(0, 31)))); - break; - case types::semi_static_r17: - HANDLE_CODE(pack_fixed_seq_of(bref, - c.get(), - c.get().size(), - integer_packer(0, 31))); - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE beta_offsets_cross_pri_sel_r17_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::dyn_r17: - HANDLE_CODE(unpack_fixed_seq_of(c.get(), - bref, - c.get().size(), - FixedSeqOfPacker>(3, integer_packer(0, 31)))); - break; - case types::semi_static_r17: - HANDLE_CODE(unpack_fixed_seq_of(c.get(), - bref, - c.get().size(), - integer_packer(0, 31))); - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// BetaOffsetsCrossPriSelDCI-0-2-r17 ::= CHOICE -void beta_offsets_cross_pri_sel_dci_0_2_r17_c::destroy_() -{ - switch (type_) { - case types::dyn_dci_0_2_r17: - c.destroy(); - break; - case types::semi_static_dci_0_2_r17: - c.destroy(); - break; - default: - break; - } -} -void beta_offsets_cross_pri_sel_dci_0_2_r17_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::dyn_dci_0_2_r17: - c.init(); - break; - case types::semi_static_dci_0_2_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c"); - } -} -beta_offsets_cross_pri_sel_dci_0_2_r17_c::beta_offsets_cross_pri_sel_dci_0_2_r17_c( - const beta_offsets_cross_pri_sel_dci_0_2_r17_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::dyn_dci_0_2_r17: - c.init(other.c.get()); - break; - case types::semi_static_dci_0_2_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c"); - } -} -beta_offsets_cross_pri_sel_dci_0_2_r17_c& -beta_offsets_cross_pri_sel_dci_0_2_r17_c::operator=(const beta_offsets_cross_pri_sel_dci_0_2_r17_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::dyn_dci_0_2_r17: - c.set(other.c.get()); - break; - case types::semi_static_dci_0_2_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c"); - } - - return *this; -} -beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_& -beta_offsets_cross_pri_sel_dci_0_2_r17_c::set_dyn_dci_0_2_r17() -{ - set(types::dyn_dci_0_2_r17); - return c.get(); -} -beta_offsets_cross_pri_r17_l& beta_offsets_cross_pri_sel_dci_0_2_r17_c::set_semi_static_dci_0_2_r17() -{ - set(types::semi_static_dci_0_2_r17); - return c.get(); -} -void beta_offsets_cross_pri_sel_dci_0_2_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::dyn_dci_0_2_r17: - j.write_fieldname("dynamicDCI-0-2-r17"); - c.get().to_json(j); - break; - case types::semi_static_dci_0_2_r17: - j.start_array("semiStaticDCI-0-2-r17"); - for (const auto& e1 : c.get()) { - j.write_int(e1); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c"); - } - j.end_obj(); -} -SRSASN_CODE beta_offsets_cross_pri_sel_dci_0_2_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::dyn_dci_0_2_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::semi_static_dci_0_2_r17: - HANDLE_CODE(pack_fixed_seq_of(bref, - c.get(), - c.get().size(), - integer_packer(0, 31))); - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE beta_offsets_cross_pri_sel_dci_0_2_r17_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::dyn_dci_0_2_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::semi_static_dci_0_2_r17: - HANDLE_CODE(unpack_fixed_seq_of(c.get(), - bref, - c.get().size(), - integer_packer(0, 31))); - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::destroy_() -{ - switch (type_) { - case types::one_bit_r17: - c.destroy(); - break; - case types::two_bits_r17: - c.destroy(); - break; - default: - break; - } -} -void beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::one_bit_r17: - c.init(); - break; - case types::two_bits_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_"); - } -} -beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::dyn_dci_0_2_r17_c_( - const beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::one_bit_r17: - c.init(other.c.get()); - break; - case types::two_bits_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_"); - } -} -beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_& -beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::operator=( - const beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::one_bit_r17: - c.set(other.c.get()); - break; - case types::two_bits_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_"); - } - - return *this; -} -beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::one_bit_r17_l_& -beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::set_one_bit_r17() -{ - set(types::one_bit_r17); - return c.get(); -} -beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::two_bits_r17_l_& -beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::set_two_bits_r17() -{ - set(types::two_bits_r17); - return c.get(); -} -void beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::one_bit_r17: - j.start_array("oneBit-r17"); - for (const auto& e1 : c.get()) { - j.start_array(); - for (const auto& e2 : e1) { - j.write_int(e2); - } - j.end_array(); - } - j.end_array(); - break; - case types::two_bits_r17: - j.start_array("twoBits-r17"); - for (const auto& e1 : c.get()) { - j.start_array(); - for (const auto& e2 : e1) { - j.write_int(e2); - } - j.end_array(); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::one_bit_r17: - HANDLE_CODE(pack_fixed_seq_of(bref, - c.get(), - c.get().size(), - FixedSeqOfPacker>(3, integer_packer(0, 31)))); - break; - case types::two_bits_r17: - HANDLE_CODE(pack_fixed_seq_of(bref, - c.get(), - c.get().size(), - FixedSeqOfPacker>(3, integer_packer(0, 31)))); - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::one_bit_r17: - HANDLE_CODE(unpack_fixed_seq_of(c.get(), - bref, - c.get().size(), - FixedSeqOfPacker>(3, integer_packer(0, 31)))); - break; - case types::two_bits_r17: - HANDLE_CODE(unpack_fixed_seq_of(c.get(), - bref, - c.get().size(), - FixedSeqOfPacker>(3, integer_packer(0, 31)))); - break; - default: - log_invalid_choice_id(type_, "beta_offsets_cross_pri_sel_dci_0_2_r17_c::dyn_dci_0_2_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// ConfiguredGrantConfig ::= SEQUENCE -SRSASN_CODE cfg_grant_cfg_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(cfg_grant_timer_present, 1)); - HANDLE_CODE(bref.pack(rrc_cfg_ul_grant_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 (cfg_grant_timer_present) { - HANDLE_CODE(pack_integer(bref, cfg_grant_timer, (uint8_t)1u, (uint8_t)64u)); - } - if (rrc_cfg_ul_grant_present) { - HANDLE_CODE(rrc_cfg_ul_grant.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= cg_retx_timer_r16_present; - group_flags[0] |= cg_min_dfi_delay_r16_present; - group_flags[0] |= cg_nrof_pusch_in_slot_r16_present; - group_flags[0] |= cg_nrof_slots_r16_present; - group_flags[0] |= cg_start_offsets_r16.is_present(); - group_flags[0] |= cg_uci_mux_r16_present; - group_flags[0] |= cg_cot_sharing_offset_r16_present; - group_flags[0] |= beta_offset_cg_uci_r16_present; - group_flags[0] |= cg_cot_sharing_list_r16.is_present(); - group_flags[0] |= harq_proc_id_offset_r16_present; - group_flags[0] |= harq_proc_id_offset2_r16_present; - group_flags[0] |= cfg_grant_cfg_idx_r16_present; - group_flags[0] |= cfg_grant_cfg_idx_mac_r16_present; - group_flags[0] |= periodicity_ext_r16_present; - group_flags[0] |= start_from_rv0_r16_present; - group_flags[0] |= phy_prio_idx_r16_present; - group_flags[0] |= autonomous_tx_r16_present; - group_flags[1] |= cg_beta_offsets_cross_pri0_r17.is_present(); - group_flags[1] |= cg_beta_offsets_cross_pri1_r17.is_present(); - group_flags[1] |= map_pattern_r17_present; - group_flags[1] |= seq_offset_for_rv_r17_present; - group_flags[1] |= p0_pusch_alpha2_r17_present; - group_flags[1] |= pwr_ctrl_loop_to_use2_r17_present; - group_flags[1] |= cg_cot_sharing_list_r17.is_present(); - group_flags[1] |= periodicity_ext_r17_present; - group_flags[1] |= rep_k_v1710_present; - group_flags[1] |= nrof_harq_processes_v1700_present; - group_flags[1] |= harq_proc_id_offset2_v1700_present; - group_flags[1] |= cfg_grant_timer_v1700_present; - group_flags[1] |= cg_min_dfi_delay_v1710_present; - group_flags[2] |= harq_proc_id_offset_v1730_present; - group_flags[2] |= cg_nrof_slots_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(cg_retx_timer_r16_present, 1)); - HANDLE_CODE(bref.pack(cg_min_dfi_delay_r16_present, 1)); - HANDLE_CODE(bref.pack(cg_nrof_pusch_in_slot_r16_present, 1)); - HANDLE_CODE(bref.pack(cg_nrof_slots_r16_present, 1)); - HANDLE_CODE(bref.pack(cg_start_offsets_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(cg_uci_mux_r16_present, 1)); - HANDLE_CODE(bref.pack(cg_cot_sharing_offset_r16_present, 1)); - HANDLE_CODE(bref.pack(beta_offset_cg_uci_r16_present, 1)); - HANDLE_CODE(bref.pack(cg_cot_sharing_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(harq_proc_id_offset_r16_present, 1)); - HANDLE_CODE(bref.pack(harq_proc_id_offset2_r16_present, 1)); - HANDLE_CODE(bref.pack(cfg_grant_cfg_idx_r16_present, 1)); - HANDLE_CODE(bref.pack(cfg_grant_cfg_idx_mac_r16_present, 1)); - HANDLE_CODE(bref.pack(periodicity_ext_r16_present, 1)); - HANDLE_CODE(bref.pack(start_from_rv0_r16_present, 1)); - HANDLE_CODE(bref.pack(phy_prio_idx_r16_present, 1)); - HANDLE_CODE(bref.pack(autonomous_tx_r16_present, 1)); - if (cg_retx_timer_r16_present) { - HANDLE_CODE(pack_integer(bref, cg_retx_timer_r16, (uint8_t)1u, (uint8_t)64u)); - } - if (cg_min_dfi_delay_r16_present) { - HANDLE_CODE(cg_min_dfi_delay_r16.pack(bref)); - } - if (cg_nrof_pusch_in_slot_r16_present) { - HANDLE_CODE(pack_integer(bref, cg_nrof_pusch_in_slot_r16, (uint8_t)1u, (uint8_t)7u)); - } - if (cg_nrof_slots_r16_present) { - HANDLE_CODE(pack_integer(bref, cg_nrof_slots_r16, (uint8_t)1u, (uint8_t)40u)); - } - if (cg_start_offsets_r16.is_present()) { - HANDLE_CODE(cg_start_offsets_r16->pack(bref)); - } - if (cg_cot_sharing_offset_r16_present) { - HANDLE_CODE(pack_integer(bref, cg_cot_sharing_offset_r16, (uint8_t)1u, (uint8_t)39u)); - } - if (beta_offset_cg_uci_r16_present) { - HANDLE_CODE(pack_integer(bref, beta_offset_cg_uci_r16, (uint8_t)0u, (uint8_t)31u)); - } - if (cg_cot_sharing_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *cg_cot_sharing_list_r16, 1, 1709)); - } - if (harq_proc_id_offset_r16_present) { - HANDLE_CODE(pack_integer(bref, harq_proc_id_offset_r16, (uint8_t)0u, (uint8_t)15u)); - } - if (harq_proc_id_offset2_r16_present) { - HANDLE_CODE(pack_integer(bref, harq_proc_id_offset2_r16, (uint8_t)0u, (uint8_t)15u)); - } - if (cfg_grant_cfg_idx_r16_present) { - HANDLE_CODE(pack_integer(bref, cfg_grant_cfg_idx_r16, (uint8_t)0u, (uint8_t)11u)); - } - if (cfg_grant_cfg_idx_mac_r16_present) { - HANDLE_CODE(pack_integer(bref, cfg_grant_cfg_idx_mac_r16, (uint8_t)0u, (uint8_t)31u)); - } - if (periodicity_ext_r16_present) { - HANDLE_CODE(pack_integer(bref, periodicity_ext_r16, (uint16_t)1u, (uint16_t)5120u)); - } - if (start_from_rv0_r16_present) { - HANDLE_CODE(start_from_rv0_r16.pack(bref)); - } - if (phy_prio_idx_r16_present) { - HANDLE_CODE(phy_prio_idx_r16.pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(cg_beta_offsets_cross_pri0_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(cg_beta_offsets_cross_pri1_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(map_pattern_r17_present, 1)); - HANDLE_CODE(bref.pack(seq_offset_for_rv_r17_present, 1)); - HANDLE_CODE(bref.pack(p0_pusch_alpha2_r17_present, 1)); - HANDLE_CODE(bref.pack(pwr_ctrl_loop_to_use2_r17_present, 1)); - HANDLE_CODE(bref.pack(cg_cot_sharing_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(periodicity_ext_r17_present, 1)); - HANDLE_CODE(bref.pack(rep_k_v1710_present, 1)); - HANDLE_CODE(bref.pack(nrof_harq_processes_v1700_present, 1)); - HANDLE_CODE(bref.pack(harq_proc_id_offset2_v1700_present, 1)); - HANDLE_CODE(bref.pack(cfg_grant_timer_v1700_present, 1)); - HANDLE_CODE(bref.pack(cg_min_dfi_delay_v1710_present, 1)); - if (cg_beta_offsets_cross_pri0_r17.is_present()) { - HANDLE_CODE(cg_beta_offsets_cross_pri0_r17->pack(bref)); - } - if (cg_beta_offsets_cross_pri1_r17.is_present()) { - HANDLE_CODE(cg_beta_offsets_cross_pri1_r17->pack(bref)); - } - if (map_pattern_r17_present) { - HANDLE_CODE(map_pattern_r17.pack(bref)); - } - if (seq_offset_for_rv_r17_present) { - HANDLE_CODE(pack_integer(bref, seq_offset_for_rv_r17, (uint8_t)0u, (uint8_t)3u)); - } - if (p0_pusch_alpha2_r17_present) { - HANDLE_CODE(pack_integer(bref, p0_pusch_alpha2_r17, (uint8_t)0u, (uint8_t)29u)); - } - if (pwr_ctrl_loop_to_use2_r17_present) { - HANDLE_CODE(pwr_ctrl_loop_to_use2_r17.pack(bref)); - } - if (cg_cot_sharing_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *cg_cot_sharing_list_r17, 1, 50722)); - } - if (periodicity_ext_r17_present) { - HANDLE_CODE(pack_integer(bref, periodicity_ext_r17, (uint16_t)1u, (uint16_t)40960u)); - } - if (rep_k_v1710_present) { - HANDLE_CODE(rep_k_v1710.pack(bref)); - } - if (nrof_harq_processes_v1700_present) { - HANDLE_CODE(pack_integer(bref, nrof_harq_processes_v1700, (uint8_t)17u, (uint8_t)32u)); - } - if (harq_proc_id_offset2_v1700_present) { - HANDLE_CODE(pack_integer(bref, harq_proc_id_offset2_v1700, (uint8_t)16u, (uint8_t)31u)); - } - if (cfg_grant_timer_v1700_present) { - HANDLE_CODE(pack_integer(bref, cfg_grant_timer_v1700, (uint16_t)33u, (uint16_t)288u)); - } - if (cg_min_dfi_delay_v1710_present) { - HANDLE_CODE(pack_integer(bref, cg_min_dfi_delay_v1710, (uint16_t)238u, (uint16_t)3584u)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(harq_proc_id_offset_v1730_present, 1)); - HANDLE_CODE(bref.pack(cg_nrof_slots_r17_present, 1)); - if (harq_proc_id_offset_v1730_present) { - HANDLE_CODE(pack_integer(bref, harq_proc_id_offset_v1730, (uint8_t)16u, (uint8_t)31u)); - } - if (cg_nrof_slots_r17_present) { - HANDLE_CODE(pack_integer(bref, cg_nrof_slots_r17, (uint16_t)1u, (uint16_t)320u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cfg_grant_cfg_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(cfg_grant_timer_present, 1)); - HANDLE_CODE(bref.unpack(rrc_cfg_ul_grant_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 (cfg_grant_timer_present) { - HANDLE_CODE(unpack_integer(cfg_grant_timer, bref, (uint8_t)1u, (uint8_t)64u)); - } - if (rrc_cfg_ul_grant_present) { - HANDLE_CODE(rrc_cfg_ul_grant.unpack(bref)); - } - - if (ext) { - 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(cg_retx_timer_r16_present, 1)); - HANDLE_CODE(bref.unpack(cg_min_dfi_delay_r16_present, 1)); - HANDLE_CODE(bref.unpack(cg_nrof_pusch_in_slot_r16_present, 1)); - HANDLE_CODE(bref.unpack(cg_nrof_slots_r16_present, 1)); - unpack_presence_flag(cg_start_offsets_r16, bref); - HANDLE_CODE(bref.unpack(cg_uci_mux_r16_present, 1)); - HANDLE_CODE(bref.unpack(cg_cot_sharing_offset_r16_present, 1)); - HANDLE_CODE(bref.unpack(beta_offset_cg_uci_r16_present, 1)); - unpack_presence_flag(cg_cot_sharing_list_r16, bref); - HANDLE_CODE(bref.unpack(harq_proc_id_offset_r16_present, 1)); - HANDLE_CODE(bref.unpack(harq_proc_id_offset2_r16_present, 1)); - HANDLE_CODE(bref.unpack(cfg_grant_cfg_idx_r16_present, 1)); - HANDLE_CODE(bref.unpack(cfg_grant_cfg_idx_mac_r16_present, 1)); - HANDLE_CODE(bref.unpack(periodicity_ext_r16_present, 1)); - HANDLE_CODE(bref.unpack(start_from_rv0_r16_present, 1)); - HANDLE_CODE(bref.unpack(phy_prio_idx_r16_present, 1)); - HANDLE_CODE(bref.unpack(autonomous_tx_r16_present, 1)); - if (cg_retx_timer_r16_present) { - HANDLE_CODE(unpack_integer(cg_retx_timer_r16, bref, (uint8_t)1u, (uint8_t)64u)); - } - if (cg_min_dfi_delay_r16_present) { - HANDLE_CODE(cg_min_dfi_delay_r16.unpack(bref)); - } - if (cg_nrof_pusch_in_slot_r16_present) { - HANDLE_CODE(unpack_integer(cg_nrof_pusch_in_slot_r16, bref, (uint8_t)1u, (uint8_t)7u)); - } - if (cg_nrof_slots_r16_present) { - HANDLE_CODE(unpack_integer(cg_nrof_slots_r16, bref, (uint8_t)1u, (uint8_t)40u)); - } - if (cg_start_offsets_r16.is_present()) { - HANDLE_CODE(cg_start_offsets_r16->unpack(bref)); - } - if (cg_cot_sharing_offset_r16_present) { - HANDLE_CODE(unpack_integer(cg_cot_sharing_offset_r16, bref, (uint8_t)1u, (uint8_t)39u)); - } - if (beta_offset_cg_uci_r16_present) { - HANDLE_CODE(unpack_integer(beta_offset_cg_uci_r16, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (cg_cot_sharing_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*cg_cot_sharing_list_r16, bref, 1, 1709)); - } - if (harq_proc_id_offset_r16_present) { - HANDLE_CODE(unpack_integer(harq_proc_id_offset_r16, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (harq_proc_id_offset2_r16_present) { - HANDLE_CODE(unpack_integer(harq_proc_id_offset2_r16, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (cfg_grant_cfg_idx_r16_present) { - HANDLE_CODE(unpack_integer(cfg_grant_cfg_idx_r16, bref, (uint8_t)0u, (uint8_t)11u)); - } - if (cfg_grant_cfg_idx_mac_r16_present) { - HANDLE_CODE(unpack_integer(cfg_grant_cfg_idx_mac_r16, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (periodicity_ext_r16_present) { - HANDLE_CODE(unpack_integer(periodicity_ext_r16, bref, (uint16_t)1u, (uint16_t)5120u)); - } - if (start_from_rv0_r16_present) { - HANDLE_CODE(start_from_rv0_r16.unpack(bref)); - } - if (phy_prio_idx_r16_present) { - HANDLE_CODE(phy_prio_idx_r16.unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(cg_beta_offsets_cross_pri0_r17, bref); - unpack_presence_flag(cg_beta_offsets_cross_pri1_r17, bref); - HANDLE_CODE(bref.unpack(map_pattern_r17_present, 1)); - HANDLE_CODE(bref.unpack(seq_offset_for_rv_r17_present, 1)); - HANDLE_CODE(bref.unpack(p0_pusch_alpha2_r17_present, 1)); - HANDLE_CODE(bref.unpack(pwr_ctrl_loop_to_use2_r17_present, 1)); - unpack_presence_flag(cg_cot_sharing_list_r17, bref); - HANDLE_CODE(bref.unpack(periodicity_ext_r17_present, 1)); - HANDLE_CODE(bref.unpack(rep_k_v1710_present, 1)); - HANDLE_CODE(bref.unpack(nrof_harq_processes_v1700_present, 1)); - HANDLE_CODE(bref.unpack(harq_proc_id_offset2_v1700_present, 1)); - HANDLE_CODE(bref.unpack(cfg_grant_timer_v1700_present, 1)); - HANDLE_CODE(bref.unpack(cg_min_dfi_delay_v1710_present, 1)); - if (cg_beta_offsets_cross_pri0_r17.is_present()) { - HANDLE_CODE(cg_beta_offsets_cross_pri0_r17->unpack(bref)); - } - if (cg_beta_offsets_cross_pri1_r17.is_present()) { - HANDLE_CODE(cg_beta_offsets_cross_pri1_r17->unpack(bref)); - } - if (map_pattern_r17_present) { - HANDLE_CODE(map_pattern_r17.unpack(bref)); - } - if (seq_offset_for_rv_r17_present) { - HANDLE_CODE(unpack_integer(seq_offset_for_rv_r17, bref, (uint8_t)0u, (uint8_t)3u)); - } - if (p0_pusch_alpha2_r17_present) { - HANDLE_CODE(unpack_integer(p0_pusch_alpha2_r17, bref, (uint8_t)0u, (uint8_t)29u)); - } - if (pwr_ctrl_loop_to_use2_r17_present) { - HANDLE_CODE(pwr_ctrl_loop_to_use2_r17.unpack(bref)); - } - if (cg_cot_sharing_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*cg_cot_sharing_list_r17, bref, 1, 50722)); - } - if (periodicity_ext_r17_present) { - HANDLE_CODE(unpack_integer(periodicity_ext_r17, bref, (uint16_t)1u, (uint16_t)40960u)); - } - if (rep_k_v1710_present) { - HANDLE_CODE(rep_k_v1710.unpack(bref)); - } - if (nrof_harq_processes_v1700_present) { - HANDLE_CODE(unpack_integer(nrof_harq_processes_v1700, bref, (uint8_t)17u, (uint8_t)32u)); - } - if (harq_proc_id_offset2_v1700_present) { - HANDLE_CODE(unpack_integer(harq_proc_id_offset2_v1700, bref, (uint8_t)16u, (uint8_t)31u)); - } - if (cfg_grant_timer_v1700_present) { - HANDLE_CODE(unpack_integer(cfg_grant_timer_v1700, bref, (uint16_t)33u, (uint16_t)288u)); - } - if (cg_min_dfi_delay_v1710_present) { - HANDLE_CODE(unpack_integer(cg_min_dfi_delay_v1710, bref, (uint16_t)238u, (uint16_t)3584u)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(harq_proc_id_offset_v1730_present, 1)); - HANDLE_CODE(bref.unpack(cg_nrof_slots_r17_present, 1)); - if (harq_proc_id_offset_v1730_present) { - HANDLE_CODE(unpack_integer(harq_proc_id_offset_v1730, bref, (uint8_t)16u, (uint8_t)31u)); - } - if (cg_nrof_slots_r17_present) { - HANDLE_CODE(unpack_integer(cg_nrof_slots_r17, bref, (uint16_t)1u, (uint16_t)320u)); - } - } - } - return SRSASN_SUCCESS; -} -void cfg_grant_cfg_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 (cfg_grant_timer_present) { - j.write_int("configuredGrantTimer", cfg_grant_timer); - } - if (rrc_cfg_ul_grant_present) { - j.write_fieldname("rrc-ConfiguredUplinkGrant"); - rrc_cfg_ul_grant.to_json(j); - } - if (ext) { - if (cg_retx_timer_r16_present) { - j.write_int("cg-RetransmissionTimer-r16", cg_retx_timer_r16); - } - if (cg_min_dfi_delay_r16_present) { - j.write_str("cg-minDFI-Delay-r16", cg_min_dfi_delay_r16.to_string()); - } - if (cg_nrof_pusch_in_slot_r16_present) { - j.write_int("cg-nrofPUSCH-InSlot-r16", cg_nrof_pusch_in_slot_r16); - } - if (cg_nrof_slots_r16_present) { - j.write_int("cg-nrofSlots-r16", cg_nrof_slots_r16); - } - if (cg_start_offsets_r16.is_present()) { - j.write_fieldname("cg-StartingOffsets-r16"); - cg_start_offsets_r16->to_json(j); - } - if (cg_uci_mux_r16_present) { - j.write_str("cg-UCI-Multiplexing-r16", "enabled"); - } - if (cg_cot_sharing_offset_r16_present) { - j.write_int("cg-COT-SharingOffset-r16", cg_cot_sharing_offset_r16); - } - if (beta_offset_cg_uci_r16_present) { - j.write_int("betaOffsetCG-UCI-r16", beta_offset_cg_uci_r16); - } - if (cg_cot_sharing_list_r16.is_present()) { - j.start_array("cg-COT-SharingList-r16"); - for (const auto& e1 : *cg_cot_sharing_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (harq_proc_id_offset_r16_present) { - j.write_int("harq-ProcID-Offset-r16", harq_proc_id_offset_r16); - } - if (harq_proc_id_offset2_r16_present) { - j.write_int("harq-ProcID-Offset2-r16", harq_proc_id_offset2_r16); - } - if (cfg_grant_cfg_idx_r16_present) { - j.write_int("configuredGrantConfigIndex-r16", cfg_grant_cfg_idx_r16); - } - if (cfg_grant_cfg_idx_mac_r16_present) { - j.write_int("configuredGrantConfigIndexMAC-r16", cfg_grant_cfg_idx_mac_r16); - } - if (periodicity_ext_r16_present) { - j.write_int("periodicityExt-r16", periodicity_ext_r16); - } - if (start_from_rv0_r16_present) { - j.write_str("startingFromRV0-r16", start_from_rv0_r16.to_string()); - } - if (phy_prio_idx_r16_present) { - j.write_str("phy-PriorityIndex-r16", phy_prio_idx_r16.to_string()); - } - if (autonomous_tx_r16_present) { - j.write_str("autonomousTx-r16", "enabled"); - } - if (cg_beta_offsets_cross_pri0_r17.is_present()) { - j.write_fieldname("cg-betaOffsetsCrossPri0-r17"); - cg_beta_offsets_cross_pri0_r17->to_json(j); - } - if (cg_beta_offsets_cross_pri1_r17.is_present()) { - j.write_fieldname("cg-betaOffsetsCrossPri1-r17"); - cg_beta_offsets_cross_pri1_r17->to_json(j); - } - if (map_pattern_r17_present) { - j.write_str("mappingPattern-r17", map_pattern_r17.to_string()); - } - if (seq_offset_for_rv_r17_present) { - j.write_int("sequenceOffsetForRV-r17", seq_offset_for_rv_r17); - } - if (p0_pusch_alpha2_r17_present) { - j.write_int("p0-PUSCH-Alpha2-r17", p0_pusch_alpha2_r17); - } - if (pwr_ctrl_loop_to_use2_r17_present) { - j.write_str("powerControlLoopToUse2-r17", pwr_ctrl_loop_to_use2_r17.to_string()); - } - if (cg_cot_sharing_list_r17.is_present()) { - j.start_array("cg-COT-SharingList-r17"); - for (const auto& e1 : *cg_cot_sharing_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (periodicity_ext_r17_present) { - j.write_int("periodicityExt-r17", periodicity_ext_r17); - } - if (rep_k_v1710_present) { - j.write_str("repK-v1710", rep_k_v1710.to_string()); - } - if (nrof_harq_processes_v1700_present) { - j.write_int("nrofHARQ-Processes-v1700", nrof_harq_processes_v1700); - } - if (harq_proc_id_offset2_v1700_present) { - j.write_int("harq-ProcID-Offset2-v1700", harq_proc_id_offset2_v1700); - } - if (cfg_grant_timer_v1700_present) { - j.write_int("configuredGrantTimer-v1700", cfg_grant_timer_v1700); - } - if (cg_min_dfi_delay_v1710_present) { - j.write_int("cg-minDFI-Delay-v1710", cg_min_dfi_delay_v1710); - } - if (harq_proc_id_offset_v1730_present) { - j.write_int("harq-ProcID-Offset-v1730", harq_proc_id_offset_v1730); - } - if (cg_nrof_slots_r17_present) { - j.write_int("cg-nrofSlots-r17", cg_nrof_slots_r17); - } - } - j.end_obj(); -} - -const char* cfg_grant_cfg_s::freq_hop_opts::to_string() const -{ - static const char* names[] = {"intraSlot", "interSlot"}; - return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::freq_hop_e_"); -} - -const char* cfg_grant_cfg_s::mcs_table_opts::to_string() const -{ - static const char* names[] = {"qam256", "qam64LowSE"}; - return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::mcs_table_e_"); -} -uint16_t cfg_grant_cfg_s::mcs_table_opts::to_number() const -{ - static const uint16_t numbers[] = {256, 64}; - return map_enum_number(numbers, 2, value, "cfg_grant_cfg_s::mcs_table_e_"); -} - -const char* cfg_grant_cfg_s::mcs_table_transform_precoder_opts::to_string() const -{ - static const char* names[] = {"qam256", "qam64LowSE"}; - return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::mcs_table_transform_precoder_e_"); -} -uint16_t cfg_grant_cfg_s::mcs_table_transform_precoder_opts::to_number() const -{ - static const uint16_t numbers[] = {256, 64}; - return map_enum_number(numbers, 2, value, "cfg_grant_cfg_s::mcs_table_transform_precoder_e_"); -} - -const char* cfg_grant_cfg_s::res_alloc_opts::to_string() const -{ - static const char* names[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; - return convert_enum_idx(names, 3, value, "cfg_grant_cfg_s::res_alloc_e_"); -} -uint8_t cfg_grant_cfg_s::res_alloc_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "cfg_grant_cfg_s::res_alloc_e_"); -} - -const char* cfg_grant_cfg_s::pwr_ctrl_loop_to_use_opts::to_string() const -{ - static const char* names[] = {"n0", "n1"}; - return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::pwr_ctrl_loop_to_use_e_"); -} -uint8_t cfg_grant_cfg_s::pwr_ctrl_loop_to_use_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "cfg_grant_cfg_s::pwr_ctrl_loop_to_use_e_"); -} - -const char* cfg_grant_cfg_s::transform_precoder_opts::to_string() const -{ - static const char* names[] = {"enabled", "disabled"}; - return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::transform_precoder_e_"); -} - -const char* cfg_grant_cfg_s::rep_k_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n4", "n8"}; - return convert_enum_idx(names, 4, value, "cfg_grant_cfg_s::rep_k_e_"); -} -uint8_t cfg_grant_cfg_s::rep_k_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "cfg_grant_cfg_s::rep_k_e_"); -} - -const char* cfg_grant_cfg_s::rep_k_rv_opts::to_string() const -{ - static const char* names[] = {"s1-0231", "s2-0303", "s3-0000"}; - return convert_enum_idx(names, 3, value, "cfg_grant_cfg_s::rep_k_rv_e_"); -} -uint8_t cfg_grant_cfg_s::rep_k_rv_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 3}; - return map_enum_number(numbers, 3, value, "cfg_grant_cfg_s::rep_k_rv_e_"); -} - -const char* cfg_grant_cfg_s::periodicity_opts::to_string() const -{ - static const char* names[] = { - "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(names, 45, value, "cfg_grant_cfg_s::periodicity_e_"); -} - -SRSASN_CODE cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(dmrs_seq_initization_present, 1)); - HANDLE_CODE(bref.pack(srs_res_ind_present, 1)); - HANDLE_CODE(bref.pack(freq_hop_offset_present, 1)); - - HANDLE_CODE(pack_integer(bref, time_domain_offset, (uint16_t)0u, (uint16_t)5119u)); - HANDLE_CODE(pack_integer(bref, time_domain_alloc, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(freq_domain_alloc.pack(bref)); - HANDLE_CODE(pack_integer(bref, ant_port, (uint8_t)0u, (uint8_t)31u)); - if (dmrs_seq_initization_present) { - HANDLE_CODE(pack_integer(bref, dmrs_seq_initization, (uint8_t)0u, (uint8_t)1u)); - } - HANDLE_CODE(pack_integer(bref, precoding_and_nof_layers, (uint8_t)0u, (uint8_t)63u)); - if (srs_res_ind_present) { - HANDLE_CODE(pack_integer(bref, srs_res_ind, (uint8_t)0u, (uint8_t)15u)); - } - HANDLE_CODE(pack_integer(bref, mcs_and_tbs, (uint8_t)0u, (uint8_t)31u)); - if (freq_hop_offset_present) { - HANDLE_CODE(pack_integer(bref, freq_hop_offset, (uint16_t)1u, (uint16_t)274u)); - } - HANDLE_CODE(pack_integer(bref, pathloss_ref_idx, (uint8_t)0u, (uint8_t)3u)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= pusch_rep_type_ind_r16_present; - group_flags[0] |= freq_hop_pusch_rep_type_b_r16_present; - group_flags[0] |= time_ref_sfn_r16_present; - group_flags[1] |= pathloss_ref_idx2_r17_present; - group_flags[1] |= srs_res_ind2_r17_present; - group_flags[1] |= precoding_and_nof_layers2_r17_present; - group_flags[1] |= time_domain_alloc_v1710_present; - group_flags[1] |= time_domain_offset_r17_present; - group_flags[1] |= cg_sdt_cfg_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(pusch_rep_type_ind_r16_present, 1)); - HANDLE_CODE(bref.pack(freq_hop_pusch_rep_type_b_r16_present, 1)); - HANDLE_CODE(bref.pack(time_ref_sfn_r16_present, 1)); - if (pusch_rep_type_ind_r16_present) { - HANDLE_CODE(pusch_rep_type_ind_r16.pack(bref)); - } - if (freq_hop_pusch_rep_type_b_r16_present) { - HANDLE_CODE(freq_hop_pusch_rep_type_b_r16.pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(pathloss_ref_idx2_r17_present, 1)); - HANDLE_CODE(bref.pack(srs_res_ind2_r17_present, 1)); - HANDLE_CODE(bref.pack(precoding_and_nof_layers2_r17_present, 1)); - HANDLE_CODE(bref.pack(time_domain_alloc_v1710_present, 1)); - HANDLE_CODE(bref.pack(time_domain_offset_r17_present, 1)); - HANDLE_CODE(bref.pack(cg_sdt_cfg_r17.is_present(), 1)); - if (pathloss_ref_idx2_r17_present) { - HANDLE_CODE(pack_integer(bref, pathloss_ref_idx2_r17, (uint8_t)0u, (uint8_t)3u)); - } - if (srs_res_ind2_r17_present) { - HANDLE_CODE(pack_integer(bref, srs_res_ind2_r17, (uint8_t)0u, (uint8_t)15u)); - } - if (precoding_and_nof_layers2_r17_present) { - HANDLE_CODE(pack_integer(bref, precoding_and_nof_layers2_r17, (uint8_t)0u, (uint8_t)63u)); - } - if (time_domain_alloc_v1710_present) { - HANDLE_CODE(pack_integer(bref, time_domain_alloc_v1710, (uint8_t)16u, (uint8_t)63u)); - } - if (time_domain_offset_r17_present) { - HANDLE_CODE(pack_integer(bref, time_domain_offset_r17, (uint16_t)0u, (uint16_t)40959u)); - } - if (cg_sdt_cfg_r17.is_present()) { - HANDLE_CODE(cg_sdt_cfg_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(dmrs_seq_initization_present, 1)); - HANDLE_CODE(bref.unpack(srs_res_ind_present, 1)); - HANDLE_CODE(bref.unpack(freq_hop_offset_present, 1)); - - HANDLE_CODE(unpack_integer(time_domain_offset, bref, (uint16_t)0u, (uint16_t)5119u)); - HANDLE_CODE(unpack_integer(time_domain_alloc, bref, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(freq_domain_alloc.unpack(bref)); - HANDLE_CODE(unpack_integer(ant_port, bref, (uint8_t)0u, (uint8_t)31u)); - if (dmrs_seq_initization_present) { - HANDLE_CODE(unpack_integer(dmrs_seq_initization, bref, (uint8_t)0u, (uint8_t)1u)); - } - HANDLE_CODE(unpack_integer(precoding_and_nof_layers, bref, (uint8_t)0u, (uint8_t)63u)); - if (srs_res_ind_present) { - HANDLE_CODE(unpack_integer(srs_res_ind, bref, (uint8_t)0u, (uint8_t)15u)); - } - HANDLE_CODE(unpack_integer(mcs_and_tbs, bref, (uint8_t)0u, (uint8_t)31u)); - if (freq_hop_offset_present) { - HANDLE_CODE(unpack_integer(freq_hop_offset, bref, (uint16_t)1u, (uint16_t)274u)); - } - HANDLE_CODE(unpack_integer(pathloss_ref_idx, bref, (uint8_t)0u, (uint8_t)3u)); - - 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(pusch_rep_type_ind_r16_present, 1)); - HANDLE_CODE(bref.unpack(freq_hop_pusch_rep_type_b_r16_present, 1)); - HANDLE_CODE(bref.unpack(time_ref_sfn_r16_present, 1)); - if (pusch_rep_type_ind_r16_present) { - HANDLE_CODE(pusch_rep_type_ind_r16.unpack(bref)); - } - if (freq_hop_pusch_rep_type_b_r16_present) { - HANDLE_CODE(freq_hop_pusch_rep_type_b_r16.unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(pathloss_ref_idx2_r17_present, 1)); - HANDLE_CODE(bref.unpack(srs_res_ind2_r17_present, 1)); - HANDLE_CODE(bref.unpack(precoding_and_nof_layers2_r17_present, 1)); - HANDLE_CODE(bref.unpack(time_domain_alloc_v1710_present, 1)); - HANDLE_CODE(bref.unpack(time_domain_offset_r17_present, 1)); - unpack_presence_flag(cg_sdt_cfg_r17, bref); - if (pathloss_ref_idx2_r17_present) { - HANDLE_CODE(unpack_integer(pathloss_ref_idx2_r17, bref, (uint8_t)0u, (uint8_t)3u)); - } - if (srs_res_ind2_r17_present) { - HANDLE_CODE(unpack_integer(srs_res_ind2_r17, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (precoding_and_nof_layers2_r17_present) { - HANDLE_CODE(unpack_integer(precoding_and_nof_layers2_r17, bref, (uint8_t)0u, (uint8_t)63u)); - } - if (time_domain_alloc_v1710_present) { - HANDLE_CODE(unpack_integer(time_domain_alloc_v1710, bref, (uint8_t)16u, (uint8_t)63u)); - } - if (time_domain_offset_r17_present) { - HANDLE_CODE(unpack_integer(time_domain_offset_r17, bref, (uint16_t)0u, (uint16_t)40959u)); - } - if (cg_sdt_cfg_r17.is_present()) { - HANDLE_CODE(cg_sdt_cfg_r17->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("timeDomainOffset", time_domain_offset); - j.write_int("timeDomainAllocation", time_domain_alloc); - j.write_str("frequencyDomainAllocation", freq_domain_alloc.to_string()); - j.write_int("antennaPort", ant_port); - if (dmrs_seq_initization_present) { - j.write_int("dmrs-SeqInitialization", dmrs_seq_initization); - } - j.write_int("precodingAndNumberOfLayers", precoding_and_nof_layers); - if (srs_res_ind_present) { - j.write_int("srs-ResourceIndicator", srs_res_ind); - } - j.write_int("mcsAndTBS", mcs_and_tbs); - if (freq_hop_offset_present) { - j.write_int("frequencyHoppingOffset", freq_hop_offset); - } - j.write_int("pathlossReferenceIndex", pathloss_ref_idx); - if (ext) { - if (pusch_rep_type_ind_r16_present) { - j.write_str("pusch-RepTypeIndicator-r16", pusch_rep_type_ind_r16.to_string()); - } - if (freq_hop_pusch_rep_type_b_r16_present) { - j.write_str("frequencyHoppingPUSCH-RepTypeB-r16", freq_hop_pusch_rep_type_b_r16.to_string()); - } - if (time_ref_sfn_r16_present) { - j.write_str("timeReferenceSFN-r16", "sfn512"); - } - if (pathloss_ref_idx2_r17_present) { - j.write_int("pathlossReferenceIndex2-r17", pathloss_ref_idx2_r17); - } - if (srs_res_ind2_r17_present) { - j.write_int("srs-ResourceIndicator2-r17", srs_res_ind2_r17); - } - if (precoding_and_nof_layers2_r17_present) { - j.write_int("precodingAndNumberOfLayers2-r17", precoding_and_nof_layers2_r17); - } - if (time_domain_alloc_v1710_present) { - j.write_int("timeDomainAllocation-v1710", time_domain_alloc_v1710); - } - if (time_domain_offset_r17_present) { - j.write_int("timeDomainOffset-r17", time_domain_offset_r17); - } - if (cg_sdt_cfg_r17.is_present()) { - j.write_fieldname("cg-SDT-Configuration-r17"); - cg_sdt_cfg_r17->to_json(j); - } - } - j.end_obj(); -} - -const char* cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::pusch_rep_type_ind_r16_opts::to_string() const -{ - static const char* names[] = {"pusch-RepTypeA", "pusch-RepTypeB"}; - return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::pusch_rep_type_ind_r16_e_"); -} - -const char* cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::freq_hop_pusch_rep_type_b_r16_opts::to_string() const -{ - static const char* names[] = {"interRepetition", "interSlot"}; - return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::rrc_cfg_ul_grant_s_::freq_hop_pusch_rep_type_b_r16_e_"); -} - -const char* cfg_grant_cfg_s::cg_min_dfi_delay_r16_opts::to_string() const -{ - static const char* names[] = {"sym7", - "sym1x14", - "sym2x14", - "sym3x14", - "sym4x14", - "sym5x14", - "sym6x14", - "sym7x14", - "sym8x14", - "sym9x14", - "sym10x14", - "sym11x14", - "sym12x14", - "sym13x14", - "sym14x14", - "sym15x14", - "sym16x14"}; - return convert_enum_idx(names, 17, value, "cfg_grant_cfg_s::cg_min_dfi_delay_r16_e_"); -} - -const char* cfg_grant_cfg_s::start_from_rv0_r16_opts::to_string() const -{ - static const char* names[] = {"on", "off"}; - return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::start_from_rv0_r16_e_"); -} - -const char* cfg_grant_cfg_s::phy_prio_idx_r16_opts::to_string() const -{ - static const char* names[] = {"p0", "p1"}; - return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::phy_prio_idx_r16_e_"); -} -uint8_t cfg_grant_cfg_s::phy_prio_idx_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "cfg_grant_cfg_s::phy_prio_idx_r16_e_"); -} - -const char* cfg_grant_cfg_s::map_pattern_r17_opts::to_string() const -{ - static const char* names[] = {"cyclicMapping", "sequentialMapping"}; - return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::map_pattern_r17_e_"); -} - -const char* cfg_grant_cfg_s::pwr_ctrl_loop_to_use2_r17_opts::to_string() const -{ - static const char* names[] = {"n0", "n1"}; - return convert_enum_idx(names, 2, value, "cfg_grant_cfg_s::pwr_ctrl_loop_to_use2_r17_e_"); -} -uint8_t cfg_grant_cfg_s::pwr_ctrl_loop_to_use2_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "cfg_grant_cfg_s::pwr_ctrl_loop_to_use2_r17_e_"); -} - -const char* cfg_grant_cfg_s::rep_k_v1710_opts::to_string() const -{ - static const char* names[] = {"n12", "n16", "n24", "n32"}; - return convert_enum_idx(names, 4, value, "cfg_grant_cfg_s::rep_k_v1710_e_"); -} -uint8_t cfg_grant_cfg_s::rep_k_v1710_opts::to_number() const -{ - static const uint8_t numbers[] = {12, 16, 24, 32}; - return map_enum_number(numbers, 4, value, "cfg_grant_cfg_s::rep_k_v1710_e_"); -} - -// DMRS-BundlingPUSCH-Config-r17 ::= SEQUENCE -SRSASN_CODE dmrs_bundling_pusch_cfg_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pusch_dmrs_bundling_r17_present, 1)); - HANDLE_CODE(bref.pack(pusch_time_domain_win_len_r17_present, 1)); - HANDLE_CODE(bref.pack(pusch_win_restart_r17_present, 1)); - HANDLE_CODE(bref.pack(pusch_freq_hop_interv_r17_present, 1)); - - if (pusch_time_domain_win_len_r17_present) { - HANDLE_CODE(pack_integer(bref, pusch_time_domain_win_len_r17, (uint8_t)2u, (uint8_t)32u)); - } - if (pusch_freq_hop_interv_r17_present) { - HANDLE_CODE(pusch_freq_hop_interv_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE dmrs_bundling_pusch_cfg_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pusch_dmrs_bundling_r17_present, 1)); - HANDLE_CODE(bref.unpack(pusch_time_domain_win_len_r17_present, 1)); - HANDLE_CODE(bref.unpack(pusch_win_restart_r17_present, 1)); - HANDLE_CODE(bref.unpack(pusch_freq_hop_interv_r17_present, 1)); - - if (pusch_time_domain_win_len_r17_present) { - HANDLE_CODE(unpack_integer(pusch_time_domain_win_len_r17, bref, (uint8_t)2u, (uint8_t)32u)); - } - if (pusch_freq_hop_interv_r17_present) { - HANDLE_CODE(pusch_freq_hop_interv_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void dmrs_bundling_pusch_cfg_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pusch_dmrs_bundling_r17_present) { - j.write_str("pusch-DMRS-Bundling-r17", "enabled"); - } - if (pusch_time_domain_win_len_r17_present) { - j.write_int("pusch-TimeDomainWindowLength-r17", pusch_time_domain_win_len_r17); - } - if (pusch_win_restart_r17_present) { - j.write_str("pusch-WindowRestart-r17", "enabled"); - } - if (pusch_freq_hop_interv_r17_present) { - j.write_str("pusch-FrequencyHoppingInterval-r17", pusch_freq_hop_interv_r17.to_string()); - } - j.end_obj(); -} - -const char* dmrs_bundling_pusch_cfg_r17_s::pusch_freq_hop_interv_r17_opts::to_string() const -{ - static const char* names[] = {"s2", "s4", "s5", "s6", "s8", "s10", "s12", "s14", "s16", "s20"}; - return convert_enum_idx(names, 10, value, "dmrs_bundling_pusch_cfg_r17_s::pusch_freq_hop_interv_r17_e_"); -} -uint8_t dmrs_bundling_pusch_cfg_r17_s::pusch_freq_hop_interv_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 5, 6, 8, 10, 12, 14, 16, 20}; - return map_enum_number(numbers, 10, value, "dmrs_bundling_pusch_cfg_r17_s::pusch_freq_hop_interv_r17_e_"); -} - -// InvalidSymbolPattern-r16 ::= SEQUENCE -SRSASN_CODE invalid_symbol_pattern_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(periodicity_and_pattern_r16_present, 1)); - - HANDLE_CODE(symbols_r16.pack(bref)); - if (periodicity_and_pattern_r16_present) { - HANDLE_CODE(periodicity_and_pattern_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE invalid_symbol_pattern_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(periodicity_and_pattern_r16_present, 1)); - - HANDLE_CODE(symbols_r16.unpack(bref)); - if (periodicity_and_pattern_r16_present) { - HANDLE_CODE(periodicity_and_pattern_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void invalid_symbol_pattern_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("symbols-r16"); - symbols_r16.to_json(j); - if (periodicity_and_pattern_r16_present) { - j.write_fieldname("periodicityAndPattern-r16"); - periodicity_and_pattern_r16.to_json(j); - } - j.end_obj(); -} - -void invalid_symbol_pattern_r16_s::symbols_r16_c_::destroy_() -{ - switch (type_) { - case types::one_slot: - c.destroy>(); - break; - case types::two_slots: - c.destroy>(); - break; - default: - break; - } -} -void invalid_symbol_pattern_r16_s::symbols_r16_c_::set(types::options e) -{ - 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_, "invalid_symbol_pattern_r16_s::symbols_r16_c_"); - } -} -invalid_symbol_pattern_r16_s::symbols_r16_c_::symbols_r16_c_(const invalid_symbol_pattern_r16_s::symbols_r16_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_, "invalid_symbol_pattern_r16_s::symbols_r16_c_"); - } -} -invalid_symbol_pattern_r16_s::symbols_r16_c_& -invalid_symbol_pattern_r16_s::symbols_r16_c_::operator=(const invalid_symbol_pattern_r16_s::symbols_r16_c_& other) -{ - 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_, "invalid_symbol_pattern_r16_s::symbols_r16_c_"); - } - - return *this; -} -fixed_bitstring<14>& invalid_symbol_pattern_r16_s::symbols_r16_c_::set_one_slot() -{ - set(types::one_slot); - return c.get>(); -} -fixed_bitstring<28>& invalid_symbol_pattern_r16_s::symbols_r16_c_::set_two_slots() -{ - set(types::two_slots); - return c.get>(); -} -void invalid_symbol_pattern_r16_s::symbols_r16_c_::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_, "invalid_symbol_pattern_r16_s::symbols_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE invalid_symbol_pattern_r16_s::symbols_r16_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_, "invalid_symbol_pattern_r16_s::symbols_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE invalid_symbol_pattern_r16_s::symbols_r16_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_, "invalid_symbol_pattern_r16_s::symbols_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_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 invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_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_, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_"); - } -} -invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::periodicity_and_pattern_r16_c_( - const invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_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_, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_"); - } -} -invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_& -invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::operator=( - const invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_& other) -{ - if (this == &other) { - return *this; - } - 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_, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_"); - } - - return *this; -} -fixed_bitstring<2>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n2() -{ - set(types::n2); - return c.get>(); -} -fixed_bitstring<4>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n4() -{ - set(types::n4); - return c.get>(); -} -fixed_bitstring<5>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n5() -{ - set(types::n5); - return c.get>(); -} -fixed_bitstring<8>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n8() -{ - set(types::n8); - return c.get>(); -} -fixed_bitstring<10>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n10() -{ - set(types::n10); - return c.get>(); -} -fixed_bitstring<20>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n20() -{ - set(types::n20); - return c.get>(); -} -fixed_bitstring<40>& invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::set_n40() -{ - set(types::n40); - return c.get>(); -} -void invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::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_, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::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_, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_::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_, "invalid_symbol_pattern_r16_s::periodicity_and_pattern_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// MPE-Resource-r17 ::= SEQUENCE -SRSASN_CODE mpe_res_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(cell_r17_present, 1)); - HANDLE_CODE(bref.pack(add_pci_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, mpe_res_id_r17, (uint8_t)1u, (uint8_t)64u)); - if (cell_r17_present) { - HANDLE_CODE(pack_integer(bref, cell_r17, (uint8_t)0u, (uint8_t)31u)); - } - if (add_pci_r17_present) { - HANDLE_CODE(pack_integer(bref, add_pci_r17, (uint8_t)1u, (uint8_t)7u)); - } - HANDLE_CODE(mpe_ref_sig_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mpe_res_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(cell_r17_present, 1)); - HANDLE_CODE(bref.unpack(add_pci_r17_present, 1)); - - HANDLE_CODE(unpack_integer(mpe_res_id_r17, bref, (uint8_t)1u, (uint8_t)64u)); - if (cell_r17_present) { - HANDLE_CODE(unpack_integer(cell_r17, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (add_pci_r17_present) { - HANDLE_CODE(unpack_integer(add_pci_r17, bref, (uint8_t)1u, (uint8_t)7u)); - } - HANDLE_CODE(mpe_ref_sig_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void mpe_res_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("mpe-ResourceId-r17", mpe_res_id_r17); - if (cell_r17_present) { - j.write_int("cell-r17", cell_r17); - } - if (add_pci_r17_present) { - j.write_int("additionalPCI-r17", add_pci_r17); - } - j.write_fieldname("mpe-ReferenceSignal-r17"); - mpe_ref_sig_r17.to_json(j); - j.end_obj(); -} - -void mpe_res_r17_s::mpe_ref_sig_r17_c_::destroy_() {} -void mpe_res_r17_s::mpe_ref_sig_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -mpe_res_r17_s::mpe_ref_sig_r17_c_::mpe_ref_sig_r17_c_(const mpe_res_r17_s::mpe_ref_sig_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::csi_rs_res_r17: - c.init(other.c.get()); - break; - case types::ssb_res_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "mpe_res_r17_s::mpe_ref_sig_r17_c_"); - } -} -mpe_res_r17_s::mpe_ref_sig_r17_c_& -mpe_res_r17_s::mpe_ref_sig_r17_c_::operator=(const mpe_res_r17_s::mpe_ref_sig_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::csi_rs_res_r17: - c.set(other.c.get()); - break; - case types::ssb_res_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "mpe_res_r17_s::mpe_ref_sig_r17_c_"); - } - - return *this; -} -uint8_t& mpe_res_r17_s::mpe_ref_sig_r17_c_::set_csi_rs_res_r17() -{ - set(types::csi_rs_res_r17); - return c.get(); -} -uint8_t& mpe_res_r17_s::mpe_ref_sig_r17_c_::set_ssb_res_r17() -{ - set(types::ssb_res_r17); - return c.get(); -} -void mpe_res_r17_s::mpe_ref_sig_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::csi_rs_res_r17: - j.write_int("csi-RS-Resource-r17", c.get()); - break; - case types::ssb_res_r17: - j.write_int("ssb-Resource-r17", c.get()); - break; - default: - log_invalid_choice_id(type_, "mpe_res_r17_s::mpe_ref_sig_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE mpe_res_r17_s::mpe_ref_sig_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::csi_rs_res_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); - break; - case types::ssb_res_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - default: - log_invalid_choice_id(type_, "mpe_res_r17_s::mpe_ref_sig_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE mpe_res_r17_s::mpe_ref_sig_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::csi_rs_res_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); - break; - case types::ssb_res_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - default: - log_invalid_choice_id(type_, "mpe_res_r17_s::mpe_ref_sig_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// PUCCH-Config ::= SEQUENCE -SRSASN_CODE pucch_cfg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(res_set_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(res_set_to_release_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(res_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(res_to_release_list.size() > 0, 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(sched_request_res_to_release_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(multi_csi_pucch_res_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(dl_data_to_ul_ack.size() > 0, 1)); - HANDLE_CODE(bref.pack(spatial_relation_info_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(spatial_relation_info_to_release_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(pucch_pwr_ctrl_present, 1)); - - if (res_set_to_add_mod_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, res_set_to_add_mod_list, 1, 4)); - } - if (res_set_to_release_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, res_set_to_release_list, 1, 4, integer_packer(0, 3))); - } - if (res_to_add_mod_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, res_to_add_mod_list, 1, 128)); - } - if (res_to_release_list.size() > 0) { - 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sched_request_res_to_add_mod_list, 1, 8)); - } - if (sched_request_res_to_release_list.size() > 0) { - 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, multi_csi_pucch_res_list, 1, 2, integer_packer(0, 127))); - } - if (dl_data_to_ul_ack.size() > 0) { - 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, spatial_relation_info_to_add_mod_list, 1, 8)); - } - if (spatial_relation_info_to_release_list.size() > 0) { - 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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= res_to_add_mod_list_ext_v1610.is_present(); - group_flags[0] |= dl_data_to_ul_ack_r16.is_present(); - group_flags[0] |= ul_access_cfg_list_dci_1_1_r16.is_present(); - group_flags[0] |= subslot_len_for_pucch_r16.is_present(); - group_flags[0] |= dl_data_to_ul_ack_dci_1_2_r16.is_present(); - group_flags[0] |= nof_bits_for_pucch_res_ind_dci_1_2_r16_present; - group_flags[0] |= dmrs_ul_transform_precoding_pucch_r16_present; - group_flags[0] |= spatial_relation_info_to_add_mod_list_size_ext_v1610.is_present(); - group_flags[0] |= spatial_relation_info_to_release_list_size_ext_v1610.is_present(); - group_flags[0] |= spatial_relation_info_to_add_mod_list_ext_v1610.is_present(); - group_flags[0] |= spatial_relation_info_to_release_list_ext_v1610.is_present(); - group_flags[0] |= res_group_to_add_mod_list_r16.is_present(); - group_flags[0] |= res_group_to_release_list_r16.is_present(); - group_flags[0] |= sps_pucch_an_list_r16.is_present(); - group_flags[0] |= sched_request_res_to_add_mod_list_ext_v1610.is_present(); - group_flags[1] |= format0_r17.is_present(); - group_flags[1] |= format2_ext_r17.is_present(); - group_flags[1] |= format3_ext_r17.is_present(); - group_flags[1] |= format4_ext_r17.is_present(); - group_flags[1] |= ul_access_cfg_list_dci_1_2_r17.is_present(); - group_flags[1] |= map_pattern_r17_present; - group_flags[1] |= pwr_ctrl_set_info_to_add_mod_list_r17.is_present(); - group_flags[1] |= pwr_ctrl_set_info_to_release_list_r17.is_present(); - group_flags[1] |= second_tpc_field_dci_1_1_r17_present; - group_flags[1] |= second_tpc_field_dci_1_2_r17_present; - group_flags[1] |= dl_data_to_ul_ack_r17.is_present(); - group_flags[1] |= dl_data_to_ul_ack_dci_1_2_r17.is_present(); - group_flags[1] |= ul_access_cfg_list_dci_1_1_r17.is_present(); - group_flags[1] |= sched_request_res_to_add_mod_list_ext_v1700.is_present(); - group_flags[1] |= dmrs_bundling_pucch_cfg_r17.is_present(); - group_flags[1] |= dl_data_to_ul_ack_v1700.is_present(); - group_flags[1] |= dl_data_to_ul_ack_multicast_dci_format4_1_r17.is_present(); - group_flags[1] |= sps_pucch_an_list_multicast_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(res_to_add_mod_list_ext_v1610.is_present(), 1)); - HANDLE_CODE(bref.pack(dl_data_to_ul_ack_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(ul_access_cfg_list_dci_1_1_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(subslot_len_for_pucch_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(dl_data_to_ul_ack_dci_1_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(nof_bits_for_pucch_res_ind_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(dmrs_ul_transform_precoding_pucch_r16_present, 1)); - HANDLE_CODE(bref.pack(spatial_relation_info_to_add_mod_list_size_ext_v1610.is_present(), 1)); - HANDLE_CODE(bref.pack(spatial_relation_info_to_release_list_size_ext_v1610.is_present(), 1)); - HANDLE_CODE(bref.pack(spatial_relation_info_to_add_mod_list_ext_v1610.is_present(), 1)); - HANDLE_CODE(bref.pack(spatial_relation_info_to_release_list_ext_v1610.is_present(), 1)); - HANDLE_CODE(bref.pack(res_group_to_add_mod_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(res_group_to_release_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(sps_pucch_an_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(sched_request_res_to_add_mod_list_ext_v1610.is_present(), 1)); - if (res_to_add_mod_list_ext_v1610.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *res_to_add_mod_list_ext_v1610, 1, 128)); - } - if (dl_data_to_ul_ack_r16.is_present()) { - HANDLE_CODE(dl_data_to_ul_ack_r16->pack(bref)); - } - if (ul_access_cfg_list_dci_1_1_r16.is_present()) { - HANDLE_CODE(ul_access_cfg_list_dci_1_1_r16->pack(bref)); - } - if (subslot_len_for_pucch_r16.is_present()) { - HANDLE_CODE(subslot_len_for_pucch_r16->pack(bref)); - } - if (dl_data_to_ul_ack_dci_1_2_r16.is_present()) { - HANDLE_CODE(dl_data_to_ul_ack_dci_1_2_r16->pack(bref)); - } - if (nof_bits_for_pucch_res_ind_dci_1_2_r16_present) { - HANDLE_CODE(pack_integer(bref, nof_bits_for_pucch_res_ind_dci_1_2_r16, (uint8_t)0u, (uint8_t)3u)); - } - if (spatial_relation_info_to_add_mod_list_size_ext_v1610.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *spatial_relation_info_to_add_mod_list_size_ext_v1610, 1, 56)); - } - if (spatial_relation_info_to_release_list_size_ext_v1610.is_present()) { - HANDLE_CODE(pack_dyn_seq_of( - bref, *spatial_relation_info_to_release_list_size_ext_v1610, 1, 56, integer_packer(1, 8))); - } - if (spatial_relation_info_to_add_mod_list_ext_v1610.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *spatial_relation_info_to_add_mod_list_ext_v1610, 1, 64)); - } - if (spatial_relation_info_to_release_list_ext_v1610.is_present()) { - HANDLE_CODE(pack_dyn_seq_of( - bref, *spatial_relation_info_to_release_list_ext_v1610, 1, 64, integer_packer(1, 64))); - } - if (res_group_to_add_mod_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *res_group_to_add_mod_list_r16, 1, 4)); - } - if (res_group_to_release_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *res_group_to_release_list_r16, 1, 4, integer_packer(0, 3))); - } - if (sps_pucch_an_list_r16.is_present()) { - HANDLE_CODE(sps_pucch_an_list_r16->pack(bref)); - } - if (sched_request_res_to_add_mod_list_ext_v1610.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *sched_request_res_to_add_mod_list_ext_v1610, 1, 8)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(format0_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(format2_ext_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(format3_ext_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(format4_ext_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(ul_access_cfg_list_dci_1_2_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(map_pattern_r17_present, 1)); - HANDLE_CODE(bref.pack(pwr_ctrl_set_info_to_add_mod_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(pwr_ctrl_set_info_to_release_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(second_tpc_field_dci_1_1_r17_present, 1)); - HANDLE_CODE(bref.pack(second_tpc_field_dci_1_2_r17_present, 1)); - HANDLE_CODE(bref.pack(dl_data_to_ul_ack_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(dl_data_to_ul_ack_dci_1_2_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(ul_access_cfg_list_dci_1_1_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(sched_request_res_to_add_mod_list_ext_v1700.is_present(), 1)); - HANDLE_CODE(bref.pack(dmrs_bundling_pucch_cfg_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(dl_data_to_ul_ack_v1700.is_present(), 1)); - HANDLE_CODE(bref.pack(dl_data_to_ul_ack_multicast_dci_format4_1_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(sps_pucch_an_list_multicast_r17.is_present(), 1)); - if (format0_r17.is_present()) { - HANDLE_CODE(format0_r17->pack(bref)); - } - if (format2_ext_r17.is_present()) { - HANDLE_CODE(format2_ext_r17->pack(bref)); - } - if (format3_ext_r17.is_present()) { - HANDLE_CODE(format3_ext_r17->pack(bref)); - } - if (format4_ext_r17.is_present()) { - HANDLE_CODE(format4_ext_r17->pack(bref)); - } - if (ul_access_cfg_list_dci_1_2_r17.is_present()) { - HANDLE_CODE(ul_access_cfg_list_dci_1_2_r17->pack(bref)); - } - if (map_pattern_r17_present) { - HANDLE_CODE(map_pattern_r17.pack(bref)); - } - if (pwr_ctrl_set_info_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *pwr_ctrl_set_info_to_add_mod_list_r17, 1, 8)); - } - if (pwr_ctrl_set_info_to_release_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *pwr_ctrl_set_info_to_release_list_r17, 1, 8, integer_packer(1, 8))); - } - if (dl_data_to_ul_ack_r17.is_present()) { - HANDLE_CODE(dl_data_to_ul_ack_r17->pack(bref)); - } - if (dl_data_to_ul_ack_dci_1_2_r17.is_present()) { - HANDLE_CODE(dl_data_to_ul_ack_dci_1_2_r17->pack(bref)); - } - if (ul_access_cfg_list_dci_1_1_r17.is_present()) { - HANDLE_CODE(ul_access_cfg_list_dci_1_1_r17->pack(bref)); - } - if (sched_request_res_to_add_mod_list_ext_v1700.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *sched_request_res_to_add_mod_list_ext_v1700, 1, 8)); - } - if (dmrs_bundling_pucch_cfg_r17.is_present()) { - HANDLE_CODE(dmrs_bundling_pucch_cfg_r17->pack(bref)); - } - if (dl_data_to_ul_ack_v1700.is_present()) { - HANDLE_CODE(dl_data_to_ul_ack_v1700->pack(bref)); - } - if (dl_data_to_ul_ack_multicast_dci_format4_1_r17.is_present()) { - HANDLE_CODE(dl_data_to_ul_ack_multicast_dci_format4_1_r17->pack(bref)); - } - if (sps_pucch_an_list_multicast_r17.is_present()) { - HANDLE_CODE(sps_pucch_an_list_multicast_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_cfg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool res_set_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(res_set_to_add_mod_list_present, 1)); - bool res_set_to_release_list_present; - HANDLE_CODE(bref.unpack(res_set_to_release_list_present, 1)); - bool res_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(res_to_add_mod_list_present, 1)); - bool res_to_release_list_present; - 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)); - bool sched_request_res_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(sched_request_res_to_add_mod_list_present, 1)); - bool sched_request_res_to_release_list_present; - HANDLE_CODE(bref.unpack(sched_request_res_to_release_list_present, 1)); - bool multi_csi_pucch_res_list_present; - HANDLE_CODE(bref.unpack(multi_csi_pucch_res_list_present, 1)); - bool dl_data_to_ul_ack_present; - HANDLE_CODE(bref.unpack(dl_data_to_ul_ack_present, 1)); - bool spatial_relation_info_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(spatial_relation_info_to_add_mod_list_present, 1)); - bool spatial_relation_info_to_release_list_present; - HANDLE_CODE(bref.unpack(spatial_relation_info_to_release_list_present, 1)); - HANDLE_CODE(bref.unpack(pucch_pwr_ctrl_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)); - } - 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)); - } - - 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); - - unpack_presence_flag(res_to_add_mod_list_ext_v1610, bref); - unpack_presence_flag(dl_data_to_ul_ack_r16, bref); - unpack_presence_flag(ul_access_cfg_list_dci_1_1_r16, bref); - unpack_presence_flag(subslot_len_for_pucch_r16, bref); - unpack_presence_flag(dl_data_to_ul_ack_dci_1_2_r16, bref); - HANDLE_CODE(bref.unpack(nof_bits_for_pucch_res_ind_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(dmrs_ul_transform_precoding_pucch_r16_present, 1)); - unpack_presence_flag(spatial_relation_info_to_add_mod_list_size_ext_v1610, bref); - unpack_presence_flag(spatial_relation_info_to_release_list_size_ext_v1610, bref); - unpack_presence_flag(spatial_relation_info_to_add_mod_list_ext_v1610, bref); - unpack_presence_flag(spatial_relation_info_to_release_list_ext_v1610, bref); - unpack_presence_flag(res_group_to_add_mod_list_r16, bref); - unpack_presence_flag(res_group_to_release_list_r16, bref); - unpack_presence_flag(sps_pucch_an_list_r16, bref); - unpack_presence_flag(sched_request_res_to_add_mod_list_ext_v1610, bref); - if (res_to_add_mod_list_ext_v1610.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*res_to_add_mod_list_ext_v1610, bref, 1, 128)); - } - if (dl_data_to_ul_ack_r16.is_present()) { - HANDLE_CODE(dl_data_to_ul_ack_r16->unpack(bref)); - } - if (ul_access_cfg_list_dci_1_1_r16.is_present()) { - HANDLE_CODE(ul_access_cfg_list_dci_1_1_r16->unpack(bref)); - } - if (subslot_len_for_pucch_r16.is_present()) { - HANDLE_CODE(subslot_len_for_pucch_r16->unpack(bref)); - } - if (dl_data_to_ul_ack_dci_1_2_r16.is_present()) { - HANDLE_CODE(dl_data_to_ul_ack_dci_1_2_r16->unpack(bref)); - } - if (nof_bits_for_pucch_res_ind_dci_1_2_r16_present) { - HANDLE_CODE(unpack_integer(nof_bits_for_pucch_res_ind_dci_1_2_r16, bref, (uint8_t)0u, (uint8_t)3u)); - } - if (spatial_relation_info_to_add_mod_list_size_ext_v1610.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*spatial_relation_info_to_add_mod_list_size_ext_v1610, bref, 1, 56)); - } - if (spatial_relation_info_to_release_list_size_ext_v1610.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of( - *spatial_relation_info_to_release_list_size_ext_v1610, bref, 1, 56, integer_packer(1, 8))); - } - if (spatial_relation_info_to_add_mod_list_ext_v1610.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*spatial_relation_info_to_add_mod_list_ext_v1610, bref, 1, 64)); - } - if (spatial_relation_info_to_release_list_ext_v1610.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of( - *spatial_relation_info_to_release_list_ext_v1610, bref, 1, 64, integer_packer(1, 64))); - } - if (res_group_to_add_mod_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*res_group_to_add_mod_list_r16, bref, 1, 4)); - } - if (res_group_to_release_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*res_group_to_release_list_r16, bref, 1, 4, integer_packer(0, 3))); - } - if (sps_pucch_an_list_r16.is_present()) { - HANDLE_CODE(sps_pucch_an_list_r16->unpack(bref)); - } - if (sched_request_res_to_add_mod_list_ext_v1610.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*sched_request_res_to_add_mod_list_ext_v1610, bref, 1, 8)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(format0_r17, bref); - unpack_presence_flag(format2_ext_r17, bref); - unpack_presence_flag(format3_ext_r17, bref); - unpack_presence_flag(format4_ext_r17, bref); - unpack_presence_flag(ul_access_cfg_list_dci_1_2_r17, bref); - HANDLE_CODE(bref.unpack(map_pattern_r17_present, 1)); - unpack_presence_flag(pwr_ctrl_set_info_to_add_mod_list_r17, bref); - unpack_presence_flag(pwr_ctrl_set_info_to_release_list_r17, bref); - HANDLE_CODE(bref.unpack(second_tpc_field_dci_1_1_r17_present, 1)); - HANDLE_CODE(bref.unpack(second_tpc_field_dci_1_2_r17_present, 1)); - unpack_presence_flag(dl_data_to_ul_ack_r17, bref); - unpack_presence_flag(dl_data_to_ul_ack_dci_1_2_r17, bref); - unpack_presence_flag(ul_access_cfg_list_dci_1_1_r17, bref); - unpack_presence_flag(sched_request_res_to_add_mod_list_ext_v1700, bref); - unpack_presence_flag(dmrs_bundling_pucch_cfg_r17, bref); - unpack_presence_flag(dl_data_to_ul_ack_v1700, bref); - unpack_presence_flag(dl_data_to_ul_ack_multicast_dci_format4_1_r17, bref); - unpack_presence_flag(sps_pucch_an_list_multicast_r17, bref); - if (format0_r17.is_present()) { - HANDLE_CODE(format0_r17->unpack(bref)); - } - if (format2_ext_r17.is_present()) { - HANDLE_CODE(format2_ext_r17->unpack(bref)); - } - if (format3_ext_r17.is_present()) { - HANDLE_CODE(format3_ext_r17->unpack(bref)); - } - if (format4_ext_r17.is_present()) { - HANDLE_CODE(format4_ext_r17->unpack(bref)); - } - if (ul_access_cfg_list_dci_1_2_r17.is_present()) { - HANDLE_CODE(ul_access_cfg_list_dci_1_2_r17->unpack(bref)); - } - if (map_pattern_r17_present) { - HANDLE_CODE(map_pattern_r17.unpack(bref)); - } - if (pwr_ctrl_set_info_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*pwr_ctrl_set_info_to_add_mod_list_r17, bref, 1, 8)); - } - if (pwr_ctrl_set_info_to_release_list_r17.is_present()) { - HANDLE_CODE( - unpack_dyn_seq_of(*pwr_ctrl_set_info_to_release_list_r17, bref, 1, 8, integer_packer(1, 8))); - } - if (dl_data_to_ul_ack_r17.is_present()) { - HANDLE_CODE(dl_data_to_ul_ack_r17->unpack(bref)); - } - if (dl_data_to_ul_ack_dci_1_2_r17.is_present()) { - HANDLE_CODE(dl_data_to_ul_ack_dci_1_2_r17->unpack(bref)); - } - if (ul_access_cfg_list_dci_1_1_r17.is_present()) { - HANDLE_CODE(ul_access_cfg_list_dci_1_1_r17->unpack(bref)); - } - if (sched_request_res_to_add_mod_list_ext_v1700.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*sched_request_res_to_add_mod_list_ext_v1700, bref, 1, 8)); - } - if (dmrs_bundling_pucch_cfg_r17.is_present()) { - HANDLE_CODE(dmrs_bundling_pucch_cfg_r17->unpack(bref)); - } - if (dl_data_to_ul_ack_v1700.is_present()) { - HANDLE_CODE(dl_data_to_ul_ack_v1700->unpack(bref)); - } - if (dl_data_to_ul_ack_multicast_dci_format4_1_r17.is_present()) { - HANDLE_CODE(dl_data_to_ul_ack_multicast_dci_format4_1_r17->unpack(bref)); - } - if (sps_pucch_an_list_multicast_r17.is_present()) { - HANDLE_CODE(sps_pucch_an_list_multicast_r17->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void pucch_cfg_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (res_set_to_add_mod_list.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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 (ext) { - if (res_to_add_mod_list_ext_v1610.is_present()) { - j.start_array("resourceToAddModListExt-v1610"); - for (const auto& e1 : *res_to_add_mod_list_ext_v1610) { - e1.to_json(j); - } - j.end_array(); - } - if (dl_data_to_ul_ack_r16.is_present()) { - j.write_fieldname("dl-DataToUL-ACK-r16"); - dl_data_to_ul_ack_r16->to_json(j); - } - if (ul_access_cfg_list_dci_1_1_r16.is_present()) { - j.write_fieldname("ul-AccessConfigListDCI-1-1-r16"); - ul_access_cfg_list_dci_1_1_r16->to_json(j); - } - if (subslot_len_for_pucch_r16.is_present()) { - j.write_fieldname("subslotLengthForPUCCH-r16"); - subslot_len_for_pucch_r16->to_json(j); - } - if (dl_data_to_ul_ack_dci_1_2_r16.is_present()) { - j.write_fieldname("dl-DataToUL-ACK-DCI-1-2-r16"); - dl_data_to_ul_ack_dci_1_2_r16->to_json(j); - } - if (nof_bits_for_pucch_res_ind_dci_1_2_r16_present) { - j.write_int("numberOfBitsForPUCCH-ResourceIndicatorDCI-1-2-r16", nof_bits_for_pucch_res_ind_dci_1_2_r16); - } - if (dmrs_ul_transform_precoding_pucch_r16_present) { - j.write_str("dmrs-UplinkTransformPrecodingPUCCH-r16", "enabled"); - } - if (spatial_relation_info_to_add_mod_list_size_ext_v1610.is_present()) { - j.start_array("spatialRelationInfoToAddModListSizeExt-v1610"); - for (const auto& e1 : *spatial_relation_info_to_add_mod_list_size_ext_v1610) { - e1.to_json(j); - } - j.end_array(); - } - if (spatial_relation_info_to_release_list_size_ext_v1610.is_present()) { - j.start_array("spatialRelationInfoToReleaseListSizeExt-v1610"); - for (const auto& e1 : *spatial_relation_info_to_release_list_size_ext_v1610) { - j.write_int(e1); - } - j.end_array(); - } - if (spatial_relation_info_to_add_mod_list_ext_v1610.is_present()) { - j.start_array("spatialRelationInfoToAddModListExt-v1610"); - for (const auto& e1 : *spatial_relation_info_to_add_mod_list_ext_v1610) { - e1.to_json(j); - } - j.end_array(); - } - if (spatial_relation_info_to_release_list_ext_v1610.is_present()) { - j.start_array("spatialRelationInfoToReleaseListExt-v1610"); - for (const auto& e1 : *spatial_relation_info_to_release_list_ext_v1610) { - j.write_int(e1); - } - j.end_array(); - } - if (res_group_to_add_mod_list_r16.is_present()) { - j.start_array("resourceGroupToAddModList-r16"); - for (const auto& e1 : *res_group_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (res_group_to_release_list_r16.is_present()) { - j.start_array("resourceGroupToReleaseList-r16"); - for (const auto& e1 : *res_group_to_release_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sps_pucch_an_list_r16.is_present()) { - j.write_fieldname("sps-PUCCH-AN-List-r16"); - sps_pucch_an_list_r16->to_json(j); - } - if (sched_request_res_to_add_mod_list_ext_v1610.is_present()) { - j.start_array("schedulingRequestResourceToAddModListExt-v1610"); - for (const auto& e1 : *sched_request_res_to_add_mod_list_ext_v1610) { - e1.to_json(j); - } - j.end_array(); - } - if (format0_r17.is_present()) { - j.write_fieldname("format0-r17"); - format0_r17->to_json(j); - } - if (format2_ext_r17.is_present()) { - j.write_fieldname("format2Ext-r17"); - format2_ext_r17->to_json(j); - } - if (format3_ext_r17.is_present()) { - j.write_fieldname("format3Ext-r17"); - format3_ext_r17->to_json(j); - } - if (format4_ext_r17.is_present()) { - j.write_fieldname("format4Ext-r17"); - format4_ext_r17->to_json(j); - } - if (ul_access_cfg_list_dci_1_2_r17.is_present()) { - j.write_fieldname("ul-AccessConfigListDCI-1-2-r17"); - ul_access_cfg_list_dci_1_2_r17->to_json(j); - } - if (map_pattern_r17_present) { - j.write_str("mappingPattern-r17", map_pattern_r17.to_string()); - } - if (pwr_ctrl_set_info_to_add_mod_list_r17.is_present()) { - j.start_array("powerControlSetInfoToAddModList-r17"); - for (const auto& e1 : *pwr_ctrl_set_info_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (pwr_ctrl_set_info_to_release_list_r17.is_present()) { - j.start_array("powerControlSetInfoToReleaseList-r17"); - for (const auto& e1 : *pwr_ctrl_set_info_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (second_tpc_field_dci_1_1_r17_present) { - j.write_str("secondTPCFieldDCI-1-1-r17", "enabled"); - } - if (second_tpc_field_dci_1_2_r17_present) { - j.write_str("secondTPCFieldDCI-1-2-r17", "enabled"); - } - if (dl_data_to_ul_ack_r17.is_present()) { - j.write_fieldname("dl-DataToUL-ACK-r17"); - dl_data_to_ul_ack_r17->to_json(j); - } - if (dl_data_to_ul_ack_dci_1_2_r17.is_present()) { - j.write_fieldname("dl-DataToUL-ACK-DCI-1-2-r17"); - dl_data_to_ul_ack_dci_1_2_r17->to_json(j); - } - if (ul_access_cfg_list_dci_1_1_r17.is_present()) { - j.write_fieldname("ul-AccessConfigListDCI-1-1-r17"); - ul_access_cfg_list_dci_1_1_r17->to_json(j); - } - if (sched_request_res_to_add_mod_list_ext_v1700.is_present()) { - j.start_array("schedulingRequestResourceToAddModListExt-v1700"); - for (const auto& e1 : *sched_request_res_to_add_mod_list_ext_v1700) { - e1.to_json(j); - } - j.end_array(); - } - if (dmrs_bundling_pucch_cfg_r17.is_present()) { - j.write_fieldname("dmrs-BundlingPUCCH-Config-r17"); - dmrs_bundling_pucch_cfg_r17->to_json(j); - } - if (dl_data_to_ul_ack_v1700.is_present()) { - j.write_fieldname("dl-DataToUL-ACK-v1700"); - dl_data_to_ul_ack_v1700->to_json(j); - } - if (dl_data_to_ul_ack_multicast_dci_format4_1_r17.is_present()) { - j.write_fieldname("dl-DataToUL-ACK-MulticastDCI-Format4-1-r17"); - dl_data_to_ul_ack_multicast_dci_format4_1_r17->to_json(j); - } - if (sps_pucch_an_list_multicast_r17.is_present()) { - j.write_fieldname("sps-PUCCH-AN-ListMulticast-r17"); - sps_pucch_an_list_multicast_r17->to_json(j); - } - } - j.end_obj(); -} - -void pucch_cfg_s::subslot_len_for_pucch_r16_c_::destroy_() {} -void pucch_cfg_s::subslot_len_for_pucch_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -pucch_cfg_s::subslot_len_for_pucch_r16_c_::subslot_len_for_pucch_r16_c_( - const pucch_cfg_s::subslot_len_for_pucch_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::normal_cp_r16: - c.init(other.c.get()); - break; - case types::extended_cp_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pucch_cfg_s::subslot_len_for_pucch_r16_c_"); - } -} -pucch_cfg_s::subslot_len_for_pucch_r16_c_& -pucch_cfg_s::subslot_len_for_pucch_r16_c_::operator=(const pucch_cfg_s::subslot_len_for_pucch_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::normal_cp_r16: - c.set(other.c.get()); - break; - case types::extended_cp_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pucch_cfg_s::subslot_len_for_pucch_r16_c_"); - } - - return *this; -} -pucch_cfg_s::subslot_len_for_pucch_r16_c_::normal_cp_r16_e_& -pucch_cfg_s::subslot_len_for_pucch_r16_c_::set_normal_cp_r16() -{ - set(types::normal_cp_r16); - return c.get(); -} -pucch_cfg_s::subslot_len_for_pucch_r16_c_::extended_cp_r16_e_& -pucch_cfg_s::subslot_len_for_pucch_r16_c_::set_extended_cp_r16() -{ - set(types::extended_cp_r16); - return c.get(); -} -void pucch_cfg_s::subslot_len_for_pucch_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::normal_cp_r16: - j.write_str("normalCP-r16", c.get().to_string()); - break; - case types::extended_cp_r16: - j.write_str("extendedCP-r16", c.get().to_string()); - break; - default: - log_invalid_choice_id(type_, "pucch_cfg_s::subslot_len_for_pucch_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE pucch_cfg_s::subslot_len_for_pucch_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::normal_cp_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::extended_cp_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "pucch_cfg_s::subslot_len_for_pucch_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pucch_cfg_s::subslot_len_for_pucch_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::normal_cp_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::extended_cp_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "pucch_cfg_s::subslot_len_for_pucch_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* pucch_cfg_s::subslot_len_for_pucch_r16_c_::normal_cp_r16_opts::to_string() const -{ - static const char* names[] = {"n2", "n7"}; - return convert_enum_idx(names, 2, value, "pucch_cfg_s::subslot_len_for_pucch_r16_c_::normal_cp_r16_e_"); -} -uint8_t pucch_cfg_s::subslot_len_for_pucch_r16_c_::normal_cp_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 7}; - return map_enum_number(numbers, 2, value, "pucch_cfg_s::subslot_len_for_pucch_r16_c_::normal_cp_r16_e_"); -} - -const char* pucch_cfg_s::subslot_len_for_pucch_r16_c_::extended_cp_r16_opts::to_string() const -{ - static const char* names[] = {"n2", "n6"}; - return convert_enum_idx(names, 2, value, "pucch_cfg_s::subslot_len_for_pucch_r16_c_::extended_cp_r16_e_"); -} -uint8_t pucch_cfg_s::subslot_len_for_pucch_r16_c_::extended_cp_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 6}; - return map_enum_number(numbers, 2, value, "pucch_cfg_s::subslot_len_for_pucch_r16_c_::extended_cp_r16_e_"); -} - -const char* pucch_cfg_s::map_pattern_r17_opts::to_string() const -{ - static const char* names[] = {"cyclicMapping", "sequentialMapping"}; - return convert_enum_idx(names, 2, value, "pucch_cfg_s::map_pattern_r17_e_"); -} - -// PUSCH-PowerControl ::= SEQUENCE -SRSASN_CODE pusch_pwr_ctrl_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.size() > 0, 1)); - HANDLE_CODE(bref.pack(pathloss_ref_rs_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(pathloss_ref_rs_to_release_list.size() > 0, 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(sri_pusch_map_to_release_list.size() > 0, 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, p0_alpha_sets, 1, 30)); - } - if (pathloss_ref_rs_to_add_mod_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, pathloss_ref_rs_to_add_mod_list, 1, 4)); - } - if (pathloss_ref_rs_to_release_list.size() > 0) { - 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sri_pusch_map_to_add_mod_list, 1, 16)); - } - if (sri_pusch_map_to_release_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sri_pusch_map_to_release_list, 1, 16, integer_packer(0, 15))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE pusch_pwr_ctrl_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)); - bool p0_alpha_sets_present; - HANDLE_CODE(bref.unpack(p0_alpha_sets_present, 1)); - bool pathloss_ref_rs_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(pathloss_ref_rs_to_add_mod_list_present, 1)); - bool pathloss_ref_rs_to_release_list_present; - 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)); - bool sri_pusch_map_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(sri_pusch_map_to_add_mod_list_present, 1)); - bool sri_pusch_map_to_release_list_present; - HANDLE_CODE(bref.unpack(sri_pusch_map_to_release_list_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 (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 SRSASN_SUCCESS; -} -void pusch_pwr_ctrl_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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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.size() > 0) { - 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(); -} - -// PUSCH-PowerControl-v1610 ::= SEQUENCE -SRSASN_CODE pusch_pwr_ctrl_v1610_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pathloss_ref_rs_to_add_mod_list_size_ext_v1610.size() > 0, 1)); - HANDLE_CODE(bref.pack(pathloss_ref_rs_to_release_list_size_ext_v1610.size() > 0, 1)); - HANDLE_CODE(bref.pack(p0_pusch_set_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(olpc_param_set_present, 1)); - - if (pathloss_ref_rs_to_add_mod_list_size_ext_v1610.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, pathloss_ref_rs_to_add_mod_list_size_ext_v1610, 1, 60)); - } - if (pathloss_ref_rs_to_release_list_size_ext_v1610.size() > 0) { - HANDLE_CODE( - pack_dyn_seq_of(bref, pathloss_ref_rs_to_release_list_size_ext_v1610, 1, 60, integer_packer(4, 63))); - } - if (p0_pusch_set_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, p0_pusch_set_list_r16, 1, 16)); - } - if (olpc_param_set_present) { - HANDLE_CODE(bref.pack(olpc_param_set.olpc_param_set_dci_0_1_r16_present, 1)); - HANDLE_CODE(bref.pack(olpc_param_set.olpc_param_set_dci_0_2_r16_present, 1)); - if (olpc_param_set.olpc_param_set_dci_0_1_r16_present) { - HANDLE_CODE(pack_integer(bref, olpc_param_set.olpc_param_set_dci_0_1_r16, (uint8_t)1u, (uint8_t)2u)); - } - if (olpc_param_set.olpc_param_set_dci_0_2_r16_present) { - HANDLE_CODE(pack_integer(bref, olpc_param_set.olpc_param_set_dci_0_2_r16, (uint8_t)1u, (uint8_t)2u)); - } - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= sri_pusch_map_to_add_mod_list2_r17.is_present(); - group_flags[0] |= sri_pusch_map_to_release_list2_r17.is_present(); - group_flags[0] |= p0_pusch_set_list2_r17.is_present(); - group_flags[0] |= dummy.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(sri_pusch_map_to_add_mod_list2_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(sri_pusch_map_to_release_list2_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(p0_pusch_set_list2_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(dummy.is_present(), 1)); - if (sri_pusch_map_to_add_mod_list2_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *sri_pusch_map_to_add_mod_list2_r17, 1, 16)); - } - if (sri_pusch_map_to_release_list2_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *sri_pusch_map_to_release_list2_r17, 1, 16, integer_packer(0, 15))); - } - if (p0_pusch_set_list2_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *p0_pusch_set_list2_r17, 1, 16)); - } - if (dummy.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *dummy, 1, 64)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE pusch_pwr_ctrl_v1610_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool pathloss_ref_rs_to_add_mod_list_size_ext_v1610_present; - HANDLE_CODE(bref.unpack(pathloss_ref_rs_to_add_mod_list_size_ext_v1610_present, 1)); - bool pathloss_ref_rs_to_release_list_size_ext_v1610_present; - HANDLE_CODE(bref.unpack(pathloss_ref_rs_to_release_list_size_ext_v1610_present, 1)); - bool p0_pusch_set_list_r16_present; - HANDLE_CODE(bref.unpack(p0_pusch_set_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(olpc_param_set_present, 1)); - - if (pathloss_ref_rs_to_add_mod_list_size_ext_v1610_present) { - HANDLE_CODE(unpack_dyn_seq_of(pathloss_ref_rs_to_add_mod_list_size_ext_v1610, bref, 1, 60)); - } - if (pathloss_ref_rs_to_release_list_size_ext_v1610_present) { - HANDLE_CODE( - unpack_dyn_seq_of(pathloss_ref_rs_to_release_list_size_ext_v1610, bref, 1, 60, integer_packer(4, 63))); - } - if (p0_pusch_set_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(p0_pusch_set_list_r16, bref, 1, 16)); - } - if (olpc_param_set_present) { - HANDLE_CODE(bref.unpack(olpc_param_set.olpc_param_set_dci_0_1_r16_present, 1)); - HANDLE_CODE(bref.unpack(olpc_param_set.olpc_param_set_dci_0_2_r16_present, 1)); - if (olpc_param_set.olpc_param_set_dci_0_1_r16_present) { - HANDLE_CODE(unpack_integer(olpc_param_set.olpc_param_set_dci_0_1_r16, bref, (uint8_t)1u, (uint8_t)2u)); - } - if (olpc_param_set.olpc_param_set_dci_0_2_r16_present) { - HANDLE_CODE(unpack_integer(olpc_param_set.olpc_param_set_dci_0_2_r16, bref, (uint8_t)1u, (uint8_t)2u)); - } - } - - 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); - - unpack_presence_flag(sri_pusch_map_to_add_mod_list2_r17, bref); - unpack_presence_flag(sri_pusch_map_to_release_list2_r17, bref); - unpack_presence_flag(p0_pusch_set_list2_r17, bref); - unpack_presence_flag(dummy, bref); - if (sri_pusch_map_to_add_mod_list2_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*sri_pusch_map_to_add_mod_list2_r17, bref, 1, 16)); - } - if (sri_pusch_map_to_release_list2_r17.is_present()) { - HANDLE_CODE( - unpack_dyn_seq_of(*sri_pusch_map_to_release_list2_r17, bref, 1, 16, integer_packer(0, 15))); - } - if (p0_pusch_set_list2_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*p0_pusch_set_list2_r17, bref, 1, 16)); - } - if (dummy.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*dummy, bref, 1, 64)); - } - } - } - return SRSASN_SUCCESS; -} -void pusch_pwr_ctrl_v1610_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pathloss_ref_rs_to_add_mod_list_size_ext_v1610.size() > 0) { - j.start_array("pathlossReferenceRSToAddModListSizeExt-v1610"); - for (const auto& e1 : pathloss_ref_rs_to_add_mod_list_size_ext_v1610) { - e1.to_json(j); - } - j.end_array(); - } - if (pathloss_ref_rs_to_release_list_size_ext_v1610.size() > 0) { - j.start_array("pathlossReferenceRSToReleaseListSizeExt-v1610"); - for (const auto& e1 : pathloss_ref_rs_to_release_list_size_ext_v1610) { - j.write_int(e1); - } - j.end_array(); - } - if (p0_pusch_set_list_r16.size() > 0) { - j.start_array("p0-PUSCH-SetList-r16"); - for (const auto& e1 : p0_pusch_set_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (olpc_param_set_present) { - j.write_fieldname("olpc-ParameterSet"); - j.start_obj(); - if (olpc_param_set.olpc_param_set_dci_0_1_r16_present) { - j.write_int("olpc-ParameterSetDCI-0-1-r16", olpc_param_set.olpc_param_set_dci_0_1_r16); - } - if (olpc_param_set.olpc_param_set_dci_0_2_r16_present) { - j.write_int("olpc-ParameterSetDCI-0-2-r16", olpc_param_set.olpc_param_set_dci_0_2_r16); - } - j.end_obj(); - } - if (ext) { - if (sri_pusch_map_to_add_mod_list2_r17.is_present()) { - j.start_array("sri-PUSCH-MappingToAddModList2-r17"); - for (const auto& e1 : *sri_pusch_map_to_add_mod_list2_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (sri_pusch_map_to_release_list2_r17.is_present()) { - j.start_array("sri-PUSCH-MappingToReleaseList2-r17"); - for (const auto& e1 : *sri_pusch_map_to_release_list2_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (p0_pusch_set_list2_r17.is_present()) { - j.start_array("p0-PUSCH-SetList2-r17"); - for (const auto& e1 : *p0_pusch_set_list2_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (dummy.is_present()) { - j.start_array("dummy"); - for (const auto& e1 : *dummy) { - e1.to_json(j); - } - j.end_array(); - } - } - j.end_obj(); -} - -// SRS-PosResourceSet-r16 ::= SEQUENCE -SRSASN_CODE srs_pos_res_set_r16_s::pack(bit_ref& bref) const +const char* pcch_cfg_s::nand_paging_frame_offset_c_::types_opts::to_number_string() const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(srs_pos_res_id_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(alpha_r16_present, 1)); - HANDLE_CODE(bref.pack(p0_r16_present, 1)); - HANDLE_CODE(bref.pack(pathloss_ref_rs_pos_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, srs_pos_res_set_id_r16, (uint8_t)0u, (uint8_t)15u)); - if (srs_pos_res_id_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_pos_res_id_list_r16, 1, 16, integer_packer(0, 63))); - } - HANDLE_CODE(res_type_r16.pack(bref)); - if (alpha_r16_present) { - HANDLE_CODE(alpha_r16.pack(bref)); - } - if (p0_r16_present) { - HANDLE_CODE(pack_integer(bref, p0_r16, (int16_t)-202, (int16_t)24)); - } - if (pathloss_ref_rs_pos_r16_present) { - HANDLE_CODE(pathloss_ref_rs_pos_r16.pack(bref)); - } - - return SRSASN_SUCCESS; + static const char* number_strs[] = {"1", "0.5", "0.25", "1/8", "1/16"}; + return convert_enum_idx(number_strs, 5, value, "pcch_cfg_s::nand_paging_frame_offset_c_::types"); } -SRSASN_CODE srs_pos_res_set_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool srs_pos_res_id_list_r16_present; - HANDLE_CODE(bref.unpack(srs_pos_res_id_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(alpha_r16_present, 1)); - HANDLE_CODE(bref.unpack(p0_r16_present, 1)); - HANDLE_CODE(bref.unpack(pathloss_ref_rs_pos_r16_present, 1)); - - HANDLE_CODE(unpack_integer(srs_pos_res_set_id_r16, bref, (uint8_t)0u, (uint8_t)15u)); - if (srs_pos_res_id_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(srs_pos_res_id_list_r16, bref, 1, 16, integer_packer(0, 63))); - } - HANDLE_CODE(res_type_r16.unpack(bref)); - if (alpha_r16_present) { - HANDLE_CODE(alpha_r16.unpack(bref)); - } - if (p0_r16_present) { - HANDLE_CODE(unpack_integer(p0_r16, bref, (int16_t)-202, (int16_t)24)); - } - if (pathloss_ref_rs_pos_r16_present) { - HANDLE_CODE(pathloss_ref_rs_pos_r16.unpack(bref)); - } - return SRSASN_SUCCESS; +const char* pcch_cfg_s::ns_opts::to_string() const +{ + static const char* names[] = {"four", "two", "one"}; + return convert_enum_idx(names, 3, value, "pcch_cfg_s::ns_e_"); } -void srs_pos_res_set_r16_s::to_json(json_writer& j) const +uint8_t pcch_cfg_s::ns_opts::to_number() const { - j.start_obj(); - j.write_int("srs-PosResourceSetId-r16", srs_pos_res_set_id_r16); - if (srs_pos_res_id_list_r16.size() > 0) { - j.start_array("srs-PosResourceIdList-r16"); - for (const auto& e1 : srs_pos_res_id_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - j.write_fieldname("resourceType-r16"); - res_type_r16.to_json(j); - if (alpha_r16_present) { - j.write_str("alpha-r16", alpha_r16.to_string()); - } - if (p0_r16_present) { - j.write_int("p0-r16", p0_r16); - } - if (pathloss_ref_rs_pos_r16_present) { - j.write_fieldname("pathlossReferenceRS-Pos-r16"); - pathloss_ref_rs_pos_r16.to_json(j); - } - j.end_obj(); + static const uint8_t numbers[] = {4, 2, 1}; + return map_enum_number(numbers, 3, value, "pcch_cfg_s::ns_e_"); } -void srs_pos_res_set_r16_s::res_type_r16_c_::destroy_() +void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::destroy_() { switch (type_) { - case types::aperiodic_r16: - c.destroy(); + case types::scs15_kh_zone_t: + c.destroy(); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + c.destroy(); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + c.destroy(); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + c.destroy(); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + c.destroy(); break; - case types::semi_persistent_r16: - c.destroy(); + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + c.destroy(); + break; + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + c.destroy(); break; - case types::periodic_r16: - c.destroy(); + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + c.destroy(); break; default: break; } } -void srs_pos_res_set_r16_s::res_type_r16_c_::set(types::options e) +void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::aperiodic_r16: - c.init(); + case types::scs15_kh_zone_t: + c.init(); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + c.init(); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + c.init(); break; - case types::semi_persistent_r16: - c.init(); + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + c.init(); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + c.init(); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + c.init(); break; - case types::periodic_r16: - c.init(); + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + c.init(); + break; + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::res_type_r16_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_"); } } -srs_pos_res_set_r16_s::res_type_r16_c_::res_type_r16_c_(const srs_pos_res_set_r16_s::res_type_r16_c_& other) +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::first_pdcch_monitoring_occasion_of_po_c_( + const pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_& other) { type_ = other.type(); switch (type_) { - case types::aperiodic_r16: - c.init(other.c.get()); + case types::scs15_kh_zone_t: + c.init(other.c.get()); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + c.init(other.c.get()); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + c.init(other.c.get()); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + c.init(other.c.get()); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + c.init(other.c.get()); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + c.init(other.c.get()); break; - case types::semi_persistent_r16: - c.init(other.c.get()); + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + c.init(other.c.get()); break; - case types::periodic_r16: - c.init(other.c.get()); + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::res_type_r16_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_"); } } -srs_pos_res_set_r16_s::res_type_r16_c_& -srs_pos_res_set_r16_s::res_type_r16_c_::operator=(const srs_pos_res_set_r16_s::res_type_r16_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; } set(other.type()); switch (type_) { - case types::aperiodic_r16: - c.set(other.c.get()); + case types::scs15_kh_zone_t: + c.set(other.c.get()); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + c.set(other.c.get()); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + c.set(other.c.get()); break; - case types::semi_persistent_r16: - c.set(other.c.get()); + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + c.set(other.c.get()); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + c.set(other.c.get()); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + c.set(other.c.get()); break; - case types::periodic_r16: - c.set(other.c.get()); + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + c.set(other.c.get()); + break; + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::res_type_r16_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_"); } return *this; } -srs_pos_res_set_r16_s::res_type_r16_c_::aperiodic_r16_s_& srs_pos_res_set_r16_s::res_type_r16_c_::set_aperiodic_r16() +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::scs15_kh_zone_t_l_& +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs15_kh_zone_t() +{ + set(types::scs15_kh_zone_t); + return c.get(); +} +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::scs30_kh_zone_t_scs15_kh_zhalf_t_l_& +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs30_kh_zone_t_scs15_kh_zhalf_t() +{ + set(types::scs30_kh_zone_t_scs15_kh_zhalf_t); + return c.get(); +} +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t_l_& +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t() +{ + set(types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t); + return c.get(); +} +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: + scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t_l_& + pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: + set_scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t() +{ + set(types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t); + return c.get(); +} +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: + scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t_l_& + pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: + set_scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t() +{ + set(types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t); + return c.get(); +} +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: + scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t_l_& + pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: + set_scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t() { - set(types::aperiodic_r16); - return c.get(); + set(types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t); + return c.get(); } -srs_pos_res_set_r16_s::res_type_r16_c_::semi_persistent_r16_s_& -srs_pos_res_set_r16_s::res_type_r16_c_::set_semi_persistent_r16() +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: + scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t_l_& + pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_:: + set_scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t() { - set(types::semi_persistent_r16); - return c.get(); + set(types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t); + return c.get(); } -srs_pos_res_set_r16_s::res_type_r16_c_::periodic_r16_s_& srs_pos_res_set_r16_s::res_type_r16_c_::set_periodic_r16() +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t_l_& +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::set_scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t() { - set(types::periodic_r16); - return c.get(); + set(types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t); + return c.get(); } -void srs_pos_res_set_r16_s::res_type_r16_c_::to_json(json_writer& j) const +void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::aperiodic_r16: - j.write_fieldname("aperiodic-r16"); - j.start_obj(); - if (c.get().aperiodic_srs_res_trigger_list_r16.size() > 0) { - j.start_array("aperiodicSRS-ResourceTriggerList-r16"); - for (const auto& e1 : c.get().aperiodic_srs_res_trigger_list_r16) { - j.write_int(e1); - } - j.end_array(); + case types::scs15_kh_zone_t: + j.start_array("sCS15KHZoneT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); } - j.end_obj(); + j.end_array(); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + j.start_array("sCS30KHZoneT-SCS15KHZhalfT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + j.start_array("sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + j.start_array("sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + j.start_array("sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT"); + for (const auto& e1 : + c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + j.start_array("sCS480KHZoneT-SCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT"); + for (const auto& e1 : + c.get()) { + j.write_int(e1); + } + j.end_array(); break; - case types::semi_persistent_r16: - j.write_fieldname("semi-persistent-r16"); - j.start_obj(); - j.end_obj(); + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + j.start_array("sCS480KHZhalfT-SCS120KHZoneEighthT-SCS60KHZoneSixteenthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); break; - case types::periodic_r16: - j.write_fieldname("periodic-r16"); - j.start_obj(); - j.end_obj(); + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + j.start_array("sCS480KHZquarterT-SCS120KHZoneSixteenthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); break; default: - log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::res_type_r16_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_"); } j.end_obj(); } -SRSASN_CODE srs_pos_res_set_r16_s::res_type_r16_c_::pack(bit_ref& bref) const +SRSASN_CODE pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::aperiodic_r16: - bref.pack(c.get().ext, 1); - HANDLE_CODE(bref.pack(c.get().aperiodic_srs_res_trigger_list_r16.size() > 0, 1)); - if (c.get().aperiodic_srs_res_trigger_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of( - bref, c.get().aperiodic_srs_res_trigger_list_r16, 1, 3, integer_packer(1, 3))); - } + case types::scs15_kh_zone_t: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 139))); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 279))); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + HANDLE_CODE(pack_dyn_seq_of(bref, + c.get(), + 1, + 4, + integer_packer(0, 559))); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + HANDLE_CODE( + pack_dyn_seq_of(bref, + c.get(), + 1, + 4, + integer_packer(0, 1119))); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + HANDLE_CODE(pack_dyn_seq_of( + bref, + c.get(), + 1, + 4, + integer_packer(0, 2239))); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + HANDLE_CODE(pack_dyn_seq_of( + bref, + c.get(), + 1, + 4, + integer_packer(0, 4479))); break; - case types::semi_persistent_r16: - bref.pack(c.get().ext, 1); + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + HANDLE_CODE(pack_dyn_seq_of(bref, + c.get(), + 1, + 4, + integer_packer(0, 8959))); break; - case types::periodic_r16: - bref.pack(c.get().ext, 1); + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + HANDLE_CODE(pack_dyn_seq_of( + bref, c.get(), 1, 4, integer_packer(0, 17919))); break; default: - log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::res_type_r16_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE srs_pos_res_set_r16_s::res_type_r16_c_::unpack(cbit_ref& bref) +SRSASN_CODE pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::aperiodic_r16: - bref.unpack(c.get().ext, 1); - bool aperiodic_srs_res_trigger_list_r16_present; - HANDLE_CODE(bref.unpack(aperiodic_srs_res_trigger_list_r16_present, 1)); - if (aperiodic_srs_res_trigger_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of( - c.get().aperiodic_srs_res_trigger_list_r16, bref, 1, 3, integer_packer(1, 3))); - } + case types::scs15_kh_zone_t: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 139))); + break; + case types::scs30_kh_zone_t_scs15_kh_zhalf_t: + HANDLE_CODE(unpack_dyn_seq_of( + c.get(), bref, 1, 4, integer_packer(0, 279))); + break; + case types::scs60_kh_zone_t_scs30_kh_zhalf_t_scs15_kh_zquarter_t: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), + bref, + 1, + 4, + integer_packer(0, 559))); + break; + case types::scs120_kh_zone_t_scs60_kh_zhalf_t_scs30_kh_zquarter_t_scs15_kh_zone_eighth_t: + HANDLE_CODE( + unpack_dyn_seq_of(c.get(), + bref, + 1, + 4, + integer_packer(0, 1119))); + break; + case types::scs120_kh_zhalf_t_scs60_kh_zquarter_t_scs30_kh_zone_eighth_t_scs15_kh_zone_sixteenth_t: + HANDLE_CODE(unpack_dyn_seq_of( + c.get(), + bref, + 1, + 4, + integer_packer(0, 2239))); + break; + case types::scs480_kh_zone_t_scs120_kh_zquarter_t_scs60_kh_zone_eighth_t_scs30_kh_zone_sixteenth_t: + HANDLE_CODE(unpack_dyn_seq_of( + c.get(), + bref, + 1, + 4, + integer_packer(0, 4479))); break; - case types::semi_persistent_r16: - bref.unpack(c.get().ext, 1); + case types::scs480_kh_zhalf_t_scs120_kh_zone_eighth_t_scs60_kh_zone_sixteenth_t: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), + bref, + 1, + 4, + integer_packer(0, 8959))); break; - case types::periodic_r16: - bref.unpack(c.get().ext, 1); + case types::scs480_kh_zquarter_t_scs120_kh_zone_sixteenth_t: + HANDLE_CODE(unpack_dyn_seq_of( + c.get(), bref, 1, 4, integer_packer(0, 17919))); break; default: - log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::res_type_r16_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -void srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::destroy_() +const char* pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::types_opts::to_string() const +{ + static const char* names[] = {"sCS15KHZoneT", + "sCS30KHZoneT-SCS15KHZhalfT", + "sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT", + "sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT", + "sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT", + "sCS480KHZoneT-SCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT", + "sCS480KHZhalfT-SCS120KHZoneEighthT-SCS60KHZoneSixteenthT", + "sCS480KHZquarterT-SCS120KHZoneSixteenthT"}; + return convert_enum_idx(names, 8, value, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_c_::types"); +} + +void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::destroy_() { switch (type_) { - case types::ssb_ncell_r16: - c.destroy(); + case types::scs480_kh_zone_eighth_t: + c.destroy(); break; - case types::dl_prs_r16: - c.destroy(); + case types::scs480_kh_zone_sixteenth_t: + c.destroy(); break; default: break; } } -void srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::set(types::options e) +void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::set(types::options e) { destroy_(); type_ = e; switch (type_) { - case types::ssb_idx_serving_r16: - break; - case types::ssb_ncell_r16: - c.init(); + case types::scs480_kh_zone_eighth_t: + c.init(); break; - case types::dl_prs_r16: - c.init(); + case types::scs480_kh_zone_sixteenth_t: + c.init(); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); } } -srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::pathloss_ref_rs_pos_r16_c_( - const srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_& other) +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::first_pdcch_monitoring_occasion_of_po_v1710_c_( + const pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_& other) { type_ = other.type(); switch (type_) { - case types::ssb_idx_serving_r16: - c.init(other.c.get()); - break; - case types::ssb_ncell_r16: - c.init(other.c.get()); + case types::scs480_kh_zone_eighth_t: + c.init(other.c.get()); break; - case types::dl_prs_r16: - c.init(other.c.get()); + case types::scs480_kh_zone_sixteenth_t: + c.init(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); } } -srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_& srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::operator=( - const srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_& other) +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_& +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::operator=( + const pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_& other) { if (this == &other) { return *this; } set(other.type()); switch (type_) { - case types::ssb_idx_serving_r16: - c.set(other.c.get()); - break; - case types::ssb_ncell_r16: - c.set(other.c.get()); + case types::scs480_kh_zone_eighth_t: + c.set(other.c.get()); break; - case types::dl_prs_r16: - c.set(other.c.get()); + case types::scs480_kh_zone_sixteenth_t: + c.set(other.c.get()); break; case types::nulltype: break; default: - log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); } return *this; } -uint8_t& srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::set_ssb_idx_serving_r16() -{ - set(types::ssb_idx_serving_r16); - return c.get(); -} -ssb_info_ncell_r16_s& srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::set_ssb_ncell_r16() +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::scs480_kh_zone_eighth_t_l_& +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::set_scs480_kh_zone_eighth_t() { - set(types::ssb_ncell_r16); - return c.get(); + set(types::scs480_kh_zone_eighth_t); + return c.get(); } -dl_prs_info_r16_s& srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::set_dl_prs_r16() +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::scs480_kh_zone_sixteenth_t_l_& +pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::set_scs480_kh_zone_sixteenth_t() { - set(types::dl_prs_r16); - return c.get(); + set(types::scs480_kh_zone_sixteenth_t); + return c.get(); } -void srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::to_json(json_writer& j) const +void pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::ssb_idx_serving_r16: - j.write_int("ssb-IndexServing-r16", c.get()); - break; - case types::ssb_ncell_r16: - j.write_fieldname("ssb-Ncell-r16"); - c.get().to_json(j); + case types::scs480_kh_zone_eighth_t: + j.start_array("sCS480KHZoneEighthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); break; - case types::dl_prs_r16: - j.write_fieldname("dl-PRS-r16"); - c.get().to_json(j); + case types::scs480_kh_zone_sixteenth_t: + j.start_array("sCS480KHZoneSixteenthT"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); break; default: - log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); } j.end_obj(); } -SRSASN_CODE srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::pack(bit_ref& bref) const +SRSASN_CODE pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::ssb_idx_serving_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::ssb_ncell_r16: - HANDLE_CODE(c.get().pack(bref)); + case types::scs480_kh_zone_eighth_t: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 35839))); break; - case types::dl_prs_r16: - HANDLE_CODE(c.get().pack(bref)); + case types::scs480_kh_zone_sixteenth_t: + HANDLE_CODE( + pack_dyn_seq_of(bref, c.get(), 1, 4, integer_packer(0, 71679))); break; default: - log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_::unpack(cbit_ref& bref) +SRSASN_CODE pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::ssb_idx_serving_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::ssb_ncell_r16: - HANDLE_CODE(c.get().unpack(bref)); + case types::scs480_kh_zone_eighth_t: + HANDLE_CODE( + unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 35839))); break; - case types::dl_prs_r16: - HANDLE_CODE(c.get().unpack(bref)); + case types::scs480_kh_zone_sixteenth_t: + HANDLE_CODE( + unpack_dyn_seq_of(c.get(), bref, 1, 4, integer_packer(0, 71679))); break; default: - log_invalid_choice_id(type_, "srs_pos_res_set_r16_s::pathloss_ref_rs_pos_r16_c_"); + log_invalid_choice_id(type_, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -// SRS-ResourceSet ::= SEQUENCE -SRSASN_CODE srs_res_set_s::pack(bit_ref& bref) const +const char* pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::types_opts::to_string() const +{ + static const char* names[] = {"sCS480KHZoneEighthT", "sCS480KHZoneSixteenthT"}; + return convert_enum_idx(names, 2, value, "pcch_cfg_s::first_pdcch_monitoring_occasion_of_po_v1710_c_::types"); +} + +// PEI-Config-r17 ::= SEQUENCE +SRSASN_CODE pei_cfg_r17_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(bref.pack(srs_res_id_list.size() > 0, 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(bref.pack(last_used_cell_only_r17_present, 1)); - HANDLE_CODE(pack_integer(bref, srs_res_set_id, (uint8_t)0u, (uint8_t)15u)); - if (srs_res_id_list.size() > 0) { - 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)); + HANDLE_CODE(po_num_per_pei_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, payload_size_dci_2_7_r17, (uint8_t)1u, (uint8_t)43u)); + HANDLE_CODE(pack_integer(bref, pei_frame_offset_r17, (uint8_t)0u, (uint8_t)16u)); + HANDLE_CODE(subgroup_cfg_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pei_cfg_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(last_used_cell_only_r17_present, 1)); + + HANDLE_CODE(po_num_per_pei_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(payload_size_dci_2_7_r17, bref, (uint8_t)1u, (uint8_t)43u)); + HANDLE_CODE(unpack_integer(pei_frame_offset_r17, bref, (uint8_t)0u, (uint8_t)16u)); + HANDLE_CODE(subgroup_cfg_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pei_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("po-NumPerPEI-r17", po_num_per_pei_r17.to_string()); + j.write_int("payloadSizeDCI-2-7-r17", payload_size_dci_2_7_r17); + j.write_int("pei-FrameOffset-r17", pei_frame_offset_r17); + j.write_fieldname("subgroupConfig-r17"); + subgroup_cfg_r17.to_json(j); + if (last_used_cell_only_r17_present) { + j.write_str("lastUsedCellOnly-r17", "true"); } + j.end_obj(); +} + +const char* pei_cfg_r17_s::po_num_per_pei_r17_opts::to_string() const +{ + static const char* names[] = {"po1", "po2", "po4", "po8"}; + return convert_enum_idx(names, 4, value, "pei_cfg_r17_s::po_num_per_pei_r17_e_"); +} +uint8_t pei_cfg_r17_s::po_num_per_pei_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "pei_cfg_r17_s::po_num_per_pei_r17_e_"); +} + +// TDD-UL-DL-Pattern ::= SEQUENCE +SRSASN_CODE tdd_ul_dl_pattern_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(dl_ul_tx_periodicity.pack(bref)); + HANDLE_CODE(pack_integer(bref, nrof_dl_slots, (uint16_t)0u, (uint16_t)320u)); + HANDLE_CODE(pack_integer(bref, nrof_dl_symbols, (uint8_t)0u, (uint8_t)13u)); + HANDLE_CODE(pack_integer(bref, nrof_ul_slots, (uint16_t)0u, (uint16_t)320u)); + HANDLE_CODE(pack_integer(bref, nrof_ul_symbols, (uint8_t)0u, (uint8_t)13u)); if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= pathloss_ref_rs_list_r16.is_present(); - group_flags[1] |= usage_pdc_r17_present; - group_flags[1] |= available_slot_offset_list_r17.is_present(); - group_flags[1] |= follow_unified_tci_state_srs_r17_present; + group_flags[0] |= dl_ul_tx_periodicity_v1530_present; group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(pathloss_ref_rs_list_r16.is_present(), 1)); - if (pathloss_ref_rs_list_r16.is_present()) { - HANDLE_CODE(pathloss_ref_rs_list_r16->pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(usage_pdc_r17_present, 1)); - HANDLE_CODE(bref.pack(available_slot_offset_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(follow_unified_tci_state_srs_r17_present, 1)); - if (available_slot_offset_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *available_slot_offset_list_r17, 1, 4, integer_packer(0, 7))); + HANDLE_CODE(bref.pack(dl_ul_tx_periodicity_v1530_present, 1)); + if (dl_ul_tx_periodicity_v1530_present) { + HANDLE_CODE(dl_ul_tx_periodicity_v1530.pack(bref)); } } } return SRSASN_SUCCESS; } -SRSASN_CODE srs_res_set_s::unpack(cbit_ref& bref) +SRSASN_CODE tdd_ul_dl_pattern_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - bool srs_res_id_list_present; - 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)); - } + HANDLE_CODE(dl_ul_tx_periodicity.unpack(bref)); + HANDLE_CODE(unpack_integer(nrof_dl_slots, bref, (uint16_t)0u, (uint16_t)320u)); + HANDLE_CODE(unpack_integer(nrof_dl_symbols, bref, (uint8_t)0u, (uint8_t)13u)); + HANDLE_CODE(unpack_integer(nrof_ul_slots, bref, (uint16_t)0u, (uint16_t)320u)); + HANDLE_CODE(unpack_integer(nrof_ul_symbols, bref, (uint8_t)0u, (uint8_t)13u)); if (ext) { - ext_groups_unpacker_guard group_flags(2); + ext_groups_unpacker_guard group_flags(1); group_flags.unpack(bref); if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - unpack_presence_flag(pathloss_ref_rs_list_r16, bref); - if (pathloss_ref_rs_list_r16.is_present()) { - HANDLE_CODE(pathloss_ref_rs_list_r16->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(usage_pdc_r17_present, 1)); - unpack_presence_flag(available_slot_offset_list_r17, bref); - HANDLE_CODE(bref.unpack(follow_unified_tci_state_srs_r17_present, 1)); - if (available_slot_offset_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*available_slot_offset_list_r17, bref, 1, 4, integer_packer(0, 7))); + HANDLE_CODE(bref.unpack(dl_ul_tx_periodicity_v1530_present, 1)); + if (dl_ul_tx_periodicity_v1530_present) { + HANDLE_CODE(dl_ul_tx_periodicity_v1530.unpack(bref)); } } } return SRSASN_SUCCESS; } -void srs_res_set_s::to_json(json_writer& j) const +void tdd_ul_dl_pattern_s::to_json(json_writer& j) const { j.start_obj(); - j.write_int("srs-ResourceSetId", srs_res_set_id); - if (srs_res_id_list.size() > 0) { - 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.write_str("dl-UL-TransmissionPeriodicity", dl_ul_tx_periodicity.to_string()); + j.write_int("nrofDownlinkSlots", nrof_dl_slots); + j.write_int("nrofDownlinkSymbols", nrof_dl_symbols); + j.write_int("nrofUplinkSlots", nrof_ul_slots); + j.write_int("nrofUplinkSymbols", nrof_ul_symbols); if (ext) { - if (pathloss_ref_rs_list_r16.is_present()) { - j.write_fieldname("pathlossReferenceRSList-r16"); - pathloss_ref_rs_list_r16->to_json(j); - } - if (usage_pdc_r17_present) { - j.write_str("usagePDC-r17", "true"); - } - if (available_slot_offset_list_r17.is_present()) { - j.start_array("availableSlotOffsetList-r17"); - for (const auto& e1 : *available_slot_offset_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (follow_unified_tci_state_srs_r17_present) { - j.write_str("followUnifiedTCI-StateSRS-r17", "enabled"); + if (dl_ul_tx_periodicity_v1530_present) { + j.write_str("dl-UL-TransmissionPeriodicity-v1530", dl_ul_tx_periodicity_v1530.to_string()); } } j.end_obj(); } -void srs_res_set_s::res_type_c_::destroy_() +const char* tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_opts::to_string() const { - switch (type_) { - case types::aperiodic: - c.destroy(); - break; - case types::semi_persistent: - c.destroy(); - break; - case types::periodic: - c.destroy(); - break; - default: - break; - } + static const char* names[] = {"ms0p5", "ms0p625", "ms1", "ms1p25", "ms2", "ms2p5", "ms5", "ms10"}; + return convert_enum_idx(names, 8, value, "tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_e_"); } -void srs_res_set_s::res_type_c_::set(types::options e) + +const char* tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_opts::to_string() const { - 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_"); - } + static const char* names[] = {"ms3", "ms4"}; + return convert_enum_idx(names, 2, value, "tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_e_"); } -srs_res_set_s::res_type_c_::res_type_c_(const srs_res_set_s::res_type_c_& other) +uint8_t tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_opts::to_number() const { - 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_"); - } + static const uint8_t numbers[] = {3, 4}; + return map_enum_number(numbers, 2, value, "tdd_ul_dl_pattern_s::dl_ul_tx_periodicity_v1530_e_"); } -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::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_"); - } - return *this; -} -srs_res_set_s::res_type_c_::aperiodic_s_& srs_res_set_s::res_type_c_::set_aperiodic() -{ - set(types::aperiodic); - return c.get(); -} -srs_res_set_s::res_type_c_::semi_persistent_s_& srs_res_set_s::res_type_c_::set_semi_persistent() +// TimeAlignmentTimer ::= ENUMERATED +const char* time_align_timer_opts::to_string() const { - set(types::semi_persistent); - return c.get(); + static const char* names[] = {"ms500", "ms750", "ms1280", "ms1920", "ms2560", "ms5120", "ms10240", "infinity"}; + return convert_enum_idx(names, 8, value, "time_align_timer_e"); } -srs_res_set_s::res_type_c_::periodic_s_& srs_res_set_s::res_type_c_::set_periodic() +int16_t time_align_timer_opts::to_number() const { - set(types::periodic); - return c.get(); + static const int16_t numbers[] = {500, 750, 1280, 1920, 2560, 5120, 10240, -1}; + return map_enum_number(numbers, 8, value, "time_align_timer_e"); } -void srs_res_set_s::res_type_c_::to_json(json_writer& j) const + +// DownlinkConfigCommonSIB ::= SEQUENCE +SRSASN_CODE dl_cfg_common_sib_s::pack(bit_ref& bref) 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); + bref.pack(ext, 1); + HANDLE_CODE(freq_info_dl.pack(bref)); + HANDLE_CODE(init_dl_bwp.pack(bref)); + HANDLE_CODE(bcch_cfg.pack(bref)); + HANDLE_CODE(pcch_cfg.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= pei_cfg_r17.is_present(); + group_flags[0] |= init_dl_bwp_red_cap_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pei_cfg_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(init_dl_bwp_red_cap_r17.is_present(), 1)); + if (pei_cfg_r17.is_present()) { + HANDLE_CODE(pei_cfg_r17->pack(bref)); } - 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); + if (init_dl_bwp_red_cap_r17.is_present()) { + HANDLE_CODE(init_dl_bwp_red_cap_r17->pack(bref)); } - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); + } } - j.end_obj(); + return SRSASN_SUCCESS; } -SRSASN_CODE srs_res_set_s::res_type_c_::pack(bit_ref& bref) const +SRSASN_CODE dl_cfg_common_sib_s::unpack(cbit_ref& bref) { - 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)); + bref.unpack(ext, 1); + HANDLE_CODE(freq_info_dl.unpack(bref)); + HANDLE_CODE(init_dl_bwp.unpack(bref)); + HANDLE_CODE(bcch_cfg.unpack(bref)); + HANDLE_CODE(pcch_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); + + unpack_presence_flag(pei_cfg_r17, bref); + unpack_presence_flag(init_dl_bwp_red_cap_r17, bref); + if (pei_cfg_r17.is_present()) { + HANDLE_CODE(pei_cfg_r17->unpack(bref)); } - 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)); + if (init_dl_bwp_red_cap_r17.is_present()) { + HANDLE_CODE(init_dl_bwp_red_cap_r17->unpack(bref)); } - break; - default: - log_invalid_choice_id(type_, "srs_res_set_s::res_type_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + } } return SRSASN_SUCCESS; } -SRSASN_CODE srs_res_set_s::res_type_c_::unpack(cbit_ref& bref) +void dl_cfg_common_sib_s::to_json(json_writer& j) const { - 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; + j.start_obj(); + j.write_fieldname("frequencyInfoDL"); + freq_info_dl.to_json(j); + j.write_fieldname("initialDownlinkBWP"); + init_dl_bwp.to_json(j); + j.write_fieldname("bcch-Config"); + bcch_cfg.to_json(j); + j.write_fieldname("pcch-Config"); + pcch_cfg.to_json(j); + if (ext) { + if (pei_cfg_r17.is_present()) { + j.write_fieldname("pei-Config-r17"); + pei_cfg_r17->to_json(j); + } + if (init_dl_bwp_red_cap_r17.is_present()) { + j.write_fieldname("initialDownlinkBWP-RedCap-r17"); + init_dl_bwp_red_cap_r17->to_json(j); + } } + j.end_obj(); +} + +// HighSpeedConfig-r16 ::= SEQUENCE +SRSASN_CODE high_speed_cfg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(high_speed_meas_flag_r16_present, 1)); + HANDLE_CODE(bref.pack(high_speed_demod_flag_r16_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE high_speed_cfg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(high_speed_meas_flag_r16_present, 1)); + HANDLE_CODE(bref.unpack(high_speed_demod_flag_r16_present, 1)); + return SRSASN_SUCCESS; } +void high_speed_cfg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (high_speed_meas_flag_r16_present) { + j.write_str("highSpeedMeasFlag-r16", "true"); + } + if (high_speed_demod_flag_r16_present) { + j.write_str("highSpeedDemodFlag-r16", "true"); + } + j.end_obj(); +} -SRSASN_CODE srs_res_set_s::res_type_c_::aperiodic_s_::pack(bit_ref& bref) const +// HighSpeedConfigFR2-r17 ::= SEQUENCE +SRSASN_CODE high_speed_cfg_fr2_r17_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(bref.pack(high_speed_meas_flag_fr2_r17_present, 1)); + HANDLE_CODE(bref.pack(high_speed_deployment_type_fr2_r17_present, 1)); + HANDLE_CODE(bref.pack(high_speed_large_one_step_ul_timing_fr2_r17_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 (high_speed_meas_flag_fr2_r17_present) { + HANDLE_CODE(high_speed_meas_flag_fr2_r17.pack(bref)); } - if (slot_offset_present) { - HANDLE_CODE(pack_integer(bref, slot_offset, (uint8_t)1u, (uint8_t)32u)); + if (high_speed_deployment_type_fr2_r17_present) { + HANDLE_CODE(high_speed_deployment_type_fr2_r17.pack(bref)); } - 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 srs_res_set_s::res_type_c_::aperiodic_s_::unpack(cbit_ref& bref) +SRSASN_CODE high_speed_cfg_fr2_r17_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(high_speed_meas_flag_fr2_r17_present, 1)); + HANDLE_CODE(bref.unpack(high_speed_deployment_type_fr2_r17_present, 1)); + HANDLE_CODE(bref.unpack(high_speed_large_one_step_ul_timing_fr2_r17_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 (high_speed_meas_flag_fr2_r17_present) { + HANDLE_CODE(high_speed_meas_flag_fr2_r17.unpack(bref)); } - if (slot_offset_present) { - HANDLE_CODE(unpack_integer(slot_offset, bref, (uint8_t)1u, (uint8_t)32u)); + if (high_speed_deployment_type_fr2_r17_present) { + HANDLE_CODE(high_speed_deployment_type_fr2_r17.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); - - unpack_presence_flag(aperiodic_srs_res_trigger_list, bref); - 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 srs_res_set_s::res_type_c_::aperiodic_s_::to_json(json_writer& j) const +void high_speed_cfg_fr2_r17_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 (high_speed_meas_flag_fr2_r17_present) { + j.write_str("highSpeedMeasFlagFR2-r17", high_speed_meas_flag_fr2_r17.to_string()); } - if (slot_offset_present) { - j.write_int("slotOffset", slot_offset); + if (high_speed_deployment_type_fr2_r17_present) { + j.write_str("highSpeedDeploymentTypeFR2-r17", high_speed_deployment_type_fr2_r17.to_string()); } - 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(); - } + if (high_speed_large_one_step_ul_timing_fr2_r17_present) { + j.write_str("highSpeedLargeOneStepUL-TimingFR2-r17", "true"); } j.end_obj(); } -const char* srs_res_set_s::usage_opts::to_string() const +const char* high_speed_cfg_fr2_r17_s::high_speed_meas_flag_fr2_r17_opts::to_string() const { - static const char* names[] = {"beamManagement", "codebook", "nonCodebook", "antennaSwitching"}; - return convert_enum_idx(names, 4, value, "srs_res_set_s::usage_e_"); + static const char* names[] = {"set1", "set2"}; + return convert_enum_idx(names, 2, value, "high_speed_cfg_fr2_r17_s::high_speed_meas_flag_fr2_r17_e_"); } - -const char* srs_res_set_s::srs_pwr_ctrl_adjustment_states_opts::to_string() const +uint8_t high_speed_cfg_fr2_r17_s::high_speed_meas_flag_fr2_r17_opts::to_number() const { - static const char* names[] = {"sameAsFci2", "separateClosedLoop"}; - return convert_enum_idx(names, 2, value, "srs_res_set_s::srs_pwr_ctrl_adjustment_states_e_"); + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "high_speed_cfg_fr2_r17_s::high_speed_meas_flag_fr2_r17_e_"); } -uint8_t srs_res_set_s::srs_pwr_ctrl_adjustment_states_opts::to_number() const + +const char* high_speed_cfg_fr2_r17_s::high_speed_deployment_type_fr2_r17_opts::to_string() const { - static const uint8_t numbers[] = {2}; - return map_enum_number(numbers, 1, value, "srs_res_set_s::srs_pwr_ctrl_adjustment_states_e_"); + static const char* names[] = {"unidirectional", "bidirectional"}; + return convert_enum_idx(names, 2, value, "high_speed_cfg_fr2_r17_s::high_speed_deployment_type_fr2_r17_e_"); } -// BeamFailureRecoveryConfig ::= SEQUENCE -SRSASN_CODE beam_fail_recovery_cfg_s::pack(bit_ref& bref) const +// SemiStaticChannelAccessConfig-r16 ::= SEQUENCE +SRSASN_CODE semi_static_ch_access_cfg_r16_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.size() > 0, 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)); - } - 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.size() > 0) { - 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[1] |= ra_prioritization_two_step_r16.is_present(); - group_flags[1] |= candidate_beam_rs_list_ext_v1610.is_present(); - group_flags[2] |= sp_cell_bfr_cbra_r16_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)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(ra_prioritization_two_step_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(candidate_beam_rs_list_ext_v1610.is_present(), 1)); - if (ra_prioritization_two_step_r16.is_present()) { - HANDLE_CODE(ra_prioritization_two_step_r16->pack(bref)); - } - if (candidate_beam_rs_list_ext_v1610.is_present()) { - HANDLE_CODE(candidate_beam_rs_list_ext_v1610->pack(bref)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(period.pack(bref)); - HANDLE_CODE(bref.pack(sp_cell_bfr_cbra_r16_present, 1)); - } - } return SRSASN_SUCCESS; } -SRSASN_CODE beam_fail_recovery_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE semi_static_ch_access_cfg_r16_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)); - bool candidate_beam_rs_list_present; - 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)); - } - 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 (ext) { - 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(msg1_subcarrier_spacing_present, 1)); - if (msg1_subcarrier_spacing_present) { - HANDLE_CODE(msg1_subcarrier_spacing.unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(ra_prioritization_two_step_r16, bref); - unpack_presence_flag(candidate_beam_rs_list_ext_v1610, bref); - if (ra_prioritization_two_step_r16.is_present()) { - HANDLE_CODE(ra_prioritization_two_step_r16->unpack(bref)); - } - if (candidate_beam_rs_list_ext_v1610.is_present()) { - HANDLE_CODE(candidate_beam_rs_list_ext_v1610->unpack(bref)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(period.unpack(bref)); - HANDLE_CODE(bref.unpack(sp_cell_bfr_cbra_r16_present, 1)); - } - } return SRSASN_SUCCESS; } -void beam_fail_recovery_cfg_s::to_json(json_writer& j) const +void semi_static_ch_access_cfg_r16_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.size() > 0) { - 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()); - } - if (ra_prioritization_two_step_r16.is_present()) { - j.write_fieldname("ra-PrioritizationTwoStep-r16"); - ra_prioritization_two_step_r16->to_json(j); - } - if (candidate_beam_rs_list_ext_v1610.is_present()) { - j.write_fieldname("candidateBeamRSListExt-v1610"); - candidate_beam_rs_list_ext_v1610->to_json(j); - } - if (sp_cell_bfr_cbra_r16_present) { - j.write_str("spCell-BFR-CBRA-r16", "true"); - } - } + j.write_str("period", period.to_string()); j.end_obj(); } -const char* beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_string() const -{ - static const char* names[] = {"oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; - return convert_enum_idx(names, 8, value, "beam_fail_recovery_cfg_s::ssb_per_rach_occasion_e_"); -} -float beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_number() const -{ - static const float numbers[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; - return map_enum_number(numbers, 8, value, "beam_fail_recovery_cfg_s::ssb_per_rach_occasion_e_"); -} -const char* beam_fail_recovery_cfg_s::ssb_per_rach_occasion_opts::to_number_string() const +const char* semi_static_ch_access_cfg_r16_s::period_opts::to_string() const { - static const char* number_strs[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; - return convert_enum_idx(number_strs, 8, value, "beam_fail_recovery_cfg_s::ssb_per_rach_occasion_e_"); + static const char* names[] = {"ms1", "ms2", "ms2dot5", "ms4", "ms5", "ms10"}; + return convert_enum_idx(names, 6, value, "semi_static_ch_access_cfg_r16_s::period_e_"); } - -const char* beam_fail_recovery_cfg_s::beam_fail_recovery_timer_opts::to_string() const +float semi_static_ch_access_cfg_r16_s::period_opts::to_number() const { - static const char* names[] = {"ms10", "ms20", "ms40", "ms60", "ms80", "ms100", "ms150", "ms200"}; - return convert_enum_idx(names, 8, value, "beam_fail_recovery_cfg_s::beam_fail_recovery_timer_e_"); + static const float numbers[] = {1.0, 2.0, 2.5, 4.0, 5.0, 10.0}; + return map_enum_number(numbers, 6, value, "semi_static_ch_access_cfg_r16_s::period_e_"); } -uint8_t beam_fail_recovery_cfg_s::beam_fail_recovery_timer_opts::to_number() const +const char* semi_static_ch_access_cfg_r16_s::period_opts::to_number_string() const { - static const uint8_t numbers[] = {10, 20, 40, 60, 80, 100, 150, 200}; - return map_enum_number(numbers, 8, value, "beam_fail_recovery_cfg_s::beam_fail_recovery_timer_e_"); + static const char* number_strs[] = {"1", "2", "2.5", "4", "5", "10"}; + return convert_enum_idx(number_strs, 6, value, "semi_static_ch_access_cfg_r16_s::period_e_"); } -// LBT-FailureRecoveryConfig-r16 ::= SEQUENCE -SRSASN_CODE lbt_fail_recovery_cfg_r16_s::pack(bit_ref& bref) const +// TDD-UL-DL-ConfigCommon ::= SEQUENCE +SRSASN_CODE tdd_ul_dl_cfg_common_s::pack(bit_ref& bref) const { bref.pack(ext, 1); - HANDLE_CODE(lbt_fail_instance_max_count_r16.pack(bref)); - HANDLE_CODE(lbt_fail_detection_timer_r16.pack(bref)); + HANDLE_CODE(bref.pack(pattern2_present, 1)); + + HANDLE_CODE(ref_subcarrier_spacing.pack(bref)); + HANDLE_CODE(pattern1.pack(bref)); + if (pattern2_present) { + HANDLE_CODE(pattern2.pack(bref)); + } return SRSASN_SUCCESS; } -SRSASN_CODE lbt_fail_recovery_cfg_r16_s::unpack(cbit_ref& bref) +SRSASN_CODE tdd_ul_dl_cfg_common_s::unpack(cbit_ref& bref) { bref.unpack(ext, 1); - HANDLE_CODE(lbt_fail_instance_max_count_r16.unpack(bref)); - HANDLE_CODE(lbt_fail_detection_timer_r16.unpack(bref)); + HANDLE_CODE(bref.unpack(pattern2_present, 1)); + + HANDLE_CODE(ref_subcarrier_spacing.unpack(bref)); + HANDLE_CODE(pattern1.unpack(bref)); + if (pattern2_present) { + HANDLE_CODE(pattern2.unpack(bref)); + } return SRSASN_SUCCESS; } -void lbt_fail_recovery_cfg_r16_s::to_json(json_writer& j) const +void tdd_ul_dl_cfg_common_s::to_json(json_writer& j) const { j.start_obj(); - j.write_str("lbt-FailureInstanceMaxCount-r16", lbt_fail_instance_max_count_r16.to_string()); - j.write_str("lbt-FailureDetectionTimer-r16", lbt_fail_detection_timer_r16.to_string()); + j.write_str("referenceSubcarrierSpacing", ref_subcarrier_spacing.to_string()); + j.write_fieldname("pattern1"); + pattern1.to_json(j); + if (pattern2_present) { + j.write_fieldname("pattern2"); + pattern2.to_json(j); + } j.end_obj(); } -const char* lbt_fail_recovery_cfg_r16_s::lbt_fail_instance_max_count_r16_opts::to_string() const +// UplinkConfigCommonSIB ::= SEQUENCE +SRSASN_CODE ul_cfg_common_sib_s::pack(bit_ref& bref) const { - static const char* names[] = {"n4", "n8", "n16", "n32", "n64", "n128"}; - return convert_enum_idx(names, 6, value, "lbt_fail_recovery_cfg_r16_s::lbt_fail_instance_max_count_r16_e_"); + HANDLE_CODE(freq_info_ul.pack(bref)); + HANDLE_CODE(init_ul_bwp.pack(bref)); + HANDLE_CODE(time_align_timer_common.pack(bref)); + + return SRSASN_SUCCESS; } -uint8_t lbt_fail_recovery_cfg_r16_s::lbt_fail_instance_max_count_r16_opts::to_number() const +SRSASN_CODE ul_cfg_common_sib_s::unpack(cbit_ref& bref) { - static const uint8_t numbers[] = {4, 8, 16, 32, 64, 128}; - return map_enum_number(numbers, 6, value, "lbt_fail_recovery_cfg_r16_s::lbt_fail_instance_max_count_r16_e_"); -} + HANDLE_CODE(freq_info_ul.unpack(bref)); + HANDLE_CODE(init_ul_bwp.unpack(bref)); + HANDLE_CODE(time_align_timer_common.unpack(bref)); -const char* lbt_fail_recovery_cfg_r16_s::lbt_fail_detection_timer_r16_opts::to_string() const -{ - static const char* names[] = {"ms10", "ms20", "ms40", "ms80", "ms160", "ms320"}; - return convert_enum_idx(names, 6, value, "lbt_fail_recovery_cfg_r16_s::lbt_fail_detection_timer_r16_e_"); + return SRSASN_SUCCESS; } -uint16_t lbt_fail_recovery_cfg_r16_s::lbt_fail_detection_timer_r16_opts::to_number() const +void ul_cfg_common_sib_s::to_json(json_writer& j) const { - static const uint16_t numbers[] = {10, 20, 40, 80, 160, 320}; - return map_enum_number(numbers, 6, value, "lbt_fail_recovery_cfg_r16_s::lbt_fail_detection_timer_r16_e_"); + j.start_obj(); + j.write_fieldname("frequencyInfoUL"); + freq_info_ul.to_json(j); + j.write_fieldname("initialUplinkBWP"); + init_ul_bwp.to_json(j); + j.write_str("timeAlignmentTimerCommon", time_align_timer_common.to_string()); + j.end_obj(); } -// PUSCH-Config ::= SEQUENCE -SRSASN_CODE pusch_cfg_s::pack(bit_ref& bref) const +// UplinkConfigCommonSIB-v1700 ::= SEQUENCE +SRSASN_CODE ul_cfg_common_sib_v1700_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.size() > 0, 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(init_ul_bwp_red_cap_r17_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 (freq_hop_offset_lists.size() > 0) { - 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 (init_ul_bwp_red_cap_r17_present) { + HANDLE_CODE(init_ul_bwp_red_cap_r17.pack(bref)); } - if (pusch_aggregation_factor_present) { - HANDLE_CODE(pusch_aggregation_factor.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_cfg_common_sib_v1700_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(init_ul_bwp_red_cap_r17_present, 1)); + + if (init_ul_bwp_red_cap_r17_present) { + HANDLE_CODE(init_ul_bwp_red_cap_r17.unpack(bref)); } - if (mcs_table_present) { - HANDLE_CODE(mcs_table.pack(bref)); + + return SRSASN_SUCCESS; +} +void ul_cfg_common_sib_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (init_ul_bwp_red_cap_r17_present) { + j.write_fieldname("initialUplinkBWP-RedCap-r17"); + init_ul_bwp_red_cap_r17.to_json(j); } - if (mcs_table_transform_precoder_present) { - HANDLE_CODE(mcs_table_transform_precoder.pack(bref)); + j.end_obj(); +} + +// ServingCellConfigCommonSIB ::= SEQUENCE +SRSASN_CODE serving_cell_cfg_common_sib_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ul_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(supplementary_ul_present, 1)); + HANDLE_CODE(bref.pack(n_timing_advance_offset_present, 1)); + HANDLE_CODE(bref.pack(tdd_ul_dl_cfg_common_present, 1)); + + HANDLE_CODE(dl_cfg_common.pack(bref)); + if (ul_cfg_common_present) { + HANDLE_CODE(ul_cfg_common.pack(bref)); } - if (transform_precoder_present) { - HANDLE_CODE(transform_precoder.pack(bref)); + if (supplementary_ul_present) { + HANDLE_CODE(supplementary_ul.pack(bref)); } - if (codebook_subset_present) { - HANDLE_CODE(codebook_subset.pack(bref)); + if (n_timing_advance_offset_present) { + HANDLE_CODE(n_timing_advance_offset.pack(bref)); } - if (max_rank_present) { - HANDLE_CODE(pack_integer(bref, max_rank, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(bref.pack(ssb_positions_in_burst.group_presence_present, 1)); + HANDLE_CODE(ssb_positions_in_burst.in_one_group.pack(bref)); + if (ssb_positions_in_burst.group_presence_present) { + HANDLE_CODE(ssb_positions_in_burst.group_presence.pack(bref)); } - if (uci_on_pusch_present) { - HANDLE_CODE(uci_on_pusch.pack(bref)); + HANDLE_CODE(ssb_periodicity_serving_cell.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)); if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= minimum_sched_offset_k2_r16.is_present(); - group_flags[0] |= ul_access_cfg_list_dci_0_1_r16.is_present(); - group_flags[0] |= harq_process_num_size_dci_0_2_r16_present; - group_flags[0] |= dmrs_seq_initization_dci_0_2_r16_present; - group_flags[0] |= nof_bits_for_rv_dci_0_2_r16_present; - group_flags[0] |= ant_ports_field_presence_dci_0_2_r16_present; - group_flags[0] |= dmrs_ul_for_pusch_map_type_a_dci_0_2_r16.is_present(); - group_flags[0] |= dmrs_ul_for_pusch_map_type_b_dci_0_2_r16.is_present(); - group_flags[0] |= freq_hop_dci_0_2_r16.is_present(); - group_flags[0] |= freq_hop_offset_lists_dci_0_2_r16.is_present(); - group_flags[0] |= codebook_subset_dci_0_2_r16_present; - group_flags[0] |= invalid_symbol_pattern_ind_dci_0_2_r16_present; - group_flags[0] |= max_rank_dci_0_2_r16_present; - group_flags[0] |= mcs_table_dci_0_2_r16_present; - group_flags[0] |= mcs_table_transform_precoder_dci_0_2_r16_present; - group_flags[0] |= prio_ind_dci_0_2_r16_present; - group_flags[0] |= pusch_rep_type_ind_dci_0_2_r16_present; - group_flags[0] |= res_alloc_dci_0_2_r16_present; - group_flags[0] |= res_alloc_type1_granularity_dci_0_2_r16_present; - group_flags[0] |= uci_on_pusch_list_dci_0_2_r16.is_present(); - group_flags[0] |= pusch_time_domain_alloc_list_dci_0_2_r16.is_present(); - group_flags[0] |= pusch_time_domain_alloc_list_dci_0_1_r16.is_present(); - group_flags[0] |= invalid_symbol_pattern_ind_dci_0_1_r16_present; - group_flags[0] |= prio_ind_dci_0_1_r16_present; - group_flags[0] |= pusch_rep_type_ind_dci_0_1_r16_present; - group_flags[0] |= freq_hop_dci_0_1_r16_present; - group_flags[0] |= uci_on_pusch_list_dci_0_1_r16.is_present(); - group_flags[0] |= invalid_symbol_pattern_r16.is_present(); - group_flags[0] |= pusch_pwr_ctrl_v1610.is_present(); - group_flags[0] |= ul_full_pwr_tx_r16_present; - group_flags[0] |= pusch_time_domain_alloc_list_for_multi_pusch_r16.is_present(); - group_flags[0] |= nof_invalid_symbols_for_dl_ul_switching_r16_present; - group_flags[1] |= ul_access_cfg_list_dci_0_2_r17.is_present(); - group_flags[1] |= beta_offsets_cross_pri0_r17.is_present(); - group_flags[1] |= beta_offsets_cross_pri1_r17.is_present(); - group_flags[1] |= beta_offsets_cross_pri0_dci_0_2_r17.is_present(); - group_flags[1] |= beta_offsets_cross_pri1_dci_0_2_r17.is_present(); - group_flags[1] |= map_pattern_r17_present; - group_flags[1] |= second_tpc_field_dci_0_1_r17_present; - group_flags[1] |= second_tpc_field_dci_0_2_r17_present; - group_flags[1] |= seq_offset_for_rv_r17_present; - group_flags[1] |= ul_access_cfg_list_dci_0_1_r17.is_present(); - group_flags[1] |= minimum_sched_offset_k2_r17.is_present(); - group_flags[1] |= available_slot_count_r17_present; - group_flags[1] |= dmrs_bundling_pusch_cfg_r17.is_present(); - group_flags[1] |= harq_process_num_size_dci_0_2_v1700_present; - group_flags[1] |= harq_process_num_size_dci_0_1_r17_present; - group_flags[1] |= mpe_res_pool_to_add_mod_list_r17.is_present(); - group_flags[1] |= mpe_res_pool_to_release_list_r17.is_present(); + group_flags[0] |= ch_access_mode_r16.is_present(); + group_flags[0] |= discovery_burst_win_len_r16_present; + group_flags[0] |= high_speed_cfg_r16.is_present(); + group_flags[1] |= ch_access_mode2_r17_present; + group_flags[1] |= discovery_burst_win_len_v1700_present; + group_flags[1] |= high_speed_cfg_fr2_r17.is_present(); + group_flags[1] |= ul_cfg_common_v1700.is_present(); + group_flags[2] |= enhanced_meas_leo_r17_present; + group_flags[3] |= ra_ch_access_r17_present; group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(minimum_sched_offset_k2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(ul_access_cfg_list_dci_0_1_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(harq_process_num_size_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(dmrs_seq_initization_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(nof_bits_for_rv_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(ant_ports_field_presence_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(dmrs_ul_for_pusch_map_type_a_dci_0_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(dmrs_ul_for_pusch_map_type_b_dci_0_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(freq_hop_dci_0_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(freq_hop_offset_lists_dci_0_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(codebook_subset_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(invalid_symbol_pattern_ind_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(max_rank_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(mcs_table_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(mcs_table_transform_precoder_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(prio_ind_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(pusch_rep_type_ind_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(res_alloc_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(res_alloc_type1_granularity_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(uci_on_pusch_list_dci_0_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(pusch_time_domain_alloc_list_dci_0_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(pusch_time_domain_alloc_list_dci_0_1_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(invalid_symbol_pattern_ind_dci_0_1_r16_present, 1)); - HANDLE_CODE(bref.pack(prio_ind_dci_0_1_r16_present, 1)); - HANDLE_CODE(bref.pack(pusch_rep_type_ind_dci_0_1_r16_present, 1)); - HANDLE_CODE(bref.pack(freq_hop_dci_0_1_r16_present, 1)); - HANDLE_CODE(bref.pack(uci_on_pusch_list_dci_0_1_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(invalid_symbol_pattern_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(pusch_pwr_ctrl_v1610.is_present(), 1)); - HANDLE_CODE(bref.pack(ul_full_pwr_tx_r16_present, 1)); - HANDLE_CODE(bref.pack(pusch_time_domain_alloc_list_for_multi_pusch_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(nof_invalid_symbols_for_dl_ul_switching_r16_present, 1)); - if (minimum_sched_offset_k2_r16.is_present()) { - HANDLE_CODE(minimum_sched_offset_k2_r16->pack(bref)); - } - if (ul_access_cfg_list_dci_0_1_r16.is_present()) { - HANDLE_CODE(ul_access_cfg_list_dci_0_1_r16->pack(bref)); - } - if (harq_process_num_size_dci_0_2_r16_present) { - HANDLE_CODE(pack_integer(bref, harq_process_num_size_dci_0_2_r16, (uint8_t)0u, (uint8_t)4u)); - } - if (nof_bits_for_rv_dci_0_2_r16_present) { - HANDLE_CODE(pack_integer(bref, nof_bits_for_rv_dci_0_2_r16, (uint8_t)0u, (uint8_t)2u)); - } - if (dmrs_ul_for_pusch_map_type_a_dci_0_2_r16.is_present()) { - HANDLE_CODE(dmrs_ul_for_pusch_map_type_a_dci_0_2_r16->pack(bref)); - } - if (dmrs_ul_for_pusch_map_type_b_dci_0_2_r16.is_present()) { - HANDLE_CODE(dmrs_ul_for_pusch_map_type_b_dci_0_2_r16->pack(bref)); - } - if (freq_hop_dci_0_2_r16.is_present()) { - HANDLE_CODE(freq_hop_dci_0_2_r16->pack(bref)); - } - if (freq_hop_offset_lists_dci_0_2_r16.is_present()) { - HANDLE_CODE(freq_hop_offset_lists_dci_0_2_r16->pack(bref)); - } - if (codebook_subset_dci_0_2_r16_present) { - HANDLE_CODE(codebook_subset_dci_0_2_r16.pack(bref)); - } - if (max_rank_dci_0_2_r16_present) { - HANDLE_CODE(pack_integer(bref, max_rank_dci_0_2_r16, (uint8_t)1u, (uint8_t)4u)); - } - if (mcs_table_dci_0_2_r16_present) { - HANDLE_CODE(mcs_table_dci_0_2_r16.pack(bref)); - } - if (mcs_table_transform_precoder_dci_0_2_r16_present) { - HANDLE_CODE(mcs_table_transform_precoder_dci_0_2_r16.pack(bref)); - } - if (pusch_rep_type_ind_dci_0_2_r16_present) { - HANDLE_CODE(pusch_rep_type_ind_dci_0_2_r16.pack(bref)); - } - if (res_alloc_dci_0_2_r16_present) { - HANDLE_CODE(res_alloc_dci_0_2_r16.pack(bref)); - } - if (res_alloc_type1_granularity_dci_0_2_r16_present) { - HANDLE_CODE(res_alloc_type1_granularity_dci_0_2_r16.pack(bref)); - } - if (uci_on_pusch_list_dci_0_2_r16.is_present()) { - HANDLE_CODE(uci_on_pusch_list_dci_0_2_r16->pack(bref)); - } - if (pusch_time_domain_alloc_list_dci_0_2_r16.is_present()) { - HANDLE_CODE(pusch_time_domain_alloc_list_dci_0_2_r16->pack(bref)); - } - if (pusch_time_domain_alloc_list_dci_0_1_r16.is_present()) { - HANDLE_CODE(pusch_time_domain_alloc_list_dci_0_1_r16->pack(bref)); - } - if (pusch_rep_type_ind_dci_0_1_r16_present) { - HANDLE_CODE(pusch_rep_type_ind_dci_0_1_r16.pack(bref)); - } - if (freq_hop_dci_0_1_r16_present) { - HANDLE_CODE(freq_hop_dci_0_1_r16.pack(bref)); - } - if (uci_on_pusch_list_dci_0_1_r16.is_present()) { - HANDLE_CODE(uci_on_pusch_list_dci_0_1_r16->pack(bref)); - } - if (invalid_symbol_pattern_r16.is_present()) { - HANDLE_CODE(invalid_symbol_pattern_r16->pack(bref)); - } - if (pusch_pwr_ctrl_v1610.is_present()) { - HANDLE_CODE(pusch_pwr_ctrl_v1610->pack(bref)); - } - if (ul_full_pwr_tx_r16_present) { - HANDLE_CODE(ul_full_pwr_tx_r16.pack(bref)); + HANDLE_CODE(bref.pack(ch_access_mode_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(discovery_burst_win_len_r16_present, 1)); + HANDLE_CODE(bref.pack(high_speed_cfg_r16.is_present(), 1)); + if (ch_access_mode_r16.is_present()) { + HANDLE_CODE(ch_access_mode_r16->pack(bref)); } - if (pusch_time_domain_alloc_list_for_multi_pusch_r16.is_present()) { - HANDLE_CODE(pusch_time_domain_alloc_list_for_multi_pusch_r16->pack(bref)); + if (discovery_burst_win_len_r16_present) { + HANDLE_CODE(discovery_burst_win_len_r16.pack(bref)); } - if (nof_invalid_symbols_for_dl_ul_switching_r16_present) { - HANDLE_CODE(pack_integer(bref, nof_invalid_symbols_for_dl_ul_switching_r16, (uint8_t)1u, (uint8_t)4u)); + if (high_speed_cfg_r16.is_present()) { + HANDLE_CODE(high_speed_cfg_r16->pack(bref)); } } if (group_flags[1]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(ul_access_cfg_list_dci_0_2_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(beta_offsets_cross_pri0_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(beta_offsets_cross_pri1_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(beta_offsets_cross_pri0_dci_0_2_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(beta_offsets_cross_pri1_dci_0_2_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(map_pattern_r17_present, 1)); - HANDLE_CODE(bref.pack(second_tpc_field_dci_0_1_r17_present, 1)); - HANDLE_CODE(bref.pack(second_tpc_field_dci_0_2_r17_present, 1)); - HANDLE_CODE(bref.pack(seq_offset_for_rv_r17_present, 1)); - HANDLE_CODE(bref.pack(ul_access_cfg_list_dci_0_1_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(minimum_sched_offset_k2_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(available_slot_count_r17_present, 1)); - HANDLE_CODE(bref.pack(dmrs_bundling_pusch_cfg_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(harq_process_num_size_dci_0_2_v1700_present, 1)); - HANDLE_CODE(bref.pack(harq_process_num_size_dci_0_1_r17_present, 1)); - HANDLE_CODE(bref.pack(mpe_res_pool_to_add_mod_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(mpe_res_pool_to_release_list_r17.is_present(), 1)); - if (ul_access_cfg_list_dci_0_2_r17.is_present()) { - HANDLE_CODE(ul_access_cfg_list_dci_0_2_r17->pack(bref)); - } - if (beta_offsets_cross_pri0_r17.is_present()) { - HANDLE_CODE(beta_offsets_cross_pri0_r17->pack(bref)); - } - if (beta_offsets_cross_pri1_r17.is_present()) { - HANDLE_CODE(beta_offsets_cross_pri1_r17->pack(bref)); - } - if (beta_offsets_cross_pri0_dci_0_2_r17.is_present()) { - HANDLE_CODE(beta_offsets_cross_pri0_dci_0_2_r17->pack(bref)); - } - if (beta_offsets_cross_pri1_dci_0_2_r17.is_present()) { - HANDLE_CODE(beta_offsets_cross_pri1_dci_0_2_r17->pack(bref)); - } - if (map_pattern_r17_present) { - HANDLE_CODE(map_pattern_r17.pack(bref)); - } - if (seq_offset_for_rv_r17_present) { - HANDLE_CODE(pack_integer(bref, seq_offset_for_rv_r17, (uint8_t)0u, (uint8_t)3u)); - } - if (ul_access_cfg_list_dci_0_1_r17.is_present()) { - HANDLE_CODE(ul_access_cfg_list_dci_0_1_r17->pack(bref)); - } - if (minimum_sched_offset_k2_r17.is_present()) { - HANDLE_CODE(minimum_sched_offset_k2_r17->pack(bref)); - } - if (dmrs_bundling_pusch_cfg_r17.is_present()) { - HANDLE_CODE(dmrs_bundling_pusch_cfg_r17->pack(bref)); - } - if (harq_process_num_size_dci_0_2_v1700_present) { - HANDLE_CODE(pack_integer(bref, harq_process_num_size_dci_0_2_v1700, (uint8_t)5u, (uint8_t)5u)); - } - if (harq_process_num_size_dci_0_1_r17_present) { - HANDLE_CODE(pack_integer(bref, harq_process_num_size_dci_0_1_r17, (uint8_t)5u, (uint8_t)5u)); + HANDLE_CODE(bref.pack(ch_access_mode2_r17_present, 1)); + HANDLE_CODE(bref.pack(discovery_burst_win_len_v1700_present, 1)); + HANDLE_CODE(bref.pack(high_speed_cfg_fr2_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(ul_cfg_common_v1700.is_present(), 1)); + if (discovery_burst_win_len_v1700_present) { + HANDLE_CODE(discovery_burst_win_len_v1700.pack(bref)); } - if (mpe_res_pool_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *mpe_res_pool_to_add_mod_list_r17, 1, 64)); + if (high_speed_cfg_fr2_r17.is_present()) { + HANDLE_CODE(high_speed_cfg_fr2_r17->pack(bref)); } - if (mpe_res_pool_to_release_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *mpe_res_pool_to_release_list_r17, 1, 64, integer_packer(1, 64))); + if (ul_cfg_common_v1700.is_present()) { + HANDLE_CODE(ul_cfg_common_v1700->pack(bref)); } } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(enhanced_meas_leo_r17_present, 1)); + } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ra_ch_access_r17_present, 1)); + } } return SRSASN_SUCCESS; } -SRSASN_CODE pusch_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE serving_cell_cfg_common_sib_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)); - bool freq_hop_offset_lists_present; - 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(ul_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(supplementary_ul_present, 1)); + HANDLE_CODE(bref.unpack(n_timing_advance_offset_present, 1)); + HANDLE_CODE(bref.unpack(tdd_ul_dl_cfg_common_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 (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)); + HANDLE_CODE(dl_cfg_common.unpack(bref)); + if (ul_cfg_common_present) { + HANDLE_CODE(ul_cfg_common.unpack(bref)); } - if (transform_precoder_present) { - HANDLE_CODE(transform_precoder.unpack(bref)); + if (supplementary_ul_present) { + HANDLE_CODE(supplementary_ul.unpack(bref)); } - if (codebook_subset_present) { - HANDLE_CODE(codebook_subset.unpack(bref)); + if (n_timing_advance_offset_present) { + HANDLE_CODE(n_timing_advance_offset.unpack(bref)); } - if (max_rank_present) { - HANDLE_CODE(unpack_integer(max_rank, bref, (uint8_t)1u, (uint8_t)4u)); + HANDLE_CODE(bref.unpack(ssb_positions_in_burst.group_presence_present, 1)); + HANDLE_CODE(ssb_positions_in_burst.in_one_group.unpack(bref)); + if (ssb_positions_in_burst.group_presence_present) { + HANDLE_CODE(ssb_positions_in_burst.group_presence.unpack(bref)); } - if (uci_on_pusch_present) { - HANDLE_CODE(uci_on_pusch.unpack(bref)); + HANDLE_CODE(ssb_periodicity_serving_cell.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)); if (ext) { - ext_groups_unpacker_guard group_flags(2); + ext_groups_unpacker_guard group_flags(4); group_flags.unpack(bref); if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - unpack_presence_flag(minimum_sched_offset_k2_r16, bref); - unpack_presence_flag(ul_access_cfg_list_dci_0_1_r16, bref); - HANDLE_CODE(bref.unpack(harq_process_num_size_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(dmrs_seq_initization_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(nof_bits_for_rv_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(ant_ports_field_presence_dci_0_2_r16_present, 1)); - unpack_presence_flag(dmrs_ul_for_pusch_map_type_a_dci_0_2_r16, bref); - unpack_presence_flag(dmrs_ul_for_pusch_map_type_b_dci_0_2_r16, bref); - unpack_presence_flag(freq_hop_dci_0_2_r16, bref); - unpack_presence_flag(freq_hop_offset_lists_dci_0_2_r16, bref); - HANDLE_CODE(bref.unpack(codebook_subset_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(invalid_symbol_pattern_ind_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(max_rank_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(mcs_table_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(mcs_table_transform_precoder_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(prio_ind_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(pusch_rep_type_ind_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(res_alloc_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(res_alloc_type1_granularity_dci_0_2_r16_present, 1)); - unpack_presence_flag(uci_on_pusch_list_dci_0_2_r16, bref); - unpack_presence_flag(pusch_time_domain_alloc_list_dci_0_2_r16, bref); - unpack_presence_flag(pusch_time_domain_alloc_list_dci_0_1_r16, bref); - HANDLE_CODE(bref.unpack(invalid_symbol_pattern_ind_dci_0_1_r16_present, 1)); - HANDLE_CODE(bref.unpack(prio_ind_dci_0_1_r16_present, 1)); - HANDLE_CODE(bref.unpack(pusch_rep_type_ind_dci_0_1_r16_present, 1)); - HANDLE_CODE(bref.unpack(freq_hop_dci_0_1_r16_present, 1)); - unpack_presence_flag(uci_on_pusch_list_dci_0_1_r16, bref); - unpack_presence_flag(invalid_symbol_pattern_r16, bref); - unpack_presence_flag(pusch_pwr_ctrl_v1610, bref); - HANDLE_CODE(bref.unpack(ul_full_pwr_tx_r16_present, 1)); - unpack_presence_flag(pusch_time_domain_alloc_list_for_multi_pusch_r16, bref); - HANDLE_CODE(bref.unpack(nof_invalid_symbols_for_dl_ul_switching_r16_present, 1)); - if (minimum_sched_offset_k2_r16.is_present()) { - HANDLE_CODE(minimum_sched_offset_k2_r16->unpack(bref)); - } - if (ul_access_cfg_list_dci_0_1_r16.is_present()) { - HANDLE_CODE(ul_access_cfg_list_dci_0_1_r16->unpack(bref)); - } - if (harq_process_num_size_dci_0_2_r16_present) { - HANDLE_CODE(unpack_integer(harq_process_num_size_dci_0_2_r16, bref, (uint8_t)0u, (uint8_t)4u)); - } - if (nof_bits_for_rv_dci_0_2_r16_present) { - HANDLE_CODE(unpack_integer(nof_bits_for_rv_dci_0_2_r16, bref, (uint8_t)0u, (uint8_t)2u)); - } - if (dmrs_ul_for_pusch_map_type_a_dci_0_2_r16.is_present()) { - HANDLE_CODE(dmrs_ul_for_pusch_map_type_a_dci_0_2_r16->unpack(bref)); - } - if (dmrs_ul_for_pusch_map_type_b_dci_0_2_r16.is_present()) { - HANDLE_CODE(dmrs_ul_for_pusch_map_type_b_dci_0_2_r16->unpack(bref)); - } - if (freq_hop_dci_0_2_r16.is_present()) { - HANDLE_CODE(freq_hop_dci_0_2_r16->unpack(bref)); - } - if (freq_hop_offset_lists_dci_0_2_r16.is_present()) { - HANDLE_CODE(freq_hop_offset_lists_dci_0_2_r16->unpack(bref)); - } - if (codebook_subset_dci_0_2_r16_present) { - HANDLE_CODE(codebook_subset_dci_0_2_r16.unpack(bref)); - } - if (max_rank_dci_0_2_r16_present) { - HANDLE_CODE(unpack_integer(max_rank_dci_0_2_r16, bref, (uint8_t)1u, (uint8_t)4u)); - } - if (mcs_table_dci_0_2_r16_present) { - HANDLE_CODE(mcs_table_dci_0_2_r16.unpack(bref)); - } - if (mcs_table_transform_precoder_dci_0_2_r16_present) { - HANDLE_CODE(mcs_table_transform_precoder_dci_0_2_r16.unpack(bref)); - } - if (pusch_rep_type_ind_dci_0_2_r16_present) { - HANDLE_CODE(pusch_rep_type_ind_dci_0_2_r16.unpack(bref)); - } - if (res_alloc_dci_0_2_r16_present) { - HANDLE_CODE(res_alloc_dci_0_2_r16.unpack(bref)); - } - if (res_alloc_type1_granularity_dci_0_2_r16_present) { - HANDLE_CODE(res_alloc_type1_granularity_dci_0_2_r16.unpack(bref)); - } - if (uci_on_pusch_list_dci_0_2_r16.is_present()) { - HANDLE_CODE(uci_on_pusch_list_dci_0_2_r16->unpack(bref)); - } - if (pusch_time_domain_alloc_list_dci_0_2_r16.is_present()) { - HANDLE_CODE(pusch_time_domain_alloc_list_dci_0_2_r16->unpack(bref)); - } - if (pusch_time_domain_alloc_list_dci_0_1_r16.is_present()) { - HANDLE_CODE(pusch_time_domain_alloc_list_dci_0_1_r16->unpack(bref)); - } - if (pusch_rep_type_ind_dci_0_1_r16_present) { - HANDLE_CODE(pusch_rep_type_ind_dci_0_1_r16.unpack(bref)); - } - if (freq_hop_dci_0_1_r16_present) { - HANDLE_CODE(freq_hop_dci_0_1_r16.unpack(bref)); - } - if (uci_on_pusch_list_dci_0_1_r16.is_present()) { - HANDLE_CODE(uci_on_pusch_list_dci_0_1_r16->unpack(bref)); - } - if (invalid_symbol_pattern_r16.is_present()) { - HANDLE_CODE(invalid_symbol_pattern_r16->unpack(bref)); - } - if (pusch_pwr_ctrl_v1610.is_present()) { - HANDLE_CODE(pusch_pwr_ctrl_v1610->unpack(bref)); - } - if (ul_full_pwr_tx_r16_present) { - HANDLE_CODE(ul_full_pwr_tx_r16.unpack(bref)); + unpack_presence_flag(ch_access_mode_r16, bref); + HANDLE_CODE(bref.unpack(discovery_burst_win_len_r16_present, 1)); + unpack_presence_flag(high_speed_cfg_r16, bref); + if (ch_access_mode_r16.is_present()) { + HANDLE_CODE(ch_access_mode_r16->unpack(bref)); } - if (pusch_time_domain_alloc_list_for_multi_pusch_r16.is_present()) { - HANDLE_CODE(pusch_time_domain_alloc_list_for_multi_pusch_r16->unpack(bref)); + if (discovery_burst_win_len_r16_present) { + HANDLE_CODE(discovery_burst_win_len_r16.unpack(bref)); } - if (nof_invalid_symbols_for_dl_ul_switching_r16_present) { - HANDLE_CODE(unpack_integer(nof_invalid_symbols_for_dl_ul_switching_r16, bref, (uint8_t)1u, (uint8_t)4u)); + if (high_speed_cfg_r16.is_present()) { + HANDLE_CODE(high_speed_cfg_r16->unpack(bref)); } } if (group_flags[1]) { varlength_field_unpack_guard varlen_scope(bref, false); - unpack_presence_flag(ul_access_cfg_list_dci_0_2_r17, bref); - unpack_presence_flag(beta_offsets_cross_pri0_r17, bref); - unpack_presence_flag(beta_offsets_cross_pri1_r17, bref); - unpack_presence_flag(beta_offsets_cross_pri0_dci_0_2_r17, bref); - unpack_presence_flag(beta_offsets_cross_pri1_dci_0_2_r17, bref); - HANDLE_CODE(bref.unpack(map_pattern_r17_present, 1)); - HANDLE_CODE(bref.unpack(second_tpc_field_dci_0_1_r17_present, 1)); - HANDLE_CODE(bref.unpack(second_tpc_field_dci_0_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(seq_offset_for_rv_r17_present, 1)); - unpack_presence_flag(ul_access_cfg_list_dci_0_1_r17, bref); - unpack_presence_flag(minimum_sched_offset_k2_r17, bref); - HANDLE_CODE(bref.unpack(available_slot_count_r17_present, 1)); - unpack_presence_flag(dmrs_bundling_pusch_cfg_r17, bref); - HANDLE_CODE(bref.unpack(harq_process_num_size_dci_0_2_v1700_present, 1)); - HANDLE_CODE(bref.unpack(harq_process_num_size_dci_0_1_r17_present, 1)); - unpack_presence_flag(mpe_res_pool_to_add_mod_list_r17, bref); - unpack_presence_flag(mpe_res_pool_to_release_list_r17, bref); - if (ul_access_cfg_list_dci_0_2_r17.is_present()) { - HANDLE_CODE(ul_access_cfg_list_dci_0_2_r17->unpack(bref)); - } - if (beta_offsets_cross_pri0_r17.is_present()) { - HANDLE_CODE(beta_offsets_cross_pri0_r17->unpack(bref)); - } - if (beta_offsets_cross_pri1_r17.is_present()) { - HANDLE_CODE(beta_offsets_cross_pri1_r17->unpack(bref)); - } - if (beta_offsets_cross_pri0_dci_0_2_r17.is_present()) { - HANDLE_CODE(beta_offsets_cross_pri0_dci_0_2_r17->unpack(bref)); - } - if (beta_offsets_cross_pri1_dci_0_2_r17.is_present()) { - HANDLE_CODE(beta_offsets_cross_pri1_dci_0_2_r17->unpack(bref)); - } - if (map_pattern_r17_present) { - HANDLE_CODE(map_pattern_r17.unpack(bref)); - } - if (seq_offset_for_rv_r17_present) { - HANDLE_CODE(unpack_integer(seq_offset_for_rv_r17, bref, (uint8_t)0u, (uint8_t)3u)); - } - if (ul_access_cfg_list_dci_0_1_r17.is_present()) { - HANDLE_CODE(ul_access_cfg_list_dci_0_1_r17->unpack(bref)); - } - if (minimum_sched_offset_k2_r17.is_present()) { - HANDLE_CODE(minimum_sched_offset_k2_r17->unpack(bref)); - } - if (dmrs_bundling_pusch_cfg_r17.is_present()) { - HANDLE_CODE(dmrs_bundling_pusch_cfg_r17->unpack(bref)); - } - if (harq_process_num_size_dci_0_2_v1700_present) { - HANDLE_CODE(unpack_integer(harq_process_num_size_dci_0_2_v1700, bref, (uint8_t)5u, (uint8_t)5u)); - } - if (harq_process_num_size_dci_0_1_r17_present) { - HANDLE_CODE(unpack_integer(harq_process_num_size_dci_0_1_r17, bref, (uint8_t)5u, (uint8_t)5u)); + HANDLE_CODE(bref.unpack(ch_access_mode2_r17_present, 1)); + HANDLE_CODE(bref.unpack(discovery_burst_win_len_v1700_present, 1)); + unpack_presence_flag(high_speed_cfg_fr2_r17, bref); + unpack_presence_flag(ul_cfg_common_v1700, bref); + if (discovery_burst_win_len_v1700_present) { + HANDLE_CODE(discovery_burst_win_len_v1700.unpack(bref)); } - if (mpe_res_pool_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*mpe_res_pool_to_add_mod_list_r17, bref, 1, 64)); + if (high_speed_cfg_fr2_r17.is_present()) { + HANDLE_CODE(high_speed_cfg_fr2_r17->unpack(bref)); } - if (mpe_res_pool_to_release_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*mpe_res_pool_to_release_list_r17, bref, 1, 64, integer_packer(1, 64))); + if (ul_cfg_common_v1700.is_present()) { + HANDLE_CODE(ul_cfg_common_v1700->unpack(bref)); } } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(enhanced_meas_leo_r17_present, 1)); + } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(ra_ch_access_r17_present, 1)); + } } return SRSASN_SUCCESS; } -void pusch_cfg_s::to_json(json_writer& j) const +void serving_cell_cfg_common_sib_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.size() > 0) { - 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"); - } - if (ext) { - if (minimum_sched_offset_k2_r16.is_present()) { - j.write_fieldname("minimumSchedulingOffsetK2-r16"); - minimum_sched_offset_k2_r16->to_json(j); - } - if (ul_access_cfg_list_dci_0_1_r16.is_present()) { - j.write_fieldname("ul-AccessConfigListDCI-0-1-r16"); - ul_access_cfg_list_dci_0_1_r16->to_json(j); - } - if (harq_process_num_size_dci_0_2_r16_present) { - j.write_int("harq-ProcessNumberSizeDCI-0-2-r16", harq_process_num_size_dci_0_2_r16); - } - if (dmrs_seq_initization_dci_0_2_r16_present) { - j.write_str("dmrs-SequenceInitializationDCI-0-2-r16", "enabled"); - } - if (nof_bits_for_rv_dci_0_2_r16_present) { - j.write_int("numberOfBitsForRV-DCI-0-2-r16", nof_bits_for_rv_dci_0_2_r16); - } - if (ant_ports_field_presence_dci_0_2_r16_present) { - j.write_str("antennaPortsFieldPresenceDCI-0-2-r16", "enabled"); - } - if (dmrs_ul_for_pusch_map_type_a_dci_0_2_r16.is_present()) { - j.write_fieldname("dmrs-UplinkForPUSCH-MappingTypeA-DCI-0-2-r16"); - dmrs_ul_for_pusch_map_type_a_dci_0_2_r16->to_json(j); - } - if (dmrs_ul_for_pusch_map_type_b_dci_0_2_r16.is_present()) { - j.write_fieldname("dmrs-UplinkForPUSCH-MappingTypeB-DCI-0-2-r16"); - dmrs_ul_for_pusch_map_type_b_dci_0_2_r16->to_json(j); - } - if (freq_hop_dci_0_2_r16.is_present()) { - j.write_fieldname("frequencyHoppingDCI-0-2-r16"); - freq_hop_dci_0_2_r16->to_json(j); - } - if (freq_hop_offset_lists_dci_0_2_r16.is_present()) { - j.write_fieldname("frequencyHoppingOffsetListsDCI-0-2-r16"); - freq_hop_offset_lists_dci_0_2_r16->to_json(j); - } - if (codebook_subset_dci_0_2_r16_present) { - j.write_str("codebookSubsetDCI-0-2-r16", codebook_subset_dci_0_2_r16.to_string()); - } - if (invalid_symbol_pattern_ind_dci_0_2_r16_present) { - j.write_str("invalidSymbolPatternIndicatorDCI-0-2-r16", "enabled"); - } - if (max_rank_dci_0_2_r16_present) { - j.write_int("maxRankDCI-0-2-r16", max_rank_dci_0_2_r16); - } - if (mcs_table_dci_0_2_r16_present) { - j.write_str("mcs-TableDCI-0-2-r16", mcs_table_dci_0_2_r16.to_string()); - } - if (mcs_table_transform_precoder_dci_0_2_r16_present) { - j.write_str("mcs-TableTransformPrecoderDCI-0-2-r16", mcs_table_transform_precoder_dci_0_2_r16.to_string()); - } - if (prio_ind_dci_0_2_r16_present) { - j.write_str("priorityIndicatorDCI-0-2-r16", "enabled"); - } - if (pusch_rep_type_ind_dci_0_2_r16_present) { - j.write_str("pusch-RepTypeIndicatorDCI-0-2-r16", pusch_rep_type_ind_dci_0_2_r16.to_string()); - } - if (res_alloc_dci_0_2_r16_present) { - j.write_str("resourceAllocationDCI-0-2-r16", res_alloc_dci_0_2_r16.to_string()); - } - if (res_alloc_type1_granularity_dci_0_2_r16_present) { - j.write_str("resourceAllocationType1GranularityDCI-0-2-r16", res_alloc_type1_granularity_dci_0_2_r16.to_string()); - } - if (uci_on_pusch_list_dci_0_2_r16.is_present()) { - j.write_fieldname("uci-OnPUSCH-ListDCI-0-2-r16"); - uci_on_pusch_list_dci_0_2_r16->to_json(j); - } - if (pusch_time_domain_alloc_list_dci_0_2_r16.is_present()) { - j.write_fieldname("pusch-TimeDomainAllocationListDCI-0-2-r16"); - pusch_time_domain_alloc_list_dci_0_2_r16->to_json(j); - } - if (pusch_time_domain_alloc_list_dci_0_1_r16.is_present()) { - j.write_fieldname("pusch-TimeDomainAllocationListDCI-0-1-r16"); - pusch_time_domain_alloc_list_dci_0_1_r16->to_json(j); - } - if (invalid_symbol_pattern_ind_dci_0_1_r16_present) { - j.write_str("invalidSymbolPatternIndicatorDCI-0-1-r16", "enabled"); - } - if (prio_ind_dci_0_1_r16_present) { - j.write_str("priorityIndicatorDCI-0-1-r16", "enabled"); - } - if (pusch_rep_type_ind_dci_0_1_r16_present) { - j.write_str("pusch-RepTypeIndicatorDCI-0-1-r16", pusch_rep_type_ind_dci_0_1_r16.to_string()); - } - if (freq_hop_dci_0_1_r16_present) { - j.write_str("frequencyHoppingDCI-0-1-r16", freq_hop_dci_0_1_r16.to_string()); - } - if (uci_on_pusch_list_dci_0_1_r16.is_present()) { - j.write_fieldname("uci-OnPUSCH-ListDCI-0-1-r16"); - uci_on_pusch_list_dci_0_1_r16->to_json(j); - } - if (invalid_symbol_pattern_r16.is_present()) { - j.write_fieldname("invalidSymbolPattern-r16"); - invalid_symbol_pattern_r16->to_json(j); - } - if (pusch_pwr_ctrl_v1610.is_present()) { - j.write_fieldname("pusch-PowerControl-v1610"); - pusch_pwr_ctrl_v1610->to_json(j); - } - if (ul_full_pwr_tx_r16_present) { - j.write_str("ul-FullPowerTransmission-r16", ul_full_pwr_tx_r16.to_string()); - } - if (pusch_time_domain_alloc_list_for_multi_pusch_r16.is_present()) { - j.write_fieldname("pusch-TimeDomainAllocationListForMultiPUSCH-r16"); - pusch_time_domain_alloc_list_for_multi_pusch_r16->to_json(j); - } - if (nof_invalid_symbols_for_dl_ul_switching_r16_present) { - j.write_int("numberOfInvalidSymbolsForDL-UL-Switching-r16", nof_invalid_symbols_for_dl_ul_switching_r16); - } - if (ul_access_cfg_list_dci_0_2_r17.is_present()) { - j.write_fieldname("ul-AccessConfigListDCI-0-2-r17"); - ul_access_cfg_list_dci_0_2_r17->to_json(j); - } - if (beta_offsets_cross_pri0_r17.is_present()) { - j.write_fieldname("betaOffsetsCrossPri0-r17"); - beta_offsets_cross_pri0_r17->to_json(j); - } - if (beta_offsets_cross_pri1_r17.is_present()) { - j.write_fieldname("betaOffsetsCrossPri1-r17"); - beta_offsets_cross_pri1_r17->to_json(j); - } - if (beta_offsets_cross_pri0_dci_0_2_r17.is_present()) { - j.write_fieldname("betaOffsetsCrossPri0DCI-0-2-r17"); - beta_offsets_cross_pri0_dci_0_2_r17->to_json(j); - } - if (beta_offsets_cross_pri1_dci_0_2_r17.is_present()) { - j.write_fieldname("betaOffsetsCrossPri1DCI-0-2-r17"); - beta_offsets_cross_pri1_dci_0_2_r17->to_json(j); - } - if (map_pattern_r17_present) { - j.write_str("mappingPattern-r17", map_pattern_r17.to_string()); - } - if (second_tpc_field_dci_0_1_r17_present) { - j.write_str("secondTPCFieldDCI-0-1-r17", "enabled"); - } - if (second_tpc_field_dci_0_2_r17_present) { - j.write_str("secondTPCFieldDCI-0-2-r17", "enabled"); - } - if (seq_offset_for_rv_r17_present) { - j.write_int("sequenceOffsetForRV-r17", seq_offset_for_rv_r17); + 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_present) { + j.write_fieldname("supplementaryUplink"); + supplementary_ul.to_json(j); + } + if (n_timing_advance_offset_present) { + j.write_str("n-TimingAdvanceOffset", n_timing_advance_offset.to_string()); + } + j.write_fieldname("ssb-PositionsInBurst"); + j.start_obj(); + j.write_str("inOneGroup", ssb_positions_in_burst.in_one_group.to_string()); + if (ssb_positions_in_burst.group_presence_present) { + j.write_str("groupPresence", ssb_positions_in_burst.group_presence.to_string()); + } + j.end_obj(); + j.write_str("ssb-PeriodicityServingCell", ssb_periodicity_serving_cell.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); + if (ext) { + if (ch_access_mode_r16.is_present()) { + j.write_fieldname("channelAccessMode-r16"); + ch_access_mode_r16->to_json(j); } - if (ul_access_cfg_list_dci_0_1_r17.is_present()) { - j.write_fieldname("ul-AccessConfigListDCI-0-1-r17"); - ul_access_cfg_list_dci_0_1_r17->to_json(j); + if (discovery_burst_win_len_r16_present) { + j.write_str("discoveryBurstWindowLength-r16", discovery_burst_win_len_r16.to_string()); } - if (minimum_sched_offset_k2_r17.is_present()) { - j.write_fieldname("minimumSchedulingOffsetK2-r17"); - minimum_sched_offset_k2_r17->to_json(j); + if (high_speed_cfg_r16.is_present()) { + j.write_fieldname("highSpeedConfig-r16"); + high_speed_cfg_r16->to_json(j); } - if (available_slot_count_r17_present) { - j.write_str("availableSlotCounting-r17", "enabled"); + if (ch_access_mode2_r17_present) { + j.write_str("channelAccessMode2-r17", "enabled"); } - if (dmrs_bundling_pusch_cfg_r17.is_present()) { - j.write_fieldname("dmrs-BundlingPUSCH-Config-r17"); - dmrs_bundling_pusch_cfg_r17->to_json(j); + if (discovery_burst_win_len_v1700_present) { + j.write_str("discoveryBurstWindowLength-v1700", discovery_burst_win_len_v1700.to_string()); } - if (harq_process_num_size_dci_0_2_v1700_present) { - j.write_int("harq-ProcessNumberSizeDCI-0-2-v1700", harq_process_num_size_dci_0_2_v1700); + if (high_speed_cfg_fr2_r17.is_present()) { + j.write_fieldname("highSpeedConfigFR2-r17"); + high_speed_cfg_fr2_r17->to_json(j); } - if (harq_process_num_size_dci_0_1_r17_present) { - j.write_int("harq-ProcessNumberSizeDCI-0-1-r17", harq_process_num_size_dci_0_1_r17); + if (ul_cfg_common_v1700.is_present()) { + j.write_fieldname("uplinkConfigCommon-v1700"); + ul_cfg_common_v1700->to_json(j); } - if (mpe_res_pool_to_add_mod_list_r17.is_present()) { - j.start_array("mpe-ResourcePoolToAddModList-r17"); - for (const auto& e1 : *mpe_res_pool_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); + if (enhanced_meas_leo_r17_present) { + j.write_str("enhancedMeasurementLEO-r17", "true"); } - if (mpe_res_pool_to_release_list_r17.is_present()) { - j.start_array("mpe-ResourcePoolToReleaseList-r17"); - for (const auto& e1 : *mpe_res_pool_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); + if (ra_ch_access_r17_present) { + j.write_str("ra-ChannelAccess-r17", "enabled"); } } j.end_obj(); } -const char* pusch_cfg_s::tx_cfg_opts::to_string() const -{ - static const char* names[] = {"codebook", "nonCodebook"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::tx_cfg_e_"); -} - -const char* pusch_cfg_s::freq_hop_opts::to_string() const -{ - static const char* names[] = {"intraSlot", "interSlot"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::freq_hop_e_"); -} - -const char* pusch_cfg_s::res_alloc_opts::to_string() const -{ - static const char* names[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; - return convert_enum_idx(names, 3, value, "pusch_cfg_s::res_alloc_e_"); -} -uint8_t pusch_cfg_s::res_alloc_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "pusch_cfg_s::res_alloc_e_"); -} - -const char* pusch_cfg_s::pusch_aggregation_factor_opts::to_string() const -{ - static const char* names[] = {"n2", "n4", "n8"}; - return convert_enum_idx(names, 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 numbers[] = {2, 4, 8}; - return map_enum_number(numbers, 3, value, "pusch_cfg_s::pusch_aggregation_factor_e_"); -} - -const char* pusch_cfg_s::mcs_table_opts::to_string() const -{ - static const char* names[] = {"qam256", "qam64LowSE"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::mcs_table_e_"); -} -uint16_t pusch_cfg_s::mcs_table_opts::to_number() const -{ - static const uint16_t numbers[] = {256, 64}; - return map_enum_number(numbers, 2, value, "pusch_cfg_s::mcs_table_e_"); -} - -const char* pusch_cfg_s::mcs_table_transform_precoder_opts::to_string() const +const char* serving_cell_cfg_common_sib_s::n_timing_advance_offset_opts::to_string() const { - static const char* names[] = {"qam256", "qam64LowSE"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::mcs_table_transform_precoder_e_"); + static const char* names[] = {"n0", "n25600", "n39936"}; + return convert_enum_idx(names, 3, value, "serving_cell_cfg_common_sib_s::n_timing_advance_offset_e_"); } -uint16_t pusch_cfg_s::mcs_table_transform_precoder_opts::to_number() const +uint16_t serving_cell_cfg_common_sib_s::n_timing_advance_offset_opts::to_number() const { - static const uint16_t numbers[] = {256, 64}; - return map_enum_number(numbers, 2, value, "pusch_cfg_s::mcs_table_transform_precoder_e_"); + static const uint16_t numbers[] = {0, 25600, 39936}; + return map_enum_number(numbers, 3, value, "serving_cell_cfg_common_sib_s::n_timing_advance_offset_e_"); } -const char* pusch_cfg_s::transform_precoder_opts::to_string() const +const char* serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_opts::to_string() const { - static const char* names[] = {"enabled", "disabled"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::transform_precoder_e_"); + static const char* names[] = {"ms5", "ms10", "ms20", "ms40", "ms80", "ms160"}; + return convert_enum_idx(names, 6, value, "serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_e_"); } - -const char* pusch_cfg_s::codebook_subset_opts::to_string() const +uint8_t serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_opts::to_number() const { - static const char* names[] = {"fullyAndPartialAndNonCoherent", "partialAndNonCoherent", "nonCoherent"}; - return convert_enum_idx(names, 3, value, "pusch_cfg_s::codebook_subset_e_"); + static const uint8_t numbers[] = {5, 10, 20, 40, 80, 160}; + return map_enum_number(numbers, 6, value, "serving_cell_cfg_common_sib_s::ssb_periodicity_serving_cell_e_"); } -void pusch_cfg_s::freq_hop_dci_0_2_r16_c_::destroy_() {} -void pusch_cfg_s::freq_hop_dci_0_2_r16_c_::set(types::options e) +void serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::set(types::options e) { - destroy_(); type_ = e; } -pusch_cfg_s::freq_hop_dci_0_2_r16_c_::freq_hop_dci_0_2_r16_c_(const pusch_cfg_s::freq_hop_dci_0_2_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::pusch_rep_type_a: - c.init(other.c.get()); - break; - case types::pusch_rep_type_b: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_"); - } -} -pusch_cfg_s::freq_hop_dci_0_2_r16_c_& -pusch_cfg_s::freq_hop_dci_0_2_r16_c_::operator=(const pusch_cfg_s::freq_hop_dci_0_2_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::pusch_rep_type_a: - c.set(other.c.get()); - break; - case types::pusch_rep_type_b: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_"); - } - - return *this; -} -pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pusch_rep_type_a_e_& pusch_cfg_s::freq_hop_dci_0_2_r16_c_::set_pusch_rep_type_a() +void serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::set_dyn() { - set(types::pusch_rep_type_a); - return c.get(); + set(types::dyn); } -pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pusch_rep_type_b_e_& pusch_cfg_s::freq_hop_dci_0_2_r16_c_::set_pusch_rep_type_b() +semi_static_ch_access_cfg_r16_s& serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::set_semi_static() { - set(types::pusch_rep_type_b); - return c.get(); + set(types::semi_static); + return c; } -void pusch_cfg_s::freq_hop_dci_0_2_r16_c_::to_json(json_writer& j) const +void serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::to_json(json_writer& j) const { j.start_obj(); switch (type_) { - case types::pusch_rep_type_a: - j.write_str("pusch-RepTypeA", c.get().to_string()); + case types::dyn: break; - case types::pusch_rep_type_b: - j.write_str("pusch-RepTypeB", c.get().to_string()); + case types::semi_static: + j.write_fieldname("semiStatic"); + c.to_json(j); break; default: - log_invalid_choice_id(type_, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_"); + log_invalid_choice_id(type_, "serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_"); } j.end_obj(); } -SRSASN_CODE pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pack(bit_ref& bref) const +SRSASN_CODE serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::pack(bit_ref& bref) const { type_.pack(bref); switch (type_) { - case types::pusch_rep_type_a: - HANDLE_CODE(c.get().pack(bref)); + case types::dyn: break; - case types::pusch_rep_type_b: - HANDLE_CODE(c.get().pack(bref)); + case types::semi_static: + HANDLE_CODE(c.pack(bref)); break; default: - log_invalid_choice_id(type_, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_"); + log_invalid_choice_id(type_, "serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_"); return SRSASN_ERROR_ENCODE_FAIL; } return SRSASN_SUCCESS; } -SRSASN_CODE pusch_cfg_s::freq_hop_dci_0_2_r16_c_::unpack(cbit_ref& bref) +SRSASN_CODE serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::unpack(cbit_ref& bref) { types e; e.unpack(bref); set(e); switch (type_) { - case types::pusch_rep_type_a: - HANDLE_CODE(c.get().unpack(bref)); + case types::dyn: break; - case types::pusch_rep_type_b: - HANDLE_CODE(c.get().unpack(bref)); + case types::semi_static: + HANDLE_CODE(c.unpack(bref)); break; default: - log_invalid_choice_id(type_, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_"); + log_invalid_choice_id(type_, "serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_"); return SRSASN_ERROR_DECODE_FAIL; } return SRSASN_SUCCESS; } -const char* pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pusch_rep_type_a_opts::to_string() const -{ - static const char* names[] = {"intraSlot", "interSlot"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pusch_rep_type_a_e_"); -} - -const char* pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pusch_rep_type_b_opts::to_string() const -{ - static const char* names[] = {"interRepetition", "interSlot"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::freq_hop_dci_0_2_r16_c_::pusch_rep_type_b_e_"); -} - -const char* pusch_cfg_s::codebook_subset_dci_0_2_r16_opts::to_string() const -{ - static const char* names[] = {"fullyAndPartialAndNonCoherent", "partialAndNonCoherent", "nonCoherent"}; - return convert_enum_idx(names, 3, value, "pusch_cfg_s::codebook_subset_dci_0_2_r16_e_"); -} - -const char* pusch_cfg_s::mcs_table_dci_0_2_r16_opts::to_string() const -{ - static const char* names[] = {"qam256", "qam64LowSE"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::mcs_table_dci_0_2_r16_e_"); -} -uint16_t pusch_cfg_s::mcs_table_dci_0_2_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {256, 64}; - return map_enum_number(numbers, 2, value, "pusch_cfg_s::mcs_table_dci_0_2_r16_e_"); -} - -const char* pusch_cfg_s::mcs_table_transform_precoder_dci_0_2_r16_opts::to_string() const -{ - static const char* names[] = {"qam256", "qam64LowSE"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::mcs_table_transform_precoder_dci_0_2_r16_e_"); -} -uint16_t pusch_cfg_s::mcs_table_transform_precoder_dci_0_2_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {256, 64}; - return map_enum_number(numbers, 2, value, "pusch_cfg_s::mcs_table_transform_precoder_dci_0_2_r16_e_"); -} - -const char* pusch_cfg_s::pusch_rep_type_ind_dci_0_2_r16_opts::to_string() const -{ - static const char* names[] = {"pusch-RepTypeA", "pusch-RepTypeB"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::pusch_rep_type_ind_dci_0_2_r16_e_"); -} - -const char* pusch_cfg_s::res_alloc_dci_0_2_r16_opts::to_string() const -{ - static const char* names[] = {"resourceAllocationType0", "resourceAllocationType1", "dynamicSwitch"}; - return convert_enum_idx(names, 3, value, "pusch_cfg_s::res_alloc_dci_0_2_r16_e_"); -} -uint8_t pusch_cfg_s::res_alloc_dci_0_2_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 1}; - return map_enum_number(numbers, 2, value, "pusch_cfg_s::res_alloc_dci_0_2_r16_e_"); -} - -const char* pusch_cfg_s::res_alloc_type1_granularity_dci_0_2_r16_opts::to_string() const -{ - static const char* names[] = {"n2", "n4", "n8", "n16"}; - return convert_enum_idx(names, 4, value, "pusch_cfg_s::res_alloc_type1_granularity_dci_0_2_r16_e_"); -} -uint8_t pusch_cfg_s::res_alloc_type1_granularity_dci_0_2_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 8, 16}; - return map_enum_number(numbers, 4, value, "pusch_cfg_s::res_alloc_type1_granularity_dci_0_2_r16_e_"); -} - -const char* pusch_cfg_s::pusch_rep_type_ind_dci_0_1_r16_opts::to_string() const -{ - static const char* names[] = {"pusch-RepTypeA", "pusch-RepTypeB"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::pusch_rep_type_ind_dci_0_1_r16_e_"); -} - -const char* pusch_cfg_s::freq_hop_dci_0_1_r16_opts::to_string() const +const char* serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::types_opts::to_string() const { - static const char* names[] = {"interRepetition", "interSlot"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::freq_hop_dci_0_1_r16_e_"); + static const char* names[] = {"dynamic", "semiStatic"}; + return convert_enum_idx(names, 2, value, "serving_cell_cfg_common_sib_s::ch_access_mode_r16_c_::types"); } -const char* pusch_cfg_s::ul_full_pwr_tx_r16_opts::to_string() const -{ - static const char* names[] = {"fullpower", "fullpowerMode1", "fullpowerMode2"}; - return convert_enum_idx(names, 3, value, "pusch_cfg_s::ul_full_pwr_tx_r16_e_"); -} -uint8_t pusch_cfg_s::ul_full_pwr_tx_r16_opts::to_number() const +const char* serving_cell_cfg_common_sib_s::discovery_burst_win_len_r16_opts::to_string() const { - switch (value) { - case fullpwr_mode1: - return 1; - case fullpwr_mode2: - return 2; - default: - invalid_enum_number(value, "pusch_cfg_s::ul_full_pwr_tx_r16_e_"); - } - return 0; + static const char* names[] = {"ms0dot5", "ms1", "ms2", "ms3", "ms4", "ms5"}; + return convert_enum_idx(names, 6, value, "serving_cell_cfg_common_sib_s::discovery_burst_win_len_r16_e_"); } - -const char* pusch_cfg_s::map_pattern_r17_opts::to_string() const +float serving_cell_cfg_common_sib_s::discovery_burst_win_len_r16_opts::to_number() const { - static const char* names[] = {"cyclicMapping", "sequentialMapping"}; - return convert_enum_idx(names, 2, value, "pusch_cfg_s::map_pattern_r17_e_"); + static const float numbers[] = {0.5, 1.0, 2.0, 3.0, 4.0, 5.0}; + return map_enum_number(numbers, 6, value, "serving_cell_cfg_common_sib_s::discovery_burst_win_len_r16_e_"); } - -// PathlossReferenceRS-r17 ::= SEQUENCE -SRSASN_CODE pathloss_ref_rs_r17_s::pack(bit_ref& bref) const +const char* serving_cell_cfg_common_sib_s::discovery_burst_win_len_r16_opts::to_number_string() const { - HANDLE_CODE(bref.pack(add_pci_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, pathloss_ref_rs_id_r17, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(ref_sig_r17.pack(bref)); - if (add_pci_r17_present) { - HANDLE_CODE(pack_integer(bref, add_pci_r17, (uint8_t)1u, (uint8_t)7u)); - } - - return SRSASN_SUCCESS; + static const char* number_strs[] = {"0.5", "1", "2", "3", "4", "5"}; + return convert_enum_idx(number_strs, 6, value, "serving_cell_cfg_common_sib_s::discovery_burst_win_len_r16_e_"); } -SRSASN_CODE pathloss_ref_rs_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(add_pci_r17_present, 1)); - - HANDLE_CODE(unpack_integer(pathloss_ref_rs_id_r17, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(ref_sig_r17.unpack(bref)); - if (add_pci_r17_present) { - HANDLE_CODE(unpack_integer(add_pci_r17, bref, (uint8_t)1u, (uint8_t)7u)); - } - return SRSASN_SUCCESS; -} -void pathloss_ref_rs_r17_s::to_json(json_writer& j) const +const char* serving_cell_cfg_common_sib_s::discovery_burst_win_len_v1700_opts::to_string() const { - j.start_obj(); - j.write_int("pathlossReferenceRS-Id-r17", pathloss_ref_rs_id_r17); - j.write_fieldname("referenceSignal-r17"); - ref_sig_r17.to_json(j); - if (add_pci_r17_present) { - j.write_int("additionalPCI-r17", add_pci_r17); - } - j.end_obj(); + static const char* names[] = {"ms0dot125", "ms0dot25", "ms0dot5", "ms0dot75", "ms1", "ms1dot25"}; + return convert_enum_idx(names, 6, value, "serving_cell_cfg_common_sib_s::discovery_burst_win_len_v1700_e_"); } - -void pathloss_ref_rs_r17_s::ref_sig_r17_c_::destroy_() {} -void pathloss_ref_rs_r17_s::ref_sig_r17_c_::set(types::options e) +float serving_cell_cfg_common_sib_s::discovery_burst_win_len_v1700_opts::to_number() const { - destroy_(); - type_ = e; + static const float numbers[] = {0.125, 0.25, 0.5, 0.75, 1.0, 1.25}; + return map_enum_number(numbers, 6, value, "serving_cell_cfg_common_sib_s::discovery_burst_win_len_v1700_e_"); } -pathloss_ref_rs_r17_s::ref_sig_r17_c_::ref_sig_r17_c_(const pathloss_ref_rs_r17_s::ref_sig_r17_c_& other) +const char* serving_cell_cfg_common_sib_s::discovery_burst_win_len_v1700_opts::to_number_string() const { - 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_, "pathloss_ref_rs_r17_s::ref_sig_r17_c_"); - } + static const char* number_strs[] = {"0.125", "0.25", "0.5", "0.75", "1", "1.25"}; + return convert_enum_idx(number_strs, 6, value, "serving_cell_cfg_common_sib_s::discovery_burst_win_len_v1700_e_"); } -pathloss_ref_rs_r17_s::ref_sig_r17_c_& -pathloss_ref_rs_r17_s::ref_sig_r17_c_::operator=(const pathloss_ref_rs_r17_s::ref_sig_r17_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_, "pathloss_ref_rs_r17_s::ref_sig_r17_c_"); - } - return *this; -} -uint8_t& pathloss_ref_rs_r17_s::ref_sig_r17_c_::set_ssb_idx() -{ - set(types::ssb_idx); - return c.get(); -} -uint8_t& pathloss_ref_rs_r17_s::ref_sig_r17_c_::set_csi_rs_idx() -{ - set(types::csi_rs_idx); - return c.get(); -} -void pathloss_ref_rs_r17_s::ref_sig_r17_c_::to_json(json_writer& j) const +// AvailabilityCombination-r16 ::= SEQUENCE +SRSASN_CODE availability_combination_r16_s::pack(bit_ref& bref) 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_, "pathloss_ref_rs_r17_s::ref_sig_r17_c_"); - } - j.end_obj(); + HANDLE_CODE(pack_integer(bref, availability_combination_id_r16, (uint16_t)0u, (uint16_t)511u)); + HANDLE_CODE(pack_dyn_seq_of(bref, res_availability_r16, 1, 256, integer_packer(0, 7))); + + return SRSASN_SUCCESS; } -SRSASN_CODE pathloss_ref_rs_r17_s::ref_sig_r17_c_::pack(bit_ref& bref) const +SRSASN_CODE availability_combination_r16_s::unpack(cbit_ref& 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_, "pathloss_ref_rs_r17_s::ref_sig_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } + HANDLE_CODE(unpack_integer(availability_combination_id_r16, bref, (uint16_t)0u, (uint16_t)511u)); + HANDLE_CODE(unpack_dyn_seq_of(res_availability_r16, bref, 1, 256, integer_packer(0, 7))); + return SRSASN_SUCCESS; } -SRSASN_CODE pathloss_ref_rs_r17_s::ref_sig_r17_c_::unpack(cbit_ref& bref) +void availability_combination_r16_s::to_json(json_writer& j) const { - 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_, "pathloss_ref_rs_r17_s::ref_sig_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; + j.start_obj(); + j.write_int("availabilityCombinationId-r16", availability_combination_id_r16); + j.start_array("resourceAvailability-r16"); + for (const auto& e1 : res_availability_r16) { + j.write_int(e1); } - return SRSASN_SUCCESS; + j.end_array(); + j.end_obj(); } -// SRS-Config ::= SEQUENCE -SRSASN_CODE srs_cfg_s::pack(bit_ref& bref) const +// RB-SetGroup-r17 ::= SEQUENCE +SRSASN_CODE rb_set_group_r17_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(srs_res_set_to_release_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(srs_res_set_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(srs_res_to_release_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(srs_res_to_add_mod_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(tpc_accumulation_present, 1)); + HANDLE_CODE(bref.pack(res_availability_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(rb_sets_r17.size() > 0, 1)); - if (srs_res_set_to_release_list.size() > 0) { - 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_set_to_add_mod_list, 1, 16)); - } - if (srs_res_to_release_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_to_release_list, 1, 64, integer_packer(0, 63))); + if (res_availability_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, res_availability_r17, 1, 256, integer_packer(0, 7))); } - if (srs_res_to_add_mod_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, srs_res_to_add_mod_list, 1, 64)); + if (rb_sets_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, rb_sets_r17, 1, 8, integer_packer(0, 7))); } - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= srs_request_dci_1_2_r16_present; - group_flags[0] |= srs_request_dci_0_2_r16_present; - group_flags[0] |= srs_res_set_to_add_mod_list_dci_0_2_r16.is_present(); - group_flags[0] |= srs_res_set_to_release_list_dci_0_2_r16.is_present(); - group_flags[0] |= srs_pos_res_set_to_release_list_r16.is_present(); - group_flags[0] |= srs_pos_res_set_to_add_mod_list_r16.is_present(); - group_flags[0] |= srs_pos_res_to_release_list_r16.is_present(); - group_flags[0] |= srs_pos_res_to_add_mod_list_r16.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(srs_request_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.pack(srs_request_dci_0_2_r16_present, 1)); - HANDLE_CODE(bref.pack(srs_res_set_to_add_mod_list_dci_0_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(srs_res_set_to_release_list_dci_0_2_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(srs_pos_res_set_to_release_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(srs_pos_res_set_to_add_mod_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(srs_pos_res_to_release_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(srs_pos_res_to_add_mod_list_r16.is_present(), 1)); - if (srs_request_dci_1_2_r16_present) { - HANDLE_CODE(pack_integer(bref, srs_request_dci_1_2_r16, (uint8_t)1u, (uint8_t)2u)); - } - if (srs_request_dci_0_2_r16_present) { - HANDLE_CODE(pack_integer(bref, srs_request_dci_0_2_r16, (uint8_t)1u, (uint8_t)2u)); - } - if (srs_res_set_to_add_mod_list_dci_0_2_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *srs_res_set_to_add_mod_list_dci_0_2_r16, 1, 16)); - } - if (srs_res_set_to_release_list_dci_0_2_r16.is_present()) { - HANDLE_CODE( - pack_dyn_seq_of(bref, *srs_res_set_to_release_list_dci_0_2_r16, 1, 16, integer_packer(0, 15))); - } - if (srs_pos_res_set_to_release_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *srs_pos_res_set_to_release_list_r16, 1, 16, integer_packer(0, 15))); - } - if (srs_pos_res_set_to_add_mod_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *srs_pos_res_set_to_add_mod_list_r16, 1, 16)); - } - if (srs_pos_res_to_release_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *srs_pos_res_to_release_list_r16, 1, 64, integer_packer(0, 63))); - } - if (srs_pos_res_to_add_mod_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *srs_pos_res_to_add_mod_list_r16, 1, 64)); - } - } - } return SRSASN_SUCCESS; } -SRSASN_CODE srs_cfg_s::unpack(cbit_ref& bref) +SRSASN_CODE rb_set_group_r17_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - bool srs_res_set_to_release_list_present; - HANDLE_CODE(bref.unpack(srs_res_set_to_release_list_present, 1)); - bool srs_res_set_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(srs_res_set_to_add_mod_list_present, 1)); - bool srs_res_to_release_list_present; - HANDLE_CODE(bref.unpack(srs_res_to_release_list_present, 1)); - bool srs_res_to_add_mod_list_present; - HANDLE_CODE(bref.unpack(srs_res_to_add_mod_list_present, 1)); - HANDLE_CODE(bref.unpack(tpc_accumulation_present, 1)); + bool res_availability_r17_present; + HANDLE_CODE(bref.unpack(res_availability_r17_present, 1)); + bool rb_sets_r17_present; + HANDLE_CODE(bref.unpack(rb_sets_r17_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 (res_availability_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(res_availability_r17, bref, 1, 256, integer_packer(0, 7))); } - if (srs_res_to_add_mod_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(srs_res_to_add_mod_list, bref, 1, 64)); + if (rb_sets_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(rb_sets_r17, bref, 1, 8, integer_packer(0, 7))); } - 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(srs_request_dci_1_2_r16_present, 1)); - HANDLE_CODE(bref.unpack(srs_request_dci_0_2_r16_present, 1)); - unpack_presence_flag(srs_res_set_to_add_mod_list_dci_0_2_r16, bref); - unpack_presence_flag(srs_res_set_to_release_list_dci_0_2_r16, bref); - unpack_presence_flag(srs_pos_res_set_to_release_list_r16, bref); - unpack_presence_flag(srs_pos_res_set_to_add_mod_list_r16, bref); - unpack_presence_flag(srs_pos_res_to_release_list_r16, bref); - unpack_presence_flag(srs_pos_res_to_add_mod_list_r16, bref); - if (srs_request_dci_1_2_r16_present) { - HANDLE_CODE(unpack_integer(srs_request_dci_1_2_r16, bref, (uint8_t)1u, (uint8_t)2u)); - } - if (srs_request_dci_0_2_r16_present) { - HANDLE_CODE(unpack_integer(srs_request_dci_0_2_r16, bref, (uint8_t)1u, (uint8_t)2u)); - } - if (srs_res_set_to_add_mod_list_dci_0_2_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*srs_res_set_to_add_mod_list_dci_0_2_r16, bref, 1, 16)); - } - if (srs_res_set_to_release_list_dci_0_2_r16.is_present()) { - HANDLE_CODE( - unpack_dyn_seq_of(*srs_res_set_to_release_list_dci_0_2_r16, bref, 1, 16, integer_packer(0, 15))); - } - if (srs_pos_res_set_to_release_list_r16.is_present()) { - HANDLE_CODE( - unpack_dyn_seq_of(*srs_pos_res_set_to_release_list_r16, bref, 1, 16, integer_packer(0, 15))); - } - if (srs_pos_res_set_to_add_mod_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*srs_pos_res_set_to_add_mod_list_r16, bref, 1, 16)); - } - if (srs_pos_res_to_release_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*srs_pos_res_to_release_list_r16, bref, 1, 64, integer_packer(0, 63))); - } - if (srs_pos_res_to_add_mod_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*srs_pos_res_to_add_mod_list_r16, bref, 1, 64)); - } - } - } return SRSASN_SUCCESS; } -void srs_cfg_s::to_json(json_writer& j) const +void rb_set_group_r17_s::to_json(json_writer& j) const { j.start_obj(); - if (srs_res_set_to_release_list.size() > 0) { - j.start_array("srs-ResourceSetToReleaseList"); - for (const auto& e1 : srs_res_set_to_release_list) { + if (res_availability_r17.size() > 0) { + j.start_array("resourceAvailability-r17"); + for (const auto& e1 : res_availability_r17) { j.write_int(e1); } j.end_array(); } - if (srs_res_set_to_add_mod_list.size() > 0) { - 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.size() > 0) { - j.start_array("srs-ResourceToReleaseList"); - for (const auto& e1 : srs_res_to_release_list) { + if (rb_sets_r17.size() > 0) { + j.start_array("rb-Sets-r17"); + for (const auto& e1 : rb_sets_r17) { j.write_int(e1); } j.end_array(); } - if (srs_res_to_add_mod_list.size() > 0) { - 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"); - } - if (ext) { - if (srs_request_dci_1_2_r16_present) { - j.write_int("srs-RequestDCI-1-2-r16", srs_request_dci_1_2_r16); - } - if (srs_request_dci_0_2_r16_present) { - j.write_int("srs-RequestDCI-0-2-r16", srs_request_dci_0_2_r16); - } - if (srs_res_set_to_add_mod_list_dci_0_2_r16.is_present()) { - j.start_array("srs-ResourceSetToAddModListDCI-0-2-r16"); - for (const auto& e1 : *srs_res_set_to_add_mod_list_dci_0_2_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (srs_res_set_to_release_list_dci_0_2_r16.is_present()) { - j.start_array("srs-ResourceSetToReleaseListDCI-0-2-r16"); - for (const auto& e1 : *srs_res_set_to_release_list_dci_0_2_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (srs_pos_res_set_to_release_list_r16.is_present()) { - j.start_array("srs-PosResourceSetToReleaseList-r16"); - for (const auto& e1 : *srs_pos_res_set_to_release_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (srs_pos_res_set_to_add_mod_list_r16.is_present()) { - j.start_array("srs-PosResourceSetToAddModList-r16"); - for (const auto& e1 : *srs_pos_res_set_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (srs_pos_res_to_release_list_r16.is_present()) { - j.start_array("srs-PosResourceToReleaseList-r16"); - for (const auto& e1 : *srs_pos_res_to_release_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (srs_pos_res_to_add_mod_list_r16.is_present()) { - j.start_array("srs-PosResourceToAddModList-r16"); - for (const auto& e1 : *srs_pos_res_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - } j.end_obj(); } -// TCI-UL-State-r17 ::= SEQUENCE -SRSASN_CODE tci_ul_state_r17_s::pack(bit_ref& bref) const +// AvailabilityCombinationRB-Groups-r17 ::= SEQUENCE +SRSASN_CODE availability_combination_rb_groups_r17_s::pack(bit_ref& bref) const { - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(serving_cell_id_r17_present, 1)); - HANDLE_CODE(bref.pack(bwp_id_r17_present, 1)); - HANDLE_CODE(bref.pack(add_pci_r17_present, 1)); - HANDLE_CODE(bref.pack(ul_pwr_ctrl_r17_present, 1)); - HANDLE_CODE(bref.pack(pathloss_ref_rs_id_r17_present, 1)); + HANDLE_CODE(bref.pack(rb_set_groups_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(res_availability_r17.size() > 0, 1)); - HANDLE_CODE(pack_integer(bref, tci_ul_state_id_r17, (uint8_t)0u, (uint8_t)63u)); - if (serving_cell_id_r17_present) { - HANDLE_CODE(pack_integer(bref, serving_cell_id_r17, (uint8_t)0u, (uint8_t)31u)); - } - if (bwp_id_r17_present) { - HANDLE_CODE(pack_integer(bref, bwp_id_r17, (uint8_t)0u, (uint8_t)4u)); - } - HANDLE_CODE(ref_sig_r17.pack(bref)); - if (add_pci_r17_present) { - HANDLE_CODE(pack_integer(bref, add_pci_r17, (uint8_t)1u, (uint8_t)7u)); - } - if (ul_pwr_ctrl_r17_present) { - HANDLE_CODE(pack_integer(bref, ul_pwr_ctrl_r17, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(pack_integer(bref, availability_combination_id_r17, (uint16_t)0u, (uint16_t)511u)); + if (rb_set_groups_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, rb_set_groups_r17, 1, 8)); } - if (pathloss_ref_rs_id_r17_present) { - HANDLE_CODE(pack_integer(bref, pathloss_ref_rs_id_r17, (uint8_t)0u, (uint8_t)63u)); + if (res_availability_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, res_availability_r17, 1, 256, integer_packer(0, 7))); } return SRSASN_SUCCESS; } -SRSASN_CODE tci_ul_state_r17_s::unpack(cbit_ref& bref) +SRSASN_CODE availability_combination_rb_groups_r17_s::unpack(cbit_ref& bref) { - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(serving_cell_id_r17_present, 1)); - HANDLE_CODE(bref.unpack(bwp_id_r17_present, 1)); - HANDLE_CODE(bref.unpack(add_pci_r17_present, 1)); - HANDLE_CODE(bref.unpack(ul_pwr_ctrl_r17_present, 1)); - HANDLE_CODE(bref.unpack(pathloss_ref_rs_id_r17_present, 1)); + bool rb_set_groups_r17_present; + HANDLE_CODE(bref.unpack(rb_set_groups_r17_present, 1)); + bool res_availability_r17_present; + HANDLE_CODE(bref.unpack(res_availability_r17_present, 1)); - HANDLE_CODE(unpack_integer(tci_ul_state_id_r17, bref, (uint8_t)0u, (uint8_t)63u)); - if (serving_cell_id_r17_present) { - HANDLE_CODE(unpack_integer(serving_cell_id_r17, bref, (uint8_t)0u, (uint8_t)31u)); - } - if (bwp_id_r17_present) { - HANDLE_CODE(unpack_integer(bwp_id_r17, bref, (uint8_t)0u, (uint8_t)4u)); - } - HANDLE_CODE(ref_sig_r17.unpack(bref)); - if (add_pci_r17_present) { - HANDLE_CODE(unpack_integer(add_pci_r17, bref, (uint8_t)1u, (uint8_t)7u)); - } - if (ul_pwr_ctrl_r17_present) { - HANDLE_CODE(unpack_integer(ul_pwr_ctrl_r17, bref, (uint8_t)1u, (uint8_t)64u)); + HANDLE_CODE(unpack_integer(availability_combination_id_r17, bref, (uint16_t)0u, (uint16_t)511u)); + if (rb_set_groups_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(rb_set_groups_r17, bref, 1, 8)); } - if (pathloss_ref_rs_id_r17_present) { - HANDLE_CODE(unpack_integer(pathloss_ref_rs_id_r17, bref, (uint8_t)0u, (uint8_t)63u)); + if (res_availability_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(res_availability_r17, bref, 1, 256, integer_packer(0, 7))); } return SRSASN_SUCCESS; } -void tci_ul_state_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("tci-UL-StateId-r17", tci_ul_state_id_r17); - if (serving_cell_id_r17_present) { - j.write_int("servingCellId-r17", serving_cell_id_r17); - } - if (bwp_id_r17_present) { - j.write_int("bwp-Id-r17", bwp_id_r17); - } - j.write_fieldname("referenceSignal-r17"); - ref_sig_r17.to_json(j); - if (add_pci_r17_present) { - j.write_int("additionalPCI-r17", add_pci_r17); - } - if (ul_pwr_ctrl_r17_present) { - j.write_int("ul-powerControl-r17", ul_pwr_ctrl_r17); - } - if (pathloss_ref_rs_id_r17_present) { - j.write_int("pathlossReferenceRS-Id-r17", pathloss_ref_rs_id_r17); - } - j.end_obj(); -} - -void tci_ul_state_r17_s::ref_sig_r17_c_::destroy_() {} -void tci_ul_state_r17_s::ref_sig_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -tci_ul_state_r17_s::ref_sig_r17_c_::ref_sig_r17_c_(const tci_ul_state_r17_s::ref_sig_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::ssb_idx_r17: - c.init(other.c.get()); - break; - case types::csi_rs_idx_r17: - c.init(other.c.get()); - break; - case types::srs_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "tci_ul_state_r17_s::ref_sig_r17_c_"); - } -} -tci_ul_state_r17_s::ref_sig_r17_c_& -tci_ul_state_r17_s::ref_sig_r17_c_::operator=(const tci_ul_state_r17_s::ref_sig_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ssb_idx_r17: - c.set(other.c.get()); - break; - case types::csi_rs_idx_r17: - c.set(other.c.get()); - break; - case types::srs_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "tci_ul_state_r17_s::ref_sig_r17_c_"); - } - - return *this; -} -uint8_t& tci_ul_state_r17_s::ref_sig_r17_c_::set_ssb_idx_r17() -{ - set(types::ssb_idx_r17); - return c.get(); -} -uint8_t& tci_ul_state_r17_s::ref_sig_r17_c_::set_csi_rs_idx_r17() -{ - set(types::csi_rs_idx_r17); - return c.get(); -} -uint8_t& tci_ul_state_r17_s::ref_sig_r17_c_::set_srs_r17() -{ - set(types::srs_r17); - return c.get(); -} -void tci_ul_state_r17_s::ref_sig_r17_c_::to_json(json_writer& j) const +void availability_combination_rb_groups_r17_s::to_json(json_writer& j) const { j.start_obj(); - switch (type_) { - case types::ssb_idx_r17: - j.write_int("ssb-Index-r17", c.get()); - break; - case types::csi_rs_idx_r17: - j.write_int("csi-RS-Index-r17", c.get()); - break; - case types::srs_r17: - j.write_int("srs-r17", c.get()); - break; - default: - log_invalid_choice_id(type_, "tci_ul_state_r17_s::ref_sig_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE tci_ul_state_r17_s::ref_sig_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ssb_idx_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_idx_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)191u)); - break; - case types::srs_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); - break; - default: - log_invalid_choice_id(type_, "tci_ul_state_r17_s::ref_sig_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE tci_ul_state_r17_s::ref_sig_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ssb_idx_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - case types::csi_rs_idx_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)191u)); - break; - case types::srs_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); - break; - default: - log_invalid_choice_id(type_, "tci_ul_state_r17_s::ref_sig_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; + j.write_int("availabilityCombinationId-r17", availability_combination_id_r17); + if (rb_set_groups_r17.size() > 0) { + j.start_array("rb-SetGroups-r17"); + for (const auto& e1 : rb_set_groups_r17) { + e1.to_json(j); + } + j.end_array(); } - return SRSASN_SUCCESS; + if (res_availability_r17.size() > 0) { + j.start_array("resourceAvailability-r17"); + for (const auto& e1 : res_availability_r17) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); } -// BWP-UplinkDedicated ::= SEQUENCE -SRSASN_CODE bwp_ul_ded_s::pack(bit_ref& bref) const +// AvailabilityCombinationsPerCell-r16 ::= SEQUENCE +SRSASN_CODE availability_combinations_per_cell_r16_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(cfg_grant_cfg_present, 1)); - HANDLE_CODE(bref.pack(srs_cfg_present, 1)); - HANDLE_CODE(bref.pack(beam_fail_recovery_cfg_present, 1)); + HANDLE_CODE(bref.pack(position_in_dci_ai_r16_present, 1)); - if (pucch_cfg_present) { - HANDLE_CODE(pucch_cfg.pack(bref)); - } - if (pusch_cfg_present) { - HANDLE_CODE(pusch_cfg.pack(bref)); - } - if (cfg_grant_cfg_present) { - HANDLE_CODE(cfg_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, availability_combinations_per_cell_idx_r16, (uint16_t)0u, (uint16_t)512u)); + HANDLE_CODE(iab_du_cell_id_r16.pack(bref)); + if (position_in_dci_ai_r16_present) { + HANDLE_CODE(pack_integer(bref, position_in_dci_ai_r16, (uint8_t)0u, (uint8_t)127u)); } + HANDLE_CODE(pack_dyn_seq_of(bref, availability_combinations_r16, 1, 512)); if (ext) { ext_groups_packer_guard group_flags; - group_flags[0] |= sl_pucch_cfg_r16.is_present(); - group_flags[0] |= cp_ext_c2_r16_present; - group_flags[0] |= cp_ext_c3_r16_present; - group_flags[0] |= use_interlace_pucch_pusch_r16_present; - group_flags[0] |= pucch_cfg_list_r16.is_present(); - group_flags[0] |= lbt_fail_recovery_cfg_r16.is_present(); - group_flags[0] |= cfg_grant_cfg_to_add_mod_list_r16.is_present(); - group_flags[0] |= cfg_grant_cfg_to_release_list_r16.is_present(); - group_flags[0] |= cfg_grant_cfg_type2_deactivation_state_list_r16.is_present(); - group_flags[1] |= ul_tci_state_list_r17.is_present(); - group_flags[1] |= ul_pwr_ctrl_r17_present; - group_flags[1] |= pucch_cfg_list_multicast1_r17.is_present(); - group_flags[1] |= pucch_cfg_list_multicast2_r17.is_present(); - group_flags[2] |= pucch_cfg_multicast1_r17.is_present(); - group_flags[2] |= pucch_cfg_multicast2_r17.is_present(); - group_flags[3] |= pathloss_ref_rs_to_add_mod_list_r17.is_present(); - group_flags[3] |= pathloss_ref_rs_to_release_list_r17.is_present(); + group_flags[0] |= availability_combinations_rb_groups_r17.is_present(); + group_flags[1] |= position_in_dci_ai_rb_groups_v1720_present; group_flags.pack(bref); if (group_flags[0]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(sl_pucch_cfg_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(cp_ext_c2_r16_present, 1)); - HANDLE_CODE(bref.pack(cp_ext_c3_r16_present, 1)); - HANDLE_CODE(bref.pack(use_interlace_pucch_pusch_r16_present, 1)); - HANDLE_CODE(bref.pack(pucch_cfg_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(lbt_fail_recovery_cfg_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(cfg_grant_cfg_to_add_mod_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(cfg_grant_cfg_to_release_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(cfg_grant_cfg_type2_deactivation_state_list_r16.is_present(), 1)); - if (sl_pucch_cfg_r16.is_present()) { - HANDLE_CODE(sl_pucch_cfg_r16->pack(bref)); - } - if (cp_ext_c2_r16_present) { - HANDLE_CODE(pack_integer(bref, cp_ext_c2_r16, (uint8_t)1u, (uint8_t)28u)); - } - if (cp_ext_c3_r16_present) { - HANDLE_CODE(pack_integer(bref, cp_ext_c3_r16, (uint8_t)1u, (uint8_t)28u)); - } - if (pucch_cfg_list_r16.is_present()) { - HANDLE_CODE(pucch_cfg_list_r16->pack(bref)); - } - if (lbt_fail_recovery_cfg_r16.is_present()) { - HANDLE_CODE(lbt_fail_recovery_cfg_r16->pack(bref)); - } - if (cfg_grant_cfg_to_add_mod_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *cfg_grant_cfg_to_add_mod_list_r16, 1, 12)); - } - if (cfg_grant_cfg_to_release_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *cfg_grant_cfg_to_release_list_r16, 1, 12, integer_packer(0, 11))); - } - if (cfg_grant_cfg_type2_deactivation_state_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, - *cfg_grant_cfg_type2_deactivation_state_list_r16, - 1, - 16, - SeqOfPacker>(1, 12, integer_packer(0, 11)))); + HANDLE_CODE(bref.pack(availability_combinations_rb_groups_r17.is_present(), 1)); + if (availability_combinations_rb_groups_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *availability_combinations_rb_groups_r17, 1, 512)); } } if (group_flags[1]) { varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(bref.pack(ul_tci_state_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(ul_pwr_ctrl_r17_present, 1)); - HANDLE_CODE(bref.pack(pucch_cfg_list_multicast1_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(pucch_cfg_list_multicast2_r17.is_present(), 1)); - if (ul_tci_state_list_r17.is_present()) { - HANDLE_CODE(ul_tci_state_list_r17->pack(bref)); - } - if (ul_pwr_ctrl_r17_present) { - HANDLE_CODE(pack_integer(bref, ul_pwr_ctrl_r17, (uint8_t)1u, (uint8_t)64u)); - } - if (pucch_cfg_list_multicast1_r17.is_present()) { - HANDLE_CODE(pucch_cfg_list_multicast1_r17->pack(bref)); - } - if (pucch_cfg_list_multicast2_r17.is_present()) { - HANDLE_CODE(pucch_cfg_list_multicast2_r17->pack(bref)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(pucch_cfg_multicast1_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(pucch_cfg_multicast2_r17.is_present(), 1)); - if (pucch_cfg_multicast1_r17.is_present()) { - HANDLE_CODE(pucch_cfg_multicast1_r17->pack(bref)); - } - if (pucch_cfg_multicast2_r17.is_present()) { - HANDLE_CODE(pucch_cfg_multicast2_r17->pack(bref)); - } - } - if (group_flags[3]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(pathloss_ref_rs_to_add_mod_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(pathloss_ref_rs_to_release_list_r17.is_present(), 1)); - if (pathloss_ref_rs_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *pathloss_ref_rs_to_add_mod_list_r17, 1, 64)); - } - if (pathloss_ref_rs_to_release_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *pathloss_ref_rs_to_release_list_r17, 1, 64, integer_packer(0, 63))); + HANDLE_CODE(bref.pack(position_in_dci_ai_rb_groups_v1720_present, 1)); + if (position_in_dci_ai_rb_groups_v1720_present) { + HANDLE_CODE(pack_integer(bref, position_in_dci_ai_rb_groups_v1720, (uint8_t)0u, (uint8_t)127u)); } } } return SRSASN_SUCCESS; } -SRSASN_CODE bwp_ul_ded_s::unpack(cbit_ref& bref) +SRSASN_CODE availability_combinations_per_cell_r16_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(cfg_grant_cfg_present, 1)); - HANDLE_CODE(bref.unpack(srs_cfg_present, 1)); - HANDLE_CODE(bref.unpack(beam_fail_recovery_cfg_present, 1)); + HANDLE_CODE(bref.unpack(position_in_dci_ai_r16_present, 1)); - if (pucch_cfg_present) { - HANDLE_CODE(pucch_cfg.unpack(bref)); - } - if (pusch_cfg_present) { - HANDLE_CODE(pusch_cfg.unpack(bref)); - } - if (cfg_grant_cfg_present) { - HANDLE_CODE(cfg_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)); + HANDLE_CODE(unpack_integer(availability_combinations_per_cell_idx_r16, bref, (uint16_t)0u, (uint16_t)512u)); + HANDLE_CODE(iab_du_cell_id_r16.unpack(bref)); + if (position_in_dci_ai_r16_present) { + HANDLE_CODE(unpack_integer(position_in_dci_ai_r16, bref, (uint8_t)0u, (uint8_t)127u)); } + HANDLE_CODE(unpack_dyn_seq_of(availability_combinations_r16, bref, 1, 512)); if (ext) { - ext_groups_unpacker_guard group_flags(4); + ext_groups_unpacker_guard group_flags(2); group_flags.unpack(bref); if (group_flags[0]) { varlength_field_unpack_guard varlen_scope(bref, false); - unpack_presence_flag(sl_pucch_cfg_r16, bref); - HANDLE_CODE(bref.unpack(cp_ext_c2_r16_present, 1)); - HANDLE_CODE(bref.unpack(cp_ext_c3_r16_present, 1)); - HANDLE_CODE(bref.unpack(use_interlace_pucch_pusch_r16_present, 1)); - unpack_presence_flag(pucch_cfg_list_r16, bref); - unpack_presence_flag(lbt_fail_recovery_cfg_r16, bref); - unpack_presence_flag(cfg_grant_cfg_to_add_mod_list_r16, bref); - unpack_presence_flag(cfg_grant_cfg_to_release_list_r16, bref); - unpack_presence_flag(cfg_grant_cfg_type2_deactivation_state_list_r16, bref); - if (sl_pucch_cfg_r16.is_present()) { - HANDLE_CODE(sl_pucch_cfg_r16->unpack(bref)); - } - if (cp_ext_c2_r16_present) { - HANDLE_CODE(unpack_integer(cp_ext_c2_r16, bref, (uint8_t)1u, (uint8_t)28u)); - } - if (cp_ext_c3_r16_present) { - HANDLE_CODE(unpack_integer(cp_ext_c3_r16, bref, (uint8_t)1u, (uint8_t)28u)); - } - if (pucch_cfg_list_r16.is_present()) { - HANDLE_CODE(pucch_cfg_list_r16->unpack(bref)); - } - if (lbt_fail_recovery_cfg_r16.is_present()) { - HANDLE_CODE(lbt_fail_recovery_cfg_r16->unpack(bref)); - } - if (cfg_grant_cfg_to_add_mod_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*cfg_grant_cfg_to_add_mod_list_r16, bref, 1, 12)); - } - if (cfg_grant_cfg_to_release_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*cfg_grant_cfg_to_release_list_r16, bref, 1, 12, integer_packer(0, 11))); - } - if (cfg_grant_cfg_type2_deactivation_state_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*cfg_grant_cfg_type2_deactivation_state_list_r16, - bref, - 1, - 16, - SeqOfPacker>(1, 12, integer_packer(0, 11)))); + unpack_presence_flag(availability_combinations_rb_groups_r17, bref); + if (availability_combinations_rb_groups_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*availability_combinations_rb_groups_r17, bref, 1, 512)); } } if (group_flags[1]) { varlength_field_unpack_guard varlen_scope(bref, false); - unpack_presence_flag(ul_tci_state_list_r17, bref); - HANDLE_CODE(bref.unpack(ul_pwr_ctrl_r17_present, 1)); - unpack_presence_flag(pucch_cfg_list_multicast1_r17, bref); - unpack_presence_flag(pucch_cfg_list_multicast2_r17, bref); - if (ul_tci_state_list_r17.is_present()) { - HANDLE_CODE(ul_tci_state_list_r17->unpack(bref)); - } - if (ul_pwr_ctrl_r17_present) { - HANDLE_CODE(unpack_integer(ul_pwr_ctrl_r17, bref, (uint8_t)1u, (uint8_t)64u)); - } - if (pucch_cfg_list_multicast1_r17.is_present()) { - HANDLE_CODE(pucch_cfg_list_multicast1_r17->unpack(bref)); - } - if (pucch_cfg_list_multicast2_r17.is_present()) { - HANDLE_CODE(pucch_cfg_list_multicast2_r17->unpack(bref)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(pucch_cfg_multicast1_r17, bref); - unpack_presence_flag(pucch_cfg_multicast2_r17, bref); - if (pucch_cfg_multicast1_r17.is_present()) { - HANDLE_CODE(pucch_cfg_multicast1_r17->unpack(bref)); - } - if (pucch_cfg_multicast2_r17.is_present()) { - HANDLE_CODE(pucch_cfg_multicast2_r17->unpack(bref)); - } - } - if (group_flags[3]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(pathloss_ref_rs_to_add_mod_list_r17, bref); - unpack_presence_flag(pathloss_ref_rs_to_release_list_r17, bref); - if (pathloss_ref_rs_to_add_mod_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*pathloss_ref_rs_to_add_mod_list_r17, bref, 1, 64)); - } - if (pathloss_ref_rs_to_release_list_r17.is_present()) { - HANDLE_CODE( - unpack_dyn_seq_of(*pathloss_ref_rs_to_release_list_r17, bref, 1, 64, integer_packer(0, 63))); + HANDLE_CODE(bref.unpack(position_in_dci_ai_rb_groups_v1720_present, 1)); + if (position_in_dci_ai_rb_groups_v1720_present) { + HANDLE_CODE(unpack_integer(position_in_dci_ai_rb_groups_v1720, bref, (uint8_t)0u, (uint8_t)127u)); } } } return SRSASN_SUCCESS; } -void bwp_ul_ded_s::to_json(json_writer& j) const +void availability_combinations_per_cell_r16_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 (cfg_grant_cfg_present) { - j.write_fieldname("configuredGrantConfig"); - cfg_grant_cfg.to_json(j); - } - if (srs_cfg_present) { - j.write_fieldname("srs-Config"); - srs_cfg.to_json(j); + j.write_int("availabilityCombinationsPerCellIndex-r16", availability_combinations_per_cell_idx_r16); + j.write_str("iab-DU-CellIdentity-r16", iab_du_cell_id_r16.to_string()); + if (position_in_dci_ai_r16_present) { + j.write_int("positionInDCI-AI-r16", position_in_dci_ai_r16); } - if (beam_fail_recovery_cfg_present) { - j.write_fieldname("beamFailureRecoveryConfig"); - beam_fail_recovery_cfg.to_json(j); + j.start_array("availabilityCombinations-r16"); + for (const auto& e1 : availability_combinations_r16) { + e1.to_json(j); } + j.end_array(); if (ext) { - if (sl_pucch_cfg_r16.is_present()) { - j.write_fieldname("sl-PUCCH-Config-r16"); - sl_pucch_cfg_r16->to_json(j); - } - if (cp_ext_c2_r16_present) { - j.write_int("cp-ExtensionC2-r16", cp_ext_c2_r16); - } - if (cp_ext_c3_r16_present) { - j.write_int("cp-ExtensionC3-r16", cp_ext_c3_r16); - } - if (use_interlace_pucch_pusch_r16_present) { - j.write_str("useInterlacePUCCH-PUSCH-r16", "enabled"); - } - if (pucch_cfg_list_r16.is_present()) { - j.write_fieldname("pucch-ConfigurationList-r16"); - pucch_cfg_list_r16->to_json(j); - } - if (lbt_fail_recovery_cfg_r16.is_present()) { - j.write_fieldname("lbt-FailureRecoveryConfig-r16"); - lbt_fail_recovery_cfg_r16->to_json(j); - } - if (cfg_grant_cfg_to_add_mod_list_r16.is_present()) { - j.start_array("configuredGrantConfigToAddModList-r16"); - for (const auto& e1 : *cfg_grant_cfg_to_add_mod_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (cfg_grant_cfg_to_release_list_r16.is_present()) { - j.start_array("configuredGrantConfigToReleaseList-r16"); - for (const auto& e1 : *cfg_grant_cfg_to_release_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (cfg_grant_cfg_type2_deactivation_state_list_r16.is_present()) { - j.start_array("configuredGrantConfigType2DeactivationStateList-r16"); - for (const auto& e1 : *cfg_grant_cfg_type2_deactivation_state_list_r16) { - j.start_array(); - for (const auto& e2 : e1) { - j.write_int(e2); - } - j.end_array(); - } - j.end_array(); - } - if (ul_tci_state_list_r17.is_present()) { - j.write_fieldname("ul-TCI-StateList-r17"); - ul_tci_state_list_r17->to_json(j); - } - if (ul_pwr_ctrl_r17_present) { - j.write_int("ul-powerControl-r17", ul_pwr_ctrl_r17); - } - if (pucch_cfg_list_multicast1_r17.is_present()) { - j.write_fieldname("pucch-ConfigurationListMulticast1-r17"); - pucch_cfg_list_multicast1_r17->to_json(j); - } - if (pucch_cfg_list_multicast2_r17.is_present()) { - j.write_fieldname("pucch-ConfigurationListMulticast2-r17"); - pucch_cfg_list_multicast2_r17->to_json(j); - } - if (pucch_cfg_multicast1_r17.is_present()) { - j.write_fieldname("pucch-ConfigMulticast1-r17"); - pucch_cfg_multicast1_r17->to_json(j); - } - if (pucch_cfg_multicast2_r17.is_present()) { - j.write_fieldname("pucch-ConfigMulticast2-r17"); - pucch_cfg_multicast2_r17->to_json(j); - } - if (pathloss_ref_rs_to_add_mod_list_r17.is_present()) { - j.start_array("pathlossReferenceRSToAddModList-r17"); - for (const auto& e1 : *pathloss_ref_rs_to_add_mod_list_r17) { + if (availability_combinations_rb_groups_r17.is_present()) { + j.start_array("availabilityCombinationsRB-Groups-r17"); + for (const auto& e1 : *availability_combinations_rb_groups_r17) { e1.to_json(j); } j.end_array(); } - if (pathloss_ref_rs_to_release_list_r17.is_present()) { - j.start_array("pathlossReferenceRSToReleaseList-r17"); - for (const auto& e1 : *pathloss_ref_rs_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); + if (position_in_dci_ai_rb_groups_v1720_present) { + j.write_int("positionInDCI-AI-RBGroups-v1720", position_in_dci_ai_rb_groups_v1720); } } j.end_obj(); } -void bwp_ul_ded_s::ul_tci_state_list_r17_c_::destroy_() -{ - switch (type_) { - case types::explicitlist: - c.destroy(); - break; - case types::unified_tci_state_ref_r17: - c.destroy(); - break; - default: - break; - } -} -void bwp_ul_ded_s::ul_tci_state_list_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::explicitlist: - c.init(); - break; - case types::unified_tci_state_ref_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "bwp_ul_ded_s::ul_tci_state_list_r17_c_"); - } -} -bwp_ul_ded_s::ul_tci_state_list_r17_c_::ul_tci_state_list_r17_c_(const bwp_ul_ded_s::ul_tci_state_list_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::explicitlist: - c.init(other.c.get()); - break; - case types::unified_tci_state_ref_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "bwp_ul_ded_s::ul_tci_state_list_r17_c_"); - } -} -bwp_ul_ded_s::ul_tci_state_list_r17_c_& -bwp_ul_ded_s::ul_tci_state_list_r17_c_::operator=(const bwp_ul_ded_s::ul_tci_state_list_r17_c_& other) +// AvailabilityIndicator-r16 ::= SEQUENCE +SRSASN_CODE availability_ind_r16_s::pack(bit_ref& bref) const { - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::explicitlist: - c.set(other.c.get()); - break; - case types::unified_tci_state_ref_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "bwp_ul_ded_s::ul_tci_state_list_r17_c_"); - } + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(available_comb_to_add_mod_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(available_comb_to_release_list_r16.size() > 0, 1)); - return *this; -} -bwp_ul_ded_s::ul_tci_state_list_r17_c_::explicitlist_s_& bwp_ul_ded_s::ul_tci_state_list_r17_c_::set_explicitlist() -{ - set(types::explicitlist); - return c.get(); -} -serving_cell_and_bwp_id_r17_s& bwp_ul_ded_s::ul_tci_state_list_r17_c_::set_unified_tci_state_ref_r17() -{ - set(types::unified_tci_state_ref_r17); - return c.get(); -} -void bwp_ul_ded_s::ul_tci_state_list_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::explicitlist: - j.write_fieldname("explicitlist"); - j.start_obj(); - if (c.get().ul_tci_to_add_mod_list_r17.size() > 0) { - j.start_array("ul-TCI-ToAddModList-r17"); - for (const auto& e1 : c.get().ul_tci_to_add_mod_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (c.get().ul_tci_to_release_list_r17.size() > 0) { - j.start_array("ul-TCI-ToReleaseList-r17"); - for (const auto& e1 : c.get().ul_tci_to_release_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); - break; - case types::unified_tci_state_ref_r17: - j.write_fieldname("unifiedTCI-StateRef-r17"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "bwp_ul_ded_s::ul_tci_state_list_r17_c_"); + HANDLE_CODE(pack_integer(bref, ai_rnti_r16, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(pack_integer(bref, dci_payload_size_ai_r16, (uint8_t)1u, (uint8_t)128u)); + if (available_comb_to_add_mod_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, available_comb_to_add_mod_list_r16, 1, 512)); } - j.end_obj(); -} -SRSASN_CODE bwp_ul_ded_s::ul_tci_state_list_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::explicitlist: - HANDLE_CODE(bref.pack(c.get().ul_tci_to_add_mod_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(c.get().ul_tci_to_release_list_r17.size() > 0, 1)); - if (c.get().ul_tci_to_add_mod_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, c.get().ul_tci_to_add_mod_list_r17, 1, 64)); - } - if (c.get().ul_tci_to_release_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of( - bref, c.get().ul_tci_to_release_list_r17, 1, 64, integer_packer(0, 63))); - } - break; - case types::unified_tci_state_ref_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "bwp_ul_ded_s::ul_tci_state_list_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; + if (available_comb_to_release_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, available_comb_to_release_list_r16, 1, 512, integer_packer(0, 512))); } + return SRSASN_SUCCESS; } -SRSASN_CODE bwp_ul_ded_s::ul_tci_state_list_r17_c_::unpack(cbit_ref& bref) +SRSASN_CODE availability_ind_r16_s::unpack(cbit_ref& bref) { - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::explicitlist: - bool ul_tci_to_add_mod_list_r17_present; - HANDLE_CODE(bref.unpack(ul_tci_to_add_mod_list_r17_present, 1)); - bool ul_tci_to_release_list_r17_present; - HANDLE_CODE(bref.unpack(ul_tci_to_release_list_r17_present, 1)); - if (ul_tci_to_add_mod_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(c.get().ul_tci_to_add_mod_list_r17, bref, 1, 64)); - } - if (ul_tci_to_release_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of( - c.get().ul_tci_to_release_list_r17, bref, 1, 64, integer_packer(0, 63))); - } - break; - case types::unified_tci_state_ref_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "bwp_ul_ded_s::ul_tci_state_list_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; + bref.unpack(ext, 1); + bool available_comb_to_add_mod_list_r16_present; + HANDLE_CODE(bref.unpack(available_comb_to_add_mod_list_r16_present, 1)); + bool available_comb_to_release_list_r16_present; + HANDLE_CODE(bref.unpack(available_comb_to_release_list_r16_present, 1)); + + HANDLE_CODE(unpack_integer(ai_rnti_r16, bref, (uint32_t)0u, (uint32_t)65535u)); + HANDLE_CODE(unpack_integer(dci_payload_size_ai_r16, bref, (uint8_t)1u, (uint8_t)128u)); + if (available_comb_to_add_mod_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(available_comb_to_add_mod_list_r16, bref, 1, 512)); } + if (available_comb_to_release_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(available_comb_to_release_list_r16, bref, 1, 512, integer_packer(0, 512))); + } + return SRSASN_SUCCESS; } - -// BWP-Uplink ::= SEQUENCE -SRSASN_CODE bwp_ul_s::pack(bit_ref& bref) const +void availability_ind_r16_s::to_json(json_writer& j) 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)); + j.start_obj(); + j.write_int("ai-RNTI-r16", ai_rnti_r16); + j.write_int("dci-PayloadSizeAI-r16", dci_payload_size_ai_r16); + if (available_comb_to_add_mod_list_r16.size() > 0) { + j.start_array("availableCombToAddModList-r16"); + for (const auto& e1 : available_comb_to_add_mod_list_r16) { + e1.to_json(j); + } + j.end_array(); } - if (bwp_ded_present) { - HANDLE_CODE(bwp_ded.pack(bref)); + if (available_comb_to_release_list_r16.size() > 0) { + j.start_array("availableCombToReleaseList-r16"); + for (const auto& e1 : available_comb_to_release_list_r16) { + j.write_int(e1); + } + j.end_array(); } + j.end_obj(); +} + +// AvailableRB-SetsPerCell-r16 ::= SEQUENCE +SRSASN_CODE available_rb_sets_per_cell_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, serving_cell_id_r16, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, position_in_dci_r16, (uint8_t)0u, (uint8_t)127u)); return SRSASN_SUCCESS; } -SRSASN_CODE bwp_ul_s::unpack(cbit_ref& bref) +SRSASN_CODE available_rb_sets_per_cell_r16_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(unpack_integer(serving_cell_id_r16, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(position_in_dci_r16, bref, (uint8_t)0u, (uint8_t)127u)); return SRSASN_SUCCESS; } -void bwp_ul_s::to_json(json_writer& j) const +void available_rb_sets_per_cell_r16_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_int("servingCellId-r16", serving_cell_id_r16); + j.write_int("positionInDCI-r16", position_in_dci_r16); j.end_obj(); } @@ -30277,6 +3086,12 @@ SRSASN_CODE csi_associated_report_cfg_info_s::res_for_ch_c_::unpack(cbit_ref& br return SRSASN_SUCCESS; } +const char* csi_associated_report_cfg_info_s::res_for_ch_c_::types_opts::to_string() const +{ + static const char* names[] = {"nzp-CSI-RS", "csi-SSB-ResourceSet"}; + return convert_enum_idx(names, 2, value, "csi_associated_report_cfg_info_s::res_for_ch_c_::types"); +} + void csi_associated_report_cfg_info_s::res_for_ch2_r17_c_::destroy_() { switch (type_) { @@ -30424,6 +3239,12 @@ SRSASN_CODE csi_associated_report_cfg_info_s::res_for_ch2_r17_c_::unpack(cbit_re return SRSASN_SUCCESS; } +const char* csi_associated_report_cfg_info_s::res_for_ch2_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"nzp-CSI-RS2-r17", "csi-SSB-ResourceSet2-r17"}; + return convert_enum_idx(names, 2, value, "csi_associated_report_cfg_info_s::res_for_ch2_r17_c_::types"); +} + // CSI-AperiodicTriggerState ::= SEQUENCE SRSASN_CODE csi_aperiodic_trigger_state_s::pack(bit_ref& bref) const { @@ -30703,6 +3524,17 @@ uint8_t csi_im_res_s::csi_im_res_elem_pattern_c_::pattern1_s_::subcarrier_locati numbers, 3, value, "csi_im_res_s::csi_im_res_elem_pattern_c_::pattern1_s_::subcarrier_location_p1_e_"); } +const char* csi_im_res_s::csi_im_res_elem_pattern_c_::types_opts::to_string() const +{ + static const char* names[] = {"pattern0", "pattern1"}; + return convert_enum_idx(names, 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 numbers[] = {0, 1}; + return map_enum_number(numbers, 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 { @@ -30998,6 +3830,18 @@ SRSASN_CODE csi_report_periodicity_and_offset_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* csi_report_periodicity_and_offset_c::types_opts::to_string() const +{ + static const char* names[] = { + "slots4", "slots5", "slots8", "slots10", "slots16", "slots20", "slots40", "slots80", "slots160", "slots320"}; + return convert_enum_idx(names, 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 numbers[] = {4, 5, 8, 10, 16, 20, 40, 80, 160, 320}; + return map_enum_number(numbers, 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 { @@ -31973,6 +4817,50 @@ SRSASN_CODE codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_sing return SRSASN_SUCCESS; } +const char* 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* names[] = {"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(names, + 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"); +} + +const char* 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* names[] = {"two", "moreThanTwo"}; + return convert_enum_idx( + names, + 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 numbers[] = {2}; + return map_enum_number( + numbers, + 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_) { @@ -32276,6 +5164,31 @@ codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_:: return SRSASN_SUCCESS; } +const char* +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 char* names[] = {"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( + names, + 8, + value, + "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::type_i_multi_panel_s_::ng_n1_n2_c_::types"); +} + +const char* codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"typeI-SinglePanel", "typeI-MultiPanel"}; + return convert_enum_idx(names, 2, value, "codebook_cfg_s::codebook_type_c_::type1_s_::sub_type_c_::types"); +} + void codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::destroy_() { switch (type_) { @@ -32879,6 +5792,29 @@ codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codeb return SRSASN_SUCCESS; } +const char* 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* names[] = {"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( + names, + 13, + value, + "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_s_::n1_n2_codebook_subset_restrict_c_::types"); +} + const char* codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_port_sel_s_::port_sel_sampling_size_opts::to_string() const @@ -32902,6 +5838,12 @@ codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_port_sel_s_::po "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_port_sel_s_::port_sel_sampling_size_e_"); } +const char* codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"typeII", "typeII-PortSelection"}; + return convert_enum_idx(names, 2, value, "codebook_cfg_s::codebook_type_c_::type2_s_::sub_type_c_::types"); +} + const char* codebook_cfg_s::codebook_type_c_::type2_s_::phase_alphabet_size_opts::to_string() const { static const char* names[] = {"n4", "n8"}; @@ -32924,6 +5866,17 @@ uint8_t codebook_cfg_s::codebook_type_c_::type2_s_::nof_beams_opts::to_number() return map_enum_number(numbers, 3, value, "codebook_cfg_s::codebook_type_c_::type2_s_::nof_beams_e_"); } +const char* codebook_cfg_s::codebook_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"type1", "type2"}; + return convert_enum_idx(names, 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 numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "codebook_cfg_s::codebook_type_c_::types"); +} + // CodebookConfig-r16 ::= SEQUENCE SRSASN_CODE codebook_cfg_r16_s::pack(bit_ref& bref) const { @@ -33567,6 +6520,29 @@ SRSASN_CODE codebook_cfg_r16_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii return SRSASN_SUCCESS; } +const char* codebook_cfg_r16_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_r16_s_:: + n1_n2_codebook_subset_restrict_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"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(names, + 13, + value, + "codebook_cfg_r16_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_r16_s_::n1_n2_codebook_" + "subset_restrict_r16_c_::types"); +} + const char* codebook_cfg_r16_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_port_sel_r16_s_:: port_sel_sampling_size_r16_opts::to_string() const { @@ -33588,6 +6564,23 @@ uint8_t codebook_cfg_r16_s::codebook_type_c_::type2_s_::sub_type_c_::type_ii_por "sel_sampling_size_r16_e_"); } +const char* codebook_cfg_r16_s::codebook_type_c_::type2_s_::sub_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"typeII-r16", "typeII-PortSelection-r16"}; + return convert_enum_idx(names, 2, value, "codebook_cfg_r16_s::codebook_type_c_::type2_s_::sub_type_c_::types"); +} + +const char* codebook_cfg_r16_s::codebook_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"type2"}; + return convert_enum_idx(names, 1, value, "codebook_cfg_r16_s::codebook_type_c_::types"); +} +uint8_t codebook_cfg_r16_s::codebook_type_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {2}; + return map_enum_number(numbers, 1, value, "codebook_cfg_r16_s::codebook_type_c_::types"); +} + // CodebookConfig-r17 ::= SEQUENCE SRSASN_CODE codebook_cfg_r17_s::pack(bit_ref& bref) const { @@ -34443,6 +7436,50 @@ SRSASN_CODE codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_ return SRSASN_SUCCESS; } +const char* codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group1_r17_s_::nr_of_ant_ports_c_:: + more_than_two_s_::n1_n2_c_::types_opts::to_string() const +{ + static const char* names[] = {"two-one-TypeI-SinglePanel-Restriction1-r17", + "two-two-TypeI-SinglePanel-Restriction1-r17", + "four-one-TypeI-SinglePanel-Restriction1-r17", + "three-two-TypeI-SinglePanel-Restriction1-r17", + "six-one-TypeI-SinglePanel-Restriction1-r17", + "four-two-TypeI-SinglePanel-Restriction1-r17", + "eight-one-TypeI-SinglePanel-Restriction1-r17", + "four-three-TypeI-SinglePanel-Restriction1-r17", + "six-two-TypeI-SinglePanel-Restriction1-r17", + "twelve-one-TypeI-SinglePanel-Restriction1-r17", + "four-four-TypeI-SinglePanel-Restriction1-r17", + "eight-two-TypeI-SinglePanel-Restriction1-r17", + "sixteen-one-TypeI-SinglePanel-Restriction1-r17"}; + return convert_enum_idx(names, + 13, + value, + "codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group1_r17_s_::nr_of_" + "ant_ports_c_::more_than_two_s_::n1_n2_c_::types"); +} + +const char* codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group1_r17_s_::nr_of_ant_ports_c_:: + types_opts::to_string() const +{ + static const char* names[] = {"two", "moreThanTwo"}; + return convert_enum_idx( + names, + 2, + value, + "codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group1_r17_s_::nr_of_ant_ports_c_::types"); +} +uint8_t codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group1_r17_s_::nr_of_ant_ports_c_:: + types_opts::to_number() const +{ + static const uint8_t numbers[] = {2}; + return map_enum_number( + numbers, + 1, + value, + "codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group1_r17_s_::nr_of_ant_ports_c_::types"); +} + void codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_ant_ports_c_::destroy_() { switch (type_) { @@ -35054,6 +8091,50 @@ SRSASN_CODE codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_ return SRSASN_SUCCESS; } +const char* codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_ant_ports_c_:: + more_than_two_s_::n1_n2_c_::types_opts::to_string() const +{ + static const char* names[] = {"two-one-TypeI-SinglePanel-Restriction2-r17", + "two-two-TypeI-SinglePanel-Restriction2-r17", + "four-one-TypeI-SinglePanel-Restriction2-r17", + "three-two-TypeI-SinglePanel-Restriction2-r17", + "six-one-TypeI-SinglePanel-Restriction2-r17", + "four-two-TypeI-SinglePanel-Restriction2-r17", + "eight-one-TypeI-SinglePanel-Restriction2-r17", + "four-three-TypeI-SinglePanel-Restriction2-r17", + "six-two-TypeI-SinglePanel-Restriction2-r17", + "twelve-one-TypeI-SinglePanel-Restriction2-r17", + "four-four-TypeI-SinglePanel-Restriction2-r17", + "eight-two-TypeI-SinglePanel-Restriction2-r17", + "sixteen-one-TypeI-SinglePanel-Restriction2-r17"}; + return convert_enum_idx(names, + 13, + value, + "codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_" + "ant_ports_c_::more_than_two_s_::n1_n2_c_::types"); +} + +const char* codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_ant_ports_c_:: + types_opts::to_string() const +{ + static const char* names[] = {"two", "moreThanTwo"}; + return convert_enum_idx( + names, + 2, + value, + "codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_ant_ports_c_::types"); +} +uint8_t codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_ant_ports_c_:: + types_opts::to_number() const +{ + static const uint8_t numbers[] = {2}; + return map_enum_number( + numbers, + 1, + value, + "codebook_cfg_r17_s::codebook_type_c_::type1_s_::type_i_single_panel_group2_r17_s_::nr_of_ant_ports_c_::types"); +} + const char* codebook_cfg_r17_s::codebook_type_c_::type2_s_::type_ii_port_sel_r17_s_::value_of_n_r17_opts::to_string() const { @@ -35068,6 +8149,17 @@ uint8_t codebook_cfg_r17_s::codebook_type_c_::type2_s_::type_ii_port_sel_r17_s_: numbers, 2, value, "codebook_cfg_r17_s::codebook_type_c_::type2_s_::type_ii_port_sel_r17_s_::value_of_n_r17_e_"); } +const char* codebook_cfg_r17_s::codebook_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"type1", "type2"}; + return convert_enum_idx(names, 2, value, "codebook_cfg_r17_s::codebook_type_c_::types"); +} +uint8_t codebook_cfg_r17_s::codebook_type_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "codebook_cfg_r17_s::codebook_type_c_::types"); +} + // CodebookConfig-v1730 ::= SEQUENCE SRSASN_CODE codebook_cfg_v1730_s::pack(bit_ref& bref) const { @@ -35117,6 +8209,17 @@ SRSASN_CODE codebook_cfg_v1730_s::codebook_type_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* codebook_cfg_v1730_s::codebook_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"type1"}; + return convert_enum_idx(names, 1, value, "codebook_cfg_v1730_s::codebook_type_c_::types"); +} +uint8_t codebook_cfg_v1730_s::codebook_type_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "codebook_cfg_v1730_s::codebook_type_c_::types"); +} + // PUCCH-CSI-Resource ::= SEQUENCE SRSASN_CODE pucch_csi_res_s::pack(bit_ref& bref) const { @@ -35530,6 +8633,17 @@ SRSASN_CODE port_idx_for8_ranks_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* port_idx_for8_ranks_c::types_opts::to_string() const +{ + static const char* names[] = {"portIndex8", "portIndex4", "portIndex2", "portIndex1"}; + return convert_enum_idx(names, 4, value, "port_idx_for8_ranks_c::types"); +} +uint8_t port_idx_for8_ranks_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {8, 4, 2, 1}; + return map_enum_number(numbers, 4, value, "port_idx_for8_ranks_c::types"); +} + // CSI-ReportConfig ::= SEQUENCE SRSASN_CODE csi_report_cfg_s::pack(bit_ref& bref) const { @@ -36388,6 +9502,12 @@ uint16_t csi_report_cfg_s::report_cfg_type_c_::semi_persistent_on_pusch_s_::repo numbers, 7, value, "csi_report_cfg_s::report_cfg_type_c_::semi_persistent_on_pusch_s_::report_slot_cfg_e_"); } +const char* csi_report_cfg_s::report_cfg_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"periodic", "semiPersistentOnPUCCH", "semiPersistentOnPUSCH", "aperiodic"}; + return convert_enum_idx(names, 4, value, "csi_report_cfg_s::report_cfg_type_c_::types"); +} + void csi_report_cfg_s::report_quant_c_::set(types::options e) { type_ = e; @@ -36532,6 +9652,19 @@ uint8_t csi_report_cfg_s::report_quant_c_::cri_ri_i1_cqi_s_::pdsch_bundle_size_f numbers, 2, value, "csi_report_cfg_s::report_quant_c_::cri_ri_i1_cqi_s_::pdsch_bundle_size_for_csi_e_"); } +const char* csi_report_cfg_s::report_quant_c_::types_opts::to_string() const +{ + static const char* names[] = {"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(names, 8, value, "csi_report_cfg_s::report_quant_c_::types"); +} + const char* csi_report_cfg_s::report_freq_cfg_s_::cqi_format_ind_opts::to_string() const { static const char* names[] = {"widebandCQI", "subbandCQI"}; @@ -37066,6 +10199,33 @@ SRSASN_CODE csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::unpack(cbi return SRSASN_SUCCESS; } +const char* csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::types_opts::to_string() const +{ + static const char* names[] = {"subbands3", + "subbands4", + "subbands5", + "subbands6", + "subbands7", + "subbands8", + "subbands9", + "subbands10", + "subbands11", + "subbands12", + "subbands13", + "subbands14", + "subbands15", + "subbands16", + "subbands17", + "subbands18", + "subbands19-v1530"}; + return convert_enum_idx(names, 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 numbers[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; + return map_enum_number(numbers, 17, value, "csi_report_cfg_s::report_freq_cfg_s_::csi_report_band_c_::types"); +} + const char* csi_report_cfg_s::time_restrict_for_ch_meass_opts::to_string() const { static const char* names[] = {"configured", "notConfigured"}; @@ -37173,6 +10333,12 @@ uint8_t csi_report_cfg_s::group_based_beam_report_c_::disabled_s_::nrof_reported numbers, 4, value, "csi_report_cfg_s::group_based_beam_report_c_::disabled_s_::nrof_reported_rs_e_"); } +const char* csi_report_cfg_s::group_based_beam_report_c_::types_opts::to_string() const +{ + static const char* names[] = {"enabled", "disabled"}; + return convert_enum_idx(names, 2, value, "csi_report_cfg_s::group_based_beam_report_c_::types"); +} + const char* csi_report_cfg_s::cqi_table_opts::to_string() const { static const char* names[] = {"table1", "table2", "table3", "table4-r17"}; @@ -37238,6 +10404,12 @@ SRSASN_CODE csi_report_cfg_s::report_quant_r16_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* csi_report_cfg_s::report_quant_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"cri-SINR-r16", "ssb-Index-SINR-r16"}; + return convert_enum_idx(names, 2, value, "csi_report_cfg_s::report_quant_r16_c_::types"); +} + const char* csi_report_cfg_s::group_based_beam_report_v1710_s_::nrof_reported_groups_r17_opts::to_string() const { static const char* names[] = {"n1", "n2", "n3", "n4"}; @@ -37311,6 +10483,13 @@ SRSASN_CODE csi_report_cfg_s::report_quant_r17_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* csi_report_cfg_s::report_quant_r17_c_::types_opts::to_string() const +{ + static const char* names[] = { + "cri-RSRP-Index-r17", "ssb-Index-RSRP-Index-r17", "cri-SINR-Index-r17", "ssb-Index-SINR-Index-r17"}; + return convert_enum_idx(names, 4, value, "csi_report_cfg_s::report_quant_r17_c_::types"); +} + // CSI-ResourceConfig ::= SEQUENCE SRSASN_CODE csi_res_cfg_s::pack(bit_ref& bref) const { @@ -37547,6 +10726,12 @@ SRSASN_CODE csi_res_cfg_s::csi_rs_res_set_list_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* csi_res_cfg_s::csi_rs_res_set_list_c_::types_opts::to_string() const +{ + static const char* names[] = {"nzp-CSI-RS-SSB", "csi-IM-ResourceSetList"}; + return convert_enum_idx(names, 2, value, "csi_res_cfg_s::csi_rs_res_set_list_c_::types"); +} + const char* csi_res_cfg_s::res_type_opts::to_string() const { static const char* names[] = {"aperiodic", "semiPersistent", "periodic"}; @@ -38386,6 +11571,12 @@ const char* dl_prs_qcl_info_r17_c::ssb_r17_s_::rs_type_r17_opts::to_string() con return convert_enum_idx(names, 3, value, "dl_prs_qcl_info_r17_c::ssb_r17_s_::rs_type_r17_e_"); } +const char* dl_prs_qcl_info_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"ssb-r17", "dl-PRS-r17"}; + return convert_enum_idx(names, 2, value, "dl_prs_qcl_info_r17_c::types"); +} + // SRS-CC-SetIndex ::= SEQUENCE SRSASN_CODE srs_cc_set_idx_s::pack(bit_ref& bref) const { @@ -39050,6 +12241,34 @@ SRSASN_CODE nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs15_r17_c_::u return SRSASN_SUCCESS; } +const char* nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs15_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"n4-r17", + "n5-r17", + "n8-r17", + "n10-r17", + "n16-r17", + "n20-r17", + "n32-r17", + "n40-r17", + "n64-r17", + "n80-r17", + "n160-r17", + "n320-r17", + "n640-r17", + "n1280-r17", + "n2560-r17", + "n5120-r17", + "n10240-r17"}; + return convert_enum_idx(names, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs15_r17_c_::types"); +} +uint16_t nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs15_r17_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560, 5120, 10240}; + return map_enum_number( + numbers, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs15_r17_c_::types"); +} + void nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs30_r17_c_::destroy_() {} void nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs30_r17_c_::set(types::options e) { @@ -39456,6 +12675,34 @@ SRSASN_CODE nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs30_r17_c_::u return SRSASN_SUCCESS; } +const char* nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs30_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"n8-r17", + "n10-r17", + "n16-r17", + "n20-r17", + "n32-r17", + "n40-r17", + "n64-r17", + "n80-r17", + "n128-r17", + "n160-r17", + "n320-r17", + "n640-r17", + "n1280-r17", + "n2560-r17", + "n5120-r17", + "n10240-r17", + "n20480-r17"}; + return convert_enum_idx(names, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs30_r17_c_::types"); +} +uint16_t nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs30_r17_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {8, 10, 16, 20, 32, 40, 64, 80, 128, 160, 320, 640, 1280, 2560, 5120, 10240, 20480}; + return map_enum_number( + numbers, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs30_r17_c_::types"); +} + void nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs60_r17_c_::destroy_() {} void nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs60_r17_c_::set(types::options e) { @@ -39862,6 +13109,35 @@ SRSASN_CODE nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs60_r17_c_::u return SRSASN_SUCCESS; } +const char* nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs60_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"n16-r17", + "n20-r17", + "n32-r17", + "n40-r17", + "n64-r17", + "n80-r17", + "n128-r17", + "n160-r17", + "n256-r17", + "n320-r17", + "n640-r17", + "n1280-r17", + "n2560-r17", + "n5120-r17", + "n10240-r17", + "n20480-r17", + "n40960-r17"}; + return convert_enum_idx(names, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs60_r17_c_::types"); +} +uint16_t nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs60_r17_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = { + 16, 20, 32, 40, 64, 80, 128, 160, 256, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960}; + return map_enum_number( + numbers, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs60_r17_c_::types"); +} + void nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs120_r17_c_::destroy_() {} void nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs120_r17_c_::set(types::options e) { @@ -40268,6 +13544,47 @@ SRSASN_CODE nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs120_r17_c_:: return SRSASN_SUCCESS; } +const char* nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs120_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"n32-r17", + "n40-r17", + "n64-r17", + "n80-r17", + "n128-r17", + "n160-r17", + "n256-r17", + "n320-r17", + "n512-r17", + "n640-r17", + "n1280-r17", + "n2560-r17", + "n5120-r17", + "n10240-r17", + "n20480-r17", + "n40960-r17", + "n81920-r17"}; + return convert_enum_idx( + names, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs120_r17_c_::types"); +} +uint32_t nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs120_r17_c_::types_opts::to_number() const +{ + static const uint32_t numbers[] = { + 32, 40, 64, 80, 128, 160, 256, 320, 512, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920}; + return map_enum_number( + numbers, 17, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::scs120_r17_c_::types"); +} + +const char* nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"scs15-r17", "scs30-r17", "scs60-r17", "scs120-r17"}; + return convert_enum_idx(names, 4, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::types"); +} +uint8_t nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {15, 30, 60, 120}; + return map_enum_number(numbers, 4, value, "nr_dl_prs_periodicity_and_res_set_slot_offset_r17_c::types"); +} + // NR-DL-PRS-Resource-r17 ::= SEQUENCE SRSASN_CODE nr_dl_prs_res_r17_s::pack(bit_ref& bref) const { @@ -40463,6 +13780,17 @@ SRSASN_CODE nr_dl_prs_res_r17_s::dl_prs_comb_size_n_and_re_offset_r17_c_::unpack return SRSASN_SUCCESS; } +const char* nr_dl_prs_res_r17_s::dl_prs_comb_size_n_and_re_offset_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"n2-r17", "n4-r17", "n6-r17", "n12-r17"}; + return convert_enum_idx(names, 4, value, "nr_dl_prs_res_r17_s::dl_prs_comb_size_n_and_re_offset_r17_c_::types"); +} +uint8_t nr_dl_prs_res_r17_s::dl_prs_comb_size_n_and_re_offset_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 6, 12}; + return map_enum_number(numbers, 4, value, "nr_dl_prs_res_r17_s::dl_prs_comb_size_n_and_re_offset_r17_c_::types"); +} + // P0AlphaSet-r17 ::= SEQUENCE SRSASN_CODE p0_alpha_set_r17_s::pack(bit_ref& bref) const { @@ -41395,6 +14723,12 @@ SRSASN_CODE srs_carrier_switching_s::srs_tpc_pdcch_group_c_::unpack(cbit_ref& br return SRSASN_SUCCESS; } +const char* srs_carrier_switching_s::srs_tpc_pdcch_group_c_::types_opts::to_string() const +{ + static const char* names[] = {"typeA", "typeB"}; + return convert_enum_idx(names, 2, value, "srs_carrier_switching_s::srs_tpc_pdcch_group_c_::types"); +} + // SSB-MTC-AdditionalPCI-r17 ::= SEQUENCE SRSASN_CODE ssb_mtc_add_pci_r17_s::pack(bit_ref& bref) const { @@ -41594,6 +14928,12 @@ SRSASN_CODE ssb_mtc_add_pci_r17_s::ssb_positions_in_burst_r17_c_::unpack(cbit_re return SRSASN_SUCCESS; } +const char* ssb_mtc_add_pci_r17_s::ssb_positions_in_burst_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"shortBitmap", "mediumBitmap", "longBitmap"}; + return convert_enum_idx(names, 3, value, "ssb_mtc_add_pci_r17_s::ssb_positions_in_burst_r17_c_::types"); +} + // SlotFormatIndicator ::= SEQUENCE SRSASN_CODE slot_format_ind_s::pack(bit_ref& bref) const { @@ -41955,6 +15295,12 @@ SRSASN_CODE tdd_ul_dl_slot_cfg_s::symbols_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* tdd_ul_dl_slot_cfg_s::symbols_c_::types_opts::to_string() const +{ + static const char* names[] = {"allDownlink", "allUplink", "explicit"}; + return convert_enum_idx(names, 3, value, "tdd_ul_dl_slot_cfg_s::symbols_c_::types"); +} + // TDD-UL-DL-SlotConfig-IAB-MT-r16 ::= SEQUENCE SRSASN_CODE tdd_ul_dl_slot_cfg_iab_mt_r16_s::pack(bit_ref& bref) const { @@ -42189,6 +15535,12 @@ SRSASN_CODE tdd_ul_dl_slot_cfg_iab_mt_r16_s::symbols_iab_mt_r16_c_::unpack(cbit_ return SRSASN_SUCCESS; } +const char* tdd_ul_dl_slot_cfg_iab_mt_r16_s::symbols_iab_mt_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"allDownlink-r16", "allUplink-r16", "explicit-r16", "explicit-IAB-MT-r16"}; + return convert_enum_idx(names, 4, value, "tdd_ul_dl_slot_cfg_iab_mt_r16_s::symbols_iab_mt_r16_c_::types"); +} + // Uplink-powerControl-r17 ::= SEQUENCE SRSASN_CODE ul_pwr_ctrl_r17_s::pack(bit_ref& bref) const { @@ -42474,6 +15826,12 @@ SRSASN_CODE ch_access_cfg_r16_s::energy_detection_cfg_r16_c_::unpack(cbit_ref& b return SRSASN_SUCCESS; } +const char* ch_access_cfg_r16_s::energy_detection_cfg_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"maxEnergyDetectionThreshold-r16", "energyDetectionThresholdOffset-r16"}; + return convert_enum_idx(names, 2, value, "ch_access_cfg_r16_s::energy_detection_cfg_r16_c_::types"); +} + // CrossCarrierSchedulingConfig ::= SEQUENCE SRSASN_CODE cross_carrier_sched_cfg_s::pack(bit_ref& bref) const { @@ -42699,6 +16057,12 @@ SRSASN_CODE cross_carrier_sched_cfg_s::sched_cell_info_c_::unpack(cbit_ref& bref return SRSASN_SUCCESS; } +const char* cross_carrier_sched_cfg_s::sched_cell_info_c_::types_opts::to_string() const +{ + static const char* names[] = {"own", "other"}; + return convert_enum_idx(names, 2, value, "cross_carrier_sched_cfg_s::sched_cell_info_c_::types"); +} + const char* cross_carrier_sched_cfg_s::ccs_blind_detection_split_r17_opts::to_string() const { static const char* names[] = { @@ -44479,6 +17843,17 @@ SRSASN_CODE serving_cell_cfg_s::ca_slot_offset_r16_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* serving_cell_cfg_s::ca_slot_offset_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"refSCS15kHz", "refSCS30KHz", "refSCS60KHz", "refSCS120KHz"}; + return convert_enum_idx(names, 4, value, "serving_cell_cfg_s::ca_slot_offset_r16_c_::types"); +} +uint8_t serving_cell_cfg_s::ca_slot_offset_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {15, 30, 60, 120}; + return map_enum_number(numbers, 4, value, "serving_cell_cfg_s::ca_slot_offset_r16_c_::types"); +} + const char* serving_cell_cfg_s::nrof_harq_bundling_groups_r17_opts::to_string() const { static const char* names[] = {"n1", "n2", "n4"}; diff --git a/lib/asn1/rrc_nr/sys_info.cpp b/lib/asn1/rrc_nr/sys_info.cpp new file mode 100644 index 0000000000..d8464771ef --- /dev/null +++ b/lib/asn1/rrc_nr/sys_info.cpp @@ -0,0 +1,11291 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/sys_info.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// EUTRA-NS-PmaxValue ::= SEQUENCE +SRSASN_CODE eutra_ns_pmax_value_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(add_pmax_present, 1)); + HANDLE_CODE(bref.pack(add_spec_emission_present, 1)); + + if (add_pmax_present) { + HANDLE_CODE(pack_integer(bref, add_pmax, (int8_t)-30, (int8_t)33)); + } + if (add_spec_emission_present) { + HANDLE_CODE(pack_integer(bref, add_spec_emission, (uint16_t)1u, (uint16_t)288u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE eutra_ns_pmax_value_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(add_pmax_present, 1)); + HANDLE_CODE(bref.unpack(add_spec_emission_present, 1)); + + if (add_pmax_present) { + HANDLE_CODE(unpack_integer(add_pmax, bref, (int8_t)-30, (int8_t)33)); + } + if (add_spec_emission_present) { + HANDLE_CODE(unpack_integer(add_spec_emission, bref, (uint16_t)1u, (uint16_t)288u)); + } + + return SRSASN_SUCCESS; +} +void eutra_ns_pmax_value_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (add_pmax_present) { + j.write_int("additionalPmax", add_pmax); + } + if (add_spec_emission_present) { + j.write_int("additionalSpectrumEmission", add_spec_emission); + } + j.end_obj(); +} + +// GNSS-ID-r16 ::= SEQUENCE +SRSASN_CODE gnss_id_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(gnss_id_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE gnss_id_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(gnss_id_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void gnss_id_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("gnss-id-r16", gnss_id_r16.to_string()); + j.end_obj(); +} + +const char* gnss_id_r16_s::gnss_id_r16_opts::to_string() const +{ + static const char* names[] = {"gps", "sbas", "qzss", "galileo", "glonass", "bds"}; + return convert_enum_idx(names, 6, value, "gnss_id_r16_s::gnss_id_r16_e_"); +} + +// PCI-Range ::= SEQUENCE +SRSASN_CODE pci_range_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(range_present, 1)); + + HANDLE_CODE(pack_integer(bref, start, (uint16_t)0u, (uint16_t)1007u)); + if (range_present) { + HANDLE_CODE(range.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pci_range_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(range_present, 1)); + + HANDLE_CODE(unpack_integer(start, bref, (uint16_t)0u, (uint16_t)1007u)); + if (range_present) { + HANDLE_CODE(range.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pci_range_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("start", start); + if (range_present) { + j.write_str("range", range.to_string()); + } + j.end_obj(); +} + +const char* pci_range_s::range_opts::to_string() const +{ + static const char* names[] = {"n4", + "n8", + "n12", + "n16", + "n24", + "n32", + "n48", + "n64", + "n84", + "n96", + "n128", + "n168", + "n252", + "n504", + "n1008", + "spare1"}; + return convert_enum_idx(names, 16, value, "pci_range_s::range_e_"); +} +uint16_t pci_range_s::range_opts::to_number() const +{ + static const uint16_t numbers[] = {4, 8, 12, 16, 24, 32, 48, 64, 84, 96, 128, 168, 252, 504, 1008}; + return map_enum_number(numbers, 15, value, "pci_range_s::range_e_"); +} + +// SBAS-ID-r16 ::= SEQUENCE +SRSASN_CODE sbas_id_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(sbas_id_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sbas_id_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(sbas_id_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sbas_id_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sbas-id-r16", sbas_id_r16.to_string()); + j.end_obj(); +} + +const char* sbas_id_r16_s::sbas_id_r16_opts::to_string() const +{ + static const char* names[] = {"waas", "egnos", "msas", "gagan"}; + return convert_enum_idx(names, 4, value, "sbas_id_r16_s::sbas_id_r16_e_"); +} + +// CellReselectionSubPriority ::= ENUMERATED +const char* cell_resel_sub_prio_opts::to_string() const +{ + static const char* names[] = {"oDot2", "oDot4", "oDot6", "oDot8"}; + return convert_enum_idx(names, 4, value, "cell_resel_sub_prio_e"); +} +float cell_resel_sub_prio_opts::to_number() const +{ + static const float numbers[] = {0.2, 0.4, 0.6, 0.8}; + return map_enum_number(numbers, 4, value, "cell_resel_sub_prio_e"); +} +const char* cell_resel_sub_prio_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.2", "0.4", "0.6", "0.8"}; + return convert_enum_idx(number_strs, 4, value, "cell_resel_sub_prio_e"); +} + +// EUTRA-Q-OffsetRange ::= ENUMERATED +const char* eutra_q_offset_range_opts::to_string() const +{ + static const char* names[] = {"dB-24", "dB-22", "dB-20", "dB-18", "dB-16", "dB-14", "dB-12", "dB-10", + "dB-8", "dB-6", "dB-5", "dB-4", "dB-3", "dB-2", "dB-1", "dB0", + "dB1", "dB2", "dB3", "dB4", "dB5", "dB6", "dB8", "dB10", + "dB12", "dB14", "dB16", "dB18", "dB20", "dB22", "dB24"}; + return convert_enum_idx(names, 31, value, "eutra_q_offset_range_e"); +} +int8_t eutra_q_offset_range_opts::to_number() const +{ + static const int8_t numbers[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, + 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return map_enum_number(numbers, 31, value, "eutra_q_offset_range_e"); +} + +// NSAG-IdentityInfo-r17 ::= SEQUENCE +SRSASN_CODE nsag_id_info_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(tac_r17_present, 1)); + + HANDLE_CODE(nsag_id_r17.pack(bref)); + if (tac_r17_present) { + HANDLE_CODE(tac_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE nsag_id_info_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(tac_r17_present, 1)); + + HANDLE_CODE(nsag_id_r17.unpack(bref)); + if (tac_r17_present) { + HANDLE_CODE(tac_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void nsag_id_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("nsag-ID-r17", nsag_id_r17.to_string()); + if (tac_r17_present) { + j.write_str("trackingAreaCode-r17", tac_r17.to_string()); + } + j.end_obj(); +} + +// Orbital-r17 ::= SEQUENCE +SRSASN_CODE orbital_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, semi_major_axis_r17, (uint64_t)0u, (uint64_t)8589934591u)); + HANDLE_CODE(pack_integer(bref, eccentricity_r17, (uint32_t)0u, (uint32_t)1048575u)); + HANDLE_CODE(pack_integer(bref, periapsis_r17, (uint32_t)0u, (uint32_t)268435455u)); + HANDLE_CODE(pack_integer(bref, longitude_r17, (uint32_t)0u, (uint32_t)268435455u)); + HANDLE_CODE(pack_integer(bref, inclination_r17, (int32_t)-67108864, (int32_t)67108863)); + HANDLE_CODE(pack_integer(bref, mean_anomaly_r17, (uint32_t)0u, (uint32_t)268435455u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE orbital_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(semi_major_axis_r17, bref, (uint64_t)0u, (uint64_t)8589934591u)); + HANDLE_CODE(unpack_integer(eccentricity_r17, bref, (uint32_t)0u, (uint32_t)1048575u)); + HANDLE_CODE(unpack_integer(periapsis_r17, bref, (uint32_t)0u, (uint32_t)268435455u)); + HANDLE_CODE(unpack_integer(longitude_r17, bref, (uint32_t)0u, (uint32_t)268435455u)); + HANDLE_CODE(unpack_integer(inclination_r17, bref, (int32_t)-67108864, (int32_t)67108863)); + HANDLE_CODE(unpack_integer(mean_anomaly_r17, bref, (uint32_t)0u, (uint32_t)268435455u)); + + return SRSASN_SUCCESS; +} +void orbital_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("semiMajorAxis-r17", semi_major_axis_r17); + j.write_int("eccentricity-r17", eccentricity_r17); + j.write_int("periapsis-r17", periapsis_r17); + j.write_int("longitude-r17", longitude_r17); + j.write_int("inclination-r17", inclination_r17); + j.write_int("meanAnomaly-r17", mean_anomaly_r17); + j.end_obj(); +} + +// PositionVelocity-r17 ::= SEQUENCE +SRSASN_CODE position_velocity_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, position_x_r17, (int32_t)-33554432, (int32_t)33554431)); + HANDLE_CODE(pack_integer(bref, position_y_r17, (int32_t)-33554432, (int32_t)33554431)); + HANDLE_CODE(pack_integer(bref, position_z_r17, (int32_t)-33554432, (int32_t)33554431)); + HANDLE_CODE(pack_integer(bref, velocity_vx_r17, (int32_t)-131072, (int32_t)131071)); + HANDLE_CODE(pack_integer(bref, velocity_vy_r17, (int32_t)-131072, (int32_t)131071)); + HANDLE_CODE(pack_integer(bref, velocity_vz_r17, (int32_t)-131072, (int32_t)131071)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE position_velocity_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(position_x_r17, bref, (int32_t)-33554432, (int32_t)33554431)); + HANDLE_CODE(unpack_integer(position_y_r17, bref, (int32_t)-33554432, (int32_t)33554431)); + HANDLE_CODE(unpack_integer(position_z_r17, bref, (int32_t)-33554432, (int32_t)33554431)); + HANDLE_CODE(unpack_integer(velocity_vx_r17, bref, (int32_t)-131072, (int32_t)131071)); + HANDLE_CODE(unpack_integer(velocity_vy_r17, bref, (int32_t)-131072, (int32_t)131071)); + HANDLE_CODE(unpack_integer(velocity_vz_r17, bref, (int32_t)-131072, (int32_t)131071)); + + return SRSASN_SUCCESS; +} +void position_velocity_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("positionX-r17", position_x_r17); + j.write_int("positionY-r17", position_y_r17); + j.write_int("positionZ-r17", position_z_r17); + j.write_int("velocityVX-r17", velocity_vx_r17); + j.write_int("velocityVY-r17", velocity_vy_r17); + j.write_int("velocityVZ-r17", velocity_vz_r17); + j.end_obj(); +} + +// Q-OffsetRange ::= ENUMERATED +const char* q_offset_range_opts::to_string() const +{ + static const char* names[] = {"dB-24", "dB-22", "dB-20", "dB-18", "dB-16", "dB-14", "dB-12", "dB-10", + "dB-8", "dB-6", "dB-5", "dB-4", "dB-3", "dB-2", "dB-1", "dB0", + "dB1", "dB2", "dB3", "dB4", "dB5", "dB6", "dB8", "dB10", + "dB12", "dB14", "dB16", "dB18", "dB20", "dB22", "dB24"}; + return convert_enum_idx(names, 31, value, "q_offset_range_e"); +} +int8_t q_offset_range_opts::to_number() const +{ + static const int8_t numbers[] = {-24, -22, -20, -18, -16, -14, -12, -10, -8, -6, -5, -4, -3, -2, -1, 0, + 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return map_enum_number(numbers, 31, value, "q_offset_range_e"); +} + +// SI-RequestResources ::= SEQUENCE +SRSASN_CODE si_request_res_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ra_assoc_period_idx_present, 1)); + HANDLE_CODE(bref.pack(ra_ssb_occasion_mask_idx_present, 1)); + + HANDLE_CODE(pack_integer(bref, ra_preamb_start_idx, (uint8_t)0u, (uint8_t)63u)); + if (ra_assoc_period_idx_present) { + HANDLE_CODE(pack_integer(bref, ra_assoc_period_idx, (uint8_t)0u, (uint8_t)15u)); + } + if (ra_ssb_occasion_mask_idx_present) { + HANDLE_CODE(pack_integer(bref, ra_ssb_occasion_mask_idx, (uint8_t)0u, (uint8_t)15u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE si_request_res_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ra_assoc_period_idx_present, 1)); + HANDLE_CODE(bref.unpack(ra_ssb_occasion_mask_idx_present, 1)); + + HANDLE_CODE(unpack_integer(ra_preamb_start_idx, bref, (uint8_t)0u, (uint8_t)63u)); + if (ra_assoc_period_idx_present) { + HANDLE_CODE(unpack_integer(ra_assoc_period_idx, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (ra_ssb_occasion_mask_idx_present) { + HANDLE_CODE(unpack_integer(ra_ssb_occasion_mask_idx, bref, (uint8_t)0u, (uint8_t)15u)); + } + + return SRSASN_SUCCESS; +} +void si_request_res_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ra-PreambleStartIndex", ra_preamb_start_idx); + if (ra_assoc_period_idx_present) { + j.write_int("ra-AssociationPeriodIndex", ra_assoc_period_idx); + } + if (ra_ssb_occasion_mask_idx_present) { + j.write_int("ra-ssb-OccasionMaskIndex", ra_ssb_occasion_mask_idx); + } + j.end_obj(); +} + +// SIB-TypeInfo-v1700 ::= SEQUENCE +SRSASN_CODE sib_type_info_v1700_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(value_tag_r17_present, 1)); + HANDLE_CODE(bref.pack(area_scope_r17_present, 1)); + + HANDLE_CODE(sib_type_r17.pack(bref)); + if (value_tag_r17_present) { + HANDLE_CODE(pack_integer(bref, value_tag_r17, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type_info_v1700_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(value_tag_r17_present, 1)); + HANDLE_CODE(bref.unpack(area_scope_r17_present, 1)); + + HANDLE_CODE(sib_type_r17.unpack(bref)); + if (value_tag_r17_present) { + HANDLE_CODE(unpack_integer(value_tag_r17, bref, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +void sib_type_info_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("sibType-r17"); + sib_type_r17.to_json(j); + if (value_tag_r17_present) { + j.write_int("valueTag-r17", value_tag_r17); + } + if (area_scope_r17_present) { + j.write_str("areaScope-r17", "true"); + } + j.end_obj(); +} + +void sib_type_info_v1700_s::sib_type_r17_c_::destroy_() +{ + switch (type_) { + case types::type2_r17: + c.destroy(); + break; + default: + break; + } +} +void sib_type_info_v1700_s::sib_type_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::type1_r17: + break; + case types::type2_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_type_info_v1700_s::sib_type_r17_c_"); + } +} +sib_type_info_v1700_s::sib_type_r17_c_::sib_type_r17_c_(const sib_type_info_v1700_s::sib_type_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::type1_r17: + c.init(other.c.get()); + break; + case types::type2_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_type_info_v1700_s::sib_type_r17_c_"); + } +} +sib_type_info_v1700_s::sib_type_r17_c_& +sib_type_info_v1700_s::sib_type_r17_c_::operator=(const sib_type_info_v1700_s::sib_type_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::type1_r17: + c.set(other.c.get()); + break; + case types::type2_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib_type_info_v1700_s::sib_type_r17_c_"); + } + + return *this; +} +sib_type_info_v1700_s::sib_type_r17_c_::type1_r17_e_& sib_type_info_v1700_s::sib_type_r17_c_::set_type1_r17() +{ + set(types::type1_r17); + return c.get(); +} +sib_type_info_v1700_s::sib_type_r17_c_::type2_r17_s_& sib_type_info_v1700_s::sib_type_r17_c_::set_type2_r17() +{ + set(types::type2_r17); + return c.get(); +} +void sib_type_info_v1700_s::sib_type_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::type1_r17: + j.write_str("type1-r17", c.get().to_string()); + break; + case types::type2_r17: + j.write_fieldname("type2-r17"); + j.start_obj(); + j.write_str("posSibType-r17", c.get().pos_sib_type_r17.to_string()); + if (c.get().encrypted_r17_present) { + j.write_str("encrypted-r17", "true"); + } + if (c.get().gnss_id_r17_present) { + j.write_fieldname("gnss-id-r17"); + c.get().gnss_id_r17.to_json(j); + } + if (c.get().sbas_id_r17_present) { + j.write_fieldname("sbas-id-r17"); + c.get().sbas_id_r17.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "sib_type_info_v1700_s::sib_type_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE sib_type_info_v1700_s::sib_type_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::type1_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::type2_r17: + HANDLE_CODE(bref.pack(c.get().encrypted_r17_present, 1)); + HANDLE_CODE(bref.pack(c.get().gnss_id_r17_present, 1)); + HANDLE_CODE(bref.pack(c.get().sbas_id_r17_present, 1)); + HANDLE_CODE(c.get().pos_sib_type_r17.pack(bref)); + if (c.get().gnss_id_r17_present) { + HANDLE_CODE(c.get().gnss_id_r17.pack(bref)); + } + if (c.get().sbas_id_r17_present) { + HANDLE_CODE(c.get().sbas_id_r17.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "sib_type_info_v1700_s::sib_type_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type_info_v1700_s::sib_type_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::type1_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::type2_r17: + HANDLE_CODE(bref.unpack(c.get().encrypted_r17_present, 1)); + HANDLE_CODE(bref.unpack(c.get().gnss_id_r17_present, 1)); + HANDLE_CODE(bref.unpack(c.get().sbas_id_r17_present, 1)); + HANDLE_CODE(c.get().pos_sib_type_r17.unpack(bref)); + if (c.get().gnss_id_r17_present) { + HANDLE_CODE(c.get().gnss_id_r17.unpack(bref)); + } + if (c.get().sbas_id_r17_present) { + HANDLE_CODE(c.get().sbas_id_r17.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "sib_type_info_v1700_s::sib_type_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* sib_type_info_v1700_s::sib_type_r17_c_::type1_r17_opts::to_string() const +{ + static const char* names[] = {"sibType15", + "sibType16", + "sibType17", + "sibType18", + "sibType19", + "sibType20", + "sibType21", + "spare9", + "spare8", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "sib_type_info_v1700_s::sib_type_r17_c_::type1_r17_e_"); +} +uint8_t sib_type_info_v1700_s::sib_type_r17_c_::type1_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {15, 16, 17, 18, 19, 20, 21}; + return map_enum_number(numbers, 7, value, "sib_type_info_v1700_s::sib_type_r17_c_::type1_r17_e_"); +} + +const char* sib_type_info_v1700_s::sib_type_r17_c_::type2_r17_s_::pos_sib_type_r17_opts::to_string() const +{ + static const char* names[] = {"posSibType1-9", + "posSibType1-10", + "posSibType2-24", + "posSibType2-25", + "posSibType6-4", + "posSibType6-5", + "posSibType6-6", + "spare9", + "spare8", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx( + names, 16, value, "sib_type_info_v1700_s::sib_type_r17_c_::type2_r17_s_::pos_sib_type_r17_e_"); +} + +const char* sib_type_info_v1700_s::sib_type_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"type1-r17", "type2-r17"}; + return convert_enum_idx(names, 2, value, "sib_type_info_v1700_s::sib_type_r17_c_::types"); +} +uint8_t sib_type_info_v1700_s::sib_type_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "sib_type_info_v1700_s::sib_type_r17_c_::types"); +} + +// SSB-PositionQCL-Relation-r16 ::= ENUMERATED +const char* ssb_position_qcl_relation_r16_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n4", "n8"}; + return convert_enum_idx(names, 4, value, "ssb_position_qcl_relation_r16_e"); +} +uint8_t ssb_position_qcl_relation_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "ssb_position_qcl_relation_r16_e"); +} + +// SSB-PositionQCL-Relation-r17 ::= ENUMERATED +const char* ssb_position_qcl_relation_r17_opts::to_string() const +{ + static const char* names[] = {"n32", "n64"}; + return convert_enum_idx(names, 2, value, "ssb_position_qcl_relation_r17_e"); +} +uint8_t ssb_position_qcl_relation_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {32, 64}; + return map_enum_number(numbers, 2, value, "ssb_position_qcl_relation_r17_e"); +} + +// EUTRA-FreqNeighCellInfo ::= SEQUENCE +SRSASN_CODE eutra_freq_neigh_cell_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(q_rx_lev_min_offset_cell_present, 1)); + 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(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)); + } + if (q_qual_min_offset_cell_present) { + HANDLE_CODE(pack_integer(bref, q_qual_min_offset_cell, (uint8_t)1u, (uint8_t)8u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE eutra_freq_neigh_cell_info_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(q_rx_lev_min_offset_cell_present, 1)); + 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(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)); + } + if (q_qual_min_offset_cell_present) { + HANDLE_CODE(unpack_integer(q_qual_min_offset_cell, bref, (uint8_t)1u, (uint8_t)8u)); + } + + return SRSASN_SUCCESS; +} +void eutra_freq_neigh_cell_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId", pci); + 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); + } + if (q_qual_min_offset_cell_present) { + j.write_int("q-QualMinOffsetCell", q_qual_min_offset_cell); + } + j.end_obj(); +} + +// EUTRA-MultiBandInfo ::= SEQUENCE +SRSASN_CODE eutra_multi_band_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(eutra_ns_pmax_list.size() > 0, 1)); + + HANDLE_CODE(pack_integer(bref, eutra_freq_band_ind, (uint16_t)1u, (uint16_t)256u)); + if (eutra_ns_pmax_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, eutra_ns_pmax_list, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE eutra_multi_band_info_s::unpack(cbit_ref& bref) +{ + bool eutra_ns_pmax_list_present; + HANDLE_CODE(bref.unpack(eutra_ns_pmax_list_present, 1)); + + HANDLE_CODE(unpack_integer(eutra_freq_band_ind, bref, (uint16_t)1u, (uint16_t)256u)); + if (eutra_ns_pmax_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(eutra_ns_pmax_list, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void eutra_multi_band_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("eutra-FreqBandIndicator", eutra_freq_band_ind); + if (eutra_ns_pmax_list.size() > 0) { + j.start_array("eutra-NS-PmaxList"); + for (const auto& e1 : eutra_ns_pmax_list) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// EUTRA-PhysCellIdRange ::= SEQUENCE +SRSASN_CODE eutra_pci_range_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(range_present, 1)); + + HANDLE_CODE(pack_integer(bref, start, (uint16_t)0u, (uint16_t)503u)); + if (range_present) { + HANDLE_CODE(range.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE eutra_pci_range_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(range_present, 1)); + + HANDLE_CODE(unpack_integer(start, bref, (uint16_t)0u, (uint16_t)503u)); + if (range_present) { + HANDLE_CODE(range.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void eutra_pci_range_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("start", start); + if (range_present) { + j.write_str("range", range.to_string()); + } + j.end_obj(); +} + +const char* eutra_pci_range_s::range_opts::to_string() const +{ + static const char* names[] = {"n4", + "n8", + "n12", + "n16", + "n24", + "n32", + "n48", + "n64", + "n84", + "n96", + "n128", + "n168", + "n252", + "n504", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "eutra_pci_range_s::range_e_"); +} +uint16_t eutra_pci_range_s::range_opts::to_number() const +{ + static const uint16_t numbers[] = {4, 8, 12, 16, 24, 32, 48, 64, 84, 96, 128, 168, 252, 504}; + return map_enum_number(numbers, 14, value, "eutra_pci_range_s::range_e_"); +} + +// EphemerisInfo-r17 ::= CHOICE +void ephemeris_info_r17_c::destroy_() +{ + switch (type_) { + case types::position_velocity_r17: + c.destroy(); + break; + case types::orbital_r17: + c.destroy(); + break; + default: + break; + } +} +void ephemeris_info_r17_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::position_velocity_r17: + c.init(); + break; + case types::orbital_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ephemeris_info_r17_c"); + } +} +ephemeris_info_r17_c::ephemeris_info_r17_c(const ephemeris_info_r17_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::position_velocity_r17: + c.init(other.c.get()); + break; + case types::orbital_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ephemeris_info_r17_c"); + } +} +ephemeris_info_r17_c& ephemeris_info_r17_c::operator=(const ephemeris_info_r17_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::position_velocity_r17: + c.set(other.c.get()); + break; + case types::orbital_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ephemeris_info_r17_c"); + } + + return *this; +} +position_velocity_r17_s& ephemeris_info_r17_c::set_position_velocity_r17() +{ + set(types::position_velocity_r17); + return c.get(); +} +orbital_r17_s& ephemeris_info_r17_c::set_orbital_r17() +{ + set(types::orbital_r17); + return c.get(); +} +void ephemeris_info_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::position_velocity_r17: + j.write_fieldname("positionVelocity-r17"); + c.get().to_json(j); + break; + case types::orbital_r17: + j.write_fieldname("orbital-r17"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "ephemeris_info_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE ephemeris_info_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::position_velocity_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::orbital_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ephemeris_info_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ephemeris_info_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::position_velocity_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::orbital_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ephemeris_info_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ephemeris_info_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"positionVelocity-r17", "orbital-r17"}; + return convert_enum_idx(names, 2, value, "ephemeris_info_r17_c::types"); +} + +// EpochTime-r17 ::= SEQUENCE +SRSASN_CODE epoch_time_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, sfn_r17, (uint16_t)0u, (uint16_t)1023u)); + HANDLE_CODE(pack_integer(bref, sub_frame_nr_r17, (uint8_t)0u, (uint8_t)9u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE epoch_time_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(sfn_r17, bref, (uint16_t)0u, (uint16_t)1023u)); + HANDLE_CODE(unpack_integer(sub_frame_nr_r17, bref, (uint8_t)0u, (uint8_t)9u)); + + return SRSASN_SUCCESS; +} +void epoch_time_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sfn-r17", sfn_r17); + j.write_int("subFrameNR-r17", sub_frame_nr_r17); + j.end_obj(); +} + +// InterFreqNeighCellInfo ::= SEQUENCE +SRSASN_CODE inter_freq_neigh_cell_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(q_rx_lev_min_offset_cell_present, 1)); + HANDLE_CODE(bref.pack(q_rx_lev_min_offset_cell_sul_present, 1)); + HANDLE_CODE(bref.pack(q_qual_min_offset_cell_present, 1)); + + HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(q_offset_cell.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)); + } + if (q_rx_lev_min_offset_cell_sul_present) { + HANDLE_CODE(pack_integer(bref, q_rx_lev_min_offset_cell_sul, (uint8_t)1u, (uint8_t)8u)); + } + if (q_qual_min_offset_cell_present) { + HANDLE_CODE(pack_integer(bref, q_qual_min_offset_cell, (uint8_t)1u, (uint8_t)8u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_neigh_cell_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(q_rx_lev_min_offset_cell_present, 1)); + HANDLE_CODE(bref.unpack(q_rx_lev_min_offset_cell_sul_present, 1)); + HANDLE_CODE(bref.unpack(q_qual_min_offset_cell_present, 1)); + + HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(q_offset_cell.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)); + } + if (q_rx_lev_min_offset_cell_sul_present) { + HANDLE_CODE(unpack_integer(q_rx_lev_min_offset_cell_sul, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (q_qual_min_offset_cell_present) { + HANDLE_CODE(unpack_integer(q_qual_min_offset_cell, bref, (uint8_t)1u, (uint8_t)8u)); + } + + return SRSASN_SUCCESS; +} +void inter_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()); + if (q_rx_lev_min_offset_cell_present) { + j.write_int("q-RxLevMinOffsetCell", q_rx_lev_min_offset_cell); + } + if (q_rx_lev_min_offset_cell_sul_present) { + j.write_int("q-RxLevMinOffsetCellSUL", q_rx_lev_min_offset_cell_sul); + } + if (q_qual_min_offset_cell_present) { + j.write_int("q-QualMinOffsetCell", q_qual_min_offset_cell); + } + j.end_obj(); +} + +// InterFreqNeighCellInfo-v1610 ::= SEQUENCE +SRSASN_CODE inter_freq_neigh_cell_info_v1610_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ssb_position_qcl_r16_present, 1)); + + if (ssb_position_qcl_r16_present) { + HANDLE_CODE(ssb_position_qcl_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_neigh_cell_info_v1610_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ssb_position_qcl_r16_present, 1)); + + if (ssb_position_qcl_r16_present) { + HANDLE_CODE(ssb_position_qcl_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_neigh_cell_info_v1610_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ssb_position_qcl_r16_present) { + j.write_str("ssb-PositionQCL-r16", ssb_position_qcl_r16.to_string()); + } + j.end_obj(); +} + +// InterFreqNeighCellInfo-v1710 ::= SEQUENCE +SRSASN_CODE inter_freq_neigh_cell_info_v1710_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ssb_position_qcl_r17_present, 1)); + + if (ssb_position_qcl_r17_present) { + HANDLE_CODE(ssb_position_qcl_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_neigh_cell_info_v1710_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ssb_position_qcl_r17_present, 1)); + + if (ssb_position_qcl_r17_present) { + HANDLE_CODE(ssb_position_qcl_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_neigh_cell_info_v1710_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ssb_position_qcl_r17_present) { + j.write_str("ssb-PositionQCL-r17", ssb_position_qcl_r17.to_string()); + } + j.end_obj(); +} + +// SI-RequestConfig ::= SEQUENCE +SRSASN_CODE si_request_cfg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rach_occasions_si_present, 1)); + HANDLE_CODE(bref.pack(si_request_period_present, 1)); + + if (rach_occasions_si_present) { + HANDLE_CODE(rach_occasions_si.rach_cfg_si.pack(bref)); + HANDLE_CODE(rach_occasions_si.ssb_per_rach_occasion.pack(bref)); + } + if (si_request_period_present) { + HANDLE_CODE(si_request_period.pack(bref)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, si_request_res, 1, 32)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE si_request_cfg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rach_occasions_si_present, 1)); + HANDLE_CODE(bref.unpack(si_request_period_present, 1)); + + if (rach_occasions_si_present) { + HANDLE_CODE(rach_occasions_si.rach_cfg_si.unpack(bref)); + HANDLE_CODE(rach_occasions_si.ssb_per_rach_occasion.unpack(bref)); + } + if (si_request_period_present) { + HANDLE_CODE(si_request_period.unpack(bref)); + } + HANDLE_CODE(unpack_dyn_seq_of(si_request_res, bref, 1, 32)); + + return SRSASN_SUCCESS; +} +void si_request_cfg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rach_occasions_si_present) { + j.write_fieldname("rach-OccasionsSI"); + j.start_obj(); + j.write_fieldname("rach-ConfigSI"); + rach_occasions_si.rach_cfg_si.to_json(j); + j.write_str("ssb-perRACH-Occasion", rach_occasions_si.ssb_per_rach_occasion.to_string()); + j.end_obj(); + } + if (si_request_period_present) { + j.write_str("si-RequestPeriod", si_request_period.to_string()); + } + j.start_array("si-RequestResources"); + for (const auto& e1 : si_request_res) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +const char* si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_opts::to_string() const +{ + static const char* names[] = {"oneEighth", "oneFourth", "oneHalf", "one", "two", "four", "eight", "sixteen"}; + return convert_enum_idx(names, 8, value, "si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_e_"); +} +float si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_opts::to_number() const +{ + static const float numbers[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 6.0}; + return map_enum_number(numbers, 8, value, "si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_e_"); +} +const char* si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_opts::to_number_string() const +{ + static const char* number_strs[] = {"1/8", "1/4", "1/2", "1", "2", "4", "8", "6"}; + return convert_enum_idx(number_strs, 8, value, "si_request_cfg_s::rach_occasions_si_s_::ssb_per_rach_occasion_e_"); +} + +const char* si_request_cfg_s::si_request_period_opts::to_string() const +{ + static const char* names[] = {"one", "two", "four", "six", "eight", "ten", "twelve", "sixteen"}; + return convert_enum_idx(names, 8, value, "si_request_cfg_s::si_request_period_e_"); +} + +// SSB-MTC4-r17 ::= SEQUENCE +SRSASN_CODE ssb_mtc4_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pci_list_r17.size() > 0, 1)); + + if (pci_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, pci_list_r17, 1, 64, integer_packer(0, 1007))); + } + HANDLE_CODE(pack_integer(bref, offset_r17, (uint8_t)0u, (uint8_t)159u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ssb_mtc4_r17_s::unpack(cbit_ref& bref) +{ + bool pci_list_r17_present; + HANDLE_CODE(bref.unpack(pci_list_r17_present, 1)); + + if (pci_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(pci_list_r17, bref, 1, 64, integer_packer(0, 1007))); + } + HANDLE_CODE(unpack_integer(offset_r17, bref, (uint8_t)0u, (uint8_t)159u)); + + return SRSASN_SUCCESS; +} +void ssb_mtc4_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pci_list_r17.size() > 0) { + j.start_array("pci-List-r17"); + for (const auto& e1 : pci_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + j.write_int("offset-r17", offset_r17); + j.end_obj(); +} + +// SliceInfo-r17 ::= SEQUENCE +SRSASN_CODE slice_info_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(nsag_cell_resel_prio_r17_present, 1)); + HANDLE_CODE(bref.pack(nsag_cell_resel_sub_prio_r17_present, 1)); + HANDLE_CODE(bref.pack(slice_cell_list_nr_r17_present, 1)); + + HANDLE_CODE(nsag_id_info_r17.pack(bref)); + if (nsag_cell_resel_prio_r17_present) { + HANDLE_CODE(pack_integer(bref, nsag_cell_resel_prio_r17, (uint8_t)0u, (uint8_t)7u)); + } + if (nsag_cell_resel_sub_prio_r17_present) { + HANDLE_CODE(nsag_cell_resel_sub_prio_r17.pack(bref)); + } + if (slice_cell_list_nr_r17_present) { + HANDLE_CODE(slice_cell_list_nr_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE slice_info_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(nsag_cell_resel_prio_r17_present, 1)); + HANDLE_CODE(bref.unpack(nsag_cell_resel_sub_prio_r17_present, 1)); + HANDLE_CODE(bref.unpack(slice_cell_list_nr_r17_present, 1)); + + HANDLE_CODE(nsag_id_info_r17.unpack(bref)); + if (nsag_cell_resel_prio_r17_present) { + HANDLE_CODE(unpack_integer(nsag_cell_resel_prio_r17, bref, (uint8_t)0u, (uint8_t)7u)); + } + if (nsag_cell_resel_sub_prio_r17_present) { + HANDLE_CODE(nsag_cell_resel_sub_prio_r17.unpack(bref)); + } + if (slice_cell_list_nr_r17_present) { + HANDLE_CODE(slice_cell_list_nr_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void slice_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("nsag-IdentityInfo-r17"); + nsag_id_info_r17.to_json(j); + if (nsag_cell_resel_prio_r17_present) { + j.write_int("nsag-CellReselectionPriority-r17", nsag_cell_resel_prio_r17); + } + if (nsag_cell_resel_sub_prio_r17_present) { + j.write_str("nsag-CellReselectionSubPriority-r17", nsag_cell_resel_sub_prio_r17.to_string()); + } + if (slice_cell_list_nr_r17_present) { + j.write_fieldname("sliceCellListNR-r17"); + slice_cell_list_nr_r17.to_json(j); + } + j.end_obj(); +} + +void slice_info_r17_s::slice_cell_list_nr_r17_c_::destroy_() +{ + switch (type_) { + case types::slice_allowed_cell_list_nr_r17: + c.destroy(); + break; + case types::slice_excluded_cell_list_nr_r17: + c.destroy(); + break; + default: + break; + } +} +void slice_info_r17_s::slice_cell_list_nr_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::slice_allowed_cell_list_nr_r17: + c.init(); + break; + case types::slice_excluded_cell_list_nr_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "slice_info_r17_s::slice_cell_list_nr_r17_c_"); + } +} +slice_info_r17_s::slice_cell_list_nr_r17_c_::slice_cell_list_nr_r17_c_( + const slice_info_r17_s::slice_cell_list_nr_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::slice_allowed_cell_list_nr_r17: + c.init(other.c.get()); + break; + case types::slice_excluded_cell_list_nr_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "slice_info_r17_s::slice_cell_list_nr_r17_c_"); + } +} +slice_info_r17_s::slice_cell_list_nr_r17_c_& +slice_info_r17_s::slice_cell_list_nr_r17_c_::operator=(const slice_info_r17_s::slice_cell_list_nr_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::slice_allowed_cell_list_nr_r17: + c.set(other.c.get()); + break; + case types::slice_excluded_cell_list_nr_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "slice_info_r17_s::slice_cell_list_nr_r17_c_"); + } + + return *this; +} +slice_cell_list_nr_r17_l& slice_info_r17_s::slice_cell_list_nr_r17_c_::set_slice_allowed_cell_list_nr_r17() +{ + set(types::slice_allowed_cell_list_nr_r17); + return c.get(); +} +slice_cell_list_nr_r17_l& slice_info_r17_s::slice_cell_list_nr_r17_c_::set_slice_excluded_cell_list_nr_r17() +{ + set(types::slice_excluded_cell_list_nr_r17); + return c.get(); +} +void slice_info_r17_s::slice_cell_list_nr_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::slice_allowed_cell_list_nr_r17: + j.start_array("sliceAllowedCellListNR-r17"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::slice_excluded_cell_list_nr_r17: + j.start_array("sliceExcludedCellListNR-r17"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "slice_info_r17_s::slice_cell_list_nr_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE slice_info_r17_s::slice_cell_list_nr_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::slice_allowed_cell_list_nr_r17: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 16)); + break; + case types::slice_excluded_cell_list_nr_r17: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 16)); + break; + default: + log_invalid_choice_id(type_, "slice_info_r17_s::slice_cell_list_nr_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE slice_info_r17_s::slice_cell_list_nr_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::slice_allowed_cell_list_nr_r17: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 16)); + break; + case types::slice_excluded_cell_list_nr_r17: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 16)); + break; + default: + log_invalid_choice_id(type_, "slice_info_r17_s::slice_cell_list_nr_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* slice_info_r17_s::slice_cell_list_nr_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"sliceAllowedCellListNR-r17", "sliceExcludedCellListNR-r17"}; + return convert_enum_idx(names, 2, value, "slice_info_r17_s::slice_cell_list_nr_r17_c_::types"); +} + +// TA-Info-r17 ::= SEQUENCE +SRSASN_CODE ta_info_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ta_common_drift_r17_present, 1)); + HANDLE_CODE(bref.pack(ta_common_drift_variant_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, ta_common_r17, (uint32_t)0u, (uint32_t)66485757u)); + if (ta_common_drift_r17_present) { + HANDLE_CODE(pack_integer(bref, ta_common_drift_r17, (int32_t)-257303, (int32_t)257303)); + } + if (ta_common_drift_variant_r17_present) { + HANDLE_CODE(pack_integer(bref, ta_common_drift_variant_r17, (uint16_t)0u, (uint16_t)28949u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ta_info_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ta_common_drift_r17_present, 1)); + HANDLE_CODE(bref.unpack(ta_common_drift_variant_r17_present, 1)); + + HANDLE_CODE(unpack_integer(ta_common_r17, bref, (uint32_t)0u, (uint32_t)66485757u)); + if (ta_common_drift_r17_present) { + HANDLE_CODE(unpack_integer(ta_common_drift_r17, bref, (int32_t)-257303, (int32_t)257303)); + } + if (ta_common_drift_variant_r17_present) { + HANDLE_CODE(unpack_integer(ta_common_drift_variant_r17, bref, (uint16_t)0u, (uint16_t)28949u)); + } + + return SRSASN_SUCCESS; +} +void ta_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ta-Common-r17", ta_common_r17); + if (ta_common_drift_r17_present) { + j.write_int("ta-CommonDrift-r17", ta_common_drift_r17); + } + if (ta_common_drift_variant_r17_present) { + j.write_int("ta-CommonDriftVariant-r17", ta_common_drift_variant_r17); + } + j.end_obj(); +} + +// BeamMeasConfigIdle-NR-r16 ::= SEQUENCE +SRSASN_CODE beam_meas_cfg_idle_nr_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(report_quant_rs_idxes_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, max_nrof_rs_idxes_to_report_r16, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(bref.pack(include_beam_meass_r16, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE beam_meas_cfg_idle_nr_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(report_quant_rs_idxes_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(max_nrof_rs_idxes_to_report_r16, bref, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(bref.unpack(include_beam_meass_r16, 1)); + + return SRSASN_SUCCESS; +} +void beam_meas_cfg_idle_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("reportQuantityRS-Indexes-r16", report_quant_rs_idxes_r16.to_string()); + j.write_int("maxNrofRS-IndexesToReport-r16", max_nrof_rs_idxes_to_report_r16); + j.write_bool("includeBeamMeasurements-r16", include_beam_meass_r16); + j.end_obj(); +} + +const char* beam_meas_cfg_idle_nr_r16_s::report_quant_rs_idxes_r16_opts::to_string() const +{ + static const char* names[] = {"rsrp", "rsrq", "both"}; + return convert_enum_idx(names, 3, value, "beam_meas_cfg_idle_nr_r16_s::report_quant_rs_idxes_r16_e_"); +} + +// CAG-IdentityInfo-r16 ::= SEQUENCE +SRSASN_CODE cag_id_info_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(manual_ca_gsel_allowed_r16_present, 1)); + + HANDLE_CODE(cag_id_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cag_id_info_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(manual_ca_gsel_allowed_r16_present, 1)); + + HANDLE_CODE(cag_id_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cag_id_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("cag-Identity-r16", cag_id_r16.to_string()); + if (manual_ca_gsel_allowed_r16_present) { + j.write_str("manualCAGselectionAllowed-r16", "true"); + } + j.end_obj(); +} + +// EUTRA-AllowedMeasBandwidth ::= ENUMERATED +const char* eutra_allowed_meas_bw_opts::to_string() const +{ + static const char* names[] = {"mbw6", "mbw15", "mbw25", "mbw50", "mbw75", "mbw100"}; + return convert_enum_idx(names, 6, value, "eutra_allowed_meas_bw_e"); +} +uint8_t eutra_allowed_meas_bw_opts::to_number() const +{ + static const uint8_t numbers[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(numbers, 6, value, "eutra_allowed_meas_bw_e"); +} + +// InterFreqCAG-CellListPerPLMN-r16 ::= SEQUENCE +SRSASN_CODE inter_freq_cag_cell_list_per_plmn_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, plmn_id_idx_r16, (uint8_t)1u, (uint8_t)12u)); + HANDLE_CODE(pack_dyn_seq_of(bref, cag_cell_list_r16, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_cag_cell_list_per_plmn_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(plmn_id_idx_r16, bref, (uint8_t)1u, (uint8_t)12u)); + HANDLE_CODE(unpack_dyn_seq_of(cag_cell_list_r16, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void inter_freq_cag_cell_list_per_plmn_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("plmn-IdentityIndex-r16", plmn_id_idx_r16); + j.start_array("cag-CellList-r16"); + for (const auto& e1 : cag_cell_list_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// NTN-Config-r17 ::= SEQUENCE +SRSASN_CODE ntn_cfg_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(epoch_time_r17_present, 1)); + HANDLE_CODE(bref.pack(ntn_ul_sync_validity_dur_r17_present, 1)); + HANDLE_CODE(bref.pack(cell_specific_koffset_r17_present, 1)); + HANDLE_CODE(bref.pack(kmac_r17_present, 1)); + HANDLE_CODE(bref.pack(ta_info_r17_present, 1)); + HANDLE_CODE(bref.pack(ntn_polarization_dl_r17_present, 1)); + HANDLE_CODE(bref.pack(ntn_polarization_ul_r17_present, 1)); + HANDLE_CODE(bref.pack(ephemeris_info_r17_present, 1)); + HANDLE_CODE(bref.pack(ta_report_r17_present, 1)); + + if (epoch_time_r17_present) { + HANDLE_CODE(epoch_time_r17.pack(bref)); + } + if (ntn_ul_sync_validity_dur_r17_present) { + HANDLE_CODE(ntn_ul_sync_validity_dur_r17.pack(bref)); + } + if (cell_specific_koffset_r17_present) { + HANDLE_CODE(pack_integer(bref, cell_specific_koffset_r17, (uint16_t)1u, (uint16_t)1023u)); + } + if (kmac_r17_present) { + HANDLE_CODE(pack_integer(bref, kmac_r17, (uint16_t)1u, (uint16_t)512u)); + } + if (ta_info_r17_present) { + HANDLE_CODE(ta_info_r17.pack(bref)); + } + if (ntn_polarization_dl_r17_present) { + HANDLE_CODE(ntn_polarization_dl_r17.pack(bref)); + } + if (ntn_polarization_ul_r17_present) { + HANDLE_CODE(ntn_polarization_ul_r17.pack(bref)); + } + if (ephemeris_info_r17_present) { + HANDLE_CODE(ephemeris_info_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ntn_cfg_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(epoch_time_r17_present, 1)); + HANDLE_CODE(bref.unpack(ntn_ul_sync_validity_dur_r17_present, 1)); + HANDLE_CODE(bref.unpack(cell_specific_koffset_r17_present, 1)); + HANDLE_CODE(bref.unpack(kmac_r17_present, 1)); + HANDLE_CODE(bref.unpack(ta_info_r17_present, 1)); + HANDLE_CODE(bref.unpack(ntn_polarization_dl_r17_present, 1)); + HANDLE_CODE(bref.unpack(ntn_polarization_ul_r17_present, 1)); + HANDLE_CODE(bref.unpack(ephemeris_info_r17_present, 1)); + HANDLE_CODE(bref.unpack(ta_report_r17_present, 1)); + + if (epoch_time_r17_present) { + HANDLE_CODE(epoch_time_r17.unpack(bref)); + } + if (ntn_ul_sync_validity_dur_r17_present) { + HANDLE_CODE(ntn_ul_sync_validity_dur_r17.unpack(bref)); + } + if (cell_specific_koffset_r17_present) { + HANDLE_CODE(unpack_integer(cell_specific_koffset_r17, bref, (uint16_t)1u, (uint16_t)1023u)); + } + if (kmac_r17_present) { + HANDLE_CODE(unpack_integer(kmac_r17, bref, (uint16_t)1u, (uint16_t)512u)); + } + if (ta_info_r17_present) { + HANDLE_CODE(ta_info_r17.unpack(bref)); + } + if (ntn_polarization_dl_r17_present) { + HANDLE_CODE(ntn_polarization_dl_r17.unpack(bref)); + } + if (ntn_polarization_ul_r17_present) { + HANDLE_CODE(ntn_polarization_ul_r17.unpack(bref)); + } + if (ephemeris_info_r17_present) { + HANDLE_CODE(ephemeris_info_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ntn_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (epoch_time_r17_present) { + j.write_fieldname("epochTime-r17"); + epoch_time_r17.to_json(j); + } + if (ntn_ul_sync_validity_dur_r17_present) { + j.write_str("ntn-UlSyncValidityDuration-r17", ntn_ul_sync_validity_dur_r17.to_string()); + } + if (cell_specific_koffset_r17_present) { + j.write_int("cellSpecificKoffset-r17", cell_specific_koffset_r17); + } + if (kmac_r17_present) { + j.write_int("kmac-r17", kmac_r17); + } + if (ta_info_r17_present) { + j.write_fieldname("ta-Info-r17"); + ta_info_r17.to_json(j); + } + if (ntn_polarization_dl_r17_present) { + j.write_str("ntn-PolarizationDL-r17", ntn_polarization_dl_r17.to_string()); + } + if (ntn_polarization_ul_r17_present) { + j.write_str("ntn-PolarizationUL-r17", ntn_polarization_ul_r17.to_string()); + } + if (ephemeris_info_r17_present) { + j.write_fieldname("ephemerisInfo-r17"); + ephemeris_info_r17.to_json(j); + } + if (ta_report_r17_present) { + j.write_str("ta-Report-r17", "enabled"); + } + j.end_obj(); +} + +const char* ntn_cfg_r17_s::ntn_ul_sync_validity_dur_r17_opts::to_string() const +{ + static const char* names[] = {"s5", + "s10", + "s15", + "s20", + "s25", + "s30", + "s35", + "s40", + "s45", + "s50", + "s55", + "s60", + "s120", + "s180", + "s240", + "s900"}; + return convert_enum_idx(names, 16, value, "ntn_cfg_r17_s::ntn_ul_sync_validity_dur_r17_e_"); +} +uint16_t ntn_cfg_r17_s::ntn_ul_sync_validity_dur_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 120, 180, 240, 900}; + return map_enum_number(numbers, 16, value, "ntn_cfg_r17_s::ntn_ul_sync_validity_dur_r17_e_"); +} + +const char* ntn_cfg_r17_s::ntn_polarization_dl_r17_opts::to_string() const +{ + static const char* names[] = {"rhcp", "lhcp", "linear"}; + return convert_enum_idx(names, 3, value, "ntn_cfg_r17_s::ntn_polarization_dl_r17_e_"); +} + +const char* ntn_cfg_r17_s::ntn_polarization_ul_r17_opts::to_string() const +{ + static const char* names[] = {"rhcp", "lhcp", "linear"}; + return convert_enum_idx(names, 3, value, "ntn_cfg_r17_s::ntn_polarization_ul_r17_e_"); +} + +// PDSCH-ConfigPTM-r17 ::= SEQUENCE +SRSASN_CODE pdsch_cfg_ptm_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(data_scrambling_id_pdsch_r17_present, 1)); + HANDLE_CODE(bref.pack(dmrs_scrambling_id0_r17_present, 1)); + HANDLE_CODE(bref.pack(pdsch_aggregation_factor_r17_present, 1)); + + if (data_scrambling_id_pdsch_r17_present) { + HANDLE_CODE(pack_integer(bref, data_scrambling_id_pdsch_r17, (uint16_t)0u, (uint16_t)1023u)); + } + if (dmrs_scrambling_id0_r17_present) { + HANDLE_CODE(pack_integer(bref, dmrs_scrambling_id0_r17, (uint32_t)0u, (uint32_t)65535u)); + } + if (pdsch_aggregation_factor_r17_present) { + HANDLE_CODE(pdsch_aggregation_factor_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_ptm_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(data_scrambling_id_pdsch_r17_present, 1)); + HANDLE_CODE(bref.unpack(dmrs_scrambling_id0_r17_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_aggregation_factor_r17_present, 1)); + + if (data_scrambling_id_pdsch_r17_present) { + HANDLE_CODE(unpack_integer(data_scrambling_id_pdsch_r17, bref, (uint16_t)0u, (uint16_t)1023u)); + } + if (dmrs_scrambling_id0_r17_present) { + HANDLE_CODE(unpack_integer(dmrs_scrambling_id0_r17, bref, (uint32_t)0u, (uint32_t)65535u)); + } + if (pdsch_aggregation_factor_r17_present) { + HANDLE_CODE(pdsch_aggregation_factor_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pdsch_cfg_ptm_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (data_scrambling_id_pdsch_r17_present) { + j.write_int("dataScramblingIdentityPDSCH-r17", data_scrambling_id_pdsch_r17); + } + if (dmrs_scrambling_id0_r17_present) { + j.write_int("dmrs-ScramblingID0-r17", dmrs_scrambling_id0_r17); + } + if (pdsch_aggregation_factor_r17_present) { + j.write_str("pdsch-AggregationFactor-r17", pdsch_aggregation_factor_r17.to_string()); + } + j.end_obj(); +} + +const char* pdsch_cfg_ptm_r17_s::pdsch_aggregation_factor_r17_opts::to_string() const +{ + static const char* names[] = {"n2", "n4", "n8"}; + return convert_enum_idx(names, 3, value, "pdsch_cfg_ptm_r17_s::pdsch_aggregation_factor_r17_e_"); +} +uint8_t pdsch_cfg_ptm_r17_s::pdsch_aggregation_factor_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 8}; + return map_enum_number(numbers, 3, value, "pdsch_cfg_ptm_r17_s::pdsch_aggregation_factor_r17_e_"); +} + +// PosSIB-Type-r16 ::= SEQUENCE +SRSASN_CODE pos_sib_type_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(encrypted_r16_present, 1)); + HANDLE_CODE(bref.pack(gnss_id_r16_present, 1)); + HANDLE_CODE(bref.pack(sbas_id_r16_present, 1)); + HANDLE_CODE(bref.pack(area_scope_r16_present, 1)); + + if (gnss_id_r16_present) { + HANDLE_CODE(gnss_id_r16.pack(bref)); + } + if (sbas_id_r16_present) { + HANDLE_CODE(sbas_id_r16.pack(bref)); + } + HANDLE_CODE(pos_sib_type_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pos_sib_type_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(encrypted_r16_present, 1)); + HANDLE_CODE(bref.unpack(gnss_id_r16_present, 1)); + HANDLE_CODE(bref.unpack(sbas_id_r16_present, 1)); + HANDLE_CODE(bref.unpack(area_scope_r16_present, 1)); + + if (gnss_id_r16_present) { + HANDLE_CODE(gnss_id_r16.unpack(bref)); + } + if (sbas_id_r16_present) { + HANDLE_CODE(sbas_id_r16.unpack(bref)); + } + HANDLE_CODE(pos_sib_type_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pos_sib_type_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (encrypted_r16_present) { + j.write_str("encrypted-r16", "true"); + } + if (gnss_id_r16_present) { + j.write_fieldname("gnss-id-r16"); + gnss_id_r16.to_json(j); + } + if (sbas_id_r16_present) { + j.write_fieldname("sbas-id-r16"); + sbas_id_r16.to_json(j); + } + j.write_str("posSibType-r16", pos_sib_type_r16.to_string()); + if (area_scope_r16_present) { + j.write_str("areaScope-r16", "true"); + } + j.end_obj(); +} + +const char* pos_sib_type_r16_s::pos_sib_type_r16_opts::to_string() const +{ + static const char* names[] = { + "posSibType1-1", "posSibType1-2", "posSibType1-3", "posSibType1-4", "posSibType1-5", "posSibType1-6", + "posSibType1-7", "posSibType1-8", "posSibType2-1", "posSibType2-2", "posSibType2-3", "posSibType2-4", + "posSibType2-5", "posSibType2-6", "posSibType2-7", "posSibType2-8", "posSibType2-9", "posSibType2-10", + "posSibType2-11", "posSibType2-12", "posSibType2-13", "posSibType2-14", "posSibType2-15", "posSibType2-16", + "posSibType2-17", "posSibType2-18", "posSibType2-19", "posSibType2-20", "posSibType2-21", "posSibType2-22", + "posSibType2-23", "posSibType3-1", "posSibType4-1", "posSibType5-1", "posSibType6-1", "posSibType6-2", + "posSibType6-3"}; + return convert_enum_idx(names, 37, value, "pos_sib_type_r16_s::pos_sib_type_r16_e_"); +} + +// SI-SchedulingInfo-v1740 ::= SEQUENCE +SRSASN_CODE si_sched_info_v1740_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(si_request_cfg_red_cap_r17_present, 1)); + + if (si_request_cfg_red_cap_r17_present) { + HANDLE_CODE(si_request_cfg_red_cap_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE si_sched_info_v1740_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(si_request_cfg_red_cap_r17_present, 1)); + + if (si_request_cfg_red_cap_r17_present) { + HANDLE_CODE(si_request_cfg_red_cap_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void si_sched_info_v1740_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (si_request_cfg_red_cap_r17_present) { + j.write_fieldname("si-RequestConfigRedCap-r17"); + si_request_cfg_red_cap_r17.to_json(j); + } + j.end_obj(); +} + +// SS-RSSI-Measurement ::= SEQUENCE +SRSASN_CODE ss_rssi_meas_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(meas_slots.pack(bref)); + HANDLE_CODE(pack_integer(bref, end_symbol, (uint8_t)0u, (uint8_t)3u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ss_rssi_meas_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(meas_slots.unpack(bref)); + HANDLE_CODE(unpack_integer(end_symbol, bref, (uint8_t)0u, (uint8_t)3u)); + + return SRSASN_SUCCESS; +} +void ss_rssi_meas_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("measurementSlots", meas_slots.to_string()); + j.write_int("endSymbol", end_symbol); + j.end_obj(); +} + +// SSB-MTC ::= SEQUENCE +SRSASN_CODE ssb_mtc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(periodicity_and_offset.pack(bref)); + HANDLE_CODE(dur.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ssb_mtc_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(periodicity_and_offset.unpack(bref)); + HANDLE_CODE(dur.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ssb_mtc_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("periodicityAndOffset"); + periodicity_and_offset.to_json(j); + j.write_str("duration", dur.to_string()); + j.end_obj(); +} + +void ssb_mtc_s::periodicity_and_offset_c_::destroy_() {} +void ssb_mtc_s::periodicity_and_offset_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +ssb_mtc_s::periodicity_and_offset_c_::periodicity_and_offset_c_(const ssb_mtc_s::periodicity_and_offset_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sf5: + c.init(other.c.get()); + break; + case types::sf10: + c.init(other.c.get()); + break; + case types::sf20: + c.init(other.c.get()); + break; + case types::sf40: + c.init(other.c.get()); + break; + case types::sf80: + c.init(other.c.get()); + break; + case types::sf160: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + 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) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sf5: + c.set(other.c.get()); + break; + case types::sf10: + c.set(other.c.get()); + break; + case types::sf20: + c.set(other.c.get()); + break; + case types::sf40: + c.set(other.c.get()); + break; + case types::sf80: + c.set(other.c.get()); + break; + case types::sf160: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ssb_mtc_s::periodicity_and_offset_c_"); + } + + return *this; +} +uint8_t& ssb_mtc_s::periodicity_and_offset_c_::set_sf5() +{ + set(types::sf5); + return c.get(); +} +uint8_t& ssb_mtc_s::periodicity_and_offset_c_::set_sf10() +{ + set(types::sf10); + return c.get(); +} +uint8_t& ssb_mtc_s::periodicity_and_offset_c_::set_sf20() +{ + set(types::sf20); + return c.get(); +} +uint8_t& ssb_mtc_s::periodicity_and_offset_c_::set_sf40() +{ + set(types::sf40); + return c.get(); +} +uint8_t& ssb_mtc_s::periodicity_and_offset_c_::set_sf80() +{ + set(types::sf80); + return c.get(); +} +uint8_t& ssb_mtc_s::periodicity_and_offset_c_::set_sf160() +{ + set(types::sf160); + return c.get(); +} +void ssb_mtc_s::periodicity_and_offset_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sf5: + j.write_int("sf5", c.get()); + break; + case types::sf10: + j.write_int("sf10", c.get()); + break; + case types::sf20: + j.write_int("sf20", c.get()); + break; + case types::sf40: + j.write_int("sf40", c.get()); + break; + case types::sf80: + j.write_int("sf80", c.get()); + break; + case types::sf160: + j.write_int("sf160", c.get()); + break; + default: + log_invalid_choice_id(type_, "ssb_mtc_s::periodicity_and_offset_c_"); + } + j.end_obj(); +} +SRSASN_CODE ssb_mtc_s::periodicity_and_offset_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::sf5: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)4u)); + break; + case types::sf10: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); + break; + case types::sf20: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + break; + case types::sf40: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::sf80: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::sf160: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + default: + log_invalid_choice_id(type_, "ssb_mtc_s::periodicity_and_offset_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ssb_mtc_s::periodicity_and_offset_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::sf5: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)4u)); + break; + case types::sf10: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); + break; + case types::sf20: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::sf40: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::sf80: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::sf160: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + default: + log_invalid_choice_id(type_, "ssb_mtc_s::periodicity_and_offset_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ssb_mtc_s::periodicity_and_offset_c_::types_opts::to_string() const +{ + static const char* names[] = {"sf5", "sf10", "sf20", "sf40", "sf80", "sf160"}; + return convert_enum_idx(names, 6, value, "ssb_mtc_s::periodicity_and_offset_c_::types"); +} +uint8_t ssb_mtc_s::periodicity_and_offset_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {5, 10, 20, 40, 80, 160}; + return map_enum_number(numbers, 6, value, "ssb_mtc_s::periodicity_and_offset_c_::types"); +} + +const char* ssb_mtc_s::dur_opts::to_string() const +{ + static const char* names[] = {"sf1", "sf2", "sf3", "sf4", "sf5"}; + return convert_enum_idx(names, 5, value, "ssb_mtc_s::dur_e_"); +} +uint8_t ssb_mtc_s::dur_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3, 4, 5}; + return map_enum_number(numbers, 5, value, "ssb_mtc_s::dur_e_"); +} + +// SSB-MTC2-LP-r16 ::= SEQUENCE +SRSASN_CODE ssb_mtc2_lp_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pci_list.size() > 0, 1)); + + if (pci_list.size() > 0) { + 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_lp_r16_s::unpack(cbit_ref& bref) +{ + bool pci_list_present; + 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_lp_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pci_list.size() > 0) { + 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(); +} + +const char* ssb_mtc2_lp_r16_s::periodicity_opts::to_string() const +{ + static const char* names[] = {"sf10", "sf20", "sf40", "sf80", "sf160", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "ssb_mtc2_lp_r16_s::periodicity_e_"); +} +uint8_t ssb_mtc2_lp_r16_s::periodicity_opts::to_number() const +{ + static const uint8_t numbers[] = {10, 20, 40, 80, 160}; + return map_enum_number(numbers, 5, value, "ssb_mtc2_lp_r16_s::periodicity_e_"); +} + +// SSB-ToMeasure ::= CHOICE +void ssb_to_measure_c::destroy_() +{ + switch (type_) { + case types::short_bitmap: + c.destroy>(); + break; + case types::medium_bitmap: + c.destroy>(); + break; + case types::long_bitmap: + c.destroy>(); + break; + default: + break; + } +} +void ssb_to_measure_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::short_bitmap: + c.init>(); + break; + case types::medium_bitmap: + c.init>(); + break; + case types::long_bitmap: + c.init>(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ssb_to_measure_c"); + } +} +ssb_to_measure_c::ssb_to_measure_c(const ssb_to_measure_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>()); + break; + case types::long_bitmap: + c.init(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ssb_to_measure_c"); + } +} +ssb_to_measure_c& ssb_to_measure_c::operator=(const ssb_to_measure_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>()); + break; + case types::long_bitmap: + c.set(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ssb_to_measure_c"); + } + + return *this; +} +fixed_bitstring<4>& ssb_to_measure_c::set_short_bitmap() +{ + set(types::short_bitmap); + return c.get>(); +} +fixed_bitstring<8>& ssb_to_measure_c::set_medium_bitmap() +{ + set(types::medium_bitmap); + return c.get>(); +} +fixed_bitstring<64>& ssb_to_measure_c::set_long_bitmap() +{ + set(types::long_bitmap); + return c.get>(); +} +void ssb_to_measure_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()); + break; + case types::long_bitmap: + j.write_str("longBitmap", c.get>().to_string()); + break; + default: + log_invalid_choice_id(type_, "ssb_to_measure_c"); + } + j.end_obj(); +} +SRSASN_CODE ssb_to_measure_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)); + break; + case types::long_bitmap: + HANDLE_CODE(c.get>().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ssb_to_measure_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ssb_to_measure_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)); + break; + case types::long_bitmap: + HANDLE_CODE(c.get>().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ssb_to_measure_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ssb_to_measure_c::types_opts::to_string() const +{ + static const char* names[] = {"shortBitmap", "mediumBitmap", "longBitmap"}; + return convert_enum_idx(names, 3, value, "ssb_to_measure_c::types"); +} + +// SchedulingInfo2-r17 ::= SEQUENCE +SRSASN_CODE sched_info2_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(si_broadcast_status_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, si_win_position_r17, (uint16_t)1u, (uint16_t)256u)); + HANDLE_CODE(si_periodicity_r17.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, sib_map_info_r17, 1, 32)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_info2_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(si_broadcast_status_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(si_win_position_r17, bref, (uint16_t)1u, (uint16_t)256u)); + HANDLE_CODE(si_periodicity_r17.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(sib_map_info_r17, bref, 1, 32)); + + return SRSASN_SUCCESS; +} +void sched_info2_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("si-BroadcastStatus-r17", si_broadcast_status_r17.to_string()); + j.write_int("si-WindowPosition-r17", si_win_position_r17); + j.write_str("si-Periodicity-r17", si_periodicity_r17.to_string()); + j.start_array("sib-MappingInfo-r17"); + for (const auto& e1 : sib_map_info_r17) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +const char* sched_info2_r17_s::si_broadcast_status_r17_opts::to_string() const +{ + static const char* names[] = {"broadcasting", "notBroadcasting"}; + return convert_enum_idx(names, 2, value, "sched_info2_r17_s::si_broadcast_status_r17_e_"); +} + +const char* sched_info2_r17_s::si_periodicity_r17_opts::to_string() const +{ + static const char* names[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; + return convert_enum_idx(names, 7, value, "sched_info2_r17_s::si_periodicity_r17_e_"); +} +uint16_t sched_info2_r17_s::si_periodicity_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(numbers, 7, value, "sched_info2_r17_s::si_periodicity_r17_e_"); +} + +// SpeedStateScaleFactors ::= SEQUENCE +SRSASN_CODE speed_state_scale_factors_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(sf_medium.pack(bref)); + HANDLE_CODE(sf_high.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE speed_state_scale_factors_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(sf_medium.unpack(bref)); + HANDLE_CODE(sf_high.unpack(bref)); + + return SRSASN_SUCCESS; +} +void speed_state_scale_factors_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sf-Medium", sf_medium.to_string()); + j.write_str("sf-High", sf_high.to_string()); + j.end_obj(); +} + +const char* speed_state_scale_factors_s::sf_medium_opts::to_string() const +{ + static const char* names[] = {"oDot25", "oDot5", "oDot75", "lDot0"}; + return convert_enum_idx(names, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); +} +float speed_state_scale_factors_s::sf_medium_opts::to_number() const +{ + static const float numbers[] = {0.25, 0.5, 0.75, 1.0}; + return map_enum_number(numbers, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); +} +const char* speed_state_scale_factors_s::sf_medium_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.25", "0.5", "0.75", "1.0"}; + return convert_enum_idx(number_strs, 4, value, "speed_state_scale_factors_s::sf_medium_e_"); +} + +const char* speed_state_scale_factors_s::sf_high_opts::to_string() const +{ + static const char* names[] = {"oDot25", "oDot5", "oDot75", "lDot0"}; + return convert_enum_idx(names, 4, value, "speed_state_scale_factors_s::sf_high_e_"); +} +float speed_state_scale_factors_s::sf_high_opts::to_number() const +{ + static const float numbers[] = {0.25, 0.5, 0.75, 1.0}; + return map_enum_number(numbers, 4, value, "speed_state_scale_factors_s::sf_high_e_"); +} +const char* speed_state_scale_factors_s::sf_high_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.25", "0.5", "0.75", "1.0"}; + return convert_enum_idx(number_strs, 4, value, "speed_state_scale_factors_s::sf_high_e_"); +} + +// ThresholdNR ::= SEQUENCE +SRSASN_CODE thres_nr_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(thres_rsrp_present, 1)); + HANDLE_CODE(bref.pack(thres_rsrq_present, 1)); + HANDLE_CODE(bref.pack(thres_sinr_present, 1)); + + if (thres_rsrp_present) { + HANDLE_CODE(pack_integer(bref, thres_rsrp, (uint8_t)0u, (uint8_t)127u)); + } + if (thres_rsrq_present) { + HANDLE_CODE(pack_integer(bref, thres_rsrq, (uint8_t)0u, (uint8_t)127u)); + } + if (thres_sinr_present) { + HANDLE_CODE(pack_integer(bref, thres_sinr, (uint8_t)0u, (uint8_t)127u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE thres_nr_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(thres_rsrp_present, 1)); + HANDLE_CODE(bref.unpack(thres_rsrq_present, 1)); + HANDLE_CODE(bref.unpack(thres_sinr_present, 1)); + + if (thres_rsrp_present) { + HANDLE_CODE(unpack_integer(thres_rsrp, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (thres_rsrq_present) { + HANDLE_CODE(unpack_integer(thres_rsrq, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (thres_sinr_present) { + HANDLE_CODE(unpack_integer(thres_sinr, bref, (uint8_t)0u, (uint8_t)127u)); + } + + return SRSASN_SUCCESS; +} +void thres_nr_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (thres_rsrp_present) { + j.write_int("thresholdRSRP", thres_rsrp); + } + if (thres_rsrq_present) { + j.write_int("thresholdRSRQ", thres_rsrq); + } + if (thres_sinr_present) { + j.write_int("thresholdSINR", thres_sinr); + } + j.end_obj(); +} + +// UAC-BarringInfoSet-v1700 ::= SEQUENCE +SRSASN_CODE uac_barr_info_set_v1700_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(uac_barr_factor_for_ai3_r17_present, 1)); + + if (uac_barr_factor_for_ai3_r17_present) { + HANDLE_CODE(uac_barr_factor_for_ai3_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE uac_barr_info_set_v1700_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(uac_barr_factor_for_ai3_r17_present, 1)); + + if (uac_barr_factor_for_ai3_r17_present) { + HANDLE_CODE(uac_barr_factor_for_ai3_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void uac_barr_info_set_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (uac_barr_factor_for_ai3_r17_present) { + j.write_str("uac-BarringFactorForAI3-r17", uac_barr_factor_for_ai3_r17.to_string()); + } + j.end_obj(); +} + +const char* uac_barr_info_set_v1700_s::uac_barr_factor_for_ai3_r17_opts::to_string() const +{ + static const char* names[] = { + "p00", "p05", "p10", "p15", "p20", "p25", "p30", "p40", "p50", "p60", "p70", "p75", "p80", "p85", "p90", "p95"}; + return convert_enum_idx(names, 16, value, "uac_barr_info_set_v1700_s::uac_barr_factor_for_ai3_r17_e_"); +} +float uac_barr_info_set_v1700_s::uac_barr_factor_for_ai3_r17_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; + return map_enum_number(numbers, 16, value, "uac_barr_info_set_v1700_s::uac_barr_factor_for_ai3_r17_e_"); +} +const char* uac_barr_info_set_v1700_s::uac_barr_factor_for_ai3_r17_opts::to_number_string() const +{ + static const char* number_strs[] = { + "0.0", "0.5", "1.0", "1.5", "2.0", "2.5", "3.0", "4.0", "5.0", "6.0", "7.0", "7.5", "8.0", "8.5", "9.0", "9.5"}; + return convert_enum_idx(number_strs, 16, value, "uac_barr_info_set_v1700_s::uac_barr_factor_for_ai3_r17_e_"); +} + +// CarrierFreqEUTRA ::= SEQUENCE +SRSASN_CODE carrier_freq_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(eutra_multi_band_info_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(eutra_freq_neigh_cell_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(eutra_excluded_cell_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(cell_resel_prio_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_sub_prio_present, 1)); + HANDLE_CODE(bref.pack(thresh_x_q_present, 1)); + + HANDLE_CODE(pack_integer(bref, carrier_freq, (uint32_t)0u, (uint32_t)262143u)); + if (eutra_multi_band_info_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, eutra_multi_band_info_list, 1, 8)); + } + if (eutra_freq_neigh_cell_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, eutra_freq_neigh_cell_list, 1, 8)); + } + if (eutra_excluded_cell_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, eutra_excluded_cell_list, 1, 16)); + } + HANDLE_CODE(allowed_meas_bw.pack(bref)); + HANDLE_CODE(bref.pack(presence_ant_port1, 1)); + if (cell_resel_prio_present) { + 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, thresh_x_high, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, thresh_x_low, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, q_rx_lev_min, (int8_t)-70, (int8_t)-22)); + HANDLE_CODE(pack_integer(bref, q_qual_min, (int8_t)-34, (int8_t)-3)); + HANDLE_CODE(pack_integer(bref, p_max_eutra, (int8_t)-30, (int8_t)33)); + if (thresh_x_q_present) { + HANDLE_CODE(pack_integer(bref, thresh_x_q.thresh_x_high_q, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, thresh_x_q.thresh_x_low_q, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_eutra_s::unpack(cbit_ref& bref) +{ + bool eutra_multi_band_info_list_present; + HANDLE_CODE(bref.unpack(eutra_multi_band_info_list_present, 1)); + bool eutra_freq_neigh_cell_list_present; + HANDLE_CODE(bref.unpack(eutra_freq_neigh_cell_list_present, 1)); + bool eutra_excluded_cell_list_present; + HANDLE_CODE(bref.unpack(eutra_excluded_cell_list_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_prio_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_sub_prio_present, 1)); + HANDLE_CODE(bref.unpack(thresh_x_q_present, 1)); + + HANDLE_CODE(unpack_integer(carrier_freq, bref, (uint32_t)0u, (uint32_t)262143u)); + if (eutra_multi_band_info_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(eutra_multi_band_info_list, bref, 1, 8)); + } + if (eutra_freq_neigh_cell_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(eutra_freq_neigh_cell_list, bref, 1, 8)); + } + if (eutra_excluded_cell_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(eutra_excluded_cell_list, bref, 1, 16)); + } + HANDLE_CODE(allowed_meas_bw.unpack(bref)); + HANDLE_CODE(bref.unpack(presence_ant_port1, 1)); + if (cell_resel_prio_present) { + 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(thresh_x_high, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(thresh_x_low, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(q_rx_lev_min, bref, (int8_t)-70, (int8_t)-22)); + HANDLE_CODE(unpack_integer(q_qual_min, bref, (int8_t)-34, (int8_t)-3)); + HANDLE_CODE(unpack_integer(p_max_eutra, bref, (int8_t)-30, (int8_t)33)); + if (thresh_x_q_present) { + HANDLE_CODE(unpack_integer(thresh_x_q.thresh_x_high_q, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(thresh_x_q.thresh_x_low_q, bref, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +void carrier_freq_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq", carrier_freq); + if (eutra_multi_band_info_list.size() > 0) { + j.start_array("eutra-multiBandInfoList"); + for (const auto& e1 : eutra_multi_band_info_list) { + e1.to_json(j); + } + j.end_array(); + } + if (eutra_freq_neigh_cell_list.size() > 0) { + j.start_array("eutra-FreqNeighCellList"); + for (const auto& e1 : eutra_freq_neigh_cell_list) { + e1.to_json(j); + } + j.end_array(); + } + if (eutra_excluded_cell_list.size() > 0) { + j.start_array("eutra-ExcludedCellList"); + for (const auto& e1 : eutra_excluded_cell_list) { + e1.to_json(j); + } + j.end_array(); + } + j.write_str("allowedMeasBandwidth", allowed_meas_bw.to_string()); + j.write_bool("presenceAntennaPort1", presence_ant_port1); + if (cell_resel_prio_present) { + 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("threshX-High", thresh_x_high); + j.write_int("threshX-Low", thresh_x_low); + j.write_int("q-RxLevMin", q_rx_lev_min); + j.write_int("q-QualMin", q_qual_min); + j.write_int("p-MaxEUTRA", p_max_eutra); + if (thresh_x_q_present) { + j.write_fieldname("threshX-Q"); + j.start_obj(); + j.write_int("threshX-HighQ", thresh_x_q.thresh_x_high_q); + j.write_int("threshX-LowQ", thresh_x_q.thresh_x_low_q); + j.end_obj(); + } + j.end_obj(); +} + +// CarrierFreqEUTRA-v1610 ::= SEQUENCE +SRSASN_CODE carrier_freq_eutra_v1610_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(high_speed_eutra_carrier_r16_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_eutra_v1610_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(high_speed_eutra_carrier_r16_present, 1)); + + return SRSASN_SUCCESS; +} +void carrier_freq_eutra_v1610_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (high_speed_eutra_carrier_r16_present) { + j.write_str("highSpeedEUTRACarrier-r16", "true"); + } + j.end_obj(); +} + +// CarrierFreqEUTRA-v1700 ::= SEQUENCE +SRSASN_CODE carrier_freq_eutra_v1700_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(eutra_freq_neigh_hsdn_cell_list_r17.size() > 0, 1)); + + if (eutra_freq_neigh_hsdn_cell_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, eutra_freq_neigh_hsdn_cell_list_r17, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE carrier_freq_eutra_v1700_s::unpack(cbit_ref& bref) +{ + bool eutra_freq_neigh_hsdn_cell_list_r17_present; + HANDLE_CODE(bref.unpack(eutra_freq_neigh_hsdn_cell_list_r17_present, 1)); + + if (eutra_freq_neigh_hsdn_cell_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(eutra_freq_neigh_hsdn_cell_list_r17, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void carrier_freq_eutra_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (eutra_freq_neigh_hsdn_cell_list_r17.size() > 0) { + j.start_array("eutra-FreqNeighHSDN-CellList-r17"); + for (const auto& e1 : eutra_freq_neigh_hsdn_cell_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// FreqPrioritySlicing-r17 ::= SEQUENCE +SRSASN_CODE freq_prio_slicing_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(slice_info_list_r17.size() > 0, 1)); + + HANDLE_CODE(pack_integer(bref, dl_implicit_carrier_freq_r17, (uint8_t)0u, (uint8_t)8u)); + if (slice_info_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, slice_info_list_r17, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_prio_slicing_r17_s::unpack(cbit_ref& bref) +{ + bool slice_info_list_r17_present; + HANDLE_CODE(bref.unpack(slice_info_list_r17_present, 1)); + + HANDLE_CODE(unpack_integer(dl_implicit_carrier_freq_r17, bref, (uint8_t)0u, (uint8_t)8u)); + if (slice_info_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(slice_info_list_r17, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void freq_prio_slicing_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-ImplicitCarrierFreq-r17", dl_implicit_carrier_freq_r17); + if (slice_info_list_r17.size() > 0) { + j.start_array("sliceInfoList-r17"); + for (const auto& e1 : slice_info_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// HRNN-r16 ::= SEQUENCE +SRSASN_CODE hrnn_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(hrnn_r16.size() > 0, 1)); + + if (hrnn_r16.size() > 0) { + HANDLE_CODE(hrnn_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE hrnn_r16_s::unpack(cbit_ref& bref) +{ + bool hrnn_r16_present; + HANDLE_CODE(bref.unpack(hrnn_r16_present, 1)); + + if (hrnn_r16_present) { + HANDLE_CODE(hrnn_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void hrnn_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (hrnn_r16.size() > 0) { + j.write_str("hrnn-r16", hrnn_r16.to_string()); + } + j.end_obj(); +} + +// InterFreqCarrierFreqInfo ::= SEQUENCE +SRSASN_CODE inter_freq_carrier_freq_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(freq_band_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(freq_band_list_sul.size() > 0, 1)); + HANDLE_CODE(bref.pack(nrof_ss_blocks_to_average_present, 1)); + HANDLE_CODE(bref.pack(abs_thresh_ss_blocks_consolidation_present, 1)); + HANDLE_CODE(bref.pack(smtc_present, 1)); + HANDLE_CODE(bref.pack(ssb_to_measure_present, 1)); + HANDLE_CODE(bref.pack(ss_rssi_meas_present, 1)); + HANDLE_CODE(bref.pack(q_rx_lev_min_sul_present, 1)); + HANDLE_CODE(bref.pack(q_qual_min_present, 1)); + HANDLE_CODE(bref.pack(p_max_present, 1)); + HANDLE_CODE(bref.pack(t_resel_nr_sf_present, 1)); + HANDLE_CODE(bref.pack(thresh_x_q_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_prio_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_sub_prio_present, 1)); + HANDLE_CODE(bref.pack(q_offset_freq_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_neigh_cell_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(inter_freq_excluded_cell_list.size() > 0, 1)); + + HANDLE_CODE(pack_integer(bref, dl_carrier_freq, (uint32_t)0u, (uint32_t)3279165u)); + if (freq_band_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8)); + } + if (freq_band_list_sul.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list_sul, 1, 8)); + } + if (nrof_ss_blocks_to_average_present) { + HANDLE_CODE(pack_integer(bref, nrof_ss_blocks_to_average, (uint8_t)2u, (uint8_t)16u)); + } + if (abs_thresh_ss_blocks_consolidation_present) { + HANDLE_CODE(abs_thresh_ss_blocks_consolidation.pack(bref)); + } + if (smtc_present) { + HANDLE_CODE(smtc.pack(bref)); + } + HANDLE_CODE(ssb_subcarrier_spacing.pack(bref)); + if (ssb_to_measure_present) { + HANDLE_CODE(ssb_to_measure.pack(bref)); + } + HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell, 1)); + if (ss_rssi_meas_present) { + HANDLE_CODE(ss_rssi_meas.pack(bref)); + } + HANDLE_CODE(pack_integer(bref, q_rx_lev_min, (int8_t)-70, (int8_t)-22)); + if (q_rx_lev_min_sul_present) { + HANDLE_CODE(pack_integer(bref, q_rx_lev_min_sul, (int8_t)-70, (int8_t)-22)); + } + if (q_qual_min_present) { + HANDLE_CODE(pack_integer(bref, q_qual_min, (int8_t)-43, (int8_t)-12)); + } + if (p_max_present) { + HANDLE_CODE(pack_integer(bref, p_max, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(pack_integer(bref, t_resel_nr, (uint8_t)0u, (uint8_t)7u)); + if (t_resel_nr_sf_present) { + HANDLE_CODE(t_resel_nr_sf.pack(bref)); + } + HANDLE_CODE(pack_integer(bref, thresh_x_high_p, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, thresh_x_low_p, (uint8_t)0u, (uint8_t)31u)); + if (thresh_x_q_present) { + HANDLE_CODE(pack_integer(bref, thresh_x_q.thresh_x_high_q, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, thresh_x_q.thresh_x_low_q, (uint8_t)0u, (uint8_t)31u)); + } + if (cell_resel_prio_present) { + 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 (q_offset_freq_present) { + HANDLE_CODE(q_offset_freq.pack(bref)); + } + if (inter_freq_neigh_cell_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_neigh_cell_list, 1, 16)); + } + if (inter_freq_excluded_cell_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_excluded_cell_list, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool freq_band_list_present; + HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); + bool freq_band_list_sul_present; + HANDLE_CODE(bref.unpack(freq_band_list_sul_present, 1)); + HANDLE_CODE(bref.unpack(nrof_ss_blocks_to_average_present, 1)); + HANDLE_CODE(bref.unpack(abs_thresh_ss_blocks_consolidation_present, 1)); + HANDLE_CODE(bref.unpack(smtc_present, 1)); + HANDLE_CODE(bref.unpack(ssb_to_measure_present, 1)); + HANDLE_CODE(bref.unpack(ss_rssi_meas_present, 1)); + HANDLE_CODE(bref.unpack(q_rx_lev_min_sul_present, 1)); + HANDLE_CODE(bref.unpack(q_qual_min_present, 1)); + HANDLE_CODE(bref.unpack(p_max_present, 1)); + HANDLE_CODE(bref.unpack(t_resel_nr_sf_present, 1)); + HANDLE_CODE(bref.unpack(thresh_x_q_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_prio_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_sub_prio_present, 1)); + HANDLE_CODE(bref.unpack(q_offset_freq_present, 1)); + bool inter_freq_neigh_cell_list_present; + HANDLE_CODE(bref.unpack(inter_freq_neigh_cell_list_present, 1)); + bool inter_freq_excluded_cell_list_present; + HANDLE_CODE(bref.unpack(inter_freq_excluded_cell_list_present, 1)); + + HANDLE_CODE(unpack_integer(dl_carrier_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); + if (freq_band_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8)); + } + if (freq_band_list_sul_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list_sul, bref, 1, 8)); + } + if (nrof_ss_blocks_to_average_present) { + HANDLE_CODE(unpack_integer(nrof_ss_blocks_to_average, bref, (uint8_t)2u, (uint8_t)16u)); + } + if (abs_thresh_ss_blocks_consolidation_present) { + HANDLE_CODE(abs_thresh_ss_blocks_consolidation.unpack(bref)); + } + if (smtc_present) { + HANDLE_CODE(smtc.unpack(bref)); + } + HANDLE_CODE(ssb_subcarrier_spacing.unpack(bref)); + if (ssb_to_measure_present) { + HANDLE_CODE(ssb_to_measure.unpack(bref)); + } + HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell, 1)); + if (ss_rssi_meas_present) { + HANDLE_CODE(ss_rssi_meas.unpack(bref)); + } + HANDLE_CODE(unpack_integer(q_rx_lev_min, bref, (int8_t)-70, (int8_t)-22)); + if (q_rx_lev_min_sul_present) { + HANDLE_CODE(unpack_integer(q_rx_lev_min_sul, bref, (int8_t)-70, (int8_t)-22)); + } + if (q_qual_min_present) { + HANDLE_CODE(unpack_integer(q_qual_min, bref, (int8_t)-43, (int8_t)-12)); + } + if (p_max_present) { + HANDLE_CODE(unpack_integer(p_max, bref, (int8_t)-30, (int8_t)33)); + } + HANDLE_CODE(unpack_integer(t_resel_nr, bref, (uint8_t)0u, (uint8_t)7u)); + if (t_resel_nr_sf_present) { + HANDLE_CODE(t_resel_nr_sf.unpack(bref)); + } + HANDLE_CODE(unpack_integer(thresh_x_high_p, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(thresh_x_low_p, bref, (uint8_t)0u, (uint8_t)31u)); + if (thresh_x_q_present) { + HANDLE_CODE(unpack_integer(thresh_x_q.thresh_x_high_q, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(thresh_x_q.thresh_x_low_q, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (cell_resel_prio_present) { + 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 (q_offset_freq_present) { + HANDLE_CODE(q_offset_freq.unpack(bref)); + } + if (inter_freq_neigh_cell_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_neigh_cell_list, bref, 1, 16)); + } + if (inter_freq_excluded_cell_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_excluded_cell_list, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-CarrierFreq", dl_carrier_freq); + if (freq_band_list.size() > 0) { + j.start_array("frequencyBandList"); + for (const auto& e1 : freq_band_list) { + e1.to_json(j); + } + j.end_array(); + } + if (freq_band_list_sul.size() > 0) { + j.start_array("frequencyBandListSUL"); + for (const auto& e1 : freq_band_list_sul) { + e1.to_json(j); + } + j.end_array(); + } + if (nrof_ss_blocks_to_average_present) { + j.write_int("nrofSS-BlocksToAverage", nrof_ss_blocks_to_average); + } + if (abs_thresh_ss_blocks_consolidation_present) { + j.write_fieldname("absThreshSS-BlocksConsolidation"); + abs_thresh_ss_blocks_consolidation.to_json(j); + } + if (smtc_present) { + j.write_fieldname("smtc"); + smtc.to_json(j); + } + j.write_str("ssbSubcarrierSpacing", ssb_subcarrier_spacing.to_string()); + if (ssb_to_measure_present) { + j.write_fieldname("ssb-ToMeasure"); + ssb_to_measure.to_json(j); + } + 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.write_int("q-RxLevMin", q_rx_lev_min); + if (q_rx_lev_min_sul_present) { + j.write_int("q-RxLevMinSUL", q_rx_lev_min_sul); + } + if (q_qual_min_present) { + j.write_int("q-QualMin", q_qual_min); + } + if (p_max_present) { + j.write_int("p-Max", p_max); + } + j.write_int("t-ReselectionNR", t_resel_nr); + if (t_resel_nr_sf_present) { + j.write_fieldname("t-ReselectionNR-SF"); + t_resel_nr_sf.to_json(j); + } + j.write_int("threshX-HighP", thresh_x_high_p); + j.write_int("threshX-LowP", thresh_x_low_p); + if (thresh_x_q_present) { + j.write_fieldname("threshX-Q"); + j.start_obj(); + j.write_int("threshX-HighQ", thresh_x_q.thresh_x_high_q); + j.write_int("threshX-LowQ", thresh_x_q.thresh_x_low_q); + j.end_obj(); + } + if (cell_resel_prio_present) { + j.write_int("cellReselectionPriority", cell_resel_prio); + } + if (cell_resel_sub_prio_present) { + j.write_str("cellReselectionSubPriority", cell_resel_sub_prio.to_string()); + } + if (q_offset_freq_present) { + j.write_str("q-OffsetFreq", q_offset_freq.to_string()); + } + if (inter_freq_neigh_cell_list.size() > 0) { + j.start_array("interFreqNeighCellList"); + for (const auto& e1 : inter_freq_neigh_cell_list) { + e1.to_json(j); + } + j.end_array(); + } + if (inter_freq_excluded_cell_list.size() > 0) { + j.start_array("interFreqExcludedCellList"); + for (const auto& e1 : inter_freq_excluded_cell_list) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-v1610 ::= SEQUENCE +SRSASN_CODE inter_freq_carrier_freq_info_v1610_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_freq_neigh_cell_list_v1610.size() > 0, 1)); + HANDLE_CODE(bref.pack(smtc2_lp_r16_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_allowed_cell_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(ssb_position_qcl_common_r16_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_cag_cell_list_r16.size() > 0, 1)); + + if (inter_freq_neigh_cell_list_v1610.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_neigh_cell_list_v1610, 1, 16)); + } + if (smtc2_lp_r16_present) { + HANDLE_CODE(smtc2_lp_r16.pack(bref)); + } + if (inter_freq_allowed_cell_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_allowed_cell_list_r16, 1, 16)); + } + if (ssb_position_qcl_common_r16_present) { + HANDLE_CODE(ssb_position_qcl_common_r16.pack(bref)); + } + if (inter_freq_cag_cell_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_cag_cell_list_r16, 1, 12)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1610_s::unpack(cbit_ref& bref) +{ + bool inter_freq_neigh_cell_list_v1610_present; + HANDLE_CODE(bref.unpack(inter_freq_neigh_cell_list_v1610_present, 1)); + HANDLE_CODE(bref.unpack(smtc2_lp_r16_present, 1)); + bool inter_freq_allowed_cell_list_r16_present; + HANDLE_CODE(bref.unpack(inter_freq_allowed_cell_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(ssb_position_qcl_common_r16_present, 1)); + bool inter_freq_cag_cell_list_r16_present; + HANDLE_CODE(bref.unpack(inter_freq_cag_cell_list_r16_present, 1)); + + if (inter_freq_neigh_cell_list_v1610_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_neigh_cell_list_v1610, bref, 1, 16)); + } + if (smtc2_lp_r16_present) { + HANDLE_CODE(smtc2_lp_r16.unpack(bref)); + } + if (inter_freq_allowed_cell_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_allowed_cell_list_r16, bref, 1, 16)); + } + if (ssb_position_qcl_common_r16_present) { + HANDLE_CODE(ssb_position_qcl_common_r16.unpack(bref)); + } + if (inter_freq_cag_cell_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_cag_cell_list_r16, bref, 1, 12)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v1610_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (inter_freq_neigh_cell_list_v1610.size() > 0) { + j.start_array("interFreqNeighCellList-v1610"); + for (const auto& e1 : inter_freq_neigh_cell_list_v1610) { + e1.to_json(j); + } + j.end_array(); + } + if (smtc2_lp_r16_present) { + j.write_fieldname("smtc2-LP-r16"); + smtc2_lp_r16.to_json(j); + } + if (inter_freq_allowed_cell_list_r16.size() > 0) { + j.start_array("interFreqAllowedCellList-r16"); + for (const auto& e1 : inter_freq_allowed_cell_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (ssb_position_qcl_common_r16_present) { + j.write_str("ssb-PositionQCL-Common-r16", ssb_position_qcl_common_r16.to_string()); + } + if (inter_freq_cag_cell_list_r16.size() > 0) { + j.start_array("interFreqCAG-CellList-r16"); + for (const auto& e1 : inter_freq_cag_cell_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-v1700 ::= SEQUENCE +SRSASN_CODE inter_freq_carrier_freq_info_v1700_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(inter_freq_neigh_hsdn_cell_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(high_speed_meas_inter_freq_r17_present, 1)); + HANDLE_CODE(bref.pack(red_cap_access_allowed_r17_present, 1)); + HANDLE_CODE(bref.pack(ssb_position_qcl_common_r17_present, 1)); + HANDLE_CODE(bref.pack(inter_freq_neigh_cell_list_v1710.size() > 0, 1)); + + if (inter_freq_neigh_hsdn_cell_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_neigh_hsdn_cell_list_r17, 1, 16)); + } + if (ssb_position_qcl_common_r17_present) { + HANDLE_CODE(ssb_position_qcl_common_r17.pack(bref)); + } + if (inter_freq_neigh_cell_list_v1710.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_neigh_cell_list_v1710, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1700_s::unpack(cbit_ref& bref) +{ + bool inter_freq_neigh_hsdn_cell_list_r17_present; + HANDLE_CODE(bref.unpack(inter_freq_neigh_hsdn_cell_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(high_speed_meas_inter_freq_r17_present, 1)); + HANDLE_CODE(bref.unpack(red_cap_access_allowed_r17_present, 1)); + HANDLE_CODE(bref.unpack(ssb_position_qcl_common_r17_present, 1)); + bool inter_freq_neigh_cell_list_v1710_present; + HANDLE_CODE(bref.unpack(inter_freq_neigh_cell_list_v1710_present, 1)); + + if (inter_freq_neigh_hsdn_cell_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_neigh_hsdn_cell_list_r17, bref, 1, 16)); + } + if (ssb_position_qcl_common_r17_present) { + HANDLE_CODE(ssb_position_qcl_common_r17.unpack(bref)); + } + if (inter_freq_neigh_cell_list_v1710_present) { + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_neigh_cell_list_v1710, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (inter_freq_neigh_hsdn_cell_list_r17.size() > 0) { + j.start_array("interFreqNeighHSDN-CellList-r17"); + for (const auto& e1 : inter_freq_neigh_hsdn_cell_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (high_speed_meas_inter_freq_r17_present) { + j.write_str("highSpeedMeasInterFreq-r17", "true"); + } + if (red_cap_access_allowed_r17_present) { + j.write_str("redCapAccessAllowed-r17", "true"); + } + if (ssb_position_qcl_common_r17_present) { + j.write_str("ssb-PositionQCL-Common-r17", ssb_position_qcl_common_r17.to_string()); + } + if (inter_freq_neigh_cell_list_v1710.size() > 0) { + j.start_array("interFreqNeighCellList-v1710"); + for (const auto& e1 : inter_freq_neigh_cell_list_v1710) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-v1720 ::= SEQUENCE +SRSASN_CODE inter_freq_carrier_freq_info_v1720_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(smtc4list_r17.size() > 0, 1)); + + if (smtc4list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, smtc4list_r17, 1, 3)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1720_s::unpack(cbit_ref& bref) +{ + bool smtc4list_r17_present; + HANDLE_CODE(bref.unpack(smtc4list_r17_present, 1)); + + if (smtc4list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(smtc4list_r17, bref, 1, 3)); + } + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v1720_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (smtc4list_r17.size() > 0) { + j.start_array("smtc4list-r17"); + for (const auto& e1 : smtc4list_r17) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// InterFreqCarrierFreqInfo-v1730 ::= SEQUENCE +SRSASN_CODE inter_freq_carrier_freq_info_v1730_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ch_access_mode2_r17_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE inter_freq_carrier_freq_info_v1730_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ch_access_mode2_r17_present, 1)); + + return SRSASN_SUCCESS; +} +void inter_freq_carrier_freq_info_v1730_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ch_access_mode2_r17_present) { + j.write_str("channelAccessMode2-r17", "enabled"); + } + j.end_obj(); +} + +// IntraFreqNeighCellInfo ::= SEQUENCE +SRSASN_CODE intra_freq_neigh_cell_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(q_rx_lev_min_offset_cell_present, 1)); + HANDLE_CODE(bref.pack(q_rx_lev_min_offset_cell_sul_present, 1)); + HANDLE_CODE(bref.pack(q_qual_min_offset_cell_present, 1)); + + HANDLE_CODE(pack_integer(bref, pci, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(q_offset_cell.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)); + } + if (q_rx_lev_min_offset_cell_sul_present) { + HANDLE_CODE(pack_integer(bref, q_rx_lev_min_offset_cell_sul, (uint8_t)1u, (uint8_t)8u)); + } + if (q_qual_min_offset_cell_present) { + HANDLE_CODE(pack_integer(bref, q_qual_min_offset_cell, (uint8_t)1u, (uint8_t)8u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE intra_freq_neigh_cell_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(q_rx_lev_min_offset_cell_present, 1)); + HANDLE_CODE(bref.unpack(q_rx_lev_min_offset_cell_sul_present, 1)); + HANDLE_CODE(bref.unpack(q_qual_min_offset_cell_present, 1)); + + HANDLE_CODE(unpack_integer(pci, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(q_offset_cell.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)); + } + if (q_rx_lev_min_offset_cell_sul_present) { + HANDLE_CODE(unpack_integer(q_rx_lev_min_offset_cell_sul, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (q_qual_min_offset_cell_present) { + HANDLE_CODE(unpack_integer(q_qual_min_offset_cell, bref, (uint8_t)1u, (uint8_t)8u)); + } + + return SRSASN_SUCCESS; +} +void intra_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()); + if (q_rx_lev_min_offset_cell_present) { + j.write_int("q-RxLevMinOffsetCell", q_rx_lev_min_offset_cell); + } + if (q_rx_lev_min_offset_cell_sul_present) { + j.write_int("q-RxLevMinOffsetCellSUL", q_rx_lev_min_offset_cell_sul); + } + if (q_qual_min_offset_cell_present) { + j.write_int("q-QualMinOffsetCell", q_qual_min_offset_cell); + } + j.end_obj(); +} + +// IntraFreqNeighCellInfo-v1610 ::= SEQUENCE +SRSASN_CODE intra_freq_neigh_cell_info_v1610_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ssb_position_qcl_r16_present, 1)); + + if (ssb_position_qcl_r16_present) { + HANDLE_CODE(ssb_position_qcl_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE intra_freq_neigh_cell_info_v1610_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ssb_position_qcl_r16_present, 1)); + + if (ssb_position_qcl_r16_present) { + HANDLE_CODE(ssb_position_qcl_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void intra_freq_neigh_cell_info_v1610_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ssb_position_qcl_r16_present) { + j.write_str("ssb-PositionQCL-r16", ssb_position_qcl_r16.to_string()); + } + j.end_obj(); +} + +// IntraFreqNeighCellInfo-v1710 ::= SEQUENCE +SRSASN_CODE intra_freq_neigh_cell_info_v1710_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ssb_position_qcl_r17_present, 1)); + + if (ssb_position_qcl_r17_present) { + HANDLE_CODE(ssb_position_qcl_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE intra_freq_neigh_cell_info_v1710_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ssb_position_qcl_r17_present, 1)); + + if (ssb_position_qcl_r17_present) { + HANDLE_CODE(ssb_position_qcl_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void intra_freq_neigh_cell_info_v1710_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ssb_position_qcl_r17_present) { + j.write_str("ssb-PositionQCL-r17", ssb_position_qcl_r17.to_string()); + } + j.end_obj(); +} + +// LocationAndBandwidthBroadcast-r17 ::= CHOICE +void location_and_bw_broadcast_r17_c::set(types::options e) +{ + type_ = e; +} +void location_and_bw_broadcast_r17_c::set_same_as_sib1_cfg_location_and_bw() +{ + set(types::same_as_sib1_cfg_location_and_bw); +} +uint16_t& location_and_bw_broadcast_r17_c::set_location_and_bw() +{ + set(types::location_and_bw); + return c; +} +void location_and_bw_broadcast_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::same_as_sib1_cfg_location_and_bw: + break; + case types::location_and_bw: + j.write_int("locationAndBandwidth", c); + break; + default: + log_invalid_choice_id(type_, "location_and_bw_broadcast_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE location_and_bw_broadcast_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::same_as_sib1_cfg_location_and_bw: + break; + case types::location_and_bw: + HANDLE_CODE(pack_integer(bref, c, (uint16_t)0u, (uint16_t)37949u)); + break; + default: + log_invalid_choice_id(type_, "location_and_bw_broadcast_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE location_and_bw_broadcast_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::same_as_sib1_cfg_location_and_bw: + break; + case types::location_and_bw: + HANDLE_CODE(unpack_integer(c, bref, (uint16_t)0u, (uint16_t)37949u)); + break; + default: + log_invalid_choice_id(type_, "location_and_bw_broadcast_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* location_and_bw_broadcast_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"sameAsSib1ConfiguredLocationAndBW", "locationAndBandwidth"}; + return convert_enum_idx(names, 2, value, "location_and_bw_broadcast_r17_c::types"); +} +uint8_t location_and_bw_broadcast_r17_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "location_and_bw_broadcast_r17_c::types"); +} + +// MBS-FSAI-InterFreq-r17 ::= SEQUENCE +SRSASN_CODE mbs_fsai_inter_freq_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, dl_carrier_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(pack_dyn_seq_of(bref, mbs_fsai_list_r17, 1, 64)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbs_fsai_inter_freq_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(dl_carrier_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(unpack_dyn_seq_of(mbs_fsai_list_r17, bref, 1, 64)); + + return SRSASN_SUCCESS; +} +void mbs_fsai_inter_freq_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-CarrierFreq-r17", dl_carrier_freq_r17); + j.start_array("mbs-FSAI-List-r17"); + for (const auto& e1 : mbs_fsai_list_r17) { + j.write_str(e1.to_string()); + } + j.end_array(); + j.end_obj(); +} + +// MCCH-RepetitionPeriodAndOffset-r17 ::= CHOICE +void mcch_repeat_period_and_offset_r17_c::destroy_() {} +void mcch_repeat_period_and_offset_r17_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +mcch_repeat_period_and_offset_r17_c::mcch_repeat_period_and_offset_r17_c( + const mcch_repeat_period_and_offset_r17_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::rf1_r17: + c.init(other.c.get()); + break; + case types::rf2_r17: + c.init(other.c.get()); + break; + case types::rf4_r17: + c.init(other.c.get()); + break; + case types::rf8_r17: + c.init(other.c.get()); + break; + case types::rf16_r17: + c.init(other.c.get()); + break; + case types::rf32_r17: + c.init(other.c.get()); + break; + case types::rf64_r17: + c.init(other.c.get()); + break; + case types::rf128_r17: + c.init(other.c.get()); + break; + case types::rf256_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mcch_repeat_period_and_offset_r17_c"); + } +} +mcch_repeat_period_and_offset_r17_c& +mcch_repeat_period_and_offset_r17_c::operator=(const mcch_repeat_period_and_offset_r17_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::rf1_r17: + c.set(other.c.get()); + break; + case types::rf2_r17: + c.set(other.c.get()); + break; + case types::rf4_r17: + c.set(other.c.get()); + break; + case types::rf8_r17: + c.set(other.c.get()); + break; + case types::rf16_r17: + c.set(other.c.get()); + break; + case types::rf32_r17: + c.set(other.c.get()); + break; + case types::rf64_r17: + c.set(other.c.get()); + break; + case types::rf128_r17: + c.set(other.c.get()); + break; + case types::rf256_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "mcch_repeat_period_and_offset_r17_c"); + } + + return *this; +} +uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf1_r17() +{ + set(types::rf1_r17); + return c.get(); +} +uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf2_r17() +{ + set(types::rf2_r17); + return c.get(); +} +uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf4_r17() +{ + set(types::rf4_r17); + return c.get(); +} +uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf8_r17() +{ + set(types::rf8_r17); + return c.get(); +} +uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf16_r17() +{ + set(types::rf16_r17); + return c.get(); +} +uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf32_r17() +{ + set(types::rf32_r17); + return c.get(); +} +uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf64_r17() +{ + set(types::rf64_r17); + return c.get(); +} +uint8_t& mcch_repeat_period_and_offset_r17_c::set_rf128_r17() +{ + set(types::rf128_r17); + return c.get(); +} +uint16_t& mcch_repeat_period_and_offset_r17_c::set_rf256_r17() +{ + set(types::rf256_r17); + return c.get(); +} +void mcch_repeat_period_and_offset_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rf1_r17: + j.write_int("rf1-r17", c.get()); + break; + case types::rf2_r17: + j.write_int("rf2-r17", c.get()); + break; + case types::rf4_r17: + j.write_int("rf4-r17", c.get()); + break; + case types::rf8_r17: + j.write_int("rf8-r17", c.get()); + break; + case types::rf16_r17: + j.write_int("rf16-r17", c.get()); + break; + case types::rf32_r17: + j.write_int("rf32-r17", c.get()); + break; + case types::rf64_r17: + j.write_int("rf64-r17", c.get()); + break; + case types::rf128_r17: + j.write_int("rf128-r17", c.get()); + break; + case types::rf256_r17: + j.write_int("rf256-r17", c.get()); + break; + default: + log_invalid_choice_id(type_, "mcch_repeat_period_and_offset_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE mcch_repeat_period_and_offset_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::rf1_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)0u)); + break; + case types::rf2_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)1u)); + break; + case types::rf4_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)3u)); + break; + case types::rf8_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)7u)); + break; + case types::rf16_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)15u)); + break; + case types::rf32_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)31u)); + break; + case types::rf64_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)63u)); + break; + case types::rf128_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)127u)); + break; + case types::rf256_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)255u)); + break; + default: + log_invalid_choice_id(type_, "mcch_repeat_period_and_offset_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mcch_repeat_period_and_offset_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::rf1_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)0u)); + break; + case types::rf2_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)1u)); + break; + case types::rf4_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)3u)); + break; + case types::rf8_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)7u)); + break; + case types::rf16_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)15u)); + break; + case types::rf32_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)31u)); + break; + case types::rf64_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)63u)); + break; + case types::rf128_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)127u)); + break; + case types::rf256_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)255u)); + break; + default: + log_invalid_choice_id(type_, "mcch_repeat_period_and_offset_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* mcch_repeat_period_and_offset_r17_c::types_opts::to_string() const +{ + static const char* names[] = { + "rf1-r17", "rf2-r17", "rf4-r17", "rf8-r17", "rf16-r17", "rf32-r17", "rf64-r17", "rf128-r17", "rf256-r17"}; + return convert_enum_idx(names, 9, value, "mcch_repeat_period_and_offset_r17_c::types"); +} +uint16_t mcch_repeat_period_and_offset_r17_c::types_opts::to_number() const +{ + static const uint16_t numbers[] = {1, 2, 4, 8, 16, 32, 64, 128, 256}; + return map_enum_number(numbers, 9, value, "mcch_repeat_period_and_offset_r17_c::types"); +} + +// MeasIdleCarrierEUTRA-r16 ::= SEQUENCE +SRSASN_CODE meas_idle_carrier_eutra_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_cell_list_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(quality_thres_eutra_r16_present, 1)); + + HANDLE_CODE(pack_integer(bref, carrier_freq_eutra_r16, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(allowed_meas_bw_r16.pack(bref)); + if (meas_cell_list_eutra_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_cell_list_eutra_r16, 1, 8)); + } + HANDLE_CODE(report_quantities_eutra_r16.pack(bref)); + if (quality_thres_eutra_r16_present) { + HANDLE_CODE(bref.pack(quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16_present, 1)); + HANDLE_CODE(bref.pack(quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16_present, 1)); + if (quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16_present) { + HANDLE_CODE(pack_integer(bref, quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16, (uint8_t)0u, (uint8_t)97u)); + } + if (quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16_present) { + HANDLE_CODE(pack_integer(bref, quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16, (int8_t)-30, (int8_t)46)); + } + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_idle_carrier_eutra_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool meas_cell_list_eutra_r16_present; + HANDLE_CODE(bref.unpack(meas_cell_list_eutra_r16_present, 1)); + HANDLE_CODE(bref.unpack(quality_thres_eutra_r16_present, 1)); + + HANDLE_CODE(unpack_integer(carrier_freq_eutra_r16, bref, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(allowed_meas_bw_r16.unpack(bref)); + if (meas_cell_list_eutra_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_cell_list_eutra_r16, bref, 1, 8)); + } + HANDLE_CODE(report_quantities_eutra_r16.unpack(bref)); + if (quality_thres_eutra_r16_present) { + HANDLE_CODE(bref.unpack(quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16_present, 1)); + HANDLE_CODE(bref.unpack(quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16_present, 1)); + if (quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16_present) { + HANDLE_CODE(unpack_integer(quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16, bref, (uint8_t)0u, (uint8_t)97u)); + } + if (quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16_present) { + HANDLE_CODE(unpack_integer(quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16, bref, (int8_t)-30, (int8_t)46)); + } + } + + return SRSASN_SUCCESS; +} +void meas_idle_carrier_eutra_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreqEUTRA-r16", carrier_freq_eutra_r16); + j.write_str("allowedMeasBandwidth-r16", allowed_meas_bw_r16.to_string()); + if (meas_cell_list_eutra_r16.size() > 0) { + j.start_array("measCellListEUTRA-r16"); + for (const auto& e1 : meas_cell_list_eutra_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.write_str("reportQuantitiesEUTRA-r16", report_quantities_eutra_r16.to_string()); + if (quality_thres_eutra_r16_present) { + j.write_fieldname("qualityThresholdEUTRA-r16"); + j.start_obj(); + if (quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16_present) { + j.write_int("idleRSRP-Threshold-EUTRA-r16", quality_thres_eutra_r16.idle_rsrp_thres_eutra_r16); + } + if (quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16_present) { + j.write_int("idleRSRQ-Threshold-EUTRA-r16", quality_thres_eutra_r16.idle_rsrq_thres_eutra_r16); + } + j.end_obj(); + } + j.end_obj(); +} + +const char* meas_idle_carrier_eutra_r16_s::report_quantities_eutra_r16_opts::to_string() const +{ + static const char* names[] = {"rsrp", "rsrq", "both"}; + return convert_enum_idx(names, 3, value, "meas_idle_carrier_eutra_r16_s::report_quantities_eutra_r16_e_"); +} + +// MeasIdleCarrierNR-r16 ::= SEQUENCE +SRSASN_CODE meas_idle_carrier_nr_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(freq_band_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_cell_list_nr_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(quality_thres_r16_present, 1)); + HANDLE_CODE(bref.pack(ssb_meas_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(beam_meas_cfg_idle_r16_present, 1)); + + HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(ssb_subcarrier_spacing_r16.pack(bref)); + if (freq_band_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8, integer_packer(1, 1024))); + } + if (meas_cell_list_nr_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_cell_list_nr_r16, 1, 8)); + } + HANDLE_CODE(report_quantities_r16.pack(bref)); + if (quality_thres_r16_present) { + HANDLE_CODE(bref.pack(quality_thres_r16.idle_rsrp_thres_nr_r16_present, 1)); + HANDLE_CODE(bref.pack(quality_thres_r16.idle_rsrq_thres_nr_r16_present, 1)); + if (quality_thres_r16.idle_rsrp_thres_nr_r16_present) { + HANDLE_CODE(pack_integer(bref, quality_thres_r16.idle_rsrp_thres_nr_r16, (uint8_t)0u, (uint8_t)127u)); + } + if (quality_thres_r16.idle_rsrq_thres_nr_r16_present) { + HANDLE_CODE(pack_integer(bref, quality_thres_r16.idle_rsrq_thres_nr_r16, (uint8_t)0u, (uint8_t)127u)); + } + } + if (ssb_meas_cfg_r16_present) { + HANDLE_CODE(bref.pack(ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16_present, 1)); + HANDLE_CODE(bref.pack(ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16_present, 1)); + HANDLE_CODE(bref.pack(ssb_meas_cfg_r16.smtc_r16_present, 1)); + HANDLE_CODE(bref.pack(ssb_meas_cfg_r16.ssb_to_measure_r16_present, 1)); + HANDLE_CODE(bref.pack(ssb_meas_cfg_r16.ss_rssi_meas_r16_present, 1)); + if (ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16_present) { + HANDLE_CODE(pack_integer(bref, ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16, (uint8_t)2u, (uint8_t)16u)); + } + if (ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16_present) { + HANDLE_CODE(ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16.pack(bref)); + } + if (ssb_meas_cfg_r16.smtc_r16_present) { + HANDLE_CODE(ssb_meas_cfg_r16.smtc_r16.pack(bref)); + } + if (ssb_meas_cfg_r16.ssb_to_measure_r16_present) { + HANDLE_CODE(ssb_meas_cfg_r16.ssb_to_measure_r16.pack(bref)); + } + HANDLE_CODE(bref.pack(ssb_meas_cfg_r16.derive_ssb_idx_from_cell_r16, 1)); + if (ssb_meas_cfg_r16.ss_rssi_meas_r16_present) { + HANDLE_CODE(ssb_meas_cfg_r16.ss_rssi_meas_r16.pack(bref)); + } + } + if (beam_meas_cfg_idle_r16_present) { + HANDLE_CODE(beam_meas_cfg_idle_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_idle_carrier_nr_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool freq_band_list_present; + HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); + bool meas_cell_list_nr_r16_present; + HANDLE_CODE(bref.unpack(meas_cell_list_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(quality_thres_r16_present, 1)); + HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(beam_meas_cfg_idle_r16_present, 1)); + + HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(ssb_subcarrier_spacing_r16.unpack(bref)); + if (freq_band_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8, integer_packer(1, 1024))); + } + if (meas_cell_list_nr_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_cell_list_nr_r16, bref, 1, 8)); + } + HANDLE_CODE(report_quantities_r16.unpack(bref)); + if (quality_thres_r16_present) { + HANDLE_CODE(bref.unpack(quality_thres_r16.idle_rsrp_thres_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(quality_thres_r16.idle_rsrq_thres_nr_r16_present, 1)); + if (quality_thres_r16.idle_rsrp_thres_nr_r16_present) { + HANDLE_CODE(unpack_integer(quality_thres_r16.idle_rsrp_thres_nr_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (quality_thres_r16.idle_rsrq_thres_nr_r16_present) { + HANDLE_CODE(unpack_integer(quality_thres_r16.idle_rsrq_thres_nr_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + } + if (ssb_meas_cfg_r16_present) { + HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16_present, 1)); + HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16_present, 1)); + HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16.smtc_r16_present, 1)); + HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16.ssb_to_measure_r16_present, 1)); + HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16.ss_rssi_meas_r16_present, 1)); + if (ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16_present) { + HANDLE_CODE(unpack_integer(ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16, bref, (uint8_t)2u, (uint8_t)16u)); + } + if (ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16_present) { + HANDLE_CODE(ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16.unpack(bref)); + } + if (ssb_meas_cfg_r16.smtc_r16_present) { + HANDLE_CODE(ssb_meas_cfg_r16.smtc_r16.unpack(bref)); + } + if (ssb_meas_cfg_r16.ssb_to_measure_r16_present) { + HANDLE_CODE(ssb_meas_cfg_r16.ssb_to_measure_r16.unpack(bref)); + } + HANDLE_CODE(bref.unpack(ssb_meas_cfg_r16.derive_ssb_idx_from_cell_r16, 1)); + if (ssb_meas_cfg_r16.ss_rssi_meas_r16_present) { + HANDLE_CODE(ssb_meas_cfg_r16.ss_rssi_meas_r16.unpack(bref)); + } + } + if (beam_meas_cfg_idle_r16_present) { + HANDLE_CODE(beam_meas_cfg_idle_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_idle_carrier_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r16", carrier_freq_r16); + j.write_str("ssbSubcarrierSpacing-r16", ssb_subcarrier_spacing_r16.to_string()); + if (freq_band_list.size() > 0) { + j.start_array("frequencyBandList"); + for (const auto& e1 : freq_band_list) { + j.write_int(e1); + } + j.end_array(); + } + if (meas_cell_list_nr_r16.size() > 0) { + j.start_array("measCellListNR-r16"); + for (const auto& e1 : meas_cell_list_nr_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.write_str("reportQuantities-r16", report_quantities_r16.to_string()); + if (quality_thres_r16_present) { + j.write_fieldname("qualityThreshold-r16"); + j.start_obj(); + if (quality_thres_r16.idle_rsrp_thres_nr_r16_present) { + j.write_int("idleRSRP-Threshold-NR-r16", quality_thres_r16.idle_rsrp_thres_nr_r16); + } + if (quality_thres_r16.idle_rsrq_thres_nr_r16_present) { + j.write_int("idleRSRQ-Threshold-NR-r16", quality_thres_r16.idle_rsrq_thres_nr_r16); + } + j.end_obj(); + } + if (ssb_meas_cfg_r16_present) { + j.write_fieldname("ssb-MeasConfig-r16"); + j.start_obj(); + if (ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16_present) { + j.write_int("nrofSS-BlocksToAverage-r16", ssb_meas_cfg_r16.nrof_ss_blocks_to_average_r16); + } + if (ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16_present) { + j.write_fieldname("absThreshSS-BlocksConsolidation-r16"); + ssb_meas_cfg_r16.abs_thresh_ss_blocks_consolidation_r16.to_json(j); + } + if (ssb_meas_cfg_r16.smtc_r16_present) { + j.write_fieldname("smtc-r16"); + ssb_meas_cfg_r16.smtc_r16.to_json(j); + } + if (ssb_meas_cfg_r16.ssb_to_measure_r16_present) { + j.write_fieldname("ssb-ToMeasure-r16"); + ssb_meas_cfg_r16.ssb_to_measure_r16.to_json(j); + } + j.write_bool("deriveSSB-IndexFromCell-r16", ssb_meas_cfg_r16.derive_ssb_idx_from_cell_r16); + if (ssb_meas_cfg_r16.ss_rssi_meas_r16_present) { + j.write_fieldname("ss-RSSI-Measurement-r16"); + ssb_meas_cfg_r16.ss_rssi_meas_r16.to_json(j); + } + j.end_obj(); + } + if (beam_meas_cfg_idle_r16_present) { + j.write_fieldname("beamMeasConfigIdle-r16"); + beam_meas_cfg_idle_r16.to_json(j); + } + j.end_obj(); +} + +const char* meas_idle_carrier_nr_r16_s::report_quantities_r16_opts::to_string() const +{ + static const char* names[] = {"rsrp", "rsrq", "both"}; + return convert_enum_idx(names, 3, value, "meas_idle_carrier_nr_r16_s::report_quantities_r16_e_"); +} + +// NPN-Identity-r16 ::= CHOICE +void npn_id_r16_c::destroy_() +{ + switch (type_) { + case types::pni_npn_r16: + c.destroy(); + break; + case types::snpn_r16: + c.destroy(); + break; + default: + break; + } +} +void npn_id_r16_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::pni_npn_r16: + c.init(); + break; + case types::snpn_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "npn_id_r16_c"); + } +} +npn_id_r16_c::npn_id_r16_c(const npn_id_r16_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::pni_npn_r16: + c.init(other.c.get()); + break; + case types::snpn_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "npn_id_r16_c"); + } +} +npn_id_r16_c& npn_id_r16_c::operator=(const npn_id_r16_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::pni_npn_r16: + c.set(other.c.get()); + break; + case types::snpn_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "npn_id_r16_c"); + } + + return *this; +} +npn_id_r16_c::pni_npn_r16_s_& npn_id_r16_c::set_pni_npn_r16() +{ + set(types::pni_npn_r16); + return c.get(); +} +npn_id_r16_c::snpn_r16_s_& npn_id_r16_c::set_snpn_r16() +{ + set(types::snpn_r16); + return c.get(); +} +void npn_id_r16_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::pni_npn_r16: + j.write_fieldname("pni-npn-r16"); + j.start_obj(); + j.write_fieldname("plmn-Identity-r16"); + c.get().plmn_id_r16.to_json(j); + j.start_array("cag-IdentityList-r16"); + for (const auto& e1 : c.get().cag_id_list_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); + break; + case types::snpn_r16: + j.write_fieldname("snpn-r16"); + j.start_obj(); + j.write_fieldname("plmn-Identity-r16"); + c.get().plmn_id_r16.to_json(j); + j.start_array("nid-List-r16"); + for (const auto& e1 : c.get().nid_list_r16) { + j.write_str(e1.to_string()); + } + j.end_array(); + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "npn_id_r16_c"); + } + j.end_obj(); +} +SRSASN_CODE npn_id_r16_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::pni_npn_r16: + HANDLE_CODE(c.get().plmn_id_r16.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().cag_id_list_r16, 1, 12)); + break; + case types::snpn_r16: + HANDLE_CODE(c.get().plmn_id_r16.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, c.get().nid_list_r16, 1, 12)); + break; + default: + log_invalid_choice_id(type_, "npn_id_r16_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE npn_id_r16_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::pni_npn_r16: + HANDLE_CODE(c.get().plmn_id_r16.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(c.get().cag_id_list_r16, bref, 1, 12)); + break; + case types::snpn_r16: + HANDLE_CODE(c.get().plmn_id_r16.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(c.get().nid_list_r16, bref, 1, 12)); + break; + default: + log_invalid_choice_id(type_, "npn_id_r16_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* npn_id_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"pni-npn-r16", "snpn-r16"}; + return convert_enum_idx(names, 2, value, "npn_id_r16_c::types"); +} + +// NTN-NeighCellConfig-r17 ::= SEQUENCE +SRSASN_CODE ntn_neigh_cell_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ntn_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(carrier_freq_r17_present, 1)); + HANDLE_CODE(bref.pack(pci_r17_present, 1)); + + if (ntn_cfg_r17_present) { + HANDLE_CODE(ntn_cfg_r17.pack(bref)); + } + if (carrier_freq_r17_present) { + HANDLE_CODE(pack_integer(bref, carrier_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); + } + if (pci_r17_present) { + HANDLE_CODE(pack_integer(bref, pci_r17, (uint16_t)0u, (uint16_t)1007u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ntn_neigh_cell_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ntn_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(carrier_freq_r17_present, 1)); + HANDLE_CODE(bref.unpack(pci_r17_present, 1)); + + if (ntn_cfg_r17_present) { + HANDLE_CODE(ntn_cfg_r17.unpack(bref)); + } + if (carrier_freq_r17_present) { + HANDLE_CODE(unpack_integer(carrier_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); + } + if (pci_r17_present) { + HANDLE_CODE(unpack_integer(pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); + } + + return SRSASN_SUCCESS; +} +void ntn_neigh_cell_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ntn_cfg_r17_present) { + j.write_fieldname("ntn-Config-r17"); + ntn_cfg_r17.to_json(j); + } + if (carrier_freq_r17_present) { + j.write_int("carrierFreq-r17", carrier_freq_r17); + } + if (pci_r17_present) { + j.write_int("physCellId-r17", pci_r17); + } + j.end_obj(); +} + +// PDSCH-ConfigBroadcast-r17 ::= SEQUENCE +SRSASN_CODE pdsch_cfg_broadcast_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pdsch_time_domain_alloc_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(rate_match_pattern_to_add_mod_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(lte_crs_to_match_around_r17_present, 1)); + HANDLE_CODE(bref.pack(mcs_table_r17_present, 1)); + HANDLE_CODE(bref.pack(xoverhead_r17_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, pdsch_cfg_list_r17, 1, 16)); + if (pdsch_time_domain_alloc_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, pdsch_time_domain_alloc_list_r17, 1, 16)); + } + if (rate_match_pattern_to_add_mod_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, rate_match_pattern_to_add_mod_list_r17, 1, 4)); + } + if (lte_crs_to_match_around_r17_present) { + HANDLE_CODE(lte_crs_to_match_around_r17.pack(bref)); + } + if (mcs_table_r17_present) { + HANDLE_CODE(mcs_table_r17.pack(bref)); + } + if (xoverhead_r17_present) { + HANDLE_CODE(xoverhead_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdsch_cfg_broadcast_r17_s::unpack(cbit_ref& bref) +{ + bool pdsch_time_domain_alloc_list_r17_present; + HANDLE_CODE(bref.unpack(pdsch_time_domain_alloc_list_r17_present, 1)); + bool rate_match_pattern_to_add_mod_list_r17_present; + HANDLE_CODE(bref.unpack(rate_match_pattern_to_add_mod_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(lte_crs_to_match_around_r17_present, 1)); + HANDLE_CODE(bref.unpack(mcs_table_r17_present, 1)); + HANDLE_CODE(bref.unpack(xoverhead_r17_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(pdsch_cfg_list_r17, bref, 1, 16)); + if (pdsch_time_domain_alloc_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(pdsch_time_domain_alloc_list_r17, bref, 1, 16)); + } + if (rate_match_pattern_to_add_mod_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(rate_match_pattern_to_add_mod_list_r17, bref, 1, 4)); + } + if (lte_crs_to_match_around_r17_present) { + HANDLE_CODE(lte_crs_to_match_around_r17.unpack(bref)); + } + if (mcs_table_r17_present) { + HANDLE_CODE(mcs_table_r17.unpack(bref)); + } + if (xoverhead_r17_present) { + HANDLE_CODE(xoverhead_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pdsch_cfg_broadcast_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("pdschConfigList-r17"); + for (const auto& e1 : pdsch_cfg_list_r17) { + e1.to_json(j); + } + j.end_array(); + if (pdsch_time_domain_alloc_list_r17.size() > 0) { + j.start_array("pdsch-TimeDomainAllocationList-r17"); + for (const auto& e1 : pdsch_time_domain_alloc_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (rate_match_pattern_to_add_mod_list_r17.size() > 0) { + j.start_array("rateMatchPatternToAddModList-r17"); + for (const auto& e1 : rate_match_pattern_to_add_mod_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (lte_crs_to_match_around_r17_present) { + j.write_fieldname("lte-CRS-ToMatchAround-r17"); + lte_crs_to_match_around_r17.to_json(j); + } + if (mcs_table_r17_present) { + j.write_str("mcs-Table-r17", mcs_table_r17.to_string()); + } + if (xoverhead_r17_present) { + j.write_str("xOverhead-r17", xoverhead_r17.to_string()); + } + j.end_obj(); +} + +const char* pdsch_cfg_broadcast_r17_s::mcs_table_r17_opts::to_string() const +{ + static const char* names[] = {"qam256", "qam64LowSE"}; + return convert_enum_idx(names, 2, value, "pdsch_cfg_broadcast_r17_s::mcs_table_r17_e_"); +} +uint16_t pdsch_cfg_broadcast_r17_s::mcs_table_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {256, 64}; + return map_enum_number(numbers, 2, value, "pdsch_cfg_broadcast_r17_s::mcs_table_r17_e_"); +} + +const char* pdsch_cfg_broadcast_r17_s::xoverhead_r17_opts::to_string() const +{ + static const char* names[] = {"xOh6", "xOh12", "xOh18"}; + return convert_enum_idx(names, 3, value, "pdsch_cfg_broadcast_r17_s::xoverhead_r17_e_"); +} +uint8_t pdsch_cfg_broadcast_r17_s::xoverhead_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {6, 12, 18}; + return map_enum_number(numbers, 3, value, "pdsch_cfg_broadcast_r17_s::xoverhead_r17_e_"); +} + +// RedCap-ConfigCommonSIB-r17 ::= SEQUENCE +SRSASN_CODE red_cap_cfg_common_sib_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(half_duplex_red_cap_allowed_r17_present, 1)); + HANDLE_CODE(bref.pack(cell_barred_red_cap_r17_present, 1)); + + if (cell_barred_red_cap_r17_present) { + HANDLE_CODE(cell_barred_red_cap_r17.cell_barred_red_cap1_rx_r17.pack(bref)); + HANDLE_CODE(cell_barred_red_cap_r17.cell_barred_red_cap2_rx_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE red_cap_cfg_common_sib_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(half_duplex_red_cap_allowed_r17_present, 1)); + HANDLE_CODE(bref.unpack(cell_barred_red_cap_r17_present, 1)); + + if (cell_barred_red_cap_r17_present) { + HANDLE_CODE(cell_barred_red_cap_r17.cell_barred_red_cap1_rx_r17.unpack(bref)); + HANDLE_CODE(cell_barred_red_cap_r17.cell_barred_red_cap2_rx_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void red_cap_cfg_common_sib_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (half_duplex_red_cap_allowed_r17_present) { + j.write_str("halfDuplexRedCapAllowed-r17", "true"); + } + if (cell_barred_red_cap_r17_present) { + j.write_fieldname("cellBarredRedCap-r17"); + j.start_obj(); + j.write_str("cellBarredRedCap1Rx-r17", cell_barred_red_cap_r17.cell_barred_red_cap1_rx_r17.to_string()); + j.write_str("cellBarredRedCap2Rx-r17", cell_barred_red_cap_r17.cell_barred_red_cap2_rx_r17.to_string()); + j.end_obj(); + } + j.end_obj(); +} + +const char* +red_cap_cfg_common_sib_r17_s::cell_barred_red_cap_r17_s_::cell_barred_red_cap1_rx_r17_opts::to_string() const +{ + static const char* names[] = {"barred", "notBarred"}; + return convert_enum_idx( + names, 2, value, "red_cap_cfg_common_sib_r17_s::cell_barred_red_cap_r17_s_::cell_barred_red_cap1_rx_r17_e_"); +} + +const char* +red_cap_cfg_common_sib_r17_s::cell_barred_red_cap_r17_s_::cell_barred_red_cap2_rx_r17_opts::to_string() const +{ + static const char* names[] = {"barred", "notBarred"}; + return convert_enum_idx( + names, 2, value, "red_cap_cfg_common_sib_r17_s::cell_barred_red_cap_r17_s_::cell_barred_red_cap2_rx_r17_e_"); +} + +// ReferenceTime-r16 ::= SEQUENCE +SRSASN_CODE ref_time_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, ref_days_r16, (uint32_t)0u, (uint32_t)72999u)); + HANDLE_CODE(pack_integer(bref, ref_seconds_r16, (uint32_t)0u, (uint32_t)86399u)); + HANDLE_CODE(pack_integer(bref, ref_milli_seconds_r16, (uint16_t)0u, (uint16_t)999u)); + HANDLE_CODE(pack_integer(bref, ref_ten_nano_seconds_r16, (uint32_t)0u, (uint32_t)99999u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ref_time_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(ref_days_r16, bref, (uint32_t)0u, (uint32_t)72999u)); + HANDLE_CODE(unpack_integer(ref_seconds_r16, bref, (uint32_t)0u, (uint32_t)86399u)); + HANDLE_CODE(unpack_integer(ref_milli_seconds_r16, bref, (uint16_t)0u, (uint16_t)999u)); + HANDLE_CODE(unpack_integer(ref_ten_nano_seconds_r16, bref, (uint32_t)0u, (uint32_t)99999u)); + + return SRSASN_SUCCESS; +} +void ref_time_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("refDays-r16", ref_days_r16); + j.write_int("refSeconds-r16", ref_seconds_r16); + j.write_int("refMilliSeconds-r16", ref_milli_seconds_r16); + j.write_int("refTenNanoSeconds-r16", ref_ten_nano_seconds_r16); + j.end_obj(); +} + +// SDT-ConfigCommonSIB-r17 ::= SEQUENCE +SRSASN_CODE sdt_cfg_common_sib_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sdt_rsrp_thres_r17_present, 1)); + HANDLE_CODE(bref.pack(sdt_lc_ch_sr_delay_timer_r17_present, 1)); + + if (sdt_rsrp_thres_r17_present) { + HANDLE_CODE(pack_integer(bref, sdt_rsrp_thres_r17, (uint8_t)0u, (uint8_t)127u)); + } + if (sdt_lc_ch_sr_delay_timer_r17_present) { + HANDLE_CODE(sdt_lc_ch_sr_delay_timer_r17.pack(bref)); + } + HANDLE_CODE(sdt_data_volume_thres_r17.pack(bref)); + HANDLE_CODE(t319a_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sdt_cfg_common_sib_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sdt_rsrp_thres_r17_present, 1)); + HANDLE_CODE(bref.unpack(sdt_lc_ch_sr_delay_timer_r17_present, 1)); + + if (sdt_rsrp_thres_r17_present) { + HANDLE_CODE(unpack_integer(sdt_rsrp_thres_r17, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (sdt_lc_ch_sr_delay_timer_r17_present) { + HANDLE_CODE(sdt_lc_ch_sr_delay_timer_r17.unpack(bref)); + } + HANDLE_CODE(sdt_data_volume_thres_r17.unpack(bref)); + HANDLE_CODE(t319a_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sdt_cfg_common_sib_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sdt_rsrp_thres_r17_present) { + j.write_int("sdt-RSRP-Threshold-r17", sdt_rsrp_thres_r17); + } + if (sdt_lc_ch_sr_delay_timer_r17_present) { + j.write_str("sdt-LogicalChannelSR-DelayTimer-r17", sdt_lc_ch_sr_delay_timer_r17.to_string()); + } + j.write_str("sdt-DataVolumeThreshold-r17", sdt_data_volume_thres_r17.to_string()); + j.write_str("t319a-r17", t319a_r17.to_string()); + j.end_obj(); +} + +const char* sdt_cfg_common_sib_r17_s::sdt_lc_ch_sr_delay_timer_r17_opts::to_string() const +{ + static const char* names[] = {"sf20", "sf40", "sf64", "sf128", "sf512", "sf1024", "sf2560", "spare1"}; + return convert_enum_idx(names, 8, value, "sdt_cfg_common_sib_r17_s::sdt_lc_ch_sr_delay_timer_r17_e_"); +} +uint16_t sdt_cfg_common_sib_r17_s::sdt_lc_ch_sr_delay_timer_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {20, 40, 64, 128, 512, 1024, 2560}; + return map_enum_number(numbers, 7, value, "sdt_cfg_common_sib_r17_s::sdt_lc_ch_sr_delay_timer_r17_e_"); +} + +const char* sdt_cfg_common_sib_r17_s::sdt_data_volume_thres_r17_opts::to_string() const +{ + static const char* names[] = {"byte32", + "byte100", + "byte200", + "byte400", + "byte600", + "byte800", + "byte1000", + "byte2000", + "byte4000", + "byte8000", + "byte9000", + "byte10000", + "byte12000", + "byte24000", + "byte48000", + "byte96000"}; + return convert_enum_idx(names, 16, value, "sdt_cfg_common_sib_r17_s::sdt_data_volume_thres_r17_e_"); +} +uint32_t sdt_cfg_common_sib_r17_s::sdt_data_volume_thres_r17_opts::to_number() const +{ + static const uint32_t numbers[] = { + 32, 100, 200, 400, 600, 800, 1000, 2000, 4000, 8000, 9000, 10000, 12000, 24000, 48000, 96000}; + return map_enum_number(numbers, 16, value, "sdt_cfg_common_sib_r17_s::sdt_data_volume_thres_r17_e_"); +} + +const char* sdt_cfg_common_sib_r17_s::t319a_r17_opts::to_string() const +{ + static const char* names[] = {"ms100", + "ms200", + "ms300", + "ms400", + "ms600", + "ms1000", + "ms2000", + "ms3000", + "ms4000", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "sdt_cfg_common_sib_r17_s::t319a_r17_e_"); +} +uint16_t sdt_cfg_common_sib_r17_s::t319a_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 2000, 3000, 4000}; + return map_enum_number(numbers, 9, value, "sdt_cfg_common_sib_r17_s::t319a_r17_e_"); +} + +// SI-SchedulingInfo-v1700 ::= SEQUENCE +SRSASN_CODE si_sched_info_v1700_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(dummy_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, sched_info_list2_r17, 1, 32)); + if (dummy_present) { + HANDLE_CODE(dummy.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE si_sched_info_v1700_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(dummy_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(sched_info_list2_r17, bref, 1, 32)); + if (dummy_present) { + HANDLE_CODE(dummy.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void si_sched_info_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("schedulingInfoList2-r17"); + for (const auto& e1 : sched_info_list2_r17) { + e1.to_json(j); + } + j.end_array(); + if (dummy_present) { + j.write_fieldname("dummy"); + dummy.to_json(j); + } + j.end_obj(); +} + +// SIB-TypeInfo ::= SEQUENCE +SRSASN_CODE sib_type_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(value_tag_present, 1)); + HANDLE_CODE(bref.pack(area_scope_present, 1)); + + HANDLE_CODE(type.pack(bref)); + if (value_tag_present) { + HANDLE_CODE(pack_integer(bref, value_tag, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_type_info_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(value_tag_present, 1)); + HANDLE_CODE(bref.unpack(area_scope_present, 1)); + + HANDLE_CODE(type.unpack(bref)); + if (value_tag_present) { + HANDLE_CODE(unpack_integer(value_tag, bref, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +void sib_type_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("type", type.to_string()); + if (value_tag_present) { + j.write_int("valueTag", value_tag); + } + if (area_scope_present) { + j.write_str("areaScope", "true"); + } + j.end_obj(); +} + +const char* sib_type_info_s::type_opts::to_string() const +{ + static const char* names[] = {"sibType2", + "sibType3", + "sibType4", + "sibType5", + "sibType6", + "sibType7", + "sibType8", + "sibType9", + "sibType10-v1610", + "sibType11-v1610", + "sibType12-v1610", + "sibType13-v1610", + "sibType14-v1610", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "sib_type_info_s::type_e_"); +} +uint8_t sib_type_info_s::type_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}; + return map_enum_number(numbers, 13, value, "sib_type_info_s::type_e_"); +} + +// SIB1-v1740-IEs ::= SEQUENCE +SRSASN_CODE sib1_v1740_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(si_sched_info_v1740_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (si_sched_info_v1740_present) { + HANDLE_CODE(si_sched_info_v1740.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib1_v1740_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(si_sched_info_v1740_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (si_sched_info_v1740_present) { + HANDLE_CODE(si_sched_info_v1740.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib1_v1740_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (si_sched_info_v1740_present) { + j.write_fieldname("si-SchedulingInfo-v1740"); + si_sched_info_v1740.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// UAC-BarringPerCat ::= SEQUENCE +SRSASN_CODE uac_barr_per_cat_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, access_category, (uint8_t)1u, (uint8_t)63u)); + HANDLE_CODE(pack_integer(bref, uac_barr_info_set_idx, (uint8_t)1u, (uint8_t)8u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE uac_barr_per_cat_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(access_category, bref, (uint8_t)1u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(uac_barr_info_set_idx, bref, (uint8_t)1u, (uint8_t)8u)); + + return SRSASN_SUCCESS; +} +void uac_barr_per_cat_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("accessCategory", access_category); + j.write_int("uac-barringInfoSetIndex", uac_barr_info_set_idx); + j.end_obj(); +} + +// ApplicableDisasterInfo-r17 ::= CHOICE +void applicable_disaster_info_r17_c::set(types::options e) +{ + type_ = e; +} +void applicable_disaster_info_r17_c::set_no_disaster_roaming_r17() +{ + set(types::no_disaster_roaming_r17); +} +void applicable_disaster_info_r17_c::set_disaster_related_ind_r17() +{ + set(types::disaster_related_ind_r17); +} +void applicable_disaster_info_r17_c::set_common_plmns_r17() +{ + set(types::common_plmns_r17); +} +applicable_disaster_info_r17_c::ded_plmns_r17_l_& applicable_disaster_info_r17_c::set_ded_plmns_r17() +{ + set(types::ded_plmns_r17); + return c; +} +void applicable_disaster_info_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::no_disaster_roaming_r17: + break; + case types::disaster_related_ind_r17: + break; + case types::common_plmns_r17: + break; + case types::ded_plmns_r17: + j.start_array("dedicatedPLMNs-r17"); + for (const auto& e1 : c) { + e1.to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "applicable_disaster_info_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE applicable_disaster_info_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::no_disaster_roaming_r17: + break; + case types::disaster_related_ind_r17: + break; + case types::common_plmns_r17: + break; + case types::ded_plmns_r17: + HANDLE_CODE(pack_dyn_seq_of(bref, c, 1, 12)); + break; + default: + log_invalid_choice_id(type_, "applicable_disaster_info_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE applicable_disaster_info_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::no_disaster_roaming_r17: + break; + case types::disaster_related_ind_r17: + break; + case types::common_plmns_r17: + break; + case types::ded_plmns_r17: + HANDLE_CODE(unpack_dyn_seq_of(c, bref, 1, 12)); + break; + default: + log_invalid_choice_id(type_, "applicable_disaster_info_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* applicable_disaster_info_r17_c::types_opts::to_string() const +{ + static const char* names[] = { + "noDisasterRoaming-r17", "disasterRelatedIndication-r17", "commonPLMNs-r17", "dedicatedPLMNs-r17"}; + return convert_enum_idx(names, 4, value, "applicable_disaster_info_r17_c::types"); +} + +// CFR-ConfigMCCH-MTCH-r17 ::= SEQUENCE +SRSASN_CODE cfr_cfg_mcch_mtch_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(location_and_bw_broadcast_r17_present, 1)); + HANDLE_CODE(bref.pack(pdsch_cfg_mcch_r17_present, 1)); + HANDLE_CODE(bref.pack(common_coreset_ext_r17_present, 1)); + + if (location_and_bw_broadcast_r17_present) { + HANDLE_CODE(location_and_bw_broadcast_r17.pack(bref)); + } + if (pdsch_cfg_mcch_r17_present) { + HANDLE_CODE(pdsch_cfg_mcch_r17.pack(bref)); + } + if (common_coreset_ext_r17_present) { + HANDLE_CODE(common_coreset_ext_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cfr_cfg_mcch_mtch_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(location_and_bw_broadcast_r17_present, 1)); + HANDLE_CODE(bref.unpack(pdsch_cfg_mcch_r17_present, 1)); + HANDLE_CODE(bref.unpack(common_coreset_ext_r17_present, 1)); + + if (location_and_bw_broadcast_r17_present) { + HANDLE_CODE(location_and_bw_broadcast_r17.unpack(bref)); + } + if (pdsch_cfg_mcch_r17_present) { + HANDLE_CODE(pdsch_cfg_mcch_r17.unpack(bref)); + } + if (common_coreset_ext_r17_present) { + HANDLE_CODE(common_coreset_ext_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cfr_cfg_mcch_mtch_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (location_and_bw_broadcast_r17_present) { + j.write_fieldname("locationAndBandwidthBroadcast-r17"); + location_and_bw_broadcast_r17.to_json(j); + } + if (pdsch_cfg_mcch_r17_present) { + j.write_fieldname("pdsch-ConfigMCCH-r17"); + pdsch_cfg_mcch_r17.to_json(j); + } + if (common_coreset_ext_r17_present) { + j.write_fieldname("commonControlResourceSetExt-r17"); + common_coreset_ext_r17.to_json(j); + } + j.end_obj(); +} + +// GIN-Element-r17 ::= SEQUENCE +SRSASN_CODE gin_elem_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(plmn_id_r17.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, nid_list_r17, 1, 24)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE gin_elem_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(plmn_id_r17.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(nid_list_r17, bref, 1, 24)); + + return SRSASN_SUCCESS; +} +void gin_elem_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("plmn-Identity-r17"); + plmn_id_r17.to_json(j); + j.start_array("nid-List-r17"); + for (const auto& e1 : nid_list_r17) { + j.write_str(e1.to_string()); + } + j.end_array(); + j.end_obj(); +} + +// GINs-PerSNPN-r17 ::= SEQUENCE +SRSASN_CODE gi_ns_per_sn_pn_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_gi_ns_r17_present, 1)); + + if (supported_gi_ns_r17_present) { + HANDLE_CODE(supported_gi_ns_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE gi_ns_per_sn_pn_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(supported_gi_ns_r17_present, 1)); + + if (supported_gi_ns_r17_present) { + HANDLE_CODE(supported_gi_ns_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void gi_ns_per_sn_pn_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_gi_ns_r17_present) { + j.write_str("supportedGINs-r17", supported_gi_ns_r17.to_string()); + } + j.end_obj(); +} + +// IntraFreqCAG-CellListPerPLMN-r16 ::= SEQUENCE +SRSASN_CODE intra_freq_cag_cell_list_per_plmn_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, plmn_id_idx_r16, (uint8_t)1u, (uint8_t)12u)); + HANDLE_CODE(pack_dyn_seq_of(bref, cag_cell_list_r16, 1, 16)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE intra_freq_cag_cell_list_per_plmn_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(plmn_id_idx_r16, bref, (uint8_t)1u, (uint8_t)12u)); + HANDLE_CODE(unpack_dyn_seq_of(cag_cell_list_r16, bref, 1, 16)); + + return SRSASN_SUCCESS; +} +void intra_freq_cag_cell_list_per_plmn_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("plmn-IdentityIndex-r16", plmn_id_idx_r16); + j.start_array("cag-CellList-r16"); + for (const auto& e1 : cag_cell_list_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MCCH-Config-r17 ::= SEQUENCE +SRSASN_CODE mcch_cfg_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mcch_win_dur_r17_present, 1)); + + HANDLE_CODE(mcch_repeat_period_and_offset_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, mcch_win_start_slot_r17, (uint8_t)0u, (uint8_t)79u)); + if (mcch_win_dur_r17_present) { + HANDLE_CODE(mcch_win_dur_r17.pack(bref)); + } + HANDLE_CODE(mcch_mod_period_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mcch_cfg_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(mcch_win_dur_r17_present, 1)); + + HANDLE_CODE(mcch_repeat_period_and_offset_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(mcch_win_start_slot_r17, bref, (uint8_t)0u, (uint8_t)79u)); + if (mcch_win_dur_r17_present) { + HANDLE_CODE(mcch_win_dur_r17.unpack(bref)); + } + HANDLE_CODE(mcch_mod_period_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mcch_cfg_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("mcch-RepetitionPeriodAndOffset-r17"); + mcch_repeat_period_and_offset_r17.to_json(j); + j.write_int("mcch-WindowStartSlot-r17", mcch_win_start_slot_r17); + if (mcch_win_dur_r17_present) { + j.write_str("mcch-WindowDuration-r17", mcch_win_dur_r17.to_string()); + } + j.write_str("mcch-ModificationPeriod-r17", mcch_mod_period_r17.to_string()); + j.end_obj(); +} + +const char* mcch_cfg_r17_s::mcch_win_dur_r17_opts::to_string() const +{ + static const char* names[] = {"sl2", "sl4", "sl8", "sl10", "sl20", "sl40", "sl80", "sl160"}; + return convert_enum_idx(names, 8, value, "mcch_cfg_r17_s::mcch_win_dur_r17_e_"); +} +uint8_t mcch_cfg_r17_s::mcch_win_dur_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 8, 10, 20, 40, 80, 160}; + return map_enum_number(numbers, 8, value, "mcch_cfg_r17_s::mcch_win_dur_r17_e_"); +} + +const char* mcch_cfg_r17_s::mcch_mod_period_r17_opts::to_string() const +{ + static const char* names[] = {"rf2", + "rf4", + "rf8", + "rf16", + "rf32", + "rf64", + "rf128", + "rf256", + "rf512", + "rf1024", + "r2048", + "rf4096", + "rf8192", + "rf16384", + "rf32768", + "rf65536"}; + return convert_enum_idx(names, 16, value, "mcch_cfg_r17_s::mcch_mod_period_r17_e_"); +} +uint32_t mcch_cfg_r17_s::mcch_mod_period_r17_opts::to_number() const +{ + static const uint32_t numbers[] = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536}; + return map_enum_number(numbers, 16, value, "mcch_cfg_r17_s::mcch_mod_period_r17_e_"); +} + +// MeasIdleConfigSIB-r16 ::= SEQUENCE +SRSASN_CODE meas_idle_cfg_sib_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_idle_carrier_list_nr_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_idle_carrier_list_eutra_r16.size() > 0, 1)); + + if (meas_idle_carrier_list_nr_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_carrier_list_nr_r16, 1, 8)); + } + if (meas_idle_carrier_list_eutra_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_carrier_list_eutra_r16, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_idle_cfg_sib_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool meas_idle_carrier_list_nr_r16_present; + HANDLE_CODE(bref.unpack(meas_idle_carrier_list_nr_r16_present, 1)); + bool meas_idle_carrier_list_eutra_r16_present; + HANDLE_CODE(bref.unpack(meas_idle_carrier_list_eutra_r16_present, 1)); + + if (meas_idle_carrier_list_nr_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_idle_carrier_list_nr_r16, bref, 1, 8)); + } + if (meas_idle_carrier_list_eutra_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_idle_carrier_list_eutra_r16, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void meas_idle_cfg_sib_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_idle_carrier_list_nr_r16.size() > 0) { + j.start_array("measIdleCarrierListNR-r16"); + for (const auto& e1 : meas_idle_carrier_list_nr_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_idle_carrier_list_eutra_r16.size() > 0) { + j.start_array("measIdleCarrierListEUTRA-r16"); + for (const auto& e1 : meas_idle_carrier_list_eutra_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// MobilityStateParameters ::= SEQUENCE +SRSASN_CODE mob_state_params_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(t_eval.pack(bref)); + HANDLE_CODE(t_hyst_normal.pack(bref)); + HANDLE_CODE(pack_integer(bref, n_cell_change_medium, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(pack_integer(bref, n_cell_change_high, (uint8_t)1u, (uint8_t)16u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mob_state_params_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(t_eval.unpack(bref)); + HANDLE_CODE(t_hyst_normal.unpack(bref)); + HANDLE_CODE(unpack_integer(n_cell_change_medium, bref, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(unpack_integer(n_cell_change_high, bref, (uint8_t)1u, (uint8_t)16u)); + + return SRSASN_SUCCESS; +} +void mob_state_params_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("t-Evaluation", t_eval.to_string()); + j.write_str("t-HystNormal", t_hyst_normal.to_string()); + j.write_int("n-CellChangeMedium", n_cell_change_medium); + j.write_int("n-CellChangeHigh", n_cell_change_high); + j.end_obj(); +} + +const char* mob_state_params_s::t_eval_opts::to_string() const +{ + static const char* names[] = {"s30", "s60", "s120", "s180", "s240", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "mob_state_params_s::t_eval_e_"); +} +uint8_t mob_state_params_s::t_eval_opts::to_number() const +{ + static const uint8_t numbers[] = {30, 60, 120, 180, 240}; + return map_enum_number(numbers, 5, value, "mob_state_params_s::t_eval_e_"); +} + +const char* mob_state_params_s::t_hyst_normal_opts::to_string() const +{ + static const char* names[] = {"s30", "s60", "s120", "s180", "s240", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "mob_state_params_s::t_hyst_normal_e_"); +} +uint8_t mob_state_params_s::t_hyst_normal_opts::to_number() const +{ + static const uint8_t numbers[] = {30, 60, 120, 180, 240}; + return map_enum_number(numbers, 5, value, "mob_state_params_s::t_hyst_normal_e_"); +} + +// NPN-IdentityInfo-r16 ::= SEQUENCE +SRSASN_CODE npn_id_info_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ranac_r16_present, 1)); + HANDLE_CODE(bref.pack(iab_support_r16_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, npn_id_list_r16, 1, 12)); + HANDLE_CODE(tac_r16.pack(bref)); + if (ranac_r16_present) { + HANDLE_CODE(pack_integer(bref, ranac_r16, (uint16_t)0u, (uint16_t)255u)); + } + HANDLE_CODE(cell_id_r16.pack(bref)); + HANDLE_CODE(cell_reserved_for_oper_r16.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= gnb_id_len_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(gnb_id_len_r17_present, 1)); + if (gnb_id_len_r17_present) { + HANDLE_CODE(pack_integer(bref, gnb_id_len_r17, (uint8_t)22u, (uint8_t)32u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE npn_id_info_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ranac_r16_present, 1)); + HANDLE_CODE(bref.unpack(iab_support_r16_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(npn_id_list_r16, bref, 1, 12)); + HANDLE_CODE(tac_r16.unpack(bref)); + if (ranac_r16_present) { + HANDLE_CODE(unpack_integer(ranac_r16, bref, (uint16_t)0u, (uint16_t)255u)); + } + HANDLE_CODE(cell_id_r16.unpack(bref)); + HANDLE_CODE(cell_reserved_for_oper_r16.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(gnb_id_len_r17_present, 1)); + if (gnb_id_len_r17_present) { + HANDLE_CODE(unpack_integer(gnb_id_len_r17, bref, (uint8_t)22u, (uint8_t)32u)); + } + } + } + return SRSASN_SUCCESS; +} +void npn_id_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("npn-IdentityList-r16"); + for (const auto& e1 : npn_id_list_r16) { + e1.to_json(j); + } + j.end_array(); + j.write_str("trackingAreaCode-r16", tac_r16.to_string()); + if (ranac_r16_present) { + j.write_int("ranac-r16", ranac_r16); + } + j.write_str("cellIdentity-r16", cell_id_r16.to_string()); + j.write_str("cellReservedForOperatorUse-r16", cell_reserved_for_oper_r16.to_string()); + if (iab_support_r16_present) { + j.write_str("iab-Support-r16", "true"); + } + if (ext) { + if (gnb_id_len_r17_present) { + j.write_int("gNB-ID-Length-r17", gnb_id_len_r17); + } + } + j.end_obj(); +} + +const char* npn_id_info_r16_s::cell_reserved_for_oper_r16_opts::to_string() const +{ + static const char* names[] = {"reserved", "notReserved"}; + return convert_enum_idx(names, 2, value, "npn_id_info_r16_s::cell_reserved_for_oper_r16_e_"); +} + +// PLMN-IdentityInfo ::= SEQUENCE +SRSASN_CODE plmn_id_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(tac_present, 1)); + HANDLE_CODE(bref.pack(ranac_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list, 1, 12)); + if (tac_present) { + HANDLE_CODE(tac.pack(bref)); + } + if (ranac_present) { + HANDLE_CODE(pack_integer(bref, ranac, (uint16_t)0u, (uint16_t)255u)); + } + HANDLE_CODE(cell_id.pack(bref)); + HANDLE_CODE(cell_reserved_for_oper.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= iab_support_r16_present; + group_flags[1] |= tracking_area_list_r17.is_present(); + group_flags[1] |= gnb_id_len_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(iab_support_r16_present, 1)); + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(tracking_area_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(gnb_id_len_r17_present, 1)); + if (tracking_area_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *tracking_area_list_r17, 1, 12)); + } + if (gnb_id_len_r17_present) { + HANDLE_CODE(pack_integer(bref, gnb_id_len_r17, (uint8_t)22u, (uint8_t)32u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_id_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(tac_present, 1)); + HANDLE_CODE(bref.unpack(ranac_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list, bref, 1, 12)); + if (tac_present) { + HANDLE_CODE(tac.unpack(bref)); + } + if (ranac_present) { + HANDLE_CODE(unpack_integer(ranac, bref, (uint16_t)0u, (uint16_t)255u)); + } + HANDLE_CODE(cell_id.unpack(bref)); + HANDLE_CODE(cell_reserved_for_oper.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(iab_support_r16_present, 1)); + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(tracking_area_list_r17, bref); + HANDLE_CODE(bref.unpack(gnb_id_len_r17_present, 1)); + if (tracking_area_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*tracking_area_list_r17, bref, 1, 12)); + } + if (gnb_id_len_r17_present) { + HANDLE_CODE(unpack_integer(gnb_id_len_r17, bref, (uint8_t)22u, (uint8_t)32u)); + } + } + } + return SRSASN_SUCCESS; +} +void plmn_id_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("plmn-IdentityList"); + for (const auto& e1 : plmn_id_list) { + e1.to_json(j); + } + j.end_array(); + if (tac_present) { + j.write_str("trackingAreaCode", tac.to_string()); + } + if (ranac_present) { + j.write_int("ranac", ranac); + } + j.write_str("cellIdentity", cell_id.to_string()); + j.write_str("cellReservedForOperatorUse", cell_reserved_for_oper.to_string()); + if (ext) { + if (iab_support_r16_present) { + j.write_str("iab-Support-r16", "true"); + } + if (tracking_area_list_r17.is_present()) { + j.start_array("trackingAreaList-r17"); + for (const auto& e1 : *tracking_area_list_r17) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (gnb_id_len_r17_present) { + j.write_int("gNB-ID-Length-r17", gnb_id_len_r17); + } + } + j.end_obj(); +} + +const char* plmn_id_info_s::cell_reserved_for_oper_opts::to_string() const +{ + static const char* names[] = {"reserved", "notReserved"}; + return convert_enum_idx(names, 2, value, "plmn_id_info_s::cell_reserved_for_oper_e_"); +} + +// PosSchedulingInfo-r16 ::= SEQUENCE +SRSASN_CODE pos_sched_info_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(offset_to_si_used_r16_present, 1)); + + HANDLE_CODE(pos_si_periodicity_r16.pack(bref)); + HANDLE_CODE(pos_si_broadcast_status_r16.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, pos_sib_map_info_r16, 1, 32)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pos_sched_info_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(offset_to_si_used_r16_present, 1)); + + HANDLE_CODE(pos_si_periodicity_r16.unpack(bref)); + HANDLE_CODE(pos_si_broadcast_status_r16.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(pos_sib_map_info_r16, bref, 1, 32)); + + return SRSASN_SUCCESS; +} +void pos_sched_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (offset_to_si_used_r16_present) { + j.write_str("offsetToSI-Used-r16", "true"); + } + j.write_str("posSI-Periodicity-r16", pos_si_periodicity_r16.to_string()); + j.write_str("posSI-BroadcastStatus-r16", pos_si_broadcast_status_r16.to_string()); + j.start_array("posSIB-MappingInfo-r16"); + for (const auto& e1 : pos_sib_map_info_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +const char* pos_sched_info_r16_s::pos_si_periodicity_r16_opts::to_string() const +{ + static const char* names[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; + return convert_enum_idx(names, 7, value, "pos_sched_info_r16_s::pos_si_periodicity_r16_e_"); +} +uint16_t pos_sched_info_r16_s::pos_si_periodicity_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(numbers, 7, value, "pos_sched_info_r16_s::pos_si_periodicity_r16_e_"); +} + +const char* pos_sched_info_r16_s::pos_si_broadcast_status_r16_opts::to_string() const +{ + static const char* names[] = {"broadcasting", "notBroadcasting"}; + return convert_enum_idx(names, 2, value, "pos_sched_info_r16_s::pos_si_broadcast_status_r16_e_"); +} + +// ReferenceTimeInfo-r16 ::= SEQUENCE +SRSASN_CODE ref_time_info_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(uncertainty_r16_present, 1)); + HANDLE_CODE(bref.pack(time_info_type_r16_present, 1)); + HANDLE_CODE(bref.pack(ref_sfn_r16_present, 1)); + + HANDLE_CODE(time_r16.pack(bref)); + if (uncertainty_r16_present) { + HANDLE_CODE(pack_integer(bref, uncertainty_r16, (uint16_t)0u, (uint16_t)32767u)); + } + if (ref_sfn_r16_present) { + HANDLE_CODE(pack_integer(bref, ref_sfn_r16, (uint16_t)0u, (uint16_t)1023u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ref_time_info_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(uncertainty_r16_present, 1)); + HANDLE_CODE(bref.unpack(time_info_type_r16_present, 1)); + HANDLE_CODE(bref.unpack(ref_sfn_r16_present, 1)); + + HANDLE_CODE(time_r16.unpack(bref)); + if (uncertainty_r16_present) { + HANDLE_CODE(unpack_integer(uncertainty_r16, bref, (uint16_t)0u, (uint16_t)32767u)); + } + if (ref_sfn_r16_present) { + HANDLE_CODE(unpack_integer(ref_sfn_r16, bref, (uint16_t)0u, (uint16_t)1023u)); + } + + return SRSASN_SUCCESS; +} +void ref_time_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("time-r16"); + time_r16.to_json(j); + if (uncertainty_r16_present) { + j.write_int("uncertainty-r16", uncertainty_r16); + } + if (time_info_type_r16_present) { + j.write_str("timeInfoType-r16", "localClock"); + } + if (ref_sfn_r16_present) { + j.write_int("referenceSFN-r16", ref_sfn_r16); + } + j.end_obj(); +} + +// SIB1-v1700-IEs ::= SEQUENCE +SRSASN_CODE sib1_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(hsdn_cell_r17_present, 1)); + HANDLE_CODE(bref.pack(uac_barr_info_v1700_present, 1)); + HANDLE_CODE(bref.pack(sdt_cfg_common_r17_present, 1)); + HANDLE_CODE(bref.pack(red_cap_cfg_common_r17_present, 1)); + HANDLE_CODE(bref.pack(feature_priorities_r17_present, 1)); + HANDLE_CODE(bref.pack(si_sched_info_v1700_present, 1)); + HANDLE_CODE(bref.pack(hyper_sfn_r17_present, 1)); + HANDLE_CODE(bref.pack(edrx_allowed_idle_r17_present, 1)); + HANDLE_CODE(bref.pack(edrx_allowed_inactive_r17_present, 1)); + HANDLE_CODE(bref.pack(intra_freq_resel_red_cap_r17_present, 1)); + HANDLE_CODE(bref.pack(cell_barred_ntn_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (uac_barr_info_v1700_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_info_v1700.uac_barr_info_set_list_v1700, 1, 8)); + } + if (sdt_cfg_common_r17_present) { + HANDLE_CODE(sdt_cfg_common_r17.pack(bref)); + } + if (red_cap_cfg_common_r17_present) { + HANDLE_CODE(red_cap_cfg_common_r17.pack(bref)); + } + if (feature_priorities_r17_present) { + HANDLE_CODE(bref.pack(feature_priorities_r17.red_cap_prio_r17_present, 1)); + HANDLE_CODE(bref.pack(feature_priorities_r17.slicing_prio_r17_present, 1)); + HANDLE_CODE(bref.pack(feature_priorities_r17.msg3_repeats_prio_r17_present, 1)); + HANDLE_CODE(bref.pack(feature_priorities_r17.sdt_prio_r17_present, 1)); + if (feature_priorities_r17.red_cap_prio_r17_present) { + HANDLE_CODE(pack_integer(bref, feature_priorities_r17.red_cap_prio_r17, (uint8_t)0u, (uint8_t)7u)); + } + if (feature_priorities_r17.slicing_prio_r17_present) { + HANDLE_CODE(pack_integer(bref, feature_priorities_r17.slicing_prio_r17, (uint8_t)0u, (uint8_t)7u)); + } + if (feature_priorities_r17.msg3_repeats_prio_r17_present) { + HANDLE_CODE(pack_integer(bref, feature_priorities_r17.msg3_repeats_prio_r17, (uint8_t)0u, (uint8_t)7u)); + } + if (feature_priorities_r17.sdt_prio_r17_present) { + HANDLE_CODE(pack_integer(bref, feature_priorities_r17.sdt_prio_r17, (uint8_t)0u, (uint8_t)7u)); + } + } + if (si_sched_info_v1700_present) { + HANDLE_CODE(si_sched_info_v1700.pack(bref)); + } + if (hyper_sfn_r17_present) { + HANDLE_CODE(hyper_sfn_r17.pack(bref)); + } + if (intra_freq_resel_red_cap_r17_present) { + HANDLE_CODE(intra_freq_resel_red_cap_r17.pack(bref)); + } + if (cell_barred_ntn_r17_present) { + HANDLE_CODE(cell_barred_ntn_r17.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib1_v1700_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(hsdn_cell_r17_present, 1)); + HANDLE_CODE(bref.unpack(uac_barr_info_v1700_present, 1)); + HANDLE_CODE(bref.unpack(sdt_cfg_common_r17_present, 1)); + HANDLE_CODE(bref.unpack(red_cap_cfg_common_r17_present, 1)); + HANDLE_CODE(bref.unpack(feature_priorities_r17_present, 1)); + HANDLE_CODE(bref.unpack(si_sched_info_v1700_present, 1)); + HANDLE_CODE(bref.unpack(hyper_sfn_r17_present, 1)); + HANDLE_CODE(bref.unpack(edrx_allowed_idle_r17_present, 1)); + HANDLE_CODE(bref.unpack(edrx_allowed_inactive_r17_present, 1)); + HANDLE_CODE(bref.unpack(intra_freq_resel_red_cap_r17_present, 1)); + HANDLE_CODE(bref.unpack(cell_barred_ntn_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (uac_barr_info_v1700_present) { + HANDLE_CODE(unpack_dyn_seq_of(uac_barr_info_v1700.uac_barr_info_set_list_v1700, bref, 1, 8)); + } + if (sdt_cfg_common_r17_present) { + HANDLE_CODE(sdt_cfg_common_r17.unpack(bref)); + } + if (red_cap_cfg_common_r17_present) { + HANDLE_CODE(red_cap_cfg_common_r17.unpack(bref)); + } + if (feature_priorities_r17_present) { + HANDLE_CODE(bref.unpack(feature_priorities_r17.red_cap_prio_r17_present, 1)); + HANDLE_CODE(bref.unpack(feature_priorities_r17.slicing_prio_r17_present, 1)); + HANDLE_CODE(bref.unpack(feature_priorities_r17.msg3_repeats_prio_r17_present, 1)); + HANDLE_CODE(bref.unpack(feature_priorities_r17.sdt_prio_r17_present, 1)); + if (feature_priorities_r17.red_cap_prio_r17_present) { + HANDLE_CODE(unpack_integer(feature_priorities_r17.red_cap_prio_r17, bref, (uint8_t)0u, (uint8_t)7u)); + } + if (feature_priorities_r17.slicing_prio_r17_present) { + HANDLE_CODE(unpack_integer(feature_priorities_r17.slicing_prio_r17, bref, (uint8_t)0u, (uint8_t)7u)); + } + if (feature_priorities_r17.msg3_repeats_prio_r17_present) { + HANDLE_CODE(unpack_integer(feature_priorities_r17.msg3_repeats_prio_r17, bref, (uint8_t)0u, (uint8_t)7u)); + } + if (feature_priorities_r17.sdt_prio_r17_present) { + HANDLE_CODE(unpack_integer(feature_priorities_r17.sdt_prio_r17, bref, (uint8_t)0u, (uint8_t)7u)); + } + } + if (si_sched_info_v1700_present) { + HANDLE_CODE(si_sched_info_v1700.unpack(bref)); + } + if (hyper_sfn_r17_present) { + HANDLE_CODE(hyper_sfn_r17.unpack(bref)); + } + if (intra_freq_resel_red_cap_r17_present) { + HANDLE_CODE(intra_freq_resel_red_cap_r17.unpack(bref)); + } + if (cell_barred_ntn_r17_present) { + HANDLE_CODE(cell_barred_ntn_r17.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib1_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (hsdn_cell_r17_present) { + j.write_str("hsdn-Cell-r17", "true"); + } + if (uac_barr_info_v1700_present) { + j.write_fieldname("uac-BarringInfo-v1700"); + j.start_obj(); + j.start_array("uac-BarringInfoSetList-v1700"); + for (const auto& e1 : uac_barr_info_v1700.uac_barr_info_set_list_v1700) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); + } + if (sdt_cfg_common_r17_present) { + j.write_fieldname("sdt-ConfigCommon-r17"); + sdt_cfg_common_r17.to_json(j); + } + if (red_cap_cfg_common_r17_present) { + j.write_fieldname("redCap-ConfigCommon-r17"); + red_cap_cfg_common_r17.to_json(j); + } + if (feature_priorities_r17_present) { + j.write_fieldname("featurePriorities-r17"); + j.start_obj(); + if (feature_priorities_r17.red_cap_prio_r17_present) { + j.write_int("redCapPriority-r17", feature_priorities_r17.red_cap_prio_r17); + } + if (feature_priorities_r17.slicing_prio_r17_present) { + j.write_int("slicingPriority-r17", feature_priorities_r17.slicing_prio_r17); + } + if (feature_priorities_r17.msg3_repeats_prio_r17_present) { + j.write_int("msg3-Repetitions-Priority-r17", feature_priorities_r17.msg3_repeats_prio_r17); + } + if (feature_priorities_r17.sdt_prio_r17_present) { + j.write_int("sdt-Priority-r17", feature_priorities_r17.sdt_prio_r17); + } + j.end_obj(); + } + if (si_sched_info_v1700_present) { + j.write_fieldname("si-SchedulingInfo-v1700"); + si_sched_info_v1700.to_json(j); + } + if (hyper_sfn_r17_present) { + j.write_str("hyperSFN-r17", hyper_sfn_r17.to_string()); + } + if (edrx_allowed_idle_r17_present) { + j.write_str("eDRX-AllowedIdle-r17", "true"); + } + if (edrx_allowed_inactive_r17_present) { + j.write_str("eDRX-AllowedInactive-r17", "true"); + } + if (intra_freq_resel_red_cap_r17_present) { + j.write_str("intraFreqReselectionRedCap-r17", intra_freq_resel_red_cap_r17.to_string()); + } + if (cell_barred_ntn_r17_present) { + j.write_str("cellBarredNTN-r17", cell_barred_ntn_r17.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +const char* sib1_v1700_ies_s::intra_freq_resel_red_cap_r17_opts::to_string() const +{ + static const char* names[] = {"allowed", "notAllowed"}; + return convert_enum_idx(names, 2, value, "sib1_v1700_ies_s::intra_freq_resel_red_cap_r17_e_"); +} + +const char* sib1_v1700_ies_s::cell_barred_ntn_r17_opts::to_string() const +{ + static const char* names[] = {"barred", "notBarred"}; + return convert_enum_idx(names, 2, value, "sib1_v1700_ies_s::cell_barred_ntn_r17_e_"); +} + +// UAC-AC1-SelectAssistInfo-r16 ::= ENUMERATED +const char* uac_ac1_select_assist_info_r16_opts::to_string() const +{ + static const char* names[] = {"a", "b", "c", "notConfigured"}; + return convert_enum_idx(names, 4, value, "uac_ac1_select_assist_info_r16_e"); +} + +// PosSI-SchedulingInfo-r16 ::= SEQUENCE +SRSASN_CODE pos_si_sched_info_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pos_si_request_cfg_r16_present, 1)); + HANDLE_CODE(bref.pack(pos_si_request_cfg_sul_r16_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, pos_sched_info_list_r16, 1, 32)); + if (pos_si_request_cfg_r16_present) { + HANDLE_CODE(pos_si_request_cfg_r16.pack(bref)); + } + if (pos_si_request_cfg_sul_r16_present) { + HANDLE_CODE(pos_si_request_cfg_sul_r16.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= pos_si_request_cfg_red_cap_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(pos_si_request_cfg_red_cap_r17.is_present(), 1)); + if (pos_si_request_cfg_red_cap_r17.is_present()) { + HANDLE_CODE(pos_si_request_cfg_red_cap_r17->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pos_si_sched_info_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pos_si_request_cfg_r16_present, 1)); + HANDLE_CODE(bref.unpack(pos_si_request_cfg_sul_r16_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(pos_sched_info_list_r16, bref, 1, 32)); + if (pos_si_request_cfg_r16_present) { + HANDLE_CODE(pos_si_request_cfg_r16.unpack(bref)); + } + if (pos_si_request_cfg_sul_r16_present) { + HANDLE_CODE(pos_si_request_cfg_sul_r16.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); + + unpack_presence_flag(pos_si_request_cfg_red_cap_r17, bref); + if (pos_si_request_cfg_red_cap_r17.is_present()) { + HANDLE_CODE(pos_si_request_cfg_red_cap_r17->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void pos_si_sched_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("posSchedulingInfoList-r16"); + for (const auto& e1 : pos_sched_info_list_r16) { + e1.to_json(j); + } + j.end_array(); + if (pos_si_request_cfg_r16_present) { + j.write_fieldname("posSI-RequestConfig-r16"); + pos_si_request_cfg_r16.to_json(j); + } + if (pos_si_request_cfg_sul_r16_present) { + j.write_fieldname("posSI-RequestConfigSUL-r16"); + pos_si_request_cfg_sul_r16.to_json(j); + } + if (ext) { + if (pos_si_request_cfg_red_cap_r17.is_present()) { + j.write_fieldname("posSI-RequestConfigRedCap-r17"); + pos_si_request_cfg_red_cap_r17->to_json(j); + } + } + j.end_obj(); +} + +// SIB1-v1630-IEs ::= SEQUENCE +SRSASN_CODE sib1_v1630_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(uac_barr_info_v1630_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (uac_barr_info_v1630_present) { + HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_info_v1630.uac_ac1_select_assist_info_r16, 2, 12)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib1_v1630_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(uac_barr_info_v1630_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (uac_barr_info_v1630_present) { + HANDLE_CODE(unpack_dyn_seq_of(uac_barr_info_v1630.uac_ac1_select_assist_info_r16, bref, 2, 12)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib1_v1630_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (uac_barr_info_v1630_present) { + j.write_fieldname("uac-BarringInfo-v1630"); + j.start_obj(); + j.start_array("uac-AC1-SelectAssistInfo-r16"); + for (const auto& e1 : uac_barr_info_v1630.uac_ac1_select_assist_info_r16) { + j.write_str(e1.to_string()); + } + j.end_array(); + j.end_obj(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SIB10-r16 ::= SEQUENCE +SRSASN_CODE sib10_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(hrnn_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + if (hrnn_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, hrnn_list_r16, 1, 12)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib10_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool hrnn_list_r16_present; + HANDLE_CODE(bref.unpack(hrnn_list_r16_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (hrnn_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(hrnn_list_r16, bref, 1, 12)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib10_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (hrnn_list_r16.size() > 0) { + j.start_array("hrnn-List-r16"); + for (const auto& e1 : hrnn_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SIB11-r16 ::= SEQUENCE +SRSASN_CODE sib11_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_idle_cfg_sib_r16_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + if (meas_idle_cfg_sib_r16_present) { + HANDLE_CODE(meas_idle_cfg_sib_r16.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib11_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_idle_cfg_sib_r16_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (meas_idle_cfg_sib_r16_present) { + HANDLE_CODE(meas_idle_cfg_sib_r16.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib11_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_idle_cfg_sib_r16_present) { + j.write_fieldname("measIdleConfigSIB-r16"); + meas_idle_cfg_sib_r16.to_json(j); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SIB12-r16 ::= SEQUENCE +SRSASN_CODE sib12_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, segment_num_r16, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(segment_type_r16.pack(bref)); + HANDLE_CODE(segment_container_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib12_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(segment_num_r16, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(segment_type_r16.unpack(bref)); + HANDLE_CODE(segment_container_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sib12_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("segmentNumber-r16", segment_num_r16); + j.write_str("segmentType-r16", segment_type_r16.to_string()); + j.write_str("segmentContainer-r16", segment_container_r16.to_string()); + j.end_obj(); +} + +const char* sib12_r16_s::segment_type_r16_opts::to_string() const +{ + static const char* names[] = {"notLastSegment", "lastSegment"}; + return convert_enum_idx(names, 2, value, "sib12_r16_s::segment_type_r16_e_"); +} + +// SIB13-r16 ::= SEQUENCE +SRSASN_CODE sib13_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + HANDLE_CODE(sl_v2x_cfg_common_r16.pack(bref)); + HANDLE_CODE(dummy.pack(bref)); + HANDLE_CODE(tdd_cfg_r16.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib13_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(sl_v2x_cfg_common_r16.unpack(bref)); + HANDLE_CODE(dummy.unpack(bref)); + HANDLE_CODE(tdd_cfg_r16.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib13_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sl-V2X-ConfigCommon-r16", sl_v2x_cfg_common_r16.to_string()); + j.write_str("dummy", dummy.to_string()); + j.write_str("tdd-Config-r16", tdd_cfg_r16.to_string()); + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SIB14-r16 ::= SEQUENCE +SRSASN_CODE sib14_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + HANDLE_CODE(sl_v2x_cfg_common_ext_r16.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib14_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(sl_v2x_cfg_common_ext_r16.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib14_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sl-V2X-ConfigCommonExt-r16", sl_v2x_cfg_common_ext_r16.to_string()); + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SIB15-r17 ::= SEQUENCE +SRSASN_CODE sib15_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(common_plmns_with_disaster_condition_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(applicable_disaster_info_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + if (common_plmns_with_disaster_condition_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, common_plmns_with_disaster_condition_r17, 1, 12)); + } + if (applicable_disaster_info_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, applicable_disaster_info_list_r17, 1, 12)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib15_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool common_plmns_with_disaster_condition_r17_present; + HANDLE_CODE(bref.unpack(common_plmns_with_disaster_condition_r17_present, 1)); + bool applicable_disaster_info_list_r17_present; + HANDLE_CODE(bref.unpack(applicable_disaster_info_list_r17_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (common_plmns_with_disaster_condition_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(common_plmns_with_disaster_condition_r17, bref, 1, 12)); + } + if (applicable_disaster_info_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(applicable_disaster_info_list_r17, bref, 1, 12)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib15_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (common_plmns_with_disaster_condition_r17.size() > 0) { + j.start_array("commonPLMNsWithDisasterCondition-r17"); + for (const auto& e1 : common_plmns_with_disaster_condition_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (applicable_disaster_info_list_r17.size() > 0) { + j.start_array("applicableDisasterInfoList-r17"); + for (const auto& e1 : applicable_disaster_info_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SIB16-r17 ::= SEQUENCE +SRSASN_CODE sib16_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(freq_prio_list_slicing_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + if (freq_prio_list_slicing_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_prio_list_slicing_r17, 1, 9)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib16_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool freq_prio_list_slicing_r17_present; + HANDLE_CODE(bref.unpack(freq_prio_list_slicing_r17_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (freq_prio_list_slicing_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_prio_list_slicing_r17, bref, 1, 9)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib16_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (freq_prio_list_slicing_r17.size() > 0) { + j.start_array("freqPriorityListSlicing-r17"); + for (const auto& e1 : freq_prio_list_slicing_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SIB17-r17 ::= SEQUENCE +SRSASN_CODE sib17_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, segment_num_r17, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(segment_type_r17.pack(bref)); + HANDLE_CODE(segment_container_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib17_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(segment_num_r17, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(segment_type_r17.unpack(bref)); + HANDLE_CODE(segment_container_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sib17_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("segmentNumber-r17", segment_num_r17); + j.write_str("segmentType-r17", segment_type_r17.to_string()); + j.write_str("segmentContainer-r17", segment_container_r17.to_string()); + j.end_obj(); +} + +const char* sib17_r17_s::segment_type_r17_opts::to_string() const +{ + static const char* names[] = {"notLastSegment", "lastSegment"}; + return convert_enum_idx(names, 2, value, "sib17_r17_s::segment_type_r17_e_"); +} + +// SIB18-r17 ::= SEQUENCE +SRSASN_CODE sib18_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(gin_elem_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(gins_per_sn_pn_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + if (gin_elem_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, gin_elem_list_r17, 1, 24)); + } + if (gins_per_sn_pn_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, gins_per_sn_pn_list_r17, 1, 12)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib18_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool gin_elem_list_r17_present; + HANDLE_CODE(bref.unpack(gin_elem_list_r17_present, 1)); + bool gins_per_sn_pn_list_r17_present; + HANDLE_CODE(bref.unpack(gins_per_sn_pn_list_r17_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (gin_elem_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(gin_elem_list_r17, bref, 1, 24)); + } + if (gins_per_sn_pn_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(gins_per_sn_pn_list_r17, bref, 1, 12)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib18_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (gin_elem_list_r17.size() > 0) { + j.start_array("gin-ElementList-r17"); + for (const auto& e1 : gin_elem_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (gins_per_sn_pn_list_r17.size() > 0) { + j.start_array("gins-PerSNPN-List-r17"); + for (const auto& e1 : gins_per_sn_pn_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SIB19-r17 ::= SEQUENCE +SRSASN_CODE sib19_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ntn_cfg_r17_present, 1)); + HANDLE_CODE(bref.pack(t_service_r17_present, 1)); + HANDLE_CODE(bref.pack(ref_location_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(distance_thresh_r17_present, 1)); + HANDLE_CODE(bref.pack(ntn_neigh_cell_cfg_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + if (ntn_cfg_r17_present) { + HANDLE_CODE(ntn_cfg_r17.pack(bref)); + } + if (t_service_r17_present) { + HANDLE_CODE(pack_integer(bref, t_service_r17, (uint64_t)0u, (uint64_t)549755813887u)); + } + if (ref_location_r17.size() > 0) { + HANDLE_CODE(ref_location_r17.pack(bref)); + } + if (distance_thresh_r17_present) { + HANDLE_CODE(pack_integer(bref, distance_thresh_r17, (uint16_t)0u, (uint16_t)65525u)); + } + if (ntn_neigh_cell_cfg_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, ntn_neigh_cell_cfg_list_r17, 1, 4)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= ntn_neigh_cell_cfg_list_ext_v1720.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ntn_neigh_cell_cfg_list_ext_v1720.is_present(), 1)); + if (ntn_neigh_cell_cfg_list_ext_v1720.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *ntn_neigh_cell_cfg_list_ext_v1720, 1, 4)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib19_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ntn_cfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(t_service_r17_present, 1)); + bool ref_location_r17_present; + HANDLE_CODE(bref.unpack(ref_location_r17_present, 1)); + HANDLE_CODE(bref.unpack(distance_thresh_r17_present, 1)); + bool ntn_neigh_cell_cfg_list_r17_present; + HANDLE_CODE(bref.unpack(ntn_neigh_cell_cfg_list_r17_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (ntn_cfg_r17_present) { + HANDLE_CODE(ntn_cfg_r17.unpack(bref)); + } + if (t_service_r17_present) { + HANDLE_CODE(unpack_integer(t_service_r17, bref, (uint64_t)0u, (uint64_t)549755813887u)); + } + if (ref_location_r17_present) { + HANDLE_CODE(ref_location_r17.unpack(bref)); + } + if (distance_thresh_r17_present) { + HANDLE_CODE(unpack_integer(distance_thresh_r17, bref, (uint16_t)0u, (uint16_t)65525u)); + } + if (ntn_neigh_cell_cfg_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(ntn_neigh_cell_cfg_list_r17, bref, 1, 4)); + } + 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); + + unpack_presence_flag(ntn_neigh_cell_cfg_list_ext_v1720, bref); + if (ntn_neigh_cell_cfg_list_ext_v1720.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*ntn_neigh_cell_cfg_list_ext_v1720, bref, 1, 4)); + } + } + } + return SRSASN_SUCCESS; +} +void sib19_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ntn_cfg_r17_present) { + j.write_fieldname("ntn-Config-r17"); + ntn_cfg_r17.to_json(j); + } + if (t_service_r17_present) { + j.write_int("t-Service-r17", t_service_r17); + } + if (ref_location_r17.size() > 0) { + j.write_str("referenceLocation-r17", ref_location_r17.to_string()); + } + if (distance_thresh_r17_present) { + j.write_int("distanceThresh-r17", distance_thresh_r17); + } + if (ntn_neigh_cell_cfg_list_r17.size() > 0) { + j.start_array("ntn-NeighCellConfigList-r17"); + for (const auto& e1 : ntn_neigh_cell_cfg_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (ext) { + if (ntn_neigh_cell_cfg_list_ext_v1720.is_present()) { + j.start_array("ntn-NeighCellConfigListExt-v1720"); + for (const auto& e1 : *ntn_neigh_cell_cfg_list_ext_v1720) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +// SIB2 ::= SEQUENCE +SRSASN_CODE sib2_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + bref.pack(cell_resel_info_common.ext, 1); + HANDLE_CODE(bref.pack(cell_resel_info_common.nrof_ss_blocks_to_average_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_info_common.abs_thresh_ss_blocks_consolidation_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_info_common.range_to_best_cell_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_info_common.speed_state_resel_pars_present, 1)); + if (cell_resel_info_common.nrof_ss_blocks_to_average_present) { + HANDLE_CODE(pack_integer(bref, cell_resel_info_common.nrof_ss_blocks_to_average, (uint8_t)2u, (uint8_t)16u)); + } + if (cell_resel_info_common.abs_thresh_ss_blocks_consolidation_present) { + HANDLE_CODE(cell_resel_info_common.abs_thresh_ss_blocks_consolidation.pack(bref)); + } + if (cell_resel_info_common.range_to_best_cell_present) { + HANDLE_CODE(cell_resel_info_common.range_to_best_cell.pack(bref)); + } + HANDLE_CODE(cell_resel_info_common.q_hyst.pack(bref)); + if (cell_resel_info_common.speed_state_resel_pars_present) { + HANDLE_CODE(cell_resel_info_common.speed_state_resel_pars.mob_state_params.pack(bref)); + HANDLE_CODE(cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_medium.pack(bref)); + HANDLE_CODE(cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_high.pack(bref)); + } + bref.pack(cell_resel_serving_freq_info.ext, 1); + HANDLE_CODE(bref.pack(cell_resel_serving_freq_info.s_non_intra_search_p_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_serving_freq_info.s_non_intra_search_q_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_serving_freq_info.thresh_serving_low_q_present, 1)); + HANDLE_CODE(bref.pack(cell_resel_serving_freq_info.cell_resel_sub_prio_present, 1)); + if (cell_resel_serving_freq_info.s_non_intra_search_p_present) { + HANDLE_CODE(pack_integer(bref, cell_resel_serving_freq_info.s_non_intra_search_p, (uint8_t)0u, (uint8_t)31u)); + } + if (cell_resel_serving_freq_info.s_non_intra_search_q_present) { + HANDLE_CODE(pack_integer(bref, cell_resel_serving_freq_info.s_non_intra_search_q, (uint8_t)0u, (uint8_t)31u)); + } + HANDLE_CODE(pack_integer(bref, cell_resel_serving_freq_info.thresh_serving_low_p, (uint8_t)0u, (uint8_t)31u)); + if (cell_resel_serving_freq_info.thresh_serving_low_q_present) { + HANDLE_CODE(pack_integer(bref, cell_resel_serving_freq_info.thresh_serving_low_q, (uint8_t)0u, (uint8_t)31u)); + } + HANDLE_CODE(pack_integer(bref, cell_resel_serving_freq_info.cell_resel_prio, (uint8_t)0u, (uint8_t)7u)); + if (cell_resel_serving_freq_info.cell_resel_sub_prio_present) { + HANDLE_CODE(cell_resel_serving_freq_info.cell_resel_sub_prio.pack(bref)); + } + HANDLE_CODE(intra_freq_cell_resel_info.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= relaxed_meas_r16.is_present(); + group_flags[1] |= cell_equivalent_size_r17_present; + group_flags[1] |= relaxed_meas_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(relaxed_meas_r16.is_present(), 1)); + if (relaxed_meas_r16.is_present()) { + HANDLE_CODE(bref.pack(relaxed_meas_r16->low_mob_eval_r16_present, 1)); + HANDLE_CODE(bref.pack(relaxed_meas_r16->cell_edge_eval_r16_present, 1)); + HANDLE_CODE(bref.pack(relaxed_meas_r16->combine_relaxed_meas_condition_r16_present, 1)); + HANDLE_CODE(bref.pack(relaxed_meas_r16->high_prio_meas_relax_r16_present, 1)); + if (relaxed_meas_r16->low_mob_eval_r16_present) { + HANDLE_CODE(relaxed_meas_r16->low_mob_eval_r16.s_search_delta_p_r16.pack(bref)); + HANDLE_CODE(relaxed_meas_r16->low_mob_eval_r16.t_search_delta_p_r16.pack(bref)); + } + if (relaxed_meas_r16->cell_edge_eval_r16_present) { + HANDLE_CODE(bref.pack(relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16_present, 1)); + HANDLE_CODE( + pack_integer(bref, relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_p_r16, (uint8_t)0u, (uint8_t)31u)); + if (relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16_present) { + HANDLE_CODE(pack_integer( + bref, relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16, (uint8_t)0u, (uint8_t)31u)); + } + } + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(cell_equivalent_size_r17_present, 1)); + HANDLE_CODE(bref.pack(relaxed_meas_r17.is_present(), 1)); + if (cell_equivalent_size_r17_present) { + HANDLE_CODE(pack_integer(bref, cell_equivalent_size_r17, (uint8_t)2u, (uint8_t)16u)); + } + if (relaxed_meas_r17.is_present()) { + HANDLE_CODE(bref.pack(relaxed_meas_r17->cell_edge_eval_while_stationary_r17_present, 1)); + HANDLE_CODE(bref.pack(relaxed_meas_r17->combine_relaxed_meas_condition2_r17_present, 1)); + HANDLE_CODE(relaxed_meas_r17->stationary_mob_eval_r17.s_search_delta_p_stationary_r17.pack(bref)); + HANDLE_CODE(relaxed_meas_r17->stationary_mob_eval_r17.t_search_delta_p_stationary_r17.pack(bref)); + if (relaxed_meas_r17->cell_edge_eval_while_stationary_r17_present) { + HANDLE_CODE( + bref.pack(relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17_present, 1)); + HANDLE_CODE(pack_integer(bref, + relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_p2_r17, + (uint8_t)0u, + (uint8_t)31u)); + if (relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17_present) { + HANDLE_CODE(pack_integer(bref, + relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17, + (uint8_t)0u, + (uint8_t)31u)); + } + } + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib2_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bref.unpack(cell_resel_info_common.ext, 1); + HANDLE_CODE(bref.unpack(cell_resel_info_common.nrof_ss_blocks_to_average_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_info_common.abs_thresh_ss_blocks_consolidation_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_info_common.range_to_best_cell_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_info_common.speed_state_resel_pars_present, 1)); + if (cell_resel_info_common.nrof_ss_blocks_to_average_present) { + HANDLE_CODE(unpack_integer(cell_resel_info_common.nrof_ss_blocks_to_average, bref, (uint8_t)2u, (uint8_t)16u)); + } + if (cell_resel_info_common.abs_thresh_ss_blocks_consolidation_present) { + HANDLE_CODE(cell_resel_info_common.abs_thresh_ss_blocks_consolidation.unpack(bref)); + } + if (cell_resel_info_common.range_to_best_cell_present) { + HANDLE_CODE(cell_resel_info_common.range_to_best_cell.unpack(bref)); + } + HANDLE_CODE(cell_resel_info_common.q_hyst.unpack(bref)); + if (cell_resel_info_common.speed_state_resel_pars_present) { + HANDLE_CODE(cell_resel_info_common.speed_state_resel_pars.mob_state_params.unpack(bref)); + HANDLE_CODE(cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_medium.unpack(bref)); + HANDLE_CODE(cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_high.unpack(bref)); + } + bref.unpack(cell_resel_serving_freq_info.ext, 1); + HANDLE_CODE(bref.unpack(cell_resel_serving_freq_info.s_non_intra_search_p_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_serving_freq_info.s_non_intra_search_q_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_serving_freq_info.thresh_serving_low_q_present, 1)); + HANDLE_CODE(bref.unpack(cell_resel_serving_freq_info.cell_resel_sub_prio_present, 1)); + if (cell_resel_serving_freq_info.s_non_intra_search_p_present) { + HANDLE_CODE(unpack_integer(cell_resel_serving_freq_info.s_non_intra_search_p, bref, (uint8_t)0u, (uint8_t)31u)); + } + if (cell_resel_serving_freq_info.s_non_intra_search_q_present) { + HANDLE_CODE(unpack_integer(cell_resel_serving_freq_info.s_non_intra_search_q, bref, (uint8_t)0u, (uint8_t)31u)); + } + HANDLE_CODE(unpack_integer(cell_resel_serving_freq_info.thresh_serving_low_p, bref, (uint8_t)0u, (uint8_t)31u)); + if (cell_resel_serving_freq_info.thresh_serving_low_q_present) { + HANDLE_CODE(unpack_integer(cell_resel_serving_freq_info.thresh_serving_low_q, bref, (uint8_t)0u, (uint8_t)31u)); + } + HANDLE_CODE(unpack_integer(cell_resel_serving_freq_info.cell_resel_prio, bref, (uint8_t)0u, (uint8_t)7u)); + if (cell_resel_serving_freq_info.cell_resel_sub_prio_present) { + HANDLE_CODE(cell_resel_serving_freq_info.cell_resel_sub_prio.unpack(bref)); + } + HANDLE_CODE(intra_freq_cell_resel_info.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); + + unpack_presence_flag(relaxed_meas_r16, bref); + if (relaxed_meas_r16.is_present()) { + HANDLE_CODE(bref.unpack(relaxed_meas_r16->low_mob_eval_r16_present, 1)); + HANDLE_CODE(bref.unpack(relaxed_meas_r16->cell_edge_eval_r16_present, 1)); + HANDLE_CODE(bref.unpack(relaxed_meas_r16->combine_relaxed_meas_condition_r16_present, 1)); + HANDLE_CODE(bref.unpack(relaxed_meas_r16->high_prio_meas_relax_r16_present, 1)); + if (relaxed_meas_r16->low_mob_eval_r16_present) { + HANDLE_CODE(relaxed_meas_r16->low_mob_eval_r16.s_search_delta_p_r16.unpack(bref)); + HANDLE_CODE(relaxed_meas_r16->low_mob_eval_r16.t_search_delta_p_r16.unpack(bref)); + } + if (relaxed_meas_r16->cell_edge_eval_r16_present) { + HANDLE_CODE(bref.unpack(relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16_present, 1)); + HANDLE_CODE(unpack_integer( + relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_p_r16, bref, (uint8_t)0u, (uint8_t)31u)); + if (relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16_present) { + HANDLE_CODE(unpack_integer( + relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16, bref, (uint8_t)0u, (uint8_t)31u)); + } + } + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(cell_equivalent_size_r17_present, 1)); + unpack_presence_flag(relaxed_meas_r17, bref); + if (cell_equivalent_size_r17_present) { + HANDLE_CODE(unpack_integer(cell_equivalent_size_r17, bref, (uint8_t)2u, (uint8_t)16u)); + } + if (relaxed_meas_r17.is_present()) { + HANDLE_CODE(bref.unpack(relaxed_meas_r17->cell_edge_eval_while_stationary_r17_present, 1)); + HANDLE_CODE(bref.unpack(relaxed_meas_r17->combine_relaxed_meas_condition2_r17_present, 1)); + HANDLE_CODE(relaxed_meas_r17->stationary_mob_eval_r17.s_search_delta_p_stationary_r17.unpack(bref)); + HANDLE_CODE(relaxed_meas_r17->stationary_mob_eval_r17.t_search_delta_p_stationary_r17.unpack(bref)); + if (relaxed_meas_r17->cell_edge_eval_while_stationary_r17_present) { + HANDLE_CODE( + bref.unpack(relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17_present, 1)); + HANDLE_CODE(unpack_integer(relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_p2_r17, + bref, + (uint8_t)0u, + (uint8_t)31u)); + if (relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17_present) { + HANDLE_CODE(unpack_integer(relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17, + bref, + (uint8_t)0u, + (uint8_t)31u)); + } + } + } + } + } + return SRSASN_SUCCESS; +} +void sib2_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("cellReselectionInfoCommon"); + j.start_obj(); + if (cell_resel_info_common.nrof_ss_blocks_to_average_present) { + j.write_int("nrofSS-BlocksToAverage", cell_resel_info_common.nrof_ss_blocks_to_average); + } + if (cell_resel_info_common.abs_thresh_ss_blocks_consolidation_present) { + j.write_fieldname("absThreshSS-BlocksConsolidation"); + cell_resel_info_common.abs_thresh_ss_blocks_consolidation.to_json(j); + } + if (cell_resel_info_common.range_to_best_cell_present) { + j.write_str("rangeToBestCell", cell_resel_info_common.range_to_best_cell.to_string()); + } + j.write_str("q-Hyst", cell_resel_info_common.q_hyst.to_string()); + if (cell_resel_info_common.speed_state_resel_pars_present) { + j.write_fieldname("speedStateReselectionPars"); + j.start_obj(); + j.write_fieldname("mobilityStateParameters"); + cell_resel_info_common.speed_state_resel_pars.mob_state_params.to_json(j); + j.write_fieldname("q-HystSF"); + j.start_obj(); + j.write_str("sf-Medium", cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_medium.to_string()); + j.write_str("sf-High", cell_resel_info_common.speed_state_resel_pars.q_hyst_sf.sf_high.to_string()); + j.end_obj(); + j.end_obj(); + } + j.end_obj(); + j.write_fieldname("cellReselectionServingFreqInfo"); + j.start_obj(); + if (cell_resel_serving_freq_info.s_non_intra_search_p_present) { + j.write_int("s-NonIntraSearchP", cell_resel_serving_freq_info.s_non_intra_search_p); + } + if (cell_resel_serving_freq_info.s_non_intra_search_q_present) { + j.write_int("s-NonIntraSearchQ", cell_resel_serving_freq_info.s_non_intra_search_q); + } + j.write_int("threshServingLowP", cell_resel_serving_freq_info.thresh_serving_low_p); + if (cell_resel_serving_freq_info.thresh_serving_low_q_present) { + j.write_int("threshServingLowQ", cell_resel_serving_freq_info.thresh_serving_low_q); + } + j.write_int("cellReselectionPriority", cell_resel_serving_freq_info.cell_resel_prio); + if (cell_resel_serving_freq_info.cell_resel_sub_prio_present) { + j.write_str("cellReselectionSubPriority", cell_resel_serving_freq_info.cell_resel_sub_prio.to_string()); + } + j.end_obj(); + j.write_fieldname("intraFreqCellReselectionInfo"); + intra_freq_cell_resel_info.to_json(j); + if (ext) { + if (relaxed_meas_r16.is_present()) { + j.write_fieldname("relaxedMeasurement-r16"); + j.start_obj(); + if (relaxed_meas_r16->low_mob_eval_r16_present) { + j.write_fieldname("lowMobilityEvaluation-r16"); + j.start_obj(); + j.write_str("s-SearchDeltaP-r16", relaxed_meas_r16->low_mob_eval_r16.s_search_delta_p_r16.to_string()); + j.write_str("t-SearchDeltaP-r16", relaxed_meas_r16->low_mob_eval_r16.t_search_delta_p_r16.to_string()); + j.end_obj(); + } + if (relaxed_meas_r16->cell_edge_eval_r16_present) { + j.write_fieldname("cellEdgeEvaluation-r16"); + j.start_obj(); + j.write_int("s-SearchThresholdP-r16", relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_p_r16); + if (relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16_present) { + j.write_int("s-SearchThresholdQ-r16", relaxed_meas_r16->cell_edge_eval_r16.s_search_thres_q_r16); + } + j.end_obj(); + } + if (relaxed_meas_r16->combine_relaxed_meas_condition_r16_present) { + j.write_str("combineRelaxedMeasCondition-r16", "true"); + } + if (relaxed_meas_r16->high_prio_meas_relax_r16_present) { + j.write_str("highPriorityMeasRelax-r16", "true"); + } + j.end_obj(); + } + if (cell_equivalent_size_r17_present) { + j.write_int("cellEquivalentSize-r17", cell_equivalent_size_r17); + } + if (relaxed_meas_r17.is_present()) { + j.write_fieldname("relaxedMeasurement-r17"); + j.start_obj(); + j.write_fieldname("stationaryMobilityEvaluation-r17"); + j.start_obj(); + j.write_str("s-SearchDeltaP-Stationary-r17", + relaxed_meas_r17->stationary_mob_eval_r17.s_search_delta_p_stationary_r17.to_string()); + j.write_str("t-SearchDeltaP-Stationary-r17", + relaxed_meas_r17->stationary_mob_eval_r17.t_search_delta_p_stationary_r17.to_string()); + j.end_obj(); + if (relaxed_meas_r17->cell_edge_eval_while_stationary_r17_present) { + j.write_fieldname("cellEdgeEvaluationWhileStationary-r17"); + j.start_obj(); + j.write_int("s-SearchThresholdP2-r17", + relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_p2_r17); + if (relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17_present) { + j.write_int("s-SearchThresholdQ2-r17", + relaxed_meas_r17->cell_edge_eval_while_stationary_r17.s_search_thres_q2_r17); + } + j.end_obj(); + } + if (relaxed_meas_r17->combine_relaxed_meas_condition2_r17_present) { + j.write_str("combineRelaxedMeasCondition2-r17", "true"); + } + j.end_obj(); + } + } + j.end_obj(); +} + +const char* sib2_s::cell_resel_info_common_s_::q_hyst_opts::to_string() const +{ + static const char* names[] = {"dB0", + "dB1", + "dB2", + "dB3", + "dB4", + "dB5", + "dB6", + "dB8", + "dB10", + "dB12", + "dB14", + "dB16", + "dB18", + "dB20", + "dB22", + "dB24"}; + return convert_enum_idx(names, 16, value, "sib2_s::cell_resel_info_common_s_::q_hyst_e_"); +} +uint8_t sib2_s::cell_resel_info_common_s_::q_hyst_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24}; + return map_enum_number(numbers, 16, value, "sib2_s::cell_resel_info_common_s_::q_hyst_e_"); +} + +const char* +sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_opts::to_string() const +{ + static const char* names[] = {"dB-6", "dB-4", "dB-2", "dB0"}; + return convert_enum_idx( + names, 4, value, "sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_e_"); +} +int8_t sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_opts::to_number() const +{ + static const int8_t numbers[] = {-6, -4, -2, 0}; + return map_enum_number( + numbers, 4, value, "sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_medium_e_"); +} + +const char* sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_opts::to_string() const +{ + static const char* names[] = {"dB-6", "dB-4", "dB-2", "dB0"}; + return convert_enum_idx( + names, 4, value, "sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_e_"); +} +int8_t sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_opts::to_number() const +{ + static const int8_t numbers[] = {-6, -4, -2, 0}; + return map_enum_number( + numbers, 4, value, "sib2_s::cell_resel_info_common_s_::speed_state_resel_pars_s_::q_hyst_sf_s_::sf_high_e_"); +} + +SRSASN_CODE sib2_s::intra_freq_cell_resel_info_s_::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(q_rx_lev_min_sul_present, 1)); + HANDLE_CODE(bref.pack(q_qual_min_present, 1)); + HANDLE_CODE(bref.pack(s_intra_search_q_present, 1)); + HANDLE_CODE(bref.pack(freq_band_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(freq_band_list_sul.size() > 0, 1)); + HANDLE_CODE(bref.pack(p_max_present, 1)); + HANDLE_CODE(bref.pack(smtc_present, 1)); + HANDLE_CODE(bref.pack(ss_rssi_meas_present, 1)); + HANDLE_CODE(bref.pack(ssb_to_measure_present, 1)); + + HANDLE_CODE(pack_integer(bref, q_rx_lev_min, (int8_t)-70, (int8_t)-22)); + if (q_rx_lev_min_sul_present) { + HANDLE_CODE(pack_integer(bref, q_rx_lev_min_sul, (int8_t)-70, (int8_t)-22)); + } + if (q_qual_min_present) { + HANDLE_CODE(pack_integer(bref, q_qual_min, (int8_t)-43, (int8_t)-12)); + } + HANDLE_CODE(pack_integer(bref, s_intra_search_p, (uint8_t)0u, (uint8_t)31u)); + if (s_intra_search_q_present) { + HANDLE_CODE(pack_integer(bref, s_intra_search_q, (uint8_t)0u, (uint8_t)31u)); + } + HANDLE_CODE(pack_integer(bref, t_resel_nr, (uint8_t)0u, (uint8_t)7u)); + if (freq_band_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list, 1, 8)); + } + if (freq_band_list_sul.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, freq_band_list_sul, 1, 8)); + } + if (p_max_present) { + HANDLE_CODE(pack_integer(bref, p_max, (int8_t)-30, (int8_t)33)); + } + if (smtc_present) { + HANDLE_CODE(smtc.pack(bref)); + } + if (ss_rssi_meas_present) { + HANDLE_CODE(ss_rssi_meas.pack(bref)); + } + if (ssb_to_measure_present) { + HANDLE_CODE(ssb_to_measure.pack(bref)); + } + HANDLE_CODE(bref.pack(derive_ssb_idx_from_cell, 1)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= t_resel_nr_sf.is_present(); + group_flags[1] |= smtc2_lp_r16.is_present(); + group_flags[1] |= ssb_position_qcl_common_r16_present; + group_flags[2] |= ssb_position_qcl_common_r17_present; + group_flags[3] |= smtc4list_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(t_resel_nr_sf.is_present(), 1)); + if (t_resel_nr_sf.is_present()) { + HANDLE_CODE(t_resel_nr_sf->pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(smtc2_lp_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(ssb_position_qcl_common_r16_present, 1)); + if (smtc2_lp_r16.is_present()) { + HANDLE_CODE(smtc2_lp_r16->pack(bref)); + } + if (ssb_position_qcl_common_r16_present) { + HANDLE_CODE(ssb_position_qcl_common_r16.pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ssb_position_qcl_common_r17_present, 1)); + if (ssb_position_qcl_common_r17_present) { + HANDLE_CODE(ssb_position_qcl_common_r17.pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(smtc4list_r17.is_present(), 1)); + if (smtc4list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *smtc4list_r17, 1, 3)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib2_s::intra_freq_cell_resel_info_s_::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(q_rx_lev_min_sul_present, 1)); + HANDLE_CODE(bref.unpack(q_qual_min_present, 1)); + HANDLE_CODE(bref.unpack(s_intra_search_q_present, 1)); + bool freq_band_list_present; + HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); + bool freq_band_list_sul_present; + HANDLE_CODE(bref.unpack(freq_band_list_sul_present, 1)); + HANDLE_CODE(bref.unpack(p_max_present, 1)); + HANDLE_CODE(bref.unpack(smtc_present, 1)); + HANDLE_CODE(bref.unpack(ss_rssi_meas_present, 1)); + HANDLE_CODE(bref.unpack(ssb_to_measure_present, 1)); + + HANDLE_CODE(unpack_integer(q_rx_lev_min, bref, (int8_t)-70, (int8_t)-22)); + if (q_rx_lev_min_sul_present) { + HANDLE_CODE(unpack_integer(q_rx_lev_min_sul, bref, (int8_t)-70, (int8_t)-22)); + } + if (q_qual_min_present) { + HANDLE_CODE(unpack_integer(q_qual_min, bref, (int8_t)-43, (int8_t)-12)); + } + HANDLE_CODE(unpack_integer(s_intra_search_p, bref, (uint8_t)0u, (uint8_t)31u)); + if (s_intra_search_q_present) { + HANDLE_CODE(unpack_integer(s_intra_search_q, bref, (uint8_t)0u, (uint8_t)31u)); + } + HANDLE_CODE(unpack_integer(t_resel_nr, bref, (uint8_t)0u, (uint8_t)7u)); + if (freq_band_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list, bref, 1, 8)); + } + if (freq_band_list_sul_present) { + HANDLE_CODE(unpack_dyn_seq_of(freq_band_list_sul, bref, 1, 8)); + } + if (p_max_present) { + HANDLE_CODE(unpack_integer(p_max, bref, (int8_t)-30, (int8_t)33)); + } + if (smtc_present) { + HANDLE_CODE(smtc.unpack(bref)); + } + if (ss_rssi_meas_present) { + HANDLE_CODE(ss_rssi_meas.unpack(bref)); + } + if (ssb_to_measure_present) { + HANDLE_CODE(ssb_to_measure.unpack(bref)); + } + HANDLE_CODE(bref.unpack(derive_ssb_idx_from_cell, 1)); + + if (ext) { + ext_groups_unpacker_guard group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(t_resel_nr_sf, bref); + if (t_resel_nr_sf.is_present()) { + HANDLE_CODE(t_resel_nr_sf->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(smtc2_lp_r16, bref); + HANDLE_CODE(bref.unpack(ssb_position_qcl_common_r16_present, 1)); + if (smtc2_lp_r16.is_present()) { + HANDLE_CODE(smtc2_lp_r16->unpack(bref)); + } + if (ssb_position_qcl_common_r16_present) { + HANDLE_CODE(ssb_position_qcl_common_r16.unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(ssb_position_qcl_common_r17_present, 1)); + if (ssb_position_qcl_common_r17_present) { + HANDLE_CODE(ssb_position_qcl_common_r17.unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(smtc4list_r17, bref); + if (smtc4list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*smtc4list_r17, bref, 1, 3)); + } + } + } + return SRSASN_SUCCESS; +} +void sib2_s::intra_freq_cell_resel_info_s_::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("q-RxLevMin", q_rx_lev_min); + if (q_rx_lev_min_sul_present) { + j.write_int("q-RxLevMinSUL", q_rx_lev_min_sul); + } + if (q_qual_min_present) { + j.write_int("q-QualMin", q_qual_min); + } + j.write_int("s-IntraSearchP", s_intra_search_p); + if (s_intra_search_q_present) { + j.write_int("s-IntraSearchQ", s_intra_search_q); + } + j.write_int("t-ReselectionNR", t_resel_nr); + if (freq_band_list.size() > 0) { + j.start_array("frequencyBandList"); + for (const auto& e1 : freq_band_list) { + e1.to_json(j); + } + j.end_array(); + } + if (freq_band_list_sul.size() > 0) { + j.start_array("frequencyBandListSUL"); + for (const auto& e1 : freq_band_list_sul) { + e1.to_json(j); + } + j.end_array(); + } + if (p_max_present) { + j.write_int("p-Max", p_max); + } + if (smtc_present) { + j.write_fieldname("smtc"); + smtc.to_json(j); + } + if (ss_rssi_meas_present) { + j.write_fieldname("ss-RSSI-Measurement"); + ss_rssi_meas.to_json(j); + } + if (ssb_to_measure_present) { + j.write_fieldname("ssb-ToMeasure"); + ssb_to_measure.to_json(j); + } + j.write_bool("deriveSSB-IndexFromCell", derive_ssb_idx_from_cell); + if (ext) { + if (t_resel_nr_sf.is_present()) { + j.write_fieldname("t-ReselectionNR-SF"); + t_resel_nr_sf->to_json(j); + } + if (smtc2_lp_r16.is_present()) { + j.write_fieldname("smtc2-LP-r16"); + smtc2_lp_r16->to_json(j); + } + if (ssb_position_qcl_common_r16_present) { + j.write_str("ssb-PositionQCL-Common-r16", ssb_position_qcl_common_r16.to_string()); + } + if (ssb_position_qcl_common_r17_present) { + j.write_str("ssb-PositionQCL-Common-r17", ssb_position_qcl_common_r17.to_string()); + } + if (smtc4list_r17.is_present()) { + j.start_array("smtc4list-r17"); + for (const auto& e1 : *smtc4list_r17) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +const char* sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::s_search_delta_p_r16_opts::to_string() const +{ + static const char* names[] = {"dB3", "dB6", "dB9", "dB12", "dB15", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::s_search_delta_p_r16_e_"); +} +uint8_t sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::s_search_delta_p_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {3, 6, 9, 12, 15}; + return map_enum_number( + numbers, 5, value, "sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::s_search_delta_p_r16_e_"); +} + +const char* sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::t_search_delta_p_r16_opts::to_string() const +{ + static const char* names[] = {"s5", + "s10", + "s20", + "s30", + "s60", + "s120", + "s180", + "s240", + "s300", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx( + names, 16, value, "sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::t_search_delta_p_r16_e_"); +} +uint16_t sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::t_search_delta_p_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {5, 10, 20, 30, 60, 120, 180, 240, 300}; + return map_enum_number( + numbers, 9, value, "sib2_s::relaxed_meas_r16_s_::low_mob_eval_r16_s_::t_search_delta_p_r16_e_"); +} + +const char* +sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::s_search_delta_p_stationary_r17_opts::to_string() const +{ + static const char* names[] = {"dB2", "dB3", "dB6", "dB9", "dB12", "dB15", "spare2", "spare1"}; + return convert_enum_idx( + names, 8, value, "sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::s_search_delta_p_stationary_r17_e_"); +} +uint8_t sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::s_search_delta_p_stationary_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 3, 6, 9, 12, 15}; + return map_enum_number( + numbers, 6, value, "sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::s_search_delta_p_stationary_r17_e_"); +} + +const char* +sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::t_search_delta_p_stationary_r17_opts::to_string() const +{ + static const char* names[] = {"s5", + "s10", + "s20", + "s30", + "s60", + "s120", + "s180", + "s240", + "s300", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx( + names, 16, value, "sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::t_search_delta_p_stationary_r17_e_"); +} +uint16_t +sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::t_search_delta_p_stationary_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {5, 10, 20, 30, 60, 120, 180, 240, 300}; + return map_enum_number( + numbers, 9, value, "sib2_s::relaxed_meas_r17_s_::stationary_mob_eval_r17_s_::t_search_delta_p_stationary_r17_e_"); +} + +// SIB20-r17 ::= SEQUENCE +SRSASN_CODE sib20_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cfr_cfg_mcch_mtch_r17_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + HANDLE_CODE(mcch_cfg_r17.pack(bref)); + if (cfr_cfg_mcch_mtch_r17_present) { + HANDLE_CODE(cfr_cfg_mcch_mtch_r17.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib20_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cfr_cfg_mcch_mtch_r17_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(mcch_cfg_r17.unpack(bref)); + if (cfr_cfg_mcch_mtch_r17_present) { + HANDLE_CODE(cfr_cfg_mcch_mtch_r17.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib20_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("mcch-Config-r17"); + mcch_cfg_r17.to_json(j); + if (cfr_cfg_mcch_mtch_r17_present) { + j.write_fieldname("cfr-ConfigMCCH-MTCH-r17"); + cfr_cfg_mcch_mtch_r17.to_json(j); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SIB21-r17 ::= SEQUENCE +SRSASN_CODE sib21_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(mbs_fsai_intra_freq_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(mbs_fsai_inter_freq_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + if (mbs_fsai_intra_freq_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbs_fsai_intra_freq_r17, 1, 64)); + } + if (mbs_fsai_inter_freq_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbs_fsai_inter_freq_list_r17, 1, 8)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib21_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool mbs_fsai_intra_freq_r17_present; + HANDLE_CODE(bref.unpack(mbs_fsai_intra_freq_r17_present, 1)); + bool mbs_fsai_inter_freq_list_r17_present; + HANDLE_CODE(bref.unpack(mbs_fsai_inter_freq_list_r17_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (mbs_fsai_intra_freq_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbs_fsai_intra_freq_r17, bref, 1, 64)); + } + if (mbs_fsai_inter_freq_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbs_fsai_inter_freq_list_r17, bref, 1, 8)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib21_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mbs_fsai_intra_freq_r17.size() > 0) { + j.start_array("mbs-FSAI-IntraFreq-r17"); + for (const auto& e1 : mbs_fsai_intra_freq_r17) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (mbs_fsai_inter_freq_list_r17.size() > 0) { + j.start_array("mbs-FSAI-InterFreqList-r17"); + for (const auto& e1 : mbs_fsai_inter_freq_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SIB3 ::= SEQUENCE +SRSASN_CODE sib3_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(intra_freq_neigh_cell_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(intra_freq_excluded_cell_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + if (intra_freq_neigh_cell_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, intra_freq_neigh_cell_list, 1, 16)); + } + if (intra_freq_excluded_cell_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, intra_freq_excluded_cell_list, 1, 16)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= intra_freq_neigh_cell_list_v1610.is_present(); + group_flags[0] |= intra_freq_allowed_cell_list_r16.is_present(); + group_flags[0] |= intra_freq_cag_cell_list_r16.is_present(); + group_flags[1] |= intra_freq_neigh_hsdn_cell_list_r17.is_present(); + group_flags[1] |= intra_freq_neigh_cell_list_v1710.is_present(); + group_flags[2] |= ch_access_mode2_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(intra_freq_neigh_cell_list_v1610.is_present(), 1)); + HANDLE_CODE(bref.pack(intra_freq_allowed_cell_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(intra_freq_cag_cell_list_r16.is_present(), 1)); + if (intra_freq_neigh_cell_list_v1610.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *intra_freq_neigh_cell_list_v1610, 1, 16)); + } + if (intra_freq_allowed_cell_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *intra_freq_allowed_cell_list_r16, 1, 16)); + } + if (intra_freq_cag_cell_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *intra_freq_cag_cell_list_r16, 1, 12)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(intra_freq_neigh_hsdn_cell_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(intra_freq_neigh_cell_list_v1710.is_present(), 1)); + if (intra_freq_neigh_hsdn_cell_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *intra_freq_neigh_hsdn_cell_list_r17, 1, 16)); + } + if (intra_freq_neigh_cell_list_v1710.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *intra_freq_neigh_cell_list_v1710, 1, 16)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ch_access_mode2_r17_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib3_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool intra_freq_neigh_cell_list_present; + HANDLE_CODE(bref.unpack(intra_freq_neigh_cell_list_present, 1)); + bool intra_freq_excluded_cell_list_present; + HANDLE_CODE(bref.unpack(intra_freq_excluded_cell_list_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (intra_freq_neigh_cell_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(intra_freq_neigh_cell_list, bref, 1, 16)); + } + if (intra_freq_excluded_cell_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(intra_freq_excluded_cell_list, bref, 1, 16)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(3); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(intra_freq_neigh_cell_list_v1610, bref); + unpack_presence_flag(intra_freq_allowed_cell_list_r16, bref); + unpack_presence_flag(intra_freq_cag_cell_list_r16, bref); + if (intra_freq_neigh_cell_list_v1610.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*intra_freq_neigh_cell_list_v1610, bref, 1, 16)); + } + if (intra_freq_allowed_cell_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*intra_freq_allowed_cell_list_r16, bref, 1, 16)); + } + if (intra_freq_cag_cell_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*intra_freq_cag_cell_list_r16, bref, 1, 12)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(intra_freq_neigh_hsdn_cell_list_r17, bref); + unpack_presence_flag(intra_freq_neigh_cell_list_v1710, bref); + if (intra_freq_neigh_hsdn_cell_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*intra_freq_neigh_hsdn_cell_list_r17, bref, 1, 16)); + } + if (intra_freq_neigh_cell_list_v1710.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*intra_freq_neigh_cell_list_v1710, bref, 1, 16)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(ch_access_mode2_r17_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void sib3_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (intra_freq_neigh_cell_list.size() > 0) { + j.start_array("intraFreqNeighCellList"); + for (const auto& e1 : intra_freq_neigh_cell_list) { + e1.to_json(j); + } + j.end_array(); + } + if (intra_freq_excluded_cell_list.size() > 0) { + j.start_array("intraFreqExcludedCellList"); + for (const auto& e1 : intra_freq_excluded_cell_list) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (ext) { + if (intra_freq_neigh_cell_list_v1610.is_present()) { + j.start_array("intraFreqNeighCellList-v1610"); + for (const auto& e1 : *intra_freq_neigh_cell_list_v1610) { + e1.to_json(j); + } + j.end_array(); + } + if (intra_freq_allowed_cell_list_r16.is_present()) { + j.start_array("intraFreqAllowedCellList-r16"); + for (const auto& e1 : *intra_freq_allowed_cell_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (intra_freq_cag_cell_list_r16.is_present()) { + j.start_array("intraFreqCAG-CellList-r16"); + for (const auto& e1 : *intra_freq_cag_cell_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (intra_freq_neigh_hsdn_cell_list_r17.is_present()) { + j.start_array("intraFreqNeighHSDN-CellList-r17"); + for (const auto& e1 : *intra_freq_neigh_hsdn_cell_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (intra_freq_neigh_cell_list_v1710.is_present()) { + j.start_array("intraFreqNeighCellList-v1710"); + for (const auto& e1 : *intra_freq_neigh_cell_list_v1710) { + e1.to_json(j); + } + j.end_array(); + } + if (ch_access_mode2_r17_present) { + j.write_str("channelAccessMode2-r17", "enabled"); + } + } + j.end_obj(); +} + +// SIB4 ::= SEQUENCE +SRSASN_CODE sib4_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_carrier_freq_list, 1, 8)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= inter_freq_carrier_freq_list_v1610.is_present(); + group_flags[1] |= inter_freq_carrier_freq_list_v1700.is_present(); + group_flags[2] |= inter_freq_carrier_freq_list_v1720.is_present(); + group_flags[3] |= inter_freq_carrier_freq_list_v1730.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v1610.is_present(), 1)); + if (inter_freq_carrier_freq_list_v1610.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_v1610, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v1700.is_present(), 1)); + if (inter_freq_carrier_freq_list_v1700.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_v1700, 1, 8)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v1720.is_present(), 1)); + if (inter_freq_carrier_freq_list_v1720.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_v1720, 1, 8)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(inter_freq_carrier_freq_list_v1730.is_present(), 1)); + if (inter_freq_carrier_freq_list_v1730.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *inter_freq_carrier_freq_list_v1730, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib4_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_carrier_freq_list, bref, 1, 8)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(inter_freq_carrier_freq_list_v1610, bref); + if (inter_freq_carrier_freq_list_v1610.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_v1610, bref, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(inter_freq_carrier_freq_list_v1700, bref); + if (inter_freq_carrier_freq_list_v1700.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_v1700, bref, 1, 8)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(inter_freq_carrier_freq_list_v1720, bref); + if (inter_freq_carrier_freq_list_v1720.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_v1720, bref, 1, 8)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(inter_freq_carrier_freq_list_v1730, bref); + if (inter_freq_carrier_freq_list_v1730.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*inter_freq_carrier_freq_list_v1730, bref, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +void sib4_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("interFreqCarrierFreqList"); + for (const auto& e1 : inter_freq_carrier_freq_list) { + e1.to_json(j); + } + j.end_array(); + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (ext) { + if (inter_freq_carrier_freq_list_v1610.is_present()) { + j.start_array("interFreqCarrierFreqList-v1610"); + for (const auto& e1 : *inter_freq_carrier_freq_list_v1610) { + e1.to_json(j); + } + j.end_array(); + } + if (inter_freq_carrier_freq_list_v1700.is_present()) { + j.start_array("interFreqCarrierFreqList-v1700"); + for (const auto& e1 : *inter_freq_carrier_freq_list_v1700) { + e1.to_json(j); + } + j.end_array(); + } + if (inter_freq_carrier_freq_list_v1720.is_present()) { + j.start_array("interFreqCarrierFreqList-v1720"); + for (const auto& e1 : *inter_freq_carrier_freq_list_v1720) { + e1.to_json(j); + } + j.end_array(); + } + if (inter_freq_carrier_freq_list_v1730.is_present()) { + j.start_array("interFreqCarrierFreqList-v1730"); + for (const auto& e1 : *inter_freq_carrier_freq_list_v1730) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +// SIB5 ::= SEQUENCE +SRSASN_CODE sib5_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(carrier_freq_list_eutra.size() > 0, 1)); + HANDLE_CODE(bref.pack(t_resel_eutra_sf_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + if (carrier_freq_list_eutra.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, carrier_freq_list_eutra, 1, 8)); + } + HANDLE_CODE(pack_integer(bref, t_resel_eutra, (uint8_t)0u, (uint8_t)7u)); + if (t_resel_eutra_sf_present) { + HANDLE_CODE(t_resel_eutra_sf.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= carrier_freq_list_eutra_v1610.is_present(); + group_flags[1] |= carrier_freq_list_eutra_v1700.is_present(); + group_flags[1] |= idle_mode_meas_voice_fallback_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(carrier_freq_list_eutra_v1610.is_present(), 1)); + if (carrier_freq_list_eutra_v1610.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *carrier_freq_list_eutra_v1610, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(carrier_freq_list_eutra_v1700.is_present(), 1)); + HANDLE_CODE(bref.pack(idle_mode_meas_voice_fallback_r17_present, 1)); + if (carrier_freq_list_eutra_v1700.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *carrier_freq_list_eutra_v1700, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib5_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool carrier_freq_list_eutra_present; + HANDLE_CODE(bref.unpack(carrier_freq_list_eutra_present, 1)); + HANDLE_CODE(bref.unpack(t_resel_eutra_sf_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (carrier_freq_list_eutra_present) { + HANDLE_CODE(unpack_dyn_seq_of(carrier_freq_list_eutra, bref, 1, 8)); + } + HANDLE_CODE(unpack_integer(t_resel_eutra, bref, (uint8_t)0u, (uint8_t)7u)); + if (t_resel_eutra_sf_present) { + HANDLE_CODE(t_resel_eutra_sf.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.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); + + unpack_presence_flag(carrier_freq_list_eutra_v1610, bref); + if (carrier_freq_list_eutra_v1610.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*carrier_freq_list_eutra_v1610, bref, 1, 8)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(carrier_freq_list_eutra_v1700, bref); + HANDLE_CODE(bref.unpack(idle_mode_meas_voice_fallback_r17_present, 1)); + if (carrier_freq_list_eutra_v1700.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*carrier_freq_list_eutra_v1700, bref, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +void sib5_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (carrier_freq_list_eutra.size() > 0) { + j.start_array("carrierFreqListEUTRA"); + for (const auto& e1 : carrier_freq_list_eutra) { + e1.to_json(j); + } + j.end_array(); + } + j.write_int("t-ReselectionEUTRA", t_resel_eutra); + if (t_resel_eutra_sf_present) { + j.write_fieldname("t-ReselectionEUTRA-SF"); + t_resel_eutra_sf.to_json(j); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (ext) { + if (carrier_freq_list_eutra_v1610.is_present()) { + j.start_array("carrierFreqListEUTRA-v1610"); + for (const auto& e1 : *carrier_freq_list_eutra_v1610) { + e1.to_json(j); + } + j.end_array(); + } + if (carrier_freq_list_eutra_v1700.is_present()) { + j.start_array("carrierFreqListEUTRA-v1700"); + for (const auto& e1 : *carrier_freq_list_eutra_v1700) { + e1.to_json(j); + } + j.end_array(); + } + if (idle_mode_meas_voice_fallback_r17_present) { + j.write_str("idleModeMeasVoiceFallback-r17", "true"); + } + } + j.end_obj(); +} + +// SIB6 ::= SEQUENCE +SRSASN_CODE sib6_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + HANDLE_CODE(msg_id.pack(bref)); + HANDLE_CODE(serial_num.pack(bref)); + HANDLE_CODE(warning_type.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib6_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(msg_id.unpack(bref)); + HANDLE_CODE(serial_num.unpack(bref)); + HANDLE_CODE(warning_type.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib6_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("messageIdentifier", msg_id.to_string()); + j.write_str("serialNumber", serial_num.to_string()); + j.write_str("warningType", warning_type.to_string()); + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SIB7 ::= SEQUENCE +SRSASN_CODE sib7_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(data_coding_scheme_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + HANDLE_CODE(msg_id.pack(bref)); + HANDLE_CODE(serial_num.pack(bref)); + HANDLE_CODE(warning_msg_segment_type.pack(bref)); + HANDLE_CODE(pack_integer(bref, warning_msg_segment_num, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(warning_msg_segment.pack(bref)); + if (data_coding_scheme_present) { + HANDLE_CODE(data_coding_scheme.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib7_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(data_coding_scheme_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(msg_id.unpack(bref)); + HANDLE_CODE(serial_num.unpack(bref)); + HANDLE_CODE(warning_msg_segment_type.unpack(bref)); + HANDLE_CODE(unpack_integer(warning_msg_segment_num, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(warning_msg_segment.unpack(bref)); + if (data_coding_scheme_present) { + HANDLE_CODE(data_coding_scheme.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib7_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("messageIdentifier", msg_id.to_string()); + j.write_str("serialNumber", serial_num.to_string()); + j.write_str("warningMessageSegmentType", warning_msg_segment_type.to_string()); + j.write_int("warningMessageSegmentNumber", warning_msg_segment_num); + j.write_str("warningMessageSegment", warning_msg_segment.to_string()); + if (data_coding_scheme_present) { + j.write_str("dataCodingScheme", data_coding_scheme.to_string()); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +const char* sib7_s::warning_msg_segment_type_opts::to_string() const +{ + static const char* names[] = {"notLastSegment", "lastSegment"}; + return convert_enum_idx(names, 2, value, "sib7_s::warning_msg_segment_type_e_"); +} + +// SIB8 ::= SEQUENCE +SRSASN_CODE sib8_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(data_coding_scheme_present, 1)); + HANDLE_CODE(bref.pack(warning_area_coordinates_segment.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + HANDLE_CODE(msg_id.pack(bref)); + HANDLE_CODE(serial_num.pack(bref)); + HANDLE_CODE(warning_msg_segment_type.pack(bref)); + HANDLE_CODE(pack_integer(bref, warning_msg_segment_num, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(warning_msg_segment.pack(bref)); + if (data_coding_scheme_present) { + HANDLE_CODE(data_coding_scheme.pack(bref)); + } + if (warning_area_coordinates_segment.size() > 0) { + HANDLE_CODE(warning_area_coordinates_segment.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib8_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(data_coding_scheme_present, 1)); + bool warning_area_coordinates_segment_present; + HANDLE_CODE(bref.unpack(warning_area_coordinates_segment_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(msg_id.unpack(bref)); + HANDLE_CODE(serial_num.unpack(bref)); + HANDLE_CODE(warning_msg_segment_type.unpack(bref)); + HANDLE_CODE(unpack_integer(warning_msg_segment_num, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(warning_msg_segment.unpack(bref)); + if (data_coding_scheme_present) { + HANDLE_CODE(data_coding_scheme.unpack(bref)); + } + if (warning_area_coordinates_segment_present) { + HANDLE_CODE(warning_area_coordinates_segment.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib8_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("messageIdentifier", msg_id.to_string()); + j.write_str("serialNumber", serial_num.to_string()); + j.write_str("warningMessageSegmentType", warning_msg_segment_type.to_string()); + j.write_int("warningMessageSegmentNumber", warning_msg_segment_num); + j.write_str("warningMessageSegment", warning_msg_segment.to_string()); + if (data_coding_scheme_present) { + j.write_str("dataCodingScheme", data_coding_scheme.to_string()); + } + if (warning_area_coordinates_segment.size() > 0) { + j.write_str("warningAreaCoordinatesSegment", warning_area_coordinates_segment.to_string()); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +const char* sib8_s::warning_msg_segment_type_opts::to_string() const +{ + static const char* names[] = {"notLastSegment", "lastSegment"}; + return convert_enum_idx(names, 2, value, "sib8_s::warning_msg_segment_type_e_"); +} + +// SIB9 ::= SEQUENCE +SRSASN_CODE sib9_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(time_info_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + if (time_info_present) { + HANDLE_CODE(bref.pack(time_info.day_light_saving_time_present, 1)); + HANDLE_CODE(bref.pack(time_info.leap_seconds_present, 1)); + HANDLE_CODE(bref.pack(time_info.local_time_offset_present, 1)); + HANDLE_CODE(pack_integer(bref, time_info.time_info_utc, (uint64_t)0u, (uint64_t)549755813887u)); + if (time_info.day_light_saving_time_present) { + HANDLE_CODE(time_info.day_light_saving_time.pack(bref)); + } + if (time_info.leap_seconds_present) { + HANDLE_CODE(pack_integer(bref, time_info.leap_seconds, (int16_t)-127, (int16_t)128)); + } + if (time_info.local_time_offset_present) { + HANDLE_CODE(pack_integer(bref, time_info.local_time_offset, (int8_t)-63, (int8_t)64)); + } + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= ref_time_info_r16.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(ref_time_info_r16.is_present(), 1)); + if (ref_time_info_r16.is_present()) { + HANDLE_CODE(ref_time_info_r16->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib9_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(time_info_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + if (time_info_present) { + HANDLE_CODE(bref.unpack(time_info.day_light_saving_time_present, 1)); + HANDLE_CODE(bref.unpack(time_info.leap_seconds_present, 1)); + HANDLE_CODE(bref.unpack(time_info.local_time_offset_present, 1)); + HANDLE_CODE(unpack_integer(time_info.time_info_utc, bref, (uint64_t)0u, (uint64_t)549755813887u)); + if (time_info.day_light_saving_time_present) { + HANDLE_CODE(time_info.day_light_saving_time.unpack(bref)); + } + if (time_info.leap_seconds_present) { + HANDLE_CODE(unpack_integer(time_info.leap_seconds, bref, (int16_t)-127, (int16_t)128)); + } + if (time_info.local_time_offset_present) { + HANDLE_CODE(unpack_integer(time_info.local_time_offset, bref, (int8_t)-63, (int8_t)64)); + } + } + 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); + + unpack_presence_flag(ref_time_info_r16, bref); + if (ref_time_info_r16.is_present()) { + HANDLE_CODE(ref_time_info_r16->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void sib9_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (time_info_present) { + j.write_fieldname("timeInfo"); + j.start_obj(); + j.write_int("timeInfoUTC", time_info.time_info_utc); + if (time_info.day_light_saving_time_present) { + j.write_str("dayLightSavingTime", time_info.day_light_saving_time.to_string()); + } + if (time_info.leap_seconds_present) { + j.write_int("leapSeconds", time_info.leap_seconds); + } + if (time_info.local_time_offset_present) { + j.write_int("localTimeOffset", time_info.local_time_offset); + } + j.end_obj(); + } + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + if (ext) { + if (ref_time_info_r16.is_present()) { + j.write_fieldname("referenceTimeInfo-r16"); + ref_time_info_r16->to_json(j); + } + } + j.end_obj(); +} + +// SIBpos-r16 ::= SEQUENCE +SRSASN_CODE sib_pos_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + + HANDLE_CODE(assist_data_sib_elem_r16.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib_pos_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + + HANDLE_CODE(assist_data_sib_elem_r16.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib_pos_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("assistanceDataSIB-Element-r16", assist_data_sib_elem_r16.to_string()); + if (late_non_crit_ext.size() > 0) { + j.write_str("lateNonCriticalExtension", late_non_crit_ext.to_string()); + } + j.end_obj(); +} + +// SNPN-AccessInfo-r17 ::= SEQUENCE +SRSASN_CODE sn_pn_access_info_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ext_ch_supported_r17_present, 1)); + HANDLE_CODE(bref.pack(ext_ch_without_cfg_allowed_r17_present, 1)); + HANDLE_CODE(bref.pack(onboarding_enabled_r17_present, 1)); + HANDLE_CODE(bref.pack(ims_emergency_support_for_sn_pn_r17_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sn_pn_access_info_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ext_ch_supported_r17_present, 1)); + HANDLE_CODE(bref.unpack(ext_ch_without_cfg_allowed_r17_present, 1)); + HANDLE_CODE(bref.unpack(onboarding_enabled_r17_present, 1)); + HANDLE_CODE(bref.unpack(ims_emergency_support_for_sn_pn_r17_present, 1)); + + return SRSASN_SUCCESS; +} +void sn_pn_access_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ext_ch_supported_r17_present) { + j.write_str("extCH-Supported-r17", "true"); + } + if (ext_ch_without_cfg_allowed_r17_present) { + j.write_str("extCH-WithoutConfigAllowed-r17", "true"); + } + if (onboarding_enabled_r17_present) { + j.write_str("onboardingEnabled-r17", "true"); + } + if (ims_emergency_support_for_sn_pn_r17_present) { + j.write_str("imsEmergencySupportForSNPN-r17", "true"); + } + j.end_obj(); +} + +// SchedulingInfo ::= SEQUENCE +SRSASN_CODE sched_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(si_broadcast_status.pack(bref)); + HANDLE_CODE(si_periodicity.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, sib_map_info, 1, 32)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sched_info_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(si_broadcast_status.unpack(bref)); + HANDLE_CODE(si_periodicity.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(sib_map_info, bref, 1, 32)); + + return SRSASN_SUCCESS; +} +void sched_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("si-BroadcastStatus", si_broadcast_status.to_string()); + j.write_str("si-Periodicity", si_periodicity.to_string()); + j.start_array("sib-MappingInfo"); + for (const auto& e1 : sib_map_info) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +const char* sched_info_s::si_broadcast_status_opts::to_string() const +{ + static const char* names[] = {"broadcasting", "notBroadcasting"}; + return convert_enum_idx(names, 2, value, "sched_info_s::si_broadcast_status_e_"); +} + +const char* sched_info_s::si_periodicity_opts::to_string() const +{ + static const char* names[] = {"rf8", "rf16", "rf32", "rf64", "rf128", "rf256", "rf512"}; + return convert_enum_idx(names, 7, value, "sched_info_s::si_periodicity_e_"); +} +uint16_t sched_info_s::si_periodicity_opts::to_number() const +{ + static const uint16_t numbers[] = {8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(numbers, 7, value, "sched_info_s::si_periodicity_e_"); +} + +// UAC-BarringInfoSet ::= SEQUENCE +SRSASN_CODE uac_barr_info_set_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(uac_barr_factor.pack(bref)); + HANDLE_CODE(uac_barr_time.pack(bref)); + HANDLE_CODE(uac_barr_for_access_id.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE uac_barr_info_set_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(uac_barr_factor.unpack(bref)); + HANDLE_CODE(uac_barr_time.unpack(bref)); + HANDLE_CODE(uac_barr_for_access_id.unpack(bref)); + + return SRSASN_SUCCESS; +} +void uac_barr_info_set_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("uac-BarringFactor", uac_barr_factor.to_string()); + j.write_str("uac-BarringTime", uac_barr_time.to_string()); + j.write_str("uac-BarringForAccessIdentity", uac_barr_for_access_id.to_string()); + j.end_obj(); +} + +const char* uac_barr_info_set_s::uac_barr_factor_opts::to_string() const +{ + static const char* names[] = { + "p00", "p05", "p10", "p15", "p20", "p25", "p30", "p40", "p50", "p60", "p70", "p75", "p80", "p85", "p90", "p95"}; + return convert_enum_idx(names, 16, value, "uac_barr_info_set_s::uac_barr_factor_e_"); +} +float uac_barr_info_set_s::uac_barr_factor_opts::to_number() const +{ + static const float numbers[] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5}; + return map_enum_number(numbers, 16, value, "uac_barr_info_set_s::uac_barr_factor_e_"); +} +const char* uac_barr_info_set_s::uac_barr_factor_opts::to_number_string() const +{ + static const char* number_strs[] = { + "0.0", "0.5", "1.0", "1.5", "2.0", "2.5", "3.0", "4.0", "5.0", "6.0", "7.0", "7.5", "8.0", "8.5", "9.0", "9.5"}; + return convert_enum_idx(number_strs, 16, value, "uac_barr_info_set_s::uac_barr_factor_e_"); +} + +const char* uac_barr_info_set_s::uac_barr_time_opts::to_string() const +{ + static const char* names[] = {"s4", "s8", "s16", "s32", "s64", "s128", "s256", "s512"}; + return convert_enum_idx(names, 8, value, "uac_barr_info_set_s::uac_barr_time_e_"); +} +uint16_t uac_barr_info_set_s::uac_barr_time_opts::to_number() const +{ + static const uint16_t numbers[] = {4, 8, 16, 32, 64, 128, 256, 512}; + return map_enum_number(numbers, 8, value, "uac_barr_info_set_s::uac_barr_time_e_"); +} + +// UAC-BarringPerPLMN ::= SEQUENCE +SRSASN_CODE uac_barr_per_plmn_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(uac_ac_barr_list_type_present, 1)); + + HANDLE_CODE(pack_integer(bref, plmn_id_idx, (uint8_t)1u, (uint8_t)12u)); + if (uac_ac_barr_list_type_present) { + HANDLE_CODE(uac_ac_barr_list_type.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE uac_barr_per_plmn_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(uac_ac_barr_list_type_present, 1)); + + HANDLE_CODE(unpack_integer(plmn_id_idx, bref, (uint8_t)1u, (uint8_t)12u)); + if (uac_ac_barr_list_type_present) { + HANDLE_CODE(uac_ac_barr_list_type.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void uac_barr_per_plmn_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("plmn-IdentityIndex", plmn_id_idx); + if (uac_ac_barr_list_type_present) { + j.write_fieldname("uac-ACBarringListType"); + uac_ac_barr_list_type.to_json(j); + } + j.end_obj(); +} + +void uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::destroy_() +{ + switch (type_) { + case types::uac_implicit_ac_barr_list: + c.destroy(); + break; + case types::uac_explicit_ac_barr_list: + c.destroy(); + break; + default: + break; + } +} +void uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::uac_implicit_ac_barr_list: + c.init(); + break; + case types::uac_explicit_ac_barr_list: + c.init(); + break; + case types::nulltype: + break; + default: + 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_ac_barr_list_type_c_( + const uac_barr_per_plmn_s::uac_ac_barr_list_type_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::uac_implicit_ac_barr_list: + c.init(other.c.get()); + break; + case types::uac_explicit_ac_barr_list: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + 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) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::uac_implicit_ac_barr_list: + c.set(other.c.get()); + break; + case types::uac_explicit_ac_barr_list: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "uac_barr_per_plmn_s::uac_ac_barr_list_type_c_"); + } + + return *this; +} +uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::uac_implicit_ac_barr_list_l_& +uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::set_uac_implicit_ac_barr_list() +{ + set(types::uac_implicit_ac_barr_list); + return c.get(); +} +uac_barr_per_cat_list_l& uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::set_uac_explicit_ac_barr_list() +{ + set(types::uac_explicit_ac_barr_list); + return c.get(); +} +void uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::uac_implicit_ac_barr_list: + j.start_array("uac-ImplicitACBarringList"); + for (const auto& e1 : c.get()) { + j.write_int(e1); + } + j.end_array(); + break; + case types::uac_explicit_ac_barr_list: + j.start_array("uac-ExplicitACBarringList"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "uac_barr_per_plmn_s::uac_ac_barr_list_type_c_"); + } + j.end_obj(); +} +SRSASN_CODE uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::uac_implicit_ac_barr_list: + HANDLE_CODE(pack_fixed_seq_of(bref, + c.get(), + c.get().size(), + integer_packer(1, 8))); + break; + case types::uac_explicit_ac_barr_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 63)); + break; + default: + log_invalid_choice_id(type_, "uac_barr_per_plmn_s::uac_ac_barr_list_type_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::uac_implicit_ac_barr_list: + HANDLE_CODE(unpack_fixed_seq_of(c.get(), + bref, + c.get().size(), + integer_packer(1, 8))); + break; + case types::uac_explicit_ac_barr_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 63)); + break; + default: + log_invalid_choice_id(type_, "uac_barr_per_plmn_s::uac_ac_barr_list_type_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::types_opts::to_string() const +{ + static const char* names[] = {"uac-ImplicitACBarringList", "uac-ExplicitACBarringList"}; + return convert_enum_idx(names, 2, value, "uac_barr_per_plmn_s::uac_ac_barr_list_type_c_::types"); +} + +// CellAccessRelatedInfo ::= SEQUENCE +SRSASN_CODE cell_access_related_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cell_reserved_for_other_use_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_info_list, 1, 12)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= cell_reserved_for_future_use_r16_present; + group_flags[0] |= npn_id_info_list_r16.is_present(); + group_flags[1] |= snpn_access_info_list_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(cell_reserved_for_future_use_r16_present, 1)); + HANDLE_CODE(bref.pack(npn_id_info_list_r16.is_present(), 1)); + if (npn_id_info_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *npn_id_info_list_r16, 1, 12)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(snpn_access_info_list_r17.is_present(), 1)); + if (snpn_access_info_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *snpn_access_info_list_r17, 1, 12)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_access_related_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(cell_reserved_for_other_use_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_info_list, bref, 1, 12)); + + 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(cell_reserved_for_future_use_r16_present, 1)); + unpack_presence_flag(npn_id_info_list_r16, bref); + if (npn_id_info_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*npn_id_info_list_r16, bref, 1, 12)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(snpn_access_info_list_r17, bref); + if (snpn_access_info_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*snpn_access_info_list_r17, bref, 1, 12)); + } + } + } + return SRSASN_SUCCESS; +} +void cell_access_related_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("plmn-IdentityInfoList"); + for (const auto& e1 : plmn_id_info_list) { + e1.to_json(j); + } + j.end_array(); + if (cell_reserved_for_other_use_present) { + j.write_str("cellReservedForOtherUse", "true"); + } + if (ext) { + if (cell_reserved_for_future_use_r16_present) { + j.write_str("cellReservedForFutureUse-r16", "true"); + } + if (npn_id_info_list_r16.is_present()) { + j.start_array("npn-IdentityInfoList-r16"); + for (const auto& e1 : *npn_id_info_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (snpn_access_info_list_r17.is_present()) { + j.start_array("snpn-AccessInfoList-r17"); + for (const auto& e1 : *snpn_access_info_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +// ConnEstFailureControl ::= SEQUENCE +SRSASN_CODE conn_est_fail_ctrl_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(conn_est_fail_offset_present, 1)); + + HANDLE_CODE(conn_est_fail_count.pack(bref)); + HANDLE_CODE(conn_est_fail_offset_validity.pack(bref)); + if (conn_est_fail_offset_present) { + HANDLE_CODE(pack_integer(bref, conn_est_fail_offset, (uint8_t)0u, (uint8_t)15u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE conn_est_fail_ctrl_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(conn_est_fail_offset_present, 1)); + + HANDLE_CODE(conn_est_fail_count.unpack(bref)); + HANDLE_CODE(conn_est_fail_offset_validity.unpack(bref)); + if (conn_est_fail_offset_present) { + HANDLE_CODE(unpack_integer(conn_est_fail_offset, bref, (uint8_t)0u, (uint8_t)15u)); + } + + return SRSASN_SUCCESS; +} +void conn_est_fail_ctrl_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("connEstFailCount", conn_est_fail_count.to_string()); + j.write_str("connEstFailOffsetValidity", conn_est_fail_offset_validity.to_string()); + if (conn_est_fail_offset_present) { + j.write_int("connEstFailOffset", conn_est_fail_offset); + } + j.end_obj(); +} + +const char* conn_est_fail_ctrl_s::conn_est_fail_count_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n3", "n4"}; + return convert_enum_idx(names, 4, value, "conn_est_fail_ctrl_s::conn_est_fail_count_e_"); +} +uint8_t conn_est_fail_ctrl_s::conn_est_fail_count_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3, 4}; + return map_enum_number(numbers, 4, value, "conn_est_fail_ctrl_s::conn_est_fail_count_e_"); +} + +const char* conn_est_fail_ctrl_s::conn_est_fail_offset_validity_opts::to_string() const +{ + static const char* names[] = {"s30", "s60", "s120", "s240", "s300", "s420", "s600", "s900"}; + return convert_enum_idx(names, 8, value, "conn_est_fail_ctrl_s::conn_est_fail_offset_validity_e_"); +} +uint16_t conn_est_fail_ctrl_s::conn_est_fail_offset_validity_opts::to_number() const +{ + static const uint16_t numbers[] = {30, 60, 120, 240, 300, 420, 600, 900}; + return map_enum_number(numbers, 8, value, "conn_est_fail_ctrl_s::conn_est_fail_offset_validity_e_"); +} + +// PosSystemInformation-r16-IEs ::= SEQUENCE +SRSASN_CODE pos_sys_info_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, pos_sib_type_and_info_r16, 1, 32)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE pos_sys_info_r16_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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(pos_sib_type_and_info_r16, bref, 1, 32)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void pos_sys_info_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("posSIB-TypeAndInfo-r16"); + for (const auto& e1 : pos_sib_type_and_info_r16) { + e1.to_json(j); + } + j.end_array(); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +void pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::destroy_() +{ + switch (type_) { + case types::pos_sib1_1_r16: + c.destroy(); + break; + case types::pos_sib1_2_r16: + c.destroy(); + break; + case types::pos_sib1_3_r16: + c.destroy(); + break; + case types::pos_sib1_4_r16: + c.destroy(); + break; + case types::pos_sib1_5_r16: + c.destroy(); + break; + case types::pos_sib1_6_r16: + c.destroy(); + break; + case types::pos_sib1_7_r16: + c.destroy(); + break; + case types::pos_sib1_8_r16: + c.destroy(); + break; + case types::pos_sib2_1_r16: + c.destroy(); + break; + case types::pos_sib2_2_r16: + c.destroy(); + break; + case types::pos_sib2_3_r16: + c.destroy(); + break; + case types::pos_sib2_4_r16: + c.destroy(); + break; + case types::pos_sib2_5_r16: + c.destroy(); + break; + case types::pos_sib2_6_r16: + c.destroy(); + break; + case types::pos_sib2_7_r16: + c.destroy(); + break; + case types::pos_sib2_8_r16: + c.destroy(); + break; + case types::pos_sib2_9_r16: + c.destroy(); + break; + case types::pos_sib2_10_r16: + c.destroy(); + break; + case types::pos_sib2_11_r16: + c.destroy(); + break; + case types::pos_sib2_12_r16: + c.destroy(); + break; + case types::pos_sib2_13_r16: + c.destroy(); + break; + case types::pos_sib2_14_r16: + c.destroy(); + break; + case types::pos_sib2_15_r16: + c.destroy(); + break; + case types::pos_sib2_16_r16: + c.destroy(); + break; + case types::pos_sib2_17_r16: + c.destroy(); + break; + case types::pos_sib2_18_r16: + c.destroy(); + break; + case types::pos_sib2_19_r16: + c.destroy(); + break; + case types::pos_sib2_20_r16: + c.destroy(); + break; + case types::pos_sib2_21_r16: + c.destroy(); + break; + case types::pos_sib2_22_r16: + c.destroy(); + break; + case types::pos_sib2_23_r16: + c.destroy(); + break; + case types::pos_sib3_1_r16: + c.destroy(); + break; + case types::pos_sib4_1_r16: + c.destroy(); + break; + case types::pos_sib5_1_r16: + c.destroy(); + break; + case types::pos_sib6_1_r16: + c.destroy(); + break; + case types::pos_sib6_2_r16: + c.destroy(); + break; + case types::pos_sib6_3_r16: + c.destroy(); + break; + case types::pos_sib1_9_v1700: + c.destroy(); + break; + case types::pos_sib1_10_v1700: + c.destroy(); + break; + case types::pos_sib2_24_v1700: + c.destroy(); + break; + case types::pos_sib2_25_v1700: + c.destroy(); + break; + case types::pos_sib6_4_v1700: + c.destroy(); + break; + case types::pos_sib6_5_v1700: + c.destroy(); + break; + case types::pos_sib6_6_v1700: + c.destroy(); + break; + default: + break; + } +} +void pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::pos_sib1_1_r16: + c.init(); + break; + case types::pos_sib1_2_r16: + c.init(); + break; + case types::pos_sib1_3_r16: + c.init(); + break; + case types::pos_sib1_4_r16: + c.init(); + break; + case types::pos_sib1_5_r16: + c.init(); + break; + case types::pos_sib1_6_r16: + c.init(); + break; + case types::pos_sib1_7_r16: + c.init(); + break; + case types::pos_sib1_8_r16: + c.init(); + break; + case types::pos_sib2_1_r16: + c.init(); + break; + case types::pos_sib2_2_r16: + c.init(); + break; + case types::pos_sib2_3_r16: + c.init(); + break; + case types::pos_sib2_4_r16: + c.init(); + break; + case types::pos_sib2_5_r16: + c.init(); + break; + case types::pos_sib2_6_r16: + c.init(); + break; + case types::pos_sib2_7_r16: + c.init(); + break; + case types::pos_sib2_8_r16: + c.init(); + break; + case types::pos_sib2_9_r16: + c.init(); + break; + case types::pos_sib2_10_r16: + c.init(); + break; + case types::pos_sib2_11_r16: + c.init(); + break; + case types::pos_sib2_12_r16: + c.init(); + break; + case types::pos_sib2_13_r16: + c.init(); + break; + case types::pos_sib2_14_r16: + c.init(); + break; + case types::pos_sib2_15_r16: + c.init(); + break; + case types::pos_sib2_16_r16: + c.init(); + break; + case types::pos_sib2_17_r16: + c.init(); + break; + case types::pos_sib2_18_r16: + c.init(); + break; + case types::pos_sib2_19_r16: + c.init(); + break; + case types::pos_sib2_20_r16: + c.init(); + break; + case types::pos_sib2_21_r16: + c.init(); + break; + case types::pos_sib2_22_r16: + c.init(); + break; + case types::pos_sib2_23_r16: + c.init(); + break; + case types::pos_sib3_1_r16: + c.init(); + break; + case types::pos_sib4_1_r16: + c.init(); + break; + case types::pos_sib5_1_r16: + c.init(); + break; + case types::pos_sib6_1_r16: + c.init(); + break; + case types::pos_sib6_2_r16: + c.init(); + break; + case types::pos_sib6_3_r16: + c.init(); + break; + case types::pos_sib1_9_v1700: + c.init(); + break; + case types::pos_sib1_10_v1700: + c.init(); + break; + case types::pos_sib2_24_v1700: + c.init(); + break; + case types::pos_sib2_25_v1700: + c.init(); + break; + case types::pos_sib6_4_v1700: + c.init(); + break; + case types::pos_sib6_5_v1700: + c.init(); + break; + case types::pos_sib6_6_v1700: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_"); + } +} +pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::pos_sib_type_and_info_r16_item_c_( + const pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::pos_sib1_1_r16: + c.init(other.c.get()); + break; + case types::pos_sib1_2_r16: + c.init(other.c.get()); + break; + case types::pos_sib1_3_r16: + c.init(other.c.get()); + break; + case types::pos_sib1_4_r16: + c.init(other.c.get()); + break; + case types::pos_sib1_5_r16: + c.init(other.c.get()); + break; + case types::pos_sib1_6_r16: + c.init(other.c.get()); + break; + case types::pos_sib1_7_r16: + c.init(other.c.get()); + break; + case types::pos_sib1_8_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_1_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_2_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_3_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_4_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_5_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_6_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_7_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_8_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_9_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_10_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_11_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_12_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_13_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_14_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_15_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_16_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_17_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_18_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_19_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_20_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_21_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_22_r16: + c.init(other.c.get()); + break; + case types::pos_sib2_23_r16: + c.init(other.c.get()); + break; + case types::pos_sib3_1_r16: + c.init(other.c.get()); + break; + case types::pos_sib4_1_r16: + c.init(other.c.get()); + break; + case types::pos_sib5_1_r16: + c.init(other.c.get()); + break; + case types::pos_sib6_1_r16: + c.init(other.c.get()); + break; + case types::pos_sib6_2_r16: + c.init(other.c.get()); + break; + case types::pos_sib6_3_r16: + c.init(other.c.get()); + break; + case types::pos_sib1_9_v1700: + c.init(other.c.get()); + break; + case types::pos_sib1_10_v1700: + c.init(other.c.get()); + break; + case types::pos_sib2_24_v1700: + c.init(other.c.get()); + break; + case types::pos_sib2_25_v1700: + c.init(other.c.get()); + break; + case types::pos_sib6_4_v1700: + c.init(other.c.get()); + break; + case types::pos_sib6_5_v1700: + c.init(other.c.get()); + break; + case types::pos_sib6_6_v1700: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_"); + } +} +pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_& +pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::operator=( + const pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::pos_sib1_1_r16: + c.set(other.c.get()); + break; + case types::pos_sib1_2_r16: + c.set(other.c.get()); + break; + case types::pos_sib1_3_r16: + c.set(other.c.get()); + break; + case types::pos_sib1_4_r16: + c.set(other.c.get()); + break; + case types::pos_sib1_5_r16: + c.set(other.c.get()); + break; + case types::pos_sib1_6_r16: + c.set(other.c.get()); + break; + case types::pos_sib1_7_r16: + c.set(other.c.get()); + break; + case types::pos_sib1_8_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_1_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_2_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_3_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_4_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_5_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_6_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_7_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_8_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_9_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_10_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_11_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_12_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_13_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_14_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_15_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_16_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_17_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_18_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_19_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_20_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_21_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_22_r16: + c.set(other.c.get()); + break; + case types::pos_sib2_23_r16: + c.set(other.c.get()); + break; + case types::pos_sib3_1_r16: + c.set(other.c.get()); + break; + case types::pos_sib4_1_r16: + c.set(other.c.get()); + break; + case types::pos_sib5_1_r16: + c.set(other.c.get()); + break; + case types::pos_sib6_1_r16: + c.set(other.c.get()); + break; + case types::pos_sib6_2_r16: + c.set(other.c.get()); + break; + case types::pos_sib6_3_r16: + c.set(other.c.get()); + break; + case types::pos_sib1_9_v1700: + c.set(other.c.get()); + break; + case types::pos_sib1_10_v1700: + c.set(other.c.get()); + break; + case types::pos_sib2_24_v1700: + c.set(other.c.get()); + break; + case types::pos_sib2_25_v1700: + c.set(other.c.get()); + break; + case types::pos_sib6_4_v1700: + c.set(other.c.get()); + break; + case types::pos_sib6_5_v1700: + c.set(other.c.get()); + break; + case types::pos_sib6_6_v1700: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_"); + } + + return *this; +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_1_r16() +{ + set(types::pos_sib1_1_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_2_r16() +{ + set(types::pos_sib1_2_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_3_r16() +{ + set(types::pos_sib1_3_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_4_r16() +{ + set(types::pos_sib1_4_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_5_r16() +{ + set(types::pos_sib1_5_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_6_r16() +{ + set(types::pos_sib1_6_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_7_r16() +{ + set(types::pos_sib1_7_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_8_r16() +{ + set(types::pos_sib1_8_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_1_r16() +{ + set(types::pos_sib2_1_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_2_r16() +{ + set(types::pos_sib2_2_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_3_r16() +{ + set(types::pos_sib2_3_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_4_r16() +{ + set(types::pos_sib2_4_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_5_r16() +{ + set(types::pos_sib2_5_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_6_r16() +{ + set(types::pos_sib2_6_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_7_r16() +{ + set(types::pos_sib2_7_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_8_r16() +{ + set(types::pos_sib2_8_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_9_r16() +{ + set(types::pos_sib2_9_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_10_r16() +{ + set(types::pos_sib2_10_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_11_r16() +{ + set(types::pos_sib2_11_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_12_r16() +{ + set(types::pos_sib2_12_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_13_r16() +{ + set(types::pos_sib2_13_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_14_r16() +{ + set(types::pos_sib2_14_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_15_r16() +{ + set(types::pos_sib2_15_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_16_r16() +{ + set(types::pos_sib2_16_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_17_r16() +{ + set(types::pos_sib2_17_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_18_r16() +{ + set(types::pos_sib2_18_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_19_r16() +{ + set(types::pos_sib2_19_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_20_r16() +{ + set(types::pos_sib2_20_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_21_r16() +{ + set(types::pos_sib2_21_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_22_r16() +{ + set(types::pos_sib2_22_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_23_r16() +{ + set(types::pos_sib2_23_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib3_1_r16() +{ + set(types::pos_sib3_1_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib4_1_r16() +{ + set(types::pos_sib4_1_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib5_1_r16() +{ + set(types::pos_sib5_1_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib6_1_r16() +{ + set(types::pos_sib6_1_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib6_2_r16() +{ + set(types::pos_sib6_2_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib6_3_r16() +{ + set(types::pos_sib6_3_r16); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_9_v1700() +{ + set(types::pos_sib1_9_v1700); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib1_10_v1700() +{ + set(types::pos_sib1_10_v1700); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_24_v1700() +{ + set(types::pos_sib2_24_v1700); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib2_25_v1700() +{ + set(types::pos_sib2_25_v1700); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib6_4_v1700() +{ + set(types::pos_sib6_4_v1700); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib6_5_v1700() +{ + set(types::pos_sib6_5_v1700); + return c.get(); +} +sib_pos_r16_s& pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::set_pos_sib6_6_v1700() +{ + set(types::pos_sib6_6_v1700); + return c.get(); +} +void pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::pos_sib1_1_r16: + j.write_fieldname("posSib1-1-r16"); + c.get().to_json(j); + break; + case types::pos_sib1_2_r16: + j.write_fieldname("posSib1-2-r16"); + c.get().to_json(j); + break; + case types::pos_sib1_3_r16: + j.write_fieldname("posSib1-3-r16"); + c.get().to_json(j); + break; + case types::pos_sib1_4_r16: + j.write_fieldname("posSib1-4-r16"); + c.get().to_json(j); + break; + case types::pos_sib1_5_r16: + j.write_fieldname("posSib1-5-r16"); + c.get().to_json(j); + break; + case types::pos_sib1_6_r16: + j.write_fieldname("posSib1-6-r16"); + c.get().to_json(j); + break; + case types::pos_sib1_7_r16: + j.write_fieldname("posSib1-7-r16"); + c.get().to_json(j); + break; + case types::pos_sib1_8_r16: + j.write_fieldname("posSib1-8-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_1_r16: + j.write_fieldname("posSib2-1-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_2_r16: + j.write_fieldname("posSib2-2-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_3_r16: + j.write_fieldname("posSib2-3-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_4_r16: + j.write_fieldname("posSib2-4-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_5_r16: + j.write_fieldname("posSib2-5-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_6_r16: + j.write_fieldname("posSib2-6-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_7_r16: + j.write_fieldname("posSib2-7-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_8_r16: + j.write_fieldname("posSib2-8-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_9_r16: + j.write_fieldname("posSib2-9-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_10_r16: + j.write_fieldname("posSib2-10-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_11_r16: + j.write_fieldname("posSib2-11-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_12_r16: + j.write_fieldname("posSib2-12-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_13_r16: + j.write_fieldname("posSib2-13-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_14_r16: + j.write_fieldname("posSib2-14-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_15_r16: + j.write_fieldname("posSib2-15-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_16_r16: + j.write_fieldname("posSib2-16-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_17_r16: + j.write_fieldname("posSib2-17-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_18_r16: + j.write_fieldname("posSib2-18-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_19_r16: + j.write_fieldname("posSib2-19-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_20_r16: + j.write_fieldname("posSib2-20-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_21_r16: + j.write_fieldname("posSib2-21-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_22_r16: + j.write_fieldname("posSib2-22-r16"); + c.get().to_json(j); + break; + case types::pos_sib2_23_r16: + j.write_fieldname("posSib2-23-r16"); + c.get().to_json(j); + break; + case types::pos_sib3_1_r16: + j.write_fieldname("posSib3-1-r16"); + c.get().to_json(j); + break; + case types::pos_sib4_1_r16: + j.write_fieldname("posSib4-1-r16"); + c.get().to_json(j); + break; + case types::pos_sib5_1_r16: + j.write_fieldname("posSib5-1-r16"); + c.get().to_json(j); + break; + case types::pos_sib6_1_r16: + j.write_fieldname("posSib6-1-r16"); + c.get().to_json(j); + break; + case types::pos_sib6_2_r16: + j.write_fieldname("posSib6-2-r16"); + c.get().to_json(j); + break; + case types::pos_sib6_3_r16: + j.write_fieldname("posSib6-3-r16"); + c.get().to_json(j); + break; + case types::pos_sib1_9_v1700: + j.write_fieldname("posSib1-9-v1700"); + c.get().to_json(j); + break; + case types::pos_sib1_10_v1700: + j.write_fieldname("posSib1-10-v1700"); + c.get().to_json(j); + break; + case types::pos_sib2_24_v1700: + j.write_fieldname("posSib2-24-v1700"); + c.get().to_json(j); + break; + case types::pos_sib2_25_v1700: + j.write_fieldname("posSib2-25-v1700"); + c.get().to_json(j); + break; + case types::pos_sib6_4_v1700: + j.write_fieldname("posSib6-4-v1700"); + c.get().to_json(j); + break; + case types::pos_sib6_5_v1700: + j.write_fieldname("posSib6-5-v1700"); + c.get().to_json(j); + break; + case types::pos_sib6_6_v1700: + j.write_fieldname("posSib6-6-v1700"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_"); + } + j.end_obj(); +} +SRSASN_CODE pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::pos_sib1_1_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_2_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_3_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_4_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_5_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_6_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_7_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_8_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_1_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_2_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_3_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_4_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_5_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_6_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_7_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_8_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_9_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_10_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_11_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_12_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_13_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_14_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_15_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_16_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_17_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_18_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_19_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_20_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_21_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_22_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib2_23_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib3_1_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib4_1_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib5_1_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib6_1_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib6_2_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib6_3_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pos_sib1_9_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::pos_sib1_10_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::pos_sib2_24_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::pos_sib2_25_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::pos_sib6_4_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::pos_sib6_5_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::pos_sib6_6_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + default: + log_invalid_choice_id(type_, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::pos_sib1_1_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_2_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_3_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_4_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_5_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_6_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_7_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_8_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_1_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_2_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_3_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_4_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_5_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_6_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_7_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_8_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_9_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_10_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_11_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_12_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_13_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_14_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_15_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_16_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_17_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_18_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_19_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_20_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_21_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_22_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib2_23_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib3_1_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib4_1_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib5_1_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib6_1_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib6_2_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib6_3_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pos_sib1_9_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::pos_sib1_10_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::pos_sib2_24_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::pos_sib2_25_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::pos_sib6_4_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::pos_sib6_5_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::pos_sib6_6_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + default: + log_invalid_choice_id(type_, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::types_opts::to_string() const +{ + static const char* names[] = { + "posSib1-1-r16", "posSib1-2-r16", "posSib1-3-r16", "posSib1-4-r16", "posSib1-5-r16", + "posSib1-6-r16", "posSib1-7-r16", "posSib1-8-r16", "posSib2-1-r16", "posSib2-2-r16", + "posSib2-3-r16", "posSib2-4-r16", "posSib2-5-r16", "posSib2-6-r16", "posSib2-7-r16", + "posSib2-8-r16", "posSib2-9-r16", "posSib2-10-r16", "posSib2-11-r16", "posSib2-12-r16", + "posSib2-13-r16", "posSib2-14-r16", "posSib2-15-r16", "posSib2-16-r16", "posSib2-17-r16", + "posSib2-18-r16", "posSib2-19-r16", "posSib2-20-r16", "posSib2-21-r16", "posSib2-22-r16", + "posSib2-23-r16", "posSib3-1-r16", "posSib4-1-r16", "posSib5-1-r16", "posSib6-1-r16", + "posSib6-2-r16", "posSib6-3-r16", "posSib1-9-v1700", "posSib1-10-v1700", "posSib2-24-v1700", + "posSib2-25-v1700", "posSib6-4-v1700", "posSib6-5-v1700", "posSib6-6-v1700"}; + return convert_enum_idx(names, 44, value, "pos_sys_info_r16_ies_s::pos_sib_type_and_info_r16_item_c_::types"); +} + +// SI-SchedulingInfo ::= SEQUENCE +SRSASN_CODE si_sched_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(si_request_cfg_present, 1)); + HANDLE_CODE(bref.pack(si_request_cfg_sul_present, 1)); + HANDLE_CODE(bref.pack(sys_info_area_id_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, sched_info_list, 1, 32)); + HANDLE_CODE(si_win_len.pack(bref)); + if (si_request_cfg_present) { + HANDLE_CODE(si_request_cfg.pack(bref)); + } + if (si_request_cfg_sul_present) { + HANDLE_CODE(si_request_cfg_sul.pack(bref)); + } + if (sys_info_area_id_present) { + HANDLE_CODE(sys_info_area_id.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE si_sched_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(si_request_cfg_present, 1)); + HANDLE_CODE(bref.unpack(si_request_cfg_sul_present, 1)); + HANDLE_CODE(bref.unpack(sys_info_area_id_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(sched_info_list, bref, 1, 32)); + HANDLE_CODE(si_win_len.unpack(bref)); + if (si_request_cfg_present) { + HANDLE_CODE(si_request_cfg.unpack(bref)); + } + if (si_request_cfg_sul_present) { + HANDLE_CODE(si_request_cfg_sul.unpack(bref)); + } + if (sys_info_area_id_present) { + HANDLE_CODE(sys_info_area_id.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void si_sched_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("schedulingInfoList"); + for (const auto& e1 : sched_info_list) { + e1.to_json(j); + } + j.end_array(); + j.write_str("si-WindowLength", si_win_len.to_string()); + if (si_request_cfg_present) { + j.write_fieldname("si-RequestConfig"); + si_request_cfg.to_json(j); + } + if (si_request_cfg_sul_present) { + j.write_fieldname("si-RequestConfigSUL"); + si_request_cfg_sul.to_json(j); + } + if (sys_info_area_id_present) { + j.write_str("systemInformationAreaID", sys_info_area_id.to_string()); + } + j.end_obj(); +} + +const char* si_sched_info_s::si_win_len_opts::to_string() const +{ + static const char* names[] = { + "s5", "s10", "s20", "s40", "s80", "s160", "s320", "s640", "s1280", "s2560-v1710", "s5120-v1710"}; + return convert_enum_idx(names, 11, value, "si_sched_info_s::si_win_len_e_"); +} +uint16_t si_sched_info_s::si_win_len_opts::to_number() const +{ + static const uint16_t numbers[] = {5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120}; + return map_enum_number(numbers, 11, value, "si_sched_info_s::si_win_len_e_"); +} + +// SIB1-v1610-IEs ::= SEQUENCE +SRSASN_CODE sib1_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(idle_mode_meass_eutra_r16_present, 1)); + HANDLE_CODE(bref.pack(idle_mode_meass_nr_r16_present, 1)); + HANDLE_CODE(bref.pack(pos_si_sched_info_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (pos_si_sched_info_r16_present) { + HANDLE_CODE(pos_si_sched_info_r16.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sib1_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(idle_mode_meass_eutra_r16_present, 1)); + HANDLE_CODE(bref.unpack(idle_mode_meass_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(pos_si_sched_info_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (pos_si_sched_info_r16_present) { + HANDLE_CODE(pos_si_sched_info_r16.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sib1_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (idle_mode_meass_eutra_r16_present) { + j.write_str("idleModeMeasurementsEUTRA-r16", "true"); + } + if (idle_mode_meass_nr_r16_present) { + j.write_str("idleModeMeasurementsNR-r16", "true"); + } + if (pos_si_sched_info_r16_present) { + j.write_fieldname("posSI-SchedulingInfo-r16"); + pos_si_sched_info_r16.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SystemInformation-IEs ::= SEQUENCE +SRSASN_CODE sys_info_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, sib_type_and_info, 1, 32)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sys_info_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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(sib_type_and_info, bref, 1, 32)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sys_info_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("sib-TypeAndInfo"); + for (const auto& e1 : sib_type_and_info) { + e1.to_json(j); + } + j.end_array(); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +void sys_info_ies_s::sib_type_and_info_item_c_::destroy_() +{ + switch (type_) { + case types::sib2: + c.destroy(); + break; + case types::sib3: + c.destroy(); + break; + case types::sib4: + c.destroy(); + break; + case types::sib5: + c.destroy(); + break; + case types::sib6: + c.destroy(); + break; + case types::sib7: + c.destroy(); + break; + case types::sib8: + c.destroy(); + break; + case types::sib9: + c.destroy(); + break; + case types::sib10_v1610: + c.destroy(); + break; + case types::sib11_v1610: + c.destroy(); + break; + case types::sib12_v1610: + c.destroy(); + break; + case types::sib13_v1610: + c.destroy(); + break; + case types::sib14_v1610: + c.destroy(); + break; + case types::sib15_v1700: + c.destroy(); + break; + case types::sib16_v1700: + c.destroy(); + break; + case types::sib17_v1700: + c.destroy(); + break; + case types::sib18_v1700: + c.destroy(); + break; + case types::sib19_v1700: + c.destroy(); + break; + case types::sib20_v1700: + c.destroy(); + break; + case types::sib21_v1700: + c.destroy(); + break; + default: + break; + } +} +void sys_info_ies_s::sib_type_and_info_item_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sib2: + c.init(); + break; + case types::sib3: + c.init(); + break; + case types::sib4: + c.init(); + break; + case types::sib5: + c.init(); + break; + case types::sib6: + c.init(); + break; + case types::sib7: + c.init(); + break; + case types::sib8: + c.init(); + break; + case types::sib9: + c.init(); + break; + case types::sib10_v1610: + c.init(); + break; + case types::sib11_v1610: + c.init(); + break; + case types::sib12_v1610: + c.init(); + break; + case types::sib13_v1610: + c.init(); + break; + case types::sib14_v1610: + c.init(); + break; + case types::sib15_v1700: + c.init(); + break; + case types::sib16_v1700: + c.init(); + break; + case types::sib17_v1700: + c.init(); + break; + case types::sib18_v1700: + c.init(); + break; + case types::sib19_v1700: + c.init(); + break; + case types::sib20_v1700: + c.init(); + break; + case types::sib21_v1700: + c.init(); + break; + case types::nulltype: + break; + default: + 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_::sib_type_and_info_item_c_( + const sys_info_ies_s::sib_type_and_info_item_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::sib2: + c.init(other.c.get()); + break; + case types::sib3: + c.init(other.c.get()); + break; + case types::sib4: + c.init(other.c.get()); + break; + case types::sib5: + c.init(other.c.get()); + break; + case types::sib6: + c.init(other.c.get()); + break; + case types::sib7: + c.init(other.c.get()); + break; + case types::sib8: + c.init(other.c.get()); + break; + case types::sib9: + c.init(other.c.get()); + break; + case types::sib10_v1610: + c.init(other.c.get()); + break; + case types::sib11_v1610: + c.init(other.c.get()); + break; + case types::sib12_v1610: + c.init(other.c.get()); + break; + case types::sib13_v1610: + c.init(other.c.get()); + break; + case types::sib14_v1610: + c.init(other.c.get()); + break; + case types::sib15_v1700: + c.init(other.c.get()); + break; + case types::sib16_v1700: + c.init(other.c.get()); + break; + case types::sib17_v1700: + c.init(other.c.get()); + break; + case types::sib18_v1700: + c.init(other.c.get()); + break; + case types::sib19_v1700: + c.init(other.c.get()); + break; + case types::sib20_v1700: + c.init(other.c.get()); + break; + case types::sib21_v1700: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + 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) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sib2: + c.set(other.c.get()); + break; + case types::sib3: + c.set(other.c.get()); + break; + case types::sib4: + c.set(other.c.get()); + break; + case types::sib5: + c.set(other.c.get()); + break; + case types::sib6: + c.set(other.c.get()); + break; + case types::sib7: + c.set(other.c.get()); + break; + case types::sib8: + c.set(other.c.get()); + break; + case types::sib9: + c.set(other.c.get()); + break; + case types::sib10_v1610: + c.set(other.c.get()); + break; + case types::sib11_v1610: + c.set(other.c.get()); + break; + case types::sib12_v1610: + c.set(other.c.get()); + break; + case types::sib13_v1610: + c.set(other.c.get()); + break; + case types::sib14_v1610: + c.set(other.c.get()); + break; + case types::sib15_v1700: + c.set(other.c.get()); + break; + case types::sib16_v1700: + c.set(other.c.get()); + break; + case types::sib17_v1700: + c.set(other.c.get()); + break; + case types::sib18_v1700: + c.set(other.c.get()); + break; + case types::sib19_v1700: + c.set(other.c.get()); + break; + case types::sib20_v1700: + c.set(other.c.get()); + break; + case types::sib21_v1700: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sys_info_ies_s::sib_type_and_info_item_c_"); + } + + return *this; +} +sib2_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib2() +{ + set(types::sib2); + return c.get(); +} +sib3_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib3() +{ + set(types::sib3); + return c.get(); +} +sib4_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib4() +{ + set(types::sib4); + return c.get(); +} +sib5_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib5() +{ + set(types::sib5); + return c.get(); +} +sib6_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib6() +{ + set(types::sib6); + return c.get(); +} +sib7_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib7() +{ + set(types::sib7); + return c.get(); +} +sib8_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib8() +{ + set(types::sib8); + return c.get(); +} +sib9_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib9() +{ + set(types::sib9); + return c.get(); +} +sib10_r16_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib10_v1610() +{ + set(types::sib10_v1610); + return c.get(); +} +sib11_r16_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib11_v1610() +{ + set(types::sib11_v1610); + return c.get(); +} +sib12_r16_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib12_v1610() +{ + set(types::sib12_v1610); + return c.get(); +} +sib13_r16_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib13_v1610() +{ + set(types::sib13_v1610); + return c.get(); +} +sib14_r16_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib14_v1610() +{ + set(types::sib14_v1610); + return c.get(); +} +sib15_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib15_v1700() +{ + set(types::sib15_v1700); + return c.get(); +} +sib16_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib16_v1700() +{ + set(types::sib16_v1700); + return c.get(); +} +sib17_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib17_v1700() +{ + set(types::sib17_v1700); + return c.get(); +} +sib18_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib18_v1700() +{ + set(types::sib18_v1700); + return c.get(); +} +sib19_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib19_v1700() +{ + set(types::sib19_v1700); + return c.get(); +} +sib20_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib20_v1700() +{ + set(types::sib20_v1700); + return c.get(); +} +sib21_r17_s& sys_info_ies_s::sib_type_and_info_item_c_::set_sib21_v1700() +{ + set(types::sib21_v1700); + return c.get(); +} +void sys_info_ies_s::sib_type_and_info_item_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sib2: + j.write_fieldname("sib2"); + c.get().to_json(j); + break; + case types::sib3: + j.write_fieldname("sib3"); + c.get().to_json(j); + break; + case types::sib4: + j.write_fieldname("sib4"); + c.get().to_json(j); + break; + case types::sib5: + j.write_fieldname("sib5"); + c.get().to_json(j); + break; + case types::sib6: + j.write_fieldname("sib6"); + c.get().to_json(j); + break; + case types::sib7: + j.write_fieldname("sib7"); + c.get().to_json(j); + break; + case types::sib8: + j.write_fieldname("sib8"); + c.get().to_json(j); + break; + case types::sib9: + j.write_fieldname("sib9"); + c.get().to_json(j); + break; + case types::sib10_v1610: + j.write_fieldname("sib10-v1610"); + c.get().to_json(j); + break; + case types::sib11_v1610: + j.write_fieldname("sib11-v1610"); + c.get().to_json(j); + break; + case types::sib12_v1610: + j.write_fieldname("sib12-v1610"); + c.get().to_json(j); + break; + case types::sib13_v1610: + j.write_fieldname("sib13-v1610"); + c.get().to_json(j); + break; + case types::sib14_v1610: + j.write_fieldname("sib14-v1610"); + c.get().to_json(j); + break; + case types::sib15_v1700: + j.write_fieldname("sib15-v1700"); + c.get().to_json(j); + break; + case types::sib16_v1700: + j.write_fieldname("sib16-v1700"); + c.get().to_json(j); + break; + case types::sib17_v1700: + j.write_fieldname("sib17-v1700"); + c.get().to_json(j); + break; + case types::sib18_v1700: + j.write_fieldname("sib18-v1700"); + c.get().to_json(j); + break; + case types::sib19_v1700: + j.write_fieldname("sib19-v1700"); + c.get().to_json(j); + break; + case types::sib20_v1700: + j.write_fieldname("sib20-v1700"); + c.get().to_json(j); + break; + case types::sib21_v1700: + j.write_fieldname("sib21-v1700"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "sys_info_ies_s::sib_type_and_info_item_c_"); + } + j.end_obj(); +} +SRSASN_CODE sys_info_ies_s::sib_type_and_info_item_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::sib2: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib3: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib4: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib5: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib6: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib7: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib8: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib9: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sib10_v1610: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib11_v1610: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib12_v1610: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib13_v1610: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib14_v1610: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib15_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib16_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib17_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib18_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib19_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib20_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + case types::sib21_v1700: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + default: + log_invalid_choice_id(type_, "sys_info_ies_s::sib_type_and_info_item_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sys_info_ies_s::sib_type_and_info_item_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::sib2: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib3: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib4: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib5: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib6: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib7: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib8: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib9: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sib10_v1610: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib11_v1610: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib12_v1610: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib13_v1610: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib14_v1610: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib15_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib16_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib17_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib18_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib19_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib20_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + case types::sib21_v1700: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + default: + log_invalid_choice_id(type_, "sys_info_ies_s::sib_type_and_info_item_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* sys_info_ies_s::sib_type_and_info_item_c_::types_opts::to_string() const +{ + static const char* names[] = {"sib2", "sib3", "sib4", "sib5", "sib6", + "sib7", "sib8", "sib9", "sib10-v1610", "sib11-v1610", + "sib12-v1610", "sib13-v1610", "sib14-v1610", "sib15-v1700", "sib16-v1700", + "sib17-v1700", "sib18-v1700", "sib19-v1700", "sib20-v1700", "sib21-v1700"}; + return convert_enum_idx(names, 20, value, "sys_info_ies_s::sib_type_and_info_item_c_::types"); +} +uint8_t sys_info_ies_s::sib_type_and_info_item_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21}; + return map_enum_number(numbers, 20, value, "sys_info_ies_s::sib_type_and_info_item_c_::types"); +} + +// UAC-AccessCategory1-SelectionAssistanceInfo ::= ENUMERATED +const char* uac_access_category1_sel_assist_info_opts::to_string() const +{ + static const char* names[] = {"a", "b", "c"}; + return convert_enum_idx(names, 3, value, "uac_access_category1_sel_assist_info_e"); +} + +// UE-TimersAndConstants ::= SEQUENCE +SRSASN_CODE ue_timers_and_consts_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(t300.pack(bref)); + HANDLE_CODE(t301.pack(bref)); + HANDLE_CODE(t310.pack(bref)); + HANDLE_CODE(n310.pack(bref)); + HANDLE_CODE(t311.pack(bref)); + HANDLE_CODE(n311.pack(bref)); + HANDLE_CODE(t319.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_timers_and_consts_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(t300.unpack(bref)); + HANDLE_CODE(t301.unpack(bref)); + HANDLE_CODE(t310.unpack(bref)); + HANDLE_CODE(n310.unpack(bref)); + HANDLE_CODE(t311.unpack(bref)); + HANDLE_CODE(n311.unpack(bref)); + HANDLE_CODE(t319.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_timers_and_consts_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("t300", t300.to_string()); + j.write_str("t301", t301.to_string()); + j.write_str("t310", t310.to_string()); + j.write_str("n310", n310.to_string()); + j.write_str("t311", t311.to_string()); + j.write_str("n311", n311.to_string()); + j.write_str("t319", t319.to_string()); + j.end_obj(); +} + +const char* ue_timers_and_consts_s::t300_opts::to_string() const +{ + static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + return convert_enum_idx(names, 8, value, "ue_timers_and_consts_s::t300_e_"); +} +uint16_t ue_timers_and_consts_s::t300_opts::to_number() const +{ + static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(numbers, 8, value, "ue_timers_and_consts_s::t300_e_"); +} + +const char* ue_timers_and_consts_s::t301_opts::to_string() const +{ + static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + return convert_enum_idx(names, 8, value, "ue_timers_and_consts_s::t301_e_"); +} +uint16_t ue_timers_and_consts_s::t301_opts::to_number() const +{ + static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(numbers, 8, value, "ue_timers_and_consts_s::t301_e_"); +} + +const char* ue_timers_and_consts_s::t310_opts::to_string() const +{ + static const char* names[] = {"ms0", "ms50", "ms100", "ms200", "ms500", "ms1000", "ms2000"}; + return convert_enum_idx(names, 7, value, "ue_timers_and_consts_s::t310_e_"); +} +uint16_t ue_timers_and_consts_s::t310_opts::to_number() const +{ + static const uint16_t numbers[] = {0, 50, 100, 200, 500, 1000, 2000}; + return map_enum_number(numbers, 7, value, "ue_timers_and_consts_s::t310_e_"); +} + +const char* ue_timers_and_consts_s::n310_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n3", "n4", "n6", "n8", "n10", "n20"}; + return convert_enum_idx(names, 8, value, "ue_timers_and_consts_s::n310_e_"); +} +uint8_t ue_timers_and_consts_s::n310_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3, 4, 6, 8, 10, 20}; + return map_enum_number(numbers, 8, value, "ue_timers_and_consts_s::n310_e_"); +} + +const char* ue_timers_and_consts_s::t311_opts::to_string() const +{ + static const char* names[] = {"ms1000", "ms3000", "ms5000", "ms10000", "ms15000", "ms20000", "ms30000"}; + return convert_enum_idx(names, 7, value, "ue_timers_and_consts_s::t311_e_"); +} +uint16_t ue_timers_and_consts_s::t311_opts::to_number() const +{ + static const uint16_t numbers[] = {1000, 3000, 5000, 10000, 15000, 20000, 30000}; + return map_enum_number(numbers, 7, value, "ue_timers_and_consts_s::t311_e_"); +} + +const char* ue_timers_and_consts_s::n311_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n3", "n4", "n5", "n6", "n8", "n10"}; + return convert_enum_idx(names, 8, value, "ue_timers_and_consts_s::n311_e_"); +} +uint8_t ue_timers_and_consts_s::n311_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 3, 4, 5, 6, 8, 10}; + return map_enum_number(numbers, 8, value, "ue_timers_and_consts_s::n311_e_"); +} + +const char* ue_timers_and_consts_s::t319_opts::to_string() const +{ + static const char* names[] = {"ms100", "ms200", "ms300", "ms400", "ms600", "ms1000", "ms1500", "ms2000"}; + return convert_enum_idx(names, 8, value, "ue_timers_and_consts_s::t319_e_"); +} +uint16_t ue_timers_and_consts_s::t319_opts::to_number() const +{ + static const uint16_t numbers[] = {100, 200, 300, 400, 600, 1000, 1500, 2000}; + return map_enum_number(numbers, 8, value, "ue_timers_and_consts_s::t319_e_"); +} + +// SIB1 ::= SEQUENCE +SRSASN_CODE sib1_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cell_sel_info_present, 1)); + HANDLE_CODE(bref.pack(conn_est_fail_ctrl_present, 1)); + HANDLE_CODE(bref.pack(si_sched_info_present, 1)); + HANDLE_CODE(bref.pack(serving_cell_cfg_common_present, 1)); + HANDLE_CODE(bref.pack(ims_emergency_support_present, 1)); + HANDLE_CODE(bref.pack(ecall_over_ims_support_present, 1)); + HANDLE_CODE(bref.pack(ue_timers_and_consts_present, 1)); + HANDLE_CODE(bref.pack(uac_barr_info_present, 1)); + HANDLE_CODE(bref.pack(use_full_resume_id_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (cell_sel_info_present) { + HANDLE_CODE(bref.pack(cell_sel_info.q_rx_lev_min_offset_present, 1)); + HANDLE_CODE(bref.pack(cell_sel_info.q_rx_lev_min_sul_present, 1)); + HANDLE_CODE(bref.pack(cell_sel_info.q_qual_min_present, 1)); + HANDLE_CODE(bref.pack(cell_sel_info.q_qual_min_offset_present, 1)); + HANDLE_CODE(pack_integer(bref, cell_sel_info.q_rx_lev_min, (int8_t)-70, (int8_t)-22)); + if (cell_sel_info.q_rx_lev_min_offset_present) { + HANDLE_CODE(pack_integer(bref, cell_sel_info.q_rx_lev_min_offset, (uint8_t)1u, (uint8_t)8u)); + } + if (cell_sel_info.q_rx_lev_min_sul_present) { + HANDLE_CODE(pack_integer(bref, cell_sel_info.q_rx_lev_min_sul, (int8_t)-70, (int8_t)-22)); + } + if (cell_sel_info.q_qual_min_present) { + HANDLE_CODE(pack_integer(bref, cell_sel_info.q_qual_min, (int8_t)-43, (int8_t)-12)); + } + if (cell_sel_info.q_qual_min_offset_present) { + HANDLE_CODE(pack_integer(bref, cell_sel_info.q_qual_min_offset, (uint8_t)1u, (uint8_t)8u)); + } + } + HANDLE_CODE(cell_access_related_info.pack(bref)); + if (conn_est_fail_ctrl_present) { + HANDLE_CODE(conn_est_fail_ctrl.pack(bref)); + } + if (si_sched_info_present) { + HANDLE_CODE(si_sched_info.pack(bref)); + } + if (serving_cell_cfg_common_present) { + HANDLE_CODE(serving_cell_cfg_common.pack(bref)); + } + if (ue_timers_and_consts_present) { + HANDLE_CODE(ue_timers_and_consts.pack(bref)); + } + if (uac_barr_info_present) { + HANDLE_CODE(bref.pack(uac_barr_info.uac_barr_for_common.size() > 0, 1)); + HANDLE_CODE(bref.pack(uac_barr_info.uac_barr_per_plmn_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(uac_barr_info.uac_access_category1_sel_assist_info_present, 1)); + if (uac_barr_info.uac_barr_for_common.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_info.uac_barr_for_common, 1, 63)); + } + if (uac_barr_info.uac_barr_per_plmn_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_info.uac_barr_per_plmn_list, 1, 12)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, uac_barr_info.uac_barr_info_set_list, 1, 8)); + if (uac_barr_info.uac_access_category1_sel_assist_info_present) { + HANDLE_CODE(uac_barr_info.uac_access_category1_sel_assist_info.pack(bref)); + } + } + if (late_non_crit_ext.size() > 0) { + 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 sib1_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cell_sel_info_present, 1)); + HANDLE_CODE(bref.unpack(conn_est_fail_ctrl_present, 1)); + HANDLE_CODE(bref.unpack(si_sched_info_present, 1)); + HANDLE_CODE(bref.unpack(serving_cell_cfg_common_present, 1)); + HANDLE_CODE(bref.unpack(ims_emergency_support_present, 1)); + HANDLE_CODE(bref.unpack(ecall_over_ims_support_present, 1)); + HANDLE_CODE(bref.unpack(ue_timers_and_consts_present, 1)); + HANDLE_CODE(bref.unpack(uac_barr_info_present, 1)); + HANDLE_CODE(bref.unpack(use_full_resume_id_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (cell_sel_info_present) { + HANDLE_CODE(bref.unpack(cell_sel_info.q_rx_lev_min_offset_present, 1)); + HANDLE_CODE(bref.unpack(cell_sel_info.q_rx_lev_min_sul_present, 1)); + HANDLE_CODE(bref.unpack(cell_sel_info.q_qual_min_present, 1)); + HANDLE_CODE(bref.unpack(cell_sel_info.q_qual_min_offset_present, 1)); + HANDLE_CODE(unpack_integer(cell_sel_info.q_rx_lev_min, bref, (int8_t)-70, (int8_t)-22)); + if (cell_sel_info.q_rx_lev_min_offset_present) { + HANDLE_CODE(unpack_integer(cell_sel_info.q_rx_lev_min_offset, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (cell_sel_info.q_rx_lev_min_sul_present) { + HANDLE_CODE(unpack_integer(cell_sel_info.q_rx_lev_min_sul, bref, (int8_t)-70, (int8_t)-22)); + } + if (cell_sel_info.q_qual_min_present) { + HANDLE_CODE(unpack_integer(cell_sel_info.q_qual_min, bref, (int8_t)-43, (int8_t)-12)); + } + if (cell_sel_info.q_qual_min_offset_present) { + HANDLE_CODE(unpack_integer(cell_sel_info.q_qual_min_offset, bref, (uint8_t)1u, (uint8_t)8u)); + } + } + HANDLE_CODE(cell_access_related_info.unpack(bref)); + if (conn_est_fail_ctrl_present) { + HANDLE_CODE(conn_est_fail_ctrl.unpack(bref)); + } + if (si_sched_info_present) { + HANDLE_CODE(si_sched_info.unpack(bref)); + } + if (serving_cell_cfg_common_present) { + HANDLE_CODE(serving_cell_cfg_common.unpack(bref)); + } + if (ue_timers_and_consts_present) { + HANDLE_CODE(ue_timers_and_consts.unpack(bref)); + } + if (uac_barr_info_present) { + bool uac_barr_for_common_present; + HANDLE_CODE(bref.unpack(uac_barr_for_common_present, 1)); + bool uac_barr_per_plmn_list_present; + HANDLE_CODE(bref.unpack(uac_barr_per_plmn_list_present, 1)); + HANDLE_CODE(bref.unpack(uac_barr_info.uac_access_category1_sel_assist_info_present, 1)); + if (uac_barr_for_common_present) { + HANDLE_CODE(unpack_dyn_seq_of(uac_barr_info.uac_barr_for_common, bref, 1, 63)); + } + if (uac_barr_per_plmn_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(uac_barr_info.uac_barr_per_plmn_list, bref, 1, 12)); + } + HANDLE_CODE(unpack_dyn_seq_of(uac_barr_info.uac_barr_info_set_list, bref, 1, 8)); + if (uac_barr_info.uac_access_category1_sel_assist_info_present) { + HANDLE_CODE(uac_barr_info.uac_access_category1_sel_assist_info.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 sib1_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (cell_sel_info_present) { + j.write_fieldname("cellSelectionInfo"); + j.start_obj(); + j.write_int("q-RxLevMin", cell_sel_info.q_rx_lev_min); + if (cell_sel_info.q_rx_lev_min_offset_present) { + j.write_int("q-RxLevMinOffset", cell_sel_info.q_rx_lev_min_offset); + } + if (cell_sel_info.q_rx_lev_min_sul_present) { + j.write_int("q-RxLevMinSUL", cell_sel_info.q_rx_lev_min_sul); + } + if (cell_sel_info.q_qual_min_present) { + j.write_int("q-QualMin", cell_sel_info.q_qual_min); + } + if (cell_sel_info.q_qual_min_offset_present) { + j.write_int("q-QualMinOffset", cell_sel_info.q_qual_min_offset); + } + j.end_obj(); + } + j.write_fieldname("cellAccessRelatedInfo"); + cell_access_related_info.to_json(j); + if (conn_est_fail_ctrl_present) { + j.write_fieldname("connEstFailureControl"); + conn_est_fail_ctrl.to_json(j); + } + if (si_sched_info_present) { + j.write_fieldname("si-SchedulingInfo"); + si_sched_info.to_json(j); + } + if (serving_cell_cfg_common_present) { + j.write_fieldname("servingCellConfigCommon"); + serving_cell_cfg_common.to_json(j); + } + if (ims_emergency_support_present) { + j.write_str("ims-EmergencySupport", "true"); + } + if (ecall_over_ims_support_present) { + j.write_str("eCallOverIMS-Support", "true"); + } + if (ue_timers_and_consts_present) { + j.write_fieldname("ue-TimersAndConstants"); + ue_timers_and_consts.to_json(j); + } + if (uac_barr_info_present) { + j.write_fieldname("uac-BarringInfo"); + j.start_obj(); + if (uac_barr_info.uac_barr_for_common.size() > 0) { + j.start_array("uac-BarringForCommon"); + for (const auto& e1 : uac_barr_info.uac_barr_for_common) { + e1.to_json(j); + } + j.end_array(); + } + if (uac_barr_info.uac_barr_per_plmn_list.size() > 0) { + j.start_array("uac-BarringPerPLMN-List"); + for (const auto& e1 : uac_barr_info.uac_barr_per_plmn_list) { + e1.to_json(j); + } + j.end_array(); + } + j.start_array("uac-BarringInfoSetList"); + for (const auto& e1 : uac_barr_info.uac_barr_info_set_list) { + e1.to_json(j); + } + j.end_array(); + if (uac_barr_info.uac_access_category1_sel_assist_info_present) { + j.write_fieldname("uac-AccessCategory1-SelectionAssistanceInfo"); + uac_barr_info.uac_access_category1_sel_assist_info.to_json(j); + } + j.end_obj(); + } + if (use_full_resume_id_present) { + j.write_str("useFullResumeID", "true"); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +void sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::destroy_() +{ + switch (type_) { + case types::individual_plmn_list: + c.destroy(); + break; + default: + break; + } +} +void sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::plmn_common: + break; + case types::individual_plmn_list: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "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_::uac_access_category1_sel_assist_info_c_( + const sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::plmn_common: + c.init(other.c.get()); + break; + case types::individual_plmn_list: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "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_& +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; + } + set(other.type()); + switch (type_) { + case types::plmn_common: + c.set(other.c.get()); + break; + case types::individual_plmn_list: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_"); + } + + return *this; +} +uac_access_category1_sel_assist_info_e& +sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::set_plmn_common() +{ + set(types::plmn_common); + return c.get(); +} +sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::individual_plmn_list_l_& +sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::set_individual_plmn_list() +{ + set(types::individual_plmn_list); + return c.get(); +} +void sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::plmn_common: + j.write_str("plmnCommon", c.get().to_string()); + break; + case types::individual_plmn_list: + j.start_array("individualPLMNList"); + for (const auto& e1 : c.get()) { + j.write_str(e1.to_string()); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_"); + } + j.end_obj(); +} +SRSASN_CODE sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::plmn_common: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::individual_plmn_list: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 2, 12)); + break; + default: + log_invalid_choice_id(type_, "sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::plmn_common: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::individual_plmn_list: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 2, 12)); + break; + default: + log_invalid_choice_id(type_, "sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::types_opts::to_string() const +{ + static const char* names[] = {"plmnCommon", "individualPLMNList"}; + return convert_enum_idx(names, 2, value, "sib1_s::uac_barr_info_s_::uac_access_category1_sel_assist_info_c_::types"); +} + +// SystemInformation ::= SEQUENCE +SRSASN_CODE sys_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sys_info_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sys_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void sys_info_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::sys_info: + c.destroy(); + break; + case types::crit_exts_future_r16: + c.destroy(); + break; + default: + break; + } +} +void sys_info_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sys_info: + c.init(); + break; + case types::crit_exts_future_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); + } +} +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: + c.init(other.c.get()); + break; + case types::crit_exts_future_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); + } +} +sys_info_s::crit_exts_c_& sys_info_s::crit_exts_c_::operator=(const sys_info_s::crit_exts_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sys_info: + c.set(other.c.get()); + break; + case types::crit_exts_future_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); + } + + return *this; +} +sys_info_ies_s& sys_info_s::crit_exts_c_::set_sys_info() +{ + set(types::sys_info); + return c.get(); +} +sys_info_s::crit_exts_c_::crit_exts_future_r16_c_& sys_info_s::crit_exts_c_::set_crit_exts_future_r16() +{ + set(types::crit_exts_future_r16); + return c.get(); +} +void sys_info_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sys_info: + j.write_fieldname("systemInformation"); + c.get().to_json(j); + break; + case types::crit_exts_future_r16: + j.write_fieldname("criticalExtensionsFuture-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE sys_info_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::sys_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sys_info_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::sys_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::set(types::options e) +{ + type_ = e; +} +pos_sys_info_r16_ies_s& sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::set_pos_sys_info_r16() +{ + set(types::pos_sys_info_r16); + return c; +} +void sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::pos_sys_info_r16: + j.write_fieldname("posSystemInformation-r16"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_::crit_exts_future_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::pos_sys_info_r16: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_::crit_exts_future_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::pos_sys_info_r16: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "sys_info_s::crit_exts_c_::crit_exts_future_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"posSystemInformation-r16", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "sys_info_s::crit_exts_c_::crit_exts_future_r16_c_::types"); +} + +const char* sys_info_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"systemInformation", "criticalExtensionsFuture-r16"}; + return convert_enum_idx(names, 2, value, "sys_info_s::crit_exts_c_::types"); +} diff --git a/lib/asn1/rrc_nr/ue_cap.cpp b/lib/asn1/rrc_nr/ue_cap.cpp index 9e93a884b4..98fff72d79 100644 --- a/lib/asn1/rrc_nr/ue_cap.cpp +++ b/lib/asn1/rrc_nr/ue_cap.cpp @@ -9,8 +9,6 @@ */ #include "srsran/asn1/rrc_nr/ue_cap.h" -#include - using namespace asn1; using namespace asn1::rrc_nr; @@ -267,6 +265,12 @@ SRSASN_CODE band_params_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* band_params_c::types_opts::to_string() const +{ + static const char* names[] = {"eutra", "nr"}; + return convert_enum_idx(names, 2, value, "band_params_c::types"); +} + // CA-ParametersEUTRA ::= SEQUENCE SRSASN_CODE ca_params_eutra_s::pack(bit_ref& bref) const { @@ -1571,6 +1575,12 @@ SRSASN_CODE band_params_v1540_s::srs_carrier_switch_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* band_params_v1540_s::srs_carrier_switch_c_::types_opts::to_string() const +{ + static const char* names[] = {"nr", "eutra"}; + return convert_enum_idx(names, 2, value, "band_params_v1540_s::srs_carrier_switch_c_::types"); +} + const char* band_params_v1540_s::srs_tx_switch_s_::supported_srs_tx_port_switch_opts::to_string() const { static const char* names[] = {"t1r2", "t1r4", "t2r4", "t1r4-t2r4", "t1r1", "t2r2", "t4r4", "notSupported"}; @@ -7328,6 +7338,27 @@ SRSASN_CODE band_params_sidelink_discovery_r17_s::sl_tx_mode2_partial_sensing_r1 return SRSASN_SUCCESS; } +const char* band_params_sidelink_discovery_r17_s::sl_tx_mode2_partial_sensing_r17_s_:: + scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"fr1-r17", "fr2-r17"}; + return convert_enum_idx(names, + 2, + value, + "band_params_sidelink_discovery_r17_s::sl_tx_mode2_partial_sensing_r17_s_::scs_cp_pattern_tx_" + "sidelink_mode_two_r17_c_::types"); +} +uint8_t band_params_sidelink_discovery_r17_s::sl_tx_mode2_partial_sensing_r17_s_:: + scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "band_params_sidelink_discovery_r17_s::sl_tx_mode2_partial_sensing_r17_s_::scs_cp_pattern_tx_" + "sidelink_mode_two_r17_c_::types"); +} + // BandParametersSidelink-r16 ::= SEQUENCE SRSASN_CODE band_params_sidelink_r16_s::pack(bit_ref& bref) const { @@ -7506,6 +7537,12 @@ SRSASN_CODE band_params_sidelink_eutra_nr_r16_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* band_params_sidelink_eutra_nr_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"eutra", "nr"}; + return convert_enum_idx(names, 2, value, "band_params_sidelink_eutra_nr_r16_c::types"); +} + // BandParametersSidelinkEUTRA-NR-v1630 ::= CHOICE void band_params_sidelink_eutra_nr_v1630_c::set(types::options e) { @@ -7582,6 +7619,12 @@ SRSASN_CODE band_params_sidelink_eutra_nr_v1630_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* band_params_sidelink_eutra_nr_v1630_c::types_opts::to_string() const +{ + static const char* names[] = {"eutra", "nr"}; + return convert_enum_idx(names, 2, value, "band_params_sidelink_eutra_nr_v1630_c::types"); +} + // BandParametersSidelinkEUTRA-NR-v1710 ::= CHOICE void band_params_sidelink_eutra_nr_v1710_c::set(types::options e) { @@ -7941,6 +7984,27 @@ SRSASN_CODE band_params_sidelink_eutra_nr_v1710_c::nr_s_::sl_tx_mode2_partial_se return SRSASN_SUCCESS; } +const char* band_params_sidelink_eutra_nr_v1710_c::nr_s_::sl_tx_mode2_partial_sensing_r17_s_:: + scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"fr1-r17", "fr2-r17"}; + return convert_enum_idx(names, + 2, + value, + "band_params_sidelink_eutra_nr_v1710_c::nr_s_::sl_tx_mode2_partial_sensing_r17_s_::scs_cp_" + "pattern_tx_sidelink_mode_two_r17_c_::types"); +} +uint8_t band_params_sidelink_eutra_nr_v1710_c::nr_s_::sl_tx_mode2_partial_sensing_r17_s_:: + scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, + 2, + value, + "band_params_sidelink_eutra_nr_v1710_c::nr_s_::sl_tx_mode2_partial_sensing_r17_s_::scs_cp_" + "pattern_tx_sidelink_mode_two_r17_c_::types"); +} + const char* band_params_sidelink_eutra_nr_v1710_c::nr_s_::rx_sidelink_psfch_r17_opts::to_string() const { static const char* names[] = {"n5", "n15", "n25", "n32", "n35", "n45", "n50", "n64"}; @@ -7965,6 +8029,12 @@ uint8_t band_params_sidelink_eutra_nr_v1710_c::nr_s_::tx_iuc_scheme2_mode2_sidel numbers, 3, value, "band_params_sidelink_eutra_nr_v1710_c::nr_s_::tx_iuc_scheme2_mode2_sidelink_r17_e_"); } +const char* band_params_sidelink_eutra_nr_v1710_c::types_opts::to_string() const +{ + static const char* names[] = {"eutra", "nr"}; + return convert_enum_idx(names, 2, value, "band_params_sidelink_eutra_nr_v1710_c::types"); +} + // SupportedCSI-RS-Resource ::= SEQUENCE SRSASN_CODE supported_csi_rs_res_s::pack(bit_ref& bref) const { @@ -13759,6 +13829,24 @@ uint8_t prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_dur_of_prs_proc "dur_of_prs_processing2_r17_s_::ppw_dur_of_prs_processing_symbols_t2_r17_e_"); } +const char* +prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_dur_of_prs_processing_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"ppw-durationOfPRS-Processing1-r17", "ppw-durationOfPRS-Processing2-r17"}; + return convert_enum_idx( + names, 2, value, "prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_dur_of_prs_processing_r17_c_::types"); +} +uint8_t +prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_dur_of_prs_processing_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number( + numbers, + 2, + value, + "prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_dur_of_prs_processing_r17_c_::types"); +} + const char* prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_max_num_of_dl_prs_res_processed_per_slot_r17_s_:: scs15_r17_opts::to_string() const { @@ -13987,6 +14075,20 @@ prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_max_num_of_dl_bw_r17_c_ "prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_max_num_of_dl_bw_r17_c_::fr2_r17_e_"); } +const char* +prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_max_num_of_dl_bw_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"fr1-r17", "fr2-r17"}; + return convert_enum_idx( + names, 2, value, "prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_max_num_of_dl_bw_r17_c_::types"); +} +uint8_t prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_max_num_of_dl_bw_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number( + numbers, 2, value, "prs_processing_cap_outside_m_gin_ppw_per_type_r17_s::ppw_max_num_of_dl_bw_r17_c_::types"); +} + // PosSRS-RRC-Inactive-OutsideInitialUL-BWP-r17 ::= SEQUENCE SRSASN_CODE pos_srs_rrc_inactive_outside_init_ul_bwp_r17_s::pack(bit_ref& bref) const { @@ -16695,6 +16797,17 @@ SRSASN_CODE band_nr_s::ch_bws_dl_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* band_nr_s::ch_bws_dl_c_::types_opts::to_string() const +{ + static const char* names[] = {"fr1", "fr2"}; + return convert_enum_idx(names, 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 numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "band_nr_s::ch_bws_dl_c_::types"); +} + void band_nr_s::ch_bws_ul_c_::destroy_() { switch (type_) { @@ -16877,6 +16990,17 @@ SRSASN_CODE band_nr_s::ch_bws_ul_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* band_nr_s::ch_bws_ul_c_::types_opts::to_string() const +{ + static const char* names[] = {"fr1", "fr2"}; + return convert_enum_idx(names, 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 numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "band_nr_s::ch_bws_ul_c_::types"); +} + const char* band_nr_s::max_ul_duty_cycle_pc2_fr1_opts::to_string() const { static const char* names[] = {"n60", "n70", "n80", "n90", "n100"}; @@ -17081,6 +17205,17 @@ SRSASN_CODE band_nr_s::ch_bws_dl_v1590_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* band_nr_s::ch_bws_dl_v1590_c_::types_opts::to_string() const +{ + static const char* names[] = {"fr1", "fr2"}; + return convert_enum_idx(names, 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 numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "band_nr_s::ch_bws_dl_v1590_c_::types"); +} + void band_nr_s::ch_bws_ul_v1590_c_::destroy_() { switch (type_) { @@ -17263,6 +17398,17 @@ SRSASN_CODE band_nr_s::ch_bws_ul_v1590_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* band_nr_s::ch_bws_ul_v1590_c_::types_opts::to_string() const +{ + static const char* names[] = {"fr1", "fr2"}; + return convert_enum_idx(names, 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 numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "band_nr_s::ch_bws_ul_v1590_c_::types"); +} + void band_nr_s::ch_bw_dl_iab_r16_c_::destroy_() { switch (type_) { @@ -17415,6 +17561,17 @@ SRSASN_CODE band_nr_s::ch_bw_dl_iab_r16_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* band_nr_s::ch_bw_dl_iab_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"fr1-100mhz", "fr2-200mhz"}; + return convert_enum_idx(names, 2, value, "band_nr_s::ch_bw_dl_iab_r16_c_::types"); +} +uint8_t band_nr_s::ch_bw_dl_iab_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "band_nr_s::ch_bw_dl_iab_r16_c_::types"); +} + void band_nr_s::ch_bw_ul_iab_r16_c_::destroy_() { switch (type_) { @@ -17567,6 +17724,17 @@ SRSASN_CODE band_nr_s::ch_bw_ul_iab_r16_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* band_nr_s::ch_bw_ul_iab_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"fr1-100mhz", "fr2-200mhz"}; + return convert_enum_idx(names, 2, value, "band_nr_s::ch_bw_ul_iab_r16_c_::types"); +} +uint8_t band_nr_s::ch_bw_ul_iab_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "band_nr_s::ch_bw_ul_iab_r16_c_::types"); +} + const char* band_nr_s::active_cfg_grant_r16_s_::max_num_cfgs_per_bwp_r16_opts::to_string() const { static const char* names[] = {"n1", "n2", "n4", "n8", "n12"}; @@ -17944,6 +18112,17 @@ uint16_t band_nr_s::max_mod_order_for_multicast_r17_c_::fr2_r17_opts::to_number( return map_enum_number(numbers, 2, value, "band_nr_s::max_mod_order_for_multicast_r17_c_::fr2_r17_e_"); } +const char* band_nr_s::max_mod_order_for_multicast_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"fr1-r17", "fr2-r17"}; + return convert_enum_idx(names, 2, value, "band_nr_s::max_mod_order_for_multicast_r17_c_::types"); +} +uint8_t band_nr_s::max_mod_order_for_multicast_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "band_nr_s::max_mod_order_for_multicast_r17_c_::types"); +} + const char* band_nr_s::dyn_slot_repeat_multicast_tn_non_shared_spec_ch_access_r17_opts::to_string() const { static const char* names[] = {"n8", "n16"}; @@ -18606,6 +18785,19 @@ SRSASN_CODE band_sidelink_r16_s::sl_reception_r16_s_::scs_cp_pattern_rx_sidelink return SRSASN_SUCCESS; } +const char* band_sidelink_r16_s::sl_reception_r16_s_::scs_cp_pattern_rx_sidelink_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"fr1-r16", "fr2-r16"}; + return convert_enum_idx( + names, 2, value, "band_sidelink_r16_s::sl_reception_r16_s_::scs_cp_pattern_rx_sidelink_r16_c_::types"); +} +uint8_t band_sidelink_r16_s::sl_reception_r16_s_::scs_cp_pattern_rx_sidelink_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number( + numbers, 2, value, "band_sidelink_r16_s::sl_reception_r16_s_::scs_cp_pattern_rx_sidelink_r16_c_::types"); +} + const char* band_sidelink_r16_s::sl_tx_mode1_r16_s_::harq_tx_process_mode_one_sidelink_r16_opts::to_string() const { static const char* names[] = {"n8", "n16"}; @@ -18814,6 +19006,21 @@ SRSASN_CODE band_sidelink_r16_s::sl_tx_mode1_r16_s_::scs_cp_pattern_tx_sidelink_ return SRSASN_SUCCESS; } +const char* +band_sidelink_r16_s::sl_tx_mode1_r16_s_::scs_cp_pattern_tx_sidelink_mode_one_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"fr1-r16", "fr2-r16"}; + return convert_enum_idx( + names, 2, value, "band_sidelink_r16_s::sl_tx_mode1_r16_s_::scs_cp_pattern_tx_sidelink_mode_one_r16_c_::types"); +} +uint8_t +band_sidelink_r16_s::sl_tx_mode1_r16_s_::scs_cp_pattern_tx_sidelink_mode_one_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number( + numbers, 2, value, "band_sidelink_r16_s::sl_tx_mode1_r16_s_::scs_cp_pattern_tx_sidelink_mode_one_r16_c_::types"); +} + const char* band_sidelink_r16_s::psfch_format_zero_sidelink_r16_s_::psfch_rx_num_opts::to_string() const { static const char* names[] = {"n5", "n15", "n25", "n32", "n35", "n45", "n50", "n64"}; @@ -19092,6 +19299,27 @@ SRSASN_CODE band_sidelink_r16_s::sl_tx_mode2_random_res_sel_r17_s_::scs_cp_patte return SRSASN_SUCCESS; } +const char* band_sidelink_r16_s::sl_tx_mode2_random_res_sel_r17_s_::scs_cp_pattern_tx_sidelink_mode_two_r17_c_:: + types_opts::to_string() const +{ + static const char* names[] = {"fr1-r17", "fr2-r17"}; + return convert_enum_idx( + names, + 2, + value, + "band_sidelink_r16_s::sl_tx_mode2_random_res_sel_r17_s_::scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types"); +} +uint8_t band_sidelink_r16_s::sl_tx_mode2_random_res_sel_r17_s_::scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types_opts:: + to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number( + numbers, + 2, + value, + "band_sidelink_r16_s::sl_tx_mode2_random_res_sel_r17_s_::scs_cp_pattern_tx_sidelink_mode_two_r17_c_::types"); +} + const char* band_sidelink_r16_s::rx_iuc_scheme2_mode2_sidelink_r17_opts::to_string() const { static const char* names[] = {"n5", "n15", "n25", "n32", "n35", "n45", "n50", "n64"}; @@ -19498,6 +19726,12 @@ SRSASN_CODE feature_set_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* feature_set_c::types_opts::to_string() const +{ + static const char* names[] = {"eutra", "nr"}; + return convert_enum_idx(names, 2, value, "feature_set_c::types"); +} + // DummyA ::= SEQUENCE SRSASN_CODE dummy_a_s::pack(bit_ref& bref) const { @@ -21634,6 +21868,17 @@ uint16_t supported_bw_c::fr2_opts::to_number() const return map_enum_number(numbers, 4, value, "supported_bw_c::fr2_e_"); } +const char* supported_bw_c::types_opts::to_string() const +{ + static const char* names[] = {"fr1", "fr2"}; + return convert_enum_idx(names, 2, value, "supported_bw_c::types"); +} +uint8_t supported_bw_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "supported_bw_c::types"); +} + // FeatureSetDownlinkPerCC ::= SEQUENCE SRSASN_CODE feature_set_dl_per_cc_s::pack(bit_ref& bref) const { @@ -21953,6 +22198,17 @@ uint16_t supported_bw_v1700_c::fr2_r17_opts::to_number() const return map_enum_number(numbers, 7, value, "supported_bw_v1700_c::fr2_r17_e_"); } +const char* supported_bw_v1700_c::types_opts::to_string() const +{ + static const char* names[] = {"fr1-r17", "fr2-r17"}; + return convert_enum_idx(names, 2, value, "supported_bw_v1700_c::types"); +} +uint8_t supported_bw_v1700_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "supported_bw_v1700_c::types"); +} + // FeatureSetDownlinkPerCC-v1700 ::= SEQUENCE SRSASN_CODE feature_set_dl_per_cc_v1700_s::pack(bit_ref& bref) const { @@ -25134,6 +25390,12 @@ SRSASN_CODE freq_band_info_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* freq_band_info_c::types_opts::to_string() const +{ + static const char* names[] = {"bandInformationEUTRA", "bandInformationNR"}; + return convert_enum_idx(names, 2, value, "freq_band_info_c::types"); +} + // IMS-ParametersCommon ::= SEQUENCE SRSASN_CODE ims_params_common_s::pack(bit_ref& bref) const { @@ -27004,6 +27266,12 @@ SRSASN_CODE meas_and_mob_params_common_s::concurrent_meas_gap_r17_c_::unpack(cbi return SRSASN_SUCCESS; } +const char* meas_and_mob_params_common_s::concurrent_meas_gap_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"concurrentPerUE-OnlyMeasGap-r17", "concurrentPerUE-PerFRCombMeasGap-r17"}; + return convert_enum_idx(names, 2, value, "meas_and_mob_params_common_s::concurrent_meas_gap_r17_c_::types"); +} + // MeasAndMobParametersFRX-Diff ::= SEQUENCE SRSASN_CODE meas_and_mob_params_frx_diff_s::pack(bit_ref& bref) const { @@ -27571,6 +27839,59 @@ void meas_and_mob_params_mrdc_s::to_json(json_writer& j) const j.end_obj(); } +// MeasAndMobParametersMRDC-XDD-Diff-v1560 ::= SEQUENCE +SRSASN_CODE meas_and_mob_params_mrdc_xdd_diff_v1560_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sftd_meas_pscell_nedc_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_and_mob_params_mrdc_xdd_diff_v1560_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sftd_meas_pscell_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_pscell_nedc_present) { + j.write_str("sftd-MeasPSCell-NEDC", "supported"); + } + 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)); + } + + 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)); + } + + 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(); +} + // MeasAndMobParametersMRDC-Common-v1610 ::= SEQUENCE SRSASN_CODE meas_and_mob_params_mrdc_common_v1610_s::pack(bit_ref& bref) const { @@ -27773,6 +28094,90 @@ void meas_and_mob_params_mrdc_v1700_s::to_json(json_writer& j) const j.end_obj(); } +// MeasAndMobParametersMRDC-Common-v1730 ::= SEQUENCE +SRSASN_CODE meas_and_mob_params_mrdc_common_v1730_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(independent_gap_cfg_max_cc_r17.fr1_only_r17_present, 1)); + HANDLE_CODE(bref.pack(independent_gap_cfg_max_cc_r17.fr2_only_r17_present, 1)); + HANDLE_CODE(bref.pack(independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17_present, 1)); + if (independent_gap_cfg_max_cc_r17.fr1_only_r17_present) { + HANDLE_CODE(pack_integer(bref, independent_gap_cfg_max_cc_r17.fr1_only_r17, (uint8_t)1u, (uint8_t)32u)); + } + if (independent_gap_cfg_max_cc_r17.fr2_only_r17_present) { + HANDLE_CODE(pack_integer(bref, independent_gap_cfg_max_cc_r17.fr2_only_r17, (uint8_t)1u, (uint8_t)32u)); + } + if (independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17_present) { + HANDLE_CODE(pack_integer(bref, independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17, (uint8_t)1u, (uint8_t)32u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_and_mob_params_mrdc_common_v1730_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(independent_gap_cfg_max_cc_r17.fr1_only_r17_present, 1)); + HANDLE_CODE(bref.unpack(independent_gap_cfg_max_cc_r17.fr2_only_r17_present, 1)); + HANDLE_CODE(bref.unpack(independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17_present, 1)); + if (independent_gap_cfg_max_cc_r17.fr1_only_r17_present) { + HANDLE_CODE(unpack_integer(independent_gap_cfg_max_cc_r17.fr1_only_r17, bref, (uint8_t)1u, (uint8_t)32u)); + } + if (independent_gap_cfg_max_cc_r17.fr2_only_r17_present) { + HANDLE_CODE(unpack_integer(independent_gap_cfg_max_cc_r17.fr2_only_r17, bref, (uint8_t)1u, (uint8_t)32u)); + } + if (independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17_present) { + HANDLE_CODE(unpack_integer(independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17, bref, (uint8_t)1u, (uint8_t)32u)); + } + + return SRSASN_SUCCESS; +} +void meas_and_mob_params_mrdc_common_v1730_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("independentGapConfig-maxCC-r17"); + j.start_obj(); + if (independent_gap_cfg_max_cc_r17.fr1_only_r17_present) { + j.write_int("fr1-Only-r17", independent_gap_cfg_max_cc_r17.fr1_only_r17); + } + if (independent_gap_cfg_max_cc_r17.fr2_only_r17_present) { + j.write_int("fr2-Only-r17", independent_gap_cfg_max_cc_r17.fr2_only_r17); + } + if (independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17_present) { + j.write_int("fr1-AndFR2-r17", independent_gap_cfg_max_cc_r17.fr1_and_fr2_r17); + } + j.end_obj(); + j.end_obj(); +} + +// MeasAndMobParametersMRDC-v1730 ::= SEQUENCE +SRSASN_CODE meas_and_mob_params_mrdc_v1730_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_common_v1730_present, 1)); + + if (meas_and_mob_params_mrdc_common_v1730_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_common_v1730.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_and_mob_params_mrdc_v1730_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_common_v1730_present, 1)); + + if (meas_and_mob_params_mrdc_common_v1730_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_common_v1730.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_and_mob_params_mrdc_v1730_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_and_mob_params_mrdc_common_v1730_present) { + j.write_fieldname("measAndMobParametersMRDC-Common-v1730"); + meas_and_mob_params_mrdc_common_v1730.to_json(j); + } + j.end_obj(); +} + // GeneralParametersMRDC-XDD-Diff ::= SEQUENCE SRSASN_CODE general_params_mrdc_xdd_diff_s::pack(bit_ref& bref) const { @@ -29198,6 +29603,17 @@ uint16_t phy_params_common_s::bwp_switching_multi_ccs_r16_c_::type2_r16_opts::to return map_enum_number(numbers, 4, value, "phy_params_common_s::bwp_switching_multi_ccs_r16_c_::type2_r16_e_"); } +const char* phy_params_common_s::bwp_switching_multi_ccs_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"type1-r16", "type2-r16"}; + return convert_enum_idx(names, 2, value, "phy_params_common_s::bwp_switching_multi_ccs_r16_c_::types"); +} +uint8_t phy_params_common_s::bwp_switching_multi_ccs_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "phy_params_common_s::bwp_switching_multi_ccs_r16_c_::types"); +} + void phy_params_common_s::bwp_switching_multi_dormancy_ccs_r16_c_::destroy_() {} void phy_params_common_s::bwp_switching_multi_dormancy_ccs_r16_c_::set(types::options e) { @@ -29332,6 +29748,17 @@ uint16_t phy_params_common_s::bwp_switching_multi_dormancy_ccs_r16_c_::type2_r16 numbers, 4, value, "phy_params_common_s::bwp_switching_multi_dormancy_ccs_r16_c_::type2_r16_e_"); } +const char* phy_params_common_s::bwp_switching_multi_dormancy_ccs_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"type1-r16", "type2-r16"}; + return convert_enum_idx(names, 2, value, "phy_params_common_s::bwp_switching_multi_dormancy_ccs_r16_c_::types"); +} +uint8_t phy_params_common_s::bwp_switching_multi_dormancy_ccs_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "phy_params_common_s::bwp_switching_multi_dormancy_ccs_r16_c_::types"); +} + const char* phy_params_common_s::pdcch_monitoring_any_occasions_with_span_gap_cross_carrier_sch_r16_opts::to_string() const { @@ -31142,6 +31569,147 @@ uint8_t pdcp_params_s::udc_r17_s_::support_of_buffer_size_r17_opts::to_number() return map_enum_number(numbers, 2, value, "pdcp_params_s::udc_r17_s_::support_of_buffer_size_r17_e_"); } +// NAICS-Capability-Entry ::= SEQUENCE +SRSASN_CODE naics_cap_entry_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, nof_naics_capable_cc, (uint8_t)1u, (uint8_t)5u)); + HANDLE_CODE(nof_aggr_prb.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE naics_cap_entry_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(nof_naics_capable_cc, bref, (uint8_t)1u, (uint8_t)5u)); + HANDLE_CODE(nof_aggr_prb.unpack(bref)); + + return SRSASN_SUCCESS; +} +void naics_cap_entry_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("numberOfNAICS-CapableCC", nof_naics_capable_cc); + j.write_str("numberOfAggregatedPRB", nof_aggr_prb.to_string()); + j.end_obj(); +} + +const char* naics_cap_entry_s::nof_aggr_prb_opts::to_string() const +{ + static const char* names[] = {"n50", + "n75", + "n100", + "n125", + "n150", + "n175", + "n200", + "n225", + "n250", + "n275", + "n300", + "n350", + "n400", + "n450", + "n500", + "spare"}; + return convert_enum_idx(names, 16, value, "naics_cap_entry_s::nof_aggr_prb_e_"); +} +uint16_t naics_cap_entry_s::nof_aggr_prb_opts::to_number() const +{ + static const uint16_t numbers[] = {50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 350, 400, 450, 500}; + return map_enum_number(numbers, 15, value, "naics_cap_entry_s::nof_aggr_prb_e_"); +} + +// Phy-ParametersMRDC ::= SEQUENCE +SRSASN_CODE phy_params_mrdc_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(naics_cap_list.size() > 0, 1)); + + if (naics_cap_list.size() > 0) { + 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[1] |= tdd_pcell_ul_tx_all_ul_sf_r16_present; + group_flags[1] |= fdd_pcell_ul_tx_all_ul_sf_r16_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)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(tdd_pcell_ul_tx_all_ul_sf_r16_present, 1)); + HANDLE_CODE(bref.pack(fdd_pcell_ul_tx_all_ul_sf_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE phy_params_mrdc_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool naics_cap_list_present; + HANDLE_CODE(bref.unpack(naics_cap_list_present, 1)); + + if (naics_cap_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(naics_cap_list, bref, 1, 8)); + } + + 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); + + unpack_presence_flag(sp_cell_placement, bref); + if (sp_cell_placement.is_present()) { + HANDLE_CODE(sp_cell_placement->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(tdd_pcell_ul_tx_all_ul_sf_r16_present, 1)); + HANDLE_CODE(bref.unpack(fdd_pcell_ul_tx_all_ul_sf_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void phy_params_mrdc_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (naics_cap_list.size() > 0) { + j.start_array("naics-Capability-List"); + for (const auto& e1 : naics_cap_list) { + e1.to_json(j); + } + j.end_array(); + } + if (ext) { + if (sp_cell_placement.is_present()) { + j.write_fieldname("spCellPlacement"); + sp_cell_placement->to_json(j); + } + if (tdd_pcell_ul_tx_all_ul_sf_r16_present) { + j.write_str("tdd-PCellUL-TX-AllUL-Subframe-r16", "supported"); + } + if (fdd_pcell_ul_tx_all_ul_sf_r16_present) { + j.write_str("fdd-PCellUL-TX-AllUL-Subframe-r16", "supported"); + } + } + j.end_obj(); +} + // PowSav-ParametersCommon-r16 ::= SEQUENCE SRSASN_CODE pow_sav_params_common_r16_s::pack(bit_ref& bref) const { @@ -32045,6 +32613,837 @@ void rf_params_s::to_json(json_writer& j) const j.end_obj(); } +// RF-ParametersMRDC ::= SEQUENCE +SRSASN_CODE rf_params_mrdc_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(supported_band_combination_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(applied_freq_band_list_filt.size() > 0, 1)); + + if (supported_band_combination_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_list, 1, 65536)); + } + if (applied_freq_band_list_filt.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, applied_freq_band_list_filt, 1, 1280)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + 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[7] |= supported_band_combination_list_v1610.is_present(); + group_flags[7] |= supported_band_combination_list_nedc_only_v1610.is_present(); + group_flags[7] |= supported_band_combination_list_ul_tx_switch_r16.is_present(); + group_flags[8] |= supported_band_combination_list_v1630.is_present(); + group_flags[8] |= supported_band_combination_list_nedc_only_v1630.is_present(); + group_flags[8] |= supported_band_combination_list_ul_tx_switch_v1630.is_present(); + group_flags[9] |= supported_band_combination_list_v1640.is_present(); + group_flags[9] |= supported_band_combination_list_nedc_only_v1640.is_present(); + group_flags[9] |= supported_band_combination_list_ul_tx_switch_v1640.is_present(); + group_flags[10] |= supported_band_combination_list_ul_tx_switch_v1670.is_present(); + group_flags[11] |= supported_band_combination_list_v1700.is_present(); + group_flags[11] |= supported_band_combination_list_ul_tx_switch_v1700.is_present(); + group_flags[12] |= supported_band_combination_list_v1720.is_present(); + group_flags[12] |= supported_band_combination_list_nedc_only_v1720.is_present(); + group_flags[12] |= supported_band_combination_list_ul_tx_switch_v1720.is_present(); + group_flags[13] |= supported_band_combination_list_v1730.is_present(); + group_flags[13] |= supported_band_combination_list_nedc_only_v1730.is_present(); + group_flags[13] |= supported_band_combination_list_ul_tx_switch_v1730.is_present(); + group_flags[14] |= supported_band_combination_list_v1740.is_present(); + group_flags[14] |= supported_band_combination_list_nedc_only_v1740.is_present(); + group_flags[14] |= supported_band_combination_list_ul_tx_switch_v1740.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(srs_switching_time_requested_present, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_v1540.is_present(), 1)); + if (supported_band_combination_list_v1540.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1540, 1, 65536)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1550.is_present(), 1)); + if (supported_band_combination_list_v1550.is_present()) { + 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.size() > 0, 1)); + HANDLE_CODE(bref.pack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1560.size() > 0, 1)); + HANDLE_CODE(bref.pack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1570.size() > 0, 1)); + HANDLE_CODE(bref.pack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1580.size() > 0, 1)); + HANDLE_CODE(bref.pack( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590.size() > 0, 1)); + if (supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1540.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of( + bref, supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590, 1, 65536)); + } + } + } + if (group_flags[7]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1610.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v1610.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_r16.is_present(), 1)); + if (supported_band_combination_list_v1610.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1610, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1610.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_nedc_only_v1610, 1, 65536)); + } + if (supported_band_combination_list_ul_tx_switch_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_r16, 1, 65536)); + } + } + if (group_flags[8]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1630.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v1630.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1630.is_present(), 1)); + if (supported_band_combination_list_v1630.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1630, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1630.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_nedc_only_v1630, 1, 65536)); + } + if (supported_band_combination_list_ul_tx_switch_v1630.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1630, 1, 65536)); + } + } + if (group_flags[9]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1640.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v1640.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1640.is_present(), 1)); + if (supported_band_combination_list_v1640.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1640, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1640.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_nedc_only_v1640, 1, 65536)); + } + if (supported_band_combination_list_ul_tx_switch_v1640.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1640, 1, 65536)); + } + } + if (group_flags[10]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1670.is_present(), 1)); + if (supported_band_combination_list_ul_tx_switch_v1670.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1670, 1, 65536)); + } + } + if (group_flags[11]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1700.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1700.is_present(), 1)); + if (supported_band_combination_list_v1700.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1700, 1, 65536)); + } + if (supported_band_combination_list_ul_tx_switch_v1700.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1700, 1, 65536)); + } + } + if (group_flags[12]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1720.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v1720.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1720.is_present(), 1)); + if (supported_band_combination_list_v1720.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1720, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1720.is_present()) { + HANDLE_CODE(bref.pack( + supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1700.size() > 0, 1)); + HANDLE_CODE(bref.pack( + supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1720.size() > 0, 1)); + if (supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1700.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of( + bref, supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1700, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1720.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of( + bref, supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1720, 1, 65536)); + } + } + if (supported_band_combination_list_ul_tx_switch_v1720.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1720, 1, 65536)); + } + } + if (group_flags[13]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1730.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v1730.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1730.is_present(), 1)); + if (supported_band_combination_list_v1730.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1730, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1730.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_nedc_only_v1730, 1, 65536)); + } + if (supported_band_combination_list_ul_tx_switch_v1730.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1730, 1, 65536)); + } + } + if (group_flags[14]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(supported_band_combination_list_v1740.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v1740.is_present(), 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_ul_tx_switch_v1740.is_present(), 1)); + if (supported_band_combination_list_v1740.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_v1740, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1740.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_nedc_only_v1740, 1, 65536)); + } + if (supported_band_combination_list_ul_tx_switch_v1740.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *supported_band_combination_list_ul_tx_switch_v1740, 1, 65536)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_mrdc_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool supported_band_combination_list_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_present, 1)); + bool applied_freq_band_list_filt_present; + HANDLE_CODE(bref.unpack(applied_freq_band_list_filt_present, 1)); + + if (supported_band_combination_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_list, bref, 1, 65536)); + } + if (applied_freq_band_list_filt_present) { + HANDLE_CODE(unpack_dyn_seq_of(applied_freq_band_list_filt, bref, 1, 1280)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(15); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(srs_switching_time_requested_present, 1)); + unpack_presence_flag(supported_band_combination_list_v1540, bref); + if (supported_band_combination_list_v1540.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1540, bref, 1, 65536)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(supported_band_combination_list_v1550, bref); + if (supported_band_combination_list_v1550.is_present()) { + 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); + + unpack_presence_flag(supported_band_combination_list_v1560, bref); + unpack_presence_flag(supported_band_combination_list_nedc_only, bref); + 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); + + unpack_presence_flag(supported_band_combination_list_v1570, bref); + 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); + + unpack_presence_flag(supported_band_combination_list_v1580, bref); + 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); + + unpack_presence_flag(supported_band_combination_list_v1590, bref); + 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); + + unpack_presence_flag(supported_band_combination_list_nedc_only_v15a0, bref); + if (supported_band_combination_list_nedc_only_v15a0.is_present()) { + bool supported_band_combination_list_v1540_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v1540_present, 1)); + bool supported_band_combination_list_v1560_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v1560_present, 1)); + bool supported_band_combination_list_v1570_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v1570_present, 1)); + bool supported_band_combination_list_v1580_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v1580_present, 1)); + bool supported_band_combination_list_v1590_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v1590_present, 1)); + if (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_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_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_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_v1590_present) { + HANDLE_CODE(unpack_dyn_seq_of( + supported_band_combination_list_nedc_only_v15a0->supported_band_combination_list_v1590, bref, 1, 65536)); + } + } + } + if (group_flags[7]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(supported_band_combination_list_v1610, bref); + unpack_presence_flag(supported_band_combination_list_nedc_only_v1610, bref); + unpack_presence_flag(supported_band_combination_list_ul_tx_switch_r16, bref); + if (supported_band_combination_list_v1610.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1610, bref, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1610.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_nedc_only_v1610, bref, 1, 65536)); + } + if (supported_band_combination_list_ul_tx_switch_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_r16, bref, 1, 65536)); + } + } + if (group_flags[8]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(supported_band_combination_list_v1630, bref); + unpack_presence_flag(supported_band_combination_list_nedc_only_v1630, bref); + unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1630, bref); + if (supported_band_combination_list_v1630.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1630, bref, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1630.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_nedc_only_v1630, bref, 1, 65536)); + } + if (supported_band_combination_list_ul_tx_switch_v1630.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1630, bref, 1, 65536)); + } + } + if (group_flags[9]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(supported_band_combination_list_v1640, bref); + unpack_presence_flag(supported_band_combination_list_nedc_only_v1640, bref); + unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1640, bref); + if (supported_band_combination_list_v1640.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1640, bref, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1640.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_nedc_only_v1640, bref, 1, 65536)); + } + if (supported_band_combination_list_ul_tx_switch_v1640.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1640, bref, 1, 65536)); + } + } + if (group_flags[10]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1670, bref); + if (supported_band_combination_list_ul_tx_switch_v1670.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1670, bref, 1, 65536)); + } + } + if (group_flags[11]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(supported_band_combination_list_v1700, bref); + unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1700, bref); + if (supported_band_combination_list_v1700.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1700, bref, 1, 65536)); + } + if (supported_band_combination_list_ul_tx_switch_v1700.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1700, bref, 1, 65536)); + } + } + if (group_flags[12]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(supported_band_combination_list_v1720, bref); + unpack_presence_flag(supported_band_combination_list_nedc_only_v1720, bref); + unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1720, bref); + if (supported_band_combination_list_v1720.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1720, bref, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1720.is_present()) { + bool supported_band_combination_list_v1700_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v1700_present, 1)); + bool supported_band_combination_list_v1720_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v1720_present, 1)); + if (supported_band_combination_list_v1700_present) { + HANDLE_CODE(unpack_dyn_seq_of( + supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1700, bref, 1, 65536)); + } + if (supported_band_combination_list_v1720_present) { + HANDLE_CODE(unpack_dyn_seq_of( + supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1720, bref, 1, 65536)); + } + } + if (supported_band_combination_list_ul_tx_switch_v1720.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1720, bref, 1, 65536)); + } + } + if (group_flags[13]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(supported_band_combination_list_v1730, bref); + unpack_presence_flag(supported_band_combination_list_nedc_only_v1730, bref); + unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1730, bref); + if (supported_band_combination_list_v1730.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1730, bref, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1730.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_nedc_only_v1730, bref, 1, 65536)); + } + if (supported_band_combination_list_ul_tx_switch_v1730.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1730, bref, 1, 65536)); + } + } + if (group_flags[14]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(supported_band_combination_list_v1740, bref); + unpack_presence_flag(supported_band_combination_list_nedc_only_v1740, bref); + unpack_presence_flag(supported_band_combination_list_ul_tx_switch_v1740, bref); + if (supported_band_combination_list_v1740.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_v1740, bref, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v1740.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_nedc_only_v1740, bref, 1, 65536)); + } + if (supported_band_combination_list_ul_tx_switch_v1740.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*supported_band_combination_list_ul_tx_switch_v1740, bref, 1, 65536)); + } + } + } + return SRSASN_SUCCESS; +} +void rf_params_mrdc_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_list.size() > 0) { + j.start_array("supportedBandCombinationList"); + for (const auto& e1 : supported_band_combination_list) { + e1.to_json(j); + } + j.end_array(); + } + if (applied_freq_band_list_filt.size() > 0) { + j.start_array("appliedFreqBandListFilter"); + for (const auto& e1 : applied_freq_band_list_filt) { + e1.to_json(j); + } + j.end_array(); + } + if (ext) { + if (srs_switching_time_requested_present) { + j.write_str("srs-SwitchingTimeRequested", "true"); + } + if (supported_band_combination_list_v1540.is_present()) { + j.start_array("supportedBandCombinationList-v1540"); + for (const auto& e1 : *supported_band_combination_list_v1540) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_v1550.is_present()) { + j.start_array("supportedBandCombinationList-v1550"); + for (const auto& e1 : *supported_band_combination_list_v1550) { + e1.to_json(j); + } + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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(); + } + if (supported_band_combination_list_v1610.is_present()) { + j.start_array("supportedBandCombinationList-v1610"); + for (const auto& e1 : *supported_band_combination_list_v1610) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v1610.is_present()) { + j.start_array("supportedBandCombinationListNEDC-Only-v1610"); + for (const auto& e1 : *supported_band_combination_list_nedc_only_v1610) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_ul_tx_switch_r16.is_present()) { + j.start_array("supportedBandCombinationList-UplinkTxSwitch-r16"); + for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_v1630.is_present()) { + j.start_array("supportedBandCombinationList-v1630"); + for (const auto& e1 : *supported_band_combination_list_v1630) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v1630.is_present()) { + j.start_array("supportedBandCombinationListNEDC-Only-v1630"); + for (const auto& e1 : *supported_band_combination_list_nedc_only_v1630) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_ul_tx_switch_v1630.is_present()) { + j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1630"); + for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1630) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_v1640.is_present()) { + j.start_array("supportedBandCombinationList-v1640"); + for (const auto& e1 : *supported_band_combination_list_v1640) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v1640.is_present()) { + j.start_array("supportedBandCombinationListNEDC-Only-v1640"); + for (const auto& e1 : *supported_band_combination_list_nedc_only_v1640) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_ul_tx_switch_v1640.is_present()) { + j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1640"); + for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1640) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_ul_tx_switch_v1670.is_present()) { + j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1670"); + for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1670) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_v1700.is_present()) { + j.start_array("supportedBandCombinationList-v1700"); + for (const auto& e1 : *supported_band_combination_list_v1700) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_ul_tx_switch_v1700.is_present()) { + j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1700"); + for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1700) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_v1720.is_present()) { + j.start_array("supportedBandCombinationList-v1720"); + for (const auto& e1 : *supported_band_combination_list_v1720) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v1720.is_present()) { + j.write_fieldname("supportedBandCombinationListNEDC-Only-v1720"); + j.start_obj(); + if (supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1700.size() > 0) { + j.start_array("supportedBandCombinationList-v1700"); + for (const auto& e1 : supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1700) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1720.size() > 0) { + j.start_array("supportedBandCombinationList-v1720"); + for (const auto& e1 : supported_band_combination_list_nedc_only_v1720->supported_band_combination_list_v1720) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + if (supported_band_combination_list_ul_tx_switch_v1720.is_present()) { + j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1720"); + for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1720) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_v1730.is_present()) { + j.start_array("supportedBandCombinationList-v1730"); + for (const auto& e1 : *supported_band_combination_list_v1730) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v1730.is_present()) { + j.start_array("supportedBandCombinationListNEDC-Only-v1730"); + for (const auto& e1 : *supported_band_combination_list_nedc_only_v1730) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_ul_tx_switch_v1730.is_present()) { + j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1730"); + for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1730) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_v1740.is_present()) { + j.start_array("supportedBandCombinationList-v1740"); + for (const auto& e1 : *supported_band_combination_list_v1740) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v1740.is_present()) { + j.start_array("supportedBandCombinationListNEDC-Only-v1740"); + for (const auto& e1 : *supported_band_combination_list_nedc_only_v1740) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_ul_tx_switch_v1740.is_present()) { + j.start_array("supportedBandCombinationList-UplinkTxSwitch-v1740"); + for (const auto& e1 : *supported_band_combination_list_ul_tx_switch_v1740) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +// RF-ParametersMRDC-v15g0 ::= SEQUENCE +SRSASN_CODE rf_params_mrdc_v15g0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(supported_band_combination_list_v15g0.size() > 0, 1)); + HANDLE_CODE(bref.pack(supported_band_combination_list_nedc_only_v15g0.size() > 0, 1)); + + if (supported_band_combination_list_v15g0.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_list_v15g0, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v15g0.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, supported_band_combination_list_nedc_only_v15g0, 1, 65536)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rf_params_mrdc_v15g0_s::unpack(cbit_ref& bref) +{ + bool supported_band_combination_list_v15g0_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_v15g0_present, 1)); + bool supported_band_combination_list_nedc_only_v15g0_present; + HANDLE_CODE(bref.unpack(supported_band_combination_list_nedc_only_v15g0_present, 1)); + + if (supported_band_combination_list_v15g0_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_list_v15g0, bref, 1, 65536)); + } + if (supported_band_combination_list_nedc_only_v15g0_present) { + HANDLE_CODE(unpack_dyn_seq_of(supported_band_combination_list_nedc_only_v15g0, bref, 1, 65536)); + } + + return SRSASN_SUCCESS; +} +void rf_params_mrdc_v15g0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (supported_band_combination_list_v15g0.size() > 0) { + j.start_array("supportedBandCombinationList-v15g0"); + for (const auto& e1 : supported_band_combination_list_v15g0) { + e1.to_json(j); + } + j.end_array(); + } + if (supported_band_combination_list_nedc_only_v15g0.size() > 0) { + j.start_array("supportedBandCombinationListNEDC-Only-v15g0"); + for (const auto& e1 : supported_band_combination_list_nedc_only_v15g0) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + // RLC-ParametersSidelink-r16 ::= SEQUENCE SRSASN_CODE rlc_params_sidelink_r16_s::pack(bit_ref& bref) const { @@ -32387,6 +33786,540 @@ void sidelink_params_r16_s::to_json(json_writer& j) const j.end_obj(); } +// UE-MRDC-Capability-v1730 ::= SEQUENCE +SRSASN_CODE ue_mrdc_cap_v1730_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_v1730_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_and_mob_params_mrdc_v1730_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_v1730.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_mrdc_cap_v1730_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_v1730_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_and_mob_params_mrdc_v1730_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_v1730.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_mrdc_cap_v1730_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_and_mob_params_mrdc_v1730_present) { + j.write_fieldname("measAndMobParametersMRDC-v1730"); + meas_and_mob_params_mrdc_v1730.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// GeneralParametersMRDC-v1610 ::= SEQUENCE +SRSASN_CODE general_params_mrdc_v1610_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(f1c_over_eutra_r16_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE general_params_mrdc_v1610_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(f1c_over_eutra_r16_present, 1)); + + return SRSASN_SUCCESS; +} +void general_params_mrdc_v1610_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (f1c_over_eutra_r16_present) { + j.write_str("f1c-OverEUTRA-r16", "supported"); + } + j.end_obj(); +} + +// PDCP-ParametersMRDC-v1610 ::= SEQUENCE +SRSASN_CODE pdcp_params_mrdc_v1610_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(scg_drb_nr_iab_r16_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_params_mrdc_v1610_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(scg_drb_nr_iab_r16_present, 1)); + + return SRSASN_SUCCESS; +} +void pdcp_params_mrdc_v1610_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (scg_drb_nr_iab_r16_present) { + j.write_str("scg-DRB-NR-IAB-r16", "supported"); + } + j.end_obj(); +} + +// UE-MRDC-Capability-v1700 ::= SEQUENCE +SRSASN_CODE ue_mrdc_cap_v1700_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(meas_and_mob_params_mrdc_v1700.pack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_mrdc_cap_v1700_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(meas_and_mob_params_mrdc_v1700.unpack(bref)); + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_mrdc_cap_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measAndMobParametersMRDC-v1700"); + meas_and_mob_params_mrdc_v1700.to_json(j); + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-MRDC-Capability-v1610 ::= SEQUENCE +SRSASN_CODE ue_mrdc_cap_v1610_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_v1610_present, 1)); + HANDLE_CODE(bref.pack(general_params_mrdc_v1610_present, 1)); + HANDLE_CODE(bref.pack(pdcp_params_mrdc_v1610_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_and_mob_params_mrdc_v1610_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_v1610.pack(bref)); + } + if (general_params_mrdc_v1610_present) { + HANDLE_CODE(general_params_mrdc_v1610.pack(bref)); + } + if (pdcp_params_mrdc_v1610_present) { + HANDLE_CODE(pdcp_params_mrdc_v1610.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_mrdc_cap_v1610_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_v1610_present, 1)); + HANDLE_CODE(bref.unpack(general_params_mrdc_v1610_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_params_mrdc_v1610_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_and_mob_params_mrdc_v1610_present) { + HANDLE_CODE(meas_and_mob_params_mrdc_v1610.unpack(bref)); + } + if (general_params_mrdc_v1610_present) { + HANDLE_CODE(general_params_mrdc_v1610.unpack(bref)); + } + if (pdcp_params_mrdc_v1610_present) { + HANDLE_CODE(pdcp_params_mrdc_v1610.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_mrdc_cap_v1610_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_and_mob_params_mrdc_v1610_present) { + j.write_fieldname("measAndMobParametersMRDC-v1610"); + meas_and_mob_params_mrdc_v1610.to_json(j); + } + if (general_params_mrdc_v1610_present) { + j.write_fieldname("generalParametersMRDC-v1610"); + general_params_mrdc_v1610.to_json(j); + } + if (pdcp_params_mrdc_v1610_present) { + j.write_fieldname("pdcp-ParametersMRDC-v1610"); + pdcp_params_mrdc_v1610.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-MRDC-CapabilityAddXDD-Mode-v1560 ::= SEQUENCE +SRSASN_CODE ue_mrdc_cap_add_xdd_mode_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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_mrdc_cap_add_xdd_mode_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)); + } + + return SRSASN_SUCCESS; +} +void ue_mrdc_cap_add_xdd_mode_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(); +} + +// PDCP-ParametersMRDC ::= SEQUENCE +SRSASN_CODE pdcp_params_mrdc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(pdcp_dupl_split_srb_present, 1)); + HANDLE_CODE(bref.pack(pdcp_dupl_split_drb_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pdcp_params_mrdc_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(pdcp_dupl_split_srb_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_dupl_split_drb_present, 1)); + + return SRSASN_SUCCESS; +} +void pdcp_params_mrdc_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pdcp_dupl_split_srb_present) { + j.write_str("pdcp-DuplicationSplitSRB", "supported"); + } + if (pdcp_dupl_split_drb_present) { + j.write_str("pdcp-DuplicationSplitDRB", "supported"); + } + j.end_obj(); +} + +// UE-MRDC-Capability-v1560 ::= SEQUENCE +SRSASN_CODE ue_mrdc_cap_v1560_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rx_filts.size() > 0, 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 (rx_filts.size() > 0) { + HANDLE_CODE(rx_filts.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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_mrdc_cap_v1560_s::unpack(cbit_ref& bref) +{ + bool rx_filts_present; + 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 (rx_filts_present) { + HANDLE_CODE(rx_filts.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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_mrdc_cap_v1560_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rx_filts.size() > 0) { + j.write_str("receivedFilters", rx_filts.to_string()); + } + 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"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UE-MRDC-Capability ::= SEQUENCE +SRSASN_CODE ue_mrdc_cap_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_and_mob_params_mrdc_present, 1)); + HANDLE_CODE(bref.pack(phy_params_mrdc_v1530_present, 1)); + HANDLE_CODE(bref.pack(general_params_mrdc_present, 1)); + HANDLE_CODE(bref.pack(fdd_add_ue_mrdc_cap_present, 1)); + HANDLE_CODE(bref.pack(tdd_add_ue_mrdc_cap_present, 1)); + HANDLE_CODE(bref.pack(fr1_add_ue_mrdc_cap_present, 1)); + HANDLE_CODE(bref.pack(fr2_add_ue_mrdc_cap_present, 1)); + HANDLE_CODE(bref.pack(feature_set_combinations.size() > 0, 1)); + HANDLE_CODE(bref.pack(pdcp_params_mrdc_v1530_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_and_mob_params_mrdc_present) { + HANDLE_CODE(meas_and_mob_params_mrdc.pack(bref)); + } + if (phy_params_mrdc_v1530_present) { + HANDLE_CODE(phy_params_mrdc_v1530.pack(bref)); + } + HANDLE_CODE(rf_params_mrdc.pack(bref)); + if (general_params_mrdc_present) { + HANDLE_CODE(general_params_mrdc.pack(bref)); + } + if (fdd_add_ue_mrdc_cap_present) { + HANDLE_CODE(fdd_add_ue_mrdc_cap.pack(bref)); + } + if (tdd_add_ue_mrdc_cap_present) { + HANDLE_CODE(tdd_add_ue_mrdc_cap.pack(bref)); + } + if (fr1_add_ue_mrdc_cap_present) { + HANDLE_CODE(fr1_add_ue_mrdc_cap.pack(bref)); + } + if (fr2_add_ue_mrdc_cap_present) { + HANDLE_CODE(fr2_add_ue_mrdc_cap.pack(bref)); + } + if (feature_set_combinations.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, + feature_set_combinations, + 1, + 1024, + SeqOfPacker>(1, 32, SeqOfPacker(1, 128, Packer())))); + } + if (pdcp_params_mrdc_v1530_present) { + HANDLE_CODE(pdcp_params_mrdc_v1530.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + 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 ue_mrdc_cap_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_and_mob_params_mrdc_present, 1)); + HANDLE_CODE(bref.unpack(phy_params_mrdc_v1530_present, 1)); + HANDLE_CODE(bref.unpack(general_params_mrdc_present, 1)); + HANDLE_CODE(bref.unpack(fdd_add_ue_mrdc_cap_present, 1)); + HANDLE_CODE(bref.unpack(tdd_add_ue_mrdc_cap_present, 1)); + HANDLE_CODE(bref.unpack(fr1_add_ue_mrdc_cap_present, 1)); + HANDLE_CODE(bref.unpack(fr2_add_ue_mrdc_cap_present, 1)); + bool feature_set_combinations_present; + HANDLE_CODE(bref.unpack(feature_set_combinations_present, 1)); + HANDLE_CODE(bref.unpack(pdcp_params_mrdc_v1530_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_and_mob_params_mrdc_present) { + HANDLE_CODE(meas_and_mob_params_mrdc.unpack(bref)); + } + if (phy_params_mrdc_v1530_present) { + HANDLE_CODE(phy_params_mrdc_v1530.unpack(bref)); + } + HANDLE_CODE(rf_params_mrdc.unpack(bref)); + if (general_params_mrdc_present) { + HANDLE_CODE(general_params_mrdc.unpack(bref)); + } + if (fdd_add_ue_mrdc_cap_present) { + HANDLE_CODE(fdd_add_ue_mrdc_cap.unpack(bref)); + } + if (tdd_add_ue_mrdc_cap_present) { + HANDLE_CODE(tdd_add_ue_mrdc_cap.unpack(bref)); + } + if (fr1_add_ue_mrdc_cap_present) { + HANDLE_CODE(fr1_add_ue_mrdc_cap.unpack(bref)); + } + if (fr2_add_ue_mrdc_cap_present) { + HANDLE_CODE(fr2_add_ue_mrdc_cap.unpack(bref)); + } + if (feature_set_combinations_present) { + HANDLE_CODE(unpack_dyn_seq_of(feature_set_combinations, + bref, + 1, + 1024, + SeqOfPacker>(1, 32, SeqOfPacker(1, 128, Packer())))); + } + if (pdcp_params_mrdc_v1530_present) { + HANDLE_CODE(pdcp_params_mrdc_v1530.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 ue_mrdc_cap_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_and_mob_params_mrdc_present) { + j.write_fieldname("measAndMobParametersMRDC"); + meas_and_mob_params_mrdc.to_json(j); + } + if (phy_params_mrdc_v1530_present) { + j.write_fieldname("phy-ParametersMRDC-v1530"); + phy_params_mrdc_v1530.to_json(j); + } + j.write_fieldname("rf-ParametersMRDC"); + rf_params_mrdc.to_json(j); + if (general_params_mrdc_present) { + j.write_fieldname("generalParametersMRDC"); + general_params_mrdc.to_json(j); + } + if (fdd_add_ue_mrdc_cap_present) { + j.write_fieldname("fdd-Add-UE-MRDC-Capabilities"); + fdd_add_ue_mrdc_cap.to_json(j); + } + if (tdd_add_ue_mrdc_cap_present) { + j.write_fieldname("tdd-Add-UE-MRDC-Capabilities"); + tdd_add_ue_mrdc_cap.to_json(j); + } + if (fr1_add_ue_mrdc_cap_present) { + j.write_fieldname("fr1-Add-UE-MRDC-Capabilities"); + fr1_add_ue_mrdc_cap.to_json(j); + } + if (fr2_add_ue_mrdc_cap_present) { + j.write_fieldname("fr2-Add-UE-MRDC-Capabilities"); + fr2_add_ue_mrdc_cap.to_json(j); + } + if (feature_set_combinations.size() > 0) { + j.start_array("featureSetCombinations"); + for (const auto& e1 : feature_set_combinations) { + j.start_array(); + for (const auto& e2 : e1) { + j.start_array(); + for (const auto& e3 : e2) { + e3.to_json(j); + } + j.end_array(); + } + j.end_array(); + } + j.end_array(); + } + if (pdcp_params_mrdc_v1530_present) { + j.write_fieldname("pdcp-ParametersMRDC-v1530"); + pdcp_params_mrdc_v1530.to_json(j); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// UE-MRDC-Capability-v15g0 ::= SEQUENCE +SRSASN_CODE ue_mrdc_cap_v15g0_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(rf_params_mrdc_v15g0_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (rf_params_mrdc_v15g0_present) { + HANDLE_CODE(rf_params_mrdc_v15g0.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_mrdc_cap_v15g0_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(rf_params_mrdc_v15g0_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (rf_params_mrdc_v15g0_present) { + HANDLE_CODE(rf_params_mrdc_v15g0.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_mrdc_cap_v15g0_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rf_params_mrdc_v15g0_present) { + j.write_fieldname("rf-ParametersMRDC-v15g0"); + rf_params_mrdc_v15g0.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + // RedCapParameters-v1740 ::= SEQUENCE SRSASN_CODE red_cap_params_v1740_s::pack(bit_ref& bref) const { @@ -32901,6 +34834,12 @@ SRSASN_CODE high_speed_params_v1650_c::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* high_speed_params_v1650_c::types_opts::to_string() const +{ + static const char* names[] = {"intraNR-MeasurementEnhancement-r16", "interRAT-MeasurementEnhancement-r16"}; + return convert_enum_idx(names, 2, value, "high_speed_params_v1650_c::types"); +} + // UE-NR-Capability-v1690 ::= SEQUENCE SRSASN_CODE ue_nr_cap_v1690_s::pack(bit_ref& bref) const { diff --git a/lib/asn1/rrc_nr/ul_ccch1_msg.cpp b/lib/asn1/rrc_nr/ul_ccch1_msg.cpp new file mode 100644 index 0000000000..08136b0b93 --- /dev/null +++ b/lib/asn1/rrc_nr/ul_ccch1_msg.cpp @@ -0,0 +1,261 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/ul_ccch1_msg.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// RRCResumeRequest1-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_request1_ies_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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_request1_ies_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)); + + return SRSASN_SUCCESS; +} +void rrc_resume_request1_ies_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()); + j.end_obj(); +} + +// RRCResumeRequest1 ::= SEQUENCE +SRSASN_CODE rrc_resume_request1_s::pack(bit_ref& bref) const +{ + 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)); + + return SRSASN_SUCCESS; +} +void rrc_resume_request1_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rrcResumeRequest1"); + rrc_resume_request1.to_json(j); + j.end_obj(); +} + +// UL-CCCH1-MessageType ::= CHOICE +void ul_ccch1_msg_type_c::set(types::options e) +{ + type_ = e; +} +ul_ccch1_msg_type_c::c1_c_& ul_ccch1_msg_type_c::set_c1() +{ + set(types::c1); + return c; +} +void ul_ccch1_msg_type_c::set_msg_class_ext() +{ + set(types::msg_class_ext); +} +void ul_ccch1_msg_type_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.to_json(j); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "ul_ccch1_msg_type_c"); + } + j.end_obj(); +} +SRSASN_CODE ul_ccch1_msg_type_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::c1: + HANDLE_CODE(c.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; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ccch1_msg_type_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.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; + } + return SRSASN_SUCCESS; +} + +void ul_ccch1_msg_type_c::c1_c_::set(types::options e) +{ + type_ = e; +} +rrc_resume_request1_s& ul_ccch1_msg_type_c::c1_c_::set_rrc_resume_request1() +{ + set(types::rrc_resume_request1); + return c; +} +void ul_ccch1_msg_type_c::c1_c_::set_spare3() +{ + set(types::spare3); +} +void ul_ccch1_msg_type_c::c1_c_::set_spare2() +{ + set(types::spare2); +} +void ul_ccch1_msg_type_c::c1_c_::set_spare1() +{ + set(types::spare1); +} +void ul_ccch1_msg_type_c::c1_c_::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_"); + } + j.end_obj(); +} +SRSASN_CODE ul_ccch1_msg_type_c::c1_c_::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; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ccch1_msg_type_c::c1_c_::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; +} + +const char* ul_ccch1_msg_type_c::c1_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcResumeRequest1", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 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 numbers[] = {1}; + return map_enum_number(numbers, 1, value, "ul_ccch1_msg_type_c::c1_c_::types"); +} + +const char* ul_ccch1_msg_type_c::types_opts::to_string() const +{ + static const char* names[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(names, 2, value, "ul_ccch1_msg_type_c::types"); +} +uint8_t ul_ccch1_msg_type_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "ul_ccch1_msg_type_c::types"); +} + +// UL-CCCH1-Message ::= SEQUENCE +SRSASN_CODE ul_ccch1_msg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ccch1_msg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void ul_ccch1_msg_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.end_obj(); + j.end_array(); +} diff --git a/lib/asn1/rrc_nr/ul_ccch_msg.cpp b/lib/asn1/rrc_nr/ul_ccch_msg.cpp new file mode 100644 index 0000000000..629fca628d --- /dev/null +++ b/lib/asn1/rrc_nr/ul_ccch_msg.cpp @@ -0,0 +1,241 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/ul_ccch_msg.h" +#include "srsran/asn1/rrc_nr/ul_ccch_msg_ies.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// UL-CCCH-MessageType ::= CHOICE +void ul_ccch_msg_type_c::set(types::options e) +{ + type_ = e; +} +ul_ccch_msg_type_c::c1_c_& ul_ccch_msg_type_c::set_c1() +{ + set(types::c1); + return c; +} +void ul_ccch_msg_type_c::set_msg_class_ext() +{ + set(types::msg_class_ext); +} +void ul_ccch_msg_type_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.to_json(j); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); + } + j.end_obj(); +} +SRSASN_CODE ul_ccch_msg_type_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::c1: + HANDLE_CODE(c.pack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ccch_msg_type_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.unpack(bref)); + break; + case types::msg_class_ext: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ul_ccch_msg_type_c::c1_c_::set(types::options e) +{ + type_ = e; + switch (type_) { + case types::rrc_setup_request: + c = rrc_setup_request_s{}; + break; + case types::rrc_resume_request: + c = rrc_resume_request_s{}; + break; + case types::rrc_reest_request: + c = rrc_reest_request_s{}; + break; + case types::rrc_sys_info_request: + c = rrc_sys_info_request_s{}; + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ul_ccch_msg_type_c::c1_c_"); + } +} +rrc_setup_request_s& ul_ccch_msg_type_c::c1_c_::set_rrc_setup_request() +{ + set(types::rrc_setup_request); + return c.get(); +} +rrc_resume_request_s& ul_ccch_msg_type_c::c1_c_::set_rrc_resume_request() +{ + set(types::rrc_resume_request); + return c.get(); +} +rrc_reest_request_s& ul_ccch_msg_type_c::c1_c_::set_rrc_reest_request() +{ + set(types::rrc_reest_request); + return c.get(); +} +rrc_sys_info_request_s& ul_ccch_msg_type_c::c1_c_::set_rrc_sys_info_request() +{ + set(types::rrc_sys_info_request); + return c.get(); +} +void ul_ccch_msg_type_c::c1_c_::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_"); + } + j.end_obj(); +} +SRSASN_CODE ul_ccch_msg_type_c::c1_c_::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; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ccch_msg_type_c::c1_c_::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; + } + return SRSASN_SUCCESS; +} + +const char* ul_ccch_msg_type_c::c1_c_::types_opts::to_string() const +{ + static const char* names[] = { + "rrcSetupRequest", "rrcResumeRequest", "rrcReestablishmentRequest", "rrcSystemInfoRequest"}; + return convert_enum_idx(names, 4, value, "ul_ccch_msg_type_c::c1_c_::types"); +} + +const char* ul_ccch_msg_type_c::types_opts::to_string() const +{ + static const char* names[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(names, 2, value, "ul_ccch_msg_type_c::types"); +} +uint8_t ul_ccch_msg_type_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "ul_ccch_msg_type_c::types"); +} + +// UL-CCCH-Message ::= SEQUENCE +SRSASN_CODE ul_ccch_msg_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(msg.pack(bref)); + + bref.align_bytes_zero(); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ccch_msg_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(msg.unpack(bref)); + + bref.align_bytes(); + + return SRSASN_SUCCESS; +} +void ul_ccch_msg_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.end_obj(); + j.end_array(); +} diff --git a/lib/asn1/rrc_nr/ul_ccch_msg_ies.cpp b/lib/asn1/rrc_nr/ul_ccch_msg_ies.cpp new file mode 100644 index 0000000000..696bed4376 --- /dev/null +++ b/lib/asn1/rrc_nr/ul_ccch_msg_ies.cpp @@ -0,0 +1,651 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/ul_ccch_msg_ies.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// EstablishmentCause ::= ENUMERATED +const char* establishment_cause_opts::to_string() const +{ + static const char* names[] = {"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(names, 16, value, "establishment_cause_e"); +} + +// InitialUE-Identity ::= CHOICE +void init_ue_id_c::destroy_() +{ + switch (type_) { + case types::ng_5_g_s_tmsi_part1: + c.destroy>(); + break; + case types::random_value: + c.destroy>(); + break; + default: + break; + } +} +void init_ue_id_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ng_5_g_s_tmsi_part1: + c.init>(); + break; + case types::random_value: + c.init>(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "init_ue_id_c"); + } +} +init_ue_id_c::init_ue_id_c(const init_ue_id_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::ng_5_g_s_tmsi_part1: + c.init(other.c.get>()); + break; + case types::random_value: + c.init(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "init_ue_id_c"); + } +} +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::ng_5_g_s_tmsi_part1: + c.set(other.c.get>()); + break; + case types::random_value: + c.set(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "init_ue_id_c"); + } + + return *this; +} +fixed_bitstring<39>& init_ue_id_c::set_ng_5_g_s_tmsi_part1() +{ + set(types::ng_5_g_s_tmsi_part1); + return c.get>(); +} +fixed_bitstring<39>& init_ue_id_c::set_random_value() +{ + set(types::random_value); + return c.get>(); +} +void init_ue_id_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ng_5_g_s_tmsi_part1: + j.write_str("ng-5G-S-TMSI-Part1", c.get>().to_string()); + break; + case types::random_value: + j.write_str("randomValue", c.get>().to_string()); + break; + default: + log_invalid_choice_id(type_, "init_ue_id_c"); + } + j.end_obj(); +} +SRSASN_CODE init_ue_id_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ng_5_g_s_tmsi_part1: + HANDLE_CODE(c.get>().pack(bref)); + break; + case types::random_value: + HANDLE_CODE(c.get>().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "init_ue_id_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE init_ue_id_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ng_5_g_s_tmsi_part1: + HANDLE_CODE(c.get>().unpack(bref)); + break; + case types::random_value: + HANDLE_CODE(c.get>().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "init_ue_id_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* init_ue_id_c::types_opts::to_string() const +{ + static const char* names[] = {"ng-5G-S-TMSI-Part1", "randomValue"}; + return convert_enum_idx(names, 2, value, "init_ue_id_c::types"); +} +int8_t init_ue_id_c::types_opts::to_number() const +{ + static const int8_t numbers[] = {-5}; + return map_enum_number(numbers, 1, value, "init_ue_id_c::types"); +} + +// ReestabUE-Identity ::= SEQUENCE +SRSASN_CODE reestab_ue_id_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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE reestab_ue_id_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)); + + return SRSASN_SUCCESS; +} +void reestab_ue_id_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 +const char* reest_cause_opts::to_string() const +{ + static const char* names[] = {"reconfigurationFailure", "handoverFailure", "otherFailure", "spare1"}; + return convert_enum_idx(names, 4, value, "reest_cause_e"); +} + +// ResumeCause ::= ENUMERATED +const char* resume_cause_opts::to_string() const +{ + static const char* names[] = {"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(names, 16, value, "resume_cause_e"); +} + +// RRC-PosSystemInfoRequest-r16-IEs ::= SEQUENCE +SRSASN_CODE rrc_pos_sys_info_request_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(requested_pos_si_list.pack(bref)); + HANDLE_CODE(spare.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_pos_sys_info_request_r16_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(requested_pos_si_list.unpack(bref)); + HANDLE_CODE(spare.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_pos_sys_info_request_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("requestedPosSI-List", requested_pos_si_list.to_string()); + j.write_str("spare", spare.to_string()); + j.end_obj(); +} + +// RRCReestablishmentRequest-IEs ::= SEQUENCE +SRSASN_CODE rrc_reest_request_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(ue_id.pack(bref)); + HANDLE_CODE(reest_cause.pack(bref)); + HANDLE_CODE(spare.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_reest_request_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(ue_id.unpack(bref)); + HANDLE_CODE(reest_cause.unpack(bref)); + HANDLE_CODE(spare.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_reest_request_ies_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()); + j.end_obj(); +} + +// RRCResumeRequest-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_request_ies_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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_request_ies_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)); + + return SRSASN_SUCCESS; +} +void rrc_resume_request_ies_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()); + j.end_obj(); +} + +// RRCSetupRequest-IEs ::= SEQUENCE +SRSASN_CODE rrc_setup_request_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(ue_id.pack(bref)); + HANDLE_CODE(establishment_cause.pack(bref)); + HANDLE_CODE(spare.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_setup_request_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(ue_id.unpack(bref)); + HANDLE_CODE(establishment_cause.unpack(bref)); + HANDLE_CODE(spare.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_setup_request_ies_s::to_json(json_writer& j) 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(); +} + +// RRCSystemInfoRequest-IEs ::= SEQUENCE +SRSASN_CODE rrc_sys_info_request_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(requested_si_list.pack(bref)); + HANDLE_CODE(spare.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_sys_info_request_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(requested_si_list.unpack(bref)); + HANDLE_CODE(spare.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_sys_info_request_ies_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.end_obj(); +} + +// RRCReestablishmentRequest ::= SEQUENCE +SRSASN_CODE rrc_reest_request_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(rrc_reest_request.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_reest_request_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(rrc_reest_request.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_reest_request_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rrcReestablishmentRequest"); + rrc_reest_request.to_json(j); + j.end_obj(); +} + +// RRCResumeRequest ::= SEQUENCE +SRSASN_CODE rrc_resume_request_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(rrc_resume_request.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_request_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(rrc_resume_request.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(); +} + +// RRCSetupRequest ::= SEQUENCE +SRSASN_CODE rrc_setup_request_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(rrc_setup_request.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_setup_request_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(rrc_setup_request.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_setup_request_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("rrcSetupRequest"); + rrc_setup_request.to_json(j); + j.end_obj(); +} + +// RRCSystemInfoRequest ::= SEQUENCE +SRSASN_CODE rrc_sys_info_request_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_sys_info_request_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void rrc_sys_info_request_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void rrc_sys_info_request_s::crit_exts_c_::destroy_() +{ + switch (type_) { + case types::rrc_sys_info_request: + c.destroy(); + break; + case types::crit_exts_future_r16: + c.destroy(); + break; + default: + break; + } +} +void rrc_sys_info_request_s::crit_exts_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::rrc_sys_info_request: + c.init(); + break; + case types::crit_exts_future_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); + } +} +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::rrc_sys_info_request: + c.init(other.c.get()); + break; + case types::crit_exts_future_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); + } +} +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::rrc_sys_info_request: + c.set(other.c.get()); + break; + case types::crit_exts_future_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); + } + + return *this; +} +rrc_sys_info_request_ies_s& rrc_sys_info_request_s::crit_exts_c_::set_rrc_sys_info_request() +{ + set(types::rrc_sys_info_request); + return c.get(); +} +rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_& +rrc_sys_info_request_s::crit_exts_c_::set_crit_exts_future_r16() +{ + set(types::crit_exts_future_r16); + return c.get(); +} +void rrc_sys_info_request_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_sys_info_request: + j.write_fieldname("rrcSystemInfoRequest"); + c.get().to_json(j); + break; + case types::crit_exts_future_r16: + j.write_fieldname("criticalExtensionsFuture-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); + } + 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: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::crit_exts_future_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::rrc_sys_info_request: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::crit_exts_future_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::set(types::options e) +{ + type_ = e; +} +rrc_pos_sys_info_request_r16_ies_s& +rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::set_rrc_pos_sys_info_request_r16() +{ + set(types::rrc_pos_sys_info_request_r16); + return c; +} +void rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_pos_sys_info_request_r16: + j.write_fieldname("rrcPosSystemInfoRequest-r16"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::rrc_pos_sys_info_request_r16: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::rrc_pos_sys_info_request_r16: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcPosSystemInfoRequest-r16", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "rrc_sys_info_request_s::crit_exts_c_::crit_exts_future_r16_c_::types"); +} + +const char* rrc_sys_info_request_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcSystemInfoRequest", "criticalExtensionsFuture-r16"}; + return convert_enum_idx(names, 2, value, "rrc_sys_info_request_s::crit_exts_c_::types"); +} diff --git a/lib/asn1/rrc_nr/ul_dcch_msg.cpp b/lib/asn1/rrc_nr/ul_dcch_msg.cpp index cd34d00f40..bcb436aacd 100644 --- a/lib/asn1/rrc_nr/ul_dcch_msg.cpp +++ b/lib/asn1/rrc_nr/ul_dcch_msg.cpp @@ -9,19073 +9,13 @@ */ #include "srsran/asn1/rrc_nr/ul_dcch_msg.h" -#include - +#include "srsran/asn1/rrc_nr/ul_dcch_msg_ies.h" using namespace asn1; using namespace asn1::rrc_nr; -/******************************************************************************* - * Struct Methods - ******************************************************************************/ - -// PDCCH-ConfigSIB1 ::= SEQUENCE -SRSASN_CODE pdcch_cfg_sib1_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, coreset_zero, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(pack_integer(bref, search_space_zero, (uint8_t)0u, (uint8_t)15u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pdcch_cfg_sib1_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(coreset_zero, bref, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(unpack_integer(search_space_zero, bref, (uint8_t)0u, (uint8_t)15u)); - - return SRSASN_SUCCESS; -} -void pdcch_cfg_sib1_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("controlResourceSetZero", coreset_zero); - j.write_int("searchSpaceZero", search_space_zero); - j.end_obj(); -} - -// GNSS-ID-r16 ::= SEQUENCE -SRSASN_CODE gnss_id_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(gnss_id_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE gnss_id_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(gnss_id_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void gnss_id_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("gnss-id-r16", gnss_id_r16.to_string()); - j.end_obj(); -} - -const char* gnss_id_r16_s::gnss_id_r16_opts::to_string() const -{ - static const char* names[] = {"gps", "sbas", "qzss", "galileo", "glonass", "bds"}; - return convert_enum_idx(names, 6, value, "gnss_id_r16_s::gnss_id_r16_e_"); -} - -// SBAS-ID-r16 ::= SEQUENCE -SRSASN_CODE sbas_id_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(sbas_id_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sbas_id_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(sbas_id_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void sbas_id_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("sbas-id-r16", sbas_id_r16.to_string()); - j.end_obj(); -} - -const char* sbas_id_r16_s::sbas_id_r16_opts::to_string() const -{ - static const char* names[] = {"waas", "egnos", "msas", "gagan"}; - return convert_enum_idx(names, 4, value, "sbas_id_r16_s::sbas_id_r16_e_"); -} - -// CAG-IdentityInfo-r16 ::= SEQUENCE -SRSASN_CODE cag_id_info_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(manual_ca_gsel_allowed_r16_present, 1)); - - HANDLE_CODE(cag_id_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cag_id_info_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(manual_ca_gsel_allowed_r16_present, 1)); - - HANDLE_CODE(cag_id_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void cag_id_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("cag-Identity-r16", cag_id_r16.to_string()); - if (manual_ca_gsel_allowed_r16_present) { - j.write_str("manualCAGselectionAllowed-r16", "true"); - } - j.end_obj(); -} - -// NPN-Identity-r16 ::= CHOICE -void npn_id_r16_c::destroy_() -{ - switch (type_) { - case types::pni_npn_r16: - c.destroy(); - break; - case types::snpn_r16: - c.destroy(); - break; - default: - break; - } -} -void npn_id_r16_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::pni_npn_r16: - c.init(); - break; - case types::snpn_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "npn_id_r16_c"); - } -} -npn_id_r16_c::npn_id_r16_c(const npn_id_r16_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::pni_npn_r16: - c.init(other.c.get()); - break; - case types::snpn_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "npn_id_r16_c"); - } -} -npn_id_r16_c& npn_id_r16_c::operator=(const npn_id_r16_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::pni_npn_r16: - c.set(other.c.get()); - break; - case types::snpn_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "npn_id_r16_c"); - } - - return *this; -} -npn_id_r16_c::pni_npn_r16_s_& npn_id_r16_c::set_pni_npn_r16() -{ - set(types::pni_npn_r16); - return c.get(); -} -npn_id_r16_c::snpn_r16_s_& npn_id_r16_c::set_snpn_r16() -{ - set(types::snpn_r16); - return c.get(); -} -void npn_id_r16_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::pni_npn_r16: - j.write_fieldname("pni-npn-r16"); - j.start_obj(); - j.write_fieldname("plmn-Identity-r16"); - c.get().plmn_id_r16.to_json(j); - j.start_array("cag-IdentityList-r16"); - for (const auto& e1 : c.get().cag_id_list_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); - break; - case types::snpn_r16: - j.write_fieldname("snpn-r16"); - j.start_obj(); - j.write_fieldname("plmn-Identity-r16"); - c.get().plmn_id_r16.to_json(j); - j.start_array("nid-List-r16"); - for (const auto& e1 : c.get().nid_list_r16) { - j.write_str(e1.to_string()); - } - j.end_array(); - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "npn_id_r16_c"); - } - j.end_obj(); -} -SRSASN_CODE npn_id_r16_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::pni_npn_r16: - HANDLE_CODE(c.get().plmn_id_r16.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, c.get().cag_id_list_r16, 1, 12)); - break; - case types::snpn_r16: - HANDLE_CODE(c.get().plmn_id_r16.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, c.get().nid_list_r16, 1, 12)); - break; - default: - log_invalid_choice_id(type_, "npn_id_r16_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE npn_id_r16_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::pni_npn_r16: - HANDLE_CODE(c.get().plmn_id_r16.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(c.get().cag_id_list_r16, bref, 1, 12)); - break; - case types::snpn_r16: - HANDLE_CODE(c.get().plmn_id_r16.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(c.get().nid_list_r16, bref, 1, 12)); - break; - default: - log_invalid_choice_id(type_, "npn_id_r16_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// NPN-IdentityInfo-r16 ::= SEQUENCE -SRSASN_CODE npn_id_info_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ranac_r16_present, 1)); - HANDLE_CODE(bref.pack(iab_support_r16_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, npn_id_list_r16, 1, 12)); - HANDLE_CODE(tac_r16.pack(bref)); - if (ranac_r16_present) { - HANDLE_CODE(pack_integer(bref, ranac_r16, (uint16_t)0u, (uint16_t)255u)); - } - HANDLE_CODE(cell_id_r16.pack(bref)); - HANDLE_CODE(cell_reserved_for_oper_r16.pack(bref)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= gnb_id_len_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(gnb_id_len_r17_present, 1)); - if (gnb_id_len_r17_present) { - HANDLE_CODE(pack_integer(bref, gnb_id_len_r17, (uint8_t)22u, (uint8_t)32u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE npn_id_info_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ranac_r16_present, 1)); - HANDLE_CODE(bref.unpack(iab_support_r16_present, 1)); - - HANDLE_CODE(unpack_dyn_seq_of(npn_id_list_r16, bref, 1, 12)); - HANDLE_CODE(tac_r16.unpack(bref)); - if (ranac_r16_present) { - HANDLE_CODE(unpack_integer(ranac_r16, bref, (uint16_t)0u, (uint16_t)255u)); - } - HANDLE_CODE(cell_id_r16.unpack(bref)); - HANDLE_CODE(cell_reserved_for_oper_r16.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(gnb_id_len_r17_present, 1)); - if (gnb_id_len_r17_present) { - HANDLE_CODE(unpack_integer(gnb_id_len_r17, bref, (uint8_t)22u, (uint8_t)32u)); - } - } - } - return SRSASN_SUCCESS; -} -void npn_id_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("npn-IdentityList-r16"); - for (const auto& e1 : npn_id_list_r16) { - e1.to_json(j); - } - j.end_array(); - j.write_str("trackingAreaCode-r16", tac_r16.to_string()); - if (ranac_r16_present) { - j.write_int("ranac-r16", ranac_r16); - } - j.write_str("cellIdentity-r16", cell_id_r16.to_string()); - j.write_str("cellReservedForOperatorUse-r16", cell_reserved_for_oper_r16.to_string()); - if (iab_support_r16_present) { - j.write_str("iab-Support-r16", "true"); - } - if (ext) { - if (gnb_id_len_r17_present) { - j.write_int("gNB-ID-Length-r17", gnb_id_len_r17); - } - } - j.end_obj(); -} - -const char* npn_id_info_r16_s::cell_reserved_for_oper_r16_opts::to_string() const -{ - static const char* names[] = {"reserved", "notReserved"}; - return convert_enum_idx(names, 2, value, "npn_id_info_r16_s::cell_reserved_for_oper_r16_e_"); -} - -// PLMN-IdentityInfo ::= SEQUENCE -SRSASN_CODE plmn_id_info_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(tac_present, 1)); - HANDLE_CODE(bref.pack(ranac_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list, 1, 12)); - if (tac_present) { - HANDLE_CODE(tac.pack(bref)); - } - if (ranac_present) { - HANDLE_CODE(pack_integer(bref, ranac, (uint16_t)0u, (uint16_t)255u)); - } - HANDLE_CODE(cell_id.pack(bref)); - HANDLE_CODE(cell_reserved_for_oper.pack(bref)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= iab_support_r16_present; - group_flags[1] |= tracking_area_list_r17.is_present(); - group_flags[1] |= gnb_id_len_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(iab_support_r16_present, 1)); - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(tracking_area_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(gnb_id_len_r17_present, 1)); - if (tracking_area_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *tracking_area_list_r17, 1, 12)); - } - if (gnb_id_len_r17_present) { - HANDLE_CODE(pack_integer(bref, gnb_id_len_r17, (uint8_t)22u, (uint8_t)32u)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE plmn_id_info_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(tac_present, 1)); - HANDLE_CODE(bref.unpack(ranac_present, 1)); - - HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list, bref, 1, 12)); - if (tac_present) { - HANDLE_CODE(tac.unpack(bref)); - } - if (ranac_present) { - HANDLE_CODE(unpack_integer(ranac, bref, (uint16_t)0u, (uint16_t)255u)); - } - HANDLE_CODE(cell_id.unpack(bref)); - HANDLE_CODE(cell_reserved_for_oper.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(iab_support_r16_present, 1)); - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(tracking_area_list_r17, bref); - HANDLE_CODE(bref.unpack(gnb_id_len_r17_present, 1)); - if (tracking_area_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*tracking_area_list_r17, bref, 1, 12)); - } - if (gnb_id_len_r17_present) { - HANDLE_CODE(unpack_integer(gnb_id_len_r17, bref, (uint8_t)22u, (uint8_t)32u)); - } - } - } - return SRSASN_SUCCESS; -} -void plmn_id_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("plmn-IdentityList"); - for (const auto& e1 : plmn_id_list) { - e1.to_json(j); - } - j.end_array(); - if (tac_present) { - j.write_str("trackingAreaCode", tac.to_string()); - } - if (ranac_present) { - j.write_int("ranac", ranac); - } - j.write_str("cellIdentity", cell_id.to_string()); - j.write_str("cellReservedForOperatorUse", cell_reserved_for_oper.to_string()); - if (ext) { - if (iab_support_r16_present) { - j.write_str("iab-Support-r16", "true"); - } - if (tracking_area_list_r17.is_present()) { - j.start_array("trackingAreaList-r17"); - for (const auto& e1 : *tracking_area_list_r17) { - j.write_str(e1.to_string()); - } - j.end_array(); - } - if (gnb_id_len_r17_present) { - j.write_int("gNB-ID-Length-r17", gnb_id_len_r17); - } - } - j.end_obj(); -} - -const char* plmn_id_info_s::cell_reserved_for_oper_opts::to_string() const -{ - static const char* names[] = {"reserved", "notReserved"}; - return convert_enum_idx(names, 2, value, "plmn_id_info_s::cell_reserved_for_oper_e_"); -} - -// PLMN-Identity-EUTRA-5GC ::= CHOICE -void plmn_id_eutra_5_gc_c::destroy_() -{ - switch (type_) { - case types::plmn_id_eutra_5_gc: - c.destroy(); - break; - default: - break; - } -} -void plmn_id_eutra_5_gc_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::plmn_id_eutra_5_gc: - c.init(); - break; - case types::plmn_idx: - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "plmn_id_eutra_5_gc_c"); - } -} -plmn_id_eutra_5_gc_c::plmn_id_eutra_5_gc_c(const plmn_id_eutra_5_gc_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::plmn_id_eutra_5_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_5_gc_c"); - } -} -plmn_id_eutra_5_gc_c& plmn_id_eutra_5_gc_c::operator=(const plmn_id_eutra_5_gc_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::plmn_id_eutra_5_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_5_gc_c"); - } - - return *this; -} -plmn_id_s& plmn_id_eutra_5_gc_c::set_plmn_id_eutra_5_gc() -{ - set(types::plmn_id_eutra_5_gc); - return c.get(); -} -uint8_t& plmn_id_eutra_5_gc_c::set_plmn_idx() -{ - set(types::plmn_idx); - return c.get(); -} -void plmn_id_eutra_5_gc_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::plmn_id_eutra_5_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_5_gc_c"); - } - j.end_obj(); -} -SRSASN_CODE plmn_id_eutra_5_gc_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::plmn_id_eutra_5_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_5_gc_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE plmn_id_eutra_5_gc_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::plmn_id_eutra_5_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_5_gc_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// CellIdentity-EUTRA-5GC ::= CHOICE -void cell_id_eutra_5_gc_c::destroy_() -{ - switch (type_) { - case types::cell_id_eutra: - c.destroy>(); - break; - default: - break; - } -} -void cell_id_eutra_5_gc_c::set(types::options e) -{ - 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_5_gc_c"); - } -} -cell_id_eutra_5_gc_c::cell_id_eutra_5_gc_c(const cell_id_eutra_5_gc_c& other) -{ - 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_5_gc_c"); - } -} -cell_id_eutra_5_gc_c& cell_id_eutra_5_gc_c::operator=(const cell_id_eutra_5_gc_c& other) -{ - 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_5_gc_c"); - } - - return *this; -} -fixed_bitstring<28>& cell_id_eutra_5_gc_c::set_cell_id_eutra() -{ - set(types::cell_id_eutra); - return c.get>(); -} -uint8_t& cell_id_eutra_5_gc_c::set_cell_id_idx() -{ - set(types::cell_id_idx); - return c.get(); -} -void cell_id_eutra_5_gc_c::to_json(json_writer& j) 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_5_gc_c"); - } - j.end_obj(); -} -SRSASN_CODE cell_id_eutra_5_gc_c::pack(bit_ref& bref) 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_5_gc_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cell_id_eutra_5_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_5_gc_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// FrequencyComponent-r17 ::= ENUMERATED -const char* freq_component_r17_opts::to_string() const -{ - static const char* names[] = {"activeCarrier", "configuredCarrier", "activeBWP", "configuredBWP"}; - return convert_enum_idx(names, 4, value, "freq_component_r17_e"); -} - -// MeasQuantityResults ::= SEQUENCE -SRSASN_CODE meas_quant_results_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)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_quant_results_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)); - } - - return SRSASN_SUCCESS; -} -void meas_quant_results_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(); -} - -// CellAccessRelatedInfo-EUTRA-5GC ::= SEQUENCE -SRSASN_CODE cell_access_related_info_eutra_5_gc_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ranac_5gc_present, 1)); - - HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_eutra_5gc, 1, 12)); - HANDLE_CODE(tac_eutra_5gc.pack(bref)); - if (ranac_5gc_present) { - HANDLE_CODE(pack_integer(bref, ranac_5gc, (uint16_t)0u, (uint16_t)255u)); - } - HANDLE_CODE(cell_id_eutra_5gc.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE cell_access_related_info_eutra_5_gc_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ranac_5gc_present, 1)); - - HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_eutra_5gc, bref, 1, 12)); - HANDLE_CODE(tac_eutra_5gc.unpack(bref)); - if (ranac_5gc_present) { - HANDLE_CODE(unpack_integer(ranac_5gc, bref, (uint16_t)0u, (uint16_t)255u)); - } - HANDLE_CODE(cell_id_eutra_5gc.unpack(bref)); - - return SRSASN_SUCCESS; -} -void cell_access_related_info_eutra_5_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_5gc) { - e1.to_json(j); - } - j.end_array(); - j.write_str("trackingAreaCode-eutra-5gc", tac_eutra_5gc.to_string()); - if (ranac_5gc_present) { - j.write_int("ranac-5gc", ranac_5gc); - } - j.write_fieldname("cellIdentity-eutra-5gc"); - cell_id_eutra_5gc.to_json(j); - j.end_obj(); -} - -// CellAccessRelatedInfo-EUTRA-EPC ::= SEQUENCE -SRSASN_CODE cell_access_related_info_eutra_epc_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)); - - 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(); -} - -// DefaultDC-Location-r17 ::= CHOICE -void default_dc_location_r17_c::destroy_() {} -void default_dc_location_r17_c::set(types::options e) -{ - destroy_(); - type_ = e; -} -default_dc_location_r17_c::default_dc_location_r17_c(const default_dc_location_r17_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::ul: - c.init(other.c.get()); - break; - case types::dl: - c.init(other.c.get()); - break; - case types::ul_and_dl: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "default_dc_location_r17_c"); - } -} -default_dc_location_r17_c& default_dc_location_r17_c::operator=(const default_dc_location_r17_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ul: - c.set(other.c.get()); - break; - case types::dl: - c.set(other.c.get()); - break; - case types::ul_and_dl: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "default_dc_location_r17_c"); - } - - return *this; -} -freq_component_r17_e& default_dc_location_r17_c::set_ul() -{ - set(types::ul); - return c.get(); -} -freq_component_r17_e& default_dc_location_r17_c::set_dl() -{ - set(types::dl); - return c.get(); -} -freq_component_r17_e& default_dc_location_r17_c::set_ul_and_dl() -{ - set(types::ul_and_dl); - return c.get(); -} -void default_dc_location_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ul: - j.write_str("ul", c.get().to_string()); - break; - case types::dl: - j.write_str("dl", c.get().to_string()); - break; - case types::ul_and_dl: - j.write_str("ulAndDL", c.get().to_string()); - break; - default: - log_invalid_choice_id(type_, "default_dc_location_r17_c"); - } - j.end_obj(); -} -SRSASN_CODE default_dc_location_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ul: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::dl: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::ul_and_dl: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "default_dc_location_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE default_dc_location_r17_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ul: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::dl: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::ul_and_dl: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "default_dc_location_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// OffsetValue-r17 ::= SEQUENCE -SRSASN_CODE offset_value_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, offset_value_r17, (int16_t)-20000, (int16_t)20000)); - HANDLE_CODE(bref.pack(shift7dot5k_hz_r17, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE offset_value_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(offset_value_r17, bref, (int16_t)-20000, (int16_t)20000)); - HANDLE_CODE(bref.unpack(shift7dot5k_hz_r17, 1)); - - return SRSASN_SUCCESS; -} -void offset_value_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("offsetValue-r17", offset_value_r17); - j.write_bool("shift7dot5kHz-r17", shift7dot5k_hz_r17); - j.end_obj(); -} - -// 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 results_per_csi_rs_idx_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(csi_rs_results_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)); - } - - return SRSASN_SUCCESS; -} -void results_per_csi_rs_idx_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); - } - j.end_obj(); -} - -// ResultsPerSSB-Index ::= SEQUENCE -SRSASN_CODE results_per_ssb_idx_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)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE results_per_ssb_idx_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)); - } - - 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(); -} - -// CC-Group-r17 ::= SEQUENCE -SRSASN_CODE cc_group_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(serv_cell_idx_higher_r17_present, 1)); - HANDLE_CODE(bref.pack(offset_to_default_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, serv_cell_idx_lower_r17, (uint8_t)0u, (uint8_t)31u)); - if (serv_cell_idx_higher_r17_present) { - HANDLE_CODE(pack_integer(bref, serv_cell_idx_higher_r17, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(default_dc_location_r17.pack(bref)); - if (offset_to_default_r17_present) { - HANDLE_CODE(offset_to_default_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cc_group_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(serv_cell_idx_higher_r17_present, 1)); - HANDLE_CODE(bref.unpack(offset_to_default_r17_present, 1)); - - HANDLE_CODE(unpack_integer(serv_cell_idx_lower_r17, bref, (uint8_t)0u, (uint8_t)31u)); - if (serv_cell_idx_higher_r17_present) { - HANDLE_CODE(unpack_integer(serv_cell_idx_higher_r17, bref, (uint8_t)0u, (uint8_t)31u)); - } - HANDLE_CODE(default_dc_location_r17.unpack(bref)); - if (offset_to_default_r17_present) { - HANDLE_CODE(offset_to_default_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void cc_group_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("servCellIndexLower-r17", serv_cell_idx_lower_r17); - if (serv_cell_idx_higher_r17_present) { - j.write_int("servCellIndexHigher-r17", serv_cell_idx_higher_r17); - } - j.write_fieldname("defaultDC-Location-r17"); - default_dc_location_r17.to_json(j); - if (offset_to_default_r17_present) { - j.write_fieldname("offsetToDefault-r17"); - offset_to_default_r17.to_json(j); - } - j.end_obj(); -} - -void cc_group_r17_s::offset_to_default_r17_c_::destroy_() -{ - switch (type_) { - case types::offset_value: - c.destroy(); - break; - case types::offsetlist: - c.destroy(); - break; - default: - break; - } -} -void cc_group_r17_s::offset_to_default_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::offset_value: - c.init(); - break; - case types::offsetlist: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cc_group_r17_s::offset_to_default_r17_c_"); - } -} -cc_group_r17_s::offset_to_default_r17_c_::offset_to_default_r17_c_( - const cc_group_r17_s::offset_to_default_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::offset_value: - c.init(other.c.get()); - break; - case types::offsetlist: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cc_group_r17_s::offset_to_default_r17_c_"); - } -} -cc_group_r17_s::offset_to_default_r17_c_& -cc_group_r17_s::offset_to_default_r17_c_::operator=(const cc_group_r17_s::offset_to_default_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::offset_value: - c.set(other.c.get()); - break; - case types::offsetlist: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cc_group_r17_s::offset_to_default_r17_c_"); - } - - return *this; -} -offset_value_r17_s& cc_group_r17_s::offset_to_default_r17_c_::set_offset_value() -{ - set(types::offset_value); - return c.get(); -} -cc_group_r17_s::offset_to_default_r17_c_::offsetlist_l_& cc_group_r17_s::offset_to_default_r17_c_::set_offsetlist() -{ - set(types::offsetlist); - return c.get(); -} -void cc_group_r17_s::offset_to_default_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::offset_value: - j.write_fieldname("offsetValue"); - c.get().to_json(j); - break; - case types::offsetlist: - j.start_array("offsetlist"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); - break; - default: - log_invalid_choice_id(type_, "cc_group_r17_s::offset_to_default_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE cc_group_r17_s::offset_to_default_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::offset_value: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::offsetlist: - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 128)); - break; - default: - log_invalid_choice_id(type_, "cc_group_r17_s::offset_to_default_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cc_group_r17_s::offset_to_default_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::offset_value: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::offsetlist: - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 128)); - break; - default: - log_invalid_choice_id(type_, "cc_group_r17_s::offset_to_default_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// CGI-InfoEUTRA ::= SEQUENCE -SRSASN_CODE cgi_info_eutra_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(cgi_info_epc_present, 1)); - HANDLE_CODE(bref.pack(cgi_info_5_gc.size() > 0, 1)); - HANDLE_CODE(bref.pack(multi_band_info_list.size() > 0, 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.size() > 0, 1)); - HANDLE_CODE(cgi_info_epc.cgi_info_epc_legacy.pack(bref)); - if (cgi_info_epc.cgi_info_epc_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cgi_info_epc.cgi_info_epc_list, 1, 12)); - } - } - if (cgi_info_5_gc.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, cgi_info_5_gc, 1, 12)); - } - HANDLE_CODE(pack_integer(bref, freq_band_ind, (uint16_t)1u, (uint16_t)256u)); - if (multi_band_info_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list, 1, 8, integer_packer(1, 256))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cgi_info_eutra_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(cgi_info_epc_present, 1)); - bool cgi_info_5_gc_present; - HANDLE_CODE(bref.unpack(cgi_info_5_gc_present, 1)); - bool multi_band_info_list_present; - 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) { - bool cgi_info_epc_list_present; - HANDLE_CODE(bref.unpack(cgi_info_epc_list_present, 1)); - HANDLE_CODE(cgi_info_epc.cgi_info_epc_legacy.unpack(bref)); - if (cgi_info_epc_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(cgi_info_epc.cgi_info_epc_list, bref, 1, 12)); - } - } - if (cgi_info_5_gc_present) { - HANDLE_CODE(unpack_dyn_seq_of(cgi_info_5_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 cgi_info_eutra_s::to_json(json_writer& j) const -{ - j.start_obj(); - 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.size() > 0) { - 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_5_gc.size() > 0) { - j.start_array("cgi-info-5GC"); - for (const auto& e1 : cgi_info_5_gc) { - e1.to_json(j); - } - j.end_array(); - } - j.write_int("freqBandIndicator", freq_band_ind); - if (multi_band_info_list.size() > 0) { - 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(); -} - -// CGI-InfoNR ::= SEQUENCE -SRSASN_CODE cgi_info_nr_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(plmn_id_info_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(freq_band_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(no_sib1_present, 1)); - - if (plmn_id_info_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_info_list, 1, 12)); - } - if (freq_band_list.size() > 0) { - 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)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= npn_id_info_list_r16.is_present(); - group_flags[1] |= cell_reserved_for_other_use_r16_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(npn_id_info_list_r16.is_present(), 1)); - if (npn_id_info_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *npn_id_info_list_r16, 1, 12)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(cell_reserved_for_other_use_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cgi_info_nr_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool plmn_id_info_list_present; - HANDLE_CODE(bref.unpack(plmn_id_info_list_present, 1)); - bool freq_band_list_present; - HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); - HANDLE_CODE(bref.unpack(no_sib1_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)); - } - - 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); - - unpack_presence_flag(npn_id_info_list_r16, bref); - if (npn_id_info_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*npn_id_info_list_r16, bref, 1, 12)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(cell_reserved_for_other_use_r16_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void cgi_info_nr_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (plmn_id_info_list.size() > 0) { - j.start_array("plmn-IdentityInfoList"); - for (const auto& e1 : plmn_id_info_list) { - e1.to_json(j); - } - j.end_array(); - } - if (freq_band_list.size() > 0) { - 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(); - } - if (ext) { - if (npn_id_info_list_r16.is_present()) { - j.start_array("npn-IdentityInfoList-r16"); - for (const auto& e1 : *npn_id_info_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (cell_reserved_for_other_use_r16_present) { - j.write_str("cellReservedForOtherUse-r16", "true"); - } - } - j.end_obj(); -} - -// MeasQuantityResultsEUTRA ::= SEQUENCE -SRSASN_CODE meas_quant_results_eutra_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)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; -} -SRSASN_CODE meas_quant_results_eutra_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)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(); -} - -// NeedForNCSG-IntraFreq-r17 ::= SEQUENCE -SRSASN_CODE need_for_ncsg_intra_freq_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, serv_cell_id_r17, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(gap_ind_intra_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE need_for_ncsg_intra_freq_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(serv_cell_id_r17, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(gap_ind_intra_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void need_for_ncsg_intra_freq_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("servCellId-r17", serv_cell_id_r17); - j.write_str("gapIndicationIntra-r17", gap_ind_intra_r17.to_string()); - j.end_obj(); -} - -const char* need_for_ncsg_intra_freq_r17_s::gap_ind_intra_r17_opts::to_string() const -{ - static const char* names[] = {"gap", "ncsg", "nogap-noncsg"}; - return convert_enum_idx(names, 3, value, "need_for_ncsg_intra_freq_r17_s::gap_ind_intra_r17_e_"); -} - -// NeedForNCSG-NR-r17 ::= SEQUENCE -SRSASN_CODE need_for_ncsg_nr_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, band_nr_r17, (uint16_t)1u, (uint16_t)1024u)); - HANDLE_CODE(gap_ind_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE need_for_ncsg_nr_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(band_nr_r17, bref, (uint16_t)1u, (uint16_t)1024u)); - HANDLE_CODE(gap_ind_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void need_for_ncsg_nr_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("bandNR-r17", band_nr_r17); - j.write_str("gapIndication-r17", gap_ind_r17.to_string()); - j.end_obj(); -} - -const char* need_for_ncsg_nr_r17_s::gap_ind_r17_opts::to_string() const -{ - static const char* names[] = {"gap", "ncsg", "nogap-noncsg"}; - return convert_enum_idx(names, 3, value, "need_for_ncsg_nr_r17_s::gap_ind_r17_e_"); -} - -// PerRAAttemptInfo-r16 ::= SEQUENCE -SRSASN_CODE per_ra_attempt_info_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(contention_detected_r16_present, 1)); - HANDLE_CODE(bref.pack(dl_rsrp_above_thres_r16_present, 1)); - - if (contention_detected_r16_present) { - HANDLE_CODE(bref.pack(contention_detected_r16, 1)); - } - if (dl_rsrp_above_thres_r16_present) { - HANDLE_CODE(bref.pack(dl_rsrp_above_thres_r16, 1)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= fallback_to_four_step_ra_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(fallback_to_four_step_ra_r17_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE per_ra_attempt_info_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(contention_detected_r16_present, 1)); - HANDLE_CODE(bref.unpack(dl_rsrp_above_thres_r16_present, 1)); - - if (contention_detected_r16_present) { - HANDLE_CODE(bref.unpack(contention_detected_r16, 1)); - } - if (dl_rsrp_above_thres_r16_present) { - HANDLE_CODE(bref.unpack(dl_rsrp_above_thres_r16, 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(fallback_to_four_step_ra_r17_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void per_ra_attempt_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (contention_detected_r16_present) { - j.write_bool("contentionDetected-r16", contention_detected_r16); - } - if (dl_rsrp_above_thres_r16_present) { - j.write_bool("dlRSRPAboveThreshold-r16", dl_rsrp_above_thres_r16); - } - if (ext) { - if (fallback_to_four_step_ra_r17_present) { - j.write_str("fallbackToFourStepRA-r17", "true"); - } - } - j.end_obj(); -} - -// MeasResultEUTRA ::= SEQUENCE -SRSASN_CODE meas_result_eutra_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(cgi_info_present, 1)); - - 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)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_eutra_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(cgi_info.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void meas_result_eutra_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"); - cgi_info.to_json(j); - } - j.end_obj(); -} - -// MeasResultLoggingNR-r16 ::= SEQUENCE -SRSASN_CODE meas_result_logging_nr_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(nof_good_ssb_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(results_ssb_cell_r16.pack(bref)); - if (nof_good_ssb_r16_present) { - HANDLE_CODE(pack_integer(bref, nof_good_ssb_r16, (uint8_t)1u, (uint8_t)64u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_logging_nr_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(nof_good_ssb_r16_present, 1)); - - HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(results_ssb_cell_r16.unpack(bref)); - if (nof_good_ssb_r16_present) { - HANDLE_CODE(unpack_integer(nof_good_ssb_r16, bref, (uint8_t)1u, (uint8_t)64u)); - } - - return SRSASN_SUCCESS; -} -void meas_result_logging_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("physCellId-r16", pci_r16); - j.write_fieldname("resultsSSB-Cell-r16"); - results_ssb_cell_r16.to_json(j); - if (nof_good_ssb_r16_present) { - j.write_int("numberOfGoodSSB-r16", nof_good_ssb_r16); - } - j.end_obj(); -} - -// MeasResultNR ::= SEQUENCE -SRSASN_CODE meas_result_nr_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(pci_present, 1)); - - 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)); - } - 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result.rs_idx_results.results_csi_rs_idxes.size() > 0, 1)); - if (meas_result.rs_idx_results.results_ssb_idxes.size() > 0) { - 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.size() > 0) { - 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] |= cgi_info.is_present(); - group_flags[1] |= cho_candidate_r17_present; - group_flags[1] |= cho_cfg_r17.is_present(); - group_flags[1] |= triggered_event_r17.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)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(cho_candidate_r17_present, 1)); - HANDLE_CODE(bref.pack(cho_cfg_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(triggered_event_r17.is_present(), 1)); - if (cho_cfg_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *cho_cfg_r17, 1, 2)); - } - if (triggered_event_r17.is_present()) { - HANDLE_CODE(bref.pack(triggered_event_r17->time_between_events_r17_present, 1)); - HANDLE_CODE(bref.pack(triggered_event_r17->first_triggered_event_present, 1)); - if (triggered_event_r17->time_between_events_r17_present) { - HANDLE_CODE(pack_integer(bref, triggered_event_r17->time_between_events_r17, (uint16_t)0u, (uint16_t)1023u)); - } - if (triggered_event_r17->first_triggered_event_present) { - HANDLE_CODE(triggered_event_r17->first_triggered_event.pack(bref)); - } - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_nr_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(pci_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)); - } - 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) { - bool results_ssb_idxes_present; - HANDLE_CODE(bref.unpack(results_ssb_idxes_present, 1)); - bool results_csi_rs_idxes_present; - HANDLE_CODE(bref.unpack(results_csi_rs_idxes_present, 1)); - if (results_ssb_idxes_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result.rs_idx_results.results_ssb_idxes, bref, 1, 64)); - } - if (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) { - ext_groups_unpacker_guard group_flags(2); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(cgi_info, bref); - if (cgi_info.is_present()) { - HANDLE_CODE(cgi_info->unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(cho_candidate_r17_present, 1)); - unpack_presence_flag(cho_cfg_r17, bref); - unpack_presence_flag(triggered_event_r17, bref); - if (cho_cfg_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*cho_cfg_r17, bref, 1, 2)); - } - if (triggered_event_r17.is_present()) { - HANDLE_CODE(bref.unpack(triggered_event_r17->time_between_events_r17_present, 1)); - HANDLE_CODE(bref.unpack(triggered_event_r17->first_triggered_event_present, 1)); - if (triggered_event_r17->time_between_events_r17_present) { - HANDLE_CODE( - unpack_integer(triggered_event_r17->time_between_events_r17, bref, (uint16_t)0u, (uint16_t)1023u)); - } - if (triggered_event_r17->first_triggered_event_present) { - HANDLE_CODE(triggered_event_r17->first_triggered_event.unpack(bref)); - } - } - } - } - return SRSASN_SUCCESS; -} -void meas_result_nr_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (pci_present) { - j.write_int("physCellId", pci); - } - 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 (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_obj(); - if (meas_result.rs_idx_results_present) { - j.write_fieldname("rsIndexResults"); - j.start_obj(); - if (meas_result.rs_idx_results.results_ssb_idxes.size() > 0) { - 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.size() > 0) { - 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); - } - if (cho_candidate_r17_present) { - j.write_str("choCandidate-r17", "true"); - } - if (cho_cfg_r17.is_present()) { - j.start_array("choConfig-r17"); - for (const auto& e1 : *cho_cfg_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (triggered_event_r17.is_present()) { - j.write_fieldname("triggeredEvent-r17"); - j.start_obj(); - if (triggered_event_r17->time_between_events_r17_present) { - j.write_int("timeBetweenEvents-r17", triggered_event_r17->time_between_events_r17); - } - if (triggered_event_r17->first_triggered_event_present) { - j.write_str("firstTriggeredEvent", triggered_event_r17->first_triggered_event.to_string()); - } - j.end_obj(); - } - } - j.end_obj(); -} - -const char* meas_result_nr_s::triggered_event_r17_s_::first_triggered_event_opts::to_string() const -{ - static const char* names[] = {"condFirstEvent", "condSecondEvent"}; - return convert_enum_idx(names, 2, value, "meas_result_nr_s::triggered_event_r17_s_::first_triggered_event_e_"); -} - -// NeedForNCSG-EUTRA-r17 ::= SEQUENCE -SRSASN_CODE need_for_ncsg_eutra_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, band_eutra_r17, (uint16_t)1u, (uint16_t)256u)); - HANDLE_CODE(gap_ind_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE need_for_ncsg_eutra_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(band_eutra_r17, bref, (uint16_t)1u, (uint16_t)256u)); - HANDLE_CODE(gap_ind_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void need_for_ncsg_eutra_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("bandEUTRA-r17", band_eutra_r17); - j.write_str("gapIndication-r17", gap_ind_r17.to_string()); - j.end_obj(); -} - -const char* need_for_ncsg_eutra_r17_s::gap_ind_r17_opts::to_string() const -{ - static const char* names[] = {"gap", "ncsg", "nogap-noncsg"}; - return convert_enum_idx(names, 3, value, "need_for_ncsg_eutra_r17_s::gap_ind_r17_e_"); -} - -// SL-QoS-Info-r16 ::= SEQUENCE -SRSASN_CODE sl_qos_info_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sl_qos_profile_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, sl_qos_flow_id_r16, (uint16_t)1u, (uint16_t)2048u)); - if (sl_qos_profile_r16_present) { - HANDLE_CODE(sl_qos_profile_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_qos_info_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sl_qos_profile_r16_present, 1)); - - HANDLE_CODE(unpack_integer(sl_qos_flow_id_r16, bref, (uint16_t)1u, (uint16_t)2048u)); - if (sl_qos_profile_r16_present) { - HANDLE_CODE(sl_qos_profile_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sl_qos_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("sl-QoS-FlowIdentity-r16", sl_qos_flow_id_r16); - if (sl_qos_profile_r16_present) { - j.write_fieldname("sl-QoS-Profile-r16"); - sl_qos_profile_r16.to_json(j); - } - j.end_obj(); -} - -// UplinkTxDirectCurrentCarrierInfo-r16 ::= SEQUENCE -SRSASN_CODE ul_tx_direct_current_carrier_info_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, serv_cell_idx_r16, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(serv_cell_info_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_tx_direct_current_carrier_info_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(serv_cell_idx_r16, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(serv_cell_info_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ul_tx_direct_current_carrier_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("servCellIndex-r16", serv_cell_idx_r16); - j.write_fieldname("servCellInfo-r16"); - serv_cell_info_r16.to_json(j); - j.end_obj(); -} - -void ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::set(types::options e) -{ - type_ = e; -} -uint8_t& ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::set_bwp_id_r16() -{ - set(types::bwp_id_r16); - return c; -} -void ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::set_deactiv_carrier_r16() -{ - set(types::deactiv_carrier_r16); -} -void ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::bwp_id_r16: - j.write_int("bwp-Id-r16", c); - break; - case types::deactiv_carrier_r16: - break; - default: - log_invalid_choice_id(type_, "ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::bwp_id_r16: - HANDLE_CODE(pack_integer(bref, c, (uint8_t)0u, (uint8_t)4u)); - break; - case types::deactiv_carrier_r16: - break; - default: - log_invalid_choice_id(type_, "ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::bwp_id_r16: - HANDLE_CODE(unpack_integer(c, bref, (uint8_t)0u, (uint8_t)4u)); - break; - case types::deactiv_carrier_r16: - break; - default: - log_invalid_choice_id(type_, "ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// UplinkTxDirectCurrentTwoCarrierInfo-r16 ::= SEQUENCE -SRSASN_CODE ul_tx_direct_current_two_carrier_info_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, ref_carrier_idx_r16, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(bref.pack(shift7dot5k_hz_r16, 1)); - HANDLE_CODE(pack_integer(bref, tx_direct_current_location_r16, (uint16_t)0u, (uint16_t)3301u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_tx_direct_current_two_carrier_info_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(ref_carrier_idx_r16, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(bref.unpack(shift7dot5k_hz_r16, 1)); - HANDLE_CODE(unpack_integer(tx_direct_current_location_r16, bref, (uint16_t)0u, (uint16_t)3301u)); - - return SRSASN_SUCCESS; -} -void ul_tx_direct_current_two_carrier_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("referenceCarrierIndex-r16", ref_carrier_idx_r16); - j.write_bool("shift7dot5kHz-r16", shift7dot5k_hz_r16); - j.write_int("txDirectCurrentLocation-r16", tx_direct_current_location_r16); - j.end_obj(); -} - -// WLAN-Identifiers-r16 ::= SEQUENCE -SRSASN_CODE wlan_ids_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ssid_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(bssid_r16_present, 1)); - HANDLE_CODE(bref.pack(hessid_r16_present, 1)); - - if (ssid_r16.size() > 0) { - HANDLE_CODE(ssid_r16.pack(bref)); - } - if (bssid_r16_present) { - HANDLE_CODE(bssid_r16.pack(bref)); - } - if (hessid_r16_present) { - HANDLE_CODE(hessid_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE wlan_ids_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool ssid_r16_present; - HANDLE_CODE(bref.unpack(ssid_r16_present, 1)); - HANDLE_CODE(bref.unpack(bssid_r16_present, 1)); - HANDLE_CODE(bref.unpack(hessid_r16_present, 1)); - - if (ssid_r16_present) { - HANDLE_CODE(ssid_r16.unpack(bref)); - } - if (bssid_r16_present) { - HANDLE_CODE(bssid_r16.unpack(bref)); - } - if (hessid_r16_present) { - HANDLE_CODE(hessid_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void wlan_ids_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ssid_r16.size() > 0) { - j.write_str("ssid-r16", ssid_r16.to_string()); - } - if (bssid_r16_present) { - j.write_str("bssid-r16", bssid_r16.to_string()); - } - if (hessid_r16_present) { - j.write_str("hessid-r16", hessid_r16.to_string()); - } - j.end_obj(); -} - -// WLAN-RTT-r16 ::= SEQUENCE -SRSASN_CODE wlan_rtt_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(rtt_accuracy_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, rtt_value_r16, (uint32_t)0u, (uint32_t)16777215u)); - HANDLE_CODE(rtt_units_r16.pack(bref)); - if (rtt_accuracy_r16_present) { - HANDLE_CODE(pack_integer(bref, rtt_accuracy_r16, (uint16_t)0u, (uint16_t)255u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE wlan_rtt_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(rtt_accuracy_r16_present, 1)); - - HANDLE_CODE(unpack_integer(rtt_value_r16, bref, (uint32_t)0u, (uint32_t)16777215u)); - HANDLE_CODE(rtt_units_r16.unpack(bref)); - if (rtt_accuracy_r16_present) { - HANDLE_CODE(unpack_integer(rtt_accuracy_r16, bref, (uint16_t)0u, (uint16_t)255u)); - } - - return SRSASN_SUCCESS; -} -void wlan_rtt_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("rttValue-r16", rtt_value_r16); - j.write_str("rttUnits-r16", rtt_units_r16.to_string()); - if (rtt_accuracy_r16_present) { - j.write_int("rttAccuracy-r16", rtt_accuracy_r16); - } - j.end_obj(); -} - -const char* wlan_rtt_r16_s::rtt_units_r16_opts::to_string() const -{ - static const char* names[] = { - "microseconds", "hundredsofnanoseconds", "tensofnanoseconds", "nanoseconds", "tenthsofnanoseconds"}; - return convert_enum_idx(names, 5, value, "wlan_rtt_r16_s::rtt_units_r16_e_"); -} - -// CGI-InfoEUTRALogging ::= SEQUENCE -SRSASN_CODE cgi_info_eutra_logging_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(plmn_id_eutra_5gc_present, 1)); - HANDLE_CODE(bref.pack(tac_eutra_5gc_present, 1)); - HANDLE_CODE(bref.pack(cell_id_eutra_5gc_present, 1)); - HANDLE_CODE(bref.pack(plmn_id_eutra_epc_present, 1)); - HANDLE_CODE(bref.pack(tac_eutra_epc_present, 1)); - HANDLE_CODE(bref.pack(cell_id_eutra_epc_present, 1)); - - if (plmn_id_eutra_5gc_present) { - HANDLE_CODE(plmn_id_eutra_5gc.pack(bref)); - } - if (tac_eutra_5gc_present) { - HANDLE_CODE(tac_eutra_5gc.pack(bref)); - } - if (cell_id_eutra_5gc_present) { - HANDLE_CODE(cell_id_eutra_5gc.pack(bref)); - } - if (plmn_id_eutra_epc_present) { - HANDLE_CODE(plmn_id_eutra_epc.pack(bref)); - } - if (tac_eutra_epc_present) { - HANDLE_CODE(tac_eutra_epc.pack(bref)); - } - if (cell_id_eutra_epc_present) { - HANDLE_CODE(cell_id_eutra_epc.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE cgi_info_eutra_logging_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(plmn_id_eutra_5gc_present, 1)); - HANDLE_CODE(bref.unpack(tac_eutra_5gc_present, 1)); - HANDLE_CODE(bref.unpack(cell_id_eutra_5gc_present, 1)); - HANDLE_CODE(bref.unpack(plmn_id_eutra_epc_present, 1)); - HANDLE_CODE(bref.unpack(tac_eutra_epc_present, 1)); - HANDLE_CODE(bref.unpack(cell_id_eutra_epc_present, 1)); - - if (plmn_id_eutra_5gc_present) { - HANDLE_CODE(plmn_id_eutra_5gc.unpack(bref)); - } - if (tac_eutra_5gc_present) { - HANDLE_CODE(tac_eutra_5gc.unpack(bref)); - } - if (cell_id_eutra_5gc_present) { - HANDLE_CODE(cell_id_eutra_5gc.unpack(bref)); - } - if (plmn_id_eutra_epc_present) { - HANDLE_CODE(plmn_id_eutra_epc.unpack(bref)); - } - if (tac_eutra_epc_present) { - HANDLE_CODE(tac_eutra_epc.unpack(bref)); - } - if (cell_id_eutra_epc_present) { - HANDLE_CODE(cell_id_eutra_epc.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void cgi_info_eutra_logging_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (plmn_id_eutra_5gc_present) { - j.write_fieldname("plmn-Identity-eutra-5gc"); - plmn_id_eutra_5gc.to_json(j); - } - if (tac_eutra_5gc_present) { - j.write_str("trackingAreaCode-eutra-5gc", tac_eutra_5gc.to_string()); - } - if (cell_id_eutra_5gc_present) { - j.write_str("cellIdentity-eutra-5gc", cell_id_eutra_5gc.to_string()); - } - if (plmn_id_eutra_epc_present) { - j.write_fieldname("plmn-Identity-eutra-epc"); - plmn_id_eutra_epc.to_json(j); - } - if (tac_eutra_epc_present) { - j.write_str("trackingAreaCode-eutra-epc", tac_eutra_epc.to_string()); - } - if (cell_id_eutra_epc_present) { - j.write_str("cellIdentity-eutra-epc", cell_id_eutra_epc.to_string()); - } - j.end_obj(); -} - -// LogMeasResultBT-r16 ::= SEQUENCE -SRSASN_CODE log_meas_result_bt_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(rssi_bt_r16_present, 1)); - - HANDLE_CODE(bt_addr_r16.pack(bref)); - if (rssi_bt_r16_present) { - HANDLE_CODE(pack_integer(bref, rssi_bt_r16, (int16_t)-128, (int16_t)127)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE log_meas_result_bt_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(rssi_bt_r16_present, 1)); - - HANDLE_CODE(bt_addr_r16.unpack(bref)); - if (rssi_bt_r16_present) { - HANDLE_CODE(unpack_integer(rssi_bt_r16, bref, (int16_t)-128, (int16_t)127)); - } - - return SRSASN_SUCCESS; -} -void log_meas_result_bt_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("bt-Addr-r16", bt_addr_r16.to_string()); - if (rssi_bt_r16_present) { - j.write_int("rssi-BT-r16", rssi_bt_r16); - } - j.end_obj(); -} - -// LogMeasResultWLAN-r16 ::= SEQUENCE -SRSASN_CODE log_meas_result_wlan_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(rssi_wlan_r16_present, 1)); - HANDLE_CODE(bref.pack(rtt_wlan_r16_present, 1)); - - HANDLE_CODE(wlan_ids_r16.pack(bref)); - if (rssi_wlan_r16_present) { - HANDLE_CODE(pack_integer(bref, rssi_wlan_r16, (uint8_t)0u, (uint8_t)141u)); - } - if (rtt_wlan_r16_present) { - HANDLE_CODE(rtt_wlan_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE log_meas_result_wlan_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(rssi_wlan_r16_present, 1)); - HANDLE_CODE(bref.unpack(rtt_wlan_r16_present, 1)); - - HANDLE_CODE(wlan_ids_r16.unpack(bref)); - if (rssi_wlan_r16_present) { - HANDLE_CODE(unpack_integer(rssi_wlan_r16, bref, (uint8_t)0u, (uint8_t)141u)); - } - if (rtt_wlan_r16_present) { - HANDLE_CODE(rtt_wlan_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void log_meas_result_wlan_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("wlan-Identifiers-r16"); - wlan_ids_r16.to_json(j); - if (rssi_wlan_r16_present) { - j.write_int("rssiWLAN-r16", rssi_wlan_r16); - } - if (rtt_wlan_r16_present) { - j.write_fieldname("rtt-WLAN-r16"); - rtt_wlan_r16.to_json(j); - } - j.end_obj(); -} - -// NeedForGapNCSG-InfoEUTRA-r17 ::= SEQUENCE -SRSASN_CODE need_for_gap_ncsg_info_eutra_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_dyn_seq_of(bref, need_for_ncsg_eutra_r17, 1, 256)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE need_for_gap_ncsg_info_eutra_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_dyn_seq_of(need_for_ncsg_eutra_r17, bref, 1, 256)); - - return SRSASN_SUCCESS; -} -void need_for_gap_ncsg_info_eutra_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("needForNCSG-EUTRA-r17"); - for (const auto& e1 : need_for_ncsg_eutra_r17) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// NeedForGapNCSG-InfoNR-r17 ::= SEQUENCE -SRSASN_CODE need_for_gap_ncsg_info_nr_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_dyn_seq_of(bref, intra_freq_need_for_ncsg_r17, 1, 32)); - HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_need_for_ncsg_r17, 1, 1024)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE need_for_gap_ncsg_info_nr_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_dyn_seq_of(intra_freq_need_for_ncsg_r17, bref, 1, 32)); - HANDLE_CODE(unpack_dyn_seq_of(inter_freq_need_for_ncsg_r17, bref, 1, 1024)); - - return SRSASN_SUCCESS; -} -void need_for_gap_ncsg_info_nr_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("intraFreq-needForNCSG-r17"); - for (const auto& e1 : intra_freq_need_for_ncsg_r17) { - e1.to_json(j); - } - j.end_array(); - j.start_array("interFreq-needForNCSG-r17"); - for (const auto& e1 : inter_freq_need_for_ncsg_r17) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// NeedForGapsIntraFreq-r16 ::= SEQUENCE -SRSASN_CODE need_for_gaps_intra_freq_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, serv_cell_id_r16, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(gap_ind_intra_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE need_for_gaps_intra_freq_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(serv_cell_id_r16, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(gap_ind_intra_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void need_for_gaps_intra_freq_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("servCellId-r16", serv_cell_id_r16); - j.write_str("gapIndicationIntra-r16", gap_ind_intra_r16.to_string()); - j.end_obj(); -} - -const char* need_for_gaps_intra_freq_r16_s::gap_ind_intra_r16_opts::to_string() const -{ - static const char* names[] = {"gap", "no-gap"}; - return convert_enum_idx(names, 2, value, "need_for_gaps_intra_freq_r16_s::gap_ind_intra_r16_e_"); -} - -// NeedForGapsNR-r16 ::= SEQUENCE -SRSASN_CODE need_for_gaps_nr_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, band_nr_r16, (uint16_t)1u, (uint16_t)1024u)); - HANDLE_CODE(gap_ind_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE need_for_gaps_nr_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(band_nr_r16, bref, (uint16_t)1u, (uint16_t)1024u)); - HANDLE_CODE(gap_ind_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void need_for_gaps_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("bandNR-r16", band_nr_r16); - j.write_str("gapIndication-r16", gap_ind_r16.to_string()); - j.end_obj(); -} - -const char* need_for_gaps_nr_r16_s::gap_ind_r16_opts::to_string() const -{ - static const char* names[] = {"gap", "no-gap"}; - return convert_enum_idx(names, 2, value, "need_for_gaps_nr_r16_s::gap_ind_r16_e_"); -} - -// PCI-ARFCN-EUTRA-r16 ::= SEQUENCE -SRSASN_CODE pci_arfcn_eutra_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)503u)); - HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)262143u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pci_arfcn_eutra_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)503u)); - HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)262143u)); - - return SRSASN_SUCCESS; -} -void pci_arfcn_eutra_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("physCellId-r16", pci_r16); - j.write_int("carrierFreq-r16", carrier_freq_r16); - j.end_obj(); -} - -// PCI-ARFCN-NR-r16 ::= SEQUENCE -SRSASN_CODE pci_arfcn_nr_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pci_arfcn_nr_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - - return SRSASN_SUCCESS; -} -void pci_arfcn_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("physCellId-r16", pci_r16); - j.write_int("carrierFreq-r16", carrier_freq_r16); - j.end_obj(); -} - -// PerRACSI-RSInfo-r16 ::= SEQUENCE -SRSASN_CODE per_ra_csi_r_si_nfo_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, csi_rs_idx_r16, (uint8_t)0u, (uint8_t)95u)); - HANDLE_CODE(pack_integer(bref, nof_preambs_sent_on_csi_rs_r16, (uint8_t)1u, (uint8_t)200u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE per_ra_csi_r_si_nfo_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(csi_rs_idx_r16, bref, (uint8_t)0u, (uint8_t)95u)); - HANDLE_CODE(unpack_integer(nof_preambs_sent_on_csi_rs_r16, bref, (uint8_t)1u, (uint8_t)200u)); - - return SRSASN_SUCCESS; -} -void per_ra_csi_r_si_nfo_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("csi-RS-Index-r16", csi_rs_idx_r16); - j.write_int("numberOfPreamblesSentOnCSI-RS-r16", nof_preambs_sent_on_csi_rs_r16); - j.end_obj(); -} - -// PerRASSBInfo-r16 ::= SEQUENCE -SRSASN_CODE per_ra_ssb_info_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, ssb_idx_r16, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_integer(bref, nof_preambs_sent_on_ssb_r16, (uint8_t)1u, (uint8_t)200u)); - HANDLE_CODE(pack_dyn_seq_of(bref, per_ra_attempt_info_list_r16, 1, 200)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE per_ra_ssb_info_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(ssb_idx_r16, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_integer(nof_preambs_sent_on_ssb_r16, bref, (uint8_t)1u, (uint8_t)200u)); - HANDLE_CODE(unpack_dyn_seq_of(per_ra_attempt_info_list_r16, bref, 1, 200)); - - return SRSASN_SUCCESS; -} -void per_ra_ssb_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("ssb-Index-r16", ssb_idx_r16); - j.write_int("numberOfPreamblesSentOnSSB-r16", nof_preambs_sent_on_ssb_r16); - j.start_array("perRAAttemptInfoList-r16"); - for (const auto& e1 : per_ra_attempt_info_list_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// RRCReconfigurationComplete-v1720-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_complete_v1720_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_tx_direct_current_more_carrier_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ul_tx_direct_current_more_carrier_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_more_carrier_list_r17, 1, 16)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_recfg_complete_v1720_ies_s::unpack(cbit_ref& bref) -{ - bool ul_tx_direct_current_more_carrier_list_r17_present; - HANDLE_CODE(bref.unpack(ul_tx_direct_current_more_carrier_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ul_tx_direct_current_more_carrier_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_more_carrier_list_r17, bref, 1, 16)); - } - - return SRSASN_SUCCESS; -} -void rrc_recfg_complete_v1720_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ul_tx_direct_current_more_carrier_list_r17.size() > 0) { - j.start_array("uplinkTxDirectCurrentMoreCarrierList-r17"); - for (const auto& e1 : ul_tx_direct_current_more_carrier_list_r17) { - 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(); -} - -// ResultsPerSSB-IndexIdle-r16 ::= SEQUENCE -SRSASN_CODE results_per_ssb_idx_idle_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ssb_results_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, ssb_idx_r16, (uint8_t)0u, (uint8_t)63u)); - if (ssb_results_r16_present) { - HANDLE_CODE(bref.pack(ssb_results_r16.ssb_rsrp_result_r16_present, 1)); - HANDLE_CODE(bref.pack(ssb_results_r16.ssb_rsrq_result_r16_present, 1)); - if (ssb_results_r16.ssb_rsrp_result_r16_present) { - HANDLE_CODE(pack_integer(bref, ssb_results_r16.ssb_rsrp_result_r16, (uint8_t)0u, (uint8_t)127u)); - } - if (ssb_results_r16.ssb_rsrq_result_r16_present) { - HANDLE_CODE(pack_integer(bref, ssb_results_r16.ssb_rsrq_result_r16, (uint8_t)0u, (uint8_t)127u)); - } - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE results_per_ssb_idx_idle_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ssb_results_r16_present, 1)); - - HANDLE_CODE(unpack_integer(ssb_idx_r16, bref, (uint8_t)0u, (uint8_t)63u)); - if (ssb_results_r16_present) { - HANDLE_CODE(bref.unpack(ssb_results_r16.ssb_rsrp_result_r16_present, 1)); - HANDLE_CODE(bref.unpack(ssb_results_r16.ssb_rsrq_result_r16_present, 1)); - if (ssb_results_r16.ssb_rsrp_result_r16_present) { - HANDLE_CODE(unpack_integer(ssb_results_r16.ssb_rsrp_result_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (ssb_results_r16.ssb_rsrq_result_r16_present) { - HANDLE_CODE(unpack_integer(ssb_results_r16.ssb_rsrq_result_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - } - - return SRSASN_SUCCESS; -} -void results_per_ssb_idx_idle_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("ssb-Index-r16", ssb_idx_r16); - if (ssb_results_r16_present) { - j.write_fieldname("ssb-Results-r16"); - j.start_obj(); - if (ssb_results_r16.ssb_rsrp_result_r16_present) { - j.write_int("ssb-RSRP-Result-r16", ssb_results_r16.ssb_rsrp_result_r16); - } - if (ssb_results_r16.ssb_rsrq_result_r16_present) { - j.write_int("ssb-RSRQ-Result-r16", ssb_results_r16.ssb_rsrq_result_r16); - } - j.end_obj(); - } - j.end_obj(); -} - -// SL-PagingIdentityRemoteUE-r17 ::= SEQUENCE -SRSASN_CODE sl_paging_id_remote_ue_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(full_i_rnti_r17_present, 1)); - - HANDLE_CODE(ng_5_g_s_tmsi_r17.pack(bref)); - if (full_i_rnti_r17_present) { - HANDLE_CODE(full_i_rnti_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_paging_id_remote_ue_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(full_i_rnti_r17_present, 1)); - - HANDLE_CODE(ng_5_g_s_tmsi_r17.unpack(bref)); - if (full_i_rnti_r17_present) { - HANDLE_CODE(full_i_rnti_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sl_paging_id_remote_ue_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("ng-5G-S-TMSI-r17", ng_5_g_s_tmsi_r17.to_string()); - if (full_i_rnti_r17_present) { - j.write_str("fullI-RNTI-r17", full_i_rnti_r17.to_string()); - } - j.end_obj(); -} - -// SL-RLC-ModeIndication-r16 ::= SEQUENCE -SRSASN_CODE sl_rlc_mode_ind_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(sl_mode_r16.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, sl_qos_info_list_r16, 1, 64)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_rlc_mode_ind_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(sl_mode_r16.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(sl_qos_info_list_r16, bref, 1, 64)); - - return SRSASN_SUCCESS; -} -void sl_rlc_mode_ind_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("sl-Mode-r16"); - sl_mode_r16.to_json(j); - j.start_array("sl-QoS-InfoList-r16"); - for (const auto& e1 : sl_qos_info_list_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -void sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::set(types::options e) -{ - type_ = e; -} -void sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::set_sl_am_mode_r16() -{ - set(types::sl_am_mode_r16); -} -void sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::set_sl_um_mode_r16() -{ - set(types::sl_um_mode_r16); -} -void sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - j.end_obj(); -} -SRSASN_CODE sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - return SRSASN_SUCCESS; -} - -// UplinkTxDirectCurrentTwoCarrier-r16 ::= SEQUENCE -SRSASN_CODE ul_tx_direct_current_two_carrier_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(second_pa_tx_direct_current_r16_present, 1)); - - HANDLE_CODE(carrier_one_info_r16.pack(bref)); - HANDLE_CODE(carrier_two_info_r16.pack(bref)); - HANDLE_CODE(single_pa_tx_direct_current_r16.pack(bref)); - if (second_pa_tx_direct_current_r16_present) { - HANDLE_CODE(second_pa_tx_direct_current_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_tx_direct_current_two_carrier_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(second_pa_tx_direct_current_r16_present, 1)); - - HANDLE_CODE(carrier_one_info_r16.unpack(bref)); - HANDLE_CODE(carrier_two_info_r16.unpack(bref)); - HANDLE_CODE(single_pa_tx_direct_current_r16.unpack(bref)); - if (second_pa_tx_direct_current_r16_present) { - HANDLE_CODE(second_pa_tx_direct_current_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ul_tx_direct_current_two_carrier_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("carrierOneInfo-r16"); - carrier_one_info_r16.to_json(j); - j.write_fieldname("carrierTwoInfo-r16"); - carrier_two_info_r16.to_json(j); - j.write_fieldname("singlePA-TxDirectCurrent-r16"); - single_pa_tx_direct_current_r16.to_json(j); - if (second_pa_tx_direct_current_r16_present) { - j.write_fieldname("secondPA-TxDirectCurrent-r16"); - second_pa_tx_direct_current_r16.to_json(j); - } - j.end_obj(); -} - -// VictimSystemType-r16 ::= SEQUENCE -SRSASN_CODE victim_sys_type_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(gps_r16_present, 1)); - HANDLE_CODE(bref.pack(glonass_r16_present, 1)); - HANDLE_CODE(bref.pack(bds_r16_present, 1)); - HANDLE_CODE(bref.pack(galileo_r16_present, 1)); - HANDLE_CODE(bref.pack(nav_ic_r16_present, 1)); - HANDLE_CODE(bref.pack(wlan_r16_present, 1)); - HANDLE_CODE(bref.pack(bluetooth_r16_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE victim_sys_type_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(gps_r16_present, 1)); - HANDLE_CODE(bref.unpack(glonass_r16_present, 1)); - HANDLE_CODE(bref.unpack(bds_r16_present, 1)); - HANDLE_CODE(bref.unpack(galileo_r16_present, 1)); - HANDLE_CODE(bref.unpack(nav_ic_r16_present, 1)); - HANDLE_CODE(bref.unpack(wlan_r16_present, 1)); - HANDLE_CODE(bref.unpack(bluetooth_r16_present, 1)); - - return SRSASN_SUCCESS; -} -void victim_sys_type_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (gps_r16_present) { - j.write_str("gps-r16", "true"); - } - if (glonass_r16_present) { - j.write_str("glonass-r16", "true"); - } - if (bds_r16_present) { - j.write_str("bds-r16", "true"); - } - if (galileo_r16_present) { - j.write_str("galileo-r16", "true"); - } - if (nav_ic_r16_present) { - j.write_str("navIC-r16", "true"); - } - if (wlan_r16_present) { - j.write_str("wlan-r16", "true"); - } - if (bluetooth_r16_present) { - j.write_str("bluetooth-r16", "true"); - } - j.end_obj(); -} - -// AffectedCarrierFreq-r16 ::= SEQUENCE -SRSASN_CODE affected_carrier_freq_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(interference_direction_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE affected_carrier_freq_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(interference_direction_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void affected_carrier_freq_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("carrierFreq-r16", carrier_freq_r16); - j.write_str("interferenceDirection-r16", interference_direction_r16.to_string()); - j.end_obj(); -} - -const char* affected_carrier_freq_r16_s::interference_direction_r16_opts::to_string() const -{ - static const char* names[] = {"nr", "other", "both", "spare"}; - return convert_enum_idx(names, 4, value, "affected_carrier_freq_r16_s::interference_direction_r16_e_"); -} - -// AffectedCarrierFreqComb-r16 ::= SEQUENCE -SRSASN_CODE affected_carrier_freq_comb_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(affected_carrier_freq_comb_r16.size() > 0, 1)); - - if (affected_carrier_freq_comb_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_comb_r16, 2, 32, integer_packer(0, 3279165))); - } - HANDLE_CODE(victim_sys_type_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE affected_carrier_freq_comb_r16_s::unpack(cbit_ref& bref) -{ - bool affected_carrier_freq_comb_r16_present; - HANDLE_CODE(bref.unpack(affected_carrier_freq_comb_r16_present, 1)); - - if (affected_carrier_freq_comb_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_r16, bref, 2, 32, integer_packer(0, 3279165))); - } - HANDLE_CODE(victim_sys_type_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void affected_carrier_freq_comb_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (affected_carrier_freq_comb_r16.size() > 0) { - j.start_array("affectedCarrierFreqComb-r16"); - for (const auto& e1 : affected_carrier_freq_comb_r16) { - j.write_int(e1); - } - j.end_array(); - } - j.write_fieldname("victimSystemType-r16"); - victim_sys_type_r16.to_json(j); - j.end_obj(); -} - -// CommonLocationInfo-r16 ::= SEQUENCE -SRSASN_CODE common_location_info_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(gnss_tod_msec_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(location_timestamp_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(location_coordinate_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(location_error_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(location_source_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(velocity_estimate_r16.size() > 0, 1)); - - if (gnss_tod_msec_r16.size() > 0) { - HANDLE_CODE(gnss_tod_msec_r16.pack(bref)); - } - if (location_timestamp_r16.size() > 0) { - HANDLE_CODE(location_timestamp_r16.pack(bref)); - } - if (location_coordinate_r16.size() > 0) { - HANDLE_CODE(location_coordinate_r16.pack(bref)); - } - if (location_error_r16.size() > 0) { - HANDLE_CODE(location_error_r16.pack(bref)); - } - if (location_source_r16.size() > 0) { - HANDLE_CODE(location_source_r16.pack(bref)); - } - if (velocity_estimate_r16.size() > 0) { - HANDLE_CODE(velocity_estimate_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE common_location_info_r16_s::unpack(cbit_ref& bref) -{ - bool gnss_tod_msec_r16_present; - HANDLE_CODE(bref.unpack(gnss_tod_msec_r16_present, 1)); - bool location_timestamp_r16_present; - HANDLE_CODE(bref.unpack(location_timestamp_r16_present, 1)); - bool location_coordinate_r16_present; - HANDLE_CODE(bref.unpack(location_coordinate_r16_present, 1)); - bool location_error_r16_present; - HANDLE_CODE(bref.unpack(location_error_r16_present, 1)); - bool location_source_r16_present; - HANDLE_CODE(bref.unpack(location_source_r16_present, 1)); - bool velocity_estimate_r16_present; - HANDLE_CODE(bref.unpack(velocity_estimate_r16_present, 1)); - - if (gnss_tod_msec_r16_present) { - HANDLE_CODE(gnss_tod_msec_r16.unpack(bref)); - } - if (location_timestamp_r16_present) { - HANDLE_CODE(location_timestamp_r16.unpack(bref)); - } - if (location_coordinate_r16_present) { - HANDLE_CODE(location_coordinate_r16.unpack(bref)); - } - if (location_error_r16_present) { - HANDLE_CODE(location_error_r16.unpack(bref)); - } - if (location_source_r16_present) { - HANDLE_CODE(location_source_r16.unpack(bref)); - } - if (velocity_estimate_r16_present) { - HANDLE_CODE(velocity_estimate_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void common_location_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (gnss_tod_msec_r16.size() > 0) { - j.write_str("gnss-TOD-msec-r16", gnss_tod_msec_r16.to_string()); - } - if (location_timestamp_r16.size() > 0) { - j.write_str("locationTimestamp-r16", location_timestamp_r16.to_string()); - } - if (location_coordinate_r16.size() > 0) { - j.write_str("locationCoordinate-r16", location_coordinate_r16.to_string()); - } - if (location_error_r16.size() > 0) { - j.write_str("locationError-r16", location_error_r16.to_string()); - } - if (location_source_r16.size() > 0) { - j.write_str("locationSource-r16", location_source_r16.to_string()); - } - if (velocity_estimate_r16.size() > 0) { - j.write_str("velocityEstimate-r16", velocity_estimate_r16.to_string()); - } - j.end_obj(); -} - -// MeasResult2EUTRA-r16 ::= SEQUENCE -SRSASN_CODE meas_result2_eutra_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)262143u)); - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_r16, 1, 8)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result2_eutra_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)262143u)); - HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_r16, bref, 1, 8)); - - return SRSASN_SUCCESS; -} -void meas_result2_eutra_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("carrierFreq-r16", carrier_freq_r16); - j.start_array("measResultList-r16"); - for (const auto& e1 : meas_result_list_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// MeasResult2NR-r16 ::= SEQUENCE -SRSASN_CODE meas_result2_nr_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ssb_freq_r16_present, 1)); - HANDLE_CODE(bref.pack(ref_freq_csi_rs_r16_present, 1)); - - if (ssb_freq_r16_present) { - HANDLE_CODE(pack_integer(bref, ssb_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); - } - if (ref_freq_csi_rs_r16_present) { - HANDLE_CODE(pack_integer(bref, ref_freq_csi_rs_r16, (uint32_t)0u, (uint32_t)3279165u)); - } - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_r16, 1, 8)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result2_nr_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ssb_freq_r16_present, 1)); - HANDLE_CODE(bref.unpack(ref_freq_csi_rs_r16_present, 1)); - - if (ssb_freq_r16_present) { - HANDLE_CODE(unpack_integer(ssb_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - } - if (ref_freq_csi_rs_r16_present) { - HANDLE_CODE(unpack_integer(ref_freq_csi_rs_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - } - HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_r16, bref, 1, 8)); - - return SRSASN_SUCCESS; -} -void meas_result2_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ssb_freq_r16_present) { - j.write_int("ssbFrequency-r16", ssb_freq_r16); - } - if (ref_freq_csi_rs_r16_present) { - j.write_int("refFreqCSI-RS-r16", ref_freq_csi_rs_r16); - } - j.start_array("measResultList-r16"); - for (const auto& e1 : meas_result_list_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// MeasResultLogging2NR-r16 ::= SEQUENCE -SRSASN_CODE meas_result_logging2_nr_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_logging_nr_r16, 1, 8)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_logging2_nr_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_logging_nr_r16, bref, 1, 8)); - - return SRSASN_SUCCESS; -} -void meas_result_logging2_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("carrierFreq-r16", carrier_freq_r16); - j.start_array("measResultListLoggingNR-r16"); - for (const auto& e1 : meas_result_list_logging_nr_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// MeasResultUTRA-FDD-r16 ::= SEQUENCE -SRSASN_CODE meas_result_utra_fdd_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)511u)); - HANDLE_CODE(bref.pack(meas_result_r16.utra_fdd_rs_cp_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_result_r16.utra_fdd_ec_n0_r16_present, 1)); - if (meas_result_r16.utra_fdd_rs_cp_r16_present) { - HANDLE_CODE(pack_integer(bref, meas_result_r16.utra_fdd_rs_cp_r16, (int8_t)-5, (int8_t)91)); - } - if (meas_result_r16.utra_fdd_ec_n0_r16_present) { - HANDLE_CODE(pack_integer(bref, meas_result_r16.utra_fdd_ec_n0_r16, (uint8_t)0u, (uint8_t)49u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_utra_fdd_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)511u)); - HANDLE_CODE(bref.unpack(meas_result_r16.utra_fdd_rs_cp_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_r16.utra_fdd_ec_n0_r16_present, 1)); - if (meas_result_r16.utra_fdd_rs_cp_r16_present) { - HANDLE_CODE(unpack_integer(meas_result_r16.utra_fdd_rs_cp_r16, bref, (int8_t)-5, (int8_t)91)); - } - if (meas_result_r16.utra_fdd_ec_n0_r16_present) { - HANDLE_CODE(unpack_integer(meas_result_r16.utra_fdd_ec_n0_r16, bref, (uint8_t)0u, (uint8_t)49u)); - } - - return SRSASN_SUCCESS; -} -void meas_result_utra_fdd_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("physCellId-r16", pci_r16); - j.write_fieldname("measResult-r16"); - j.start_obj(); - if (meas_result_r16.utra_fdd_rs_cp_r16_present) { - j.write_int("utra-FDD-RSCP-r16", meas_result_r16.utra_fdd_rs_cp_r16); - } - if (meas_result_r16.utra_fdd_ec_n0_r16_present) { - j.write_int("utra-FDD-EcN0-r16", meas_result_r16.utra_fdd_ec_n0_r16); - } - j.end_obj(); - j.end_obj(); -} - -// PerRACSI-RSInfo-v1660 ::= SEQUENCE -SRSASN_CODE per_ra_csi_r_si_nfo_v1660_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(csi_rs_idx_v1660_present, 1)); - - if (csi_rs_idx_v1660_present) { - HANDLE_CODE(pack_integer(bref, csi_rs_idx_v1660, (uint8_t)1u, (uint8_t)96u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE per_ra_csi_r_si_nfo_v1660_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(csi_rs_idx_v1660_present, 1)); - - if (csi_rs_idx_v1660_present) { - HANDLE_CODE(unpack_integer(csi_rs_idx_v1660, bref, (uint8_t)1u, (uint8_t)96u)); - } - - return SRSASN_SUCCESS; -} -void per_ra_csi_r_si_nfo_v1660_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (csi_rs_idx_v1660_present) { - j.write_int("csi-RS-Index-v1660", csi_rs_idx_v1660); - } - j.end_obj(); -} - -// PerRAInfo-r16 ::= CHOICE -void per_ra_info_r16_c::destroy_() -{ - switch (type_) { - case types::per_ra_ssb_info_list_r16: - c.destroy(); - break; - case types::per_ra_csi_r_si_nfo_list_r16: - c.destroy(); - break; - default: - break; - } -} -void per_ra_info_r16_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::per_ra_ssb_info_list_r16: - c.init(); - break; - case types::per_ra_csi_r_si_nfo_list_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "per_ra_info_r16_c"); - } -} -per_ra_info_r16_c::per_ra_info_r16_c(const per_ra_info_r16_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::per_ra_ssb_info_list_r16: - c.init(other.c.get()); - break; - case types::per_ra_csi_r_si_nfo_list_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "per_ra_info_r16_c"); - } -} -per_ra_info_r16_c& per_ra_info_r16_c::operator=(const per_ra_info_r16_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::per_ra_ssb_info_list_r16: - c.set(other.c.get()); - break; - case types::per_ra_csi_r_si_nfo_list_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "per_ra_info_r16_c"); - } - - return *this; -} -per_ra_ssb_info_r16_s& per_ra_info_r16_c::set_per_ra_ssb_info_list_r16() -{ - set(types::per_ra_ssb_info_list_r16); - return c.get(); -} -per_ra_csi_r_si_nfo_r16_s& per_ra_info_r16_c::set_per_ra_csi_r_si_nfo_list_r16() -{ - set(types::per_ra_csi_r_si_nfo_list_r16); - return c.get(); -} -void per_ra_info_r16_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::per_ra_ssb_info_list_r16: - j.write_fieldname("perRASSBInfoList-r16"); - c.get().to_json(j); - break; - case types::per_ra_csi_r_si_nfo_list_r16: - j.write_fieldname("perRACSI-RSInfoList-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "per_ra_info_r16_c"); - } - j.end_obj(); -} -SRSASN_CODE per_ra_info_r16_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::per_ra_ssb_info_list_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::per_ra_csi_r_si_nfo_list_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "per_ra_info_r16_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE per_ra_info_r16_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::per_ra_ssb_info_list_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::per_ra_csi_r_si_nfo_list_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "per_ra_info_r16_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// RRCReconfigurationComplete-v1700-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_complete_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(need_for_gap_ncsg_info_nr_r17_present, 1)); - HANDLE_CODE(bref.pack(need_for_gap_ncsg_info_eutra_r17_present, 1)); - HANDLE_CODE(bref.pack(sel_cond_rrc_recfg_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (need_for_gap_ncsg_info_nr_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_info_nr_r17.pack(bref)); - } - if (need_for_gap_ncsg_info_eutra_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_info_eutra_r17.pack(bref)); - } - if (sel_cond_rrc_recfg_r17_present) { - HANDLE_CODE(pack_integer(bref, sel_cond_rrc_recfg_r17, (uint8_t)1u, (uint8_t)8u)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_recfg_complete_v1700_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(need_for_gap_ncsg_info_nr_r17_present, 1)); - HANDLE_CODE(bref.unpack(need_for_gap_ncsg_info_eutra_r17_present, 1)); - HANDLE_CODE(bref.unpack(sel_cond_rrc_recfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (need_for_gap_ncsg_info_nr_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_info_nr_r17.unpack(bref)); - } - if (need_for_gap_ncsg_info_eutra_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_info_eutra_r17.unpack(bref)); - } - if (sel_cond_rrc_recfg_r17_present) { - HANDLE_CODE(unpack_integer(sel_cond_rrc_recfg_r17, bref, (uint8_t)1u, (uint8_t)8u)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_recfg_complete_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (need_for_gap_ncsg_info_nr_r17_present) { - j.write_fieldname("needForGapNCSG-InfoNR-r17"); - need_for_gap_ncsg_info_nr_r17.to_json(j); - } - if (need_for_gap_ncsg_info_eutra_r17_present) { - j.write_fieldname("needForGapNCSG-InfoEUTRA-r17"); - need_for_gap_ncsg_info_eutra_r17.to_json(j); - } - if (sel_cond_rrc_recfg_r17_present) { - j.write_int("selectedCondRRCReconfig-r17", sel_cond_rrc_recfg_r17); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// ReducedAggregatedBandwidth ::= ENUMERATED -const char* reduced_aggr_bw_opts::to_string() const -{ - static const char* names[] = { - "mhz0", "mhz10", "mhz20", "mhz30", "mhz40", "mhz50", "mhz60", "mhz80", "mhz100", "mhz200", "mhz300", "mhz400"}; - return convert_enum_idx(names, 12, value, "reduced_aggr_bw_e"); -} -uint16_t reduced_aggr_bw_opts::to_number() const -{ - static const uint16_t numbers[] = {0, 10, 20, 30, 40, 50, 60, 80, 100, 200, 300, 400}; - return map_enum_number(numbers, 12, value, "reduced_aggr_bw_e"); -} - -// ReducedAggregatedBandwidth-r17 ::= ENUMERATED -const char* reduced_aggr_bw_r17_opts::to_string() const -{ - static const char* names[] = {"mhz0", "mhz100", "mhz200", "mhz400", "mhz800", "mhz1200", "mhz1600", "mhz2000"}; - return convert_enum_idx(names, 8, value, "reduced_aggr_bw_r17_e"); -} -uint16_t reduced_aggr_bw_r17_opts::to_number() const -{ - static const uint16_t numbers[] = {0, 100, 200, 400, 800, 1200, 1600, 2000}; - return map_enum_number(numbers, 8, value, "reduced_aggr_bw_r17_e"); -} - -// SL-DRX-ConfigUC-SemiStatic-r17 ::= SEQUENCE -SRSASN_CODE sl_drx_cfg_uc_semi_static_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(sl_drx_on_dur_timer_r17.pack(bref)); - HANDLE_CODE(sl_drx_cycle_start_offset_r17.pack(bref)); - HANDLE_CODE(pack_integer(bref, sl_drx_slot_offset_r17, (uint8_t)0u, (uint8_t)31u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_drx_cfg_uc_semi_static_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(sl_drx_on_dur_timer_r17.unpack(bref)); - HANDLE_CODE(sl_drx_cycle_start_offset_r17.unpack(bref)); - HANDLE_CODE(unpack_integer(sl_drx_slot_offset_r17, bref, (uint8_t)0u, (uint8_t)31u)); - - return SRSASN_SUCCESS; -} -void sl_drx_cfg_uc_semi_static_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("sl-drx-onDurationTimer-r17"); - sl_drx_on_dur_timer_r17.to_json(j); - j.write_fieldname("sl-drx-CycleStartOffset-r17"); - sl_drx_cycle_start_offset_r17.to_json(j); - j.write_int("sl-drx-SlotOffset-r17", sl_drx_slot_offset_r17); - j.end_obj(); -} - -void sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::destroy_() {} -void sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::sl_drx_on_dur_timer_r17_c_( - const sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_& other) -{ - 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_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_"); - } -} -sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_& -sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::operator=( - const sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_& other) -{ - if (this == &other) { - return *this; - } - 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_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_"); - } - - return *this; -} -uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::set_sub_milli_seconds() -{ - set(types::sub_milli_seconds); - return c.get(); -} -sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::milli_seconds_e_& -sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::set_milli_seconds() -{ - set(types::milli_seconds); - return c.get(); -} -void sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::to_json(json_writer& j) const -{ - j.start_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_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_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)); - break; - case types::milli_seconds: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_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)); - break; - case types::milli_seconds: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::milli_seconds_opts::to_string() const -{ - static const char* names[] = {"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( - names, 32, value, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::milli_seconds_e_"); -} -uint16_t sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::milli_seconds_opts::to_number() const -{ - static const uint16_t numbers[] = {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( - numbers, 24, value, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::milli_seconds_e_"); -} - -void sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::destroy_() {} -void sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::sl_drx_cycle_start_offset_r17_c_( - const sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_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()); - 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_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_"); - } -} -sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_& -sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::operator=( - const sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_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()); - break; - case types::ms10240: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_"); - } - - return *this; -} -uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms10() -{ - set(types::ms10); - return c.get(); -} -uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms20() -{ - set(types::ms20); - return c.get(); -} -uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms32() -{ - set(types::ms32); - return c.get(); -} -uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms40() -{ - set(types::ms40); - return c.get(); -} -uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms60() -{ - set(types::ms60); - return c.get(); -} -uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms64() -{ - set(types::ms64); - return c.get(); -} -uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms70() -{ - set(types::ms70); - return c.get(); -} -uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms80() -{ - set(types::ms80); - return c.get(); -} -uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms128() -{ - set(types::ms128); - return c.get(); -} -uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms160() -{ - set(types::ms160); - return c.get(); -} -uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms256() -{ - set(types::ms256); - return c.get(); -} -uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms320() -{ - set(types::ms320); - return c.get(); -} -uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms512() -{ - set(types::ms512); - return c.get(); -} -uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms640() -{ - set(types::ms640); - return c.get(); -} -uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms1024() -{ - set(types::ms1024); - return c.get(); -} -uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms1280() -{ - set(types::ms1280); - return c.get(); -} -uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms2048() -{ - set(types::ms2048); - return c.get(); -} -uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms2560() -{ - set(types::ms2560); - return c.get(); -} -uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms5120() -{ - set(types::ms5120); - return c.get(); -} -uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms10240() -{ - set(types::ms10240); - return c.get(); -} -void sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_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()); - break; - case types::ms10240: - j.write_int("ms10240", c.get()); - break; - default: - log_invalid_choice_id(type_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_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)); - break; - case types::ms10240: - HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); - break; - default: - log_invalid_choice_id(type_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_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)); - break; - case types::ms10240: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); - break; - default: - log_invalid_choice_id(type_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// SL-TxResourceReq-r16 ::= SEQUENCE -SRSASN_CODE sl_tx_res_req_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sl_rlc_mode_ind_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_qos_info_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_type_tx_sync_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_tx_interested_freq_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_cap_info_sidelink_r16.size() > 0, 1)); - - HANDLE_CODE(sl_dest_id_r16.pack(bref)); - HANDLE_CODE(sl_cast_type_r16.pack(bref)); - if (sl_rlc_mode_ind_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_rlc_mode_ind_list_r16, 1, 512)); - } - if (sl_qos_info_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_qos_info_list_r16, 1, 64)); - } - if (sl_type_tx_sync_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_type_tx_sync_list_r16, 1, 8)); - } - if (sl_tx_interested_freq_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_interested_freq_list_r16, 1, 8, integer_packer(1, 8))); - } - if (sl_cap_info_sidelink_r16.size() > 0) { - HANDLE_CODE(sl_cap_info_sidelink_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_tx_res_req_r16_s::unpack(cbit_ref& bref) -{ - bool sl_rlc_mode_ind_list_r16_present; - HANDLE_CODE(bref.unpack(sl_rlc_mode_ind_list_r16_present, 1)); - bool sl_qos_info_list_r16_present; - HANDLE_CODE(bref.unpack(sl_qos_info_list_r16_present, 1)); - bool sl_type_tx_sync_list_r16_present; - HANDLE_CODE(bref.unpack(sl_type_tx_sync_list_r16_present, 1)); - bool sl_tx_interested_freq_list_r16_present; - HANDLE_CODE(bref.unpack(sl_tx_interested_freq_list_r16_present, 1)); - bool sl_cap_info_sidelink_r16_present; - HANDLE_CODE(bref.unpack(sl_cap_info_sidelink_r16_present, 1)); - - HANDLE_CODE(sl_dest_id_r16.unpack(bref)); - HANDLE_CODE(sl_cast_type_r16.unpack(bref)); - if (sl_rlc_mode_ind_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_rlc_mode_ind_list_r16, bref, 1, 512)); - } - if (sl_qos_info_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_qos_info_list_r16, bref, 1, 64)); - } - if (sl_type_tx_sync_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_type_tx_sync_list_r16, bref, 1, 8)); - } - if (sl_tx_interested_freq_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_tx_interested_freq_list_r16, bref, 1, 8, integer_packer(1, 8))); - } - if (sl_cap_info_sidelink_r16_present) { - HANDLE_CODE(sl_cap_info_sidelink_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sl_tx_res_req_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("sl-DestinationIdentity-r16", sl_dest_id_r16.to_string()); - j.write_str("sl-CastType-r16", sl_cast_type_r16.to_string()); - if (sl_rlc_mode_ind_list_r16.size() > 0) { - j.start_array("sl-RLC-ModeIndicationList-r16"); - for (const auto& e1 : sl_rlc_mode_ind_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_qos_info_list_r16.size() > 0) { - j.start_array("sl-QoS-InfoList-r16"); - for (const auto& e1 : sl_qos_info_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_type_tx_sync_list_r16.size() > 0) { - j.start_array("sl-TypeTxSyncList-r16"); - for (const auto& e1 : sl_type_tx_sync_list_r16) { - j.write_str(e1.to_string()); - } - j.end_array(); - } - if (sl_tx_interested_freq_list_r16.size() > 0) { - j.start_array("sl-TxInterestedFreqList-r16"); - for (const auto& e1 : sl_tx_interested_freq_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_cap_info_sidelink_r16.size() > 0) { - j.write_str("sl-CapabilityInformationSidelink-r16", sl_cap_info_sidelink_r16.to_string()); - } - j.end_obj(); -} - -const char* sl_tx_res_req_r16_s::sl_cast_type_r16_opts::to_string() const -{ - static const char* names[] = {"broadcast", "groupcast", "unicast", "spare1"}; - return convert_enum_idx(names, 4, value, "sl_tx_res_req_r16_s::sl_cast_type_r16_e_"); -} - -// SL-TxResourceReqL2U2N-Relay-r17 ::= SEQUENCE -SRSASN_CODE sl_tx_res_req_l2_u2_n_relay_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_dest_id_l2_u2_n_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_local_id_request_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_paging_id_remote_ue_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_cap_info_sidelink_r17.size() > 0, 1)); - - if (sl_dest_id_l2_u2_n_r17_present) { - HANDLE_CODE(sl_dest_id_l2_u2_n_r17.pack(bref)); - } - HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_interested_freq_list_l2_u2_n_r17, 1, 8, integer_packer(1, 8))); - HANDLE_CODE(pack_dyn_seq_of(bref, sl_type_tx_sync_list_l2_u2_n_r17, 1, 8)); - if (sl_paging_id_remote_ue_r17_present) { - HANDLE_CODE(sl_paging_id_remote_ue_r17.pack(bref)); - } - if (sl_cap_info_sidelink_r17.size() > 0) { - HANDLE_CODE(sl_cap_info_sidelink_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_tx_res_req_l2_u2_n_relay_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_dest_id_l2_u2_n_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_local_id_request_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_paging_id_remote_ue_r17_present, 1)); - bool sl_cap_info_sidelink_r17_present; - HANDLE_CODE(bref.unpack(sl_cap_info_sidelink_r17_present, 1)); - - if (sl_dest_id_l2_u2_n_r17_present) { - HANDLE_CODE(sl_dest_id_l2_u2_n_r17.unpack(bref)); - } - HANDLE_CODE(unpack_dyn_seq_of(sl_tx_interested_freq_list_l2_u2_n_r17, bref, 1, 8, integer_packer(1, 8))); - HANDLE_CODE(unpack_dyn_seq_of(sl_type_tx_sync_list_l2_u2_n_r17, bref, 1, 8)); - if (sl_paging_id_remote_ue_r17_present) { - HANDLE_CODE(sl_paging_id_remote_ue_r17.unpack(bref)); - } - if (sl_cap_info_sidelink_r17_present) { - HANDLE_CODE(sl_cap_info_sidelink_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sl_tx_res_req_l2_u2_n_relay_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_dest_id_l2_u2_n_r17_present) { - j.write_str("sl-DestinationIdentityL2U2N-r17", sl_dest_id_l2_u2_n_r17.to_string()); - } - j.start_array("sl-TxInterestedFreqListL2U2N-r17"); - for (const auto& e1 : sl_tx_interested_freq_list_l2_u2_n_r17) { - j.write_int(e1); - } - j.end_array(); - j.start_array("sl-TypeTxSyncListL2U2N-r17"); - for (const auto& e1 : sl_type_tx_sync_list_l2_u2_n_r17) { - j.write_str(e1.to_string()); - } - j.end_array(); - if (sl_local_id_request_r17_present) { - j.write_str("sl-LocalID-Request-r17", "true"); - } - if (sl_paging_id_remote_ue_r17_present) { - j.write_fieldname("sl-PagingIdentityRemoteUE-r17"); - sl_paging_id_remote_ue_r17.to_json(j); - } - if (sl_cap_info_sidelink_r17.size() > 0) { - j.write_str("sl-CapabilityInformationSidelink-r17", sl_cap_info_sidelink_r17.to_string()); - } - j.end_obj(); -} - -// Sensor-LocationInfo-r16 ::= SEQUENCE -SRSASN_CODE sensor_location_info_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sensor_meas_info_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sensor_motion_info_r16.size() > 0, 1)); - - if (sensor_meas_info_r16.size() > 0) { - HANDLE_CODE(sensor_meas_info_r16.pack(bref)); - } - if (sensor_motion_info_r16.size() > 0) { - HANDLE_CODE(sensor_motion_info_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sensor_location_info_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool sensor_meas_info_r16_present; - HANDLE_CODE(bref.unpack(sensor_meas_info_r16_present, 1)); - bool sensor_motion_info_r16_present; - HANDLE_CODE(bref.unpack(sensor_motion_info_r16_present, 1)); - - if (sensor_meas_info_r16_present) { - HANDLE_CODE(sensor_meas_info_r16.unpack(bref)); - } - if (sensor_motion_info_r16_present) { - HANDLE_CODE(sensor_motion_info_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sensor_location_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sensor_meas_info_r16.size() > 0) { - j.write_str("sensor-MeasurementInformation-r16", sensor_meas_info_r16.to_string()); - } - if (sensor_motion_info_r16.size() > 0) { - j.write_str("sensor-MotionInformation-r16", sensor_motion_info_r16.to_string()); - } - j.end_obj(); -} - -// VisitedPSCellInfo-r17 ::= SEQUENCE -SRSASN_CODE visited_pscell_info_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(visited_cell_id_r17_present, 1)); - - if (visited_cell_id_r17_present) { - HANDLE_CODE(visited_cell_id_r17.pack(bref)); - } - HANDLE_CODE(pack_integer(bref, time_spent_r17, (uint16_t)0u, (uint16_t)4095u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE visited_pscell_info_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(visited_cell_id_r17_present, 1)); - - if (visited_cell_id_r17_present) { - HANDLE_CODE(visited_cell_id_r17.unpack(bref)); - } - HANDLE_CODE(unpack_integer(time_spent_r17, bref, (uint16_t)0u, (uint16_t)4095u)); - - return SRSASN_SUCCESS; -} -void visited_pscell_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (visited_cell_id_r17_present) { - j.write_fieldname("visitedCellId-r17"); - visited_cell_id_r17.to_json(j); - } - j.write_int("timeSpent-r17", time_spent_r17); - j.end_obj(); -} - -void visited_pscell_info_r17_s::visited_cell_id_r17_c_::destroy_() -{ - switch (type_) { - case types::nr_cell_id_r17: - c.destroy(); - break; - case types::eutra_cell_id_r17: - c.destroy(); - break; - default: - break; - } -} -void visited_pscell_info_r17_s::visited_cell_id_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::nr_cell_id_r17: - c.init(); - break; - case types::eutra_cell_id_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_"); - } -} -visited_pscell_info_r17_s::visited_cell_id_r17_c_::visited_cell_id_r17_c_( - const visited_pscell_info_r17_s::visited_cell_id_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::nr_cell_id_r17: - c.init(other.c.get()); - break; - case types::eutra_cell_id_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_"); - } -} -visited_pscell_info_r17_s::visited_cell_id_r17_c_& visited_pscell_info_r17_s::visited_cell_id_r17_c_::operator=( - const visited_pscell_info_r17_s::visited_cell_id_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::nr_cell_id_r17: - c.set(other.c.get()); - break; - case types::eutra_cell_id_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_"); - } - - return *this; -} -visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_& -visited_pscell_info_r17_s::visited_cell_id_r17_c_::set_nr_cell_id_r17() -{ - set(types::nr_cell_id_r17); - return c.get(); -} -visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_& -visited_pscell_info_r17_s::visited_cell_id_r17_c_::set_eutra_cell_id_r17() -{ - set(types::eutra_cell_id_r17); - return c.get(); -} -void visited_pscell_info_r17_s::visited_cell_id_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::nr_cell_id_r17: - j.write_fieldname("nr-CellId-r17"); - c.get().to_json(j); - break; - case types::eutra_cell_id_r17: - j.write_fieldname("eutra-CellId-r17"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE visited_pscell_info_r17_s::visited_cell_id_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::nr_cell_id_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::eutra_cell_id_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE visited_pscell_info_r17_s::visited_cell_id_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::nr_cell_id_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::eutra_cell_id_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::destroy_() -{ - switch (type_) { - case types::cgi_info_r17: - c.destroy(); - break; - case types::pci_arfcn_r17: - c.destroy(); - break; - default: - break; - } -} -void visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::cgi_info_r17: - c.init(); - break; - case types::pci_arfcn_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_"); - } -} -visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::nr_cell_id_r17_c_( - const visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::cgi_info_r17: - c.init(other.c.get()); - break; - case types::pci_arfcn_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_"); - } -} -visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_& -visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::operator=( - const visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::cgi_info_r17: - c.set(other.c.get()); - break; - case types::pci_arfcn_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_"); - } - - return *this; -} -cgi_info_logging_r16_s& visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::set_cgi_info_r17() -{ - set(types::cgi_info_r17); - return c.get(); -} -pci_arfcn_nr_r16_s& visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::set_pci_arfcn_r17() -{ - set(types::pci_arfcn_r17); - return c.get(); -} -void visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::cgi_info_r17: - j.write_fieldname("cgi-Info-r17"); - c.get().to_json(j); - break; - case types::pci_arfcn_r17: - j.write_fieldname("pci-arfcn-r17"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cgi_info_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pci_arfcn_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cgi_info_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pci_arfcn_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::destroy_() -{ - switch (type_) { - case types::cell_global_id_r17: - c.destroy(); - break; - case types::pci_arfcn_r17: - c.destroy(); - break; - default: - break; - } -} -void visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::cell_global_id_r17: - c.init(); - break; - case types::pci_arfcn_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_"); - } -} -visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::eutra_cell_id_r17_c_( - const visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::cell_global_id_r17: - c.init(other.c.get()); - break; - case types::pci_arfcn_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_"); - } -} -visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_& -visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::operator=( - const visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::cell_global_id_r17: - c.set(other.c.get()); - break; - case types::pci_arfcn_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_"); - } - - return *this; -} -cgi_info_eutra_logging_s& -visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::set_cell_global_id_r17() -{ - set(types::cell_global_id_r17); - return c.get(); -} -pci_arfcn_eutra_r16_s& visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::set_pci_arfcn_r17() -{ - set(types::pci_arfcn_r17); - return c.get(); -} -void visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::cell_global_id_r17: - j.write_fieldname("cellGlobalId-r17"); - c.get().to_json(j); - break; - case types::pci_arfcn_r17: - j.write_fieldname("pci-arfcn-r17"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cell_global_id_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pci_arfcn_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cell_global_id_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pci_arfcn_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// LocationInfo-r16 ::= SEQUENCE -SRSASN_CODE location_info_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(common_location_info_r16_present, 1)); - HANDLE_CODE(bref.pack(bt_location_info_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(wlan_location_info_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sensor_location_info_r16_present, 1)); - - if (common_location_info_r16_present) { - HANDLE_CODE(common_location_info_r16.pack(bref)); - } - if (bt_location_info_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, bt_location_info_r16, 1, 32)); - } - if (wlan_location_info_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, wlan_location_info_r16, 1, 32)); - } - if (sensor_location_info_r16_present) { - HANDLE_CODE(sensor_location_info_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE location_info_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(common_location_info_r16_present, 1)); - bool bt_location_info_r16_present; - HANDLE_CODE(bref.unpack(bt_location_info_r16_present, 1)); - bool wlan_location_info_r16_present; - HANDLE_CODE(bref.unpack(wlan_location_info_r16_present, 1)); - HANDLE_CODE(bref.unpack(sensor_location_info_r16_present, 1)); - - if (common_location_info_r16_present) { - HANDLE_CODE(common_location_info_r16.unpack(bref)); - } - if (bt_location_info_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(bt_location_info_r16, bref, 1, 32)); - } - if (wlan_location_info_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(wlan_location_info_r16, bref, 1, 32)); - } - if (sensor_location_info_r16_present) { - HANDLE_CODE(sensor_location_info_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void location_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (common_location_info_r16_present) { - j.write_fieldname("commonLocationInfo-r16"); - common_location_info_r16.to_json(j); - } - if (bt_location_info_r16.size() > 0) { - j.start_array("bt-LocationInfo-r16"); - for (const auto& e1 : bt_location_info_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (wlan_location_info_r16.size() > 0) { - j.start_array("wlan-LocationInfo-r16"); - for (const auto& e1 : wlan_location_info_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sensor_location_info_r16_present) { - j.write_fieldname("sensor-LocationInfo-r16"); - sensor_location_info_r16.to_json(j); - } - j.end_obj(); -} - -// MUSIM-Assistance-r17 ::= SEQUENCE -SRSASN_CODE mu_si_m_assist_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(musim_preferred_rrc_state_r17_present, 1)); - HANDLE_CODE(bref.pack(musim_gap_pref_list_r17.size() > 0, 1)); - - if (musim_preferred_rrc_state_r17_present) { - HANDLE_CODE(musim_preferred_rrc_state_r17.pack(bref)); - } - if (musim_gap_pref_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, musim_gap_pref_list_r17, 1, 4)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mu_si_m_assist_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(musim_preferred_rrc_state_r17_present, 1)); - bool musim_gap_pref_list_r17_present; - HANDLE_CODE(bref.unpack(musim_gap_pref_list_r17_present, 1)); - - if (musim_preferred_rrc_state_r17_present) { - HANDLE_CODE(musim_preferred_rrc_state_r17.unpack(bref)); - } - if (musim_gap_pref_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(musim_gap_pref_list_r17, bref, 1, 4)); - } - - return SRSASN_SUCCESS; -} -void mu_si_m_assist_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (musim_preferred_rrc_state_r17_present) { - j.write_str("musim-PreferredRRC-State-r17", musim_preferred_rrc_state_r17.to_string()); - } - if (musim_gap_pref_list_r17.size() > 0) { - j.start_array("musim-GapPreferenceList-r17"); - for (const auto& e1 : musim_gap_pref_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -const char* mu_si_m_assist_r17_s::musim_preferred_rrc_state_r17_opts::to_string() const -{ - static const char* names[] = {"idle", "inactive", "outOfConnected"}; - return convert_enum_idx(names, 3, value, "mu_si_m_assist_r17_s::musim_preferred_rrc_state_r17_e_"); -} - -// MaxBW-PreferenceFR2-2-r17 ::= SEQUENCE -SRSASN_CODE max_bw_pref_fr2_2_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(reduced_max_bw_fr2_2_r17_present, 1)); - - if (reduced_max_bw_fr2_2_r17_present) { - HANDLE_CODE(bref.pack(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17_present, 1)); - HANDLE_CODE(bref.pack(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17_present, 1)); - if (reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17_present) { - HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17.pack(bref)); - } - if (reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17_present) { - HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17.pack(bref)); - } - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE max_bw_pref_fr2_2_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(reduced_max_bw_fr2_2_r17_present, 1)); - - if (reduced_max_bw_fr2_2_r17_present) { - HANDLE_CODE(bref.unpack(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17_present, 1)); - HANDLE_CODE(bref.unpack(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17_present, 1)); - if (reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17_present) { - HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17.unpack(bref)); - } - if (reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17_present) { - HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17.unpack(bref)); - } - } - - return SRSASN_SUCCESS; -} -void max_bw_pref_fr2_2_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (reduced_max_bw_fr2_2_r17_present) { - j.write_fieldname("reducedMaxBW-FR2-2-r17"); - j.start_obj(); - if (reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17_present) { - j.write_str("reducedBW-FR2-2-DL-r17", reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17.to_string()); - } - if (reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17_present) { - j.write_str("reducedBW-FR2-2-UL-r17", reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17.to_string()); - } - j.end_obj(); - } - j.end_obj(); -} - -// MaxMIMO-LayerPreferenceFR2-2-r17 ::= SEQUENCE -SRSASN_CODE max_mimo_layer_pref_fr2_2_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(reduced_max_mimo_layers_fr2_2_r17_present, 1)); - - if (reduced_max_mimo_layers_fr2_2_r17_present) { - HANDLE_CODE(pack_integer( - bref, reduced_max_mimo_layers_fr2_2_r17.reduced_mimo_layers_fr2_2_dl_r17, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(pack_integer( - bref, reduced_max_mimo_layers_fr2_2_r17.reduced_mimo_layers_fr2_2_ul_r17, (uint8_t)1u, (uint8_t)4u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE max_mimo_layer_pref_fr2_2_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(reduced_max_mimo_layers_fr2_2_r17_present, 1)); - - if (reduced_max_mimo_layers_fr2_2_r17_present) { - HANDLE_CODE(unpack_integer( - reduced_max_mimo_layers_fr2_2_r17.reduced_mimo_layers_fr2_2_dl_r17, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(unpack_integer( - reduced_max_mimo_layers_fr2_2_r17.reduced_mimo_layers_fr2_2_ul_r17, bref, (uint8_t)1u, (uint8_t)4u)); - } - - return SRSASN_SUCCESS; -} -void max_mimo_layer_pref_fr2_2_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (reduced_max_mimo_layers_fr2_2_r17_present) { - j.write_fieldname("reducedMaxMIMO-LayersFR2-2-r17"); - j.start_obj(); - j.write_int("reducedMIMO-LayersFR2-2-DL-r17", reduced_max_mimo_layers_fr2_2_r17.reduced_mimo_layers_fr2_2_dl_r17); - j.write_int("reducedMIMO-LayersFR2-2-UL-r17", reduced_max_mimo_layers_fr2_2_r17.reduced_mimo_layers_fr2_2_ul_r17); - j.end_obj(); - } - j.end_obj(); -} - -// MeasResultCBR-NR-r16 ::= SEQUENCE -SRSASN_CODE meas_result_cbr_nr_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, sl_pool_report_id_r16, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(pack_integer(bref, sl_cbr_results_nr_r16, (uint8_t)0u, (uint8_t)100u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_cbr_nr_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(sl_pool_report_id_r16, bref, (uint8_t)1u, (uint8_t)16u)); - HANDLE_CODE(unpack_integer(sl_cbr_results_nr_r16, bref, (uint8_t)0u, (uint8_t)100u)); - - return SRSASN_SUCCESS; -} -void meas_result_cbr_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("sl-poolReportIdentity-r16", sl_pool_report_id_r16); - j.write_int("sl-CBR-ResultsNR-r16", sl_cbr_results_nr_r16); - j.end_obj(); -} - -// MeasResultCLI-RSSI-r16 ::= SEQUENCE -SRSASN_CODE meas_result_cli_rssi_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, rssi_res_id_r16, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_integer(bref, cli_rssi_result_r16, (uint8_t)0u, (uint8_t)76u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_cli_rssi_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(rssi_res_id_r16, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_integer(cli_rssi_result_r16, bref, (uint8_t)0u, (uint8_t)76u)); - - return SRSASN_SUCCESS; -} -void meas_result_cli_rssi_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("rssi-ResourceId-r16", rssi_res_id_r16); - j.write_int("cli-RSSI-Result-r16", cli_rssi_result_r16); - j.end_obj(); -} - -// MeasResultFailedCell-r16 ::= SEQUENCE -SRSASN_CODE meas_result_failed_cell_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(cgi_info.pack(bref)); - HANDLE_CODE(meas_result_r16.cell_results_r16.results_ssb_cell_r16.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16, 1, 64)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_failed_cell_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(cgi_info.unpack(bref)); - HANDLE_CODE(meas_result_r16.cell_results_r16.results_ssb_cell_r16.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16, bref, 1, 64)); - - return SRSASN_SUCCESS; -} -void meas_result_failed_cell_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("cgi-Info"); - cgi_info.to_json(j); - j.write_fieldname("measResult-r16"); - j.start_obj(); - j.write_fieldname("cellResults-r16"); - j.start_obj(); - j.write_fieldname("resultsSSB-Cell-r16"); - meas_result_r16.cell_results_r16.results_ssb_cell_r16.to_json(j); - j.end_obj(); - j.write_fieldname("rsIndexResults-r16"); - j.start_obj(); - j.start_array("resultsSSB-Indexes-r16"); - for (const auto& e1 : meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); - j.end_obj(); - j.end_obj(); -} - -// MeasResultSRS-RSRP-r16 ::= SEQUENCE -SRSASN_CODE meas_result_srs_rsrp_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, srs_res_id_r16, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(pack_integer(bref, srs_rsrp_result_r16, (uint8_t)0u, (uint8_t)98u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_srs_rsrp_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(srs_res_id_r16, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(unpack_integer(srs_rsrp_result_r16, bref, (uint8_t)0u, (uint8_t)98u)); - - return SRSASN_SUCCESS; -} -void meas_result_srs_rsrp_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("srs-ResourceId-r16", srs_res_id_r16); - j.write_int("srs-RSRP-Result-r16", srs_rsrp_result_r16); - j.end_obj(); -} - -// MeasResultServingCell-r16 ::= SEQUENCE -SRSASN_CODE meas_result_serving_cell_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(results_ssb_present, 1)); - - HANDLE_CODE(results_ssb_cell.pack(bref)); - if (results_ssb_present) { - HANDLE_CODE(pack_integer(bref, results_ssb.best_ssb_idx, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(results_ssb.best_ssb_results.pack(bref)); - HANDLE_CODE(pack_integer(bref, results_ssb.nof_good_ssb, (uint8_t)1u, (uint8_t)64u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_serving_cell_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(results_ssb_present, 1)); - - HANDLE_CODE(results_ssb_cell.unpack(bref)); - if (results_ssb_present) { - HANDLE_CODE(unpack_integer(results_ssb.best_ssb_idx, bref, (uint8_t)0u, (uint8_t)63u)); - HANDLE_CODE(results_ssb.best_ssb_results.unpack(bref)); - HANDLE_CODE(unpack_integer(results_ssb.nof_good_ssb, bref, (uint8_t)1u, (uint8_t)64u)); - } - - return SRSASN_SUCCESS; -} -void meas_result_serving_cell_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("resultsSSB-Cell"); - results_ssb_cell.to_json(j); - if (results_ssb_present) { - j.write_fieldname("resultsSSB"); - j.start_obj(); - j.write_int("best-ssb-Index", results_ssb.best_ssb_idx); - j.write_fieldname("best-ssb-Results"); - results_ssb.best_ssb_results.to_json(j); - j.write_int("numberOfGoodSSB", results_ssb.nof_good_ssb); - j.end_obj(); - } - j.end_obj(); -} - -// MeasResultsPerCellIdleEUTRA-r16 ::= SEQUENCE -SRSASN_CODE meas_results_per_cell_idle_eutra_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, eutra_pci_r16, (uint16_t)0u, (uint16_t)503u)); - HANDLE_CODE(bref.pack(meas_idle_result_eutra_r16.rsrp_result_eutra_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_idle_result_eutra_r16.rsrq_result_eutra_r16_present, 1)); - if (meas_idle_result_eutra_r16.rsrp_result_eutra_r16_present) { - HANDLE_CODE(pack_integer(bref, meas_idle_result_eutra_r16.rsrp_result_eutra_r16, (uint8_t)0u, (uint8_t)97u)); - } - if (meas_idle_result_eutra_r16.rsrq_result_eutra_r16_present) { - HANDLE_CODE(pack_integer(bref, meas_idle_result_eutra_r16.rsrq_result_eutra_r16, (int8_t)-30, (int8_t)46)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_results_per_cell_idle_eutra_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(eutra_pci_r16, bref, (uint16_t)0u, (uint16_t)503u)); - HANDLE_CODE(bref.unpack(meas_idle_result_eutra_r16.rsrp_result_eutra_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_idle_result_eutra_r16.rsrq_result_eutra_r16_present, 1)); - if (meas_idle_result_eutra_r16.rsrp_result_eutra_r16_present) { - HANDLE_CODE(unpack_integer(meas_idle_result_eutra_r16.rsrp_result_eutra_r16, bref, (uint8_t)0u, (uint8_t)97u)); - } - if (meas_idle_result_eutra_r16.rsrq_result_eutra_r16_present) { - HANDLE_CODE(unpack_integer(meas_idle_result_eutra_r16.rsrq_result_eutra_r16, bref, (int8_t)-30, (int8_t)46)); - } - - return SRSASN_SUCCESS; -} -void meas_results_per_cell_idle_eutra_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("eutra-PhysCellId-r16", eutra_pci_r16); - j.write_fieldname("measIdleResultEUTRA-r16"); - j.start_obj(); - if (meas_idle_result_eutra_r16.rsrp_result_eutra_r16_present) { - j.write_int("rsrp-ResultEUTRA-r16", meas_idle_result_eutra_r16.rsrp_result_eutra_r16); - } - if (meas_idle_result_eutra_r16.rsrq_result_eutra_r16_present) { - j.write_int("rsrq-ResultEUTRA-r16", meas_idle_result_eutra_r16.rsrq_result_eutra_r16); - } - j.end_obj(); - j.end_obj(); -} - -// MeasResultsPerCellIdleNR-r16 ::= SEQUENCE -SRSASN_CODE meas_results_per_cell_idle_nr_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(bref.pack(meas_idle_result_nr_r16.rsrp_result_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_idle_result_nr_r16.rsrq_result_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_idle_result_nr_r16.results_ssb_idxes_r16.size() > 0, 1)); - if (meas_idle_result_nr_r16.rsrp_result_r16_present) { - HANDLE_CODE(pack_integer(bref, meas_idle_result_nr_r16.rsrp_result_r16, (uint8_t)0u, (uint8_t)127u)); - } - if (meas_idle_result_nr_r16.rsrq_result_r16_present) { - HANDLE_CODE(pack_integer(bref, meas_idle_result_nr_r16.rsrq_result_r16, (uint8_t)0u, (uint8_t)127u)); - } - if (meas_idle_result_nr_r16.results_ssb_idxes_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_result_nr_r16.results_ssb_idxes_r16, 1, 32)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_results_per_cell_idle_nr_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(bref.unpack(meas_idle_result_nr_r16.rsrp_result_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_idle_result_nr_r16.rsrq_result_r16_present, 1)); - bool results_ssb_idxes_r16_present; - HANDLE_CODE(bref.unpack(results_ssb_idxes_r16_present, 1)); - if (meas_idle_result_nr_r16.rsrp_result_r16_present) { - HANDLE_CODE(unpack_integer(meas_idle_result_nr_r16.rsrp_result_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (meas_idle_result_nr_r16.rsrq_result_r16_present) { - HANDLE_CODE(unpack_integer(meas_idle_result_nr_r16.rsrq_result_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (results_ssb_idxes_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_idle_result_nr_r16.results_ssb_idxes_r16, bref, 1, 32)); - } - - return SRSASN_SUCCESS; -} -void meas_results_per_cell_idle_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("physCellId-r16", pci_r16); - j.write_fieldname("measIdleResultNR-r16"); - j.start_obj(); - if (meas_idle_result_nr_r16.rsrp_result_r16_present) { - j.write_int("rsrp-Result-r16", meas_idle_result_nr_r16.rsrp_result_r16); - } - if (meas_idle_result_nr_r16.rsrq_result_r16_present) { - j.write_int("rsrq-Result-r16", meas_idle_result_nr_r16.rsrq_result_r16); - } - if (meas_idle_result_nr_r16.results_ssb_idxes_r16.size() > 0) { - j.start_array("resultsSSB-Indexes-r16"); - for (const auto& e1 : meas_idle_result_nr_r16.results_ssb_idxes_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); - j.end_obj(); -} - -// MinSchedulingOffsetPreferenceExt-r17 ::= SEQUENCE -SRSASN_CODE min_sched_offset_pref_ext_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(preferred_k0_r17_present, 1)); - HANDLE_CODE(bref.pack(preferred_k2_r17_present, 1)); - - if (preferred_k0_r17_present) { - HANDLE_CODE(bref.pack(preferred_k0_r17.preferred_k0_scs_480k_hz_r17_present, 1)); - HANDLE_CODE(bref.pack(preferred_k0_r17.preferred_k0_scs_960k_hz_r17_present, 1)); - if (preferred_k0_r17.preferred_k0_scs_480k_hz_r17_present) { - HANDLE_CODE(preferred_k0_r17.preferred_k0_scs_480k_hz_r17.pack(bref)); - } - if (preferred_k0_r17.preferred_k0_scs_960k_hz_r17_present) { - HANDLE_CODE(preferred_k0_r17.preferred_k0_scs_960k_hz_r17.pack(bref)); - } - } - if (preferred_k2_r17_present) { - HANDLE_CODE(bref.pack(preferred_k2_r17.preferred_k2_scs_480k_hz_r17_present, 1)); - HANDLE_CODE(bref.pack(preferred_k2_r17.preferred_k2_scs_960k_hz_r17_present, 1)); - if (preferred_k2_r17.preferred_k2_scs_480k_hz_r17_present) { - HANDLE_CODE(preferred_k2_r17.preferred_k2_scs_480k_hz_r17.pack(bref)); - } - if (preferred_k2_r17.preferred_k2_scs_960k_hz_r17_present) { - HANDLE_CODE(preferred_k2_r17.preferred_k2_scs_960k_hz_r17.pack(bref)); - } - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE min_sched_offset_pref_ext_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(preferred_k0_r17_present, 1)); - HANDLE_CODE(bref.unpack(preferred_k2_r17_present, 1)); - - if (preferred_k0_r17_present) { - HANDLE_CODE(bref.unpack(preferred_k0_r17.preferred_k0_scs_480k_hz_r17_present, 1)); - HANDLE_CODE(bref.unpack(preferred_k0_r17.preferred_k0_scs_960k_hz_r17_present, 1)); - if (preferred_k0_r17.preferred_k0_scs_480k_hz_r17_present) { - HANDLE_CODE(preferred_k0_r17.preferred_k0_scs_480k_hz_r17.unpack(bref)); - } - if (preferred_k0_r17.preferred_k0_scs_960k_hz_r17_present) { - HANDLE_CODE(preferred_k0_r17.preferred_k0_scs_960k_hz_r17.unpack(bref)); - } - } - if (preferred_k2_r17_present) { - HANDLE_CODE(bref.unpack(preferred_k2_r17.preferred_k2_scs_480k_hz_r17_present, 1)); - HANDLE_CODE(bref.unpack(preferred_k2_r17.preferred_k2_scs_960k_hz_r17_present, 1)); - if (preferred_k2_r17.preferred_k2_scs_480k_hz_r17_present) { - HANDLE_CODE(preferred_k2_r17.preferred_k2_scs_480k_hz_r17.unpack(bref)); - } - if (preferred_k2_r17.preferred_k2_scs_960k_hz_r17_present) { - HANDLE_CODE(preferred_k2_r17.preferred_k2_scs_960k_hz_r17.unpack(bref)); - } - } - - return SRSASN_SUCCESS; -} -void min_sched_offset_pref_ext_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (preferred_k0_r17_present) { - j.write_fieldname("preferredK0-r17"); - j.start_obj(); - if (preferred_k0_r17.preferred_k0_scs_480k_hz_r17_present) { - j.write_str("preferredK0-SCS-480kHz-r17", preferred_k0_r17.preferred_k0_scs_480k_hz_r17.to_string()); - } - if (preferred_k0_r17.preferred_k0_scs_960k_hz_r17_present) { - j.write_str("preferredK0-SCS-960kHz-r17", preferred_k0_r17.preferred_k0_scs_960k_hz_r17.to_string()); - } - j.end_obj(); - } - if (preferred_k2_r17_present) { - j.write_fieldname("preferredK2-r17"); - j.start_obj(); - if (preferred_k2_r17.preferred_k2_scs_480k_hz_r17_present) { - j.write_str("preferredK2-SCS-480kHz-r17", preferred_k2_r17.preferred_k2_scs_480k_hz_r17.to_string()); - } - if (preferred_k2_r17.preferred_k2_scs_960k_hz_r17_present) { - j.write_str("preferredK2-SCS-960kHz-r17", preferred_k2_r17.preferred_k2_scs_960k_hz_r17.to_string()); - } - j.end_obj(); - } - j.end_obj(); -} - -const char* min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_480k_hz_r17_opts::to_string() const -{ - static const char* names[] = {"sl8", "sl16", "sl32", "sl48"}; - return convert_enum_idx( - names, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_480k_hz_r17_e_"); -} -uint8_t min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_480k_hz_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {8, 16, 32, 48}; - return map_enum_number( - numbers, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_480k_hz_r17_e_"); -} - -const char* min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_960k_hz_r17_opts::to_string() const -{ - static const char* names[] = {"sl8", "sl16", "sl32", "sl48"}; - return convert_enum_idx( - names, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_960k_hz_r17_e_"); -} -uint8_t min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_960k_hz_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {8, 16, 32, 48}; - return map_enum_number( - numbers, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_960k_hz_r17_e_"); -} - -const char* min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_480k_hz_r17_opts::to_string() const -{ - static const char* names[] = {"sl8", "sl16", "sl32", "sl48"}; - return convert_enum_idx( - names, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_480k_hz_r17_e_"); -} -uint8_t min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_480k_hz_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {8, 16, 32, 48}; - return map_enum_number( - numbers, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_480k_hz_r17_e_"); -} - -const char* min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_960k_hz_r17_opts::to_string() const -{ - static const char* names[] = {"sl8", "sl16", "sl32", "sl48"}; - return convert_enum_idx( - names, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_960k_hz_r17_e_"); -} -uint8_t min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_960k_hz_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {8, 16, 32, 48}; - return map_enum_number( - numbers, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_960k_hz_r17_e_"); -} - -// NeedForGapsInfoNR-r16 ::= SEQUENCE -SRSASN_CODE need_for_gaps_info_nr_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_dyn_seq_of(bref, intra_freq_need_for_gap_r16, 1, 32)); - HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_need_for_gap_r16, 1, 1024)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE need_for_gaps_info_nr_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_dyn_seq_of(intra_freq_need_for_gap_r16, bref, 1, 32)); - HANDLE_CODE(unpack_dyn_seq_of(inter_freq_need_for_gap_r16, bref, 1, 1024)); - - return SRSASN_SUCCESS; -} -void need_for_gaps_info_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("intraFreq-needForGap-r16"); - for (const auto& e1 : intra_freq_need_for_gap_r16) { - e1.to_json(j); - } - j.end_array(); - j.start_array("interFreq-needForGap-r16"); - for (const auto& e1 : inter_freq_need_for_gap_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// OverheatingAssistance-r17 ::= SEQUENCE -SRSASN_CODE overheat_assist_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(reduced_max_bw_fr2_2_r17_present, 1)); - HANDLE_CODE(bref.pack(reduced_max_mimo_layers_fr2_2_present, 1)); - - if (reduced_max_bw_fr2_2_r17_present) { - HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17.pack(bref)); - HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17.pack(bref)); - } - if (reduced_max_mimo_layers_fr2_2_present) { - HANDLE_CODE(reduced_max_mimo_layers_fr2_2.reduced_mimo_layers_fr2_2_dl.pack(bref)); - HANDLE_CODE(reduced_max_mimo_layers_fr2_2.reduced_mimo_layers_fr2_2_ul.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE overheat_assist_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(reduced_max_bw_fr2_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(reduced_max_mimo_layers_fr2_2_present, 1)); - - if (reduced_max_bw_fr2_2_r17_present) { - HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17.unpack(bref)); - HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17.unpack(bref)); - } - if (reduced_max_mimo_layers_fr2_2_present) { - HANDLE_CODE(reduced_max_mimo_layers_fr2_2.reduced_mimo_layers_fr2_2_dl.unpack(bref)); - HANDLE_CODE(reduced_max_mimo_layers_fr2_2.reduced_mimo_layers_fr2_2_ul.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void overheat_assist_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (reduced_max_bw_fr2_2_r17_present) { - j.write_fieldname("reducedMaxBW-FR2-2-r17"); - j.start_obj(); - j.write_str("reducedBW-FR2-2-DL-r17", reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17.to_string()); - j.write_str("reducedBW-FR2-2-UL-r17", reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17.to_string()); - j.end_obj(); - } - if (reduced_max_mimo_layers_fr2_2_present) { - j.write_fieldname("reducedMaxMIMO-LayersFR2-2"); - j.start_obj(); - j.write_str("reducedMIMO-LayersFR2-2-DL", reduced_max_mimo_layers_fr2_2.reduced_mimo_layers_fr2_2_dl.to_string()); - j.write_str("reducedMIMO-LayersFR2-2-UL", reduced_max_mimo_layers_fr2_2.reduced_mimo_layers_fr2_2_ul.to_string()); - j.end_obj(); - } - j.end_obj(); -} - -// RRCReconfigurationComplete-v1640-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_complete_v1640_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_tx_direct_current_two_carrier_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ul_tx_direct_current_two_carrier_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_two_carrier_list_r16, 1, 64)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_recfg_complete_v1640_ies_s::unpack(cbit_ref& bref) -{ - bool ul_tx_direct_current_two_carrier_list_r16_present; - HANDLE_CODE(bref.unpack(ul_tx_direct_current_two_carrier_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ul_tx_direct_current_two_carrier_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_two_carrier_list_r16, bref, 1, 64)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_recfg_complete_v1640_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ul_tx_direct_current_two_carrier_list_r16.size() > 0) { - j.start_array("uplinkTxDirectCurrentTwoCarrierList-r16"); - for (const auto& e1 : ul_tx_direct_current_two_carrier_list_r16) { - 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(); -} - -// RRCResumeComplete-v1720-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_complete_v1720_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_tx_direct_current_more_carrier_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ul_tx_direct_current_more_carrier_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_more_carrier_list_r17, 1, 16)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_complete_v1720_ies_s::unpack(cbit_ref& bref) -{ - bool ul_tx_direct_current_more_carrier_list_r17_present; - HANDLE_CODE(bref.unpack(ul_tx_direct_current_more_carrier_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ul_tx_direct_current_more_carrier_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_more_carrier_list_r17, bref, 1, 16)); - } - - return SRSASN_SUCCESS; -} -void rrc_resume_complete_v1720_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ul_tx_direct_current_more_carrier_list_r17.size() > 0) { - j.start_array("uplinkTxDirectCurrentMoreCarrierList-r17"); - for (const auto& e1 : ul_tx_direct_current_more_carrier_list_r17) { - 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(); -} - -// ReducedMaxBW-FRx-r16 ::= SEQUENCE -SRSASN_CODE reduced_max_bw_f_rx_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(reduced_bw_dl_r16.pack(bref)); - HANDLE_CODE(reduced_bw_ul_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE reduced_max_bw_f_rx_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(reduced_bw_dl_r16.unpack(bref)); - HANDLE_CODE(reduced_bw_ul_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void reduced_max_bw_f_rx_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("reducedBW-DL-r16", reduced_bw_dl_r16.to_string()); - j.write_str("reducedBW-UL-r16", reduced_bw_ul_r16.to_string()); - j.end_obj(); -} - -// ReducedMaxCCs-r16 ::= SEQUENCE -SRSASN_CODE reduced_max_ccs_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, reduced_ccs_dl_r16, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(pack_integer(bref, reduced_ccs_ul_r16, (uint8_t)0u, (uint8_t)31u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE reduced_max_ccs_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(reduced_ccs_dl_r16, bref, (uint8_t)0u, (uint8_t)31u)); - HANDLE_CODE(unpack_integer(reduced_ccs_ul_r16, bref, (uint8_t)0u, (uint8_t)31u)); - - return SRSASN_SUCCESS; -} -void reduced_max_ccs_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("reducedCCsDL-r16", reduced_ccs_dl_r16); - j.write_int("reducedCCsUL-r16", reduced_ccs_ul_r16); - j.end_obj(); -} - -// SIB-Type-r17 ::= ENUMERATED -const char* sib_type_r17_opts::to_string() const -{ - static const char* names[] = {"sibType2", - "sibType3", - "sibType4", - "sibType5", - "sibType9", - "sibType10-v1610", - "sibType11-v1610", - "sibType12-v1610", - "sibType13-v1610", - "sibType14-v1610", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "sib_type_r17_e"); -} -uint8_t sib_type_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 3, 4, 5, 9, 10, 11, 12, 13, 14}; - return map_enum_number(numbers, 10, value, "sib_type_r17_e"); -} - -// SL-TrafficPatternInfo-r16 ::= SEQUENCE -SRSASN_CODE sl_traffic_pattern_info_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(traffic_periodicity_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, timing_offset_r16, (uint16_t)0u, (uint16_t)10239u)); - HANDLE_CODE(msg_size_r16.pack(bref)); - HANDLE_CODE(pack_integer(bref, sl_qos_flow_id_r16, (uint16_t)1u, (uint16_t)2048u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_traffic_pattern_info_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(traffic_periodicity_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(timing_offset_r16, bref, (uint16_t)0u, (uint16_t)10239u)); - HANDLE_CODE(msg_size_r16.unpack(bref)); - HANDLE_CODE(unpack_integer(sl_qos_flow_id_r16, bref, (uint16_t)1u, (uint16_t)2048u)); - - return SRSASN_SUCCESS; -} -void sl_traffic_pattern_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("trafficPeriodicity-r16", traffic_periodicity_r16.to_string()); - j.write_int("timingOffset-r16", timing_offset_r16); - j.write_str("messageSize-r16", msg_size_r16.to_string()); - j.write_int("sl-QoS-FlowIdentity-r16", sl_qos_flow_id_r16); - j.end_obj(); -} - -const char* sl_traffic_pattern_info_r16_s::traffic_periodicity_r16_opts::to_string() const -{ - static const char* names[] = { - "ms20", "ms50", "ms100", "ms200", "ms300", "ms400", "ms500", "ms600", "ms700", "ms800", "ms900", "ms1000"}; - return convert_enum_idx(names, 12, value, "sl_traffic_pattern_info_r16_s::traffic_periodicity_r16_e_"); -} -uint16_t sl_traffic_pattern_info_r16_s::traffic_periodicity_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; - return map_enum_number(numbers, 12, value, "sl_traffic_pattern_info_r16_s::traffic_periodicity_r16_e_"); -} - -// SL-TxResourceReq-v1700 ::= SEQUENCE -SRSASN_CODE sl_tx_res_req_v1700_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_drx_info_from_rx_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_drx_ind_r17_present, 1)); - - if (sl_drx_info_from_rx_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_drx_info_from_rx_list_r17, 1, 4)); - } - if (sl_drx_ind_r17_present) { - HANDLE_CODE(sl_drx_ind_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_tx_res_req_v1700_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool sl_drx_info_from_rx_list_r17_present; - HANDLE_CODE(bref.unpack(sl_drx_info_from_rx_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_drx_ind_r17_present, 1)); - - if (sl_drx_info_from_rx_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_drx_info_from_rx_list_r17, bref, 1, 4)); - } - if (sl_drx_ind_r17_present) { - HANDLE_CODE(sl_drx_ind_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sl_tx_res_req_v1700_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_drx_info_from_rx_list_r17.size() > 0) { - j.start_array("sl-DRX-InfoFromRxList-r17"); - for (const auto& e1 : sl_drx_info_from_rx_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_drx_ind_r17_present) { - j.write_str("sl-DRX-Indication-r17", sl_drx_ind_r17.to_string()); - } - j.end_obj(); -} - -const char* sl_tx_res_req_v1700_s::sl_drx_ind_r17_opts::to_string() const -{ - static const char* names[] = {"on", "off"}; - return convert_enum_idx(names, 2, value, "sl_tx_res_req_v1700_s::sl_drx_ind_r17_e_"); -} - -// SL-TxResourceReqCommRelay-r17 ::= CHOICE -void sl_tx_res_req_comm_relay_r17_c::destroy_() -{ - switch (type_) { - case types::sl_tx_res_req_l2_u2_n_relay_r17: - c.destroy(); - break; - case types::sl_tx_res_req_l3_u2_n_relay_r17: - c.destroy(); - break; - default: - break; - } -} -void sl_tx_res_req_comm_relay_r17_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::sl_tx_res_req_l2_u2_n_relay_r17: - c.init(); - break; - case types::sl_tx_res_req_l3_u2_n_relay_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sl_tx_res_req_comm_relay_r17_c"); - } -} -sl_tx_res_req_comm_relay_r17_c::sl_tx_res_req_comm_relay_r17_c(const sl_tx_res_req_comm_relay_r17_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::sl_tx_res_req_l2_u2_n_relay_r17: - c.init(other.c.get()); - break; - case types::sl_tx_res_req_l3_u2_n_relay_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sl_tx_res_req_comm_relay_r17_c"); - } -} -sl_tx_res_req_comm_relay_r17_c& sl_tx_res_req_comm_relay_r17_c::operator=(const sl_tx_res_req_comm_relay_r17_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::sl_tx_res_req_l2_u2_n_relay_r17: - c.set(other.c.get()); - break; - case types::sl_tx_res_req_l3_u2_n_relay_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "sl_tx_res_req_comm_relay_r17_c"); - } - - return *this; -} -sl_tx_res_req_l2_u2_n_relay_r17_s& sl_tx_res_req_comm_relay_r17_c::set_sl_tx_res_req_l2_u2_n_relay_r17() -{ - set(types::sl_tx_res_req_l2_u2_n_relay_r17); - return c.get(); -} -sl_tx_res_req_r16_s& sl_tx_res_req_comm_relay_r17_c::set_sl_tx_res_req_l3_u2_n_relay_r17() -{ - set(types::sl_tx_res_req_l3_u2_n_relay_r17); - return c.get(); -} -void sl_tx_res_req_comm_relay_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::sl_tx_res_req_l2_u2_n_relay_r17: - j.write_fieldname("sl-TxResourceReqL2U2N-Relay-r17"); - c.get().to_json(j); - break; - case types::sl_tx_res_req_l3_u2_n_relay_r17: - j.write_fieldname("sl-TxResourceReqL3U2N-Relay-r17"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "sl_tx_res_req_comm_relay_r17_c"); - } - j.end_obj(); -} -SRSASN_CODE sl_tx_res_req_comm_relay_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::sl_tx_res_req_l2_u2_n_relay_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::sl_tx_res_req_l3_u2_n_relay_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "sl_tx_res_req_comm_relay_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_tx_res_req_comm_relay_r17_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::sl_tx_res_req_l2_u2_n_relay_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::sl_tx_res_req_l3_u2_n_relay_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "sl_tx_res_req_comm_relay_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// UE-MeasurementsAvailable-r16 ::= SEQUENCE -SRSASN_CODE ue_meass_available_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(log_meas_available_r16_present, 1)); - HANDLE_CODE(bref.pack(log_meas_available_bt_r16_present, 1)); - HANDLE_CODE(bref.pack(log_meas_available_wlan_r16_present, 1)); - HANDLE_CODE(bref.pack(conn_est_fail_info_available_r16_present, 1)); - HANDLE_CODE(bref.pack(rlf_info_available_r16_present, 1)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= success_ho_info_available_r17_present; - group_flags[0] |= sig_log_meas_cfg_available_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(success_ho_info_available_r17_present, 1)); - HANDLE_CODE(bref.pack(sig_log_meas_cfg_available_r17_present, 1)); - if (sig_log_meas_cfg_available_r17_present) { - HANDLE_CODE(bref.pack(sig_log_meas_cfg_available_r17, 1)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_meass_available_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(log_meas_available_r16_present, 1)); - HANDLE_CODE(bref.unpack(log_meas_available_bt_r16_present, 1)); - HANDLE_CODE(bref.unpack(log_meas_available_wlan_r16_present, 1)); - HANDLE_CODE(bref.unpack(conn_est_fail_info_available_r16_present, 1)); - HANDLE_CODE(bref.unpack(rlf_info_available_r16_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(success_ho_info_available_r17_present, 1)); - HANDLE_CODE(bref.unpack(sig_log_meas_cfg_available_r17_present, 1)); - if (sig_log_meas_cfg_available_r17_present) { - HANDLE_CODE(bref.unpack(sig_log_meas_cfg_available_r17, 1)); - } - } - } - return SRSASN_SUCCESS; -} -void ue_meass_available_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (log_meas_available_r16_present) { - j.write_str("logMeasAvailable-r16", "true"); - } - if (log_meas_available_bt_r16_present) { - j.write_str("logMeasAvailableBT-r16", "true"); - } - if (log_meas_available_wlan_r16_present) { - j.write_str("logMeasAvailableWLAN-r16", "true"); - } - if (conn_est_fail_info_available_r16_present) { - j.write_str("connEstFailInfoAvailable-r16", "true"); - } - if (rlf_info_available_r16_present) { - j.write_str("rlf-InfoAvailable-r16", "true"); - } - if (ext) { - if (success_ho_info_available_r17_present) { - j.write_str("successHO-InfoAvailable-r17", "true"); - } - if (sig_log_meas_cfg_available_r17_present) { - j.write_bool("sigLogMeasConfigAvailable-r17", sig_log_meas_cfg_available_r17); - } - } - j.end_obj(); -} - -// UL-GapFR2-Preference-r17 ::= SEQUENCE -SRSASN_CODE ul_gap_fr2_pref_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_gap_fr2_pattern_pref_r17_present, 1)); - - if (ul_gap_fr2_pattern_pref_r17_present) { - HANDLE_CODE(pack_integer(bref, ul_gap_fr2_pattern_pref_r17, (uint8_t)0u, (uint8_t)3u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_gap_fr2_pref_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ul_gap_fr2_pattern_pref_r17_present, 1)); - - if (ul_gap_fr2_pattern_pref_r17_present) { - HANDLE_CODE(unpack_integer(ul_gap_fr2_pattern_pref_r17, bref, (uint8_t)0u, (uint8_t)3u)); - } - - return SRSASN_SUCCESS; -} -void ul_gap_fr2_pref_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ul_gap_fr2_pattern_pref_r17_present) { - j.write_int("ul-GapFR2-PatternPreference-r17", ul_gap_fr2_pattern_pref_r17); - } - j.end_obj(); -} - -// UplinkTxDirectCurrentBWP ::= SEQUENCE -SRSASN_CODE ul_tx_direct_current_bwp_s::pack(bit_ref& bref) 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; -} -SRSASN_CODE ul_tx_direct_current_bwp_s::unpack(cbit_ref& bref) -{ - 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)); - - return SRSASN_SUCCESS; -} -void ul_tx_direct_current_bwp_s::to_json(json_writer& j) 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(); -} - -// ChoCandidateCell-r17 ::= CHOICE -void cho_candidate_cell_r17_c::destroy_() -{ - switch (type_) { - case types::cell_global_id_r17: - c.destroy(); - break; - case types::pci_arfcn_r17: - c.destroy(); - break; - default: - break; - } -} -void cho_candidate_cell_r17_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::cell_global_id_r17: - c.init(); - break; - case types::pci_arfcn_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cho_candidate_cell_r17_c"); - } -} -cho_candidate_cell_r17_c::cho_candidate_cell_r17_c(const cho_candidate_cell_r17_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::cell_global_id_r17: - c.init(other.c.get()); - break; - case types::pci_arfcn_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cho_candidate_cell_r17_c"); - } -} -cho_candidate_cell_r17_c& cho_candidate_cell_r17_c::operator=(const cho_candidate_cell_r17_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::cell_global_id_r17: - c.set(other.c.get()); - break; - case types::pci_arfcn_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "cho_candidate_cell_r17_c"); - } - - return *this; -} -cgi_info_logging_r16_s& cho_candidate_cell_r17_c::set_cell_global_id_r17() -{ - set(types::cell_global_id_r17); - return c.get(); -} -pci_arfcn_nr_r16_s& cho_candidate_cell_r17_c::set_pci_arfcn_r17() -{ - set(types::pci_arfcn_r17); - return c.get(); -} -void cho_candidate_cell_r17_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::cell_global_id_r17: - j.write_fieldname("cellGlobalId-r17"); - c.get().to_json(j); - break; - case types::pci_arfcn_r17: - j.write_fieldname("pci-arfcn-r17"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "cho_candidate_cell_r17_c"); - } - j.end_obj(); -} -SRSASN_CODE cho_candidate_cell_r17_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cell_global_id_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pci_arfcn_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "cho_candidate_cell_r17_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE cho_candidate_cell_r17_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cell_global_id_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pci_arfcn_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "cho_candidate_cell_r17_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// ConnEstFailReport-r16 ::= SEQUENCE -SRSASN_CODE conn_est_fail_report_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(location_info_r16_present, 1)); - - HANDLE_CODE(meas_result_failed_cell_r16.pack(bref)); - if (location_info_r16_present) { - HANDLE_CODE(location_info_r16.pack(bref)); - } - HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra.size() > 0, 1)); - if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr, 1, 8)); - } - if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra, 1, 8)); - } - HANDLE_CODE(pack_integer(bref, nof_conn_fail_r16, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(pack_dyn_seq_of(bref, per_ra_info_list_r16, 1, 200)); - HANDLE_CODE(pack_integer(bref, time_since_fail_r16, (uint32_t)0u, (uint32_t)172800u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE conn_est_fail_report_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(location_info_r16_present, 1)); - - HANDLE_CODE(meas_result_failed_cell_r16.unpack(bref)); - if (location_info_r16_present) { - HANDLE_CODE(location_info_r16.unpack(bref)); - } - bool meas_result_neigh_cell_list_nr_present; - HANDLE_CODE(bref.unpack(meas_result_neigh_cell_list_nr_present, 1)); - bool meas_result_neigh_cell_list_eutra_present; - HANDLE_CODE(bref.unpack(meas_result_neigh_cell_list_eutra_present, 1)); - if (meas_result_neigh_cell_list_nr_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr, bref, 1, 8)); - } - if (meas_result_neigh_cell_list_eutra_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra, bref, 1, 8)); - } - HANDLE_CODE(unpack_integer(nof_conn_fail_r16, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE(unpack_dyn_seq_of(per_ra_info_list_r16, bref, 1, 200)); - HANDLE_CODE(unpack_integer(time_since_fail_r16, bref, (uint32_t)0u, (uint32_t)172800u)); - - return SRSASN_SUCCESS; -} -void conn_est_fail_report_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("measResultFailedCell-r16"); - meas_result_failed_cell_r16.to_json(j); - if (location_info_r16_present) { - j.write_fieldname("locationInfo-r16"); - location_info_r16.to_json(j); - } - j.write_fieldname("measResultNeighCells-r16"); - j.start_obj(); - if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr.size() > 0) { - j.start_array("measResultNeighCellListNR"); - for (const auto& e1 : meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra.size() > 0) { - j.start_array("measResultNeighCellListEUTRA"); - for (const auto& e1 : meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); - j.write_int("numberOfConnFail-r16", nof_conn_fail_r16); - j.start_array("perRAInfoList-r16"); - for (const auto& e1 : per_ra_info_list_r16) { - e1.to_json(j); - } - j.end_array(); - j.write_int("timeSinceFailure-r16", time_since_fail_r16); - j.end_obj(); -} - -// DRX-Preference-r16 ::= SEQUENCE -SRSASN_CODE drx_pref_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(preferred_drx_inactivity_timer_r16_present, 1)); - HANDLE_CODE(bref.pack(preferred_drx_long_cycle_r16_present, 1)); - HANDLE_CODE(bref.pack(preferred_drx_short_cycle_r16_present, 1)); - HANDLE_CODE(bref.pack(preferred_drx_short_cycle_timer_r16_present, 1)); - - if (preferred_drx_inactivity_timer_r16_present) { - HANDLE_CODE(preferred_drx_inactivity_timer_r16.pack(bref)); - } - if (preferred_drx_long_cycle_r16_present) { - HANDLE_CODE(preferred_drx_long_cycle_r16.pack(bref)); - } - if (preferred_drx_short_cycle_r16_present) { - HANDLE_CODE(preferred_drx_short_cycle_r16.pack(bref)); - } - if (preferred_drx_short_cycle_timer_r16_present) { - HANDLE_CODE(pack_integer(bref, preferred_drx_short_cycle_timer_r16, (uint8_t)1u, (uint8_t)16u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE drx_pref_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(preferred_drx_inactivity_timer_r16_present, 1)); - HANDLE_CODE(bref.unpack(preferred_drx_long_cycle_r16_present, 1)); - HANDLE_CODE(bref.unpack(preferred_drx_short_cycle_r16_present, 1)); - HANDLE_CODE(bref.unpack(preferred_drx_short_cycle_timer_r16_present, 1)); - - if (preferred_drx_inactivity_timer_r16_present) { - HANDLE_CODE(preferred_drx_inactivity_timer_r16.unpack(bref)); - } - if (preferred_drx_long_cycle_r16_present) { - HANDLE_CODE(preferred_drx_long_cycle_r16.unpack(bref)); - } - if (preferred_drx_short_cycle_r16_present) { - HANDLE_CODE(preferred_drx_short_cycle_r16.unpack(bref)); - } - if (preferred_drx_short_cycle_timer_r16_present) { - HANDLE_CODE(unpack_integer(preferred_drx_short_cycle_timer_r16, bref, (uint8_t)1u, (uint8_t)16u)); - } - - return SRSASN_SUCCESS; -} -void drx_pref_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (preferred_drx_inactivity_timer_r16_present) { - j.write_str("preferredDRX-InactivityTimer-r16", preferred_drx_inactivity_timer_r16.to_string()); - } - if (preferred_drx_long_cycle_r16_present) { - j.write_str("preferredDRX-LongCycle-r16", preferred_drx_long_cycle_r16.to_string()); - } - if (preferred_drx_short_cycle_r16_present) { - j.write_str("preferredDRX-ShortCycle-r16", preferred_drx_short_cycle_r16.to_string()); - } - if (preferred_drx_short_cycle_timer_r16_present) { - j.write_int("preferredDRX-ShortCycleTimer-r16", preferred_drx_short_cycle_timer_r16); - } - j.end_obj(); -} - -const char* drx_pref_r16_s::preferred_drx_inactivity_timer_r16_opts::to_string() const -{ - static const char* names[] = {"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(names, 32, value, "drx_pref_r16_s::preferred_drx_inactivity_timer_r16_e_"); -} -uint16_t drx_pref_r16_s::preferred_drx_inactivity_timer_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {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(numbers, 23, value, "drx_pref_r16_s::preferred_drx_inactivity_timer_r16_e_"); -} - -const char* drx_pref_r16_s::preferred_drx_long_cycle_r16_opts::to_string() const -{ - static const char* names[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", "ms80", - "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", "ms1024", "ms1280", - "ms2048", "ms2560", "ms5120", "ms10240", "spare12", "spare11", "spare10", "spare9", - "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 32, value, "drx_pref_r16_s::preferred_drx_long_cycle_r16_e_"); -} -uint16_t drx_pref_r16_s::preferred_drx_long_cycle_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, - 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; - return map_enum_number(numbers, 20, value, "drx_pref_r16_s::preferred_drx_long_cycle_r16_e_"); -} - -const char* drx_pref_r16_s::preferred_drx_short_cycle_r16_opts::to_string() const -{ - static const char* names[] = {"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(names, 32, value, "drx_pref_r16_s::preferred_drx_short_cycle_r16_e_"); -} -uint16_t drx_pref_r16_s::preferred_drx_short_cycle_r16_opts::to_number() const -{ - static const uint16_t numbers[] = {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(numbers, 23, value, "drx_pref_r16_s::preferred_drx_short_cycle_r16_e_"); -} - -// EUTRA-RSTD-Info ::= SEQUENCE -SRSASN_CODE eutra_rstd_info_s::pack(bit_ref& bref) 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)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE eutra_rstd_info_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)); - - 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(); -} - -// IDC-Assistance-r16 ::= SEQUENCE -SRSASN_CODE idc_assist_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(affected_carrier_freq_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(affected_carrier_freq_comb_list_r16.size() > 0, 1)); - - if (affected_carrier_freq_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_list_r16, 1, 128)); - } - if (affected_carrier_freq_comb_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_comb_list_r16, 1, 128)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE idc_assist_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool affected_carrier_freq_list_r16_present; - HANDLE_CODE(bref.unpack(affected_carrier_freq_list_r16_present, 1)); - bool affected_carrier_freq_comb_list_r16_present; - HANDLE_CODE(bref.unpack(affected_carrier_freq_comb_list_r16_present, 1)); - - if (affected_carrier_freq_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_list_r16, bref, 1, 128)); - } - if (affected_carrier_freq_comb_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_list_r16, bref, 1, 128)); - } - - return SRSASN_SUCCESS; -} -void idc_assist_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (affected_carrier_freq_list_r16.size() > 0) { - j.start_array("affectedCarrierFreqList-r16"); - for (const auto& e1 : affected_carrier_freq_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (affected_carrier_freq_comb_list_r16.size() > 0) { - j.start_array("affectedCarrierFreqCombList-r16"); - for (const auto& e1 : affected_carrier_freq_comb_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// LogMeasInfo-r16 ::= SEQUENCE -SRSASN_CODE log_meas_info_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(location_info_r16_present, 1)); - HANDLE_CODE(bref.pack(serv_cell_id_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_result_serving_cell_r16_present, 1)); - HANDLE_CODE(bref.pack(any_cell_sel_detected_r16_present, 1)); - - if (location_info_r16_present) { - HANDLE_CODE(location_info_r16.pack(bref)); - } - HANDLE_CODE(pack_integer(bref, relative_time_stamp_r16, (uint16_t)0u, (uint16_t)7200u)); - if (serv_cell_id_r16_present) { - HANDLE_CODE(serv_cell_id_r16.pack(bref)); - } - if (meas_result_serving_cell_r16_present) { - HANDLE_CODE(meas_result_serving_cell_r16.pack(bref)); - } - HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra.size() > 0, 1)); - if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr, 1, 8)); - } - if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra, 1, 8)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= in_dev_coex_detected_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(in_dev_coex_detected_r17_present, 1)); - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE log_meas_info_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(location_info_r16_present, 1)); - HANDLE_CODE(bref.unpack(serv_cell_id_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_serving_cell_r16_present, 1)); - HANDLE_CODE(bref.unpack(any_cell_sel_detected_r16_present, 1)); - - if (location_info_r16_present) { - HANDLE_CODE(location_info_r16.unpack(bref)); - } - HANDLE_CODE(unpack_integer(relative_time_stamp_r16, bref, (uint16_t)0u, (uint16_t)7200u)); - if (serv_cell_id_r16_present) { - HANDLE_CODE(serv_cell_id_r16.unpack(bref)); - } - if (meas_result_serving_cell_r16_present) { - HANDLE_CODE(meas_result_serving_cell_r16.unpack(bref)); - } - bool meas_result_neigh_cell_list_nr_present; - HANDLE_CODE(bref.unpack(meas_result_neigh_cell_list_nr_present, 1)); - bool meas_result_neigh_cell_list_eutra_present; - HANDLE_CODE(bref.unpack(meas_result_neigh_cell_list_eutra_present, 1)); - if (meas_result_neigh_cell_list_nr_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr, bref, 1, 8)); - } - if (meas_result_neigh_cell_list_eutra_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra, 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(in_dev_coex_detected_r17_present, 1)); - } - } - return SRSASN_SUCCESS; -} -void log_meas_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (location_info_r16_present) { - j.write_fieldname("locationInfo-r16"); - location_info_r16.to_json(j); - } - j.write_int("relativeTimeStamp-r16", relative_time_stamp_r16); - if (serv_cell_id_r16_present) { - j.write_fieldname("servCellIdentity-r16"); - serv_cell_id_r16.to_json(j); - } - if (meas_result_serving_cell_r16_present) { - j.write_fieldname("measResultServingCell-r16"); - meas_result_serving_cell_r16.to_json(j); - } - j.write_fieldname("measResultNeighCells-r16"); - j.start_obj(); - if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr.size() > 0) { - j.start_array("measResultNeighCellListNR"); - for (const auto& e1 : meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra.size() > 0) { - j.start_array("measResultNeighCellListEUTRA"); - for (const auto& e1 : meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); - if (any_cell_sel_detected_r16_present) { - j.write_str("anyCellSelectionDetected-r16", "true"); - } - if (ext) { - if (in_dev_coex_detected_r17_present) { - j.write_str("inDeviceCoexDetected-r17", "true"); - } - } - j.end_obj(); -} - -// MaxBW-Preference-r16 ::= SEQUENCE -SRSASN_CODE max_bw_pref_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(reduced_max_bw_fr1_r16_present, 1)); - HANDLE_CODE(bref.pack(reduced_max_bw_fr2_r16_present, 1)); - - if (reduced_max_bw_fr1_r16_present) { - HANDLE_CODE(reduced_max_bw_fr1_r16.pack(bref)); - } - if (reduced_max_bw_fr2_r16_present) { - HANDLE_CODE(reduced_max_bw_fr2_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE max_bw_pref_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(reduced_max_bw_fr1_r16_present, 1)); - HANDLE_CODE(bref.unpack(reduced_max_bw_fr2_r16_present, 1)); - - if (reduced_max_bw_fr1_r16_present) { - HANDLE_CODE(reduced_max_bw_fr1_r16.unpack(bref)); - } - if (reduced_max_bw_fr2_r16_present) { - HANDLE_CODE(reduced_max_bw_fr2_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void max_bw_pref_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (reduced_max_bw_fr1_r16_present) { - j.write_fieldname("reducedMaxBW-FR1-r16"); - reduced_max_bw_fr1_r16.to_json(j); - } - if (reduced_max_bw_fr2_r16_present) { - j.write_fieldname("reducedMaxBW-FR2-r16"); - reduced_max_bw_fr2_r16.to_json(j); - } - j.end_obj(); -} - -// MaxCC-Preference-r16 ::= SEQUENCE -SRSASN_CODE max_cc_pref_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(reduced_max_ccs_r16_present, 1)); - - if (reduced_max_ccs_r16_present) { - HANDLE_CODE(reduced_max_ccs_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE max_cc_pref_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(reduced_max_ccs_r16_present, 1)); - - if (reduced_max_ccs_r16_present) { - HANDLE_CODE(reduced_max_ccs_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void max_cc_pref_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (reduced_max_ccs_r16_present) { - j.write_fieldname("reducedMaxCCs-r16"); - reduced_max_ccs_r16.to_json(j); - } - j.end_obj(); -} - -// MaxMIMO-LayerPreference-r16 ::= SEQUENCE -SRSASN_CODE max_mimo_layer_pref_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(reduced_max_mimo_layers_fr1_r16_present, 1)); - HANDLE_CODE(bref.pack(reduced_max_mimo_layers_fr2_r16_present, 1)); - - if (reduced_max_mimo_layers_fr1_r16_present) { - HANDLE_CODE( - pack_integer(bref, reduced_max_mimo_layers_fr1_r16.reduced_mimo_layers_fr1_dl_r16, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE( - pack_integer(bref, reduced_max_mimo_layers_fr1_r16.reduced_mimo_layers_fr1_ul_r16, (uint8_t)1u, (uint8_t)4u)); - } - if (reduced_max_mimo_layers_fr2_r16_present) { - HANDLE_CODE( - pack_integer(bref, reduced_max_mimo_layers_fr2_r16.reduced_mimo_layers_fr2_dl_r16, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE( - pack_integer(bref, reduced_max_mimo_layers_fr2_r16.reduced_mimo_layers_fr2_ul_r16, (uint8_t)1u, (uint8_t)4u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE max_mimo_layer_pref_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(reduced_max_mimo_layers_fr1_r16_present, 1)); - HANDLE_CODE(bref.unpack(reduced_max_mimo_layers_fr2_r16_present, 1)); - - if (reduced_max_mimo_layers_fr1_r16_present) { - HANDLE_CODE( - unpack_integer(reduced_max_mimo_layers_fr1_r16.reduced_mimo_layers_fr1_dl_r16, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE( - unpack_integer(reduced_max_mimo_layers_fr1_r16.reduced_mimo_layers_fr1_ul_r16, bref, (uint8_t)1u, (uint8_t)4u)); - } - if (reduced_max_mimo_layers_fr2_r16_present) { - HANDLE_CODE( - unpack_integer(reduced_max_mimo_layers_fr2_r16.reduced_mimo_layers_fr2_dl_r16, bref, (uint8_t)1u, (uint8_t)8u)); - HANDLE_CODE( - unpack_integer(reduced_max_mimo_layers_fr2_r16.reduced_mimo_layers_fr2_ul_r16, bref, (uint8_t)1u, (uint8_t)4u)); - } - - return SRSASN_SUCCESS; -} -void max_mimo_layer_pref_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (reduced_max_mimo_layers_fr1_r16_present) { - j.write_fieldname("reducedMaxMIMO-LayersFR1-r16"); - j.start_obj(); - j.write_int("reducedMIMO-LayersFR1-DL-r16", reduced_max_mimo_layers_fr1_r16.reduced_mimo_layers_fr1_dl_r16); - j.write_int("reducedMIMO-LayersFR1-UL-r16", reduced_max_mimo_layers_fr1_r16.reduced_mimo_layers_fr1_ul_r16); - j.end_obj(); - } - if (reduced_max_mimo_layers_fr2_r16_present) { - j.write_fieldname("reducedMaxMIMO-LayersFR2-r16"); - j.start_obj(); - j.write_int("reducedMIMO-LayersFR2-DL-r16", reduced_max_mimo_layers_fr2_r16.reduced_mimo_layers_fr2_dl_r16); - j.write_int("reducedMIMO-LayersFR2-UL-r16", reduced_max_mimo_layers_fr2_r16.reduced_mimo_layers_fr2_ul_r16); - j.end_obj(); - } - j.end_obj(); -} - -// MeasResult2EUTRA ::= SEQUENCE -SRSASN_CODE meas_result2_eutra_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_result_serving_cell_present, 1)); - HANDLE_CODE(bref.pack(meas_result_best_neigh_cell_present, 1)); - - 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 (meas_result_best_neigh_cell_present) { - HANDLE_CODE(meas_result_best_neigh_cell.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result2_eutra_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(meas_result_serving_cell_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_best_neigh_cell_present, 1)); - - 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 (meas_result_best_neigh_cell_present) { - HANDLE_CODE(meas_result_best_neigh_cell.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void meas_result2_eutra_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("carrierFreq", carrier_freq); - if (meas_result_serving_cell_present) { - 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(); -} - -// MeasResult2NR ::= SEQUENCE -SRSASN_CODE meas_result2_nr_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.size() > 0, 1)); - - if (ssb_freq_present) { - HANDLE_CODE(pack_integer(bref, ssb_freq, (uint32_t)0u, (uint32_t)3279165u)); - } - if (ref_freq_csi_rs_present) { - HANDLE_CODE(pack_integer(bref, ref_freq_csi_rs, (uint32_t)0u, (uint32_t)3279165u)); - } - if (meas_result_serving_cell_present) { - HANDLE_CODE(meas_result_serving_cell.pack(bref)); - } - if (meas_result_neigh_cell_list_nr.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cell_list_nr, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result2_nr_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)); - bool meas_result_neigh_cell_list_nr_present; - 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)); - } - 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 SRSASN_SUCCESS; -} -void meas_result2_nr_s::to_json(json_writer& j) const -{ - j.start_obj(); - 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.size() > 0) { - j.start_array("measResultNeighCellListNR"); - for (const auto& e1 : meas_result_neigh_cell_list_nr) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// MeasResult2UTRA-FDD-r16 ::= SEQUENCE -SRSASN_CODE meas_result2_utra_fdd_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint16_t)0u, (uint16_t)16383u)); - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cell_list_r16, 1, 8)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result2_utra_fdd_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint16_t)0u, (uint16_t)16383u)); - HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cell_list_r16, bref, 1, 8)); - - return SRSASN_SUCCESS; -} -void meas_result2_utra_fdd_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("carrierFreq-r16", carrier_freq_r16); - j.start_array("measResultNeighCellList-r16"); - for (const auto& e1 : meas_result_neigh_cell_list_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// MeasResultCellSFTD-NR ::= SEQUENCE -SRSASN_CODE meas_result_cell_sftd_nr_s::pack(bit_ref& bref) const -{ - 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 meas_result_cell_sftd_nr_s::unpack(cbit_ref& bref) -{ - 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; -} -void meas_result_cell_sftd_nr_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); - } - j.end_obj(); -} - -// MeasResultNR-SL-r16 ::= SEQUENCE -SRSASN_CODE meas_result_nr_sl_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_cbr_nr_r16, 1, 8)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_nr_sl_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_cbr_nr_r16, bref, 1, 8)); - - return SRSASN_SUCCESS; -} -void meas_result_nr_sl_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("measResultListCBR-NR-r16"); - for (const auto& e1 : meas_result_list_cbr_nr_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// MeasResultServMO ::= SEQUENCE -SRSASN_CODE meas_result_serv_mo_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)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_serv_mo_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)); - } - - return SRSASN_SUCCESS; -} -void meas_result_serv_mo_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.end_obj(); -} - -// MeasResultSuccessHONR-r17 ::= SEQUENCE -SRSASN_CODE meas_result_success_ho_nr_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(meas_result_r17.cell_results_r17.results_ssb_cell_r17_present, 1)); - HANDLE_CODE(bref.pack(meas_result_r17.cell_results_r17.results_csi_rs_cell_r17_present, 1)); - if (meas_result_r17.cell_results_r17.results_ssb_cell_r17_present) { - HANDLE_CODE(meas_result_r17.cell_results_r17.results_ssb_cell_r17.pack(bref)); - } - if (meas_result_r17.cell_results_r17.results_csi_rs_cell_r17_present) { - HANDLE_CODE(meas_result_r17.cell_results_r17.results_csi_rs_cell_r17.pack(bref)); - } - HANDLE_CODE(bref.pack(meas_result_r17.rs_idx_results_r17.results_ssb_idxes_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_r17.rs_idx_results_r17.results_csi_rs_idxes_r17.size() > 0, 1)); - if (meas_result_r17.rs_idx_results_r17.results_ssb_idxes_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_r17.rs_idx_results_r17.results_ssb_idxes_r17, 1, 64)); - } - if (meas_result_r17.rs_idx_results_r17.results_csi_rs_idxes_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_r17.rs_idx_results_r17.results_csi_rs_idxes_r17, 1, 64)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_success_ho_nr_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(meas_result_r17.cell_results_r17.results_ssb_cell_r17_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_r17.cell_results_r17.results_csi_rs_cell_r17_present, 1)); - if (meas_result_r17.cell_results_r17.results_ssb_cell_r17_present) { - HANDLE_CODE(meas_result_r17.cell_results_r17.results_ssb_cell_r17.unpack(bref)); - } - if (meas_result_r17.cell_results_r17.results_csi_rs_cell_r17_present) { - HANDLE_CODE(meas_result_r17.cell_results_r17.results_csi_rs_cell_r17.unpack(bref)); - } - bool results_ssb_idxes_r17_present; - HANDLE_CODE(bref.unpack(results_ssb_idxes_r17_present, 1)); - bool results_csi_rs_idxes_r17_present; - HANDLE_CODE(bref.unpack(results_csi_rs_idxes_r17_present, 1)); - if (results_ssb_idxes_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_r17.rs_idx_results_r17.results_ssb_idxes_r17, bref, 1, 64)); - } - if (results_csi_rs_idxes_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_r17.rs_idx_results_r17.results_csi_rs_idxes_r17, bref, 1, 64)); - } - - return SRSASN_SUCCESS; -} -void meas_result_success_ho_nr_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("measResult-r17"); - j.start_obj(); - j.write_fieldname("cellResults-r17"); - j.start_obj(); - if (meas_result_r17.cell_results_r17.results_ssb_cell_r17_present) { - j.write_fieldname("resultsSSB-Cell-r17"); - meas_result_r17.cell_results_r17.results_ssb_cell_r17.to_json(j); - } - if (meas_result_r17.cell_results_r17.results_csi_rs_cell_r17_present) { - j.write_fieldname("resultsCSI-RS-Cell-r17"); - meas_result_r17.cell_results_r17.results_csi_rs_cell_r17.to_json(j); - } - j.end_obj(); - j.write_fieldname("rsIndexResults-r17"); - j.start_obj(); - if (meas_result_r17.rs_idx_results_r17.results_ssb_idxes_r17.size() > 0) { - j.start_array("resultsSSB-Indexes-r17"); - for (const auto& e1 : meas_result_r17.rs_idx_results_r17.results_ssb_idxes_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_result_r17.rs_idx_results_r17.results_csi_rs_idxes_r17.size() > 0) { - j.start_array("resultsCSI-RS-Indexes-r17"); - for (const auto& e1 : meas_result_r17.rs_idx_results_r17.results_csi_rs_idxes_r17) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); - j.end_obj(); - j.end_obj(); -} - -// MeasResultsPerCarrierIdleEUTRA-r16 ::= SEQUENCE -SRSASN_CODE meas_results_per_carrier_idle_eutra_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, carrier_freq_eutra_r16, (uint32_t)0u, (uint32_t)262143u)); - HANDLE_CODE(pack_dyn_seq_of(bref, meas_results_per_cell_list_idle_eutra_r16, 1, 8)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_results_per_carrier_idle_eutra_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(carrier_freq_eutra_r16, bref, (uint32_t)0u, (uint32_t)262143u)); - HANDLE_CODE(unpack_dyn_seq_of(meas_results_per_cell_list_idle_eutra_r16, bref, 1, 8)); - - return SRSASN_SUCCESS; -} -void meas_results_per_carrier_idle_eutra_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("carrierFreqEUTRA-r16", carrier_freq_eutra_r16); - j.start_array("measResultsPerCellListIdleEUTRA-r16"); - for (const auto& e1 : meas_results_per_cell_list_idle_eutra_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// MeasResultsPerCarrierIdleNR-r16 ::= SEQUENCE -SRSASN_CODE meas_results_per_carrier_idle_nr_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(pack_dyn_seq_of(bref, meas_results_per_cell_list_idle_nr_r16, 1, 8)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_results_per_carrier_idle_nr_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(unpack_dyn_seq_of(meas_results_per_cell_list_idle_nr_r16, bref, 1, 8)); - - return SRSASN_SUCCESS; -} -void meas_results_per_carrier_idle_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("carrierFreq-r16", carrier_freq_r16); - j.start_array("measResultsPerCellListIdleNR-r16"); - for (const auto& e1 : meas_results_per_cell_list_idle_nr_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// MinSchedulingOffsetPreference-r16 ::= SEQUENCE -SRSASN_CODE min_sched_offset_pref_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(preferred_k0_r16_present, 1)); - HANDLE_CODE(bref.pack(preferred_k2_r16_present, 1)); - - if (preferred_k0_r16_present) { - HANDLE_CODE(bref.pack(preferred_k0_r16.preferred_k0_scs_15k_hz_r16_present, 1)); - HANDLE_CODE(bref.pack(preferred_k0_r16.preferred_k0_scs_30k_hz_r16_present, 1)); - HANDLE_CODE(bref.pack(preferred_k0_r16.preferred_k0_scs_60k_hz_r16_present, 1)); - HANDLE_CODE(bref.pack(preferred_k0_r16.preferred_k0_scs_120k_hz_r16_present, 1)); - if (preferred_k0_r16.preferred_k0_scs_15k_hz_r16_present) { - HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_15k_hz_r16.pack(bref)); - } - if (preferred_k0_r16.preferred_k0_scs_30k_hz_r16_present) { - HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_30k_hz_r16.pack(bref)); - } - if (preferred_k0_r16.preferred_k0_scs_60k_hz_r16_present) { - HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_60k_hz_r16.pack(bref)); - } - if (preferred_k0_r16.preferred_k0_scs_120k_hz_r16_present) { - HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_120k_hz_r16.pack(bref)); - } - } - if (preferred_k2_r16_present) { - HANDLE_CODE(bref.pack(preferred_k2_r16.preferred_k2_scs_15k_hz_r16_present, 1)); - HANDLE_CODE(bref.pack(preferred_k2_r16.preferred_k2_scs_30k_hz_r16_present, 1)); - HANDLE_CODE(bref.pack(preferred_k2_r16.preferred_k2_scs_60k_hz_r16_present, 1)); - HANDLE_CODE(bref.pack(preferred_k2_r16.preferred_k2_scs_120k_hz_r16_present, 1)); - if (preferred_k2_r16.preferred_k2_scs_15k_hz_r16_present) { - HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_15k_hz_r16.pack(bref)); - } - if (preferred_k2_r16.preferred_k2_scs_30k_hz_r16_present) { - HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_30k_hz_r16.pack(bref)); - } - if (preferred_k2_r16.preferred_k2_scs_60k_hz_r16_present) { - HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_60k_hz_r16.pack(bref)); - } - if (preferred_k2_r16.preferred_k2_scs_120k_hz_r16_present) { - HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_120k_hz_r16.pack(bref)); - } - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE min_sched_offset_pref_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(preferred_k0_r16_present, 1)); - HANDLE_CODE(bref.unpack(preferred_k2_r16_present, 1)); - - if (preferred_k0_r16_present) { - HANDLE_CODE(bref.unpack(preferred_k0_r16.preferred_k0_scs_15k_hz_r16_present, 1)); - HANDLE_CODE(bref.unpack(preferred_k0_r16.preferred_k0_scs_30k_hz_r16_present, 1)); - HANDLE_CODE(bref.unpack(preferred_k0_r16.preferred_k0_scs_60k_hz_r16_present, 1)); - HANDLE_CODE(bref.unpack(preferred_k0_r16.preferred_k0_scs_120k_hz_r16_present, 1)); - if (preferred_k0_r16.preferred_k0_scs_15k_hz_r16_present) { - HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_15k_hz_r16.unpack(bref)); - } - if (preferred_k0_r16.preferred_k0_scs_30k_hz_r16_present) { - HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_30k_hz_r16.unpack(bref)); - } - if (preferred_k0_r16.preferred_k0_scs_60k_hz_r16_present) { - HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_60k_hz_r16.unpack(bref)); - } - if (preferred_k0_r16.preferred_k0_scs_120k_hz_r16_present) { - HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_120k_hz_r16.unpack(bref)); - } - } - if (preferred_k2_r16_present) { - HANDLE_CODE(bref.unpack(preferred_k2_r16.preferred_k2_scs_15k_hz_r16_present, 1)); - HANDLE_CODE(bref.unpack(preferred_k2_r16.preferred_k2_scs_30k_hz_r16_present, 1)); - HANDLE_CODE(bref.unpack(preferred_k2_r16.preferred_k2_scs_60k_hz_r16_present, 1)); - HANDLE_CODE(bref.unpack(preferred_k2_r16.preferred_k2_scs_120k_hz_r16_present, 1)); - if (preferred_k2_r16.preferred_k2_scs_15k_hz_r16_present) { - HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_15k_hz_r16.unpack(bref)); - } - if (preferred_k2_r16.preferred_k2_scs_30k_hz_r16_present) { - HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_30k_hz_r16.unpack(bref)); - } - if (preferred_k2_r16.preferred_k2_scs_60k_hz_r16_present) { - HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_60k_hz_r16.unpack(bref)); - } - if (preferred_k2_r16.preferred_k2_scs_120k_hz_r16_present) { - HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_120k_hz_r16.unpack(bref)); - } - } - - return SRSASN_SUCCESS; -} -void min_sched_offset_pref_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (preferred_k0_r16_present) { - j.write_fieldname("preferredK0-r16"); - j.start_obj(); - if (preferred_k0_r16.preferred_k0_scs_15k_hz_r16_present) { - j.write_str("preferredK0-SCS-15kHz-r16", preferred_k0_r16.preferred_k0_scs_15k_hz_r16.to_string()); - } - if (preferred_k0_r16.preferred_k0_scs_30k_hz_r16_present) { - j.write_str("preferredK0-SCS-30kHz-r16", preferred_k0_r16.preferred_k0_scs_30k_hz_r16.to_string()); - } - if (preferred_k0_r16.preferred_k0_scs_60k_hz_r16_present) { - j.write_str("preferredK0-SCS-60kHz-r16", preferred_k0_r16.preferred_k0_scs_60k_hz_r16.to_string()); - } - if (preferred_k0_r16.preferred_k0_scs_120k_hz_r16_present) { - j.write_str("preferredK0-SCS-120kHz-r16", preferred_k0_r16.preferred_k0_scs_120k_hz_r16.to_string()); - } - j.end_obj(); - } - if (preferred_k2_r16_present) { - j.write_fieldname("preferredK2-r16"); - j.start_obj(); - if (preferred_k2_r16.preferred_k2_scs_15k_hz_r16_present) { - j.write_str("preferredK2-SCS-15kHz-r16", preferred_k2_r16.preferred_k2_scs_15k_hz_r16.to_string()); - } - if (preferred_k2_r16.preferred_k2_scs_30k_hz_r16_present) { - j.write_str("preferredK2-SCS-30kHz-r16", preferred_k2_r16.preferred_k2_scs_30k_hz_r16.to_string()); - } - if (preferred_k2_r16.preferred_k2_scs_60k_hz_r16_present) { - j.write_str("preferredK2-SCS-60kHz-r16", preferred_k2_r16.preferred_k2_scs_60k_hz_r16.to_string()); - } - if (preferred_k2_r16.preferred_k2_scs_120k_hz_r16_present) { - j.write_str("preferredK2-SCS-120kHz-r16", preferred_k2_r16.preferred_k2_scs_120k_hz_r16.to_string()); - } - j.end_obj(); - } - j.end_obj(); -} - -const char* min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_15k_hz_r16_opts::to_string() const -{ - static const char* names[] = {"sl1", "sl2", "sl4", "sl6"}; - return convert_enum_idx( - names, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_15k_hz_r16_e_"); -} -uint8_t min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_15k_hz_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 6}; - return map_enum_number( - numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_15k_hz_r16_e_"); -} - -const char* min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_30k_hz_r16_opts::to_string() const -{ - static const char* names[] = {"sl1", "sl2", "sl4", "sl6"}; - return convert_enum_idx( - names, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_30k_hz_r16_e_"); -} -uint8_t min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_30k_hz_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 6}; - return map_enum_number( - numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_30k_hz_r16_e_"); -} - -const char* min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_60k_hz_r16_opts::to_string() const -{ - static const char* names[] = {"sl2", "sl4", "sl8", "sl12"}; - return convert_enum_idx( - names, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_60k_hz_r16_e_"); -} -uint8_t min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_60k_hz_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 8, 12}; - return map_enum_number( - numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_60k_hz_r16_e_"); -} - -const char* min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_120k_hz_r16_opts::to_string() const -{ - static const char* names[] = {"sl2", "sl4", "sl8", "sl12"}; - return convert_enum_idx( - names, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_120k_hz_r16_e_"); -} -uint8_t min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_120k_hz_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 8, 12}; - return map_enum_number( - numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_120k_hz_r16_e_"); -} - -const char* min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_15k_hz_r16_opts::to_string() const -{ - static const char* names[] = {"sl1", "sl2", "sl4", "sl6"}; - return convert_enum_idx( - names, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_15k_hz_r16_e_"); -} -uint8_t min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_15k_hz_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 6}; - return map_enum_number( - numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_15k_hz_r16_e_"); -} - -const char* min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_30k_hz_r16_opts::to_string() const -{ - static const char* names[] = {"sl1", "sl2", "sl4", "sl6"}; - return convert_enum_idx( - names, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_30k_hz_r16_e_"); -} -uint8_t min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_30k_hz_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 6}; - return map_enum_number( - numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_30k_hz_r16_e_"); -} - -const char* min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_60k_hz_r16_opts::to_string() const -{ - static const char* names[] = {"sl2", "sl4", "sl8", "sl12"}; - return convert_enum_idx( - names, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_60k_hz_r16_e_"); -} -uint8_t min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_60k_hz_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 8, 12}; - return map_enum_number( - numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_60k_hz_r16_e_"); -} - -const char* min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_120k_hz_r16_opts::to_string() const -{ - static const char* names[] = {"sl2", "sl4", "sl8", "sl12"}; - return convert_enum_idx( - names, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_120k_hz_r16_e_"); -} -uint8_t min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_120k_hz_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {2, 4, 8, 12}; - return map_enum_number( - numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_120k_hz_r16_e_"); -} - -// NR-PRS-MeasurementInfo-r16 ::= SEQUENCE -SRSASN_CODE nr_prs_meas_info_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, dl_prs_point_a_r16, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(nr_meas_prs_repeat_and_offset_r16.pack(bref)); - HANDLE_CODE(nr_meas_prs_len_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE nr_prs_meas_info_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(dl_prs_point_a_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(nr_meas_prs_repeat_and_offset_r16.unpack(bref)); - HANDLE_CODE(nr_meas_prs_len_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void nr_prs_meas_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("dl-PRS-PointA-r16", dl_prs_point_a_r16); - j.write_fieldname("nr-MeasPRS-RepetitionAndOffset-r16"); - nr_meas_prs_repeat_and_offset_r16.to_json(j); - j.write_str("nr-MeasPRS-length-r16", nr_meas_prs_len_r16.to_string()); - j.end_obj(); -} - -void nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::destroy_() {} -void nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::nr_meas_prs_repeat_and_offset_r16_c_( - const nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::ms20_r16: - c.init(other.c.get()); - break; - case types::ms40_r16: - c.init(other.c.get()); - break; - case types::ms80_r16: - c.init(other.c.get()); - break; - case types::ms160_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_"); - } -} -nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_& -nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::operator=( - const nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ms20_r16: - c.set(other.c.get()); - break; - case types::ms40_r16: - c.set(other.c.get()); - break; - case types::ms80_r16: - c.set(other.c.get()); - break; - case types::ms160_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_"); - } - - return *this; -} -uint8_t& nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::set_ms20_r16() -{ - set(types::ms20_r16); - return c.get(); -} -uint8_t& nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::set_ms40_r16() -{ - set(types::ms40_r16); - return c.get(); -} -uint8_t& nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::set_ms80_r16() -{ - set(types::ms80_r16); - return c.get(); -} -uint8_t& nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::set_ms160_r16() -{ - set(types::ms160_r16); - return c.get(); -} -void nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ms20_r16: - j.write_int("ms20-r16", c.get()); - break; - case types::ms40_r16: - j.write_int("ms40-r16", c.get()); - break; - case types::ms80_r16: - j.write_int("ms80-r16", c.get()); - break; - case types::ms160_r16: - j.write_int("ms160-r16", c.get()); - break; - default: - log_invalid_choice_id(type_, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ms20_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); - break; - case types::ms40_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::ms80_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - case types::ms160_r16: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); - break; - default: - log_invalid_choice_id(type_, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ms20_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::ms40_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::ms80_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - case types::ms160_r16: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); - break; - default: - log_invalid_choice_id(type_, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* nr_prs_meas_info_r16_s::nr_meas_prs_len_r16_opts::to_string() const -{ - static const char* names[] = {"ms1dot5", "ms3", "ms3dot5", "ms4", "ms5dot5", "ms6", "ms10", "ms20"}; - return convert_enum_idx(names, 8, value, "nr_prs_meas_info_r16_s::nr_meas_prs_len_r16_e_"); -} -float nr_prs_meas_info_r16_s::nr_meas_prs_len_r16_opts::to_number() const -{ - static const float numbers[] = {1.5, 3.0, 3.5, 4.0, 5.5, 6.0, 10.0, 20.0}; - return map_enum_number(numbers, 8, value, "nr_prs_meas_info_r16_s::nr_meas_prs_len_r16_e_"); -} -const char* nr_prs_meas_info_r16_s::nr_meas_prs_len_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"1.5", "3", "3.5", "4", "5.5", "6", "10", "20"}; - return convert_enum_idx(number_strs, 8, value, "nr_prs_meas_info_r16_s::nr_meas_prs_len_r16_e_"); -} - -// NR-TimeStamp-r17 ::= SEQUENCE -SRSASN_CODE nr_time_stamp_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, nr_sfn_r17, (uint16_t)0u, (uint16_t)1023u)); - HANDLE_CODE(nr_slot_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE nr_time_stamp_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(nr_sfn_r17, bref, (uint16_t)0u, (uint16_t)1023u)); - HANDLE_CODE(nr_slot_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void nr_time_stamp_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("nr-SFN-r17", nr_sfn_r17); - j.write_fieldname("nr-Slot-r17"); - nr_slot_r17.to_json(j); - j.end_obj(); -} - -void nr_time_stamp_r17_s::nr_slot_r17_c_::destroy_() {} -void nr_time_stamp_r17_s::nr_slot_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; -} -nr_time_stamp_r17_s::nr_slot_r17_c_::nr_slot_r17_c_(const nr_time_stamp_r17_s::nr_slot_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::scs15_r17: - c.init(other.c.get()); - break; - case types::scs30_r17: - c.init(other.c.get()); - break; - case types::scs60_r17: - c.init(other.c.get()); - break; - case types::scs120_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "nr_time_stamp_r17_s::nr_slot_r17_c_"); - } -} -nr_time_stamp_r17_s::nr_slot_r17_c_& -nr_time_stamp_r17_s::nr_slot_r17_c_::operator=(const nr_time_stamp_r17_s::nr_slot_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::scs15_r17: - c.set(other.c.get()); - break; - case types::scs30_r17: - c.set(other.c.get()); - break; - case types::scs60_r17: - c.set(other.c.get()); - break; - case types::scs120_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "nr_time_stamp_r17_s::nr_slot_r17_c_"); - } - - return *this; -} -uint8_t& nr_time_stamp_r17_s::nr_slot_r17_c_::set_scs15_r17() -{ - set(types::scs15_r17); - return c.get(); -} -uint8_t& nr_time_stamp_r17_s::nr_slot_r17_c_::set_scs30_r17() -{ - set(types::scs30_r17); - return c.get(); -} -uint8_t& nr_time_stamp_r17_s::nr_slot_r17_c_::set_scs60_r17() -{ - set(types::scs60_r17); - return c.get(); -} -uint8_t& nr_time_stamp_r17_s::nr_slot_r17_c_::set_scs120_r17() -{ - set(types::scs120_r17); - return c.get(); -} -void nr_time_stamp_r17_s::nr_slot_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::scs15_r17: - j.write_int("scs15-r17", c.get()); - break; - case types::scs30_r17: - j.write_int("scs30-r17", c.get()); - break; - case types::scs60_r17: - j.write_int("scs60-r17", c.get()); - break; - case types::scs120_r17: - j.write_int("scs120-r17", c.get()); - break; - default: - log_invalid_choice_id(type_, "nr_time_stamp_r17_s::nr_slot_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE nr_time_stamp_r17_s::nr_slot_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::scs15_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); - break; - case types::scs30_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); - break; - case types::scs60_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); - break; - case types::scs120_r17: - HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); - break; - default: - log_invalid_choice_id(type_, "nr_time_stamp_r17_s::nr_slot_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE nr_time_stamp_r17_s::nr_slot_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::scs15_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); - break; - case types::scs30_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); - break; - case types::scs60_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); - break; - case types::scs120_r17: - HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); - break; - default: - log_invalid_choice_id(type_, "nr_time_stamp_r17_s::nr_slot_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// RA-InformationCommon-r16 ::= SEQUENCE -SRSASN_CODE ra_info_common_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(msg1_freq_start_r16_present, 1)); - HANDLE_CODE(bref.pack(msg1_freq_start_cfra_r16_present, 1)); - HANDLE_CODE(bref.pack(msg1_subcarrier_spacing_r16_present, 1)); - HANDLE_CODE(bref.pack(msg1_subcarrier_spacing_cfra_r16_present, 1)); - HANDLE_CODE(bref.pack(msg1_fdm_r16_present, 1)); - HANDLE_CODE(bref.pack(msg1_fdmcfra_r16_present, 1)); - - HANDLE_CODE(pack_integer(bref, absolute_freq_point_a_r16, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(pack_integer(bref, location_and_bw_r16, (uint16_t)0u, (uint16_t)37949u)); - HANDLE_CODE(subcarrier_spacing_r16.pack(bref)); - if (msg1_freq_start_r16_present) { - HANDLE_CODE(pack_integer(bref, msg1_freq_start_r16, (uint16_t)0u, (uint16_t)274u)); - } - if (msg1_freq_start_cfra_r16_present) { - HANDLE_CODE(pack_integer(bref, msg1_freq_start_cfra_r16, (uint16_t)0u, (uint16_t)274u)); - } - if (msg1_subcarrier_spacing_r16_present) { - HANDLE_CODE(msg1_subcarrier_spacing_r16.pack(bref)); - } - if (msg1_subcarrier_spacing_cfra_r16_present) { - HANDLE_CODE(msg1_subcarrier_spacing_cfra_r16.pack(bref)); - } - if (msg1_fdm_r16_present) { - HANDLE_CODE(msg1_fdm_r16.pack(bref)); - } - if (msg1_fdmcfra_r16_present) { - HANDLE_CODE(msg1_fdmcfra_r16.pack(bref)); - } - HANDLE_CODE(pack_dyn_seq_of(bref, per_ra_info_list_r16, 1, 200)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= per_ra_info_list_v1660.is_present(); - group_flags[1] |= msg1_scs_from_prach_cfg_idx_r16_present; - group_flags[2] |= msg1_scs_from_prach_cfg_idx_cfra_r16_present; - group_flags[3] |= msg_a_ro_freq_start_r17_present; - group_flags[3] |= msg_a_ro_freq_start_cfra_r17_present; - group_flags[3] |= msg_a_subcarrier_spacing_r17_present; - group_flags[3] |= msg_a_ro_fdm_r17_present; - group_flags[3] |= msg_a_ro_fdmcfra_r17_present; - group_flags[3] |= msg_a_scs_from_prach_cfg_idx_r17_present; - group_flags[3] |= msg_a_trans_max_r17_present; - group_flags[3] |= msg_a_mcs_r17_present; - group_flags[3] |= nrof_prbs_per_msg_a_po_r17_present; - group_flags[3] |= msg_a_pusch_time_domain_alloc_r17_present; - group_flags[3] |= freq_start_msg_a_pusch_r17_present; - group_flags[3] |= nrof_msg_a_po_fdm_r17_present; - group_flags[3] |= dl_pathloss_rsrp_r17_present; - group_flags[3] |= intended_sibs_r17.is_present(); - group_flags[3] |= ssbs_for_si_acquisition_r17.is_present(); - group_flags[3] |= msg_a_pusch_payload_size_r17_present; - group_flags[3] |= on_demand_si_success_r17_present; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(per_ra_info_list_v1660.is_present(), 1)); - if (per_ra_info_list_v1660.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *per_ra_info_list_v1660, 1, 200)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(msg1_scs_from_prach_cfg_idx_r16_present, 1)); - if (msg1_scs_from_prach_cfg_idx_r16_present) { - HANDLE_CODE(msg1_scs_from_prach_cfg_idx_r16.pack(bref)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(msg1_scs_from_prach_cfg_idx_cfra_r16_present, 1)); - if (msg1_scs_from_prach_cfg_idx_cfra_r16_present) { - HANDLE_CODE(msg1_scs_from_prach_cfg_idx_cfra_r16.pack(bref)); - } - } - if (group_flags[3]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(msg_a_ro_freq_start_r17_present, 1)); - HANDLE_CODE(bref.pack(msg_a_ro_freq_start_cfra_r17_present, 1)); - HANDLE_CODE(bref.pack(msg_a_subcarrier_spacing_r17_present, 1)); - HANDLE_CODE(bref.pack(msg_a_ro_fdm_r17_present, 1)); - HANDLE_CODE(bref.pack(msg_a_ro_fdmcfra_r17_present, 1)); - HANDLE_CODE(bref.pack(msg_a_scs_from_prach_cfg_idx_r17_present, 1)); - HANDLE_CODE(bref.pack(msg_a_trans_max_r17_present, 1)); - HANDLE_CODE(bref.pack(msg_a_mcs_r17_present, 1)); - HANDLE_CODE(bref.pack(nrof_prbs_per_msg_a_po_r17_present, 1)); - HANDLE_CODE(bref.pack(msg_a_pusch_time_domain_alloc_r17_present, 1)); - HANDLE_CODE(bref.pack(freq_start_msg_a_pusch_r17_present, 1)); - HANDLE_CODE(bref.pack(nrof_msg_a_po_fdm_r17_present, 1)); - HANDLE_CODE(bref.pack(dl_pathloss_rsrp_r17_present, 1)); - HANDLE_CODE(bref.pack(intended_sibs_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(ssbs_for_si_acquisition_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(msg_a_pusch_payload_size_r17_present, 1)); - HANDLE_CODE(bref.pack(on_demand_si_success_r17_present, 1)); - if (msg_a_ro_freq_start_r17_present) { - HANDLE_CODE(pack_integer(bref, msg_a_ro_freq_start_r17, (uint16_t)0u, (uint16_t)274u)); - } - if (msg_a_ro_freq_start_cfra_r17_present) { - HANDLE_CODE(pack_integer(bref, msg_a_ro_freq_start_cfra_r17, (uint16_t)0u, (uint16_t)274u)); - } - if (msg_a_subcarrier_spacing_r17_present) { - HANDLE_CODE(msg_a_subcarrier_spacing_r17.pack(bref)); - } - if (msg_a_ro_fdm_r17_present) { - HANDLE_CODE(msg_a_ro_fdm_r17.pack(bref)); - } - if (msg_a_ro_fdmcfra_r17_present) { - HANDLE_CODE(msg_a_ro_fdmcfra_r17.pack(bref)); - } - if (msg_a_scs_from_prach_cfg_idx_r17_present) { - HANDLE_CODE(msg_a_scs_from_prach_cfg_idx_r17.pack(bref)); - } - if (msg_a_trans_max_r17_present) { - HANDLE_CODE(msg_a_trans_max_r17.pack(bref)); - } - if (msg_a_mcs_r17_present) { - HANDLE_CODE(pack_integer(bref, msg_a_mcs_r17, (uint8_t)0u, (uint8_t)15u)); - } - if (nrof_prbs_per_msg_a_po_r17_present) { - HANDLE_CODE(pack_integer(bref, nrof_prbs_per_msg_a_po_r17, (uint8_t)1u, (uint8_t)32u)); - } - if (msg_a_pusch_time_domain_alloc_r17_present) { - HANDLE_CODE(pack_integer(bref, msg_a_pusch_time_domain_alloc_r17, (uint8_t)1u, (uint8_t)16u)); - } - if (freq_start_msg_a_pusch_r17_present) { - HANDLE_CODE(pack_integer(bref, freq_start_msg_a_pusch_r17, (uint16_t)0u, (uint16_t)274u)); - } - if (nrof_msg_a_po_fdm_r17_present) { - HANDLE_CODE(nrof_msg_a_po_fdm_r17.pack(bref)); - } - if (dl_pathloss_rsrp_r17_present) { - HANDLE_CODE(pack_integer(bref, dl_pathloss_rsrp_r17, (uint8_t)0u, (uint8_t)127u)); - } - if (intended_sibs_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *intended_sibs_r17, 1, 32)); - } - if (ssbs_for_si_acquisition_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *ssbs_for_si_acquisition_r17, 1, 64, integer_packer(0, 63))); - } - if (msg_a_pusch_payload_size_r17_present) { - HANDLE_CODE(msg_a_pusch_payload_size_r17.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ra_info_common_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(msg1_freq_start_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg1_freq_start_cfra_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg1_subcarrier_spacing_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg1_subcarrier_spacing_cfra_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg1_fdm_r16_present, 1)); - HANDLE_CODE(bref.unpack(msg1_fdmcfra_r16_present, 1)); - - HANDLE_CODE(unpack_integer(absolute_freq_point_a_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); - HANDLE_CODE(unpack_integer(location_and_bw_r16, bref, (uint16_t)0u, (uint16_t)37949u)); - HANDLE_CODE(subcarrier_spacing_r16.unpack(bref)); - if (msg1_freq_start_r16_present) { - HANDLE_CODE(unpack_integer(msg1_freq_start_r16, bref, (uint16_t)0u, (uint16_t)274u)); - } - if (msg1_freq_start_cfra_r16_present) { - HANDLE_CODE(unpack_integer(msg1_freq_start_cfra_r16, bref, (uint16_t)0u, (uint16_t)274u)); - } - if (msg1_subcarrier_spacing_r16_present) { - HANDLE_CODE(msg1_subcarrier_spacing_r16.unpack(bref)); - } - if (msg1_subcarrier_spacing_cfra_r16_present) { - HANDLE_CODE(msg1_subcarrier_spacing_cfra_r16.unpack(bref)); - } - if (msg1_fdm_r16_present) { - HANDLE_CODE(msg1_fdm_r16.unpack(bref)); - } - if (msg1_fdmcfra_r16_present) { - HANDLE_CODE(msg1_fdmcfra_r16.unpack(bref)); - } - HANDLE_CODE(unpack_dyn_seq_of(per_ra_info_list_r16, bref, 1, 200)); - - if (ext) { - ext_groups_unpacker_guard group_flags(4); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(per_ra_info_list_v1660, bref); - if (per_ra_info_list_v1660.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*per_ra_info_list_v1660, bref, 1, 200)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(msg1_scs_from_prach_cfg_idx_r16_present, 1)); - if (msg1_scs_from_prach_cfg_idx_r16_present) { - HANDLE_CODE(msg1_scs_from_prach_cfg_idx_r16.unpack(bref)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(msg1_scs_from_prach_cfg_idx_cfra_r16_present, 1)); - if (msg1_scs_from_prach_cfg_idx_cfra_r16_present) { - HANDLE_CODE(msg1_scs_from_prach_cfg_idx_cfra_r16.unpack(bref)); - } - } - if (group_flags[3]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(msg_a_ro_freq_start_r17_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_ro_freq_start_cfra_r17_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_subcarrier_spacing_r17_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_ro_fdm_r17_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_ro_fdmcfra_r17_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_scs_from_prach_cfg_idx_r17_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_trans_max_r17_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_mcs_r17_present, 1)); - HANDLE_CODE(bref.unpack(nrof_prbs_per_msg_a_po_r17_present, 1)); - HANDLE_CODE(bref.unpack(msg_a_pusch_time_domain_alloc_r17_present, 1)); - HANDLE_CODE(bref.unpack(freq_start_msg_a_pusch_r17_present, 1)); - HANDLE_CODE(bref.unpack(nrof_msg_a_po_fdm_r17_present, 1)); - HANDLE_CODE(bref.unpack(dl_pathloss_rsrp_r17_present, 1)); - unpack_presence_flag(intended_sibs_r17, bref); - unpack_presence_flag(ssbs_for_si_acquisition_r17, bref); - HANDLE_CODE(bref.unpack(msg_a_pusch_payload_size_r17_present, 1)); - HANDLE_CODE(bref.unpack(on_demand_si_success_r17_present, 1)); - if (msg_a_ro_freq_start_r17_present) { - HANDLE_CODE(unpack_integer(msg_a_ro_freq_start_r17, bref, (uint16_t)0u, (uint16_t)274u)); - } - if (msg_a_ro_freq_start_cfra_r17_present) { - HANDLE_CODE(unpack_integer(msg_a_ro_freq_start_cfra_r17, bref, (uint16_t)0u, (uint16_t)274u)); - } - if (msg_a_subcarrier_spacing_r17_present) { - HANDLE_CODE(msg_a_subcarrier_spacing_r17.unpack(bref)); - } - if (msg_a_ro_fdm_r17_present) { - HANDLE_CODE(msg_a_ro_fdm_r17.unpack(bref)); - } - if (msg_a_ro_fdmcfra_r17_present) { - HANDLE_CODE(msg_a_ro_fdmcfra_r17.unpack(bref)); - } - if (msg_a_scs_from_prach_cfg_idx_r17_present) { - HANDLE_CODE(msg_a_scs_from_prach_cfg_idx_r17.unpack(bref)); - } - if (msg_a_trans_max_r17_present) { - HANDLE_CODE(msg_a_trans_max_r17.unpack(bref)); - } - if (msg_a_mcs_r17_present) { - HANDLE_CODE(unpack_integer(msg_a_mcs_r17, bref, (uint8_t)0u, (uint8_t)15u)); - } - if (nrof_prbs_per_msg_a_po_r17_present) { - HANDLE_CODE(unpack_integer(nrof_prbs_per_msg_a_po_r17, bref, (uint8_t)1u, (uint8_t)32u)); - } - if (msg_a_pusch_time_domain_alloc_r17_present) { - HANDLE_CODE(unpack_integer(msg_a_pusch_time_domain_alloc_r17, bref, (uint8_t)1u, (uint8_t)16u)); - } - if (freq_start_msg_a_pusch_r17_present) { - HANDLE_CODE(unpack_integer(freq_start_msg_a_pusch_r17, bref, (uint16_t)0u, (uint16_t)274u)); - } - if (nrof_msg_a_po_fdm_r17_present) { - HANDLE_CODE(nrof_msg_a_po_fdm_r17.unpack(bref)); - } - if (dl_pathloss_rsrp_r17_present) { - HANDLE_CODE(unpack_integer(dl_pathloss_rsrp_r17, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (intended_sibs_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*intended_sibs_r17, bref, 1, 32)); - } - if (ssbs_for_si_acquisition_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*ssbs_for_si_acquisition_r17, bref, 1, 64, integer_packer(0, 63))); - } - if (msg_a_pusch_payload_size_r17_present) { - HANDLE_CODE(msg_a_pusch_payload_size_r17.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void ra_info_common_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("absoluteFrequencyPointA-r16", absolute_freq_point_a_r16); - j.write_int("locationAndBandwidth-r16", location_and_bw_r16); - j.write_str("subcarrierSpacing-r16", subcarrier_spacing_r16.to_string()); - if (msg1_freq_start_r16_present) { - j.write_int("msg1-FrequencyStart-r16", msg1_freq_start_r16); - } - if (msg1_freq_start_cfra_r16_present) { - j.write_int("msg1-FrequencyStartCFRA-r16", msg1_freq_start_cfra_r16); - } - if (msg1_subcarrier_spacing_r16_present) { - j.write_str("msg1-SubcarrierSpacing-r16", msg1_subcarrier_spacing_r16.to_string()); - } - if (msg1_subcarrier_spacing_cfra_r16_present) { - j.write_str("msg1-SubcarrierSpacingCFRA-r16", msg1_subcarrier_spacing_cfra_r16.to_string()); - } - if (msg1_fdm_r16_present) { - j.write_str("msg1-FDM-r16", msg1_fdm_r16.to_string()); - } - if (msg1_fdmcfra_r16_present) { - j.write_str("msg1-FDMCFRA-r16", msg1_fdmcfra_r16.to_string()); - } - j.start_array("perRAInfoList-r16"); - for (const auto& e1 : per_ra_info_list_r16) { - e1.to_json(j); - } - j.end_array(); - if (ext) { - if (per_ra_info_list_v1660.is_present()) { - j.start_array("perRAInfoList-v1660"); - for (const auto& e1 : *per_ra_info_list_v1660) { - e1.to_json(j); - } - j.end_array(); - } - if (msg1_scs_from_prach_cfg_idx_r16_present) { - j.write_str("msg1-SCS-From-prach-ConfigurationIndex-r16", msg1_scs_from_prach_cfg_idx_r16.to_string()); - } - if (msg1_scs_from_prach_cfg_idx_cfra_r16_present) { - j.write_str("msg1-SCS-From-prach-ConfigurationIndexCFRA-r16", msg1_scs_from_prach_cfg_idx_cfra_r16.to_string()); - } - if (msg_a_ro_freq_start_r17_present) { - j.write_int("msgA-RO-FrequencyStart-r17", msg_a_ro_freq_start_r17); - } - if (msg_a_ro_freq_start_cfra_r17_present) { - j.write_int("msgA-RO-FrequencyStartCFRA-r17", msg_a_ro_freq_start_cfra_r17); - } - if (msg_a_subcarrier_spacing_r17_present) { - j.write_str("msgA-SubcarrierSpacing-r17", msg_a_subcarrier_spacing_r17.to_string()); - } - if (msg_a_ro_fdm_r17_present) { - j.write_str("msgA-RO-FDM-r17", msg_a_ro_fdm_r17.to_string()); - } - if (msg_a_ro_fdmcfra_r17_present) { - j.write_str("msgA-RO-FDMCFRA-r17", msg_a_ro_fdmcfra_r17.to_string()); - } - if (msg_a_scs_from_prach_cfg_idx_r17_present) { - j.write_str("msgA-SCS-From-prach-ConfigurationIndex-r17", msg_a_scs_from_prach_cfg_idx_r17.to_string()); - } - if (msg_a_trans_max_r17_present) { - j.write_str("msgA-TransMax-r17", msg_a_trans_max_r17.to_string()); - } - if (msg_a_mcs_r17_present) { - j.write_int("msgA-MCS-r17", msg_a_mcs_r17); - } - if (nrof_prbs_per_msg_a_po_r17_present) { - j.write_int("nrofPRBs-PerMsgA-PO-r17", nrof_prbs_per_msg_a_po_r17); - } - if (msg_a_pusch_time_domain_alloc_r17_present) { - j.write_int("msgA-PUSCH-TimeDomainAllocation-r17", msg_a_pusch_time_domain_alloc_r17); - } - if (freq_start_msg_a_pusch_r17_present) { - j.write_int("frequencyStartMsgA-PUSCH-r17", freq_start_msg_a_pusch_r17); - } - if (nrof_msg_a_po_fdm_r17_present) { - j.write_str("nrofMsgA-PO-FDM-r17", nrof_msg_a_po_fdm_r17.to_string()); - } - if (dl_pathloss_rsrp_r17_present) { - j.write_int("dlPathlossRSRP-r17", dl_pathloss_rsrp_r17); - } - if (intended_sibs_r17.is_present()) { - j.start_array("intendedSIBs-r17"); - for (const auto& e1 : *intended_sibs_r17) { - j.write_str(e1.to_string()); - } - j.end_array(); - } - if (ssbs_for_si_acquisition_r17.is_present()) { - j.start_array("ssbsForSI-Acquisition-r17"); - for (const auto& e1 : *ssbs_for_si_acquisition_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (msg_a_pusch_payload_size_r17_present) { - j.write_str("msgA-PUSCH-PayloadSize-r17", msg_a_pusch_payload_size_r17.to_string()); - } - if (on_demand_si_success_r17_present) { - j.write_str("onDemandSISuccess-r17", "true"); - } - } - j.end_obj(); -} - -const char* ra_info_common_r16_s::msg1_fdm_r16_opts::to_string() const -{ - static const char* names[] = {"one", "two", "four", "eight"}; - return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg1_fdm_r16_e_"); -} -uint8_t ra_info_common_r16_s::msg1_fdm_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "ra_info_common_r16_s::msg1_fdm_r16_e_"); -} - -const char* ra_info_common_r16_s::msg1_fdmcfra_r16_opts::to_string() const -{ - static const char* names[] = {"one", "two", "four", "eight"}; - return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg1_fdmcfra_r16_e_"); -} -uint8_t ra_info_common_r16_s::msg1_fdmcfra_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "ra_info_common_r16_s::msg1_fdmcfra_r16_e_"); -} - -const char* ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_r16_opts::to_string() const -{ - static const char* names[] = {"kHz1dot25", "kHz5", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_r16_e_"); -} -float ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_r16_opts::to_number() const -{ - static const float numbers[] = {1.25, 5.0}; - return map_enum_number(numbers, 2, value, "ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_r16_e_"); -} -const char* ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"1.25", "5"}; - return convert_enum_idx(number_strs, 4, value, "ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_r16_e_"); -} - -const char* ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_cfra_r16_opts::to_string() const -{ - static const char* names[] = {"kHz1dot25", "kHz5", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_cfra_r16_e_"); -} -float ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_cfra_r16_opts::to_number() const -{ - static const float numbers[] = {1.25, 5.0}; - return map_enum_number(numbers, 2, value, "ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_cfra_r16_e_"); -} -const char* ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_cfra_r16_opts::to_number_string() const -{ - static const char* number_strs[] = {"1.25", "5"}; - return convert_enum_idx(number_strs, 4, value, "ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_cfra_r16_e_"); -} - -const char* ra_info_common_r16_s::msg_a_ro_fdm_r17_opts::to_string() const -{ - static const char* names[] = {"one", "two", "four", "eight"}; - return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg_a_ro_fdm_r17_e_"); -} -uint8_t ra_info_common_r16_s::msg_a_ro_fdm_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "ra_info_common_r16_s::msg_a_ro_fdm_r17_e_"); -} - -const char* ra_info_common_r16_s::msg_a_ro_fdmcfra_r17_opts::to_string() const -{ - static const char* names[] = {"one", "two", "four", "eight"}; - return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg_a_ro_fdmcfra_r17_e_"); -} -uint8_t ra_info_common_r16_s::msg_a_ro_fdmcfra_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "ra_info_common_r16_s::msg_a_ro_fdmcfra_r17_e_"); -} - -const char* ra_info_common_r16_s::msg_a_scs_from_prach_cfg_idx_r17_opts::to_string() const -{ - static const char* names[] = {"kHz1dot25", "kHz5", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg_a_scs_from_prach_cfg_idx_r17_e_"); -} -float ra_info_common_r16_s::msg_a_scs_from_prach_cfg_idx_r17_opts::to_number() const -{ - static const float numbers[] = {1.25, 5.0}; - return map_enum_number(numbers, 2, value, "ra_info_common_r16_s::msg_a_scs_from_prach_cfg_idx_r17_e_"); -} -const char* ra_info_common_r16_s::msg_a_scs_from_prach_cfg_idx_r17_opts::to_number_string() const -{ - static const char* number_strs[] = {"1.25", "5"}; - return convert_enum_idx(number_strs, 4, value, "ra_info_common_r16_s::msg_a_scs_from_prach_cfg_idx_r17_e_"); -} - -const char* ra_info_common_r16_s::msg_a_trans_max_r17_opts::to_string() const -{ - static const char* names[] = {"n1", "n2", "n4", "n6", "n8", "n10", "n20", "n50", "n100", "n200"}; - return convert_enum_idx(names, 10, value, "ra_info_common_r16_s::msg_a_trans_max_r17_e_"); -} -uint8_t ra_info_common_r16_s::msg_a_trans_max_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 6, 8, 10, 20, 50, 100, 200}; - return map_enum_number(numbers, 10, value, "ra_info_common_r16_s::msg_a_trans_max_r17_e_"); -} - -const char* ra_info_common_r16_s::nrof_msg_a_po_fdm_r17_opts::to_string() const -{ - static const char* names[] = {"one", "two", "four", "eight"}; - return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::nrof_msg_a_po_fdm_r17_e_"); -} -uint8_t ra_info_common_r16_s::nrof_msg_a_po_fdm_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {1, 2, 4, 8}; - return map_enum_number(numbers, 4, value, "ra_info_common_r16_s::nrof_msg_a_po_fdm_r17_e_"); -} - -// RAN-VisibleMeasurements-r17 ::= SEQUENCE -SRSASN_CODE ran_visible_meass_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(app_layer_buffer_level_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(playout_delay_for_media_startup_r17_present, 1)); - HANDLE_CODE(bref.pack(pdu_session_id_list_r17.size() > 0, 1)); - - if (app_layer_buffer_level_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, app_layer_buffer_level_list_r17, 1, 8, integer_packer(0, 30000))); - } - if (playout_delay_for_media_startup_r17_present) { - HANDLE_CODE(pack_integer(bref, playout_delay_for_media_startup_r17, (uint16_t)0u, (uint16_t)30000u)); - } - if (pdu_session_id_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, pdu_session_id_list_r17, 1, 256, integer_packer(0, 255))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ran_visible_meass_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool app_layer_buffer_level_list_r17_present; - HANDLE_CODE(bref.unpack(app_layer_buffer_level_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(playout_delay_for_media_startup_r17_present, 1)); - bool pdu_session_id_list_r17_present; - HANDLE_CODE(bref.unpack(pdu_session_id_list_r17_present, 1)); - - if (app_layer_buffer_level_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(app_layer_buffer_level_list_r17, bref, 1, 8, integer_packer(0, 30000))); - } - if (playout_delay_for_media_startup_r17_present) { - HANDLE_CODE(unpack_integer(playout_delay_for_media_startup_r17, bref, (uint16_t)0u, (uint16_t)30000u)); - } - if (pdu_session_id_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(pdu_session_id_list_r17, bref, 1, 256, integer_packer(0, 255))); - } - - return SRSASN_SUCCESS; -} -void ran_visible_meass_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (app_layer_buffer_level_list_r17.size() > 0) { - j.start_array("appLayerBufferLevelList-r17"); - for (const auto& e1 : app_layer_buffer_level_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (playout_delay_for_media_startup_r17_present) { - j.write_int("playoutDelayForMediaStartup-r17", playout_delay_for_media_startup_r17); - } - if (pdu_session_id_list_r17.size() > 0) { - j.start_array("pdu-SessionIdList-r17"); - for (const auto& e1 : pdu_session_id_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - j.end_obj(); -} - -// RRCReconfigurationComplete-v1610-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_complete_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ue_meass_available_r16_present, 1)); - HANDLE_CODE(bref.pack(need_for_gaps_info_nr_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ue_meass_available_r16_present) { - HANDLE_CODE(ue_meass_available_r16.pack(bref)); - } - if (need_for_gaps_info_nr_r16_present) { - HANDLE_CODE(need_for_gaps_info_nr_r16.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_recfg_complete_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ue_meass_available_r16_present, 1)); - HANDLE_CODE(bref.unpack(need_for_gaps_info_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ue_meass_available_r16_present) { - HANDLE_CODE(ue_meass_available_r16.unpack(bref)); - } - if (need_for_gaps_info_nr_r16_present) { - HANDLE_CODE(need_for_gaps_info_nr_r16.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_recfg_complete_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ue_meass_available_r16_present) { - j.write_fieldname("ue-MeasurementsAvailable-r16"); - ue_meass_available_r16.to_json(j); - } - if (need_for_gaps_info_nr_r16_present) { - j.write_fieldname("needForGapsInfoNR-r16"); - need_for_gaps_info_nr_r16.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// RRCResumeComplete-v1700-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_complete_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(need_for_gap_ncsg_info_nr_r17_present, 1)); - HANDLE_CODE(bref.pack(need_for_gap_ncsg_info_eutra_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (need_for_gap_ncsg_info_nr_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_info_nr_r17.pack(bref)); - } - if (need_for_gap_ncsg_info_eutra_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_info_eutra_r17.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_complete_v1700_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(need_for_gap_ncsg_info_nr_r17_present, 1)); - HANDLE_CODE(bref.unpack(need_for_gap_ncsg_info_eutra_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (need_for_gap_ncsg_info_nr_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_info_nr_r17.unpack(bref)); - } - if (need_for_gap_ncsg_info_eutra_r17_present) { - HANDLE_CODE(need_for_gap_ncsg_info_eutra_r17.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_resume_complete_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (need_for_gap_ncsg_info_nr_r17_present) { - j.write_fieldname("needForGapNCSG-InfoNR-r17"); - need_for_gap_ncsg_info_nr_r17.to_json(j); - } - if (need_for_gap_ncsg_info_eutra_r17_present) { - j.write_fieldname("needForGapNCSG-InfoEUTRA-r17"); - need_for_gap_ncsg_info_eutra_r17.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// RRCSetupComplete-v1700-IEs ::= SEQUENCE -SRSASN_CODE rrc_setup_complete_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(onboarding_request_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_setup_complete_v1700_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(onboarding_request_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - return SRSASN_SUCCESS; -} -void rrc_setup_complete_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (onboarding_request_r17_present) { - j.write_str("onboardingRequest-r17", "true"); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// ReleasePreference-r16 ::= SEQUENCE -SRSASN_CODE release_pref_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(preferred_rrc_state_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE release_pref_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(preferred_rrc_state_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void release_pref_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("preferredRRC-State-r16", preferred_rrc_state_r16.to_string()); - j.end_obj(); -} - -const char* release_pref_r16_s::preferred_rrc_state_r16_opts::to_string() const -{ - static const char* names[] = {"idle", "inactive", "connected", "outOfConnected"}; - return convert_enum_idx(names, 4, value, "release_pref_r16_s::preferred_rrc_state_r16_e_"); -} - -// SHR-Cause-r17 ::= SEQUENCE -SRSASN_CODE shr_cause_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(t304_cause_r17_present, 1)); - HANDLE_CODE(bref.pack(t310_cause_r17_present, 1)); - HANDLE_CODE(bref.pack(t312_cause_r17_present, 1)); - HANDLE_CODE(bref.pack(source_daps_fail_r17_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE shr_cause_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(t304_cause_r17_present, 1)); - HANDLE_CODE(bref.unpack(t310_cause_r17_present, 1)); - HANDLE_CODE(bref.unpack(t312_cause_r17_present, 1)); - HANDLE_CODE(bref.unpack(source_daps_fail_r17_present, 1)); - - return SRSASN_SUCCESS; -} -void shr_cause_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (t304_cause_r17_present) { - j.write_str("t304-cause-r17", "true"); - } - if (t310_cause_r17_present) { - j.write_str("t310-cause-r17", "true"); - } - if (t312_cause_r17_present) { - j.write_str("t312-cause-r17", "true"); - } - if (source_daps_fail_r17_present) { - j.write_str("sourceDAPS-Failure-r17", "true"); - } - j.end_obj(); -} - -// SL-RxDRX-Report-v1700 ::= SEQUENCE -SRSASN_CODE sl_rx_drx_report_v1700_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(sl_drx_cfg_from_tx_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_rx_drx_report_v1700_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(sl_drx_cfg_from_tx_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void sl_rx_drx_report_v1700_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("sl-DRX-ConfigFromTx-r17"); - sl_drx_cfg_from_tx_r17.to_json(j); - j.end_obj(); -} - -// SL-RxInterestedGC-BC-Dest-r17 ::= SEQUENCE -SRSASN_CODE sl_rx_interested_gc_bc_dest_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_dyn_seq_of(bref, sl_rx_interested_qos_info_list_r17, 1, 64)); - HANDLE_CODE(sl_dest_id_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_rx_interested_gc_bc_dest_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_dyn_seq_of(sl_rx_interested_qos_info_list_r17, bref, 1, 64)); - HANDLE_CODE(sl_dest_id_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void sl_rx_interested_gc_bc_dest_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("sl-RxInterestedQoS-InfoList-r17"); - for (const auto& e1 : sl_rx_interested_qos_info_list_r17) { - e1.to_json(j); - } - j.end_array(); - j.write_str("sl-DestinationIdentity-r16", sl_dest_id_r16.to_string()); - j.end_obj(); -} - -// SL-TxResourceReqCommRelayInfo-r17 ::= SEQUENCE -SRSASN_CODE sl_tx_res_req_comm_relay_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sl_relay_drx_cfg_r17_present, 1)); - - if (sl_relay_drx_cfg_r17_present) { - HANDLE_CODE(sl_relay_drx_cfg_r17.pack(bref)); - } - HANDLE_CODE(sl_tx_res_req_comm_relay_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_tx_res_req_comm_relay_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(sl_relay_drx_cfg_r17_present, 1)); - - if (sl_relay_drx_cfg_r17_present) { - HANDLE_CODE(sl_relay_drx_cfg_r17.unpack(bref)); - } - HANDLE_CODE(sl_tx_res_req_comm_relay_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void sl_tx_res_req_comm_relay_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_relay_drx_cfg_r17_present) { - j.write_fieldname("sl-RelayDRXConfig-r17"); - sl_relay_drx_cfg_r17.to_json(j); - } - j.write_fieldname("sl-TxResourceReqCommRelay-r17"); - sl_tx_res_req_comm_relay_r17.to_json(j); - j.end_obj(); -} - -// SL-TxResourceReqDisc-r17 ::= SEQUENCE -SRSASN_CODE sl_tx_res_req_disc_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(sl_source_id_relay_ue_r17_present, 1)); - - HANDLE_CODE(sl_dest_id_disc_r17.pack(bref)); - if (sl_source_id_relay_ue_r17_present) { - HANDLE_CODE(sl_source_id_relay_ue_r17.pack(bref)); - } - HANDLE_CODE(sl_cast_type_disc_r17.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_interested_freq_list_disc_r17, 1, 8, integer_packer(1, 8))); - HANDLE_CODE(pack_dyn_seq_of(bref, sl_type_tx_sync_list_disc_r17, 1, 8)); - HANDLE_CODE(sl_discovery_type_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_tx_res_req_disc_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(sl_source_id_relay_ue_r17_present, 1)); - - HANDLE_CODE(sl_dest_id_disc_r17.unpack(bref)); - if (sl_source_id_relay_ue_r17_present) { - HANDLE_CODE(sl_source_id_relay_ue_r17.unpack(bref)); - } - HANDLE_CODE(sl_cast_type_disc_r17.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(sl_tx_interested_freq_list_disc_r17, bref, 1, 8, integer_packer(1, 8))); - HANDLE_CODE(unpack_dyn_seq_of(sl_type_tx_sync_list_disc_r17, bref, 1, 8)); - HANDLE_CODE(sl_discovery_type_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void sl_tx_res_req_disc_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("sl-DestinationIdentityDisc-r17", sl_dest_id_disc_r17.to_string()); - if (sl_source_id_relay_ue_r17_present) { - j.write_str("sl-SourceIdentityRelayUE-r17", sl_source_id_relay_ue_r17.to_string()); - } - j.write_str("sl-CastTypeDisc-r17", sl_cast_type_disc_r17.to_string()); - j.start_array("sl-TxInterestedFreqListDisc-r17"); - for (const auto& e1 : sl_tx_interested_freq_list_disc_r17) { - j.write_int(e1); - } - j.end_array(); - j.start_array("sl-TypeTxSyncListDisc-r17"); - for (const auto& e1 : sl_type_tx_sync_list_disc_r17) { - j.write_str(e1.to_string()); - } - j.end_array(); - j.write_str("sl-DiscoveryType-r17", sl_discovery_type_r17.to_string()); - j.end_obj(); -} - -const char* sl_tx_res_req_disc_r17_s::sl_cast_type_disc_r17_opts::to_string() const -{ - static const char* names[] = {"broadcast", "groupcast", "unicast", "spare1"}; - return convert_enum_idx(names, 4, value, "sl_tx_res_req_disc_r17_s::sl_cast_type_disc_r17_e_"); -} - -const char* sl_tx_res_req_disc_r17_s::sl_discovery_type_r17_opts::to_string() const -{ - static const char* names[] = {"relay", "non-Relay"}; - return convert_enum_idx(names, 2, value, "sl_tx_res_req_disc_r17_s::sl_discovery_type_r17_e_"); -} - -// UEAssistanceInformation-v1700-IEs ::= SEQUENCE -SRSASN_CODE ue_assist_info_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_gap_fr2_pref_r17_present, 1)); - HANDLE_CODE(bref.pack(musim_assist_r17_present, 1)); - HANDLE_CODE(bref.pack(overheat_assist_r17_present, 1)); - HANDLE_CODE(bref.pack(max_bw_pref_fr2_2_r17_present, 1)); - HANDLE_CODE(bref.pack(max_mimo_layer_pref_fr2_2_r17_present, 1)); - HANDLE_CODE(bref.pack(min_sched_offset_pref_ext_r17_present, 1)); - HANDLE_CODE(bref.pack(rlm_meas_relaxation_state_r17_present, 1)); - HANDLE_CODE(bref.pack(bfd_meas_relaxation_state_r17_present, 1)); - HANDLE_CODE(bref.pack(non_sdt_data_ind_r17_present, 1)); - HANDLE_CODE(bref.pack(scg_deactivation_pref_r17_present, 1)); - HANDLE_CODE(bref.pack(ul_data_r17_present, 1)); - HANDLE_CODE(bref.pack(rrm_meas_relaxation_fulfilment_r17_present, 1)); - HANDLE_CODE(bref.pack(propagation_delay_difference_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ul_gap_fr2_pref_r17_present) { - HANDLE_CODE(ul_gap_fr2_pref_r17.pack(bref)); - } - if (musim_assist_r17_present) { - HANDLE_CODE(musim_assist_r17.pack(bref)); - } - if (overheat_assist_r17_present) { - HANDLE_CODE(overheat_assist_r17.pack(bref)); - } - if (max_bw_pref_fr2_2_r17_present) { - HANDLE_CODE(max_bw_pref_fr2_2_r17.pack(bref)); - } - if (max_mimo_layer_pref_fr2_2_r17_present) { - HANDLE_CODE(max_mimo_layer_pref_fr2_2_r17.pack(bref)); - } - if (min_sched_offset_pref_ext_r17_present) { - HANDLE_CODE(min_sched_offset_pref_ext_r17.pack(bref)); - } - if (rlm_meas_relaxation_state_r17_present) { - HANDLE_CODE(bref.pack(rlm_meas_relaxation_state_r17, 1)); - } - if (bfd_meas_relaxation_state_r17_present) { - HANDLE_CODE(bfd_meas_relaxation_state_r17.pack(bref)); - } - if (non_sdt_data_ind_r17_present) { - HANDLE_CODE(bref.pack(non_sdt_data_ind_r17.resume_cause_r17_present, 1)); - if (non_sdt_data_ind_r17.resume_cause_r17_present) { - HANDLE_CODE(non_sdt_data_ind_r17.resume_cause_r17.pack(bref)); - } - } - if (scg_deactivation_pref_r17_present) { - HANDLE_CODE(scg_deactivation_pref_r17.pack(bref)); - } - if (rrm_meas_relaxation_fulfilment_r17_present) { - HANDLE_CODE(bref.pack(rrm_meas_relaxation_fulfilment_r17, 1)); - } - if (propagation_delay_difference_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, propagation_delay_difference_r17, 1, 4, integer_packer(-270, 270))); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_assist_info_v1700_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ul_gap_fr2_pref_r17_present, 1)); - HANDLE_CODE(bref.unpack(musim_assist_r17_present, 1)); - HANDLE_CODE(bref.unpack(overheat_assist_r17_present, 1)); - HANDLE_CODE(bref.unpack(max_bw_pref_fr2_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(max_mimo_layer_pref_fr2_2_r17_present, 1)); - HANDLE_CODE(bref.unpack(min_sched_offset_pref_ext_r17_present, 1)); - HANDLE_CODE(bref.unpack(rlm_meas_relaxation_state_r17_present, 1)); - HANDLE_CODE(bref.unpack(bfd_meas_relaxation_state_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_sdt_data_ind_r17_present, 1)); - HANDLE_CODE(bref.unpack(scg_deactivation_pref_r17_present, 1)); - HANDLE_CODE(bref.unpack(ul_data_r17_present, 1)); - HANDLE_CODE(bref.unpack(rrm_meas_relaxation_fulfilment_r17_present, 1)); - bool propagation_delay_difference_r17_present; - HANDLE_CODE(bref.unpack(propagation_delay_difference_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ul_gap_fr2_pref_r17_present) { - HANDLE_CODE(ul_gap_fr2_pref_r17.unpack(bref)); - } - if (musim_assist_r17_present) { - HANDLE_CODE(musim_assist_r17.unpack(bref)); - } - if (overheat_assist_r17_present) { - HANDLE_CODE(overheat_assist_r17.unpack(bref)); - } - if (max_bw_pref_fr2_2_r17_present) { - HANDLE_CODE(max_bw_pref_fr2_2_r17.unpack(bref)); - } - if (max_mimo_layer_pref_fr2_2_r17_present) { - HANDLE_CODE(max_mimo_layer_pref_fr2_2_r17.unpack(bref)); - } - if (min_sched_offset_pref_ext_r17_present) { - HANDLE_CODE(min_sched_offset_pref_ext_r17.unpack(bref)); - } - if (rlm_meas_relaxation_state_r17_present) { - HANDLE_CODE(bref.unpack(rlm_meas_relaxation_state_r17, 1)); - } - if (bfd_meas_relaxation_state_r17_present) { - HANDLE_CODE(bfd_meas_relaxation_state_r17.unpack(bref)); - } - if (non_sdt_data_ind_r17_present) { - HANDLE_CODE(bref.unpack(non_sdt_data_ind_r17.resume_cause_r17_present, 1)); - if (non_sdt_data_ind_r17.resume_cause_r17_present) { - HANDLE_CODE(non_sdt_data_ind_r17.resume_cause_r17.unpack(bref)); - } - } - if (scg_deactivation_pref_r17_present) { - HANDLE_CODE(scg_deactivation_pref_r17.unpack(bref)); - } - if (rrm_meas_relaxation_fulfilment_r17_present) { - HANDLE_CODE(bref.unpack(rrm_meas_relaxation_fulfilment_r17, 1)); - } - if (propagation_delay_difference_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(propagation_delay_difference_r17, bref, 1, 4, integer_packer(-270, 270))); - } - - return SRSASN_SUCCESS; -} -void ue_assist_info_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ul_gap_fr2_pref_r17_present) { - j.write_fieldname("ul-GapFR2-Preference-r17"); - ul_gap_fr2_pref_r17.to_json(j); - } - if (musim_assist_r17_present) { - j.write_fieldname("musim-Assistance-r17"); - musim_assist_r17.to_json(j); - } - if (overheat_assist_r17_present) { - j.write_fieldname("overheatingAssistance-r17"); - overheat_assist_r17.to_json(j); - } - if (max_bw_pref_fr2_2_r17_present) { - j.write_fieldname("maxBW-PreferenceFR2-2-r17"); - max_bw_pref_fr2_2_r17.to_json(j); - } - if (max_mimo_layer_pref_fr2_2_r17_present) { - j.write_fieldname("maxMIMO-LayerPreferenceFR2-2-r17"); - max_mimo_layer_pref_fr2_2_r17.to_json(j); - } - if (min_sched_offset_pref_ext_r17_present) { - j.write_fieldname("minSchedulingOffsetPreferenceExt-r17"); - min_sched_offset_pref_ext_r17.to_json(j); - } - if (rlm_meas_relaxation_state_r17_present) { - j.write_bool("rlm-MeasRelaxationState-r17", rlm_meas_relaxation_state_r17); - } - if (bfd_meas_relaxation_state_r17_present) { - j.write_str("bfd-MeasRelaxationState-r17", bfd_meas_relaxation_state_r17.to_string()); - } - if (non_sdt_data_ind_r17_present) { - j.write_fieldname("nonSDT-DataIndication-r17"); - j.start_obj(); - if (non_sdt_data_ind_r17.resume_cause_r17_present) { - j.write_str("resumeCause-r17", non_sdt_data_ind_r17.resume_cause_r17.to_string()); - } - j.end_obj(); - } - if (scg_deactivation_pref_r17_present) { - j.write_str("scg-DeactivationPreference-r17", scg_deactivation_pref_r17.to_string()); - } - if (ul_data_r17_present) { - j.write_str("uplinkData-r17", "true"); - } - if (rrm_meas_relaxation_fulfilment_r17_present) { - j.write_bool("rrm-MeasRelaxationFulfilment-r17", rrm_meas_relaxation_fulfilment_r17); - } - if (propagation_delay_difference_r17.size() > 0) { - j.start_array("propagationDelayDifference-r17"); - for (const auto& e1 : propagation_delay_difference_r17) { - 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(); -} - -const char* ue_assist_info_v1700_ies_s::scg_deactivation_pref_r17_opts::to_string() const -{ - static const char* names[] = {"scgDeactivationPreferred", "noPreference"}; - return convert_enum_idx(names, 2, value, "ue_assist_info_v1700_ies_s::scg_deactivation_pref_r17_e_"); -} - -// UL-PDCP-DelayValueResult-r16 ::= SEQUENCE -SRSASN_CODE ul_pdcp_delay_value_result_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, drb_id_r16, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(pack_integer(bref, average_delay_r16, (uint16_t)0u, (uint16_t)10000u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_pdcp_delay_value_result_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(drb_id_r16, bref, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(unpack_integer(average_delay_r16, bref, (uint16_t)0u, (uint16_t)10000u)); - - return SRSASN_SUCCESS; -} -void ul_pdcp_delay_value_result_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("drb-Id-r16", drb_id_r16); - j.write_int("averageDelay-r16", average_delay_r16); - j.end_obj(); -} - -// UL-PDCP-ExcessDelayResult-r17 ::= SEQUENCE -SRSASN_CODE ul_pdcp_excess_delay_result_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_integer(bref, drb_id_r17, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(pack_integer(bref, excess_delay_r17, (uint8_t)0u, (uint8_t)31u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_pdcp_excess_delay_result_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_integer(drb_id_r17, bref, (uint8_t)1u, (uint8_t)32u)); - HANDLE_CODE(unpack_integer(excess_delay_r17, bref, (uint8_t)0u, (uint8_t)31u)); - - return SRSASN_SUCCESS; -} -void ul_pdcp_excess_delay_result_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("drb-Id-r17", drb_id_r17); - j.write_int("excessDelay-r17", excess_delay_r17); - j.end_obj(); -} - -// UplinkTxDirectCurrentCell ::= SEQUENCE -SRSASN_CODE ul_tx_direct_current_cell_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)); - - 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; -} -SRSASN_CODE ul_tx_direct_current_cell_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)); - - 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); - - unpack_presence_flag(ul_direct_current_bwp_sul, bref); - 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(); -} - -// VisitedCellInfo-r16 ::= SEQUENCE -SRSASN_CODE visited_cell_info_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(visited_cell_id_r16_present, 1)); - - if (visited_cell_id_r16_present) { - HANDLE_CODE(visited_cell_id_r16.pack(bref)); - } - HANDLE_CODE(pack_integer(bref, time_spent_r16, (uint16_t)0u, (uint16_t)4095u)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= visited_pscell_info_list_report_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(visited_pscell_info_list_report_r17.is_present(), 1)); - if (visited_pscell_info_list_report_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *visited_pscell_info_list_report_r17, 1, 16)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE visited_cell_info_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(visited_cell_id_r16_present, 1)); - - if (visited_cell_id_r16_present) { - HANDLE_CODE(visited_cell_id_r16.unpack(bref)); - } - HANDLE_CODE(unpack_integer(time_spent_r16, bref, (uint16_t)0u, (uint16_t)4095u)); - - 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); - - unpack_presence_flag(visited_pscell_info_list_report_r17, bref); - if (visited_pscell_info_list_report_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*visited_pscell_info_list_report_r17, bref, 1, 16)); - } - } - } - return SRSASN_SUCCESS; -} -void visited_cell_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (visited_cell_id_r16_present) { - j.write_fieldname("visitedCellId-r16"); - visited_cell_id_r16.to_json(j); - } - j.write_int("timeSpent-r16", time_spent_r16); - if (ext) { - if (visited_pscell_info_list_report_r17.is_present()) { - j.start_array("visitedPSCellInfoListReport-r17"); - for (const auto& e1 : *visited_pscell_info_list_report_r17) { - e1.to_json(j); - } - j.end_array(); - } - } - j.end_obj(); -} - -void visited_cell_info_r16_s::visited_cell_id_r16_c_::destroy_() -{ - switch (type_) { - case types::nr_cell_id_r16: - c.destroy(); - break; - case types::eutra_cell_id_r16: - c.destroy(); - break; - default: - break; - } -} -void visited_cell_info_r16_s::visited_cell_id_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::nr_cell_id_r16: - c.init(); - break; - case types::eutra_cell_id_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_"); - } -} -visited_cell_info_r16_s::visited_cell_id_r16_c_::visited_cell_id_r16_c_( - const visited_cell_info_r16_s::visited_cell_id_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::nr_cell_id_r16: - c.init(other.c.get()); - break; - case types::eutra_cell_id_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_"); - } -} -visited_cell_info_r16_s::visited_cell_id_r16_c_& -visited_cell_info_r16_s::visited_cell_id_r16_c_::operator=(const visited_cell_info_r16_s::visited_cell_id_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::nr_cell_id_r16: - c.set(other.c.get()); - break; - case types::eutra_cell_id_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_"); - } - - return *this; -} -visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_& -visited_cell_info_r16_s::visited_cell_id_r16_c_::set_nr_cell_id_r16() -{ - set(types::nr_cell_id_r16); - return c.get(); -} -visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_& -visited_cell_info_r16_s::visited_cell_id_r16_c_::set_eutra_cell_id_r16() -{ - set(types::eutra_cell_id_r16); - return c.get(); -} -void visited_cell_info_r16_s::visited_cell_id_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::nr_cell_id_r16: - j.write_fieldname("nr-CellId-r16"); - c.get().to_json(j); - break; - case types::eutra_cell_id_r16: - j.write_fieldname("eutra-CellId-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE visited_cell_info_r16_s::visited_cell_id_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::nr_cell_id_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::eutra_cell_id_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE visited_cell_info_r16_s::visited_cell_id_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::nr_cell_id_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::eutra_cell_id_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::destroy_() -{ - switch (type_) { - case types::cgi_info: - c.destroy(); - break; - case types::pci_arfcn_r16: - c.destroy(); - break; - default: - break; - } -} -void visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::cgi_info: - c.init(); - break; - case types::pci_arfcn_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_"); - } -} -visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::nr_cell_id_r16_c_( - const visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::cgi_info: - c.init(other.c.get()); - break; - case types::pci_arfcn_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_"); - } -} -visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_& -visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::operator=( - const visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::cgi_info: - c.set(other.c.get()); - break; - case types::pci_arfcn_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_"); - } - - return *this; -} -cgi_info_logging_r16_s& visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::set_cgi_info() -{ - set(types::cgi_info); - return c.get(); -} -pci_arfcn_nr_r16_s& visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::set_pci_arfcn_r16() -{ - set(types::pci_arfcn_r16); - return c.get(); -} -void visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::cgi_info: - j.write_fieldname("cgi-Info"); - c.get().to_json(j); - break; - case types::pci_arfcn_r16: - j.write_fieldname("pci-arfcn-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cgi_info: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pci_arfcn_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cgi_info: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pci_arfcn_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::destroy_() -{ - switch (type_) { - case types::cell_global_id_r16: - c.destroy(); - break; - case types::pci_arfcn_r16: - c.destroy(); - break; - default: - break; - } -} -void visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::cell_global_id_r16: - c.init(); - break; - case types::pci_arfcn_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_"); - } -} -visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::eutra_cell_id_r16_c_( - const visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::cell_global_id_r16: - c.init(other.c.get()); - break; - case types::pci_arfcn_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_"); - } -} -visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_& -visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::operator=( - const visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::cell_global_id_r16: - c.set(other.c.get()); - break; - case types::pci_arfcn_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_"); - } - - return *this; -} -cgi_info_eutra_s& visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::set_cell_global_id_r16() -{ - set(types::cell_global_id_r16); - return c.get(); -} -pci_arfcn_eutra_r16_s& visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::set_pci_arfcn_r16() -{ - set(types::pci_arfcn_r16); - return c.get(); -} -void visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::cell_global_id_r16: - j.write_fieldname("cellGlobalId-r16"); - c.get().to_json(j); - break; - case types::pci_arfcn_r16: - j.write_fieldname("pci-arfcn-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cell_global_id_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pci_arfcn_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cell_global_id_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pci_arfcn_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// DRB-CountInfo ::= SEQUENCE -SRSASN_CODE drb_count_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_ul, (uint64_t)0u, (uint64_t)4294967295u)); - HANDLE_CODE(pack_integer(bref, count_dl, (uint64_t)0u, (uint64_t)4294967295u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE drb_count_info_s::unpack(cbit_ref& bref) -{ - 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(); -} - -// FailureInfoDAPS-r16 ::= SEQUENCE -SRSASN_CODE fail_info_daps_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(fail_type_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE fail_info_daps_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(fail_type_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void fail_info_daps_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("failureType-r16", fail_type_r16.to_string()); - j.end_obj(); -} - -const char* fail_info_daps_r16_s::fail_type_r16_opts::to_string() const -{ - static const char* names[] = {"daps-failure", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "fail_info_daps_r16_s::fail_type_r16_e_"); -} - -// MBS-ServiceInfo-r17 ::= SEQUENCE -SRSASN_CODE mbs_service_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(tmgi_r17.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mbs_service_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(tmgi_r17.unpack(bref)); - - return SRSASN_SUCCESS; -} -void mbs_service_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("tmgi-r17"); - tmgi_r17.to_json(j); - j.end_obj(); -} - -// MeasReportAppLayer-r17 ::= SEQUENCE -SRSASN_CODE meas_report_app_layer_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(meas_report_app_layer_container_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(app_layer_session_status_r17_present, 1)); - HANDLE_CODE(bref.pack(ran_visible_meass_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, meas_cfg_app_layer_id_r17, (uint8_t)0u, (uint8_t)15u)); - if (meas_report_app_layer_container_r17.size() > 0) { - HANDLE_CODE(meas_report_app_layer_container_r17.pack(bref)); - } - if (app_layer_session_status_r17_present) { - HANDLE_CODE(app_layer_session_status_r17.pack(bref)); - } - if (ran_visible_meass_r17_present) { - HANDLE_CODE(ran_visible_meass_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_report_app_layer_r17_s::unpack(cbit_ref& bref) -{ - bool meas_report_app_layer_container_r17_present; - HANDLE_CODE(bref.unpack(meas_report_app_layer_container_r17_present, 1)); - HANDLE_CODE(bref.unpack(app_layer_session_status_r17_present, 1)); - HANDLE_CODE(bref.unpack(ran_visible_meass_r17_present, 1)); - - HANDLE_CODE(unpack_integer(meas_cfg_app_layer_id_r17, bref, (uint8_t)0u, (uint8_t)15u)); - if (meas_report_app_layer_container_r17_present) { - HANDLE_CODE(meas_report_app_layer_container_r17.unpack(bref)); - } - if (app_layer_session_status_r17_present) { - HANDLE_CODE(app_layer_session_status_r17.unpack(bref)); - } - if (ran_visible_meass_r17_present) { - HANDLE_CODE(ran_visible_meass_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void meas_report_app_layer_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("measConfigAppLayerId-r17", meas_cfg_app_layer_id_r17); - if (meas_report_app_layer_container_r17.size() > 0) { - j.write_str("measReportAppLayerContainer-r17", meas_report_app_layer_container_r17.to_string()); - } - if (app_layer_session_status_r17_present) { - j.write_str("appLayerSessionStatus-r17", app_layer_session_status_r17.to_string()); - } - if (ran_visible_meass_r17_present) { - j.write_fieldname("ran-VisibleMeasurements-r17"); - ran_visible_meass_r17.to_json(j); - } - j.end_obj(); -} - -const char* meas_report_app_layer_r17_s::app_layer_session_status_r17_opts::to_string() const -{ - static const char* names[] = {"started", "stopped"}; - return convert_enum_idx(names, 2, value, "meas_report_app_layer_r17_s::app_layer_session_status_r17_e_"); -} - -// MeasResultCLI-r16 ::= SEQUENCE -SRSASN_CODE meas_result_cli_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(meas_result_list_srs_rsrp_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_list_cli_rssi_r16.size() > 0, 1)); - - if (meas_result_list_srs_rsrp_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_srs_rsrp_r16, 1, 8)); - } - if (meas_result_list_cli_rssi_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_cli_rssi_r16, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_cli_r16_s::unpack(cbit_ref& bref) -{ - bool meas_result_list_srs_rsrp_r16_present; - HANDLE_CODE(bref.unpack(meas_result_list_srs_rsrp_r16_present, 1)); - bool meas_result_list_cli_rssi_r16_present; - HANDLE_CODE(bref.unpack(meas_result_list_cli_rssi_r16_present, 1)); - - if (meas_result_list_srs_rsrp_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_srs_rsrp_r16, bref, 1, 8)); - } - if (meas_result_list_cli_rssi_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_cli_rssi_r16, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -void meas_result_cli_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (meas_result_list_srs_rsrp_r16.size() > 0) { - j.start_array("measResultListSRS-RSRP-r16"); - for (const auto& e1 : meas_result_list_srs_rsrp_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_result_list_cli_rssi_r16.size() > 0) { - j.start_array("measResultListCLI-RSSI-r16"); - for (const auto& e1 : meas_result_list_cli_rssi_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// MeasResultForRSSI-r16 ::= SEQUENCE -SRSASN_CODE meas_result_for_rssi_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(pack_integer(bref, rssi_result_r16, (uint8_t)0u, (uint8_t)76u)); - HANDLE_CODE(pack_integer(bref, ch_occupancy_r16, (uint8_t)0u, (uint8_t)100u)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_for_rssi_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(unpack_integer(rssi_result_r16, bref, (uint8_t)0u, (uint8_t)76u)); - HANDLE_CODE(unpack_integer(ch_occupancy_r16, bref, (uint8_t)0u, (uint8_t)100u)); - - return SRSASN_SUCCESS; -} -void meas_result_for_rssi_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("rssi-Result-r16", rssi_result_r16); - j.write_int("channelOccupancy-r16", ch_occupancy_r16); - j.end_obj(); -} - -// MeasResultIdleEUTRA-r16 ::= SEQUENCE -SRSASN_CODE meas_result_idle_eutra_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(pack_dyn_seq_of(bref, meas_results_per_carrier_list_idle_eutra_r16, 1, 8)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_idle_eutra_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(unpack_dyn_seq_of(meas_results_per_carrier_list_idle_eutra_r16, bref, 1, 8)); - - return SRSASN_SUCCESS; -} -void meas_result_idle_eutra_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.start_array("measResultsPerCarrierListIdleEUTRA-r16"); - for (const auto& e1 : meas_results_per_carrier_list_idle_eutra_r16) { - e1.to_json(j); - } - j.end_array(); - j.end_obj(); -} - -// MeasResultIdleNR-r16 ::= SEQUENCE -SRSASN_CODE meas_result_idle_nr_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_results_per_carrier_list_idle_nr_r16.size() > 0, 1)); - - HANDLE_CODE(bref.pack(meas_result_serving_cell_r16.rsrp_result_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_result_serving_cell_r16.rsrq_result_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_result_serving_cell_r16.results_ssb_idxes_r16.size() > 0, 1)); - if (meas_result_serving_cell_r16.rsrp_result_r16_present) { - HANDLE_CODE(pack_integer(bref, meas_result_serving_cell_r16.rsrp_result_r16, (uint8_t)0u, (uint8_t)127u)); - } - if (meas_result_serving_cell_r16.rsrq_result_r16_present) { - HANDLE_CODE(pack_integer(bref, meas_result_serving_cell_r16.rsrq_result_r16, (uint8_t)0u, (uint8_t)127u)); - } - if (meas_result_serving_cell_r16.results_ssb_idxes_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_serving_cell_r16.results_ssb_idxes_r16, 1, 32)); - } - if (meas_results_per_carrier_list_idle_nr_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_results_per_carrier_list_idle_nr_r16, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_idle_nr_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool meas_results_per_carrier_list_idle_nr_r16_present; - HANDLE_CODE(bref.unpack(meas_results_per_carrier_list_idle_nr_r16_present, 1)); - - HANDLE_CODE(bref.unpack(meas_result_serving_cell_r16.rsrp_result_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_serving_cell_r16.rsrq_result_r16_present, 1)); - bool results_ssb_idxes_r16_present; - HANDLE_CODE(bref.unpack(results_ssb_idxes_r16_present, 1)); - if (meas_result_serving_cell_r16.rsrp_result_r16_present) { - HANDLE_CODE(unpack_integer(meas_result_serving_cell_r16.rsrp_result_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (meas_result_serving_cell_r16.rsrq_result_r16_present) { - HANDLE_CODE(unpack_integer(meas_result_serving_cell_r16.rsrq_result_r16, bref, (uint8_t)0u, (uint8_t)127u)); - } - if (results_ssb_idxes_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_serving_cell_r16.results_ssb_idxes_r16, bref, 1, 32)); - } - if (meas_results_per_carrier_list_idle_nr_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_results_per_carrier_list_idle_nr_r16, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -void meas_result_idle_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("measResultServingCell-r16"); - j.start_obj(); - if (meas_result_serving_cell_r16.rsrp_result_r16_present) { - j.write_int("rsrp-Result-r16", meas_result_serving_cell_r16.rsrp_result_r16); - } - if (meas_result_serving_cell_r16.rsrq_result_r16_present) { - j.write_int("rsrq-Result-r16", meas_result_serving_cell_r16.rsrq_result_r16); - } - if (meas_result_serving_cell_r16.results_ssb_idxes_r16.size() > 0) { - j.start_array("resultsSSB-Indexes-r16"); - for (const auto& e1 : meas_result_serving_cell_r16.results_ssb_idxes_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); - if (meas_results_per_carrier_list_idle_nr_r16.size() > 0) { - j.start_array("measResultsPerCarrierListIdleNR-r16"); - for (const auto& e1 : meas_results_per_carrier_list_idle_nr_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// MeasResultRLFNR-r16 ::= SEQUENCE -SRSASN_CODE meas_result_rlf_nr_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(meas_result_r16.rs_idx_results_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_result_r16.cell_results_r16.results_ssb_cell_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_result_r16.cell_results_r16.results_csi_rs_cell_r16_present, 1)); - if (meas_result_r16.cell_results_r16.results_ssb_cell_r16_present) { - HANDLE_CODE(meas_result_r16.cell_results_r16.results_ssb_cell_r16.pack(bref)); - } - if (meas_result_r16.cell_results_r16.results_csi_rs_cell_r16_present) { - HANDLE_CODE(meas_result_r16.cell_results_r16.results_csi_rs_cell_r16.pack(bref)); - } - if (meas_result_r16.rs_idx_results_r16_present) { - HANDLE_CODE(bref.pack(meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_result_r16.rs_idx_results_r16.results_csi_rs_idxes_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16_present, 1)); - if (meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16, 1, 64)); - } - if (meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16_present) { - HANDLE_CODE(meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16.pack(bref)); - } - if (meas_result_r16.rs_idx_results_r16.results_csi_rs_idxes_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_r16.rs_idx_results_r16.results_csi_rs_idxes_r16, 1, 64)); - } - if (meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16_present) { - HANDLE_CODE(meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16.pack(bref)); - } - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_rlf_nr_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(meas_result_r16.rs_idx_results_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_r16.cell_results_r16.results_ssb_cell_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_r16.cell_results_r16.results_csi_rs_cell_r16_present, 1)); - if (meas_result_r16.cell_results_r16.results_ssb_cell_r16_present) { - HANDLE_CODE(meas_result_r16.cell_results_r16.results_ssb_cell_r16.unpack(bref)); - } - if (meas_result_r16.cell_results_r16.results_csi_rs_cell_r16_present) { - HANDLE_CODE(meas_result_r16.cell_results_r16.results_csi_rs_cell_r16.unpack(bref)); - } - if (meas_result_r16.rs_idx_results_r16_present) { - bool results_ssb_idxes_r16_present; - HANDLE_CODE(bref.unpack(results_ssb_idxes_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16_present, 1)); - bool results_csi_rs_idxes_r16_present; - HANDLE_CODE(bref.unpack(results_csi_rs_idxes_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16_present, 1)); - if (results_ssb_idxes_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16, bref, 1, 64)); - } - if (meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16_present) { - HANDLE_CODE(meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16.unpack(bref)); - } - if (results_csi_rs_idxes_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_r16.rs_idx_results_r16.results_csi_rs_idxes_r16, bref, 1, 64)); - } - if (meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16_present) { - HANDLE_CODE(meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16.unpack(bref)); - } - } - - return SRSASN_SUCCESS; -} -void meas_result_rlf_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("measResult-r16"); - j.start_obj(); - j.write_fieldname("cellResults-r16"); - j.start_obj(); - if (meas_result_r16.cell_results_r16.results_ssb_cell_r16_present) { - j.write_fieldname("resultsSSB-Cell-r16"); - meas_result_r16.cell_results_r16.results_ssb_cell_r16.to_json(j); - } - if (meas_result_r16.cell_results_r16.results_csi_rs_cell_r16_present) { - j.write_fieldname("resultsCSI-RS-Cell-r16"); - meas_result_r16.cell_results_r16.results_csi_rs_cell_r16.to_json(j); - } - j.end_obj(); - if (meas_result_r16.rs_idx_results_r16_present) { - j.write_fieldname("rsIndexResults-r16"); - j.start_obj(); - if (meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16.size() > 0) { - j.start_array("resultsSSB-Indexes-r16"); - for (const auto& e1 : meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16_present) { - j.write_str("ssbRLMConfigBitmap-r16", meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16.to_string()); - } - if (meas_result_r16.rs_idx_results_r16.results_csi_rs_idxes_r16.size() > 0) { - j.start_array("resultsCSI-RS-Indexes-r16"); - for (const auto& e1 : meas_result_r16.rs_idx_results_r16.results_csi_rs_idxes_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16_present) { - j.write_str("csi-rsRLMConfigBitmap-r16", - meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16.to_string()); - } - j.end_obj(); - } - j.end_obj(); - j.end_obj(); -} - -// MeasResultRxTxTimeDiff-r17 ::= SEQUENCE -SRSASN_CODE meas_result_rx_tx_time_diff_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(rx_tx_time_diff_ue_r17_present, 1)); - - if (rx_tx_time_diff_ue_r17_present) { - HANDLE_CODE(rx_tx_time_diff_ue_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_result_rx_tx_time_diff_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(rx_tx_time_diff_ue_r17_present, 1)); - - if (rx_tx_time_diff_ue_r17_present) { - HANDLE_CODE(rx_tx_time_diff_ue_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void meas_result_rx_tx_time_diff_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (rx_tx_time_diff_ue_r17_present) { - j.write_fieldname("rxTxTimeDiff-ue-r17"); - rx_tx_time_diff_ue_r17.to_json(j); - } - j.end_obj(); -} - -// MeasResultSFTD-EUTRA ::= SEQUENCE -SRSASN_CODE meas_result_sftd_eutra_s::pack(bit_ref& bref) const -{ - 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 meas_result_sftd_eutra_s::unpack(cbit_ref& 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 meas_result_sftd_eutra_s::to_json(json_writer& j) const -{ - j.start_obj(); - 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(); -} - -// MeasResultsSL-r16 ::= SEQUENCE -SRSASN_CODE meas_results_sl_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(meas_results_list_sl_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_results_sl_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(meas_results_list_sl_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void meas_results_sl_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("measResultsListSL-r16"); - meas_results_list_sl_r16.to_json(j); - j.end_obj(); -} - -void meas_results_sl_r16_s::meas_results_list_sl_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("measResultNR-SL-r16"); - c.to_json(j); - j.end_obj(); -} -SRSASN_CODE meas_results_sl_r16_s::meas_results_list_sl_r16_c_::pack(bit_ref& bref) const -{ - pack_enum(bref, type()); - HANDLE_CODE(c.pack(bref)); - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_results_sl_r16_s::meas_results_list_sl_r16_c_::unpack(cbit_ref& bref) -{ - types e; - unpack_enum(e, bref); - if (e != type()) { - log_invalid_choice_id(e, "meas_results_sl_r16_s::meas_results_list_sl_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - HANDLE_CODE(c.unpack(bref)); - return SRSASN_SUCCESS; -} - -// OverheatingAssistance ::= SEQUENCE -SRSASN_CODE overheat_assist_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)); - - if (reduced_max_ccs_present) { - HANDLE_CODE(reduced_max_ccs.pack(bref)); - } - if (reduced_max_bw_fr1_present) { - HANDLE_CODE(reduced_max_bw_fr1.pack(bref)); - } - if (reduced_max_bw_fr2_present) { - HANDLE_CODE(reduced_max_bw_fr2.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; -} -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(reduced_max_ccs.unpack(bref)); - } - if (reduced_max_bw_fr1_present) { - HANDLE_CODE(reduced_max_bw_fr1.unpack(bref)); - } - if (reduced_max_bw_fr2_present) { - HANDLE_CODE(reduced_max_bw_fr2.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"); - reduced_max_ccs.to_json(j); - } - if (reduced_max_bw_fr1_present) { - j.write_fieldname("reducedMaxBW-FR1"); - reduced_max_bw_fr1.to_json(j); - } - if (reduced_max_bw_fr2_present) { - j.write_fieldname("reducedMaxBW-FR2"); - reduced_max_bw_fr2.to_json(j); - } - 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(); -} - -// RA-Report-r16 ::= SEQUENCE -SRSASN_CODE ra_report_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(ra_info_common_r16_present, 1)); - - HANDLE_CODE(cell_id_r16.pack(bref)); - if (ra_info_common_r16_present) { - HANDLE_CODE(ra_info_common_r16.pack(bref)); - } - HANDLE_CODE(ra_purpose_r16.pack(bref)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= sp_cell_id_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(sp_cell_id_r17.is_present(), 1)); - if (sp_cell_id_r17.is_present()) { - HANDLE_CODE(sp_cell_id_r17->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ra_report_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(ra_info_common_r16_present, 1)); - - HANDLE_CODE(cell_id_r16.unpack(bref)); - if (ra_info_common_r16_present) { - HANDLE_CODE(ra_info_common_r16.unpack(bref)); - } - HANDLE_CODE(ra_purpose_r16.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); - - unpack_presence_flag(sp_cell_id_r17, bref); - if (sp_cell_id_r17.is_present()) { - HANDLE_CODE(sp_cell_id_r17->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void ra_report_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("cellId-r16"); - cell_id_r16.to_json(j); - if (ra_info_common_r16_present) { - j.write_fieldname("ra-InformationCommon-r16"); - ra_info_common_r16.to_json(j); - } - j.write_str("raPurpose-r16", ra_purpose_r16.to_string()); - if (ext) { - if (sp_cell_id_r17.is_present()) { - j.write_fieldname("spCellID-r17"); - sp_cell_id_r17->to_json(j); - } - } - j.end_obj(); -} - -void ra_report_r16_s::cell_id_r16_c_::destroy_() -{ - switch (type_) { - case types::cell_global_id_r16: - c.destroy(); - break; - case types::pci_arfcn_r16: - c.destroy(); - break; - default: - break; - } -} -void ra_report_r16_s::cell_id_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::cell_global_id_r16: - c.init(); - break; - case types::pci_arfcn_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ra_report_r16_s::cell_id_r16_c_"); - } -} -ra_report_r16_s::cell_id_r16_c_::cell_id_r16_c_(const ra_report_r16_s::cell_id_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::cell_global_id_r16: - c.init(other.c.get()); - break; - case types::pci_arfcn_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ra_report_r16_s::cell_id_r16_c_"); - } -} -ra_report_r16_s::cell_id_r16_c_& -ra_report_r16_s::cell_id_r16_c_::operator=(const ra_report_r16_s::cell_id_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::cell_global_id_r16: - c.set(other.c.get()); - break; - case types::pci_arfcn_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ra_report_r16_s::cell_id_r16_c_"); - } - - return *this; -} -cgi_info_logging_r16_s& ra_report_r16_s::cell_id_r16_c_::set_cell_global_id_r16() -{ - set(types::cell_global_id_r16); - return c.get(); -} -pci_arfcn_nr_r16_s& ra_report_r16_s::cell_id_r16_c_::set_pci_arfcn_r16() -{ - set(types::pci_arfcn_r16); - return c.get(); -} -void ra_report_r16_s::cell_id_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::cell_global_id_r16: - j.write_fieldname("cellGlobalId-r16"); - c.get().to_json(j); - break; - case types::pci_arfcn_r16: - j.write_fieldname("pci-arfcn-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "ra_report_r16_s::cell_id_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE ra_report_r16_s::cell_id_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cell_global_id_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pci_arfcn_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "ra_report_r16_s::cell_id_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ra_report_r16_s::cell_id_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cell_global_id_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pci_arfcn_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "ra_report_r16_s::cell_id_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* ra_report_r16_s::ra_purpose_r16_opts::to_string() const -{ - static const char* names[] = {"accessRelated", - "beamFailureRecovery", - "reconfigurationWithSync", - "ulUnSynchronized", - "schedulingRequestFailure", - "noPUCCHResourceAvailable", - "requestForOtherSI", - "msg3RequestForOtherSI-r17", - "spare8", - "spare7", - "spare6", - "spare5", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 16, value, "ra_report_r16_s::ra_purpose_r16_e_"); -} -uint8_t ra_report_r16_s::ra_purpose_r16_opts::to_number() const -{ - if (value == msg3_request_for_other_si_r17) { - return 3; - } - invalid_enum_number(value, "ra_report_r16_s::ra_purpose_r16_e_"); - return 0; -} - -// 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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.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"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -void rrc_recfg_complete_v1560_ies_s::scg_resp_c_::destroy_() -{ - switch (type_) { - case types::nr_scg_resp: - c.destroy(); - break; - case types::eutra_scg_resp: - c.destroy(); - break; - 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_, "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; -} -dyn_octstring& rrc_recfg_complete_v1560_ies_s::scg_resp_c_::set_nr_scg_resp() -{ - set(types::nr_scg_resp); - return c.get(); -} -dyn_octstring& rrc_recfg_complete_v1560_ies_s::scg_resp_c_::set_eutra_scg_resp() -{ - set(types::eutra_scg_resp); - return c.get(); -} -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 rrc_recfg_complete_v1560_ies_s::scg_resp_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::nr_scg_resp: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::eutra_scg_resp: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::nr_scg_resp: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::eutra_scg_resp: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// RRCResumeComplete-v1640-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_complete_v1640_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_tx_direct_current_two_carrier_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ul_tx_direct_current_two_carrier_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_two_carrier_list_r16, 1, 64)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_complete_v1640_ies_s::unpack(cbit_ref& bref) -{ - bool ul_tx_direct_current_two_carrier_list_r16_present; - HANDLE_CODE(bref.unpack(ul_tx_direct_current_two_carrier_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ul_tx_direct_current_two_carrier_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_two_carrier_list_r16, bref, 1, 64)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_resume_complete_v1640_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ul_tx_direct_current_two_carrier_list_r16.size() > 0) { - j.start_array("uplinkTxDirectCurrentTwoCarrierList-r16"); - for (const auto& e1 : ul_tx_direct_current_two_carrier_list_r16) { - 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(); -} - -// RRCSetupComplete-v1690-IEs ::= SEQUENCE -SRSASN_CODE rrc_setup_complete_v1690_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_rrc_segmentation_r16_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 rrc_setup_complete_v1690_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ul_rrc_segmentation_r16_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 rrc_setup_complete_v1690_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ul_rrc_segmentation_r16_present) { - j.write_str("ul-RRC-Segmentation-r16", "true"); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// SL-Failure-r16 ::= SEQUENCE -SRSASN_CODE sl_fail_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(sl_dest_id_r16.pack(bref)); - HANDLE_CODE(sl_fail_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sl_fail_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(sl_dest_id_r16.unpack(bref)); - HANDLE_CODE(sl_fail_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void sl_fail_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("sl-DestinationIdentity-r16", sl_dest_id_r16.to_string()); - j.write_str("sl-Failure-r16", sl_fail_r16.to_string()); - j.end_obj(); -} - -const char* sl_fail_r16_s::sl_fail_r16_opts::to_string() const -{ - static const char* names[] = { - "rlf", "configFailure", "drxReject-v1710", "spare5", "spare4", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "sl_fail_r16_s::sl_fail_r16_e_"); -} - -// SuccessHO-Report-r17 ::= SEQUENCE -SRSASN_CODE success_ho_report_r17_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_result_neigh_cells_r17_present, 1)); - HANDLE_CODE(bref.pack(location_info_r17_present, 1)); - HANDLE_CODE(bref.pack(time_since_cho_recfg_r17_present, 1)); - HANDLE_CODE(bref.pack(shr_cause_r17_present, 1)); - HANDLE_CODE(bref.pack(ra_info_common_r17_present, 1)); - HANDLE_CODE(bref.pack(up_interruption_time_at_ho_r17_present, 1)); - HANDLE_CODE(bref.pack(c_rnti_r17_present, 1)); - - HANDLE_CODE(bref.pack(source_cell_info_r17.source_cell_meas_r17_present, 1)); - HANDLE_CODE(bref.pack(source_cell_info_r17.rlf_in_source_daps_r17_present, 1)); - HANDLE_CODE(source_cell_info_r17.source_pcell_id_r17.pack(bref)); - if (source_cell_info_r17.source_cell_meas_r17_present) { - HANDLE_CODE(source_cell_info_r17.source_cell_meas_r17.pack(bref)); - } - HANDLE_CODE(bref.pack(target_cell_info_r17.target_cell_meas_r17_present, 1)); - HANDLE_CODE(target_cell_info_r17.target_pcell_id_r17.pack(bref)); - if (target_cell_info_r17.target_cell_meas_r17_present) { - HANDLE_CODE(target_cell_info_r17.target_cell_meas_r17.pack(bref)); - } - if (meas_result_neigh_cells_r17_present) { - HANDLE_CODE(bref.pack(meas_result_neigh_cells_r17.meas_result_list_nr_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_neigh_cells_r17.meas_result_list_eutra_r17.size() > 0, 1)); - if (meas_result_neigh_cells_r17.meas_result_list_nr_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r17.meas_result_list_nr_r17, 1, 8)); - } - if (meas_result_neigh_cells_r17.meas_result_list_eutra_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r17.meas_result_list_eutra_r17, 1, 8)); - } - } - if (location_info_r17_present) { - HANDLE_CODE(location_info_r17.pack(bref)); - } - if (time_since_cho_recfg_r17_present) { - HANDLE_CODE(pack_integer(bref, time_since_cho_recfg_r17, (uint16_t)0u, (uint16_t)1023u)); - } - if (shr_cause_r17_present) { - HANDLE_CODE(shr_cause_r17.pack(bref)); - } - if (ra_info_common_r17_present) { - HANDLE_CODE(ra_info_common_r17.pack(bref)); - } - if (up_interruption_time_at_ho_r17_present) { - HANDLE_CODE(pack_integer(bref, up_interruption_time_at_ho_r17, (uint16_t)0u, (uint16_t)1023u)); - } - if (c_rnti_r17_present) { - HANDLE_CODE(pack_integer(bref, c_rnti_r17, (uint32_t)0u, (uint32_t)65535u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE success_ho_report_r17_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r17_present, 1)); - HANDLE_CODE(bref.unpack(location_info_r17_present, 1)); - HANDLE_CODE(bref.unpack(time_since_cho_recfg_r17_present, 1)); - HANDLE_CODE(bref.unpack(shr_cause_r17_present, 1)); - HANDLE_CODE(bref.unpack(ra_info_common_r17_present, 1)); - HANDLE_CODE(bref.unpack(up_interruption_time_at_ho_r17_present, 1)); - HANDLE_CODE(bref.unpack(c_rnti_r17_present, 1)); - - HANDLE_CODE(bref.unpack(source_cell_info_r17.source_cell_meas_r17_present, 1)); - HANDLE_CODE(bref.unpack(source_cell_info_r17.rlf_in_source_daps_r17_present, 1)); - HANDLE_CODE(source_cell_info_r17.source_pcell_id_r17.unpack(bref)); - if (source_cell_info_r17.source_cell_meas_r17_present) { - HANDLE_CODE(source_cell_info_r17.source_cell_meas_r17.unpack(bref)); - } - HANDLE_CODE(bref.unpack(target_cell_info_r17.target_cell_meas_r17_present, 1)); - HANDLE_CODE(target_cell_info_r17.target_pcell_id_r17.unpack(bref)); - if (target_cell_info_r17.target_cell_meas_r17_present) { - HANDLE_CODE(target_cell_info_r17.target_cell_meas_r17.unpack(bref)); - } - if (meas_result_neigh_cells_r17_present) { - bool meas_result_list_nr_r17_present; - HANDLE_CODE(bref.unpack(meas_result_list_nr_r17_present, 1)); - bool meas_result_list_eutra_r17_present; - HANDLE_CODE(bref.unpack(meas_result_list_eutra_r17_present, 1)); - if (meas_result_list_nr_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r17.meas_result_list_nr_r17, bref, 1, 8)); - } - if (meas_result_list_eutra_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r17.meas_result_list_eutra_r17, bref, 1, 8)); - } - } - if (location_info_r17_present) { - HANDLE_CODE(location_info_r17.unpack(bref)); - } - if (time_since_cho_recfg_r17_present) { - HANDLE_CODE(unpack_integer(time_since_cho_recfg_r17, bref, (uint16_t)0u, (uint16_t)1023u)); - } - if (shr_cause_r17_present) { - HANDLE_CODE(shr_cause_r17.unpack(bref)); - } - if (ra_info_common_r17_present) { - HANDLE_CODE(ra_info_common_r17.unpack(bref)); - } - if (up_interruption_time_at_ho_r17_present) { - HANDLE_CODE(unpack_integer(up_interruption_time_at_ho_r17, bref, (uint16_t)0u, (uint16_t)1023u)); - } - if (c_rnti_r17_present) { - HANDLE_CODE(unpack_integer(c_rnti_r17, bref, (uint32_t)0u, (uint32_t)65535u)); - } - - return SRSASN_SUCCESS; -} -void success_ho_report_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("sourceCellInfo-r17"); - j.start_obj(); - j.write_fieldname("sourcePCellId-r17"); - source_cell_info_r17.source_pcell_id_r17.to_json(j); - if (source_cell_info_r17.source_cell_meas_r17_present) { - j.write_fieldname("sourceCellMeas-r17"); - source_cell_info_r17.source_cell_meas_r17.to_json(j); - } - if (source_cell_info_r17.rlf_in_source_daps_r17_present) { - j.write_str("rlf-InSourceDAPS-r17", "true"); - } - j.end_obj(); - j.write_fieldname("targetCellInfo-r17"); - j.start_obj(); - j.write_fieldname("targetPCellId-r17"); - target_cell_info_r17.target_pcell_id_r17.to_json(j); - if (target_cell_info_r17.target_cell_meas_r17_present) { - j.write_fieldname("targetCellMeas-r17"); - target_cell_info_r17.target_cell_meas_r17.to_json(j); - } - j.end_obj(); - if (meas_result_neigh_cells_r17_present) { - j.write_fieldname("measResultNeighCells-r17"); - j.start_obj(); - if (meas_result_neigh_cells_r17.meas_result_list_nr_r17.size() > 0) { - j.start_array("measResultListNR-r17"); - for (const auto& e1 : meas_result_neigh_cells_r17.meas_result_list_nr_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_result_neigh_cells_r17.meas_result_list_eutra_r17.size() > 0) { - j.start_array("measResultListEUTRA-r17"); - for (const auto& e1 : meas_result_neigh_cells_r17.meas_result_list_eutra_r17) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); - } - if (location_info_r17_present) { - j.write_fieldname("locationInfo-r17"); - location_info_r17.to_json(j); - } - if (time_since_cho_recfg_r17_present) { - j.write_int("timeSinceCHO-Reconfig-r17", time_since_cho_recfg_r17); - } - if (shr_cause_r17_present) { - j.write_fieldname("shr-Cause-r17"); - shr_cause_r17.to_json(j); - } - if (ra_info_common_r17_present) { - j.write_fieldname("ra-InformationCommon-r17"); - ra_info_common_r17.to_json(j); - } - if (up_interruption_time_at_ho_r17_present) { - j.write_int("upInterruptionTimeAtHO-r17", up_interruption_time_at_ho_r17); - } - if (c_rnti_r17_present) { - j.write_int("c-RNTI-r17", c_rnti_r17); - } - j.end_obj(); -} - -// UE-CapabilityRAT-Container ::= SEQUENCE -SRSASN_CODE ue_cap_rat_container_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(rat_type.pack(bref)); - HANDLE_CODE(ue_cap_rat_container.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_cap_rat_container_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(rat_type.unpack(bref)); - HANDLE_CODE(ue_cap_rat_container.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ue_cap_rat_container_s::to_json(json_writer& j) const -{ - 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(); -} - -// UE-TxTEG-Association-r17 ::= SEQUENCE -SRSASN_CODE ue_tx_teg_assoc_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(serv_cell_id_r17_present, 1)); - - HANDLE_CODE(pack_integer(bref, ue_tx_teg_id_r17, (uint8_t)0u, (uint8_t)7u)); - HANDLE_CODE(nr_time_stamp_r17.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, associated_srs_pos_res_id_list_r17, 1, 64, integer_packer(0, 63))); - if (serv_cell_id_r17_present) { - HANDLE_CODE(pack_integer(bref, serv_cell_id_r17, (uint8_t)0u, (uint8_t)31u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_tx_teg_assoc_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(serv_cell_id_r17_present, 1)); - - HANDLE_CODE(unpack_integer(ue_tx_teg_id_r17, bref, (uint8_t)0u, (uint8_t)7u)); - HANDLE_CODE(nr_time_stamp_r17.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(associated_srs_pos_res_id_list_r17, bref, 1, 64, integer_packer(0, 63))); - if (serv_cell_id_r17_present) { - HANDLE_CODE(unpack_integer(serv_cell_id_r17, bref, (uint8_t)0u, (uint8_t)31u)); - } - - return SRSASN_SUCCESS; -} -void ue_tx_teg_assoc_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("ue-TxTEG-ID-r17", ue_tx_teg_id_r17); - j.write_fieldname("nr-TimeStamp-r17"); - nr_time_stamp_r17.to_json(j); - j.start_array("associatedSRS-PosResourceIdList-r17"); - for (const auto& e1 : associated_srs_pos_res_id_list_r17) { - j.write_int(e1); - } - j.end_array(); - if (serv_cell_id_r17_present) { - j.write_int("servCellId-r17", serv_cell_id_r17); - } - j.end_obj(); -} - -// UEAssistanceInformation-v1610-IEs ::= SEQUENCE -SRSASN_CODE ue_assist_info_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(idc_assist_r16_present, 1)); - HANDLE_CODE(bref.pack(drx_pref_r16_present, 1)); - HANDLE_CODE(bref.pack(max_bw_pref_r16_present, 1)); - HANDLE_CODE(bref.pack(max_cc_pref_r16_present, 1)); - HANDLE_CODE(bref.pack(max_mimo_layer_pref_r16_present, 1)); - HANDLE_CODE(bref.pack(min_sched_offset_pref_r16_present, 1)); - HANDLE_CODE(bref.pack(release_pref_r16_present, 1)); - HANDLE_CODE(bref.pack(sl_ue_assist_info_nr_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(ref_time_info_pref_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (idc_assist_r16_present) { - HANDLE_CODE(idc_assist_r16.pack(bref)); - } - if (drx_pref_r16_present) { - HANDLE_CODE(drx_pref_r16.pack(bref)); - } - if (max_bw_pref_r16_present) { - HANDLE_CODE(max_bw_pref_r16.pack(bref)); - } - if (max_cc_pref_r16_present) { - HANDLE_CODE(max_cc_pref_r16.pack(bref)); - } - if (max_mimo_layer_pref_r16_present) { - HANDLE_CODE(max_mimo_layer_pref_r16.pack(bref)); - } - if (min_sched_offset_pref_r16_present) { - HANDLE_CODE(min_sched_offset_pref_r16.pack(bref)); - } - if (release_pref_r16_present) { - HANDLE_CODE(release_pref_r16.pack(bref)); - } - if (sl_ue_assist_info_nr_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_ue_assist_info_nr_r16, 1, 8)); - } - if (ref_time_info_pref_r16_present) { - HANDLE_CODE(bref.pack(ref_time_info_pref_r16, 1)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_assist_info_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(idc_assist_r16_present, 1)); - HANDLE_CODE(bref.unpack(drx_pref_r16_present, 1)); - HANDLE_CODE(bref.unpack(max_bw_pref_r16_present, 1)); - HANDLE_CODE(bref.unpack(max_cc_pref_r16_present, 1)); - HANDLE_CODE(bref.unpack(max_mimo_layer_pref_r16_present, 1)); - HANDLE_CODE(bref.unpack(min_sched_offset_pref_r16_present, 1)); - HANDLE_CODE(bref.unpack(release_pref_r16_present, 1)); - bool sl_ue_assist_info_nr_r16_present; - HANDLE_CODE(bref.unpack(sl_ue_assist_info_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(ref_time_info_pref_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (idc_assist_r16_present) { - HANDLE_CODE(idc_assist_r16.unpack(bref)); - } - if (drx_pref_r16_present) { - HANDLE_CODE(drx_pref_r16.unpack(bref)); - } - if (max_bw_pref_r16_present) { - HANDLE_CODE(max_bw_pref_r16.unpack(bref)); - } - if (max_cc_pref_r16_present) { - HANDLE_CODE(max_cc_pref_r16.unpack(bref)); - } - if (max_mimo_layer_pref_r16_present) { - HANDLE_CODE(max_mimo_layer_pref_r16.unpack(bref)); - } - if (min_sched_offset_pref_r16_present) { - HANDLE_CODE(min_sched_offset_pref_r16.unpack(bref)); - } - if (release_pref_r16_present) { - HANDLE_CODE(release_pref_r16.unpack(bref)); - } - if (sl_ue_assist_info_nr_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_ue_assist_info_nr_r16, bref, 1, 8)); - } - if (ref_time_info_pref_r16_present) { - HANDLE_CODE(bref.unpack(ref_time_info_pref_r16, 1)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_assist_info_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (idc_assist_r16_present) { - j.write_fieldname("idc-Assistance-r16"); - idc_assist_r16.to_json(j); - } - if (drx_pref_r16_present) { - j.write_fieldname("drx-Preference-r16"); - drx_pref_r16.to_json(j); - } - if (max_bw_pref_r16_present) { - j.write_fieldname("maxBW-Preference-r16"); - max_bw_pref_r16.to_json(j); - } - if (max_cc_pref_r16_present) { - j.write_fieldname("maxCC-Preference-r16"); - max_cc_pref_r16.to_json(j); - } - if (max_mimo_layer_pref_r16_present) { - j.write_fieldname("maxMIMO-LayerPreference-r16"); - max_mimo_layer_pref_r16.to_json(j); - } - if (min_sched_offset_pref_r16_present) { - j.write_fieldname("minSchedulingOffsetPreference-r16"); - min_sched_offset_pref_r16.to_json(j); - } - if (release_pref_r16_present) { - j.write_fieldname("releasePreference-r16"); - release_pref_r16.to_json(j); - } - if (sl_ue_assist_info_nr_r16.size() > 0) { - j.start_array("sl-UE-AssistanceInformationNR-r16"); - for (const auto& e1 : sl_ue_assist_info_nr_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (ref_time_info_pref_r16_present) { - j.write_bool("referenceTimeInfoPreference-r16", ref_time_info_pref_r16); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// 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(c.unpack(bref)); - return SRSASN_SUCCESS; -} - -const char* delay_budget_report_c::type1_opts::to_string() const -{ - static const char* names[] = {"msMinus1280", - "msMinus640", - "msMinus320", - "msMinus160", - "msMinus80", - "msMinus60", - "msMinus40", - "msMinus20", - "ms0", - "ms20", - "ms40", - "ms60", - "ms80", - "ms160", - "ms320", - "ms640", - "ms1280"}; - return convert_enum_idx(names, 17, value, "delay_budget_report_c::type1_e_"); -} -int16_t delay_budget_report_c::type1_opts::to_number() const -{ - static const int16_t numbers[] = { - -1280, -640, -320, -160, -80, -60, -40, -20, 0, 20, 40, 60, 80, 160, 320, 640, 1280}; - return map_enum_number(numbers, 17, value, "delay_budget_report_c::type1_e_"); -} - -// 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; -} -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(); - 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(); -} - -const char* fail_info_rlc_bearer_s::fail_type_opts::to_string() const -{ - static const char* names[] = {"rlc-failure", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "fail_info_rlc_bearer_s::fail_type_e_"); -} - -// FailureInformation-v1610-IEs ::= SEQUENCE -SRSASN_CODE fail_info_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(fail_info_daps_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (fail_info_daps_r16_present) { - HANDLE_CODE(fail_info_daps_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE fail_info_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(fail_info_daps_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (fail_info_daps_r16_present) { - HANDLE_CODE(fail_info_daps_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void fail_info_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (fail_info_daps_r16_present) { - j.write_fieldname("failureInfoDAPS-r16"); - fail_info_daps_r16.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// FailureReportMCG-r16 ::= SEQUENCE -SRSASN_CODE fail_report_mcg_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(fail_type_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_result_freq_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_freq_list_eutra_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_scg_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_scg_eutra_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_freq_list_utra_fdd_r16.size() > 0, 1)); - - if (fail_type_r16_present) { - HANDLE_CODE(fail_type_r16.pack(bref)); - } - if (meas_result_freq_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list_r16, 1, 8)); - } - if (meas_result_freq_list_eutra_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list_eutra_r16, 1, 8)); - } - if (meas_result_scg_r16.size() > 0) { - HANDLE_CODE(meas_result_scg_r16.pack(bref)); - } - if (meas_result_scg_eutra_r16.size() > 0) { - HANDLE_CODE(meas_result_scg_eutra_r16.pack(bref)); - } - if (meas_result_freq_list_utra_fdd_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list_utra_fdd_r16, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE fail_report_mcg_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(fail_type_r16_present, 1)); - bool meas_result_freq_list_r16_present; - HANDLE_CODE(bref.unpack(meas_result_freq_list_r16_present, 1)); - bool meas_result_freq_list_eutra_r16_present; - HANDLE_CODE(bref.unpack(meas_result_freq_list_eutra_r16_present, 1)); - bool meas_result_scg_r16_present; - HANDLE_CODE(bref.unpack(meas_result_scg_r16_present, 1)); - bool meas_result_scg_eutra_r16_present; - HANDLE_CODE(bref.unpack(meas_result_scg_eutra_r16_present, 1)); - bool meas_result_freq_list_utra_fdd_r16_present; - HANDLE_CODE(bref.unpack(meas_result_freq_list_utra_fdd_r16_present, 1)); - - if (fail_type_r16_present) { - HANDLE_CODE(fail_type_r16.unpack(bref)); - } - if (meas_result_freq_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_freq_list_r16, bref, 1, 8)); - } - if (meas_result_freq_list_eutra_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_freq_list_eutra_r16, bref, 1, 8)); - } - if (meas_result_scg_r16_present) { - HANDLE_CODE(meas_result_scg_r16.unpack(bref)); - } - if (meas_result_scg_eutra_r16_present) { - HANDLE_CODE(meas_result_scg_eutra_r16.unpack(bref)); - } - if (meas_result_freq_list_utra_fdd_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_freq_list_utra_fdd_r16, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -void fail_report_mcg_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (fail_type_r16_present) { - j.write_str("failureType-r16", fail_type_r16.to_string()); - } - if (meas_result_freq_list_r16.size() > 0) { - j.start_array("measResultFreqList-r16"); - for (const auto& e1 : meas_result_freq_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_result_freq_list_eutra_r16.size() > 0) { - j.start_array("measResultFreqListEUTRA-r16"); - for (const auto& e1 : meas_result_freq_list_eutra_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_result_scg_r16.size() > 0) { - j.write_str("measResultSCG-r16", meas_result_scg_r16.to_string()); - } - if (meas_result_scg_eutra_r16.size() > 0) { - j.write_str("measResultSCG-EUTRA-r16", meas_result_scg_eutra_r16.to_string()); - } - if (meas_result_freq_list_utra_fdd_r16.size() > 0) { - j.start_array("measResultFreqListUTRA-FDD-r16"); - for (const auto& e1 : meas_result_freq_list_utra_fdd_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -const char* fail_report_mcg_r16_s::fail_type_r16_opts::to_string() const -{ - static const char* names[] = {"t310-Expiry", - "randomAccessProblem", - "rlc-MaxNumRetx", - "t312-Expiry-r16", - "lbt-Failure-r16", - "beamFailureRecoveryFailure-r16", - "bh-RLF-r16", - "spare1"}; - return convert_enum_idx(names, 8, value, "fail_report_mcg_r16_s::fail_type_r16_e_"); -} -uint16_t fail_report_mcg_r16_s::fail_type_r16_opts::to_number() const -{ - switch (value) { - case t310_expiry: - return 310; - case t312_expiry_r16: - return 312; - default: - invalid_enum_number(value, "fail_report_mcg_r16_s::fail_type_r16_e_"); - } - return 0; -} - -// FailureReportSCG ::= SEQUENCE -SRSASN_CODE fail_report_scg_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_result_freq_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_scg_fail.size() > 0, 1)); - - HANDLE_CODE(fail_type.pack(bref)); - if (meas_result_freq_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list, 1, 8)); - } - if (meas_result_scg_fail.size() > 0) { - HANDLE_CODE(meas_result_scg_fail.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= location_info_r16.is_present(); - group_flags[0] |= fail_type_v1610_present; - group_flags[1] |= prev_pscell_id_r17.is_present(); - group_flags[1] |= failed_pscell_id_r17.is_present(); - group_flags[1] |= time_scg_fail_r17_present; - group_flags[1] |= per_ra_info_list_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(location_info_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(fail_type_v1610_present, 1)); - if (location_info_r16.is_present()) { - HANDLE_CODE(location_info_r16->pack(bref)); - } - if (fail_type_v1610_present) { - HANDLE_CODE(fail_type_v1610.pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(prev_pscell_id_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(failed_pscell_id_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(time_scg_fail_r17_present, 1)); - HANDLE_CODE(bref.pack(per_ra_info_list_r17.is_present(), 1)); - if (prev_pscell_id_r17.is_present()) { - HANDLE_CODE(pack_integer(bref, prev_pscell_id_r17->pci_r17, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(pack_integer(bref, prev_pscell_id_r17->carrier_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); - } - if (failed_pscell_id_r17.is_present()) { - HANDLE_CODE(pack_integer(bref, failed_pscell_id_r17->pci_r17, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(pack_integer(bref, failed_pscell_id_r17->carrier_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); - } - if (time_scg_fail_r17_present) { - HANDLE_CODE(pack_integer(bref, time_scg_fail_r17, (uint16_t)0u, (uint16_t)1023u)); - } - if (per_ra_info_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *per_ra_info_list_r17, 1, 200)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE fail_report_scg_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool meas_result_freq_list_present; - HANDLE_CODE(bref.unpack(meas_result_freq_list_present, 1)); - bool meas_result_scg_fail_present; - HANDLE_CODE(bref.unpack(meas_result_scg_fail_present, 1)); - - 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 (meas_result_scg_fail_present) { - HANDLE_CODE(meas_result_scg_fail.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); - - unpack_presence_flag(location_info_r16, bref); - HANDLE_CODE(bref.unpack(fail_type_v1610_present, 1)); - if (location_info_r16.is_present()) { - HANDLE_CODE(location_info_r16->unpack(bref)); - } - if (fail_type_v1610_present) { - HANDLE_CODE(fail_type_v1610.unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(prev_pscell_id_r17, bref); - unpack_presence_flag(failed_pscell_id_r17, bref); - HANDLE_CODE(bref.unpack(time_scg_fail_r17_present, 1)); - unpack_presence_flag(per_ra_info_list_r17, bref); - if (prev_pscell_id_r17.is_present()) { - HANDLE_CODE(unpack_integer(prev_pscell_id_r17->pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(unpack_integer(prev_pscell_id_r17->carrier_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); - } - if (failed_pscell_id_r17.is_present()) { - HANDLE_CODE(unpack_integer(failed_pscell_id_r17->pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); - HANDLE_CODE(unpack_integer(failed_pscell_id_r17->carrier_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); - } - if (time_scg_fail_r17_present) { - HANDLE_CODE(unpack_integer(time_scg_fail_r17, bref, (uint16_t)0u, (uint16_t)1023u)); - } - if (per_ra_info_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*per_ra_info_list_r17, bref, 1, 200)); - } - } - } - return SRSASN_SUCCESS; -} -void fail_report_scg_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("failureType", fail_type.to_string()); - if (meas_result_freq_list.size() > 0) { - j.start_array("measResultFreqList"); - for (const auto& e1 : meas_result_freq_list) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_result_scg_fail.size() > 0) { - j.write_str("measResultSCG-Failure", meas_result_scg_fail.to_string()); - } - if (ext) { - if (location_info_r16.is_present()) { - j.write_fieldname("locationInfo-r16"); - location_info_r16->to_json(j); - } - if (fail_type_v1610_present) { - j.write_str("failureType-v1610", fail_type_v1610.to_string()); - } - if (prev_pscell_id_r17.is_present()) { - j.write_fieldname("previousPSCellId-r17"); - j.start_obj(); - j.write_int("physCellId-r17", prev_pscell_id_r17->pci_r17); - j.write_int("carrierFreq-r17", prev_pscell_id_r17->carrier_freq_r17); - j.end_obj(); - } - if (failed_pscell_id_r17.is_present()) { - j.write_fieldname("failedPSCellId-r17"); - j.start_obj(); - j.write_int("physCellId-r17", failed_pscell_id_r17->pci_r17); - j.write_int("carrierFreq-r17", failed_pscell_id_r17->carrier_freq_r17); - j.end_obj(); - } - if (time_scg_fail_r17_present) { - j.write_int("timeSCGFailure-r17", time_scg_fail_r17); - } - if (per_ra_info_list_r17.is_present()) { - j.start_array("perRAInfoList-r17"); - for (const auto& e1 : *per_ra_info_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - } - j.end_obj(); -} - -const char* fail_report_scg_s::fail_type_opts::to_string() const -{ - static const char* names[] = {"t310-Expiry", - "randomAccessProblem", - "rlc-MaxNumRetx", - "synchReconfigFailureSCG", - "scg-ReconfigFailure", - "srb3-IntegrityFailure", - "other-r16", - "spare1"}; - return convert_enum_idx(names, 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; -} - -const char* fail_report_scg_s::fail_type_v1610_opts::to_string() const -{ - static const char* names[] = {"scg-lbtFailure-r16", - "beamFailureRecoveryFailure-r16", - "t312-Expiry-r16", - "bh-RLF-r16", - "beamFailure-r17", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 8, value, "fail_report_scg_s::fail_type_v1610_e_"); -} -uint16_t fail_report_scg_s::fail_type_v1610_opts::to_number() const -{ - if (value == t312_expiry_r16) { - return 312; - } - invalid_enum_number(value, "fail_report_scg_s::fail_type_v1610_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(meas_result_freq_list_mrdc.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_scg_fail_mrdc.size() > 0, 1)); - - HANDLE_CODE(fail_type.pack(bref)); - if (meas_result_freq_list_mrdc.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list_mrdc, 1, 8)); - } - if (meas_result_scg_fail_mrdc.size() > 0) { - HANDLE_CODE(meas_result_scg_fail_mrdc.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= location_info_r16.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(location_info_r16.is_present(), 1)); - if (location_info_r16.is_present()) { - HANDLE_CODE(location_info_r16->pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE fail_report_scg_eutra_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - bool meas_result_freq_list_mrdc_present; - HANDLE_CODE(bref.unpack(meas_result_freq_list_mrdc_present, 1)); - bool meas_result_scg_fail_mrdc_present; - HANDLE_CODE(bref.unpack(meas_result_scg_fail_mrdc_present, 1)); - - 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 (meas_result_scg_fail_mrdc_present) { - HANDLE_CODE(meas_result_scg_fail_mrdc.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); - - unpack_presence_flag(location_info_r16, bref); - if (location_info_r16.is_present()) { - HANDLE_CODE(location_info_r16->unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void fail_report_scg_eutra_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("failureType", fail_type.to_string()); - if (meas_result_freq_list_mrdc.size() > 0) { - j.start_array("measResultFreqListMRDC"); - for (const auto& e1 : meas_result_freq_list_mrdc) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_result_scg_fail_mrdc.size() > 0) { - j.write_str("measResultSCG-FailureMRDC", meas_result_scg_fail_mrdc.to_string()); - } - if (ext) { - if (location_info_r16.is_present()) { - j.write_fieldname("locationInfo-r16"); - location_info_r16->to_json(j); - } - } - j.end_obj(); -} - -const char* fail_report_scg_eutra_s::fail_type_opts::to_string() const -{ - static const char* names[] = {"t313-Expiry", - "randomAccessProblem", - "rlc-MaxNumRetx", - "scg-ChangeFailure", - "spare4", - "spare3", - "spare2", - "spare1"}; - return convert_enum_idx(names, 8, value, "fail_report_scg_eutra_s::fail_type_e_"); -} -uint16_t fail_report_scg_eutra_s::fail_type_opts::to_number() const -{ - static const uint16_t numbers[] = {313}; - return map_enum_number(numbers, 1, value, "fail_report_scg_eutra_s::fail_type_e_"); -} - -// IAB-IP-AddressAndTraffic-r16 ::= SEQUENCE -SRSASN_CODE iab_ip_address_and_traffic_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(all_traffic_iab_ip_address_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(f1_c_traffic_ip_address_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(f1_u_traffic_ip_address_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_f1_traffic_ip_address_r16.size() > 0, 1)); - - if (all_traffic_iab_ip_address_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, all_traffic_iab_ip_address_r16, 1, 8)); - } - if (f1_c_traffic_ip_address_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, f1_c_traffic_ip_address_r16, 1, 8)); - } - if (f1_u_traffic_ip_address_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, f1_u_traffic_ip_address_r16, 1, 8)); - } - if (non_f1_traffic_ip_address_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, non_f1_traffic_ip_address_r16, 1, 8)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE iab_ip_address_and_traffic_r16_s::unpack(cbit_ref& bref) -{ - bool all_traffic_iab_ip_address_r16_present; - HANDLE_CODE(bref.unpack(all_traffic_iab_ip_address_r16_present, 1)); - bool f1_c_traffic_ip_address_r16_present; - HANDLE_CODE(bref.unpack(f1_c_traffic_ip_address_r16_present, 1)); - bool f1_u_traffic_ip_address_r16_present; - HANDLE_CODE(bref.unpack(f1_u_traffic_ip_address_r16_present, 1)); - bool non_f1_traffic_ip_address_r16_present; - HANDLE_CODE(bref.unpack(non_f1_traffic_ip_address_r16_present, 1)); - - if (all_traffic_iab_ip_address_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(all_traffic_iab_ip_address_r16, bref, 1, 8)); - } - if (f1_c_traffic_ip_address_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(f1_c_traffic_ip_address_r16, bref, 1, 8)); - } - if (f1_u_traffic_ip_address_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(f1_u_traffic_ip_address_r16, bref, 1, 8)); - } - if (non_f1_traffic_ip_address_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(non_f1_traffic_ip_address_r16, bref, 1, 8)); - } - - return SRSASN_SUCCESS; -} -void iab_ip_address_and_traffic_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (all_traffic_iab_ip_address_r16.size() > 0) { - j.start_array("all-Traffic-IAB-IP-Address-r16"); - for (const auto& e1 : all_traffic_iab_ip_address_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (f1_c_traffic_ip_address_r16.size() > 0) { - j.start_array("f1-C-Traffic-IP-Address-r16"); - for (const auto& e1 : f1_c_traffic_ip_address_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (f1_u_traffic_ip_address_r16.size() > 0) { - j.start_array("f1-U-Traffic-IP-Address-r16"); - for (const auto& e1 : f1_u_traffic_ip_address_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (non_f1_traffic_ip_address_r16.size() > 0) { - j.start_array("non-F1-Traffic-IP-Address-r16"); - for (const auto& e1 : non_f1_traffic_ip_address_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); -} - -// IAB-IP-AddressNumReq-r16 ::= SEQUENCE -SRSASN_CODE iab_ip_address_num_req_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(all_traffic_num_req_r16_present, 1)); - HANDLE_CODE(bref.pack(f1_c_traffic_num_req_r16_present, 1)); - HANDLE_CODE(bref.pack(f1_u_traffic_num_req_r16_present, 1)); - HANDLE_CODE(bref.pack(non_f1_traffic_num_req_r16_present, 1)); - - if (all_traffic_num_req_r16_present) { - HANDLE_CODE(pack_integer(bref, all_traffic_num_req_r16, (uint8_t)1u, (uint8_t)8u)); - } - if (f1_c_traffic_num_req_r16_present) { - HANDLE_CODE(pack_integer(bref, f1_c_traffic_num_req_r16, (uint8_t)1u, (uint8_t)8u)); - } - if (f1_u_traffic_num_req_r16_present) { - HANDLE_CODE(pack_integer(bref, f1_u_traffic_num_req_r16, (uint8_t)1u, (uint8_t)8u)); - } - if (non_f1_traffic_num_req_r16_present) { - HANDLE_CODE(pack_integer(bref, non_f1_traffic_num_req_r16, (uint8_t)1u, (uint8_t)8u)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE iab_ip_address_num_req_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(all_traffic_num_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(f1_c_traffic_num_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(f1_u_traffic_num_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_f1_traffic_num_req_r16_present, 1)); - - if (all_traffic_num_req_r16_present) { - HANDLE_CODE(unpack_integer(all_traffic_num_req_r16, bref, (uint8_t)1u, (uint8_t)8u)); - } - if (f1_c_traffic_num_req_r16_present) { - HANDLE_CODE(unpack_integer(f1_c_traffic_num_req_r16, bref, (uint8_t)1u, (uint8_t)8u)); - } - if (f1_u_traffic_num_req_r16_present) { - HANDLE_CODE(unpack_integer(f1_u_traffic_num_req_r16, bref, (uint8_t)1u, (uint8_t)8u)); - } - if (non_f1_traffic_num_req_r16_present) { - HANDLE_CODE(unpack_integer(non_f1_traffic_num_req_r16, bref, (uint8_t)1u, (uint8_t)8u)); - } - - return SRSASN_SUCCESS; -} -void iab_ip_address_num_req_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (all_traffic_num_req_r16_present) { - j.write_int("all-Traffic-NumReq-r16", all_traffic_num_req_r16); - } - if (f1_c_traffic_num_req_r16_present) { - j.write_int("f1-C-Traffic-NumReq-r16", f1_c_traffic_num_req_r16); - } - if (f1_u_traffic_num_req_r16_present) { - j.write_int("f1-U-Traffic-NumReq-r16", f1_u_traffic_num_req_r16); - } - if (non_f1_traffic_num_req_r16_present) { - j.write_int("non-F1-Traffic-NumReq-r16", non_f1_traffic_num_req_r16); - } - j.end_obj(); -} - -// IAB-IP-AddressPrefixReq-r16 ::= SEQUENCE -SRSASN_CODE iab_ip_address_prefix_req_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(all_traffic_prefix_req_r16_present, 1)); - HANDLE_CODE(bref.pack(f1_c_traffic_prefix_req_r16_present, 1)); - HANDLE_CODE(bref.pack(f1_u_traffic_prefix_req_r16_present, 1)); - HANDLE_CODE(bref.pack(non_f1_traffic_prefix_req_r16_present, 1)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE iab_ip_address_prefix_req_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(all_traffic_prefix_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(f1_c_traffic_prefix_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(f1_u_traffic_prefix_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_f1_traffic_prefix_req_r16_present, 1)); - - return SRSASN_SUCCESS; -} -void iab_ip_address_prefix_req_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (all_traffic_prefix_req_r16_present) { - j.write_str("all-Traffic-PrefixReq-r16", "true"); - } - if (f1_c_traffic_prefix_req_r16_present) { - j.write_str("f1-C-Traffic-PrefixReq-r16", "true"); - } - if (f1_u_traffic_prefix_req_r16_present) { - j.write_str("f1-U-Traffic-PrefixReq-r16", "true"); - } - if (non_f1_traffic_prefix_req_r16_present) { - j.write_str("non-F1-Traffic-PrefixReq-r16", "true"); - } - j.end_obj(); -} - -// IAB-IP-PrefixAndTraffic-r16 ::= SEQUENCE -SRSASN_CODE iab_ip_prefix_and_traffic_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(all_traffic_iab_ip_address_r16_present, 1)); - HANDLE_CODE(bref.pack(f1_c_traffic_ip_address_r16_present, 1)); - HANDLE_CODE(bref.pack(f1_u_traffic_ip_address_r16_present, 1)); - HANDLE_CODE(bref.pack(non_f1_traffic_ip_address_r16_present, 1)); - - if (all_traffic_iab_ip_address_r16_present) { - HANDLE_CODE(all_traffic_iab_ip_address_r16.pack(bref)); - } - if (f1_c_traffic_ip_address_r16_present) { - HANDLE_CODE(f1_c_traffic_ip_address_r16.pack(bref)); - } - if (f1_u_traffic_ip_address_r16_present) { - HANDLE_CODE(f1_u_traffic_ip_address_r16.pack(bref)); - } - if (non_f1_traffic_ip_address_r16_present) { - HANDLE_CODE(non_f1_traffic_ip_address_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE iab_ip_prefix_and_traffic_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(all_traffic_iab_ip_address_r16_present, 1)); - HANDLE_CODE(bref.unpack(f1_c_traffic_ip_address_r16_present, 1)); - HANDLE_CODE(bref.unpack(f1_u_traffic_ip_address_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_f1_traffic_ip_address_r16_present, 1)); - - if (all_traffic_iab_ip_address_r16_present) { - HANDLE_CODE(all_traffic_iab_ip_address_r16.unpack(bref)); - } - if (f1_c_traffic_ip_address_r16_present) { - HANDLE_CODE(f1_c_traffic_ip_address_r16.unpack(bref)); - } - if (f1_u_traffic_ip_address_r16_present) { - HANDLE_CODE(f1_u_traffic_ip_address_r16.unpack(bref)); - } - if (non_f1_traffic_ip_address_r16_present) { - HANDLE_CODE(non_f1_traffic_ip_address_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void iab_ip_prefix_and_traffic_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (all_traffic_iab_ip_address_r16_present) { - j.write_fieldname("all-Traffic-IAB-IP-Address-r16"); - all_traffic_iab_ip_address_r16.to_json(j); - } - if (f1_c_traffic_ip_address_r16_present) { - j.write_fieldname("f1-C-Traffic-IP-Address-r16"); - f1_c_traffic_ip_address_r16.to_json(j); - } - if (f1_u_traffic_ip_address_r16_present) { - j.write_fieldname("f1-U-Traffic-IP-Address-r16"); - f1_u_traffic_ip_address_r16.to_json(j); - } - if (non_f1_traffic_ip_address_r16_present) { - j.write_fieldname("non-F1-Traffic-IP-Address-r16"); - non_f1_traffic_ip_address_r16.to_json(j); - } - j.end_obj(); -} - -// LocationMeasurementInfo ::= CHOICE -void location_meas_info_c::destroy_() -{ - switch (type_) { - case types::eutra_rstd: - c.destroy(); - break; - case types::nr_prs_meas_r16: - c.destroy(); - break; - default: - break; - } -} -void location_meas_info_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::eutra_rstd: - c.init(); - break; - case types::eutra_fine_timing_detection: - break; - case types::nr_prs_meas_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "location_meas_info_c"); - } -} -location_meas_info_c::location_meas_info_c(const location_meas_info_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::eutra_rstd: - c.init(other.c.get()); - break; - case types::eutra_fine_timing_detection: - break; - case types::nr_prs_meas_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "location_meas_info_c"); - } -} -location_meas_info_c& location_meas_info_c::operator=(const location_meas_info_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::eutra_rstd: - c.set(other.c.get()); - break; - case types::eutra_fine_timing_detection: - break; - case types::nr_prs_meas_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "location_meas_info_c"); - } - - return *this; -} -eutra_rstd_info_list_l& location_meas_info_c::set_eutra_rstd() -{ - set(types::eutra_rstd); - return c.get(); -} -void location_meas_info_c::set_eutra_fine_timing_detection() -{ - set(types::eutra_fine_timing_detection); -} -nr_prs_meas_info_list_r16_l& location_meas_info_c::set_nr_prs_meas_r16() -{ - set(types::nr_prs_meas_r16); - return c.get(); -} -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.get()) { - e1.to_json(j); - } - j.end_array(); - break; - case types::eutra_fine_timing_detection: - break; - case types::nr_prs_meas_r16: - j.start_array("nr-PRS-Measurement-r16"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); - 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.get(), 1, 3)); - break; - case types::eutra_fine_timing_detection: - break; - case types::nr_prs_meas_r16: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4)); - } 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.get(), bref, 1, 3)); - break; - case types::eutra_fine_timing_detection: - break; - case types::nr_prs_meas_r16: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 4)); - } break; - default: - log_invalid_choice_id(type_, "location_meas_info_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// LogMeasReport-r16 ::= SEQUENCE -SRSASN_CODE log_meas_report_r16_s::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(log_meas_available_r16_present, 1)); - HANDLE_CODE(bref.pack(log_meas_available_bt_r16_present, 1)); - HANDLE_CODE(bref.pack(log_meas_available_wlan_r16_present, 1)); - - HANDLE_CODE(absolute_time_stamp_r16.pack(bref)); - HANDLE_CODE(trace_ref_r16.pack(bref)); - HANDLE_CODE(trace_recording_session_ref_r16.pack(bref)); - HANDLE_CODE(tce_id_r16.pack(bref)); - HANDLE_CODE(pack_dyn_seq_of(bref, log_meas_info_list_r16, 1, 520)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE log_meas_report_r16_s::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(log_meas_available_r16_present, 1)); - HANDLE_CODE(bref.unpack(log_meas_available_bt_r16_present, 1)); - HANDLE_CODE(bref.unpack(log_meas_available_wlan_r16_present, 1)); - - HANDLE_CODE(absolute_time_stamp_r16.unpack(bref)); - HANDLE_CODE(trace_ref_r16.unpack(bref)); - HANDLE_CODE(trace_recording_session_ref_r16.unpack(bref)); - HANDLE_CODE(tce_id_r16.unpack(bref)); - HANDLE_CODE(unpack_dyn_seq_of(log_meas_info_list_r16, bref, 1, 520)); - - return SRSASN_SUCCESS; -} -void log_meas_report_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_str("absoluteTimeStamp-r16", absolute_time_stamp_r16.to_string()); - j.write_fieldname("traceReference-r16"); - trace_ref_r16.to_json(j); - j.write_str("traceRecordingSessionRef-r16", trace_recording_session_ref_r16.to_string()); - j.write_str("tce-Id-r16", tce_id_r16.to_string()); - j.start_array("logMeasInfoList-r16"); - for (const auto& e1 : log_meas_info_list_r16) { - e1.to_json(j); - } - j.end_array(); - if (log_meas_available_r16_present) { - j.write_str("logMeasAvailable-r16", "true"); - } - if (log_meas_available_bt_r16_present) { - j.write_str("logMeasAvailableBT-r16", "true"); - } - if (log_meas_available_wlan_r16_present) { - j.write_str("logMeasAvailableWLAN-r16", "true"); - } - j.end_obj(); -} - -// 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)); - } - - 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[2] |= meas_result_for_rssi_r16.is_present(); - group_flags[2] |= location_info_r16.is_present(); - group_flags[2] |= ul_pdcp_delay_value_result_list_r16.is_present(); - group_flags[2] |= meas_results_sl_r16.is_present(); - group_flags[2] |= meas_result_cli_r16.is_present(); - group_flags[3] |= meas_result_rx_tx_time_diff_r17.is_present(); - group_flags[3] |= sl_meas_result_serving_relay_r17.size() > 0; - group_flags[3] |= ul_pdcp_excess_delay_result_list_r17.is_present(); - group_flags[3] |= coarse_location_info_r17.size() > 0; - 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)); - } - } - if (group_flags[2]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(meas_result_for_rssi_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(location_info_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(ul_pdcp_delay_value_result_list_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(meas_results_sl_r16.is_present(), 1)); - HANDLE_CODE(bref.pack(meas_result_cli_r16.is_present(), 1)); - if (meas_result_for_rssi_r16.is_present()) { - HANDLE_CODE(meas_result_for_rssi_r16->pack(bref)); - } - if (location_info_r16.is_present()) { - HANDLE_CODE(location_info_r16->pack(bref)); - } - if (ul_pdcp_delay_value_result_list_r16.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *ul_pdcp_delay_value_result_list_r16, 1, 29)); - } - if (meas_results_sl_r16.is_present()) { - HANDLE_CODE(meas_results_sl_r16->pack(bref)); - } - if (meas_result_cli_r16.is_present()) { - HANDLE_CODE(meas_result_cli_r16->pack(bref)); - } - } - if (group_flags[3]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(meas_result_rx_tx_time_diff_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(sl_meas_result_serving_relay_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(ul_pdcp_excess_delay_result_list_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(coarse_location_info_r17.size() > 0, 1)); - if (meas_result_rx_tx_time_diff_r17.is_present()) { - HANDLE_CODE(meas_result_rx_tx_time_diff_r17->pack(bref)); - } - if (sl_meas_result_serving_relay_r17.size() > 0) { - HANDLE_CODE(sl_meas_result_serving_relay_r17.pack(bref)); - } - if (ul_pdcp_excess_delay_result_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *ul_pdcp_excess_delay_result_list_r17, 1, 29)); - } - if (coarse_location_info_r17.size() > 0) { - HANDLE_CODE(coarse_location_info_r17.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)); - } - - if (ext) { - ext_groups_unpacker_guard group_flags(4); - group_flags.unpack(bref); - - if (group_flags[0]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(meas_result_serv_freq_list_eutra_scg, bref); - unpack_presence_flag(meas_result_serv_freq_list_nr_scg, bref); - unpack_presence_flag(meas_result_sftd_eutra, bref); - unpack_presence_flag(meas_result_sftd_nr, bref); - 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); - - unpack_presence_flag(meas_result_cell_list_sftd_nr, bref); - if (meas_result_cell_list_sftd_nr.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*meas_result_cell_list_sftd_nr, bref, 1, 3)); - } - } - if (group_flags[2]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(meas_result_for_rssi_r16, bref); - unpack_presence_flag(location_info_r16, bref); - unpack_presence_flag(ul_pdcp_delay_value_result_list_r16, bref); - unpack_presence_flag(meas_results_sl_r16, bref); - unpack_presence_flag(meas_result_cli_r16, bref); - if (meas_result_for_rssi_r16.is_present()) { - HANDLE_CODE(meas_result_for_rssi_r16->unpack(bref)); - } - if (location_info_r16.is_present()) { - HANDLE_CODE(location_info_r16->unpack(bref)); - } - if (ul_pdcp_delay_value_result_list_r16.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*ul_pdcp_delay_value_result_list_r16, bref, 1, 29)); - } - if (meas_results_sl_r16.is_present()) { - HANDLE_CODE(meas_results_sl_r16->unpack(bref)); - } - if (meas_result_cli_r16.is_present()) { - HANDLE_CODE(meas_result_cli_r16->unpack(bref)); - } - } - if (group_flags[3]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - unpack_presence_flag(meas_result_rx_tx_time_diff_r17, bref); - bool sl_meas_result_serving_relay_r17_present; - HANDLE_CODE(bref.unpack(sl_meas_result_serving_relay_r17_present, 1)); - unpack_presence_flag(ul_pdcp_excess_delay_result_list_r17, bref); - bool coarse_location_info_r17_present; - HANDLE_CODE(bref.unpack(coarse_location_info_r17_present, 1)); - if (meas_result_rx_tx_time_diff_r17.is_present()) { - HANDLE_CODE(meas_result_rx_tx_time_diff_r17->unpack(bref)); - } - if (sl_meas_result_serving_relay_r17_present) { - HANDLE_CODE(sl_meas_result_serving_relay_r17.unpack(bref)); - } - if (ul_pdcp_excess_delay_result_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*ul_pdcp_excess_delay_result_list_r17, bref, 1, 29)); - } - if (coarse_location_info_r17_present) { - HANDLE_CODE(coarse_location_info_r17.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); - } - 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(); - } - if (meas_result_for_rssi_r16.is_present()) { - j.write_fieldname("measResultForRSSI-r16"); - meas_result_for_rssi_r16->to_json(j); - } - if (location_info_r16.is_present()) { - j.write_fieldname("locationInfo-r16"); - location_info_r16->to_json(j); - } - if (ul_pdcp_delay_value_result_list_r16.is_present()) { - j.start_array("ul-PDCP-DelayValueResultList-r16"); - for (const auto& e1 : *ul_pdcp_delay_value_result_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_results_sl_r16.is_present()) { - j.write_fieldname("measResultsSL-r16"); - meas_results_sl_r16->to_json(j); - } - if (meas_result_cli_r16.is_present()) { - j.write_fieldname("measResultCLI-r16"); - meas_result_cli_r16->to_json(j); - } - if (meas_result_rx_tx_time_diff_r17.is_present()) { - j.write_fieldname("measResultRxTxTimeDiff-r17"); - meas_result_rx_tx_time_diff_r17->to_json(j); - } - if (sl_meas_result_serving_relay_r17.size() > 0) { - j.write_str("sl-MeasResultServingRelay-r17", sl_meas_result_serving_relay_r17.to_string()); - } - if (ul_pdcp_excess_delay_result_list_r17.is_present()) { - j.start_array("ul-PDCP-ExcessDelayResultList-r17"); - for (const auto& e1 : *ul_pdcp_excess_delay_result_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (coarse_location_info_r17.size() > 0) { - j.write_str("coarseLocationInfo-r17", coarse_location_info_r17.to_string()); - } - } - j.end_obj(); -} - -void meas_results_s::meas_result_neigh_cells_c_::destroy_() -{ - switch (type_) { - case types::meas_result_list_nr: - c.destroy(); - break; - case types::meas_result_list_eutra: - c.destroy(); - break; - case types::meas_result_list_utra_fdd_r16: - c.destroy(); - break; - case types::sl_meas_results_cand_relay_r17: - c.destroy(); - break; - default: - break; - } -} -void meas_results_s::meas_result_neigh_cells_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::meas_result_list_nr: - c.init(); - break; - case types::meas_result_list_eutra: - c.init(); - break; - case types::meas_result_list_utra_fdd_r16: - c.init(); - break; - case types::sl_meas_results_cand_relay_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); - } -} -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::meas_result_list_nr: - c.init(other.c.get()); - break; - case types::meas_result_list_eutra: - c.init(other.c.get()); - break; - case types::meas_result_list_utra_fdd_r16: - c.init(other.c.get()); - break; - case types::sl_meas_results_cand_relay_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_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) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::meas_result_list_nr: - c.set(other.c.get()); - break; - case types::meas_result_list_eutra: - c.set(other.c.get()); - break; - case types::meas_result_list_utra_fdd_r16: - c.set(other.c.get()); - break; - case types::sl_meas_results_cand_relay_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); - } - - return *this; -} -meas_result_list_nr_l& meas_results_s::meas_result_neigh_cells_c_::set_meas_result_list_nr() -{ - set(types::meas_result_list_nr); - return c.get(); -} -meas_result_list_eutra_l& meas_results_s::meas_result_neigh_cells_c_::set_meas_result_list_eutra() -{ - set(types::meas_result_list_eutra); - return c.get(); -} -meas_result_list_utra_fdd_r16_l& meas_results_s::meas_result_neigh_cells_c_::set_meas_result_list_utra_fdd_r16() -{ - set(types::meas_result_list_utra_fdd_r16); - return c.get(); -} -dyn_octstring& meas_results_s::meas_result_neigh_cells_c_::set_sl_meas_results_cand_relay_r17() -{ - set(types::sl_meas_results_cand_relay_r17); - return c.get(); -} -void meas_results_s::meas_result_neigh_cells_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(); - break; - case types::meas_result_list_eutra: - j.start_array("measResultListEUTRA"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); - break; - case types::meas_result_list_utra_fdd_r16: - j.start_array("measResultListUTRA-FDD-r16"); - for (const auto& e1 : c.get()) { - e1.to_json(j); - } - j.end_array(); - break; - case types::sl_meas_results_cand_relay_r17: - j.write_str("sl-MeasResultsCandRelay-r17", c.get().to_string()); - break; - default: - log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); - } - j.end_obj(); -} -SRSASN_CODE meas_results_s::meas_result_neigh_cells_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)); - 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; - case types::meas_result_list_utra_fdd_r16: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); - } break; - case types::sl_meas_results_cand_relay_r17: { - varlength_field_pack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().pack(bref)); - } break; - default: - log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -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::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; - case types::meas_result_list_utra_fdd_r16: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); - } break; - case types::sl_meas_results_cand_relay_r17: { - varlength_field_unpack_guard varlen_scope(bref, false); - HANDLE_CODE(c.get().unpack(bref)); - } break; - default: - log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// PosSIB-ReqInfo-r16 ::= SEQUENCE -SRSASN_CODE pos_sib_req_info_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(gnss_id_r16_present, 1)); - HANDLE_CODE(bref.pack(sbas_id_r16_present, 1)); - - if (gnss_id_r16_present) { - HANDLE_CODE(gnss_id_r16.pack(bref)); - } - if (sbas_id_r16_present) { - HANDLE_CODE(sbas_id_r16.pack(bref)); - } - HANDLE_CODE(pos_sib_type_r16.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE pos_sib_req_info_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(gnss_id_r16_present, 1)); - HANDLE_CODE(bref.unpack(sbas_id_r16_present, 1)); - - if (gnss_id_r16_present) { - HANDLE_CODE(gnss_id_r16.unpack(bref)); - } - if (sbas_id_r16_present) { - HANDLE_CODE(sbas_id_r16.unpack(bref)); - } - HANDLE_CODE(pos_sib_type_r16.unpack(bref)); - - return SRSASN_SUCCESS; -} -void pos_sib_req_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (gnss_id_r16_present) { - j.write_fieldname("gnss-id-r16"); - gnss_id_r16.to_json(j); - } - if (sbas_id_r16_present) { - j.write_fieldname("sbas-id-r16"); - sbas_id_r16.to_json(j); - } - j.write_str("posSibType-r16", pos_sib_type_r16.to_string()); - j.end_obj(); -} - -const char* pos_sib_req_info_r16_s::pos_sib_type_r16_opts::to_string() const -{ - static const char* names[] = { - "posSibType1-1", "posSibType1-2", "posSibType1-3", "posSibType1-4", - "posSibType1-5", "posSibType1-6", "posSibType1-7", "posSibType1-8", - "posSibType2-1", "posSibType2-2", "posSibType2-3", "posSibType2-4", - "posSibType2-5", "posSibType2-6", "posSibType2-7", "posSibType2-8", - "posSibType2-9", "posSibType2-10", "posSibType2-11", "posSibType2-12", - "posSibType2-13", "posSibType2-14", "posSibType2-15", "posSibType2-16", - "posSibType2-17", "posSibType2-18", "posSibType2-19", "posSibType2-20", - "posSibType2-21", "posSibType2-22", "posSibType2-23", "posSibType3-1", - "posSibType4-1", "posSibType5-1", "posSibType6-1", "posSibType6-2", - "posSibType6-3", "posSibType1-9-v1710", "posSibType1-10-v1710", "posSibType2-24-v1710", - "posSibType2-25-v1710", "posSibType6-4-v1710", "posSibType6-5-v1710", "posSibType6-6-v1710"}; - return convert_enum_idx(names, 44, value, "pos_sib_req_info_r16_s::pos_sib_type_r16_e_"); -} - -// RLF-Report-r16 ::= CHOICE -void rlf_report_r16_c::destroy_() -{ - switch (type_) { - case types::nr_rlf_report_r16: - c.destroy(); - break; - case types::eutra_rlf_report_r16: - c.destroy(); - break; - default: - break; - } -} -void rlf_report_r16_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::nr_rlf_report_r16: - c.init(); - break; - case types::eutra_rlf_report_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c"); - } -} -rlf_report_r16_c::rlf_report_r16_c(const rlf_report_r16_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::nr_rlf_report_r16: - c.init(other.c.get()); - break; - case types::eutra_rlf_report_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c"); - } -} -rlf_report_r16_c& rlf_report_r16_c::operator=(const rlf_report_r16_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::nr_rlf_report_r16: - c.set(other.c.get()); - break; - case types::eutra_rlf_report_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c"); - } - - return *this; -} -rlf_report_r16_c::nr_rlf_report_r16_s_& rlf_report_r16_c::set_nr_rlf_report_r16() -{ - set(types::nr_rlf_report_r16); - return c.get(); -} -rlf_report_r16_c::eutra_rlf_report_r16_s_& rlf_report_r16_c::set_eutra_rlf_report_r16() -{ - set(types::eutra_rlf_report_r16); - return c.get(); -} -void rlf_report_r16_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::nr_rlf_report_r16: - j.write_fieldname("nr-RLF-Report-r16"); - c.get().to_json(j); - break; - case types::eutra_rlf_report_r16: - j.write_fieldname("eutra-RLF-Report-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c"); - } - j.end_obj(); -} -SRSASN_CODE rlf_report_r16_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::nr_rlf_report_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::eutra_rlf_report_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rlf_report_r16_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::nr_rlf_report_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::eutra_rlf_report_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16_present, 1)); - HANDLE_CODE(bref.pack(prev_pcell_id_r16_present, 1)); - HANDLE_CODE(bref.pack(reconnect_cell_id_r16_present, 1)); - HANDLE_CODE(bref.pack(time_until_reconn_r16_present, 1)); - HANDLE_CODE(bref.pack(reest_cell_id_r16_present, 1)); - HANDLE_CODE(bref.pack(time_conn_fail_r16_present, 1)); - HANDLE_CODE(bref.pack(location_info_r16_present, 1)); - HANDLE_CODE(bref.pack(no_suitable_cell_found_r16_present, 1)); - HANDLE_CODE(bref.pack(ra_info_common_r16_present, 1)); - - HANDLE_CODE(meas_result_last_serv_cell_r16.pack(bref)); - if (meas_result_neigh_cells_r16_present) { - HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16.meas_result_list_nr_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16.meas_result_list_eutra_r16.size() > 0, 1)); - if (meas_result_neigh_cells_r16.meas_result_list_nr_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r16.meas_result_list_nr_r16, 1, 8)); - } - if (meas_result_neigh_cells_r16.meas_result_list_eutra_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r16.meas_result_list_eutra_r16, 1, 8)); - } - } - HANDLE_CODE(pack_integer(bref, c_rnti_r16, (uint32_t)0u, (uint32_t)65535u)); - if (prev_pcell_id_r16_present) { - HANDLE_CODE(prev_pcell_id_r16.pack(bref)); - } - HANDLE_CODE(failed_pcell_id_r16.pack(bref)); - if (reconnect_cell_id_r16_present) { - HANDLE_CODE(reconnect_cell_id_r16.pack(bref)); - } - if (time_until_reconn_r16_present) { - HANDLE_CODE(pack_integer(bref, time_until_reconn_r16, (uint32_t)0u, (uint32_t)172800u)); - } - if (reest_cell_id_r16_present) { - HANDLE_CODE(reest_cell_id_r16.pack(bref)); - } - if (time_conn_fail_r16_present) { - HANDLE_CODE(pack_integer(bref, time_conn_fail_r16, (uint16_t)0u, (uint16_t)1023u)); - } - HANDLE_CODE(pack_integer(bref, time_since_fail_r16, (uint32_t)0u, (uint32_t)172800u)); - HANDLE_CODE(conn_fail_type_r16.pack(bref)); - HANDLE_CODE(rlf_cause_r16.pack(bref)); - if (location_info_r16_present) { - HANDLE_CODE(location_info_r16.pack(bref)); - } - if (ra_info_common_r16_present) { - HANDLE_CODE(ra_info_common_r16.pack(bref)); - } - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= csi_rs_rlm_cfg_bitmap_v1650_present; - group_flags[1] |= last_ho_type_r17_present; - group_flags[1] |= time_conn_source_daps_fail_r17_present; - group_flags[1] |= time_since_cho_recfg_r17_present; - group_flags[1] |= cho_cell_id_r17.is_present(); - group_flags[1] |= cho_candidate_cell_list_r17.is_present(); - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(csi_rs_rlm_cfg_bitmap_v1650_present, 1)); - if (csi_rs_rlm_cfg_bitmap_v1650_present) { - HANDLE_CODE(csi_rs_rlm_cfg_bitmap_v1650.pack(bref)); - } - } - if (group_flags[1]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(last_ho_type_r17_present, 1)); - HANDLE_CODE(bref.pack(time_conn_source_daps_fail_r17_present, 1)); - HANDLE_CODE(bref.pack(time_since_cho_recfg_r17_present, 1)); - HANDLE_CODE(bref.pack(cho_cell_id_r17.is_present(), 1)); - HANDLE_CODE(bref.pack(cho_candidate_cell_list_r17.is_present(), 1)); - if (last_ho_type_r17_present) { - HANDLE_CODE(last_ho_type_r17.pack(bref)); - } - if (time_conn_source_daps_fail_r17_present) { - HANDLE_CODE(pack_integer(bref, time_conn_source_daps_fail_r17, (uint16_t)0u, (uint16_t)1023u)); - } - if (time_since_cho_recfg_r17_present) { - HANDLE_CODE(pack_integer(bref, time_since_cho_recfg_r17, (uint16_t)0u, (uint16_t)1023u)); - } - if (cho_cell_id_r17.is_present()) { - HANDLE_CODE(cho_cell_id_r17->pack(bref)); - } - if (cho_candidate_cell_list_r17.is_present()) { - HANDLE_CODE(pack_dyn_seq_of(bref, *cho_candidate_cell_list_r17, 1, 8)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r16_present, 1)); - HANDLE_CODE(bref.unpack(prev_pcell_id_r16_present, 1)); - HANDLE_CODE(bref.unpack(reconnect_cell_id_r16_present, 1)); - HANDLE_CODE(bref.unpack(time_until_reconn_r16_present, 1)); - HANDLE_CODE(bref.unpack(reest_cell_id_r16_present, 1)); - HANDLE_CODE(bref.unpack(time_conn_fail_r16_present, 1)); - HANDLE_CODE(bref.unpack(location_info_r16_present, 1)); - HANDLE_CODE(bref.unpack(no_suitable_cell_found_r16_present, 1)); - HANDLE_CODE(bref.unpack(ra_info_common_r16_present, 1)); - - HANDLE_CODE(meas_result_last_serv_cell_r16.unpack(bref)); - if (meas_result_neigh_cells_r16_present) { - bool meas_result_list_nr_r16_present; - HANDLE_CODE(bref.unpack(meas_result_list_nr_r16_present, 1)); - bool meas_result_list_eutra_r16_present; - HANDLE_CODE(bref.unpack(meas_result_list_eutra_r16_present, 1)); - if (meas_result_list_nr_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r16.meas_result_list_nr_r16, bref, 1, 8)); - } - if (meas_result_list_eutra_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r16.meas_result_list_eutra_r16, bref, 1, 8)); - } - } - HANDLE_CODE(unpack_integer(c_rnti_r16, bref, (uint32_t)0u, (uint32_t)65535u)); - if (prev_pcell_id_r16_present) { - HANDLE_CODE(prev_pcell_id_r16.unpack(bref)); - } - HANDLE_CODE(failed_pcell_id_r16.unpack(bref)); - if (reconnect_cell_id_r16_present) { - HANDLE_CODE(reconnect_cell_id_r16.unpack(bref)); - } - if (time_until_reconn_r16_present) { - HANDLE_CODE(unpack_integer(time_until_reconn_r16, bref, (uint32_t)0u, (uint32_t)172800u)); - } - if (reest_cell_id_r16_present) { - HANDLE_CODE(reest_cell_id_r16.unpack(bref)); - } - if (time_conn_fail_r16_present) { - HANDLE_CODE(unpack_integer(time_conn_fail_r16, bref, (uint16_t)0u, (uint16_t)1023u)); - } - HANDLE_CODE(unpack_integer(time_since_fail_r16, bref, (uint32_t)0u, (uint32_t)172800u)); - HANDLE_CODE(conn_fail_type_r16.unpack(bref)); - HANDLE_CODE(rlf_cause_r16.unpack(bref)); - if (location_info_r16_present) { - HANDLE_CODE(location_info_r16.unpack(bref)); - } - if (ra_info_common_r16_present) { - HANDLE_CODE(ra_info_common_r16.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(csi_rs_rlm_cfg_bitmap_v1650_present, 1)); - if (csi_rs_rlm_cfg_bitmap_v1650_present) { - HANDLE_CODE(csi_rs_rlm_cfg_bitmap_v1650.unpack(bref)); - } - } - if (group_flags[1]) { - varlength_field_unpack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.unpack(last_ho_type_r17_present, 1)); - HANDLE_CODE(bref.unpack(time_conn_source_daps_fail_r17_present, 1)); - HANDLE_CODE(bref.unpack(time_since_cho_recfg_r17_present, 1)); - unpack_presence_flag(cho_cell_id_r17, bref); - unpack_presence_flag(cho_candidate_cell_list_r17, bref); - if (last_ho_type_r17_present) { - HANDLE_CODE(last_ho_type_r17.unpack(bref)); - } - if (time_conn_source_daps_fail_r17_present) { - HANDLE_CODE(unpack_integer(time_conn_source_daps_fail_r17, bref, (uint16_t)0u, (uint16_t)1023u)); - } - if (time_since_cho_recfg_r17_present) { - HANDLE_CODE(unpack_integer(time_since_cho_recfg_r17, bref, (uint16_t)0u, (uint16_t)1023u)); - } - if (cho_cell_id_r17.is_present()) { - HANDLE_CODE(cho_cell_id_r17->unpack(bref)); - } - if (cho_candidate_cell_list_r17.is_present()) { - HANDLE_CODE(unpack_dyn_seq_of(*cho_candidate_cell_list_r17, bref, 1, 8)); - } - } - } - return SRSASN_SUCCESS; -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("measResultLastServCell-r16"); - meas_result_last_serv_cell_r16.to_json(j); - if (meas_result_neigh_cells_r16_present) { - j.write_fieldname("measResultNeighCells-r16"); - j.start_obj(); - if (meas_result_neigh_cells_r16.meas_result_list_nr_r16.size() > 0) { - j.start_array("measResultListNR-r16"); - for (const auto& e1 : meas_result_neigh_cells_r16.meas_result_list_nr_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (meas_result_neigh_cells_r16.meas_result_list_eutra_r16.size() > 0) { - j.start_array("measResultListEUTRA-r16"); - for (const auto& e1 : meas_result_neigh_cells_r16.meas_result_list_eutra_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); - } - j.write_int("c-RNTI-r16", c_rnti_r16); - if (prev_pcell_id_r16_present) { - j.write_fieldname("previousPCellId-r16"); - prev_pcell_id_r16.to_json(j); - } - j.write_fieldname("failedPCellId-r16"); - failed_pcell_id_r16.to_json(j); - if (reconnect_cell_id_r16_present) { - j.write_fieldname("reconnectCellId-r16"); - reconnect_cell_id_r16.to_json(j); - } - if (time_until_reconn_r16_present) { - j.write_int("timeUntilReconnection-r16", time_until_reconn_r16); - } - if (reest_cell_id_r16_present) { - j.write_fieldname("reestablishmentCellId-r16"); - reest_cell_id_r16.to_json(j); - } - if (time_conn_fail_r16_present) { - j.write_int("timeConnFailure-r16", time_conn_fail_r16); - } - j.write_int("timeSinceFailure-r16", time_since_fail_r16); - j.write_str("connectionFailureType-r16", conn_fail_type_r16.to_string()); - j.write_str("rlf-Cause-r16", rlf_cause_r16.to_string()); - if (location_info_r16_present) { - j.write_fieldname("locationInfo-r16"); - location_info_r16.to_json(j); - } - if (no_suitable_cell_found_r16_present) { - j.write_str("noSuitableCellFound-r16", "true"); - } - if (ra_info_common_r16_present) { - j.write_fieldname("ra-InformationCommon-r16"); - ra_info_common_r16.to_json(j); - } - if (ext) { - if (csi_rs_rlm_cfg_bitmap_v1650_present) { - j.write_str("csi-rsRLMConfigBitmap-v1650", csi_rs_rlm_cfg_bitmap_v1650.to_string()); - } - if (last_ho_type_r17_present) { - j.write_str("lastHO-Type-r17", last_ho_type_r17.to_string()); - } - if (time_conn_source_daps_fail_r17_present) { - j.write_int("timeConnSourceDAPS-Failure-r17", time_conn_source_daps_fail_r17); - } - if (time_since_cho_recfg_r17_present) { - j.write_int("timeSinceCHO-Reconfig-r17", time_since_cho_recfg_r17); - } - if (cho_cell_id_r17.is_present()) { - j.write_fieldname("choCellId-r17"); - cho_cell_id_r17->to_json(j); - } - if (cho_candidate_cell_list_r17.is_present()) { - j.start_array("choCandidateCellList-r17"); - for (const auto& e1 : *cho_candidate_cell_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - } - j.end_obj(); -} - -void rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::destroy_() -{ - switch (type_) { - case types::nr_prev_cell_r16: - c.destroy(); - break; - case types::eutra_prev_cell_r16: - c.destroy(); - break; - default: - break; - } -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::nr_prev_cell_r16: - c.init(); - break; - case types::eutra_prev_cell_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_"); - } -} -rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::prev_pcell_id_r16_c_( - const rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::nr_prev_cell_r16: - c.init(other.c.get()); - break; - case types::eutra_prev_cell_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_"); - } -} -rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_& -rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::operator=( - const rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::nr_prev_cell_r16: - c.set(other.c.get()); - break; - case types::eutra_prev_cell_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_"); - } - - return *this; -} -cgi_info_logging_r16_s& rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::set_nr_prev_cell_r16() -{ - set(types::nr_prev_cell_r16); - return c.get(); -} -cgi_info_eutra_logging_s& rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::set_eutra_prev_cell_r16() -{ - set(types::eutra_prev_cell_r16); - return c.get(); -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::nr_prev_cell_r16: - j.write_fieldname("nrPreviousCell-r16"); - c.get().to_json(j); - break; - case types::eutra_prev_cell_r16: - j.write_fieldname("eutraPreviousCell-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::nr_prev_cell_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::eutra_prev_cell_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::nr_prev_cell_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::eutra_prev_cell_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::destroy_() -{ - switch (type_) { - case types::nr_failed_pcell_id_r16: - c.destroy(); - break; - case types::eutra_failed_pcell_id_r16: - c.destroy(); - break; - default: - break; - } -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::nr_failed_pcell_id_r16: - c.init(); - break; - case types::eutra_failed_pcell_id_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_"); - } -} -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::failed_pcell_id_r16_c_( - const rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::nr_failed_pcell_id_r16: - c.init(other.c.get()); - break; - case types::eutra_failed_pcell_id_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_"); - } -} -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_& -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::operator=( - const rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::nr_failed_pcell_id_r16: - c.set(other.c.get()); - break; - case types::eutra_failed_pcell_id_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_"); - } - - return *this; -} -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_& -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::set_nr_failed_pcell_id_r16() -{ - set(types::nr_failed_pcell_id_r16); - return c.get(); -} -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_& -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::set_eutra_failed_pcell_id_r16() -{ - set(types::eutra_failed_pcell_id_r16); - return c.get(); -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::nr_failed_pcell_id_r16: - j.write_fieldname("nrFailedPCellId-r16"); - c.get().to_json(j); - break; - case types::eutra_failed_pcell_id_r16: - j.write_fieldname("eutraFailedPCellId-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::nr_failed_pcell_id_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::eutra_failed_pcell_id_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::nr_failed_pcell_id_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::eutra_failed_pcell_id_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::destroy_() -{ - switch (type_) { - case types::cell_global_id_r16: - c.destroy(); - break; - case types::pci_arfcn_r16: - c.destroy(); - break; - default: - break; - } -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::cell_global_id_r16: - c.init(); - break; - case types::pci_arfcn_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_"); - } -} -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_( - const rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::cell_global_id_r16: - c.init(other.c.get()); - break; - case types::pci_arfcn_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_"); - } -} -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_& -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::operator=( - const rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::cell_global_id_r16: - c.set(other.c.get()); - break; - case types::pci_arfcn_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_"); - } - - return *this; -} -cgi_info_logging_r16_s& -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::set_cell_global_id_r16() -{ - set(types::cell_global_id_r16); - return c.get(); -} -pci_arfcn_nr_r16_s& -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::set_pci_arfcn_r16() -{ - set(types::pci_arfcn_r16); - return c.get(); -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::to_json( - json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::cell_global_id_r16: - j.write_fieldname("cellGlobalId-r16"); - c.get().to_json(j); - break; - case types::pci_arfcn_r16: - j.write_fieldname("pci-arfcn-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id( - type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cell_global_id_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pci_arfcn_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id( - type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cell_global_id_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pci_arfcn_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id( - type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::destroy_() -{ - switch (type_) { - case types::cell_global_id_r16: - c.destroy(); - break; - case types::pci_arfcn_r16: - c.destroy(); - break; - default: - break; - } -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::cell_global_id_r16: - c.init(); - break; - case types::pci_arfcn_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_"); - } -} -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_:: - eutra_failed_pcell_id_r16_c_( - const rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::cell_global_id_r16: - c.init(other.c.get()); - break; - case types::pci_arfcn_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_"); - } -} -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_& -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::operator=( - const rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::cell_global_id_r16: - c.set(other.c.get()); - break; - case types::pci_arfcn_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_"); - } - - return *this; -} -cgi_info_eutra_logging_s& -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::set_cell_global_id_r16() -{ - set(types::cell_global_id_r16); - return c.get(); -} -pci_arfcn_eutra_r16_s& -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::set_pci_arfcn_r16() -{ - set(types::pci_arfcn_r16); - return c.get(); -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::to_json( - json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::cell_global_id_r16: - j.write_fieldname("cellGlobalId-r16"); - c.get().to_json(j); - break; - case types::pci_arfcn_r16: - j.write_fieldname("pci-arfcn-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id( - type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cell_global_id_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pci_arfcn_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id( - type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE -rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cell_global_id_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pci_arfcn_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id( - type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::destroy_() -{ - switch (type_) { - case types::nr_reconnect_cell_id_r16: - c.destroy(); - break; - case types::eutra_reconnect_cell_id_r16: - c.destroy(); - break; - default: - break; - } -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::nr_reconnect_cell_id_r16: - c.init(); - break; - case types::eutra_reconnect_cell_id_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_"); - } -} -rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::reconnect_cell_id_r16_c_( - const rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::nr_reconnect_cell_id_r16: - c.init(other.c.get()); - break; - case types::eutra_reconnect_cell_id_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_"); - } -} -rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_& -rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::operator=( - const rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::nr_reconnect_cell_id_r16: - c.set(other.c.get()); - break; - case types::eutra_reconnect_cell_id_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_"); - } - - return *this; -} -cgi_info_logging_r16_s& rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::set_nr_reconnect_cell_id_r16() -{ - set(types::nr_reconnect_cell_id_r16); - return c.get(); -} -cgi_info_eutra_logging_s& -rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::set_eutra_reconnect_cell_id_r16() -{ - set(types::eutra_reconnect_cell_id_r16); - return c.get(); -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::nr_reconnect_cell_id_r16: - j.write_fieldname("nrReconnectCellId-r16"); - c.get().to_json(j); - break; - case types::eutra_reconnect_cell_id_r16: - j.write_fieldname("eutraReconnectCellId-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::nr_reconnect_cell_id_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::eutra_reconnect_cell_id_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::nr_reconnect_cell_id_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::eutra_reconnect_cell_id_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* rlf_report_r16_c::nr_rlf_report_r16_s_::conn_fail_type_r16_opts::to_string() const -{ - static const char* names[] = {"rlf", "hof"}; - return convert_enum_idx(names, 2, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::conn_fail_type_r16_e_"); -} - -const char* rlf_report_r16_c::nr_rlf_report_r16_s_::rlf_cause_r16_opts::to_string() const -{ - static const char* names[] = {"t310-Expiry", - "randomAccessProblem", - "rlc-MaxNumRetx", - "beamFailureRecoveryFailure", - "lbtFailure-r16", - "bh-rlfRecoveryFailure", - "t312-expiry-r17", - "spare1"}; - return convert_enum_idx(names, 8, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::rlf_cause_r16_e_"); -} -uint16_t rlf_report_r16_c::nr_rlf_report_r16_s_::rlf_cause_r16_opts::to_number() const -{ - switch (value) { - case t310_expiry: - return 310; - case t312_expiry_r17: - return 312; - default: - invalid_enum_number(value, "rlf_report_r16_c::nr_rlf_report_r16_s_::rlf_cause_r16_e_"); - } - return 0; -} - -const char* rlf_report_r16_c::nr_rlf_report_r16_s_::last_ho_type_r17_opts::to_string() const -{ - static const char* names[] = {"cho", "daps", "spare2", "spare1"}; - return convert_enum_idx(names, 4, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::last_ho_type_r17_e_"); -} - -void rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::destroy_() -{ - switch (type_) { - case types::cell_global_id_r17: - c.destroy(); - break; - case types::pci_arfcn_r17: - c.destroy(); - break; - default: - break; - } -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::cell_global_id_r17: - c.init(); - break; - case types::pci_arfcn_r17: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_"); - } -} -rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::cho_cell_id_r17_c_( - const rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::cell_global_id_r17: - c.init(other.c.get()); - break; - case types::pci_arfcn_r17: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_"); - } -} -rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_& -rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::operator=( - const rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::cell_global_id_r17: - c.set(other.c.get()); - break; - case types::pci_arfcn_r17: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_"); - } - - return *this; -} -cgi_info_logging_r16_s& rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::set_cell_global_id_r17() -{ - set(types::cell_global_id_r17); - return c.get(); -} -pci_arfcn_nr_r16_s& rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::set_pci_arfcn_r17() -{ - set(types::pci_arfcn_r17); - return c.get(); -} -void rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::cell_global_id_r17: - j.write_fieldname("cellGlobalId-r17"); - c.get().to_json(j); - break; - case types::pci_arfcn_r17: - j.write_fieldname("pci-arfcn-r17"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_"); - } - j.end_obj(); -} -SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::cell_global_id_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::pci_arfcn_r17: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::cell_global_id_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::pci_arfcn_r17: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -SRSASN_CODE rlf_report_r16_c::eutra_rlf_report_r16_s_::pack(bit_ref& bref) const -{ - bref.pack(ext, 1); - HANDLE_CODE(failed_pcell_id_eutra.pack(bref)); - HANDLE_CODE(meas_result_rlf_report_eutra_r16.pack(bref)); - - if (ext) { - ext_groups_packer_guard group_flags; - group_flags[0] |= meas_result_rlf_report_eutra_v1690.size() > 0; - group_flags.pack(bref); - - if (group_flags[0]) { - varlength_field_pack_guard varlen_scope(bref, false); - - HANDLE_CODE(bref.pack(meas_result_rlf_report_eutra_v1690.size() > 0, 1)); - if (meas_result_rlf_report_eutra_v1690.size() > 0) { - HANDLE_CODE(meas_result_rlf_report_eutra_v1690.pack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rlf_report_r16_c::eutra_rlf_report_r16_s_::unpack(cbit_ref& bref) -{ - bref.unpack(ext, 1); - HANDLE_CODE(failed_pcell_id_eutra.unpack(bref)); - HANDLE_CODE(meas_result_rlf_report_eutra_r16.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_result_rlf_report_eutra_v1690_present; - HANDLE_CODE(bref.unpack(meas_result_rlf_report_eutra_v1690_present, 1)); - if (meas_result_rlf_report_eutra_v1690_present) { - HANDLE_CODE(meas_result_rlf_report_eutra_v1690.unpack(bref)); - } - } - } - return SRSASN_SUCCESS; -} -void rlf_report_r16_c::eutra_rlf_report_r16_s_::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("failedPCellId-EUTRA"); - failed_pcell_id_eutra.to_json(j); - j.write_str("measResult-RLF-Report-EUTRA-r16", meas_result_rlf_report_eutra_r16.to_string()); - if (ext) { - if (meas_result_rlf_report_eutra_v1690.size() > 0) { - j.write_str("measResult-RLF-Report-EUTRA-v1690", meas_result_rlf_report_eutra_v1690.to_string()); - } - } - j.end_obj(); -} - -// RRCReconfigurationComplete-v1530-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_complete_v1530_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_tx_direct_current_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ul_tx_direct_current_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_list, 1, 32)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_recfg_complete_v1530_ies_s::unpack(cbit_ref& bref) -{ - bool ul_tx_direct_current_list_present; - 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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_recfg_complete_v1530_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ul_tx_direct_current_list.size() > 0) { - 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"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// RRCReestablishmentComplete-v1610-IEs ::= SEQUENCE -SRSASN_CODE rrc_reest_complete_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ue_meass_available_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ue_meass_available_r16_present) { - HANDLE_CODE(ue_meass_available_r16.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_reest_complete_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ue_meass_available_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ue_meass_available_r16_present) { - HANDLE_CODE(ue_meass_available_r16.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_reest_complete_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ue_meass_available_r16_present) { - j.write_fieldname("ue-MeasurementsAvailable-r16"); - ue_meass_available_r16.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// RRCResumeComplete-v1610-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_complete_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(idle_meas_available_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_result_idle_eutra_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_result_idle_nr_r16_present, 1)); - HANDLE_CODE(bref.pack(scg_resp_r16_present, 1)); - HANDLE_CODE(bref.pack(ue_meass_available_r16_present, 1)); - HANDLE_CODE(bref.pack(mob_history_avail_r16_present, 1)); - HANDLE_CODE(bref.pack(mob_state_r16_present, 1)); - HANDLE_CODE(bref.pack(need_for_gaps_info_nr_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (meas_result_idle_eutra_r16_present) { - HANDLE_CODE(meas_result_idle_eutra_r16.pack(bref)); - } - if (meas_result_idle_nr_r16_present) { - HANDLE_CODE(meas_result_idle_nr_r16.pack(bref)); - } - if (scg_resp_r16_present) { - HANDLE_CODE(scg_resp_r16.pack(bref)); - } - if (ue_meass_available_r16_present) { - HANDLE_CODE(ue_meass_available_r16.pack(bref)); - } - if (mob_state_r16_present) { - HANDLE_CODE(mob_state_r16.pack(bref)); - } - if (need_for_gaps_info_nr_r16_present) { - HANDLE_CODE(need_for_gaps_info_nr_r16.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_complete_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(idle_meas_available_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_idle_eutra_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_idle_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(scg_resp_r16_present, 1)); - HANDLE_CODE(bref.unpack(ue_meass_available_r16_present, 1)); - HANDLE_CODE(bref.unpack(mob_history_avail_r16_present, 1)); - HANDLE_CODE(bref.unpack(mob_state_r16_present, 1)); - HANDLE_CODE(bref.unpack(need_for_gaps_info_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (meas_result_idle_eutra_r16_present) { - HANDLE_CODE(meas_result_idle_eutra_r16.unpack(bref)); - } - if (meas_result_idle_nr_r16_present) { - HANDLE_CODE(meas_result_idle_nr_r16.unpack(bref)); - } - if (scg_resp_r16_present) { - HANDLE_CODE(scg_resp_r16.unpack(bref)); - } - if (ue_meass_available_r16_present) { - HANDLE_CODE(ue_meass_available_r16.unpack(bref)); - } - if (mob_state_r16_present) { - HANDLE_CODE(mob_state_r16.unpack(bref)); - } - if (need_for_gaps_info_nr_r16_present) { - HANDLE_CODE(need_for_gaps_info_nr_r16.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_resume_complete_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (idle_meas_available_r16_present) { - j.write_str("idleMeasAvailable-r16", "true"); - } - if (meas_result_idle_eutra_r16_present) { - j.write_fieldname("measResultIdleEUTRA-r16"); - meas_result_idle_eutra_r16.to_json(j); - } - if (meas_result_idle_nr_r16_present) { - j.write_fieldname("measResultIdleNR-r16"); - meas_result_idle_nr_r16.to_json(j); - } - if (scg_resp_r16_present) { - j.write_fieldname("scg-Response-r16"); - scg_resp_r16.to_json(j); - } - if (ue_meass_available_r16_present) { - j.write_fieldname("ue-MeasurementsAvailable-r16"); - ue_meass_available_r16.to_json(j); - } - if (mob_history_avail_r16_present) { - j.write_str("mobilityHistoryAvail-r16", "true"); - } - if (mob_state_r16_present) { - j.write_str("mobilityState-r16", mob_state_r16.to_string()); - } - if (need_for_gaps_info_nr_r16_present) { - j.write_fieldname("needForGapsInfoNR-r16"); - need_for_gaps_info_nr_r16.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -void rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::destroy_() -{ - switch (type_) { - case types::nr_scg_resp: - c.destroy(); - break; - case types::eutra_scg_resp: - c.destroy(); - break; - default: - break; - } -} -void rrc_resume_complete_v1610_ies_s::scg_resp_r16_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_, "rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_"); - } -} -rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::scg_resp_r16_c_( - const rrc_resume_complete_v1610_ies_s::scg_resp_r16_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_resume_complete_v1610_ies_s::scg_resp_r16_c_"); - } -} -rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_& rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::operator=( - const rrc_resume_complete_v1610_ies_s::scg_resp_r16_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_resume_complete_v1610_ies_s::scg_resp_r16_c_"); - } - - return *this; -} -dyn_octstring& rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::set_nr_scg_resp() -{ - set(types::nr_scg_resp); - return c.get(); -} -dyn_octstring& rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::set_eutra_scg_resp() -{ - set(types::eutra_scg_resp); - return c.get(); -} -void rrc_resume_complete_v1610_ies_s::scg_resp_r16_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_resume_complete_v1610_ies_s::scg_resp_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::nr_scg_resp: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::eutra_scg_resp: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::nr_scg_resp: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::eutra_scg_resp: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -const char* rrc_resume_complete_v1610_ies_s::mob_state_r16_opts::to_string() const -{ - static const char* names[] = {"normal", "medium", "high", "spare"}; - return convert_enum_idx(names, 4, value, "rrc_resume_complete_v1610_ies_s::mob_state_r16_e_"); -} - -// RRCSetupComplete-v1610-IEs ::= SEQUENCE -SRSASN_CODE rrc_setup_complete_v1610_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(iab_node_ind_r16_present, 1)); - HANDLE_CODE(bref.pack(idle_meas_available_r16_present, 1)); - HANDLE_CODE(bref.pack(ue_meass_available_r16_present, 1)); - HANDLE_CODE(bref.pack(mob_history_avail_r16_present, 1)); - HANDLE_CODE(bref.pack(mob_state_r16_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ue_meass_available_r16_present) { - HANDLE_CODE(ue_meass_available_r16.pack(bref)); - } - if (mob_state_r16_present) { - HANDLE_CODE(mob_state_r16.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_setup_complete_v1610_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(iab_node_ind_r16_present, 1)); - HANDLE_CODE(bref.unpack(idle_meas_available_r16_present, 1)); - HANDLE_CODE(bref.unpack(ue_meass_available_r16_present, 1)); - HANDLE_CODE(bref.unpack(mob_history_avail_r16_present, 1)); - HANDLE_CODE(bref.unpack(mob_state_r16_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ue_meass_available_r16_present) { - HANDLE_CODE(ue_meass_available_r16.unpack(bref)); - } - if (mob_state_r16_present) { - HANDLE_CODE(mob_state_r16.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void rrc_setup_complete_v1610_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (iab_node_ind_r16_present) { - j.write_str("iab-NodeIndication-r16", "true"); - } - if (idle_meas_available_r16_present) { - j.write_str("idleMeasAvailable-r16", "true"); - } - if (ue_meass_available_r16_present) { - j.write_fieldname("ue-MeasurementsAvailable-r16"); - ue_meass_available_r16.to_json(j); - } - if (mob_history_avail_r16_present) { - j.write_str("mobilityHistoryAvail-r16", "true"); - } - if (mob_state_r16_present) { - j.write_str("mobilityState-r16", mob_state_r16.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -const char* rrc_setup_complete_v1610_ies_s::mob_state_r16_opts::to_string() const -{ - static const char* names[] = {"normal", "medium", "high", "spare"}; - return convert_enum_idx(names, 4, value, "rrc_setup_complete_v1610_ies_s::mob_state_r16_e_"); -} - -// RegisteredAMF ::= SEQUENCE -SRSASN_CODE registered_amf_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(amf_id.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE registered_amf_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)); - - return SRSASN_SUCCESS; -} -void registered_amf_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.end_obj(); -} - -// S-NSSAI ::= CHOICE -void s_nssai_c::destroy_() -{ - switch (type_) { - case types::sst: - c.destroy>(); - break; - case types::sst_sd: - c.destroy>(); - break; - default: - break; - } -} -void s_nssai_c::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::sst: - c.init>(); - break; - case types::sst_sd: - c.init>(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s_nssai_c"); - } -} -s_nssai_c::s_nssai_c(const s_nssai_c& other) -{ - type_ = other.type(); - switch (type_) { - case types::sst: - c.init(other.c.get>()); - break; - case types::sst_sd: - c.init(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s_nssai_c"); - } -} -s_nssai_c& s_nssai_c::operator=(const s_nssai_c& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::sst: - c.set(other.c.get>()); - break; - case types::sst_sd: - c.set(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "s_nssai_c"); - } - - return *this; -} -fixed_bitstring<8>& s_nssai_c::set_sst() -{ - set(types::sst); - return c.get>(); -} -fixed_bitstring<32>& s_nssai_c::set_sst_sd() -{ - set(types::sst_sd); - return c.get>(); -} -void s_nssai_c::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::sst: - j.write_str("sst", c.get>().to_string()); - break; - case types::sst_sd: - j.write_str("sst-SD", c.get>().to_string()); - break; - default: - log_invalid_choice_id(type_, "s_nssai_c"); - } - j.end_obj(); -} -SRSASN_CODE s_nssai_c::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::sst: - HANDLE_CODE(c.get>().pack(bref)); - break; - case types::sst_sd: - HANDLE_CODE(c.get>().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "s_nssai_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE s_nssai_c::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::sst: - HANDLE_CODE(c.get>().unpack(bref)); - break; - case types::sst_sd: - HANDLE_CODE(c.get>().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "s_nssai_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// SCGFailureInformation-v1590-IEs ::= SEQUENCE -SRSASN_CODE scg_fail_info_v1590_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE scg_fail_info_v1590_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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_v1590_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE scg_fail_info_eutra_v1590_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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_eutra_v1590_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// SIB-ReqInfo-r16 ::= ENUMERATED -const char* sib_req_info_r16_opts::to_string() const -{ - static const char* names[] = {"sib12", "sib13", "sib14", "sib20-v1700", "sib21-v1700", "spare3", "spare2", "spare1"}; - return convert_enum_idx(names, 8, value, "sib_req_info_r16_e"); -} -uint8_t sib_req_info_r16_opts::to_number() const -{ - static const uint8_t numbers[] = {12, 13, 14, 20, 21}; - return map_enum_number(numbers, 5, value, "sib_req_info_r16_e"); -} - -// SidelinkUEInformationNR-v1700-IEs ::= SEQUENCE -SRSASN_CODE sidelink_ue_info_nr_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sl_tx_res_req_list_v1700.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_rx_drx_report_list_v1700.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_rx_interested_gc_bc_dest_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_rx_interested_freq_list_disc_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_tx_res_req_list_disc_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_tx_res_req_list_comm_relay_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(ue_type_r17_present, 1)); - HANDLE_CODE(bref.pack(sl_source_id_remote_ue_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (sl_tx_res_req_list_v1700.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_res_req_list_v1700, 1, 32)); - } - if (sl_rx_drx_report_list_v1700.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_rx_drx_report_list_v1700, 1, 32)); - } - if (sl_rx_interested_gc_bc_dest_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_rx_interested_gc_bc_dest_list_r17, 1, 32)); - } - if (sl_rx_interested_freq_list_disc_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_rx_interested_freq_list_disc_r17, 1, 8, integer_packer(1, 8))); - } - if (sl_tx_res_req_list_disc_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_res_req_list_disc_r17, 1, 32)); - } - if (sl_tx_res_req_list_comm_relay_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_res_req_list_comm_relay_r17, 1, 32)); - } - if (ue_type_r17_present) { - HANDLE_CODE(ue_type_r17.pack(bref)); - } - if (sl_source_id_remote_ue_r17_present) { - HANDLE_CODE(sl_source_id_remote_ue_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE sidelink_ue_info_nr_v1700_ies_s::unpack(cbit_ref& bref) -{ - bool sl_tx_res_req_list_v1700_present; - HANDLE_CODE(bref.unpack(sl_tx_res_req_list_v1700_present, 1)); - bool sl_rx_drx_report_list_v1700_present; - HANDLE_CODE(bref.unpack(sl_rx_drx_report_list_v1700_present, 1)); - bool sl_rx_interested_gc_bc_dest_list_r17_present; - HANDLE_CODE(bref.unpack(sl_rx_interested_gc_bc_dest_list_r17_present, 1)); - bool sl_rx_interested_freq_list_disc_r17_present; - HANDLE_CODE(bref.unpack(sl_rx_interested_freq_list_disc_r17_present, 1)); - bool sl_tx_res_req_list_disc_r17_present; - HANDLE_CODE(bref.unpack(sl_tx_res_req_list_disc_r17_present, 1)); - bool sl_tx_res_req_list_comm_relay_r17_present; - HANDLE_CODE(bref.unpack(sl_tx_res_req_list_comm_relay_r17_present, 1)); - HANDLE_CODE(bref.unpack(ue_type_r17_present, 1)); - HANDLE_CODE(bref.unpack(sl_source_id_remote_ue_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (sl_tx_res_req_list_v1700_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_tx_res_req_list_v1700, bref, 1, 32)); - } - if (sl_rx_drx_report_list_v1700_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_rx_drx_report_list_v1700, bref, 1, 32)); - } - if (sl_rx_interested_gc_bc_dest_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_rx_interested_gc_bc_dest_list_r17, bref, 1, 32)); - } - if (sl_rx_interested_freq_list_disc_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_rx_interested_freq_list_disc_r17, bref, 1, 8, integer_packer(1, 8))); - } - if (sl_tx_res_req_list_disc_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_tx_res_req_list_disc_r17, bref, 1, 32)); - } - if (sl_tx_res_req_list_comm_relay_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_tx_res_req_list_comm_relay_r17, bref, 1, 32)); - } - if (ue_type_r17_present) { - HANDLE_CODE(ue_type_r17.unpack(bref)); - } - if (sl_source_id_remote_ue_r17_present) { - HANDLE_CODE(sl_source_id_remote_ue_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void sidelink_ue_info_nr_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_tx_res_req_list_v1700.size() > 0) { - j.start_array("sl-TxResourceReqList-v1700"); - for (const auto& e1 : sl_tx_res_req_list_v1700) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_rx_drx_report_list_v1700.size() > 0) { - j.start_array("sl-RxDRX-ReportList-v1700"); - for (const auto& e1 : sl_rx_drx_report_list_v1700) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_rx_interested_gc_bc_dest_list_r17.size() > 0) { - j.start_array("sl-RxInterestedGC-BC-DestList-r17"); - for (const auto& e1 : sl_rx_interested_gc_bc_dest_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_rx_interested_freq_list_disc_r17.size() > 0) { - j.start_array("sl-RxInterestedFreqListDisc-r17"); - for (const auto& e1 : sl_rx_interested_freq_list_disc_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_tx_res_req_list_disc_r17.size() > 0) { - j.start_array("sl-TxResourceReqListDisc-r17"); - for (const auto& e1 : sl_tx_res_req_list_disc_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_tx_res_req_list_comm_relay_r17.size() > 0) { - j.start_array("sl-TxResourceReqListCommRelay-r17"); - for (const auto& e1 : sl_tx_res_req_list_comm_relay_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (ue_type_r17_present) { - j.write_str("ue-Type-r17", ue_type_r17.to_string()); - } - if (sl_source_id_remote_ue_r17_present) { - j.write_str("sl-SourceIdentityRemoteUE-r17", sl_source_id_remote_ue_r17.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -const char* sidelink_ue_info_nr_v1700_ies_s::ue_type_r17_opts::to_string() const -{ - static const char* names[] = {"relayUE", "remoteUE"}; - return convert_enum_idx(names, 2, value, "sidelink_ue_info_nr_v1700_ies_s::ue_type_r17_e_"); -} - -// UEAssistanceInformation-v1540-IEs ::= SEQUENCE -SRSASN_CODE ue_assist_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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_assist_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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_assist_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"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// UEInformationResponse-v1700-IEs ::= SEQUENCE -SRSASN_CODE ue_info_resp_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(success_ho_report_r17_present, 1)); - HANDLE_CODE(bref.pack(conn_est_fail_report_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(coarse_location_info_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (success_ho_report_r17_present) { - HANDLE_CODE(success_ho_report_r17.pack(bref)); - } - if (conn_est_fail_report_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, conn_est_fail_report_list_r17, 1, 4)); - } - if (coarse_location_info_r17.size() > 0) { - HANDLE_CODE(coarse_location_info_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_info_resp_v1700_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(success_ho_report_r17_present, 1)); - bool conn_est_fail_report_list_r17_present; - HANDLE_CODE(bref.unpack(conn_est_fail_report_list_r17_present, 1)); - bool coarse_location_info_r17_present; - HANDLE_CODE(bref.unpack(coarse_location_info_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (success_ho_report_r17_present) { - HANDLE_CODE(success_ho_report_r17.unpack(bref)); - } - if (conn_est_fail_report_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(conn_est_fail_report_list_r17, bref, 1, 4)); - } - if (coarse_location_info_r17_present) { - HANDLE_CODE(coarse_location_info_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_info_resp_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (success_ho_report_r17_present) { - j.write_fieldname("successHO-Report-r17"); - success_ho_report_r17.to_json(j); - } - if (conn_est_fail_report_list_r17.size() > 0) { - j.start_array("connEstFailReportList-r17"); - for (const auto& e1 : conn_est_fail_report_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (coarse_location_info_r17.size() > 0) { - j.write_str("coarseLocationInfo-r17", coarse_location_info_r17.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -// UEPositioningAssistanceInfo-v1720-IEs ::= SEQUENCE -SRSASN_CODE ue_positioning_assist_info_v1720_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ue_tx_teg_timing_error_margin_value_r17_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ue_tx_teg_timing_error_margin_value_r17_present) { - HANDLE_CODE(ue_tx_teg_timing_error_margin_value_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_positioning_assist_info_v1720_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ue_tx_teg_timing_error_margin_value_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ue_tx_teg_timing_error_margin_value_r17_present) { - HANDLE_CODE(ue_tx_teg_timing_error_margin_value_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ue_positioning_assist_info_v1720_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ue_tx_teg_timing_error_margin_value_r17_present) { - j.write_str("ue-TxTEG-TimingErrorMarginValue-r17", ue_tx_teg_timing_error_margin_value_r17.to_string()); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - j.start_obj(); - j.end_obj(); - } - j.end_obj(); -} - -const char* ue_positioning_assist_info_v1720_ies_s::ue_tx_teg_timing_error_margin_value_r17_opts::to_string() const -{ - static const char* names[] = {"tc0", - "tc2", - "tc4", - "tc6", - "tc8", - "tc12", - "tc16", - "tc20", - "tc24", - "tc32", - "tc40", - "tc48", - "tc56", - "tc64", - "tc72", - "tc80"}; - return convert_enum_idx( - names, 16, value, "ue_positioning_assist_info_v1720_ies_s::ue_tx_teg_timing_error_margin_value_r17_e_"); -} -uint8_t ue_positioning_assist_info_v1720_ies_s::ue_tx_teg_timing_error_margin_value_r17_opts::to_number() const -{ - static const uint8_t numbers[] = {0, 2, 4, 6, 8, 12, 16, 20, 24, 32, 40, 48, 56, 64, 72, 80}; - return map_enum_number( - numbers, 16, value, "ue_positioning_assist_info_v1720_ies_s::ue_tx_teg_timing_error_margin_value_r17_e_"); -} - -// ULInformationTransfer-v1700-IEs ::= SEQUENCE -SRSASN_CODE ul_info_transfer_v1700_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ded_info_f1c_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ded_info_f1c_r17.size() > 0) { - HANDLE_CODE(ded_info_f1c_r17.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_info_transfer_v1700_ies_s::unpack(cbit_ref& bref) -{ - bool ded_info_f1c_r17_present; - HANDLE_CODE(bref.unpack(ded_info_f1c_r17_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ded_info_f1c_r17_present) { - HANDLE_CODE(ded_info_f1c_r17.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ul_info_transfer_v1700_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ded_info_f1c_r17.size() > 0) { - j.write_str("dedicatedInfoF1c-r17", ded_info_f1c_r17.to_string()); - } - 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.size() > 0, 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.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE counter_check_resp_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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.size() > 0) { - 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(); -} - -// DedicatedSIBRequest-r16-IEs ::= SEQUENCE -SRSASN_CODE ded_sib_request_r16_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(on_demand_sib_request_list_r16_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (on_demand_sib_request_list_r16_present) { - HANDLE_CODE(bref.pack(on_demand_sib_request_list_r16.requested_sib_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(on_demand_sib_request_list_r16.requested_pos_sib_list_r16.size() > 0, 1)); - if (on_demand_sib_request_list_r16.requested_sib_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, on_demand_sib_request_list_r16.requested_sib_list_r16, 1, 8)); - } - if (on_demand_sib_request_list_r16.requested_pos_sib_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, on_demand_sib_request_list_r16.requested_pos_sib_list_r16, 1, 32)); - } - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ded_sib_request_r16_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(on_demand_sib_request_list_r16_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (on_demand_sib_request_list_r16_present) { - bool requested_sib_list_r16_present; - HANDLE_CODE(bref.unpack(requested_sib_list_r16_present, 1)); - bool requested_pos_sib_list_r16_present; - HANDLE_CODE(bref.unpack(requested_pos_sib_list_r16_present, 1)); - if (requested_sib_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(on_demand_sib_request_list_r16.requested_sib_list_r16, bref, 1, 8)); - } - if (requested_pos_sib_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(on_demand_sib_request_list_r16.requested_pos_sib_list_r16, bref, 1, 32)); - } - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ded_sib_request_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (on_demand_sib_request_list_r16_present) { - j.write_fieldname("onDemandSIB-RequestList-r16"); - j.start_obj(); - if (on_demand_sib_request_list_r16.requested_sib_list_r16.size() > 0) { - j.start_array("requestedSIB-List-r16"); - for (const auto& e1 : on_demand_sib_request_list_r16.requested_sib_list_r16) { - j.write_str(e1.to_string()); - } - j.end_array(); - } - if (on_demand_sib_request_list_r16.requested_pos_sib_list_r16.size() > 0) { - j.start_array("requestedPosSIB-List-r16"); - for (const auto& e1 : on_demand_sib_request_list_r16.requested_pos_sib_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - j.end_obj(); - } - if (late_non_crit_ext.size() > 0) { - 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.size() > 0, 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.size() > 0) { - 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 fail_info_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(fail_info_rlc_bearer_present, 1)); - bool late_non_crit_ext_present; - 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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(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.size() > 0) { - 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(); -} - -// IABOtherInformation-r16-IEs ::= SEQUENCE -SRSASN_CODE iab_other_info_r16_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(ip_info_type_r16.pack(bref)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE iab_other_info_r16_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(ip_info_type_r16.unpack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void iab_other_info_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("ip-InfoType-r16"); - ip_info_type_r16.to_json(j); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -void iab_other_info_r16_ies_s::ip_info_type_r16_c_::destroy_() -{ - switch (type_) { - case types::iab_ip_request_r16: - c.destroy(); - break; - case types::iab_ip_report_r16: - c.destroy(); - break; - default: - break; - } -} -void iab_other_info_r16_ies_s::ip_info_type_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::iab_ip_request_r16: - c.init(); - break; - case types::iab_ip_report_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_"); - } -} -iab_other_info_r16_ies_s::ip_info_type_r16_c_::ip_info_type_r16_c_( - const iab_other_info_r16_ies_s::ip_info_type_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::iab_ip_request_r16: - c.init(other.c.get()); - break; - case types::iab_ip_report_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_"); - } -} -iab_other_info_r16_ies_s::ip_info_type_r16_c_& -iab_other_info_r16_ies_s::ip_info_type_r16_c_::operator=(const iab_other_info_r16_ies_s::ip_info_type_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::iab_ip_request_r16: - c.set(other.c.get()); - break; - case types::iab_ip_report_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_"); - } - - return *this; -} -iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_& -iab_other_info_r16_ies_s::ip_info_type_r16_c_::set_iab_ip_request_r16() -{ - set(types::iab_ip_request_r16); - return c.get(); -} -iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_& -iab_other_info_r16_ies_s::ip_info_type_r16_c_::set_iab_ip_report_r16() -{ - set(types::iab_ip_report_r16); - return c.get(); -} -void iab_other_info_r16_ies_s::ip_info_type_r16_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::iab_ip_request_r16: - j.write_fieldname("iab-IP-Request-r16"); - j.start_obj(); - if (c.get().iab_ip_v4_address_num_req_r16_present) { - j.write_fieldname("iab-IPv4-AddressNumReq-r16"); - c.get().iab_ip_v4_address_num_req_r16.to_json(j); - } - if (c.get().iab_ip_v6_address_req_r16_present) { - j.write_fieldname("iab-IPv6-AddressReq-r16"); - c.get().iab_ip_v6_address_req_r16.to_json(j); - } - j.end_obj(); - break; - case types::iab_ip_report_r16: - j.write_fieldname("iab-IP-Report-r16"); - j.start_obj(); - if (c.get().iab_ip_v4_address_report_r16_present) { - j.write_fieldname("iab-IPv4-AddressReport-r16"); - c.get().iab_ip_v4_address_report_r16.to_json(j); - } - if (c.get().iab_ip_v6_report_r16_present) { - j.write_fieldname("iab-IPv6-Report-r16"); - c.get().iab_ip_v6_report_r16.to_json(j); - } - j.end_obj(); - break; - default: - log_invalid_choice_id(type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE iab_other_info_r16_ies_s::ip_info_type_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::iab_ip_request_r16: - HANDLE_CODE(bref.pack(c.get().iab_ip_v4_address_num_req_r16_present, 1)); - HANDLE_CODE(bref.pack(c.get().iab_ip_v6_address_req_r16_present, 1)); - if (c.get().iab_ip_v4_address_num_req_r16_present) { - HANDLE_CODE(c.get().iab_ip_v4_address_num_req_r16.pack(bref)); - } - if (c.get().iab_ip_v6_address_req_r16_present) { - HANDLE_CODE(c.get().iab_ip_v6_address_req_r16.pack(bref)); - } - break; - case types::iab_ip_report_r16: - HANDLE_CODE(bref.pack(c.get().iab_ip_v4_address_report_r16_present, 1)); - HANDLE_CODE(bref.pack(c.get().iab_ip_v6_report_r16_present, 1)); - if (c.get().iab_ip_v4_address_report_r16_present) { - HANDLE_CODE(c.get().iab_ip_v4_address_report_r16.pack(bref)); - } - if (c.get().iab_ip_v6_report_r16_present) { - HANDLE_CODE(c.get().iab_ip_v6_report_r16.pack(bref)); - } - break; - default: - log_invalid_choice_id(type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE iab_other_info_r16_ies_s::ip_info_type_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::iab_ip_request_r16: - HANDLE_CODE(bref.unpack(c.get().iab_ip_v4_address_num_req_r16_present, 1)); - HANDLE_CODE(bref.unpack(c.get().iab_ip_v6_address_req_r16_present, 1)); - if (c.get().iab_ip_v4_address_num_req_r16_present) { - HANDLE_CODE(c.get().iab_ip_v4_address_num_req_r16.unpack(bref)); - } - if (c.get().iab_ip_v6_address_req_r16_present) { - HANDLE_CODE(c.get().iab_ip_v6_address_req_r16.unpack(bref)); - } - break; - case types::iab_ip_report_r16: - HANDLE_CODE(bref.unpack(c.get().iab_ip_v4_address_report_r16_present, 1)); - HANDLE_CODE(bref.unpack(c.get().iab_ip_v6_report_r16_present, 1)); - if (c.get().iab_ip_v4_address_report_r16_present) { - HANDLE_CODE(c.get().iab_ip_v4_address_report_r16.unpack(bref)); - } - if (c.get().iab_ip_v6_report_r16_present) { - HANDLE_CODE(c.get().iab_ip_v6_report_r16.unpack(bref)); - } - break; - default: - log_invalid_choice_id(type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::destroy_() -{ - switch (type_) { - case types::iab_ip_v6_address_num_req_r16: - c.destroy(); - break; - case types::iab_ip_v6_address_prefix_req_r16: - c.destroy(); - break; - default: - break; - } -} -void iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::set( - types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::iab_ip_v6_address_num_req_r16: - c.init(); - break; - case types::iab_ip_v6_address_prefix_req_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_"); - } -} -iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_:: - iab_ip_v6_address_req_r16_c_( - const iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::iab_ip_v6_address_num_req_r16: - c.init(other.c.get()); - break; - case types::iab_ip_v6_address_prefix_req_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_"); - } -} -iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_& -iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::operator=( - const iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::iab_ip_v6_address_num_req_r16: - c.set(other.c.get()); - break; - case types::iab_ip_v6_address_prefix_req_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_"); - } - - return *this; -} -iab_ip_address_num_req_r16_s& iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_:: - iab_ip_v6_address_req_r16_c_::set_iab_ip_v6_address_num_req_r16() -{ - set(types::iab_ip_v6_address_num_req_r16); - return c.get(); -} -iab_ip_address_prefix_req_r16_s& iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_:: - iab_ip_v6_address_req_r16_c_::set_iab_ip_v6_address_prefix_req_r16() -{ - set(types::iab_ip_v6_address_prefix_req_r16); - return c.get(); -} -void iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::to_json( - json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::iab_ip_v6_address_num_req_r16: - j.write_fieldname("iab-IPv6-AddressNumReq-r16"); - c.get().to_json(j); - break; - case types::iab_ip_v6_address_prefix_req_r16: - j.write_fieldname("iab-IPv6-AddressPrefixReq-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id( - type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::pack( - bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::iab_ip_v6_address_num_req_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::iab_ip_v6_address_prefix_req_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id( - type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::unpack( - cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::iab_ip_v6_address_num_req_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::iab_ip_v6_address_prefix_req_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id( - type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::destroy_() -{ - switch (type_) { - case types::iab_ip_v6_address_report_r16: - c.destroy(); - break; - case types::iab_ip_v6_prefix_report_r16: - c.destroy(); - break; - default: - break; - } -} -void iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::iab_ip_v6_address_report_r16: - c.init(); - break; - case types::iab_ip_v6_prefix_report_r16: - c.init(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_"); - } -} -iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::iab_ip_v6_report_r16_c_( - const iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::iab_ip_v6_address_report_r16: - c.init(other.c.get()); - break; - case types::iab_ip_v6_prefix_report_r16: - c.init(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_"); - } -} -iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_& -iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::operator=( - const iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::iab_ip_v6_address_report_r16: - c.set(other.c.get()); - break; - case types::iab_ip_v6_prefix_report_r16: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id( - type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_"); - } - - return *this; -} -iab_ip_address_and_traffic_r16_s& iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_:: - iab_ip_v6_report_r16_c_::set_iab_ip_v6_address_report_r16() -{ - set(types::iab_ip_v6_address_report_r16); - return c.get(); -} -iab_ip_prefix_and_traffic_r16_s& iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_:: - iab_ip_v6_report_r16_c_::set_iab_ip_v6_prefix_report_r16() -{ - set(types::iab_ip_v6_prefix_report_r16); - return c.get(); -} -void iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::to_json( - json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::iab_ip_v6_address_report_r16: - j.write_fieldname("iab-IPv6-AddressReport-r16"); - c.get().to_json(j); - break; - case types::iab_ip_v6_prefix_report_r16: - j.write_fieldname("iab-IPv6-PrefixReport-r16"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id( - type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_"); - } - j.end_obj(); -} -SRSASN_CODE -iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::iab_ip_v6_address_report_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - case types::iab_ip_v6_prefix_report_r16: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id( - type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE -iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::iab_ip_v6_address_report_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - case types::iab_ip_v6_prefix_report_r16: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id( - type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// LocationMeasurementIndication-IEs ::= SEQUENCE -SRSASN_CODE location_meas_ind_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(meas_ind.pack(bref)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE location_meas_ind_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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.size() > 0) { - 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(); -} - -// MBSInterestIndication-r17-IEs ::= SEQUENCE -SRSASN_CODE mb_si_nterest_ind_r17_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(mbs_freq_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(mbs_prio_r17_present, 1)); - HANDLE_CODE(bref.pack(mbs_service_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (mbs_freq_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, mbs_freq_list_r17, 1, 16, integer_packer(0, 3279165))); - } - if (mbs_service_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, mbs_service_list_r17, 1, 16)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mb_si_nterest_ind_r17_ies_s::unpack(cbit_ref& bref) -{ - bool mbs_freq_list_r17_present; - HANDLE_CODE(bref.unpack(mbs_freq_list_r17_present, 1)); - HANDLE_CODE(bref.unpack(mbs_prio_r17_present, 1)); - bool mbs_service_list_r17_present; - HANDLE_CODE(bref.unpack(mbs_service_list_r17_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (mbs_freq_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(mbs_freq_list_r17, bref, 1, 16, integer_packer(0, 3279165))); - } - if (mbs_service_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(mbs_service_list_r17, bref, 1, 16)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void mb_si_nterest_ind_r17_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (mbs_freq_list_r17.size() > 0) { - j.start_array("mbs-FreqList-r17"); - for (const auto& e1 : mbs_freq_list_r17) { - j.write_int(e1); - } - j.end_array(); - } - if (mbs_prio_r17_present) { - j.write_str("mbs-Priority-r17", "true"); - } - if (mbs_service_list_r17.size() > 0) { - j.start_array("mbs-ServiceList-r17"); - for (const auto& e1 : mbs_service_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// MCGFailureInformation-r16-IEs ::= SEQUENCE -SRSASN_CODE mcg_fail_info_r16_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(fail_report_mcg_r16_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (fail_report_mcg_r16_present) { - HANDLE_CODE(fail_report_mcg_r16.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE mcg_fail_info_r16_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(fail_report_mcg_r16_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (fail_report_mcg_r16_present) { - HANDLE_CODE(fail_report_mcg_r16.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void mcg_fail_info_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (fail_report_mcg_r16_present) { - j.write_fieldname("failureReportMCG-r16"); - fail_report_mcg_r16.to_json(j); - } - if (late_non_crit_ext.size() > 0) { - 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(meas_results.pack(bref)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE meas_report_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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; -} -void meas_report_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("measResults"); - meas_results.to_json(j); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// RRCReconfigurationComplete-IEs ::= SEQUENCE -SRSASN_CODE rrc_recfg_complete_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (late_non_crit_ext.size() > 0) { - 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_recfg_complete_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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 rrc_recfg_complete_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// RRCReestablishmentComplete-IEs ::= SEQUENCE -SRSASN_CODE rrc_reest_complete_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (late_non_crit_ext.size() > 0) { - 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_reest_complete_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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 rrc_reest_complete_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// RRCResumeComplete-IEs ::= SEQUENCE -SRSASN_CODE rrc_resume_complete_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ded_nas_msg.size() > 0, 1)); - HANDLE_CODE(bref.pack(sel_plmn_id_present, 1)); - HANDLE_CODE(bref.pack(ul_tx_direct_current_list.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ded_nas_msg.size() > 0) { - 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.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_list, 1, 32)); - } - if (late_non_crit_ext.size() > 0) { - 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_resume_complete_ies_s::unpack(cbit_ref& bref) -{ - bool ded_nas_msg_present; - HANDLE_CODE(bref.unpack(ded_nas_msg_present, 1)); - HANDLE_CODE(bref.unpack(sel_plmn_id_present, 1)); - bool ul_tx_direct_current_list_present; - HANDLE_CODE(bref.unpack(ul_tx_direct_current_list_present, 1)); - bool late_non_crit_ext_present; - 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 (sel_plmn_id_present) { - HANDLE_CODE(unpack_integer(sel_plmn_id, bref, (uint8_t)1u, (uint8_t)12u)); - } - if (ul_tx_direct_current_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_list, bref, 1, 32)); - } - 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_resume_complete_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ded_nas_msg.size() > 0) { - j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); - } - if (sel_plmn_id_present) { - j.write_int("selectedPLMN-Identity", sel_plmn_id); - } - if (ul_tx_direct_current_list.size() > 0) { - j.start_array("uplinkTxDirectCurrentList"); - for (const auto& e1 : ul_tx_direct_current_list) { - e1.to_json(j); - } - j.end_array(); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// 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.size() > 0, 1)); - HANDLE_CODE(bref.pack(ng_5_g_s_tmsi_value_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 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 (guami_type_present) { - HANDLE_CODE(guami_type.pack(bref)); - } - if (s_nssai_list.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, s_nssai_list, 1, 8)); - } - HANDLE_CODE(ded_nas_msg.pack(bref)); - if (ng_5_g_s_tmsi_value_present) { - HANDLE_CODE(ng_5_g_s_tmsi_value.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - 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_setup_complete_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(registered_amf_present, 1)); - HANDLE_CODE(bref.unpack(guami_type_present, 1)); - bool s_nssai_list_present; - HANDLE_CODE(bref.unpack(s_nssai_list_present, 1)); - HANDLE_CODE(bref.unpack(ng_5_g_s_tmsi_value_present, 1)); - bool late_non_crit_ext_present; - 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 (guami_type_present) { - HANDLE_CODE(guami_type.unpack(bref)); - } - if (s_nssai_list_present) { - HANDLE_CODE(unpack_dyn_seq_of(s_nssai_list, bref, 1, 8)); - } - HANDLE_CODE(ded_nas_msg.unpack(bref)); - if (ng_5_g_s_tmsi_value_present) { - HANDLE_CODE(ng_5_g_s_tmsi_value.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_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 (guami_type_present) { - j.write_str("guami-Type", guami_type.to_string()); - } - if (s_nssai_list.size() > 0) { - j.start_array("s-NSSAI-List"); - for (const auto& e1 : s_nssai_list) { - e1.to_json(j); - } - j.end_array(); - } - j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); - if (ng_5_g_s_tmsi_value_present) { - j.write_fieldname("ng-5G-S-TMSI-Value"); - ng_5_g_s_tmsi_value.to_json(j); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -const char* rrc_setup_complete_ies_s::guami_type_opts::to_string() const -{ - static const char* names[] = {"native", "mapped"}; - return convert_enum_idx(names, 2, value, "rrc_setup_complete_ies_s::guami_type_e_"); -} - -void rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::destroy_() -{ - switch (type_) { - case types::ng_5_g_s_tmsi: - c.destroy>(); - break; - case types::ng_5_g_s_tmsi_part2: - c.destroy>(); - break; - default: - break; - } -} -void rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::set(types::options e) -{ - destroy_(); - type_ = e; - switch (type_) { - case types::ng_5_g_s_tmsi: - c.init>(); - break; - case types::ng_5_g_s_tmsi_part2: - c.init>(); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_"); - } -} -rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::ng_5_g_s_tmsi_value_c_( - const rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::ng_5_g_s_tmsi: - c.init(other.c.get>()); - break; - case types::ng_5_g_s_tmsi_part2: - c.init(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_"); - } -} -rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_& rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::operator=( - const rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ng_5_g_s_tmsi: - c.set(other.c.get>()); - break; - case types::ng_5_g_s_tmsi_part2: - c.set(other.c.get>()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_"); - } - - return *this; -} -fixed_bitstring<48>& rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::set_ng_5_g_s_tmsi() -{ - set(types::ng_5_g_s_tmsi); - return c.get>(); -} -fixed_bitstring<9>& rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::set_ng_5_g_s_tmsi_part2() -{ - set(types::ng_5_g_s_tmsi_part2); - return c.get>(); -} -void rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ng_5_g_s_tmsi: - j.write_str("ng-5G-S-TMSI", c.get>().to_string()); - break; - case types::ng_5_g_s_tmsi_part2: - j.write_str("ng-5G-S-TMSI-Part2", c.get>().to_string()); - break; - default: - log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_"); - } - j.end_obj(); -} -SRSASN_CODE rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ng_5_g_s_tmsi: - HANDLE_CODE(c.get>().pack(bref)); - break; - case types::ng_5_g_s_tmsi_part2: - HANDLE_CODE(c.get>().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ng_5_g_s_tmsi: - HANDLE_CODE(c.get>().unpack(bref)); - break; - case types::ng_5_g_s_tmsi_part2: - HANDLE_CODE(c.get>().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// SCGFailureInformation-IEs ::= SEQUENCE -SRSASN_CODE scg_fail_info_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(fail_report_scg_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - 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 scg_fail_info_ies_s::unpack(cbit_ref& 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 scg_fail_info_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - 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(); -} - -// SCGFailureInformationEUTRA-IEs ::= SEQUENCE -SRSASN_CODE scg_fail_info_eutra_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(fail_report_scg_eutra_present, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (fail_report_scg_eutra_present) { - HANDLE_CODE(fail_report_scg_eutra.pack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE scg_fail_info_eutra_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(fail_report_scg_eutra_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (fail_report_scg_eutra_present) { - HANDLE_CODE(fail_report_scg_eutra.unpack(bref)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void scg_fail_info_eutra_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (fail_report_scg_eutra_present) { - j.write_fieldname("failureReportSCG-EUTRA"); - fail_report_scg_eutra.to_json(j); - } - if (non_crit_ext_present) { - j.write_fieldname("nonCriticalExtension"); - non_crit_ext.to_json(j); - } - j.end_obj(); -} - -// SecurityModeComplete-IEs ::= SEQUENCE -SRSASN_CODE security_mode_complete_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE security_mode_complete_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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 -{ - j.start_obj(); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// SecurityModeFailure-IEs ::= SEQUENCE -SRSASN_CODE security_mode_fail_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE security_mode_fail_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - 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_fail_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// SidelinkUEInformationNR-r16-IEs ::= SEQUENCE -SRSASN_CODE sidelink_ue_info_nr_r16_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(sl_rx_interested_freq_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_tx_res_req_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(sl_fail_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (sl_rx_interested_freq_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_rx_interested_freq_list_r16, 1, 8, integer_packer(1, 8))); - } - if (sl_tx_res_req_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_res_req_list_r16, 1, 32)); - } - if (sl_fail_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, sl_fail_list_r16, 1, 32)); - } - if (late_non_crit_ext.size() > 0) { - 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 sidelink_ue_info_nr_r16_ies_s::unpack(cbit_ref& bref) -{ - bool sl_rx_interested_freq_list_r16_present; - HANDLE_CODE(bref.unpack(sl_rx_interested_freq_list_r16_present, 1)); - bool sl_tx_res_req_list_r16_present; - HANDLE_CODE(bref.unpack(sl_tx_res_req_list_r16_present, 1)); - bool sl_fail_list_r16_present; - HANDLE_CODE(bref.unpack(sl_fail_list_r16_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (sl_rx_interested_freq_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_rx_interested_freq_list_r16, bref, 1, 8, integer_packer(1, 8))); - } - if (sl_tx_res_req_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_tx_res_req_list_r16, bref, 1, 32)); - } - if (sl_fail_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(sl_fail_list_r16, bref, 1, 32)); - } - 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 sidelink_ue_info_nr_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (sl_rx_interested_freq_list_r16.size() > 0) { - j.start_array("sl-RxInterestedFreqList-r16"); - for (const auto& e1 : sl_rx_interested_freq_list_r16) { - j.write_int(e1); - } - j.end_array(); - } - if (sl_tx_res_req_list_r16.size() > 0) { - j.start_array("sl-TxResourceReqList-r16"); - for (const auto& e1 : sl_tx_res_req_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (sl_fail_list_r16.size() > 0) { - j.start_array("sl-FailureList-r16"); - for (const auto& e1 : sl_fail_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// UEAssistanceInformation-IEs ::= SEQUENCE -SRSASN_CODE ue_assist_info_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(delay_budget_report_present, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 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.size() > 0) { - 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 ue_assist_info_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(delay_budget_report_present, 1)); - bool late_non_crit_ext_present; - 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)); - } - - return SRSASN_SUCCESS; -} -void ue_assist_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.size() > 0) { - 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.size() > 0, 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.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_cap_info_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(ue_cap_rat_container_list_present, 1)); - bool late_non_crit_ext_present; - 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; -} -void ue_cap_info_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ue_cap_rat_container_list_present) { - j.start_array("ue-CapabilityRAT-ContainerList"); - for (const auto& e1 : ue_cap_rat_container_list) { - e1.to_json(j); - } - j.end_array(); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// UEInformationResponse-r16-IEs ::= SEQUENCE -SRSASN_CODE ue_info_resp_r16_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(meas_result_idle_eutra_r16_present, 1)); - HANDLE_CODE(bref.pack(meas_result_idle_nr_r16_present, 1)); - HANDLE_CODE(bref.pack(log_meas_report_r16_present, 1)); - HANDLE_CODE(bref.pack(conn_est_fail_report_r16_present, 1)); - HANDLE_CODE(bref.pack(ra_report_list_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(rlf_report_r16_present, 1)); - HANDLE_CODE(bref.pack(mob_history_report_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (meas_result_idle_eutra_r16_present) { - HANDLE_CODE(meas_result_idle_eutra_r16.pack(bref)); - } - if (meas_result_idle_nr_r16_present) { - HANDLE_CODE(meas_result_idle_nr_r16.pack(bref)); - } - if (log_meas_report_r16_present) { - HANDLE_CODE(log_meas_report_r16.pack(bref)); - } - if (conn_est_fail_report_r16_present) { - HANDLE_CODE(conn_est_fail_report_r16.pack(bref)); - } - if (ra_report_list_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, ra_report_list_r16, 1, 8)); - } - if (rlf_report_r16_present) { - HANDLE_CODE(rlf_report_r16.pack(bref)); - } - if (mob_history_report_r16.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, mob_history_report_r16, 1, 16)); - } - if (late_non_crit_ext.size() > 0) { - 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 ue_info_resp_r16_ies_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(bref.unpack(meas_result_idle_eutra_r16_present, 1)); - HANDLE_CODE(bref.unpack(meas_result_idle_nr_r16_present, 1)); - HANDLE_CODE(bref.unpack(log_meas_report_r16_present, 1)); - HANDLE_CODE(bref.unpack(conn_est_fail_report_r16_present, 1)); - bool ra_report_list_r16_present; - HANDLE_CODE(bref.unpack(ra_report_list_r16_present, 1)); - HANDLE_CODE(bref.unpack(rlf_report_r16_present, 1)); - bool mob_history_report_r16_present; - HANDLE_CODE(bref.unpack(mob_history_report_r16_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (meas_result_idle_eutra_r16_present) { - HANDLE_CODE(meas_result_idle_eutra_r16.unpack(bref)); - } - if (meas_result_idle_nr_r16_present) { - HANDLE_CODE(meas_result_idle_nr_r16.unpack(bref)); - } - if (log_meas_report_r16_present) { - HANDLE_CODE(log_meas_report_r16.unpack(bref)); - } - if (conn_est_fail_report_r16_present) { - HANDLE_CODE(conn_est_fail_report_r16.unpack(bref)); - } - if (ra_report_list_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(ra_report_list_r16, bref, 1, 8)); - } - if (rlf_report_r16_present) { - HANDLE_CODE(rlf_report_r16.unpack(bref)); - } - if (mob_history_report_r16_present) { - HANDLE_CODE(unpack_dyn_seq_of(mob_history_report_r16, bref, 1, 16)); - } - 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 ue_info_resp_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (meas_result_idle_eutra_r16_present) { - j.write_fieldname("measResultIdleEUTRA-r16"); - meas_result_idle_eutra_r16.to_json(j); - } - if (meas_result_idle_nr_r16_present) { - j.write_fieldname("measResultIdleNR-r16"); - meas_result_idle_nr_r16.to_json(j); - } - if (log_meas_report_r16_present) { - j.write_fieldname("logMeasReport-r16"); - log_meas_report_r16.to_json(j); - } - if (conn_est_fail_report_r16_present) { - j.write_fieldname("connEstFailReport-r16"); - conn_est_fail_report_r16.to_json(j); - } - if (ra_report_list_r16.size() > 0) { - j.start_array("ra-ReportList-r16"); - for (const auto& e1 : ra_report_list_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (rlf_report_r16_present) { - j.write_fieldname("rlf-Report-r16"); - rlf_report_r16.to_json(j); - } - if (mob_history_report_r16.size() > 0) { - j.start_array("mobilityHistoryReport-r16"); - for (const auto& e1 : mob_history_report_r16) { - e1.to_json(j); - } - j.end_array(); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// UEPositioningAssistanceInfo-r17-IEs ::= SEQUENCE -SRSASN_CODE ue_positioning_assist_info_r17_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ue_tx_teg_assoc_list_r17.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ue_tx_teg_assoc_list_r17.size() > 0) { - HANDLE_CODE(pack_dyn_seq_of(bref, ue_tx_teg_assoc_list_r17, 1, 256)); - } - if (late_non_crit_ext.size() > 0) { - 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 ue_positioning_assist_info_r17_ies_s::unpack(cbit_ref& bref) -{ - bool ue_tx_teg_assoc_list_r17_present; - HANDLE_CODE(bref.unpack(ue_tx_teg_assoc_list_r17_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ue_tx_teg_assoc_list_r17_present) { - HANDLE_CODE(unpack_dyn_seq_of(ue_tx_teg_assoc_list_r17, bref, 1, 256)); - } - 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 ue_positioning_assist_info_r17_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ue_tx_teg_assoc_list_r17.size() > 0) { - j.start_array("ue-TxTEG-AssociationList-r17"); - for (const auto& e1 : ue_tx_teg_assoc_list_r17) { - e1.to_json(j); - } - j.end_array(); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// ULDedicatedMessageSegment-r16-IEs ::= SEQUENCE -SRSASN_CODE ul_ded_msg_segment_r16_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - HANDLE_CODE(pack_integer(bref, segment_num_r16, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(rrc_msg_segment_container_r16.pack(bref)); - HANDLE_CODE(rrc_msg_segment_type_r16.pack(bref)); - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_ded_msg_segment_r16_ies_s::unpack(cbit_ref& bref) -{ - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - HANDLE_CODE(unpack_integer(segment_num_r16, bref, (uint8_t)0u, (uint8_t)15u)); - HANDLE_CODE(rrc_msg_segment_container_r16.unpack(bref)); - HANDLE_CODE(rrc_msg_segment_type_r16.unpack(bref)); - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ul_ded_msg_segment_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_int("segmentNumber-r16", segment_num_r16); - j.write_str("rrc-MessageSegmentContainer-r16", rrc_msg_segment_container_r16.to_string()); - j.write_str("rrc-MessageSegmentType-r16", rrc_msg_segment_type_r16.to_string()); - if (late_non_crit_ext.size() > 0) { - 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(); -} - -const char* ul_ded_msg_segment_r16_ies_s::rrc_msg_segment_type_r16_opts::to_string() const -{ - static const char* names[] = {"notLastSegment", "lastSegment"}; - return convert_enum_idx(names, 2, value, "ul_ded_msg_segment_r16_ies_s::rrc_msg_segment_type_r16_e_"); -} - -// ULInformationTransfer-IEs ::= SEQUENCE -SRSASN_CODE ul_info_transfer_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ded_nas_msg.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ded_nas_msg.size() > 0) { - HANDLE_CODE(ded_nas_msg.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - 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 ul_info_transfer_ies_s::unpack(cbit_ref& bref) -{ - bool ded_nas_msg_present; - HANDLE_CODE(bref.unpack(ded_nas_msg_present, 1)); - bool late_non_crit_ext_present; - 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)); - } - if (non_crit_ext_present) { - HANDLE_CODE(non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ul_info_transfer_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ded_nas_msg.size() > 0) { - j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// ULInformationTransferIRAT-r16-IEs ::= SEQUENCE -SRSASN_CODE ul_info_transfer_irat_r16_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_dcch_msg_eutra_r16.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ul_dcch_msg_eutra_r16.size() > 0) { - HANDLE_CODE(ul_dcch_msg_eutra_r16.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_info_transfer_irat_r16_ies_s::unpack(cbit_ref& bref) -{ - bool ul_dcch_msg_eutra_r16_present; - HANDLE_CODE(bref.unpack(ul_dcch_msg_eutra_r16_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ul_dcch_msg_eutra_r16_present) { - HANDLE_CODE(ul_dcch_msg_eutra_r16.unpack(bref)); - } - if (late_non_crit_ext_present) { - HANDLE_CODE(late_non_crit_ext.unpack(bref)); - } - - return SRSASN_SUCCESS; -} -void ul_info_transfer_irat_r16_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ul_dcch_msg_eutra_r16.size() > 0) { - j.write_str("ul-DCCH-MessageEUTRA-r16", ul_dcch_msg_eutra_r16.to_string()); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// ULInformationTransferMRDC-IEs ::= SEQUENCE -SRSASN_CODE ul_info_transfer_mrdc_ies_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(bref.pack(ul_dcch_msg_nr.size() > 0, 1)); - HANDLE_CODE(bref.pack(ul_dcch_msg_eutra.size() > 0, 1)); - HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); - HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); - - if (ul_dcch_msg_nr.size() > 0) { - HANDLE_CODE(ul_dcch_msg_nr.pack(bref)); - } - if (ul_dcch_msg_eutra.size() > 0) { - HANDLE_CODE(ul_dcch_msg_eutra.pack(bref)); - } - if (late_non_crit_ext.size() > 0) { - HANDLE_CODE(late_non_crit_ext.pack(bref)); - } - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_info_transfer_mrdc_ies_s::unpack(cbit_ref& bref) -{ - bool ul_dcch_msg_nr_present; - HANDLE_CODE(bref.unpack(ul_dcch_msg_nr_present, 1)); - bool ul_dcch_msg_eutra_present; - HANDLE_CODE(bref.unpack(ul_dcch_msg_eutra_present, 1)); - bool late_non_crit_ext_present; - HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); - HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); - - if (ul_dcch_msg_nr_present) { - HANDLE_CODE(ul_dcch_msg_nr.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 ul_info_transfer_mrdc_ies_s::to_json(json_writer& j) const -{ - j.start_obj(); - if (ul_dcch_msg_nr.size() > 0) { - j.write_str("ul-DCCH-MessageNR", ul_dcch_msg_nr.to_string()); - } - if (ul_dcch_msg_eutra.size() > 0) { - j.write_str("ul-DCCH-MessageEUTRA", ul_dcch_msg_eutra.to_string()); - } - if (late_non_crit_ext.size() > 0) { - 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(); -} - -// 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_::set(types::options e) -{ - type_ = e; -} -counter_check_resp_ies_s& counter_check_resp_s::crit_exts_c_::set_counter_check_resp() -{ - set(types::counter_check_resp); - return c; -} -void counter_check_resp_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void counter_check_resp_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::counter_check_resp: - j.write_fieldname("counterCheckResponse"); - c.to_json(j); - break; - case types::crit_exts_future: - 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.pack(bref)); - break; - case types::crit_exts_future: - 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.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// DedicatedSIBRequest-r16 ::= SEQUENCE -SRSASN_CODE ded_sib_request_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ded_sib_request_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ded_sib_request_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void ded_sib_request_r16_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -ded_sib_request_r16_ies_s& ded_sib_request_r16_s::crit_exts_c_::set_ded_sib_request_r16() -{ - set(types::ded_sib_request_r16); - return c; -} -void ded_sib_request_r16_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void ded_sib_request_r16_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ded_sib_request_r16: - j.write_fieldname("dedicatedSIBRequest-r16"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ded_sib_request_r16_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE ded_sib_request_r16_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ded_sib_request_r16: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ded_sib_request_r16_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ded_sib_request_r16_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ded_sib_request_r16: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ded_sib_request_r16_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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_::set(types::options e) -{ - type_ = e; -} -fail_info_ies_s& fail_info_s::crit_exts_c_::set_fail_info() -{ - set(types::fail_info); - return c; -} -void fail_info_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -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.to_json(j); - break; - case types::crit_exts_future: - 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.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE fail_info_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::fail_info: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// IABOtherInformation-r16 ::= SEQUENCE -SRSASN_CODE iab_other_info_r16_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 iab_other_info_r16_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 iab_other_info_r16_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 iab_other_info_r16_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -iab_other_info_r16_ies_s& iab_other_info_r16_s::crit_exts_c_::set_iab_other_info_r16() -{ - set(types::iab_other_info_r16); - return c; -} -void iab_other_info_r16_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void iab_other_info_r16_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::iab_other_info_r16: - j.write_fieldname("iabOtherInformation-r16"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "iab_other_info_r16_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE iab_other_info_r16_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::iab_other_info_r16: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "iab_other_info_r16_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE iab_other_info_r16_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::iab_other_info_r16: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "iab_other_info_r16_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// LocationMeasurementIndication ::= SEQUENCE -SRSASN_CODE location_meas_ind_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -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 -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void location_meas_ind_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -location_meas_ind_ies_s& location_meas_ind_s::crit_exts_c_::set_location_meas_ind() -{ - set(types::location_meas_ind); - return c; -} -void location_meas_ind_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void location_meas_ind_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::location_meas_ind: - j.write_fieldname("locationMeasurementIndication"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE location_meas_ind_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::location_meas_ind: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE location_meas_ind_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::location_meas_ind: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// MBSInterestIndication-r17 ::= SEQUENCE -SRSASN_CODE mb_si_nterest_ind_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mb_si_nterest_ind_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void mb_si_nterest_ind_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void mb_si_nterest_ind_r17_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -mb_si_nterest_ind_r17_ies_s& mb_si_nterest_ind_r17_s::crit_exts_c_::set_mbs_interest_ind_r17() -{ - set(types::mbs_interest_ind_r17); - return c; -} -void mb_si_nterest_ind_r17_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void mb_si_nterest_ind_r17_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::mbs_interest_ind_r17: - j.write_fieldname("mbsInterestIndication-r17"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "mb_si_nterest_ind_r17_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE mb_si_nterest_ind_r17_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::mbs_interest_ind_r17: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "mb_si_nterest_ind_r17_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE mb_si_nterest_ind_r17_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::mbs_interest_ind_r17: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "mb_si_nterest_ind_r17_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// MCGFailureInformation-r16 ::= SEQUENCE -SRSASN_CODE mcg_fail_info_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE mcg_fail_info_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void mcg_fail_info_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void mcg_fail_info_r16_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -mcg_fail_info_r16_ies_s& mcg_fail_info_r16_s::crit_exts_c_::set_mcg_fail_info_r16() -{ - set(types::mcg_fail_info_r16); - return c; -} -void mcg_fail_info_r16_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void mcg_fail_info_r16_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::mcg_fail_info_r16: - j.write_fieldname("mcgFailureInformation-r16"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "mcg_fail_info_r16_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE mcg_fail_info_r16_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::mcg_fail_info_r16: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "mcg_fail_info_r16_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE mcg_fail_info_r16_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::mcg_fail_info_r16: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "mcg_fail_info_r16_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// MeasurementReport ::= SEQUENCE -SRSASN_CODE meas_report_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -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 -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void meas_report_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -meas_report_ies_s& meas_report_s::crit_exts_c_::set_meas_report() -{ - set(types::meas_report); - return c; -} -void meas_report_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void meas_report_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::meas_report: - j.write_fieldname("measurementReport"); - c.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(); -} -SRSASN_CODE meas_report_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::meas_report: - HANDLE_CODE(c.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; -} -SRSASN_CODE meas_report_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::meas_report: - HANDLE_CODE(c.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; -} - -// RRCReconfigurationComplete ::= SEQUENCE -SRSASN_CODE rrc_recfg_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 rrc_recfg_complete_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_complete_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_complete_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -rrc_recfg_complete_ies_s& rrc_recfg_complete_s::crit_exts_c_::set_rrc_recfg_complete() -{ - set(types::rrc_recfg_complete); - return c; -} -void rrc_recfg_complete_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void rrc_recfg_complete_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rrc_recfg_complete: - j.write_fieldname("rrcReconfigurationComplete"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE rrc_recfg_complete_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rrc_recfg_complete: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_recfg_complete_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_recfg_complete: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// RRCReestablishmentComplete ::= SEQUENCE -SRSASN_CODE rrc_reest_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 rrc_reest_complete_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_complete_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_complete_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -rrc_reest_complete_ies_s& rrc_reest_complete_s::crit_exts_c_::set_rrc_reest_complete() -{ - set(types::rrc_reest_complete); - return c; -} -void rrc_reest_complete_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -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.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.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) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_reest_complete: - HANDLE_CODE(c.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; -} - -// 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)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_complete_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_resume_complete_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_complete_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -rrc_resume_complete_ies_s& rrc_resume_complete_s::crit_exts_c_::set_rrc_resume_complete() -{ - set(types::rrc_resume_complete); - return c; -} -void rrc_resume_complete_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void rrc_resume_complete_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rrc_resume_complete: - j.write_fieldname("rrcResumeComplete"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); - } - 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.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; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_resume_complete_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::rrc_resume_complete: - HANDLE_CODE(c.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; - } - return SRSASN_SUCCESS; -} - -// 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)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE rrc_setup_complete_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_complete_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_complete_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -rrc_setup_complete_ies_s& rrc_setup_complete_s::crit_exts_c_::set_rrc_setup_complete() -{ - set(types::rrc_setup_complete); - return c; -} -void rrc_setup_complete_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void rrc_setup_complete_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::rrc_setup_complete: - j.write_fieldname("rrcSetupComplete"); - c.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(); -} -SRSASN_CODE rrc_setup_complete_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::rrc_setup_complete: - HANDLE_CODE(c.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; - } - 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.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; -} - -// SCGFailureInformation ::= SEQUENCE -SRSASN_CODE scg_fail_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE scg_fail_info_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void scg_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 scg_fail_info_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -scg_fail_info_ies_s& scg_fail_info_s::crit_exts_c_::set_scg_fail_info() -{ - set(types::scg_fail_info); - return c; -} -void scg_fail_info_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void scg_fail_info_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::scg_fail_info: - j.write_fieldname("scgFailureInformation"); - c.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(); -} -SRSASN_CODE scg_fail_info_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::scg_fail_info: - HANDLE_CODE(c.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; -} -SRSASN_CODE scg_fail_info_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::scg_fail_info: - HANDLE_CODE(c.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; -} - -// SCGFailureInformationEUTRA ::= SEQUENCE -SRSASN_CODE scg_fail_info_eutra_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE scg_fail_info_eutra_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void scg_fail_info_eutra_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void scg_fail_info_eutra_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -scg_fail_info_eutra_ies_s& scg_fail_info_eutra_s::crit_exts_c_::set_scg_fail_info_eutra() -{ - set(types::scg_fail_info_eutra); - return c; -} -void scg_fail_info_eutra_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void scg_fail_info_eutra_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::scg_fail_info_eutra: - j.write_fieldname("scgFailureInformationEUTRA"); - c.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(); -} -SRSASN_CODE scg_fail_info_eutra_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::scg_fail_info_eutra: - HANDLE_CODE(c.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 scg_fail_info_eutra_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::scg_fail_info_eutra: - HANDLE_CODE(c.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; -} - -// 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) -{ - 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_complete_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_complete_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -security_mode_complete_ies_s& security_mode_complete_s::crit_exts_c_::set_security_mode_complete() -{ - set(types::security_mode_complete); - return c; -} -void security_mode_complete_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void security_mode_complete_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::security_mode_complete: - j.write_fieldname("securityModeComplete"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE security_mode_complete_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::security_mode_complete: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE security_mode_complete_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::security_mode_complete: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// SecurityModeFailure ::= SEQUENCE -SRSASN_CODE security_mode_fail_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_fail_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_fail_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_fail_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -security_mode_fail_ies_s& security_mode_fail_s::crit_exts_c_::set_security_mode_fail() -{ - set(types::security_mode_fail); - return c; -} -void security_mode_fail_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -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.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(); -} -SRSASN_CODE security_mode_fail_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::security_mode_fail: - HANDLE_CODE(c.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.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; -} - -// SidelinkUEInformationNR-r16 ::= SEQUENCE -SRSASN_CODE sidelink_ue_info_nr_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE sidelink_ue_info_nr_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void sidelink_ue_info_nr_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void sidelink_ue_info_nr_r16_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -sidelink_ue_info_nr_r16_ies_s& sidelink_ue_info_nr_r16_s::crit_exts_c_::set_sidelink_ue_info_nr_r16() -{ - set(types::sidelink_ue_info_nr_r16); - return c; -} -void sidelink_ue_info_nr_r16_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void sidelink_ue_info_nr_r16_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::sidelink_ue_info_nr_r16: - j.write_fieldname("sidelinkUEInformationNR-r16"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "sidelink_ue_info_nr_r16_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE sidelink_ue_info_nr_r16_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::sidelink_ue_info_nr_r16: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "sidelink_ue_info_nr_r16_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE sidelink_ue_info_nr_r16_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::sidelink_ue_info_nr_r16: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "sidelink_ue_info_nr_r16_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// UEAssistanceInformation ::= SEQUENCE -SRSASN_CODE ue_assist_info_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_assist_info_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ue_assist_info_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void ue_assist_info_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -ue_assist_info_ies_s& ue_assist_info_s::crit_exts_c_::set_ue_assist_info() -{ - set(types::ue_assist_info); - return c; -} -void ue_assist_info_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void ue_assist_info_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ue_assist_info: - j.write_fieldname("ueAssistanceInformation"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_assist_info_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE ue_assist_info_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ue_assist_info: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_assist_info_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_assist_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.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_assist_info_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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 ue_cap_info_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_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 ue_cap_info_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -ue_cap_info_ies_s& ue_cap_info_s::crit_exts_c_::set_ue_cap_info() -{ - set(types::ue_cap_info); - return c; -} -void ue_cap_info_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void ue_cap_info_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ue_cap_info: - j.write_fieldname("ueCapabilityInformation"); - c.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(); -} -SRSASN_CODE ue_cap_info_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ue_cap_info: - HANDLE_CODE(c.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; -} -SRSASN_CODE ue_cap_info_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ue_cap_info: - HANDLE_CODE(c.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; -} - -// UEInformationResponse-r16 ::= SEQUENCE -SRSASN_CODE ue_info_resp_r16_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_info_resp_r16_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_info_resp_r16_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_info_resp_r16_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -ue_info_resp_r16_ies_s& ue_info_resp_r16_s::crit_exts_c_::set_ue_info_resp_r16() -{ - set(types::ue_info_resp_r16); - return c; -} -void ue_info_resp_r16_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void ue_info_resp_r16_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ue_info_resp_r16: - j.write_fieldname("ueInformationResponse-r16"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_info_resp_r16_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE ue_info_resp_r16_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ue_info_resp_r16: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_info_resp_r16_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_info_resp_r16_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ue_info_resp_r16: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_info_resp_r16_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// UEPositioningAssistanceInfo-r17 ::= SEQUENCE -SRSASN_CODE ue_positioning_assist_info_r17_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_positioning_assist_info_r17_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ue_positioning_assist_info_r17_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void ue_positioning_assist_info_r17_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -ue_positioning_assist_info_r17_ies_s& -ue_positioning_assist_info_r17_s::crit_exts_c_::set_ue_positioning_assist_info_r17() -{ - set(types::ue_positioning_assist_info_r17); - return c; -} -void ue_positioning_assist_info_r17_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void ue_positioning_assist_info_r17_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ue_positioning_assist_info_r17: - j.write_fieldname("uePositioningAssistanceInfo-r17"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_positioning_assist_info_r17_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE ue_positioning_assist_info_r17_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ue_positioning_assist_info_r17: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_positioning_assist_info_r17_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ue_positioning_assist_info_r17_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ue_positioning_assist_info_r17: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ue_positioning_assist_info_r17_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// ULDedicatedMessageSegment-r16 ::= SEQUENCE -SRSASN_CODE ul_ded_msg_segment_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_ded_msg_segment_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ul_ded_msg_segment_r16_s::to_json(json_writer& j) const -{ - j.start_obj(); - j.write_fieldname("criticalExtensions"); - crit_exts.to_json(j); - j.end_obj(); -} - -void ul_ded_msg_segment_r16_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -ul_ded_msg_segment_r16_ies_s& ul_ded_msg_segment_r16_s::crit_exts_c_::set_ul_ded_msg_segment_r16() -{ - set(types::ul_ded_msg_segment_r16); - return c; -} -void ul_ded_msg_segment_r16_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void ul_ded_msg_segment_r16_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ul_ded_msg_segment_r16: - j.write_fieldname("ulDedicatedMessageSegment-r16"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ul_ded_msg_segment_r16_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE ul_ded_msg_segment_r16_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ul_ded_msg_segment_r16: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ul_ded_msg_segment_r16_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_ded_msg_segment_r16_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ul_ded_msg_segment_r16: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ul_ded_msg_segment_r16_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// ULInformationTransfer ::= SEQUENCE -SRSASN_CODE ul_info_transfer_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_info_transfer_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ul_info_transfer_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_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -ul_info_transfer_ies_s& ul_info_transfer_s::crit_exts_c_::set_ul_info_transfer() -{ - set(types::ul_info_transfer); - return c; -} -void ul_info_transfer_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void ul_info_transfer_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ul_info_transfer: - j.write_fieldname("ulInformationTransfer"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE ul_info_transfer_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ul_info_transfer: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_info_transfer_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ul_info_transfer: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// ULInformationTransferIRAT-r16 ::= SEQUENCE -SRSASN_CODE ul_info_transfer_irat_r16_s::pack(bit_ref& bref) const -{ - HANDLE_CODE(crit_exts.pack(bref)); - - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_info_transfer_irat_r16_s::unpack(cbit_ref& bref) -{ - HANDLE_CODE(crit_exts.unpack(bref)); - - return SRSASN_SUCCESS; -} -void ul_info_transfer_irat_r16_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_irat_r16_s::crit_exts_c_::set(types::options e) -{ - type_ = e; -} -ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_& ul_info_transfer_irat_r16_s::crit_exts_c_::set_c1() -{ - set(types::c1); - return c; -} -void ul_info_transfer_irat_r16_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void ul_info_transfer_irat_r16_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ul_info_transfer_irat_r16_s::crit_exts_c_"); - } - j.end_obj(); -} -SRSASN_CODE ul_info_transfer_irat_r16_s::crit_exts_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::c1: - HANDLE_CODE(c.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ul_info_transfer_irat_r16_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_info_transfer_irat_r16_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ul_info_transfer_irat_r16_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::set(types::options e) -{ - type_ = e; -} -ul_info_transfer_irat_r16_ies_s& ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::set_ul_info_transfer_irat_r16() -{ - set(types::ul_info_transfer_irat_r16); - return c; -} -void ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::set_spare3() -{ - set(types::spare3); -} -void ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::set_spare2() -{ - set(types::spare2); -} -void ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::set_spare1() -{ - set(types::spare1); -} -void ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ul_info_transfer_irat_r16: - j.write_fieldname("ulInformationTransferIRAT-r16"); - c.to_json(j); - break; - case types::spare3: - break; - case types::spare2: - break; - case types::spare1: - break; - default: - log_invalid_choice_id(type_, "ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_"); - } - j.end_obj(); -} -SRSASN_CODE ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ul_info_transfer_irat_r16: - 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_info_transfer_irat_r16_s::crit_exts_c_::c1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ul_info_transfer_irat_r16: - 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_info_transfer_irat_r16_s::crit_exts_c_::c1_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -// 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_::set(types::options e) -{ - type_ = e; -} -ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_& ul_info_transfer_mrdc_s::crit_exts_c_::set_c1() -{ - set(types::c1); - return c; -} -void ul_info_transfer_mrdc_s::crit_exts_c_::set_crit_exts_future() -{ - set(types::crit_exts_future); -} -void ul_info_transfer_mrdc_s::crit_exts_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::c1: - j.write_fieldname("c1"); - c.to_json(j); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_"); - } - j.end_obj(); -} -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.pack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_info_transfer_mrdc_s::crit_exts_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::c1: - HANDLE_CODE(c.unpack(bref)); - break; - case types::crit_exts_future: - break; - default: - log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::set(types::options e) -{ - type_ = e; -} -ul_info_transfer_mrdc_ies_s& ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::set_ul_info_transfer_mrdc() -{ - set(types::ul_info_transfer_mrdc); - return c; -} -void ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::set_spare3() -{ - set(types::spare3); -} -void ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::set_spare2() -{ - set(types::spare2); -} -void ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::set_spare1() -{ - set(types::spare1); -} -void ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const -{ - j.start_obj(); - switch (type_) { - case types::ul_info_transfer_mrdc: - j.write_fieldname("ulInformationTransferMRDC"); - c.to_json(j); - break; - 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_"); - } - j.end_obj(); -} -SRSASN_CODE ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const -{ - type_.pack(bref); - switch (type_) { - case types::ul_info_transfer_mrdc: - 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_info_transfer_mrdc_s::crit_exts_c_::c1_c_"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) -{ - types e; - e.unpack(bref); - set(e); - switch (type_) { - case types::ul_info_transfer_mrdc: - 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_info_transfer_mrdc_s::crit_exts_c_::c1_c_"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} +/******************************************************************************* + * Struct Methods + ******************************************************************************/ // UL-DCCH-MessageType ::= CHOICE void ul_dcch_msg_type_c::destroy_() @@ -19095,352 +35,175 @@ 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: - c.init(); - 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(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: - c.init(other.c.get()); - 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::c1: - c.set(other.c.get()); - break; - case types::msg_class_ext: - c.set(other.c.get()); - break; - case types::nulltype: - break; - default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); - } - - return *this; -} -ul_dcch_msg_type_c::c1_c_& ul_dcch_msg_type_c::set_c1() -{ - set(types::c1); - return c.get(); -} -ul_dcch_msg_type_c::msg_class_ext_c_& ul_dcch_msg_type_c::set_msg_class_ext() -{ - set(types::msg_class_ext); - return c.get(); -} -void ul_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::msg_class_ext: - j.write_fieldname("messageClassExtension"); - c.get().to_json(j); - break; - default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); - } - j.end_obj(); -} -SRSASN_CODE ul_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::msg_class_ext: - HANDLE_CODE(c.get().pack(bref)); - break; - default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); - return SRSASN_ERROR_ENCODE_FAIL; - } - return SRSASN_SUCCESS; -} -SRSASN_CODE ul_dcch_msg_type_c::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: - HANDLE_CODE(c.get().unpack(bref)); - break; - default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); - return SRSASN_ERROR_DECODE_FAIL; - } - return SRSASN_SUCCESS; -} - -void ul_dcch_msg_type_c::c1_c_::destroy_() -{ - 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; - case types::ul_info_transfer_mrdc: - c.destroy(); - break; - case types::scg_fail_info: - c.destroy(); - break; - case types::scg_fail_info_eutra: - c.destroy(); - break; - default: - break; - } -} -void ul_dcch_msg_type_c::c1_c_::set(types::options e) -{ - 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(); - break; - case types::fail_info: - c.init(); - break; - case types::ul_info_transfer_mrdc: - c.init(); - break; - case types::scg_fail_info: - c.init(); + switch (type_) { + case types::c1: + c.init(); break; - case types::scg_fail_info_eutra: - c.init(); + case types::msg_class_ext: + 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_, "ul_dcch_msg_type_c"); } } -ul_dcch_msg_type_c::c1_c_::c1_c_(const ul_dcch_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::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()); + case types::c1: + c.init(other.c.get()); break; - case types::security_mode_fail: - c.init(other.c.get()); + case types::msg_class_ext: + c.init(other.c.get()); break; - case types::ul_info_transfer: - c.init(other.c.get()); + case types::nulltype: break; - case types::location_meas_ind: - c.init(other.c.get()); + 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::c1: + c.set(other.c.get()); break; - case types::ue_cap_info: - c.init(other.c.get()); + case types::msg_class_ext: + c.set(other.c.get()); break; - case types::counter_check_resp: - c.init(other.c.get()); + case types::nulltype: break; - case types::ue_assist_info: - c.init(other.c.get()); + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); + } + + return *this; +} +ul_dcch_msg_type_c::c1_c_& ul_dcch_msg_type_c::set_c1() +{ + set(types::c1); + return c.get(); +} +ul_dcch_msg_type_c::msg_class_ext_c_& ul_dcch_msg_type_c::set_msg_class_ext() +{ + set(types::msg_class_ext); + return c.get(); +} +void ul_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::fail_info: - c.init(other.c.get()); + case types::msg_class_ext: + j.write_fieldname("messageClassExtension"); + c.get().to_json(j); break; - case types::ul_info_transfer_mrdc: - c.init(other.c.get()); + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); + } + j.end_obj(); +} +SRSASN_CODE ul_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::scg_fail_info: - c.init(other.c.get()); + case types::msg_class_ext: + HANDLE_CODE(c.get().pack(bref)); break; - case types::scg_fail_info_eutra: - c.init(other.c.get()); + default: + log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_dcch_msg_type_c::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::nulltype: + case types::msg_class_ext: + HANDLE_CODE(c.get().unpack(bref)); break; default: - log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); + log_invalid_choice_id(type_, "ul_dcch_msg_type_c"); + return SRSASN_ERROR_DECODE_FAIL; } + return SRSASN_SUCCESS; } -ul_dcch_msg_type_c::c1_c_& ul_dcch_msg_type_c::c1_c_::operator=(const ul_dcch_msg_type_c::c1_c_& other) + +void ul_dcch_msg_type_c::c1_c_::set(types::options e) { - if (this == &other) { - return *this; - } - set(other.type()); + type_ = e; switch (type_) { case types::meas_report: - c.set(other.c.get()); + c = meas_report_s{}; break; case types::rrc_recfg_complete: - c.set(other.c.get()); + c = rrc_recfg_complete_s{}; break; case types::rrc_setup_complete: - c.set(other.c.get()); + c = rrc_setup_complete_s{}; break; case types::rrc_reest_complete: - c.set(other.c.get()); + c = rrc_reest_complete_s{}; break; case types::rrc_resume_complete: - c.set(other.c.get()); + c = rrc_resume_complete_s{}; break; case types::security_mode_complete: - c.set(other.c.get()); + c = security_mode_complete_s{}; break; case types::security_mode_fail: - c.set(other.c.get()); + c = security_mode_fail_s{}; break; case types::ul_info_transfer: - c.set(other.c.get()); + c = ul_info_transfer_s{}; break; case types::location_meas_ind: - c.set(other.c.get()); + c = location_meas_ind_s{}; break; case types::ue_cap_info: - c.set(other.c.get()); + c = ue_cap_info_s{}; break; case types::counter_check_resp: - c.set(other.c.get()); + c = counter_check_resp_s{}; break; case types::ue_assist_info: - c.set(other.c.get()); + c = ue_assist_info_s{}; break; case types::fail_info: - c.set(other.c.get()); + c = fail_info_s{}; break; case types::ul_info_transfer_mrdc: - c.set(other.c.get()); + c = ul_info_transfer_mrdc_s{}; break; case types::scg_fail_info: - c.set(other.c.get()); + c = scg_fail_info_s{}; break; case types::scg_fail_info_eutra: - c.set(other.c.get()); + c = scg_fail_info_eutra_s{}; break; case types::nulltype: break; default: log_invalid_choice_id(type_, "ul_dcch_msg_type_c::c1_c_"); } - - return *this; } meas_report_s& ul_dcch_msg_type_c::c1_c_::set_meas_report() { @@ -19714,6 +477,27 @@ SRSASN_CODE ul_dcch_msg_type_c::c1_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* ul_dcch_msg_type_c::c1_c_::types_opts::to_string() const +{ + static const char* names[] = {"measurementReport", + "rrcReconfigurationComplete", + "rrcSetupComplete", + "rrcReestablishmentComplete", + "rrcResumeComplete", + "securityModeComplete", + "securityModeFailure", + "ulInformationTransfer", + "locationMeasurementIndication", + "ueCapabilityInformation", + "counterCheckResponse", + "ueAssistanceInformation", + "failureInformation", + "ulInformationTransferMRDC", + "scgFailureInformation", + "scgFailureInformationEUTRA"}; + return convert_enum_idx(names, 16, value, "ul_dcch_msg_type_c::c1_c_::types"); +} + void ul_dcch_msg_type_c::msg_class_ext_c_::set(types::options e) { type_ = e; @@ -19775,185 +559,39 @@ SRSASN_CODE ul_dcch_msg_type_c::msg_class_ext_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } -void ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::destroy_() -{ - switch (type_) { - case types::ul_ded_msg_segment_r16: - c.destroy(); - break; - case types::ded_sib_request_r16: - c.destroy(); - break; - case types::mcg_fail_info_r16: - c.destroy(); - break; - case types::ue_info_resp_r16: - c.destroy(); - break; - case types::sidelink_ue_info_nr_r16: - c.destroy(); - break; - case types::ul_info_transfer_irat_r16: - c.destroy(); - break; - case types::iab_other_info_r16: - c.destroy(); - break; - case types::mbs_interest_ind_r17: - c.destroy(); - break; - case types::ue_positioning_assist_info_r17: - c.destroy(); - break; - case types::meas_report_app_layer_r17: - c.destroy(); - break; - default: - break; - } -} void ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::set(types::options e) { - destroy_(); type_ = e; switch (type_) { case types::ul_ded_msg_segment_r16: - c.init(); - break; - case types::ded_sib_request_r16: - c.init(); - break; - case types::mcg_fail_info_r16: - c.init(); - break; - case types::ue_info_resp_r16: - c.init(); - break; - case types::sidelink_ue_info_nr_r16: - c.init(); - break; - case types::ul_info_transfer_irat_r16: - c.init(); - break; - case types::iab_other_info_r16: - c.init(); - break; - case types::mbs_interest_ind_r17: - c.init(); - break; - case types::ue_positioning_assist_info_r17: - c.init(); - break; - case types::meas_report_app_layer_r17: - c.init(); - 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_, "ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_"); - } -} -ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::c2_c_(const ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_& other) -{ - type_ = other.type(); - switch (type_) { - case types::ul_ded_msg_segment_r16: - c.init(other.c.get()); - break; - case types::ded_sib_request_r16: - c.init(other.c.get()); - break; - case types::mcg_fail_info_r16: - c.init(other.c.get()); - break; - case types::ue_info_resp_r16: - c.init(other.c.get()); - break; - case types::sidelink_ue_info_nr_r16: - c.init(other.c.get()); - break; - case types::ul_info_transfer_irat_r16: - c.init(other.c.get()); - break; - case types::iab_other_info_r16: - c.init(other.c.get()); - break; - case types::mbs_interest_ind_r17: - c.init(other.c.get()); - break; - case types::ue_positioning_assist_info_r17: - c.init(other.c.get()); - break; - case types::meas_report_app_layer_r17: - c.init(other.c.get()); - 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_, "ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_"); - } -} -ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_& -ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::operator=(const ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_& other) -{ - if (this == &other) { - return *this; - } - set(other.type()); - switch (type_) { - case types::ul_ded_msg_segment_r16: - c.set(other.c.get()); + c = ul_ded_msg_segment_r16_s{}; break; case types::ded_sib_request_r16: - c.set(other.c.get()); + c = ded_sib_request_r16_s{}; break; case types::mcg_fail_info_r16: - c.set(other.c.get()); + c = mcg_fail_info_r16_s{}; break; case types::ue_info_resp_r16: - c.set(other.c.get()); + c = ue_info_resp_r16_s{}; break; case types::sidelink_ue_info_nr_r16: - c.set(other.c.get()); + c = sidelink_ue_info_nr_r16_s{}; break; case types::ul_info_transfer_irat_r16: - c.set(other.c.get()); + c = ul_info_transfer_irat_r16_s{}; break; case types::iab_other_info_r16: - c.set(other.c.get()); + c = iab_other_info_r16_s{}; break; case types::mbs_interest_ind_r17: - c.set(other.c.get()); + c = mb_si_nterest_ind_r17_s{}; break; case types::ue_positioning_assist_info_r17: - c.set(other.c.get()); + c = ue_positioning_assist_info_r17_s{}; break; case types::meas_report_app_layer_r17: - c.set(other.c.get()); + c = meas_report_app_layer_r17_s{}; break; case types::spare6: break; @@ -19972,8 +610,6 @@ ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::operator=(const ul_dcch_msg_type_c: default: log_invalid_choice_id(type_, "ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_"); } - - return *this; } ul_ded_msg_segment_r16_s& ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::set_ul_ded_msg_segment_r16() { @@ -20217,6 +853,49 @@ SRSASN_CODE ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::unpack(cbit_ref& bref) return SRSASN_SUCCESS; } +const char* ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::types_opts::to_string() const +{ + static const char* names[] = {"ulDedicatedMessageSegment-r16", + "dedicatedSIBRequest-r16", + "mcgFailureInformation-r16", + "ueInformationResponse-r16", + "sidelinkUEInformationNR-r16", + "ulInformationTransferIRAT-r16", + "iabOtherInformation-r16", + "mbsInterestIndication-r17", + "uePositioningAssistanceInfo-r17", + "measurementReportAppLayer-r17", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "ul_dcch_msg_type_c::msg_class_ext_c_::c2_c_::types"); +} + +const char* ul_dcch_msg_type_c::msg_class_ext_c_::types_opts::to_string() const +{ + static const char* names[] = {"c2", "messageClassExtensionFuture-r16"}; + return convert_enum_idx(names, 2, value, "ul_dcch_msg_type_c::msg_class_ext_c_::types"); +} +uint8_t ul_dcch_msg_type_c::msg_class_ext_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {2}; + return map_enum_number(numbers, 1, value, "ul_dcch_msg_type_c::msg_class_ext_c_::types"); +} + +const char* ul_dcch_msg_type_c::types_opts::to_string() const +{ + static const char* names[] = {"c1", "messageClassExtension"}; + return convert_enum_idx(names, 2, value, "ul_dcch_msg_type_c::types"); +} +uint8_t ul_dcch_msg_type_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "ul_dcch_msg_type_c::types"); +} + // UL-DCCH-Message ::= SEQUENCE SRSASN_CODE ul_dcch_msg_s::pack(bit_ref& bref) const { diff --git a/lib/asn1/rrc_nr/ul_dcch_msg_ies.cpp b/lib/asn1/rrc_nr/ul_dcch_msg_ies.cpp new file mode 100644 index 0000000000..38c54af35b --- /dev/null +++ b/lib/asn1/rrc_nr/ul_dcch_msg_ies.cpp @@ -0,0 +1,22751 @@ +/* + * + * Copyright 2021-2024 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 "srsran/asn1/rrc_nr/ul_dcch_msg_ies.h" +using namespace asn1; +using namespace asn1::rrc_nr; + +/******************************************************************************* + * Struct Methods + ******************************************************************************/ + +// PLMN-Identity-EUTRA-5GC ::= CHOICE +void plmn_id_eutra_5_gc_c::destroy_() +{ + switch (type_) { + case types::plmn_id_eutra_5_gc: + c.destroy(); + break; + default: + break; + } +} +void plmn_id_eutra_5_gc_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::plmn_id_eutra_5_gc: + c.init(); + break; + case types::plmn_idx: + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "plmn_id_eutra_5_gc_c"); + } +} +plmn_id_eutra_5_gc_c::plmn_id_eutra_5_gc_c(const plmn_id_eutra_5_gc_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::plmn_id_eutra_5_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_5_gc_c"); + } +} +plmn_id_eutra_5_gc_c& plmn_id_eutra_5_gc_c::operator=(const plmn_id_eutra_5_gc_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::plmn_id_eutra_5_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_5_gc_c"); + } + + return *this; +} +plmn_id_s& plmn_id_eutra_5_gc_c::set_plmn_id_eutra_5_gc() +{ + set(types::plmn_id_eutra_5_gc); + return c.get(); +} +uint8_t& plmn_id_eutra_5_gc_c::set_plmn_idx() +{ + set(types::plmn_idx); + return c.get(); +} +void plmn_id_eutra_5_gc_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::plmn_id_eutra_5_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_5_gc_c"); + } + j.end_obj(); +} +SRSASN_CODE plmn_id_eutra_5_gc_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::plmn_id_eutra_5_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_5_gc_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE plmn_id_eutra_5_gc_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::plmn_id_eutra_5_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_5_gc_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* plmn_id_eutra_5_gc_c::types_opts::to_string() const +{ + static const char* names[] = {"plmn-Identity-EUTRA-5GC", "plmn-index"}; + return convert_enum_idx(names, 2, value, "plmn_id_eutra_5_gc_c::types"); +} +int8_t plmn_id_eutra_5_gc_c::types_opts::to_number() const +{ + static const int8_t numbers[] = {-5}; + return map_enum_number(numbers, 1, value, "plmn_id_eutra_5_gc_c::types"); +} + +// CellIdentity-EUTRA-5GC ::= CHOICE +void cell_id_eutra_5_gc_c::destroy_() +{ + switch (type_) { + case types::cell_id_eutra: + c.destroy>(); + break; + default: + break; + } +} +void cell_id_eutra_5_gc_c::set(types::options e) +{ + 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_5_gc_c"); + } +} +cell_id_eutra_5_gc_c::cell_id_eutra_5_gc_c(const cell_id_eutra_5_gc_c& other) +{ + 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_5_gc_c"); + } +} +cell_id_eutra_5_gc_c& cell_id_eutra_5_gc_c::operator=(const cell_id_eutra_5_gc_c& other) +{ + 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_5_gc_c"); + } + + return *this; +} +fixed_bitstring<28>& cell_id_eutra_5_gc_c::set_cell_id_eutra() +{ + set(types::cell_id_eutra); + return c.get>(); +} +uint8_t& cell_id_eutra_5_gc_c::set_cell_id_idx() +{ + set(types::cell_id_idx); + return c.get(); +} +void cell_id_eutra_5_gc_c::to_json(json_writer& j) 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_5_gc_c"); + } + j.end_obj(); +} +SRSASN_CODE cell_id_eutra_5_gc_c::pack(bit_ref& bref) 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_5_gc_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_id_eutra_5_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_5_gc_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* cell_id_eutra_5_gc_c::types_opts::to_string() const +{ + static const char* names[] = {"cellIdentity-EUTRA", "cellId-index"}; + return convert_enum_idx(names, 2, value, "cell_id_eutra_5_gc_c::types"); +} + +// FrequencyComponent-r17 ::= ENUMERATED +const char* freq_component_r17_opts::to_string() const +{ + static const char* names[] = {"activeCarrier", "configuredCarrier", "activeBWP", "configuredBWP"}; + return convert_enum_idx(names, 4, value, "freq_component_r17_e"); +} + +// MeasQuantityResults ::= SEQUENCE +SRSASN_CODE meas_quant_results_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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_quant_results_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)); + } + + return SRSASN_SUCCESS; +} +void meas_quant_results_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(); +} + +// CellAccessRelatedInfo-EUTRA-5GC ::= SEQUENCE +SRSASN_CODE cell_access_related_info_eutra_5_gc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ranac_5gc_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_list_eutra_5gc, 1, 12)); + HANDLE_CODE(tac_eutra_5gc.pack(bref)); + if (ranac_5gc_present) { + HANDLE_CODE(pack_integer(bref, ranac_5gc, (uint16_t)0u, (uint16_t)255u)); + } + HANDLE_CODE(cell_id_eutra_5gc.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cell_access_related_info_eutra_5_gc_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ranac_5gc_present, 1)); + + HANDLE_CODE(unpack_dyn_seq_of(plmn_id_list_eutra_5gc, bref, 1, 12)); + HANDLE_CODE(tac_eutra_5gc.unpack(bref)); + if (ranac_5gc_present) { + HANDLE_CODE(unpack_integer(ranac_5gc, bref, (uint16_t)0u, (uint16_t)255u)); + } + HANDLE_CODE(cell_id_eutra_5gc.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cell_access_related_info_eutra_5_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_5gc) { + e1.to_json(j); + } + j.end_array(); + j.write_str("trackingAreaCode-eutra-5gc", tac_eutra_5gc.to_string()); + if (ranac_5gc_present) { + j.write_int("ranac-5gc", ranac_5gc); + } + j.write_fieldname("cellIdentity-eutra-5gc"); + cell_id_eutra_5gc.to_json(j); + j.end_obj(); +} + +// CellAccessRelatedInfo-EUTRA-EPC ::= SEQUENCE +SRSASN_CODE cell_access_related_info_eutra_epc_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)); + + 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(); +} + +// DefaultDC-Location-r17 ::= CHOICE +void default_dc_location_r17_c::destroy_() {} +void default_dc_location_r17_c::set(types::options e) +{ + destroy_(); + type_ = e; +} +default_dc_location_r17_c::default_dc_location_r17_c(const default_dc_location_r17_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::ul: + c.init(other.c.get()); + break; + case types::dl: + c.init(other.c.get()); + break; + case types::ul_and_dl: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "default_dc_location_r17_c"); + } +} +default_dc_location_r17_c& default_dc_location_r17_c::operator=(const default_dc_location_r17_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ul: + c.set(other.c.get()); + break; + case types::dl: + c.set(other.c.get()); + break; + case types::ul_and_dl: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "default_dc_location_r17_c"); + } + + return *this; +} +freq_component_r17_e& default_dc_location_r17_c::set_ul() +{ + set(types::ul); + return c.get(); +} +freq_component_r17_e& default_dc_location_r17_c::set_dl() +{ + set(types::dl); + return c.get(); +} +freq_component_r17_e& default_dc_location_r17_c::set_ul_and_dl() +{ + set(types::ul_and_dl); + return c.get(); +} +void default_dc_location_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ul: + j.write_str("ul", c.get().to_string()); + break; + case types::dl: + j.write_str("dl", c.get().to_string()); + break; + case types::ul_and_dl: + j.write_str("ulAndDL", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "default_dc_location_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE default_dc_location_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ul: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::dl: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::ul_and_dl: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "default_dc_location_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE default_dc_location_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ul: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::dl: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::ul_and_dl: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "default_dc_location_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* default_dc_location_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"ul", "dl", "ulAndDL"}; + return convert_enum_idx(names, 3, value, "default_dc_location_r17_c::types"); +} + +// OffsetValue-r17 ::= SEQUENCE +SRSASN_CODE offset_value_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, offset_value_r17, (int16_t)-20000, (int16_t)20000)); + HANDLE_CODE(bref.pack(shift7dot5k_hz_r17, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE offset_value_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(offset_value_r17, bref, (int16_t)-20000, (int16_t)20000)); + HANDLE_CODE(bref.unpack(shift7dot5k_hz_r17, 1)); + + return SRSASN_SUCCESS; +} +void offset_value_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("offsetValue-r17", offset_value_r17); + j.write_bool("shift7dot5kHz-r17", shift7dot5k_hz_r17); + j.end_obj(); +} + +// 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 results_per_csi_rs_idx_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_rs_results_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)); + } + + return SRSASN_SUCCESS; +} +void results_per_csi_rs_idx_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); + } + j.end_obj(); +} + +// ResultsPerSSB-Index ::= SEQUENCE +SRSASN_CODE results_per_ssb_idx_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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE results_per_ssb_idx_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)); + } + + 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(); +} + +// CC-Group-r17 ::= SEQUENCE +SRSASN_CODE cc_group_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(serv_cell_idx_higher_r17_present, 1)); + HANDLE_CODE(bref.pack(offset_to_default_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, serv_cell_idx_lower_r17, (uint8_t)0u, (uint8_t)31u)); + if (serv_cell_idx_higher_r17_present) { + HANDLE_CODE(pack_integer(bref, serv_cell_idx_higher_r17, (uint8_t)0u, (uint8_t)31u)); + } + HANDLE_CODE(default_dc_location_r17.pack(bref)); + if (offset_to_default_r17_present) { + HANDLE_CODE(offset_to_default_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cc_group_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(serv_cell_idx_higher_r17_present, 1)); + HANDLE_CODE(bref.unpack(offset_to_default_r17_present, 1)); + + HANDLE_CODE(unpack_integer(serv_cell_idx_lower_r17, bref, (uint8_t)0u, (uint8_t)31u)); + if (serv_cell_idx_higher_r17_present) { + HANDLE_CODE(unpack_integer(serv_cell_idx_higher_r17, bref, (uint8_t)0u, (uint8_t)31u)); + } + HANDLE_CODE(default_dc_location_r17.unpack(bref)); + if (offset_to_default_r17_present) { + HANDLE_CODE(offset_to_default_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cc_group_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servCellIndexLower-r17", serv_cell_idx_lower_r17); + if (serv_cell_idx_higher_r17_present) { + j.write_int("servCellIndexHigher-r17", serv_cell_idx_higher_r17); + } + j.write_fieldname("defaultDC-Location-r17"); + default_dc_location_r17.to_json(j); + if (offset_to_default_r17_present) { + j.write_fieldname("offsetToDefault-r17"); + offset_to_default_r17.to_json(j); + } + j.end_obj(); +} + +void cc_group_r17_s::offset_to_default_r17_c_::destroy_() +{ + switch (type_) { + case types::offset_value: + c.destroy(); + break; + case types::offsetlist: + c.destroy(); + break; + default: + break; + } +} +void cc_group_r17_s::offset_to_default_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::offset_value: + c.init(); + break; + case types::offsetlist: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cc_group_r17_s::offset_to_default_r17_c_"); + } +} +cc_group_r17_s::offset_to_default_r17_c_::offset_to_default_r17_c_( + const cc_group_r17_s::offset_to_default_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::offset_value: + c.init(other.c.get()); + break; + case types::offsetlist: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cc_group_r17_s::offset_to_default_r17_c_"); + } +} +cc_group_r17_s::offset_to_default_r17_c_& +cc_group_r17_s::offset_to_default_r17_c_::operator=(const cc_group_r17_s::offset_to_default_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::offset_value: + c.set(other.c.get()); + break; + case types::offsetlist: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cc_group_r17_s::offset_to_default_r17_c_"); + } + + return *this; +} +offset_value_r17_s& cc_group_r17_s::offset_to_default_r17_c_::set_offset_value() +{ + set(types::offset_value); + return c.get(); +} +cc_group_r17_s::offset_to_default_r17_c_::offsetlist_l_& cc_group_r17_s::offset_to_default_r17_c_::set_offsetlist() +{ + set(types::offsetlist); + return c.get(); +} +void cc_group_r17_s::offset_to_default_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::offset_value: + j.write_fieldname("offsetValue"); + c.get().to_json(j); + break; + case types::offsetlist: + j.start_array("offsetlist"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + default: + log_invalid_choice_id(type_, "cc_group_r17_s::offset_to_default_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE cc_group_r17_s::offset_to_default_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::offset_value: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::offsetlist: + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 128)); + break; + default: + log_invalid_choice_id(type_, "cc_group_r17_s::offset_to_default_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cc_group_r17_s::offset_to_default_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::offset_value: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::offsetlist: + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 128)); + break; + default: + log_invalid_choice_id(type_, "cc_group_r17_s::offset_to_default_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* cc_group_r17_s::offset_to_default_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"offsetValue", "offsetlist"}; + return convert_enum_idx(names, 2, value, "cc_group_r17_s::offset_to_default_r17_c_::types"); +} + +// CGI-InfoEUTRA ::= SEQUENCE +SRSASN_CODE cgi_info_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(cgi_info_epc_present, 1)); + HANDLE_CODE(bref.pack(cgi_info_5_gc.size() > 0, 1)); + HANDLE_CODE(bref.pack(multi_band_info_list.size() > 0, 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.size() > 0, 1)); + HANDLE_CODE(cgi_info_epc.cgi_info_epc_legacy.pack(bref)); + if (cgi_info_epc.cgi_info_epc_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cgi_info_epc.cgi_info_epc_list, 1, 12)); + } + } + if (cgi_info_5_gc.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, cgi_info_5_gc, 1, 12)); + } + HANDLE_CODE(pack_integer(bref, freq_band_ind, (uint16_t)1u, (uint16_t)256u)); + if (multi_band_info_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, multi_band_info_list, 1, 8, integer_packer(1, 256))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cgi_info_eutra_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(cgi_info_epc_present, 1)); + bool cgi_info_5_gc_present; + HANDLE_CODE(bref.unpack(cgi_info_5_gc_present, 1)); + bool multi_band_info_list_present; + 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) { + bool cgi_info_epc_list_present; + HANDLE_CODE(bref.unpack(cgi_info_epc_list_present, 1)); + HANDLE_CODE(cgi_info_epc.cgi_info_epc_legacy.unpack(bref)); + if (cgi_info_epc_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(cgi_info_epc.cgi_info_epc_list, bref, 1, 12)); + } + } + if (cgi_info_5_gc_present) { + HANDLE_CODE(unpack_dyn_seq_of(cgi_info_5_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 cgi_info_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + 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.size() > 0) { + 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_5_gc.size() > 0) { + j.start_array("cgi-info-5GC"); + for (const auto& e1 : cgi_info_5_gc) { + e1.to_json(j); + } + j.end_array(); + } + j.write_int("freqBandIndicator", freq_band_ind); + if (multi_band_info_list.size() > 0) { + 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(); +} + +// CGI-InfoNR ::= SEQUENCE +SRSASN_CODE cgi_info_nr_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(plmn_id_info_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(freq_band_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(no_sib1_present, 1)); + + if (plmn_id_info_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, plmn_id_info_list, 1, 12)); + } + if (freq_band_list.size() > 0) { + 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)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= npn_id_info_list_r16.is_present(); + group_flags[1] |= cell_reserved_for_other_use_r16_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(npn_id_info_list_r16.is_present(), 1)); + if (npn_id_info_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *npn_id_info_list_r16, 1, 12)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(cell_reserved_for_other_use_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cgi_info_nr_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool plmn_id_info_list_present; + HANDLE_CODE(bref.unpack(plmn_id_info_list_present, 1)); + bool freq_band_list_present; + HANDLE_CODE(bref.unpack(freq_band_list_present, 1)); + HANDLE_CODE(bref.unpack(no_sib1_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)); + } + + 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); + + unpack_presence_flag(npn_id_info_list_r16, bref); + if (npn_id_info_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*npn_id_info_list_r16, bref, 1, 12)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(cell_reserved_for_other_use_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void cgi_info_nr_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (plmn_id_info_list.size() > 0) { + j.start_array("plmn-IdentityInfoList"); + for (const auto& e1 : plmn_id_info_list) { + e1.to_json(j); + } + j.end_array(); + } + if (freq_band_list.size() > 0) { + 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(); + } + if (ext) { + if (npn_id_info_list_r16.is_present()) { + j.start_array("npn-IdentityInfoList-r16"); + for (const auto& e1 : *npn_id_info_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (cell_reserved_for_other_use_r16_present) { + j.write_str("cellReservedForOtherUse-r16", "true"); + } + } + j.end_obj(); +} + +// MeasQuantityResultsEUTRA ::= SEQUENCE +SRSASN_CODE meas_quant_results_eutra_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)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; +} +SRSASN_CODE meas_quant_results_eutra_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)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(); +} + +// NeedForNCSG-IntraFreq-r17 ::= SEQUENCE +SRSASN_CODE need_for_ncsg_intra_freq_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, serv_cell_id_r17, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(gap_ind_intra_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE need_for_ncsg_intra_freq_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(serv_cell_id_r17, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(gap_ind_intra_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void need_for_ncsg_intra_freq_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servCellId-r17", serv_cell_id_r17); + j.write_str("gapIndicationIntra-r17", gap_ind_intra_r17.to_string()); + j.end_obj(); +} + +const char* need_for_ncsg_intra_freq_r17_s::gap_ind_intra_r17_opts::to_string() const +{ + static const char* names[] = {"gap", "ncsg", "nogap-noncsg"}; + return convert_enum_idx(names, 3, value, "need_for_ncsg_intra_freq_r17_s::gap_ind_intra_r17_e_"); +} + +// NeedForNCSG-NR-r17 ::= SEQUENCE +SRSASN_CODE need_for_ncsg_nr_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, band_nr_r17, (uint16_t)1u, (uint16_t)1024u)); + HANDLE_CODE(gap_ind_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE need_for_ncsg_nr_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(band_nr_r17, bref, (uint16_t)1u, (uint16_t)1024u)); + HANDLE_CODE(gap_ind_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void need_for_ncsg_nr_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bandNR-r17", band_nr_r17); + j.write_str("gapIndication-r17", gap_ind_r17.to_string()); + j.end_obj(); +} + +const char* need_for_ncsg_nr_r17_s::gap_ind_r17_opts::to_string() const +{ + static const char* names[] = {"gap", "ncsg", "nogap-noncsg"}; + return convert_enum_idx(names, 3, value, "need_for_ncsg_nr_r17_s::gap_ind_r17_e_"); +} + +// PerRAAttemptInfo-r16 ::= SEQUENCE +SRSASN_CODE per_ra_attempt_info_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(contention_detected_r16_present, 1)); + HANDLE_CODE(bref.pack(dl_rsrp_above_thres_r16_present, 1)); + + if (contention_detected_r16_present) { + HANDLE_CODE(bref.pack(contention_detected_r16, 1)); + } + if (dl_rsrp_above_thres_r16_present) { + HANDLE_CODE(bref.pack(dl_rsrp_above_thres_r16, 1)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= fallback_to_four_step_ra_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(fallback_to_four_step_ra_r17_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE per_ra_attempt_info_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(contention_detected_r16_present, 1)); + HANDLE_CODE(bref.unpack(dl_rsrp_above_thres_r16_present, 1)); + + if (contention_detected_r16_present) { + HANDLE_CODE(bref.unpack(contention_detected_r16, 1)); + } + if (dl_rsrp_above_thres_r16_present) { + HANDLE_CODE(bref.unpack(dl_rsrp_above_thres_r16, 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(fallback_to_four_step_ra_r17_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void per_ra_attempt_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (contention_detected_r16_present) { + j.write_bool("contentionDetected-r16", contention_detected_r16); + } + if (dl_rsrp_above_thres_r16_present) { + j.write_bool("dlRSRPAboveThreshold-r16", dl_rsrp_above_thres_r16); + } + if (ext) { + if (fallback_to_four_step_ra_r17_present) { + j.write_str("fallbackToFourStepRA-r17", "true"); + } + } + j.end_obj(); +} + +// MeasResultEUTRA ::= SEQUENCE +SRSASN_CODE meas_result_eutra_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(cgi_info_present, 1)); + + 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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_eutra_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(cgi_info.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_result_eutra_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"); + cgi_info.to_json(j); + } + j.end_obj(); +} + +// MeasResultLoggingNR-r16 ::= SEQUENCE +SRSASN_CODE meas_result_logging_nr_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(nof_good_ssb_r16_present, 1)); + + HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(results_ssb_cell_r16.pack(bref)); + if (nof_good_ssb_r16_present) { + HANDLE_CODE(pack_integer(bref, nof_good_ssb_r16, (uint8_t)1u, (uint8_t)64u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_logging_nr_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(nof_good_ssb_r16_present, 1)); + + HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(results_ssb_cell_r16.unpack(bref)); + if (nof_good_ssb_r16_present) { + HANDLE_CODE(unpack_integer(nof_good_ssb_r16, bref, (uint8_t)1u, (uint8_t)64u)); + } + + return SRSASN_SUCCESS; +} +void meas_result_logging_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r16", pci_r16); + j.write_fieldname("resultsSSB-Cell-r16"); + results_ssb_cell_r16.to_json(j); + if (nof_good_ssb_r16_present) { + j.write_int("numberOfGoodSSB-r16", nof_good_ssb_r16); + } + j.end_obj(); +} + +// MeasResultNR ::= SEQUENCE +SRSASN_CODE meas_result_nr_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(pci_present, 1)); + + 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)); + } + 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result.rs_idx_results.results_csi_rs_idxes.size() > 0, 1)); + if (meas_result.rs_idx_results.results_ssb_idxes.size() > 0) { + 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.size() > 0) { + 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] |= cgi_info.is_present(); + group_flags[1] |= cho_candidate_r17_present; + group_flags[1] |= cho_cfg_r17.is_present(); + group_flags[1] |= triggered_event_r17.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)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(cho_candidate_r17_present, 1)); + HANDLE_CODE(bref.pack(cho_cfg_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(triggered_event_r17.is_present(), 1)); + if (cho_cfg_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cho_cfg_r17, 1, 2)); + } + if (triggered_event_r17.is_present()) { + HANDLE_CODE(bref.pack(triggered_event_r17->time_between_events_r17_present, 1)); + HANDLE_CODE(bref.pack(triggered_event_r17->first_triggered_event_present, 1)); + if (triggered_event_r17->time_between_events_r17_present) { + HANDLE_CODE(pack_integer(bref, triggered_event_r17->time_between_events_r17, (uint16_t)0u, (uint16_t)1023u)); + } + if (triggered_event_r17->first_triggered_event_present) { + HANDLE_CODE(triggered_event_r17->first_triggered_event.pack(bref)); + } + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_nr_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(pci_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)); + } + 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) { + bool results_ssb_idxes_present; + HANDLE_CODE(bref.unpack(results_ssb_idxes_present, 1)); + bool results_csi_rs_idxes_present; + HANDLE_CODE(bref.unpack(results_csi_rs_idxes_present, 1)); + if (results_ssb_idxes_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result.rs_idx_results.results_ssb_idxes, bref, 1, 64)); + } + if (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) { + ext_groups_unpacker_guard group_flags(2); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(cgi_info, bref); + if (cgi_info.is_present()) { + HANDLE_CODE(cgi_info->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(cho_candidate_r17_present, 1)); + unpack_presence_flag(cho_cfg_r17, bref); + unpack_presence_flag(triggered_event_r17, bref); + if (cho_cfg_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*cho_cfg_r17, bref, 1, 2)); + } + if (triggered_event_r17.is_present()) { + HANDLE_CODE(bref.unpack(triggered_event_r17->time_between_events_r17_present, 1)); + HANDLE_CODE(bref.unpack(triggered_event_r17->first_triggered_event_present, 1)); + if (triggered_event_r17->time_between_events_r17_present) { + HANDLE_CODE( + unpack_integer(triggered_event_r17->time_between_events_r17, bref, (uint16_t)0u, (uint16_t)1023u)); + } + if (triggered_event_r17->first_triggered_event_present) { + HANDLE_CODE(triggered_event_r17->first_triggered_event.unpack(bref)); + } + } + } + } + return SRSASN_SUCCESS; +} +void meas_result_nr_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (pci_present) { + j.write_int("physCellId", pci); + } + 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 (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_obj(); + if (meas_result.rs_idx_results_present) { + j.write_fieldname("rsIndexResults"); + j.start_obj(); + if (meas_result.rs_idx_results.results_ssb_idxes.size() > 0) { + 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.size() > 0) { + 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); + } + if (cho_candidate_r17_present) { + j.write_str("choCandidate-r17", "true"); + } + if (cho_cfg_r17.is_present()) { + j.start_array("choConfig-r17"); + for (const auto& e1 : *cho_cfg_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (triggered_event_r17.is_present()) { + j.write_fieldname("triggeredEvent-r17"); + j.start_obj(); + if (triggered_event_r17->time_between_events_r17_present) { + j.write_int("timeBetweenEvents-r17", triggered_event_r17->time_between_events_r17); + } + if (triggered_event_r17->first_triggered_event_present) { + j.write_str("firstTriggeredEvent", triggered_event_r17->first_triggered_event.to_string()); + } + j.end_obj(); + } + } + j.end_obj(); +} + +const char* meas_result_nr_s::triggered_event_r17_s_::first_triggered_event_opts::to_string() const +{ + static const char* names[] = {"condFirstEvent", "condSecondEvent"}; + return convert_enum_idx(names, 2, value, "meas_result_nr_s::triggered_event_r17_s_::first_triggered_event_e_"); +} + +// NeedForNCSG-EUTRA-r17 ::= SEQUENCE +SRSASN_CODE need_for_ncsg_eutra_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, band_eutra_r17, (uint16_t)1u, (uint16_t)256u)); + HANDLE_CODE(gap_ind_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE need_for_ncsg_eutra_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(band_eutra_r17, bref, (uint16_t)1u, (uint16_t)256u)); + HANDLE_CODE(gap_ind_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void need_for_ncsg_eutra_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bandEUTRA-r17", band_eutra_r17); + j.write_str("gapIndication-r17", gap_ind_r17.to_string()); + j.end_obj(); +} + +const char* need_for_ncsg_eutra_r17_s::gap_ind_r17_opts::to_string() const +{ + static const char* names[] = {"gap", "ncsg", "nogap-noncsg"}; + return convert_enum_idx(names, 3, value, "need_for_ncsg_eutra_r17_s::gap_ind_r17_e_"); +} + +// SL-QoS-Info-r16 ::= SEQUENCE +SRSASN_CODE sl_qos_info_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sl_qos_profile_r16_present, 1)); + + HANDLE_CODE(pack_integer(bref, sl_qos_flow_id_r16, (uint16_t)1u, (uint16_t)2048u)); + if (sl_qos_profile_r16_present) { + HANDLE_CODE(sl_qos_profile_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_qos_info_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sl_qos_profile_r16_present, 1)); + + HANDLE_CODE(unpack_integer(sl_qos_flow_id_r16, bref, (uint16_t)1u, (uint16_t)2048u)); + if (sl_qos_profile_r16_present) { + HANDLE_CODE(sl_qos_profile_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_qos_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sl-QoS-FlowIdentity-r16", sl_qos_flow_id_r16); + if (sl_qos_profile_r16_present) { + j.write_fieldname("sl-QoS-Profile-r16"); + sl_qos_profile_r16.to_json(j); + } + j.end_obj(); +} + +// UplinkTxDirectCurrentCarrierInfo-r16 ::= SEQUENCE +SRSASN_CODE ul_tx_direct_current_carrier_info_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, serv_cell_idx_r16, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(serv_cell_info_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_tx_direct_current_carrier_info_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(serv_cell_idx_r16, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(serv_cell_info_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ul_tx_direct_current_carrier_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servCellIndex-r16", serv_cell_idx_r16); + j.write_fieldname("servCellInfo-r16"); + serv_cell_info_r16.to_json(j); + j.end_obj(); +} + +void ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::set(types::options e) +{ + type_ = e; +} +uint8_t& ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::set_bwp_id_r16() +{ + set(types::bwp_id_r16); + return c; +} +void ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::set_deactiv_carrier_r16() +{ + set(types::deactiv_carrier_r16); +} +void ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::bwp_id_r16: + j.write_int("bwp-Id-r16", c); + break; + case types::deactiv_carrier_r16: + break; + default: + log_invalid_choice_id(type_, "ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::bwp_id_r16: + HANDLE_CODE(pack_integer(bref, c, (uint8_t)0u, (uint8_t)4u)); + break; + case types::deactiv_carrier_r16: + break; + default: + log_invalid_choice_id(type_, "ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::bwp_id_r16: + HANDLE_CODE(unpack_integer(c, bref, (uint8_t)0u, (uint8_t)4u)); + break; + case types::deactiv_carrier_r16: + break; + default: + log_invalid_choice_id(type_, "ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"bwp-Id-r16", "deactivatedCarrier-r16"}; + return convert_enum_idx(names, 2, value, "ul_tx_direct_current_carrier_info_r16_s::serv_cell_info_r16_c_::types"); +} + +// UplinkTxDirectCurrentTwoCarrierInfo-r16 ::= SEQUENCE +SRSASN_CODE ul_tx_direct_current_two_carrier_info_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, ref_carrier_idx_r16, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(bref.pack(shift7dot5k_hz_r16, 1)); + HANDLE_CODE(pack_integer(bref, tx_direct_current_location_r16, (uint16_t)0u, (uint16_t)3301u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_tx_direct_current_two_carrier_info_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(ref_carrier_idx_r16, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(bref.unpack(shift7dot5k_hz_r16, 1)); + HANDLE_CODE(unpack_integer(tx_direct_current_location_r16, bref, (uint16_t)0u, (uint16_t)3301u)); + + return SRSASN_SUCCESS; +} +void ul_tx_direct_current_two_carrier_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("referenceCarrierIndex-r16", ref_carrier_idx_r16); + j.write_bool("shift7dot5kHz-r16", shift7dot5k_hz_r16); + j.write_int("txDirectCurrentLocation-r16", tx_direct_current_location_r16); + j.end_obj(); +} + +// WLAN-Identifiers-r16 ::= SEQUENCE +SRSASN_CODE wlan_ids_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ssid_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(bssid_r16_present, 1)); + HANDLE_CODE(bref.pack(hessid_r16_present, 1)); + + if (ssid_r16.size() > 0) { + HANDLE_CODE(ssid_r16.pack(bref)); + } + if (bssid_r16_present) { + HANDLE_CODE(bssid_r16.pack(bref)); + } + if (hessid_r16_present) { + HANDLE_CODE(hessid_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_ids_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool ssid_r16_present; + HANDLE_CODE(bref.unpack(ssid_r16_present, 1)); + HANDLE_CODE(bref.unpack(bssid_r16_present, 1)); + HANDLE_CODE(bref.unpack(hessid_r16_present, 1)); + + if (ssid_r16_present) { + HANDLE_CODE(ssid_r16.unpack(bref)); + } + if (bssid_r16_present) { + HANDLE_CODE(bssid_r16.unpack(bref)); + } + if (hessid_r16_present) { + HANDLE_CODE(hessid_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void wlan_ids_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ssid_r16.size() > 0) { + j.write_str("ssid-r16", ssid_r16.to_string()); + } + if (bssid_r16_present) { + j.write_str("bssid-r16", bssid_r16.to_string()); + } + if (hessid_r16_present) { + j.write_str("hessid-r16", hessid_r16.to_string()); + } + j.end_obj(); +} + +// WLAN-RTT-r16 ::= SEQUENCE +SRSASN_CODE wlan_rtt_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rtt_accuracy_r16_present, 1)); + + HANDLE_CODE(pack_integer(bref, rtt_value_r16, (uint32_t)0u, (uint32_t)16777215u)); + HANDLE_CODE(rtt_units_r16.pack(bref)); + if (rtt_accuracy_r16_present) { + HANDLE_CODE(pack_integer(bref, rtt_accuracy_r16, (uint16_t)0u, (uint16_t)255u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE wlan_rtt_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rtt_accuracy_r16_present, 1)); + + HANDLE_CODE(unpack_integer(rtt_value_r16, bref, (uint32_t)0u, (uint32_t)16777215u)); + HANDLE_CODE(rtt_units_r16.unpack(bref)); + if (rtt_accuracy_r16_present) { + HANDLE_CODE(unpack_integer(rtt_accuracy_r16, bref, (uint16_t)0u, (uint16_t)255u)); + } + + return SRSASN_SUCCESS; +} +void wlan_rtt_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rttValue-r16", rtt_value_r16); + j.write_str("rttUnits-r16", rtt_units_r16.to_string()); + if (rtt_accuracy_r16_present) { + j.write_int("rttAccuracy-r16", rtt_accuracy_r16); + } + j.end_obj(); +} + +const char* wlan_rtt_r16_s::rtt_units_r16_opts::to_string() const +{ + static const char* names[] = { + "microseconds", "hundredsofnanoseconds", "tensofnanoseconds", "nanoseconds", "tenthsofnanoseconds"}; + return convert_enum_idx(names, 5, value, "wlan_rtt_r16_s::rtt_units_r16_e_"); +} + +// CGI-InfoEUTRALogging ::= SEQUENCE +SRSASN_CODE cgi_info_eutra_logging_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(plmn_id_eutra_5gc_present, 1)); + HANDLE_CODE(bref.pack(tac_eutra_5gc_present, 1)); + HANDLE_CODE(bref.pack(cell_id_eutra_5gc_present, 1)); + HANDLE_CODE(bref.pack(plmn_id_eutra_epc_present, 1)); + HANDLE_CODE(bref.pack(tac_eutra_epc_present, 1)); + HANDLE_CODE(bref.pack(cell_id_eutra_epc_present, 1)); + + if (plmn_id_eutra_5gc_present) { + HANDLE_CODE(plmn_id_eutra_5gc.pack(bref)); + } + if (tac_eutra_5gc_present) { + HANDLE_CODE(tac_eutra_5gc.pack(bref)); + } + if (cell_id_eutra_5gc_present) { + HANDLE_CODE(cell_id_eutra_5gc.pack(bref)); + } + if (plmn_id_eutra_epc_present) { + HANDLE_CODE(plmn_id_eutra_epc.pack(bref)); + } + if (tac_eutra_epc_present) { + HANDLE_CODE(tac_eutra_epc.pack(bref)); + } + if (cell_id_eutra_epc_present) { + HANDLE_CODE(cell_id_eutra_epc.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cgi_info_eutra_logging_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(plmn_id_eutra_5gc_present, 1)); + HANDLE_CODE(bref.unpack(tac_eutra_5gc_present, 1)); + HANDLE_CODE(bref.unpack(cell_id_eutra_5gc_present, 1)); + HANDLE_CODE(bref.unpack(plmn_id_eutra_epc_present, 1)); + HANDLE_CODE(bref.unpack(tac_eutra_epc_present, 1)); + HANDLE_CODE(bref.unpack(cell_id_eutra_epc_present, 1)); + + if (plmn_id_eutra_5gc_present) { + HANDLE_CODE(plmn_id_eutra_5gc.unpack(bref)); + } + if (tac_eutra_5gc_present) { + HANDLE_CODE(tac_eutra_5gc.unpack(bref)); + } + if (cell_id_eutra_5gc_present) { + HANDLE_CODE(cell_id_eutra_5gc.unpack(bref)); + } + if (plmn_id_eutra_epc_present) { + HANDLE_CODE(plmn_id_eutra_epc.unpack(bref)); + } + if (tac_eutra_epc_present) { + HANDLE_CODE(tac_eutra_epc.unpack(bref)); + } + if (cell_id_eutra_epc_present) { + HANDLE_CODE(cell_id_eutra_epc.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cgi_info_eutra_logging_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (plmn_id_eutra_5gc_present) { + j.write_fieldname("plmn-Identity-eutra-5gc"); + plmn_id_eutra_5gc.to_json(j); + } + if (tac_eutra_5gc_present) { + j.write_str("trackingAreaCode-eutra-5gc", tac_eutra_5gc.to_string()); + } + if (cell_id_eutra_5gc_present) { + j.write_str("cellIdentity-eutra-5gc", cell_id_eutra_5gc.to_string()); + } + if (plmn_id_eutra_epc_present) { + j.write_fieldname("plmn-Identity-eutra-epc"); + plmn_id_eutra_epc.to_json(j); + } + if (tac_eutra_epc_present) { + j.write_str("trackingAreaCode-eutra-epc", tac_eutra_epc.to_string()); + } + if (cell_id_eutra_epc_present) { + j.write_str("cellIdentity-eutra-epc", cell_id_eutra_epc.to_string()); + } + j.end_obj(); +} + +// LogMeasResultBT-r16 ::= SEQUENCE +SRSASN_CODE log_meas_result_bt_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rssi_bt_r16_present, 1)); + + HANDLE_CODE(bt_addr_r16.pack(bref)); + if (rssi_bt_r16_present) { + HANDLE_CODE(pack_integer(bref, rssi_bt_r16, (int16_t)-128, (int16_t)127)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE log_meas_result_bt_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rssi_bt_r16_present, 1)); + + HANDLE_CODE(bt_addr_r16.unpack(bref)); + if (rssi_bt_r16_present) { + HANDLE_CODE(unpack_integer(rssi_bt_r16, bref, (int16_t)-128, (int16_t)127)); + } + + return SRSASN_SUCCESS; +} +void log_meas_result_bt_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("bt-Addr-r16", bt_addr_r16.to_string()); + if (rssi_bt_r16_present) { + j.write_int("rssi-BT-r16", rssi_bt_r16); + } + j.end_obj(); +} + +// LogMeasResultWLAN-r16 ::= SEQUENCE +SRSASN_CODE log_meas_result_wlan_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rssi_wlan_r16_present, 1)); + HANDLE_CODE(bref.pack(rtt_wlan_r16_present, 1)); + + HANDLE_CODE(wlan_ids_r16.pack(bref)); + if (rssi_wlan_r16_present) { + HANDLE_CODE(pack_integer(bref, rssi_wlan_r16, (uint8_t)0u, (uint8_t)141u)); + } + if (rtt_wlan_r16_present) { + HANDLE_CODE(rtt_wlan_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE log_meas_result_wlan_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rssi_wlan_r16_present, 1)); + HANDLE_CODE(bref.unpack(rtt_wlan_r16_present, 1)); + + HANDLE_CODE(wlan_ids_r16.unpack(bref)); + if (rssi_wlan_r16_present) { + HANDLE_CODE(unpack_integer(rssi_wlan_r16, bref, (uint8_t)0u, (uint8_t)141u)); + } + if (rtt_wlan_r16_present) { + HANDLE_CODE(rtt_wlan_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void log_meas_result_wlan_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("wlan-Identifiers-r16"); + wlan_ids_r16.to_json(j); + if (rssi_wlan_r16_present) { + j.write_int("rssiWLAN-r16", rssi_wlan_r16); + } + if (rtt_wlan_r16_present) { + j.write_fieldname("rtt-WLAN-r16"); + rtt_wlan_r16.to_json(j); + } + j.end_obj(); +} + +// NeedForGapNCSG-InfoEUTRA-r17 ::= SEQUENCE +SRSASN_CODE need_for_gap_ncsg_info_eutra_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, need_for_ncsg_eutra_r17, 1, 256)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE need_for_gap_ncsg_info_eutra_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(need_for_ncsg_eutra_r17, bref, 1, 256)); + + return SRSASN_SUCCESS; +} +void need_for_gap_ncsg_info_eutra_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("needForNCSG-EUTRA-r17"); + for (const auto& e1 : need_for_ncsg_eutra_r17) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// NeedForGapNCSG-InfoNR-r17 ::= SEQUENCE +SRSASN_CODE need_for_gap_ncsg_info_nr_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, intra_freq_need_for_ncsg_r17, 1, 32)); + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_need_for_ncsg_r17, 1, 1024)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE need_for_gap_ncsg_info_nr_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(intra_freq_need_for_ncsg_r17, bref, 1, 32)); + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_need_for_ncsg_r17, bref, 1, 1024)); + + return SRSASN_SUCCESS; +} +void need_for_gap_ncsg_info_nr_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("intraFreq-needForNCSG-r17"); + for (const auto& e1 : intra_freq_need_for_ncsg_r17) { + e1.to_json(j); + } + j.end_array(); + j.start_array("interFreq-needForNCSG-r17"); + for (const auto& e1 : inter_freq_need_for_ncsg_r17) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// NeedForGapsIntraFreq-r16 ::= SEQUENCE +SRSASN_CODE need_for_gaps_intra_freq_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, serv_cell_id_r16, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(gap_ind_intra_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE need_for_gaps_intra_freq_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(serv_cell_id_r16, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(gap_ind_intra_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void need_for_gaps_intra_freq_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servCellId-r16", serv_cell_id_r16); + j.write_str("gapIndicationIntra-r16", gap_ind_intra_r16.to_string()); + j.end_obj(); +} + +const char* need_for_gaps_intra_freq_r16_s::gap_ind_intra_r16_opts::to_string() const +{ + static const char* names[] = {"gap", "no-gap"}; + return convert_enum_idx(names, 2, value, "need_for_gaps_intra_freq_r16_s::gap_ind_intra_r16_e_"); +} + +// NeedForGapsNR-r16 ::= SEQUENCE +SRSASN_CODE need_for_gaps_nr_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, band_nr_r16, (uint16_t)1u, (uint16_t)1024u)); + HANDLE_CODE(gap_ind_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE need_for_gaps_nr_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(band_nr_r16, bref, (uint16_t)1u, (uint16_t)1024u)); + HANDLE_CODE(gap_ind_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void need_for_gaps_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bandNR-r16", band_nr_r16); + j.write_str("gapIndication-r16", gap_ind_r16.to_string()); + j.end_obj(); +} + +const char* need_for_gaps_nr_r16_s::gap_ind_r16_opts::to_string() const +{ + static const char* names[] = {"gap", "no-gap"}; + return convert_enum_idx(names, 2, value, "need_for_gaps_nr_r16_s::gap_ind_r16_e_"); +} + +// PCI-ARFCN-EUTRA-r16 ::= SEQUENCE +SRSASN_CODE pci_arfcn_eutra_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)262143u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pci_arfcn_eutra_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)262143u)); + + return SRSASN_SUCCESS; +} +void pci_arfcn_eutra_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r16", pci_r16); + j.write_int("carrierFreq-r16", carrier_freq_r16); + j.end_obj(); +} + +// PCI-ARFCN-NR-r16 ::= SEQUENCE +SRSASN_CODE pci_arfcn_nr_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pci_arfcn_nr_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + + return SRSASN_SUCCESS; +} +void pci_arfcn_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r16", pci_r16); + j.write_int("carrierFreq-r16", carrier_freq_r16); + j.end_obj(); +} + +// PerRACSI-RSInfo-r16 ::= SEQUENCE +SRSASN_CODE per_ra_csi_r_si_nfo_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, csi_rs_idx_r16, (uint8_t)0u, (uint8_t)95u)); + HANDLE_CODE(pack_integer(bref, nof_preambs_sent_on_csi_rs_r16, (uint8_t)1u, (uint8_t)200u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE per_ra_csi_r_si_nfo_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(csi_rs_idx_r16, bref, (uint8_t)0u, (uint8_t)95u)); + HANDLE_CODE(unpack_integer(nof_preambs_sent_on_csi_rs_r16, bref, (uint8_t)1u, (uint8_t)200u)); + + return SRSASN_SUCCESS; +} +void per_ra_csi_r_si_nfo_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("csi-RS-Index-r16", csi_rs_idx_r16); + j.write_int("numberOfPreamblesSentOnCSI-RS-r16", nof_preambs_sent_on_csi_rs_r16); + j.end_obj(); +} + +// PerRASSBInfo-r16 ::= SEQUENCE +SRSASN_CODE per_ra_ssb_info_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, ssb_idx_r16, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_integer(bref, nof_preambs_sent_on_ssb_r16, (uint8_t)1u, (uint8_t)200u)); + HANDLE_CODE(pack_dyn_seq_of(bref, per_ra_attempt_info_list_r16, 1, 200)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE per_ra_ssb_info_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(ssb_idx_r16, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(nof_preambs_sent_on_ssb_r16, bref, (uint8_t)1u, (uint8_t)200u)); + HANDLE_CODE(unpack_dyn_seq_of(per_ra_attempt_info_list_r16, bref, 1, 200)); + + return SRSASN_SUCCESS; +} +void per_ra_ssb_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ssb-Index-r16", ssb_idx_r16); + j.write_int("numberOfPreamblesSentOnSSB-r16", nof_preambs_sent_on_ssb_r16); + j.start_array("perRAAttemptInfoList-r16"); + for (const auto& e1 : per_ra_attempt_info_list_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// RRCReconfigurationComplete-v1720-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_complete_v1720_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_tx_direct_current_more_carrier_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ul_tx_direct_current_more_carrier_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_more_carrier_list_r17, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_complete_v1720_ies_s::unpack(cbit_ref& bref) +{ + bool ul_tx_direct_current_more_carrier_list_r17_present; + HANDLE_CODE(bref.unpack(ul_tx_direct_current_more_carrier_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ul_tx_direct_current_more_carrier_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_more_carrier_list_r17, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void rrc_recfg_complete_v1720_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_tx_direct_current_more_carrier_list_r17.size() > 0) { + j.start_array("uplinkTxDirectCurrentMoreCarrierList-r17"); + for (const auto& e1 : ul_tx_direct_current_more_carrier_list_r17) { + 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(); +} + +// ResultsPerSSB-IndexIdle-r16 ::= SEQUENCE +SRSASN_CODE results_per_ssb_idx_idle_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ssb_results_r16_present, 1)); + + HANDLE_CODE(pack_integer(bref, ssb_idx_r16, (uint8_t)0u, (uint8_t)63u)); + if (ssb_results_r16_present) { + HANDLE_CODE(bref.pack(ssb_results_r16.ssb_rsrp_result_r16_present, 1)); + HANDLE_CODE(bref.pack(ssb_results_r16.ssb_rsrq_result_r16_present, 1)); + if (ssb_results_r16.ssb_rsrp_result_r16_present) { + HANDLE_CODE(pack_integer(bref, ssb_results_r16.ssb_rsrp_result_r16, (uint8_t)0u, (uint8_t)127u)); + } + if (ssb_results_r16.ssb_rsrq_result_r16_present) { + HANDLE_CODE(pack_integer(bref, ssb_results_r16.ssb_rsrq_result_r16, (uint8_t)0u, (uint8_t)127u)); + } + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE results_per_ssb_idx_idle_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ssb_results_r16_present, 1)); + + HANDLE_CODE(unpack_integer(ssb_idx_r16, bref, (uint8_t)0u, (uint8_t)63u)); + if (ssb_results_r16_present) { + HANDLE_CODE(bref.unpack(ssb_results_r16.ssb_rsrp_result_r16_present, 1)); + HANDLE_CODE(bref.unpack(ssb_results_r16.ssb_rsrq_result_r16_present, 1)); + if (ssb_results_r16.ssb_rsrp_result_r16_present) { + HANDLE_CODE(unpack_integer(ssb_results_r16.ssb_rsrp_result_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (ssb_results_r16.ssb_rsrq_result_r16_present) { + HANDLE_CODE(unpack_integer(ssb_results_r16.ssb_rsrq_result_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + } + + return SRSASN_SUCCESS; +} +void results_per_ssb_idx_idle_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ssb-Index-r16", ssb_idx_r16); + if (ssb_results_r16_present) { + j.write_fieldname("ssb-Results-r16"); + j.start_obj(); + if (ssb_results_r16.ssb_rsrp_result_r16_present) { + j.write_int("ssb-RSRP-Result-r16", ssb_results_r16.ssb_rsrp_result_r16); + } + if (ssb_results_r16.ssb_rsrq_result_r16_present) { + j.write_int("ssb-RSRQ-Result-r16", ssb_results_r16.ssb_rsrq_result_r16); + } + j.end_obj(); + } + j.end_obj(); +} + +// SL-PagingIdentityRemoteUE-r17 ::= SEQUENCE +SRSASN_CODE sl_paging_id_remote_ue_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(full_i_rnti_r17_present, 1)); + + HANDLE_CODE(ng_5_g_s_tmsi_r17.pack(bref)); + if (full_i_rnti_r17_present) { + HANDLE_CODE(full_i_rnti_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_paging_id_remote_ue_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(full_i_rnti_r17_present, 1)); + + HANDLE_CODE(ng_5_g_s_tmsi_r17.unpack(bref)); + if (full_i_rnti_r17_present) { + HANDLE_CODE(full_i_rnti_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_paging_id_remote_ue_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("ng-5G-S-TMSI-r17", ng_5_g_s_tmsi_r17.to_string()); + if (full_i_rnti_r17_present) { + j.write_str("fullI-RNTI-r17", full_i_rnti_r17.to_string()); + } + j.end_obj(); +} + +// SL-RLC-ModeIndication-r16 ::= SEQUENCE +SRSASN_CODE sl_rlc_mode_ind_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(sl_mode_r16.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, sl_qos_info_list_r16, 1, 64)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_rlc_mode_ind_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(sl_mode_r16.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(sl_qos_info_list_r16, bref, 1, 64)); + + return SRSASN_SUCCESS; +} +void sl_rlc_mode_ind_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("sl-Mode-r16"); + sl_mode_r16.to_json(j); + j.start_array("sl-QoS-InfoList-r16"); + for (const auto& e1 : sl_qos_info_list_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +void sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::set(types::options e) +{ + type_ = e; +} +void sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::set_sl_am_mode_r16() +{ + set(types::sl_am_mode_r16); +} +void sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::set_sl_um_mode_r16() +{ + set(types::sl_um_mode_r16); +} +void sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + j.end_obj(); +} +SRSASN_CODE sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + return SRSASN_SUCCESS; +} + +const char* sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"sl-AM-Mode-r16", "sl-UM-Mode-r16"}; + return convert_enum_idx(names, 2, value, "sl_rlc_mode_ind_r16_s::sl_mode_r16_c_::types"); +} + +// UplinkTxDirectCurrentTwoCarrier-r16 ::= SEQUENCE +SRSASN_CODE ul_tx_direct_current_two_carrier_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(second_pa_tx_direct_current_r16_present, 1)); + + HANDLE_CODE(carrier_one_info_r16.pack(bref)); + HANDLE_CODE(carrier_two_info_r16.pack(bref)); + HANDLE_CODE(single_pa_tx_direct_current_r16.pack(bref)); + if (second_pa_tx_direct_current_r16_present) { + HANDLE_CODE(second_pa_tx_direct_current_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_tx_direct_current_two_carrier_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(second_pa_tx_direct_current_r16_present, 1)); + + HANDLE_CODE(carrier_one_info_r16.unpack(bref)); + HANDLE_CODE(carrier_two_info_r16.unpack(bref)); + HANDLE_CODE(single_pa_tx_direct_current_r16.unpack(bref)); + if (second_pa_tx_direct_current_r16_present) { + HANDLE_CODE(second_pa_tx_direct_current_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_tx_direct_current_two_carrier_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("carrierOneInfo-r16"); + carrier_one_info_r16.to_json(j); + j.write_fieldname("carrierTwoInfo-r16"); + carrier_two_info_r16.to_json(j); + j.write_fieldname("singlePA-TxDirectCurrent-r16"); + single_pa_tx_direct_current_r16.to_json(j); + if (second_pa_tx_direct_current_r16_present) { + j.write_fieldname("secondPA-TxDirectCurrent-r16"); + second_pa_tx_direct_current_r16.to_json(j); + } + j.end_obj(); +} + +// VictimSystemType-r16 ::= SEQUENCE +SRSASN_CODE victim_sys_type_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(gps_r16_present, 1)); + HANDLE_CODE(bref.pack(glonass_r16_present, 1)); + HANDLE_CODE(bref.pack(bds_r16_present, 1)); + HANDLE_CODE(bref.pack(galileo_r16_present, 1)); + HANDLE_CODE(bref.pack(nav_ic_r16_present, 1)); + HANDLE_CODE(bref.pack(wlan_r16_present, 1)); + HANDLE_CODE(bref.pack(bluetooth_r16_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE victim_sys_type_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(gps_r16_present, 1)); + HANDLE_CODE(bref.unpack(glonass_r16_present, 1)); + HANDLE_CODE(bref.unpack(bds_r16_present, 1)); + HANDLE_CODE(bref.unpack(galileo_r16_present, 1)); + HANDLE_CODE(bref.unpack(nav_ic_r16_present, 1)); + HANDLE_CODE(bref.unpack(wlan_r16_present, 1)); + HANDLE_CODE(bref.unpack(bluetooth_r16_present, 1)); + + return SRSASN_SUCCESS; +} +void victim_sys_type_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (gps_r16_present) { + j.write_str("gps-r16", "true"); + } + if (glonass_r16_present) { + j.write_str("glonass-r16", "true"); + } + if (bds_r16_present) { + j.write_str("bds-r16", "true"); + } + if (galileo_r16_present) { + j.write_str("galileo-r16", "true"); + } + if (nav_ic_r16_present) { + j.write_str("navIC-r16", "true"); + } + if (wlan_r16_present) { + j.write_str("wlan-r16", "true"); + } + if (bluetooth_r16_present) { + j.write_str("bluetooth-r16", "true"); + } + j.end_obj(); +} + +// AffectedCarrierFreq-r16 ::= SEQUENCE +SRSASN_CODE affected_carrier_freq_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(interference_direction_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE affected_carrier_freq_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(interference_direction_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void affected_carrier_freq_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r16", carrier_freq_r16); + j.write_str("interferenceDirection-r16", interference_direction_r16.to_string()); + j.end_obj(); +} + +const char* affected_carrier_freq_r16_s::interference_direction_r16_opts::to_string() const +{ + static const char* names[] = {"nr", "other", "both", "spare"}; + return convert_enum_idx(names, 4, value, "affected_carrier_freq_r16_s::interference_direction_r16_e_"); +} + +// AffectedCarrierFreqComb-r16 ::= SEQUENCE +SRSASN_CODE affected_carrier_freq_comb_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(affected_carrier_freq_comb_r16.size() > 0, 1)); + + if (affected_carrier_freq_comb_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_comb_r16, 2, 32, integer_packer(0, 3279165))); + } + HANDLE_CODE(victim_sys_type_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE affected_carrier_freq_comb_r16_s::unpack(cbit_ref& bref) +{ + bool affected_carrier_freq_comb_r16_present; + HANDLE_CODE(bref.unpack(affected_carrier_freq_comb_r16_present, 1)); + + if (affected_carrier_freq_comb_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_r16, bref, 2, 32, integer_packer(0, 3279165))); + } + HANDLE_CODE(victim_sys_type_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void affected_carrier_freq_comb_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (affected_carrier_freq_comb_r16.size() > 0) { + j.start_array("affectedCarrierFreqComb-r16"); + for (const auto& e1 : affected_carrier_freq_comb_r16) { + j.write_int(e1); + } + j.end_array(); + } + j.write_fieldname("victimSystemType-r16"); + victim_sys_type_r16.to_json(j); + j.end_obj(); +} + +// CommonLocationInfo-r16 ::= SEQUENCE +SRSASN_CODE common_location_info_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(gnss_tod_msec_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(location_timestamp_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(location_coordinate_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(location_error_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(location_source_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(velocity_estimate_r16.size() > 0, 1)); + + if (gnss_tod_msec_r16.size() > 0) { + HANDLE_CODE(gnss_tod_msec_r16.pack(bref)); + } + if (location_timestamp_r16.size() > 0) { + HANDLE_CODE(location_timestamp_r16.pack(bref)); + } + if (location_coordinate_r16.size() > 0) { + HANDLE_CODE(location_coordinate_r16.pack(bref)); + } + if (location_error_r16.size() > 0) { + HANDLE_CODE(location_error_r16.pack(bref)); + } + if (location_source_r16.size() > 0) { + HANDLE_CODE(location_source_r16.pack(bref)); + } + if (velocity_estimate_r16.size() > 0) { + HANDLE_CODE(velocity_estimate_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE common_location_info_r16_s::unpack(cbit_ref& bref) +{ + bool gnss_tod_msec_r16_present; + HANDLE_CODE(bref.unpack(gnss_tod_msec_r16_present, 1)); + bool location_timestamp_r16_present; + HANDLE_CODE(bref.unpack(location_timestamp_r16_present, 1)); + bool location_coordinate_r16_present; + HANDLE_CODE(bref.unpack(location_coordinate_r16_present, 1)); + bool location_error_r16_present; + HANDLE_CODE(bref.unpack(location_error_r16_present, 1)); + bool location_source_r16_present; + HANDLE_CODE(bref.unpack(location_source_r16_present, 1)); + bool velocity_estimate_r16_present; + HANDLE_CODE(bref.unpack(velocity_estimate_r16_present, 1)); + + if (gnss_tod_msec_r16_present) { + HANDLE_CODE(gnss_tod_msec_r16.unpack(bref)); + } + if (location_timestamp_r16_present) { + HANDLE_CODE(location_timestamp_r16.unpack(bref)); + } + if (location_coordinate_r16_present) { + HANDLE_CODE(location_coordinate_r16.unpack(bref)); + } + if (location_error_r16_present) { + HANDLE_CODE(location_error_r16.unpack(bref)); + } + if (location_source_r16_present) { + HANDLE_CODE(location_source_r16.unpack(bref)); + } + if (velocity_estimate_r16_present) { + HANDLE_CODE(velocity_estimate_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void common_location_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (gnss_tod_msec_r16.size() > 0) { + j.write_str("gnss-TOD-msec-r16", gnss_tod_msec_r16.to_string()); + } + if (location_timestamp_r16.size() > 0) { + j.write_str("locationTimestamp-r16", location_timestamp_r16.to_string()); + } + if (location_coordinate_r16.size() > 0) { + j.write_str("locationCoordinate-r16", location_coordinate_r16.to_string()); + } + if (location_error_r16.size() > 0) { + j.write_str("locationError-r16", location_error_r16.to_string()); + } + if (location_source_r16.size() > 0) { + j.write_str("locationSource-r16", location_source_r16.to_string()); + } + if (velocity_estimate_r16.size() > 0) { + j.write_str("velocityEstimate-r16", velocity_estimate_r16.to_string()); + } + j.end_obj(); +} + +// MeasResult2EUTRA-r16 ::= SEQUENCE +SRSASN_CODE meas_result2_eutra_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_r16, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result2_eutra_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_r16, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_result2_eutra_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r16", carrier_freq_r16); + j.start_array("measResultList-r16"); + for (const auto& e1 : meas_result_list_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MeasResult2NR-r16 ::= SEQUENCE +SRSASN_CODE meas_result2_nr_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ssb_freq_r16_present, 1)); + HANDLE_CODE(bref.pack(ref_freq_csi_rs_r16_present, 1)); + + if (ssb_freq_r16_present) { + HANDLE_CODE(pack_integer(bref, ssb_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); + } + if (ref_freq_csi_rs_r16_present) { + HANDLE_CODE(pack_integer(bref, ref_freq_csi_rs_r16, (uint32_t)0u, (uint32_t)3279165u)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_r16, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result2_nr_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ssb_freq_r16_present, 1)); + HANDLE_CODE(bref.unpack(ref_freq_csi_rs_r16_present, 1)); + + if (ssb_freq_r16_present) { + HANDLE_CODE(unpack_integer(ssb_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + } + if (ref_freq_csi_rs_r16_present) { + HANDLE_CODE(unpack_integer(ref_freq_csi_rs_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + } + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_r16, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_result2_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ssb_freq_r16_present) { + j.write_int("ssbFrequency-r16", ssb_freq_r16); + } + if (ref_freq_csi_rs_r16_present) { + j.write_int("refFreqCSI-RS-r16", ref_freq_csi_rs_r16); + } + j.start_array("measResultList-r16"); + for (const auto& e1 : meas_result_list_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MeasResultLogging2NR-r16 ::= SEQUENCE +SRSASN_CODE meas_result_logging2_nr_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_logging_nr_r16, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_logging2_nr_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_logging_nr_r16, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_result_logging2_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r16", carrier_freq_r16); + j.start_array("measResultListLoggingNR-r16"); + for (const auto& e1 : meas_result_list_logging_nr_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MeasResultUTRA-FDD-r16 ::= SEQUENCE +SRSASN_CODE meas_result_utra_fdd_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)511u)); + HANDLE_CODE(bref.pack(meas_result_r16.utra_fdd_rs_cp_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_result_r16.utra_fdd_ec_n0_r16_present, 1)); + if (meas_result_r16.utra_fdd_rs_cp_r16_present) { + HANDLE_CODE(pack_integer(bref, meas_result_r16.utra_fdd_rs_cp_r16, (int8_t)-5, (int8_t)91)); + } + if (meas_result_r16.utra_fdd_ec_n0_r16_present) { + HANDLE_CODE(pack_integer(bref, meas_result_r16.utra_fdd_ec_n0_r16, (uint8_t)0u, (uint8_t)49u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_utra_fdd_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)511u)); + HANDLE_CODE(bref.unpack(meas_result_r16.utra_fdd_rs_cp_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_r16.utra_fdd_ec_n0_r16_present, 1)); + if (meas_result_r16.utra_fdd_rs_cp_r16_present) { + HANDLE_CODE(unpack_integer(meas_result_r16.utra_fdd_rs_cp_r16, bref, (int8_t)-5, (int8_t)91)); + } + if (meas_result_r16.utra_fdd_ec_n0_r16_present) { + HANDLE_CODE(unpack_integer(meas_result_r16.utra_fdd_ec_n0_r16, bref, (uint8_t)0u, (uint8_t)49u)); + } + + return SRSASN_SUCCESS; +} +void meas_result_utra_fdd_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r16", pci_r16); + j.write_fieldname("measResult-r16"); + j.start_obj(); + if (meas_result_r16.utra_fdd_rs_cp_r16_present) { + j.write_int("utra-FDD-RSCP-r16", meas_result_r16.utra_fdd_rs_cp_r16); + } + if (meas_result_r16.utra_fdd_ec_n0_r16_present) { + j.write_int("utra-FDD-EcN0-r16", meas_result_r16.utra_fdd_ec_n0_r16); + } + j.end_obj(); + j.end_obj(); +} + +// PerRACSI-RSInfo-v1660 ::= SEQUENCE +SRSASN_CODE per_ra_csi_r_si_nfo_v1660_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(csi_rs_idx_v1660_present, 1)); + + if (csi_rs_idx_v1660_present) { + HANDLE_CODE(pack_integer(bref, csi_rs_idx_v1660, (uint8_t)1u, (uint8_t)96u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE per_ra_csi_r_si_nfo_v1660_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(csi_rs_idx_v1660_present, 1)); + + if (csi_rs_idx_v1660_present) { + HANDLE_CODE(unpack_integer(csi_rs_idx_v1660, bref, (uint8_t)1u, (uint8_t)96u)); + } + + return SRSASN_SUCCESS; +} +void per_ra_csi_r_si_nfo_v1660_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (csi_rs_idx_v1660_present) { + j.write_int("csi-RS-Index-v1660", csi_rs_idx_v1660); + } + j.end_obj(); +} + +// PerRAInfo-r16 ::= CHOICE +void per_ra_info_r16_c::destroy_() +{ + switch (type_) { + case types::per_ra_ssb_info_list_r16: + c.destroy(); + break; + case types::per_ra_csi_r_si_nfo_list_r16: + c.destroy(); + break; + default: + break; + } +} +void per_ra_info_r16_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::per_ra_ssb_info_list_r16: + c.init(); + break; + case types::per_ra_csi_r_si_nfo_list_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "per_ra_info_r16_c"); + } +} +per_ra_info_r16_c::per_ra_info_r16_c(const per_ra_info_r16_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::per_ra_ssb_info_list_r16: + c.init(other.c.get()); + break; + case types::per_ra_csi_r_si_nfo_list_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "per_ra_info_r16_c"); + } +} +per_ra_info_r16_c& per_ra_info_r16_c::operator=(const per_ra_info_r16_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::per_ra_ssb_info_list_r16: + c.set(other.c.get()); + break; + case types::per_ra_csi_r_si_nfo_list_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "per_ra_info_r16_c"); + } + + return *this; +} +per_ra_ssb_info_r16_s& per_ra_info_r16_c::set_per_ra_ssb_info_list_r16() +{ + set(types::per_ra_ssb_info_list_r16); + return c.get(); +} +per_ra_csi_r_si_nfo_r16_s& per_ra_info_r16_c::set_per_ra_csi_r_si_nfo_list_r16() +{ + set(types::per_ra_csi_r_si_nfo_list_r16); + return c.get(); +} +void per_ra_info_r16_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::per_ra_ssb_info_list_r16: + j.write_fieldname("perRASSBInfoList-r16"); + c.get().to_json(j); + break; + case types::per_ra_csi_r_si_nfo_list_r16: + j.write_fieldname("perRACSI-RSInfoList-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "per_ra_info_r16_c"); + } + j.end_obj(); +} +SRSASN_CODE per_ra_info_r16_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::per_ra_ssb_info_list_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::per_ra_csi_r_si_nfo_list_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "per_ra_info_r16_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE per_ra_info_r16_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::per_ra_ssb_info_list_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::per_ra_csi_r_si_nfo_list_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "per_ra_info_r16_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* per_ra_info_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"perRASSBInfoList-r16", "perRACSI-RSInfoList-r16"}; + return convert_enum_idx(names, 2, value, "per_ra_info_r16_c::types"); +} + +// RRCReconfigurationComplete-v1700-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_complete_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(need_for_gap_ncsg_info_nr_r17_present, 1)); + HANDLE_CODE(bref.pack(need_for_gap_ncsg_info_eutra_r17_present, 1)); + HANDLE_CODE(bref.pack(sel_cond_rrc_recfg_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (need_for_gap_ncsg_info_nr_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_info_nr_r17.pack(bref)); + } + if (need_for_gap_ncsg_info_eutra_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_info_eutra_r17.pack(bref)); + } + if (sel_cond_rrc_recfg_r17_present) { + HANDLE_CODE(pack_integer(bref, sel_cond_rrc_recfg_r17, (uint8_t)1u, (uint8_t)8u)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_complete_v1700_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(need_for_gap_ncsg_info_nr_r17_present, 1)); + HANDLE_CODE(bref.unpack(need_for_gap_ncsg_info_eutra_r17_present, 1)); + HANDLE_CODE(bref.unpack(sel_cond_rrc_recfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (need_for_gap_ncsg_info_nr_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_info_nr_r17.unpack(bref)); + } + if (need_for_gap_ncsg_info_eutra_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_info_eutra_r17.unpack(bref)); + } + if (sel_cond_rrc_recfg_r17_present) { + HANDLE_CODE(unpack_integer(sel_cond_rrc_recfg_r17, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_recfg_complete_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (need_for_gap_ncsg_info_nr_r17_present) { + j.write_fieldname("needForGapNCSG-InfoNR-r17"); + need_for_gap_ncsg_info_nr_r17.to_json(j); + } + if (need_for_gap_ncsg_info_eutra_r17_present) { + j.write_fieldname("needForGapNCSG-InfoEUTRA-r17"); + need_for_gap_ncsg_info_eutra_r17.to_json(j); + } + if (sel_cond_rrc_recfg_r17_present) { + j.write_int("selectedCondRRCReconfig-r17", sel_cond_rrc_recfg_r17); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// ReducedAggregatedBandwidth ::= ENUMERATED +const char* reduced_aggr_bw_opts::to_string() const +{ + static const char* names[] = { + "mhz0", "mhz10", "mhz20", "mhz30", "mhz40", "mhz50", "mhz60", "mhz80", "mhz100", "mhz200", "mhz300", "mhz400"}; + return convert_enum_idx(names, 12, value, "reduced_aggr_bw_e"); +} +uint16_t reduced_aggr_bw_opts::to_number() const +{ + static const uint16_t numbers[] = {0, 10, 20, 30, 40, 50, 60, 80, 100, 200, 300, 400}; + return map_enum_number(numbers, 12, value, "reduced_aggr_bw_e"); +} + +// ReducedAggregatedBandwidth-r17 ::= ENUMERATED +const char* reduced_aggr_bw_r17_opts::to_string() const +{ + static const char* names[] = {"mhz0", "mhz100", "mhz200", "mhz400", "mhz800", "mhz1200", "mhz1600", "mhz2000"}; + return convert_enum_idx(names, 8, value, "reduced_aggr_bw_r17_e"); +} +uint16_t reduced_aggr_bw_r17_opts::to_number() const +{ + static const uint16_t numbers[] = {0, 100, 200, 400, 800, 1200, 1600, 2000}; + return map_enum_number(numbers, 8, value, "reduced_aggr_bw_r17_e"); +} + +// SL-DRX-ConfigUC-SemiStatic-r17 ::= SEQUENCE +SRSASN_CODE sl_drx_cfg_uc_semi_static_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(sl_drx_on_dur_timer_r17.pack(bref)); + HANDLE_CODE(sl_drx_cycle_start_offset_r17.pack(bref)); + HANDLE_CODE(pack_integer(bref, sl_drx_slot_offset_r17, (uint8_t)0u, (uint8_t)31u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_drx_cfg_uc_semi_static_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(sl_drx_on_dur_timer_r17.unpack(bref)); + HANDLE_CODE(sl_drx_cycle_start_offset_r17.unpack(bref)); + HANDLE_CODE(unpack_integer(sl_drx_slot_offset_r17, bref, (uint8_t)0u, (uint8_t)31u)); + + return SRSASN_SUCCESS; +} +void sl_drx_cfg_uc_semi_static_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("sl-drx-onDurationTimer-r17"); + sl_drx_on_dur_timer_r17.to_json(j); + j.write_fieldname("sl-drx-CycleStartOffset-r17"); + sl_drx_cycle_start_offset_r17.to_json(j); + j.write_int("sl-drx-SlotOffset-r17", sl_drx_slot_offset_r17); + j.end_obj(); +} + +void sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::destroy_() {} +void sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::sl_drx_on_dur_timer_r17_c_( + const sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_& other) +{ + 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_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_"); + } +} +sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_& +sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::operator=( + const sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_& other) +{ + if (this == &other) { + return *this; + } + 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_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_"); + } + + return *this; +} +uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::set_sub_milli_seconds() +{ + set(types::sub_milli_seconds); + return c.get(); +} +sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::milli_seconds_e_& +sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::set_milli_seconds() +{ + set(types::milli_seconds); + return c.get(); +} +void sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::to_json(json_writer& j) const +{ + j.start_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_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_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)); + break; + case types::milli_seconds: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_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)); + break; + case types::milli_seconds: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::milli_seconds_opts::to_string() const +{ + static const char* names[] = {"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( + names, 32, value, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::milli_seconds_e_"); +} +uint16_t sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::milli_seconds_opts::to_number() const +{ + static const uint16_t numbers[] = {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( + numbers, 24, value, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::milli_seconds_e_"); +} + +const char* sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"subMilliSeconds", "milliSeconds"}; + return convert_enum_idx(names, 2, value, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_on_dur_timer_r17_c_::types"); +} + +void sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::destroy_() {} +void sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::sl_drx_cycle_start_offset_r17_c_( + const sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_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()); + 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_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_"); + } +} +sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_& +sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::operator=( + const sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_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()); + break; + case types::ms10240: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_"); + } + + return *this; +} +uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms10() +{ + set(types::ms10); + return c.get(); +} +uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms20() +{ + set(types::ms20); + return c.get(); +} +uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms32() +{ + set(types::ms32); + return c.get(); +} +uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms40() +{ + set(types::ms40); + return c.get(); +} +uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms60() +{ + set(types::ms60); + return c.get(); +} +uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms64() +{ + set(types::ms64); + return c.get(); +} +uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms70() +{ + set(types::ms70); + return c.get(); +} +uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms80() +{ + set(types::ms80); + return c.get(); +} +uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms128() +{ + set(types::ms128); + return c.get(); +} +uint8_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms160() +{ + set(types::ms160); + return c.get(); +} +uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms256() +{ + set(types::ms256); + return c.get(); +} +uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms320() +{ + set(types::ms320); + return c.get(); +} +uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms512() +{ + set(types::ms512); + return c.get(); +} +uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms640() +{ + set(types::ms640); + return c.get(); +} +uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms1024() +{ + set(types::ms1024); + return c.get(); +} +uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms1280() +{ + set(types::ms1280); + return c.get(); +} +uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms2048() +{ + set(types::ms2048); + return c.get(); +} +uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms2560() +{ + set(types::ms2560); + return c.get(); +} +uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms5120() +{ + set(types::ms5120); + return c.get(); +} +uint16_t& sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::set_ms10240() +{ + set(types::ms10240); + return c.get(); +} +void sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_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()); + break; + case types::ms10240: + j.write_int("ms10240", c.get()); + break; + default: + log_invalid_choice_id(type_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_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)); + break; + case types::ms10240: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); + break; + default: + log_invalid_choice_id(type_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_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)); + break; + case types::ms10240: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); + break; + default: + log_invalid_choice_id(type_, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", + "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", + "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; + return convert_enum_idx(names, 20, value, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::types"); +} +uint16_t sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, + 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; + return map_enum_number( + numbers, 20, value, "sl_drx_cfg_uc_semi_static_r17_s::sl_drx_cycle_start_offset_r17_c_::types"); +} + +// SL-TxResourceReq-r16 ::= SEQUENCE +SRSASN_CODE sl_tx_res_req_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sl_rlc_mode_ind_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_qos_info_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_type_tx_sync_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_tx_interested_freq_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_cap_info_sidelink_r16.size() > 0, 1)); + + HANDLE_CODE(sl_dest_id_r16.pack(bref)); + HANDLE_CODE(sl_cast_type_r16.pack(bref)); + if (sl_rlc_mode_ind_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_rlc_mode_ind_list_r16, 1, 512)); + } + if (sl_qos_info_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_qos_info_list_r16, 1, 64)); + } + if (sl_type_tx_sync_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_type_tx_sync_list_r16, 1, 8)); + } + if (sl_tx_interested_freq_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_interested_freq_list_r16, 1, 8, integer_packer(1, 8))); + } + if (sl_cap_info_sidelink_r16.size() > 0) { + HANDLE_CODE(sl_cap_info_sidelink_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_tx_res_req_r16_s::unpack(cbit_ref& bref) +{ + bool sl_rlc_mode_ind_list_r16_present; + HANDLE_CODE(bref.unpack(sl_rlc_mode_ind_list_r16_present, 1)); + bool sl_qos_info_list_r16_present; + HANDLE_CODE(bref.unpack(sl_qos_info_list_r16_present, 1)); + bool sl_type_tx_sync_list_r16_present; + HANDLE_CODE(bref.unpack(sl_type_tx_sync_list_r16_present, 1)); + bool sl_tx_interested_freq_list_r16_present; + HANDLE_CODE(bref.unpack(sl_tx_interested_freq_list_r16_present, 1)); + bool sl_cap_info_sidelink_r16_present; + HANDLE_CODE(bref.unpack(sl_cap_info_sidelink_r16_present, 1)); + + HANDLE_CODE(sl_dest_id_r16.unpack(bref)); + HANDLE_CODE(sl_cast_type_r16.unpack(bref)); + if (sl_rlc_mode_ind_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_rlc_mode_ind_list_r16, bref, 1, 512)); + } + if (sl_qos_info_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_qos_info_list_r16, bref, 1, 64)); + } + if (sl_type_tx_sync_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_type_tx_sync_list_r16, bref, 1, 8)); + } + if (sl_tx_interested_freq_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_tx_interested_freq_list_r16, bref, 1, 8, integer_packer(1, 8))); + } + if (sl_cap_info_sidelink_r16_present) { + HANDLE_CODE(sl_cap_info_sidelink_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_tx_res_req_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sl-DestinationIdentity-r16", sl_dest_id_r16.to_string()); + j.write_str("sl-CastType-r16", sl_cast_type_r16.to_string()); + if (sl_rlc_mode_ind_list_r16.size() > 0) { + j.start_array("sl-RLC-ModeIndicationList-r16"); + for (const auto& e1 : sl_rlc_mode_ind_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_qos_info_list_r16.size() > 0) { + j.start_array("sl-QoS-InfoList-r16"); + for (const auto& e1 : sl_qos_info_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_type_tx_sync_list_r16.size() > 0) { + j.start_array("sl-TypeTxSyncList-r16"); + for (const auto& e1 : sl_type_tx_sync_list_r16) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (sl_tx_interested_freq_list_r16.size() > 0) { + j.start_array("sl-TxInterestedFreqList-r16"); + for (const auto& e1 : sl_tx_interested_freq_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_cap_info_sidelink_r16.size() > 0) { + j.write_str("sl-CapabilityInformationSidelink-r16", sl_cap_info_sidelink_r16.to_string()); + } + j.end_obj(); +} + +const char* sl_tx_res_req_r16_s::sl_cast_type_r16_opts::to_string() const +{ + static const char* names[] = {"broadcast", "groupcast", "unicast", "spare1"}; + return convert_enum_idx(names, 4, value, "sl_tx_res_req_r16_s::sl_cast_type_r16_e_"); +} + +// SL-TxResourceReqL2U2N-Relay-r17 ::= SEQUENCE +SRSASN_CODE sl_tx_res_req_l2_u2_n_relay_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_dest_id_l2_u2_n_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_local_id_request_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_paging_id_remote_ue_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_cap_info_sidelink_r17.size() > 0, 1)); + + if (sl_dest_id_l2_u2_n_r17_present) { + HANDLE_CODE(sl_dest_id_l2_u2_n_r17.pack(bref)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_interested_freq_list_l2_u2_n_r17, 1, 8, integer_packer(1, 8))); + HANDLE_CODE(pack_dyn_seq_of(bref, sl_type_tx_sync_list_l2_u2_n_r17, 1, 8)); + if (sl_paging_id_remote_ue_r17_present) { + HANDLE_CODE(sl_paging_id_remote_ue_r17.pack(bref)); + } + if (sl_cap_info_sidelink_r17.size() > 0) { + HANDLE_CODE(sl_cap_info_sidelink_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_tx_res_req_l2_u2_n_relay_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_dest_id_l2_u2_n_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_local_id_request_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_paging_id_remote_ue_r17_present, 1)); + bool sl_cap_info_sidelink_r17_present; + HANDLE_CODE(bref.unpack(sl_cap_info_sidelink_r17_present, 1)); + + if (sl_dest_id_l2_u2_n_r17_present) { + HANDLE_CODE(sl_dest_id_l2_u2_n_r17.unpack(bref)); + } + HANDLE_CODE(unpack_dyn_seq_of(sl_tx_interested_freq_list_l2_u2_n_r17, bref, 1, 8, integer_packer(1, 8))); + HANDLE_CODE(unpack_dyn_seq_of(sl_type_tx_sync_list_l2_u2_n_r17, bref, 1, 8)); + if (sl_paging_id_remote_ue_r17_present) { + HANDLE_CODE(sl_paging_id_remote_ue_r17.unpack(bref)); + } + if (sl_cap_info_sidelink_r17_present) { + HANDLE_CODE(sl_cap_info_sidelink_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_tx_res_req_l2_u2_n_relay_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_dest_id_l2_u2_n_r17_present) { + j.write_str("sl-DestinationIdentityL2U2N-r17", sl_dest_id_l2_u2_n_r17.to_string()); + } + j.start_array("sl-TxInterestedFreqListL2U2N-r17"); + for (const auto& e1 : sl_tx_interested_freq_list_l2_u2_n_r17) { + j.write_int(e1); + } + j.end_array(); + j.start_array("sl-TypeTxSyncListL2U2N-r17"); + for (const auto& e1 : sl_type_tx_sync_list_l2_u2_n_r17) { + j.write_str(e1.to_string()); + } + j.end_array(); + if (sl_local_id_request_r17_present) { + j.write_str("sl-LocalID-Request-r17", "true"); + } + if (sl_paging_id_remote_ue_r17_present) { + j.write_fieldname("sl-PagingIdentityRemoteUE-r17"); + sl_paging_id_remote_ue_r17.to_json(j); + } + if (sl_cap_info_sidelink_r17.size() > 0) { + j.write_str("sl-CapabilityInformationSidelink-r17", sl_cap_info_sidelink_r17.to_string()); + } + j.end_obj(); +} + +// Sensor-LocationInfo-r16 ::= SEQUENCE +SRSASN_CODE sensor_location_info_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sensor_meas_info_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sensor_motion_info_r16.size() > 0, 1)); + + if (sensor_meas_info_r16.size() > 0) { + HANDLE_CODE(sensor_meas_info_r16.pack(bref)); + } + if (sensor_motion_info_r16.size() > 0) { + HANDLE_CODE(sensor_motion_info_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sensor_location_info_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool sensor_meas_info_r16_present; + HANDLE_CODE(bref.unpack(sensor_meas_info_r16_present, 1)); + bool sensor_motion_info_r16_present; + HANDLE_CODE(bref.unpack(sensor_motion_info_r16_present, 1)); + + if (sensor_meas_info_r16_present) { + HANDLE_CODE(sensor_meas_info_r16.unpack(bref)); + } + if (sensor_motion_info_r16_present) { + HANDLE_CODE(sensor_motion_info_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sensor_location_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sensor_meas_info_r16.size() > 0) { + j.write_str("sensor-MeasurementInformation-r16", sensor_meas_info_r16.to_string()); + } + if (sensor_motion_info_r16.size() > 0) { + j.write_str("sensor-MotionInformation-r16", sensor_motion_info_r16.to_string()); + } + j.end_obj(); +} + +// VisitedPSCellInfo-r17 ::= SEQUENCE +SRSASN_CODE visited_pscell_info_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(visited_cell_id_r17_present, 1)); + + if (visited_cell_id_r17_present) { + HANDLE_CODE(visited_cell_id_r17.pack(bref)); + } + HANDLE_CODE(pack_integer(bref, time_spent_r17, (uint16_t)0u, (uint16_t)4095u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE visited_pscell_info_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(visited_cell_id_r17_present, 1)); + + if (visited_cell_id_r17_present) { + HANDLE_CODE(visited_cell_id_r17.unpack(bref)); + } + HANDLE_CODE(unpack_integer(time_spent_r17, bref, (uint16_t)0u, (uint16_t)4095u)); + + return SRSASN_SUCCESS; +} +void visited_pscell_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (visited_cell_id_r17_present) { + j.write_fieldname("visitedCellId-r17"); + visited_cell_id_r17.to_json(j); + } + j.write_int("timeSpent-r17", time_spent_r17); + j.end_obj(); +} + +void visited_pscell_info_r17_s::visited_cell_id_r17_c_::destroy_() +{ + switch (type_) { + case types::nr_cell_id_r17: + c.destroy(); + break; + case types::eutra_cell_id_r17: + c.destroy(); + break; + default: + break; + } +} +void visited_pscell_info_r17_s::visited_cell_id_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nr_cell_id_r17: + c.init(); + break; + case types::eutra_cell_id_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_"); + } +} +visited_pscell_info_r17_s::visited_cell_id_r17_c_::visited_cell_id_r17_c_( + const visited_pscell_info_r17_s::visited_cell_id_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::nr_cell_id_r17: + c.init(other.c.get()); + break; + case types::eutra_cell_id_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_"); + } +} +visited_pscell_info_r17_s::visited_cell_id_r17_c_& visited_pscell_info_r17_s::visited_cell_id_r17_c_::operator=( + const visited_pscell_info_r17_s::visited_cell_id_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nr_cell_id_r17: + c.set(other.c.get()); + break; + case types::eutra_cell_id_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_"); + } + + return *this; +} +visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_& +visited_pscell_info_r17_s::visited_cell_id_r17_c_::set_nr_cell_id_r17() +{ + set(types::nr_cell_id_r17); + return c.get(); +} +visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_& +visited_pscell_info_r17_s::visited_cell_id_r17_c_::set_eutra_cell_id_r17() +{ + set(types::eutra_cell_id_r17); + return c.get(); +} +void visited_pscell_info_r17_s::visited_cell_id_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nr_cell_id_r17: + j.write_fieldname("nr-CellId-r17"); + c.get().to_json(j); + break; + case types::eutra_cell_id_r17: + j.write_fieldname("eutra-CellId-r17"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE visited_pscell_info_r17_s::visited_cell_id_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::nr_cell_id_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eutra_cell_id_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE visited_pscell_info_r17_s::visited_cell_id_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::nr_cell_id_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eutra_cell_id_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::destroy_() +{ + switch (type_) { + case types::cgi_info_r17: + c.destroy(); + break; + case types::pci_arfcn_r17: + c.destroy(); + break; + default: + break; + } +} +void visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cgi_info_r17: + c.init(); + break; + case types::pci_arfcn_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_"); + } +} +visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::nr_cell_id_r17_c_( + const visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cgi_info_r17: + c.init(other.c.get()); + break; + case types::pci_arfcn_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_"); + } +} +visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_& +visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::operator=( + const visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cgi_info_r17: + c.set(other.c.get()); + break; + case types::pci_arfcn_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_"); + } + + return *this; +} +cgi_info_logging_r16_s& visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::set_cgi_info_r17() +{ + set(types::cgi_info_r17); + return c.get(); +} +pci_arfcn_nr_r16_s& visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::set_pci_arfcn_r17() +{ + set(types::pci_arfcn_r17); + return c.get(); +} +void visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cgi_info_r17: + j.write_fieldname("cgi-Info-r17"); + c.get().to_json(j); + break; + case types::pci_arfcn_r17: + j.write_fieldname("pci-arfcn-r17"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cgi_info_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_arfcn_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cgi_info_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_arfcn_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"cgi-Info-r17", "pci-arfcn-r17"}; + return convert_enum_idx( + names, 2, value, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::nr_cell_id_r17_c_::types"); +} + +void visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::destroy_() +{ + switch (type_) { + case types::cell_global_id_r17: + c.destroy(); + break; + case types::pci_arfcn_r17: + c.destroy(); + break; + default: + break; + } +} +void visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_global_id_r17: + c.init(); + break; + case types::pci_arfcn_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_"); + } +} +visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::eutra_cell_id_r17_c_( + const visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_global_id_r17: + c.init(other.c.get()); + break; + case types::pci_arfcn_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_"); + } +} +visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_& +visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::operator=( + const visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_global_id_r17: + c.set(other.c.get()); + break; + case types::pci_arfcn_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_"); + } + + return *this; +} +cgi_info_eutra_logging_s& +visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::set_cell_global_id_r17() +{ + set(types::cell_global_id_r17); + return c.get(); +} +pci_arfcn_eutra_r16_s& visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::set_pci_arfcn_r17() +{ + set(types::pci_arfcn_r17); + return c.get(); +} +void visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_global_id_r17: + j.write_fieldname("cellGlobalId-r17"); + c.get().to_json(j); + break; + case types::pci_arfcn_r17: + j.write_fieldname("pci-arfcn-r17"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cell_global_id_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_arfcn_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cell_global_id_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_arfcn_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"cellGlobalId-r17", "pci-arfcn-r17"}; + return convert_enum_idx( + names, 2, value, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::eutra_cell_id_r17_c_::types"); +} + +const char* visited_pscell_info_r17_s::visited_cell_id_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"nr-CellId-r17", "eutra-CellId-r17"}; + return convert_enum_idx(names, 2, value, "visited_pscell_info_r17_s::visited_cell_id_r17_c_::types"); +} + +// LocationInfo-r16 ::= SEQUENCE +SRSASN_CODE location_info_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(common_location_info_r16_present, 1)); + HANDLE_CODE(bref.pack(bt_location_info_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(wlan_location_info_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sensor_location_info_r16_present, 1)); + + if (common_location_info_r16_present) { + HANDLE_CODE(common_location_info_r16.pack(bref)); + } + if (bt_location_info_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, bt_location_info_r16, 1, 32)); + } + if (wlan_location_info_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, wlan_location_info_r16, 1, 32)); + } + if (sensor_location_info_r16_present) { + HANDLE_CODE(sensor_location_info_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE location_info_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(common_location_info_r16_present, 1)); + bool bt_location_info_r16_present; + HANDLE_CODE(bref.unpack(bt_location_info_r16_present, 1)); + bool wlan_location_info_r16_present; + HANDLE_CODE(bref.unpack(wlan_location_info_r16_present, 1)); + HANDLE_CODE(bref.unpack(sensor_location_info_r16_present, 1)); + + if (common_location_info_r16_present) { + HANDLE_CODE(common_location_info_r16.unpack(bref)); + } + if (bt_location_info_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(bt_location_info_r16, bref, 1, 32)); + } + if (wlan_location_info_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(wlan_location_info_r16, bref, 1, 32)); + } + if (sensor_location_info_r16_present) { + HANDLE_CODE(sensor_location_info_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void location_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (common_location_info_r16_present) { + j.write_fieldname("commonLocationInfo-r16"); + common_location_info_r16.to_json(j); + } + if (bt_location_info_r16.size() > 0) { + j.start_array("bt-LocationInfo-r16"); + for (const auto& e1 : bt_location_info_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (wlan_location_info_r16.size() > 0) { + j.start_array("wlan-LocationInfo-r16"); + for (const auto& e1 : wlan_location_info_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sensor_location_info_r16_present) { + j.write_fieldname("sensor-LocationInfo-r16"); + sensor_location_info_r16.to_json(j); + } + j.end_obj(); +} + +// MUSIM-Assistance-r17 ::= SEQUENCE +SRSASN_CODE mu_si_m_assist_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(musim_preferred_rrc_state_r17_present, 1)); + HANDLE_CODE(bref.pack(musim_gap_pref_list_r17.size() > 0, 1)); + + if (musim_preferred_rrc_state_r17_present) { + HANDLE_CODE(musim_preferred_rrc_state_r17.pack(bref)); + } + if (musim_gap_pref_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, musim_gap_pref_list_r17, 1, 4)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mu_si_m_assist_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(musim_preferred_rrc_state_r17_present, 1)); + bool musim_gap_pref_list_r17_present; + HANDLE_CODE(bref.unpack(musim_gap_pref_list_r17_present, 1)); + + if (musim_preferred_rrc_state_r17_present) { + HANDLE_CODE(musim_preferred_rrc_state_r17.unpack(bref)); + } + if (musim_gap_pref_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(musim_gap_pref_list_r17, bref, 1, 4)); + } + + return SRSASN_SUCCESS; +} +void mu_si_m_assist_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (musim_preferred_rrc_state_r17_present) { + j.write_str("musim-PreferredRRC-State-r17", musim_preferred_rrc_state_r17.to_string()); + } + if (musim_gap_pref_list_r17.size() > 0) { + j.start_array("musim-GapPreferenceList-r17"); + for (const auto& e1 : musim_gap_pref_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +const char* mu_si_m_assist_r17_s::musim_preferred_rrc_state_r17_opts::to_string() const +{ + static const char* names[] = {"idle", "inactive", "outOfConnected"}; + return convert_enum_idx(names, 3, value, "mu_si_m_assist_r17_s::musim_preferred_rrc_state_r17_e_"); +} + +// MaxBW-PreferenceFR2-2-r17 ::= SEQUENCE +SRSASN_CODE max_bw_pref_fr2_2_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(reduced_max_bw_fr2_2_r17_present, 1)); + + if (reduced_max_bw_fr2_2_r17_present) { + HANDLE_CODE(bref.pack(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17_present, 1)); + HANDLE_CODE(bref.pack(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17_present, 1)); + if (reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17_present) { + HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17.pack(bref)); + } + if (reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17_present) { + HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17.pack(bref)); + } + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE max_bw_pref_fr2_2_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(reduced_max_bw_fr2_2_r17_present, 1)); + + if (reduced_max_bw_fr2_2_r17_present) { + HANDLE_CODE(bref.unpack(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17_present, 1)); + HANDLE_CODE(bref.unpack(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17_present, 1)); + if (reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17_present) { + HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17.unpack(bref)); + } + if (reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17_present) { + HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17.unpack(bref)); + } + } + + return SRSASN_SUCCESS; +} +void max_bw_pref_fr2_2_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (reduced_max_bw_fr2_2_r17_present) { + j.write_fieldname("reducedMaxBW-FR2-2-r17"); + j.start_obj(); + if (reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17_present) { + j.write_str("reducedBW-FR2-2-DL-r17", reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17.to_string()); + } + if (reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17_present) { + j.write_str("reducedBW-FR2-2-UL-r17", reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17.to_string()); + } + j.end_obj(); + } + j.end_obj(); +} + +// MaxMIMO-LayerPreferenceFR2-2-r17 ::= SEQUENCE +SRSASN_CODE max_mimo_layer_pref_fr2_2_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(reduced_max_mimo_layers_fr2_2_r17_present, 1)); + + if (reduced_max_mimo_layers_fr2_2_r17_present) { + HANDLE_CODE(pack_integer( + bref, reduced_max_mimo_layers_fr2_2_r17.reduced_mimo_layers_fr2_2_dl_r17, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pack_integer( + bref, reduced_max_mimo_layers_fr2_2_r17.reduced_mimo_layers_fr2_2_ul_r17, (uint8_t)1u, (uint8_t)4u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE max_mimo_layer_pref_fr2_2_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(reduced_max_mimo_layers_fr2_2_r17_present, 1)); + + if (reduced_max_mimo_layers_fr2_2_r17_present) { + HANDLE_CODE(unpack_integer( + reduced_max_mimo_layers_fr2_2_r17.reduced_mimo_layers_fr2_2_dl_r17, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(unpack_integer( + reduced_max_mimo_layers_fr2_2_r17.reduced_mimo_layers_fr2_2_ul_r17, bref, (uint8_t)1u, (uint8_t)4u)); + } + + return SRSASN_SUCCESS; +} +void max_mimo_layer_pref_fr2_2_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (reduced_max_mimo_layers_fr2_2_r17_present) { + j.write_fieldname("reducedMaxMIMO-LayersFR2-2-r17"); + j.start_obj(); + j.write_int("reducedMIMO-LayersFR2-2-DL-r17", reduced_max_mimo_layers_fr2_2_r17.reduced_mimo_layers_fr2_2_dl_r17); + j.write_int("reducedMIMO-LayersFR2-2-UL-r17", reduced_max_mimo_layers_fr2_2_r17.reduced_mimo_layers_fr2_2_ul_r17); + j.end_obj(); + } + j.end_obj(); +} + +// MeasResultCBR-NR-r16 ::= SEQUENCE +SRSASN_CODE meas_result_cbr_nr_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, sl_pool_report_id_r16, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(pack_integer(bref, sl_cbr_results_nr_r16, (uint8_t)0u, (uint8_t)100u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_cbr_nr_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(sl_pool_report_id_r16, bref, (uint8_t)1u, (uint8_t)16u)); + HANDLE_CODE(unpack_integer(sl_cbr_results_nr_r16, bref, (uint8_t)0u, (uint8_t)100u)); + + return SRSASN_SUCCESS; +} +void meas_result_cbr_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("sl-poolReportIdentity-r16", sl_pool_report_id_r16); + j.write_int("sl-CBR-ResultsNR-r16", sl_cbr_results_nr_r16); + j.end_obj(); +} + +// MeasResultCLI-RSSI-r16 ::= SEQUENCE +SRSASN_CODE meas_result_cli_rssi_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, rssi_res_id_r16, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_integer(bref, cli_rssi_result_r16, (uint8_t)0u, (uint8_t)76u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_cli_rssi_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(rssi_res_id_r16, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(cli_rssi_result_r16, bref, (uint8_t)0u, (uint8_t)76u)); + + return SRSASN_SUCCESS; +} +void meas_result_cli_rssi_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rssi-ResourceId-r16", rssi_res_id_r16); + j.write_int("cli-RSSI-Result-r16", cli_rssi_result_r16); + j.end_obj(); +} + +// MeasResultFailedCell-r16 ::= SEQUENCE +SRSASN_CODE meas_result_failed_cell_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(cgi_info.pack(bref)); + HANDLE_CODE(meas_result_r16.cell_results_r16.results_ssb_cell_r16.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16, 1, 64)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_failed_cell_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(cgi_info.unpack(bref)); + HANDLE_CODE(meas_result_r16.cell_results_r16.results_ssb_cell_r16.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16, bref, 1, 64)); + + return SRSASN_SUCCESS; +} +void meas_result_failed_cell_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("cgi-Info"); + cgi_info.to_json(j); + j.write_fieldname("measResult-r16"); + j.start_obj(); + j.write_fieldname("cellResults-r16"); + j.start_obj(); + j.write_fieldname("resultsSSB-Cell-r16"); + meas_result_r16.cell_results_r16.results_ssb_cell_r16.to_json(j); + j.end_obj(); + j.write_fieldname("rsIndexResults-r16"); + j.start_obj(); + j.start_array("resultsSSB-Indexes-r16"); + for (const auto& e1 : meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); + j.end_obj(); + j.end_obj(); +} + +// MeasResultSRS-RSRP-r16 ::= SEQUENCE +SRSASN_CODE meas_result_srs_rsrp_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, srs_res_id_r16, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(pack_integer(bref, srs_rsrp_result_r16, (uint8_t)0u, (uint8_t)98u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_srs_rsrp_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(srs_res_id_r16, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(unpack_integer(srs_rsrp_result_r16, bref, (uint8_t)0u, (uint8_t)98u)); + + return SRSASN_SUCCESS; +} +void meas_result_srs_rsrp_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("srs-ResourceId-r16", srs_res_id_r16); + j.write_int("srs-RSRP-Result-r16", srs_rsrp_result_r16); + j.end_obj(); +} + +// MeasResultServingCell-r16 ::= SEQUENCE +SRSASN_CODE meas_result_serving_cell_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(results_ssb_present, 1)); + + HANDLE_CODE(results_ssb_cell.pack(bref)); + if (results_ssb_present) { + HANDLE_CODE(pack_integer(bref, results_ssb.best_ssb_idx, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(results_ssb.best_ssb_results.pack(bref)); + HANDLE_CODE(pack_integer(bref, results_ssb.nof_good_ssb, (uint8_t)1u, (uint8_t)64u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_serving_cell_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(results_ssb_present, 1)); + + HANDLE_CODE(results_ssb_cell.unpack(bref)); + if (results_ssb_present) { + HANDLE_CODE(unpack_integer(results_ssb.best_ssb_idx, bref, (uint8_t)0u, (uint8_t)63u)); + HANDLE_CODE(results_ssb.best_ssb_results.unpack(bref)); + HANDLE_CODE(unpack_integer(results_ssb.nof_good_ssb, bref, (uint8_t)1u, (uint8_t)64u)); + } + + return SRSASN_SUCCESS; +} +void meas_result_serving_cell_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("resultsSSB-Cell"); + results_ssb_cell.to_json(j); + if (results_ssb_present) { + j.write_fieldname("resultsSSB"); + j.start_obj(); + j.write_int("best-ssb-Index", results_ssb.best_ssb_idx); + j.write_fieldname("best-ssb-Results"); + results_ssb.best_ssb_results.to_json(j); + j.write_int("numberOfGoodSSB", results_ssb.nof_good_ssb); + j.end_obj(); + } + j.end_obj(); +} + +// MeasResultsPerCellIdleEUTRA-r16 ::= SEQUENCE +SRSASN_CODE meas_results_per_cell_idle_eutra_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, eutra_pci_r16, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(bref.pack(meas_idle_result_eutra_r16.rsrp_result_eutra_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_idle_result_eutra_r16.rsrq_result_eutra_r16_present, 1)); + if (meas_idle_result_eutra_r16.rsrp_result_eutra_r16_present) { + HANDLE_CODE(pack_integer(bref, meas_idle_result_eutra_r16.rsrp_result_eutra_r16, (uint8_t)0u, (uint8_t)97u)); + } + if (meas_idle_result_eutra_r16.rsrq_result_eutra_r16_present) { + HANDLE_CODE(pack_integer(bref, meas_idle_result_eutra_r16.rsrq_result_eutra_r16, (int8_t)-30, (int8_t)46)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_results_per_cell_idle_eutra_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(eutra_pci_r16, bref, (uint16_t)0u, (uint16_t)503u)); + HANDLE_CODE(bref.unpack(meas_idle_result_eutra_r16.rsrp_result_eutra_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_idle_result_eutra_r16.rsrq_result_eutra_r16_present, 1)); + if (meas_idle_result_eutra_r16.rsrp_result_eutra_r16_present) { + HANDLE_CODE(unpack_integer(meas_idle_result_eutra_r16.rsrp_result_eutra_r16, bref, (uint8_t)0u, (uint8_t)97u)); + } + if (meas_idle_result_eutra_r16.rsrq_result_eutra_r16_present) { + HANDLE_CODE(unpack_integer(meas_idle_result_eutra_r16.rsrq_result_eutra_r16, bref, (int8_t)-30, (int8_t)46)); + } + + return SRSASN_SUCCESS; +} +void meas_results_per_cell_idle_eutra_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("eutra-PhysCellId-r16", eutra_pci_r16); + j.write_fieldname("measIdleResultEUTRA-r16"); + j.start_obj(); + if (meas_idle_result_eutra_r16.rsrp_result_eutra_r16_present) { + j.write_int("rsrp-ResultEUTRA-r16", meas_idle_result_eutra_r16.rsrp_result_eutra_r16); + } + if (meas_idle_result_eutra_r16.rsrq_result_eutra_r16_present) { + j.write_int("rsrq-ResultEUTRA-r16", meas_idle_result_eutra_r16.rsrq_result_eutra_r16); + } + j.end_obj(); + j.end_obj(); +} + +// MeasResultsPerCellIdleNR-r16 ::= SEQUENCE +SRSASN_CODE meas_results_per_cell_idle_nr_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, pci_r16, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(bref.pack(meas_idle_result_nr_r16.rsrp_result_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_idle_result_nr_r16.rsrq_result_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_idle_result_nr_r16.results_ssb_idxes_r16.size() > 0, 1)); + if (meas_idle_result_nr_r16.rsrp_result_r16_present) { + HANDLE_CODE(pack_integer(bref, meas_idle_result_nr_r16.rsrp_result_r16, (uint8_t)0u, (uint8_t)127u)); + } + if (meas_idle_result_nr_r16.rsrq_result_r16_present) { + HANDLE_CODE(pack_integer(bref, meas_idle_result_nr_r16.rsrq_result_r16, (uint8_t)0u, (uint8_t)127u)); + } + if (meas_idle_result_nr_r16.results_ssb_idxes_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_idle_result_nr_r16.results_ssb_idxes_r16, 1, 32)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_results_per_cell_idle_nr_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(pci_r16, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(bref.unpack(meas_idle_result_nr_r16.rsrp_result_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_idle_result_nr_r16.rsrq_result_r16_present, 1)); + bool results_ssb_idxes_r16_present; + HANDLE_CODE(bref.unpack(results_ssb_idxes_r16_present, 1)); + if (meas_idle_result_nr_r16.rsrp_result_r16_present) { + HANDLE_CODE(unpack_integer(meas_idle_result_nr_r16.rsrp_result_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (meas_idle_result_nr_r16.rsrq_result_r16_present) { + HANDLE_CODE(unpack_integer(meas_idle_result_nr_r16.rsrq_result_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (results_ssb_idxes_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_idle_result_nr_r16.results_ssb_idxes_r16, bref, 1, 32)); + } + + return SRSASN_SUCCESS; +} +void meas_results_per_cell_idle_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("physCellId-r16", pci_r16); + j.write_fieldname("measIdleResultNR-r16"); + j.start_obj(); + if (meas_idle_result_nr_r16.rsrp_result_r16_present) { + j.write_int("rsrp-Result-r16", meas_idle_result_nr_r16.rsrp_result_r16); + } + if (meas_idle_result_nr_r16.rsrq_result_r16_present) { + j.write_int("rsrq-Result-r16", meas_idle_result_nr_r16.rsrq_result_r16); + } + if (meas_idle_result_nr_r16.results_ssb_idxes_r16.size() > 0) { + j.start_array("resultsSSB-Indexes-r16"); + for (const auto& e1 : meas_idle_result_nr_r16.results_ssb_idxes_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); + j.end_obj(); +} + +// MinSchedulingOffsetPreferenceExt-r17 ::= SEQUENCE +SRSASN_CODE min_sched_offset_pref_ext_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(preferred_k0_r17_present, 1)); + HANDLE_CODE(bref.pack(preferred_k2_r17_present, 1)); + + if (preferred_k0_r17_present) { + HANDLE_CODE(bref.pack(preferred_k0_r17.preferred_k0_scs_480k_hz_r17_present, 1)); + HANDLE_CODE(bref.pack(preferred_k0_r17.preferred_k0_scs_960k_hz_r17_present, 1)); + if (preferred_k0_r17.preferred_k0_scs_480k_hz_r17_present) { + HANDLE_CODE(preferred_k0_r17.preferred_k0_scs_480k_hz_r17.pack(bref)); + } + if (preferred_k0_r17.preferred_k0_scs_960k_hz_r17_present) { + HANDLE_CODE(preferred_k0_r17.preferred_k0_scs_960k_hz_r17.pack(bref)); + } + } + if (preferred_k2_r17_present) { + HANDLE_CODE(bref.pack(preferred_k2_r17.preferred_k2_scs_480k_hz_r17_present, 1)); + HANDLE_CODE(bref.pack(preferred_k2_r17.preferred_k2_scs_960k_hz_r17_present, 1)); + if (preferred_k2_r17.preferred_k2_scs_480k_hz_r17_present) { + HANDLE_CODE(preferred_k2_r17.preferred_k2_scs_480k_hz_r17.pack(bref)); + } + if (preferred_k2_r17.preferred_k2_scs_960k_hz_r17_present) { + HANDLE_CODE(preferred_k2_r17.preferred_k2_scs_960k_hz_r17.pack(bref)); + } + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE min_sched_offset_pref_ext_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(preferred_k0_r17_present, 1)); + HANDLE_CODE(bref.unpack(preferred_k2_r17_present, 1)); + + if (preferred_k0_r17_present) { + HANDLE_CODE(bref.unpack(preferred_k0_r17.preferred_k0_scs_480k_hz_r17_present, 1)); + HANDLE_CODE(bref.unpack(preferred_k0_r17.preferred_k0_scs_960k_hz_r17_present, 1)); + if (preferred_k0_r17.preferred_k0_scs_480k_hz_r17_present) { + HANDLE_CODE(preferred_k0_r17.preferred_k0_scs_480k_hz_r17.unpack(bref)); + } + if (preferred_k0_r17.preferred_k0_scs_960k_hz_r17_present) { + HANDLE_CODE(preferred_k0_r17.preferred_k0_scs_960k_hz_r17.unpack(bref)); + } + } + if (preferred_k2_r17_present) { + HANDLE_CODE(bref.unpack(preferred_k2_r17.preferred_k2_scs_480k_hz_r17_present, 1)); + HANDLE_CODE(bref.unpack(preferred_k2_r17.preferred_k2_scs_960k_hz_r17_present, 1)); + if (preferred_k2_r17.preferred_k2_scs_480k_hz_r17_present) { + HANDLE_CODE(preferred_k2_r17.preferred_k2_scs_480k_hz_r17.unpack(bref)); + } + if (preferred_k2_r17.preferred_k2_scs_960k_hz_r17_present) { + HANDLE_CODE(preferred_k2_r17.preferred_k2_scs_960k_hz_r17.unpack(bref)); + } + } + + return SRSASN_SUCCESS; +} +void min_sched_offset_pref_ext_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (preferred_k0_r17_present) { + j.write_fieldname("preferredK0-r17"); + j.start_obj(); + if (preferred_k0_r17.preferred_k0_scs_480k_hz_r17_present) { + j.write_str("preferredK0-SCS-480kHz-r17", preferred_k0_r17.preferred_k0_scs_480k_hz_r17.to_string()); + } + if (preferred_k0_r17.preferred_k0_scs_960k_hz_r17_present) { + j.write_str("preferredK0-SCS-960kHz-r17", preferred_k0_r17.preferred_k0_scs_960k_hz_r17.to_string()); + } + j.end_obj(); + } + if (preferred_k2_r17_present) { + j.write_fieldname("preferredK2-r17"); + j.start_obj(); + if (preferred_k2_r17.preferred_k2_scs_480k_hz_r17_present) { + j.write_str("preferredK2-SCS-480kHz-r17", preferred_k2_r17.preferred_k2_scs_480k_hz_r17.to_string()); + } + if (preferred_k2_r17.preferred_k2_scs_960k_hz_r17_present) { + j.write_str("preferredK2-SCS-960kHz-r17", preferred_k2_r17.preferred_k2_scs_960k_hz_r17.to_string()); + } + j.end_obj(); + } + j.end_obj(); +} + +const char* min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_480k_hz_r17_opts::to_string() const +{ + static const char* names[] = {"sl8", "sl16", "sl32", "sl48"}; + return convert_enum_idx( + names, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_480k_hz_r17_e_"); +} +uint8_t min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_480k_hz_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {8, 16, 32, 48}; + return map_enum_number( + numbers, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_480k_hz_r17_e_"); +} + +const char* min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_960k_hz_r17_opts::to_string() const +{ + static const char* names[] = {"sl8", "sl16", "sl32", "sl48"}; + return convert_enum_idx( + names, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_960k_hz_r17_e_"); +} +uint8_t min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_960k_hz_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {8, 16, 32, 48}; + return map_enum_number( + numbers, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k0_r17_s_::preferred_k0_scs_960k_hz_r17_e_"); +} + +const char* min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_480k_hz_r17_opts::to_string() const +{ + static const char* names[] = {"sl8", "sl16", "sl32", "sl48"}; + return convert_enum_idx( + names, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_480k_hz_r17_e_"); +} +uint8_t min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_480k_hz_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {8, 16, 32, 48}; + return map_enum_number( + numbers, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_480k_hz_r17_e_"); +} + +const char* min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_960k_hz_r17_opts::to_string() const +{ + static const char* names[] = {"sl8", "sl16", "sl32", "sl48"}; + return convert_enum_idx( + names, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_960k_hz_r17_e_"); +} +uint8_t min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_960k_hz_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {8, 16, 32, 48}; + return map_enum_number( + numbers, 4, value, "min_sched_offset_pref_ext_r17_s::preferred_k2_r17_s_::preferred_k2_scs_960k_hz_r17_e_"); +} + +// NeedForGapsInfoNR-r16 ::= SEQUENCE +SRSASN_CODE need_for_gaps_info_nr_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, intra_freq_need_for_gap_r16, 1, 32)); + HANDLE_CODE(pack_dyn_seq_of(bref, inter_freq_need_for_gap_r16, 1, 1024)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE need_for_gaps_info_nr_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(intra_freq_need_for_gap_r16, bref, 1, 32)); + HANDLE_CODE(unpack_dyn_seq_of(inter_freq_need_for_gap_r16, bref, 1, 1024)); + + return SRSASN_SUCCESS; +} +void need_for_gaps_info_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("intraFreq-needForGap-r16"); + for (const auto& e1 : intra_freq_need_for_gap_r16) { + e1.to_json(j); + } + j.end_array(); + j.start_array("interFreq-needForGap-r16"); + for (const auto& e1 : inter_freq_need_for_gap_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// OverheatingAssistance-r17 ::= SEQUENCE +SRSASN_CODE overheat_assist_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(reduced_max_bw_fr2_2_r17_present, 1)); + HANDLE_CODE(bref.pack(reduced_max_mimo_layers_fr2_2_present, 1)); + + if (reduced_max_bw_fr2_2_r17_present) { + HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17.pack(bref)); + HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17.pack(bref)); + } + if (reduced_max_mimo_layers_fr2_2_present) { + HANDLE_CODE(reduced_max_mimo_layers_fr2_2.reduced_mimo_layers_fr2_2_dl.pack(bref)); + HANDLE_CODE(reduced_max_mimo_layers_fr2_2.reduced_mimo_layers_fr2_2_ul.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE overheat_assist_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(reduced_max_bw_fr2_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(reduced_max_mimo_layers_fr2_2_present, 1)); + + if (reduced_max_bw_fr2_2_r17_present) { + HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17.unpack(bref)); + HANDLE_CODE(reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17.unpack(bref)); + } + if (reduced_max_mimo_layers_fr2_2_present) { + HANDLE_CODE(reduced_max_mimo_layers_fr2_2.reduced_mimo_layers_fr2_2_dl.unpack(bref)); + HANDLE_CODE(reduced_max_mimo_layers_fr2_2.reduced_mimo_layers_fr2_2_ul.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void overheat_assist_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (reduced_max_bw_fr2_2_r17_present) { + j.write_fieldname("reducedMaxBW-FR2-2-r17"); + j.start_obj(); + j.write_str("reducedBW-FR2-2-DL-r17", reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_dl_r17.to_string()); + j.write_str("reducedBW-FR2-2-UL-r17", reduced_max_bw_fr2_2_r17.reduced_bw_fr2_2_ul_r17.to_string()); + j.end_obj(); + } + if (reduced_max_mimo_layers_fr2_2_present) { + j.write_fieldname("reducedMaxMIMO-LayersFR2-2"); + j.start_obj(); + j.write_str("reducedMIMO-LayersFR2-2-DL", reduced_max_mimo_layers_fr2_2.reduced_mimo_layers_fr2_2_dl.to_string()); + j.write_str("reducedMIMO-LayersFR2-2-UL", reduced_max_mimo_layers_fr2_2.reduced_mimo_layers_fr2_2_ul.to_string()); + j.end_obj(); + } + j.end_obj(); +} + +// RRCReconfigurationComplete-v1640-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_complete_v1640_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_tx_direct_current_two_carrier_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ul_tx_direct_current_two_carrier_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_two_carrier_list_r16, 1, 64)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_complete_v1640_ies_s::unpack(cbit_ref& bref) +{ + bool ul_tx_direct_current_two_carrier_list_r16_present; + HANDLE_CODE(bref.unpack(ul_tx_direct_current_two_carrier_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ul_tx_direct_current_two_carrier_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_two_carrier_list_r16, bref, 1, 64)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_recfg_complete_v1640_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_tx_direct_current_two_carrier_list_r16.size() > 0) { + j.start_array("uplinkTxDirectCurrentTwoCarrierList-r16"); + for (const auto& e1 : ul_tx_direct_current_two_carrier_list_r16) { + 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(); +} + +// RRCResumeComplete-v1720-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_complete_v1720_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_tx_direct_current_more_carrier_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ul_tx_direct_current_more_carrier_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_more_carrier_list_r17, 1, 16)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_complete_v1720_ies_s::unpack(cbit_ref& bref) +{ + bool ul_tx_direct_current_more_carrier_list_r17_present; + HANDLE_CODE(bref.unpack(ul_tx_direct_current_more_carrier_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ul_tx_direct_current_more_carrier_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_more_carrier_list_r17, bref, 1, 16)); + } + + return SRSASN_SUCCESS; +} +void rrc_resume_complete_v1720_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_tx_direct_current_more_carrier_list_r17.size() > 0) { + j.start_array("uplinkTxDirectCurrentMoreCarrierList-r17"); + for (const auto& e1 : ul_tx_direct_current_more_carrier_list_r17) { + 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(); +} + +// ReducedMaxBW-FRx-r16 ::= SEQUENCE +SRSASN_CODE reduced_max_bw_f_rx_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(reduced_bw_dl_r16.pack(bref)); + HANDLE_CODE(reduced_bw_ul_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE reduced_max_bw_f_rx_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(reduced_bw_dl_r16.unpack(bref)); + HANDLE_CODE(reduced_bw_ul_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void reduced_max_bw_f_rx_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("reducedBW-DL-r16", reduced_bw_dl_r16.to_string()); + j.write_str("reducedBW-UL-r16", reduced_bw_ul_r16.to_string()); + j.end_obj(); +} + +// ReducedMaxCCs-r16 ::= SEQUENCE +SRSASN_CODE reduced_max_ccs_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, reduced_ccs_dl_r16, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(pack_integer(bref, reduced_ccs_ul_r16, (uint8_t)0u, (uint8_t)31u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE reduced_max_ccs_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(reduced_ccs_dl_r16, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(unpack_integer(reduced_ccs_ul_r16, bref, (uint8_t)0u, (uint8_t)31u)); + + return SRSASN_SUCCESS; +} +void reduced_max_ccs_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("reducedCCsDL-r16", reduced_ccs_dl_r16); + j.write_int("reducedCCsUL-r16", reduced_ccs_ul_r16); + j.end_obj(); +} + +// SIB-Type-r17 ::= ENUMERATED +const char* sib_type_r17_opts::to_string() const +{ + static const char* names[] = {"sibType2", + "sibType3", + "sibType4", + "sibType5", + "sibType9", + "sibType10-v1610", + "sibType11-v1610", + "sibType12-v1610", + "sibType13-v1610", + "sibType14-v1610", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "sib_type_r17_e"); +} +uint8_t sib_type_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 3, 4, 5, 9, 10, 11, 12, 13, 14}; + return map_enum_number(numbers, 10, value, "sib_type_r17_e"); +} + +// SL-TrafficPatternInfo-r16 ::= SEQUENCE +SRSASN_CODE sl_traffic_pattern_info_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(traffic_periodicity_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, timing_offset_r16, (uint16_t)0u, (uint16_t)10239u)); + HANDLE_CODE(msg_size_r16.pack(bref)); + HANDLE_CODE(pack_integer(bref, sl_qos_flow_id_r16, (uint16_t)1u, (uint16_t)2048u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_traffic_pattern_info_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(traffic_periodicity_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(timing_offset_r16, bref, (uint16_t)0u, (uint16_t)10239u)); + HANDLE_CODE(msg_size_r16.unpack(bref)); + HANDLE_CODE(unpack_integer(sl_qos_flow_id_r16, bref, (uint16_t)1u, (uint16_t)2048u)); + + return SRSASN_SUCCESS; +} +void sl_traffic_pattern_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("trafficPeriodicity-r16", traffic_periodicity_r16.to_string()); + j.write_int("timingOffset-r16", timing_offset_r16); + j.write_str("messageSize-r16", msg_size_r16.to_string()); + j.write_int("sl-QoS-FlowIdentity-r16", sl_qos_flow_id_r16); + j.end_obj(); +} + +const char* sl_traffic_pattern_info_r16_s::traffic_periodicity_r16_opts::to_string() const +{ + static const char* names[] = { + "ms20", "ms50", "ms100", "ms200", "ms300", "ms400", "ms500", "ms600", "ms700", "ms800", "ms900", "ms1000"}; + return convert_enum_idx(names, 12, value, "sl_traffic_pattern_info_r16_s::traffic_periodicity_r16_e_"); +} +uint16_t sl_traffic_pattern_info_r16_s::traffic_periodicity_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}; + return map_enum_number(numbers, 12, value, "sl_traffic_pattern_info_r16_s::traffic_periodicity_r16_e_"); +} + +// SL-TxResourceReq-v1700 ::= SEQUENCE +SRSASN_CODE sl_tx_res_req_v1700_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_drx_info_from_rx_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_drx_ind_r17_present, 1)); + + if (sl_drx_info_from_rx_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_drx_info_from_rx_list_r17, 1, 4)); + } + if (sl_drx_ind_r17_present) { + HANDLE_CODE(sl_drx_ind_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_tx_res_req_v1700_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool sl_drx_info_from_rx_list_r17_present; + HANDLE_CODE(bref.unpack(sl_drx_info_from_rx_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_drx_ind_r17_present, 1)); + + if (sl_drx_info_from_rx_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_drx_info_from_rx_list_r17, bref, 1, 4)); + } + if (sl_drx_ind_r17_present) { + HANDLE_CODE(sl_drx_ind_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sl_tx_res_req_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_drx_info_from_rx_list_r17.size() > 0) { + j.start_array("sl-DRX-InfoFromRxList-r17"); + for (const auto& e1 : sl_drx_info_from_rx_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_drx_ind_r17_present) { + j.write_str("sl-DRX-Indication-r17", sl_drx_ind_r17.to_string()); + } + j.end_obj(); +} + +const char* sl_tx_res_req_v1700_s::sl_drx_ind_r17_opts::to_string() const +{ + static const char* names[] = {"on", "off"}; + return convert_enum_idx(names, 2, value, "sl_tx_res_req_v1700_s::sl_drx_ind_r17_e_"); +} + +// SL-TxResourceReqCommRelay-r17 ::= CHOICE +void sl_tx_res_req_comm_relay_r17_c::destroy_() +{ + switch (type_) { + case types::sl_tx_res_req_l2_u2_n_relay_r17: + c.destroy(); + break; + case types::sl_tx_res_req_l3_u2_n_relay_r17: + c.destroy(); + break; + default: + break; + } +} +void sl_tx_res_req_comm_relay_r17_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sl_tx_res_req_l2_u2_n_relay_r17: + c.init(); + break; + case types::sl_tx_res_req_l3_u2_n_relay_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_tx_res_req_comm_relay_r17_c"); + } +} +sl_tx_res_req_comm_relay_r17_c::sl_tx_res_req_comm_relay_r17_c(const sl_tx_res_req_comm_relay_r17_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::sl_tx_res_req_l2_u2_n_relay_r17: + c.init(other.c.get()); + break; + case types::sl_tx_res_req_l3_u2_n_relay_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_tx_res_req_comm_relay_r17_c"); + } +} +sl_tx_res_req_comm_relay_r17_c& sl_tx_res_req_comm_relay_r17_c::operator=(const sl_tx_res_req_comm_relay_r17_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sl_tx_res_req_l2_u2_n_relay_r17: + c.set(other.c.get()); + break; + case types::sl_tx_res_req_l3_u2_n_relay_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "sl_tx_res_req_comm_relay_r17_c"); + } + + return *this; +} +sl_tx_res_req_l2_u2_n_relay_r17_s& sl_tx_res_req_comm_relay_r17_c::set_sl_tx_res_req_l2_u2_n_relay_r17() +{ + set(types::sl_tx_res_req_l2_u2_n_relay_r17); + return c.get(); +} +sl_tx_res_req_r16_s& sl_tx_res_req_comm_relay_r17_c::set_sl_tx_res_req_l3_u2_n_relay_r17() +{ + set(types::sl_tx_res_req_l3_u2_n_relay_r17); + return c.get(); +} +void sl_tx_res_req_comm_relay_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sl_tx_res_req_l2_u2_n_relay_r17: + j.write_fieldname("sl-TxResourceReqL2U2N-Relay-r17"); + c.get().to_json(j); + break; + case types::sl_tx_res_req_l3_u2_n_relay_r17: + j.write_fieldname("sl-TxResourceReqL3U2N-Relay-r17"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "sl_tx_res_req_comm_relay_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE sl_tx_res_req_comm_relay_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::sl_tx_res_req_l2_u2_n_relay_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::sl_tx_res_req_l3_u2_n_relay_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_tx_res_req_comm_relay_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_tx_res_req_comm_relay_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::sl_tx_res_req_l2_u2_n_relay_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::sl_tx_res_req_l3_u2_n_relay_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "sl_tx_res_req_comm_relay_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* sl_tx_res_req_comm_relay_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"sl-TxResourceReqL2U2N-Relay-r17", "sl-TxResourceReqL3U2N-Relay-r17"}; + return convert_enum_idx(names, 2, value, "sl_tx_res_req_comm_relay_r17_c::types"); +} +uint8_t sl_tx_res_req_comm_relay_r17_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 3}; + return map_enum_number(numbers, 2, value, "sl_tx_res_req_comm_relay_r17_c::types"); +} + +// UE-MeasurementsAvailable-r16 ::= SEQUENCE +SRSASN_CODE ue_meass_available_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(log_meas_available_r16_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_bt_r16_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_wlan_r16_present, 1)); + HANDLE_CODE(bref.pack(conn_est_fail_info_available_r16_present, 1)); + HANDLE_CODE(bref.pack(rlf_info_available_r16_present, 1)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= success_ho_info_available_r17_present; + group_flags[0] |= sig_log_meas_cfg_available_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(success_ho_info_available_r17_present, 1)); + HANDLE_CODE(bref.pack(sig_log_meas_cfg_available_r17_present, 1)); + if (sig_log_meas_cfg_available_r17_present) { + HANDLE_CODE(bref.pack(sig_log_meas_cfg_available_r17, 1)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_meass_available_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(log_meas_available_r16_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_bt_r16_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_wlan_r16_present, 1)); + HANDLE_CODE(bref.unpack(conn_est_fail_info_available_r16_present, 1)); + HANDLE_CODE(bref.unpack(rlf_info_available_r16_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(success_ho_info_available_r17_present, 1)); + HANDLE_CODE(bref.unpack(sig_log_meas_cfg_available_r17_present, 1)); + if (sig_log_meas_cfg_available_r17_present) { + HANDLE_CODE(bref.unpack(sig_log_meas_cfg_available_r17, 1)); + } + } + } + return SRSASN_SUCCESS; +} +void ue_meass_available_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (log_meas_available_r16_present) { + j.write_str("logMeasAvailable-r16", "true"); + } + if (log_meas_available_bt_r16_present) { + j.write_str("logMeasAvailableBT-r16", "true"); + } + if (log_meas_available_wlan_r16_present) { + j.write_str("logMeasAvailableWLAN-r16", "true"); + } + if (conn_est_fail_info_available_r16_present) { + j.write_str("connEstFailInfoAvailable-r16", "true"); + } + if (rlf_info_available_r16_present) { + j.write_str("rlf-InfoAvailable-r16", "true"); + } + if (ext) { + if (success_ho_info_available_r17_present) { + j.write_str("successHO-InfoAvailable-r17", "true"); + } + if (sig_log_meas_cfg_available_r17_present) { + j.write_bool("sigLogMeasConfigAvailable-r17", sig_log_meas_cfg_available_r17); + } + } + j.end_obj(); +} + +// UL-GapFR2-Preference-r17 ::= SEQUENCE +SRSASN_CODE ul_gap_fr2_pref_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_gap_fr2_pattern_pref_r17_present, 1)); + + if (ul_gap_fr2_pattern_pref_r17_present) { + HANDLE_CODE(pack_integer(bref, ul_gap_fr2_pattern_pref_r17, (uint8_t)0u, (uint8_t)3u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_gap_fr2_pref_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_gap_fr2_pattern_pref_r17_present, 1)); + + if (ul_gap_fr2_pattern_pref_r17_present) { + HANDLE_CODE(unpack_integer(ul_gap_fr2_pattern_pref_r17, bref, (uint8_t)0u, (uint8_t)3u)); + } + + return SRSASN_SUCCESS; +} +void ul_gap_fr2_pref_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_gap_fr2_pattern_pref_r17_present) { + j.write_int("ul-GapFR2-PatternPreference-r17", ul_gap_fr2_pattern_pref_r17); + } + j.end_obj(); +} + +// UplinkTxDirectCurrentBWP ::= SEQUENCE +SRSASN_CODE ul_tx_direct_current_bwp_s::pack(bit_ref& bref) 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; +} +SRSASN_CODE ul_tx_direct_current_bwp_s::unpack(cbit_ref& bref) +{ + 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)); + + return SRSASN_SUCCESS; +} +void ul_tx_direct_current_bwp_s::to_json(json_writer& j) 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(); +} + +// ChoCandidateCell-r17 ::= CHOICE +void cho_candidate_cell_r17_c::destroy_() +{ + switch (type_) { + case types::cell_global_id_r17: + c.destroy(); + break; + case types::pci_arfcn_r17: + c.destroy(); + break; + default: + break; + } +} +void cho_candidate_cell_r17_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_global_id_r17: + c.init(); + break; + case types::pci_arfcn_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cho_candidate_cell_r17_c"); + } +} +cho_candidate_cell_r17_c::cho_candidate_cell_r17_c(const cho_candidate_cell_r17_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_global_id_r17: + c.init(other.c.get()); + break; + case types::pci_arfcn_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cho_candidate_cell_r17_c"); + } +} +cho_candidate_cell_r17_c& cho_candidate_cell_r17_c::operator=(const cho_candidate_cell_r17_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_global_id_r17: + c.set(other.c.get()); + break; + case types::pci_arfcn_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "cho_candidate_cell_r17_c"); + } + + return *this; +} +cgi_info_logging_r16_s& cho_candidate_cell_r17_c::set_cell_global_id_r17() +{ + set(types::cell_global_id_r17); + return c.get(); +} +pci_arfcn_nr_r16_s& cho_candidate_cell_r17_c::set_pci_arfcn_r17() +{ + set(types::pci_arfcn_r17); + return c.get(); +} +void cho_candidate_cell_r17_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_global_id_r17: + j.write_fieldname("cellGlobalId-r17"); + c.get().to_json(j); + break; + case types::pci_arfcn_r17: + j.write_fieldname("pci-arfcn-r17"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "cho_candidate_cell_r17_c"); + } + j.end_obj(); +} +SRSASN_CODE cho_candidate_cell_r17_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cell_global_id_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_arfcn_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "cho_candidate_cell_r17_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cho_candidate_cell_r17_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cell_global_id_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_arfcn_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "cho_candidate_cell_r17_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* cho_candidate_cell_r17_c::types_opts::to_string() const +{ + static const char* names[] = {"cellGlobalId-r17", "pci-arfcn-r17"}; + return convert_enum_idx(names, 2, value, "cho_candidate_cell_r17_c::types"); +} + +// ConnEstFailReport-r16 ::= SEQUENCE +SRSASN_CODE conn_est_fail_report_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(location_info_r16_present, 1)); + + HANDLE_CODE(meas_result_failed_cell_r16.pack(bref)); + if (location_info_r16_present) { + HANDLE_CODE(location_info_r16.pack(bref)); + } + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra.size() > 0, 1)); + if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr, 1, 8)); + } + if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra, 1, 8)); + } + HANDLE_CODE(pack_integer(bref, nof_conn_fail_r16, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(pack_dyn_seq_of(bref, per_ra_info_list_r16, 1, 200)); + HANDLE_CODE(pack_integer(bref, time_since_fail_r16, (uint32_t)0u, (uint32_t)172800u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE conn_est_fail_report_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(location_info_r16_present, 1)); + + HANDLE_CODE(meas_result_failed_cell_r16.unpack(bref)); + if (location_info_r16_present) { + HANDLE_CODE(location_info_r16.unpack(bref)); + } + bool meas_result_neigh_cell_list_nr_present; + HANDLE_CODE(bref.unpack(meas_result_neigh_cell_list_nr_present, 1)); + bool meas_result_neigh_cell_list_eutra_present; + HANDLE_CODE(bref.unpack(meas_result_neigh_cell_list_eutra_present, 1)); + if (meas_result_neigh_cell_list_nr_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr, bref, 1, 8)); + } + if (meas_result_neigh_cell_list_eutra_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra, bref, 1, 8)); + } + HANDLE_CODE(unpack_integer(nof_conn_fail_r16, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE(unpack_dyn_seq_of(per_ra_info_list_r16, bref, 1, 200)); + HANDLE_CODE(unpack_integer(time_since_fail_r16, bref, (uint32_t)0u, (uint32_t)172800u)); + + return SRSASN_SUCCESS; +} +void conn_est_fail_report_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measResultFailedCell-r16"); + meas_result_failed_cell_r16.to_json(j); + if (location_info_r16_present) { + j.write_fieldname("locationInfo-r16"); + location_info_r16.to_json(j); + } + j.write_fieldname("measResultNeighCells-r16"); + j.start_obj(); + if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr.size() > 0) { + j.start_array("measResultNeighCellListNR"); + for (const auto& e1 : meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra.size() > 0) { + j.start_array("measResultNeighCellListEUTRA"); + for (const auto& e1 : meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); + j.write_int("numberOfConnFail-r16", nof_conn_fail_r16); + j.start_array("perRAInfoList-r16"); + for (const auto& e1 : per_ra_info_list_r16) { + e1.to_json(j); + } + j.end_array(); + j.write_int("timeSinceFailure-r16", time_since_fail_r16); + j.end_obj(); +} + +// DRX-Preference-r16 ::= SEQUENCE +SRSASN_CODE drx_pref_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(preferred_drx_inactivity_timer_r16_present, 1)); + HANDLE_CODE(bref.pack(preferred_drx_long_cycle_r16_present, 1)); + HANDLE_CODE(bref.pack(preferred_drx_short_cycle_r16_present, 1)); + HANDLE_CODE(bref.pack(preferred_drx_short_cycle_timer_r16_present, 1)); + + if (preferred_drx_inactivity_timer_r16_present) { + HANDLE_CODE(preferred_drx_inactivity_timer_r16.pack(bref)); + } + if (preferred_drx_long_cycle_r16_present) { + HANDLE_CODE(preferred_drx_long_cycle_r16.pack(bref)); + } + if (preferred_drx_short_cycle_r16_present) { + HANDLE_CODE(preferred_drx_short_cycle_r16.pack(bref)); + } + if (preferred_drx_short_cycle_timer_r16_present) { + HANDLE_CODE(pack_integer(bref, preferred_drx_short_cycle_timer_r16, (uint8_t)1u, (uint8_t)16u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_pref_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(preferred_drx_inactivity_timer_r16_present, 1)); + HANDLE_CODE(bref.unpack(preferred_drx_long_cycle_r16_present, 1)); + HANDLE_CODE(bref.unpack(preferred_drx_short_cycle_r16_present, 1)); + HANDLE_CODE(bref.unpack(preferred_drx_short_cycle_timer_r16_present, 1)); + + if (preferred_drx_inactivity_timer_r16_present) { + HANDLE_CODE(preferred_drx_inactivity_timer_r16.unpack(bref)); + } + if (preferred_drx_long_cycle_r16_present) { + HANDLE_CODE(preferred_drx_long_cycle_r16.unpack(bref)); + } + if (preferred_drx_short_cycle_r16_present) { + HANDLE_CODE(preferred_drx_short_cycle_r16.unpack(bref)); + } + if (preferred_drx_short_cycle_timer_r16_present) { + HANDLE_CODE(unpack_integer(preferred_drx_short_cycle_timer_r16, bref, (uint8_t)1u, (uint8_t)16u)); + } + + return SRSASN_SUCCESS; +} +void drx_pref_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (preferred_drx_inactivity_timer_r16_present) { + j.write_str("preferredDRX-InactivityTimer-r16", preferred_drx_inactivity_timer_r16.to_string()); + } + if (preferred_drx_long_cycle_r16_present) { + j.write_str("preferredDRX-LongCycle-r16", preferred_drx_long_cycle_r16.to_string()); + } + if (preferred_drx_short_cycle_r16_present) { + j.write_str("preferredDRX-ShortCycle-r16", preferred_drx_short_cycle_r16.to_string()); + } + if (preferred_drx_short_cycle_timer_r16_present) { + j.write_int("preferredDRX-ShortCycleTimer-r16", preferred_drx_short_cycle_timer_r16); + } + j.end_obj(); +} + +const char* drx_pref_r16_s::preferred_drx_inactivity_timer_r16_opts::to_string() const +{ + static const char* names[] = {"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(names, 32, value, "drx_pref_r16_s::preferred_drx_inactivity_timer_r16_e_"); +} +uint16_t drx_pref_r16_s::preferred_drx_inactivity_timer_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {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(numbers, 23, value, "drx_pref_r16_s::preferred_drx_inactivity_timer_r16_e_"); +} + +const char* drx_pref_r16_s::preferred_drx_long_cycle_r16_opts::to_string() const +{ + static const char* names[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", "ms80", + "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", "ms1024", "ms1280", + "ms2048", "ms2560", "ms5120", "ms10240", "spare12", "spare11", "spare10", "spare9", + "spare8", "spare7", "spare6", "spare5", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 32, value, "drx_pref_r16_s::preferred_drx_long_cycle_r16_e_"); +} +uint16_t drx_pref_r16_s::preferred_drx_long_cycle_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, + 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; + return map_enum_number(numbers, 20, value, "drx_pref_r16_s::preferred_drx_long_cycle_r16_e_"); +} + +const char* drx_pref_r16_s::preferred_drx_short_cycle_r16_opts::to_string() const +{ + static const char* names[] = {"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(names, 32, value, "drx_pref_r16_s::preferred_drx_short_cycle_r16_e_"); +} +uint16_t drx_pref_r16_s::preferred_drx_short_cycle_r16_opts::to_number() const +{ + static const uint16_t numbers[] = {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(numbers, 23, value, "drx_pref_r16_s::preferred_drx_short_cycle_r16_e_"); +} + +// EUTRA-RSTD-Info ::= SEQUENCE +SRSASN_CODE eutra_rstd_info_s::pack(bit_ref& bref) 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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE eutra_rstd_info_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)); + + 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(); +} + +// IDC-Assistance-r16 ::= SEQUENCE +SRSASN_CODE idc_assist_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(affected_carrier_freq_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(affected_carrier_freq_comb_list_r16.size() > 0, 1)); + + if (affected_carrier_freq_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_list_r16, 1, 128)); + } + if (affected_carrier_freq_comb_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_comb_list_r16, 1, 128)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE idc_assist_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool affected_carrier_freq_list_r16_present; + HANDLE_CODE(bref.unpack(affected_carrier_freq_list_r16_present, 1)); + bool affected_carrier_freq_comb_list_r16_present; + HANDLE_CODE(bref.unpack(affected_carrier_freq_comb_list_r16_present, 1)); + + if (affected_carrier_freq_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_list_r16, bref, 1, 128)); + } + if (affected_carrier_freq_comb_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_list_r16, bref, 1, 128)); + } + + return SRSASN_SUCCESS; +} +void idc_assist_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (affected_carrier_freq_list_r16.size() > 0) { + j.start_array("affectedCarrierFreqList-r16"); + for (const auto& e1 : affected_carrier_freq_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (affected_carrier_freq_comb_list_r16.size() > 0) { + j.start_array("affectedCarrierFreqCombList-r16"); + for (const auto& e1 : affected_carrier_freq_comb_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// LogMeasInfo-r16 ::= SEQUENCE +SRSASN_CODE log_meas_info_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(location_info_r16_present, 1)); + HANDLE_CODE(bref.pack(serv_cell_id_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_result_serving_cell_r16_present, 1)); + HANDLE_CODE(bref.pack(any_cell_sel_detected_r16_present, 1)); + + if (location_info_r16_present) { + HANDLE_CODE(location_info_r16.pack(bref)); + } + HANDLE_CODE(pack_integer(bref, relative_time_stamp_r16, (uint16_t)0u, (uint16_t)7200u)); + if (serv_cell_id_r16_present) { + HANDLE_CODE(serv_cell_id_r16.pack(bref)); + } + if (meas_result_serving_cell_r16_present) { + HANDLE_CODE(meas_result_serving_cell_r16.pack(bref)); + } + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra.size() > 0, 1)); + if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr, 1, 8)); + } + if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra, 1, 8)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= in_dev_coex_detected_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(in_dev_coex_detected_r17_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE log_meas_info_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(location_info_r16_present, 1)); + HANDLE_CODE(bref.unpack(serv_cell_id_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_serving_cell_r16_present, 1)); + HANDLE_CODE(bref.unpack(any_cell_sel_detected_r16_present, 1)); + + if (location_info_r16_present) { + HANDLE_CODE(location_info_r16.unpack(bref)); + } + HANDLE_CODE(unpack_integer(relative_time_stamp_r16, bref, (uint16_t)0u, (uint16_t)7200u)); + if (serv_cell_id_r16_present) { + HANDLE_CODE(serv_cell_id_r16.unpack(bref)); + } + if (meas_result_serving_cell_r16_present) { + HANDLE_CODE(meas_result_serving_cell_r16.unpack(bref)); + } + bool meas_result_neigh_cell_list_nr_present; + HANDLE_CODE(bref.unpack(meas_result_neigh_cell_list_nr_present, 1)); + bool meas_result_neigh_cell_list_eutra_present; + HANDLE_CODE(bref.unpack(meas_result_neigh_cell_list_eutra_present, 1)); + if (meas_result_neigh_cell_list_nr_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr, bref, 1, 8)); + } + if (meas_result_neigh_cell_list_eutra_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra, 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(in_dev_coex_detected_r17_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void log_meas_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (location_info_r16_present) { + j.write_fieldname("locationInfo-r16"); + location_info_r16.to_json(j); + } + j.write_int("relativeTimeStamp-r16", relative_time_stamp_r16); + if (serv_cell_id_r16_present) { + j.write_fieldname("servCellIdentity-r16"); + serv_cell_id_r16.to_json(j); + } + if (meas_result_serving_cell_r16_present) { + j.write_fieldname("measResultServingCell-r16"); + meas_result_serving_cell_r16.to_json(j); + } + j.write_fieldname("measResultNeighCells-r16"); + j.start_obj(); + if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr.size() > 0) { + j.start_array("measResultNeighCellListNR"); + for (const auto& e1 : meas_result_neigh_cells_r16.meas_result_neigh_cell_list_nr) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra.size() > 0) { + j.start_array("measResultNeighCellListEUTRA"); + for (const auto& e1 : meas_result_neigh_cells_r16.meas_result_neigh_cell_list_eutra) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); + if (any_cell_sel_detected_r16_present) { + j.write_str("anyCellSelectionDetected-r16", "true"); + } + if (ext) { + if (in_dev_coex_detected_r17_present) { + j.write_str("inDeviceCoexDetected-r17", "true"); + } + } + j.end_obj(); +} + +// MaxBW-Preference-r16 ::= SEQUENCE +SRSASN_CODE max_bw_pref_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(reduced_max_bw_fr1_r16_present, 1)); + HANDLE_CODE(bref.pack(reduced_max_bw_fr2_r16_present, 1)); + + if (reduced_max_bw_fr1_r16_present) { + HANDLE_CODE(reduced_max_bw_fr1_r16.pack(bref)); + } + if (reduced_max_bw_fr2_r16_present) { + HANDLE_CODE(reduced_max_bw_fr2_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE max_bw_pref_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(reduced_max_bw_fr1_r16_present, 1)); + HANDLE_CODE(bref.unpack(reduced_max_bw_fr2_r16_present, 1)); + + if (reduced_max_bw_fr1_r16_present) { + HANDLE_CODE(reduced_max_bw_fr1_r16.unpack(bref)); + } + if (reduced_max_bw_fr2_r16_present) { + HANDLE_CODE(reduced_max_bw_fr2_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void max_bw_pref_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (reduced_max_bw_fr1_r16_present) { + j.write_fieldname("reducedMaxBW-FR1-r16"); + reduced_max_bw_fr1_r16.to_json(j); + } + if (reduced_max_bw_fr2_r16_present) { + j.write_fieldname("reducedMaxBW-FR2-r16"); + reduced_max_bw_fr2_r16.to_json(j); + } + j.end_obj(); +} + +// MaxCC-Preference-r16 ::= SEQUENCE +SRSASN_CODE max_cc_pref_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(reduced_max_ccs_r16_present, 1)); + + if (reduced_max_ccs_r16_present) { + HANDLE_CODE(reduced_max_ccs_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE max_cc_pref_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(reduced_max_ccs_r16_present, 1)); + + if (reduced_max_ccs_r16_present) { + HANDLE_CODE(reduced_max_ccs_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void max_cc_pref_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (reduced_max_ccs_r16_present) { + j.write_fieldname("reducedMaxCCs-r16"); + reduced_max_ccs_r16.to_json(j); + } + j.end_obj(); +} + +// MaxMIMO-LayerPreference-r16 ::= SEQUENCE +SRSASN_CODE max_mimo_layer_pref_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(reduced_max_mimo_layers_fr1_r16_present, 1)); + HANDLE_CODE(bref.pack(reduced_max_mimo_layers_fr2_r16_present, 1)); + + if (reduced_max_mimo_layers_fr1_r16_present) { + HANDLE_CODE( + pack_integer(bref, reduced_max_mimo_layers_fr1_r16.reduced_mimo_layers_fr1_dl_r16, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE( + pack_integer(bref, reduced_max_mimo_layers_fr1_r16.reduced_mimo_layers_fr1_ul_r16, (uint8_t)1u, (uint8_t)4u)); + } + if (reduced_max_mimo_layers_fr2_r16_present) { + HANDLE_CODE( + pack_integer(bref, reduced_max_mimo_layers_fr2_r16.reduced_mimo_layers_fr2_dl_r16, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE( + pack_integer(bref, reduced_max_mimo_layers_fr2_r16.reduced_mimo_layers_fr2_ul_r16, (uint8_t)1u, (uint8_t)4u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE max_mimo_layer_pref_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(reduced_max_mimo_layers_fr1_r16_present, 1)); + HANDLE_CODE(bref.unpack(reduced_max_mimo_layers_fr2_r16_present, 1)); + + if (reduced_max_mimo_layers_fr1_r16_present) { + HANDLE_CODE( + unpack_integer(reduced_max_mimo_layers_fr1_r16.reduced_mimo_layers_fr1_dl_r16, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE( + unpack_integer(reduced_max_mimo_layers_fr1_r16.reduced_mimo_layers_fr1_ul_r16, bref, (uint8_t)1u, (uint8_t)4u)); + } + if (reduced_max_mimo_layers_fr2_r16_present) { + HANDLE_CODE( + unpack_integer(reduced_max_mimo_layers_fr2_r16.reduced_mimo_layers_fr2_dl_r16, bref, (uint8_t)1u, (uint8_t)8u)); + HANDLE_CODE( + unpack_integer(reduced_max_mimo_layers_fr2_r16.reduced_mimo_layers_fr2_ul_r16, bref, (uint8_t)1u, (uint8_t)4u)); + } + + return SRSASN_SUCCESS; +} +void max_mimo_layer_pref_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (reduced_max_mimo_layers_fr1_r16_present) { + j.write_fieldname("reducedMaxMIMO-LayersFR1-r16"); + j.start_obj(); + j.write_int("reducedMIMO-LayersFR1-DL-r16", reduced_max_mimo_layers_fr1_r16.reduced_mimo_layers_fr1_dl_r16); + j.write_int("reducedMIMO-LayersFR1-UL-r16", reduced_max_mimo_layers_fr1_r16.reduced_mimo_layers_fr1_ul_r16); + j.end_obj(); + } + if (reduced_max_mimo_layers_fr2_r16_present) { + j.write_fieldname("reducedMaxMIMO-LayersFR2-r16"); + j.start_obj(); + j.write_int("reducedMIMO-LayersFR2-DL-r16", reduced_max_mimo_layers_fr2_r16.reduced_mimo_layers_fr2_dl_r16); + j.write_int("reducedMIMO-LayersFR2-UL-r16", reduced_max_mimo_layers_fr2_r16.reduced_mimo_layers_fr2_ul_r16); + j.end_obj(); + } + j.end_obj(); +} + +// MeasResult2EUTRA ::= SEQUENCE +SRSASN_CODE meas_result2_eutra_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_serving_cell_present, 1)); + HANDLE_CODE(bref.pack(meas_result_best_neigh_cell_present, 1)); + + 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 (meas_result_best_neigh_cell_present) { + HANDLE_CODE(meas_result_best_neigh_cell.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result2_eutra_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_serving_cell_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_best_neigh_cell_present, 1)); + + 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 (meas_result_best_neigh_cell_present) { + HANDLE_CODE(meas_result_best_neigh_cell.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_result2_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq", carrier_freq); + if (meas_result_serving_cell_present) { + 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(); +} + +// MeasResult2NR ::= SEQUENCE +SRSASN_CODE meas_result2_nr_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.size() > 0, 1)); + + if (ssb_freq_present) { + HANDLE_CODE(pack_integer(bref, ssb_freq, (uint32_t)0u, (uint32_t)3279165u)); + } + if (ref_freq_csi_rs_present) { + HANDLE_CODE(pack_integer(bref, ref_freq_csi_rs, (uint32_t)0u, (uint32_t)3279165u)); + } + if (meas_result_serving_cell_present) { + HANDLE_CODE(meas_result_serving_cell.pack(bref)); + } + if (meas_result_neigh_cell_list_nr.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cell_list_nr, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result2_nr_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)); + bool meas_result_neigh_cell_list_nr_present; + 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)); + } + 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 SRSASN_SUCCESS; +} +void meas_result2_nr_s::to_json(json_writer& j) const +{ + j.start_obj(); + 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.size() > 0) { + j.start_array("measResultNeighCellListNR"); + for (const auto& e1 : meas_result_neigh_cell_list_nr) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// MeasResult2UTRA-FDD-r16 ::= SEQUENCE +SRSASN_CODE meas_result2_utra_fdd_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint16_t)0u, (uint16_t)16383u)); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cell_list_r16, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result2_utra_fdd_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint16_t)0u, (uint16_t)16383u)); + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cell_list_r16, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_result2_utra_fdd_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r16", carrier_freq_r16); + j.start_array("measResultNeighCellList-r16"); + for (const auto& e1 : meas_result_neigh_cell_list_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MeasResultCellSFTD-NR ::= SEQUENCE +SRSASN_CODE meas_result_cell_sftd_nr_s::pack(bit_ref& bref) const +{ + 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 meas_result_cell_sftd_nr_s::unpack(cbit_ref& bref) +{ + 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; +} +void meas_result_cell_sftd_nr_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); + } + j.end_obj(); +} + +// MeasResultNR-SL-r16 ::= SEQUENCE +SRSASN_CODE meas_result_nr_sl_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_cbr_nr_r16, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_nr_sl_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_cbr_nr_r16, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_result_nr_sl_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("measResultListCBR-NR-r16"); + for (const auto& e1 : meas_result_list_cbr_nr_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MeasResultServMO ::= SEQUENCE +SRSASN_CODE meas_result_serv_mo_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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_serv_mo_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)); + } + + return SRSASN_SUCCESS; +} +void meas_result_serv_mo_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.end_obj(); +} + +// MeasResultSuccessHONR-r17 ::= SEQUENCE +SRSASN_CODE meas_result_success_ho_nr_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_result_r17.cell_results_r17.results_ssb_cell_r17_present, 1)); + HANDLE_CODE(bref.pack(meas_result_r17.cell_results_r17.results_csi_rs_cell_r17_present, 1)); + if (meas_result_r17.cell_results_r17.results_ssb_cell_r17_present) { + HANDLE_CODE(meas_result_r17.cell_results_r17.results_ssb_cell_r17.pack(bref)); + } + if (meas_result_r17.cell_results_r17.results_csi_rs_cell_r17_present) { + HANDLE_CODE(meas_result_r17.cell_results_r17.results_csi_rs_cell_r17.pack(bref)); + } + HANDLE_CODE(bref.pack(meas_result_r17.rs_idx_results_r17.results_ssb_idxes_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_r17.rs_idx_results_r17.results_csi_rs_idxes_r17.size() > 0, 1)); + if (meas_result_r17.rs_idx_results_r17.results_ssb_idxes_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_r17.rs_idx_results_r17.results_ssb_idxes_r17, 1, 64)); + } + if (meas_result_r17.rs_idx_results_r17.results_csi_rs_idxes_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_r17.rs_idx_results_r17.results_csi_rs_idxes_r17, 1, 64)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_success_ho_nr_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_result_r17.cell_results_r17.results_ssb_cell_r17_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_r17.cell_results_r17.results_csi_rs_cell_r17_present, 1)); + if (meas_result_r17.cell_results_r17.results_ssb_cell_r17_present) { + HANDLE_CODE(meas_result_r17.cell_results_r17.results_ssb_cell_r17.unpack(bref)); + } + if (meas_result_r17.cell_results_r17.results_csi_rs_cell_r17_present) { + HANDLE_CODE(meas_result_r17.cell_results_r17.results_csi_rs_cell_r17.unpack(bref)); + } + bool results_ssb_idxes_r17_present; + HANDLE_CODE(bref.unpack(results_ssb_idxes_r17_present, 1)); + bool results_csi_rs_idxes_r17_present; + HANDLE_CODE(bref.unpack(results_csi_rs_idxes_r17_present, 1)); + if (results_ssb_idxes_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_r17.rs_idx_results_r17.results_ssb_idxes_r17, bref, 1, 64)); + } + if (results_csi_rs_idxes_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_r17.rs_idx_results_r17.results_csi_rs_idxes_r17, bref, 1, 64)); + } + + return SRSASN_SUCCESS; +} +void meas_result_success_ho_nr_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measResult-r17"); + j.start_obj(); + j.write_fieldname("cellResults-r17"); + j.start_obj(); + if (meas_result_r17.cell_results_r17.results_ssb_cell_r17_present) { + j.write_fieldname("resultsSSB-Cell-r17"); + meas_result_r17.cell_results_r17.results_ssb_cell_r17.to_json(j); + } + if (meas_result_r17.cell_results_r17.results_csi_rs_cell_r17_present) { + j.write_fieldname("resultsCSI-RS-Cell-r17"); + meas_result_r17.cell_results_r17.results_csi_rs_cell_r17.to_json(j); + } + j.end_obj(); + j.write_fieldname("rsIndexResults-r17"); + j.start_obj(); + if (meas_result_r17.rs_idx_results_r17.results_ssb_idxes_r17.size() > 0) { + j.start_array("resultsSSB-Indexes-r17"); + for (const auto& e1 : meas_result_r17.rs_idx_results_r17.results_ssb_idxes_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_r17.rs_idx_results_r17.results_csi_rs_idxes_r17.size() > 0) { + j.start_array("resultsCSI-RS-Indexes-r17"); + for (const auto& e1 : meas_result_r17.rs_idx_results_r17.results_csi_rs_idxes_r17) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); + j.end_obj(); + j.end_obj(); +} + +// MeasResultsPerCarrierIdleEUTRA-r16 ::= SEQUENCE +SRSASN_CODE meas_results_per_carrier_idle_eutra_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, carrier_freq_eutra_r16, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_results_per_cell_list_idle_eutra_r16, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_results_per_carrier_idle_eutra_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(carrier_freq_eutra_r16, bref, (uint32_t)0u, (uint32_t)262143u)); + HANDLE_CODE(unpack_dyn_seq_of(meas_results_per_cell_list_idle_eutra_r16, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_results_per_carrier_idle_eutra_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreqEUTRA-r16", carrier_freq_eutra_r16); + j.start_array("measResultsPerCellListIdleEUTRA-r16"); + for (const auto& e1 : meas_results_per_cell_list_idle_eutra_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MeasResultsPerCarrierIdleNR-r16 ::= SEQUENCE +SRSASN_CODE meas_results_per_carrier_idle_nr_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, carrier_freq_r16, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_results_per_cell_list_idle_nr_r16, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_results_per_carrier_idle_nr_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(carrier_freq_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(unpack_dyn_seq_of(meas_results_per_cell_list_idle_nr_r16, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_results_per_carrier_idle_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("carrierFreq-r16", carrier_freq_r16); + j.start_array("measResultsPerCellListIdleNR-r16"); + for (const auto& e1 : meas_results_per_cell_list_idle_nr_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MinSchedulingOffsetPreference-r16 ::= SEQUENCE +SRSASN_CODE min_sched_offset_pref_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(preferred_k0_r16_present, 1)); + HANDLE_CODE(bref.pack(preferred_k2_r16_present, 1)); + + if (preferred_k0_r16_present) { + HANDLE_CODE(bref.pack(preferred_k0_r16.preferred_k0_scs_15k_hz_r16_present, 1)); + HANDLE_CODE(bref.pack(preferred_k0_r16.preferred_k0_scs_30k_hz_r16_present, 1)); + HANDLE_CODE(bref.pack(preferred_k0_r16.preferred_k0_scs_60k_hz_r16_present, 1)); + HANDLE_CODE(bref.pack(preferred_k0_r16.preferred_k0_scs_120k_hz_r16_present, 1)); + if (preferred_k0_r16.preferred_k0_scs_15k_hz_r16_present) { + HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_15k_hz_r16.pack(bref)); + } + if (preferred_k0_r16.preferred_k0_scs_30k_hz_r16_present) { + HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_30k_hz_r16.pack(bref)); + } + if (preferred_k0_r16.preferred_k0_scs_60k_hz_r16_present) { + HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_60k_hz_r16.pack(bref)); + } + if (preferred_k0_r16.preferred_k0_scs_120k_hz_r16_present) { + HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_120k_hz_r16.pack(bref)); + } + } + if (preferred_k2_r16_present) { + HANDLE_CODE(bref.pack(preferred_k2_r16.preferred_k2_scs_15k_hz_r16_present, 1)); + HANDLE_CODE(bref.pack(preferred_k2_r16.preferred_k2_scs_30k_hz_r16_present, 1)); + HANDLE_CODE(bref.pack(preferred_k2_r16.preferred_k2_scs_60k_hz_r16_present, 1)); + HANDLE_CODE(bref.pack(preferred_k2_r16.preferred_k2_scs_120k_hz_r16_present, 1)); + if (preferred_k2_r16.preferred_k2_scs_15k_hz_r16_present) { + HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_15k_hz_r16.pack(bref)); + } + if (preferred_k2_r16.preferred_k2_scs_30k_hz_r16_present) { + HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_30k_hz_r16.pack(bref)); + } + if (preferred_k2_r16.preferred_k2_scs_60k_hz_r16_present) { + HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_60k_hz_r16.pack(bref)); + } + if (preferred_k2_r16.preferred_k2_scs_120k_hz_r16_present) { + HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_120k_hz_r16.pack(bref)); + } + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE min_sched_offset_pref_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(preferred_k0_r16_present, 1)); + HANDLE_CODE(bref.unpack(preferred_k2_r16_present, 1)); + + if (preferred_k0_r16_present) { + HANDLE_CODE(bref.unpack(preferred_k0_r16.preferred_k0_scs_15k_hz_r16_present, 1)); + HANDLE_CODE(bref.unpack(preferred_k0_r16.preferred_k0_scs_30k_hz_r16_present, 1)); + HANDLE_CODE(bref.unpack(preferred_k0_r16.preferred_k0_scs_60k_hz_r16_present, 1)); + HANDLE_CODE(bref.unpack(preferred_k0_r16.preferred_k0_scs_120k_hz_r16_present, 1)); + if (preferred_k0_r16.preferred_k0_scs_15k_hz_r16_present) { + HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_15k_hz_r16.unpack(bref)); + } + if (preferred_k0_r16.preferred_k0_scs_30k_hz_r16_present) { + HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_30k_hz_r16.unpack(bref)); + } + if (preferred_k0_r16.preferred_k0_scs_60k_hz_r16_present) { + HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_60k_hz_r16.unpack(bref)); + } + if (preferred_k0_r16.preferred_k0_scs_120k_hz_r16_present) { + HANDLE_CODE(preferred_k0_r16.preferred_k0_scs_120k_hz_r16.unpack(bref)); + } + } + if (preferred_k2_r16_present) { + HANDLE_CODE(bref.unpack(preferred_k2_r16.preferred_k2_scs_15k_hz_r16_present, 1)); + HANDLE_CODE(bref.unpack(preferred_k2_r16.preferred_k2_scs_30k_hz_r16_present, 1)); + HANDLE_CODE(bref.unpack(preferred_k2_r16.preferred_k2_scs_60k_hz_r16_present, 1)); + HANDLE_CODE(bref.unpack(preferred_k2_r16.preferred_k2_scs_120k_hz_r16_present, 1)); + if (preferred_k2_r16.preferred_k2_scs_15k_hz_r16_present) { + HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_15k_hz_r16.unpack(bref)); + } + if (preferred_k2_r16.preferred_k2_scs_30k_hz_r16_present) { + HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_30k_hz_r16.unpack(bref)); + } + if (preferred_k2_r16.preferred_k2_scs_60k_hz_r16_present) { + HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_60k_hz_r16.unpack(bref)); + } + if (preferred_k2_r16.preferred_k2_scs_120k_hz_r16_present) { + HANDLE_CODE(preferred_k2_r16.preferred_k2_scs_120k_hz_r16.unpack(bref)); + } + } + + return SRSASN_SUCCESS; +} +void min_sched_offset_pref_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (preferred_k0_r16_present) { + j.write_fieldname("preferredK0-r16"); + j.start_obj(); + if (preferred_k0_r16.preferred_k0_scs_15k_hz_r16_present) { + j.write_str("preferredK0-SCS-15kHz-r16", preferred_k0_r16.preferred_k0_scs_15k_hz_r16.to_string()); + } + if (preferred_k0_r16.preferred_k0_scs_30k_hz_r16_present) { + j.write_str("preferredK0-SCS-30kHz-r16", preferred_k0_r16.preferred_k0_scs_30k_hz_r16.to_string()); + } + if (preferred_k0_r16.preferred_k0_scs_60k_hz_r16_present) { + j.write_str("preferredK0-SCS-60kHz-r16", preferred_k0_r16.preferred_k0_scs_60k_hz_r16.to_string()); + } + if (preferred_k0_r16.preferred_k0_scs_120k_hz_r16_present) { + j.write_str("preferredK0-SCS-120kHz-r16", preferred_k0_r16.preferred_k0_scs_120k_hz_r16.to_string()); + } + j.end_obj(); + } + if (preferred_k2_r16_present) { + j.write_fieldname("preferredK2-r16"); + j.start_obj(); + if (preferred_k2_r16.preferred_k2_scs_15k_hz_r16_present) { + j.write_str("preferredK2-SCS-15kHz-r16", preferred_k2_r16.preferred_k2_scs_15k_hz_r16.to_string()); + } + if (preferred_k2_r16.preferred_k2_scs_30k_hz_r16_present) { + j.write_str("preferredK2-SCS-30kHz-r16", preferred_k2_r16.preferred_k2_scs_30k_hz_r16.to_string()); + } + if (preferred_k2_r16.preferred_k2_scs_60k_hz_r16_present) { + j.write_str("preferredK2-SCS-60kHz-r16", preferred_k2_r16.preferred_k2_scs_60k_hz_r16.to_string()); + } + if (preferred_k2_r16.preferred_k2_scs_120k_hz_r16_present) { + j.write_str("preferredK2-SCS-120kHz-r16", preferred_k2_r16.preferred_k2_scs_120k_hz_r16.to_string()); + } + j.end_obj(); + } + j.end_obj(); +} + +const char* min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_15k_hz_r16_opts::to_string() const +{ + static const char* names[] = {"sl1", "sl2", "sl4", "sl6"}; + return convert_enum_idx( + names, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_15k_hz_r16_e_"); +} +uint8_t min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_15k_hz_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 6}; + return map_enum_number( + numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_15k_hz_r16_e_"); +} + +const char* min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_30k_hz_r16_opts::to_string() const +{ + static const char* names[] = {"sl1", "sl2", "sl4", "sl6"}; + return convert_enum_idx( + names, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_30k_hz_r16_e_"); +} +uint8_t min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_30k_hz_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 6}; + return map_enum_number( + numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_30k_hz_r16_e_"); +} + +const char* min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_60k_hz_r16_opts::to_string() const +{ + static const char* names[] = {"sl2", "sl4", "sl8", "sl12"}; + return convert_enum_idx( + names, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_60k_hz_r16_e_"); +} +uint8_t min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_60k_hz_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 8, 12}; + return map_enum_number( + numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_60k_hz_r16_e_"); +} + +const char* min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_120k_hz_r16_opts::to_string() const +{ + static const char* names[] = {"sl2", "sl4", "sl8", "sl12"}; + return convert_enum_idx( + names, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_120k_hz_r16_e_"); +} +uint8_t min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_120k_hz_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 8, 12}; + return map_enum_number( + numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k0_r16_s_::preferred_k0_scs_120k_hz_r16_e_"); +} + +const char* min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_15k_hz_r16_opts::to_string() const +{ + static const char* names[] = {"sl1", "sl2", "sl4", "sl6"}; + return convert_enum_idx( + names, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_15k_hz_r16_e_"); +} +uint8_t min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_15k_hz_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 6}; + return map_enum_number( + numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_15k_hz_r16_e_"); +} + +const char* min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_30k_hz_r16_opts::to_string() const +{ + static const char* names[] = {"sl1", "sl2", "sl4", "sl6"}; + return convert_enum_idx( + names, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_30k_hz_r16_e_"); +} +uint8_t min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_30k_hz_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 6}; + return map_enum_number( + numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_30k_hz_r16_e_"); +} + +const char* min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_60k_hz_r16_opts::to_string() const +{ + static const char* names[] = {"sl2", "sl4", "sl8", "sl12"}; + return convert_enum_idx( + names, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_60k_hz_r16_e_"); +} +uint8_t min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_60k_hz_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 8, 12}; + return map_enum_number( + numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_60k_hz_r16_e_"); +} + +const char* min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_120k_hz_r16_opts::to_string() const +{ + static const char* names[] = {"sl2", "sl4", "sl8", "sl12"}; + return convert_enum_idx( + names, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_120k_hz_r16_e_"); +} +uint8_t min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_120k_hz_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {2, 4, 8, 12}; + return map_enum_number( + numbers, 4, value, "min_sched_offset_pref_r16_s::preferred_k2_r16_s_::preferred_k2_scs_120k_hz_r16_e_"); +} + +// NR-PRS-MeasurementInfo-r16 ::= SEQUENCE +SRSASN_CODE nr_prs_meas_info_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, dl_prs_point_a_r16, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(nr_meas_prs_repeat_and_offset_r16.pack(bref)); + HANDLE_CODE(nr_meas_prs_len_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE nr_prs_meas_info_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(dl_prs_point_a_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(nr_meas_prs_repeat_and_offset_r16.unpack(bref)); + HANDLE_CODE(nr_meas_prs_len_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void nr_prs_meas_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("dl-PRS-PointA-r16", dl_prs_point_a_r16); + j.write_fieldname("nr-MeasPRS-RepetitionAndOffset-r16"); + nr_meas_prs_repeat_and_offset_r16.to_json(j); + j.write_str("nr-MeasPRS-length-r16", nr_meas_prs_len_r16.to_string()); + j.end_obj(); +} + +void nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::destroy_() {} +void nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::nr_meas_prs_repeat_and_offset_r16_c_( + const nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ms20_r16: + c.init(other.c.get()); + break; + case types::ms40_r16: + c.init(other.c.get()); + break; + case types::ms80_r16: + c.init(other.c.get()); + break; + case types::ms160_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_"); + } +} +nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_& +nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::operator=( + const nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ms20_r16: + c.set(other.c.get()); + break; + case types::ms40_r16: + c.set(other.c.get()); + break; + case types::ms80_r16: + c.set(other.c.get()); + break; + case types::ms160_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_"); + } + + return *this; +} +uint8_t& nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::set_ms20_r16() +{ + set(types::ms20_r16); + return c.get(); +} +uint8_t& nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::set_ms40_r16() +{ + set(types::ms40_r16); + return c.get(); +} +uint8_t& nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::set_ms80_r16() +{ + set(types::ms80_r16); + return c.get(); +} +uint8_t& nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::set_ms160_r16() +{ + set(types::ms160_r16); + return c.get(); +} +void nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ms20_r16: + j.write_int("ms20-r16", c.get()); + break; + case types::ms40_r16: + j.write_int("ms40-r16", c.get()); + break; + case types::ms80_r16: + j.write_int("ms80-r16", c.get()); + break; + case types::ms160_r16: + j.write_int("ms160-r16", c.get()); + break; + default: + log_invalid_choice_id(type_, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ms20_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + break; + case types::ms40_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::ms80_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + case types::ms160_r16: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)159u)); + break; + default: + log_invalid_choice_id(type_, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ms20_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::ms40_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::ms80_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + case types::ms160_r16: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)159u)); + break; + default: + log_invalid_choice_id(type_, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"ms20-r16", "ms40-r16", "ms80-r16", "ms160-r16"}; + return convert_enum_idx(names, 4, value, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::types"); +} +uint8_t nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {20, 40, 80, 160}; + return map_enum_number(numbers, 4, value, "nr_prs_meas_info_r16_s::nr_meas_prs_repeat_and_offset_r16_c_::types"); +} + +const char* nr_prs_meas_info_r16_s::nr_meas_prs_len_r16_opts::to_string() const +{ + static const char* names[] = {"ms1dot5", "ms3", "ms3dot5", "ms4", "ms5dot5", "ms6", "ms10", "ms20"}; + return convert_enum_idx(names, 8, value, "nr_prs_meas_info_r16_s::nr_meas_prs_len_r16_e_"); +} +float nr_prs_meas_info_r16_s::nr_meas_prs_len_r16_opts::to_number() const +{ + static const float numbers[] = {1.5, 3.0, 3.5, 4.0, 5.5, 6.0, 10.0, 20.0}; + return map_enum_number(numbers, 8, value, "nr_prs_meas_info_r16_s::nr_meas_prs_len_r16_e_"); +} +const char* nr_prs_meas_info_r16_s::nr_meas_prs_len_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"1.5", "3", "3.5", "4", "5.5", "6", "10", "20"}; + return convert_enum_idx(number_strs, 8, value, "nr_prs_meas_info_r16_s::nr_meas_prs_len_r16_e_"); +} + +// NR-TimeStamp-r17 ::= SEQUENCE +SRSASN_CODE nr_time_stamp_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, nr_sfn_r17, (uint16_t)0u, (uint16_t)1023u)); + HANDLE_CODE(nr_slot_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE nr_time_stamp_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(nr_sfn_r17, bref, (uint16_t)0u, (uint16_t)1023u)); + HANDLE_CODE(nr_slot_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void nr_time_stamp_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("nr-SFN-r17", nr_sfn_r17); + j.write_fieldname("nr-Slot-r17"); + nr_slot_r17.to_json(j); + j.end_obj(); +} + +void nr_time_stamp_r17_s::nr_slot_r17_c_::destroy_() {} +void nr_time_stamp_r17_s::nr_slot_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +nr_time_stamp_r17_s::nr_slot_r17_c_::nr_slot_r17_c_(const nr_time_stamp_r17_s::nr_slot_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::scs15_r17: + c.init(other.c.get()); + break; + case types::scs30_r17: + c.init(other.c.get()); + break; + case types::scs60_r17: + c.init(other.c.get()); + break; + case types::scs120_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "nr_time_stamp_r17_s::nr_slot_r17_c_"); + } +} +nr_time_stamp_r17_s::nr_slot_r17_c_& +nr_time_stamp_r17_s::nr_slot_r17_c_::operator=(const nr_time_stamp_r17_s::nr_slot_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::scs15_r17: + c.set(other.c.get()); + break; + case types::scs30_r17: + c.set(other.c.get()); + break; + case types::scs60_r17: + c.set(other.c.get()); + break; + case types::scs120_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "nr_time_stamp_r17_s::nr_slot_r17_c_"); + } + + return *this; +} +uint8_t& nr_time_stamp_r17_s::nr_slot_r17_c_::set_scs15_r17() +{ + set(types::scs15_r17); + return c.get(); +} +uint8_t& nr_time_stamp_r17_s::nr_slot_r17_c_::set_scs30_r17() +{ + set(types::scs30_r17); + return c.get(); +} +uint8_t& nr_time_stamp_r17_s::nr_slot_r17_c_::set_scs60_r17() +{ + set(types::scs60_r17); + return c.get(); +} +uint8_t& nr_time_stamp_r17_s::nr_slot_r17_c_::set_scs120_r17() +{ + set(types::scs120_r17); + return c.get(); +} +void nr_time_stamp_r17_s::nr_slot_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scs15_r17: + j.write_int("scs15-r17", c.get()); + break; + case types::scs30_r17: + j.write_int("scs30-r17", c.get()); + break; + case types::scs60_r17: + j.write_int("scs60-r17", c.get()); + break; + case types::scs120_r17: + j.write_int("scs120-r17", c.get()); + break; + default: + log_invalid_choice_id(type_, "nr_time_stamp_r17_s::nr_slot_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE nr_time_stamp_r17_s::nr_slot_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::scs15_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)9u)); + break; + case types::scs30_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)19u)); + break; + case types::scs60_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)39u)); + break; + case types::scs120_r17: + HANDLE_CODE(pack_integer(bref, c.get(), (uint8_t)0u, (uint8_t)79u)); + break; + default: + log_invalid_choice_id(type_, "nr_time_stamp_r17_s::nr_slot_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE nr_time_stamp_r17_s::nr_slot_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::scs15_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)9u)); + break; + case types::scs30_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)19u)); + break; + case types::scs60_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)39u)); + break; + case types::scs120_r17: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint8_t)0u, (uint8_t)79u)); + break; + default: + log_invalid_choice_id(type_, "nr_time_stamp_r17_s::nr_slot_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* nr_time_stamp_r17_s::nr_slot_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"scs15-r17", "scs30-r17", "scs60-r17", "scs120-r17"}; + return convert_enum_idx(names, 4, value, "nr_time_stamp_r17_s::nr_slot_r17_c_::types"); +} +uint8_t nr_time_stamp_r17_s::nr_slot_r17_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {15, 30, 60, 120}; + return map_enum_number(numbers, 4, value, "nr_time_stamp_r17_s::nr_slot_r17_c_::types"); +} + +// RA-InformationCommon-r16 ::= SEQUENCE +SRSASN_CODE ra_info_common_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(msg1_freq_start_r16_present, 1)); + HANDLE_CODE(bref.pack(msg1_freq_start_cfra_r16_present, 1)); + HANDLE_CODE(bref.pack(msg1_subcarrier_spacing_r16_present, 1)); + HANDLE_CODE(bref.pack(msg1_subcarrier_spacing_cfra_r16_present, 1)); + HANDLE_CODE(bref.pack(msg1_fdm_r16_present, 1)); + HANDLE_CODE(bref.pack(msg1_fdmcfra_r16_present, 1)); + + HANDLE_CODE(pack_integer(bref, absolute_freq_point_a_r16, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(pack_integer(bref, location_and_bw_r16, (uint16_t)0u, (uint16_t)37949u)); + HANDLE_CODE(subcarrier_spacing_r16.pack(bref)); + if (msg1_freq_start_r16_present) { + HANDLE_CODE(pack_integer(bref, msg1_freq_start_r16, (uint16_t)0u, (uint16_t)274u)); + } + if (msg1_freq_start_cfra_r16_present) { + HANDLE_CODE(pack_integer(bref, msg1_freq_start_cfra_r16, (uint16_t)0u, (uint16_t)274u)); + } + if (msg1_subcarrier_spacing_r16_present) { + HANDLE_CODE(msg1_subcarrier_spacing_r16.pack(bref)); + } + if (msg1_subcarrier_spacing_cfra_r16_present) { + HANDLE_CODE(msg1_subcarrier_spacing_cfra_r16.pack(bref)); + } + if (msg1_fdm_r16_present) { + HANDLE_CODE(msg1_fdm_r16.pack(bref)); + } + if (msg1_fdmcfra_r16_present) { + HANDLE_CODE(msg1_fdmcfra_r16.pack(bref)); + } + HANDLE_CODE(pack_dyn_seq_of(bref, per_ra_info_list_r16, 1, 200)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= per_ra_info_list_v1660.is_present(); + group_flags[1] |= msg1_scs_from_prach_cfg_idx_r16_present; + group_flags[2] |= msg1_scs_from_prach_cfg_idx_cfra_r16_present; + group_flags[3] |= msg_a_ro_freq_start_r17_present; + group_flags[3] |= msg_a_ro_freq_start_cfra_r17_present; + group_flags[3] |= msg_a_subcarrier_spacing_r17_present; + group_flags[3] |= msg_a_ro_fdm_r17_present; + group_flags[3] |= msg_a_ro_fdmcfra_r17_present; + group_flags[3] |= msg_a_scs_from_prach_cfg_idx_r17_present; + group_flags[3] |= msg_a_trans_max_r17_present; + group_flags[3] |= msg_a_mcs_r17_present; + group_flags[3] |= nrof_prbs_per_msg_a_po_r17_present; + group_flags[3] |= msg_a_pusch_time_domain_alloc_r17_present; + group_flags[3] |= freq_start_msg_a_pusch_r17_present; + group_flags[3] |= nrof_msg_a_po_fdm_r17_present; + group_flags[3] |= dl_pathloss_rsrp_r17_present; + group_flags[3] |= intended_sibs_r17.is_present(); + group_flags[3] |= ssbs_for_si_acquisition_r17.is_present(); + group_flags[3] |= msg_a_pusch_payload_size_r17_present; + group_flags[3] |= on_demand_si_success_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(per_ra_info_list_v1660.is_present(), 1)); + if (per_ra_info_list_v1660.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *per_ra_info_list_v1660, 1, 200)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(msg1_scs_from_prach_cfg_idx_r16_present, 1)); + if (msg1_scs_from_prach_cfg_idx_r16_present) { + HANDLE_CODE(msg1_scs_from_prach_cfg_idx_r16.pack(bref)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(msg1_scs_from_prach_cfg_idx_cfra_r16_present, 1)); + if (msg1_scs_from_prach_cfg_idx_cfra_r16_present) { + HANDLE_CODE(msg1_scs_from_prach_cfg_idx_cfra_r16.pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(msg_a_ro_freq_start_r17_present, 1)); + HANDLE_CODE(bref.pack(msg_a_ro_freq_start_cfra_r17_present, 1)); + HANDLE_CODE(bref.pack(msg_a_subcarrier_spacing_r17_present, 1)); + HANDLE_CODE(bref.pack(msg_a_ro_fdm_r17_present, 1)); + HANDLE_CODE(bref.pack(msg_a_ro_fdmcfra_r17_present, 1)); + HANDLE_CODE(bref.pack(msg_a_scs_from_prach_cfg_idx_r17_present, 1)); + HANDLE_CODE(bref.pack(msg_a_trans_max_r17_present, 1)); + HANDLE_CODE(bref.pack(msg_a_mcs_r17_present, 1)); + HANDLE_CODE(bref.pack(nrof_prbs_per_msg_a_po_r17_present, 1)); + HANDLE_CODE(bref.pack(msg_a_pusch_time_domain_alloc_r17_present, 1)); + HANDLE_CODE(bref.pack(freq_start_msg_a_pusch_r17_present, 1)); + HANDLE_CODE(bref.pack(nrof_msg_a_po_fdm_r17_present, 1)); + HANDLE_CODE(bref.pack(dl_pathloss_rsrp_r17_present, 1)); + HANDLE_CODE(bref.pack(intended_sibs_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(ssbs_for_si_acquisition_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(msg_a_pusch_payload_size_r17_present, 1)); + HANDLE_CODE(bref.pack(on_demand_si_success_r17_present, 1)); + if (msg_a_ro_freq_start_r17_present) { + HANDLE_CODE(pack_integer(bref, msg_a_ro_freq_start_r17, (uint16_t)0u, (uint16_t)274u)); + } + if (msg_a_ro_freq_start_cfra_r17_present) { + HANDLE_CODE(pack_integer(bref, msg_a_ro_freq_start_cfra_r17, (uint16_t)0u, (uint16_t)274u)); + } + if (msg_a_subcarrier_spacing_r17_present) { + HANDLE_CODE(msg_a_subcarrier_spacing_r17.pack(bref)); + } + if (msg_a_ro_fdm_r17_present) { + HANDLE_CODE(msg_a_ro_fdm_r17.pack(bref)); + } + if (msg_a_ro_fdmcfra_r17_present) { + HANDLE_CODE(msg_a_ro_fdmcfra_r17.pack(bref)); + } + if (msg_a_scs_from_prach_cfg_idx_r17_present) { + HANDLE_CODE(msg_a_scs_from_prach_cfg_idx_r17.pack(bref)); + } + if (msg_a_trans_max_r17_present) { + HANDLE_CODE(msg_a_trans_max_r17.pack(bref)); + } + if (msg_a_mcs_r17_present) { + HANDLE_CODE(pack_integer(bref, msg_a_mcs_r17, (uint8_t)0u, (uint8_t)15u)); + } + if (nrof_prbs_per_msg_a_po_r17_present) { + HANDLE_CODE(pack_integer(bref, nrof_prbs_per_msg_a_po_r17, (uint8_t)1u, (uint8_t)32u)); + } + if (msg_a_pusch_time_domain_alloc_r17_present) { + HANDLE_CODE(pack_integer(bref, msg_a_pusch_time_domain_alloc_r17, (uint8_t)1u, (uint8_t)16u)); + } + if (freq_start_msg_a_pusch_r17_present) { + HANDLE_CODE(pack_integer(bref, freq_start_msg_a_pusch_r17, (uint16_t)0u, (uint16_t)274u)); + } + if (nrof_msg_a_po_fdm_r17_present) { + HANDLE_CODE(nrof_msg_a_po_fdm_r17.pack(bref)); + } + if (dl_pathloss_rsrp_r17_present) { + HANDLE_CODE(pack_integer(bref, dl_pathloss_rsrp_r17, (uint8_t)0u, (uint8_t)127u)); + } + if (intended_sibs_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *intended_sibs_r17, 1, 32)); + } + if (ssbs_for_si_acquisition_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *ssbs_for_si_acquisition_r17, 1, 64, integer_packer(0, 63))); + } + if (msg_a_pusch_payload_size_r17_present) { + HANDLE_CODE(msg_a_pusch_payload_size_r17.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ra_info_common_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(msg1_freq_start_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg1_freq_start_cfra_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg1_subcarrier_spacing_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg1_subcarrier_spacing_cfra_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg1_fdm_r16_present, 1)); + HANDLE_CODE(bref.unpack(msg1_fdmcfra_r16_present, 1)); + + HANDLE_CODE(unpack_integer(absolute_freq_point_a_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(unpack_integer(location_and_bw_r16, bref, (uint16_t)0u, (uint16_t)37949u)); + HANDLE_CODE(subcarrier_spacing_r16.unpack(bref)); + if (msg1_freq_start_r16_present) { + HANDLE_CODE(unpack_integer(msg1_freq_start_r16, bref, (uint16_t)0u, (uint16_t)274u)); + } + if (msg1_freq_start_cfra_r16_present) { + HANDLE_CODE(unpack_integer(msg1_freq_start_cfra_r16, bref, (uint16_t)0u, (uint16_t)274u)); + } + if (msg1_subcarrier_spacing_r16_present) { + HANDLE_CODE(msg1_subcarrier_spacing_r16.unpack(bref)); + } + if (msg1_subcarrier_spacing_cfra_r16_present) { + HANDLE_CODE(msg1_subcarrier_spacing_cfra_r16.unpack(bref)); + } + if (msg1_fdm_r16_present) { + HANDLE_CODE(msg1_fdm_r16.unpack(bref)); + } + if (msg1_fdmcfra_r16_present) { + HANDLE_CODE(msg1_fdmcfra_r16.unpack(bref)); + } + HANDLE_CODE(unpack_dyn_seq_of(per_ra_info_list_r16, bref, 1, 200)); + + if (ext) { + ext_groups_unpacker_guard group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(per_ra_info_list_v1660, bref); + if (per_ra_info_list_v1660.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*per_ra_info_list_v1660, bref, 1, 200)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(msg1_scs_from_prach_cfg_idx_r16_present, 1)); + if (msg1_scs_from_prach_cfg_idx_r16_present) { + HANDLE_CODE(msg1_scs_from_prach_cfg_idx_r16.unpack(bref)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(msg1_scs_from_prach_cfg_idx_cfra_r16_present, 1)); + if (msg1_scs_from_prach_cfg_idx_cfra_r16_present) { + HANDLE_CODE(msg1_scs_from_prach_cfg_idx_cfra_r16.unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(msg_a_ro_freq_start_r17_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_ro_freq_start_cfra_r17_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_subcarrier_spacing_r17_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_ro_fdm_r17_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_ro_fdmcfra_r17_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_scs_from_prach_cfg_idx_r17_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_trans_max_r17_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_mcs_r17_present, 1)); + HANDLE_CODE(bref.unpack(nrof_prbs_per_msg_a_po_r17_present, 1)); + HANDLE_CODE(bref.unpack(msg_a_pusch_time_domain_alloc_r17_present, 1)); + HANDLE_CODE(bref.unpack(freq_start_msg_a_pusch_r17_present, 1)); + HANDLE_CODE(bref.unpack(nrof_msg_a_po_fdm_r17_present, 1)); + HANDLE_CODE(bref.unpack(dl_pathloss_rsrp_r17_present, 1)); + unpack_presence_flag(intended_sibs_r17, bref); + unpack_presence_flag(ssbs_for_si_acquisition_r17, bref); + HANDLE_CODE(bref.unpack(msg_a_pusch_payload_size_r17_present, 1)); + HANDLE_CODE(bref.unpack(on_demand_si_success_r17_present, 1)); + if (msg_a_ro_freq_start_r17_present) { + HANDLE_CODE(unpack_integer(msg_a_ro_freq_start_r17, bref, (uint16_t)0u, (uint16_t)274u)); + } + if (msg_a_ro_freq_start_cfra_r17_present) { + HANDLE_CODE(unpack_integer(msg_a_ro_freq_start_cfra_r17, bref, (uint16_t)0u, (uint16_t)274u)); + } + if (msg_a_subcarrier_spacing_r17_present) { + HANDLE_CODE(msg_a_subcarrier_spacing_r17.unpack(bref)); + } + if (msg_a_ro_fdm_r17_present) { + HANDLE_CODE(msg_a_ro_fdm_r17.unpack(bref)); + } + if (msg_a_ro_fdmcfra_r17_present) { + HANDLE_CODE(msg_a_ro_fdmcfra_r17.unpack(bref)); + } + if (msg_a_scs_from_prach_cfg_idx_r17_present) { + HANDLE_CODE(msg_a_scs_from_prach_cfg_idx_r17.unpack(bref)); + } + if (msg_a_trans_max_r17_present) { + HANDLE_CODE(msg_a_trans_max_r17.unpack(bref)); + } + if (msg_a_mcs_r17_present) { + HANDLE_CODE(unpack_integer(msg_a_mcs_r17, bref, (uint8_t)0u, (uint8_t)15u)); + } + if (nrof_prbs_per_msg_a_po_r17_present) { + HANDLE_CODE(unpack_integer(nrof_prbs_per_msg_a_po_r17, bref, (uint8_t)1u, (uint8_t)32u)); + } + if (msg_a_pusch_time_domain_alloc_r17_present) { + HANDLE_CODE(unpack_integer(msg_a_pusch_time_domain_alloc_r17, bref, (uint8_t)1u, (uint8_t)16u)); + } + if (freq_start_msg_a_pusch_r17_present) { + HANDLE_CODE(unpack_integer(freq_start_msg_a_pusch_r17, bref, (uint16_t)0u, (uint16_t)274u)); + } + if (nrof_msg_a_po_fdm_r17_present) { + HANDLE_CODE(nrof_msg_a_po_fdm_r17.unpack(bref)); + } + if (dl_pathloss_rsrp_r17_present) { + HANDLE_CODE(unpack_integer(dl_pathloss_rsrp_r17, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (intended_sibs_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*intended_sibs_r17, bref, 1, 32)); + } + if (ssbs_for_si_acquisition_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*ssbs_for_si_acquisition_r17, bref, 1, 64, integer_packer(0, 63))); + } + if (msg_a_pusch_payload_size_r17_present) { + HANDLE_CODE(msg_a_pusch_payload_size_r17.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void ra_info_common_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("absoluteFrequencyPointA-r16", absolute_freq_point_a_r16); + j.write_int("locationAndBandwidth-r16", location_and_bw_r16); + j.write_str("subcarrierSpacing-r16", subcarrier_spacing_r16.to_string()); + if (msg1_freq_start_r16_present) { + j.write_int("msg1-FrequencyStart-r16", msg1_freq_start_r16); + } + if (msg1_freq_start_cfra_r16_present) { + j.write_int("msg1-FrequencyStartCFRA-r16", msg1_freq_start_cfra_r16); + } + if (msg1_subcarrier_spacing_r16_present) { + j.write_str("msg1-SubcarrierSpacing-r16", msg1_subcarrier_spacing_r16.to_string()); + } + if (msg1_subcarrier_spacing_cfra_r16_present) { + j.write_str("msg1-SubcarrierSpacingCFRA-r16", msg1_subcarrier_spacing_cfra_r16.to_string()); + } + if (msg1_fdm_r16_present) { + j.write_str("msg1-FDM-r16", msg1_fdm_r16.to_string()); + } + if (msg1_fdmcfra_r16_present) { + j.write_str("msg1-FDMCFRA-r16", msg1_fdmcfra_r16.to_string()); + } + j.start_array("perRAInfoList-r16"); + for (const auto& e1 : per_ra_info_list_r16) { + e1.to_json(j); + } + j.end_array(); + if (ext) { + if (per_ra_info_list_v1660.is_present()) { + j.start_array("perRAInfoList-v1660"); + for (const auto& e1 : *per_ra_info_list_v1660) { + e1.to_json(j); + } + j.end_array(); + } + if (msg1_scs_from_prach_cfg_idx_r16_present) { + j.write_str("msg1-SCS-From-prach-ConfigurationIndex-r16", msg1_scs_from_prach_cfg_idx_r16.to_string()); + } + if (msg1_scs_from_prach_cfg_idx_cfra_r16_present) { + j.write_str("msg1-SCS-From-prach-ConfigurationIndexCFRA-r16", msg1_scs_from_prach_cfg_idx_cfra_r16.to_string()); + } + if (msg_a_ro_freq_start_r17_present) { + j.write_int("msgA-RO-FrequencyStart-r17", msg_a_ro_freq_start_r17); + } + if (msg_a_ro_freq_start_cfra_r17_present) { + j.write_int("msgA-RO-FrequencyStartCFRA-r17", msg_a_ro_freq_start_cfra_r17); + } + if (msg_a_subcarrier_spacing_r17_present) { + j.write_str("msgA-SubcarrierSpacing-r17", msg_a_subcarrier_spacing_r17.to_string()); + } + if (msg_a_ro_fdm_r17_present) { + j.write_str("msgA-RO-FDM-r17", msg_a_ro_fdm_r17.to_string()); + } + if (msg_a_ro_fdmcfra_r17_present) { + j.write_str("msgA-RO-FDMCFRA-r17", msg_a_ro_fdmcfra_r17.to_string()); + } + if (msg_a_scs_from_prach_cfg_idx_r17_present) { + j.write_str("msgA-SCS-From-prach-ConfigurationIndex-r17", msg_a_scs_from_prach_cfg_idx_r17.to_string()); + } + if (msg_a_trans_max_r17_present) { + j.write_str("msgA-TransMax-r17", msg_a_trans_max_r17.to_string()); + } + if (msg_a_mcs_r17_present) { + j.write_int("msgA-MCS-r17", msg_a_mcs_r17); + } + if (nrof_prbs_per_msg_a_po_r17_present) { + j.write_int("nrofPRBs-PerMsgA-PO-r17", nrof_prbs_per_msg_a_po_r17); + } + if (msg_a_pusch_time_domain_alloc_r17_present) { + j.write_int("msgA-PUSCH-TimeDomainAllocation-r17", msg_a_pusch_time_domain_alloc_r17); + } + if (freq_start_msg_a_pusch_r17_present) { + j.write_int("frequencyStartMsgA-PUSCH-r17", freq_start_msg_a_pusch_r17); + } + if (nrof_msg_a_po_fdm_r17_present) { + j.write_str("nrofMsgA-PO-FDM-r17", nrof_msg_a_po_fdm_r17.to_string()); + } + if (dl_pathloss_rsrp_r17_present) { + j.write_int("dlPathlossRSRP-r17", dl_pathloss_rsrp_r17); + } + if (intended_sibs_r17.is_present()) { + j.start_array("intendedSIBs-r17"); + for (const auto& e1 : *intended_sibs_r17) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (ssbs_for_si_acquisition_r17.is_present()) { + j.start_array("ssbsForSI-Acquisition-r17"); + for (const auto& e1 : *ssbs_for_si_acquisition_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (msg_a_pusch_payload_size_r17_present) { + j.write_str("msgA-PUSCH-PayloadSize-r17", msg_a_pusch_payload_size_r17.to_string()); + } + if (on_demand_si_success_r17_present) { + j.write_str("onDemandSISuccess-r17", "true"); + } + } + j.end_obj(); +} + +const char* ra_info_common_r16_s::msg1_fdm_r16_opts::to_string() const +{ + static const char* names[] = {"one", "two", "four", "eight"}; + return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg1_fdm_r16_e_"); +} +uint8_t ra_info_common_r16_s::msg1_fdm_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "ra_info_common_r16_s::msg1_fdm_r16_e_"); +} + +const char* ra_info_common_r16_s::msg1_fdmcfra_r16_opts::to_string() const +{ + static const char* names[] = {"one", "two", "four", "eight"}; + return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg1_fdmcfra_r16_e_"); +} +uint8_t ra_info_common_r16_s::msg1_fdmcfra_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "ra_info_common_r16_s::msg1_fdmcfra_r16_e_"); +} + +const char* ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_r16_opts::to_string() const +{ + static const char* names[] = {"kHz1dot25", "kHz5", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_r16_e_"); +} +float ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_r16_opts::to_number() const +{ + static const float numbers[] = {1.25, 5.0}; + return map_enum_number(numbers, 2, value, "ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_r16_e_"); +} +const char* ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"1.25", "5"}; + return convert_enum_idx(number_strs, 4, value, "ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_r16_e_"); +} + +const char* ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_cfra_r16_opts::to_string() const +{ + static const char* names[] = {"kHz1dot25", "kHz5", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_cfra_r16_e_"); +} +float ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_cfra_r16_opts::to_number() const +{ + static const float numbers[] = {1.25, 5.0}; + return map_enum_number(numbers, 2, value, "ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_cfra_r16_e_"); +} +const char* ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_cfra_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"1.25", "5"}; + return convert_enum_idx(number_strs, 4, value, "ra_info_common_r16_s::msg1_scs_from_prach_cfg_idx_cfra_r16_e_"); +} + +const char* ra_info_common_r16_s::msg_a_ro_fdm_r17_opts::to_string() const +{ + static const char* names[] = {"one", "two", "four", "eight"}; + return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg_a_ro_fdm_r17_e_"); +} +uint8_t ra_info_common_r16_s::msg_a_ro_fdm_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "ra_info_common_r16_s::msg_a_ro_fdm_r17_e_"); +} + +const char* ra_info_common_r16_s::msg_a_ro_fdmcfra_r17_opts::to_string() const +{ + static const char* names[] = {"one", "two", "four", "eight"}; + return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg_a_ro_fdmcfra_r17_e_"); +} +uint8_t ra_info_common_r16_s::msg_a_ro_fdmcfra_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "ra_info_common_r16_s::msg_a_ro_fdmcfra_r17_e_"); +} + +const char* ra_info_common_r16_s::msg_a_scs_from_prach_cfg_idx_r17_opts::to_string() const +{ + static const char* names[] = {"kHz1dot25", "kHz5", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::msg_a_scs_from_prach_cfg_idx_r17_e_"); +} +float ra_info_common_r16_s::msg_a_scs_from_prach_cfg_idx_r17_opts::to_number() const +{ + static const float numbers[] = {1.25, 5.0}; + return map_enum_number(numbers, 2, value, "ra_info_common_r16_s::msg_a_scs_from_prach_cfg_idx_r17_e_"); +} +const char* ra_info_common_r16_s::msg_a_scs_from_prach_cfg_idx_r17_opts::to_number_string() const +{ + static const char* number_strs[] = {"1.25", "5"}; + return convert_enum_idx(number_strs, 4, value, "ra_info_common_r16_s::msg_a_scs_from_prach_cfg_idx_r17_e_"); +} + +const char* ra_info_common_r16_s::msg_a_trans_max_r17_opts::to_string() const +{ + static const char* names[] = {"n1", "n2", "n4", "n6", "n8", "n10", "n20", "n50", "n100", "n200"}; + return convert_enum_idx(names, 10, value, "ra_info_common_r16_s::msg_a_trans_max_r17_e_"); +} +uint8_t ra_info_common_r16_s::msg_a_trans_max_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 6, 8, 10, 20, 50, 100, 200}; + return map_enum_number(numbers, 10, value, "ra_info_common_r16_s::msg_a_trans_max_r17_e_"); +} + +const char* ra_info_common_r16_s::nrof_msg_a_po_fdm_r17_opts::to_string() const +{ + static const char* names[] = {"one", "two", "four", "eight"}; + return convert_enum_idx(names, 4, value, "ra_info_common_r16_s::nrof_msg_a_po_fdm_r17_e_"); +} +uint8_t ra_info_common_r16_s::nrof_msg_a_po_fdm_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2, 4, 8}; + return map_enum_number(numbers, 4, value, "ra_info_common_r16_s::nrof_msg_a_po_fdm_r17_e_"); +} + +// RAN-VisibleMeasurements-r17 ::= SEQUENCE +SRSASN_CODE ran_visible_meass_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(app_layer_buffer_level_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(playout_delay_for_media_startup_r17_present, 1)); + HANDLE_CODE(bref.pack(pdu_session_id_list_r17.size() > 0, 1)); + + if (app_layer_buffer_level_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, app_layer_buffer_level_list_r17, 1, 8, integer_packer(0, 30000))); + } + if (playout_delay_for_media_startup_r17_present) { + HANDLE_CODE(pack_integer(bref, playout_delay_for_media_startup_r17, (uint16_t)0u, (uint16_t)30000u)); + } + if (pdu_session_id_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, pdu_session_id_list_r17, 1, 256, integer_packer(0, 255))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ran_visible_meass_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool app_layer_buffer_level_list_r17_present; + HANDLE_CODE(bref.unpack(app_layer_buffer_level_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(playout_delay_for_media_startup_r17_present, 1)); + bool pdu_session_id_list_r17_present; + HANDLE_CODE(bref.unpack(pdu_session_id_list_r17_present, 1)); + + if (app_layer_buffer_level_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(app_layer_buffer_level_list_r17, bref, 1, 8, integer_packer(0, 30000))); + } + if (playout_delay_for_media_startup_r17_present) { + HANDLE_CODE(unpack_integer(playout_delay_for_media_startup_r17, bref, (uint16_t)0u, (uint16_t)30000u)); + } + if (pdu_session_id_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(pdu_session_id_list_r17, bref, 1, 256, integer_packer(0, 255))); + } + + return SRSASN_SUCCESS; +} +void ran_visible_meass_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (app_layer_buffer_level_list_r17.size() > 0) { + j.start_array("appLayerBufferLevelList-r17"); + for (const auto& e1 : app_layer_buffer_level_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (playout_delay_for_media_startup_r17_present) { + j.write_int("playoutDelayForMediaStartup-r17", playout_delay_for_media_startup_r17); + } + if (pdu_session_id_list_r17.size() > 0) { + j.start_array("pdu-SessionIdList-r17"); + for (const auto& e1 : pdu_session_id_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + j.end_obj(); +} + +// RRCReconfigurationComplete-v1610-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_complete_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_meass_available_r16_present, 1)); + HANDLE_CODE(bref.pack(need_for_gaps_info_nr_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_meass_available_r16_present) { + HANDLE_CODE(ue_meass_available_r16.pack(bref)); + } + if (need_for_gaps_info_nr_r16_present) { + HANDLE_CODE(need_for_gaps_info_nr_r16.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_complete_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_meass_available_r16_present, 1)); + HANDLE_CODE(bref.unpack(need_for_gaps_info_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_meass_available_r16_present) { + HANDLE_CODE(ue_meass_available_r16.unpack(bref)); + } + if (need_for_gaps_info_nr_r16_present) { + HANDLE_CODE(need_for_gaps_info_nr_r16.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_recfg_complete_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_meass_available_r16_present) { + j.write_fieldname("ue-MeasurementsAvailable-r16"); + ue_meass_available_r16.to_json(j); + } + if (need_for_gaps_info_nr_r16_present) { + j.write_fieldname("needForGapsInfoNR-r16"); + need_for_gaps_info_nr_r16.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCResumeComplete-v1700-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_complete_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(need_for_gap_ncsg_info_nr_r17_present, 1)); + HANDLE_CODE(bref.pack(need_for_gap_ncsg_info_eutra_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (need_for_gap_ncsg_info_nr_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_info_nr_r17.pack(bref)); + } + if (need_for_gap_ncsg_info_eutra_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_info_eutra_r17.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_complete_v1700_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(need_for_gap_ncsg_info_nr_r17_present, 1)); + HANDLE_CODE(bref.unpack(need_for_gap_ncsg_info_eutra_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (need_for_gap_ncsg_info_nr_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_info_nr_r17.unpack(bref)); + } + if (need_for_gap_ncsg_info_eutra_r17_present) { + HANDLE_CODE(need_for_gap_ncsg_info_eutra_r17.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_resume_complete_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (need_for_gap_ncsg_info_nr_r17_present) { + j.write_fieldname("needForGapNCSG-InfoNR-r17"); + need_for_gap_ncsg_info_nr_r17.to_json(j); + } + if (need_for_gap_ncsg_info_eutra_r17_present) { + j.write_fieldname("needForGapNCSG-InfoEUTRA-r17"); + need_for_gap_ncsg_info_eutra_r17.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCSetupComplete-v1700-IEs ::= SEQUENCE +SRSASN_CODE rrc_setup_complete_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(onboarding_request_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_setup_complete_v1700_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(onboarding_request_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + return SRSASN_SUCCESS; +} +void rrc_setup_complete_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (onboarding_request_r17_present) { + j.write_str("onboardingRequest-r17", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// ReleasePreference-r16 ::= SEQUENCE +SRSASN_CODE release_pref_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(preferred_rrc_state_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE release_pref_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(preferred_rrc_state_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void release_pref_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("preferredRRC-State-r16", preferred_rrc_state_r16.to_string()); + j.end_obj(); +} + +const char* release_pref_r16_s::preferred_rrc_state_r16_opts::to_string() const +{ + static const char* names[] = {"idle", "inactive", "connected", "outOfConnected"}; + return convert_enum_idx(names, 4, value, "release_pref_r16_s::preferred_rrc_state_r16_e_"); +} + +// SHR-Cause-r17 ::= SEQUENCE +SRSASN_CODE shr_cause_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(t304_cause_r17_present, 1)); + HANDLE_CODE(bref.pack(t310_cause_r17_present, 1)); + HANDLE_CODE(bref.pack(t312_cause_r17_present, 1)); + HANDLE_CODE(bref.pack(source_daps_fail_r17_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE shr_cause_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(t304_cause_r17_present, 1)); + HANDLE_CODE(bref.unpack(t310_cause_r17_present, 1)); + HANDLE_CODE(bref.unpack(t312_cause_r17_present, 1)); + HANDLE_CODE(bref.unpack(source_daps_fail_r17_present, 1)); + + return SRSASN_SUCCESS; +} +void shr_cause_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (t304_cause_r17_present) { + j.write_str("t304-cause-r17", "true"); + } + if (t310_cause_r17_present) { + j.write_str("t310-cause-r17", "true"); + } + if (t312_cause_r17_present) { + j.write_str("t312-cause-r17", "true"); + } + if (source_daps_fail_r17_present) { + j.write_str("sourceDAPS-Failure-r17", "true"); + } + j.end_obj(); +} + +// SL-RxDRX-Report-v1700 ::= SEQUENCE +SRSASN_CODE sl_rx_drx_report_v1700_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(sl_drx_cfg_from_tx_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_rx_drx_report_v1700_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(sl_drx_cfg_from_tx_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_rx_drx_report_v1700_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("sl-DRX-ConfigFromTx-r17"); + sl_drx_cfg_from_tx_r17.to_json(j); + j.end_obj(); +} + +// SL-RxInterestedGC-BC-Dest-r17 ::= SEQUENCE +SRSASN_CODE sl_rx_interested_gc_bc_dest_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_dyn_seq_of(bref, sl_rx_interested_qos_info_list_r17, 1, 64)); + HANDLE_CODE(sl_dest_id_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_rx_interested_gc_bc_dest_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_dyn_seq_of(sl_rx_interested_qos_info_list_r17, bref, 1, 64)); + HANDLE_CODE(sl_dest_id_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_rx_interested_gc_bc_dest_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("sl-RxInterestedQoS-InfoList-r17"); + for (const auto& e1 : sl_rx_interested_qos_info_list_r17) { + e1.to_json(j); + } + j.end_array(); + j.write_str("sl-DestinationIdentity-r16", sl_dest_id_r16.to_string()); + j.end_obj(); +} + +// SL-TxResourceReqCommRelayInfo-r17 ::= SEQUENCE +SRSASN_CODE sl_tx_res_req_comm_relay_info_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sl_relay_drx_cfg_r17_present, 1)); + + if (sl_relay_drx_cfg_r17_present) { + HANDLE_CODE(sl_relay_drx_cfg_r17.pack(bref)); + } + HANDLE_CODE(sl_tx_res_req_comm_relay_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_tx_res_req_comm_relay_info_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(sl_relay_drx_cfg_r17_present, 1)); + + if (sl_relay_drx_cfg_r17_present) { + HANDLE_CODE(sl_relay_drx_cfg_r17.unpack(bref)); + } + HANDLE_CODE(sl_tx_res_req_comm_relay_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_tx_res_req_comm_relay_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_relay_drx_cfg_r17_present) { + j.write_fieldname("sl-RelayDRXConfig-r17"); + sl_relay_drx_cfg_r17.to_json(j); + } + j.write_fieldname("sl-TxResourceReqCommRelay-r17"); + sl_tx_res_req_comm_relay_r17.to_json(j); + j.end_obj(); +} + +// SL-TxResourceReqDisc-r17 ::= SEQUENCE +SRSASN_CODE sl_tx_res_req_disc_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(sl_source_id_relay_ue_r17_present, 1)); + + HANDLE_CODE(sl_dest_id_disc_r17.pack(bref)); + if (sl_source_id_relay_ue_r17_present) { + HANDLE_CODE(sl_source_id_relay_ue_r17.pack(bref)); + } + HANDLE_CODE(sl_cast_type_disc_r17.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_interested_freq_list_disc_r17, 1, 8, integer_packer(1, 8))); + HANDLE_CODE(pack_dyn_seq_of(bref, sl_type_tx_sync_list_disc_r17, 1, 8)); + HANDLE_CODE(sl_discovery_type_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_tx_res_req_disc_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(sl_source_id_relay_ue_r17_present, 1)); + + HANDLE_CODE(sl_dest_id_disc_r17.unpack(bref)); + if (sl_source_id_relay_ue_r17_present) { + HANDLE_CODE(sl_source_id_relay_ue_r17.unpack(bref)); + } + HANDLE_CODE(sl_cast_type_disc_r17.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(sl_tx_interested_freq_list_disc_r17, bref, 1, 8, integer_packer(1, 8))); + HANDLE_CODE(unpack_dyn_seq_of(sl_type_tx_sync_list_disc_r17, bref, 1, 8)); + HANDLE_CODE(sl_discovery_type_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_tx_res_req_disc_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sl-DestinationIdentityDisc-r17", sl_dest_id_disc_r17.to_string()); + if (sl_source_id_relay_ue_r17_present) { + j.write_str("sl-SourceIdentityRelayUE-r17", sl_source_id_relay_ue_r17.to_string()); + } + j.write_str("sl-CastTypeDisc-r17", sl_cast_type_disc_r17.to_string()); + j.start_array("sl-TxInterestedFreqListDisc-r17"); + for (const auto& e1 : sl_tx_interested_freq_list_disc_r17) { + j.write_int(e1); + } + j.end_array(); + j.start_array("sl-TypeTxSyncListDisc-r17"); + for (const auto& e1 : sl_type_tx_sync_list_disc_r17) { + j.write_str(e1.to_string()); + } + j.end_array(); + j.write_str("sl-DiscoveryType-r17", sl_discovery_type_r17.to_string()); + j.end_obj(); +} + +const char* sl_tx_res_req_disc_r17_s::sl_cast_type_disc_r17_opts::to_string() const +{ + static const char* names[] = {"broadcast", "groupcast", "unicast", "spare1"}; + return convert_enum_idx(names, 4, value, "sl_tx_res_req_disc_r17_s::sl_cast_type_disc_r17_e_"); +} + +const char* sl_tx_res_req_disc_r17_s::sl_discovery_type_r17_opts::to_string() const +{ + static const char* names[] = {"relay", "non-Relay"}; + return convert_enum_idx(names, 2, value, "sl_tx_res_req_disc_r17_s::sl_discovery_type_r17_e_"); +} + +// UEAssistanceInformation-v1700-IEs ::= SEQUENCE +SRSASN_CODE ue_assist_info_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_gap_fr2_pref_r17_present, 1)); + HANDLE_CODE(bref.pack(musim_assist_r17_present, 1)); + HANDLE_CODE(bref.pack(overheat_assist_r17_present, 1)); + HANDLE_CODE(bref.pack(max_bw_pref_fr2_2_r17_present, 1)); + HANDLE_CODE(bref.pack(max_mimo_layer_pref_fr2_2_r17_present, 1)); + HANDLE_CODE(bref.pack(min_sched_offset_pref_ext_r17_present, 1)); + HANDLE_CODE(bref.pack(rlm_meas_relaxation_state_r17_present, 1)); + HANDLE_CODE(bref.pack(bfd_meas_relaxation_state_r17_present, 1)); + HANDLE_CODE(bref.pack(non_sdt_data_ind_r17_present, 1)); + HANDLE_CODE(bref.pack(scg_deactivation_pref_r17_present, 1)); + HANDLE_CODE(bref.pack(ul_data_r17_present, 1)); + HANDLE_CODE(bref.pack(rrm_meas_relaxation_fulfilment_r17_present, 1)); + HANDLE_CODE(bref.pack(propagation_delay_difference_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ul_gap_fr2_pref_r17_present) { + HANDLE_CODE(ul_gap_fr2_pref_r17.pack(bref)); + } + if (musim_assist_r17_present) { + HANDLE_CODE(musim_assist_r17.pack(bref)); + } + if (overheat_assist_r17_present) { + HANDLE_CODE(overheat_assist_r17.pack(bref)); + } + if (max_bw_pref_fr2_2_r17_present) { + HANDLE_CODE(max_bw_pref_fr2_2_r17.pack(bref)); + } + if (max_mimo_layer_pref_fr2_2_r17_present) { + HANDLE_CODE(max_mimo_layer_pref_fr2_2_r17.pack(bref)); + } + if (min_sched_offset_pref_ext_r17_present) { + HANDLE_CODE(min_sched_offset_pref_ext_r17.pack(bref)); + } + if (rlm_meas_relaxation_state_r17_present) { + HANDLE_CODE(bref.pack(rlm_meas_relaxation_state_r17, 1)); + } + if (bfd_meas_relaxation_state_r17_present) { + HANDLE_CODE(bfd_meas_relaxation_state_r17.pack(bref)); + } + if (non_sdt_data_ind_r17_present) { + HANDLE_CODE(bref.pack(non_sdt_data_ind_r17.resume_cause_r17_present, 1)); + if (non_sdt_data_ind_r17.resume_cause_r17_present) { + HANDLE_CODE(non_sdt_data_ind_r17.resume_cause_r17.pack(bref)); + } + } + if (scg_deactivation_pref_r17_present) { + HANDLE_CODE(scg_deactivation_pref_r17.pack(bref)); + } + if (rrm_meas_relaxation_fulfilment_r17_present) { + HANDLE_CODE(bref.pack(rrm_meas_relaxation_fulfilment_r17, 1)); + } + if (propagation_delay_difference_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, propagation_delay_difference_r17, 1, 4, integer_packer(-270, 270))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_assist_info_v1700_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_gap_fr2_pref_r17_present, 1)); + HANDLE_CODE(bref.unpack(musim_assist_r17_present, 1)); + HANDLE_CODE(bref.unpack(overheat_assist_r17_present, 1)); + HANDLE_CODE(bref.unpack(max_bw_pref_fr2_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(max_mimo_layer_pref_fr2_2_r17_present, 1)); + HANDLE_CODE(bref.unpack(min_sched_offset_pref_ext_r17_present, 1)); + HANDLE_CODE(bref.unpack(rlm_meas_relaxation_state_r17_present, 1)); + HANDLE_CODE(bref.unpack(bfd_meas_relaxation_state_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_sdt_data_ind_r17_present, 1)); + HANDLE_CODE(bref.unpack(scg_deactivation_pref_r17_present, 1)); + HANDLE_CODE(bref.unpack(ul_data_r17_present, 1)); + HANDLE_CODE(bref.unpack(rrm_meas_relaxation_fulfilment_r17_present, 1)); + bool propagation_delay_difference_r17_present; + HANDLE_CODE(bref.unpack(propagation_delay_difference_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ul_gap_fr2_pref_r17_present) { + HANDLE_CODE(ul_gap_fr2_pref_r17.unpack(bref)); + } + if (musim_assist_r17_present) { + HANDLE_CODE(musim_assist_r17.unpack(bref)); + } + if (overheat_assist_r17_present) { + HANDLE_CODE(overheat_assist_r17.unpack(bref)); + } + if (max_bw_pref_fr2_2_r17_present) { + HANDLE_CODE(max_bw_pref_fr2_2_r17.unpack(bref)); + } + if (max_mimo_layer_pref_fr2_2_r17_present) { + HANDLE_CODE(max_mimo_layer_pref_fr2_2_r17.unpack(bref)); + } + if (min_sched_offset_pref_ext_r17_present) { + HANDLE_CODE(min_sched_offset_pref_ext_r17.unpack(bref)); + } + if (rlm_meas_relaxation_state_r17_present) { + HANDLE_CODE(bref.unpack(rlm_meas_relaxation_state_r17, 1)); + } + if (bfd_meas_relaxation_state_r17_present) { + HANDLE_CODE(bfd_meas_relaxation_state_r17.unpack(bref)); + } + if (non_sdt_data_ind_r17_present) { + HANDLE_CODE(bref.unpack(non_sdt_data_ind_r17.resume_cause_r17_present, 1)); + if (non_sdt_data_ind_r17.resume_cause_r17_present) { + HANDLE_CODE(non_sdt_data_ind_r17.resume_cause_r17.unpack(bref)); + } + } + if (scg_deactivation_pref_r17_present) { + HANDLE_CODE(scg_deactivation_pref_r17.unpack(bref)); + } + if (rrm_meas_relaxation_fulfilment_r17_present) { + HANDLE_CODE(bref.unpack(rrm_meas_relaxation_fulfilment_r17, 1)); + } + if (propagation_delay_difference_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(propagation_delay_difference_r17, bref, 1, 4, integer_packer(-270, 270))); + } + + return SRSASN_SUCCESS; +} +void ue_assist_info_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_gap_fr2_pref_r17_present) { + j.write_fieldname("ul-GapFR2-Preference-r17"); + ul_gap_fr2_pref_r17.to_json(j); + } + if (musim_assist_r17_present) { + j.write_fieldname("musim-Assistance-r17"); + musim_assist_r17.to_json(j); + } + if (overheat_assist_r17_present) { + j.write_fieldname("overheatingAssistance-r17"); + overheat_assist_r17.to_json(j); + } + if (max_bw_pref_fr2_2_r17_present) { + j.write_fieldname("maxBW-PreferenceFR2-2-r17"); + max_bw_pref_fr2_2_r17.to_json(j); + } + if (max_mimo_layer_pref_fr2_2_r17_present) { + j.write_fieldname("maxMIMO-LayerPreferenceFR2-2-r17"); + max_mimo_layer_pref_fr2_2_r17.to_json(j); + } + if (min_sched_offset_pref_ext_r17_present) { + j.write_fieldname("minSchedulingOffsetPreferenceExt-r17"); + min_sched_offset_pref_ext_r17.to_json(j); + } + if (rlm_meas_relaxation_state_r17_present) { + j.write_bool("rlm-MeasRelaxationState-r17", rlm_meas_relaxation_state_r17); + } + if (bfd_meas_relaxation_state_r17_present) { + j.write_str("bfd-MeasRelaxationState-r17", bfd_meas_relaxation_state_r17.to_string()); + } + if (non_sdt_data_ind_r17_present) { + j.write_fieldname("nonSDT-DataIndication-r17"); + j.start_obj(); + if (non_sdt_data_ind_r17.resume_cause_r17_present) { + j.write_str("resumeCause-r17", non_sdt_data_ind_r17.resume_cause_r17.to_string()); + } + j.end_obj(); + } + if (scg_deactivation_pref_r17_present) { + j.write_str("scg-DeactivationPreference-r17", scg_deactivation_pref_r17.to_string()); + } + if (ul_data_r17_present) { + j.write_str("uplinkData-r17", "true"); + } + if (rrm_meas_relaxation_fulfilment_r17_present) { + j.write_bool("rrm-MeasRelaxationFulfilment-r17", rrm_meas_relaxation_fulfilment_r17); + } + if (propagation_delay_difference_r17.size() > 0) { + j.start_array("propagationDelayDifference-r17"); + for (const auto& e1 : propagation_delay_difference_r17) { + 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(); +} + +const char* ue_assist_info_v1700_ies_s::scg_deactivation_pref_r17_opts::to_string() const +{ + static const char* names[] = {"scgDeactivationPreferred", "noPreference"}; + return convert_enum_idx(names, 2, value, "ue_assist_info_v1700_ies_s::scg_deactivation_pref_r17_e_"); +} + +// UL-PDCP-DelayValueResult-r16 ::= SEQUENCE +SRSASN_CODE ul_pdcp_delay_value_result_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, drb_id_r16, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(pack_integer(bref, average_delay_r16, (uint16_t)0u, (uint16_t)10000u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pdcp_delay_value_result_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(drb_id_r16, bref, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(unpack_integer(average_delay_r16, bref, (uint16_t)0u, (uint16_t)10000u)); + + return SRSASN_SUCCESS; +} +void ul_pdcp_delay_value_result_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("drb-Id-r16", drb_id_r16); + j.write_int("averageDelay-r16", average_delay_r16); + j.end_obj(); +} + +// UL-PDCP-ExcessDelayResult-r17 ::= SEQUENCE +SRSASN_CODE ul_pdcp_excess_delay_result_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_integer(bref, drb_id_r17, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(pack_integer(bref, excess_delay_r17, (uint8_t)0u, (uint8_t)31u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_pdcp_excess_delay_result_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_integer(drb_id_r17, bref, (uint8_t)1u, (uint8_t)32u)); + HANDLE_CODE(unpack_integer(excess_delay_r17, bref, (uint8_t)0u, (uint8_t)31u)); + + return SRSASN_SUCCESS; +} +void ul_pdcp_excess_delay_result_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("drb-Id-r17", drb_id_r17); + j.write_int("excessDelay-r17", excess_delay_r17); + j.end_obj(); +} + +// UplinkTxDirectCurrentCell ::= SEQUENCE +SRSASN_CODE ul_tx_direct_current_cell_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)); + + 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; +} +SRSASN_CODE ul_tx_direct_current_cell_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)); + + 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); + + unpack_presence_flag(ul_direct_current_bwp_sul, bref); + 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(); +} + +// VisitedCellInfo-r16 ::= SEQUENCE +SRSASN_CODE visited_cell_info_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(visited_cell_id_r16_present, 1)); + + if (visited_cell_id_r16_present) { + HANDLE_CODE(visited_cell_id_r16.pack(bref)); + } + HANDLE_CODE(pack_integer(bref, time_spent_r16, (uint16_t)0u, (uint16_t)4095u)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= visited_pscell_info_list_report_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(visited_pscell_info_list_report_r17.is_present(), 1)); + if (visited_pscell_info_list_report_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *visited_pscell_info_list_report_r17, 1, 16)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE visited_cell_info_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(visited_cell_id_r16_present, 1)); + + if (visited_cell_id_r16_present) { + HANDLE_CODE(visited_cell_id_r16.unpack(bref)); + } + HANDLE_CODE(unpack_integer(time_spent_r16, bref, (uint16_t)0u, (uint16_t)4095u)); + + 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); + + unpack_presence_flag(visited_pscell_info_list_report_r17, bref); + if (visited_pscell_info_list_report_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*visited_pscell_info_list_report_r17, bref, 1, 16)); + } + } + } + return SRSASN_SUCCESS; +} +void visited_cell_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (visited_cell_id_r16_present) { + j.write_fieldname("visitedCellId-r16"); + visited_cell_id_r16.to_json(j); + } + j.write_int("timeSpent-r16", time_spent_r16); + if (ext) { + if (visited_pscell_info_list_report_r17.is_present()) { + j.start_array("visitedPSCellInfoListReport-r17"); + for (const auto& e1 : *visited_pscell_info_list_report_r17) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +void visited_cell_info_r16_s::visited_cell_id_r16_c_::destroy_() +{ + switch (type_) { + case types::nr_cell_id_r16: + c.destroy(); + break; + case types::eutra_cell_id_r16: + c.destroy(); + break; + default: + break; + } +} +void visited_cell_info_r16_s::visited_cell_id_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nr_cell_id_r16: + c.init(); + break; + case types::eutra_cell_id_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_"); + } +} +visited_cell_info_r16_s::visited_cell_id_r16_c_::visited_cell_id_r16_c_( + const visited_cell_info_r16_s::visited_cell_id_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::nr_cell_id_r16: + c.init(other.c.get()); + break; + case types::eutra_cell_id_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_"); + } +} +visited_cell_info_r16_s::visited_cell_id_r16_c_& +visited_cell_info_r16_s::visited_cell_id_r16_c_::operator=(const visited_cell_info_r16_s::visited_cell_id_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nr_cell_id_r16: + c.set(other.c.get()); + break; + case types::eutra_cell_id_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_"); + } + + return *this; +} +visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_& +visited_cell_info_r16_s::visited_cell_id_r16_c_::set_nr_cell_id_r16() +{ + set(types::nr_cell_id_r16); + return c.get(); +} +visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_& +visited_cell_info_r16_s::visited_cell_id_r16_c_::set_eutra_cell_id_r16() +{ + set(types::eutra_cell_id_r16); + return c.get(); +} +void visited_cell_info_r16_s::visited_cell_id_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nr_cell_id_r16: + j.write_fieldname("nr-CellId-r16"); + c.get().to_json(j); + break; + case types::eutra_cell_id_r16: + j.write_fieldname("eutra-CellId-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE visited_cell_info_r16_s::visited_cell_id_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::nr_cell_id_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eutra_cell_id_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE visited_cell_info_r16_s::visited_cell_id_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::nr_cell_id_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eutra_cell_id_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::destroy_() +{ + switch (type_) { + case types::cgi_info: + c.destroy(); + break; + case types::pci_arfcn_r16: + c.destroy(); + break; + default: + break; + } +} +void visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cgi_info: + c.init(); + break; + case types::pci_arfcn_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_"); + } +} +visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::nr_cell_id_r16_c_( + const visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cgi_info: + c.init(other.c.get()); + break; + case types::pci_arfcn_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_"); + } +} +visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_& +visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::operator=( + const visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cgi_info: + c.set(other.c.get()); + break; + case types::pci_arfcn_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_"); + } + + return *this; +} +cgi_info_logging_r16_s& visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::set_cgi_info() +{ + set(types::cgi_info); + return c.get(); +} +pci_arfcn_nr_r16_s& visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::set_pci_arfcn_r16() +{ + set(types::pci_arfcn_r16); + return c.get(); +} +void visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cgi_info: + j.write_fieldname("cgi-Info"); + c.get().to_json(j); + break; + case types::pci_arfcn_r16: + j.write_fieldname("pci-arfcn-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cgi_info: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_arfcn_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cgi_info: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_arfcn_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"cgi-Info", "pci-arfcn-r16"}; + return convert_enum_idx(names, 2, value, "visited_cell_info_r16_s::visited_cell_id_r16_c_::nr_cell_id_r16_c_::types"); +} + +void visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::destroy_() +{ + switch (type_) { + case types::cell_global_id_r16: + c.destroy(); + break; + case types::pci_arfcn_r16: + c.destroy(); + break; + default: + break; + } +} +void visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_global_id_r16: + c.init(); + break; + case types::pci_arfcn_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_"); + } +} +visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::eutra_cell_id_r16_c_( + const visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_global_id_r16: + c.init(other.c.get()); + break; + case types::pci_arfcn_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_"); + } +} +visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_& +visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::operator=( + const visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_global_id_r16: + c.set(other.c.get()); + break; + case types::pci_arfcn_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_"); + } + + return *this; +} +cgi_info_eutra_s& visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::set_cell_global_id_r16() +{ + set(types::cell_global_id_r16); + return c.get(); +} +pci_arfcn_eutra_r16_s& visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::set_pci_arfcn_r16() +{ + set(types::pci_arfcn_r16); + return c.get(); +} +void visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_global_id_r16: + j.write_fieldname("cellGlobalId-r16"); + c.get().to_json(j); + break; + case types::pci_arfcn_r16: + j.write_fieldname("pci-arfcn-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cell_global_id_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_arfcn_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cell_global_id_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_arfcn_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"cellGlobalId-r16", "pci-arfcn-r16"}; + return convert_enum_idx( + names, 2, value, "visited_cell_info_r16_s::visited_cell_id_r16_c_::eutra_cell_id_r16_c_::types"); +} + +const char* visited_cell_info_r16_s::visited_cell_id_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"nr-CellId-r16", "eutra-CellId-r16"}; + return convert_enum_idx(names, 2, value, "visited_cell_info_r16_s::visited_cell_id_r16_c_::types"); +} + +// DRB-CountInfo ::= SEQUENCE +SRSASN_CODE drb_count_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_ul, (uint64_t)0u, (uint64_t)4294967295u)); + HANDLE_CODE(pack_integer(bref, count_dl, (uint64_t)0u, (uint64_t)4294967295u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE drb_count_info_s::unpack(cbit_ref& bref) +{ + 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(); +} + +// FailureInfoDAPS-r16 ::= SEQUENCE +SRSASN_CODE fail_info_daps_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(fail_type_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE fail_info_daps_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(fail_type_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void fail_info_daps_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("failureType-r16", fail_type_r16.to_string()); + j.end_obj(); +} + +const char* fail_info_daps_r16_s::fail_type_r16_opts::to_string() const +{ + static const char* names[] = {"daps-failure", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "fail_info_daps_r16_s::fail_type_r16_e_"); +} + +// MBS-ServiceInfo-r17 ::= SEQUENCE +SRSASN_CODE mbs_service_info_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(tmgi_r17.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mbs_service_info_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(tmgi_r17.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mbs_service_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("tmgi-r17"); + tmgi_r17.to_json(j); + j.end_obj(); +} + +// MeasReportAppLayer-r17 ::= SEQUENCE +SRSASN_CODE meas_report_app_layer_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_report_app_layer_container_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(app_layer_session_status_r17_present, 1)); + HANDLE_CODE(bref.pack(ran_visible_meass_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, meas_cfg_app_layer_id_r17, (uint8_t)0u, (uint8_t)15u)); + if (meas_report_app_layer_container_r17.size() > 0) { + HANDLE_CODE(meas_report_app_layer_container_r17.pack(bref)); + } + if (app_layer_session_status_r17_present) { + HANDLE_CODE(app_layer_session_status_r17.pack(bref)); + } + if (ran_visible_meass_r17_present) { + HANDLE_CODE(ran_visible_meass_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_app_layer_r17_s::unpack(cbit_ref& bref) +{ + bool meas_report_app_layer_container_r17_present; + HANDLE_CODE(bref.unpack(meas_report_app_layer_container_r17_present, 1)); + HANDLE_CODE(bref.unpack(app_layer_session_status_r17_present, 1)); + HANDLE_CODE(bref.unpack(ran_visible_meass_r17_present, 1)); + + HANDLE_CODE(unpack_integer(meas_cfg_app_layer_id_r17, bref, (uint8_t)0u, (uint8_t)15u)); + if (meas_report_app_layer_container_r17_present) { + HANDLE_CODE(meas_report_app_layer_container_r17.unpack(bref)); + } + if (app_layer_session_status_r17_present) { + HANDLE_CODE(app_layer_session_status_r17.unpack(bref)); + } + if (ran_visible_meass_r17_present) { + HANDLE_CODE(ran_visible_meass_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_report_app_layer_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("measConfigAppLayerId-r17", meas_cfg_app_layer_id_r17); + if (meas_report_app_layer_container_r17.size() > 0) { + j.write_str("measReportAppLayerContainer-r17", meas_report_app_layer_container_r17.to_string()); + } + if (app_layer_session_status_r17_present) { + j.write_str("appLayerSessionStatus-r17", app_layer_session_status_r17.to_string()); + } + if (ran_visible_meass_r17_present) { + j.write_fieldname("ran-VisibleMeasurements-r17"); + ran_visible_meass_r17.to_json(j); + } + j.end_obj(); +} + +const char* meas_report_app_layer_r17_s::app_layer_session_status_r17_opts::to_string() const +{ + static const char* names[] = {"started", "stopped"}; + return convert_enum_idx(names, 2, value, "meas_report_app_layer_r17_s::app_layer_session_status_r17_e_"); +} + +// MeasResultCLI-r16 ::= SEQUENCE +SRSASN_CODE meas_result_cli_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_result_list_srs_rsrp_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_list_cli_rssi_r16.size() > 0, 1)); + + if (meas_result_list_srs_rsrp_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_srs_rsrp_r16, 1, 8)); + } + if (meas_result_list_cli_rssi_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_list_cli_rssi_r16, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_cli_r16_s::unpack(cbit_ref& bref) +{ + bool meas_result_list_srs_rsrp_r16_present; + HANDLE_CODE(bref.unpack(meas_result_list_srs_rsrp_r16_present, 1)); + bool meas_result_list_cli_rssi_r16_present; + HANDLE_CODE(bref.unpack(meas_result_list_cli_rssi_r16_present, 1)); + + if (meas_result_list_srs_rsrp_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_srs_rsrp_r16, bref, 1, 8)); + } + if (meas_result_list_cli_rssi_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_list_cli_rssi_r16, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void meas_result_cli_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_result_list_srs_rsrp_r16.size() > 0) { + j.start_array("measResultListSRS-RSRP-r16"); + for (const auto& e1 : meas_result_list_srs_rsrp_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_list_cli_rssi_r16.size() > 0) { + j.start_array("measResultListCLI-RSSI-r16"); + for (const auto& e1 : meas_result_list_cli_rssi_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// MeasResultForRSSI-r16 ::= SEQUENCE +SRSASN_CODE meas_result_for_rssi_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, rssi_result_r16, (uint8_t)0u, (uint8_t)76u)); + HANDLE_CODE(pack_integer(bref, ch_occupancy_r16, (uint8_t)0u, (uint8_t)100u)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_for_rssi_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(rssi_result_r16, bref, (uint8_t)0u, (uint8_t)76u)); + HANDLE_CODE(unpack_integer(ch_occupancy_r16, bref, (uint8_t)0u, (uint8_t)100u)); + + return SRSASN_SUCCESS; +} +void meas_result_for_rssi_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("rssi-Result-r16", rssi_result_r16); + j.write_int("channelOccupancy-r16", ch_occupancy_r16); + j.end_obj(); +} + +// MeasResultIdleEUTRA-r16 ::= SEQUENCE +SRSASN_CODE meas_result_idle_eutra_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, meas_results_per_carrier_list_idle_eutra_r16, 1, 8)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_idle_eutra_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(meas_results_per_carrier_list_idle_eutra_r16, bref, 1, 8)); + + return SRSASN_SUCCESS; +} +void meas_result_idle_eutra_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("measResultsPerCarrierListIdleEUTRA-r16"); + for (const auto& e1 : meas_results_per_carrier_list_idle_eutra_r16) { + e1.to_json(j); + } + j.end_array(); + j.end_obj(); +} + +// MeasResultIdleNR-r16 ::= SEQUENCE +SRSASN_CODE meas_result_idle_nr_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_results_per_carrier_list_idle_nr_r16.size() > 0, 1)); + + HANDLE_CODE(bref.pack(meas_result_serving_cell_r16.rsrp_result_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_result_serving_cell_r16.rsrq_result_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_result_serving_cell_r16.results_ssb_idxes_r16.size() > 0, 1)); + if (meas_result_serving_cell_r16.rsrp_result_r16_present) { + HANDLE_CODE(pack_integer(bref, meas_result_serving_cell_r16.rsrp_result_r16, (uint8_t)0u, (uint8_t)127u)); + } + if (meas_result_serving_cell_r16.rsrq_result_r16_present) { + HANDLE_CODE(pack_integer(bref, meas_result_serving_cell_r16.rsrq_result_r16, (uint8_t)0u, (uint8_t)127u)); + } + if (meas_result_serving_cell_r16.results_ssb_idxes_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_serving_cell_r16.results_ssb_idxes_r16, 1, 32)); + } + if (meas_results_per_carrier_list_idle_nr_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_results_per_carrier_list_idle_nr_r16, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_idle_nr_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool meas_results_per_carrier_list_idle_nr_r16_present; + HANDLE_CODE(bref.unpack(meas_results_per_carrier_list_idle_nr_r16_present, 1)); + + HANDLE_CODE(bref.unpack(meas_result_serving_cell_r16.rsrp_result_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_serving_cell_r16.rsrq_result_r16_present, 1)); + bool results_ssb_idxes_r16_present; + HANDLE_CODE(bref.unpack(results_ssb_idxes_r16_present, 1)); + if (meas_result_serving_cell_r16.rsrp_result_r16_present) { + HANDLE_CODE(unpack_integer(meas_result_serving_cell_r16.rsrp_result_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (meas_result_serving_cell_r16.rsrq_result_r16_present) { + HANDLE_CODE(unpack_integer(meas_result_serving_cell_r16.rsrq_result_r16, bref, (uint8_t)0u, (uint8_t)127u)); + } + if (results_ssb_idxes_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_serving_cell_r16.results_ssb_idxes_r16, bref, 1, 32)); + } + if (meas_results_per_carrier_list_idle_nr_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_results_per_carrier_list_idle_nr_r16, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void meas_result_idle_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measResultServingCell-r16"); + j.start_obj(); + if (meas_result_serving_cell_r16.rsrp_result_r16_present) { + j.write_int("rsrp-Result-r16", meas_result_serving_cell_r16.rsrp_result_r16); + } + if (meas_result_serving_cell_r16.rsrq_result_r16_present) { + j.write_int("rsrq-Result-r16", meas_result_serving_cell_r16.rsrq_result_r16); + } + if (meas_result_serving_cell_r16.results_ssb_idxes_r16.size() > 0) { + j.start_array("resultsSSB-Indexes-r16"); + for (const auto& e1 : meas_result_serving_cell_r16.results_ssb_idxes_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); + if (meas_results_per_carrier_list_idle_nr_r16.size() > 0) { + j.start_array("measResultsPerCarrierListIdleNR-r16"); + for (const auto& e1 : meas_results_per_carrier_list_idle_nr_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// MeasResultRLFNR-r16 ::= SEQUENCE +SRSASN_CODE meas_result_rlf_nr_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_result_r16.rs_idx_results_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_result_r16.cell_results_r16.results_ssb_cell_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_result_r16.cell_results_r16.results_csi_rs_cell_r16_present, 1)); + if (meas_result_r16.cell_results_r16.results_ssb_cell_r16_present) { + HANDLE_CODE(meas_result_r16.cell_results_r16.results_ssb_cell_r16.pack(bref)); + } + if (meas_result_r16.cell_results_r16.results_csi_rs_cell_r16_present) { + HANDLE_CODE(meas_result_r16.cell_results_r16.results_csi_rs_cell_r16.pack(bref)); + } + if (meas_result_r16.rs_idx_results_r16_present) { + HANDLE_CODE(bref.pack(meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_result_r16.rs_idx_results_r16.results_csi_rs_idxes_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16_present, 1)); + if (meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16, 1, 64)); + } + if (meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16_present) { + HANDLE_CODE(meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16.pack(bref)); + } + if (meas_result_r16.rs_idx_results_r16.results_csi_rs_idxes_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_r16.rs_idx_results_r16.results_csi_rs_idxes_r16, 1, 64)); + } + if (meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16_present) { + HANDLE_CODE(meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16.pack(bref)); + } + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_rlf_nr_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_result_r16.rs_idx_results_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_r16.cell_results_r16.results_ssb_cell_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_r16.cell_results_r16.results_csi_rs_cell_r16_present, 1)); + if (meas_result_r16.cell_results_r16.results_ssb_cell_r16_present) { + HANDLE_CODE(meas_result_r16.cell_results_r16.results_ssb_cell_r16.unpack(bref)); + } + if (meas_result_r16.cell_results_r16.results_csi_rs_cell_r16_present) { + HANDLE_CODE(meas_result_r16.cell_results_r16.results_csi_rs_cell_r16.unpack(bref)); + } + if (meas_result_r16.rs_idx_results_r16_present) { + bool results_ssb_idxes_r16_present; + HANDLE_CODE(bref.unpack(results_ssb_idxes_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16_present, 1)); + bool results_csi_rs_idxes_r16_present; + HANDLE_CODE(bref.unpack(results_csi_rs_idxes_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16_present, 1)); + if (results_ssb_idxes_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16, bref, 1, 64)); + } + if (meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16_present) { + HANDLE_CODE(meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16.unpack(bref)); + } + if (results_csi_rs_idxes_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_r16.rs_idx_results_r16.results_csi_rs_idxes_r16, bref, 1, 64)); + } + if (meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16_present) { + HANDLE_CODE(meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16.unpack(bref)); + } + } + + return SRSASN_SUCCESS; +} +void meas_result_rlf_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measResult-r16"); + j.start_obj(); + j.write_fieldname("cellResults-r16"); + j.start_obj(); + if (meas_result_r16.cell_results_r16.results_ssb_cell_r16_present) { + j.write_fieldname("resultsSSB-Cell-r16"); + meas_result_r16.cell_results_r16.results_ssb_cell_r16.to_json(j); + } + if (meas_result_r16.cell_results_r16.results_csi_rs_cell_r16_present) { + j.write_fieldname("resultsCSI-RS-Cell-r16"); + meas_result_r16.cell_results_r16.results_csi_rs_cell_r16.to_json(j); + } + j.end_obj(); + if (meas_result_r16.rs_idx_results_r16_present) { + j.write_fieldname("rsIndexResults-r16"); + j.start_obj(); + if (meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16.size() > 0) { + j.start_array("resultsSSB-Indexes-r16"); + for (const auto& e1 : meas_result_r16.rs_idx_results_r16.results_ssb_idxes_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16_present) { + j.write_str("ssbRLMConfigBitmap-r16", meas_result_r16.rs_idx_results_r16.ssb_rlm_cfg_bitmap_r16.to_string()); + } + if (meas_result_r16.rs_idx_results_r16.results_csi_rs_idxes_r16.size() > 0) { + j.start_array("resultsCSI-RS-Indexes-r16"); + for (const auto& e1 : meas_result_r16.rs_idx_results_r16.results_csi_rs_idxes_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16_present) { + j.write_str("csi-rsRLMConfigBitmap-r16", + meas_result_r16.rs_idx_results_r16.csi_rs_rlm_cfg_bitmap_r16.to_string()); + } + j.end_obj(); + } + j.end_obj(); + j.end_obj(); +} + +// MeasResultRxTxTimeDiff-r17 ::= SEQUENCE +SRSASN_CODE meas_result_rx_tx_time_diff_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(rx_tx_time_diff_ue_r17_present, 1)); + + if (rx_tx_time_diff_ue_r17_present) { + HANDLE_CODE(rx_tx_time_diff_ue_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_result_rx_tx_time_diff_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(rx_tx_time_diff_ue_r17_present, 1)); + + if (rx_tx_time_diff_ue_r17_present) { + HANDLE_CODE(rx_tx_time_diff_ue_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_result_rx_tx_time_diff_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (rx_tx_time_diff_ue_r17_present) { + j.write_fieldname("rxTxTimeDiff-ue-r17"); + rx_tx_time_diff_ue_r17.to_json(j); + } + j.end_obj(); +} + +// MeasResultSFTD-EUTRA ::= SEQUENCE +SRSASN_CODE meas_result_sftd_eutra_s::pack(bit_ref& bref) const +{ + 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 meas_result_sftd_eutra_s::unpack(cbit_ref& 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 meas_result_sftd_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + 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(); +} + +// MeasResultsSL-r16 ::= SEQUENCE +SRSASN_CODE meas_results_sl_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(meas_results_list_sl_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_results_sl_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(meas_results_list_sl_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void meas_results_sl_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measResultsListSL-r16"); + meas_results_list_sl_r16.to_json(j); + j.end_obj(); +} + +void meas_results_sl_r16_s::meas_results_list_sl_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measResultNR-SL-r16"); + c.to_json(j); + j.end_obj(); +} +SRSASN_CODE meas_results_sl_r16_s::meas_results_list_sl_r16_c_::pack(bit_ref& bref) const +{ + pack_enum(bref, type()); + HANDLE_CODE(c.pack(bref)); + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_results_sl_r16_s::meas_results_list_sl_r16_c_::unpack(cbit_ref& bref) +{ + types e; + unpack_enum(e, bref); + if (e != type()) { + log_invalid_choice_id(e, "meas_results_sl_r16_s::meas_results_list_sl_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + HANDLE_CODE(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +const char* meas_results_sl_r16_s::meas_results_list_sl_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"measResultNR-SL-r16"}; + return convert_enum_idx(names, 1, value, "meas_results_sl_r16_s::meas_results_list_sl_r16_c_::types"); +} + +// OverheatingAssistance ::= SEQUENCE +SRSASN_CODE overheat_assist_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)); + + if (reduced_max_ccs_present) { + HANDLE_CODE(reduced_max_ccs.pack(bref)); + } + if (reduced_max_bw_fr1_present) { + HANDLE_CODE(reduced_max_bw_fr1.pack(bref)); + } + if (reduced_max_bw_fr2_present) { + HANDLE_CODE(reduced_max_bw_fr2.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; +} +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(reduced_max_ccs.unpack(bref)); + } + if (reduced_max_bw_fr1_present) { + HANDLE_CODE(reduced_max_bw_fr1.unpack(bref)); + } + if (reduced_max_bw_fr2_present) { + HANDLE_CODE(reduced_max_bw_fr2.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"); + reduced_max_ccs.to_json(j); + } + if (reduced_max_bw_fr1_present) { + j.write_fieldname("reducedMaxBW-FR1"); + reduced_max_bw_fr1.to_json(j); + } + if (reduced_max_bw_fr2_present) { + j.write_fieldname("reducedMaxBW-FR2"); + reduced_max_bw_fr2.to_json(j); + } + 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(); +} + +// RA-Report-r16 ::= SEQUENCE +SRSASN_CODE ra_report_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ra_info_common_r16_present, 1)); + + HANDLE_CODE(cell_id_r16.pack(bref)); + if (ra_info_common_r16_present) { + HANDLE_CODE(ra_info_common_r16.pack(bref)); + } + HANDLE_CODE(ra_purpose_r16.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= sp_cell_id_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(sp_cell_id_r17.is_present(), 1)); + if (sp_cell_id_r17.is_present()) { + HANDLE_CODE(sp_cell_id_r17->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ra_report_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ra_info_common_r16_present, 1)); + + HANDLE_CODE(cell_id_r16.unpack(bref)); + if (ra_info_common_r16_present) { + HANDLE_CODE(ra_info_common_r16.unpack(bref)); + } + HANDLE_CODE(ra_purpose_r16.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); + + unpack_presence_flag(sp_cell_id_r17, bref); + if (sp_cell_id_r17.is_present()) { + HANDLE_CODE(sp_cell_id_r17->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void ra_report_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("cellId-r16"); + cell_id_r16.to_json(j); + if (ra_info_common_r16_present) { + j.write_fieldname("ra-InformationCommon-r16"); + ra_info_common_r16.to_json(j); + } + j.write_str("raPurpose-r16", ra_purpose_r16.to_string()); + if (ext) { + if (sp_cell_id_r17.is_present()) { + j.write_fieldname("spCellID-r17"); + sp_cell_id_r17->to_json(j); + } + } + j.end_obj(); +} + +void ra_report_r16_s::cell_id_r16_c_::destroy_() +{ + switch (type_) { + case types::cell_global_id_r16: + c.destroy(); + break; + case types::pci_arfcn_r16: + c.destroy(); + break; + default: + break; + } +} +void ra_report_r16_s::cell_id_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_global_id_r16: + c.init(); + break; + case types::pci_arfcn_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ra_report_r16_s::cell_id_r16_c_"); + } +} +ra_report_r16_s::cell_id_r16_c_::cell_id_r16_c_(const ra_report_r16_s::cell_id_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_global_id_r16: + c.init(other.c.get()); + break; + case types::pci_arfcn_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ra_report_r16_s::cell_id_r16_c_"); + } +} +ra_report_r16_s::cell_id_r16_c_& +ra_report_r16_s::cell_id_r16_c_::operator=(const ra_report_r16_s::cell_id_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_global_id_r16: + c.set(other.c.get()); + break; + case types::pci_arfcn_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "ra_report_r16_s::cell_id_r16_c_"); + } + + return *this; +} +cgi_info_logging_r16_s& ra_report_r16_s::cell_id_r16_c_::set_cell_global_id_r16() +{ + set(types::cell_global_id_r16); + return c.get(); +} +pci_arfcn_nr_r16_s& ra_report_r16_s::cell_id_r16_c_::set_pci_arfcn_r16() +{ + set(types::pci_arfcn_r16); + return c.get(); +} +void ra_report_r16_s::cell_id_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_global_id_r16: + j.write_fieldname("cellGlobalId-r16"); + c.get().to_json(j); + break; + case types::pci_arfcn_r16: + j.write_fieldname("pci-arfcn-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "ra_report_r16_s::cell_id_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE ra_report_r16_s::cell_id_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cell_global_id_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_arfcn_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "ra_report_r16_s::cell_id_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ra_report_r16_s::cell_id_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cell_global_id_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_arfcn_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "ra_report_r16_s::cell_id_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ra_report_r16_s::cell_id_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"cellGlobalId-r16", "pci-arfcn-r16"}; + return convert_enum_idx(names, 2, value, "ra_report_r16_s::cell_id_r16_c_::types"); +} + +const char* ra_report_r16_s::ra_purpose_r16_opts::to_string() const +{ + static const char* names[] = {"accessRelated", + "beamFailureRecovery", + "reconfigurationWithSync", + "ulUnSynchronized", + "schedulingRequestFailure", + "noPUCCHResourceAvailable", + "requestForOtherSI", + "msg3RequestForOtherSI-r17", + "spare8", + "spare7", + "spare6", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 16, value, "ra_report_r16_s::ra_purpose_r16_e_"); +} +uint8_t ra_report_r16_s::ra_purpose_r16_opts::to_number() const +{ + if (value == msg3_request_for_other_si_r17) { + return 3; + } + invalid_enum_number(value, "ra_report_r16_s::ra_purpose_r16_e_"); + return 0; +} + +// 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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.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"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +void rrc_recfg_complete_v1560_ies_s::scg_resp_c_::destroy_() +{ + switch (type_) { + case types::nr_scg_resp: + c.destroy(); + break; + case types::eutra_scg_resp: + c.destroy(); + break; + 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_, "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; +} +dyn_octstring& rrc_recfg_complete_v1560_ies_s::scg_resp_c_::set_nr_scg_resp() +{ + set(types::nr_scg_resp); + return c.get(); +} +dyn_octstring& rrc_recfg_complete_v1560_ies_s::scg_resp_c_::set_eutra_scg_resp() +{ + set(types::eutra_scg_resp); + return c.get(); +} +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 rrc_recfg_complete_v1560_ies_s::scg_resp_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::nr_scg_resp: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eutra_scg_resp: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::nr_scg_resp: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eutra_scg_resp: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rrc_recfg_complete_v1560_ies_s::scg_resp_c_::types_opts::to_string() const +{ + static const char* names[] = {"nr-SCG-Response", "eutra-SCG-Response"}; + return convert_enum_idx(names, 2, value, "rrc_recfg_complete_v1560_ies_s::scg_resp_c_::types"); +} + +// RRCResumeComplete-v1640-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_complete_v1640_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_tx_direct_current_two_carrier_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ul_tx_direct_current_two_carrier_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_two_carrier_list_r16, 1, 64)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_complete_v1640_ies_s::unpack(cbit_ref& bref) +{ + bool ul_tx_direct_current_two_carrier_list_r16_present; + HANDLE_CODE(bref.unpack(ul_tx_direct_current_two_carrier_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ul_tx_direct_current_two_carrier_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_two_carrier_list_r16, bref, 1, 64)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_resume_complete_v1640_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_tx_direct_current_two_carrier_list_r16.size() > 0) { + j.start_array("uplinkTxDirectCurrentTwoCarrierList-r16"); + for (const auto& e1 : ul_tx_direct_current_two_carrier_list_r16) { + 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(); +} + +// RRCSetupComplete-v1690-IEs ::= SEQUENCE +SRSASN_CODE rrc_setup_complete_v1690_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_rrc_segmentation_r16_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 rrc_setup_complete_v1690_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ul_rrc_segmentation_r16_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 rrc_setup_complete_v1690_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_rrc_segmentation_r16_present) { + j.write_str("ul-RRC-Segmentation-r16", "true"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SL-Failure-r16 ::= SEQUENCE +SRSASN_CODE sl_fail_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(sl_dest_id_r16.pack(bref)); + HANDLE_CODE(sl_fail_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sl_fail_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(sl_dest_id_r16.unpack(bref)); + HANDLE_CODE(sl_fail_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sl_fail_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("sl-DestinationIdentity-r16", sl_dest_id_r16.to_string()); + j.write_str("sl-Failure-r16", sl_fail_r16.to_string()); + j.end_obj(); +} + +const char* sl_fail_r16_s::sl_fail_r16_opts::to_string() const +{ + static const char* names[] = { + "rlf", "configFailure", "drxReject-v1710", "spare5", "spare4", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "sl_fail_r16_s::sl_fail_r16_e_"); +} + +// SuccessHO-Report-r17 ::= SEQUENCE +SRSASN_CODE success_ho_report_r17_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r17_present, 1)); + HANDLE_CODE(bref.pack(location_info_r17_present, 1)); + HANDLE_CODE(bref.pack(time_since_cho_recfg_r17_present, 1)); + HANDLE_CODE(bref.pack(shr_cause_r17_present, 1)); + HANDLE_CODE(bref.pack(ra_info_common_r17_present, 1)); + HANDLE_CODE(bref.pack(up_interruption_time_at_ho_r17_present, 1)); + HANDLE_CODE(bref.pack(c_rnti_r17_present, 1)); + + HANDLE_CODE(bref.pack(source_cell_info_r17.source_cell_meas_r17_present, 1)); + HANDLE_CODE(bref.pack(source_cell_info_r17.rlf_in_source_daps_r17_present, 1)); + HANDLE_CODE(source_cell_info_r17.source_pcell_id_r17.pack(bref)); + if (source_cell_info_r17.source_cell_meas_r17_present) { + HANDLE_CODE(source_cell_info_r17.source_cell_meas_r17.pack(bref)); + } + HANDLE_CODE(bref.pack(target_cell_info_r17.target_cell_meas_r17_present, 1)); + HANDLE_CODE(target_cell_info_r17.target_pcell_id_r17.pack(bref)); + if (target_cell_info_r17.target_cell_meas_r17_present) { + HANDLE_CODE(target_cell_info_r17.target_cell_meas_r17.pack(bref)); + } + if (meas_result_neigh_cells_r17_present) { + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r17.meas_result_list_nr_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r17.meas_result_list_eutra_r17.size() > 0, 1)); + if (meas_result_neigh_cells_r17.meas_result_list_nr_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r17.meas_result_list_nr_r17, 1, 8)); + } + if (meas_result_neigh_cells_r17.meas_result_list_eutra_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r17.meas_result_list_eutra_r17, 1, 8)); + } + } + if (location_info_r17_present) { + HANDLE_CODE(location_info_r17.pack(bref)); + } + if (time_since_cho_recfg_r17_present) { + HANDLE_CODE(pack_integer(bref, time_since_cho_recfg_r17, (uint16_t)0u, (uint16_t)1023u)); + } + if (shr_cause_r17_present) { + HANDLE_CODE(shr_cause_r17.pack(bref)); + } + if (ra_info_common_r17_present) { + HANDLE_CODE(ra_info_common_r17.pack(bref)); + } + if (up_interruption_time_at_ho_r17_present) { + HANDLE_CODE(pack_integer(bref, up_interruption_time_at_ho_r17, (uint16_t)0u, (uint16_t)1023u)); + } + if (c_rnti_r17_present) { + HANDLE_CODE(pack_integer(bref, c_rnti_r17, (uint32_t)0u, (uint32_t)65535u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE success_ho_report_r17_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r17_present, 1)); + HANDLE_CODE(bref.unpack(location_info_r17_present, 1)); + HANDLE_CODE(bref.unpack(time_since_cho_recfg_r17_present, 1)); + HANDLE_CODE(bref.unpack(shr_cause_r17_present, 1)); + HANDLE_CODE(bref.unpack(ra_info_common_r17_present, 1)); + HANDLE_CODE(bref.unpack(up_interruption_time_at_ho_r17_present, 1)); + HANDLE_CODE(bref.unpack(c_rnti_r17_present, 1)); + + HANDLE_CODE(bref.unpack(source_cell_info_r17.source_cell_meas_r17_present, 1)); + HANDLE_CODE(bref.unpack(source_cell_info_r17.rlf_in_source_daps_r17_present, 1)); + HANDLE_CODE(source_cell_info_r17.source_pcell_id_r17.unpack(bref)); + if (source_cell_info_r17.source_cell_meas_r17_present) { + HANDLE_CODE(source_cell_info_r17.source_cell_meas_r17.unpack(bref)); + } + HANDLE_CODE(bref.unpack(target_cell_info_r17.target_cell_meas_r17_present, 1)); + HANDLE_CODE(target_cell_info_r17.target_pcell_id_r17.unpack(bref)); + if (target_cell_info_r17.target_cell_meas_r17_present) { + HANDLE_CODE(target_cell_info_r17.target_cell_meas_r17.unpack(bref)); + } + if (meas_result_neigh_cells_r17_present) { + bool meas_result_list_nr_r17_present; + HANDLE_CODE(bref.unpack(meas_result_list_nr_r17_present, 1)); + bool meas_result_list_eutra_r17_present; + HANDLE_CODE(bref.unpack(meas_result_list_eutra_r17_present, 1)); + if (meas_result_list_nr_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r17.meas_result_list_nr_r17, bref, 1, 8)); + } + if (meas_result_list_eutra_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r17.meas_result_list_eutra_r17, bref, 1, 8)); + } + } + if (location_info_r17_present) { + HANDLE_CODE(location_info_r17.unpack(bref)); + } + if (time_since_cho_recfg_r17_present) { + HANDLE_CODE(unpack_integer(time_since_cho_recfg_r17, bref, (uint16_t)0u, (uint16_t)1023u)); + } + if (shr_cause_r17_present) { + HANDLE_CODE(shr_cause_r17.unpack(bref)); + } + if (ra_info_common_r17_present) { + HANDLE_CODE(ra_info_common_r17.unpack(bref)); + } + if (up_interruption_time_at_ho_r17_present) { + HANDLE_CODE(unpack_integer(up_interruption_time_at_ho_r17, bref, (uint16_t)0u, (uint16_t)1023u)); + } + if (c_rnti_r17_present) { + HANDLE_CODE(unpack_integer(c_rnti_r17, bref, (uint32_t)0u, (uint32_t)65535u)); + } + + return SRSASN_SUCCESS; +} +void success_ho_report_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("sourceCellInfo-r17"); + j.start_obj(); + j.write_fieldname("sourcePCellId-r17"); + source_cell_info_r17.source_pcell_id_r17.to_json(j); + if (source_cell_info_r17.source_cell_meas_r17_present) { + j.write_fieldname("sourceCellMeas-r17"); + source_cell_info_r17.source_cell_meas_r17.to_json(j); + } + if (source_cell_info_r17.rlf_in_source_daps_r17_present) { + j.write_str("rlf-InSourceDAPS-r17", "true"); + } + j.end_obj(); + j.write_fieldname("targetCellInfo-r17"); + j.start_obj(); + j.write_fieldname("targetPCellId-r17"); + target_cell_info_r17.target_pcell_id_r17.to_json(j); + if (target_cell_info_r17.target_cell_meas_r17_present) { + j.write_fieldname("targetCellMeas-r17"); + target_cell_info_r17.target_cell_meas_r17.to_json(j); + } + j.end_obj(); + if (meas_result_neigh_cells_r17_present) { + j.write_fieldname("measResultNeighCells-r17"); + j.start_obj(); + if (meas_result_neigh_cells_r17.meas_result_list_nr_r17.size() > 0) { + j.start_array("measResultListNR-r17"); + for (const auto& e1 : meas_result_neigh_cells_r17.meas_result_list_nr_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r17.meas_result_list_eutra_r17.size() > 0) { + j.start_array("measResultListEUTRA-r17"); + for (const auto& e1 : meas_result_neigh_cells_r17.meas_result_list_eutra_r17) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + if (location_info_r17_present) { + j.write_fieldname("locationInfo-r17"); + location_info_r17.to_json(j); + } + if (time_since_cho_recfg_r17_present) { + j.write_int("timeSinceCHO-Reconfig-r17", time_since_cho_recfg_r17); + } + if (shr_cause_r17_present) { + j.write_fieldname("shr-Cause-r17"); + shr_cause_r17.to_json(j); + } + if (ra_info_common_r17_present) { + j.write_fieldname("ra-InformationCommon-r17"); + ra_info_common_r17.to_json(j); + } + if (up_interruption_time_at_ho_r17_present) { + j.write_int("upInterruptionTimeAtHO-r17", up_interruption_time_at_ho_r17); + } + if (c_rnti_r17_present) { + j.write_int("c-RNTI-r17", c_rnti_r17); + } + j.end_obj(); +} + +// UE-CapabilityRAT-Container ::= SEQUENCE +SRSASN_CODE ue_cap_rat_container_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(rat_type.pack(bref)); + HANDLE_CODE(ue_cap_rat_container.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_rat_container_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(rat_type.unpack(bref)); + HANDLE_CODE(ue_cap_rat_container.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_cap_rat_container_s::to_json(json_writer& j) const +{ + 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(); +} + +// UE-TxTEG-Association-r17 ::= SEQUENCE +SRSASN_CODE ue_tx_teg_assoc_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(serv_cell_id_r17_present, 1)); + + HANDLE_CODE(pack_integer(bref, ue_tx_teg_id_r17, (uint8_t)0u, (uint8_t)7u)); + HANDLE_CODE(nr_time_stamp_r17.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, associated_srs_pos_res_id_list_r17, 1, 64, integer_packer(0, 63))); + if (serv_cell_id_r17_present) { + HANDLE_CODE(pack_integer(bref, serv_cell_id_r17, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_tx_teg_assoc_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(serv_cell_id_r17_present, 1)); + + HANDLE_CODE(unpack_integer(ue_tx_teg_id_r17, bref, (uint8_t)0u, (uint8_t)7u)); + HANDLE_CODE(nr_time_stamp_r17.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(associated_srs_pos_res_id_list_r17, bref, 1, 64, integer_packer(0, 63))); + if (serv_cell_id_r17_present) { + HANDLE_CODE(unpack_integer(serv_cell_id_r17, bref, (uint8_t)0u, (uint8_t)31u)); + } + + return SRSASN_SUCCESS; +} +void ue_tx_teg_assoc_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ue-TxTEG-ID-r17", ue_tx_teg_id_r17); + j.write_fieldname("nr-TimeStamp-r17"); + nr_time_stamp_r17.to_json(j); + j.start_array("associatedSRS-PosResourceIdList-r17"); + for (const auto& e1 : associated_srs_pos_res_id_list_r17) { + j.write_int(e1); + } + j.end_array(); + if (serv_cell_id_r17_present) { + j.write_int("servCellId-r17", serv_cell_id_r17); + } + j.end_obj(); +} + +// UEAssistanceInformation-v1610-IEs ::= SEQUENCE +SRSASN_CODE ue_assist_info_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(idc_assist_r16_present, 1)); + HANDLE_CODE(bref.pack(drx_pref_r16_present, 1)); + HANDLE_CODE(bref.pack(max_bw_pref_r16_present, 1)); + HANDLE_CODE(bref.pack(max_cc_pref_r16_present, 1)); + HANDLE_CODE(bref.pack(max_mimo_layer_pref_r16_present, 1)); + HANDLE_CODE(bref.pack(min_sched_offset_pref_r16_present, 1)); + HANDLE_CODE(bref.pack(release_pref_r16_present, 1)); + HANDLE_CODE(bref.pack(sl_ue_assist_info_nr_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(ref_time_info_pref_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (idc_assist_r16_present) { + HANDLE_CODE(idc_assist_r16.pack(bref)); + } + if (drx_pref_r16_present) { + HANDLE_CODE(drx_pref_r16.pack(bref)); + } + if (max_bw_pref_r16_present) { + HANDLE_CODE(max_bw_pref_r16.pack(bref)); + } + if (max_cc_pref_r16_present) { + HANDLE_CODE(max_cc_pref_r16.pack(bref)); + } + if (max_mimo_layer_pref_r16_present) { + HANDLE_CODE(max_mimo_layer_pref_r16.pack(bref)); + } + if (min_sched_offset_pref_r16_present) { + HANDLE_CODE(min_sched_offset_pref_r16.pack(bref)); + } + if (release_pref_r16_present) { + HANDLE_CODE(release_pref_r16.pack(bref)); + } + if (sl_ue_assist_info_nr_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_ue_assist_info_nr_r16, 1, 8)); + } + if (ref_time_info_pref_r16_present) { + HANDLE_CODE(bref.pack(ref_time_info_pref_r16, 1)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_assist_info_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(idc_assist_r16_present, 1)); + HANDLE_CODE(bref.unpack(drx_pref_r16_present, 1)); + HANDLE_CODE(bref.unpack(max_bw_pref_r16_present, 1)); + HANDLE_CODE(bref.unpack(max_cc_pref_r16_present, 1)); + HANDLE_CODE(bref.unpack(max_mimo_layer_pref_r16_present, 1)); + HANDLE_CODE(bref.unpack(min_sched_offset_pref_r16_present, 1)); + HANDLE_CODE(bref.unpack(release_pref_r16_present, 1)); + bool sl_ue_assist_info_nr_r16_present; + HANDLE_CODE(bref.unpack(sl_ue_assist_info_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(ref_time_info_pref_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (idc_assist_r16_present) { + HANDLE_CODE(idc_assist_r16.unpack(bref)); + } + if (drx_pref_r16_present) { + HANDLE_CODE(drx_pref_r16.unpack(bref)); + } + if (max_bw_pref_r16_present) { + HANDLE_CODE(max_bw_pref_r16.unpack(bref)); + } + if (max_cc_pref_r16_present) { + HANDLE_CODE(max_cc_pref_r16.unpack(bref)); + } + if (max_mimo_layer_pref_r16_present) { + HANDLE_CODE(max_mimo_layer_pref_r16.unpack(bref)); + } + if (min_sched_offset_pref_r16_present) { + HANDLE_CODE(min_sched_offset_pref_r16.unpack(bref)); + } + if (release_pref_r16_present) { + HANDLE_CODE(release_pref_r16.unpack(bref)); + } + if (sl_ue_assist_info_nr_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_ue_assist_info_nr_r16, bref, 1, 8)); + } + if (ref_time_info_pref_r16_present) { + HANDLE_CODE(bref.unpack(ref_time_info_pref_r16, 1)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_assist_info_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (idc_assist_r16_present) { + j.write_fieldname("idc-Assistance-r16"); + idc_assist_r16.to_json(j); + } + if (drx_pref_r16_present) { + j.write_fieldname("drx-Preference-r16"); + drx_pref_r16.to_json(j); + } + if (max_bw_pref_r16_present) { + j.write_fieldname("maxBW-Preference-r16"); + max_bw_pref_r16.to_json(j); + } + if (max_cc_pref_r16_present) { + j.write_fieldname("maxCC-Preference-r16"); + max_cc_pref_r16.to_json(j); + } + if (max_mimo_layer_pref_r16_present) { + j.write_fieldname("maxMIMO-LayerPreference-r16"); + max_mimo_layer_pref_r16.to_json(j); + } + if (min_sched_offset_pref_r16_present) { + j.write_fieldname("minSchedulingOffsetPreference-r16"); + min_sched_offset_pref_r16.to_json(j); + } + if (release_pref_r16_present) { + j.write_fieldname("releasePreference-r16"); + release_pref_r16.to_json(j); + } + if (sl_ue_assist_info_nr_r16.size() > 0) { + j.start_array("sl-UE-AssistanceInformationNR-r16"); + for (const auto& e1 : sl_ue_assist_info_nr_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (ref_time_info_pref_r16_present) { + j.write_bool("referenceTimeInfoPreference-r16", ref_time_info_pref_r16); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// 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(c.unpack(bref)); + return SRSASN_SUCCESS; +} + +const char* delay_budget_report_c::type1_opts::to_string() const +{ + static const char* names[] = {"msMinus1280", + "msMinus640", + "msMinus320", + "msMinus160", + "msMinus80", + "msMinus60", + "msMinus40", + "msMinus20", + "ms0", + "ms20", + "ms40", + "ms60", + "ms80", + "ms160", + "ms320", + "ms640", + "ms1280"}; + return convert_enum_idx(names, 17, value, "delay_budget_report_c::type1_e_"); +} +int16_t delay_budget_report_c::type1_opts::to_number() const +{ + static const int16_t numbers[] = { + -1280, -640, -320, -160, -80, -60, -40, -20, 0, 20, 40, 60, 80, 160, 320, 640, 1280}; + return map_enum_number(numbers, 17, value, "delay_budget_report_c::type1_e_"); +} + +const char* delay_budget_report_c::types_opts::to_string() const +{ + static const char* names[] = {"type1"}; + return convert_enum_idx(names, 1, value, "delay_budget_report_c::types"); +} +uint8_t delay_budget_report_c::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 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; +} +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(); + 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(); +} + +const char* fail_info_rlc_bearer_s::fail_type_opts::to_string() const +{ + static const char* names[] = {"rlc-failure", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "fail_info_rlc_bearer_s::fail_type_e_"); +} + +// FailureInformation-v1610-IEs ::= SEQUENCE +SRSASN_CODE fail_info_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(fail_info_daps_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (fail_info_daps_r16_present) { + HANDLE_CODE(fail_info_daps_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE fail_info_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(fail_info_daps_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (fail_info_daps_r16_present) { + HANDLE_CODE(fail_info_daps_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void fail_info_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fail_info_daps_r16_present) { + j.write_fieldname("failureInfoDAPS-r16"); + fail_info_daps_r16.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// FailureReportMCG-r16 ::= SEQUENCE +SRSASN_CODE fail_report_mcg_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(fail_type_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_result_freq_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_freq_list_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_scg_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_scg_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_freq_list_utra_fdd_r16.size() > 0, 1)); + + if (fail_type_r16_present) { + HANDLE_CODE(fail_type_r16.pack(bref)); + } + if (meas_result_freq_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list_r16, 1, 8)); + } + if (meas_result_freq_list_eutra_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list_eutra_r16, 1, 8)); + } + if (meas_result_scg_r16.size() > 0) { + HANDLE_CODE(meas_result_scg_r16.pack(bref)); + } + if (meas_result_scg_eutra_r16.size() > 0) { + HANDLE_CODE(meas_result_scg_eutra_r16.pack(bref)); + } + if (meas_result_freq_list_utra_fdd_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list_utra_fdd_r16, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE fail_report_mcg_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(fail_type_r16_present, 1)); + bool meas_result_freq_list_r16_present; + HANDLE_CODE(bref.unpack(meas_result_freq_list_r16_present, 1)); + bool meas_result_freq_list_eutra_r16_present; + HANDLE_CODE(bref.unpack(meas_result_freq_list_eutra_r16_present, 1)); + bool meas_result_scg_r16_present; + HANDLE_CODE(bref.unpack(meas_result_scg_r16_present, 1)); + bool meas_result_scg_eutra_r16_present; + HANDLE_CODE(bref.unpack(meas_result_scg_eutra_r16_present, 1)); + bool meas_result_freq_list_utra_fdd_r16_present; + HANDLE_CODE(bref.unpack(meas_result_freq_list_utra_fdd_r16_present, 1)); + + if (fail_type_r16_present) { + HANDLE_CODE(fail_type_r16.unpack(bref)); + } + if (meas_result_freq_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_freq_list_r16, bref, 1, 8)); + } + if (meas_result_freq_list_eutra_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_freq_list_eutra_r16, bref, 1, 8)); + } + if (meas_result_scg_r16_present) { + HANDLE_CODE(meas_result_scg_r16.unpack(bref)); + } + if (meas_result_scg_eutra_r16_present) { + HANDLE_CODE(meas_result_scg_eutra_r16.unpack(bref)); + } + if (meas_result_freq_list_utra_fdd_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_freq_list_utra_fdd_r16, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void fail_report_mcg_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fail_type_r16_present) { + j.write_str("failureType-r16", fail_type_r16.to_string()); + } + if (meas_result_freq_list_r16.size() > 0) { + j.start_array("measResultFreqList-r16"); + for (const auto& e1 : meas_result_freq_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_freq_list_eutra_r16.size() > 0) { + j.start_array("measResultFreqListEUTRA-r16"); + for (const auto& e1 : meas_result_freq_list_eutra_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_scg_r16.size() > 0) { + j.write_str("measResultSCG-r16", meas_result_scg_r16.to_string()); + } + if (meas_result_scg_eutra_r16.size() > 0) { + j.write_str("measResultSCG-EUTRA-r16", meas_result_scg_eutra_r16.to_string()); + } + if (meas_result_freq_list_utra_fdd_r16.size() > 0) { + j.start_array("measResultFreqListUTRA-FDD-r16"); + for (const auto& e1 : meas_result_freq_list_utra_fdd_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +const char* fail_report_mcg_r16_s::fail_type_r16_opts::to_string() const +{ + static const char* names[] = {"t310-Expiry", + "randomAccessProblem", + "rlc-MaxNumRetx", + "t312-Expiry-r16", + "lbt-Failure-r16", + "beamFailureRecoveryFailure-r16", + "bh-RLF-r16", + "spare1"}; + return convert_enum_idx(names, 8, value, "fail_report_mcg_r16_s::fail_type_r16_e_"); +} +uint16_t fail_report_mcg_r16_s::fail_type_r16_opts::to_number() const +{ + switch (value) { + case t310_expiry: + return 310; + case t312_expiry_r16: + return 312; + default: + invalid_enum_number(value, "fail_report_mcg_r16_s::fail_type_r16_e_"); + } + return 0; +} + +// FailureReportSCG ::= SEQUENCE +SRSASN_CODE fail_report_scg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_freq_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_scg_fail.size() > 0, 1)); + + HANDLE_CODE(fail_type.pack(bref)); + if (meas_result_freq_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list, 1, 8)); + } + if (meas_result_scg_fail.size() > 0) { + HANDLE_CODE(meas_result_scg_fail.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= location_info_r16.is_present(); + group_flags[0] |= fail_type_v1610_present; + group_flags[1] |= prev_pscell_id_r17.is_present(); + group_flags[1] |= failed_pscell_id_r17.is_present(); + group_flags[1] |= time_scg_fail_r17_present; + group_flags[1] |= per_ra_info_list_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(location_info_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(fail_type_v1610_present, 1)); + if (location_info_r16.is_present()) { + HANDLE_CODE(location_info_r16->pack(bref)); + } + if (fail_type_v1610_present) { + HANDLE_CODE(fail_type_v1610.pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(prev_pscell_id_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(failed_pscell_id_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(time_scg_fail_r17_present, 1)); + HANDLE_CODE(bref.pack(per_ra_info_list_r17.is_present(), 1)); + if (prev_pscell_id_r17.is_present()) { + HANDLE_CODE(pack_integer(bref, prev_pscell_id_r17->pci_r17, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(pack_integer(bref, prev_pscell_id_r17->carrier_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); + } + if (failed_pscell_id_r17.is_present()) { + HANDLE_CODE(pack_integer(bref, failed_pscell_id_r17->pci_r17, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(pack_integer(bref, failed_pscell_id_r17->carrier_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); + } + if (time_scg_fail_r17_present) { + HANDLE_CODE(pack_integer(bref, time_scg_fail_r17, (uint16_t)0u, (uint16_t)1023u)); + } + if (per_ra_info_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *per_ra_info_list_r17, 1, 200)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE fail_report_scg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool meas_result_freq_list_present; + HANDLE_CODE(bref.unpack(meas_result_freq_list_present, 1)); + bool meas_result_scg_fail_present; + HANDLE_CODE(bref.unpack(meas_result_scg_fail_present, 1)); + + 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 (meas_result_scg_fail_present) { + HANDLE_CODE(meas_result_scg_fail.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); + + unpack_presence_flag(location_info_r16, bref); + HANDLE_CODE(bref.unpack(fail_type_v1610_present, 1)); + if (location_info_r16.is_present()) { + HANDLE_CODE(location_info_r16->unpack(bref)); + } + if (fail_type_v1610_present) { + HANDLE_CODE(fail_type_v1610.unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(prev_pscell_id_r17, bref); + unpack_presence_flag(failed_pscell_id_r17, bref); + HANDLE_CODE(bref.unpack(time_scg_fail_r17_present, 1)); + unpack_presence_flag(per_ra_info_list_r17, bref); + if (prev_pscell_id_r17.is_present()) { + HANDLE_CODE(unpack_integer(prev_pscell_id_r17->pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(unpack_integer(prev_pscell_id_r17->carrier_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); + } + if (failed_pscell_id_r17.is_present()) { + HANDLE_CODE(unpack_integer(failed_pscell_id_r17->pci_r17, bref, (uint16_t)0u, (uint16_t)1007u)); + HANDLE_CODE(unpack_integer(failed_pscell_id_r17->carrier_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); + } + if (time_scg_fail_r17_present) { + HANDLE_CODE(unpack_integer(time_scg_fail_r17, bref, (uint16_t)0u, (uint16_t)1023u)); + } + if (per_ra_info_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*per_ra_info_list_r17, bref, 1, 200)); + } + } + } + return SRSASN_SUCCESS; +} +void fail_report_scg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("failureType", fail_type.to_string()); + if (meas_result_freq_list.size() > 0) { + j.start_array("measResultFreqList"); + for (const auto& e1 : meas_result_freq_list) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_scg_fail.size() > 0) { + j.write_str("measResultSCG-Failure", meas_result_scg_fail.to_string()); + } + if (ext) { + if (location_info_r16.is_present()) { + j.write_fieldname("locationInfo-r16"); + location_info_r16->to_json(j); + } + if (fail_type_v1610_present) { + j.write_str("failureType-v1610", fail_type_v1610.to_string()); + } + if (prev_pscell_id_r17.is_present()) { + j.write_fieldname("previousPSCellId-r17"); + j.start_obj(); + j.write_int("physCellId-r17", prev_pscell_id_r17->pci_r17); + j.write_int("carrierFreq-r17", prev_pscell_id_r17->carrier_freq_r17); + j.end_obj(); + } + if (failed_pscell_id_r17.is_present()) { + j.write_fieldname("failedPSCellId-r17"); + j.start_obj(); + j.write_int("physCellId-r17", failed_pscell_id_r17->pci_r17); + j.write_int("carrierFreq-r17", failed_pscell_id_r17->carrier_freq_r17); + j.end_obj(); + } + if (time_scg_fail_r17_present) { + j.write_int("timeSCGFailure-r17", time_scg_fail_r17); + } + if (per_ra_info_list_r17.is_present()) { + j.start_array("perRAInfoList-r17"); + for (const auto& e1 : *per_ra_info_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +const char* fail_report_scg_s::fail_type_opts::to_string() const +{ + static const char* names[] = {"t310-Expiry", + "randomAccessProblem", + "rlc-MaxNumRetx", + "synchReconfigFailureSCG", + "scg-ReconfigFailure", + "srb3-IntegrityFailure", + "other-r16", + "spare1"}; + return convert_enum_idx(names, 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; +} + +const char* fail_report_scg_s::fail_type_v1610_opts::to_string() const +{ + static const char* names[] = {"scg-lbtFailure-r16", + "beamFailureRecoveryFailure-r16", + "t312-Expiry-r16", + "bh-RLF-r16", + "beamFailure-r17", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 8, value, "fail_report_scg_s::fail_type_v1610_e_"); +} +uint16_t fail_report_scg_s::fail_type_v1610_opts::to_number() const +{ + if (value == t312_expiry_r16) { + return 312; + } + invalid_enum_number(value, "fail_report_scg_s::fail_type_v1610_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(meas_result_freq_list_mrdc.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_scg_fail_mrdc.size() > 0, 1)); + + HANDLE_CODE(fail_type.pack(bref)); + if (meas_result_freq_list_mrdc.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_freq_list_mrdc, 1, 8)); + } + if (meas_result_scg_fail_mrdc.size() > 0) { + HANDLE_CODE(meas_result_scg_fail_mrdc.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= location_info_r16.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(location_info_r16.is_present(), 1)); + if (location_info_r16.is_present()) { + HANDLE_CODE(location_info_r16->pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE fail_report_scg_eutra_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool meas_result_freq_list_mrdc_present; + HANDLE_CODE(bref.unpack(meas_result_freq_list_mrdc_present, 1)); + bool meas_result_scg_fail_mrdc_present; + HANDLE_CODE(bref.unpack(meas_result_scg_fail_mrdc_present, 1)); + + 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 (meas_result_scg_fail_mrdc_present) { + HANDLE_CODE(meas_result_scg_fail_mrdc.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); + + unpack_presence_flag(location_info_r16, bref); + if (location_info_r16.is_present()) { + HANDLE_CODE(location_info_r16->unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void fail_report_scg_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("failureType", fail_type.to_string()); + if (meas_result_freq_list_mrdc.size() > 0) { + j.start_array("measResultFreqListMRDC"); + for (const auto& e1 : meas_result_freq_list_mrdc) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_scg_fail_mrdc.size() > 0) { + j.write_str("measResultSCG-FailureMRDC", meas_result_scg_fail_mrdc.to_string()); + } + if (ext) { + if (location_info_r16.is_present()) { + j.write_fieldname("locationInfo-r16"); + location_info_r16->to_json(j); + } + } + j.end_obj(); +} + +const char* fail_report_scg_eutra_s::fail_type_opts::to_string() const +{ + static const char* names[] = {"t313-Expiry", + "randomAccessProblem", + "rlc-MaxNumRetx", + "scg-ChangeFailure", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 8, value, "fail_report_scg_eutra_s::fail_type_e_"); +} +uint16_t fail_report_scg_eutra_s::fail_type_opts::to_number() const +{ + static const uint16_t numbers[] = {313}; + return map_enum_number(numbers, 1, value, "fail_report_scg_eutra_s::fail_type_e_"); +} + +// IAB-IP-AddressAndTraffic-r16 ::= SEQUENCE +SRSASN_CODE iab_ip_address_and_traffic_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(all_traffic_iab_ip_address_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(f1_c_traffic_ip_address_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(f1_u_traffic_ip_address_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_f1_traffic_ip_address_r16.size() > 0, 1)); + + if (all_traffic_iab_ip_address_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, all_traffic_iab_ip_address_r16, 1, 8)); + } + if (f1_c_traffic_ip_address_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, f1_c_traffic_ip_address_r16, 1, 8)); + } + if (f1_u_traffic_ip_address_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, f1_u_traffic_ip_address_r16, 1, 8)); + } + if (non_f1_traffic_ip_address_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, non_f1_traffic_ip_address_r16, 1, 8)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE iab_ip_address_and_traffic_r16_s::unpack(cbit_ref& bref) +{ + bool all_traffic_iab_ip_address_r16_present; + HANDLE_CODE(bref.unpack(all_traffic_iab_ip_address_r16_present, 1)); + bool f1_c_traffic_ip_address_r16_present; + HANDLE_CODE(bref.unpack(f1_c_traffic_ip_address_r16_present, 1)); + bool f1_u_traffic_ip_address_r16_present; + HANDLE_CODE(bref.unpack(f1_u_traffic_ip_address_r16_present, 1)); + bool non_f1_traffic_ip_address_r16_present; + HANDLE_CODE(bref.unpack(non_f1_traffic_ip_address_r16_present, 1)); + + if (all_traffic_iab_ip_address_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(all_traffic_iab_ip_address_r16, bref, 1, 8)); + } + if (f1_c_traffic_ip_address_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(f1_c_traffic_ip_address_r16, bref, 1, 8)); + } + if (f1_u_traffic_ip_address_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(f1_u_traffic_ip_address_r16, bref, 1, 8)); + } + if (non_f1_traffic_ip_address_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(non_f1_traffic_ip_address_r16, bref, 1, 8)); + } + + return SRSASN_SUCCESS; +} +void iab_ip_address_and_traffic_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (all_traffic_iab_ip_address_r16.size() > 0) { + j.start_array("all-Traffic-IAB-IP-Address-r16"); + for (const auto& e1 : all_traffic_iab_ip_address_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (f1_c_traffic_ip_address_r16.size() > 0) { + j.start_array("f1-C-Traffic-IP-Address-r16"); + for (const auto& e1 : f1_c_traffic_ip_address_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (f1_u_traffic_ip_address_r16.size() > 0) { + j.start_array("f1-U-Traffic-IP-Address-r16"); + for (const auto& e1 : f1_u_traffic_ip_address_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (non_f1_traffic_ip_address_r16.size() > 0) { + j.start_array("non-F1-Traffic-IP-Address-r16"); + for (const auto& e1 : non_f1_traffic_ip_address_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); +} + +// IAB-IP-AddressNumReq-r16 ::= SEQUENCE +SRSASN_CODE iab_ip_address_num_req_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(all_traffic_num_req_r16_present, 1)); + HANDLE_CODE(bref.pack(f1_c_traffic_num_req_r16_present, 1)); + HANDLE_CODE(bref.pack(f1_u_traffic_num_req_r16_present, 1)); + HANDLE_CODE(bref.pack(non_f1_traffic_num_req_r16_present, 1)); + + if (all_traffic_num_req_r16_present) { + HANDLE_CODE(pack_integer(bref, all_traffic_num_req_r16, (uint8_t)1u, (uint8_t)8u)); + } + if (f1_c_traffic_num_req_r16_present) { + HANDLE_CODE(pack_integer(bref, f1_c_traffic_num_req_r16, (uint8_t)1u, (uint8_t)8u)); + } + if (f1_u_traffic_num_req_r16_present) { + HANDLE_CODE(pack_integer(bref, f1_u_traffic_num_req_r16, (uint8_t)1u, (uint8_t)8u)); + } + if (non_f1_traffic_num_req_r16_present) { + HANDLE_CODE(pack_integer(bref, non_f1_traffic_num_req_r16, (uint8_t)1u, (uint8_t)8u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE iab_ip_address_num_req_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(all_traffic_num_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(f1_c_traffic_num_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(f1_u_traffic_num_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_f1_traffic_num_req_r16_present, 1)); + + if (all_traffic_num_req_r16_present) { + HANDLE_CODE(unpack_integer(all_traffic_num_req_r16, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (f1_c_traffic_num_req_r16_present) { + HANDLE_CODE(unpack_integer(f1_c_traffic_num_req_r16, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (f1_u_traffic_num_req_r16_present) { + HANDLE_CODE(unpack_integer(f1_u_traffic_num_req_r16, bref, (uint8_t)1u, (uint8_t)8u)); + } + if (non_f1_traffic_num_req_r16_present) { + HANDLE_CODE(unpack_integer(non_f1_traffic_num_req_r16, bref, (uint8_t)1u, (uint8_t)8u)); + } + + return SRSASN_SUCCESS; +} +void iab_ip_address_num_req_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (all_traffic_num_req_r16_present) { + j.write_int("all-Traffic-NumReq-r16", all_traffic_num_req_r16); + } + if (f1_c_traffic_num_req_r16_present) { + j.write_int("f1-C-Traffic-NumReq-r16", f1_c_traffic_num_req_r16); + } + if (f1_u_traffic_num_req_r16_present) { + j.write_int("f1-U-Traffic-NumReq-r16", f1_u_traffic_num_req_r16); + } + if (non_f1_traffic_num_req_r16_present) { + j.write_int("non-F1-Traffic-NumReq-r16", non_f1_traffic_num_req_r16); + } + j.end_obj(); +} + +// IAB-IP-AddressPrefixReq-r16 ::= SEQUENCE +SRSASN_CODE iab_ip_address_prefix_req_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(all_traffic_prefix_req_r16_present, 1)); + HANDLE_CODE(bref.pack(f1_c_traffic_prefix_req_r16_present, 1)); + HANDLE_CODE(bref.pack(f1_u_traffic_prefix_req_r16_present, 1)); + HANDLE_CODE(bref.pack(non_f1_traffic_prefix_req_r16_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE iab_ip_address_prefix_req_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(all_traffic_prefix_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(f1_c_traffic_prefix_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(f1_u_traffic_prefix_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_f1_traffic_prefix_req_r16_present, 1)); + + return SRSASN_SUCCESS; +} +void iab_ip_address_prefix_req_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (all_traffic_prefix_req_r16_present) { + j.write_str("all-Traffic-PrefixReq-r16", "true"); + } + if (f1_c_traffic_prefix_req_r16_present) { + j.write_str("f1-C-Traffic-PrefixReq-r16", "true"); + } + if (f1_u_traffic_prefix_req_r16_present) { + j.write_str("f1-U-Traffic-PrefixReq-r16", "true"); + } + if (non_f1_traffic_prefix_req_r16_present) { + j.write_str("non-F1-Traffic-PrefixReq-r16", "true"); + } + j.end_obj(); +} + +// IAB-IP-PrefixAndTraffic-r16 ::= SEQUENCE +SRSASN_CODE iab_ip_prefix_and_traffic_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(all_traffic_iab_ip_address_r16_present, 1)); + HANDLE_CODE(bref.pack(f1_c_traffic_ip_address_r16_present, 1)); + HANDLE_CODE(bref.pack(f1_u_traffic_ip_address_r16_present, 1)); + HANDLE_CODE(bref.pack(non_f1_traffic_ip_address_r16_present, 1)); + + if (all_traffic_iab_ip_address_r16_present) { + HANDLE_CODE(all_traffic_iab_ip_address_r16.pack(bref)); + } + if (f1_c_traffic_ip_address_r16_present) { + HANDLE_CODE(f1_c_traffic_ip_address_r16.pack(bref)); + } + if (f1_u_traffic_ip_address_r16_present) { + HANDLE_CODE(f1_u_traffic_ip_address_r16.pack(bref)); + } + if (non_f1_traffic_ip_address_r16_present) { + HANDLE_CODE(non_f1_traffic_ip_address_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE iab_ip_prefix_and_traffic_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(all_traffic_iab_ip_address_r16_present, 1)); + HANDLE_CODE(bref.unpack(f1_c_traffic_ip_address_r16_present, 1)); + HANDLE_CODE(bref.unpack(f1_u_traffic_ip_address_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_f1_traffic_ip_address_r16_present, 1)); + + if (all_traffic_iab_ip_address_r16_present) { + HANDLE_CODE(all_traffic_iab_ip_address_r16.unpack(bref)); + } + if (f1_c_traffic_ip_address_r16_present) { + HANDLE_CODE(f1_c_traffic_ip_address_r16.unpack(bref)); + } + if (f1_u_traffic_ip_address_r16_present) { + HANDLE_CODE(f1_u_traffic_ip_address_r16.unpack(bref)); + } + if (non_f1_traffic_ip_address_r16_present) { + HANDLE_CODE(non_f1_traffic_ip_address_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void iab_ip_prefix_and_traffic_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (all_traffic_iab_ip_address_r16_present) { + j.write_fieldname("all-Traffic-IAB-IP-Address-r16"); + all_traffic_iab_ip_address_r16.to_json(j); + } + if (f1_c_traffic_ip_address_r16_present) { + j.write_fieldname("f1-C-Traffic-IP-Address-r16"); + f1_c_traffic_ip_address_r16.to_json(j); + } + if (f1_u_traffic_ip_address_r16_present) { + j.write_fieldname("f1-U-Traffic-IP-Address-r16"); + f1_u_traffic_ip_address_r16.to_json(j); + } + if (non_f1_traffic_ip_address_r16_present) { + j.write_fieldname("non-F1-Traffic-IP-Address-r16"); + non_f1_traffic_ip_address_r16.to_json(j); + } + j.end_obj(); +} + +// LocationMeasurementInfo ::= CHOICE +void location_meas_info_c::destroy_() +{ + switch (type_) { + case types::eutra_rstd: + c.destroy(); + break; + case types::nr_prs_meas_r16: + c.destroy(); + break; + default: + break; + } +} +void location_meas_info_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::eutra_rstd: + c.init(); + break; + case types::eutra_fine_timing_detection: + break; + case types::nr_prs_meas_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "location_meas_info_c"); + } +} +location_meas_info_c::location_meas_info_c(const location_meas_info_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::eutra_rstd: + c.init(other.c.get()); + break; + case types::eutra_fine_timing_detection: + break; + case types::nr_prs_meas_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "location_meas_info_c"); + } +} +location_meas_info_c& location_meas_info_c::operator=(const location_meas_info_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::eutra_rstd: + c.set(other.c.get()); + break; + case types::eutra_fine_timing_detection: + break; + case types::nr_prs_meas_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "location_meas_info_c"); + } + + return *this; +} +eutra_rstd_info_list_l& location_meas_info_c::set_eutra_rstd() +{ + set(types::eutra_rstd); + return c.get(); +} +void location_meas_info_c::set_eutra_fine_timing_detection() +{ + set(types::eutra_fine_timing_detection); +} +nr_prs_meas_info_list_r16_l& location_meas_info_c::set_nr_prs_meas_r16() +{ + set(types::nr_prs_meas_r16); + return c.get(); +} +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.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::eutra_fine_timing_detection: + break; + case types::nr_prs_meas_r16: + j.start_array("nr-PRS-Measurement-r16"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + 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.get(), 1, 3)); + break; + case types::eutra_fine_timing_detection: + break; + case types::nr_prs_meas_r16: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 4)); + } 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.get(), bref, 1, 3)); + break; + case types::eutra_fine_timing_detection: + break; + case types::nr_prs_meas_r16: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 4)); + } break; + default: + log_invalid_choice_id(type_, "location_meas_info_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* location_meas_info_c::types_opts::to_string() const +{ + static const char* names[] = {"eutra-RSTD", "eutra-FineTimingDetection", "nr-PRS-Measurement-r16"}; + return convert_enum_idx(names, 3, value, "location_meas_info_c::types"); +} + +// LogMeasReport-r16 ::= SEQUENCE +SRSASN_CODE log_meas_report_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(log_meas_available_r16_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_bt_r16_present, 1)); + HANDLE_CODE(bref.pack(log_meas_available_wlan_r16_present, 1)); + + HANDLE_CODE(absolute_time_stamp_r16.pack(bref)); + HANDLE_CODE(trace_ref_r16.pack(bref)); + HANDLE_CODE(trace_recording_session_ref_r16.pack(bref)); + HANDLE_CODE(tce_id_r16.pack(bref)); + HANDLE_CODE(pack_dyn_seq_of(bref, log_meas_info_list_r16, 1, 520)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE log_meas_report_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(log_meas_available_r16_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_bt_r16_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_available_wlan_r16_present, 1)); + + HANDLE_CODE(absolute_time_stamp_r16.unpack(bref)); + HANDLE_CODE(trace_ref_r16.unpack(bref)); + HANDLE_CODE(trace_recording_session_ref_r16.unpack(bref)); + HANDLE_CODE(tce_id_r16.unpack(bref)); + HANDLE_CODE(unpack_dyn_seq_of(log_meas_info_list_r16, bref, 1, 520)); + + return SRSASN_SUCCESS; +} +void log_meas_report_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("absoluteTimeStamp-r16", absolute_time_stamp_r16.to_string()); + j.write_fieldname("traceReference-r16"); + trace_ref_r16.to_json(j); + j.write_str("traceRecordingSessionRef-r16", trace_recording_session_ref_r16.to_string()); + j.write_str("tce-Id-r16", tce_id_r16.to_string()); + j.start_array("logMeasInfoList-r16"); + for (const auto& e1 : log_meas_info_list_r16) { + e1.to_json(j); + } + j.end_array(); + if (log_meas_available_r16_present) { + j.write_str("logMeasAvailable-r16", "true"); + } + if (log_meas_available_bt_r16_present) { + j.write_str("logMeasAvailableBT-r16", "true"); + } + if (log_meas_available_wlan_r16_present) { + j.write_str("logMeasAvailableWLAN-r16", "true"); + } + j.end_obj(); +} + +// 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)); + } + + 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[2] |= meas_result_for_rssi_r16.is_present(); + group_flags[2] |= location_info_r16.is_present(); + group_flags[2] |= ul_pdcp_delay_value_result_list_r16.is_present(); + group_flags[2] |= meas_results_sl_r16.is_present(); + group_flags[2] |= meas_result_cli_r16.is_present(); + group_flags[3] |= meas_result_rx_tx_time_diff_r17.is_present(); + group_flags[3] |= sl_meas_result_serving_relay_r17.size() > 0; + group_flags[3] |= ul_pdcp_excess_delay_result_list_r17.is_present(); + group_flags[3] |= coarse_location_info_r17.size() > 0; + 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)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(meas_result_for_rssi_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(location_info_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(ul_pdcp_delay_value_result_list_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(meas_results_sl_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(meas_result_cli_r16.is_present(), 1)); + if (meas_result_for_rssi_r16.is_present()) { + HANDLE_CODE(meas_result_for_rssi_r16->pack(bref)); + } + if (location_info_r16.is_present()) { + HANDLE_CODE(location_info_r16->pack(bref)); + } + if (ul_pdcp_delay_value_result_list_r16.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *ul_pdcp_delay_value_result_list_r16, 1, 29)); + } + if (meas_results_sl_r16.is_present()) { + HANDLE_CODE(meas_results_sl_r16->pack(bref)); + } + if (meas_result_cli_r16.is_present()) { + HANDLE_CODE(meas_result_cli_r16->pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(meas_result_rx_tx_time_diff_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(sl_meas_result_serving_relay_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(ul_pdcp_excess_delay_result_list_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(coarse_location_info_r17.size() > 0, 1)); + if (meas_result_rx_tx_time_diff_r17.is_present()) { + HANDLE_CODE(meas_result_rx_tx_time_diff_r17->pack(bref)); + } + if (sl_meas_result_serving_relay_r17.size() > 0) { + HANDLE_CODE(sl_meas_result_serving_relay_r17.pack(bref)); + } + if (ul_pdcp_excess_delay_result_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *ul_pdcp_excess_delay_result_list_r17, 1, 29)); + } + if (coarse_location_info_r17.size() > 0) { + HANDLE_CODE(coarse_location_info_r17.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)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(meas_result_serv_freq_list_eutra_scg, bref); + unpack_presence_flag(meas_result_serv_freq_list_nr_scg, bref); + unpack_presence_flag(meas_result_sftd_eutra, bref); + unpack_presence_flag(meas_result_sftd_nr, bref); + 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); + + unpack_presence_flag(meas_result_cell_list_sftd_nr, bref); + if (meas_result_cell_list_sftd_nr.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*meas_result_cell_list_sftd_nr, bref, 1, 3)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(meas_result_for_rssi_r16, bref); + unpack_presence_flag(location_info_r16, bref); + unpack_presence_flag(ul_pdcp_delay_value_result_list_r16, bref); + unpack_presence_flag(meas_results_sl_r16, bref); + unpack_presence_flag(meas_result_cli_r16, bref); + if (meas_result_for_rssi_r16.is_present()) { + HANDLE_CODE(meas_result_for_rssi_r16->unpack(bref)); + } + if (location_info_r16.is_present()) { + HANDLE_CODE(location_info_r16->unpack(bref)); + } + if (ul_pdcp_delay_value_result_list_r16.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*ul_pdcp_delay_value_result_list_r16, bref, 1, 29)); + } + if (meas_results_sl_r16.is_present()) { + HANDLE_CODE(meas_results_sl_r16->unpack(bref)); + } + if (meas_result_cli_r16.is_present()) { + HANDLE_CODE(meas_result_cli_r16->unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(meas_result_rx_tx_time_diff_r17, bref); + bool sl_meas_result_serving_relay_r17_present; + HANDLE_CODE(bref.unpack(sl_meas_result_serving_relay_r17_present, 1)); + unpack_presence_flag(ul_pdcp_excess_delay_result_list_r17, bref); + bool coarse_location_info_r17_present; + HANDLE_CODE(bref.unpack(coarse_location_info_r17_present, 1)); + if (meas_result_rx_tx_time_diff_r17.is_present()) { + HANDLE_CODE(meas_result_rx_tx_time_diff_r17->unpack(bref)); + } + if (sl_meas_result_serving_relay_r17_present) { + HANDLE_CODE(sl_meas_result_serving_relay_r17.unpack(bref)); + } + if (ul_pdcp_excess_delay_result_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*ul_pdcp_excess_delay_result_list_r17, bref, 1, 29)); + } + if (coarse_location_info_r17_present) { + HANDLE_CODE(coarse_location_info_r17.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); + } + 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(); + } + if (meas_result_for_rssi_r16.is_present()) { + j.write_fieldname("measResultForRSSI-r16"); + meas_result_for_rssi_r16->to_json(j); + } + if (location_info_r16.is_present()) { + j.write_fieldname("locationInfo-r16"); + location_info_r16->to_json(j); + } + if (ul_pdcp_delay_value_result_list_r16.is_present()) { + j.start_array("ul-PDCP-DelayValueResultList-r16"); + for (const auto& e1 : *ul_pdcp_delay_value_result_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_results_sl_r16.is_present()) { + j.write_fieldname("measResultsSL-r16"); + meas_results_sl_r16->to_json(j); + } + if (meas_result_cli_r16.is_present()) { + j.write_fieldname("measResultCLI-r16"); + meas_result_cli_r16->to_json(j); + } + if (meas_result_rx_tx_time_diff_r17.is_present()) { + j.write_fieldname("measResultRxTxTimeDiff-r17"); + meas_result_rx_tx_time_diff_r17->to_json(j); + } + if (sl_meas_result_serving_relay_r17.size() > 0) { + j.write_str("sl-MeasResultServingRelay-r17", sl_meas_result_serving_relay_r17.to_string()); + } + if (ul_pdcp_excess_delay_result_list_r17.is_present()) { + j.start_array("ul-PDCP-ExcessDelayResultList-r17"); + for (const auto& e1 : *ul_pdcp_excess_delay_result_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (coarse_location_info_r17.size() > 0) { + j.write_str("coarseLocationInfo-r17", coarse_location_info_r17.to_string()); + } + } + j.end_obj(); +} + +void meas_results_s::meas_result_neigh_cells_c_::destroy_() +{ + switch (type_) { + case types::meas_result_list_nr: + c.destroy(); + break; + case types::meas_result_list_eutra: + c.destroy(); + break; + case types::meas_result_list_utra_fdd_r16: + c.destroy(); + break; + case types::sl_meas_results_cand_relay_r17: + c.destroy(); + break; + default: + break; + } +} +void meas_results_s::meas_result_neigh_cells_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::meas_result_list_nr: + c.init(); + break; + case types::meas_result_list_eutra: + c.init(); + break; + case types::meas_result_list_utra_fdd_r16: + c.init(); + break; + case types::sl_meas_results_cand_relay_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + } +} +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::meas_result_list_nr: + c.init(other.c.get()); + break; + case types::meas_result_list_eutra: + c.init(other.c.get()); + break; + case types::meas_result_list_utra_fdd_r16: + c.init(other.c.get()); + break; + case types::sl_meas_results_cand_relay_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_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) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::meas_result_list_nr: + c.set(other.c.get()); + break; + case types::meas_result_list_eutra: + c.set(other.c.get()); + break; + case types::meas_result_list_utra_fdd_r16: + c.set(other.c.get()); + break; + case types::sl_meas_results_cand_relay_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + } + + return *this; +} +meas_result_list_nr_l& meas_results_s::meas_result_neigh_cells_c_::set_meas_result_list_nr() +{ + set(types::meas_result_list_nr); + return c.get(); +} +meas_result_list_eutra_l& meas_results_s::meas_result_neigh_cells_c_::set_meas_result_list_eutra() +{ + set(types::meas_result_list_eutra); + return c.get(); +} +meas_result_list_utra_fdd_r16_l& meas_results_s::meas_result_neigh_cells_c_::set_meas_result_list_utra_fdd_r16() +{ + set(types::meas_result_list_utra_fdd_r16); + return c.get(); +} +dyn_octstring& meas_results_s::meas_result_neigh_cells_c_::set_sl_meas_results_cand_relay_r17() +{ + set(types::sl_meas_results_cand_relay_r17); + return c.get(); +} +void meas_results_s::meas_result_neigh_cells_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(); + break; + case types::meas_result_list_eutra: + j.start_array("measResultListEUTRA"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::meas_result_list_utra_fdd_r16: + j.start_array("measResultListUTRA-FDD-r16"); + for (const auto& e1 : c.get()) { + e1.to_json(j); + } + j.end_array(); + break; + case types::sl_meas_results_cand_relay_r17: + j.write_str("sl-MeasResultsCandRelay-r17", c.get().to_string()); + break; + default: + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + } + j.end_obj(); +} +SRSASN_CODE meas_results_s::meas_result_neigh_cells_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)); + 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; + case types::meas_result_list_utra_fdd_r16: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(pack_dyn_seq_of(bref, c.get(), 1, 8)); + } break; + case types::sl_meas_results_cand_relay_r17: { + varlength_field_pack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().pack(bref)); + } break; + default: + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::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; + case types::meas_result_list_utra_fdd_r16: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(unpack_dyn_seq_of(c.get(), bref, 1, 8)); + } break; + case types::sl_meas_results_cand_relay_r17: { + varlength_field_unpack_guard varlen_scope(bref, false); + HANDLE_CODE(c.get().unpack(bref)); + } break; + default: + log_invalid_choice_id(type_, "meas_results_s::meas_result_neigh_cells_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* meas_results_s::meas_result_neigh_cells_c_::types_opts::to_string() const +{ + static const char* names[] = { + "measResultListNR", "measResultListEUTRA", "measResultListUTRA-FDD-r16", "sl-MeasResultsCandRelay-r17"}; + return convert_enum_idx(names, 4, value, "meas_results_s::meas_result_neigh_cells_c_::types"); +} + +// PosSIB-ReqInfo-r16 ::= SEQUENCE +SRSASN_CODE pos_sib_req_info_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(gnss_id_r16_present, 1)); + HANDLE_CODE(bref.pack(sbas_id_r16_present, 1)); + + if (gnss_id_r16_present) { + HANDLE_CODE(gnss_id_r16.pack(bref)); + } + if (sbas_id_r16_present) { + HANDLE_CODE(sbas_id_r16.pack(bref)); + } + HANDLE_CODE(pos_sib_type_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE pos_sib_req_info_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(gnss_id_r16_present, 1)); + HANDLE_CODE(bref.unpack(sbas_id_r16_present, 1)); + + if (gnss_id_r16_present) { + HANDLE_CODE(gnss_id_r16.unpack(bref)); + } + if (sbas_id_r16_present) { + HANDLE_CODE(sbas_id_r16.unpack(bref)); + } + HANDLE_CODE(pos_sib_type_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void pos_sib_req_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (gnss_id_r16_present) { + j.write_fieldname("gnss-id-r16"); + gnss_id_r16.to_json(j); + } + if (sbas_id_r16_present) { + j.write_fieldname("sbas-id-r16"); + sbas_id_r16.to_json(j); + } + j.write_str("posSibType-r16", pos_sib_type_r16.to_string()); + j.end_obj(); +} + +const char* pos_sib_req_info_r16_s::pos_sib_type_r16_opts::to_string() const +{ + static const char* names[] = { + "posSibType1-1", "posSibType1-2", "posSibType1-3", "posSibType1-4", + "posSibType1-5", "posSibType1-6", "posSibType1-7", "posSibType1-8", + "posSibType2-1", "posSibType2-2", "posSibType2-3", "posSibType2-4", + "posSibType2-5", "posSibType2-6", "posSibType2-7", "posSibType2-8", + "posSibType2-9", "posSibType2-10", "posSibType2-11", "posSibType2-12", + "posSibType2-13", "posSibType2-14", "posSibType2-15", "posSibType2-16", + "posSibType2-17", "posSibType2-18", "posSibType2-19", "posSibType2-20", + "posSibType2-21", "posSibType2-22", "posSibType2-23", "posSibType3-1", + "posSibType4-1", "posSibType5-1", "posSibType6-1", "posSibType6-2", + "posSibType6-3", "posSibType1-9-v1710", "posSibType1-10-v1710", "posSibType2-24-v1710", + "posSibType2-25-v1710", "posSibType6-4-v1710", "posSibType6-5-v1710", "posSibType6-6-v1710"}; + return convert_enum_idx(names, 44, value, "pos_sib_req_info_r16_s::pos_sib_type_r16_e_"); +} + +// RLF-Report-r16 ::= CHOICE +void rlf_report_r16_c::destroy_() +{ + switch (type_) { + case types::nr_rlf_report_r16: + c.destroy(); + break; + case types::eutra_rlf_report_r16: + c.destroy(); + break; + default: + break; + } +} +void rlf_report_r16_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nr_rlf_report_r16: + c.init(); + break; + case types::eutra_rlf_report_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c"); + } +} +rlf_report_r16_c::rlf_report_r16_c(const rlf_report_r16_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::nr_rlf_report_r16: + c.init(other.c.get()); + break; + case types::eutra_rlf_report_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c"); + } +} +rlf_report_r16_c& rlf_report_r16_c::operator=(const rlf_report_r16_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nr_rlf_report_r16: + c.set(other.c.get()); + break; + case types::eutra_rlf_report_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c"); + } + + return *this; +} +rlf_report_r16_c::nr_rlf_report_r16_s_& rlf_report_r16_c::set_nr_rlf_report_r16() +{ + set(types::nr_rlf_report_r16); + return c.get(); +} +rlf_report_r16_c::eutra_rlf_report_r16_s_& rlf_report_r16_c::set_eutra_rlf_report_r16() +{ + set(types::eutra_rlf_report_r16); + return c.get(); +} +void rlf_report_r16_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nr_rlf_report_r16: + j.write_fieldname("nr-RLF-Report-r16"); + c.get().to_json(j); + break; + case types::eutra_rlf_report_r16: + j.write_fieldname("eutra-RLF-Report-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c"); + } + j.end_obj(); +} +SRSASN_CODE rlf_report_r16_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::nr_rlf_report_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eutra_rlf_report_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_r16_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::nr_rlf_report_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eutra_rlf_report_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16_present, 1)); + HANDLE_CODE(bref.pack(prev_pcell_id_r16_present, 1)); + HANDLE_CODE(bref.pack(reconnect_cell_id_r16_present, 1)); + HANDLE_CODE(bref.pack(time_until_reconn_r16_present, 1)); + HANDLE_CODE(bref.pack(reest_cell_id_r16_present, 1)); + HANDLE_CODE(bref.pack(time_conn_fail_r16_present, 1)); + HANDLE_CODE(bref.pack(location_info_r16_present, 1)); + HANDLE_CODE(bref.pack(no_suitable_cell_found_r16_present, 1)); + HANDLE_CODE(bref.pack(ra_info_common_r16_present, 1)); + + HANDLE_CODE(meas_result_last_serv_cell_r16.pack(bref)); + if (meas_result_neigh_cells_r16_present) { + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16.meas_result_list_nr_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_neigh_cells_r16.meas_result_list_eutra_r16.size() > 0, 1)); + if (meas_result_neigh_cells_r16.meas_result_list_nr_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r16.meas_result_list_nr_r16, 1, 8)); + } + if (meas_result_neigh_cells_r16.meas_result_list_eutra_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_neigh_cells_r16.meas_result_list_eutra_r16, 1, 8)); + } + } + HANDLE_CODE(pack_integer(bref, c_rnti_r16, (uint32_t)0u, (uint32_t)65535u)); + if (prev_pcell_id_r16_present) { + HANDLE_CODE(prev_pcell_id_r16.pack(bref)); + } + HANDLE_CODE(failed_pcell_id_r16.pack(bref)); + if (reconnect_cell_id_r16_present) { + HANDLE_CODE(reconnect_cell_id_r16.pack(bref)); + } + if (time_until_reconn_r16_present) { + HANDLE_CODE(pack_integer(bref, time_until_reconn_r16, (uint32_t)0u, (uint32_t)172800u)); + } + if (reest_cell_id_r16_present) { + HANDLE_CODE(reest_cell_id_r16.pack(bref)); + } + if (time_conn_fail_r16_present) { + HANDLE_CODE(pack_integer(bref, time_conn_fail_r16, (uint16_t)0u, (uint16_t)1023u)); + } + HANDLE_CODE(pack_integer(bref, time_since_fail_r16, (uint32_t)0u, (uint32_t)172800u)); + HANDLE_CODE(conn_fail_type_r16.pack(bref)); + HANDLE_CODE(rlf_cause_r16.pack(bref)); + if (location_info_r16_present) { + HANDLE_CODE(location_info_r16.pack(bref)); + } + if (ra_info_common_r16_present) { + HANDLE_CODE(ra_info_common_r16.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= csi_rs_rlm_cfg_bitmap_v1650_present; + group_flags[1] |= last_ho_type_r17_present; + group_flags[1] |= time_conn_source_daps_fail_r17_present; + group_flags[1] |= time_since_cho_recfg_r17_present; + group_flags[1] |= cho_cell_id_r17.is_present(); + group_flags[1] |= cho_candidate_cell_list_r17.is_present(); + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(csi_rs_rlm_cfg_bitmap_v1650_present, 1)); + if (csi_rs_rlm_cfg_bitmap_v1650_present) { + HANDLE_CODE(csi_rs_rlm_cfg_bitmap_v1650.pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(last_ho_type_r17_present, 1)); + HANDLE_CODE(bref.pack(time_conn_source_daps_fail_r17_present, 1)); + HANDLE_CODE(bref.pack(time_since_cho_recfg_r17_present, 1)); + HANDLE_CODE(bref.pack(cho_cell_id_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(cho_candidate_cell_list_r17.is_present(), 1)); + if (last_ho_type_r17_present) { + HANDLE_CODE(last_ho_type_r17.pack(bref)); + } + if (time_conn_source_daps_fail_r17_present) { + HANDLE_CODE(pack_integer(bref, time_conn_source_daps_fail_r17, (uint16_t)0u, (uint16_t)1023u)); + } + if (time_since_cho_recfg_r17_present) { + HANDLE_CODE(pack_integer(bref, time_since_cho_recfg_r17, (uint16_t)0u, (uint16_t)1023u)); + } + if (cho_cell_id_r17.is_present()) { + HANDLE_CODE(cho_cell_id_r17->pack(bref)); + } + if (cho_candidate_cell_list_r17.is_present()) { + HANDLE_CODE(pack_dyn_seq_of(bref, *cho_candidate_cell_list_r17, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(meas_result_neigh_cells_r16_present, 1)); + HANDLE_CODE(bref.unpack(prev_pcell_id_r16_present, 1)); + HANDLE_CODE(bref.unpack(reconnect_cell_id_r16_present, 1)); + HANDLE_CODE(bref.unpack(time_until_reconn_r16_present, 1)); + HANDLE_CODE(bref.unpack(reest_cell_id_r16_present, 1)); + HANDLE_CODE(bref.unpack(time_conn_fail_r16_present, 1)); + HANDLE_CODE(bref.unpack(location_info_r16_present, 1)); + HANDLE_CODE(bref.unpack(no_suitable_cell_found_r16_present, 1)); + HANDLE_CODE(bref.unpack(ra_info_common_r16_present, 1)); + + HANDLE_CODE(meas_result_last_serv_cell_r16.unpack(bref)); + if (meas_result_neigh_cells_r16_present) { + bool meas_result_list_nr_r16_present; + HANDLE_CODE(bref.unpack(meas_result_list_nr_r16_present, 1)); + bool meas_result_list_eutra_r16_present; + HANDLE_CODE(bref.unpack(meas_result_list_eutra_r16_present, 1)); + if (meas_result_list_nr_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r16.meas_result_list_nr_r16, bref, 1, 8)); + } + if (meas_result_list_eutra_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(meas_result_neigh_cells_r16.meas_result_list_eutra_r16, bref, 1, 8)); + } + } + HANDLE_CODE(unpack_integer(c_rnti_r16, bref, (uint32_t)0u, (uint32_t)65535u)); + if (prev_pcell_id_r16_present) { + HANDLE_CODE(prev_pcell_id_r16.unpack(bref)); + } + HANDLE_CODE(failed_pcell_id_r16.unpack(bref)); + if (reconnect_cell_id_r16_present) { + HANDLE_CODE(reconnect_cell_id_r16.unpack(bref)); + } + if (time_until_reconn_r16_present) { + HANDLE_CODE(unpack_integer(time_until_reconn_r16, bref, (uint32_t)0u, (uint32_t)172800u)); + } + if (reest_cell_id_r16_present) { + HANDLE_CODE(reest_cell_id_r16.unpack(bref)); + } + if (time_conn_fail_r16_present) { + HANDLE_CODE(unpack_integer(time_conn_fail_r16, bref, (uint16_t)0u, (uint16_t)1023u)); + } + HANDLE_CODE(unpack_integer(time_since_fail_r16, bref, (uint32_t)0u, (uint32_t)172800u)); + HANDLE_CODE(conn_fail_type_r16.unpack(bref)); + HANDLE_CODE(rlf_cause_r16.unpack(bref)); + if (location_info_r16_present) { + HANDLE_CODE(location_info_r16.unpack(bref)); + } + if (ra_info_common_r16_present) { + HANDLE_CODE(ra_info_common_r16.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(csi_rs_rlm_cfg_bitmap_v1650_present, 1)); + if (csi_rs_rlm_cfg_bitmap_v1650_present) { + HANDLE_CODE(csi_rs_rlm_cfg_bitmap_v1650.unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(last_ho_type_r17_present, 1)); + HANDLE_CODE(bref.unpack(time_conn_source_daps_fail_r17_present, 1)); + HANDLE_CODE(bref.unpack(time_since_cho_recfg_r17_present, 1)); + unpack_presence_flag(cho_cell_id_r17, bref); + unpack_presence_flag(cho_candidate_cell_list_r17, bref); + if (last_ho_type_r17_present) { + HANDLE_CODE(last_ho_type_r17.unpack(bref)); + } + if (time_conn_source_daps_fail_r17_present) { + HANDLE_CODE(unpack_integer(time_conn_source_daps_fail_r17, bref, (uint16_t)0u, (uint16_t)1023u)); + } + if (time_since_cho_recfg_r17_present) { + HANDLE_CODE(unpack_integer(time_since_cho_recfg_r17, bref, (uint16_t)0u, (uint16_t)1023u)); + } + if (cho_cell_id_r17.is_present()) { + HANDLE_CODE(cho_cell_id_r17->unpack(bref)); + } + if (cho_candidate_cell_list_r17.is_present()) { + HANDLE_CODE(unpack_dyn_seq_of(*cho_candidate_cell_list_r17, bref, 1, 8)); + } + } + } + return SRSASN_SUCCESS; +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measResultLastServCell-r16"); + meas_result_last_serv_cell_r16.to_json(j); + if (meas_result_neigh_cells_r16_present) { + j.write_fieldname("measResultNeighCells-r16"); + j.start_obj(); + if (meas_result_neigh_cells_r16.meas_result_list_nr_r16.size() > 0) { + j.start_array("measResultListNR-r16"); + for (const auto& e1 : meas_result_neigh_cells_r16.meas_result_list_nr_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_neigh_cells_r16.meas_result_list_eutra_r16.size() > 0) { + j.start_array("measResultListEUTRA-r16"); + for (const auto& e1 : meas_result_neigh_cells_r16.meas_result_list_eutra_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + j.write_int("c-RNTI-r16", c_rnti_r16); + if (prev_pcell_id_r16_present) { + j.write_fieldname("previousPCellId-r16"); + prev_pcell_id_r16.to_json(j); + } + j.write_fieldname("failedPCellId-r16"); + failed_pcell_id_r16.to_json(j); + if (reconnect_cell_id_r16_present) { + j.write_fieldname("reconnectCellId-r16"); + reconnect_cell_id_r16.to_json(j); + } + if (time_until_reconn_r16_present) { + j.write_int("timeUntilReconnection-r16", time_until_reconn_r16); + } + if (reest_cell_id_r16_present) { + j.write_fieldname("reestablishmentCellId-r16"); + reest_cell_id_r16.to_json(j); + } + if (time_conn_fail_r16_present) { + j.write_int("timeConnFailure-r16", time_conn_fail_r16); + } + j.write_int("timeSinceFailure-r16", time_since_fail_r16); + j.write_str("connectionFailureType-r16", conn_fail_type_r16.to_string()); + j.write_str("rlf-Cause-r16", rlf_cause_r16.to_string()); + if (location_info_r16_present) { + j.write_fieldname("locationInfo-r16"); + location_info_r16.to_json(j); + } + if (no_suitable_cell_found_r16_present) { + j.write_str("noSuitableCellFound-r16", "true"); + } + if (ra_info_common_r16_present) { + j.write_fieldname("ra-InformationCommon-r16"); + ra_info_common_r16.to_json(j); + } + if (ext) { + if (csi_rs_rlm_cfg_bitmap_v1650_present) { + j.write_str("csi-rsRLMConfigBitmap-v1650", csi_rs_rlm_cfg_bitmap_v1650.to_string()); + } + if (last_ho_type_r17_present) { + j.write_str("lastHO-Type-r17", last_ho_type_r17.to_string()); + } + if (time_conn_source_daps_fail_r17_present) { + j.write_int("timeConnSourceDAPS-Failure-r17", time_conn_source_daps_fail_r17); + } + if (time_since_cho_recfg_r17_present) { + j.write_int("timeSinceCHO-Reconfig-r17", time_since_cho_recfg_r17); + } + if (cho_cell_id_r17.is_present()) { + j.write_fieldname("choCellId-r17"); + cho_cell_id_r17->to_json(j); + } + if (cho_candidate_cell_list_r17.is_present()) { + j.start_array("choCandidateCellList-r17"); + for (const auto& e1 : *cho_candidate_cell_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + } + j.end_obj(); +} + +void rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::destroy_() +{ + switch (type_) { + case types::nr_prev_cell_r16: + c.destroy(); + break; + case types::eutra_prev_cell_r16: + c.destroy(); + break; + default: + break; + } +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nr_prev_cell_r16: + c.init(); + break; + case types::eutra_prev_cell_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_"); + } +} +rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::prev_pcell_id_r16_c_( + const rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::nr_prev_cell_r16: + c.init(other.c.get()); + break; + case types::eutra_prev_cell_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_"); + } +} +rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_& +rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::operator=( + const rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nr_prev_cell_r16: + c.set(other.c.get()); + break; + case types::eutra_prev_cell_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_"); + } + + return *this; +} +cgi_info_logging_r16_s& rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::set_nr_prev_cell_r16() +{ + set(types::nr_prev_cell_r16); + return c.get(); +} +cgi_info_eutra_logging_s& rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::set_eutra_prev_cell_r16() +{ + set(types::eutra_prev_cell_r16); + return c.get(); +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nr_prev_cell_r16: + j.write_fieldname("nrPreviousCell-r16"); + c.get().to_json(j); + break; + case types::eutra_prev_cell_r16: + j.write_fieldname("eutraPreviousCell-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::nr_prev_cell_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eutra_prev_cell_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::nr_prev_cell_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eutra_prev_cell_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"nrPreviousCell-r16", "eutraPreviousCell-r16"}; + return convert_enum_idx(names, 2, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::prev_pcell_id_r16_c_::types"); +} + +void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::destroy_() +{ + switch (type_) { + case types::nr_failed_pcell_id_r16: + c.destroy(); + break; + case types::eutra_failed_pcell_id_r16: + c.destroy(); + break; + default: + break; + } +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nr_failed_pcell_id_r16: + c.init(); + break; + case types::eutra_failed_pcell_id_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_"); + } +} +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::failed_pcell_id_r16_c_( + const rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::nr_failed_pcell_id_r16: + c.init(other.c.get()); + break; + case types::eutra_failed_pcell_id_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_"); + } +} +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_& +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::operator=( + const rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nr_failed_pcell_id_r16: + c.set(other.c.get()); + break; + case types::eutra_failed_pcell_id_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_"); + } + + return *this; +} +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_& +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::set_nr_failed_pcell_id_r16() +{ + set(types::nr_failed_pcell_id_r16); + return c.get(); +} +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_& +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::set_eutra_failed_pcell_id_r16() +{ + set(types::eutra_failed_pcell_id_r16); + return c.get(); +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nr_failed_pcell_id_r16: + j.write_fieldname("nrFailedPCellId-r16"); + c.get().to_json(j); + break; + case types::eutra_failed_pcell_id_r16: + j.write_fieldname("eutraFailedPCellId-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::nr_failed_pcell_id_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eutra_failed_pcell_id_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::nr_failed_pcell_id_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eutra_failed_pcell_id_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::destroy_() +{ + switch (type_) { + case types::cell_global_id_r16: + c.destroy(); + break; + case types::pci_arfcn_r16: + c.destroy(); + break; + default: + break; + } +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_global_id_r16: + c.init(); + break; + case types::pci_arfcn_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_"); + } +} +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_( + const rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_global_id_r16: + c.init(other.c.get()); + break; + case types::pci_arfcn_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_"); + } +} +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_& +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::operator=( + const rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_global_id_r16: + c.set(other.c.get()); + break; + case types::pci_arfcn_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_"); + } + + return *this; +} +cgi_info_logging_r16_s& +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::set_cell_global_id_r16() +{ + set(types::cell_global_id_r16); + return c.get(); +} +pci_arfcn_nr_r16_s& +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::set_pci_arfcn_r16() +{ + set(types::pci_arfcn_r16); + return c.get(); +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::to_json( + json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_global_id_r16: + j.write_fieldname("cellGlobalId-r16"); + c.get().to_json(j); + break; + case types::pci_arfcn_r16: + j.write_fieldname("pci-arfcn-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id( + type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cell_global_id_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_arfcn_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id( + type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cell_global_id_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_arfcn_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id( + type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"cellGlobalId-r16", "pci-arfcn-r16"}; + return convert_enum_idx( + names, + 2, + value, + "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::nr_failed_pcell_id_r16_c_::types"); +} + +void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::destroy_() +{ + switch (type_) { + case types::cell_global_id_r16: + c.destroy(); + break; + case types::pci_arfcn_r16: + c.destroy(); + break; + default: + break; + } +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_global_id_r16: + c.init(); + break; + case types::pci_arfcn_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_"); + } +} +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_:: + eutra_failed_pcell_id_r16_c_( + const rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_global_id_r16: + c.init(other.c.get()); + break; + case types::pci_arfcn_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_"); + } +} +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_& +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::operator=( + const rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_global_id_r16: + c.set(other.c.get()); + break; + case types::pci_arfcn_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_"); + } + + return *this; +} +cgi_info_eutra_logging_s& +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::set_cell_global_id_r16() +{ + set(types::cell_global_id_r16); + return c.get(); +} +pci_arfcn_eutra_r16_s& +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::set_pci_arfcn_r16() +{ + set(types::pci_arfcn_r16); + return c.get(); +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::to_json( + json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_global_id_r16: + j.write_fieldname("cellGlobalId-r16"); + c.get().to_json(j); + break; + case types::pci_arfcn_r16: + j.write_fieldname("pci-arfcn-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id( + type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cell_global_id_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_arfcn_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id( + type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cell_global_id_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_arfcn_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id( + type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* +rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::types_opts::to_string() + const +{ + static const char* names[] = {"cellGlobalId-r16", "pci-arfcn-r16"}; + return convert_enum_idx( + names, + 2, + value, + "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::eutra_failed_pcell_id_r16_c_::types"); +} + +const char* rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"nrFailedPCellId-r16", "eutraFailedPCellId-r16"}; + return convert_enum_idx(names, 2, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::failed_pcell_id_r16_c_::types"); +} + +void rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::destroy_() +{ + switch (type_) { + case types::nr_reconnect_cell_id_r16: + c.destroy(); + break; + case types::eutra_reconnect_cell_id_r16: + c.destroy(); + break; + default: + break; + } +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::nr_reconnect_cell_id_r16: + c.init(); + break; + case types::eutra_reconnect_cell_id_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_"); + } +} +rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::reconnect_cell_id_r16_c_( + const rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::nr_reconnect_cell_id_r16: + c.init(other.c.get()); + break; + case types::eutra_reconnect_cell_id_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_"); + } +} +rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_& +rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::operator=( + const rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::nr_reconnect_cell_id_r16: + c.set(other.c.get()); + break; + case types::eutra_reconnect_cell_id_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_"); + } + + return *this; +} +cgi_info_logging_r16_s& rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::set_nr_reconnect_cell_id_r16() +{ + set(types::nr_reconnect_cell_id_r16); + return c.get(); +} +cgi_info_eutra_logging_s& +rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::set_eutra_reconnect_cell_id_r16() +{ + set(types::eutra_reconnect_cell_id_r16); + return c.get(); +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::nr_reconnect_cell_id_r16: + j.write_fieldname("nrReconnectCellId-r16"); + c.get().to_json(j); + break; + case types::eutra_reconnect_cell_id_r16: + j.write_fieldname("eutraReconnectCellId-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::nr_reconnect_cell_id_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eutra_reconnect_cell_id_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::nr_reconnect_cell_id_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eutra_reconnect_cell_id_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"nrReconnectCellId-r16", "eutraReconnectCellId-r16"}; + return convert_enum_idx(names, 2, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::reconnect_cell_id_r16_c_::types"); +} + +const char* rlf_report_r16_c::nr_rlf_report_r16_s_::conn_fail_type_r16_opts::to_string() const +{ + static const char* names[] = {"rlf", "hof"}; + return convert_enum_idx(names, 2, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::conn_fail_type_r16_e_"); +} + +const char* rlf_report_r16_c::nr_rlf_report_r16_s_::rlf_cause_r16_opts::to_string() const +{ + static const char* names[] = {"t310-Expiry", + "randomAccessProblem", + "rlc-MaxNumRetx", + "beamFailureRecoveryFailure", + "lbtFailure-r16", + "bh-rlfRecoveryFailure", + "t312-expiry-r17", + "spare1"}; + return convert_enum_idx(names, 8, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::rlf_cause_r16_e_"); +} +uint16_t rlf_report_r16_c::nr_rlf_report_r16_s_::rlf_cause_r16_opts::to_number() const +{ + switch (value) { + case t310_expiry: + return 310; + case t312_expiry_r17: + return 312; + default: + invalid_enum_number(value, "rlf_report_r16_c::nr_rlf_report_r16_s_::rlf_cause_r16_e_"); + } + return 0; +} + +const char* rlf_report_r16_c::nr_rlf_report_r16_s_::last_ho_type_r17_opts::to_string() const +{ + static const char* names[] = {"cho", "daps", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::last_ho_type_r17_e_"); +} + +void rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::destroy_() +{ + switch (type_) { + case types::cell_global_id_r17: + c.destroy(); + break; + case types::pci_arfcn_r17: + c.destroy(); + break; + default: + break; + } +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::cell_global_id_r17: + c.init(); + break; + case types::pci_arfcn_r17: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_"); + } +} +rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::cho_cell_id_r17_c_( + const rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::cell_global_id_r17: + c.init(other.c.get()); + break; + case types::pci_arfcn_r17: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_"); + } +} +rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_& +rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::operator=( + const rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::cell_global_id_r17: + c.set(other.c.get()); + break; + case types::pci_arfcn_r17: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_"); + } + + return *this; +} +cgi_info_logging_r16_s& rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::set_cell_global_id_r17() +{ + set(types::cell_global_id_r17); + return c.get(); +} +pci_arfcn_nr_r16_s& rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::set_pci_arfcn_r17() +{ + set(types::pci_arfcn_r17); + return c.get(); +} +void rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cell_global_id_r17: + j.write_fieldname("cellGlobalId-r17"); + c.get().to_json(j); + break; + case types::pci_arfcn_r17: + j.write_fieldname("pci-arfcn-r17"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_"); + } + j.end_obj(); +} +SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cell_global_id_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::pci_arfcn_r17: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cell_global_id_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::pci_arfcn_r17: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::types_opts::to_string() const +{ + static const char* names[] = {"cellGlobalId-r17", "pci-arfcn-r17"}; + return convert_enum_idx(names, 2, value, "rlf_report_r16_c::nr_rlf_report_r16_s_::cho_cell_id_r17_c_::types"); +} + +SRSASN_CODE rlf_report_r16_c::eutra_rlf_report_r16_s_::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(failed_pcell_id_eutra.pack(bref)); + HANDLE_CODE(meas_result_rlf_report_eutra_r16.pack(bref)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= meas_result_rlf_report_eutra_v1690.size() > 0; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(meas_result_rlf_report_eutra_v1690.size() > 0, 1)); + if (meas_result_rlf_report_eutra_v1690.size() > 0) { + HANDLE_CODE(meas_result_rlf_report_eutra_v1690.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rlf_report_r16_c::eutra_rlf_report_r16_s_::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(failed_pcell_id_eutra.unpack(bref)); + HANDLE_CODE(meas_result_rlf_report_eutra_r16.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_result_rlf_report_eutra_v1690_present; + HANDLE_CODE(bref.unpack(meas_result_rlf_report_eutra_v1690_present, 1)); + if (meas_result_rlf_report_eutra_v1690_present) { + HANDLE_CODE(meas_result_rlf_report_eutra_v1690.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void rlf_report_r16_c::eutra_rlf_report_r16_s_::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("failedPCellId-EUTRA"); + failed_pcell_id_eutra.to_json(j); + j.write_str("measResult-RLF-Report-EUTRA-r16", meas_result_rlf_report_eutra_r16.to_string()); + if (ext) { + if (meas_result_rlf_report_eutra_v1690.size() > 0) { + j.write_str("measResult-RLF-Report-EUTRA-v1690", meas_result_rlf_report_eutra_v1690.to_string()); + } + } + j.end_obj(); +} + +const char* rlf_report_r16_c::types_opts::to_string() const +{ + static const char* names[] = {"nr-RLF-Report-r16", "eutra-RLF-Report-r16"}; + return convert_enum_idx(names, 2, value, "rlf_report_r16_c::types"); +} + +// RRCReconfigurationComplete-v1530-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_complete_v1530_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_tx_direct_current_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ul_tx_direct_current_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_list, 1, 32)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_complete_v1530_ies_s::unpack(cbit_ref& bref) +{ + bool ul_tx_direct_current_list_present; + 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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_recfg_complete_v1530_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_tx_direct_current_list.size() > 0) { + 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"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// RRCReestablishmentComplete-v1610-IEs ::= SEQUENCE +SRSASN_CODE rrc_reest_complete_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_meass_available_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_meass_available_r16_present) { + HANDLE_CODE(ue_meass_available_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_reest_complete_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_meass_available_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_meass_available_r16_present) { + HANDLE_CODE(ue_meass_available_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_reest_complete_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_meass_available_r16_present) { + j.write_fieldname("ue-MeasurementsAvailable-r16"); + ue_meass_available_r16.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// RRCResumeComplete-v1610-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_complete_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(idle_meas_available_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_result_idle_eutra_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_result_idle_nr_r16_present, 1)); + HANDLE_CODE(bref.pack(scg_resp_r16_present, 1)); + HANDLE_CODE(bref.pack(ue_meass_available_r16_present, 1)); + HANDLE_CODE(bref.pack(mob_history_avail_r16_present, 1)); + HANDLE_CODE(bref.pack(mob_state_r16_present, 1)); + HANDLE_CODE(bref.pack(need_for_gaps_info_nr_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_result_idle_eutra_r16_present) { + HANDLE_CODE(meas_result_idle_eutra_r16.pack(bref)); + } + if (meas_result_idle_nr_r16_present) { + HANDLE_CODE(meas_result_idle_nr_r16.pack(bref)); + } + if (scg_resp_r16_present) { + HANDLE_CODE(scg_resp_r16.pack(bref)); + } + if (ue_meass_available_r16_present) { + HANDLE_CODE(ue_meass_available_r16.pack(bref)); + } + if (mob_state_r16_present) { + HANDLE_CODE(mob_state_r16.pack(bref)); + } + if (need_for_gaps_info_nr_r16_present) { + HANDLE_CODE(need_for_gaps_info_nr_r16.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_complete_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(idle_meas_available_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_idle_eutra_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_idle_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(scg_resp_r16_present, 1)); + HANDLE_CODE(bref.unpack(ue_meass_available_r16_present, 1)); + HANDLE_CODE(bref.unpack(mob_history_avail_r16_present, 1)); + HANDLE_CODE(bref.unpack(mob_state_r16_present, 1)); + HANDLE_CODE(bref.unpack(need_for_gaps_info_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_result_idle_eutra_r16_present) { + HANDLE_CODE(meas_result_idle_eutra_r16.unpack(bref)); + } + if (meas_result_idle_nr_r16_present) { + HANDLE_CODE(meas_result_idle_nr_r16.unpack(bref)); + } + if (scg_resp_r16_present) { + HANDLE_CODE(scg_resp_r16.unpack(bref)); + } + if (ue_meass_available_r16_present) { + HANDLE_CODE(ue_meass_available_r16.unpack(bref)); + } + if (mob_state_r16_present) { + HANDLE_CODE(mob_state_r16.unpack(bref)); + } + if (need_for_gaps_info_nr_r16_present) { + HANDLE_CODE(need_for_gaps_info_nr_r16.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_resume_complete_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (idle_meas_available_r16_present) { + j.write_str("idleMeasAvailable-r16", "true"); + } + if (meas_result_idle_eutra_r16_present) { + j.write_fieldname("measResultIdleEUTRA-r16"); + meas_result_idle_eutra_r16.to_json(j); + } + if (meas_result_idle_nr_r16_present) { + j.write_fieldname("measResultIdleNR-r16"); + meas_result_idle_nr_r16.to_json(j); + } + if (scg_resp_r16_present) { + j.write_fieldname("scg-Response-r16"); + scg_resp_r16.to_json(j); + } + if (ue_meass_available_r16_present) { + j.write_fieldname("ue-MeasurementsAvailable-r16"); + ue_meass_available_r16.to_json(j); + } + if (mob_history_avail_r16_present) { + j.write_str("mobilityHistoryAvail-r16", "true"); + } + if (mob_state_r16_present) { + j.write_str("mobilityState-r16", mob_state_r16.to_string()); + } + if (need_for_gaps_info_nr_r16_present) { + j.write_fieldname("needForGapsInfoNR-r16"); + need_for_gaps_info_nr_r16.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +void rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::destroy_() +{ + switch (type_) { + case types::nr_scg_resp: + c.destroy(); + break; + case types::eutra_scg_resp: + c.destroy(); + break; + default: + break; + } +} +void rrc_resume_complete_v1610_ies_s::scg_resp_r16_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_, "rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_"); + } +} +rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::scg_resp_r16_c_( + const rrc_resume_complete_v1610_ies_s::scg_resp_r16_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_resume_complete_v1610_ies_s::scg_resp_r16_c_"); + } +} +rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_& rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::operator=( + const rrc_resume_complete_v1610_ies_s::scg_resp_r16_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_resume_complete_v1610_ies_s::scg_resp_r16_c_"); + } + + return *this; +} +dyn_octstring& rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::set_nr_scg_resp() +{ + set(types::nr_scg_resp); + return c.get(); +} +dyn_octstring& rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::set_eutra_scg_resp() +{ + set(types::eutra_scg_resp); + return c.get(); +} +void rrc_resume_complete_v1610_ies_s::scg_resp_r16_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_resume_complete_v1610_ies_s::scg_resp_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::nr_scg_resp: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::eutra_scg_resp: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::nr_scg_resp: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::eutra_scg_resp: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"nr-SCG-Response", "eutra-SCG-Response"}; + return convert_enum_idx(names, 2, value, "rrc_resume_complete_v1610_ies_s::scg_resp_r16_c_::types"); +} + +const char* rrc_resume_complete_v1610_ies_s::mob_state_r16_opts::to_string() const +{ + static const char* names[] = {"normal", "medium", "high", "spare"}; + return convert_enum_idx(names, 4, value, "rrc_resume_complete_v1610_ies_s::mob_state_r16_e_"); +} + +// RRCSetupComplete-v1610-IEs ::= SEQUENCE +SRSASN_CODE rrc_setup_complete_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(iab_node_ind_r16_present, 1)); + HANDLE_CODE(bref.pack(idle_meas_available_r16_present, 1)); + HANDLE_CODE(bref.pack(ue_meass_available_r16_present, 1)); + HANDLE_CODE(bref.pack(mob_history_avail_r16_present, 1)); + HANDLE_CODE(bref.pack(mob_state_r16_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_meass_available_r16_present) { + HANDLE_CODE(ue_meass_available_r16.pack(bref)); + } + if (mob_state_r16_present) { + HANDLE_CODE(mob_state_r16.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_setup_complete_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(iab_node_ind_r16_present, 1)); + HANDLE_CODE(bref.unpack(idle_meas_available_r16_present, 1)); + HANDLE_CODE(bref.unpack(ue_meass_available_r16_present, 1)); + HANDLE_CODE(bref.unpack(mob_history_avail_r16_present, 1)); + HANDLE_CODE(bref.unpack(mob_state_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_meass_available_r16_present) { + HANDLE_CODE(ue_meass_available_r16.unpack(bref)); + } + if (mob_state_r16_present) { + HANDLE_CODE(mob_state_r16.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void rrc_setup_complete_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (iab_node_ind_r16_present) { + j.write_str("iab-NodeIndication-r16", "true"); + } + if (idle_meas_available_r16_present) { + j.write_str("idleMeasAvailable-r16", "true"); + } + if (ue_meass_available_r16_present) { + j.write_fieldname("ue-MeasurementsAvailable-r16"); + ue_meass_available_r16.to_json(j); + } + if (mob_history_avail_r16_present) { + j.write_str("mobilityHistoryAvail-r16", "true"); + } + if (mob_state_r16_present) { + j.write_str("mobilityState-r16", mob_state_r16.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +const char* rrc_setup_complete_v1610_ies_s::mob_state_r16_opts::to_string() const +{ + static const char* names[] = {"normal", "medium", "high", "spare"}; + return convert_enum_idx(names, 4, value, "rrc_setup_complete_v1610_ies_s::mob_state_r16_e_"); +} + +// RegisteredAMF ::= SEQUENCE +SRSASN_CODE registered_amf_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(amf_id.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE registered_amf_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)); + + return SRSASN_SUCCESS; +} +void registered_amf_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.end_obj(); +} + +// S-NSSAI ::= CHOICE +void s_nssai_c::destroy_() +{ + switch (type_) { + case types::sst: + c.destroy>(); + break; + case types::sst_sd: + c.destroy>(); + break; + default: + break; + } +} +void s_nssai_c::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::sst: + c.init>(); + break; + case types::sst_sd: + c.init>(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "s_nssai_c"); + } +} +s_nssai_c::s_nssai_c(const s_nssai_c& other) +{ + type_ = other.type(); + switch (type_) { + case types::sst: + c.init(other.c.get>()); + break; + case types::sst_sd: + c.init(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "s_nssai_c"); + } +} +s_nssai_c& s_nssai_c::operator=(const s_nssai_c& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::sst: + c.set(other.c.get>()); + break; + case types::sst_sd: + c.set(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "s_nssai_c"); + } + + return *this; +} +fixed_bitstring<8>& s_nssai_c::set_sst() +{ + set(types::sst); + return c.get>(); +} +fixed_bitstring<32>& s_nssai_c::set_sst_sd() +{ + set(types::sst_sd); + return c.get>(); +} +void s_nssai_c::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sst: + j.write_str("sst", c.get>().to_string()); + break; + case types::sst_sd: + j.write_str("sst-SD", c.get>().to_string()); + break; + default: + log_invalid_choice_id(type_, "s_nssai_c"); + } + j.end_obj(); +} +SRSASN_CODE s_nssai_c::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::sst: + HANDLE_CODE(c.get>().pack(bref)); + break; + case types::sst_sd: + HANDLE_CODE(c.get>().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "s_nssai_c"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE s_nssai_c::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::sst: + HANDLE_CODE(c.get>().unpack(bref)); + break; + case types::sst_sd: + HANDLE_CODE(c.get>().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "s_nssai_c"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* s_nssai_c::types_opts::to_string() const +{ + static const char* names[] = {"sst", "sst-SD"}; + return convert_enum_idx(names, 2, value, "s_nssai_c::types"); +} + +// SCGFailureInformation-v1590-IEs ::= SEQUENCE +SRSASN_CODE scg_fail_info_v1590_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_v1590_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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_v1590_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_eutra_v1590_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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_eutra_v1590_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// SIB-ReqInfo-r16 ::= ENUMERATED +const char* sib_req_info_r16_opts::to_string() const +{ + static const char* names[] = {"sib12", "sib13", "sib14", "sib20-v1700", "sib21-v1700", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "sib_req_info_r16_e"); +} +uint8_t sib_req_info_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {12, 13, 14, 20, 21}; + return map_enum_number(numbers, 5, value, "sib_req_info_r16_e"); +} + +// SidelinkUEInformationNR-v1700-IEs ::= SEQUENCE +SRSASN_CODE sidelink_ue_info_nr_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sl_tx_res_req_list_v1700.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_rx_drx_report_list_v1700.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_rx_interested_gc_bc_dest_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_rx_interested_freq_list_disc_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_tx_res_req_list_disc_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_tx_res_req_list_comm_relay_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(ue_type_r17_present, 1)); + HANDLE_CODE(bref.pack(sl_source_id_remote_ue_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (sl_tx_res_req_list_v1700.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_res_req_list_v1700, 1, 32)); + } + if (sl_rx_drx_report_list_v1700.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_rx_drx_report_list_v1700, 1, 32)); + } + if (sl_rx_interested_gc_bc_dest_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_rx_interested_gc_bc_dest_list_r17, 1, 32)); + } + if (sl_rx_interested_freq_list_disc_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_rx_interested_freq_list_disc_r17, 1, 8, integer_packer(1, 8))); + } + if (sl_tx_res_req_list_disc_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_res_req_list_disc_r17, 1, 32)); + } + if (sl_tx_res_req_list_comm_relay_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_res_req_list_comm_relay_r17, 1, 32)); + } + if (ue_type_r17_present) { + HANDLE_CODE(ue_type_r17.pack(bref)); + } + if (sl_source_id_remote_ue_r17_present) { + HANDLE_CODE(sl_source_id_remote_ue_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE sidelink_ue_info_nr_v1700_ies_s::unpack(cbit_ref& bref) +{ + bool sl_tx_res_req_list_v1700_present; + HANDLE_CODE(bref.unpack(sl_tx_res_req_list_v1700_present, 1)); + bool sl_rx_drx_report_list_v1700_present; + HANDLE_CODE(bref.unpack(sl_rx_drx_report_list_v1700_present, 1)); + bool sl_rx_interested_gc_bc_dest_list_r17_present; + HANDLE_CODE(bref.unpack(sl_rx_interested_gc_bc_dest_list_r17_present, 1)); + bool sl_rx_interested_freq_list_disc_r17_present; + HANDLE_CODE(bref.unpack(sl_rx_interested_freq_list_disc_r17_present, 1)); + bool sl_tx_res_req_list_disc_r17_present; + HANDLE_CODE(bref.unpack(sl_tx_res_req_list_disc_r17_present, 1)); + bool sl_tx_res_req_list_comm_relay_r17_present; + HANDLE_CODE(bref.unpack(sl_tx_res_req_list_comm_relay_r17_present, 1)); + HANDLE_CODE(bref.unpack(ue_type_r17_present, 1)); + HANDLE_CODE(bref.unpack(sl_source_id_remote_ue_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (sl_tx_res_req_list_v1700_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_tx_res_req_list_v1700, bref, 1, 32)); + } + if (sl_rx_drx_report_list_v1700_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_rx_drx_report_list_v1700, bref, 1, 32)); + } + if (sl_rx_interested_gc_bc_dest_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_rx_interested_gc_bc_dest_list_r17, bref, 1, 32)); + } + if (sl_rx_interested_freq_list_disc_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_rx_interested_freq_list_disc_r17, bref, 1, 8, integer_packer(1, 8))); + } + if (sl_tx_res_req_list_disc_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_tx_res_req_list_disc_r17, bref, 1, 32)); + } + if (sl_tx_res_req_list_comm_relay_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_tx_res_req_list_comm_relay_r17, bref, 1, 32)); + } + if (ue_type_r17_present) { + HANDLE_CODE(ue_type_r17.unpack(bref)); + } + if (sl_source_id_remote_ue_r17_present) { + HANDLE_CODE(sl_source_id_remote_ue_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void sidelink_ue_info_nr_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_tx_res_req_list_v1700.size() > 0) { + j.start_array("sl-TxResourceReqList-v1700"); + for (const auto& e1 : sl_tx_res_req_list_v1700) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_rx_drx_report_list_v1700.size() > 0) { + j.start_array("sl-RxDRX-ReportList-v1700"); + for (const auto& e1 : sl_rx_drx_report_list_v1700) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_rx_interested_gc_bc_dest_list_r17.size() > 0) { + j.start_array("sl-RxInterestedGC-BC-DestList-r17"); + for (const auto& e1 : sl_rx_interested_gc_bc_dest_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_rx_interested_freq_list_disc_r17.size() > 0) { + j.start_array("sl-RxInterestedFreqListDisc-r17"); + for (const auto& e1 : sl_rx_interested_freq_list_disc_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_tx_res_req_list_disc_r17.size() > 0) { + j.start_array("sl-TxResourceReqListDisc-r17"); + for (const auto& e1 : sl_tx_res_req_list_disc_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_tx_res_req_list_comm_relay_r17.size() > 0) { + j.start_array("sl-TxResourceReqListCommRelay-r17"); + for (const auto& e1 : sl_tx_res_req_list_comm_relay_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (ue_type_r17_present) { + j.write_str("ue-Type-r17", ue_type_r17.to_string()); + } + if (sl_source_id_remote_ue_r17_present) { + j.write_str("sl-SourceIdentityRemoteUE-r17", sl_source_id_remote_ue_r17.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +const char* sidelink_ue_info_nr_v1700_ies_s::ue_type_r17_opts::to_string() const +{ + static const char* names[] = {"relayUE", "remoteUE"}; + return convert_enum_idx(names, 2, value, "sidelink_ue_info_nr_v1700_ies_s::ue_type_r17_e_"); +} + +// UEAssistanceInformation-v1540-IEs ::= SEQUENCE +SRSASN_CODE ue_assist_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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_assist_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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_assist_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"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// UEInformationResponse-v1700-IEs ::= SEQUENCE +SRSASN_CODE ue_info_resp_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(success_ho_report_r17_present, 1)); + HANDLE_CODE(bref.pack(conn_est_fail_report_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(coarse_location_info_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (success_ho_report_r17_present) { + HANDLE_CODE(success_ho_report_r17.pack(bref)); + } + if (conn_est_fail_report_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, conn_est_fail_report_list_r17, 1, 4)); + } + if (coarse_location_info_r17.size() > 0) { + HANDLE_CODE(coarse_location_info_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_resp_v1700_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(success_ho_report_r17_present, 1)); + bool conn_est_fail_report_list_r17_present; + HANDLE_CODE(bref.unpack(conn_est_fail_report_list_r17_present, 1)); + bool coarse_location_info_r17_present; + HANDLE_CODE(bref.unpack(coarse_location_info_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (success_ho_report_r17_present) { + HANDLE_CODE(success_ho_report_r17.unpack(bref)); + } + if (conn_est_fail_report_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(conn_est_fail_report_list_r17, bref, 1, 4)); + } + if (coarse_location_info_r17_present) { + HANDLE_CODE(coarse_location_info_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_info_resp_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (success_ho_report_r17_present) { + j.write_fieldname("successHO-Report-r17"); + success_ho_report_r17.to_json(j); + } + if (conn_est_fail_report_list_r17.size() > 0) { + j.start_array("connEstFailReportList-r17"); + for (const auto& e1 : conn_est_fail_report_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (coarse_location_info_r17.size() > 0) { + j.write_str("coarseLocationInfo-r17", coarse_location_info_r17.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// UEPositioningAssistanceInfo-v1720-IEs ::= SEQUENCE +SRSASN_CODE ue_positioning_assist_info_v1720_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_tx_teg_timing_error_margin_value_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_tx_teg_timing_error_margin_value_r17_present) { + HANDLE_CODE(ue_tx_teg_timing_error_margin_value_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_positioning_assist_info_v1720_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_tx_teg_timing_error_margin_value_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_tx_teg_timing_error_margin_value_r17_present) { + HANDLE_CODE(ue_tx_teg_timing_error_margin_value_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ue_positioning_assist_info_v1720_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_tx_teg_timing_error_margin_value_r17_present) { + j.write_str("ue-TxTEG-TimingErrorMarginValue-r17", ue_tx_teg_timing_error_margin_value_r17.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +const char* ue_positioning_assist_info_v1720_ies_s::ue_tx_teg_timing_error_margin_value_r17_opts::to_string() const +{ + static const char* names[] = {"tc0", + "tc2", + "tc4", + "tc6", + "tc8", + "tc12", + "tc16", + "tc20", + "tc24", + "tc32", + "tc40", + "tc48", + "tc56", + "tc64", + "tc72", + "tc80"}; + return convert_enum_idx( + names, 16, value, "ue_positioning_assist_info_v1720_ies_s::ue_tx_teg_timing_error_margin_value_r17_e_"); +} +uint8_t ue_positioning_assist_info_v1720_ies_s::ue_tx_teg_timing_error_margin_value_r17_opts::to_number() const +{ + static const uint8_t numbers[] = {0, 2, 4, 6, 8, 12, 16, 20, 24, 32, 40, 48, 56, 64, 72, 80}; + return map_enum_number( + numbers, 16, value, "ue_positioning_assist_info_v1720_ies_s::ue_tx_teg_timing_error_margin_value_r17_e_"); +} + +// ULInformationTransfer-v1700-IEs ::= SEQUENCE +SRSASN_CODE ul_info_transfer_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ded_info_f1c_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ded_info_f1c_r17.size() > 0) { + HANDLE_CODE(ded_info_f1c_r17.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_v1700_ies_s::unpack(cbit_ref& bref) +{ + bool ded_info_f1c_r17_present; + HANDLE_CODE(bref.unpack(ded_info_f1c_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ded_info_f1c_r17_present) { + HANDLE_CODE(ded_info_f1c_r17.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_info_transfer_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ded_info_f1c_r17.size() > 0) { + j.write_str("dedicatedInfoF1c-r17", ded_info_f1c_r17.to_string()); + } + 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.size() > 0, 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.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE counter_check_resp_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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.size() > 0) { + 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(); +} + +// DedicatedSIBRequest-r16-IEs ::= SEQUENCE +SRSASN_CODE ded_sib_request_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(on_demand_sib_request_list_r16_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (on_demand_sib_request_list_r16_present) { + HANDLE_CODE(bref.pack(on_demand_sib_request_list_r16.requested_sib_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(on_demand_sib_request_list_r16.requested_pos_sib_list_r16.size() > 0, 1)); + if (on_demand_sib_request_list_r16.requested_sib_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, on_demand_sib_request_list_r16.requested_sib_list_r16, 1, 8)); + } + if (on_demand_sib_request_list_r16.requested_pos_sib_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, on_demand_sib_request_list_r16.requested_pos_sib_list_r16, 1, 32)); + } + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ded_sib_request_r16_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(on_demand_sib_request_list_r16_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (on_demand_sib_request_list_r16_present) { + bool requested_sib_list_r16_present; + HANDLE_CODE(bref.unpack(requested_sib_list_r16_present, 1)); + bool requested_pos_sib_list_r16_present; + HANDLE_CODE(bref.unpack(requested_pos_sib_list_r16_present, 1)); + if (requested_sib_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(on_demand_sib_request_list_r16.requested_sib_list_r16, bref, 1, 8)); + } + if (requested_pos_sib_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(on_demand_sib_request_list_r16.requested_pos_sib_list_r16, bref, 1, 32)); + } + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ded_sib_request_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (on_demand_sib_request_list_r16_present) { + j.write_fieldname("onDemandSIB-RequestList-r16"); + j.start_obj(); + if (on_demand_sib_request_list_r16.requested_sib_list_r16.size() > 0) { + j.start_array("requestedSIB-List-r16"); + for (const auto& e1 : on_demand_sib_request_list_r16.requested_sib_list_r16) { + j.write_str(e1.to_string()); + } + j.end_array(); + } + if (on_demand_sib_request_list_r16.requested_pos_sib_list_r16.size() > 0) { + j.start_array("requestedPosSIB-List-r16"); + for (const auto& e1 : on_demand_sib_request_list_r16.requested_pos_sib_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + j.end_obj(); + } + if (late_non_crit_ext.size() > 0) { + 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.size() > 0, 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.size() > 0) { + 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 fail_info_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(fail_info_rlc_bearer_present, 1)); + bool late_non_crit_ext_present; + 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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(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.size() > 0) { + 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(); +} + +// IABOtherInformation-r16-IEs ::= SEQUENCE +SRSASN_CODE iab_other_info_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(ip_info_type_r16.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE iab_other_info_r16_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(ip_info_type_r16.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void iab_other_info_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("ip-InfoType-r16"); + ip_info_type_r16.to_json(j); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +void iab_other_info_r16_ies_s::ip_info_type_r16_c_::destroy_() +{ + switch (type_) { + case types::iab_ip_request_r16: + c.destroy(); + break; + case types::iab_ip_report_r16: + c.destroy(); + break; + default: + break; + } +} +void iab_other_info_r16_ies_s::ip_info_type_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::iab_ip_request_r16: + c.init(); + break; + case types::iab_ip_report_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_"); + } +} +iab_other_info_r16_ies_s::ip_info_type_r16_c_::ip_info_type_r16_c_( + const iab_other_info_r16_ies_s::ip_info_type_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::iab_ip_request_r16: + c.init(other.c.get()); + break; + case types::iab_ip_report_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_"); + } +} +iab_other_info_r16_ies_s::ip_info_type_r16_c_& +iab_other_info_r16_ies_s::ip_info_type_r16_c_::operator=(const iab_other_info_r16_ies_s::ip_info_type_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::iab_ip_request_r16: + c.set(other.c.get()); + break; + case types::iab_ip_report_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_"); + } + + return *this; +} +iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_& +iab_other_info_r16_ies_s::ip_info_type_r16_c_::set_iab_ip_request_r16() +{ + set(types::iab_ip_request_r16); + return c.get(); +} +iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_& +iab_other_info_r16_ies_s::ip_info_type_r16_c_::set_iab_ip_report_r16() +{ + set(types::iab_ip_report_r16); + return c.get(); +} +void iab_other_info_r16_ies_s::ip_info_type_r16_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::iab_ip_request_r16: + j.write_fieldname("iab-IP-Request-r16"); + j.start_obj(); + if (c.get().iab_ip_v4_address_num_req_r16_present) { + j.write_fieldname("iab-IPv4-AddressNumReq-r16"); + c.get().iab_ip_v4_address_num_req_r16.to_json(j); + } + if (c.get().iab_ip_v6_address_req_r16_present) { + j.write_fieldname("iab-IPv6-AddressReq-r16"); + c.get().iab_ip_v6_address_req_r16.to_json(j); + } + j.end_obj(); + break; + case types::iab_ip_report_r16: + j.write_fieldname("iab-IP-Report-r16"); + j.start_obj(); + if (c.get().iab_ip_v4_address_report_r16_present) { + j.write_fieldname("iab-IPv4-AddressReport-r16"); + c.get().iab_ip_v4_address_report_r16.to_json(j); + } + if (c.get().iab_ip_v6_report_r16_present) { + j.write_fieldname("iab-IPv6-Report-r16"); + c.get().iab_ip_v6_report_r16.to_json(j); + } + j.end_obj(); + break; + default: + log_invalid_choice_id(type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE iab_other_info_r16_ies_s::ip_info_type_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::iab_ip_request_r16: + HANDLE_CODE(bref.pack(c.get().iab_ip_v4_address_num_req_r16_present, 1)); + HANDLE_CODE(bref.pack(c.get().iab_ip_v6_address_req_r16_present, 1)); + if (c.get().iab_ip_v4_address_num_req_r16_present) { + HANDLE_CODE(c.get().iab_ip_v4_address_num_req_r16.pack(bref)); + } + if (c.get().iab_ip_v6_address_req_r16_present) { + HANDLE_CODE(c.get().iab_ip_v6_address_req_r16.pack(bref)); + } + break; + case types::iab_ip_report_r16: + HANDLE_CODE(bref.pack(c.get().iab_ip_v4_address_report_r16_present, 1)); + HANDLE_CODE(bref.pack(c.get().iab_ip_v6_report_r16_present, 1)); + if (c.get().iab_ip_v4_address_report_r16_present) { + HANDLE_CODE(c.get().iab_ip_v4_address_report_r16.pack(bref)); + } + if (c.get().iab_ip_v6_report_r16_present) { + HANDLE_CODE(c.get().iab_ip_v6_report_r16.pack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE iab_other_info_r16_ies_s::ip_info_type_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::iab_ip_request_r16: + HANDLE_CODE(bref.unpack(c.get().iab_ip_v4_address_num_req_r16_present, 1)); + HANDLE_CODE(bref.unpack(c.get().iab_ip_v6_address_req_r16_present, 1)); + if (c.get().iab_ip_v4_address_num_req_r16_present) { + HANDLE_CODE(c.get().iab_ip_v4_address_num_req_r16.unpack(bref)); + } + if (c.get().iab_ip_v6_address_req_r16_present) { + HANDLE_CODE(c.get().iab_ip_v6_address_req_r16.unpack(bref)); + } + break; + case types::iab_ip_report_r16: + HANDLE_CODE(bref.unpack(c.get().iab_ip_v4_address_report_r16_present, 1)); + HANDLE_CODE(bref.unpack(c.get().iab_ip_v6_report_r16_present, 1)); + if (c.get().iab_ip_v4_address_report_r16_present) { + HANDLE_CODE(c.get().iab_ip_v4_address_report_r16.unpack(bref)); + } + if (c.get().iab_ip_v6_report_r16_present) { + HANDLE_CODE(c.get().iab_ip_v6_report_r16.unpack(bref)); + } + break; + default: + log_invalid_choice_id(type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::destroy_() +{ + switch (type_) { + case types::iab_ip_v6_address_num_req_r16: + c.destroy(); + break; + case types::iab_ip_v6_address_prefix_req_r16: + c.destroy(); + break; + default: + break; + } +} +void iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::set( + types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::iab_ip_v6_address_num_req_r16: + c.init(); + break; + case types::iab_ip_v6_address_prefix_req_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_"); + } +} +iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_:: + iab_ip_v6_address_req_r16_c_( + const iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::iab_ip_v6_address_num_req_r16: + c.init(other.c.get()); + break; + case types::iab_ip_v6_address_prefix_req_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_"); + } +} +iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_& +iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::operator=( + const iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::iab_ip_v6_address_num_req_r16: + c.set(other.c.get()); + break; + case types::iab_ip_v6_address_prefix_req_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_"); + } + + return *this; +} +iab_ip_address_num_req_r16_s& iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_:: + iab_ip_v6_address_req_r16_c_::set_iab_ip_v6_address_num_req_r16() +{ + set(types::iab_ip_v6_address_num_req_r16); + return c.get(); +} +iab_ip_address_prefix_req_r16_s& iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_:: + iab_ip_v6_address_req_r16_c_::set_iab_ip_v6_address_prefix_req_r16() +{ + set(types::iab_ip_v6_address_prefix_req_r16); + return c.get(); +} +void iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::to_json( + json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::iab_ip_v6_address_num_req_r16: + j.write_fieldname("iab-IPv6-AddressNumReq-r16"); + c.get().to_json(j); + break; + case types::iab_ip_v6_address_prefix_req_r16: + j.write_fieldname("iab-IPv6-AddressPrefixReq-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id( + type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::pack( + bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::iab_ip_v6_address_num_req_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::iab_ip_v6_address_prefix_req_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id( + type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::unpack( + cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::iab_ip_v6_address_num_req_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::iab_ip_v6_address_prefix_req_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id( + type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_:: + types_opts::to_string() const +{ + static const char* names[] = {"iab-IPv6-AddressNumReq-r16", "iab-IPv6-AddressPrefixReq-r16"}; + return convert_enum_idx( + names, + 2, + value, + "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_request_r16_s_::iab_ip_v6_address_req_r16_c_::types"); +} + +void iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::destroy_() +{ + switch (type_) { + case types::iab_ip_v6_address_report_r16: + c.destroy(); + break; + case types::iab_ip_v6_prefix_report_r16: + c.destroy(); + break; + default: + break; + } +} +void iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::iab_ip_v6_address_report_r16: + c.init(); + break; + case types::iab_ip_v6_prefix_report_r16: + c.init(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_"); + } +} +iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::iab_ip_v6_report_r16_c_( + const iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::iab_ip_v6_address_report_r16: + c.init(other.c.get()); + break; + case types::iab_ip_v6_prefix_report_r16: + c.init(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_"); + } +} +iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_& +iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::operator=( + const iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::iab_ip_v6_address_report_r16: + c.set(other.c.get()); + break; + case types::iab_ip_v6_prefix_report_r16: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id( + type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_"); + } + + return *this; +} +iab_ip_address_and_traffic_r16_s& iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_:: + iab_ip_v6_report_r16_c_::set_iab_ip_v6_address_report_r16() +{ + set(types::iab_ip_v6_address_report_r16); + return c.get(); +} +iab_ip_prefix_and_traffic_r16_s& iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_:: + iab_ip_v6_report_r16_c_::set_iab_ip_v6_prefix_report_r16() +{ + set(types::iab_ip_v6_prefix_report_r16); + return c.get(); +} +void iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::to_json( + json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::iab_ip_v6_address_report_r16: + j.write_fieldname("iab-IPv6-AddressReport-r16"); + c.get().to_json(j); + break; + case types::iab_ip_v6_prefix_report_r16: + j.write_fieldname("iab-IPv6-PrefixReport-r16"); + c.get().to_json(j); + break; + default: + log_invalid_choice_id( + type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_"); + } + j.end_obj(); +} +SRSASN_CODE +iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::iab_ip_v6_address_report_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + case types::iab_ip_v6_prefix_report_r16: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id( + type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE +iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::iab_ip_v6_address_report_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + case types::iab_ip_v6_prefix_report_r16: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id( + type_, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* +iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::types_opts::to_string() + const +{ + static const char* names[] = {"iab-IPv6-AddressReport-r16", "iab-IPv6-PrefixReport-r16"}; + return convert_enum_idx( + names, + 2, + value, + "iab_other_info_r16_ies_s::ip_info_type_r16_c_::iab_ip_report_r16_s_::iab_ip_v6_report_r16_c_::types"); +} + +const char* iab_other_info_r16_ies_s::ip_info_type_r16_c_::types_opts::to_string() const +{ + static const char* names[] = {"iab-IP-Request-r16", "iab-IP-Report-r16"}; + return convert_enum_idx(names, 2, value, "iab_other_info_r16_ies_s::ip_info_type_r16_c_::types"); +} + +// LocationMeasurementIndication-IEs ::= SEQUENCE +SRSASN_CODE location_meas_ind_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(meas_ind.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE location_meas_ind_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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.size() > 0) { + 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(); +} + +// MBSInterestIndication-r17-IEs ::= SEQUENCE +SRSASN_CODE mb_si_nterest_ind_r17_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(mbs_freq_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(mbs_prio_r17_present, 1)); + HANDLE_CODE(bref.pack(mbs_service_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (mbs_freq_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbs_freq_list_r17, 1, 16, integer_packer(0, 3279165))); + } + if (mbs_service_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, mbs_service_list_r17, 1, 16)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mb_si_nterest_ind_r17_ies_s::unpack(cbit_ref& bref) +{ + bool mbs_freq_list_r17_present; + HANDLE_CODE(bref.unpack(mbs_freq_list_r17_present, 1)); + HANDLE_CODE(bref.unpack(mbs_prio_r17_present, 1)); + bool mbs_service_list_r17_present; + HANDLE_CODE(bref.unpack(mbs_service_list_r17_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (mbs_freq_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbs_freq_list_r17, bref, 1, 16, integer_packer(0, 3279165))); + } + if (mbs_service_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(mbs_service_list_r17, bref, 1, 16)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mb_si_nterest_ind_r17_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (mbs_freq_list_r17.size() > 0) { + j.start_array("mbs-FreqList-r17"); + for (const auto& e1 : mbs_freq_list_r17) { + j.write_int(e1); + } + j.end_array(); + } + if (mbs_prio_r17_present) { + j.write_str("mbs-Priority-r17", "true"); + } + if (mbs_service_list_r17.size() > 0) { + j.start_array("mbs-ServiceList-r17"); + for (const auto& e1 : mbs_service_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// MCGFailureInformation-r16-IEs ::= SEQUENCE +SRSASN_CODE mcg_fail_info_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(fail_report_mcg_r16_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (fail_report_mcg_r16_present) { + HANDLE_CODE(fail_report_mcg_r16.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE mcg_fail_info_r16_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(fail_report_mcg_r16_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (fail_report_mcg_r16_present) { + HANDLE_CODE(fail_report_mcg_r16.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void mcg_fail_info_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fail_report_mcg_r16_present) { + j.write_fieldname("failureReportMCG-r16"); + fail_report_mcg_r16.to_json(j); + } + if (late_non_crit_ext.size() > 0) { + 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(meas_results.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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; +} +void meas_report_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("measResults"); + meas_results.to_json(j); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// MeasurementReportAppLayer-r17-IEs ::= SEQUENCE +SRSASN_CODE meas_report_app_layer_r17_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_dyn_seq_of(bref, meas_report_app_layer_list_r17, 1, 16)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_report_app_layer_r17_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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(meas_report_app_layer_list_r17, bref, 1, 16)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void meas_report_app_layer_r17_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("measurementReportAppLayerList-r17"); + for (const auto& e1 : meas_report_app_layer_list_r17) { + e1.to_json(j); + } + j.end_array(); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// RRCReconfigurationComplete-IEs ::= SEQUENCE +SRSASN_CODE rrc_recfg_complete_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext.size() > 0) { + 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_recfg_complete_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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 rrc_recfg_complete_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// RRCReestablishmentComplete-IEs ::= SEQUENCE +SRSASN_CODE rrc_reest_complete_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext.size() > 0) { + 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_reest_complete_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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 rrc_reest_complete_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// RRCResumeComplete-IEs ::= SEQUENCE +SRSASN_CODE rrc_resume_complete_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ded_nas_msg.size() > 0, 1)); + HANDLE_CODE(bref.pack(sel_plmn_id_present, 1)); + HANDLE_CODE(bref.pack(ul_tx_direct_current_list.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ded_nas_msg.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, ul_tx_direct_current_list, 1, 32)); + } + if (late_non_crit_ext.size() > 0) { + 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_resume_complete_ies_s::unpack(cbit_ref& bref) +{ + bool ded_nas_msg_present; + HANDLE_CODE(bref.unpack(ded_nas_msg_present, 1)); + HANDLE_CODE(bref.unpack(sel_plmn_id_present, 1)); + bool ul_tx_direct_current_list_present; + HANDLE_CODE(bref.unpack(ul_tx_direct_current_list_present, 1)); + bool late_non_crit_ext_present; + 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 (sel_plmn_id_present) { + HANDLE_CODE(unpack_integer(sel_plmn_id, bref, (uint8_t)1u, (uint8_t)12u)); + } + if (ul_tx_direct_current_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(ul_tx_direct_current_list, bref, 1, 32)); + } + 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_resume_complete_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ded_nas_msg.size() > 0) { + j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); + } + if (sel_plmn_id_present) { + j.write_int("selectedPLMN-Identity", sel_plmn_id); + } + if (ul_tx_direct_current_list.size() > 0) { + j.start_array("uplinkTxDirectCurrentList"); + for (const auto& e1 : ul_tx_direct_current_list) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(ng_5_g_s_tmsi_value_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 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 (guami_type_present) { + HANDLE_CODE(guami_type.pack(bref)); + } + if (s_nssai_list.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, s_nssai_list, 1, 8)); + } + HANDLE_CODE(ded_nas_msg.pack(bref)); + if (ng_5_g_s_tmsi_value_present) { + HANDLE_CODE(ng_5_g_s_tmsi_value.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + 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_setup_complete_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(registered_amf_present, 1)); + HANDLE_CODE(bref.unpack(guami_type_present, 1)); + bool s_nssai_list_present; + HANDLE_CODE(bref.unpack(s_nssai_list_present, 1)); + HANDLE_CODE(bref.unpack(ng_5_g_s_tmsi_value_present, 1)); + bool late_non_crit_ext_present; + 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 (guami_type_present) { + HANDLE_CODE(guami_type.unpack(bref)); + } + if (s_nssai_list_present) { + HANDLE_CODE(unpack_dyn_seq_of(s_nssai_list, bref, 1, 8)); + } + HANDLE_CODE(ded_nas_msg.unpack(bref)); + if (ng_5_g_s_tmsi_value_present) { + HANDLE_CODE(ng_5_g_s_tmsi_value.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_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 (guami_type_present) { + j.write_str("guami-Type", guami_type.to_string()); + } + if (s_nssai_list.size() > 0) { + j.start_array("s-NSSAI-List"); + for (const auto& e1 : s_nssai_list) { + e1.to_json(j); + } + j.end_array(); + } + j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); + if (ng_5_g_s_tmsi_value_present) { + j.write_fieldname("ng-5G-S-TMSI-Value"); + ng_5_g_s_tmsi_value.to_json(j); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +const char* rrc_setup_complete_ies_s::guami_type_opts::to_string() const +{ + static const char* names[] = {"native", "mapped"}; + return convert_enum_idx(names, 2, value, "rrc_setup_complete_ies_s::guami_type_e_"); +} + +void rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::destroy_() +{ + switch (type_) { + case types::ng_5_g_s_tmsi: + c.destroy>(); + break; + case types::ng_5_g_s_tmsi_part2: + c.destroy>(); + break; + default: + break; + } +} +void rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::set(types::options e) +{ + destroy_(); + type_ = e; + switch (type_) { + case types::ng_5_g_s_tmsi: + c.init>(); + break; + case types::ng_5_g_s_tmsi_part2: + c.init>(); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_"); + } +} +rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::ng_5_g_s_tmsi_value_c_( + const rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_& other) +{ + type_ = other.type(); + switch (type_) { + case types::ng_5_g_s_tmsi: + c.init(other.c.get>()); + break; + case types::ng_5_g_s_tmsi_part2: + c.init(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_"); + } +} +rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_& rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::operator=( + const rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_& other) +{ + if (this == &other) { + return *this; + } + set(other.type()); + switch (type_) { + case types::ng_5_g_s_tmsi: + c.set(other.c.get>()); + break; + case types::ng_5_g_s_tmsi_part2: + c.set(other.c.get>()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_"); + } + + return *this; +} +fixed_bitstring<48>& rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::set_ng_5_g_s_tmsi() +{ + set(types::ng_5_g_s_tmsi); + return c.get>(); +} +fixed_bitstring<9>& rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::set_ng_5_g_s_tmsi_part2() +{ + set(types::ng_5_g_s_tmsi_part2); + return c.get>(); +} +void rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ng_5_g_s_tmsi: + j.write_str("ng-5G-S-TMSI", c.get>().to_string()); + break; + case types::ng_5_g_s_tmsi_part2: + j.write_str("ng-5G-S-TMSI-Part2", c.get>().to_string()); + break; + default: + log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ng_5_g_s_tmsi: + HANDLE_CODE(c.get>().pack(bref)); + break; + case types::ng_5_g_s_tmsi_part2: + HANDLE_CODE(c.get>().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ng_5_g_s_tmsi: + HANDLE_CODE(c.get>().unpack(bref)); + break; + case types::ng_5_g_s_tmsi_part2: + HANDLE_CODE(c.get>().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::types_opts::to_string() const +{ + static const char* names[] = {"ng-5G-S-TMSI", "ng-5G-S-TMSI-Part2"}; + return convert_enum_idx(names, 2, value, "rrc_setup_complete_ies_s::ng_5_g_s_tmsi_value_c_::types"); +} + +// SCGFailureInformation-IEs ::= SEQUENCE +SRSASN_CODE scg_fail_info_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(fail_report_scg_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + 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 scg_fail_info_ies_s::unpack(cbit_ref& 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 scg_fail_info_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + 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(); +} + +// SCGFailureInformationEUTRA-IEs ::= SEQUENCE +SRSASN_CODE scg_fail_info_eutra_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(fail_report_scg_eutra_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (fail_report_scg_eutra_present) { + HANDLE_CODE(fail_report_scg_eutra.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_eutra_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(fail_report_scg_eutra_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (fail_report_scg_eutra_present) { + HANDLE_CODE(fail_report_scg_eutra.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void scg_fail_info_eutra_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fail_report_scg_eutra_present) { + j.write_fieldname("failureReportSCG-EUTRA"); + fail_report_scg_eutra.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// SecurityModeComplete-IEs ::= SEQUENCE +SRSASN_CODE security_mode_complete_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_complete_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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 +{ + j.start_obj(); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// SecurityModeFailure-IEs ::= SEQUENCE +SRSASN_CODE security_mode_fail_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_fail_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + 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_fail_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// SidelinkUEInformationNR-r16-IEs ::= SEQUENCE +SRSASN_CODE sidelink_ue_info_nr_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(sl_rx_interested_freq_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_tx_res_req_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sl_fail_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (sl_rx_interested_freq_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_rx_interested_freq_list_r16, 1, 8, integer_packer(1, 8))); + } + if (sl_tx_res_req_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_tx_res_req_list_r16, 1, 32)); + } + if (sl_fail_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sl_fail_list_r16, 1, 32)); + } + if (late_non_crit_ext.size() > 0) { + 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 sidelink_ue_info_nr_r16_ies_s::unpack(cbit_ref& bref) +{ + bool sl_rx_interested_freq_list_r16_present; + HANDLE_CODE(bref.unpack(sl_rx_interested_freq_list_r16_present, 1)); + bool sl_tx_res_req_list_r16_present; + HANDLE_CODE(bref.unpack(sl_tx_res_req_list_r16_present, 1)); + bool sl_fail_list_r16_present; + HANDLE_CODE(bref.unpack(sl_fail_list_r16_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (sl_rx_interested_freq_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_rx_interested_freq_list_r16, bref, 1, 8, integer_packer(1, 8))); + } + if (sl_tx_res_req_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_tx_res_req_list_r16, bref, 1, 32)); + } + if (sl_fail_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(sl_fail_list_r16, bref, 1, 32)); + } + 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 sidelink_ue_info_nr_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (sl_rx_interested_freq_list_r16.size() > 0) { + j.start_array("sl-RxInterestedFreqList-r16"); + for (const auto& e1 : sl_rx_interested_freq_list_r16) { + j.write_int(e1); + } + j.end_array(); + } + if (sl_tx_res_req_list_r16.size() > 0) { + j.start_array("sl-TxResourceReqList-r16"); + for (const auto& e1 : sl_tx_res_req_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (sl_fail_list_r16.size() > 0) { + j.start_array("sl-FailureList-r16"); + for (const auto& e1 : sl_fail_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// UEAssistanceInformation-IEs ::= SEQUENCE +SRSASN_CODE ue_assist_info_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(delay_budget_report_present, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 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.size() > 0) { + 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 ue_assist_info_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(delay_budget_report_present, 1)); + bool late_non_crit_ext_present; + 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)); + } + + return SRSASN_SUCCESS; +} +void ue_assist_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.size() > 0) { + 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.size() > 0, 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.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_cap_info_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(ue_cap_rat_container_list_present, 1)); + bool late_non_crit_ext_present; + 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; +} +void ue_cap_info_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_cap_rat_container_list_present) { + j.start_array("ue-CapabilityRAT-ContainerList"); + for (const auto& e1 : ue_cap_rat_container_list) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// UEInformationResponse-r16-IEs ::= SEQUENCE +SRSASN_CODE ue_info_resp_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(meas_result_idle_eutra_r16_present, 1)); + HANDLE_CODE(bref.pack(meas_result_idle_nr_r16_present, 1)); + HANDLE_CODE(bref.pack(log_meas_report_r16_present, 1)); + HANDLE_CODE(bref.pack(conn_est_fail_report_r16_present, 1)); + HANDLE_CODE(bref.pack(ra_report_list_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(rlf_report_r16_present, 1)); + HANDLE_CODE(bref.pack(mob_history_report_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (meas_result_idle_eutra_r16_present) { + HANDLE_CODE(meas_result_idle_eutra_r16.pack(bref)); + } + if (meas_result_idle_nr_r16_present) { + HANDLE_CODE(meas_result_idle_nr_r16.pack(bref)); + } + if (log_meas_report_r16_present) { + HANDLE_CODE(log_meas_report_r16.pack(bref)); + } + if (conn_est_fail_report_r16_present) { + HANDLE_CODE(conn_est_fail_report_r16.pack(bref)); + } + if (ra_report_list_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, ra_report_list_r16, 1, 8)); + } + if (rlf_report_r16_present) { + HANDLE_CODE(rlf_report_r16.pack(bref)); + } + if (mob_history_report_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, mob_history_report_r16, 1, 16)); + } + if (late_non_crit_ext.size() > 0) { + 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 ue_info_resp_r16_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(meas_result_idle_eutra_r16_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_idle_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(log_meas_report_r16_present, 1)); + HANDLE_CODE(bref.unpack(conn_est_fail_report_r16_present, 1)); + bool ra_report_list_r16_present; + HANDLE_CODE(bref.unpack(ra_report_list_r16_present, 1)); + HANDLE_CODE(bref.unpack(rlf_report_r16_present, 1)); + bool mob_history_report_r16_present; + HANDLE_CODE(bref.unpack(mob_history_report_r16_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (meas_result_idle_eutra_r16_present) { + HANDLE_CODE(meas_result_idle_eutra_r16.unpack(bref)); + } + if (meas_result_idle_nr_r16_present) { + HANDLE_CODE(meas_result_idle_nr_r16.unpack(bref)); + } + if (log_meas_report_r16_present) { + HANDLE_CODE(log_meas_report_r16.unpack(bref)); + } + if (conn_est_fail_report_r16_present) { + HANDLE_CODE(conn_est_fail_report_r16.unpack(bref)); + } + if (ra_report_list_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(ra_report_list_r16, bref, 1, 8)); + } + if (rlf_report_r16_present) { + HANDLE_CODE(rlf_report_r16.unpack(bref)); + } + if (mob_history_report_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(mob_history_report_r16, bref, 1, 16)); + } + 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 ue_info_resp_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (meas_result_idle_eutra_r16_present) { + j.write_fieldname("measResultIdleEUTRA-r16"); + meas_result_idle_eutra_r16.to_json(j); + } + if (meas_result_idle_nr_r16_present) { + j.write_fieldname("measResultIdleNR-r16"); + meas_result_idle_nr_r16.to_json(j); + } + if (log_meas_report_r16_present) { + j.write_fieldname("logMeasReport-r16"); + log_meas_report_r16.to_json(j); + } + if (conn_est_fail_report_r16_present) { + j.write_fieldname("connEstFailReport-r16"); + conn_est_fail_report_r16.to_json(j); + } + if (ra_report_list_r16.size() > 0) { + j.start_array("ra-ReportList-r16"); + for (const auto& e1 : ra_report_list_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (rlf_report_r16_present) { + j.write_fieldname("rlf-Report-r16"); + rlf_report_r16.to_json(j); + } + if (mob_history_report_r16.size() > 0) { + j.start_array("mobilityHistoryReport-r16"); + for (const auto& e1 : mob_history_report_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// UEPositioningAssistanceInfo-r17-IEs ::= SEQUENCE +SRSASN_CODE ue_positioning_assist_info_r17_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_tx_teg_assoc_list_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_tx_teg_assoc_list_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, ue_tx_teg_assoc_list_r17, 1, 256)); + } + if (late_non_crit_ext.size() > 0) { + 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 ue_positioning_assist_info_r17_ies_s::unpack(cbit_ref& bref) +{ + bool ue_tx_teg_assoc_list_r17_present; + HANDLE_CODE(bref.unpack(ue_tx_teg_assoc_list_r17_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_tx_teg_assoc_list_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(ue_tx_teg_assoc_list_r17, bref, 1, 256)); + } + 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 ue_positioning_assist_info_r17_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_tx_teg_assoc_list_r17.size() > 0) { + j.start_array("ue-TxTEG-AssociationList-r17"); + for (const auto& e1 : ue_tx_teg_assoc_list_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// ULDedicatedMessageSegment-r16-IEs ::= SEQUENCE +SRSASN_CODE ul_ded_msg_segment_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + HANDLE_CODE(pack_integer(bref, segment_num_r16, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(rrc_msg_segment_container_r16.pack(bref)); + HANDLE_CODE(rrc_msg_segment_type_r16.pack(bref)); + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ded_msg_segment_r16_ies_s::unpack(cbit_ref& bref) +{ + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + HANDLE_CODE(unpack_integer(segment_num_r16, bref, (uint8_t)0u, (uint8_t)15u)); + HANDLE_CODE(rrc_msg_segment_container_r16.unpack(bref)); + HANDLE_CODE(rrc_msg_segment_type_r16.unpack(bref)); + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_ded_msg_segment_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("segmentNumber-r16", segment_num_r16); + j.write_str("rrc-MessageSegmentContainer-r16", rrc_msg_segment_container_r16.to_string()); + j.write_str("rrc-MessageSegmentType-r16", rrc_msg_segment_type_r16.to_string()); + if (late_non_crit_ext.size() > 0) { + 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(); +} + +const char* ul_ded_msg_segment_r16_ies_s::rrc_msg_segment_type_r16_opts::to_string() const +{ + static const char* names[] = {"notLastSegment", "lastSegment"}; + return convert_enum_idx(names, 2, value, "ul_ded_msg_segment_r16_ies_s::rrc_msg_segment_type_r16_e_"); +} + +// ULInformationTransfer-IEs ::= SEQUENCE +SRSASN_CODE ul_info_transfer_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ded_nas_msg.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ded_nas_msg.size() > 0) { + HANDLE_CODE(ded_nas_msg.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + 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 ul_info_transfer_ies_s::unpack(cbit_ref& bref) +{ + bool ded_nas_msg_present; + HANDLE_CODE(bref.unpack(ded_nas_msg_present, 1)); + bool late_non_crit_ext_present; + 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)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_info_transfer_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ded_nas_msg.size() > 0) { + j.write_str("dedicatedNAS-Message", ded_nas_msg.to_string()); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// ULInformationTransferIRAT-r16-IEs ::= SEQUENCE +SRSASN_CODE ul_info_transfer_irat_r16_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_dcch_msg_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ul_dcch_msg_eutra_r16.size() > 0) { + HANDLE_CODE(ul_dcch_msg_eutra_r16.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_irat_r16_ies_s::unpack(cbit_ref& bref) +{ + bool ul_dcch_msg_eutra_r16_present; + HANDLE_CODE(bref.unpack(ul_dcch_msg_eutra_r16_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ul_dcch_msg_eutra_r16_present) { + HANDLE_CODE(ul_dcch_msg_eutra_r16.unpack(bref)); + } + if (late_non_crit_ext_present) { + HANDLE_CODE(late_non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void ul_info_transfer_irat_r16_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_dcch_msg_eutra_r16.size() > 0) { + j.write_str("ul-DCCH-MessageEUTRA-r16", ul_dcch_msg_eutra_r16.to_string()); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// ULInformationTransferMRDC-IEs ::= SEQUENCE +SRSASN_CODE ul_info_transfer_mrdc_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ul_dcch_msg_nr.size() > 0, 1)); + HANDLE_CODE(bref.pack(ul_dcch_msg_eutra.size() > 0, 1)); + HANDLE_CODE(bref.pack(late_non_crit_ext.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ul_dcch_msg_nr.size() > 0) { + HANDLE_CODE(ul_dcch_msg_nr.pack(bref)); + } + if (ul_dcch_msg_eutra.size() > 0) { + HANDLE_CODE(ul_dcch_msg_eutra.pack(bref)); + } + if (late_non_crit_ext.size() > 0) { + HANDLE_CODE(late_non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_mrdc_ies_s::unpack(cbit_ref& bref) +{ + bool ul_dcch_msg_nr_present; + HANDLE_CODE(bref.unpack(ul_dcch_msg_nr_present, 1)); + bool ul_dcch_msg_eutra_present; + HANDLE_CODE(bref.unpack(ul_dcch_msg_eutra_present, 1)); + bool late_non_crit_ext_present; + HANDLE_CODE(bref.unpack(late_non_crit_ext_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ul_dcch_msg_nr_present) { + HANDLE_CODE(ul_dcch_msg_nr.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 ul_info_transfer_mrdc_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ul_dcch_msg_nr.size() > 0) { + j.write_str("ul-DCCH-MessageNR", ul_dcch_msg_nr.to_string()); + } + if (ul_dcch_msg_eutra.size() > 0) { + j.write_str("ul-DCCH-MessageEUTRA", ul_dcch_msg_eutra.to_string()); + } + if (late_non_crit_ext.size() > 0) { + 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(); +} + +// 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_::set(types::options e) +{ + type_ = e; +} +counter_check_resp_ies_s& counter_check_resp_s::crit_exts_c_::set_counter_check_resp() +{ + set(types::counter_check_resp); + return c; +} +void counter_check_resp_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void counter_check_resp_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::counter_check_resp: + j.write_fieldname("counterCheckResponse"); + c.to_json(j); + break; + case types::crit_exts_future: + 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.pack(bref)); + break; + case types::crit_exts_future: + 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.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "counter_check_resp_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* counter_check_resp_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"counterCheckResponse", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "counter_check_resp_s::crit_exts_c_::types"); +} + +// DedicatedSIBRequest-r16 ::= SEQUENCE +SRSASN_CODE ded_sib_request_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ded_sib_request_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ded_sib_request_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void ded_sib_request_r16_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +ded_sib_request_r16_ies_s& ded_sib_request_r16_s::crit_exts_c_::set_ded_sib_request_r16() +{ + set(types::ded_sib_request_r16); + return c; +} +void ded_sib_request_r16_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void ded_sib_request_r16_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ded_sib_request_r16: + j.write_fieldname("dedicatedSIBRequest-r16"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ded_sib_request_r16_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ded_sib_request_r16_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ded_sib_request_r16: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ded_sib_request_r16_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ded_sib_request_r16_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ded_sib_request_r16: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ded_sib_request_r16_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ded_sib_request_r16_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"dedicatedSIBRequest-r16", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "ded_sib_request_r16_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_::set(types::options e) +{ + type_ = e; +} +fail_info_ies_s& fail_info_s::crit_exts_c_::set_fail_info() +{ + set(types::fail_info); + return c; +} +void fail_info_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +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.to_json(j); + break; + case types::crit_exts_future: + 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.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE fail_info_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::fail_info: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "fail_info_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* fail_info_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"failureInformation", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "fail_info_s::crit_exts_c_::types"); +} + +// IABOtherInformation-r16 ::= SEQUENCE +SRSASN_CODE iab_other_info_r16_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 iab_other_info_r16_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 iab_other_info_r16_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 iab_other_info_r16_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +iab_other_info_r16_ies_s& iab_other_info_r16_s::crit_exts_c_::set_iab_other_info_r16() +{ + set(types::iab_other_info_r16); + return c; +} +void iab_other_info_r16_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void iab_other_info_r16_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::iab_other_info_r16: + j.write_fieldname("iabOtherInformation-r16"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "iab_other_info_r16_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE iab_other_info_r16_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::iab_other_info_r16: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "iab_other_info_r16_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE iab_other_info_r16_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::iab_other_info_r16: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "iab_other_info_r16_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* iab_other_info_r16_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"iabOtherInformation-r16", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "iab_other_info_r16_s::crit_exts_c_::types"); +} + +// LocationMeasurementIndication ::= SEQUENCE +SRSASN_CODE location_meas_ind_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +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 +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void location_meas_ind_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +location_meas_ind_ies_s& location_meas_ind_s::crit_exts_c_::set_location_meas_ind() +{ + set(types::location_meas_ind); + return c; +} +void location_meas_ind_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void location_meas_ind_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::location_meas_ind: + j.write_fieldname("locationMeasurementIndication"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE location_meas_ind_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::location_meas_ind: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE location_meas_ind_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::location_meas_ind: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "location_meas_ind_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* location_meas_ind_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"locationMeasurementIndication", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "location_meas_ind_s::crit_exts_c_::types"); +} + +// MBSInterestIndication-r17 ::= SEQUENCE +SRSASN_CODE mb_si_nterest_ind_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mb_si_nterest_ind_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mb_si_nterest_ind_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void mb_si_nterest_ind_r17_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +mb_si_nterest_ind_r17_ies_s& mb_si_nterest_ind_r17_s::crit_exts_c_::set_mbs_interest_ind_r17() +{ + set(types::mbs_interest_ind_r17); + return c; +} +void mb_si_nterest_ind_r17_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void mb_si_nterest_ind_r17_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::mbs_interest_ind_r17: + j.write_fieldname("mbsInterestIndication-r17"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mb_si_nterest_ind_r17_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE mb_si_nterest_ind_r17_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::mbs_interest_ind_r17: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mb_si_nterest_ind_r17_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mb_si_nterest_ind_r17_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::mbs_interest_ind_r17: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mb_si_nterest_ind_r17_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* mb_si_nterest_ind_r17_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"mbsInterestIndication-r17", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "mb_si_nterest_ind_r17_s::crit_exts_c_::types"); +} + +// MCGFailureInformation-r16 ::= SEQUENCE +SRSASN_CODE mcg_fail_info_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE mcg_fail_info_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void mcg_fail_info_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void mcg_fail_info_r16_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +mcg_fail_info_r16_ies_s& mcg_fail_info_r16_s::crit_exts_c_::set_mcg_fail_info_r16() +{ + set(types::mcg_fail_info_r16); + return c; +} +void mcg_fail_info_r16_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void mcg_fail_info_r16_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::mcg_fail_info_r16: + j.write_fieldname("mcgFailureInformation-r16"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mcg_fail_info_r16_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE mcg_fail_info_r16_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::mcg_fail_info_r16: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mcg_fail_info_r16_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mcg_fail_info_r16_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::mcg_fail_info_r16: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "mcg_fail_info_r16_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* mcg_fail_info_r16_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"mcgFailureInformation-r16", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "mcg_fail_info_r16_s::crit_exts_c_::types"); +} + +// MeasurementReport ::= SEQUENCE +SRSASN_CODE meas_report_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +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 +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void meas_report_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +meas_report_ies_s& meas_report_s::crit_exts_c_::set_meas_report() +{ + set(types::meas_report); + return c; +} +void meas_report_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void meas_report_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::meas_report: + j.write_fieldname("measurementReport"); + c.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(); +} +SRSASN_CODE meas_report_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::meas_report: + HANDLE_CODE(c.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; +} +SRSASN_CODE meas_report_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::meas_report: + HANDLE_CODE(c.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; +} + +const char* meas_report_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"measurementReport", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "meas_report_s::crit_exts_c_::types"); +} + +// RRCReconfigurationComplete ::= SEQUENCE +SRSASN_CODE rrc_recfg_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 rrc_recfg_complete_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_complete_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_complete_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +rrc_recfg_complete_ies_s& rrc_recfg_complete_s::crit_exts_c_::set_rrc_recfg_complete() +{ + set(types::rrc_recfg_complete); + return c; +} +void rrc_recfg_complete_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void rrc_recfg_complete_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_recfg_complete: + j.write_fieldname("rrcReconfigurationComplete"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE rrc_recfg_complete_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::rrc_recfg_complete: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_recfg_complete_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::rrc_recfg_complete: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_recfg_complete_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* rrc_recfg_complete_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcReconfigurationComplete", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "rrc_recfg_complete_s::crit_exts_c_::types"); +} + +// RRCReestablishmentComplete ::= SEQUENCE +SRSASN_CODE rrc_reest_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 rrc_reest_complete_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_complete_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_complete_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +rrc_reest_complete_ies_s& rrc_reest_complete_s::crit_exts_c_::set_rrc_reest_complete() +{ + set(types::rrc_reest_complete); + return c; +} +void rrc_reest_complete_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +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.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.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) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::rrc_reest_complete: + HANDLE_CODE(c.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; +} + +const char* rrc_reest_complete_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcReestablishmentComplete", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "rrc_reest_complete_s::crit_exts_c_::types"); +} + +// 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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_complete_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_resume_complete_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_complete_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +rrc_resume_complete_ies_s& rrc_resume_complete_s::crit_exts_c_::set_rrc_resume_complete() +{ + set(types::rrc_resume_complete); + return c; +} +void rrc_resume_complete_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void rrc_resume_complete_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_resume_complete: + j.write_fieldname("rrcResumeComplete"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "rrc_resume_complete_s::crit_exts_c_"); + } + 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.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; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_resume_complete_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::rrc_resume_complete: + HANDLE_CODE(c.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; + } + return SRSASN_SUCCESS; +} + +const char* rrc_resume_complete_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcResumeComplete", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "rrc_resume_complete_s::crit_exts_c_::types"); +} + +// 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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE rrc_setup_complete_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_complete_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_complete_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +rrc_setup_complete_ies_s& rrc_setup_complete_s::crit_exts_c_::set_rrc_setup_complete() +{ + set(types::rrc_setup_complete); + return c; +} +void rrc_setup_complete_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void rrc_setup_complete_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::rrc_setup_complete: + j.write_fieldname("rrcSetupComplete"); + c.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(); +} +SRSASN_CODE rrc_setup_complete_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::rrc_setup_complete: + HANDLE_CODE(c.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; + } + 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.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; +} + +const char* rrc_setup_complete_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"rrcSetupComplete", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "rrc_setup_complete_s::crit_exts_c_::types"); +} + +// SCGFailureInformation ::= SEQUENCE +SRSASN_CODE scg_fail_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void scg_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 scg_fail_info_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +scg_fail_info_ies_s& scg_fail_info_s::crit_exts_c_::set_scg_fail_info() +{ + set(types::scg_fail_info); + return c; +} +void scg_fail_info_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void scg_fail_info_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scg_fail_info: + j.write_fieldname("scgFailureInformation"); + c.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(); +} +SRSASN_CODE scg_fail_info_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::scg_fail_info: + HANDLE_CODE(c.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; +} +SRSASN_CODE scg_fail_info_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::scg_fail_info: + HANDLE_CODE(c.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; +} + +const char* scg_fail_info_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"scgFailureInformation", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "scg_fail_info_s::crit_exts_c_::types"); +} + +// SCGFailureInformationEUTRA ::= SEQUENCE +SRSASN_CODE scg_fail_info_eutra_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE scg_fail_info_eutra_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void scg_fail_info_eutra_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void scg_fail_info_eutra_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +scg_fail_info_eutra_ies_s& scg_fail_info_eutra_s::crit_exts_c_::set_scg_fail_info_eutra() +{ + set(types::scg_fail_info_eutra); + return c; +} +void scg_fail_info_eutra_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void scg_fail_info_eutra_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::scg_fail_info_eutra: + j.write_fieldname("scgFailureInformationEUTRA"); + c.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(); +} +SRSASN_CODE scg_fail_info_eutra_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::scg_fail_info_eutra: + HANDLE_CODE(c.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 scg_fail_info_eutra_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::scg_fail_info_eutra: + HANDLE_CODE(c.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; +} + +const char* scg_fail_info_eutra_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"scgFailureInformationEUTRA", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "scg_fail_info_eutra_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) +{ + 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_complete_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_complete_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +security_mode_complete_ies_s& security_mode_complete_s::crit_exts_c_::set_security_mode_complete() +{ + set(types::security_mode_complete); + return c; +} +void security_mode_complete_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void security_mode_complete_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::security_mode_complete: + j.write_fieldname("securityModeComplete"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE security_mode_complete_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::security_mode_complete: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE security_mode_complete_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::security_mode_complete: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "security_mode_complete_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* security_mode_complete_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"securityModeComplete", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "security_mode_complete_s::crit_exts_c_::types"); +} + +// SecurityModeFailure ::= SEQUENCE +SRSASN_CODE security_mode_fail_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_fail_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_fail_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_fail_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +security_mode_fail_ies_s& security_mode_fail_s::crit_exts_c_::set_security_mode_fail() +{ + set(types::security_mode_fail); + return c; +} +void security_mode_fail_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +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.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(); +} +SRSASN_CODE security_mode_fail_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::security_mode_fail: + HANDLE_CODE(c.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.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; +} + +const char* security_mode_fail_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"securityModeFailure", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "security_mode_fail_s::crit_exts_c_::types"); +} + +// SidelinkUEInformationNR-r16 ::= SEQUENCE +SRSASN_CODE sidelink_ue_info_nr_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE sidelink_ue_info_nr_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void sidelink_ue_info_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void sidelink_ue_info_nr_r16_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +sidelink_ue_info_nr_r16_ies_s& sidelink_ue_info_nr_r16_s::crit_exts_c_::set_sidelink_ue_info_nr_r16() +{ + set(types::sidelink_ue_info_nr_r16); + return c; +} +void sidelink_ue_info_nr_r16_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void sidelink_ue_info_nr_r16_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::sidelink_ue_info_nr_r16: + j.write_fieldname("sidelinkUEInformationNR-r16"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "sidelink_ue_info_nr_r16_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE sidelink_ue_info_nr_r16_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::sidelink_ue_info_nr_r16: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "sidelink_ue_info_nr_r16_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE sidelink_ue_info_nr_r16_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::sidelink_ue_info_nr_r16: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "sidelink_ue_info_nr_r16_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* sidelink_ue_info_nr_r16_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"sidelinkUEInformationNR-r16", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "sidelink_ue_info_nr_r16_s::crit_exts_c_::types"); +} + +// UEAssistanceInformation ::= SEQUENCE +SRSASN_CODE ue_assist_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_assist_info_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_assist_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void ue_assist_info_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +ue_assist_info_ies_s& ue_assist_info_s::crit_exts_c_::set_ue_assist_info() +{ + set(types::ue_assist_info); + return c; +} +void ue_assist_info_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void ue_assist_info_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_assist_info: + j.write_fieldname("ueAssistanceInformation"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_assist_info_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_assist_info_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ue_assist_info: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_assist_info_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_assist_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.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_assist_info_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ue_assist_info_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"ueAssistanceInformation", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "ue_assist_info_s::crit_exts_c_::types"); +} + +// 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 ue_cap_info_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_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 ue_cap_info_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +ue_cap_info_ies_s& ue_cap_info_s::crit_exts_c_::set_ue_cap_info() +{ + set(types::ue_cap_info); + return c; +} +void ue_cap_info_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void ue_cap_info_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_cap_info: + j.write_fieldname("ueCapabilityInformation"); + c.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(); +} +SRSASN_CODE ue_cap_info_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ue_cap_info: + HANDLE_CODE(c.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; +} +SRSASN_CODE ue_cap_info_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ue_cap_info: + HANDLE_CODE(c.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; +} + +const char* ue_cap_info_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"ueCapabilityInformation", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "ue_cap_info_s::crit_exts_c_::types"); +} + +// UEInformationResponse-r16 ::= SEQUENCE +SRSASN_CODE ue_info_resp_r16_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_info_resp_r16_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_info_resp_r16_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_info_resp_r16_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +ue_info_resp_r16_ies_s& ue_info_resp_r16_s::crit_exts_c_::set_ue_info_resp_r16() +{ + set(types::ue_info_resp_r16); + return c; +} +void ue_info_resp_r16_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void ue_info_resp_r16_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_info_resp_r16: + j.write_fieldname("ueInformationResponse-r16"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_info_resp_r16_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_info_resp_r16_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ue_info_resp_r16: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_info_resp_r16_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_info_resp_r16_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ue_info_resp_r16: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_info_resp_r16_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ue_info_resp_r16_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"ueInformationResponse-r16", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "ue_info_resp_r16_s::crit_exts_c_::types"); +} + +// UEPositioningAssistanceInfo-r17 ::= SEQUENCE +SRSASN_CODE ue_positioning_assist_info_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_positioning_assist_info_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ue_positioning_assist_info_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void ue_positioning_assist_info_r17_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +ue_positioning_assist_info_r17_ies_s& +ue_positioning_assist_info_r17_s::crit_exts_c_::set_ue_positioning_assist_info_r17() +{ + set(types::ue_positioning_assist_info_r17); + return c; +} +void ue_positioning_assist_info_r17_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void ue_positioning_assist_info_r17_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ue_positioning_assist_info_r17: + j.write_fieldname("uePositioningAssistanceInfo-r17"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_positioning_assist_info_r17_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ue_positioning_assist_info_r17_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ue_positioning_assist_info_r17: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_positioning_assist_info_r17_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ue_positioning_assist_info_r17_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ue_positioning_assist_info_r17: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ue_positioning_assist_info_r17_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ue_positioning_assist_info_r17_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"uePositioningAssistanceInfo-r17", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "ue_positioning_assist_info_r17_s::crit_exts_c_::types"); +} + +// ULDedicatedMessageSegment-r16 ::= SEQUENCE +SRSASN_CODE ul_ded_msg_segment_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ded_msg_segment_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ul_ded_msg_segment_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void ul_ded_msg_segment_r16_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +ul_ded_msg_segment_r16_ies_s& ul_ded_msg_segment_r16_s::crit_exts_c_::set_ul_ded_msg_segment_r16() +{ + set(types::ul_ded_msg_segment_r16); + return c; +} +void ul_ded_msg_segment_r16_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void ul_ded_msg_segment_r16_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ul_ded_msg_segment_r16: + j.write_fieldname("ulDedicatedMessageSegment-r16"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_ded_msg_segment_r16_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_ded_msg_segment_r16_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ul_ded_msg_segment_r16: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_ded_msg_segment_r16_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_ded_msg_segment_r16_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ul_ded_msg_segment_r16: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_ded_msg_segment_r16_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ul_ded_msg_segment_r16_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"ulDedicatedMessageSegment-r16", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "ul_ded_msg_segment_r16_s::crit_exts_c_::types"); +} + +// ULInformationTransfer ::= SEQUENCE +SRSASN_CODE ul_info_transfer_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ul_info_transfer_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_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +ul_info_transfer_ies_s& ul_info_transfer_s::crit_exts_c_::set_ul_info_transfer() +{ + set(types::ul_info_transfer); + return c; +} +void ul_info_transfer_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void ul_info_transfer_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ul_info_transfer: + j.write_fieldname("ulInformationTransfer"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_info_transfer_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ul_info_transfer: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ul_info_transfer: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ul_info_transfer_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"ulInformationTransfer", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "ul_info_transfer_s::crit_exts_c_::types"); +} + +// ULInformationTransferIRAT-r16 ::= SEQUENCE +SRSASN_CODE ul_info_transfer_irat_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_irat_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ul_info_transfer_irat_r16_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_irat_r16_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_& ul_info_transfer_irat_r16_s::crit_exts_c_::set_c1() +{ + set(types::c1); + return c; +} +void ul_info_transfer_irat_r16_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void ul_info_transfer_irat_r16_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_irat_r16_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_info_transfer_irat_r16_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::c1: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_irat_r16_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_irat_r16_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_irat_r16_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +ul_info_transfer_irat_r16_ies_s& ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::set_ul_info_transfer_irat_r16() +{ + set(types::ul_info_transfer_irat_r16); + return c; +} +void ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::set_spare3() +{ + set(types::spare3); +} +void ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::set_spare2() +{ + set(types::spare2); +} +void ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::set_spare1() +{ + set(types::spare1); +} +void ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ul_info_transfer_irat_r16: + j.write_fieldname("ulInformationTransferIRAT-r16"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ul_info_transfer_irat_r16: + 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_info_transfer_irat_r16_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ul_info_transfer_irat_r16: + 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_info_transfer_irat_r16_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::types_opts::to_string() const +{ + static const char* names[] = {"ulInformationTransferIRAT-r16", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "ul_info_transfer_irat_r16_s::crit_exts_c_::c1_c_::types"); +} + +const char* ul_info_transfer_irat_r16_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"c1", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "ul_info_transfer_irat_r16_s::crit_exts_c_::types"); +} +uint8_t ul_info_transfer_irat_r16_s::crit_exts_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "ul_info_transfer_irat_r16_s::crit_exts_c_::types"); +} + +// 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_::set(types::options e) +{ + type_ = e; +} +ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_& ul_info_transfer_mrdc_s::crit_exts_c_::set_c1() +{ + set(types::c1); + return c; +} +void ul_info_transfer_mrdc_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void ul_info_transfer_mrdc_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_"); + } + j.end_obj(); +} +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.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_mrdc_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "ul_info_transfer_mrdc_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +ul_info_transfer_mrdc_ies_s& ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::set_ul_info_transfer_mrdc() +{ + set(types::ul_info_transfer_mrdc); + return c; +} +void ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::set_spare3() +{ + set(types::spare3); +} +void ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::set_spare2() +{ + set(types::spare2); +} +void ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::set_spare1() +{ + set(types::spare1); +} +void ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::ul_info_transfer_mrdc: + j.write_fieldname("ulInformationTransferMRDC"); + c.to_json(j); + break; + 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_"); + } + j.end_obj(); +} +SRSASN_CODE ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::ul_info_transfer_mrdc: + 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_info_transfer_mrdc_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::ul_info_transfer_mrdc: + 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_info_transfer_mrdc_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::types_opts::to_string() const +{ + static const char* names[] = {"ulInformationTransferMRDC", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "ul_info_transfer_mrdc_s::crit_exts_c_::c1_c_::types"); +} + +const char* ul_info_transfer_mrdc_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"c1", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 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 numbers[] = {1}; + return map_enum_number(numbers, 1, value, "ul_info_transfer_mrdc_s::crit_exts_c_::types"); +} + +// DRX-Config ::= SEQUENCE +SRSASN_CODE drx_cfg_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)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_cfg_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)); + + return SRSASN_SUCCESS; +} +void drx_cfg_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.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) +{ + destroy_(); + type_ = e; +} +drx_cfg_s::drx_on_dur_timer_c_::drx_on_dur_timer_c_(const drx_cfg_s::drx_on_dur_timer_c_& other) +{ + 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_"); + } +} +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) +{ + if (this == &other) { + return *this; + } + 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 *this; +} +uint8_t& drx_cfg_s::drx_on_dur_timer_c_::set_sub_milli_seconds() +{ + set(types::sub_milli_seconds); + return c.get(); +} +drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_e_& drx_cfg_s::drx_on_dur_timer_c_::set_milli_seconds() +{ + set(types::milli_seconds); + return c.get(); +} +void drx_cfg_s::drx_on_dur_timer_c_::to_json(json_writer& j) const +{ + j.start_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(); +} +SRSASN_CODE drx_cfg_s::drx_on_dur_timer_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)); + break; + case types::milli_seconds: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_cfg_s::drx_on_dur_timer_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)); + break; + case types::milli_seconds: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_s::drx_on_dur_timer_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_opts::to_string() const +{ + static const char* names[] = {"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(names, 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 numbers[] = {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(numbers, 24, value, "drx_cfg_s::drx_on_dur_timer_c_::milli_seconds_e_"); +} + +const char* drx_cfg_s::drx_on_dur_timer_c_::types_opts::to_string() const +{ + static const char* names[] = {"subMilliSeconds", "milliSeconds"}; + return convert_enum_idx(names, 2, value, "drx_cfg_s::drx_on_dur_timer_c_::types"); +} + +const char* drx_cfg_s::drx_inactivity_timer_opts::to_string() const +{ + static const char* names[] = {"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(names, 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 numbers[] = {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(numbers, 23, value, "drx_cfg_s::drx_inactivity_timer_e_"); +} + +const char* drx_cfg_s::drx_retx_timer_dl_opts::to_string() const +{ + static const char* names[] = {"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(names, 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 numbers[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; + return map_enum_number(numbers, 17, value, "drx_cfg_s::drx_retx_timer_dl_e_"); +} + +const char* drx_cfg_s::drx_retx_timer_ul_opts::to_string() const +{ + static const char* names[] = {"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(names, 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 numbers[] = {0, 1, 2, 4, 6, 8, 16, 24, 33, 40, 64, 80, 96, 112, 128, 160, 320}; + return map_enum_number(numbers, 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::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()); + 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_, "drx_cfg_s::drx_long_cycle_start_offset_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) +{ + 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()); + break; + case types::ms10240: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); + } + + return *this; +} +uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms10() +{ + set(types::ms10); + return c.get(); +} +uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms20() +{ + set(types::ms20); + return c.get(); +} +uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms32() +{ + set(types::ms32); + return c.get(); +} +uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms40() +{ + set(types::ms40); + return c.get(); +} +uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms60() +{ + set(types::ms60); + return c.get(); +} +uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms64() +{ + set(types::ms64); + return c.get(); +} +uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms70() +{ + set(types::ms70); + return c.get(); +} +uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms80() +{ + set(types::ms80); + return c.get(); +} +uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms128() +{ + set(types::ms128); + return c.get(); +} +uint8_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms160() +{ + set(types::ms160); + return c.get(); +} +uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms256() +{ + set(types::ms256); + return c.get(); +} +uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms320() +{ + set(types::ms320); + return c.get(); +} +uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms512() +{ + set(types::ms512); + return c.get(); +} +uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms640() +{ + set(types::ms640); + return c.get(); +} +uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms1024() +{ + set(types::ms1024); + return c.get(); +} +uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms1280() +{ + set(types::ms1280); + return c.get(); +} +uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms2048() +{ + set(types::ms2048); + return c.get(); +} +uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms2560() +{ + set(types::ms2560); + return c.get(); +} +uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms5120() +{ + set(types::ms5120); + return c.get(); +} +uint16_t& drx_cfg_s::drx_long_cycle_start_offset_c_::set_ms10240() +{ + set(types::ms10240); + return c.get(); +} +void drx_cfg_s::drx_long_cycle_start_offset_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()); + break; + case types::ms10240: + j.write_int("ms10240", c.get()); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); + } + j.end_obj(); +} +SRSASN_CODE drx_cfg_s::drx_long_cycle_start_offset_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)); + break; + case types::ms10240: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +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::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)); + break; + case types::ms10240: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); + break; + default: + log_invalid_choice_id(type_, "drx_cfg_s::drx_long_cycle_start_offset_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* drx_cfg_s::drx_long_cycle_start_offset_c_::types_opts::to_string() const +{ + static const char* names[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", + "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", + "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; + return convert_enum_idx(names, 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 numbers[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, + 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; + return map_enum_number(numbers, 20, value, "drx_cfg_s::drx_long_cycle_start_offset_c_::types"); +} + +const char* drx_cfg_s::short_drx_s_::drx_short_cycle_opts::to_string() const +{ + static const char* names[] = {"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(names, 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 numbers[] = {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(numbers, 23, value, "drx_cfg_s::short_drx_s_::drx_short_cycle_e_"); +} + +// BandCombinationInfo ::= SEQUENCE +SRSASN_CODE band_combination_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, band_combination_idx, (uint32_t)1u, (uint32_t)65536u)); + HANDLE_CODE(pack_dyn_seq_of(bref, allowed_feature_sets_list, 1, 128, integer_packer(1, 128))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE band_combination_info_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(band_combination_idx, bref, (uint32_t)1u, (uint32_t)65536u)); + HANDLE_CODE(unpack_dyn_seq_of(allowed_feature_sets_list, bref, 1, 128, integer_packer(1, 128))); + + return SRSASN_SUCCESS; +} +void band_combination_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("bandCombinationIndex", band_combination_idx); + j.start_array("allowedFeatureSetsList"); + for (const auto& e1 : allowed_feature_sets_list) { + j.write_int(e1); + } + j.end_array(); + j.end_obj(); +} + +// T-Offset-r16 ::= ENUMERATED +const char* t_offset_r16_opts::to_string() const +{ + static const char* names[] = {"ms0dot5", "ms0dot75", "ms1", "ms1dot5", "ms2", "ms2dot5", "ms3", "spare1"}; + return convert_enum_idx(names, 8, value, "t_offset_r16_e"); +} +float t_offset_r16_opts::to_number() const +{ + static const float numbers[] = {0.5, 0.75, 1.0, 1.5, 2.0, 2.5, 3.0}; + return map_enum_number(numbers, 7, value, "t_offset_r16_e"); +} +const char* t_offset_r16_opts::to_number_string() const +{ + static const char* number_strs[] = {"0.5", "0.75", "1", "1.5", "2", "2.5", "3"}; + return convert_enum_idx(number_strs, 8, value, "t_offset_r16_e"); +} + +// ConfigRestrictInfoSCG ::= SEQUENCE +SRSASN_CODE cfg_restrict_info_scg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(allowed_bc_list_mrdc.size() > 0, 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_present, 1)); + HANDLE_CODE(bref.pack(dummy_present, 1)); + + if (allowed_bc_list_mrdc.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, allowed_bc_list_mrdc, 1, 65536)); + } + if (pwr_coordination_fr1_present) { + HANDLE_CODE(bref.pack(pwr_coordination_fr1.p_max_nr_fr1_present, 1)); + HANDLE_CODE(bref.pack(pwr_coordination_fr1.p_max_eutra_present, 1)); + HANDLE_CODE(bref.pack(pwr_coordination_fr1.p_max_ue_fr1_present, 1)); + if (pwr_coordination_fr1.p_max_nr_fr1_present) { + HANDLE_CODE(pack_integer(bref, pwr_coordination_fr1.p_max_nr_fr1, (int8_t)-30, (int8_t)33)); + } + if (pwr_coordination_fr1.p_max_eutra_present) { + HANDLE_CODE(pack_integer(bref, pwr_coordination_fr1.p_max_eutra, (int8_t)-30, (int8_t)33)); + } + if (pwr_coordination_fr1.p_max_ue_fr1_present) { + HANDLE_CODE(pack_integer(bref, pwr_coordination_fr1.p_max_ue_fr1, (int8_t)-30, (int8_t)33)); + } + } + if (serv_cell_idx_range_scg_present) { + 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_present) { + HANDLE_CODE(pack_integer(bref, max_meas_freqs_scg, (uint8_t)1u, (uint8_t)32u)); + } + 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[2] |= p_max_nr_fr1_mcg_r16_present; + group_flags[2] |= pwr_coordination_fr2_r16.is_present(); + group_flags[2] |= nrdc_pc_mode_fr1_r16_present; + group_flags[2] |= nrdc_pc_mode_fr2_r16_present; + group_flags[2] |= max_meas_srs_res_scg_r16_present; + group_flags[2] |= max_meas_cli_res_scg_r16_present; + group_flags[2] |= max_num_ehc_contexts_sn_r16_present; + group_flags[2] |= allowed_reduced_cfg_for_overheat_r16.is_present(); + group_flags[2] |= max_toffset_r16_present; + group_flags[3] |= allowed_reduced_cfg_for_overheat_r17.is_present(); + group_flags[3] |= max_num_udc_drb_r17_present; + group_flags[3] |= max_num_cp_cc_andidates_r17_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)); + } + } + if (group_flags[2]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(p_max_nr_fr1_mcg_r16_present, 1)); + HANDLE_CODE(bref.pack(pwr_coordination_fr2_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(nrdc_pc_mode_fr1_r16_present, 1)); + HANDLE_CODE(bref.pack(nrdc_pc_mode_fr2_r16_present, 1)); + HANDLE_CODE(bref.pack(max_meas_srs_res_scg_r16_present, 1)); + HANDLE_CODE(bref.pack(max_meas_cli_res_scg_r16_present, 1)); + HANDLE_CODE(bref.pack(max_num_ehc_contexts_sn_r16_present, 1)); + HANDLE_CODE(bref.pack(allowed_reduced_cfg_for_overheat_r16.is_present(), 1)); + HANDLE_CODE(bref.pack(max_toffset_r16_present, 1)); + if (p_max_nr_fr1_mcg_r16_present) { + HANDLE_CODE(pack_integer(bref, p_max_nr_fr1_mcg_r16, (int8_t)-30, (int8_t)33)); + } + if (pwr_coordination_fr2_r16.is_present()) { + HANDLE_CODE(bref.pack(pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16_present, 1)); + HANDLE_CODE(bref.pack(pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16_present, 1)); + HANDLE_CODE(bref.pack(pwr_coordination_fr2_r16->p_max_ue_fr2_r16_present, 1)); + if (pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16_present) { + HANDLE_CODE(pack_integer(bref, pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16, (int8_t)-30, (int8_t)33)); + } + if (pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16_present) { + HANDLE_CODE(pack_integer(bref, pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16, (int8_t)-30, (int8_t)33)); + } + if (pwr_coordination_fr2_r16->p_max_ue_fr2_r16_present) { + HANDLE_CODE(pack_integer(bref, pwr_coordination_fr2_r16->p_max_ue_fr2_r16, (int8_t)-30, (int8_t)33)); + } + } + if (nrdc_pc_mode_fr1_r16_present) { + HANDLE_CODE(nrdc_pc_mode_fr1_r16.pack(bref)); + } + if (nrdc_pc_mode_fr2_r16_present) { + HANDLE_CODE(nrdc_pc_mode_fr2_r16.pack(bref)); + } + if (max_meas_srs_res_scg_r16_present) { + HANDLE_CODE(pack_integer(bref, max_meas_srs_res_scg_r16, (uint8_t)0u, (uint8_t)32u)); + } + if (max_meas_cli_res_scg_r16_present) { + HANDLE_CODE(pack_integer(bref, max_meas_cli_res_scg_r16, (uint8_t)0u, (uint8_t)64u)); + } + if (max_num_ehc_contexts_sn_r16_present) { + HANDLE_CODE(pack_integer(bref, max_num_ehc_contexts_sn_r16, (uint32_t)0u, (uint32_t)65536u)); + } + if (allowed_reduced_cfg_for_overheat_r16.is_present()) { + HANDLE_CODE(allowed_reduced_cfg_for_overheat_r16->pack(bref)); + } + if (max_toffset_r16_present) { + HANDLE_CODE(max_toffset_r16.pack(bref)); + } + } + if (group_flags[3]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(allowed_reduced_cfg_for_overheat_r17.is_present(), 1)); + HANDLE_CODE(bref.pack(max_num_udc_drb_r17_present, 1)); + HANDLE_CODE(bref.pack(max_num_cp_cc_andidates_r17_present, 1)); + if (allowed_reduced_cfg_for_overheat_r17.is_present()) { + HANDLE_CODE(allowed_reduced_cfg_for_overheat_r17->pack(bref)); + } + if (max_num_udc_drb_r17_present) { + HANDLE_CODE(pack_integer(bref, max_num_udc_drb_r17, (uint8_t)0u, (uint8_t)2u)); + } + if (max_num_cp_cc_andidates_r17_present) { + HANDLE_CODE(pack_integer(bref, max_num_cp_cc_andidates_r17, (uint8_t)0u, (uint8_t)7u)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cfg_restrict_info_scg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool allowed_bc_list_mrdc_present; + 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_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)); + } + if (pwr_coordination_fr1_present) { + HANDLE_CODE(bref.unpack(pwr_coordination_fr1.p_max_nr_fr1_present, 1)); + HANDLE_CODE(bref.unpack(pwr_coordination_fr1.p_max_eutra_present, 1)); + HANDLE_CODE(bref.unpack(pwr_coordination_fr1.p_max_ue_fr1_present, 1)); + if (pwr_coordination_fr1.p_max_nr_fr1_present) { + HANDLE_CODE(unpack_integer(pwr_coordination_fr1.p_max_nr_fr1, bref, (int8_t)-30, (int8_t)33)); + } + if (pwr_coordination_fr1.p_max_eutra_present) { + HANDLE_CODE(unpack_integer(pwr_coordination_fr1.p_max_eutra, bref, (int8_t)-30, (int8_t)33)); + } + if (pwr_coordination_fr1.p_max_ue_fr1_present) { + HANDLE_CODE(unpack_integer(pwr_coordination_fr1.p_max_ue_fr1, bref, (int8_t)-30, (int8_t)33)); + } + } + if (serv_cell_idx_range_scg_present) { + 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_present) { + HANDLE_CODE(unpack_integer(max_meas_freqs_scg, bref, (uint8_t)1u, (uint8_t)32u)); + } + if (dummy_present) { + HANDLE_CODE(unpack_integer(dummy, bref, (uint8_t)1u, (uint8_t)62u)); + } + + if (ext) { + ext_groups_unpacker_guard group_flags(4); + group_flags.unpack(bref); + + if (group_flags[0]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(sel_band_entries_mn_list, bref); + 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)); + } + } + if (group_flags[2]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(p_max_nr_fr1_mcg_r16_present, 1)); + unpack_presence_flag(pwr_coordination_fr2_r16, bref); + HANDLE_CODE(bref.unpack(nrdc_pc_mode_fr1_r16_present, 1)); + HANDLE_CODE(bref.unpack(nrdc_pc_mode_fr2_r16_present, 1)); + HANDLE_CODE(bref.unpack(max_meas_srs_res_scg_r16_present, 1)); + HANDLE_CODE(bref.unpack(max_meas_cli_res_scg_r16_present, 1)); + HANDLE_CODE(bref.unpack(max_num_ehc_contexts_sn_r16_present, 1)); + unpack_presence_flag(allowed_reduced_cfg_for_overheat_r16, bref); + HANDLE_CODE(bref.unpack(max_toffset_r16_present, 1)); + if (p_max_nr_fr1_mcg_r16_present) { + HANDLE_CODE(unpack_integer(p_max_nr_fr1_mcg_r16, bref, (int8_t)-30, (int8_t)33)); + } + if (pwr_coordination_fr2_r16.is_present()) { + HANDLE_CODE(bref.unpack(pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16_present, 1)); + HANDLE_CODE(bref.unpack(pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16_present, 1)); + HANDLE_CODE(bref.unpack(pwr_coordination_fr2_r16->p_max_ue_fr2_r16_present, 1)); + if (pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16_present) { + HANDLE_CODE(unpack_integer(pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16, bref, (int8_t)-30, (int8_t)33)); + } + if (pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16_present) { + HANDLE_CODE(unpack_integer(pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16, bref, (int8_t)-30, (int8_t)33)); + } + if (pwr_coordination_fr2_r16->p_max_ue_fr2_r16_present) { + HANDLE_CODE(unpack_integer(pwr_coordination_fr2_r16->p_max_ue_fr2_r16, bref, (int8_t)-30, (int8_t)33)); + } + } + if (nrdc_pc_mode_fr1_r16_present) { + HANDLE_CODE(nrdc_pc_mode_fr1_r16.unpack(bref)); + } + if (nrdc_pc_mode_fr2_r16_present) { + HANDLE_CODE(nrdc_pc_mode_fr2_r16.unpack(bref)); + } + if (max_meas_srs_res_scg_r16_present) { + HANDLE_CODE(unpack_integer(max_meas_srs_res_scg_r16, bref, (uint8_t)0u, (uint8_t)32u)); + } + if (max_meas_cli_res_scg_r16_present) { + HANDLE_CODE(unpack_integer(max_meas_cli_res_scg_r16, bref, (uint8_t)0u, (uint8_t)64u)); + } + if (max_num_ehc_contexts_sn_r16_present) { + HANDLE_CODE(unpack_integer(max_num_ehc_contexts_sn_r16, bref, (uint32_t)0u, (uint32_t)65536u)); + } + if (allowed_reduced_cfg_for_overheat_r16.is_present()) { + HANDLE_CODE(allowed_reduced_cfg_for_overheat_r16->unpack(bref)); + } + if (max_toffset_r16_present) { + HANDLE_CODE(max_toffset_r16.unpack(bref)); + } + } + if (group_flags[3]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + unpack_presence_flag(allowed_reduced_cfg_for_overheat_r17, bref); + HANDLE_CODE(bref.unpack(max_num_udc_drb_r17_present, 1)); + HANDLE_CODE(bref.unpack(max_num_cp_cc_andidates_r17_present, 1)); + if (allowed_reduced_cfg_for_overheat_r17.is_present()) { + HANDLE_CODE(allowed_reduced_cfg_for_overheat_r17->unpack(bref)); + } + if (max_num_udc_drb_r17_present) { + HANDLE_CODE(unpack_integer(max_num_udc_drb_r17, bref, (uint8_t)0u, (uint8_t)2u)); + } + if (max_num_cp_cc_andidates_r17_present) { + HANDLE_CODE(unpack_integer(max_num_cp_cc_andidates_r17, bref, (uint8_t)0u, (uint8_t)7u)); + } + } + } + return SRSASN_SUCCESS; +} +void cfg_restrict_info_scg_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (allowed_bc_list_mrdc.size() > 0) { + j.start_array("allowedBC-ListMRDC"); + for (const auto& e1 : allowed_bc_list_mrdc) { + e1.to_json(j); + } + j.end_array(); + } + if (pwr_coordination_fr1_present) { + j.write_fieldname("powerCoordination-FR1"); + j.start_obj(); + if (pwr_coordination_fr1.p_max_nr_fr1_present) { + j.write_int("p-maxNR-FR1", pwr_coordination_fr1.p_max_nr_fr1); + } + if (pwr_coordination_fr1.p_max_eutra_present) { + j.write_int("p-maxEUTRA", pwr_coordination_fr1.p_max_eutra); + } + if (pwr_coordination_fr1.p_max_ue_fr1_present) { + j.write_int("p-maxUE-FR1", pwr_coordination_fr1.p_max_ue_fr1); + } + j.end_obj(); + } + if (serv_cell_idx_range_scg_present) { + j.write_fieldname("servCellIndexRangeSCG"); + j.start_obj(); + j.write_int("lowBound", serv_cell_idx_range_scg.low_bound); + j.write_int("upBound", serv_cell_idx_range_scg.up_bound); + j.end_obj(); + } + if (max_meas_freqs_scg_present) { + j.write_int("maxMeasFreqsSCG", max_meas_freqs_scg); + } + 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); + } + if (p_max_nr_fr1_mcg_r16_present) { + j.write_int("p-maxNR-FR1-MCG-r16", p_max_nr_fr1_mcg_r16); + } + if (pwr_coordination_fr2_r16.is_present()) { + j.write_fieldname("powerCoordination-FR2-r16"); + j.start_obj(); + if (pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16_present) { + j.write_int("p-maxNR-FR2-MCG-r16", pwr_coordination_fr2_r16->p_max_nr_fr2_mcg_r16); + } + if (pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16_present) { + j.write_int("p-maxNR-FR2-SCG-r16", pwr_coordination_fr2_r16->p_max_nr_fr2_scg_r16); + } + if (pwr_coordination_fr2_r16->p_max_ue_fr2_r16_present) { + j.write_int("p-maxUE-FR2-r16", pwr_coordination_fr2_r16->p_max_ue_fr2_r16); + } + j.end_obj(); + } + if (nrdc_pc_mode_fr1_r16_present) { + j.write_str("nrdc-PC-mode-FR1-r16", nrdc_pc_mode_fr1_r16.to_string()); + } + if (nrdc_pc_mode_fr2_r16_present) { + j.write_str("nrdc-PC-mode-FR2-r16", nrdc_pc_mode_fr2_r16.to_string()); + } + if (max_meas_srs_res_scg_r16_present) { + j.write_int("maxMeasSRS-ResourceSCG-r16", max_meas_srs_res_scg_r16); + } + if (max_meas_cli_res_scg_r16_present) { + j.write_int("maxMeasCLI-ResourceSCG-r16", max_meas_cli_res_scg_r16); + } + if (max_num_ehc_contexts_sn_r16_present) { + j.write_int("maxNumberEHC-ContextsSN-r16", max_num_ehc_contexts_sn_r16); + } + if (allowed_reduced_cfg_for_overheat_r16.is_present()) { + j.write_fieldname("allowedReducedConfigForOverheating-r16"); + allowed_reduced_cfg_for_overheat_r16->to_json(j); + } + if (max_toffset_r16_present) { + j.write_str("maxToffset-r16", max_toffset_r16.to_string()); + } + if (allowed_reduced_cfg_for_overheat_r17.is_present()) { + j.write_fieldname("allowedReducedConfigForOverheating-r17"); + allowed_reduced_cfg_for_overheat_r17->to_json(j); + } + if (max_num_udc_drb_r17_present) { + j.write_int("maxNumberUDC-DRB-r17", max_num_udc_drb_r17); + } + if (max_num_cp_cc_andidates_r17_present) { + j.write_int("maxNumberCPCCandidates-r17", max_num_cp_cc_andidates_r17); + } + } + j.end_obj(); +} + +const char* cfg_restrict_info_scg_s::nrdc_pc_mode_fr1_r16_opts::to_string() const +{ + static const char* names[] = {"semi-static-mode1", "semi-static-mode2", "dynamic"}; + return convert_enum_idx(names, 3, value, "cfg_restrict_info_scg_s::nrdc_pc_mode_fr1_r16_e_"); +} +uint8_t cfg_restrict_info_scg_s::nrdc_pc_mode_fr1_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "cfg_restrict_info_scg_s::nrdc_pc_mode_fr1_r16_e_"); +} + +const char* cfg_restrict_info_scg_s::nrdc_pc_mode_fr2_r16_opts::to_string() const +{ + static const char* names[] = {"semi-static-mode1", "semi-static-mode2", "dynamic"}; + return convert_enum_idx(names, 3, value, "cfg_restrict_info_scg_s::nrdc_pc_mode_fr2_r16_e_"); +} +uint8_t cfg_restrict_info_scg_s::nrdc_pc_mode_fr2_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "cfg_restrict_info_scg_s::nrdc_pc_mode_fr2_r16_e_"); +} + +// VictimSystemType ::= SEQUENCE +SRSASN_CODE victim_sys_type_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(gps_present, 1)); + HANDLE_CODE(bref.pack(glonass_present, 1)); + HANDLE_CODE(bref.pack(bds_present, 1)); + HANDLE_CODE(bref.pack(galileo_present, 1)); + HANDLE_CODE(bref.pack(wlan_present, 1)); + HANDLE_CODE(bref.pack(bluetooth_present, 1)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE victim_sys_type_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(gps_present, 1)); + HANDLE_CODE(bref.unpack(glonass_present, 1)); + HANDLE_CODE(bref.unpack(bds_present, 1)); + HANDLE_CODE(bref.unpack(galileo_present, 1)); + HANDLE_CODE(bref.unpack(wlan_present, 1)); + HANDLE_CODE(bref.unpack(bluetooth_present, 1)); + + return SRSASN_SUCCESS; +} +void victim_sys_type_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (gps_present) { + j.write_str("gps", "true"); + } + if (glonass_present) { + j.write_str("glonass", "true"); + } + if (bds_present) { + j.write_str("bds", "true"); + } + if (galileo_present) { + j.write_str("galileo", "true"); + } + if (wlan_present) { + j.write_str("wlan", "true"); + } + if (bluetooth_present) { + j.write_str("bluetooth", "true"); + } + j.end_obj(); +} + +// AffectedCarrierFreqCombInfoMRDC ::= SEQUENCE +SRSASN_CODE affected_carrier_freq_comb_info_mrdc_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(affected_carrier_freq_comb_mrdc_present, 1)); + + HANDLE_CODE(victim_sys_type.pack(bref)); + HANDLE_CODE(interference_direction_mrdc.pack(bref)); + if (affected_carrier_freq_comb_mrdc_present) { + HANDLE_CODE(bref.pack(affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra.size() > 0, 1)); + if (affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, + affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra, + 1, + 32, + integer_packer(0, 262143))); + } + HANDLE_CODE(pack_dyn_seq_of(bref, + affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_nr, + 1, + 32, + integer_packer(0, 3279165))); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE affected_carrier_freq_comb_info_mrdc_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(affected_carrier_freq_comb_mrdc_present, 1)); + + HANDLE_CODE(victim_sys_type.unpack(bref)); + HANDLE_CODE(interference_direction_mrdc.unpack(bref)); + if (affected_carrier_freq_comb_mrdc_present) { + bool affected_carrier_freq_comb_eutra_present; + HANDLE_CODE(bref.unpack(affected_carrier_freq_comb_eutra_present, 1)); + if (affected_carrier_freq_comb_eutra_present) { + HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra, + bref, + 1, + 32, + integer_packer(0, 262143))); + } + HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_nr, + bref, + 1, + 32, + integer_packer(0, 3279165))); + } + + return SRSASN_SUCCESS; +} +void affected_carrier_freq_comb_info_mrdc_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("victimSystemType"); + victim_sys_type.to_json(j); + j.write_str("interferenceDirectionMRDC", interference_direction_mrdc.to_string()); + if (affected_carrier_freq_comb_mrdc_present) { + j.write_fieldname("affectedCarrierFreqCombMRDC"); + j.start_obj(); + if (affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra.size() > 0) { + j.start_array("affectedCarrierFreqCombEUTRA"); + for (const auto& e1 : affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_eutra) { + j.write_int(e1); + } + j.end_array(); + } + j.start_array("affectedCarrierFreqCombNR"); + for (const auto& e1 : affected_carrier_freq_comb_mrdc.affected_carrier_freq_comb_nr) { + j.write_int(e1); + } + j.end_array(); + j.end_obj(); + } + j.end_obj(); +} + +const char* affected_carrier_freq_comb_info_mrdc_s::interference_direction_mrdc_opts::to_string() const +{ + static const char* names[] = {"eutra-nr", "nr", "other", "utra-nr-other", "nr-other", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 8, value, "affected_carrier_freq_comb_info_mrdc_s::interference_direction_mrdc_e_"); +} + +// FrequencyConfig-NR-r16 ::= SEQUENCE +SRSASN_CODE freq_cfg_nr_r16_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, freq_band_ind_nr_r16, (uint16_t)1u, (uint16_t)1024u)); + HANDLE_CODE(pack_integer(bref, carrier_center_freq_nr_r16, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(pack_integer(bref, carrier_bw_nr_r16, (uint16_t)1u, (uint16_t)275u)); + HANDLE_CODE(subcarrier_spacing_nr_r16.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE freq_cfg_nr_r16_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(freq_band_ind_nr_r16, bref, (uint16_t)1u, (uint16_t)1024u)); + HANDLE_CODE(unpack_integer(carrier_center_freq_nr_r16, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(unpack_integer(carrier_bw_nr_r16, bref, (uint16_t)1u, (uint16_t)275u)); + HANDLE_CODE(subcarrier_spacing_nr_r16.unpack(bref)); + + return SRSASN_SUCCESS; +} +void freq_cfg_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("freqBandIndicatorNR-r16", freq_band_ind_nr_r16); + j.write_int("carrierCenterFreq-NR-r16", carrier_center_freq_nr_r16); + j.write_int("carrierBandwidth-NR-r16", carrier_bw_nr_r16); + j.write_str("subcarrierSpacing-NR-r16", subcarrier_spacing_nr_r16.to_string()); + j.end_obj(); +} + +// TransmissionBandwidth-EUTRA-r16 ::= ENUMERATED +const char* tx_bw_eutra_r16_opts::to_string() const +{ + static const char* names[] = {"rb6", "rb15", "rb25", "rb50", "rb75", "rb100"}; + return convert_enum_idx(names, 6, value, "tx_bw_eutra_r16_e"); +} +uint8_t tx_bw_eutra_r16_opts::to_number() const +{ + static const uint8_t numbers[] = {6, 15, 25, 50, 75, 100}; + return map_enum_number(numbers, 6, value, "tx_bw_eutra_r16_e"); +} + +// ServCellInfoXCG-EUTRA-r16 ::= SEQUENCE +SRSASN_CODE serv_cell_info_xcg_eutra_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(dl_carrier_freq_eutra_r16_present, 1)); + HANDLE_CODE(bref.pack(ul_carrier_freq_eutra_r16_present, 1)); + HANDLE_CODE(bref.pack(tx_bw_eutra_r16_present, 1)); + + if (dl_carrier_freq_eutra_r16_present) { + HANDLE_CODE(pack_integer(bref, dl_carrier_freq_eutra_r16, (uint32_t)0u, (uint32_t)262143u)); + } + if (ul_carrier_freq_eutra_r16_present) { + HANDLE_CODE(pack_integer(bref, ul_carrier_freq_eutra_r16, (uint32_t)0u, (uint32_t)262143u)); + } + if (tx_bw_eutra_r16_present) { + HANDLE_CODE(tx_bw_eutra_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE serv_cell_info_xcg_eutra_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(dl_carrier_freq_eutra_r16_present, 1)); + HANDLE_CODE(bref.unpack(ul_carrier_freq_eutra_r16_present, 1)); + HANDLE_CODE(bref.unpack(tx_bw_eutra_r16_present, 1)); + + if (dl_carrier_freq_eutra_r16_present) { + HANDLE_CODE(unpack_integer(dl_carrier_freq_eutra_r16, bref, (uint32_t)0u, (uint32_t)262143u)); + } + if (ul_carrier_freq_eutra_r16_present) { + HANDLE_CODE(unpack_integer(ul_carrier_freq_eutra_r16, bref, (uint32_t)0u, (uint32_t)262143u)); + } + if (tx_bw_eutra_r16_present) { + HANDLE_CODE(tx_bw_eutra_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void serv_cell_info_xcg_eutra_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dl_carrier_freq_eutra_r16_present) { + j.write_int("dl-CarrierFreq-EUTRA-r16", dl_carrier_freq_eutra_r16); + } + if (ul_carrier_freq_eutra_r16_present) { + j.write_int("ul-CarrierFreq-EUTRA-r16", ul_carrier_freq_eutra_r16); + } + if (tx_bw_eutra_r16_present) { + j.write_str("transmissionBandwidth-EUTRA-r16", tx_bw_eutra_r16.to_string()); + } + j.end_obj(); +} + +// ServCellInfoXCG-NR-r16 ::= SEQUENCE +SRSASN_CODE serv_cell_info_xcg_nr_r16_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(dl_freq_info_nr_r16_present, 1)); + HANDLE_CODE(bref.pack(ul_freq_info_nr_r16_present, 1)); + + if (dl_freq_info_nr_r16_present) { + HANDLE_CODE(dl_freq_info_nr_r16.pack(bref)); + } + if (ul_freq_info_nr_r16_present) { + HANDLE_CODE(ul_freq_info_nr_r16.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE serv_cell_info_xcg_nr_r16_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(dl_freq_info_nr_r16_present, 1)); + HANDLE_CODE(bref.unpack(ul_freq_info_nr_r16_present, 1)); + + if (dl_freq_info_nr_r16_present) { + HANDLE_CODE(dl_freq_info_nr_r16.unpack(bref)); + } + if (ul_freq_info_nr_r16_present) { + HANDLE_CODE(ul_freq_info_nr_r16.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void serv_cell_info_xcg_nr_r16_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (dl_freq_info_nr_r16_present) { + j.write_fieldname("dl-FreqInfo-NR-r16"); + dl_freq_info_nr_r16.to_json(j); + } + if (ul_freq_info_nr_r16_present) { + j.write_fieldname("ul-FreqInfo-NR-r16"); + ul_freq_info_nr_r16.to_json(j); + } + j.end_obj(); +} + +// DRX-Info2 ::= SEQUENCE +SRSASN_CODE drx_info2_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(drx_on_dur_timer.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_info2_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(drx_on_dur_timer.unpack(bref)); + + return SRSASN_SUCCESS; +} +void drx_info2_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("drx-onDurationTimer"); + drx_on_dur_timer.to_json(j); + j.end_obj(); +} + +void drx_info2_s::drx_on_dur_timer_c_::destroy_() {} +void drx_info2_s::drx_on_dur_timer_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +drx_info2_s::drx_on_dur_timer_c_::drx_on_dur_timer_c_(const drx_info2_s::drx_on_dur_timer_c_& other) +{ + 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_info2_s::drx_on_dur_timer_c_"); + } +} +drx_info2_s::drx_on_dur_timer_c_& +drx_info2_s::drx_on_dur_timer_c_::operator=(const drx_info2_s::drx_on_dur_timer_c_& other) +{ + if (this == &other) { + return *this; + } + 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_info2_s::drx_on_dur_timer_c_"); + } + + return *this; +} +uint8_t& drx_info2_s::drx_on_dur_timer_c_::set_sub_milli_seconds() +{ + set(types::sub_milli_seconds); + return c.get(); +} +drx_info2_s::drx_on_dur_timer_c_::milli_seconds_e_& drx_info2_s::drx_on_dur_timer_c_::set_milli_seconds() +{ + set(types::milli_seconds); + return c.get(); +} +void drx_info2_s::drx_on_dur_timer_c_::to_json(json_writer& j) const +{ + j.start_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_info2_s::drx_on_dur_timer_c_"); + } + j.end_obj(); +} +SRSASN_CODE drx_info2_s::drx_on_dur_timer_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)); + break; + case types::milli_seconds: + HANDLE_CODE(c.get().pack(bref)); + break; + default: + log_invalid_choice_id(type_, "drx_info2_s::drx_on_dur_timer_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_info2_s::drx_on_dur_timer_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)); + break; + case types::milli_seconds: + HANDLE_CODE(c.get().unpack(bref)); + break; + default: + log_invalid_choice_id(type_, "drx_info2_s::drx_on_dur_timer_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* drx_info2_s::drx_on_dur_timer_c_::milli_seconds_opts::to_string() const +{ + static const char* names[] = {"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(names, 32, value, "drx_info2_s::drx_on_dur_timer_c_::milli_seconds_e_"); +} +uint16_t drx_info2_s::drx_on_dur_timer_c_::milli_seconds_opts::to_number() const +{ + static const uint16_t numbers[] = {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(numbers, 24, value, "drx_info2_s::drx_on_dur_timer_c_::milli_seconds_e_"); +} + +const char* drx_info2_s::drx_on_dur_timer_c_::types_opts::to_string() const +{ + static const char* names[] = {"subMilliSeconds", "milliSeconds"}; + return convert_enum_idx(names, 2, value, "drx_info2_s::drx_on_dur_timer_c_::types"); +} + +// FR-Info ::= SEQUENCE +SRSASN_CODE fr_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, serv_cell_idx, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(fr_type.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE fr_info_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(serv_cell_idx, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(fr_type.unpack(bref)); + + return SRSASN_SUCCESS; +} +void fr_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servCellIndex", serv_cell_idx); + j.write_str("fr-Type", fr_type.to_string()); + j.end_obj(); +} + +const char* fr_info_s::fr_type_opts::to_string() const +{ + static const char* names[] = {"fr1", "fr2"}; + return convert_enum_idx(names, 2, value, "fr_info_s::fr_type_e_"); +} +uint8_t fr_info_s::fr_type_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 2}; + return map_enum_number(numbers, 2, value, "fr_info_s::fr_type_e_"); +} + +// NR-FreqInfo ::= SEQUENCE +SRSASN_CODE nr_freq_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(measured_freq_present, 1)); + + if (measured_freq_present) { + HANDLE_CODE(pack_integer(bref, measured_freq, (uint32_t)0u, (uint32_t)3279165u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE nr_freq_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(measured_freq_present, 1)); + + if (measured_freq_present) { + HANDLE_CODE(unpack_integer(measured_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); + } + + return SRSASN_SUCCESS; +} +void nr_freq_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (measured_freq_present) { + j.write_int("measuredFrequency", measured_freq); + } + j.end_obj(); +} + +// DRX-Info ::= SEQUENCE +SRSASN_CODE drx_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(short_drx_present, 1)); + + 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)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_info_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(short_drx_present, 1)); + + 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)); + } + + return SRSASN_SUCCESS; +} +void drx_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + 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.end_obj(); +} + +void drx_info_s::drx_long_cycle_start_offset_c_::destroy_() {} +void drx_info_s::drx_long_cycle_start_offset_c_::set(types::options e) +{ + destroy_(); + type_ = e; +} +drx_info_s::drx_long_cycle_start_offset_c_::drx_long_cycle_start_offset_c_( + const drx_info_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()); + 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_, "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) +{ + 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()); + break; + case types::ms10240: + c.set(other.c.get()); + break; + case types::nulltype: + break; + default: + log_invalid_choice_id(type_, "drx_info_s::drx_long_cycle_start_offset_c_"); + } + + return *this; +} +uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms10() +{ + set(types::ms10); + return c.get(); +} +uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms20() +{ + set(types::ms20); + return c.get(); +} +uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms32() +{ + set(types::ms32); + return c.get(); +} +uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms40() +{ + set(types::ms40); + return c.get(); +} +uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms60() +{ + set(types::ms60); + return c.get(); +} +uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms64() +{ + set(types::ms64); + return c.get(); +} +uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms70() +{ + set(types::ms70); + return c.get(); +} +uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms80() +{ + set(types::ms80); + return c.get(); +} +uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms128() +{ + set(types::ms128); + return c.get(); +} +uint8_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms160() +{ + set(types::ms160); + return c.get(); +} +uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms256() +{ + set(types::ms256); + return c.get(); +} +uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms320() +{ + set(types::ms320); + return c.get(); +} +uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms512() +{ + set(types::ms512); + return c.get(); +} +uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms640() +{ + set(types::ms640); + return c.get(); +} +uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms1024() +{ + set(types::ms1024); + return c.get(); +} +uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms1280() +{ + set(types::ms1280); + return c.get(); +} +uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms2048() +{ + set(types::ms2048); + return c.get(); +} +uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms2560() +{ + set(types::ms2560); + return c.get(); +} +uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms5120() +{ + set(types::ms5120); + return c.get(); +} +uint16_t& drx_info_s::drx_long_cycle_start_offset_c_::set_ms10240() +{ + set(types::ms10240); + return c.get(); +} +void drx_info_s::drx_long_cycle_start_offset_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()); + break; + case types::ms10240: + j.write_int("ms10240", c.get()); + break; + default: + log_invalid_choice_id(type_, "drx_info_s::drx_long_cycle_start_offset_c_"); + } + j.end_obj(); +} +SRSASN_CODE drx_info_s::drx_long_cycle_start_offset_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)); + break; + case types::ms10240: + HANDLE_CODE(pack_integer(bref, c.get(), (uint16_t)0u, (uint16_t)10239u)); + break; + default: + log_invalid_choice_id(type_, "drx_info_s::drx_long_cycle_start_offset_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE drx_info_s::drx_long_cycle_start_offset_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)); + break; + case types::ms10240: + HANDLE_CODE(unpack_integer(c.get(), bref, (uint16_t)0u, (uint16_t)10239u)); + break; + default: + log_invalid_choice_id(type_, "drx_info_s::drx_long_cycle_start_offset_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* drx_info_s::drx_long_cycle_start_offset_c_::types_opts::to_string() const +{ + static const char* names[] = {"ms10", "ms20", "ms32", "ms40", "ms60", "ms64", "ms70", + "ms80", "ms128", "ms160", "ms256", "ms320", "ms512", "ms640", + "ms1024", "ms1280", "ms2048", "ms2560", "ms5120", "ms10240"}; + return convert_enum_idx(names, 20, value, "drx_info_s::drx_long_cycle_start_offset_c_::types"); +} +uint16_t drx_info_s::drx_long_cycle_start_offset_c_::types_opts::to_number() const +{ + static const uint16_t numbers[] = {10, 20, 32, 40, 60, 64, 70, 80, 128, 160, + 256, 320, 512, 640, 1024, 1280, 2048, 2560, 5120, 10240}; + return map_enum_number(numbers, 20, value, "drx_info_s::drx_long_cycle_start_offset_c_::types"); +} + +const char* drx_info_s::short_drx_s_::drx_short_cycle_opts::to_string() const +{ + static const char* names[] = {"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(names, 32, value, "drx_info_s::short_drx_s_::drx_short_cycle_e_"); +} +uint16_t drx_info_s::short_drx_s_::drx_short_cycle_opts::to_number() const +{ + static const uint16_t numbers[] = {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(numbers, 23, value, "drx_info_s::short_drx_s_::drx_short_cycle_e_"); +} + +// CandidateCellCPC-r17 ::= SEQUENCE +SRSASN_CODE candidate_cell_cp_c_r17_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(pack_integer(bref, ssb_freq_r17, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(pack_dyn_seq_of(bref, candidate_cell_list_r17, 1, 8, integer_packer(0, 1007))); + + return SRSASN_SUCCESS; +} +SRSASN_CODE candidate_cell_cp_c_r17_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(unpack_integer(ssb_freq_r17, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE(unpack_dyn_seq_of(candidate_cell_list_r17, bref, 1, 8, integer_packer(0, 1007))); + + return SRSASN_SUCCESS; +} +void candidate_cell_cp_c_r17_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("ssbFrequency-r17", ssb_freq_r17); + j.start_array("candidateCellList-r17"); + for (const auto& e1 : candidate_cell_list_r17) { + j.write_int(e1); + } + j.end_array(); + j.end_obj(); +} + +// CG-ConfigInfo-v1730-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_info_v1730_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(fr1_carriers_mcg_r17_present, 1)); + HANDLE_CODE(bref.pack(fr2_carriers_mcg_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (fr1_carriers_mcg_r17_present) { + HANDLE_CODE(pack_integer(bref, fr1_carriers_mcg_r17, (uint8_t)1u, (uint8_t)32u)); + } + if (fr2_carriers_mcg_r17_present) { + HANDLE_CODE(pack_integer(bref, fr2_carriers_mcg_r17, (uint8_t)1u, (uint8_t)32u)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_v1730_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(fr1_carriers_mcg_r17_present, 1)); + HANDLE_CODE(bref.unpack(fr2_carriers_mcg_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (fr1_carriers_mcg_r17_present) { + HANDLE_CODE(unpack_integer(fr1_carriers_mcg_r17, bref, (uint8_t)1u, (uint8_t)32u)); + } + if (fr2_carriers_mcg_r17_present) { + HANDLE_CODE(unpack_integer(fr2_carriers_mcg_r17, bref, (uint8_t)1u, (uint8_t)32u)); + } + + return SRSASN_SUCCESS; +} +void cg_cfg_info_v1730_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (fr1_carriers_mcg_r17_present) { + j.write_int("fr1-Carriers-MCG-r17", fr1_carriers_mcg_r17); + } + if (fr2_carriers_mcg_r17_present) { + j.write_int("fr2-Carriers-MCG-r17", fr2_carriers_mcg_r17); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + j.start_obj(); + j.end_obj(); + } + j.end_obj(); +} + +// CG-ConfigInfo-v1700-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_info_v1700_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(candidate_cell_list_cp_c_r17.size() > 0, 1)); + HANDLE_CODE(bref.pack(two_phr_mode_mcg_r17_present, 1)); + HANDLE_CODE(bref.pack(low_mob_eval_connected_in_pcell_r17_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (candidate_cell_list_cp_c_r17.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, candidate_cell_list_cp_c_r17, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_v1700_ies_s::unpack(cbit_ref& bref) +{ + bool candidate_cell_list_cp_c_r17_present; + HANDLE_CODE(bref.unpack(candidate_cell_list_cp_c_r17_present, 1)); + HANDLE_CODE(bref.unpack(two_phr_mode_mcg_r17_present, 1)); + HANDLE_CODE(bref.unpack(low_mob_eval_connected_in_pcell_r17_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (candidate_cell_list_cp_c_r17_present) { + HANDLE_CODE(unpack_dyn_seq_of(candidate_cell_list_cp_c_r17, bref, 1, 8)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cg_cfg_info_v1700_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (candidate_cell_list_cp_c_r17.size() > 0) { + j.start_array("candidateCellListCPC-r17"); + for (const auto& e1 : candidate_cell_list_cp_c_r17) { + e1.to_json(j); + } + j.end_array(); + } + if (two_phr_mode_mcg_r17_present) { + j.write_str("twoPHRModeMCG-r17", "enabled"); + } + if (low_mob_eval_connected_in_pcell_r17_present) { + j.write_str("lowMobilityEvaluationConnectedInPCell-r17", "enabled"); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// CG-ConfigInfo-v1640-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_info_v1640_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(serv_cell_info_list_mcg_nr_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(serv_cell_info_list_mcg_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (serv_cell_info_list_mcg_nr_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, serv_cell_info_list_mcg_nr_r16, 1, 32)); + } + if (serv_cell_info_list_mcg_eutra_r16.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, serv_cell_info_list_mcg_eutra_r16, 1, 32)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_v1640_ies_s::unpack(cbit_ref& bref) +{ + bool serv_cell_info_list_mcg_nr_r16_present; + HANDLE_CODE(bref.unpack(serv_cell_info_list_mcg_nr_r16_present, 1)); + bool serv_cell_info_list_mcg_eutra_r16_present; + HANDLE_CODE(bref.unpack(serv_cell_info_list_mcg_eutra_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (serv_cell_info_list_mcg_nr_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(serv_cell_info_list_mcg_nr_r16, bref, 1, 32)); + } + if (serv_cell_info_list_mcg_eutra_r16_present) { + HANDLE_CODE(unpack_dyn_seq_of(serv_cell_info_list_mcg_eutra_r16, bref, 1, 32)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cg_cfg_info_v1640_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (serv_cell_info_list_mcg_nr_r16.size() > 0) { + j.start_array("servCellInfoListMCG-NR-r16"); + for (const auto& e1 : serv_cell_info_list_mcg_nr_r16) { + e1.to_json(j); + } + j.end_array(); + } + if (serv_cell_info_list_mcg_eutra_r16.size() > 0) { + j.start_array("servCellInfoListMCG-EUTRA-r16"); + for (const auto& e1 : serv_cell_info_list_mcg_eutra_r16) { + 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(); +} + +// CG-ConfigInfo-v1620-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_info_v1620_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_assist_info_source_scg_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_assist_info_source_scg_r16.size() > 0) { + HANDLE_CODE(ue_assist_info_source_scg_r16.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_v1620_ies_s::unpack(cbit_ref& bref) +{ + bool ue_assist_info_source_scg_r16_present; + HANDLE_CODE(bref.unpack(ue_assist_info_source_scg_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_assist_info_source_scg_r16_present) { + HANDLE_CODE(ue_assist_info_source_scg_r16.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cg_cfg_info_v1620_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_assist_info_source_scg_r16.size() > 0) { + j.write_str("ueAssistanceInformationSourceSCG-r16", ue_assist_info_source_scg_r16.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// CG-ConfigInfo-v1610-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_info_v1610_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(drx_info_mcg2_present, 1)); + HANDLE_CODE(bref.pack(aligned_drx_ind_present, 1)); + HANDLE_CODE(bref.pack(scg_fail_info_r16_present, 1)); + HANDLE_CODE(bref.pack(dummy1_present, 1)); + HANDLE_CODE(bref.pack(sidelink_ue_info_nr_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(sidelink_ue_info_eutra_r16.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (drx_info_mcg2_present) { + HANDLE_CODE(drx_info_mcg2.pack(bref)); + } + if (scg_fail_info_r16_present) { + HANDLE_CODE(scg_fail_info_r16.fail_type_r16.pack(bref)); + HANDLE_CODE(scg_fail_info_r16.meas_result_scg_r16.pack(bref)); + } + if (dummy1_present) { + HANDLE_CODE(dummy1.fail_type_eutra_r16.pack(bref)); + HANDLE_CODE(dummy1.meas_result_scg_eutra_r16.pack(bref)); + } + if (sidelink_ue_info_nr_r16.size() > 0) { + HANDLE_CODE(sidelink_ue_info_nr_r16.pack(bref)); + } + if (sidelink_ue_info_eutra_r16.size() > 0) { + HANDLE_CODE(sidelink_ue_info_eutra_r16.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_v1610_ies_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(bref.unpack(drx_info_mcg2_present, 1)); + HANDLE_CODE(bref.unpack(aligned_drx_ind_present, 1)); + HANDLE_CODE(bref.unpack(scg_fail_info_r16_present, 1)); + HANDLE_CODE(bref.unpack(dummy1_present, 1)); + bool sidelink_ue_info_nr_r16_present; + HANDLE_CODE(bref.unpack(sidelink_ue_info_nr_r16_present, 1)); + bool sidelink_ue_info_eutra_r16_present; + HANDLE_CODE(bref.unpack(sidelink_ue_info_eutra_r16_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (drx_info_mcg2_present) { + HANDLE_CODE(drx_info_mcg2.unpack(bref)); + } + if (scg_fail_info_r16_present) { + HANDLE_CODE(scg_fail_info_r16.fail_type_r16.unpack(bref)); + HANDLE_CODE(scg_fail_info_r16.meas_result_scg_r16.unpack(bref)); + } + if (dummy1_present) { + HANDLE_CODE(dummy1.fail_type_eutra_r16.unpack(bref)); + HANDLE_CODE(dummy1.meas_result_scg_eutra_r16.unpack(bref)); + } + if (sidelink_ue_info_nr_r16_present) { + HANDLE_CODE(sidelink_ue_info_nr_r16.unpack(bref)); + } + if (sidelink_ue_info_eutra_r16_present) { + HANDLE_CODE(sidelink_ue_info_eutra_r16.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cg_cfg_info_v1610_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (drx_info_mcg2_present) { + j.write_fieldname("drx-InfoMCG2"); + drx_info_mcg2.to_json(j); + } + if (aligned_drx_ind_present) { + j.write_str("alignedDRX-Indication", "true"); + } + if (scg_fail_info_r16_present) { + j.write_fieldname("scgFailureInfo-r16"); + j.start_obj(); + j.write_str("failureType-r16", scg_fail_info_r16.fail_type_r16.to_string()); + j.write_str("measResultSCG-r16", scg_fail_info_r16.meas_result_scg_r16.to_string()); + j.end_obj(); + } + if (dummy1_present) { + j.write_fieldname("dummy1"); + j.start_obj(); + j.write_str("failureTypeEUTRA-r16", dummy1.fail_type_eutra_r16.to_string()); + j.write_str("measResultSCG-EUTRA-r16", dummy1.meas_result_scg_eutra_r16.to_string()); + j.end_obj(); + } + if (sidelink_ue_info_nr_r16.size() > 0) { + j.write_str("sidelinkUEInformationNR-r16", sidelink_ue_info_nr_r16.to_string()); + } + if (sidelink_ue_info_eutra_r16.size() > 0) { + j.write_str("sidelinkUEInformationEUTRA-r16", sidelink_ue_info_eutra_r16.to_string()); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +const char* cg_cfg_info_v1610_ies_s::scg_fail_info_r16_s_::fail_type_r16_opts::to_string() const +{ + static const char* names[] = {"scg-lbtFailure-r16", + "beamFailureRecoveryFailure-r16", + "t312-Expiry-r16", + "bh-RLF-r16", + "beamFailure-r17", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 8, value, "cg_cfg_info_v1610_ies_s::scg_fail_info_r16_s_::fail_type_r16_e_"); +} +uint16_t cg_cfg_info_v1610_ies_s::scg_fail_info_r16_s_::fail_type_r16_opts::to_number() const +{ + if (value == t312_expiry_r16) { + return 312; + } + invalid_enum_number(value, "cg_cfg_info_v1610_ies_s::scg_fail_info_r16_s_::fail_type_r16_e_"); + return 0; +} + +const char* cg_cfg_info_v1610_ies_s::dummy1_s_::fail_type_eutra_r16_opts::to_string() const +{ + static const char* names[] = {"scg-lbtFailure-r16", + "beamFailureRecoveryFailure-r16", + "t312-Expiry-r16", + "spare5", + "spare4", + "spare3", + "spare2", + "spare1"}; + return convert_enum_idx(names, 8, value, "cg_cfg_info_v1610_ies_s::dummy1_s_::fail_type_eutra_r16_e_"); +} +uint16_t cg_cfg_info_v1610_ies_s::dummy1_s_::fail_type_eutra_r16_opts::to_number() const +{ + if (value == t312_expiry_r16) { + return 312; + } + invalid_enum_number(value, "cg_cfg_info_v1610_ies_s::dummy1_s_::fail_type_eutra_r16_e_"); + return 0; +} + +// 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (serv_frequencies_mn_nr.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, serv_frequencies_mn_nr, 1, 31, integer_packer(0, 3279165))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_v1590_ies_s::unpack(cbit_ref& bref) +{ + bool serv_frequencies_mn_nr_present; + 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))); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cg_cfg_info_v1590_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (serv_frequencies_mn_nr.size() > 0) { + 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"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// PH-UplinkCarrierMCG ::= SEQUENCE +SRSASN_CODE ph_ul_carrier_mcg_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(ph_type1or3.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE ph_ul_carrier_mcg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(ph_type1or3.unpack(bref)); + + return SRSASN_SUCCESS; +} +void ph_ul_carrier_mcg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_str("ph-Type1or3", ph_type1or3.to_string()); + j.end_obj(); +} + +const char* ph_ul_carrier_mcg_s::ph_type1or3_opts::to_string() const +{ + static const char* names[] = {"type1", "type3"}; + return convert_enum_idx(names, 2, value, "ph_ul_carrier_mcg_s::ph_type1or3_e_"); +} +uint8_t ph_ul_carrier_mcg_s::ph_type1or3_opts::to_number() const +{ + static const uint8_t numbers[] = {1, 3}; + return map_enum_number(numbers, 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(sftd_freq_list_eutra.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (sftd_freq_list_nr.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, sftd_freq_list_nr, 1, 3, integer_packer(0, 3279165))); + } + if (sftd_freq_list_eutra.size() > 0) { + 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) +{ + bool sftd_freq_list_nr_present; + HANDLE_CODE(bref.unpack(sftd_freq_list_nr_present, 1)); + bool sftd_freq_list_eutra_present; + 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.size() > 0) { + 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.size() > 0) { + 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 +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(ph_supplementary_ul_present, 1)); + + HANDLE_CODE(pack_integer(bref, serv_cell_idx, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(ph_ul.pack(bref)); + if (ph_supplementary_ul_present) { + HANDLE_CODE(ph_supplementary_ul.pack(bref)); + } + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= two_srs_pusch_repeat_r17_present; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(two_srs_pusch_repeat_r17_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE ph_info_mcg_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(bref.unpack(ph_supplementary_ul_present, 1)); + + HANDLE_CODE(unpack_integer(serv_cell_idx, bref, (uint8_t)0u, (uint8_t)31u)); + HANDLE_CODE(ph_ul.unpack(bref)); + if (ph_supplementary_ul_present) { + HANDLE_CODE(ph_supplementary_ul.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(two_srs_pusch_repeat_r17_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void ph_info_mcg_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_int("servCellIndex", serv_cell_idx); + j.write_fieldname("ph-Uplink"); + ph_ul.to_json(j); + if (ph_supplementary_ul_present) { + j.write_fieldname("ph-SupplementaryUplink"); + ph_supplementary_ul.to_json(j); + } + if (ext) { + if (two_srs_pusch_repeat_r17_present) { + j.write_str("twoSRS-PUSCH-Repetition-r17", "enabled"); + } + } + 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(candidate_cell_info_list_sn_eutra.size() > 0, 1)); + HANDLE_CODE(bref.pack(source_cfg_scg_eutra.size() > 0, 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.size() > 0, 1)); + HANDLE_CODE(bref.pack(fr_info_list_mcg.size() > 0, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (candidate_cell_info_list_mn_eutra.size() > 0) { + HANDLE_CODE(candidate_cell_info_list_mn_eutra.pack(bref)); + } + if (candidate_cell_info_list_sn_eutra.size() > 0) { + HANDLE_CODE(candidate_cell_info_list_sn_eutra.pack(bref)); + } + if (source_cfg_scg_eutra.size() > 0) { + 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.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, meas_result_cell_list_sftd_eutra, 1, 3)); + } + if (fr_info_list_mcg.size() > 0) { + 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) +{ + bool candidate_cell_info_list_mn_eutra_present; + HANDLE_CODE(bref.unpack(candidate_cell_info_list_mn_eutra_present, 1)); + bool candidate_cell_info_list_sn_eutra_present; + HANDLE_CODE(bref.unpack(candidate_cell_info_list_sn_eutra_present, 1)); + bool source_cfg_scg_eutra_present; + 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)); + bool meas_result_cell_list_sftd_eutra_present; + HANDLE_CODE(bref.unpack(meas_result_cell_list_sftd_eutra_present, 1)); + bool fr_info_list_mcg_present; + 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.size() > 0) { + j.write_str("candidateCellInfoListMN-EUTRA", candidate_cell_info_list_mn_eutra.to_string()); + } + if (candidate_cell_info_list_sn_eutra.size() > 0) { + j.write_str("candidateCellInfoListSN-EUTRA", candidate_cell_info_list_sn_eutra.to_string()); + } + if (source_cfg_scg_eutra.size() > 0) { + 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.size() > 0) { + 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.size() > 0) { + 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(); +} + +const char* cg_cfg_info_v1560_ies_s::scg_fail_info_eutra_s_::fail_type_eutra_opts::to_string() const +{ + static const char* names[] = {"t313-Expiry", "randomAccessProblem", "rlc-MaxNumRetx", "scg-ChangeFailure"}; + return convert_enum_idx(names, 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 numbers[] = {313}; + return map_enum_number(numbers, 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 +{ + HANDLE_CODE(bref.pack(ph_info_mcg.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_report_cgi_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ph_info_mcg.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, ph_info_mcg, 1, 32)); + } + if (meas_result_report_cgi_present) { + HANDLE_CODE(pack_integer(bref, meas_result_report_cgi.ssb_freq, (uint32_t)0u, (uint32_t)3279165u)); + 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; +} +SRSASN_CODE cg_cfg_info_v1540_ies_s::unpack(cbit_ref& bref) +{ + bool ph_info_mcg_present; + HANDLE_CODE(bref.unpack(ph_info_mcg_present, 1)); + HANDLE_CODE(bref.unpack(meas_result_report_cgi_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ph_info_mcg_present) { + HANDLE_CODE(unpack_dyn_seq_of(ph_info_mcg, bref, 1, 32)); + } + if (meas_result_report_cgi_present) { + HANDLE_CODE(unpack_integer(meas_result_report_cgi.ssb_freq, bref, (uint32_t)0u, (uint32_t)3279165u)); + HANDLE_CODE( + 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; +} +void cg_cfg_info_v1540_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ph_info_mcg.size() > 0) { + j.start_array("ph-InfoMCG"); + for (const auto& e1 : ph_info_mcg) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_result_report_cgi_present) { + j.write_fieldname("measResultReportCGI"); + j.start_obj(); + j.write_int("ssbFrequency", meas_result_report_cgi.ssb_freq); + j.write_int("cellForWhichToReportCGI", meas_result_report_cgi.cell_for_which_to_report_cgi); + j.write_fieldname("cgi-Info"); + meas_result_report_cgi.cgi_info.to_json(j); + j.end_obj(); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +// MRDC-AssistanceInfo ::= SEQUENCE +SRSASN_CODE mrdc_assist_info_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(pack_dyn_seq_of(bref, affected_carrier_freq_comb_info_list_mrdc, 1, 128)); + + if (ext) { + ext_groups_packer_guard group_flags; + group_flags[0] |= overheat_assist_scg_r16.size() > 0; + group_flags[1] |= overheat_assist_scg_fr2_2_r17.size() > 0; + group_flags.pack(bref); + + if (group_flags[0]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(overheat_assist_scg_r16.size() > 0, 1)); + if (overheat_assist_scg_r16.size() > 0) { + HANDLE_CODE(overheat_assist_scg_r16.pack(bref)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(overheat_assist_scg_fr2_2_r17.size() > 0, 1)); + if (overheat_assist_scg_fr2_2_r17.size() > 0) { + HANDLE_CODE(overheat_assist_scg_fr2_2_r17.pack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE mrdc_assist_info_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + HANDLE_CODE(unpack_dyn_seq_of(affected_carrier_freq_comb_info_list_mrdc, bref, 1, 128)); + + 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 overheat_assist_scg_r16_present; + HANDLE_CODE(bref.unpack(overheat_assist_scg_r16_present, 1)); + if (overheat_assist_scg_r16_present) { + HANDLE_CODE(overheat_assist_scg_r16.unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + bool overheat_assist_scg_fr2_2_r17_present; + HANDLE_CODE(bref.unpack(overheat_assist_scg_fr2_2_r17_present, 1)); + if (overheat_assist_scg_fr2_2_r17_present) { + HANDLE_CODE(overheat_assist_scg_fr2_2_r17.unpack(bref)); + } + } + } + return SRSASN_SUCCESS; +} +void mrdc_assist_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.start_array("affectedCarrierFreqCombInfoListMRDC"); + for (const auto& e1 : affected_carrier_freq_comb_info_list_mrdc) { + e1.to_json(j); + } + j.end_array(); + if (ext) { + if (overheat_assist_scg_r16.size() > 0) { + j.write_str("overheatingAssistanceSCG-r16", overheat_assist_scg_r16.to_string()); + } + if (overheat_assist_scg_fr2_2_r17.size() > 0) { + j.write_str("overheatingAssistanceSCG-FR2-2-r17", overheat_assist_scg_fr2_2_r17.to_string()); + } + } + j.end_obj(); +} + +// MeasConfigMN ::= SEQUENCE +SRSASN_CODE meas_cfg_mn_s::pack(bit_ref& bref) const +{ + bref.pack(ext, 1); + HANDLE_CODE(bref.pack(measured_frequencies_mn.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_gap_cfg_present, 1)); + HANDLE_CODE(bref.pack(gap_purpose_present, 1)); + + if (measured_frequencies_mn.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, measured_frequencies_mn, 1, 32)); + } + if (meas_gap_cfg_present) { + HANDLE_CODE(meas_gap_cfg.pack(bref)); + } + if (gap_purpose_present) { + 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[1] |= inter_freq_no_gap_r16_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)); + } + } + if (group_flags[1]) { + varlength_field_pack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.pack(inter_freq_no_gap_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +SRSASN_CODE meas_cfg_mn_s::unpack(cbit_ref& bref) +{ + bref.unpack(ext, 1); + bool measured_frequencies_mn_present; + HANDLE_CODE(bref.unpack(measured_frequencies_mn_present, 1)); + HANDLE_CODE(bref.unpack(meas_gap_cfg_present, 1)); + HANDLE_CODE(bref.unpack(gap_purpose_present, 1)); + + if (measured_frequencies_mn_present) { + HANDLE_CODE(unpack_dyn_seq_of(measured_frequencies_mn, bref, 1, 32)); + } + if (meas_gap_cfg_present) { + HANDLE_CODE(meas_gap_cfg.unpack(bref)); + } + if (gap_purpose_present) { + HANDLE_CODE(gap_purpose.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); + + unpack_presence_flag(meas_gap_cfg_fr2, bref); + if (meas_gap_cfg_fr2.is_present()) { + HANDLE_CODE(meas_gap_cfg_fr2->unpack(bref)); + } + } + if (group_flags[1]) { + varlength_field_unpack_guard varlen_scope(bref, false); + + HANDLE_CODE(bref.unpack(inter_freq_no_gap_r16_present, 1)); + } + } + return SRSASN_SUCCESS; +} +void meas_cfg_mn_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (measured_frequencies_mn.size() > 0) { + j.start_array("measuredFrequenciesMN"); + for (const auto& e1 : measured_frequencies_mn) { + e1.to_json(j); + } + j.end_array(); + } + if (meas_gap_cfg_present) { + j.write_fieldname("measGapConfig"); + meas_gap_cfg.to_json(j); + } + 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); + } + if (inter_freq_no_gap_r16_present) { + j.write_str("interFreqNoGap-r16", "true"); + } + } + j.end_obj(); +} + +const char* meas_cfg_mn_s::gap_purpose_opts::to_string() const +{ + static const char* names[] = {"perUE", "perFR1"}; + return convert_enum_idx(names, 2, value, "meas_cfg_mn_s::gap_purpose_e_"); +} +uint8_t meas_cfg_mn_s::gap_purpose_opts::to_number() const +{ + if (value == per_fr1) { + return 1; + } + invalid_enum_number(value, "meas_cfg_mn_s::gap_purpose_e_"); + return 0; +} + +// CG-ConfigInfo-IEs ::= SEQUENCE +SRSASN_CODE cg_cfg_info_ies_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(bref.pack(ue_cap_info.size() > 0, 1)); + HANDLE_CODE(bref.pack(candidate_cell_info_list_mn.size() > 0, 1)); + HANDLE_CODE(bref.pack(candidate_cell_info_list_sn.size() > 0, 1)); + HANDLE_CODE(bref.pack(meas_result_cell_list_sftd_nr.size() > 0, 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)); + HANDLE_CODE(bref.pack(meas_cfg_mn_present, 1)); + HANDLE_CODE(bref.pack(source_cfg_scg.size() > 0, 1)); + HANDLE_CODE(bref.pack(scg_rb_cfg.size() > 0, 1)); + HANDLE_CODE(bref.pack(mcg_rb_cfg.size() > 0, 1)); + HANDLE_CODE(bref.pack(mrdc_assist_info_present, 1)); + HANDLE_CODE(bref.pack(non_crit_ext_present, 1)); + + if (ue_cap_info.size() > 0) { + HANDLE_CODE(ue_cap_info.pack(bref)); + } + if (candidate_cell_info_list_mn.size() > 0) { + HANDLE_CODE(pack_dyn_seq_of(bref, candidate_cell_info_list_mn, 1, 8)); + } + if (candidate_cell_info_list_sn.size() > 0) { + HANDLE_CODE(candidate_cell_info_list_sn.pack(bref)); + } + if (meas_result_cell_list_sftd_nr.size() > 0) { + 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)); + HANDLE_CODE(scg_fail_info.meas_result_scg.pack(bref)); + } + if (cfg_restrict_info_present) { + HANDLE_CODE(cfg_restrict_info.pack(bref)); + } + if (drx_info_mcg_present) { + HANDLE_CODE(drx_info_mcg.pack(bref)); + } + if (meas_cfg_mn_present) { + HANDLE_CODE(meas_cfg_mn.pack(bref)); + } + if (source_cfg_scg.size() > 0) { + HANDLE_CODE(source_cfg_scg.pack(bref)); + } + if (scg_rb_cfg.size() > 0) { + HANDLE_CODE(scg_rb_cfg.pack(bref)); + } + if (mcg_rb_cfg.size() > 0) { + HANDLE_CODE(mcg_rb_cfg.pack(bref)); + } + if (mrdc_assist_info_present) { + HANDLE_CODE(mrdc_assist_info.pack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.pack(bref)); + } + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_ies_s::unpack(cbit_ref& bref) +{ + bool ue_cap_info_present; + HANDLE_CODE(bref.unpack(ue_cap_info_present, 1)); + bool candidate_cell_info_list_mn_present; + HANDLE_CODE(bref.unpack(candidate_cell_info_list_mn_present, 1)); + bool candidate_cell_info_list_sn_present; + HANDLE_CODE(bref.unpack(candidate_cell_info_list_sn_present, 1)); + bool meas_result_cell_list_sftd_nr_present; + 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)); + HANDLE_CODE(bref.unpack(meas_cfg_mn_present, 1)); + bool source_cfg_scg_present; + HANDLE_CODE(bref.unpack(source_cfg_scg_present, 1)); + bool scg_rb_cfg_present; + HANDLE_CODE(bref.unpack(scg_rb_cfg_present, 1)); + bool mcg_rb_cfg_present; + HANDLE_CODE(bref.unpack(mcg_rb_cfg_present, 1)); + HANDLE_CODE(bref.unpack(mrdc_assist_info_present, 1)); + HANDLE_CODE(bref.unpack(non_crit_ext_present, 1)); + + if (ue_cap_info_present) { + HANDLE_CODE(ue_cap_info.unpack(bref)); + } + if (candidate_cell_info_list_mn_present) { + HANDLE_CODE(unpack_dyn_seq_of(candidate_cell_info_list_mn, bref, 1, 8)); + } + if (candidate_cell_info_list_sn_present) { + HANDLE_CODE(candidate_cell_info_list_sn.unpack(bref)); + } + 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)); + HANDLE_CODE(scg_fail_info.meas_result_scg.unpack(bref)); + } + if (cfg_restrict_info_present) { + HANDLE_CODE(cfg_restrict_info.unpack(bref)); + } + if (drx_info_mcg_present) { + HANDLE_CODE(drx_info_mcg.unpack(bref)); + } + if (meas_cfg_mn_present) { + HANDLE_CODE(meas_cfg_mn.unpack(bref)); + } + if (source_cfg_scg_present) { + HANDLE_CODE(source_cfg_scg.unpack(bref)); + } + if (scg_rb_cfg_present) { + HANDLE_CODE(scg_rb_cfg.unpack(bref)); + } + if (mcg_rb_cfg_present) { + HANDLE_CODE(mcg_rb_cfg.unpack(bref)); + } + if (mrdc_assist_info_present) { + HANDLE_CODE(mrdc_assist_info.unpack(bref)); + } + if (non_crit_ext_present) { + HANDLE_CODE(non_crit_ext.unpack(bref)); + } + + return SRSASN_SUCCESS; +} +void cg_cfg_info_ies_s::to_json(json_writer& j) const +{ + j.start_obj(); + if (ue_cap_info.size() > 0) { + j.write_str("ue-CapabilityInfo", ue_cap_info.to_string()); + } + if (candidate_cell_info_list_mn.size() > 0) { + j.start_array("candidateCellInfoListMN"); + for (const auto& e1 : candidate_cell_info_list_mn) { + e1.to_json(j); + } + j.end_array(); + } + if (candidate_cell_info_list_sn.size() > 0) { + j.write_str("candidateCellInfoListSN", candidate_cell_info_list_sn.to_string()); + } + if (meas_result_cell_list_sftd_nr.size() > 0) { + j.start_array("measResultCellListSFTD-NR"); + for (const auto& e1 : meas_result_cell_list_sftd_nr) { + e1.to_json(j); + } + j.end_array(); + } + if (scg_fail_info_present) { + j.write_fieldname("scgFailureInfo"); + j.start_obj(); + j.write_str("failureType", scg_fail_info.fail_type.to_string()); + j.write_str("measResultSCG", scg_fail_info.meas_result_scg.to_string()); + j.end_obj(); + } + if (cfg_restrict_info_present) { + j.write_fieldname("configRestrictInfo"); + cfg_restrict_info.to_json(j); + } + if (drx_info_mcg_present) { + j.write_fieldname("drx-InfoMCG"); + drx_info_mcg.to_json(j); + } + if (meas_cfg_mn_present) { + j.write_fieldname("measConfigMN"); + meas_cfg_mn.to_json(j); + } + if (source_cfg_scg.size() > 0) { + j.write_str("sourceConfigSCG", source_cfg_scg.to_string()); + } + if (scg_rb_cfg.size() > 0) { + j.write_str("scg-RB-Config", scg_rb_cfg.to_string()); + } + if (mcg_rb_cfg.size() > 0) { + j.write_str("mcg-RB-Config", mcg_rb_cfg.to_string()); + } + if (mrdc_assist_info_present) { + j.write_fieldname("mrdc-AssistanceInfo"); + mrdc_assist_info.to_json(j); + } + if (non_crit_ext_present) { + j.write_fieldname("nonCriticalExtension"); + non_crit_ext.to_json(j); + } + j.end_obj(); +} + +const char* cg_cfg_info_ies_s::scg_fail_info_s_::fail_type_opts::to_string() const +{ + static const char* names[] = {"t310-Expiry", + "randomAccessProblem", + "rlc-MaxNumRetx", + "synchReconfigFailure-SCG", + "scg-reconfigFailure", + "srb3-IntegrityFailure"}; + return convert_enum_idx(names, 6, value, "cg_cfg_info_ies_s::scg_fail_info_s_::fail_type_e_"); +} +uint16_t cg_cfg_info_ies_s::scg_fail_info_s_::fail_type_opts::to_number() const +{ + switch (value) { + case t310_expiry: + return 310; + case srb3_integrity_fail: + return 3; + default: + invalid_enum_number(value, "cg_cfg_info_ies_s::scg_fail_info_s_::fail_type_e_"); + } + return 0; +} + +// CG-ConfigInfo ::= SEQUENCE +SRSASN_CODE cg_cfg_info_s::pack(bit_ref& bref) const +{ + HANDLE_CODE(crit_exts.pack(bref)); + + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_s::unpack(cbit_ref& bref) +{ + HANDLE_CODE(crit_exts.unpack(bref)); + + return SRSASN_SUCCESS; +} +void cg_cfg_info_s::to_json(json_writer& j) const +{ + j.start_obj(); + j.write_fieldname("criticalExtensions"); + crit_exts.to_json(j); + j.end_obj(); +} + +void cg_cfg_info_s::crit_exts_c_::set(types::options e) +{ + type_ = e; +} +cg_cfg_info_s::crit_exts_c_::c1_c_& cg_cfg_info_s::crit_exts_c_::set_c1() +{ + set(types::c1); + return c; +} +void cg_cfg_info_s::crit_exts_c_::set_crit_exts_future() +{ + set(types::crit_exts_future); +} +void cg_cfg_info_s::crit_exts_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::c1: + j.write_fieldname("c1"); + c.to_json(j); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "cg_cfg_info_s::crit_exts_c_"); + } + j.end_obj(); +} +SRSASN_CODE cg_cfg_info_s::crit_exts_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::c1: + HANDLE_CODE(c.pack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "cg_cfg_info_s::crit_exts_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_s::crit_exts_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::c1: + HANDLE_CODE(c.unpack(bref)); + break; + case types::crit_exts_future: + break; + default: + log_invalid_choice_id(type_, "cg_cfg_info_s::crit_exts_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +void cg_cfg_info_s::crit_exts_c_::c1_c_::set(types::options e) +{ + type_ = e; +} +cg_cfg_info_ies_s& cg_cfg_info_s::crit_exts_c_::c1_c_::set_cg_cfg_info() +{ + set(types::cg_cfg_info); + return c; +} +void cg_cfg_info_s::crit_exts_c_::c1_c_::set_spare3() +{ + set(types::spare3); +} +void cg_cfg_info_s::crit_exts_c_::c1_c_::set_spare2() +{ + set(types::spare2); +} +void cg_cfg_info_s::crit_exts_c_::c1_c_::set_spare1() +{ + set(types::spare1); +} +void cg_cfg_info_s::crit_exts_c_::c1_c_::to_json(json_writer& j) const +{ + j.start_obj(); + switch (type_) { + case types::cg_cfg_info: + j.write_fieldname("cg-ConfigInfo"); + c.to_json(j); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "cg_cfg_info_s::crit_exts_c_::c1_c_"); + } + j.end_obj(); +} +SRSASN_CODE cg_cfg_info_s::crit_exts_c_::c1_c_::pack(bit_ref& bref) const +{ + type_.pack(bref); + switch (type_) { + case types::cg_cfg_info: + HANDLE_CODE(c.pack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "cg_cfg_info_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_ENCODE_FAIL; + } + return SRSASN_SUCCESS; +} +SRSASN_CODE cg_cfg_info_s::crit_exts_c_::c1_c_::unpack(cbit_ref& bref) +{ + types e; + e.unpack(bref); + set(e); + switch (type_) { + case types::cg_cfg_info: + HANDLE_CODE(c.unpack(bref)); + break; + case types::spare3: + break; + case types::spare2: + break; + case types::spare1: + break; + default: + log_invalid_choice_id(type_, "cg_cfg_info_s::crit_exts_c_::c1_c_"); + return SRSASN_ERROR_DECODE_FAIL; + } + return SRSASN_SUCCESS; +} + +const char* cg_cfg_info_s::crit_exts_c_::c1_c_::types_opts::to_string() const +{ + static const char* names[] = {"cg-ConfigInfo", "spare3", "spare2", "spare1"}; + return convert_enum_idx(names, 4, value, "cg_cfg_info_s::crit_exts_c_::c1_c_::types"); +} + +const char* cg_cfg_info_s::crit_exts_c_::types_opts::to_string() const +{ + static const char* names[] = {"c1", "criticalExtensionsFuture"}; + return convert_enum_idx(names, 2, value, "cg_cfg_info_s::crit_exts_c_::types"); +} +uint8_t cg_cfg_info_s::crit_exts_c_::types_opts::to_number() const +{ + static const uint8_t numbers[] = {1}; + return map_enum_number(numbers, 1, value, "cg_cfg_info_s::crit_exts_c_::types"); +} diff --git a/lib/du_manager/converters/f1ap_configuration_helpers.cpp b/lib/du_manager/converters/f1ap_configuration_helpers.cpp index 29b8ebf3ca..279d947456 100644 --- a/lib/du_manager/converters/f1ap_configuration_helpers.cpp +++ b/lib/du_manager/converters/f1ap_configuration_helpers.cpp @@ -10,6 +10,7 @@ #include "f1ap_configuration_helpers.h" #include "asn1_rrc_config_helpers.h" +#include "srsran/asn1/rrc_nr/bcch_dl_sch_msg.h" #include "srsran/ran/bcd_helpers.h" #include "srsran/ran/nr_cgi_helpers.h" #include "srsran/support/error_handling.h" diff --git a/lib/mac/mac_dl/paging_pdu_assembler.cpp b/lib/mac/mac_dl/paging_pdu_assembler.cpp index 4532db4f7d..39d3ff62da 100644 --- a/lib/mac/mac_dl/paging_pdu_assembler.cpp +++ b/lib/mac/mac_dl/paging_pdu_assembler.cpp @@ -9,7 +9,7 @@ */ #include "paging_pdu_assembler.h" -#include "srsran/asn1/rrc_nr/rrc_nr.h" +#include "srsran/asn1/rrc_nr/pcch_msg.h" using namespace srsran; diff --git a/lib/rrc/ue/procedures/rrc_reestablishment_procedure.cpp b/lib/rrc/ue/procedures/rrc_reestablishment_procedure.cpp index 9620fdc563..f53564c226 100644 --- a/lib/rrc/ue/procedures/rrc_reestablishment_procedure.cpp +++ b/lib/rrc/ue/procedures/rrc_reestablishment_procedure.cpp @@ -10,6 +10,7 @@ #include "rrc_reestablishment_procedure.h" #include "rrc_setup_procedure.h" +#include "srsran/asn1/rrc_nr/dl_dcch_msg.h" #include "srsran/asn1/rrc_nr/nr_ue_variables.h" #include "srsran/cu_cp/cu_cp_types.h" #include "srsran/security/integrity.h" diff --git a/lib/rrc/ue/procedures/rrc_security_mode_command_procedure.h b/lib/rrc/ue/procedures/rrc_security_mode_command_procedure.h index 49273013b6..519f131701 100644 --- a/lib/rrc/ue/procedures/rrc_security_mode_command_procedure.h +++ b/lib/rrc/ue/procedures/rrc_security_mode_command_procedure.h @@ -13,7 +13,7 @@ #include "../rrc_ue_context.h" #include "../rrc_ue_logger.h" #include "rrc_ue_event_manager.h" -#include "srsran/asn1/rrc_nr/rrc_nr.h" +#include "srsran/asn1/rrc_nr/dl_dcch_msg_ies.h" #include "srsran/rrc/rrc_du.h" #include "srsran/rrc/rrc_ue.h" #include "srsran/support/async/async_task.h" diff --git a/lib/rrc/ue/procedures/rrc_setup_procedure.cpp b/lib/rrc/ue/procedures/rrc_setup_procedure.cpp index 269c40a411..87f0e3ecb3 100644 --- a/lib/rrc/ue/procedures/rrc_setup_procedure.cpp +++ b/lib/rrc/ue/procedures/rrc_setup_procedure.cpp @@ -10,6 +10,7 @@ #include "rrc_setup_procedure.h" #include "../rrc_asn1_helpers.h" +#include "srsran/asn1/rrc_nr/dl_ccch_msg.h" using namespace srsran; using namespace srsran::srs_cu_cp; diff --git a/lib/rrc/ue/procedures/rrc_setup_procedure.h b/lib/rrc/ue/procedures/rrc_setup_procedure.h index d3d7b9a017..fed8bae857 100644 --- a/lib/rrc/ue/procedures/rrc_setup_procedure.h +++ b/lib/rrc/ue/procedures/rrc_setup_procedure.h @@ -13,7 +13,6 @@ #include "../rrc_ue_context.h" #include "../rrc_ue_logger.h" #include "rrc_ue_event_manager.h" -#include "srsran/asn1/rrc_nr/rrc_nr.h" #include "srsran/rrc/rrc_du.h" #include "srsran/rrc/rrc_ue.h" #include "srsran/support/async/async_task.h" diff --git a/lib/rrc/ue/procedures/rrc_ue_event_manager.h b/lib/rrc/ue/procedures/rrc_ue_event_manager.h index e2e34d8ec8..9a803395ea 100644 --- a/lib/rrc/ue/procedures/rrc_ue_event_manager.h +++ b/lib/rrc/ue/procedures/rrc_ue_event_manager.h @@ -11,7 +11,7 @@ #pragma once #include "srsran/adt/expected.h" -#include "srsran/asn1/rrc_nr/rrc_nr.h" +#include "srsran/asn1/rrc_nr/ul_dcch_msg.h" #include "srsran/support/async/event_signal.h" #include "srsran/support/async/protocol_transaction_manager.h" diff --git a/lib/rrc/ue/rrc_asn1_converters.h b/lib/rrc/ue/rrc_asn1_converters.h index 39dac038c3..65cc140790 100644 --- a/lib/rrc/ue/rrc_asn1_converters.h +++ b/lib/rrc/ue/rrc_asn1_converters.h @@ -11,7 +11,6 @@ #pragma once #include "srsran/asn1/asn1_utils.h" -#include "srsran/asn1/rrc_nr/msg_common.h" #include "srsran/pdcp/pdcp_config.h" #include "srsran/ran/cu_types.h" #include "srsran/security/security.h" diff --git a/lib/rrc/ue/rrc_measurement_types_asn1_converters.h b/lib/rrc/ue/rrc_measurement_types_asn1_converters.h index 42388e1785..e96f892dd9 100644 --- a/lib/rrc/ue/rrc_measurement_types_asn1_converters.h +++ b/lib/rrc/ue/rrc_measurement_types_asn1_converters.h @@ -14,7 +14,6 @@ #include "srsran/asn1/asn1_utils.h" #include "srsran/asn1/rrc_nr/common.h" #include "srsran/asn1/rrc_nr/dl_dcch_msg.h" -#include "srsran/asn1/rrc_nr/msg_common.h" #include "srsran/asn1/rrc_nr/rrc_nr.h" #include "srsran/asn1/rrc_nr/ul_dcch_msg.h" #include "srsran/ran/subcarrier_spacing.h" diff --git a/lib/rrc/ue/rrc_ue_context.cpp b/lib/rrc/ue/rrc_ue_context.cpp index 450155f685..88361202ba 100644 --- a/lib/rrc/ue/rrc_ue_context.cpp +++ b/lib/rrc/ue/rrc_ue_context.cpp @@ -9,6 +9,7 @@ */ #include "rrc_ue_context.h" +#include "srsran/asn1/rrc_nr/rrc_nr.h" using namespace srsran; using namespace srs_cu_cp; diff --git a/lib/rrc/ue/rrc_ue_context.h b/lib/rrc/ue/rrc_ue_context.h index 887a28906c..31839a46bc 100644 --- a/lib/rrc/ue/rrc_ue_context.h +++ b/lib/rrc/ue/rrc_ue_context.h @@ -11,7 +11,8 @@ #pragma once #include "rrc_ue_srb_context.h" -#include "srsran/asn1/rrc_nr/rrc_nr.h" +#include "srsran/asn1/rrc_nr/ul_ccch_msg_ies.h" +#include "srsran/asn1/rrc_nr/ul_dcch_msg_ies.h" #include "srsran/cu_cp/up_resource_manager.h" #include "srsran/rrc/rrc_cell_context.h" #include "srsran/rrc/rrc_ue.h" diff --git a/lib/rrc/ue/rrc_ue_helpers.cpp b/lib/rrc/ue/rrc_ue_helpers.cpp index 0d566895d5..65665e747d 100644 --- a/lib/rrc/ue/rrc_ue_helpers.cpp +++ b/lib/rrc/ue/rrc_ue_helpers.cpp @@ -9,8 +9,12 @@ */ #include "rrc_ue_helpers.h" -#include "srsran/asn1/rrc_nr/msg_common.h" -#include "srsran/asn1/rrc_nr/rrc_nr.h" +#include "srsran/asn1/rrc_nr/dl_ccch_msg.h" +#include "srsran/asn1/rrc_nr/dl_dcch_msg.h" +#include "srsran/asn1/rrc_nr/ul_ccch_msg.h" +#include "srsran/asn1/rrc_nr/ul_ccch_msg_ies.h" +#include "srsran/asn1/rrc_nr/ul_dcch_msg.h" +#include "srsran/asn1/rrc_nr/ul_dcch_msg_ies.h" using namespace srsran; using namespace srs_cu_cp; diff --git a/lib/rrc/ue/rrc_ue_impl.cpp b/lib/rrc/ue/rrc_ue_impl.cpp index 757ee0f689..8492151f7f 100644 --- a/lib/rrc/ue/rrc_ue_impl.cpp +++ b/lib/rrc/ue/rrc_ue_impl.cpp @@ -11,6 +11,7 @@ #include "rrc_ue_impl.h" #include "procedures/rrc_security_mode_command_procedure.h" #include "rrc_ue_helpers.h" +#include "srsran/asn1/rrc_nr/rrc_nr.h" #include "srsran/support/srsran_assert.h" using namespace srsran; diff --git a/lib/rrc/ue/rrc_ue_message_handlers.cpp b/lib/rrc/ue/rrc_ue_message_handlers.cpp index 94f5cbb3dc..ef6511cd4f 100644 --- a/lib/rrc/ue/rrc_ue_message_handlers.cpp +++ b/lib/rrc/ue/rrc_ue_message_handlers.cpp @@ -16,6 +16,8 @@ #include "rrc_ue_helpers.h" #include "rrc_ue_impl.h" #include "ue/rrc_measurement_types_asn1_converters.h" +#include "srsran/asn1/rrc_nr/dl_ccch_msg.h" +#include "srsran/asn1/rrc_nr/ul_ccch_msg.h" #include "srsran/ran/lcid.h" using namespace srsran; diff --git a/lib/rrc/ue/rrc_ue_message_senders.cpp b/lib/rrc/ue/rrc_ue_message_senders.cpp index b8e93a1af6..433d58bf16 100644 --- a/lib/rrc/ue/rrc_ue_message_senders.cpp +++ b/lib/rrc/ue/rrc_ue_message_senders.cpp @@ -10,6 +10,8 @@ #include "rrc_ue_helpers.h" #include "rrc_ue_impl.h" +#include "srsran/asn1/rrc_nr/dl_ccch_msg.h" +#include "srsran/asn1/rrc_nr/dl_dcch_msg.h" using namespace srsran; using namespace srs_cu_cp; diff --git a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp index 96c360fd0b..7b260a67a3 100644 --- a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp +++ b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp @@ -14,7 +14,8 @@ #include "tests/unittests/f1ap/common/f1ap_cu_test_messages.h" #include "tests/unittests/ngap/ngap_test_messages.h" #include "srsran/asn1/f1ap/f1ap_pdu_contents_ue.h" -#include "srsran/asn1/rrc_nr/msg_common.h" +#include "srsran/asn1/rrc_nr/dl_ccch_msg.h" +#include "srsran/asn1/rrc_nr/dl_dcch_msg_ies.h" #include "srsran/e1ap/common/e1ap_message.h" #include "srsran/f1ap/common/f1ap_message.h" #include "srsran/ngap/ngap_message.h" diff --git a/tests/unittests/cu_cp/cu_cp_test_environment.cpp b/tests/unittests/cu_cp/cu_cp_test_environment.cpp index a8facd6a34..3e070cdd56 100644 --- a/tests/unittests/cu_cp/cu_cp_test_environment.cpp +++ b/tests/unittests/cu_cp/cu_cp_test_environment.cpp @@ -14,7 +14,8 @@ #include "tests/unittests/f1ap/common/f1ap_cu_test_messages.h" #include "tests/unittests/ngap/ngap_test_messages.h" #include "srsran/asn1/f1ap/f1ap_pdu_contents_ue.h" -#include "srsran/asn1/rrc_nr/msg_common.h" +#include "srsran/asn1/rrc_nr/dl_ccch_msg.h" +#include "srsran/asn1/rrc_nr/dl_ccch_msg_ies.h" #include "srsran/cu_cp/cu_cp_configuration_helpers.h" #include "srsran/cu_cp/cu_cp_factory.h" #include "srsran/cu_cp/cu_cp_types.h" diff --git a/tests/unittests/du_manager/sib_test.cpp b/tests/unittests/du_manager/sib_test.cpp index 94eba72474..119419f31e 100644 --- a/tests/unittests/du_manager/sib_test.cpp +++ b/tests/unittests/du_manager/sib_test.cpp @@ -9,11 +9,9 @@ */ #include "lib/du_manager/converters/f1ap_configuration_helpers.h" -#include "srsran/asn1/rrc_nr/rrc_nr.h" +#include "srsran/asn1/rrc_nr/sys_info.h" #include "srsran/ran/sib/system_info_config.h" #include -#include -#include #include #include diff --git a/tests/unittests/rrc/rrc_ue_test_helpers.h b/tests/unittests/rrc/rrc_ue_test_helpers.h index bcfedb0116..08a1c3cf27 100644 --- a/tests/unittests/rrc/rrc_ue_test_helpers.h +++ b/tests/unittests/rrc/rrc_ue_test_helpers.h @@ -14,6 +14,7 @@ #include "rrc_ue_test_messages.h" #include "test_helpers.h" #include "srsran/adt/byte_buffer.h" +#include "srsran/asn1/rrc_nr/dl_ccch_msg.h" #include "srsran/ran/subcarrier_spacing.h" #include "srsran/rrc/rrc_config.h" #include "srsran/rrc/rrc_du.h" diff --git a/tests/unittests/rrc/rrc_ue_test_messages.cpp b/tests/unittests/rrc/rrc_ue_test_messages.cpp index cd7ff714b5..cf607fa014 100644 --- a/tests/unittests/rrc/rrc_ue_test_messages.cpp +++ b/tests/unittests/rrc/rrc_ue_test_messages.cpp @@ -9,7 +9,9 @@ */ #include "rrc_ue_test_messages.h" +#include "srsran/asn1/rrc_nr/ul_ccch_msg.h" #include "srsran/asn1/rrc_nr/ul_dcch_msg.h" +#include "srsran/asn1/rrc_nr/ul_dcch_msg_ies.h" #include "srsran/ran/subcarrier_spacing.h" #include "srsran/security/security.h" diff --git a/tests/unittests/rrc/rrc_ue_test_messages.h b/tests/unittests/rrc/rrc_ue_test_messages.h index b85354ae32..462d3dc66f 100644 --- a/tests/unittests/rrc/rrc_ue_test_messages.h +++ b/tests/unittests/rrc/rrc_ue_test_messages.h @@ -10,7 +10,7 @@ #pragma once -#include "srsran/asn1/rrc_nr/msg_common.h" +#include "srsran/asn1/rrc_nr/ul_ccch_msg_ies.h" #include "srsran/e1ap/cu_cp/e1ap_cu_cp.h" #include "srsran/rrc/rrc_types.h" From 9ae540f6cf9be54f39f033cefaf6295f5b13fe32 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Mon, 12 Feb 2024 17:39:56 +0100 Subject: [PATCH 32/78] mac: fix tsan warning in test mode --- .../adapters/mac_test_mode_adapter.cpp | 193 +++++++++--------- lib/du_high/adapters/mac_test_mode_adapter.h | 3 +- 2 files changed, 95 insertions(+), 101 deletions(-) diff --git a/lib/du_high/adapters/mac_test_mode_adapter.cpp b/lib/du_high/adapters/mac_test_mode_adapter.cpp index 4ff8008cf2..70ce3003b1 100644 --- a/lib/du_high/adapters/mac_test_mode_adapter.cpp +++ b/lib/du_high/adapters/mac_test_mode_adapter.cpp @@ -92,92 +92,57 @@ void mac_test_mode_cell_adapter::handle_slot_indication(slot_point sl_tx) { if (test_ue_cfg.auto_ack_indication_delay.has_value()) { // auto-generation of CRC/UCI indication is enabled. - slot_point sl_rx = sl_tx - test_ue_cfg.auto_ack_indication_delay.value(); - slot_descision_history& entry = sched_decision_history[sl_rx.to_uint() % sched_decision_history.size()]; - - // Handle pending PUCCHs. - if (not entry.pucchs.empty()) { - mac_uci_indication_message uci_ind; - uci_ind.sl_rx = sl_rx; - for (const pucch_info& pucch : entry.pucchs) { - if (pucch.crnti == rnti_t::INVALID_RNTI) { - // PUCCH has been already handled (UL PHY operational case) - continue; - } - - // Auto-generation of UCI indication in PUCCH. - mac_uci_pdu& pdu = uci_ind.ucis.emplace_back(); - pdu.rnti = pucch.crnti; - switch (pucch.format) { - case pucch_format::FORMAT_1: { - fill_uci_pdu(pdu.pdu.emplace(), pucch); - } break; - case pucch_format::FORMAT_2: { - fill_uci_pdu(pdu.pdu.emplace(), pucch); - } break; - default: - break; - } - } - - // Update test mode state. - on_test_mode_uci_pdu(sl_rx, uci_ind); - - // Forward MAC UCI to the real MAC. - adapted.handle_uci(uci_ind); - } + slot_point sl_rx = sl_tx - test_ue_cfg.auto_ack_indication_delay.value(); + const slot_descision_history& entry = sched_decision_history[sl_rx.to_uint() % sched_decision_history.size()]; + // Handle auto-generation of pending CRC indications. if (not entry.puschs.empty()) { - // In case there is UCI in the PUSCH, send an UCI indication to real MAC. - mac_uci_indication_message pusch_uci_ind{}; - pusch_uci_ind.sl_rx = sl_rx; - // Handle pending CRC indications mac_crc_indication_message crc_ind{}; crc_ind.sl_rx = sl_rx; for (const ul_sched_info& pusch : entry.puschs) { - if (pusch.uci.has_value()) { - // Auto-generation of UCI indication in PUSCH. - mac_uci_pdu& pdu = pusch_uci_ind.ucis.emplace_back(); - pdu.rnti = pusch.pusch_cfg.rnti; - fill_uci_pdu(pdu.pdu.emplace(), pusch); - } - - if (pusch.pusch_cfg.harq_id != INVALID_HARQ_ID) { - // Auto-generation of CRC indication. - // We (ab)use the HARQ id == INVALID_HARQ_ID to indicate that we do not need to auto-generate a CRC - // indication. - - auto& crc_pdu = crc_ind.crcs.emplace_back(); - crc_pdu.rnti = pusch.pusch_cfg.rnti; - crc_pdu.harq_id = pusch.pusch_cfg.harq_id; - // Force CRC=OK for test UE. - crc_pdu.tb_crc_success = true; - // Force UL SINR. - crc_pdu.ul_sinr_metric = 100; - } + auto& crc_pdu = crc_ind.crcs.emplace_back(); + crc_pdu.rnti = pusch.pusch_cfg.rnti; + crc_pdu.harq_id = pusch.pusch_cfg.harq_id; + // Force CRC=OK for test UE. + crc_pdu.tb_crc_success = true; + // Force UL SINR. + crc_pdu.ul_sinr_metric = 100; } - if (not pusch_uci_ind.ucis.empty()) { - on_test_mode_uci_pdu(sl_rx, pusch_uci_ind); - - // Forward MAC UCI to the real MAC. - adapted.handle_uci(pusch_uci_ind); - } + // Forward CRC to the real MAC. + forward_crc_ind_to_mac(crc_ind); + } - if (not crc_ind.crcs.empty()) { - // Forward CRC to the real MAC. - adapted.handle_crc(crc_ind); + // Handle auto-generation of pending UCI indications. + mac_uci_indication_message uci_ind; + uci_ind.sl_rx = sl_rx; + + // > Handle pending PUCCHs. + for (const pucch_info& pucch : entry.pucchs) { + mac_uci_pdu& pdu = uci_ind.ucis.emplace_back(); + pdu.rnti = pucch.crnti; + switch (pucch.format) { + case pucch_format::FORMAT_1: { + fill_uci_pdu(pdu.pdu.emplace(), pucch); + } break; + case pucch_format::FORMAT_2: { + fill_uci_pdu(pdu.pdu.emplace(), pucch); + } break; + default: + break; } + } - if (test_ue_cfg.pusch_active) { - for (const auto& crc_pdu : crc_ind.crcs) { - // In case of PUSCH test mode is enabled, push a BSR. - pdu_handler.handle_rx_data_indication( - create_test_pdu_with_bsr(sl_rx, crc_pdu.rnti, to_harq_id(crc_pdu.harq_id))); - } - } + // > Handle pending PUSCHs. + for (const ul_sched_info& pusch : entry.puschs) { + mac_uci_pdu& pdu = uci_ind.ucis.emplace_back(); + pdu.rnti = pusch.pusch_cfg.rnti; + fill_uci_pdu(pdu.pdu.emplace(), pusch); } + + // Forward UCI indication to real MAC. + forward_uci_ind_to_mac(uci_ind); } slot_handler.handle_slot_indication(sl_tx); @@ -204,27 +169,32 @@ void mac_test_mode_cell_adapter::handle_crc(const mac_crc_indication_message& ms for (const mac_crc_pdu& crc : msg.crcs) { if (ue_info_mgr.is_test_ue(crc.rnti)) { // test mode UE case. + + // Find respective PUSCH PDU that was previously scheduled. + const slot_descision_history& entry = sched_decision_history[msg.sl_rx.to_uint() % sched_decision_history.size()]; + bool found = std::any_of(entry.puschs.begin(), entry.puschs.end(), [&](const ul_sched_info& pusch) { + return pusch.pusch_cfg.rnti == crc.rnti and pusch.pusch_cfg.harq_id == crc.harq_id; + }); + if (not found) { + logger.warning( + "c-rnti={}: Mismatch between provided CRC and expected PUSCH for slot_rx={}", crc.rnti, msg.sl_rx); + continue; + } + // Intercept the CRC indication and force crc=OK and UL SNR. mac_crc_pdu test_crc = crc; test_crc.tb_crc_success = true; test_crc.ul_sinr_metric = 100; msg_copy.crcs.push_back(test_crc); - // Disable auto-generation of CRC indication for this UL HARQ. - slot_descision_history& entry = sched_decision_history[msg.sl_rx.to_uint() % sched_decision_history.size()]; - for (ul_sched_info& pusch : entry.puschs) { - if (pusch.pusch_cfg.rnti == crc.rnti and pusch.pusch_cfg.harq_id == crc.harq_id) { - pusch.pusch_cfg.harq_id = INVALID_HARQ_ID; - } - } } else { // non-test mode UE. Forward the original CRC PDU. msg_copy.crcs.push_back(crc); } } - if (not msg_copy.crcs.empty()) { - adapted.handle_crc(msg_copy); - } + + // Forward resulting CRC indication to real MAC. + forward_crc_ind_to_mac(msg_copy); } void mac_test_mode_cell_adapter::fill_uci_pdu(mac_uci_pdu::pucch_f0_or_f1_type& pucch_ind, @@ -319,8 +289,16 @@ static bool pucch_info_and_uci_ind_match(const pucch_info& pucch, const mac_uci_ return false; } -void mac_test_mode_cell_adapter::on_test_mode_uci_pdu(slot_point sl_rx, const mac_uci_indication_message& uci_msg) +void mac_test_mode_cell_adapter::forward_uci_ind_to_mac(const mac_uci_indication_message& uci_msg) { + if (uci_msg.ucis.empty()) { + return; + } + + // Forward UCI indication to real MAC. + adapted.handle_uci(uci_msg); + + // Update buffer states. for (const mac_uci_pdu& pdu : uci_msg.ucis) { if (ue_info_mgr.is_test_ue(pdu.rnti) and variant_holds_alternative(pdu.pdu)) { auto& f1_ind = variant_get(pdu.pdu); @@ -335,8 +313,8 @@ void mac_test_mode_cell_adapter::on_test_mode_uci_pdu(slot_point sl_rx, const ma } if (test_ue_cfg.pusch_active) { - // In case of PUSCH test mode is enabled, push a BSR. - pdu_handler.handle_rx_data_indication(create_test_pdu_with_bsr(sl_rx, pdu.rnti, to_harq_id(0))); + // In case of PUSCH test mode is enabled, push a BSR to trigger the first PUSCH. + pdu_handler.handle_rx_data_indication(create_test_pdu_with_bsr(uci_msg.sl_rx, pdu.rnti, to_harq_id(0))); } ue_info_mgr.msg4_rxed(pdu.rnti, true); } @@ -345,9 +323,32 @@ void mac_test_mode_cell_adapter::on_test_mode_uci_pdu(slot_point sl_rx, const ma } } +void mac_test_mode_cell_adapter::forward_crc_ind_to_mac(const mac_crc_indication_message& crc_msg) +{ + if (crc_msg.crcs.empty()) { + return; + } + + // Forward CRC indication to real MAC. + adapted.handle_crc(crc_msg); + + if (not test_ue_cfg.pusch_active) { + return; + } + + for (const mac_crc_pdu& pdu : crc_msg.crcs) { + if (not ue_info_mgr.is_test_ue(pdu.rnti)) { + continue; + } + + // In case of test mode UE, auto-forward a positive BSR. + pdu_handler.handle_rx_data_indication(create_test_pdu_with_bsr(crc_msg.sl_rx, pdu.rnti, to_harq_id(pdu.harq_id))); + } +} + void mac_test_mode_cell_adapter::handle_uci(const mac_uci_indication_message& msg) { - slot_descision_history& entry = sched_decision_history[msg.sl_rx.to_uint() % sched_decision_history.size()]; + const slot_descision_history& entry = sched_decision_history[msg.sl_rx.to_uint() % sched_decision_history.size()]; // Forward UCI to MAC, but alter the UCI for the test mode UE. mac_uci_indication_message msg_copy; @@ -365,18 +366,15 @@ void mac_test_mode_cell_adapter::handle_uci(const mac_uci_indication_message& ms bool entry_found = false; if (variant_holds_alternative(test_uci.pdu)) { - for (ul_sched_info& pusch : entry.puschs) { + for (const ul_sched_info& pusch : entry.puschs) { if (pusch.pusch_cfg.rnti == pdu.rnti and pusch.uci.has_value()) { fill_uci_pdu(variant_get(test_uci.pdu), pusch); - - // Disable auto-generation of UCI indication in PUSCH for this DL HARQ. - pusch.uci.reset(); entry_found = true; } } } else { // PUCCH case. - for (pucch_info& pucch : entry.pucchs) { + for (const pucch_info& pucch : entry.pucchs) { if (pucch_info_and_uci_ind_match(pucch, test_uci)) { // Intercept the UCI indication and force HARQ-ACK=ACK and UCI. if (pucch.format == pucch_format::FORMAT_1) { @@ -385,8 +383,6 @@ void mac_test_mode_cell_adapter::handle_uci(const mac_uci_indication_message& ms fill_uci_pdu(variant_get(test_uci.pdu), pucch); } entry_found = true; - // Disable auto-generation of UCI indication in PUCCH for this DL HARQ. - pucch.crnti = rnti_t::INVALID_RNTI; } } } @@ -396,12 +392,9 @@ void mac_test_mode_cell_adapter::handle_uci(const mac_uci_indication_message& ms logger.warning("c-rnti={}: Mismatch between provided UCI and expected UCI for slot_rx={}", pdu.rnti, msg.sl_rx); } } - if (not msg_copy.ucis.empty()) { - // Update test mode UE. - on_test_mode_uci_pdu(msg_copy.sl_rx, msg_copy); - adapted.handle_uci(msg_copy); - } + // Forward UCI indication to real MAC. + forward_uci_ind_to_mac(msg_copy); } // Intercepts the UL results coming from the MAC. diff --git a/lib/du_high/adapters/mac_test_mode_adapter.h b/lib/du_high/adapters/mac_test_mode_adapter.h index f368642f77..86daa22c9f 100644 --- a/lib/du_high/adapters/mac_test_mode_adapter.h +++ b/lib/du_high/adapters/mac_test_mode_adapter.h @@ -161,7 +161,8 @@ class mac_test_mode_cell_adapter : public mac_cell_control_information_handler, void fill_uci_pdu(mac_uci_pdu::pucch_f0_or_f1_type& pucch_ind, const pucch_info& pucch) const; void fill_uci_pdu(mac_uci_pdu::pucch_f2_or_f3_or_f4_type& pucch_ind, const pucch_info& pucch) const; void fill_uci_pdu(mac_uci_pdu::pusch_type& pusch_ind, const ul_sched_info& ul_grant) const; - void on_test_mode_uci_pdu(slot_point sl_rx, const mac_uci_indication_message& uci_msg); + void forward_uci_ind_to_mac(const mac_uci_indication_message& uci_msg); + void forward_crc_ind_to_mac(const mac_crc_indication_message& crc_msg); const srs_du::du_test_config::test_ue_config& test_ue_cfg; mac_cell_control_information_handler& adapted; From 2cb513f8f12ec204a495cfd2c900e4938493b98a Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Tue, 13 Feb 2024 17:22:59 +0100 Subject: [PATCH 33/78] mac: fix mac test mode unit test --- lib/du_high/adapters/mac_test_mode_adapter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/du_high/adapters/mac_test_mode_adapter.cpp b/lib/du_high/adapters/mac_test_mode_adapter.cpp index 70ce3003b1..cb97cd9a27 100644 --- a/lib/du_high/adapters/mac_test_mode_adapter.cpp +++ b/lib/du_high/adapters/mac_test_mode_adapter.cpp @@ -136,9 +136,11 @@ void mac_test_mode_cell_adapter::handle_slot_indication(slot_point sl_tx) // > Handle pending PUSCHs. for (const ul_sched_info& pusch : entry.puschs) { - mac_uci_pdu& pdu = uci_ind.ucis.emplace_back(); - pdu.rnti = pusch.pusch_cfg.rnti; - fill_uci_pdu(pdu.pdu.emplace(), pusch); + if (pusch.uci.has_value()) { + mac_uci_pdu& pdu = uci_ind.ucis.emplace_back(); + pdu.rnti = pusch.pusch_cfg.rnti; + fill_uci_pdu(pdu.pdu.emplace(), pusch); + } } // Forward UCI indication to real MAC. From f1092a6fb7f419efee238d2b495cba0e16cc465f Mon Sep 17 00:00:00 2001 From: qarlosalberto Date: Tue, 13 Feb 2024 09:50:36 +0100 Subject: [PATCH 34/78] ci: pcap default --- .gitlab/ci/e2e.yml | 12 ++++++------ .gitlab/ci/e2e/.env | 2 +- tests/e2e/tests/iperf.py | 6 +++--- tests/e2e/tests/iperf_alt.py | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitlab/ci/e2e.yml b/.gitlab/ci/e2e.yml index f960adbf61..d287fa2a2e 100644 --- a/.gitlab/ci/e2e.yml +++ b/.gitlab/ci/e2e.yml @@ -188,7 +188,7 @@ smoke-zmq: TESTBED: zmq MARKERS: "smoke" PYTEST_ARGS: "-x" - RETINA_ARGS: "gnb.all.pcap=True" + RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True" E2E_LOG_LEVEL: "debug" needs: - job: "smoke relwithdeb cached" @@ -247,7 +247,7 @@ zmq-alternative-configs: TESTBED: "zmq_single_ue" MARKERS: "zmq_single_ue" E2E_LOG_LEVEL: "info" - RETINA_ARGS: "gnb.all.pcap=True" + RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True" needs: - job: "basic relwithdeb" artifacts: true @@ -271,7 +271,7 @@ zmq-asan: extends: .zmq variables: MARKERS: "smoke" - RETINA_ARGS: "gnb.all.pcap=True" + RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True" interruptible: false needs: - job: "basic asan" @@ -283,7 +283,7 @@ zmq-tsan: extends: .zmq variables: MARKERS: "smoke" - RETINA_ARGS: "gnb.all.pcap=True" + RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True" interruptible: false needs: - job: "basic tsan" @@ -296,7 +296,7 @@ zmq-valgrind: variables: MARKERS: "zmq_valgrind" E2E_LOG_LEVEL: "warning" - RETINA_ARGS: "gnb.all.pcap=True" + RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True" interruptible: false needs: - job: "basic valgrind" @@ -405,7 +405,7 @@ viavi: MARKERS: "viavi" E2E_LOG_LEVEL: "warning" KUBECONFIG_VAR_NAME: "RETINA_NAMESPACE_KUBECONFIG" - RETINA_ARGS: "gnb.all.pcap=False" + RETINA_ARGS: "gnb.all.pcap=True" needs: - job: "basic avx512 dpdk" artifacts: true diff --git a/.gitlab/ci/e2e/.env b/.gitlab/ci/e2e/.env index 9abba8731c..bbe4cd3fef 100644 --- a/.gitlab/ci/e2e/.env +++ b/.gitlab/ci/e2e/.env @@ -1,6 +1,6 @@ SRSGNB_REGISTRY_URI=registry.gitlab.com/softwareradiosystems/srsgnb RETINA_REGISTRY_PREFIX=registry.gitlab.com/softwareradiosystems/ci/retina -RETINA_VERSION=0.41.20 +RETINA_VERSION=0.41.22 AMARISOFT_VERSION=2023-03-17 SRSUE_VERSION=23.11 OPEN5GS_VERSION=2.6.1 diff --git a/tests/e2e/tests/iperf.py b/tests/e2e/tests/iperf.py index e569d66844..f77f6bdb6f 100644 --- a/tests/e2e/tests/iperf.py +++ b/tests/e2e/tests/iperf.py @@ -199,7 +199,7 @@ def test_srsue( direction=direction, global_timing_advance=-1, time_alignment_calibration=0, - always_download_artifacts=True, + always_download_artifacts=False, common_search_space_enable=True, prach_config_index=1, ) @@ -381,7 +381,7 @@ def test_zmq_4x4_mimo( direction=direction, global_timing_advance=-1, time_alignment_calibration=0, - always_download_artifacts=True, + always_download_artifacts=False, ) @@ -476,7 +476,7 @@ def test_zmq_smoke( ), ) @mark.zmq -@mark.flaky(reruns=3, only_rerun=["failed to start", "iperf did not achieve the expected data rate"]) +@mark.flaky(reruns=1, only_rerun=["failed to start", "iperf did not achieve the expected data rate"]) # pylint: disable=too-many-arguments def test_zmq( retina_manager: RetinaTestManager, diff --git a/tests/e2e/tests/iperf_alt.py b/tests/e2e/tests/iperf_alt.py index b962daf1f1..563cf2b54e 100644 --- a/tests/e2e/tests/iperf_alt.py +++ b/tests/e2e/tests/iperf_alt.py @@ -76,7 +76,7 @@ def test_multiple_configs_zmq( ) configure_artifacts( retina_data=retina_data, - always_download_artifacts=True, + always_download_artifacts=False, ) ue_attach_info_dict = start_and_attach((ue,), gnb, fivegc, gnb_post_cmd=config) From 14e025ed456fdb4fbf5c9e2a6c60116a66366843 Mon Sep 17 00:00:00 2001 From: asaezper Date: Tue, 13 Feb 2024 14:54:42 +0100 Subject: [PATCH 35/78] ci,e2e: viavi test manual --- .gitlab/ci/build.yml | 4 ++-- .gitlab/ci/e2e.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index e2f64da7a1..0e01f0073c 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -1760,8 +1760,8 @@ basic avx512 dpdk: extends: .build_and_unit rules: - if: $CI_DESCRIPTION =~ /Nightly E2E Tests/ - when: delayed - start_in: 60 minutes + when: manual + allow_failure: true retry: 2 interruptible: false variables: diff --git a/.gitlab/ci/e2e.yml b/.gitlab/ci/e2e.yml index d287fa2a2e..406ce544e8 100644 --- a/.gitlab/ci/e2e.yml +++ b/.gitlab/ci/e2e.yml @@ -397,8 +397,8 @@ viavi: extends: .e2e-run rules: - if: $CI_DESCRIPTION =~ /Nightly E2E Tests/ - when: delayed - start_in: 5 hours + when: manual + allow_failure: true variables: GROUP: "viavi" TESTBED: "viavi" From dabdc9089e7a93750ae50558388ba1a263cf51b8 Mon Sep 17 00:00:00 2001 From: asaezper Date: Tue, 13 Feb 2024 14:55:48 +0100 Subject: [PATCH 36/78] ci: use new docker manifest template job --- .gitlab-ci.yml | 8 ++++---- .gitlab/ci/builders.yml | 25 +++++++------------------ .gitlab/ci/docker.yml | 6 +++--- .gitlab/ci/e2e.yml | 2 +- .gitlab/ci/e2e/.env | 2 +- .gitlab/ci/release.yml | 4 ++-- .gitlab/ci/trx.yml | 2 +- .gitlab/configuration.json | 4 ++-- 8 files changed, 21 insertions(+), 32 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 577666b49b..578d91b541 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,16 +13,16 @@ include: - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/setup/all.yml - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/features/all.yml - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/tools/python.yml - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/tools/test_reporter.yml - local: .gitlab/ci/builders/version.yml - local: .gitlab/ci/build.yml diff --git a/.gitlab/ci/builders.yml b/.gitlab/ci/builders.yml index 85eef57fff..91cdbf1a22 100644 --- a/.gitlab/ci/builders.yml +++ b/.gitlab/ci/builders.yml @@ -8,13 +8,13 @@ include: - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/setup/all.yml - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/tools/docker.yml - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/tools/python.yml - local: .gitlab/ci/builders/version.yml - local: .gitlab/ci/src_cache.yml @@ -263,7 +263,7 @@ ubuntu-dpdk-builder: - !reference [.fetch_src_cache, cache] .alternative-tag: - extends: .docker manifest + extends: .docker copy stage: alt registries variables: OS_NAME: none @@ -271,9 +271,6 @@ ubuntu-dpdk-builder: VERSION: $DOCKER_BUILDER_VERSION ALT_REGISTRY: ${GITLAB_REGISTRY_URI} script: - - | - DEBIAN_FRONTEND=noninteractive apt-get update && \ - apt-get install -y --no-install-recommends skopeo - | skopeo copy \ docker://${CR_REGISTRY_URI}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-$OS_NAME-$OS_VERSION:${VERSION} \ @@ -286,14 +283,9 @@ ubuntu-dpdk-builder: OS_NAME: none OS_VERSION: none VERSION: $DOCKER_BUILDER_VERSION - REGISTRY: ${CR_REGISTRY_URI} - script: + before_script: - | - docker manifest create \ - ${REGISTRY}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-${OS_NAME}-${OS_VERSION}:${VERSION} \ - --amend ${REGISTRY}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-${OS_NAME}-${OS_VERSION}:${VERSION}-amd64 \ - --amend ${REGISTRY}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-${OS_NAME}-${OS_VERSION}:${VERSION}-arm64 - docker manifest push ${REGISTRY}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-${OS_NAME}-${OS_VERSION}:${VERSION} + export NAME=builder-${OS_NAME}-${OS_VERSION} ################################################################################ # Codechecker @@ -865,15 +857,12 @@ alternative-tag [archlinux, latest, amd64]: - image-build-publish [archlinux, latest, amd64] manifest [archlinux, latest]: - extends: .docker manifest + extends: .docker copy stage: manifest variables: OS_NAME: archlinux OS_VERSION: latest script: - - | - DEBIAN_FRONTEND=noninteractive apt-get update && \ - apt-get install -y --no-install-recommends skopeo - | skopeo copy \ docker://${REGISTRY}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-$OS_NAME-$OS_VERSION:${DOCKER_BUILDER_VERSION}-amd64 \ diff --git a/.gitlab/ci/docker.yml b/.gitlab/ci/docker.yml index 3b130c907e..70161505fb 100644 --- a/.gitlab/ci/docker.yml +++ b/.gitlab/ci/docker.yml @@ -8,13 +8,13 @@ include: - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/setup/all.yml - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/tools/python.yml - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/tools/docker.yml ################################################################################ diff --git a/.gitlab/ci/e2e.yml b/.gitlab/ci/e2e.yml index 406ce544e8..28d08cb210 100644 --- a/.gitlab/ci/e2e.yml +++ b/.gitlab/ci/e2e.yml @@ -8,7 +8,7 @@ include: - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/setup/all.yml variables: diff --git a/.gitlab/ci/e2e/.env b/.gitlab/ci/e2e/.env index bbe4cd3fef..258dc00fe5 100644 --- a/.gitlab/ci/e2e/.env +++ b/.gitlab/ci/e2e/.env @@ -1,6 +1,6 @@ SRSGNB_REGISTRY_URI=registry.gitlab.com/softwareradiosystems/srsgnb RETINA_REGISTRY_PREFIX=registry.gitlab.com/softwareradiosystems/ci/retina -RETINA_VERSION=0.41.22 +RETINA_VERSION=0.42.1 AMARISOFT_VERSION=2023-03-17 SRSUE_VERSION=23.11 OPEN5GS_VERSION=2.6.1 diff --git a/.gitlab/ci/release.yml b/.gitlab/ci/release.yml index 0121509ad4..fc0e721580 100644 --- a/.gitlab/ci/release.yml +++ b/.gitlab/ci/release.yml @@ -8,10 +8,10 @@ include: - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/setup/all.yml - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/features/all.yml stages: diff --git a/.gitlab/ci/trx.yml b/.gitlab/ci/trx.yml index 1821d50f20..5fe4d53036 100644 --- a/.gitlab/ci/trx.yml +++ b/.gitlab/ci/trx.yml @@ -8,7 +8,7 @@ include: - project: softwareradiosystems/ci/tools - ref: "16" + ref: "17" file: .gitlab/ci-shared/setup/all.yml - local: .gitlab/ci/build.yml diff --git a/.gitlab/configuration.json b/.gitlab/configuration.json index ae31f62d3b..2f8fb08d72 100644 --- a/.gitlab/configuration.json +++ b/.gitlab/configuration.json @@ -34,10 +34,10 @@ "container_expiration_policy": { "cadence": "1d", "enabled": true, - "keep_n": 9, + "keep_n": 25, "older_than": "7d", "name_regex": ".*", - "name_regex_keep": null + "name_regex_keep": "" }, "container_registry_access_level": "enabled", "default_branch": "dev", From 52e51287ab6b9e9c8bc749a5af6954dcd6c98dab Mon Sep 17 00:00:00 2001 From: faluco Date: Tue, 6 Feb 2024 17:10:09 +0100 Subject: [PATCH 37/78] OFH: misc cleanups --- lib/ofh/receiver/ofh_message_receiver.cpp | 8 +++++--- lib/ofh/serdes/ofh_uplane_message_decoder_impl.cpp | 2 +- lib/ofh/transmitter/ofh_uplink_request_handler_impl.cpp | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/ofh/receiver/ofh_message_receiver.cpp b/lib/ofh/receiver/ofh_message_receiver.cpp index d0b761f219..21eb6f0939 100644 --- a/lib/ofh/receiver/ofh_message_receiver.cpp +++ b/lib/ofh/receiver/ofh_message_receiver.cpp @@ -54,11 +54,12 @@ void message_receiver::on_new_frame(span payload) // Verify the sequence identifier. const ecpri::iq_data_parameters& ecpri_iq_params = variant_get(ecpri_params.type_params); - int nof_skipped_seq_id = - seq_id_checker->update_and_compare_seq_id(ecpri_iq_params.pc_id, (ecpri_iq_params.seq_id >> 8)); + unsigned eaxc = ecpri_iq_params.pc_id; + int nof_skipped_seq_id = seq_id_checker->update_and_compare_seq_id(eaxc, (ecpri_iq_params.seq_id >> 8)); // Drop the message when it is from the past. if (nof_skipped_seq_id < 0) { logger.info("Dropped received Open Fronthaul User-Plane packet as sequence identifier field is from the past"); + return; } if (nof_skipped_seq_id > 0) { @@ -67,13 +68,14 @@ void message_receiver::on_new_frame(span payload) slot_symbol_point slot_point = uplane_decoder->peek_slot_symbol_point(ofh_pdu); if (!slot_point.get_slot().valid()) { + logger.info("Dropped received Open Fronthaul User-Plane packet as the slot field is invalid"); + return; } // Fill the reception window statistics. window_checker.update_rx_window_statistics(slot_point); - unsigned eaxc = variant_get(ecpri_params.type_params).pc_id; if (is_a_prach_message(uplane_decoder->peek_filter_index(ofh_pdu))) { data_flow_prach->decode_type1_message(eaxc, ofh_pdu); diff --git a/lib/ofh/serdes/ofh_uplane_message_decoder_impl.cpp b/lib/ofh/serdes/ofh_uplane_message_decoder_impl.cpp index d4de8beccc..c0b02764c6 100644 --- a/lib/ofh/serdes/ofh_uplane_message_decoder_impl.cpp +++ b/lib/ofh/serdes/ofh_uplane_message_decoder_impl.cpp @@ -335,7 +335,7 @@ filter_index_type uplane_message_decoder_impl::peek_filter_index(span message) const diff --git a/lib/ofh/transmitter/ofh_uplink_request_handler_impl.cpp b/lib/ofh/transmitter/ofh_uplink_request_handler_impl.cpp index a65a2fc729..4c3724d2c8 100644 --- a/lib/ofh/transmitter/ofh_uplink_request_handler_impl.cpp +++ b/lib/ofh/transmitter/ofh_uplink_request_handler_impl.cpp @@ -81,10 +81,10 @@ void uplink_request_handler_impl::handle_prach_occasion(const prach_buffer_conte static_cast(get_nof_slots_per_subframe(context.pusch_scs) * nof_symbols_per_slot); double len_msecs = (preamble_info.cp_length.to_seconds() + preamble_info.symbol_length.to_seconds()) * 1000; - unsigned nof_symbols = ceil(len_msecs / symbol_duration_msec); + unsigned nof_symbols = std::ceil(len_msecs / symbol_duration_msec); - unsigned prach_length_slots = static_cast(std::ceil( - static_cast(context.start_symbol + nof_symbols) / (static_cast(nof_symbols_per_slot)))); + unsigned prach_length_slots = + std::ceil(static_cast(context.start_symbol + nof_symbols) / static_cast(nof_symbols_per_slot)); // Subtract one to account for the current slot. slot_point slot = context.slot + (prach_length_slots - 1); From 6003113ab11b2e19d35c5b3b5658e8e9a0bd301b Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Tue, 30 Jan 2024 15:35:52 +0100 Subject: [PATCH 38/78] radio: initial radio plugins radio: fix dynamic library load radio: move plugin factory to different file radio: review factory documentation radio: review plugin factory --- include/srsran/radio/radio_configuration.h | 3 - include/srsran/radio/radio_factory.h | 27 +++- lib/radio/CMakeLists.txt | 6 +- lib/radio/plugin_radio_factory.cpp | 144 +++++++++++++++++++++ lib/radio/plugin_radio_factory.h | 21 +++ lib/radio/radio_factory.cpp | 17 ++- lib/radio/uhd/CMakeLists.txt | 10 +- lib/radio/uhd/radio_uhd_impl.cpp | 9 ++ lib/radio/zmq/CMakeLists.txt | 10 +- lib/radio/zmq/radio_factory_zmq_impl.cpp | 9 ++ 10 files changed, 235 insertions(+), 21 deletions(-) create mode 100644 lib/radio/plugin_radio_factory.cpp create mode 100644 lib/radio/plugin_radio_factory.h diff --git a/include/srsran/radio/radio_configuration.h b/include/srsran/radio/radio_configuration.h index 9ddabccbf7..eb874d1737 100644 --- a/include/srsran/radio/radio_configuration.h +++ b/include/srsran/radio/radio_configuration.h @@ -158,9 +158,6 @@ class validator virtual ~validator() = default; /// \brief Determines whether a radio configuration is valid. - /// - /// The call mi - /// /// \param[in] config Configuration parameters. /// \return True if the given radio configuration is valid for the given device, otherwise false. virtual bool is_configuration_valid(const radio& config) const = 0; diff --git a/include/srsran/radio/radio_factory.h b/include/srsran/radio/radio_factory.h index 1cf64d0126..ccd2ef49fb 100644 --- a/include/srsran/radio/radio_factory.h +++ b/include/srsran/radio/radio_factory.h @@ -10,17 +10,18 @@ #pragma once +#include "srsran/radio/radio_configuration.h" #include "srsran/radio/radio_session.h" #include "srsran/support/executors/task_executor.h" #include namespace srsran { -/// Describes a radio session factory for a determined radio driver. +/// Describes a radio session factory for a determined radio implementation. class radio_factory : public radio_base { public: - /// Returns a reference to . + /// Returns the reference to the radio configuration validator for the given factory. virtual const radio_configuration::validator& get_configuration_validator() = 0; /// \brief Creates a new radio session with the given configuration parameters. @@ -33,13 +34,29 @@ class radio_factory : public radio_base radio_notification_handler& notifier) = 0; }; -/// \brief Creates a radio factory. +/// \brief Dynamic library radio factory creation entry point. +/// +/// Implement a radio factory with this function for loading the radio factory through a dynamic library. +std::unique_ptr create_dynamic_radio_factory(); + +/// \brief Creates a radio factory by selecting an existent factory or loading the appropriate dynamic library. +/// +/// By default, this function creates a radio factory from the statically linked ones (i.e., \c uhd). +/// +/// If the driver_name does not match with one of the statically linked factories, this function dynamically loads a +/// shared library corresponding to the specified driver name and retrieves the factory creation function from it. +/// +/// The naming convention for the shared library is as follows: if the driver name is \c custom, the library name is +/// expected to be \c libsrsran_radio_custom.so. The factory creation function within the dynamic library is expected to +/// implement the function prototype \ref create_dynamic_radio_factory. +/// +/// Ensure that the LD_LIBRARY_PATH environment variable includes the path where the dynamic libraries are located. /// /// \param[in] driver_name Selects the type of radio factory for example \e uhd or \e zmq. -/// \return A valid radio factory if the provided driver name are valid. +/// \return A valid radio factory if the factory is successfully created, otherwise \c nullptr. std::unique_ptr create_radio_factory(std::string driver_name); -/// \brief Helper function to print all available radio factories to stdout. +/// \brief Helper function to print all statically linked available radio factories to \c stdout. void print_available_radio_factories(); } // namespace srsran diff --git a/lib/radio/CMakeLists.txt b/lib/radio/CMakeLists.txt index c38ed777e5..56ae4a0521 100644 --- a/lib/radio/CMakeLists.txt +++ b/lib/radio/CMakeLists.txt @@ -6,7 +6,9 @@ # the distribution. # -add_library(srsran_radio STATIC radio_factory.cpp) +add_library(srsran_radio STATIC + plugin_radio_factory.cpp + radio_factory.cpp) set(SRSGNB_RADIO_DEFINITIONS "") set(SRSGNB_RADIO_LIBRARIES "") @@ -24,6 +26,6 @@ if (ZEROMQ_FOUND AND ENABLE_ZEROMQ) endif (ZEROMQ_FOUND AND ENABLE_ZEROMQ) add_definitions(${SRSGNB_RADIO_DEFINITIONS}) -target_link_libraries(srsran_radio ${SRSGNB_RADIO_LIBRARIES} srslog) +target_link_libraries(srsran_radio ${SRSGNB_RADIO_LIBRARIES} srslog dl) install(TARGETS srsran_radio EXPORT srsran_export) \ No newline at end of file diff --git a/lib/radio/plugin_radio_factory.cpp b/lib/radio/plugin_radio_factory.cpp new file mode 100644 index 0000000000..33de26917b --- /dev/null +++ b/lib/radio/plugin_radio_factory.cpp @@ -0,0 +1,144 @@ +/* + * + * Copyright 2021-2024 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 "plugin_radio_factory.h" +#include "srsran/radio/radio_factory.h" +#include "srsran/radio/radio_session.h" +#include +#include + +using namespace srsran; + +namespace { + +/// Dynamic library handler deleter - closes the dynamic library upon destruction. +struct dynamic_library_deleter { + void operator()(void* handler) const + { + if (handler != nullptr) { + ::dlclose(handler); + } + } +}; + +using handler_ptr = std::shared_ptr; + +/// Wraps a radio session with the dynamic library handle. +class radio_dynamic_wrapper : public radio_session +{ +public: + /// Constructs a wrapper from the dynamic library handler and an open radio session. + explicit radio_dynamic_wrapper(handler_ptr handler_, std::unique_ptr session_) noexcept : + handler(std::move(handler_)), session(std::move(session_)) + { + } + + /// Default destructor - deletes the session first then the dynamic library handler. + ~radio_dynamic_wrapper() + { + session.reset(); + handler.reset(); + } + + radio_management_plane& get_management_plane() override { return session->get_management_plane(); } + baseband_gateway& get_baseband_gateway(unsigned stream_id) override + { + return session->get_baseband_gateway(stream_id); + } + baseband_gateway_timestamp read_current_time() override { return session->read_current_time(); } + void start(baseband_gateway_timestamp init_time) override { session->start(init_time); } + void stop() override { session->stop(); } + +private: + handler_ptr handler; + std::unique_ptr session; +}; + +/// Wraps a radio factory and a dynamic library handler. +class radio_factory_dynamic_wrapper : public radio_factory +{ +public: + /// Constructs from handler and factory. + radio_factory_dynamic_wrapper(handler_ptr handle_, std::unique_ptr factory_) : + handle(std::move(handle_)), factory(std::move(factory_)) + { + } + + /// Default destructor - deletes the factory first then the dynamic library handler. + ~radio_factory_dynamic_wrapper() + { + factory.reset(); + handle.reset(); + } + + // See interface for documentation. + const radio_configuration::validator& get_configuration_validator() override + { + return factory->get_configuration_validator(); + } + + // See interface for documentation. + std::unique_ptr create(const radio_configuration::radio& config, + task_executor& async_task_executor, + radio_notification_handler& notifier) override + { + return std::make_unique(handle, factory->create(config, async_task_executor, notifier)); + } + +private: + handler_ptr handle; + std::unique_ptr factory; +}; + +} // namespace + +std::unique_ptr srsran::create_plugin_radio_factory(std::string driver_name) +{ + char* err = nullptr; + std::string plugin_name = "libsrsran_radio_" + driver_name + ".so"; + + void* dl_handle = ::dlopen(plugin_name.c_str(), RTLD_NOW + RTLD_DEEPBIND + RTLD_GLOBAL); + if (dl_handle == nullptr) { + err = ::dlerror(); + if (err != nullptr) { + fmt::print("Failed to load RF plugin {}: {}\n", plugin_name, err); + } + return nullptr; + } + + // Create factory function prototype. + using create_factory_func = std::unique_ptr(void); + + // Load symbol. + auto* create_factory = + reinterpret_cast(::dlsym(dl_handle, "_ZN6srsran28create_dynamic_radio_factoryEv")); + + // Handle an error loading the symbol. + if (create_factory == nullptr) { + err = ::dlerror(); + if (err != nullptr) { + fmt::print("Error loading symbol {}: {}\n", "create_dynamic_radio_factory", err); + } + return nullptr; + } + + // Create factory. + std::unique_ptr factory = (*create_factory)(); + + if (factory == nullptr) { + return nullptr; + } + + // Create shared pointer with deleter. + dynamic_library_deleter deleter; + handler_ptr handle(dl_handle, deleter); + + return std::make_unique(std::move(handle), std::move(factory)); +} diff --git a/lib/radio/plugin_radio_factory.h b/lib/radio/plugin_radio_factory.h new file mode 100644 index 0000000000..d737877199 --- /dev/null +++ b/lib/radio/plugin_radio_factory.h @@ -0,0 +1,21 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/radio/radio_factory.h" +#include +#include + +namespace srsran { + +std::unique_ptr create_plugin_radio_factory(std::string driver_name); + +} // namespace srsran diff --git a/lib/radio/radio_factory.cpp b/lib/radio/radio_factory.cpp index 7b2c70d0c0..147b0229dc 100644 --- a/lib/radio/radio_factory.cpp +++ b/lib/radio/radio_factory.cpp @@ -18,6 +18,8 @@ #include "zmq/radio_factory_zmq_impl.h" #endif // ENABLE_ZMQ +#include "plugin_radio_factory.h" + using namespace srsran; namespace { @@ -27,8 +29,6 @@ struct radio_factory_entry { std::function()> make; }; -} // namespace - static const std::vector radio_factory_available_factories = { #ifdef ENABLE_UHD {"uhd", []() { return std::make_unique(); }}, @@ -38,6 +38,8 @@ static const std::vector radio_factory_available_factories #endif // ENABLE_ZMQ }; +} // namespace + void srsran::print_available_radio_factories() { if (radio_factory_available_factories.empty()) { @@ -61,11 +63,6 @@ void srsran::print_available_radio_factories() std::unique_ptr srsran::create_radio_factory(std::string driver_name) { - if (radio_factory_available_factories.empty()) { - fmt::print("No radio devices available.\n"); - return nullptr; - } - // Convert driver name to lower case. for (char& c : driver_name) { c = std::tolower(c); @@ -78,6 +75,12 @@ std::unique_ptr srsran::create_radio_factory(std::string driver_n } } + // Try creating a plugin radio factory. + auto factory = create_plugin_radio_factory(driver_name); + if (factory) { + return factory; + } + // No match, print available factories. fmt::print("Factory for radio type {} not found. Make sure to select a valid type.\n", driver_name); diff --git a/lib/radio/uhd/CMakeLists.txt b/lib/radio/uhd/CMakeLists.txt index 16ac593e56..b0f0939cc4 100644 --- a/lib/radio/uhd/CMakeLists.txt +++ b/lib/radio/uhd/CMakeLists.txt @@ -11,8 +11,14 @@ set(SOURCES_UHD radio_uhd_impl.cpp radio_uhd_rx_stream.cpp radio_uhd_tx_stream.cpp) -add_library(srsran_radio_uhd STATIC ${SOURCES_UHD}) -target_link_libraries(srsran_radio_uhd ${UHD_LIBRARIES}) +if (ENABLE_EXPORT) + add_library(srsran_radio_uhd SHARED ${SOURCES_UHD}) + add_compile_definitions(ENABLE_DYNAMIC_FACTORY) +else () + add_library(srsran_radio_uhd STATIC ${SOURCES_UHD}) +endif () + +target_link_libraries(srsran_radio_uhd ${UHD_LIBRARIES} fmt srslog) install(TARGETS srsran_radio_uhd EXPORT srsran_export) \ No newline at end of file diff --git a/lib/radio/uhd/radio_uhd_impl.cpp b/lib/radio/uhd/radio_uhd_impl.cpp index 55101498f1..52317970f6 100644 --- a/lib/radio/uhd/radio_uhd_impl.cpp +++ b/lib/radio/uhd/radio_uhd_impl.cpp @@ -499,3 +499,12 @@ std::unique_ptr radio_factory_uhd_impl::create(const radio_config } radio_config_uhd_config_validator radio_factory_uhd_impl::config_validator; + +#ifdef ENABLE_DYNAMIC_FACTORY + +std::unique_ptr srsran::create_dynamic_radio_factory() +{ + return std::make_unique(); +} + +#endif // ENABLE_DYNAMIC_FACTORY diff --git a/lib/radio/zmq/CMakeLists.txt b/lib/radio/zmq/CMakeLists.txt index 53b06d1497..0e8824b150 100644 --- a/lib/radio/zmq/CMakeLists.txt +++ b/lib/radio/zmq/CMakeLists.txt @@ -14,8 +14,14 @@ set(SOURCES_ZMQ radio_zmq_rx_stream.cpp radio_zmq_tx_channel.cpp radio_zmq_tx_stream.cpp) -add_library(srsran_radio_zmq STATIC ${SOURCES_ZMQ}) -target_link_libraries(srsran_radio_zmq ${ZEROMQ_LIBRARIES}) +if (ENABLE_EXPORT) + add_library(srsran_radio_zmq SHARED ${SOURCES_ZMQ}) + add_compile_definitions(ENABLE_DYNAMIC_FACTORY) +else () + add_library(srsran_radio_zmq STATIC ${SOURCES_ZMQ}) +endif () + +target_link_libraries(srsran_radio_zmq ${ZEROMQ_LIBRARIES} fmt srslog) install(TARGETS srsran_radio_zmq EXPORT srsran_export) \ No newline at end of file diff --git a/lib/radio/zmq/radio_factory_zmq_impl.cpp b/lib/radio/zmq/radio_factory_zmq_impl.cpp index e9056e8796..0bcb4bc2d0 100644 --- a/lib/radio/zmq/radio_factory_zmq_impl.cpp +++ b/lib/radio/zmq/radio_factory_zmq_impl.cpp @@ -37,3 +37,12 @@ const radio_configuration::validator& radio_factory_zmq_impl::get_configuration_ { return config_validator; } + +#ifdef ENABLE_DYNAMIC_FACTORY + +std::unique_ptr srsran::create_dynamic_radio_factory() +{ + return std::make_unique(); +} + +#endif // ENABLE_DYNAMIC_FACTORY \ No newline at end of file From 12c7d68f85623b57ed11d1cd613d7e6ce982320a Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Tue, 13 Feb 2024 18:18:34 +0100 Subject: [PATCH 39/78] radio: revert UHD and ZMQ dynamic libraries --- lib/radio/uhd/CMakeLists.txt | 7 +------ lib/radio/uhd/radio_uhd_impl.cpp | 9 --------- lib/radio/zmq/CMakeLists.txt | 8 +------- lib/radio/zmq/radio_factory_zmq_impl.cpp | 9 --------- 4 files changed, 2 insertions(+), 31 deletions(-) diff --git a/lib/radio/uhd/CMakeLists.txt b/lib/radio/uhd/CMakeLists.txt index b0f0939cc4..1ecb2bd997 100644 --- a/lib/radio/uhd/CMakeLists.txt +++ b/lib/radio/uhd/CMakeLists.txt @@ -12,12 +12,7 @@ set(SOURCES_UHD radio_uhd_rx_stream.cpp radio_uhd_tx_stream.cpp) -if (ENABLE_EXPORT) - add_library(srsran_radio_uhd SHARED ${SOURCES_UHD}) - add_compile_definitions(ENABLE_DYNAMIC_FACTORY) -else () - add_library(srsran_radio_uhd STATIC ${SOURCES_UHD}) -endif () +add_library(srsran_radio_uhd STATIC ${SOURCES_UHD}) target_link_libraries(srsran_radio_uhd ${UHD_LIBRARIES} fmt srslog) diff --git a/lib/radio/uhd/radio_uhd_impl.cpp b/lib/radio/uhd/radio_uhd_impl.cpp index 52317970f6..55101498f1 100644 --- a/lib/radio/uhd/radio_uhd_impl.cpp +++ b/lib/radio/uhd/radio_uhd_impl.cpp @@ -499,12 +499,3 @@ std::unique_ptr radio_factory_uhd_impl::create(const radio_config } radio_config_uhd_config_validator radio_factory_uhd_impl::config_validator; - -#ifdef ENABLE_DYNAMIC_FACTORY - -std::unique_ptr srsran::create_dynamic_radio_factory() -{ - return std::make_unique(); -} - -#endif // ENABLE_DYNAMIC_FACTORY diff --git a/lib/radio/zmq/CMakeLists.txt b/lib/radio/zmq/CMakeLists.txt index 0e8824b150..a9dc1037a0 100644 --- a/lib/radio/zmq/CMakeLists.txt +++ b/lib/radio/zmq/CMakeLists.txt @@ -14,13 +14,7 @@ set(SOURCES_ZMQ radio_zmq_rx_stream.cpp radio_zmq_tx_channel.cpp radio_zmq_tx_stream.cpp) - -if (ENABLE_EXPORT) - add_library(srsran_radio_zmq SHARED ${SOURCES_ZMQ}) - add_compile_definitions(ENABLE_DYNAMIC_FACTORY) -else () - add_library(srsran_radio_zmq STATIC ${SOURCES_ZMQ}) -endif () +add_library(srsran_radio_zmq STATIC ${SOURCES_ZMQ}) target_link_libraries(srsran_radio_zmq ${ZEROMQ_LIBRARIES} fmt srslog) diff --git a/lib/radio/zmq/radio_factory_zmq_impl.cpp b/lib/radio/zmq/radio_factory_zmq_impl.cpp index 0bcb4bc2d0..e9056e8796 100644 --- a/lib/radio/zmq/radio_factory_zmq_impl.cpp +++ b/lib/radio/zmq/radio_factory_zmq_impl.cpp @@ -37,12 +37,3 @@ const radio_configuration::validator& radio_factory_zmq_impl::get_configuration_ { return config_validator; } - -#ifdef ENABLE_DYNAMIC_FACTORY - -std::unique_ptr srsran::create_dynamic_radio_factory() -{ - return std::make_unique(); -} - -#endif // ENABLE_DYNAMIC_FACTORY \ No newline at end of file From 63bd5bf56c855f9e7d3d5f3da6da84ee503f43bd Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Tue, 13 Feb 2024 11:10:02 +0100 Subject: [PATCH 40/78] ru: fix dummy TSAN error and overdimension grid pool --- apps/gnb/gnb_appconfig_translators.cpp | 4 ++-- lib/ru/dummy/ru_dummy_rx_prach_buffer.h | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/gnb/gnb_appconfig_translators.cpp b/apps/gnb/gnb_appconfig_translators.cpp index 52c97445a2..75b48363c0 100644 --- a/apps/gnb/gnb_appconfig_translators.cpp +++ b/apps/gnb/gnb_appconfig_translators.cpp @@ -1632,8 +1632,8 @@ std::vector srsran::generate_du_low_config(const gnb_appconfig cfg.nof_rx_ports = cell.nof_antennas_ul; cfg.ldpc_decoder_iterations = config.expert_phy_cfg.pusch_decoder_max_iterations; cfg.ldpc_decoder_early_stop = config.expert_phy_cfg.pusch_decoder_early_stop; - cfg.nof_dl_rg = dl_pipeline_depth; - cfg.dl_rg_expire_timeout_slots = dl_pipeline_depth - 2; + cfg.nof_dl_rg = dl_pipeline_depth + 2; + cfg.dl_rg_expire_timeout_slots = dl_pipeline_depth; cfg.nof_dl_processors = dl_pipeline_depth; cfg.nof_ul_rg = ul_pipeline_depth; cfg.max_ul_thread_concurrency = config.expert_execution_cfg.threads.upper_threads.nof_ul_threads + 1; diff --git a/lib/ru/dummy/ru_dummy_rx_prach_buffer.h b/lib/ru/dummy/ru_dummy_rx_prach_buffer.h index c36aa486d7..e25e105284 100644 --- a/lib/ru/dummy/ru_dummy_rx_prach_buffer.h +++ b/lib/ru/dummy/ru_dummy_rx_prach_buffer.h @@ -63,7 +63,13 @@ class ru_dummy_rx_prach_buffer : private prach_buffer unsigned nof_fd_occasions = context.nof_fd_occasions; // Resize data to match context specifications. - data.resize({sequence_length, nof_symbols, nof_fd_occasions, nof_td_occasions, nof_ports}); + if ((sequence_length != data.get_dimension_size(dims::re)) || + (nof_symbols != data.get_dimension_size(dims::symbol)) || + (nof_fd_occasions != data.get_dimension_size(dims::fd_occasion)) || + (nof_td_occasions != data.get_dimension_size(dims::td_occasion)) || + (nof_ports != data.get_dimension_size(dims::port))) { + data.resize({sequence_length, nof_symbols, nof_fd_occasions, nof_td_occasions, nof_ports}); + } return *this; } From d3d538ec4eeb3e6fe5c4df53eb5e06ca0a5a8cad Mon Sep 17 00:00:00 2001 From: asaezper Date: Wed, 14 Feb 2024 11:36:41 +0100 Subject: [PATCH 41/78] ci,e2e: refactor nightly --- .gitlab-ci.yml | 3 +- .gitlab/ci/build.yml | 4 +- .gitlab/ci/e2e.yml | 97 +++++++++++++++++++++------------------- .gitlab/ci/schedules.yml | 2 +- 4 files changed, 56 insertions(+), 50 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 578d91b541..fdff246081 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,7 +34,8 @@ stages: - ci - static - build and unit tests - - e2e + - zmq + - rf - manual - documentation - private diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index 0e01f0073c..ea2c5cbb1c 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -1743,7 +1743,7 @@ basic asan: <<: *build_artifacts expire_in: 1 day -basic valgrind: +basic memcheck: extends: .smoke valgrind rules: - if: $CI_DESCRIPTION =~ /Nightly E2E Tests/ @@ -1788,7 +1788,7 @@ basic avx512 dpdk: ####### # Web # ####### -custom-build: +custom build: extends: .build_and_unit rules: - if: $ON_WEB diff --git a/.gitlab/ci/e2e.yml b/.gitlab/ci/e2e.yml index 28d08cb210..af400bbfc1 100644 --- a/.gitlab/ci/e2e.yml +++ b/.gitlab/ci/e2e.yml @@ -103,12 +103,12 @@ e2e request validation: done .e2e-run: - stage: e2e resource_group: e2e-${GROUP} timeout: 6h image: name: ${RETINA_REGISTRY_PREFIX}/launcher:${RETINA_VERSION} entrypoint: ["/bin/sh", "-c"] + interruptible: false variables: ARTIFACT_COMPRESSION_LEVEL: "slowest" KUBERNETES_CPU_REQUEST: 2 @@ -163,9 +163,9 @@ e2e request validation: echo "*******************************************************************************************************************************" - du -hs tests/e2e/log/ -custom-e2e: +custom e2e: + stage: manual extends: .e2e-run - interruptible: false # Web jobs are standalone rules: - if: $TESTBED == "none" when: never @@ -173,10 +173,14 @@ custom-e2e: - if: $ON_API needs: - *retina-needs - - custom-build + - custom build - build trx driver -smoke-zmq: +################################################################################ +# ZMQ +################################################################################ + +smoke zmq: extends: .e2e-run stage: manual rules: @@ -184,6 +188,7 @@ smoke-zmq: - if: $ON_MR when: manual allow_failure: false + interruptible: true variables: TESTBED: zmq MARKERS: "smoke" @@ -201,8 +206,8 @@ smoke-zmq: - *retina-needs .zmq: + stage: zmq extends: .e2e-run - interruptible: false variables: TESTBED: "zmq" E2E_LOG_LEVEL: "info" @@ -212,101 +217,98 @@ smoke-zmq: - *txrx-lib - *retina-needs -zmq: +srsue: extends: .zmq - interruptible: false variables: - MARKERS: "zmq and not smoke" + TESTBED: "zmq_srsue" + MARKERS: "zmq_srsue" E2E_LOG_LEVEL: "info" needs: - job: "basic relwithdeb" artifacts: true - *txrx-lib - *retina-needs - parallel: - matrix: - - KEYWORDS: ["attach_detach", "ping", "iperf and udp", "iperf and tcp"] -zmq_srsue: - extends: .e2e-run - interruptible: false +amari 1UE: + extends: .zmq variables: - TESTBED: "zmq_srsue" - MARKERS: "zmq_srsue" + TESTBED: "zmq_single_ue" + MARKERS: "zmq_single_ue" E2E_LOG_LEVEL: "info" + RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True" needs: - job: "basic relwithdeb" artifacts: true - *txrx-lib - *retina-needs -zmq-alternative-configs: - extends: .e2e-run - interruptible: false +amari 1UE 4x4 mimo: + extends: .zmq variables: - TESTBED: "zmq_single_ue" - MARKERS: "zmq_single_ue" + TESTBED: "zmq_4x4_mimo" + MARKERS: "zmq_4x4_mimo" E2E_LOG_LEVEL: "info" - RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True" needs: - job: "basic relwithdeb" artifacts: true - *txrx-lib - *retina-needs -zmq_4x4_mimo: - extends: .e2e-run - interruptible: false +amari 32UE: + extends: .zmq variables: - TESTBED: "zmq_4x4_mimo" - MARKERS: "zmq_4x4_mimo" + MARKERS: "zmq and not smoke" E2E_LOG_LEVEL: "info" needs: - job: "basic relwithdeb" artifacts: true - *txrx-lib - *retina-needs + parallel: + matrix: + - KEYWORDS: ["attach_detach", "ping", "iperf and udp", "iperf and tcp"] -zmq-asan: +amari 32UE asan: extends: .zmq variables: MARKERS: "smoke" RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True" - interruptible: false needs: - job: "basic asan" artifacts: true - *txrx-lib - *retina-needs -zmq-tsan: +amari 32UE tsan: extends: .zmq variables: MARKERS: "smoke" RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True" - interruptible: false needs: - job: "basic tsan" artifacts: true - *txrx-lib - *retina-needs -zmq-valgrind: +amari 32UE memcheck: extends: .zmq variables: MARKERS: "zmq_valgrind" E2E_LOG_LEVEL: "warning" RETINA_ARGS: "gnb.all.pcap=True gnb.all.mac_enable=True gnb.all.rlc_enable=True" - interruptible: false needs: - - job: "basic valgrind" + - job: "basic memcheck" artifacts: true - *txrx-lib - *retina-needs -zmq_test_mode: +################################################################################ +# TEST MODE +################################################################################ + +test mode ue: + stage: zmq extends: .e2e-run - interruptible: false variables: TESTBED: "zmq_4x4_mimo" MARKERS: "testmode" @@ -322,8 +324,8 @@ zmq_test_mode: ################################################################################ .rf: + stage: rf extends: .e2e-run - interruptible: false variables: GROUP: "rf" TESTBED: "rf_b200" @@ -334,7 +336,7 @@ zmq_test_mode: artifacts: true - *retina-needs -rf-asan: +amari b200 asan: extends: .rf variables: MARKERS: "rf_not_crash" @@ -343,12 +345,12 @@ rf-asan: artifacts: true - *retina-needs -rf-b200-config: +validate b200 config: extends: .rf variables: MARKERS: "rf_b200" -rf-n300-config: +validate n300 config: extends: .rf variables: MARKERS: "rf_n300" @@ -358,7 +360,8 @@ rf-n300-config: # Android ############################################################################### -android: +android b200: + stage: rf extends: .e2e-run variables: GROUP: "rf" @@ -371,7 +374,8 @@ android: artifacts: true - *retina-needs -android-x300: +android x300: + stage: rf extends: .e2e-run variables: GROUP: "rf" @@ -384,8 +388,8 @@ android-x300: artifacts: true - *retina-needs -android-n300: - extends: android-x300 +android n300: + extends: android x300 variables: TESTBED: "android_n300" @@ -394,6 +398,7 @@ android-n300: ############################################################################### viavi: + stage: rf extends: .e2e-run rules: - if: $CI_DESCRIPTION =~ /Nightly E2E Tests/ @@ -405,7 +410,7 @@ viavi: MARKERS: "viavi" E2E_LOG_LEVEL: "warning" KUBECONFIG_VAR_NAME: "RETINA_NAMESPACE_KUBECONFIG" - RETINA_ARGS: "gnb.all.pcap=True" + RETINA_ARGS: "gnb.all.metrics_enable=True" needs: - job: "basic avx512 dpdk" artifacts: true diff --git a/.gitlab/ci/schedules.yml b/.gitlab/ci/schedules.yml index 91bc4d5f3b..90c605717c 100644 --- a/.gitlab/ci/schedules.yml +++ b/.gitlab/ci/schedules.yml @@ -35,7 +35,7 @@ Nightly Build Unit Tests: value: "#ci_gnb" Nightly E2E Tests: - cron: "30 23 * * 0-5" + cron: "15 23 * * 0-5" cron_timezone: "Europe/Madrid" ref: dev variables: From cdd55597ed5b5f281db1689c2ec78f158f4dc0a0 Mon Sep 17 00:00:00 2001 From: asaezper Date: Wed, 14 Feb 2024 11:41:16 +0100 Subject: [PATCH 42/78] ci,e2e: test mode ue sanitizers --- .gitlab/ci/e2e.yml | 32 ++++++++++++-- .gitlab/ci/e2e/retina_request_test_mode.yml | 43 +++++++++++++++++++ tests/e2e/pyproject.toml | 2 +- tests/e2e/tests/test_mode.py | 6 +-- .../test_mode/{config.yml => config_ue.yml} | 0 5 files changed, 76 insertions(+), 7 deletions(-) create mode 100644 .gitlab/ci/e2e/retina_request_test_mode.yml rename tests/e2e/tests/test_mode/{config.yml => config_ue.yml} (100%) diff --git a/.gitlab/ci/e2e.yml b/.gitlab/ci/e2e.yml index af400bbfc1..5640c8fd38 100644 --- a/.gitlab/ci/e2e.yml +++ b/.gitlab/ci/e2e.yml @@ -310,15 +310,41 @@ test mode ue: stage: zmq extends: .e2e-run variables: - TESTBED: "zmq_4x4_mimo" - MARKERS: "testmode" - E2E_LOG_LEVEL: "info" + GROUP: "test_mode" + TESTBED: "test_mode" + MARKERS: "test_mode" + KEYWORD: "test_ue" + E2E_LOG_LEVEL: "warning" needs: - job: "basic relwithdeb" artifacts: true - *txrx-lib - *retina-needs +test mode ue tsan: + extends: test mode ue + needs: + - job: "basic tsan" + artifacts: true + - *txrx-lib + - *retina-needs + +test mode ue asan: + extends: test mode ue + needs: + - job: "basic asan" + artifacts: true + - *txrx-lib + - *retina-needs + +test mode ue memcheck: + extends: test mode ue + needs: + - job: "basic memcheck" + artifacts: true + - *txrx-lib + - *retina-needs + ################################################################################ # RF ################################################################################ diff --git a/.gitlab/ci/e2e/retina_request_test_mode.yml b/.gitlab/ci/e2e/retina_request_test_mode.yml new file mode 100644 index 0000000000..ffa7047339 --- /dev/null +++ b/.gitlab/ci/e2e/retina_request_test_mode.yml @@ -0,0 +1,43 @@ +# +# Copyright 2013-2024 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. +# + +- name: srs-gnb + type: gnb + image: ${RETINA_REGISTRY_PREFIX}/srsgnb:${RETINA_VERSION} + requirements: + arch: amd64 + cpu: + requests: 1 + memory: + requests: "8G" + limits: "8G" + ephemeral-storage: + requests: "6G" + limits: "6G" + resources: + - type: zmq + nof_ant: 4 + environment: + - PATH: ${PATH}:/builds/softwareradiosystems/srsgnb/build/apps/gnb + shared_files: + - local_path: ../../build/apps/gnb/gnb + remote_path: /usr/local/bin + is_executable: true + +- name: open5gs + type: 5gc + requirements: + arch: amd64 + cpu: + requests: 1 + memory: + requests: "4G" + ephemeral-storage: + requests: "6G" + limits: "6G" + image: ${RETINA_REGISTRY_PREFIX}/open5gs:${OPEN5GS_VERSION}_${RETINA_VERSION} diff --git a/tests/e2e/pyproject.toml b/tests/e2e/pyproject.toml index badde49f9d..61ecafc845 100644 --- a/tests/e2e/pyproject.toml +++ b/tests/e2e/pyproject.toml @@ -36,7 +36,7 @@ markers = [ "test", "zmq_4x4_mimo", "zmq_srsue", - "testmode", + "test_mode", "viavi", "viavi_manual", ] diff --git a/tests/e2e/tests/test_mode.py b/tests/e2e/tests/test_mode.py index c96891a1a7..af3993eade 100644 --- a/tests/e2e/tests/test_mode.py +++ b/tests/e2e/tests/test_mode.py @@ -39,9 +39,9 @@ param("test_mode test_ue --rnti 0x44 --cqi 15 --ri 4", 4, id="Test UE 4x4 Rank 4"), ), ) -@mark.testmode +@mark.test_mode # pylint: disable=too-many-arguments -def test_mode( +def test_ue( # Retina retina_manager: RetinaTestManager, retina_data: RetinaTestData, @@ -73,7 +73,7 @@ def test_mode( "log_level": "warning", "pcap": False, }, - "templates": {"cell": str(Path(__file__).joinpath("../test_mode/config.yml").resolve())}, + "templates": {"cell": str(Path(__file__).joinpath("../test_mode/config_ue.yml").resolve())}, }, } retina_manager.parse_configuration(retina_data.test_config) diff --git a/tests/e2e/tests/test_mode/config.yml b/tests/e2e/tests/test_mode/config_ue.yml similarity index 100% rename from tests/e2e/tests/test_mode/config.yml rename to tests/e2e/tests/test_mode/config_ue.yml From 6b63d180a373c0836c64a3abcec100f2d9ae31e4 Mon Sep 17 00:00:00 2001 From: asaezper Date: Wed, 14 Feb 2024 15:32:32 +0100 Subject: [PATCH 43/78] ci,e2e: test mode dummy ru --- .gitlab/ci/e2e.yml | 45 ++++++++++++++ tests/e2e/tests/test_mode.py | 80 +++++++++++++++++++++++++ tests/e2e/tests/test_mode/config_ru.yml | 62 +++++++++++++++++++ 3 files changed, 187 insertions(+) create mode 100644 tests/e2e/tests/test_mode/config_ru.yml diff --git a/.gitlab/ci/e2e.yml b/.gitlab/ci/e2e.yml index 5640c8fd38..2649149aed 100644 --- a/.gitlab/ci/e2e.yml +++ b/.gitlab/ci/e2e.yml @@ -345,6 +345,51 @@ test mode ue memcheck: - *txrx-lib - *retina-needs +test mode ru: + stage: zmq + extends: .e2e-run + variables: + GROUP: "test_mode" + TESTBED: "test_mode" + MARKERS: "test_mode" + KEYWORD: "test_ru" + E2E_LOG_LEVEL: "info" + needs: + - job: "basic relwithdeb" + artifacts: true + - *txrx-lib + - *retina-needs + +test mode ru tsan: + extends: test mode ru + variables: + E2E_LOG_LEVEL: "warning" + needs: + - job: "basic tsan" + artifacts: true + - *txrx-lib + - *retina-needs + +test mode ru asan: + extends: test mode ru + variables: + E2E_LOG_LEVEL: "warning" + needs: + - job: "basic asan" + artifacts: true + - *txrx-lib + - *retina-needs + +test mode ru memcheck: + extends: test mode ru + variables: + E2E_LOG_LEVEL: "warning" + needs: + - job: "basic memcheck" + artifacts: true + - *txrx-lib + - *retina-needs + ################################################################################ # RF ################################################################################ diff --git a/tests/e2e/tests/test_mode.py b/tests/e2e/tests/test_mode.py index af3993eade..b427e789f1 100644 --- a/tests/e2e/tests/test_mode.py +++ b/tests/e2e/tests/test_mode.py @@ -11,6 +11,7 @@ """ import logging +import tempfile from pathlib import Path from time import sleep @@ -124,3 +125,82 @@ def test_ue( warning_as_errors=warning_as_errors, fail_if_kos=fail_if_kos, ) + + +@mark.test_mode +# pylint: disable=too-many-arguments +def test_ru( + # Retina + retina_manager: RetinaTestManager, + retina_data: RetinaTestData, + # Clients + gnb: GNBStub, + # Test + nof_ant: int = 4, + duration: int = 5 * 60, + # Test extra params + always_download_artifacts: bool = True, + gnb_startup_timeout: int = GNB_STARTUP_TIMEOUT, + gnb_stop_timeout: int = 0, + log_search: bool = True, + warning_as_errors: bool = True, + fail_if_kos: bool = True, +): # pylint: disable=too-many-locals + """ + Run gnb in test mode. + """ + + # Configuration + with tempfile.NamedTemporaryFile(mode="w+") as tmp_file: + tmp_file.write(" ") # Make it not empty to overwrite default one + tmp_file.flush() + retina_data.test_config = { + "gnb": { + "parameters": { + "gnb_id": 1, + "log_level": "warning", + "pcap": False, + }, + "templates": { + "cell": str(Path(__file__).joinpath("../test_mode/config_ru.yml").resolve()), + "ru": tmp_file.name, + }, + }, + } + retina_manager.parse_configuration(retina_data.test_config) + retina_manager.push_all_config() + + configure_artifacts( + retina_data=retina_data, + always_download_artifacts=always_download_artifacts, + ) + + # GNB Start + with handle_start_error(name=f"GNB [{id(gnb)}]"): + gnb_def: GNBDefinition = gnb.GetDefinition(Empty()) + gnb.Start( + GNBStartInfo( + plmn=PLMN(mcc="001", mnc="01"), + ue_definition=UEDefinition(zmq_ip=gnb_def.zmq_ip, zmq_port_array=gnb_def.zmq_port_array[:nof_ant]), + fivegc_definition=FiveGCDefinition(amf_ip=gnb_def.zmq_ip, amf_port=38412), + start_info=StartInfo( + timeout=gnb_startup_timeout, + post_commands="amf --no_core 1", + ), + ) + ) + + logging.info("Running Test Mode for %s seconds", duration) + sleep(duration) + + # Stop + stop( + tuple(), + gnb, + None, + retina_data, + gnb_stop_timeout=gnb_stop_timeout, + log_search=log_search, + warning_as_errors=warning_as_errors, + fail_if_kos=fail_if_kos, + ) diff --git a/tests/e2e/tests/test_mode/config_ru.yml b/tests/e2e/tests/test_mode/config_ru.yml new file mode 100644 index 0000000000..2961a5a132 --- /dev/null +++ b/tests/e2e/tests/test_mode/config_ru.yml @@ -0,0 +1,62 @@ +# +# Copyright 2021-2024 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. +# + +ru_dummy: + +cell_cfg: + dl_arfcn: 381500 + band: 39 + channel_bandwidth_MHz: 100 + common_scs: 30 + plmn: "00101" + tac: 7 + pci: 1 + nof_antennas_dl: 4 + nof_antennas_ul: 4 + pdsch: + min_ue_mcs: 27 + mcs_table: qam256 + max_rb_size: 16 + pusch: + min_ue_mcs: 27 + mcs_table: qam256 + rv_sequence: 0 + +cells: + - pci: 1 + +test_mode: + test_ue: + rnti: 0x1234 + pdsch_active: true + pusch_active: true + ri: 4 + nof_ues: 16 + +expert_execution: + affinities: + low_priority_cpus: 10-11 + low_priority_pinning: round-robin + cell_affinities: + - l2_cell_cpus: 0 + l1_dl_cpus: 1-4 + l1_ul_cpus: 5-6 + ru_cpus: 7-9 + l1_dl_pinning: round-robin + l1_ul_pinning: round-robin + l2_cell_pinning: round-robin + ru_pinning: round-robin + threads: + upper_phy: + nof_dl_threads: 2 + nof_ul_threads: 2 + nof_pusch_decoder_threads: 4 + +expert_phy: + max_proc_delay: 6 + pusch_dec_max_iterations: 6 From ad922eac599609afe4f234779ca2a8f09329cf64 Mon Sep 17 00:00:00 2001 From: Supreeth Herle Date: Tue, 13 Feb 2024 16:57:41 +0100 Subject: [PATCH 44/78] app,sched: populate PDCCH candidates for aggregation level 2 --- apps/gnb/gnb_appconfig_translators.cpp | 10 +++++++--- lib/scheduler/config/serving_cell_config_factory.cpp | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/gnb/gnb_appconfig_translators.cpp b/apps/gnb/gnb_appconfig_translators.cpp index 75b48363c0..106e5125cd 100644 --- a/apps/gnb/gnb_appconfig_translators.cpp +++ b/apps/gnb/gnb_appconfig_translators.cpp @@ -698,8 +698,11 @@ std::vector srsran::generate_du_cell_config(const gnb_appconfig& if (base_cell.pdcch_cfg.dedicated.ss2_n_candidates != auto_compute_ss2_n_candidates_cfg) { ss2_cfg.set_non_ss0_nof_candidates(base_cell.pdcch_cfg.dedicated.ss2_n_candidates); } else if (base_cell.pdcch_cfg.dedicated.ss2_type != search_space_configuration::type_t::common) { - ss2_cfg.set_non_ss0_nof_candidates( - {0, 0, config_helpers::compute_max_nof_candidates(aggregation_level::n4, cset1_cfg), 0, 0}); + ss2_cfg.set_non_ss0_nof_candidates({0, + config_helpers::compute_max_nof_candidates(aggregation_level::n2, cset1_cfg), + config_helpers::compute_max_nof_candidates(aggregation_level::n4, cset1_cfg), + 0, + 0}); } if (base_cell.pdcch_cfg.dedicated.ss2_type == search_space_configuration::type_t::common) { @@ -708,7 +711,8 @@ std::vector srsran::generate_du_cell_config(const gnb_appconfig& if (base_cell.pdcch_cfg.dedicated.ss2_n_candidates == auto_compute_ss2_n_candidates_cfg) { ss2_cfg.set_non_ss0_nof_candidates( {0, - 0, + std::min(static_cast(4U), + config_helpers::compute_max_nof_candidates(aggregation_level::n2, cset1_cfg)), std::min(static_cast(4U), config_helpers::compute_max_nof_candidates(aggregation_level::n4, cset1_cfg)), 0, diff --git a/lib/scheduler/config/serving_cell_config_factory.cpp b/lib/scheduler/config/serving_cell_config_factory.cpp index 2c74ff9b5b..1afcb5f8b2 100644 --- a/lib/scheduler/config/serving_cell_config_factory.cpp +++ b/lib/scheduler/config/serving_cell_config_factory.cpp @@ -717,7 +717,11 @@ pdcch_config srsran::config_helpers::make_ue_dedicated_pdcch_config(const cell_c // >> Add SearchSpace#2. pdcch_cfg.search_spaces.push_back(make_default_ue_search_space_config()); pdcch_cfg.search_spaces[0].set_non_ss0_nof_candidates( - {0, 0, compute_max_nof_candidates(aggregation_level::n4, pdcch_cfg.coresets[0]), 0, 0}); + {0, + compute_max_nof_candidates(aggregation_level::n2, pdcch_cfg.coresets[0]), + compute_max_nof_candidates(aggregation_level::n4, pdcch_cfg.coresets[0]), + 0, + 0}); return pdcch_cfg; } From 639b020909f02b1b4744d2701e1c4e0b8f310137 Mon Sep 17 00:00:00 2001 From: Supreeth Herle Date: Tue, 13 Feb 2024 17:34:32 +0100 Subject: [PATCH 45/78] sched: apply limits on nof. UEs to be scheduled per slot if its more than nof. PDCCH candidates at aggregation level 2 --- lib/scheduler/policy/scheduler_time_rr.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/scheduler/policy/scheduler_time_rr.cpp b/lib/scheduler/policy/scheduler_time_rr.cpp index 96e7c8d10b..9f25eec779 100644 --- a/lib/scheduler/policy/scheduler_time_rr.cpp +++ b/lib/scheduler/policy/scheduler_time_rr.cpp @@ -68,6 +68,15 @@ static unsigned compute_max_nof_rbs_per_ue_per_slot(const ue_repository& ues, bo bwp_crb_limits = ss_info->ul_crb_lims; } + // [Implementation-defined] Assume aggregation level 2 while computing nof. candidates that can be fit in CORESET. + const unsigned max_nof_candidates = ss_info->coreset->get_nof_cces() / to_nof_cces(aggregation_level::n2); + // [Implementation-defined] To avoid running out of PDCCH candidates in multi-UE scenario and short BW (e.g. TDD and + // 10Mhz BW), apply further limits on nof. UEs to be scheduled per slot i.e. divide available PDCCH candidates evenly + // among DL and UL. + if (nof_ues_to_be_scheduled_per_slot >= max_nof_candidates) { + nof_ues_to_be_scheduled_per_slot = std::ceil(nof_ues_to_be_scheduled_per_slot / 2); + } + return (bwp_crb_limits.length() / nof_ues_to_be_scheduled_per_slot); } From a8b320553dece85d158e60a36fdb68fbd50538b8 Mon Sep 17 00:00:00 2001 From: Supreeth Herle Date: Wed, 14 Feb 2024 18:01:09 +0100 Subject: [PATCH 46/78] sched: tweak computing of maximum nof. RBs to allocate per UE per slot for newTx for smaller BW and multiple UEs --- lib/scheduler/policy/scheduler_time_rr.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/scheduler/policy/scheduler_time_rr.cpp b/lib/scheduler/policy/scheduler_time_rr.cpp index 9f25eec779..65cbc2aefd 100644 --- a/lib/scheduler/policy/scheduler_time_rr.cpp +++ b/lib/scheduler/policy/scheduler_time_rr.cpp @@ -35,10 +35,8 @@ static unsigned compute_max_nof_rbs_per_ue_per_slot(const ue_repository& ues, bo // [Implementation-defined] The following selection of nof. UEs to be scheduled per slot is based on simple heuristic // and to ensure multiple UEs are scheduler per slot rather than single UE hogging all the resource in a slot under // full buffer scenario. - if (nof_ue_with_new_tx <= 1) { + if (nof_ue_with_new_tx <= 3) { nof_ues_to_be_scheduled_per_slot = 1; - } else if (nof_ue_with_new_tx <= 3) { - nof_ues_to_be_scheduled_per_slot = 2; } else if (nof_ue_with_new_tx <= 7) { nof_ues_to_be_scheduled_per_slot = 3; } else if (nof_ue_with_new_tx <= 15) { From c8d5be01d63319a71815689073af2fd30eb09d75 Mon Sep 17 00:00:00 2001 From: Supreeth Herle Date: Wed, 14 Feb 2024 13:09:52 +0100 Subject: [PATCH 47/78] unittest: add unittest to check whether PDSCH or PUSCH are not starved in low BW multi UE scenario --- .../scheduler/multiple_ue_sched_test.cpp | 317 ++++++++++++++++-- 1 file changed, 284 insertions(+), 33 deletions(-) diff --git a/tests/unittests/scheduler/multiple_ue_sched_test.cpp b/tests/unittests/scheduler/multiple_ue_sched_test.cpp index dde225205f..094906e680 100644 --- a/tests/unittests/scheduler/multiple_ue_sched_test.cpp +++ b/tests/unittests/scheduler/multiple_ue_sched_test.cpp @@ -25,13 +25,11 @@ using namespace srsran; -using dl_bsr_lc_report_list = static_vector; - struct sched_test_ue { - rnti_t crnti; - ul_bsr_lcg_report_list ul_bsr_list; - dl_bsr_lc_report_list dl_bsr_list; - sched_ue_creation_request_message msg; + rnti_t crnti; + std::unordered_map ul_bsr_list; + std::unordered_map dl_bsr_list; + sched_ue_creation_request_message msg; }; unsigned allocate_rnti() @@ -60,6 +58,16 @@ struct test_bench { { sch.handle_cell_configuration_request(cell_req); } + + du_ue_index_t rnti_to_du_ue_index(rnti_t rnti) + { + for (const auto& u : ues) { + if (u.second.crnti == rnti) { + return u.first; + } + } + return du_ue_index_t::INVALID_DU_UE_INDEX; + } }; class scheduler_impl_tester @@ -70,6 +78,8 @@ class scheduler_impl_tester srslog::basic_logger& test_logger = srslog::fetch_basic_logger("TEST", true); optional bench; + unsigned last_csi_report_offset = 0; + // We use this value to account for the case when the PDSCH or PUSCH is allocated several slots in advance. unsigned max_k_value = 0; @@ -196,7 +206,12 @@ class scheduler_impl_tester void add_ue(du_ue_index_t ue_index, lcid_t lcid_, lcg_id_t lcgid_, duplex_mode mode) { const auto& cell_cfg_params = create_custom_cell_cfg_builder_params(mode); - auto ue_creation_req = test_helpers::create_default_sched_ue_creation_request(cell_cfg_params); + add_ue(ue_index, lcid_, lcgid_, cell_cfg_params); + } + + void add_ue(du_ue_index_t ue_index, lcid_t lcid_, lcg_id_t lcgid_, const cell_config_builder_params& params) + { + auto ue_creation_req = test_helpers::create_default_sched_ue_creation_request(params); ue_creation_req.ue_index = ue_index; ue_creation_req.crnti = to_rnti(allocate_rnti()); @@ -210,6 +225,35 @@ class scheduler_impl_tester } it->lc_group = lcgid_; + const unsigned csi_report_period_slots = csi_report_periodicity_to_uint( + variant_get( + ue_creation_req.cfg.cells.value()[0].serv_cell_cfg.csi_meas_cfg->csi_report_cfg_list[0].report_cfg_type) + .report_slot_period); + if (params.tdd_ul_dl_cfg_common.has_value()) { + optional slot_offset = + find_next_tdd_full_ul_slot(params.tdd_ul_dl_cfg_common.value(), last_csi_report_offset + 1); + srsran_assert(slot_offset.has_value(), "Unable to find a valid CSI report slot offset UE={}", ue_index); + srsran_assert(slot_offset.value() < csi_report_period_slots, + "Unable to find a valid CSI report slot offset UE={}", + ue_index); + variant_get( + ue_creation_req.cfg.cells.value()[0].serv_cell_cfg.csi_meas_cfg->csi_report_cfg_list[0].report_cfg_type) + .report_slot_offset = *slot_offset; + last_csi_report_offset = *slot_offset; + } else { + srsran_assert( + variant_get( + ue_creation_req.cfg.cells.value()[0].serv_cell_cfg.csi_meas_cfg->csi_report_cfg_list[0].report_cfg_type) + .report_slot_offset + + ue_index < + csi_report_period_slots, + "Unable to find a valid CSI report slot offset UE={}", + ue_index); + variant_get( + ue_creation_req.cfg.cells.value()[0].serv_cell_cfg.csi_meas_cfg->csi_report_cfg_list[0].report_cfg_type) + .report_slot_offset += ue_index; + } + bench->sch.handle_ue_creation_request(ue_creation_req); bench->ues[ue_index] = sched_test_ue{ue_creation_req.crnti, {}, {}, ue_creation_req}; @@ -231,7 +275,7 @@ class scheduler_impl_tester const dl_buffer_state_indication_message msg{ue_index, lcid, buffer_size}; // Store to keep track of DL buffer status. - test_ue.dl_bsr_list.push_back(msg); + test_ue.dl_bsr_list[lcid] = msg; bench->sch.handle_dl_buffer_state_indication(msg); } @@ -246,7 +290,7 @@ class scheduler_impl_tester msg.reported_lcgs.push_back(ul_bsr_lcg_report{lcg_id, buffer_size}); // Store to keep track of current buffer status in UE. - test_ue.ul_bsr_list.push_back(ul_bsr_lcg_report{lcg_id, buffer_size}); + test_ue.ul_bsr_list[lcg_id] = ul_bsr_lcg_report{lcg_id, buffer_size}; bench->sch.handle_ul_bsr_indication(msg); } @@ -411,6 +455,71 @@ class scheduler_impl_tester return uci_ind; } + uci_indication::uci_pdu build_pucch_uci_pdu(const pucch_info& pucch) + { + uci_indication::uci_pdu pdu{}; + pdu.crnti = pucch.crnti; + pdu.ue_index = bench->rnti_to_du_ue_index(pdu.crnti); + + switch (pucch.format) { + case pucch_format::FORMAT_0: + case pucch_format::FORMAT_1: { + uci_indication::uci_pdu::uci_pucch_f0_or_f1_pdu pucch_pdu{}; + if (pucch.format == pucch_format::FORMAT_0) { + pucch_pdu.sr_detected = sr_nof_bits_to_uint(pucch.format_0.sr_bits) > 0; + // Auto ACK harqs. + pucch_pdu.harqs.resize(pucch.format_0.harq_ack_nof_bits, mac_harq_ack_report_status::ack); + } else { + pucch_pdu.sr_detected = sr_nof_bits_to_uint(pucch.format_1.sr_bits) > 0; + // Auto ACK harqs. + pucch_pdu.harqs.resize(pucch.format_1.harq_ack_nof_bits, mac_harq_ack_report_status::ack); + } + pucch_pdu.ul_sinr = 55; + pdu.pdu = pucch_pdu; + break; + } + case pucch_format::FORMAT_2: { + uci_indication::uci_pdu::uci_pucch_f2_or_f3_or_f4_pdu pucch_pdu{}; + pucch_pdu.sr_info.fill(0, sr_nof_bits_to_uint(pucch.format_2.sr_bits), true); + // Auto ACK harqs. + pucch_pdu.harqs.resize(pucch.format_2.harq_ack_nof_bits, mac_harq_ack_report_status::ack); + if (pucch.csi_rep_cfg.has_value()) { + pucch_pdu.csi.emplace(); + // Fill with dummy values. + pucch_pdu.csi->ri = 1; + pucch_pdu.csi->first_tb_wideband_cqi = 15; + } + pucch_pdu.ul_sinr = 55; + pdu.pdu = pucch_pdu; + break; + } + default: + srsran_assertion_failure("Unsupported PUCCH format"); + } + return pdu; + } + + uci_indication::uci_pdu build_pusch_uci_pdu(const ul_sched_info& pusch) + { + uci_indication::uci_pdu pdu{}; + pdu.crnti = pusch.pusch_cfg.rnti; + pdu.ue_index = bench->rnti_to_du_ue_index(pdu.crnti); + + uci_indication::uci_pdu::uci_pusch_pdu pusch_pdu{}; + // Auto ACK harqs. + if (pusch.uci->harq.has_value()) { + pusch_pdu.harqs.resize(pusch.uci->harq->harq_ack_nof_bits, mac_harq_ack_report_status::ack); + } + if (pusch.uci->csi.has_value()) { + pusch_pdu.csi.emplace(); + // Fill with dummy values. + pusch_pdu.csi->ri = 1; + pusch_pdu.csi->first_tb_wideband_cqi = 15; + } + pdu.pdu = pusch_pdu; + return pdu; + } + ul_crc_pdu_indication build_success_crc_pdu_indication(const du_ue_index_t ue_idx, const uint8_t harq_id) { const sched_test_ue& u = get_ue(ue_idx); @@ -420,6 +529,7 @@ class scheduler_impl_tester pdu.rnti = u.crnti; pdu.harq_id = (harq_id_t)harq_id; pdu.tb_crc_success = true; + pdu.ul_sinr_metric = 55; return pdu; } @@ -467,6 +577,8 @@ TEST_P(multiple_ue_sched_tester, dl_buffer_state_indication_test) std::map is_bsr_zero_sent; std::map> pdsch_scheduled_slot_in_future; + const lcid_t lcid = LCID_MIN_DRB; + // Vector to keep track of ACKs to send. std::vector uci_ind_to_send; @@ -520,21 +632,21 @@ TEST_P(multiple_ue_sched_tester, dl_buffer_state_indication_test) continue; } - const unsigned tbs_sched_bytes = pdsch_tbs_scheduled_bytes_per_lc(test_ue, LCID_MIN_DRB); - if (tbs_sched_bytes == 0 && test_ue.dl_bsr_list.back().bs == 0 && + const unsigned tbs_sched_bytes = pdsch_tbs_scheduled_bytes_per_lc(test_ue, lcid); + if (tbs_sched_bytes == 0 && test_ue.dl_bsr_list.at(lcid).bs == 0 && pdsch_scheduled_slot_in_future[idx].has_value() && current_slot > pdsch_scheduled_slot_in_future[idx].value() && not is_bsr_zero_sent[idx]) { is_bsr_zero_sent[idx] = true; // Notify buffer status of 0 to ensure scheduler does not schedule further for this UE. - push_buffer_state_to_dl_ue(to_du_ue_index(idx), 0, LCID_MIN_DRB); + push_buffer_state_to_dl_ue(to_du_ue_index(idx), 0, lcid); } if (grant != nullptr && grant->pdsch_cfg.codewords[0].new_data) { - if (tbs_sched_bytes > test_ue.dl_bsr_list.back().bs) { + if (tbs_sched_bytes > test_ue.dl_bsr_list.at(lcid).bs) { // Accounting for MAC headers. - test_ue.dl_bsr_list.back().bs = 0; + test_ue.dl_bsr_list.at(lcid).bs = 0; } else { - test_ue.dl_bsr_list.back().bs -= tbs_sched_bytes; + test_ue.dl_bsr_list.at(lcid).bs -= tbs_sched_bytes; } } } @@ -542,7 +654,8 @@ TEST_P(multiple_ue_sched_tester, dl_buffer_state_indication_test) for (unsigned idx = 0; idx < params.nof_ues; idx++) { const auto& test_ue = get_ue(to_du_ue_index(idx)); - ASSERT_EQ(test_ue.dl_bsr_list.back().bs, 0) << fmt::format("Condition failed for UE with c-rnti={}", test_ue.crnti); + ASSERT_EQ(test_ue.dl_bsr_list.at(lcid).bs, 0) + << fmt::format("Condition failed for UE with c-rnti={}", test_ue.crnti); } } @@ -552,6 +665,8 @@ TEST_P(multiple_ue_sched_tester, ul_buffer_state_indication_test) std::map is_bsr_zero_sent; std::map> pusch_scheduled_slot_in_future; + const lcg_id_t lcgid = uint_to_lcg_id(0); + setup_sched(create_expert_config(10), create_custom_cell_config_request(params.duplx_mode)); // Add UE(s) and notify UL BSR from UE of random size between min and max defined in params. // Assumption: LCID is DRB1. @@ -594,7 +709,7 @@ TEST_P(multiple_ue_sched_tester, ul_buffer_state_indication_test) } const unsigned tbs_sched_bytes = pusch_tbs_scheduled_bytes(test_ue); - if (tbs_sched_bytes == 0 && test_ue.ul_bsr_list.back().nof_bytes == 0 && + if (tbs_sched_bytes == 0 && test_ue.ul_bsr_list.at(lcgid).nof_bytes == 0 && pusch_scheduled_slot_in_future[idx].has_value() && current_slot > pusch_scheduled_slot_in_future[idx].value() && not is_bsr_zero_sent[idx]) { is_bsr_zero_sent[idx] = true; @@ -604,11 +719,11 @@ TEST_P(multiple_ue_sched_tester, ul_buffer_state_indication_test) if (pusch != nullptr && pusch->pusch_cfg.new_data) { crc_ind.crcs.push_back(build_success_crc_pdu_indication(to_du_ue_index(idx), pusch->pusch_cfg.harq_id)); - if (tbs_sched_bytes > test_ue.ul_bsr_list.back().nof_bytes) { + if (tbs_sched_bytes > test_ue.ul_bsr_list.at(lcgid).nof_bytes) { // Accounting for MAC headers. - test_ue.ul_bsr_list.back().nof_bytes = 0; + test_ue.ul_bsr_list.at(lcgid).nof_bytes = 0; } else { - test_ue.ul_bsr_list.back().nof_bytes -= tbs_sched_bytes; + test_ue.ul_bsr_list.at(lcgid).nof_bytes -= tbs_sched_bytes; } } } @@ -620,11 +735,143 @@ TEST_P(multiple_ue_sched_tester, ul_buffer_state_indication_test) for (unsigned idx = 0; idx < params.nof_ues; idx++) { const auto& test_ue = get_ue(to_du_ue_index(idx)); - ASSERT_EQ(test_ue.ul_bsr_list.back().nof_bytes, 0) + ASSERT_EQ(test_ue.ul_bsr_list.at(lcgid).nof_bytes, 0) << fmt::format("Condition failed for UE with c-rnti={}", test_ue.crnti); } } +TEST_P(multiple_ue_sched_tester, when_scheduling_multiple_ue_in_small_bw_neither_pdsch_and_pusch_must_be_starved) +{ + const unsigned max_test_run_slots = 100; + const lcid_t lcid = LCID_MIN_DRB; + const lcg_id_t lcgid = uint_to_lcg_id(0); + + // Make custom cell configuration for TDD and FDD i.e. 10 Mhz for TDD and 5Mhz for FDD. + auto builder_params = create_custom_cell_cfg_builder_params(params.duplx_mode); + builder_params.channel_bw_mhz = bs_channel_bandwidth_fr1::MHz5; + if (params.duplx_mode == duplex_mode::TDD) { + builder_params.channel_bw_mhz = srsran::bs_channel_bandwidth_fr1::MHz10; + } + builder_params.band = band_helper::get_band_from_dl_arfcn(builder_params.dl_arfcn); + + const unsigned nof_crbs = band_helper::get_n_rbs_from_bw( + builder_params.channel_bw_mhz, + builder_params.scs_common, + builder_params.band.has_value() ? band_helper::get_freq_range(builder_params.band.value()) + : frequency_range::FR1); + + optional ssb_freq_loc = + band_helper::get_ssb_coreset0_freq_location(builder_params.dl_arfcn, + *builder_params.band, + nof_crbs, + builder_params.scs_common, + builder_params.scs_common, + builder_params.search_space0_index, + builder_params.max_coreset0_duration); + builder_params.offset_to_point_a = ssb_freq_loc->offset_to_point_A; + builder_params.k_ssb = ssb_freq_loc->k_ssb; + builder_params.coreset0_index = ssb_freq_loc->coreset0_idx; + + config_helpers::cell_config_builder_params_extended extended_params{builder_params}; + setup_sched(create_expert_config(10), test_helpers::make_default_sched_cell_configuration_request(extended_params)); + + // NOTE: The buffer size must be high enough for the scheduler to keep allocating resources to the UE. In order to + // avoid failing of test we ignore the min_buffer_size_in_bytes and max_buffer_size_in_bytes set in params. + const unsigned dl_buffer_size = 10000; + const unsigned ul_buffer_size = 10000; + + // Add UE(s) and notify to each UE a DL buffer status indication of random size between min and max defined in + // params. Assumption: LCID is DRB1. + for (unsigned idx = 0; idx < params.nof_ues; idx++) { + add_ue(to_du_ue_index(idx), lcid, lcgid, extended_params); + push_buffer_state_to_dl_ue(to_du_ue_index(idx), dl_buffer_size, lcid); + notify_ul_bsr_from_ue(to_du_ue_index(idx), ul_buffer_size, lcgid); + } + + bool first_pdsch_scheduled = false; + bool first_pusch_scheduled = false; + unsigned nof_cqi_reported = 0; + + for (unsigned i = 0; i != max_test_run_slots; ++i) { + run_slot(); + + if (bench->sched_res == nullptr) { + continue; + } + + uci_indication uci_ind{}; + uci_ind.slot_rx = current_slot; + uci_ind.cell_index = to_du_cell_index(0); + + ul_crc_indication crc_ind{}; + crc_ind.cell_index = to_du_cell_index(0); + crc_ind.sl_rx = current_slot; + + for (const auto& pucch : bench->sched_res->ul.pucchs) { + uci_ind.ucis.push_back(build_pucch_uci_pdu(pucch)); + if (pucch.format == srsran::pucch_format::FORMAT_2 and pucch.csi_rep_cfg.has_value()) { + // For now CSI report is only sent in PUCCH format 2. + ++nof_cqi_reported; + } + } + for (const auto& pusch : bench->sched_res->ul.puschs) { + if (pusch.uci.has_value()) { + uci_ind.ucis.push_back(build_pusch_uci_pdu(pusch)); + if (pusch.uci->csi.has_value()) { + ++nof_cqi_reported; + } + } + crc_ind.crcs.push_back( + build_success_crc_pdu_indication(bench->rnti_to_du_ue_index(pusch.pusch_cfg.rnti), pusch.pusch_cfg.harq_id)); + first_pusch_scheduled = true; + + auto& test_ue = get_ue(bench->rnti_to_du_ue_index(pusch.pusch_cfg.rnti)); + // Keep track of nof. bytes scheduled and nof. bytes to be alloced. + if (pusch.pusch_cfg.tb_size_bytes < test_ue.ul_bsr_list.at(lcgid).nof_bytes) { + test_ue.ul_bsr_list.at(lcgid).nof_bytes -= pusch.pusch_cfg.tb_size_bytes; + } + } + if (not uci_ind.ucis.empty()) { + bench->sch.handle_uci_indication(uci_ind); + } + if (not crc_ind.crcs.empty()) { + bench->sch.handle_crc_indication(crc_ind); + } + + for (const auto& pdsch : bench->sched_res->dl.ue_grants) { + first_pdsch_scheduled = true; + // Keep track of nof. bytes scheduled and nof. bytes to be alloced. + auto& test_ue = get_ue(bench->rnti_to_du_ue_index(pdsch.pdsch_cfg.rnti)); + if (pdsch.pdsch_cfg.codewords[0].tb_size_bytes < test_ue.dl_bsr_list.at(lcid).bs) { + test_ue.dl_bsr_list.at(lcid).bs -= pdsch.pdsch_cfg.codewords[0].tb_size_bytes; + } + } + + for (unsigned idx = 0; idx < params.nof_ues; idx++) { + auto& test_ue = get_ue(to_du_ue_index(idx)); + // Kep pushing buffer status and UL BSR to ensure scheduler keeps scheduling UE. + push_buffer_state_to_dl_ue( + to_du_ue_index(to_du_ue_index(idx)), dl_buffer_size + test_ue.dl_bsr_list.at(lcid).bs, lcid); + notify_ul_bsr_from_ue(to_du_ue_index(idx), ul_buffer_size + test_ue.ul_bsr_list.at(lcgid).nof_bytes, lcgid); + } + + // Ensure there is atleast one PDSCH scheduled in each DL slot and one PUSCH scheduled in each UL slot. + if (first_pusch_scheduled and first_pdsch_scheduled and nof_cqi_reported >= params.nof_ues) { + if (bench->cell_cfg.tdd_cfg_common.has_value()) { + if (has_active_tdd_dl_symbols(bench->cell_cfg.tdd_cfg_common.value(), current_slot.slot_index())) { + ASSERT_GE(bench->sched_res->dl.ue_grants.size(), 1); + } else if (is_tdd_full_ul_slot(bench->cell_cfg.tdd_cfg_common.value(), current_slot.slot_index())) { + ASSERT_GE(bench->sched_res->ul.puschs.size(), 1); + } + } else { + // FDD. + ASSERT_GE(bench->sched_res->dl.ue_grants.size(), 1); + ASSERT_GE(bench->sched_res->ul.puschs.size(), 1); + } + } + } +} + TEST_P(multiple_ue_sched_tester, not_scheduled_when_buffer_status_zero) { setup_sched(create_expert_config(10), create_custom_cell_config_request(params.duplx_mode)); @@ -654,6 +901,8 @@ TEST_P(multiple_ue_sched_tester, dl_dci_format_1_1_test) std::map is_bsr_zero_sent; std::map> pdsch_scheduled_slot_in_future; + const lcid_t lcid = LCID_MIN_DRB; + // Vector to keep track of ACKs to send. std::vector uci_ind_to_send; @@ -663,9 +912,9 @@ TEST_P(multiple_ue_sched_tester, dl_dci_format_1_1_test) auto it = std::find_if(ue_creation_req.cfg.lc_config_list->begin(), ue_creation_req.cfg.lc_config_list->end(), - [](const auto& l) { return l.lcid == LCID_MIN_DRB; }); + [](const auto& l) { return l.lcid == lcid; }); if (it == ue_creation_req.cfg.lc_config_list->end()) { - ue_creation_req.cfg.lc_config_list->push_back(config_helpers::create_default_logical_channel_config(LCID_MIN_DRB)); + ue_creation_req.cfg.lc_config_list->push_back(config_helpers::create_default_logical_channel_config(lcid)); it = ue_creation_req.cfg.lc_config_list->end() - 1; } it->lc_group = static_cast(0); @@ -759,22 +1008,22 @@ TEST_P(multiple_ue_sched_tester, dl_dci_format_1_1_test) } // Send Buffer status 0 upon receiving grants for all requested bytes. - const unsigned tbs_sched_bytes = pdsch_tbs_scheduled_bytes_per_lc(test_ue, LCID_MIN_DRB); - if (tbs_sched_bytes == 0 && test_ue.dl_bsr_list.back().bs == 0 && + const unsigned tbs_sched_bytes = pdsch_tbs_scheduled_bytes_per_lc(test_ue, lcid); + if (tbs_sched_bytes == 0 && test_ue.dl_bsr_list.at(lcid).bs == 0 && pdsch_scheduled_slot_in_future[idx].has_value() && current_slot > pdsch_scheduled_slot_in_future[idx].value() && not is_bsr_zero_sent[idx]) { is_bsr_zero_sent[idx] = true; // Notify buffer status of 0 to ensure scheduler does not schedule further for this UE. - push_buffer_state_to_dl_ue(to_du_ue_index(idx), 0, LCID_MIN_DRB); + push_buffer_state_to_dl_ue(to_du_ue_index(idx), 0, lcid); } // Update Buffer status maintained in test UE. if (grant != nullptr && grant->pdsch_cfg.codewords[0].new_data) { - if (tbs_sched_bytes > test_ue.dl_bsr_list.back().bs) { + if (tbs_sched_bytes > test_ue.dl_bsr_list.at(lcid).bs) { // Accounting for MAC headers. - test_ue.dl_bsr_list.back().bs = 0; + test_ue.dl_bsr_list.at(lcid).bs = 0; } else { - test_ue.dl_bsr_list.back().bs -= tbs_sched_bytes; + test_ue.dl_bsr_list.at(lcid).bs -= tbs_sched_bytes; } } } @@ -787,6 +1036,8 @@ TEST_P(multiple_ue_sched_tester, ul_dci_format_0_1_test) std::map is_bsr_zero_sent; std::map> pusch_scheduled_slot_in_future; + const lcg_id_t lcgid = uint_to_lcg_id(0); + // Pre-populate common UE creation request parameters. const auto& cell_cfg_params = create_custom_cell_cfg_builder_params(params.duplx_mode); auto ue_creation_req = test_helpers::create_default_sched_ue_creation_request(cell_cfg_params); @@ -881,7 +1132,7 @@ TEST_P(multiple_ue_sched_tester, ul_dci_format_0_1_test) // Send BSR 0 upon receiving grants for all requested bytes. const unsigned tbs_sched_bytes = pusch_tbs_scheduled_bytes(test_ue); - if (tbs_sched_bytes == 0 && test_ue.ul_bsr_list.back().nof_bytes == 0 && + if (tbs_sched_bytes == 0 && test_ue.ul_bsr_list.at(lcgid).nof_bytes == 0 && pusch_scheduled_slot_in_future[idx].has_value() && current_slot > pusch_scheduled_slot_in_future[idx].value() && not is_bsr_zero_sent[idx]) { is_bsr_zero_sent[idx] = true; @@ -892,11 +1143,11 @@ TEST_P(multiple_ue_sched_tester, ul_dci_format_0_1_test) // Update Buffer status maintained in test UE. if (pusch != nullptr && pusch->pusch_cfg.new_data) { crc_ind.crcs.push_back(build_success_crc_pdu_indication(to_du_ue_index(idx), pusch->pusch_cfg.harq_id)); - if (tbs_sched_bytes > test_ue.ul_bsr_list.back().nof_bytes) { + if (tbs_sched_bytes > test_ue.ul_bsr_list.at(lcgid).nof_bytes) { // Accounting for MAC headers. - test_ue.ul_bsr_list.back().nof_bytes = 0; + test_ue.ul_bsr_list.at(lcgid).nof_bytes = 0; } else { - test_ue.ul_bsr_list.back().nof_bytes -= tbs_sched_bytes; + test_ue.ul_bsr_list.at(lcgid).nof_bytes -= tbs_sched_bytes; } } } From 7cb09e93a4c2364eb7216f673cbcf34a6c18145a Mon Sep 17 00:00:00 2001 From: Carlo Galiotto Date: Fri, 2 Feb 2024 18:12:54 +0100 Subject: [PATCH 48/78] gnb: add pucch configs to support 32, 64 and 128 UEs Signed-off-by: Carlo Galiotto --- apps/gnb/gnb_appconfig_cli11_schema.cpp | 4 ++-- ...gnb_sr_20ms_csi_20_or_40ms_max_128_ues.yml | 21 +++++++++++++++++++ .../gnb_sr_20ms_csi_20_or_40ms_max_32_ues.yml | 21 +++++++++++++++++++ .../gnb_sr_20ms_csi_20_or_40ms_max_64_ues.yml | 21 +++++++++++++++++++ 4 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 configs/gnb_sr_20ms_csi_20_or_40ms_max_128_ues.yml create mode 100644 configs/gnb_sr_20ms_csi_20_or_40ms_max_32_ues.yml create mode 100644 configs/gnb_sr_20ms_csi_20_or_40ms_max_64_ues.yml diff --git a/apps/gnb/gnb_appconfig_cli11_schema.cpp b/apps/gnb/gnb_appconfig_cli11_schema.cpp index d6bb90c31b..830efbe897 100644 --- a/apps/gnb/gnb_appconfig_cli11_schema.cpp +++ b/apps/gnb/gnb_appconfig_cli11_schema.cpp @@ -830,7 +830,7 @@ static void configure_cli11_pucch_args(CLI::App& app, pucch_appconfig& pucch_par pucch_params.nof_cell_sr_resources, "Number of PUCCH F1 resources available per cell for SR") ->capture_default_str() - ->check(CLI::Range(1, 30)); + ->check(CLI::Range(1, 50)); app.add_option("--f1_nof_symbols", pucch_params.f1_nof_symbols, "Number of symbols for PUCCH F1 resources") ->capture_default_str() ->check(CLI::Range(4, 14)); @@ -859,7 +859,7 @@ static void configure_cli11_pucch_args(CLI::App& app, pucch_appconfig& pucch_par pucch_params.nof_cell_csi_resources, "Number of PUCCH F2 resources available per cell for CSI") ->capture_default_str() - ->check(CLI::Range(0, 30)); + ->check(CLI::Range(0, 50)); app.add_option("--f2_nof_symbols", pucch_params.f2_nof_symbols, "Number of symbols for PUCCH F2 resources") ->capture_default_str() ->check(CLI::Range(1, 2)); diff --git a/configs/gnb_sr_20ms_csi_20_or_40ms_max_128_ues.yml b/configs/gnb_sr_20ms_csi_20_or_40ms_max_128_ues.yml new file mode 100644 index 0000000000..7f38bc2348 --- /dev/null +++ b/configs/gnb_sr_20ms_csi_20_or_40ms_max_128_ues.yml @@ -0,0 +1,21 @@ +# This file contains the PUCCH configuration for the gNB to support: +# - SR period 20ms +# - CSI period 20ms or 40ms +# - Max 32 UEs + +cell_cfg: + pucch: + sr_period_ms: 20 + f1_nof_cell_res_sr: 50 + f2_nof_cell_res_csi: 50 + csi: + csi_rs_period: 40 # This can be set either 20 or 40 ms. + ul_common: + max_ul_grants_per_slot: 64 + max_pucchs_per_slot: 63 + pusch: + max_puschs_per_slot: 1 + tdd_ul_dl_cfg: + nof_dl_symbols: 7 + nof_dl_slots: 7 + nof_ul_slots: 2 \ No newline at end of file diff --git a/configs/gnb_sr_20ms_csi_20_or_40ms_max_32_ues.yml b/configs/gnb_sr_20ms_csi_20_or_40ms_max_32_ues.yml new file mode 100644 index 0000000000..efb49ab19e --- /dev/null +++ b/configs/gnb_sr_20ms_csi_20_or_40ms_max_32_ues.yml @@ -0,0 +1,21 @@ +# This file contains the PUCCH configuration for the gNB to support: +# - SR period 20ms +# - CSI period 20ms or 40ms +# - Max 32 UEs + +cell_cfg: + pucch: + sr_period_ms: 20 + f1_nof_cell_res_sr: 15 + f2_nof_cell_res_csi: 15 + csi: + csi_rs_period: 20 # This can be set either 20 or 40 ms. + ul_common: + max_ul_grants_per_slot: 16 + max_pucchs_per_slot: 15 + pusch: + max_puschs_per_slot: 1 + tdd_ul_dl_cfg: + nof_dl_symbols: 7 + nof_dl_slots: 7 + nof_ul_slots: 2 \ No newline at end of file diff --git a/configs/gnb_sr_20ms_csi_20_or_40ms_max_64_ues.yml b/configs/gnb_sr_20ms_csi_20_or_40ms_max_64_ues.yml new file mode 100644 index 0000000000..7e02585f33 --- /dev/null +++ b/configs/gnb_sr_20ms_csi_20_or_40ms_max_64_ues.yml @@ -0,0 +1,21 @@ +# This file contains the PUCCH configuration for the gNB to support: +# - SR period 20ms +# - CSI period 20ms or 40ms +# - Max 32 UEs + +cell_cfg: + pucch: + sr_period_ms: 20 + f1_nof_cell_res_sr: 31 + f2_nof_cell_res_csi: 31 + csi: + csi_rs_period: 20 # This can be set either 20 or 40 ms. + ul_common: + max_ul_grants_per_slot: 32 + max_pucchs_per_slot: 31 + pusch: + max_puschs_per_slot: 1 + tdd_ul_dl_cfg: + nof_dl_symbols: 7 + nof_dl_slots: 7 + nof_ul_slots: 2 \ No newline at end of file From fc617874928c5db1c1adea850ec169ca930eeab8 Mon Sep 17 00:00:00 2001 From: Carlo Galiotto Date: Fri, 9 Feb 2024 12:15:32 +0100 Subject: [PATCH 49/78] gnb: rename configuration files for cell_cfg Signed-off-by: Carlo Galiotto --- configs/cell_cfg_max_128_ues.yml | 26 +++++++++++++++++++ configs/cell_cfg_max_32_ues.yml | 24 +++++++++++++++++ configs/cell_cfg_max_64_ues.yml | 24 +++++++++++++++++ ...gnb_sr_20ms_csi_20_or_40ms_max_128_ues.yml | 21 --------------- .../gnb_sr_20ms_csi_20_or_40ms_max_32_ues.yml | 21 --------------- .../gnb_sr_20ms_csi_20_or_40ms_max_64_ues.yml | 21 --------------- 6 files changed, 74 insertions(+), 63 deletions(-) create mode 100644 configs/cell_cfg_max_128_ues.yml create mode 100644 configs/cell_cfg_max_32_ues.yml create mode 100644 configs/cell_cfg_max_64_ues.yml delete mode 100644 configs/gnb_sr_20ms_csi_20_or_40ms_max_128_ues.yml delete mode 100644 configs/gnb_sr_20ms_csi_20_or_40ms_max_32_ues.yml delete mode 100644 configs/gnb_sr_20ms_csi_20_or_40ms_max_64_ues.yml diff --git a/configs/cell_cfg_max_128_ues.yml b/configs/cell_cfg_max_128_ues.yml new file mode 100644 index 0000000000..82ad4a90a3 --- /dev/null +++ b/configs/cell_cfg_max_128_ues.yml @@ -0,0 +1,26 @@ +# This file contains the PUCCH configuration for the gNB to support: +# - SR period 20ms or 40ms. +# - CSI period 20ms or 40ms. +# - Max 128 UEs. + +# NOTEs: +# - This configuration is optimized for TDD 7D-2U configuration, but it still works for TDD configurations +# with more than 2 UL slots. +# - This configuration might work for more than 128 UEs, although it hasn't been tested for those scenarios. + +cell_cfg: + pucch: + sr_period_ms: 20 # This can be set either 20 or 40 ms. + f1_nof_cell_res_sr: 50 + f2_nof_cell_res_csi: 50 + csi: + csi_rs_period: 40 # This can be set either 20 or 40 ms. + ul_common: + max_ul_grants_per_slot: 64 + max_pucchs_per_slot: 63 + pusch: + max_puschs_per_slot: 1 + tdd_ul_dl_cfg: + nof_dl_symbols: 7 + nof_dl_slots: 7 + nof_ul_slots: 2 \ No newline at end of file diff --git a/configs/cell_cfg_max_32_ues.yml b/configs/cell_cfg_max_32_ues.yml new file mode 100644 index 0000000000..52459c0e08 --- /dev/null +++ b/configs/cell_cfg_max_32_ues.yml @@ -0,0 +1,24 @@ +# This file contains the PUCCH configuration for the gNB to support: +# - SR period 20ms or 40ms. +# - CSI period 20ms or 40ms. +# - Max 32 UEs. + +# NOTE: This configuration is optimized for TDD 7D-2U configuration, but it still works for TDD configurations +# with more than 2 UL slots. + +cell_cfg: + pucch: + sr_period_ms: 20 # This can be set either 20 or 40 ms. + f1_nof_cell_res_sr: 15 + f2_nof_cell_res_csi: 15 + csi: + csi_rs_period: 40 # This can be set either 20 or 40 ms. + ul_common: + max_ul_grants_per_slot: 16 + max_pucchs_per_slot: 15 + pusch: + max_puschs_per_slot: 1 + tdd_ul_dl_cfg: + nof_dl_symbols: 7 + nof_dl_slots: 7 + nof_ul_slots: 2 \ No newline at end of file diff --git a/configs/cell_cfg_max_64_ues.yml b/configs/cell_cfg_max_64_ues.yml new file mode 100644 index 0000000000..656ef3f665 --- /dev/null +++ b/configs/cell_cfg_max_64_ues.yml @@ -0,0 +1,24 @@ +# This file contains the PUCCH configuration for the gNB to support: +# - SR period 20ms or 40ms. +# - CSI period 20ms or 40ms. +# - Max 64 UEs. + +# NOTE: This configuration is optimized for TDD 7D-2U configuration, but it still works for TDD configurations +# with more than 2 UL slots. + +cell_cfg: + pucch: + sr_period_ms: 20 # This can be set either 20 or 40 ms. + f1_nof_cell_res_sr: 31 + f2_nof_cell_res_csi: 31 + csi: + csi_rs_period: 40 # This can be set either 20 or 40 ms. + ul_common: + max_ul_grants_per_slot: 32 + max_pucchs_per_slot: 31 + pusch: + max_puschs_per_slot: 1 + tdd_ul_dl_cfg: + nof_dl_symbols: 7 + nof_dl_slots: 7 + nof_ul_slots: 2 \ No newline at end of file diff --git a/configs/gnb_sr_20ms_csi_20_or_40ms_max_128_ues.yml b/configs/gnb_sr_20ms_csi_20_or_40ms_max_128_ues.yml deleted file mode 100644 index 7f38bc2348..0000000000 --- a/configs/gnb_sr_20ms_csi_20_or_40ms_max_128_ues.yml +++ /dev/null @@ -1,21 +0,0 @@ -# This file contains the PUCCH configuration for the gNB to support: -# - SR period 20ms -# - CSI period 20ms or 40ms -# - Max 32 UEs - -cell_cfg: - pucch: - sr_period_ms: 20 - f1_nof_cell_res_sr: 50 - f2_nof_cell_res_csi: 50 - csi: - csi_rs_period: 40 # This can be set either 20 or 40 ms. - ul_common: - max_ul_grants_per_slot: 64 - max_pucchs_per_slot: 63 - pusch: - max_puschs_per_slot: 1 - tdd_ul_dl_cfg: - nof_dl_symbols: 7 - nof_dl_slots: 7 - nof_ul_slots: 2 \ No newline at end of file diff --git a/configs/gnb_sr_20ms_csi_20_or_40ms_max_32_ues.yml b/configs/gnb_sr_20ms_csi_20_or_40ms_max_32_ues.yml deleted file mode 100644 index efb49ab19e..0000000000 --- a/configs/gnb_sr_20ms_csi_20_or_40ms_max_32_ues.yml +++ /dev/null @@ -1,21 +0,0 @@ -# This file contains the PUCCH configuration for the gNB to support: -# - SR period 20ms -# - CSI period 20ms or 40ms -# - Max 32 UEs - -cell_cfg: - pucch: - sr_period_ms: 20 - f1_nof_cell_res_sr: 15 - f2_nof_cell_res_csi: 15 - csi: - csi_rs_period: 20 # This can be set either 20 or 40 ms. - ul_common: - max_ul_grants_per_slot: 16 - max_pucchs_per_slot: 15 - pusch: - max_puschs_per_slot: 1 - tdd_ul_dl_cfg: - nof_dl_symbols: 7 - nof_dl_slots: 7 - nof_ul_slots: 2 \ No newline at end of file diff --git a/configs/gnb_sr_20ms_csi_20_or_40ms_max_64_ues.yml b/configs/gnb_sr_20ms_csi_20_or_40ms_max_64_ues.yml deleted file mode 100644 index 7e02585f33..0000000000 --- a/configs/gnb_sr_20ms_csi_20_or_40ms_max_64_ues.yml +++ /dev/null @@ -1,21 +0,0 @@ -# This file contains the PUCCH configuration for the gNB to support: -# - SR period 20ms -# - CSI period 20ms or 40ms -# - Max 32 UEs - -cell_cfg: - pucch: - sr_period_ms: 20 - f1_nof_cell_res_sr: 31 - f2_nof_cell_res_csi: 31 - csi: - csi_rs_period: 20 # This can be set either 20 or 40 ms. - ul_common: - max_ul_grants_per_slot: 32 - max_pucchs_per_slot: 31 - pusch: - max_puschs_per_slot: 1 - tdd_ul_dl_cfg: - nof_dl_symbols: 7 - nof_dl_slots: 7 - nof_ul_slots: 2 \ No newline at end of file From a7c56f9ce9fdaeeb4e2a6a66ec97d6668313d426 Mon Sep 17 00:00:00 2001 From: faluco Date: Wed, 14 Feb 2024 17:33:51 +0100 Subject: [PATCH 50/78] phy_adaptor: propagate undetected SRs carried in format2 in the UCI.indication --- .../phy/phy_to_fapi_results_event_translator.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/fapi_adaptor/phy/phy_to_fapi_results_event_translator.cpp b/lib/fapi_adaptor/phy/phy_to_fapi_results_event_translator.cpp index df025646f7..523cad9bcc 100644 --- a/lib/fapi_adaptor/phy/phy_to_fapi_results_event_translator.cpp +++ b/lib/fapi_adaptor/phy/phy_to_fapi_results_event_translator.cpp @@ -384,13 +384,18 @@ static void fill_format_2_3_4_harq(fapi::uci_pucch_pdu_format_2_3_4_builder& bui /// Fills the SR parameters for PUCCH Format 2/3/4 using the given builder and message. static void fill_format_2_3_4_sr(fapi::uci_pucch_pdu_format_2_3_4_builder& builder, const pucch_uci_message& message) { - if (message.get_status() != uci_status::valid) { + units::bits sr_len = units::bits(message.get_expected_nof_sr_bits()); + if (sr_len.value() == 0) { return; } - units::bits sr_len = units::bits(message.get_expected_nof_sr_bits()); + uci_pusch_or_pucch_f2_3_4_detection_status status = + to_fapi_uci_detection_status(message.get_status(), message.get_expected_nof_bits_full_payload()); - if (sr_len.value() == 0) { + // Set the payload to 0s on detection failure. + if (!is_fapi_uci_payload_valid(status)) { + builder.set_sr_parameters(sr_len.value(), + bounded_bitset(sr_len.value())); return; } From 1520894bdea573ebb39541c5d99794adcd138c3b Mon Sep 17 00:00:00 2001 From: Fabian Eckermann Date: Wed, 14 Feb 2024 15:37:51 +0100 Subject: [PATCH 51/78] cu_cp: Fix logging --- lib/cu_cp/routines/pdu_session_resource_setup_routine.cpp | 4 ++-- lib/e1ap/cu_cp/e1ap_cu_cp_impl.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cu_cp/routines/pdu_session_resource_setup_routine.cpp b/lib/cu_cp/routines/pdu_session_resource_setup_routine.cpp index a266388676..c15d7689c7 100644 --- a/lib/cu_cp/routines/pdu_session_resource_setup_routine.cpp +++ b/lib/cu_cp/routines/pdu_session_resource_setup_routine.cpp @@ -82,7 +82,7 @@ void pdu_session_resource_setup_routine::operator()( // Perform initial sanity checks on incoming message. if (!rrc_ue_up_resource_manager.validate_request(setup_msg.pdu_session_res_setup_items)) { - logger.warning("ue={}: \"{}\" Invalid PduSessionResourceSetup", setup_msg.ue_index, name()); + logger.info("ue={}: \"{}\" Invalid PduSessionResourceSetup", setup_msg.ue_index, name()); CORO_EARLY_RETURN(handle_pdu_session_resource_setup_result(false)); } @@ -389,7 +389,7 @@ pdu_session_resource_setup_routine::handle_pdu_session_resource_setup_result(boo } rrc_ue_up_resource_manager.apply_config_update(result); } else { - logger.warning("ue={}: \"{}\" failed", setup_msg.ue_index, name()); + logger.info("ue={}: \"{}\" failed", setup_msg.ue_index, name()); mark_all_sessions_as_failed(response_msg, setup_msg, cause_radio_network_t::unspecified); } diff --git a/lib/e1ap/cu_cp/e1ap_cu_cp_impl.cpp b/lib/e1ap/cu_cp/e1ap_cu_cp_impl.cpp index 57d0d8c443..e3827a6130 100644 --- a/lib/e1ap/cu_cp/e1ap_cu_cp_impl.cpp +++ b/lib/e1ap/cu_cp/e1ap_cu_cp_impl.cpp @@ -144,7 +144,7 @@ async_task e1ap_cu_cp_impl::handle_bearer_context_release_command(const e1ap_bearer_context_release_command& command) { if (!ue_ctxt_list.contains(command.ue_index)) { - logger.warning("ue={}: Dropping BearerContextReleaseCommand. Bearer context does not exist", command.ue_index); + logger.debug("ue={}: Dropping BearerContextReleaseCommand. Bearer context does not exist", command.ue_index); return launch_async([](coro_context>& ctx) mutable { CORO_BEGIN(ctx); CORO_RETURN(); From 85676da16b19ef84f18545665684ea4298de26ee Mon Sep 17 00:00:00 2001 From: Fabian Eckermann Date: Wed, 14 Feb 2024 15:39:04 +0100 Subject: [PATCH 52/78] cu_cp: Push ue context to new ue in handover --- lib/cu_cp/adapters/du_processor_adapters.h | 6 ++++++ lib/cu_cp/cu_cp_impl.cpp | 8 ++++++++ lib/cu_cp/cu_cp_impl.h | 1 + lib/cu_cp/cu_cp_impl_interface.h | 5 +++++ lib/cu_cp/du_processor/du_processor_impl_interface.h | 5 +++++ .../routines/mobility/inter_du_handover_routine.cpp | 11 ++++------- .../routines/mobility/inter_du_handover_routine.h | 2 +- tests/unittests/cu_cp/test_helpers.h | 5 +++++ 8 files changed, 35 insertions(+), 8 deletions(-) diff --git a/lib/cu_cp/adapters/du_processor_adapters.h b/lib/cu_cp/adapters/du_processor_adapters.h index 40bdaeddb9..44b2f8bc9c 100644 --- a/lib/cu_cp/adapters/du_processor_adapters.h +++ b/lib/cu_cp/adapters/du_processor_adapters.h @@ -102,6 +102,12 @@ class du_processor_cu_cp_adapter : public du_processor_cu_cp_notifier return ue_context_handler->handle_ue_context_transfer(ue_index, old_ue_index); } + void on_handover_ue_context_push(ue_index_t source_ue_index, ue_index_t target_ue_index) override + { + srsran_assert(ue_context_handler != nullptr, "UE context handler must not be nullptr"); + return ue_context_handler->handle_handover_ue_context_push(source_ue_index, target_ue_index); + } + private: cu_cp_du_event_handler* cu_cp_handler = nullptr; cu_cp_ue_removal_handler* ue_removal_handler = nullptr; diff --git a/lib/cu_cp/cu_cp_impl.cpp b/lib/cu_cp/cu_cp_impl.cpp index c5c5872343..ffabf4b47c 100644 --- a/lib/cu_cp/cu_cp_impl.cpp +++ b/lib/cu_cp/cu_cp_impl.cpp @@ -259,6 +259,14 @@ async_task cu_cp_impl::handle_ue_context_transfer(ue_index_t ue_index, ue_ return launch_async(*this, old_ue_index, handle_ue_context_transfer_impl); } +void cu_cp_impl::handle_handover_ue_context_push(ue_index_t source_ue_index, ue_index_t target_ue_index) +{ + // Transfer NGAP UE Context to new UE and remove the old context + ngap_entity->update_ue_index(target_ue_index, source_ue_index); + // Transfer E1AP UE Context to new UE and remove old context + cu_up_db.get_cu_up(uint_to_cu_up_index(0)).update_ue_index(target_ue_index, source_ue_index); +} + optional cu_cp_impl::handle_measurement_config_request(nr_cell_id_t nci, optional current_meas_config) { diff --git a/lib/cu_cp/cu_cp_impl.h b/lib/cu_cp/cu_cp_impl.h index a818b9dbf8..5c8b10badd 100644 --- a/lib/cu_cp/cu_cp_impl.h +++ b/lib/cu_cp/cu_cp_impl.h @@ -59,6 +59,7 @@ class cu_cp_impl final : public cu_cp, public cu_cp_impl_interface, public cu_cp rrc_reestablishment_ue_context_t handle_rrc_reestablishment_request(pci_t old_pci, rnti_t old_c_rnti, ue_index_t ue_index) override; async_task handle_ue_context_transfer(ue_index_t ue_index, ue_index_t old_ue_index) override; + void handle_handover_ue_context_push(ue_index_t source_ue_index, ue_index_t target_ue_index) override; // cu_cp_measurement_handler optional handle_measurement_config_request(nr_cell_id_t nci, diff --git a/lib/cu_cp/cu_cp_impl_interface.h b/lib/cu_cp/cu_cp_impl_interface.h index 5e4843c5ac..14cc0ffc60 100644 --- a/lib/cu_cp/cu_cp_impl_interface.h +++ b/lib/cu_cp/cu_cp_impl_interface.h @@ -202,6 +202,11 @@ class cu_cp_ue_context_manipulation_handler /// \param[in] ue_index The new UE index of the UE that sent the Reestablishment Request or is the target UE. /// \param[in] old_ue_index The old UE index of the UE that sent the Reestablishment Request or is the source UE. virtual async_task handle_ue_context_transfer(ue_index_t ue_index, ue_index_t old_ue_index) = 0; + + /// \brief Handle a UE context push during handover. + /// \param[in] source_ue_index The index of the UE that is the source of the handover. + /// \param[in] target_ue_index The index of the UE that is the target of the handover. + virtual void handle_handover_ue_context_push(ue_index_t source_ue_index, ue_index_t target_ue_index) = 0; }; /// Methods used by CU-CP to transfer the RRC UE context e.g. for RRC Reestablishments diff --git a/lib/cu_cp/du_processor/du_processor_impl_interface.h b/lib/cu_cp/du_processor/du_processor_impl_interface.h index 12a46798bd..40d47d06e9 100644 --- a/lib/cu_cp/du_processor/du_processor_impl_interface.h +++ b/lib/cu_cp/du_processor/du_processor_impl_interface.h @@ -371,6 +371,11 @@ class du_processor_cu_cp_notifier /// \param[in] ue_index The new UE index of the UE that sent the Reestablishment Request. /// \param[in] old_ue_index The old UE index of the UE that sent the Reestablishment Request. virtual async_task on_ue_transfer_required(ue_index_t ue_index, ue_index_t old_ue_index) = 0; + + /// \brief Notify the CU-CP to push a UE context to a UE during handover. + /// \param[in] source_ue_index The index of the UE that is the source of the handover. + /// \param[in] target_ue_index The index of the UE that is the target of the handover. + virtual void on_handover_ue_context_push(ue_index_t source_ue_index, ue_index_t target_ue_index) = 0; }; /// DU processor Paging handler. diff --git a/lib/cu_cp/routines/mobility/inter_du_handover_routine.cpp b/lib/cu_cp/routines/mobility/inter_du_handover_routine.cpp index beecf0d17d..99539ab309 100644 --- a/lib/cu_cp/routines/mobility/inter_du_handover_routine.cpp +++ b/lib/cu_cp/routines/mobility/inter_du_handover_routine.cpp @@ -177,7 +177,7 @@ void inter_du_handover_routine::operator()(coro_context(rrc_reconfig_args, *source_ue, *target_ue, logger)); if (!reconf_result) { @@ -195,12 +195,9 @@ void inter_du_handover_routine::operator()(coro_contextget_up_resource_manager().apply_config_update(result); } - // Transfer old UE context (NGAP and E1AP) to new UE context and remove old UE context. - CORO_AWAIT_VALUE(context_transfer_success, - cu_cp_notifier.on_ue_transfer_required(target_ue->get_ue_index(), command.source_ue_index)); - if (not context_transfer_success) { - logger.warning("ue={}: \"{}\" failed to transfer UE context", command.source_ue_index, name()); - CORO_EARLY_RETURN(response_msg); + { + // Transfer old UE context (NGAP and E1AP) to new UE context and remove old UE context. + cu_cp_notifier.on_handover_ue_context_push(command.source_ue_index, target_ue->get_ue_index()); } // Remove source UE context. diff --git a/lib/cu_cp/routines/mobility/inter_du_handover_routine.h b/lib/cu_cp/routines/mobility/inter_du_handover_routine.h index 93b800e239..cc0275aa07 100644 --- a/lib/cu_cp/routines/mobility/inter_du_handover_routine.h +++ b/lib/cu_cp/routines/mobility/inter_du_handover_routine.h @@ -73,7 +73,7 @@ class inter_du_handover_routine e1ap_bearer_context_modification_response bearer_context_modification_response; // to inform CU-UP about the new TEID for UL F1u traffic f1ap_ue_context_modification_response source_ue_context_modification_response; - bool context_transfer_success = false; + bool reconf_result = false; }; } // namespace srs_cu_cp diff --git a/tests/unittests/cu_cp/test_helpers.h b/tests/unittests/cu_cp/test_helpers.h index 1eb1dfd17c..8625e5686c 100644 --- a/tests/unittests/cu_cp/test_helpers.h +++ b/tests/unittests/cu_cp/test_helpers.h @@ -128,6 +128,11 @@ struct dummy_du_processor_cu_cp_notifier : public du_processor_cu_cp_notifier { }); } + void on_handover_ue_context_push(ue_index_t source_ue_index, ue_index_t target_ue_index) override + { + logger.info("Received handover ue context push"); + } + private: srslog::basic_logger& logger = srslog::fetch_basic_logger("TEST"); std::unique_ptr ngap_notifier; From f3944818ee20cd9d56863b6163ea5b8a910d9459 Mon Sep 17 00:00:00 2001 From: Alejandro Leal Date: Fri, 26 Jan 2024 16:54:15 +0100 Subject: [PATCH 53/78] gnb: setting the headroom size to the max_proc_delay when it is not present in the configuration --- apps/gnb/gnb_appconfig_cli11_schema.cpp | 44 ++++++++++++++++--------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/apps/gnb/gnb_appconfig_cli11_schema.cpp b/apps/gnb/gnb_appconfig_cli11_schema.cpp index 830efbe897..424780c014 100644 --- a/apps/gnb/gnb_appconfig_cli11_schema.cpp +++ b/apps/gnb/gnb_appconfig_cli11_schema.cpp @@ -2326,28 +2326,40 @@ static void manage_expert_execution_threads(CLI::App& app, gnb_appconfig& gnb_cf } } -static void manage_processing_delay(CLI::App& app, gnb_appconfig& gnb_cfg) +/// Sets the request headroom size to the max processing delay value if the request headroom property was not parsed, +static void manage_max_request_headroom_size(CLI::App& app, gnb_appconfig& gnb_cfg) { - // If max proc delay property is present in the config, do nothing. + // If max request headroom slots property is present in the config, do nothing. CLI::App* expert_cmd = app.get_subcommand("expert_phy"); - if (expert_cmd->count_all() >= 1 && expert_cmd->count("--max_proc_delay") >= 1) { + if (expert_cmd->count_all() >= 1 && expert_cmd->count("--max_request_headroom_slots") >= 1) { return; } - // As processing delay is not cell related, use the first cell to update the value. - const auto& cell = gnb_cfg.cells_cfg.front().cell; - nr_band band = cell.band ? cell.band.value() : band_helper::get_band_from_dl_arfcn(cell.dl_arfcn); - - switch (band_helper::get_duplex_mode(band)) { - case duplex_mode::TDD: - gnb_cfg.expert_phy_cfg.max_processing_delay_slots = 5; - break; - case duplex_mode::FDD: - gnb_cfg.expert_phy_cfg.max_processing_delay_slots = 2; - break; - default: - break; + gnb_cfg.expert_phy_cfg.nof_slots_request_headroom = gnb_cfg.expert_phy_cfg.max_processing_delay_slots; +} + +static void manage_processing_delay(CLI::App& app, gnb_appconfig& gnb_cfg) +{ + // If max proc delay property is not present in the config, configure the default value. + CLI::App* expert_cmd = app.get_subcommand("expert_phy"); + if (expert_cmd->count_all() == 0 || expert_cmd->count("--max_proc_delay") == 0) { + // As processing delay is not cell related, use the first cell to update the value. + const auto& cell = gnb_cfg.cells_cfg.front().cell; + nr_band band = cell.band ? cell.band.value() : band_helper::get_band_from_dl_arfcn(cell.dl_arfcn); + + switch (band_helper::get_duplex_mode(band)) { + case duplex_mode::TDD: + gnb_cfg.expert_phy_cfg.max_processing_delay_slots = 5; + break; + case duplex_mode::FDD: + gnb_cfg.expert_phy_cfg.max_processing_delay_slots = 2; + break; + default: + break; + } } + + manage_max_request_headroom_size(app, gnb_cfg); } void srsran::configure_cli11_with_gnb_appconfig_schema(CLI::App& app, gnb_parsed_appconfig& gnb_parsed_cfg) From da63b6d0ce635dc7416400d70467cd8db5725913 Mon Sep 17 00:00:00 2001 From: Alejandro Leal Date: Tue, 16 Jan 2024 12:06:28 +0100 Subject: [PATCH 54/78] ofh: added a notifier for late downlink messages --- apps/gnb/gnb.cpp | 9 +++- include/srsran/du/du.h | 22 ++++++---- include/srsran/fapi/message_builders.h | 2 - .../fapi_adaptor/phy/phy_fapi_adaptor.h | 20 +++++---- include/srsran/ofh/ofh_error_notifier.h | 39 ++++++++++++++++ include/srsran/ofh/ofh_sector.h | 4 ++ include/srsran/ofh/ofh_sector_config.h | 2 + .../ofh/transmitter/ofh_downlink_handler.h | 5 +++ .../srsran/ofh/transmitter/ofh_transmitter.h | 5 +++ .../ofh_transmitter_configuration.h | 2 + include/srsran/phy/upper/upper_phy.h | 30 ++++++++----- .../phy/upper/upper_phy_error_handler.h | 30 +++++++++++++ .../phy/upper/upper_phy_error_notifier.h | 30 +++++++++++++ include/srsran/ru/ru_adapters.h | 41 ++++++++++++++--- include/srsran/ru/ru_error_notifier.h | 38 ++++++++++++++++ include/srsran/ru/ru_ofh_configuration.h | 3 ++ lib/du/du_impl.cpp | 1 + lib/du/du_impl.h | 8 ++++ lib/du/du_low_impl.h | 37 ++++++++++++++-- lib/fapi_adaptor/phy/CMakeLists.txt | 9 ++-- .../phy/phy_fapi_adaptor_impl.cpp | 6 +++ lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.h | 5 +++ .../phy_to_fapi_error_event_translator.cpp | 36 +++++++++++++++ .../phy/phy_to_fapi_error_event_translator.h | 44 +++++++++++++++++++ lib/ofh/ofh_factories.cpp | 1 + lib/ofh/ofh_sector_impl.cpp | 5 +++ lib/ofh/ofh_sector_impl.h | 3 ++ .../ofh_downlink_handler_broadcast_impl.cpp | 20 ++++++++- .../ofh_downlink_handler_broadcast_impl.h | 7 +++ .../transmitter/ofh_downlink_handler_impl.cpp | 20 ++++++++- .../transmitter/ofh_downlink_handler_impl.h | 7 +++ lib/ofh/transmitter/ofh_downlink_manager.h | 5 +++ .../ofh_downlink_manager_broadcast_impl.cpp | 6 +++ .../ofh_downlink_manager_broadcast_impl.h | 3 ++ .../transmitter/ofh_downlink_manager_impl.cpp | 5 +++ .../transmitter/ofh_downlink_manager_impl.h | 3 ++ .../transmitter/ofh_transmitter_factories.cpp | 2 + lib/ofh/transmitter/ofh_transmitter_impl.cpp | 5 +++ lib/ofh/transmitter/ofh_transmitter_impl.h | 3 ++ lib/phy/upper/CMakeLists.txt | 4 +- .../upper/upper_phy_error_handler_impl.cpp | 32 ++++++++++++++ lib/phy/upper/upper_phy_error_handler_impl.h | 35 +++++++++++++++ lib/phy/upper/upper_phy_impl.cpp | 10 +++++ lib/phy/upper/upper_phy_impl.h | 9 ++++ lib/ru/ofh/CMakeLists.txt | 3 +- lib/ru/ofh/ru_ofh_error_handler_impl.cpp | 22 ++++++++++ lib/ru/ofh/ru_ofh_error_handler_impl.h | 31 +++++++++++++ lib/ru/ofh/ru_ofh_factory.cpp | 7 ++- lib/ru/ofh/ru_ofh_impl.cpp | 6 +++ lib/ru/ofh/ru_ofh_impl.h | 5 ++- .../ofh/ofh_integration_test.cpp | 18 ++++++-- .../ofh_downlink_handler_impl_test.cpp | 1 + 52 files changed, 650 insertions(+), 56 deletions(-) create mode 100644 include/srsran/ofh/ofh_error_notifier.h create mode 100644 include/srsran/phy/upper/upper_phy_error_handler.h create mode 100644 include/srsran/phy/upper/upper_phy_error_notifier.h create mode 100644 include/srsran/ru/ru_error_notifier.h create mode 100644 lib/fapi_adaptor/phy/phy_to_fapi_error_event_translator.cpp create mode 100644 lib/fapi_adaptor/phy/phy_to_fapi_error_event_translator.h create mode 100644 lib/phy/upper/upper_phy_error_handler_impl.cpp create mode 100644 lib/phy/upper/upper_phy_error_handler_impl.h create mode 100644 lib/ru/ofh/ru_ofh_error_handler_impl.cpp create mode 100644 lib/ru/ofh/ru_ofh_error_handler_impl.h diff --git a/apps/gnb/gnb.cpp b/apps/gnb/gnb.cpp index b7ba195c8b..f49962cf44 100644 --- a/apps/gnb/gnb.cpp +++ b/apps/gnb/gnb.cpp @@ -127,7 +127,8 @@ static void configure_ru_ofh_executors_and_notifiers(ru_ofh_configuration& const log_appconfig& log_cfg, worker_manager& workers, ru_uplink_plane_rx_symbol_notifier& symbol_notifier, - ru_timing_notifier& timing_notifier) + ru_timing_notifier& timing_notifier, + ru_error_notifier& error_notifier) { srslog::basic_logger& ofh_logger = srslog::fetch_basic_logger("OFH", false); ofh_logger.set_level(srslog::str_to_basic_level(log_cfg.ofh_level)); @@ -136,6 +137,7 @@ static void configure_ru_ofh_executors_and_notifiers(ru_ofh_configuration& dependencies.rt_timing_executor = workers.ru_timing_exec; dependencies.timing_notifier = &timing_notifier; dependencies.rx_symbol_notifier = &symbol_notifier; + dependencies.error_notifier = &error_notifier; // Configure sector. for (unsigned i = 0, e = config.sector_configs.size(); i != e; ++i) { @@ -486,6 +488,7 @@ int main(int argc, char** argv) upper_ru_ul_adapter ru_ul_adapt(gnb_cfg.cells_cfg.size()); upper_ru_timing_adapter ru_timing_adapt(gnb_cfg.cells_cfg.size()); + upper_ru_error_adapter ru_error_adapt(gnb_cfg.cells_cfg.size()); std::unique_ptr ru_object; if (variant_holds_alternative(ru_cfg.config)) { @@ -495,7 +498,8 @@ int main(int argc, char** argv) gnb_cfg.log_cfg, workers, ru_ul_adapt, - ru_timing_adapt); + ru_timing_adapt, + ru_error_adapt); ru_object = create_ofh_ru(variant_get(ru_cfg.config), std::move(ru_dependencies)); } else if (variant_holds_alternative(ru_cfg.config)) { @@ -545,6 +549,7 @@ int main(int argc, char** argv) // Make connections between DU and RU. ru_ul_adapt.map_handler(sector_id, du->get_rx_symbol_handler()); ru_timing_adapt.map_handler(sector_id, du->get_timing_handler()); + ru_error_adapt.map_handler(sector_id, du->get_error_handler()); // Start DU execution. du->start(); diff --git a/include/srsran/du/du.h b/include/srsran/du/du.h index 568db26a27..f34767e88f 100644 --- a/include/srsran/du/du.h +++ b/include/srsran/du/du.h @@ -10,30 +10,34 @@ #pragma once -#include "srsran/f1ap/common/f1ap_common.h" -#include "srsran/phy/upper/upper_phy_rx_symbol_handler.h" -#include "srsran/phy/upper/upper_phy_timing_handler.h" - namespace srsran { +class f1ap_message_handler; +class upper_phy_error_handler; +class upper_phy_rx_symbol_handler; +class upper_phy_timing_handler; + class du { public: virtual ~du() = default; - /// \brief Start the DU. + /// Starts the DU. virtual void start() = 0; - /// \brief Stop the DU. + /// Stops the DU. virtual void stop() = 0; - /// \brief Get the handler for F1AP Rx PDUs coming from the CU-CP. + /// Returns the handler for F1AP Rx PDUs coming from the CU-CP. virtual f1ap_message_handler& get_f1ap_message_handler() = 0; - /// \brief Gets handler in charge of processing uplink OFDM symbols. + /// Returns a reference to the error handler of the DU. + virtual upper_phy_error_handler& get_error_handler() = 0; + + /// Returns handler in charge of processing uplink OFDM symbols. virtual upper_phy_rx_symbol_handler& get_rx_symbol_handler() = 0; - /// \brief Returns a reference to the timing handler of the DU. + /// Returns a reference to the timing handler of the DU. virtual upper_phy_timing_handler& get_timing_handler() = 0; }; diff --git a/include/srsran/fapi/message_builders.h b/include/srsran/fapi/message_builders.h index 080043c695..6465f74ffb 100644 --- a/include/srsran/fapi/message_builders.h +++ b/include/srsran/fapi/message_builders.h @@ -1870,8 +1870,6 @@ inline slot_indication_message build_slot_indication_message(unsigned sfn, unsig inline error_indication_message build_error_indication(uint16_t sfn, uint16_t slot, message_type_id msg_id, error_code_id error_id) { - srsran_assert(error_id != error_code_id::out_of_sync, "OUT OF SYNC error is not allowed in this builder"); - error_indication_message msg; msg.message_type = message_type_id::error_indication; diff --git a/include/srsran/fapi_adaptor/phy/phy_fapi_adaptor.h b/include/srsran/fapi_adaptor/phy/phy_fapi_adaptor.h index bc4c5f1259..7e233d5c95 100644 --- a/include/srsran/fapi_adaptor/phy/phy_fapi_adaptor.h +++ b/include/srsran/fapi_adaptor/phy/phy_fapi_adaptor.h @@ -19,6 +19,7 @@ class slot_message_gateway; class slot_time_message_notifier; } // namespace fapi +class upper_phy_error_notifier; class upper_phy_timing_notifier; class upper_phy_rx_results_notifier; @@ -35,22 +36,25 @@ class phy_fapi_adaptor public: virtual ~phy_fapi_adaptor() = default; - /// \brief Returns a reference to the timing notifier used by the adaptor. - virtual upper_phy_timing_notifier& get_timing_notifier() = 0; + /// Returns a reference to the error notifier used by the adaptor. + virtual upper_phy_error_notifier& get_error_notifier() = 0; - /// \brief Returns a reference to the slot-based message gateway used by the adaptor. - virtual fapi::slot_message_gateway& get_slot_message_gateway() = 0; + /// Returns a reference to the timing notifier used by the adaptor. + virtual upper_phy_timing_notifier& get_timing_notifier() = 0; - /// \brief Returns a reference to the results notifier used by the adaptor. + /// Returns a reference to the results notifier used by the adaptor. virtual upper_phy_rx_results_notifier& get_rx_results_notifier() = 0; - /// \brief Configures the slot-based, time-specific message notifier to the given one. + /// Returns a reference to the slot-based message gateway used by the adaptor. + virtual fapi::slot_message_gateway& get_slot_message_gateway() = 0; + + /// Configures the slot-based, time-specific message notifier to the given one. virtual void set_slot_time_message_notifier(fapi::slot_time_message_notifier& fapi_time_notifier) = 0; - /// \brief Configures the slot-based, error-specific message notifier to the given one. + /// Configures the slot-based, error-specific message notifier to the given one. virtual void set_slot_error_message_notifier(fapi::slot_error_message_notifier& fapi_error_notifier) = 0; - /// \brief Configures the slot-based, data-specific message notifier to the given one. + /// Configures the slot-based, data-specific message notifier to the given one. virtual void set_slot_data_message_notifier(fapi::slot_data_message_notifier& fapi_data_notifier) = 0; }; diff --git a/include/srsran/ofh/ofh_error_notifier.h b/include/srsran/ofh/ofh_error_notifier.h new file mode 100644 index 0000000000..13bfc76483 --- /dev/null +++ b/include/srsran/ofh/ofh_error_notifier.h @@ -0,0 +1,39 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/ran/slot_point.h" + +namespace srsran { +namespace ofh { + +/// Open Fronthaul error context. +struct error_context { + /// Slot context. + slot_point slot; + /// Radio sector identifier. + unsigned sector; +}; + +/// Open Fronthaul error notifier. +class error_notifier +{ +public: + virtual ~error_notifier() = default; + + /// \brief Notifies a late downlink message. + /// + /// \param[in] context Context of the error. + virtual void on_late_downlink_message(const error_context& context) = 0; +}; + +} // namespace ofh +} // namespace srsran diff --git a/include/srsran/ofh/ofh_sector.h b/include/srsran/ofh/ofh_sector.h index b0ac774e17..5a29cd900b 100644 --- a/include/srsran/ofh/ofh_sector.h +++ b/include/srsran/ofh/ofh_sector.h @@ -14,6 +14,7 @@ namespace srsran { namespace ofh { class controller; +class error_notifier; class receiver; class transmitter; @@ -33,6 +34,9 @@ class sector /// Returns the Open Fronthaul controller of this sector. virtual controller& get_controller() = 0; + + /// Sets the error notifier of this sector to the given one. + virtual void set_error_notifier(error_notifier& notifier) = 0; }; } // namespace ofh diff --git a/include/srsran/ofh/ofh_sector_config.h b/include/srsran/ofh/ofh_sector_config.h index 88dac920e6..68a5bed338 100644 --- a/include/srsran/ofh/ofh_sector_config.h +++ b/include/srsran/ofh/ofh_sector_config.h @@ -30,6 +30,8 @@ namespace ofh { /// Open Fronthaul sector configuration. struct sector_configuration { + /// Radio sector identifier. + unsigned sector_id; /// Ethernet interface name or identifier. std::string interface; /// Promiscuous mode flag. diff --git a/include/srsran/ofh/transmitter/ofh_downlink_handler.h b/include/srsran/ofh/transmitter/ofh_downlink_handler.h index 0704493a8a..1bd0fcbcb1 100644 --- a/include/srsran/ofh/transmitter/ofh_downlink_handler.h +++ b/include/srsran/ofh/transmitter/ofh_downlink_handler.h @@ -17,6 +17,8 @@ class resource_grid_reader; namespace ofh { +class error_notifier; + /// Open Fronthaul downlink handler. class downlink_handler { @@ -29,6 +31,9 @@ class downlink_handler /// \param[in] context Resource grid context. /// \param[in] grid Downlink data to transmit. virtual void handle_dl_data(const resource_grid_context& context, const resource_grid_reader& grid) = 0; + + /// Sets the error notifier of this sector to the given one. + virtual void set_error_notifier(error_notifier& notifier) = 0; }; } // namespace ofh diff --git a/include/srsran/ofh/transmitter/ofh_transmitter.h b/include/srsran/ofh/transmitter/ofh_transmitter.h index e717b05a29..2337ef46fa 100644 --- a/include/srsran/ofh/transmitter/ofh_transmitter.h +++ b/include/srsran/ofh/transmitter/ofh_transmitter.h @@ -17,6 +17,8 @@ namespace srsran { namespace ofh { +class error_notifier; + /// Open Fronthaul transmitter interface. class transmitter { @@ -32,6 +34,9 @@ class transmitter /// Returns the OTA symbol boundary notifier of this Open Fronthaul transmitter. virtual ota_symbol_boundary_notifier& get_ota_symbol_boundary_notifier() = 0; + + /// Sets the error notifier of this sector to the given one. + virtual void set_error_notifier(error_notifier& notifier) = 0; }; } // namespace ofh diff --git a/include/srsran/ofh/transmitter/ofh_transmitter_configuration.h b/include/srsran/ofh/transmitter/ofh_transmitter_configuration.h index d2764489a1..1aa5229edc 100644 --- a/include/srsran/ofh/transmitter/ofh_transmitter_configuration.h +++ b/include/srsran/ofh/transmitter/ofh_transmitter_configuration.h @@ -54,6 +54,8 @@ struct symbol_handler_config { /// Open Fronthaul transmitter configuration. struct transmitter_config { + /// Radio sector identifier. + unsigned sector; /// Channel bandwidth. bs_channel_bandwidth_fr1 bw; /// Subcarrier spacing. diff --git a/include/srsran/phy/upper/upper_phy.h b/include/srsran/phy/upper/upper_phy.h index 1a4a765a5b..af78cb800a 100644 --- a/include/srsran/phy/upper/upper_phy.h +++ b/include/srsran/phy/upper/upper_phy.h @@ -17,6 +17,8 @@ class downlink_processor_pool; class resource_grid_pool; class uplink_pdu_validator; class uplink_request_processor; +class upper_phy_error_handler; +class upper_phy_error_notifier; class upper_phy_rx_results_notifier; class upper_phy_rx_symbol_handler; class upper_phy_timing_handler; @@ -38,31 +40,34 @@ class upper_phy /// Default destructor. virtual ~upper_phy() = default; - /// \brief Returns a reference to the receive symbol handler of this upper PHY. + /// Returns a reference to the receive symbol handler of this upper PHY. virtual upper_phy_rx_symbol_handler& get_rx_symbol_handler() = 0; - /// \brief Returns a reference to the timing handler of this upper PHY. + /// Returns a reference to the timing handler of this upper PHY. virtual upper_phy_timing_handler& get_timing_handler() = 0; - /// \brief Returns the downlink processor pool of this upper PHY. + /// Returns a reference to the error handler of this upper PHY. + virtual upper_phy_error_handler& get_error_handler() = 0; + + /// Returns the downlink processor pool of this upper PHY. virtual downlink_processor_pool& get_downlink_processor_pool() = 0; - /// \brief Returns the downlink resource grid pool of this upper PHY. + /// Returns the downlink resource grid pool of this upper PHY. virtual resource_grid_pool& get_downlink_resource_grid_pool() = 0; - /// \brief Returns the uplink resource grid pool of this upper PHY. + /// Returns the uplink resource grid pool of this upper PHY. virtual resource_grid_pool& get_uplink_resource_grid_pool() = 0; - /// \brief Returns the uplink request processor of this upper PHY. + /// Returns the uplink request processor of this upper PHY. virtual uplink_request_processor& get_uplink_request_processor() = 0; - /// \brief Returns the uplink slot PDU repository of this upper PHY. + /// Returns the uplink slot PDU repository of this upper PHY. virtual uplink_slot_pdu_repository& get_uplink_slot_pdu_repository() = 0; - /// \brief Returns the downlink PDU validator of this upper PHY. + /// Returns the downlink PDU validator of this upper PHY. virtual const downlink_pdu_validator& get_downlink_pdu_validator() const = 0; - /// \brief Returns the uplink PDU validator of this upper PHY. + /// Returns the uplink PDU validator of this upper PHY. virtual const uplink_pdu_validator& get_uplink_pdu_validator() const = 0; /// \brief Sets the upper PHY timing notifier for this upper PHY. @@ -70,11 +75,16 @@ class upper_phy /// \param[in] notifier Notifier assigned to this upper PHY. virtual void set_timing_notifier(upper_phy_timing_notifier& notifier) = 0; - /// \brief \brief Sets the receive result notifier for this upper PHY. + /// \brief Sets the receive result notifier for this upper PHY. /// /// \param[in] notifier Notifier assigned to this upper PHY. virtual void set_rx_results_notifier(upper_phy_rx_results_notifier& notifier) = 0; + /// \brief Sets the error notifier for this upper PHY. + /// + /// \param[in] notifier Notifier assigned to this upper PHY. + virtual void set_error_notifier(upper_phy_error_notifier& notifier) = 0; + /// \brief Stops the upper PHY. /// /// It shall wait for pending tasks that have cross dependencies to finish their processing. diff --git a/include/srsran/phy/upper/upper_phy_error_handler.h b/include/srsran/phy/upper/upper_phy_error_handler.h new file mode 100644 index 0000000000..07deb086ca --- /dev/null +++ b/include/srsran/phy/upper/upper_phy_error_handler.h @@ -0,0 +1,30 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/ran/slot_point.h" + +namespace srsran { + +/// Upper physical layer error handler. +class upper_phy_error_handler +{ +public: + /// Default destructor. + virtual ~upper_phy_error_handler() = default; + + /// \brief Handles a late downlink message. + /// + /// \param[in] slot Slot of the downlink message. + virtual void handle_late_downlink_message(slot_point slot) = 0; +}; + +} // namespace srsran diff --git a/include/srsran/phy/upper/upper_phy_error_notifier.h b/include/srsran/phy/upper/upper_phy_error_notifier.h new file mode 100644 index 0000000000..ea7ded5f3c --- /dev/null +++ b/include/srsran/phy/upper/upper_phy_error_notifier.h @@ -0,0 +1,30 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/ran/slot_point.h" + +namespace srsran { + +/// Upper physical layer error notifier. +class upper_phy_error_notifier +{ +public: + /// Default destructor. + virtual ~upper_phy_error_notifier() = default; + + /// \brief Notifies a late downlink message. + /// + /// \param[in] dl_msg_slot Slot of the downlink message. + virtual void on_late_downlink_message(slot_point dl_msg_slot) = 0; +}; + +} // namespace srsran diff --git a/include/srsran/ru/ru_adapters.h b/include/srsran/ru/ru_adapters.h index f476350442..f6fc1ef9de 100644 --- a/include/srsran/ru/ru_adapters.h +++ b/include/srsran/ru/ru_adapters.h @@ -11,9 +11,11 @@ #pragma once #include "ru_downlink_plane.h" +#include "ru_error_notifier.h" #include "ru_timing_notifier.h" #include "ru_uplink_plane.h" #include "srsran/phy/support/prach_buffer_context.h" +#include "srsran/phy/upper/upper_phy_error_handler.h" #include "srsran/phy/upper/upper_phy_rg_gateway.h" #include "srsran/phy/upper/upper_phy_rx_symbol_handler.h" #include "srsran/phy/upper/upper_phy_rx_symbol_request_notifier.h" @@ -46,14 +48,14 @@ class upper_ru_ul_request_adapter : public upper_phy_rx_symbol_request_notifier // See interface for documentation. void on_prach_capture_request(const prach_buffer_context& context, prach_buffer& buffer) override { - srsran_assert(ul_handler, "Adapter is not connected."); + srsran_assert(ul_handler, "Adapter is not connected"); ul_handler->handle_prach_occasion(context, buffer); } // See interface for documentation. void on_uplink_slot_request(const resource_grid_context& context, resource_grid& grid) override { - srsran_assert(ul_handler, "Adapter is not connected."); + srsran_assert(ul_handler, "Adapter is not connected"); ul_handler->handle_new_uplink_slot(context, grid); } @@ -112,7 +114,7 @@ class upper_ru_timing_adapter : public ru_timing_notifier // See interface for documentation. void on_tti_boundary(slot_point slot) override { - srsran_assert(!handlers.empty(), "Adapter is not connected."); + srsran_assert(!handlers.empty(), "Adapter is not connected"); for (auto& handler : handlers) { handler->handle_tti_boundary({slot}); } @@ -121,7 +123,7 @@ class upper_ru_timing_adapter : public ru_timing_notifier // See interface for documentation. void on_ul_half_slot_boundary(slot_point slot) override { - srsran_assert(!handlers.empty(), "Adapter is not connected."); + srsran_assert(!handlers.empty(), "Adapter is not connected"); for (auto& handler : handlers) { handler->handle_ul_half_slot_boundary({slot}); } @@ -130,7 +132,7 @@ class upper_ru_timing_adapter : public ru_timing_notifier // See interface for documentation. void on_ul_full_slot_boundary(slot_point slot) override { - srsran_assert(!handlers.empty(), "Adapter is not connected."); + srsran_assert(!handlers.empty(), "Adapter is not connected"); for (auto& handler : handlers) { handler->handle_ul_full_slot_boundary({slot}); } @@ -148,4 +150,31 @@ class upper_ru_timing_adapter : public ru_timing_notifier std::vector handlers; }; -} // namespace srsran \ No newline at end of file +/// Upper PHY - Radio Unit error adapter. +class upper_ru_error_adapter : public ru_error_notifier +{ +public: + explicit upper_ru_error_adapter(unsigned nof_sectors) : handlers(nof_sectors) {} + + // See interface for documentation. + void on_late_downlink_message(const ru_error_context& context) override + { + srsran_assert(context.sector < handlers.size(), "Invalid sector '{}'", context.sector); + srsran_assert(handlers[context.sector], "Adapter for sector '{}' is not connected", context.sector); + + handlers[context.sector]->handle_late_downlink_message(context.slot); + } + + /// Maps the given upper PHY error handler and sector to this adapter. + void map_handler(unsigned sector, upper_phy_error_handler& hndlr) + { + srsran_assert(sector < handlers.size(), "Unsupported sector {}", sector); + + handlers[sector] = &hndlr; + } + +private: + std::vector handlers; +}; + +} // namespace srsran diff --git a/include/srsran/ru/ru_error_notifier.h b/include/srsran/ru/ru_error_notifier.h new file mode 100644 index 0000000000..506848ff88 --- /dev/null +++ b/include/srsran/ru/ru_error_notifier.h @@ -0,0 +1,38 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/ran/slot_point.h" + +namespace srsran { + +/// Radio Unit error context. +struct ru_error_context { + /// Slot context. + slot_point slot; + /// Radio sector identifier. + unsigned sector; +}; + +/// Radio Unit interface error notifier. +class ru_error_notifier +{ +public: + /// Default destructor. + virtual ~ru_error_notifier() = default; + + /// \brief Notifies a late downlink message. + /// + /// \param[in] context Context of the error. + virtual void on_late_downlink_message(const ru_error_context& context) = 0; +}; + +} // namespace srsran diff --git a/include/srsran/ru/ru_ofh_configuration.h b/include/srsran/ru/ru_ofh_configuration.h index 4e7b950303..97b876d33a 100644 --- a/include/srsran/ru/ru_ofh_configuration.h +++ b/include/srsran/ru/ru_ofh_configuration.h @@ -16,6 +16,7 @@ namespace srsran { +class ru_error_notifier; class ru_timing_notifier; class ru_uplink_plane_rx_symbol_notifier; class task_executor; @@ -130,6 +131,8 @@ struct ru_ofh_dependencies { srslog::basic_logger* logger = nullptr; /// Radio Unit timing notifier. ru_timing_notifier* timing_notifier = nullptr; + /// Radio Unit error notifier. + ru_error_notifier* error_notifier = nullptr; /// Radio Unit received symbol notifier. ru_uplink_plane_rx_symbol_notifier* rx_symbol_notifier = nullptr; /// Realtime timing task executor. diff --git a/lib/du/du_impl.cpp b/lib/du/du_impl.cpp index 20083478cd..fba45352e2 100644 --- a/lib/du/du_impl.cpp +++ b/lib/du/du_impl.cpp @@ -132,6 +132,7 @@ du_impl::du_impl(const du_config& du_cfg) : report_error_if_not(du_low_adaptor, "Unable to create PHY adaptor."); du_lo->set_rx_results_notifier(du_low_adaptor->get_rx_results_notifier()); du_lo->set_timing_notifier(du_low_adaptor->get_timing_notifier()); + du_lo->set_error_notifier(du_low_adaptor->get_error_notifier()); if (du_cfg.fapi.log_level == "debug") { // Create gateway loggers and intercept MAC adaptor calls. diff --git a/lib/du/du_impl.h b/lib/du/du_impl.h index 1eb035abdc..b4b0693934 100644 --- a/lib/du/du_impl.h +++ b/lib/du/du_impl.h @@ -29,16 +29,24 @@ class du_impl final : public du public: du_impl(const du_config& du_cfg); + // See interface for documentation. void start() override; + // See interface for documentation. void stop() override; + // See interface for documentation. f1ap_message_handler& get_f1ap_message_handler() override { return du_hi->get_f1ap_message_handler(); } + // See interface for documentation. upper_phy_rx_symbol_handler& get_rx_symbol_handler() override { return du_lo->get_rx_symbol_handler(); } + // See interface for documentation. upper_phy_timing_handler& get_timing_handler() override { return du_lo->get_timing_handler(); } + // See interface for documentation. + upper_phy_error_handler& get_error_handler() override { return du_lo->get_error_handler(); } + private: srslog::basic_logger& logger; diff --git a/lib/du/du_low_impl.h b/lib/du/du_low_impl.h index c0b5328f66..0c0da8ae28 100644 --- a/lib/du/du_low_impl.h +++ b/lib/du/du_low_impl.h @@ -20,29 +20,58 @@ class du_low_impl final : public upper_phy public: du_low_impl(const du_low_configuration& du_low_cfg); + // See interface for documentation. + upper_phy_error_handler& get_error_handler() override { return phy_up->get_error_handler(); } + + // See interface for documentation. upper_phy_rx_symbol_handler& get_rx_symbol_handler() override { return phy_up->get_rx_symbol_handler(); } - upper_phy_timing_handler& get_timing_handler() override { return phy_up->get_timing_handler(); } - downlink_processor_pool& get_downlink_processor_pool() override { return phy_up->get_downlink_processor_pool(); } + + // See interface for documentation. + upper_phy_timing_handler& get_timing_handler() override { return phy_up->get_timing_handler(); } + + // See interface for documentation. + downlink_processor_pool& get_downlink_processor_pool() override { return phy_up->get_downlink_processor_pool(); } + + // See interface for documentation. resource_grid_pool& get_downlink_resource_grid_pool() override { return phy_up->get_downlink_resource_grid_pool(); } + + // See interface for documentation. resource_grid_pool& get_uplink_resource_grid_pool() override { return phy_up->get_uplink_resource_grid_pool(); } - uplink_request_processor& get_uplink_request_processor() override { return phy_up->get_uplink_request_processor(); } + + // See interface for documentation. + uplink_request_processor& get_uplink_request_processor() override { return phy_up->get_uplink_request_processor(); } + + // See interface for documentation. uplink_slot_pdu_repository& get_uplink_slot_pdu_repository() override { return phy_up->get_uplink_slot_pdu_repository(); } + + // See interface for documentation. const downlink_pdu_validator& get_downlink_pdu_validator() const override { return phy_up->get_downlink_pdu_validator(); } + + // See interface for documentation. const uplink_pdu_validator& get_uplink_pdu_validator() const override { return phy_up->get_uplink_pdu_validator(); } - void set_timing_notifier(upper_phy_timing_notifier& notifier) override + + // See interface for documentation. + void set_error_notifier(upper_phy_error_notifier& notifier) override { return phy_up->set_error_notifier(notifier); } + + // See interface for documentation. + void set_timing_notifier(upper_phy_timing_notifier& notifier) override { return phy_up->set_timing_notifier(notifier); } + + // See interface for documentation. void set_rx_results_notifier(upper_phy_rx_results_notifier& notifier) override { return phy_up->set_rx_results_notifier(notifier); } + + // See interface for documentation. void stop() override { phy_up->stop(); } private: diff --git a/lib/fapi_adaptor/phy/CMakeLists.txt b/lib/fapi_adaptor/phy/CMakeLists.txt index 1022dcd4d8..bcc312af2c 100644 --- a/lib/fapi_adaptor/phy/CMakeLists.txt +++ b/lib/fapi_adaptor/phy/CMakeLists.txt @@ -8,16 +8,17 @@ add_subdirectory(messages) -set(SOURCES - phy_to_fapi_results_event_translator.cpp - phy_to_fapi_time_event_translator.cpp) - add_library(fapi_to_phy_translator STATIC fapi_to_phy_translator.cpp) target_link_libraries(fapi_to_phy_translator srsran_fapi_phy_message_adaptors srsran_fapi_precoding_matrix_tools srsran_instrumentation) +set(SOURCES + phy_to_fapi_error_event_translator.cpp + phy_to_fapi_results_event_translator.cpp + phy_to_fapi_time_event_translator.cpp) + add_library(phy_to_fapi_translator STATIC ${SOURCES}) target_link_libraries(phy_to_fapi_translator srslog) diff --git a/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.cpp b/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.cpp index 749509a7e1..1f17a4a07c 100644 --- a/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.cpp +++ b/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.cpp @@ -71,6 +71,7 @@ void phy_fapi_adaptor_impl::set_slot_time_message_notifier(fapi::slot_time_messa void phy_fapi_adaptor_impl::set_slot_error_message_notifier(fapi::slot_error_message_notifier& fapi_error_notifier) { fapi_translator.set_slot_error_message_notifier(fapi_error_notifier); + error_translator.set_slot_error_message_notifier(fapi_error_notifier); } void phy_fapi_adaptor_impl::set_slot_data_message_notifier(fapi::slot_data_message_notifier& fapi_data_notifier) @@ -87,3 +88,8 @@ upper_phy_rx_results_notifier& phy_fapi_adaptor_impl::get_rx_results_notifier() { return results_translator; } + +upper_phy_error_notifier& phy_fapi_adaptor_impl::get_error_notifier() +{ + return error_translator; +} diff --git a/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.h b/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.h index 5b0464ac5f..e75d63add7 100644 --- a/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.h +++ b/lib/fapi_adaptor/phy/phy_fapi_adaptor_impl.h @@ -11,6 +11,7 @@ #pragma once #include "fapi_to_phy_translator.h" +#include "phy_to_fapi_error_event_translator.h" #include "phy_to_fapi_results_event_translator.h" #include "phy_to_fapi_time_event_translator.h" #include "srsran/fapi_adaptor/phy/phy_fapi_adaptor.h" @@ -74,6 +75,8 @@ class phy_fapi_adaptor_impl : public phy_fapi_adaptor /// Constructor for the PHY–FAPI bidirectional adaptor. phy_fapi_adaptor_impl(const phy_fapi_adaptor_impl_config& config, phy_fapi_adaptor_impl_dependencies&& dependencies); + upper_phy_error_notifier& get_error_notifier() override; + // See interface for documentation. upper_phy_timing_notifier& get_timing_notifier() override; @@ -99,6 +102,8 @@ class phy_fapi_adaptor_impl : public phy_fapi_adaptor fapi_to_phy_translator fapi_translator; /// PHY-to-FAPI time events translator. phy_to_fapi_time_event_translator time_translator; + /// PHY-to-FAPI error events translator. + phy_to_fapi_error_event_translator error_translator; }; } // namespace fapi_adaptor diff --git a/lib/fapi_adaptor/phy/phy_to_fapi_error_event_translator.cpp b/lib/fapi_adaptor/phy/phy_to_fapi_error_event_translator.cpp new file mode 100644 index 0000000000..75d069d42f --- /dev/null +++ b/lib/fapi_adaptor/phy/phy_to_fapi_error_event_translator.cpp @@ -0,0 +1,36 @@ +/* + * + * Copyright 2021-2024 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 "phy_to_fapi_error_event_translator.h" +#include "srsran/fapi/message_builders.h" + +using namespace srsran; +using namespace fapi_adaptor; + +namespace { +class slot_error_notifier_dummy : public fapi::slot_error_message_notifier +{ +public: + void on_error_indication(const fapi::error_indication_message& msg) override {} +}; + +} // namespace + +static slot_error_notifier_dummy dummy_notifier; + +phy_to_fapi_error_event_translator::phy_to_fapi_error_event_translator() : error_notifier(dummy_notifier) {} + +void phy_to_fapi_error_event_translator::on_late_downlink_message(srsran::slot_point dl_frame_slot) +{ + error_notifier.get().on_error_indication(fapi::build_error_indication(dl_frame_slot.sfn(), + dl_frame_slot.slot_index(), + fapi::message_type_id::dl_tti_request, + fapi::error_code_id::out_of_sync)); +} diff --git a/lib/fapi_adaptor/phy/phy_to_fapi_error_event_translator.h b/lib/fapi_adaptor/phy/phy_to_fapi_error_event_translator.h new file mode 100644 index 0000000000..74b8bcde6a --- /dev/null +++ b/lib/fapi_adaptor/phy/phy_to_fapi_error_event_translator.h @@ -0,0 +1,44 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/fapi/slot_error_message_notifier.h" +#include "srsran/phy/upper/upper_phy_error_notifier.h" +#include + +namespace srsran { +namespace fapi_adaptor { + +/// \brief PHY-to-FAPI error event translator. +/// +/// This class listens to upper PHY error events and translates them into FAPI ERROR.indication messages that are sent +/// through the FAPI error-specific message notifier. +class phy_to_fapi_error_event_translator : public upper_phy_error_notifier +{ +public: + phy_to_fapi_error_event_translator(); + + // See interface for documentation. + void on_late_downlink_message(slot_point dl_frame_slot) override; + + /// Configures the FAPI slot-based, error-specific notifier to the given one. + void set_slot_error_message_notifier(fapi::slot_error_message_notifier& fapi_error_notifier) + { + error_notifier = std::ref(fapi_error_notifier); + } + +private: + /// Error indication notifier. + std::reference_wrapper error_notifier; +}; + +} // namespace fapi_adaptor +} // namespace srsran diff --git a/lib/ofh/ofh_factories.cpp b/lib/ofh/ofh_factories.cpp index c038f276ae..96e03e304a 100644 --- a/lib/ofh/ofh_factories.cpp +++ b/lib/ofh/ofh_factories.cpp @@ -61,6 +61,7 @@ static transmitter_config generate_transmitter_config(const sector_configuration { transmitter_config tx_config; + tx_config.sector = sector_cfg.sector_id; tx_config.bw = sector_cfg.bw; tx_config.scs = sector_cfg.scs; tx_config.cp = sector_cfg.cp; diff --git a/lib/ofh/ofh_sector_impl.cpp b/lib/ofh/ofh_sector_impl.cpp index de598ae314..0090b94eee 100644 --- a/lib/ofh/ofh_sector_impl.cpp +++ b/lib/ofh/ofh_sector_impl.cpp @@ -27,3 +27,8 @@ controller& sector_impl::get_controller() { return ofh_sector_controller; } + +void sector_impl::set_error_notifier(error_notifier& notifier) +{ + ofh_transmitter->set_error_notifier(notifier); +} diff --git a/lib/ofh/ofh_sector_impl.h b/lib/ofh/ofh_sector_impl.h index e76e98b0f0..3db3e4f90b 100644 --- a/lib/ofh/ofh_sector_impl.h +++ b/lib/ofh/ofh_sector_impl.h @@ -54,6 +54,9 @@ class sector_impl : public sector // See interface for documentation. controller& get_controller() override; + // See interface for documentation. + void set_error_notifier(error_notifier& notifier) override; + private: std::shared_ptr cp_repo; std::shared_ptr prach_repo; diff --git a/lib/ofh/transmitter/ofh_downlink_handler_broadcast_impl.cpp b/lib/ofh/transmitter/ofh_downlink_handler_broadcast_impl.cpp index 886cf0802b..8217317308 100644 --- a/lib/ofh/transmitter/ofh_downlink_handler_broadcast_impl.cpp +++ b/lib/ofh/transmitter/ofh_downlink_handler_broadcast_impl.cpp @@ -10,15 +10,31 @@ #include "ofh_downlink_handler_broadcast_impl.h" #include "helpers.h" +#include "srsran/ofh/ofh_error_notifier.h" #include "srsran/phy/support/resource_grid_context.h" #include "srsran/phy/support/resource_grid_reader.h" using namespace srsran; using namespace ofh; +namespace { + +/// Open Fronthaul error notifier dummy implementation. +class error_notifier_dummy : public error_notifier +{ +public: + void on_late_downlink_message(const error_context& context) override {} +}; + +} // namespace + +/// Dummy error notifier for the downlink handler construction. +static error_notifier_dummy dummy_err_notifier; + downlink_handler_broadcast_impl::downlink_handler_broadcast_impl( const downlink_handler_broadcast_impl_config& config, downlink_handler_broadcast_impl_dependencies&& dependencies) : + sector_id(config.sector), logger(*dependencies.logger), cp(config.cp), tdd_config(config.tdd_config), @@ -31,7 +47,8 @@ downlink_handler_broadcast_impl::downlink_handler_broadcast_impl( get_nsymb_per_slot(config.cp), to_numerology_value(config.scs)), frame_pool_ptr(dependencies.frame_pool_ptr), - frame_pool(*frame_pool_ptr) + frame_pool(*frame_pool_ptr), + err_notifier(dummy_err_notifier) { srsran_assert(data_flow_cplane, "Invalid Control-Plane data flow"); srsran_assert(data_flow_uplane, "Invalid User-Plane data flow"); @@ -45,6 +62,7 @@ void downlink_handler_broadcast_impl::handle_dl_data(const resource_grid_context frame_pool.clear_slot(context.slot); if (window_checker.is_late(context.slot)) { + err_notifier.get().on_late_downlink_message({context.slot, sector_id}); logger.warning( "Dropped late downlink resource grid in slot '{}' and sector#{}. No OFH data will be transmitted for this slot", context.slot, diff --git a/lib/ofh/transmitter/ofh_downlink_handler_broadcast_impl.h b/lib/ofh/transmitter/ofh_downlink_handler_broadcast_impl.h index e9c5ec57c4..a42e4c1c63 100644 --- a/lib/ofh/transmitter/ofh_downlink_handler_broadcast_impl.h +++ b/lib/ofh/transmitter/ofh_downlink_handler_broadcast_impl.h @@ -26,6 +26,8 @@ namespace ofh { /// Downlink handler broadcast implementation configuration. struct downlink_handler_broadcast_impl_config { + /// Radio sector identifier. + unsigned sector; /// Downlink eAxCs. static_vector dl_eaxc; /// Optional TDD configuration. @@ -64,10 +66,14 @@ class downlink_handler_broadcast_impl : public downlink_handler // See interface for documentation. void handle_dl_data(const resource_grid_context& context, const resource_grid_reader& grid) override; + // See interface for documentation. + void set_error_notifier(error_notifier& notifier) override { err_notifier = std::ref(notifier); } + /// Returns the OTA symbol boundary notifier of this downlink handler implementation. ota_symbol_boundary_notifier& get_ota_symbol_boundary_notifier() { return window_checker; } private: + const unsigned sector_id; srslog::basic_logger& logger; const cyclic_prefix cp; const optional tdd_config; @@ -77,6 +83,7 @@ class downlink_handler_broadcast_impl : public downlink_handler tx_window_checker window_checker; std::shared_ptr frame_pool_ptr; ether::eth_frame_pool& frame_pool; + std::reference_wrapper err_notifier; }; } // namespace ofh diff --git a/lib/ofh/transmitter/ofh_downlink_handler_impl.cpp b/lib/ofh/transmitter/ofh_downlink_handler_impl.cpp index 1268074be1..8584f177d9 100644 --- a/lib/ofh/transmitter/ofh_downlink_handler_impl.cpp +++ b/lib/ofh/transmitter/ofh_downlink_handler_impl.cpp @@ -11,14 +11,29 @@ #include "ofh_downlink_handler_impl.h" #include "helpers.h" #include "srsran/instrumentation/traces/du_traces.h" +#include "srsran/ofh/ofh_error_notifier.h" #include "srsran/phy/support/resource_grid_context.h" #include "srsran/phy/support/resource_grid_reader.h" using namespace srsran; using namespace ofh; +namespace { +/// Open Fronthaul error notifier dummy implementation. +class error_notifier_dummy : public error_notifier +{ +public: + void on_late_downlink_message(const error_context& context) override {} +}; + +} // namespace + +/// Dummy error notifier for the downlink handler construction. +static error_notifier_dummy dummy_err_notifier; + downlink_handler_impl::downlink_handler_impl(const downlink_handler_impl_config& config, downlink_handler_impl_dependencies&& dependencies) : + sector_id(config.sector), logger(*dependencies.logger), cp(config.cp), tdd_config(config.tdd_config), @@ -31,7 +46,8 @@ downlink_handler_impl::downlink_handler_impl(const downlink_handler_impl_config& data_flow_cplane(std::move(dependencies.data_flow_cplane)), data_flow_uplane(std::move(dependencies.data_flow_uplane)), frame_pool_ptr(dependencies.frame_pool_ptr), - frame_pool(*frame_pool_ptr) + frame_pool(*frame_pool_ptr), + err_notifier(dummy_err_notifier) { srsran_assert(data_flow_cplane, "Invalid Control-Plane data flow"); srsran_assert(data_flow_uplane, "Invalid User-Plane data flow"); @@ -49,6 +65,8 @@ void downlink_handler_impl::handle_dl_data(const resource_grid_context& context, frame_pool.clear_slot(context.slot); if (window_checker.is_late(context.slot)) { + err_notifier.get().on_late_downlink_message({context.slot, sector_id}); + logger.warning( "Dropped late downlink resource grid in slot '{}' and sector#{}. No OFH data will be transmitted for this slot", context.slot, diff --git a/lib/ofh/transmitter/ofh_downlink_handler_impl.h b/lib/ofh/transmitter/ofh_downlink_handler_impl.h index 518f80dcd4..20a1843ed7 100644 --- a/lib/ofh/transmitter/ofh_downlink_handler_impl.h +++ b/lib/ofh/transmitter/ofh_downlink_handler_impl.h @@ -26,6 +26,8 @@ namespace ofh { /// Downlink handler implementation configuration. struct downlink_handler_impl_config { + /// Radio sector identifier. + unsigned sector; /// Downlink eAxCs. static_vector dl_eaxc; /// Optional TDD configuration. @@ -61,10 +63,14 @@ class downlink_handler_impl : public downlink_handler // See interface for documentation. void handle_dl_data(const resource_grid_context& context, const resource_grid_reader& grid) override; + // See interface for documentation. + void set_error_notifier(error_notifier& notifier) override { err_notifier = std::ref(notifier); } + /// Returns the OTA symbol boundary notifier of this downlink handler implementation. ota_symbol_boundary_notifier& get_ota_symbol_boundary_notifier() { return window_checker; } private: + const unsigned sector_id; srslog::basic_logger& logger; const cyclic_prefix cp; const optional tdd_config; @@ -74,6 +80,7 @@ class downlink_handler_impl : public downlink_handler std::unique_ptr data_flow_uplane; std::shared_ptr frame_pool_ptr; ether::eth_frame_pool& frame_pool; + std::reference_wrapper err_notifier; }; } // namespace ofh diff --git a/lib/ofh/transmitter/ofh_downlink_manager.h b/lib/ofh/transmitter/ofh_downlink_manager.h index 2dae492471..86d0cbc2ac 100644 --- a/lib/ofh/transmitter/ofh_downlink_manager.h +++ b/lib/ofh/transmitter/ofh_downlink_manager.h @@ -16,6 +16,8 @@ namespace srsran { namespace ofh { +class error_notifier; + /// Open Fronthaul downlink manager. class downlink_manager { @@ -28,6 +30,9 @@ class downlink_manager /// Returns the OTA symbol boundary notifier of this downlink manager. virtual ota_symbol_boundary_notifier& get_ota_symbol_boundary_notifier() = 0; + + /// Sets the error notifier of this sector to the given one. + virtual void set_error_notifier(error_notifier& notifier) = 0; }; } // namespace ofh diff --git a/lib/ofh/transmitter/ofh_downlink_manager_broadcast_impl.cpp b/lib/ofh/transmitter/ofh_downlink_manager_broadcast_impl.cpp index 03e9ec412a..a84161c920 100644 --- a/lib/ofh/transmitter/ofh_downlink_manager_broadcast_impl.cpp +++ b/lib/ofh/transmitter/ofh_downlink_manager_broadcast_impl.cpp @@ -9,6 +9,7 @@ */ #include "ofh_downlink_manager_broadcast_impl.h" +#include "srsran/ofh/transmitter/ofh_downlink_handler.h" using namespace srsran; using namespace ofh; @@ -22,3 +23,8 @@ ota_symbol_boundary_notifier& downlink_manager_broadcast_impl::get_ota_symbol_bo { return handler.get_ota_symbol_boundary_notifier(); } + +void downlink_manager_broadcast_impl::set_error_notifier(error_notifier& notifier) +{ + handler.set_error_notifier(notifier); +} diff --git a/lib/ofh/transmitter/ofh_downlink_manager_broadcast_impl.h b/lib/ofh/transmitter/ofh_downlink_manager_broadcast_impl.h index 42ec8f6e0d..2006e3c748 100644 --- a/lib/ofh/transmitter/ofh_downlink_manager_broadcast_impl.h +++ b/lib/ofh/transmitter/ofh_downlink_manager_broadcast_impl.h @@ -33,6 +33,9 @@ class downlink_manager_broadcast_impl : public downlink_manager // See interface for documentation. ota_symbol_boundary_notifier& get_ota_symbol_boundary_notifier() override; + + // See interface for documentation. + void set_error_notifier(error_notifier& notifier) override; }; } // namespace ofh diff --git a/lib/ofh/transmitter/ofh_downlink_manager_impl.cpp b/lib/ofh/transmitter/ofh_downlink_manager_impl.cpp index 4fa6c288d0..77da8cc808 100644 --- a/lib/ofh/transmitter/ofh_downlink_manager_impl.cpp +++ b/lib/ofh/transmitter/ofh_downlink_manager_impl.cpp @@ -22,3 +22,8 @@ ota_symbol_boundary_notifier& downlink_manager_impl::get_ota_symbol_boundary_not { return handler.get_ota_symbol_boundary_notifier(); } + +void downlink_manager_impl::set_error_notifier(error_notifier& notifier) +{ + handler.set_error_notifier(notifier); +} diff --git a/lib/ofh/transmitter/ofh_downlink_manager_impl.h b/lib/ofh/transmitter/ofh_downlink_manager_impl.h index 3a7d6a36dd..dce1bf4dc8 100644 --- a/lib/ofh/transmitter/ofh_downlink_manager_impl.h +++ b/lib/ofh/transmitter/ofh_downlink_manager_impl.h @@ -32,6 +32,9 @@ class downlink_manager_impl : public downlink_manager // See interface for documentation. ota_symbol_boundary_notifier& get_ota_symbol_boundary_notifier() override; + + // See interface for documentation. + void set_error_notifier(error_notifier& notifier) override; }; } // namespace ofh diff --git a/lib/ofh/transmitter/ofh_transmitter_factories.cpp b/lib/ofh/transmitter/ofh_transmitter_factories.cpp index bf7152cdc8..56aa41fdb5 100644 --- a/lib/ofh/transmitter/ofh_transmitter_factories.cpp +++ b/lib/ofh/transmitter/ofh_transmitter_factories.cpp @@ -116,6 +116,7 @@ create_downlink_manager(const transmitter_config& tx_con dl_config.scs = tx_config.scs; dl_config.dl_processing_time = tx_config.dl_processing_time; dl_config.tx_timing_params = tx_config.symbol_handler_cfg.tx_timing_params; + dl_config.sector = tx_config.sector; downlink_handler_broadcast_impl_dependencies dl_dependencies; dl_dependencies.logger = &logger; @@ -133,6 +134,7 @@ create_downlink_manager(const transmitter_config& tx_con dl_config.scs = tx_config.scs; dl_config.dl_processing_time = tx_config.dl_processing_time; dl_config.tx_timing_params = tx_config.symbol_handler_cfg.tx_timing_params; + dl_config.sector = tx_config.sector; downlink_handler_impl_dependencies dl_dependencies; dl_dependencies.logger = &logger; diff --git a/lib/ofh/transmitter/ofh_transmitter_impl.cpp b/lib/ofh/transmitter/ofh_transmitter_impl.cpp index 85893f9e40..516113c582 100644 --- a/lib/ofh/transmitter/ofh_transmitter_impl.cpp +++ b/lib/ofh/transmitter/ofh_transmitter_impl.cpp @@ -41,3 +41,8 @@ ota_symbol_boundary_notifier& transmitter_impl::get_ota_symbol_boundary_notifier { return ota_dispatcher; } + +void transmitter_impl::set_error_notifier(error_notifier& notifier) +{ + dl_manager->set_error_notifier(notifier); +} diff --git a/lib/ofh/transmitter/ofh_transmitter_impl.h b/lib/ofh/transmitter/ofh_transmitter_impl.h index 4a83f78f1b..f4857da2f3 100644 --- a/lib/ofh/transmitter/ofh_transmitter_impl.h +++ b/lib/ofh/transmitter/ofh_transmitter_impl.h @@ -55,6 +55,9 @@ class transmitter_impl : public transmitter // See interface for documentation. ota_symbol_boundary_notifier& get_ota_symbol_boundary_notifier() override; + // See interface for documentation. + void set_error_notifier(error_notifier& notifier) override; + private: std::unique_ptr dl_manager; std::unique_ptr ul_request_handler; diff --git a/lib/phy/upper/CMakeLists.txt b/lib/phy/upper/CMakeLists.txt index dba547b241..7c729f7ce0 100644 --- a/lib/phy/upper/CMakeLists.txt +++ b/lib/phy/upper/CMakeLists.txt @@ -26,7 +26,9 @@ add_library(srsran_uplink_processor uplink_request_processor_impl.cpp) target_link_libraries(srsran_uplink_processor srsran_channel_processors) -add_library(srsran_upper_phy upper_phy_factories.cpp upper_phy_impl.cpp upper_phy_factories.cpp upper_phy_rx_symbol_handler_impl.cpp upper_phy_rx_results_notifier_wrapper.cpp) +add_library(srsran_upper_phy upper_phy_factories.cpp upper_phy_impl.cpp upper_phy_factories.cpp + upper_phy_rx_symbol_handler_impl.cpp upper_phy_rx_results_notifier_wrapper.cpp + upper_phy_error_handler_impl.cpp) target_link_libraries(srsran_upper_phy srsran_instrumentation srsran_downlink_processor diff --git a/lib/phy/upper/upper_phy_error_handler_impl.cpp b/lib/phy/upper/upper_phy_error_handler_impl.cpp new file mode 100644 index 0000000000..5165a96240 --- /dev/null +++ b/lib/phy/upper/upper_phy_error_handler_impl.cpp @@ -0,0 +1,32 @@ +/* + * + * Copyright 2021-2024 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 "upper_phy_error_handler_impl.h" + +using namespace srsran; + +namespace { +/// Dummy implementation of an upper PHY error notifier. +class upper_phy_error_notifier_dummy : public upper_phy_error_notifier +{ +public: + void on_late_downlink_message(slot_point dl_msg_slot) override {} +}; +} // namespace + +/// Dummy error notifier used for instantiating this error handler. +static upper_phy_error_notifier_dummy dummy_notifier; + +upper_phy_error_handler_impl::upper_phy_error_handler_impl() : error_notifier(dummy_notifier) {} + +void upper_phy_error_handler_impl::handle_late_downlink_message(slot_point slot) +{ + error_notifier.get().on_late_downlink_message(slot); +} diff --git a/lib/phy/upper/upper_phy_error_handler_impl.h b/lib/phy/upper/upper_phy_error_handler_impl.h new file mode 100644 index 0000000000..93cf946604 --- /dev/null +++ b/lib/phy/upper/upper_phy_error_handler_impl.h @@ -0,0 +1,35 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/phy/upper/upper_phy_error_handler.h" +#include "srsran/phy/upper/upper_phy_error_notifier.h" +#include + +namespace srsran { + +/// Upper physical layer error handler implementation. +class upper_phy_error_handler_impl : public upper_phy_error_handler +{ +public: + upper_phy_error_handler_impl(); + + // See interface for documentation. + void handle_late_downlink_message(slot_point slot) override; + + /// Sets the given notifier as the error notifier of this handler. + void set_error_notifier(upper_phy_error_notifier& notifier) { error_notifier = std::ref(notifier); } + +private: + std::reference_wrapper error_notifier; +}; + +} // namespace srsran diff --git a/lib/phy/upper/upper_phy_impl.cpp b/lib/phy/upper/upper_phy_impl.cpp index ebcebe2d22..cffec28878 100644 --- a/lib/phy/upper/upper_phy_impl.cpp +++ b/lib/phy/upper/upper_phy_impl.cpp @@ -77,6 +77,11 @@ upper_phy_impl::upper_phy_impl(upper_phy_impl_config&& config) : (void)sector_id; } +upper_phy_error_handler& upper_phy_impl::get_error_handler() +{ + return error_handler; +} + upper_phy_rx_symbol_handler& upper_phy_impl::get_rx_symbol_handler() { return *rx_symbol_handler; @@ -112,6 +117,11 @@ uplink_slot_pdu_repository& upper_phy_impl::get_uplink_slot_pdu_repository() return pdu_repository; } +void upper_phy_impl::set_error_notifier(upper_phy_error_notifier& notifier) +{ + error_handler.set_error_notifier(notifier); +} + void upper_phy_impl::set_timing_notifier(srsran::upper_phy_timing_notifier& notifier) { timing_handler.set_upper_phy_notifier(notifier); diff --git a/lib/phy/upper/upper_phy_impl.h b/lib/phy/upper/upper_phy_impl.h index 72009d2a78..e63f1c7df3 100644 --- a/lib/phy/upper/upper_phy_impl.h +++ b/lib/phy/upper/upper_phy_impl.h @@ -11,6 +11,7 @@ #pragma once #include "uplink_request_processor_impl.h" +#include "upper_phy_error_handler_impl.h" #include "upper_phy_pdu_validators.h" #include "upper_phy_rx_results_notifier_wrapper.h" #include "upper_phy_rx_symbol_handler_impl.h" @@ -99,6 +100,9 @@ class upper_phy_impl : public upper_phy /// Constructs an upper PHY implementation object with the given configuration. explicit upper_phy_impl(upper_phy_impl_config&& config); + // See interface for documentation. + upper_phy_error_handler& get_error_handler() override; + // See interface for documentation. upper_phy_rx_symbol_handler& get_rx_symbol_handler() override; @@ -126,6 +130,9 @@ class upper_phy_impl : public upper_phy // See interface for documentation. const uplink_pdu_validator& get_uplink_pdu_validator() const override; + // See interface for documentation. + void set_error_notifier(upper_phy_error_notifier& notifier) override; + // See interface for documentation. void set_timing_notifier(upper_phy_timing_notifier& notifier) override; @@ -165,6 +172,8 @@ class upper_phy_impl : public upper_phy std::unique_ptr rx_symbol_handler; /// Timing events handler. upper_phy_timing_handler_impl timing_handler; + /// Error events handler. + upper_phy_error_handler_impl error_handler; }; } // namespace srsran diff --git a/lib/ru/ofh/CMakeLists.txt b/lib/ru/ofh/CMakeLists.txt index 81bfbc70a6..5933e18f53 100644 --- a/lib/ru/ofh/CMakeLists.txt +++ b/lib/ru/ofh/CMakeLists.txt @@ -8,10 +8,11 @@ set(SOURCES ru_ofh_config_validator.cpp + ru_ofh_controller_impl.cpp ru_ofh_downlink_plane_handler_proxy.cpp + ru_ofh_error_handler_impl.cpp ru_ofh_factory.cpp ru_ofh_impl.cpp - ru_ofh_controller_impl.cpp ru_ofh_rx_symbol_handler_impl.cpp ru_ofh_timing_notifier_impl.cpp ru_ofh_uplink_plane_handler_proxy.cpp) diff --git a/lib/ru/ofh/ru_ofh_error_handler_impl.cpp b/lib/ru/ofh/ru_ofh_error_handler_impl.cpp new file mode 100644 index 0000000000..9b9ba9308e --- /dev/null +++ b/lib/ru/ofh/ru_ofh_error_handler_impl.cpp @@ -0,0 +1,22 @@ +/* + * + * Copyright 2021-2024 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 "ru_ofh_error_handler_impl.h" + +using namespace srsran; + +void ru_ofh_error_handler_impl::on_late_downlink_message(const ofh::error_context& context) +{ + ru_error_context ru_err_context; + ru_err_context.slot = context.slot; + ru_err_context.sector = context.sector; + + error_notifier.on_late_downlink_message(ru_err_context); +} diff --git a/lib/ru/ofh/ru_ofh_error_handler_impl.h b/lib/ru/ofh/ru_ofh_error_handler_impl.h new file mode 100644 index 0000000000..e7a801b993 --- /dev/null +++ b/lib/ru/ofh/ru_ofh_error_handler_impl.h @@ -0,0 +1,31 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/ofh/ofh_error_notifier.h" +#include "srsran/ru/ru_error_notifier.h" + +namespace srsran { + +/// Radio Unit error handler for the Open Fronthaul interface. +class ru_ofh_error_handler_impl : public ofh::error_notifier +{ +public: + explicit ru_ofh_error_handler_impl(ru_error_notifier& notifier_) : error_notifier(notifier_) {} + + // See interface for documentation. + void on_late_downlink_message(const ofh::error_context& context) override; + +private: + ru_error_notifier& error_notifier; +}; + +} // namespace srsran diff --git a/lib/ru/ofh/ru_ofh_factory.cpp b/lib/ru/ofh/ru_ofh_factory.cpp index f9d4d473f8..21c0cc0168 100644 --- a/lib/ru/ofh/ru_ofh_factory.cpp +++ b/lib/ru/ofh/ru_ofh_factory.cpp @@ -18,7 +18,8 @@ using namespace srsran; /// Generates the OFH sector configuration from the common Open Fronthaul configuration. static ofh::sector_configuration generate_sector_configuration(const ru_ofh_configuration& config, - const ru_ofh_sector_configuration& sector_cfg) + const ru_ofh_sector_configuration& sector_cfg, + unsigned sector_id) { // Prepare sector configuration. ofh::sector_configuration ofh_sector_config; @@ -32,6 +33,7 @@ static ofh::sector_configuration generate_sector_configuration(const ru_ofh_conf ofh_sector_config.tx_window_timing_params = sector_cfg.tx_window_timing_params; ofh_sector_config.rx_window_timing_params = sector_cfg.rx_window_timing_params; ofh_sector_config.cp = sector_cfg.cp; + ofh_sector_config.sector_id = sector_id; ofh_sector_config.scs = sector_cfg.scs; ofh_sector_config.bw = sector_cfg.bw; ofh_sector_config.nof_antennas_ul = sector_cfg.nof_antennas_ul; @@ -85,6 +87,7 @@ std::unique_ptr srsran::create_ofh_ru(const ru_ofh_configuration& co ru_ofh_impl_dependencies ofh_dependencies; ofh_dependencies.logger = dependencies.logger; ofh_dependencies.timing_notifier = dependencies.timing_notifier; + ofh_dependencies.error_notifier = dependencies.error_notifier; // Create UL Rx symbol notifier. auto ul_data_notifier = std::make_shared(*dependencies.rx_symbol_notifier); @@ -106,7 +109,7 @@ std::unique_ptr srsran::create_ofh_ru(const ru_ofh_configuration& co // Create OFH sector. auto sector = ofh::create_ofh_sector( - generate_sector_configuration(config, sector_cfg), + generate_sector_configuration(config, sector_cfg, i), generate_sector_dependencies(std::move(dependencies.sector_dependencies[i]), ul_data_notifier)); report_fatal_error_if_not(sector, "Unable to create OFH sector"); ofh_dependencies.sectors.emplace_back(std::move(sector)); diff --git a/lib/ru/ofh/ru_ofh_impl.cpp b/lib/ru/ofh/ru_ofh_impl.cpp index 55b8ae038c..6da31992f1 100644 --- a/lib/ru/ofh/ru_ofh_impl.cpp +++ b/lib/ru/ofh/ru_ofh_impl.cpp @@ -17,6 +17,7 @@ using namespace srsran; ru_ofh_impl::ru_ofh_impl(const ru_ofh_impl_config& config, ru_ofh_impl_dependencies&& dependencies) : timing_notifier(config.nof_slot_offset_du_ru, config.nof_symbols_per_slot, *dependencies.timing_notifier), + error_handler(*dependencies.error_notifier), sectors(std::move(dependencies.sectors)), ofh_timing_mngr(std::move(dependencies.timing_mngr)), controller(*dependencies.logger, @@ -49,6 +50,8 @@ ru_ofh_impl::ru_ofh_impl(const ru_ofh_impl_config& config, ru_ofh_impl_dependenc "Invalid sector"); srsran_assert(dependencies.timing_notifier, "Invalid timing notifier"); srsran_assert(ofh_timing_mngr, "Invalid Open Fronthaul timing manager"); + srsran_assert(dependencies.timing_notifier, "Invalid timing notifier"); + srsran_assert(dependencies.error_notifier, "Invalid error notifier"); // Subscribe the OTA symbol boundary notifiers. std::vector notifiers; @@ -60,6 +63,9 @@ ru_ofh_impl::ru_ofh_impl(const ru_ofh_impl_config& config, ru_ofh_impl_dependenc for (auto& sector : sectors) { notifiers.push_back(§or->get_transmitter().get_ota_symbol_boundary_notifier()); notifiers.push_back(§or->get_receiver().get_ota_symbol_boundary_notifier()); + + // Configure the error handler for the OFH sectors. + sector->set_error_notifier(error_handler); } ofh_timing_mngr->get_ota_symbol_boundary_notifier_manager().subscribe(notifiers); diff --git a/lib/ru/ofh/ru_ofh_impl.h b/lib/ru/ofh/ru_ofh_impl.h index bb27841d55..0d103941cf 100644 --- a/lib/ru/ofh/ru_ofh_impl.h +++ b/lib/ru/ofh/ru_ofh_impl.h @@ -12,6 +12,7 @@ #include "ru_ofh_controller_impl.h" #include "ru_ofh_downlink_plane_handler_proxy.h" +#include "ru_ofh_error_handler_impl.h" #include "ru_ofh_timing_notifier_impl.h" #include "ru_ofh_uplink_plane_handler_proxy.h" #include "srsran/ofh/ethernet/ethernet_frame_pool.h" @@ -37,7 +38,8 @@ struct ru_ofh_impl_config { struct ru_ofh_impl_dependencies { srslog::basic_logger* logger; std::unique_ptr timing_mngr; - ru_timing_notifier* timing_notifier; + ru_timing_notifier* timing_notifier = nullptr; + ru_error_notifier* error_notifier = nullptr; std::vector> sectors; }; @@ -58,6 +60,7 @@ class ru_ofh_impl : public radio_unit private: ru_ofh_timing_notifier_impl timing_notifier; + ru_ofh_error_handler_impl error_handler; std::vector> sectors; std::unique_ptr ofh_timing_mngr; ru_ofh_controller_impl controller; diff --git a/tests/integrationtests/ofh/ofh_integration_test.cpp b/tests/integrationtests/ofh/ofh_integration_test.cpp index 2885c6b6ea..a85be43915 100644 --- a/tests/integrationtests/ofh/ofh_integration_test.cpp +++ b/tests/integrationtests/ofh/ofh_integration_test.cpp @@ -18,6 +18,7 @@ #include "srsran/phy/support/resource_grid_context.h" #include "srsran/ru/ru_controller.h" #include "srsran/ru/ru_downlink_plane.h" +#include "srsran/ru/ru_error_notifier.h" #include "srsran/ru/ru_ofh_factory.h" #include "srsran/ru/ru_timing_notifier.h" #include "srsran/ru/ru_uplink_plane.h" @@ -84,6 +85,12 @@ struct test_parameters { bool use_loopback_receiver = false; }; +/// Dummy Radio Unit error notifier. +class dummy_ru_error_notifier : public ru_error_notifier +{ +public: + void on_late_downlink_message(const ru_error_context& context) override {} +}; } // namespace static test_parameters test_params; @@ -1083,13 +1090,15 @@ static ru_ofh_dependencies generate_ru_dependencies(srslog::basic_logger& ru_timing_notifier* timing_notifier, ru_uplink_plane_rx_symbol_notifier* rx_symbol_notifier, test_gateway*& tx_gateway, - test_ether_receiver*& eth_receiver) + test_ether_receiver*& eth_receiver, + ru_error_notifier& error_notifier) { ru_ofh_dependencies dependencies; dependencies.logger = &logger; dependencies.timing_notifier = timing_notifier; dependencies.rx_symbol_notifier = rx_symbol_notifier; dependencies.rt_timing_executor = workers.ru_timing_exec; + dependencies.error_notifier = &error_notifier; dependencies.sector_dependencies.emplace_back(); auto& sector_deps = dependencies.sector_dependencies.back(); @@ -1135,10 +1144,11 @@ int main(int argc, char** argv) dummy_timing_notifier timing_notifier; test_gateway* tx_gateway; test_ether_receiver* eth_receiver; + dummy_ru_error_notifier error_notifier; - ru_ofh_configuration ru_cfg = generate_ru_config(); - ru_ofh_dependencies ru_deps = - generate_ru_dependencies(logger, workers, &timing_notifier, &rx_symbol_notifier, tx_gateway, eth_receiver); + ru_ofh_configuration ru_cfg = generate_ru_config(); + ru_ofh_dependencies ru_deps = generate_ru_dependencies( + logger, workers, &timing_notifier, &rx_symbol_notifier, tx_gateway, eth_receiver, error_notifier); if (test_params.use_loopback_receiver) { ru_deps.sector_dependencies[0].eth_receiver.reset(); diff --git a/tests/unittests/ofh/transmitter/ofh_downlink_handler_impl_test.cpp b/tests/unittests/ofh/transmitter/ofh_downlink_handler_impl_test.cpp index 0a02001e67..de43e297e6 100644 --- a/tests/unittests/ofh/transmitter/ofh_downlink_handler_impl_test.cpp +++ b/tests/unittests/ofh/transmitter/ofh_downlink_handler_impl_test.cpp @@ -56,6 +56,7 @@ static downlink_handler_impl_config generate_default_config() { downlink_handler_impl_config config; config.dl_eaxc = {24}; + config.sector = 0; config.cp = cyclic_prefix::NORMAL; config.scs = subcarrier_spacing::kHz30; config.dl_processing_time = std::chrono::milliseconds(400); From c70832d684f08f3afbfbbe49e48bb5815c638009 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Wed, 14 Feb 2024 12:02:16 +0100 Subject: [PATCH 55/78] cu-cp: fix unit test comments --- .../cu_cp/cu_cp_connectivity_test.cpp | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp index 7b260a67a3..a700ba0057 100644 --- a/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp +++ b/tests/unittests/cu_cp/cu_cp_connectivity_test.cpp @@ -333,7 +333,7 @@ TEST_F(cu_cp_connectivity_test, when_e1_is_not_setup_then_new_ues_are_rejected) rnti_t crnti = to_rnti(0x4601); get_du(du_idx).push_tx_pdu(generate_init_ul_rrc_message_transfer(ue_f1ap_id, crnti)); - // Verify F1AP DL RRC Message is sent with RRC Setup. + // TEST: F1AP UE Context Command is sent to DU. f1ap_message f1ap_pdu; ASSERT_TRUE(this->wait_for_f1ap_tx_pdu(du_idx, f1ap_pdu, std::chrono::milliseconds{1000})); ASSERT_EQ(f1ap_pdu.pdu.type().value, asn1::f1ap::f1ap_pdu_c::types_opts::init_msg); @@ -343,6 +343,8 @@ TEST_F(cu_cp_connectivity_test, when_e1_is_not_setup_then_new_ues_are_rejected) ASSERT_EQ(int_to_gnb_du_ue_f1ap_id(ue_rel->gnb_du_ue_f1ap_id), ue_f1ap_id); ASSERT_TRUE(ue_rel->srb_id_present); ASSERT_EQ(int_to_srb_id(ue_rel->srb_id), srb_id_t::srb0); + + // TEST: RRC Reject is sent to UE. asn1::rrc_nr::dl_ccch_msg_s ccch; { asn1::cbit_ref bref{ue_rel->rrc_container}; @@ -350,17 +352,17 @@ TEST_F(cu_cp_connectivity_test, when_e1_is_not_setup_then_new_ues_are_rejected) } ASSERT_EQ(ccch.msg.c1().type().value, asn1::rrc_nr::dl_ccch_msg_type_c::c1_c_::types_opts::rrc_reject); - // Check UE is created and is only destroyed when F1AP UE context release complete is received. + // TEST: UE is not destroyed in CU-CP until UE Context Release Complete is received. auto report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); ASSERT_EQ(report.ues.size(), 1); ASSERT_EQ(report.ues[0].rnti, crnti); - // Send F1AP UE Context Release Complete. + // DU sends F1AP UE Context Release Complete. auto rel_complete = generate_ue_context_release_complete(int_to_gnb_cu_ue_f1ap_id(ue_rel->gnb_cu_ue_f1ap_id), ue_f1ap_id); get_du(du_idx).push_tx_pdu(rel_complete); - // Verify UE is removed. + // TEST: Verify UE is removed in CU-CP. report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); ASSERT_TRUE(report.ues.empty()); @@ -386,14 +388,14 @@ TEST_F(cu_cp_connectivity_test, when_initial_ul_rrc_message_has_no_rrc_container unsigned cu_up_idx = ret.value(); ASSERT_TRUE(this->run_f1_setup(cu_up_idx)); - // Send Initial UL RRC Message without DU-to-CU-RRC container. + // Event: DU sends Initial UL RRC Message without DU-to-CU-RRC container. gnb_du_ue_f1ap_id_t du_ue_f1ap_id = int_to_gnb_du_ue_f1ap_id(0); rnti_t crnti = to_rnti(0x4601); f1ap_message init_rrc_msg = generate_init_ul_rrc_message_transfer(du_ue_f1ap_id, crnti); init_rrc_msg.pdu.init_msg().value.init_ul_rrc_msg_transfer()->du_to_cu_rrc_container_present = false; get_du(du_idx).push_tx_pdu(init_rrc_msg); - // Verify CU-CP sends a UE Context Release command over SRB0. + // TEST: CU-CP sends a UE Context Release command over SRB0. f1ap_message f1ap_pdu; ASSERT_TRUE(this->wait_for_f1ap_tx_pdu(du_idx, f1ap_pdu)); ASSERT_EQ(f1ap_pdu.pdu.type(), asn1::f1ap::f1ap_pdu_c::types_opts::options::init_msg); @@ -405,7 +407,7 @@ TEST_F(cu_cp_connectivity_test, when_initial_ul_rrc_message_has_no_rrc_container ASSERT_TRUE(ue_rel->srb_id_present); ASSERT_EQ(ue_rel->srb_id, 0); - // Verify that the UE Context Release command contains an RRC Reject. + // TEST: UE Context Release command contains an RRC Reject. asn1::rrc_nr::dl_ccch_msg_s ccch; { asn1::cbit_ref bref{f1ap_pdu.pdu.init_msg().value.ue_context_release_cmd()->rrc_container}; @@ -413,17 +415,17 @@ TEST_F(cu_cp_connectivity_test, when_initial_ul_rrc_message_has_no_rrc_container } ASSERT_EQ(ccch.msg.c1().type().value, asn1::rrc_nr::dl_ccch_msg_type_c::c1_c_::types_opts::rrc_reject); - // Verify UE is not removed until UE Context Release Complete. + // TEST: UE is not destroyed in CU-CP until UE Context Release Complete is received. auto report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); ASSERT_EQ(report.ues.size(), 1); ASSERT_EQ(report.ues[0].rnti, to_rnti(0x4601)); - // Send F1AP UE Context Release Complete. + // EVENT: DU sends F1AP UE Context Release Complete. auto rel_complete = generate_ue_context_release_complete(int_to_gnb_cu_ue_f1ap_id(ue_rel->gnb_cu_ue_f1ap_id), du_ue_f1ap_id); get_du(du_idx).push_tx_pdu(rel_complete); - // Verify UE is removed. + // TEST: UE context removed from CU-CP. report = this->get_cu_cp().get_metrics_handler().request_metrics_report(); ASSERT_TRUE(report.ues.empty()); } From 4e2e6940cc07c769b2ce0f350ac79ac573fedd16 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Wed, 14 Feb 2024 15:31:39 +0100 Subject: [PATCH 56/78] f1ap-cu: make the prefix logging consistent with DU --- include/srsran/support/prefixed_logger.h | 11 +-- lib/f1ap/common/proc_logger.h | 67 +++++++++++++++++++ .../ue_context_modification_procedure.cpp | 37 +++++----- .../ue_context_modification_procedure.h | 1 + .../ue_context_release_procedure.cpp | 13 ++-- .../procedures/ue_context_release_procedure.h | 1 + .../procedures/ue_context_setup_procedure.cpp | 3 +- .../cu_cp/ue_context/f1ap_cu_ue_context.h | 8 +-- lib/f1ap/cu_cp/ue_context/f1ap_ue_ids.h | 27 ++++++++ lib/f1ap/cu_cp/ue_context/f1ap_ue_logger.h | 51 +++++++------- lib/f1ap/du/procedures/proc_logger.h | 39 ++++------- 11 files changed, 163 insertions(+), 95 deletions(-) create mode 100644 lib/f1ap/common/proc_logger.h create mode 100644 lib/f1ap/cu_cp/ue_context/f1ap_ue_ids.h diff --git a/include/srsran/support/prefixed_logger.h b/include/srsran/support/prefixed_logger.h index d898a9b1e6..b9fc4abef8 100644 --- a/include/srsran/support/prefixed_logger.h +++ b/include/srsran/support/prefixed_logger.h @@ -25,8 +25,8 @@ template class prefixed_logger { public: - prefixed_logger(const std::string& log_name, Prefix prefix_) : - logger(srslog::fetch_basic_logger(log_name, false)), prefix(prefix_) + prefixed_logger(const std::string& log_name, Prefix prefix_, const char* prefix_separator_ = "") : + logger(srslog::fetch_basic_logger(log_name, false)), prefix(prefix_), prefix_separator(prefix_separator_) { } @@ -196,6 +196,7 @@ class prefixed_logger private: srslog::basic_logger& logger; Prefix prefix; + const char* prefix_separator; template void log_helper(srslog::log_channel& channel, const char* fmt, Args&&... args) const @@ -205,7 +206,7 @@ class prefixed_logger } fmt::memory_buffer buffer; fmt::format_to(buffer, fmt, std::forward(args)...); - channel("{}{}", prefix, to_c_str(buffer)); + channel("{}{}{}", prefix, prefix_separator, to_c_str(buffer)); } template @@ -216,7 +217,7 @@ class prefixed_logger } fmt::memory_buffer buffer; fmt::format_to(buffer, fmt, std::forward(args)...); - channel(it_begin, it_end, "{}{}", prefix, to_c_str(buffer)); + channel(it_begin, it_end, "{}{}{}", prefix, prefix_separator, to_c_str(buffer)); } template @@ -227,7 +228,7 @@ class prefixed_logger } fmt::memory_buffer buffer; fmt::format_to(buffer, fmt, std::forward(args)...); - channel(msg, len, "{}{}", prefix, to_c_str(buffer)); + channel(msg, len, "{}{}{}", prefix, prefix_separator, to_c_str(buffer)); } }; diff --git a/lib/f1ap/common/proc_logger.h b/lib/f1ap/common/proc_logger.h new file mode 100644 index 0000000000..bdce3437b0 --- /dev/null +++ b/lib/f1ap/common/proc_logger.h @@ -0,0 +1,67 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/f1ap/common/f1ap_ue_id.h" + +namespace srsran { + +struct f1ap_common_log_prefix { + f1ap_common_log_prefix(gnb_du_ue_f1ap_id_t du_ue_id_, const char* proc_name_ = nullptr) : + du_ue_id(du_ue_id_), proc_name(proc_name_) + { + } + f1ap_common_log_prefix(gnb_du_ue_f1ap_id_t du_ue_id_, + gnb_cu_ue_f1ap_id_t cu_ue_id_, + const char* proc_name_ = nullptr) : + du_ue_id(du_ue_id_), cu_ue_id(cu_ue_id_), proc_name(proc_name_) + { + } + f1ap_common_log_prefix(gnb_cu_ue_f1ap_id_t cu_ue_id_, const char* proc_name_ = nullptr) : + cu_ue_id(cu_ue_id_), proc_name(proc_name_) + { + } + + gnb_du_ue_f1ap_id_t du_ue_id = gnb_du_ue_f1ap_id_t::invalid; + gnb_cu_ue_f1ap_id_t cu_ue_id = gnb_cu_ue_f1ap_id_t::invalid; + const char* proc_name = nullptr; +}; + +} // namespace srsran +namespace fmt { + +template <> +struct formatter { + template + auto parse(ParseContext& ctx) + { + return ctx.begin(); + } + + template + auto format(const srsran::f1ap_common_log_prefix& prefix, FormatContext& ctx) + { + bool first_id = true; + auto get_sep = [&first_id]() { return std::exchange(first_id, false) ? "" : " "; }; + if (prefix.du_ue_id != srsran::gnb_du_ue_f1ap_id_t::invalid) { + format_to(ctx.out(), "{}GNB-DU-UE-F1AP-ID={}", get_sep(), prefix.du_ue_id); + } + if (prefix.cu_ue_id != srsran::gnb_cu_ue_f1ap_id_t::invalid) { + format_to(ctx.out(), "{}GNB-CU-UE-F1AP-ID={}", get_sep(), prefix.cu_ue_id); + } + if (prefix.proc_name != nullptr) { + format_to(ctx.out(), "{}proc=\"{}\"", get_sep(), prefix.proc_name); + } + return ctx.out(); + } +}; + +} // namespace fmt diff --git a/lib/f1ap/cu_cp/procedures/ue_context_modification_procedure.cpp b/lib/f1ap/cu_cp/procedures/ue_context_modification_procedure.cpp index dcc1d4e942..ce0a8a622e 100644 --- a/lib/f1ap/cu_cp/procedures/ue_context_modification_procedure.cpp +++ b/lib/f1ap/cu_cp/procedures/ue_context_modification_procedure.cpp @@ -22,7 +22,7 @@ ue_context_modification_procedure::ue_context_modification_procedure( const f1ap_ue_context_modification_request& request_, f1ap_ue_context& ue_ctxt_, f1ap_message_notifier& f1ap_notif_) : - request(request_), ue_ctxt(ue_ctxt_), f1ap_notifier(f1ap_notif_) + request(request_), ue_ctxt(ue_ctxt_), f1ap_notifier(f1ap_notif_), logger(srslog::fetch_basic_logger("CU-CP-F1")) { } @@ -30,7 +30,7 @@ void ue_context_modification_procedure::operator()(coro_contextcause)); - if (ue_ctxt.logger.get_basic_logger().debug.enabled()) { - asn1::json_writer js; - (*transaction_sink.failure()).to_json(js); - ue_ctxt.logger.log_debug("Containerized UeContextModificationFailure: {}", js.to_string()); - } - fill_f1ap_ue_context_modification_response(res, fail); - ue_ctxt.logger.log_error("\"{}\" failed", name()); + logger.warning("{}: Procedure failed. Cause: {}", logger_prefix, get_cause_str(fail->cause)); + + fill_f1ap_ue_context_modification_response(res, fail); } else { - ue_ctxt.logger.log_warning("UeContextModificationResponse timeout"); + logger.warning("{}: Procedure failed. Cause: Timeout reached for UEContextModificationResponse reception", + logger_prefix); + res.success = false; res.cause = cause_misc_t::unspecified; - - ue_ctxt.logger.log_error("\"{}\" failed", name()); } return res; diff --git a/lib/f1ap/cu_cp/procedures/ue_context_modification_procedure.h b/lib/f1ap/cu_cp/procedures/ue_context_modification_procedure.h index 29639fd97d..73743ddc51 100644 --- a/lib/f1ap/cu_cp/procedures/ue_context_modification_procedure.h +++ b/lib/f1ap/cu_cp/procedures/ue_context_modification_procedure.h @@ -42,6 +42,7 @@ class ue_context_modification_procedure const f1ap_ue_context_modification_request request; f1ap_ue_context& ue_ctxt; f1ap_message_notifier& f1ap_notifier; + srslog::basic_logger& logger; protocol_transaction_outcome_observer transaction_sink; diff --git a/lib/f1ap/cu_cp/procedures/ue_context_release_procedure.cpp b/lib/f1ap/cu_cp/procedures/ue_context_release_procedure.cpp index c527d29cc2..db3d4e6268 100644 --- a/lib/f1ap/cu_cp/procedures/ue_context_release_procedure.cpp +++ b/lib/f1ap/cu_cp/procedures/ue_context_release_procedure.cpp @@ -21,7 +21,7 @@ using namespace asn1::f1ap; ue_context_release_procedure::ue_context_release_procedure(const f1ap_ue_context_release_command& cmd_, f1ap_ue_context& ue_ctxt_, f1ap_message_notifier& f1ap_notif_) : - ue_ctxt(ue_ctxt_), f1ap_notifier(f1ap_notif_) + ue_ctxt(ue_ctxt_), f1ap_notifier(f1ap_notif_), logger(srslog::fetch_basic_logger("CU-CP-F1")) { command->gnb_cu_ue_f1ap_id = gnb_cu_ue_f1ap_id_to_uint(ue_ctxt.ue_ids.cu_ue_f1ap_id); command->gnb_du_ue_f1ap_id = gnb_du_ue_f1ap_id_to_uint(ue_ctxt.ue_ids.du_ue_f1ap_id); @@ -41,7 +41,7 @@ void ue_context_release_procedure::operator()(coro_contextgnb_du_ue_f1ap_id == gnb_du_ue_f1ap_id_to_uint(ue_ctxt.ue_ids.du_ue_f1ap_id)) { ret = ue_ctxt.ue_ids.ue_index; - ue_ctxt.logger.log_debug("\"{}\" finalized", name()); + logger.info("{}: Procedure finished successfully.", f1ap_ue_log_prefix{ue_ctxt.ue_ids, name()}); } else { - ue_ctxt.logger.log_error("\"{}\" failed", name()); + logger.warning("{}: Procedure failed.", f1ap_ue_log_prefix{ue_ctxt.ue_ids, name()}); } return ret; diff --git a/lib/f1ap/cu_cp/procedures/ue_context_release_procedure.h b/lib/f1ap/cu_cp/procedures/ue_context_release_procedure.h index 6506a56a79..ae8b70c279 100644 --- a/lib/f1ap/cu_cp/procedures/ue_context_release_procedure.h +++ b/lib/f1ap/cu_cp/procedures/ue_context_release_procedure.h @@ -42,6 +42,7 @@ class ue_context_release_procedure f1ap_ue_context& ue_ctxt; asn1::f1ap::ue_context_release_cmd_s command; f1ap_message_notifier& f1ap_notifier; + srslog::basic_logger& logger; protocol_transaction_outcome_observer transaction_sink; }; diff --git a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp index 92d1f2c2fd..2b907ab82c 100644 --- a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp +++ b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp @@ -10,6 +10,7 @@ #include "ue_context_setup_procedure.h" #include "../f1ap_asn1_helpers.h" +#include "cu_cp/ue_context/f1ap_ue_logger.h" #include "srsran/f1ap/common/f1ap_message.h" using namespace srsran; @@ -88,7 +89,7 @@ bool ue_context_setup_procedure::allocate_cu_ue_id() // Create UE context and store it. f1ap_ue_context& ue_ctxt = ue_ctxt_list.add_ue(request.ue_index, tmp_cu_ue_f1ap_id); - logger.debug("ue={}: Added UE (cu_ue_f1ap_id={}, du_ue_f1ap_id=)", ue_ctxt.ue_ids.ue_index, tmp_cu_ue_f1ap_id); + logger.debug("{}: UE successfully created.", f1ap_ue_log_prefix{ue_ctxt.ue_ids, name()}); // Store identifiers. new_cu_ue_f1ap_id = tmp_cu_ue_f1ap_id; diff --git a/lib/f1ap/cu_cp/ue_context/f1ap_cu_ue_context.h b/lib/f1ap/cu_cp/ue_context/f1ap_cu_ue_context.h index 240f2a111b..04678a39ba 100644 --- a/lib/f1ap/cu_cp/ue_context/f1ap_cu_ue_context.h +++ b/lib/f1ap/cu_cp/ue_context/f1ap_cu_ue_context.h @@ -19,12 +19,6 @@ namespace srsran { namespace srs_cu_cp { -struct f1ap_ue_ids { - const ue_index_t ue_index = ue_index_t::invalid; - const gnb_cu_ue_f1ap_id_t cu_ue_f1ap_id = gnb_cu_ue_f1ap_id_t::invalid; - gnb_du_ue_f1ap_id_t du_ue_f1ap_id = gnb_du_ue_f1ap_id_t::invalid; -}; - struct f1ap_ue_context { f1ap_ue_ids ue_ids; f1ap_rrc_message_notifier* rrc_notifier = nullptr; @@ -35,7 +29,7 @@ struct f1ap_ue_context { f1ap_ue_logger logger; f1ap_ue_context(ue_index_t ue_index_, gnb_cu_ue_f1ap_id_t cu_ue_f1ap_id_, timer_factory timers_) : - ue_ids({ue_index_, cu_ue_f1ap_id_}), ev_mng(timers_), logger("CU-CP-F1", {ue_index_, cu_ue_f1ap_id_}) + ue_ids({ue_index_, cu_ue_f1ap_id_}), ev_mng(timers_), logger("CU-CP-F1", {ue_ids}, " ") { } }; diff --git a/lib/f1ap/cu_cp/ue_context/f1ap_ue_ids.h b/lib/f1ap/cu_cp/ue_context/f1ap_ue_ids.h new file mode 100644 index 0000000000..943dc52306 --- /dev/null +++ b/lib/f1ap/cu_cp/ue_context/f1ap_ue_ids.h @@ -0,0 +1,27 @@ +/* + * + * Copyright 2021-2024 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. + * + */ + +#pragma once + +#include "srsran/cu_cp/cu_cp_types.h" +#include "srsran/f1ap/common/f1ap_ue_id.h" + +namespace srsran { +namespace srs_cu_cp { + +/// Identifiers for a UE in F1AP-CU. +struct f1ap_ue_ids { + const ue_index_t ue_index = ue_index_t::invalid; + const gnb_cu_ue_f1ap_id_t cu_ue_f1ap_id = gnb_cu_ue_f1ap_id_t::invalid; + gnb_du_ue_f1ap_id_t du_ue_f1ap_id = gnb_du_ue_f1ap_id_t::invalid; +}; + +} // namespace srs_cu_cp +} // namespace srsran \ No newline at end of file diff --git a/lib/f1ap/cu_cp/ue_context/f1ap_ue_logger.h b/lib/f1ap/cu_cp/ue_context/f1ap_ue_logger.h index ceceda69e0..8e8bad1266 100644 --- a/lib/f1ap/cu_cp/ue_context/f1ap_ue_logger.h +++ b/lib/f1ap/cu_cp/ue_context/f1ap_ue_logger.h @@ -9,38 +9,31 @@ */ #pragma once -#include "srsran/cu_cp/cu_cp_types.h" -#include "srsran/f1ap/cu_cp/f1ap_cu.h" -#include "srsran/ran/cu_types.h" +#include "../../common/proc_logger.h" +#include "f1ap_ue_ids.h" #include "srsran/support/prefixed_logger.h" -#include "fmt/format.h" -#include namespace srsran { namespace srs_cu_cp { -class f1ap_ue_log_prefix -{ -public: - f1ap_ue_log_prefix(ue_index_t ue_index, - gnb_cu_ue_f1ap_id_t cu_ue_f1ap_id = gnb_cu_ue_f1ap_id_t::invalid, - gnb_du_ue_f1ap_id_t du_ue_f1ap_id = gnb_du_ue_f1ap_id_t::invalid) +/// Log prefix for UEs in F1AP-CU. +struct f1ap_ue_log_prefix : public srsran::f1ap_common_log_prefix { + using srsran::f1ap_common_log_prefix::f1ap_common_log_prefix; + + f1ap_ue_log_prefix(ue_index_t ue_index_, gnb_cu_ue_f1ap_id_t cu_ue_id_, gnb_du_ue_f1ap_id_t du_ue_id_) : + srsran::f1ap_common_log_prefix(du_ue_id_, cu_ue_id_), ue_index(ue_index_) + { + } + f1ap_ue_log_prefix(const f1ap_ue_ids& context_, const char* proc_name_ = nullptr) : + srsran::f1ap_common_log_prefix(context_.du_ue_f1ap_id, context_.cu_ue_f1ap_id, proc_name_), + ue_index(context_.ue_index) { - fmt::memory_buffer buffer; - fmt::format_to(buffer, - "ue={}{}{}: ", - ue_index, - cu_ue_f1ap_id != gnb_cu_ue_f1ap_id_t::invalid ? fmt::format(" cu_ue_f1ap_id={}", cu_ue_f1ap_id) : "", - du_ue_f1ap_id != gnb_du_ue_f1ap_id_t::invalid ? fmt::format(" du_ue_f1ap_id={}", du_ue_f1ap_id) - : ""); - prefix = srsran::to_c_str(buffer); } - const char* to_c_str() const { return prefix.c_str(); } -private: - std::string prefix; + ue_index_t ue_index = ue_index_t::invalid; }; +/// Logger that automatically prefixes log messages with the UE IDs. using f1ap_ue_logger = prefixed_logger; } // namespace srs_cu_cp @@ -48,20 +41,24 @@ using f1ap_ue_logger = prefixed_logger; namespace fmt { -// associated formatter template <> struct formatter { template - auto parse(ParseContext& ctx) -> decltype(ctx.begin()) + auto parse(ParseContext& ctx) { return ctx.begin(); } template - auto format(srsran::srs_cu_cp::f1ap_ue_log_prefix o, FormatContext& ctx) - -> decltype(std::declval().out()) + auto format(const srsran::srs_cu_cp::f1ap_ue_log_prefix& prefix, FormatContext& ctx) { - return format_to(ctx.out(), "{}", o.to_c_str()); + bool needs_sep = prefix.ue_index != srsran::srs_cu_cp::ue_index_t::invalid; + if (prefix.ue_index != srsran::srs_cu_cp::ue_index_t::invalid) { + format_to(ctx.out(), "ue={}", prefix.ue_index); + } + return format_to( + ctx.out(), "{}{}", needs_sep ? " " : "", static_cast(prefix)); } }; + } // namespace fmt diff --git a/lib/f1ap/du/procedures/proc_logger.h b/lib/f1ap/du/procedures/proc_logger.h index 06f8d6c214..907f72483f 100644 --- a/lib/f1ap/du/procedures/proc_logger.h +++ b/lib/f1ap/du/procedures/proc_logger.h @@ -10,30 +10,22 @@ #pragma once +#include "../../common/proc_logger.h" #include "../ue_context/f1ap_ue_context.h" namespace srsran { namespace srs_du { -struct f1ap_log_prefix { - f1ap_log_prefix(gnb_du_ue_f1ap_id_t du_ue_id_, const char* proc_name_) : du_ue_id(du_ue_id_), proc_name(proc_name_) {} - f1ap_log_prefix(gnb_du_ue_f1ap_id_t du_ue_id_, gnb_cu_ue_f1ap_id_t cu_ue_id_, const char* proc_name_) : - du_ue_id(du_ue_id_), cu_ue_id(cu_ue_id_), proc_name(proc_name_) - { - } - f1ap_log_prefix(gnb_cu_ue_f1ap_id_t cu_ue_id_, const char* proc_name_) : cu_ue_id(cu_ue_id_), proc_name(proc_name_) {} +struct f1ap_log_prefix : public srsran::f1ap_common_log_prefix { + using srsran::f1ap_common_log_prefix::f1ap_common_log_prefix; + f1ap_log_prefix(const f1ap_ue_context& context_, const char* proc_name_) : - ue_index(context_.ue_index), - du_ue_id(context_.gnb_du_ue_f1ap_id), - cu_ue_id(context_.gnb_cu_ue_f1ap_id), - proc_name(proc_name_) + srsran::f1ap_common_log_prefix(context_.gnb_du_ue_f1ap_id, context_.gnb_cu_ue_f1ap_id, proc_name_), + ue_index(context_.ue_index) { } - du_ue_index_t ue_index = INVALID_DU_UE_INDEX; - gnb_du_ue_f1ap_id_t du_ue_id = gnb_du_ue_f1ap_id_t::invalid; - gnb_cu_ue_f1ap_id_t cu_ue_id = gnb_cu_ue_f1ap_id_t::invalid; - const char* proc_name = nullptr; + du_ue_index_t ue_index = INVALID_DU_UE_INDEX; }; } // namespace srs_du @@ -52,20 +44,13 @@ struct formatter { template auto format(const srsran::srs_du::f1ap_log_prefix& prefix, FormatContext& ctx) { - bool first_id = true; - auto get_sep = [&first_id]() { return std::exchange(first_id, false) ? "" : " "; }; + bool needs_sep = prefix.ue_index != srsran::INVALID_DU_UE_INDEX; if (prefix.ue_index != srsran::INVALID_DU_UE_INDEX) { - format_to(ctx.out(), "{}ue={}", get_sep(), prefix.ue_index); - } - if (prefix.du_ue_id != srsran::gnb_du_ue_f1ap_id_t::invalid) { - format_to(ctx.out(), "{}GNB-DU-UE-F1AP-ID={}", get_sep(), prefix.du_ue_id); - } - if (prefix.cu_ue_id != srsran::gnb_cu_ue_f1ap_id_t::invalid) { - format_to(ctx.out(), "{}GNB-CU-UE-F1AP-ID={}", get_sep(), prefix.cu_ue_id); + format_to(ctx.out(), "ue={}", prefix.ue_index); } - format_to(ctx.out(), "{}proc=\"{}\"", get_sep(), prefix.proc_name); - return ctx.out(); + return format_to( + ctx.out(), "{}{}", needs_sep ? " " : "", static_cast(prefix)); } }; -} // namespace fmt \ No newline at end of file +} // namespace fmt From 6a4e20651e518452519c89be4d1918d27dc893cc Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Wed, 14 Feb 2024 17:39:13 +0100 Subject: [PATCH 57/78] f1ap-cu: make creation of a ue in the cu-cp during the initial ul rrc message into a single step --- include/srsran/cu_cp/cu_cp_ue_messages.h | 2 +- include/srsran/f1ap/cu_cp/f1ap_cu.h | 13 +---- lib/cu_cp/adapters/f1ap_adapters.h | 8 +-- lib/cu_cp/du_processor/du_processor_impl.cpp | 58 ++++++++++--------- lib/cu_cp/du_processor/du_processor_impl.h | 6 +- .../du_processor_impl_interface.h | 2 +- lib/f1ap/cu_cp/f1ap_cu_impl.cpp | 54 ++++++++--------- lib/f1ap/cu_cp/f1ap_cu_impl.h | 1 - .../procedures/ue_context_setup_procedure.cpp | 4 +- .../cu_cp/du_processor/du_processor_test.cpp | 30 +++++----- .../du_processor_test_helpers.cpp | 2 +- .../cu_cp/du_processor_test_messages.cpp | 4 +- .../cu_cp/du_processor_test_messages.h | 2 +- .../f1ap/cu_cp/f1ap_cu_test_helpers.h | 16 ++--- 14 files changed, 88 insertions(+), 114 deletions(-) diff --git a/include/srsran/cu_cp/cu_cp_ue_messages.h b/include/srsran/cu_cp/cu_cp_ue_messages.h index 667a471cb8..d0d34d0960 100644 --- a/include/srsran/cu_cp/cu_cp_ue_messages.h +++ b/include/srsran/cu_cp/cu_cp_ue_messages.h @@ -34,7 +34,7 @@ struct rrc_ue_transfer_context { /// \brief The UE creation is triggered from the F1AP. /// It carries an RRC container and the C-RNTI if the DU sent an Initial UL RRC transfer. If the user is created /// during handover the RNTI is only allocated after the Random Access. -struct cu_cp_ue_creation_message { +struct cu_cp_ue_creation_request { ue_index_t ue_index = ue_index_t::invalid; nr_cell_global_id_t cgi; uint32_t tac; diff --git a/include/srsran/f1ap/cu_cp/f1ap_cu.h b/include/srsran/f1ap/cu_cp/f1ap_cu.h index 4e0088885f..bc86dfc3b5 100644 --- a/include/srsran/f1ap/cu_cp/f1ap_cu.h +++ b/include/srsran/f1ap/cu_cp/f1ap_cu.h @@ -99,12 +99,8 @@ class f1ap_rrc_message_notifier virtual void on_ul_dcch_pdu(const srb_id_t srb_id, byte_buffer pdu) = 0; }; -struct f1ap_srb_creation_message { - ue_index_t ue_index = ue_index_t::invalid; - srb_id_t srb_id = srb_id_t::nulltype; -}; - -struct ue_creation_complete_message { +/// Response provided by the CU-CP to the F1AP-CU when a UE context creation in the CU-CP is requested. +struct cu_cp_ue_creation_response { ue_index_t ue_index = ue_index_t::invalid; f1ap_rrc_message_notifier* f1ap_rrc_notifier = nullptr; }; @@ -129,13 +125,10 @@ class f1ap_du_processor_notifier : public du_setup_notifier public: virtual ~f1ap_du_processor_notifier() = default; - /// \brief Request allocation of a new UE index. - virtual ue_index_t on_new_ue_index_required() = 0; - /// \brief Notifies the DU processor to create a UE. /// \param[in] msg The ue creation message. /// \return Returns a UE creation complete message containing the index of the created UE and its SRB notifiers. - virtual ue_creation_complete_message on_create_ue(const cu_cp_ue_creation_message& msg) = 0; + virtual cu_cp_ue_creation_response on_ue_creation_request(const cu_cp_ue_creation_request& msg) = 0; /// \brief Indicates the reception of a UE Context Release Request (gNB-DU initiated) as per TS 38.473 /// section 8.3.2. diff --git a/lib/cu_cp/adapters/f1ap_adapters.h b/lib/cu_cp/adapters/f1ap_adapters.h index 7d2244ba0f..3fc8d9e250 100644 --- a/lib/cu_cp/adapters/f1ap_adapters.h +++ b/lib/cu_cp/adapters/f1ap_adapters.h @@ -69,13 +69,7 @@ class f1ap_du_processor_adapter : public f1ap_du_processor_notifier du_index_t get_du_index() override { return du_f1ap_handler->get_du_index(); } - ue_index_t on_new_ue_index_required() override - { - srsran_assert(du_f1ap_handler != nullptr, "F1AP handler must not be nullptr"); - return du_f1ap_handler->get_new_ue_index(); - } - - ue_creation_complete_message on_create_ue(const cu_cp_ue_creation_message& msg) override + cu_cp_ue_creation_response on_ue_creation_request(const cu_cp_ue_creation_request& msg) override { srsran_assert(du_f1ap_handler != nullptr, "F1AP handler must not be nullptr"); return du_f1ap_handler->handle_ue_creation_request(msg); diff --git a/lib/cu_cp/du_processor/du_processor_impl.cpp b/lib/cu_cp/du_processor/du_processor_impl.cpp index 81566e4203..8e24fbd458 100644 --- a/lib/cu_cp/du_processor/du_processor_impl.cpp +++ b/lib/cu_cp/du_processor/du_processor_impl.cpp @@ -245,55 +245,59 @@ bool du_processor_impl::create_rrc_ue(du_ue& ue, return true; } -ue_creation_complete_message du_processor_impl::handle_ue_creation_request(const cu_cp_ue_creation_message& msg) +cu_cp_ue_creation_response du_processor_impl::handle_ue_creation_request(const cu_cp_ue_creation_request& msg) { - srsran_assert(msg.ue_index != ue_index_t::invalid, "Invalid UE index", msg.ue_index); - srsran_assert(srsran::config_helpers::is_valid(msg.cgi), "ue={}: Invalid CGI", msg.ue_index); + srsran_assert(config_helpers::is_valid(msg.cgi), "ue={}: Invalid CGI", msg.ue_index); srsran_assert(msg.c_rnti != rnti_t::INVALID_RNTI, "ue={}: Invalid C-RNTI", msg.ue_index); - ue_creation_complete_message ue_creation_complete_msg = {}; - ue_creation_complete_msg.ue_index = ue_index_t::invalid; - // Check that creation message is valid du_cell_index_t pcell_index = find_cell(msg.cgi.nci); if (pcell_index == du_cell_index_t::invalid) { logger.warning("ue={}: Could not find cell with cell_id={}", msg.ue_index, msg.cgi.nci); - return ue_creation_complete_msg; + return {}; } - - // Check that the PCI is valid - pci_t pci = cell_db.at(pcell_index).pci; - if (pci == INVALID_PCI) { - logger.warning("ue={} pci={}: Invalid PCI", msg.ue_index, pci); - return ue_creation_complete_msg; + const pci_t pci = cell_db.at(pcell_index).pci; + + // Allocate new UE index. + ue_index_t ue_index = msg.ue_index; + if (ue_index == ue_index_t::invalid) { + // It's a new UE. Allocate new UE index. + ue_index = get_new_ue_index(); + if (ue_index == ue_index_t::invalid) { + logger.warning("ue={}: Could not create UE context", ue_index); + return {}; + } } // Create new UE context - du_ue* ue = ue_manager.add_ue(msg.ue_index, context.id, pci, msg.c_rnti); + du_ue* ue = ue_manager.add_ue(ue_index, context.id, pci, msg.c_rnti); if (ue == nullptr) { - logger.warning("ue={}: Could not create UE context", msg.ue_index); - return ue_creation_complete_msg; + logger.warning("ue={}: Could not create UE context", ue_index); + return {}; } // Set parameters from creation message ue->set_pcell_index(pcell_index); // Create RRC UE. If the DU-to-CU-RRC-Container is empty, the UE will be rejected. - if (create_rrc_ue(*ue, msg.c_rnti, msg.cgi, msg.du_to_cu_rrc_container.copy(), std::move(msg.rrc_context)) == false) { - logger.warning("ue={}: Could not create RRC UE object", msg.ue_index); - return ue_creation_complete_msg; + if (not create_rrc_ue(*ue, msg.c_rnti, msg.cgi, msg.du_to_cu_rrc_container.copy(), std::move(msg.rrc_context))) { + logger.warning("ue={}: Could not create RRC UE object", ue_index); + ue_manager.remove_ue(ue_index); + return {}; } - rrc_ue_interface* rrc_ue = rrc->find_ue(msg.ue_index); - f1ap_rrc_ue_adapters[msg.ue_index] = {}; - f1ap_rrc_ue_adapters.at(msg.ue_index) - .connect_rrc_ue(rrc_ue->get_ul_ccch_pdu_handler(), rrc_ue->get_ul_dcch_pdu_handler()); - ue_creation_complete_msg.f1ap_rrc_notifier = &f1ap_rrc_ue_adapters.at(msg.ue_index); + rrc_ue_interface* rrc_ue = rrc->find_ue(ue_index); + f1ap_rrc_ue_adapters[ue_index] = {}; + f1ap_rrc_ue_adapters.at(ue_index).connect_rrc_ue(rrc_ue->get_ul_ccch_pdu_handler(), + rrc_ue->get_ul_dcch_pdu_handler()); - logger.info("ue={} c-rnti={}: UE created", ue->get_ue_index(), msg.c_rnti); + // Signal back to F1AP that the UE was successfully created. + cu_cp_ue_creation_response response; + response.ue_index = ue_index; + response.f1ap_rrc_notifier = &f1ap_rrc_ue_adapters.at(ue_index); - ue_creation_complete_msg.ue_index = ue->get_ue_index(); + logger.info("ue={} c-rnti={}: UE created", ue->get_ue_index(), msg.c_rnti); - return ue_creation_complete_msg; + return response; } ue_update_complete_message du_processor_impl::handle_ue_update_request(const ue_update_message& msg) diff --git a/lib/cu_cp/du_processor/du_processor_impl.h b/lib/cu_cp/du_processor/du_processor_impl.h index 33d42b2cbb..ad582898cb 100644 --- a/lib/cu_cp/du_processor/du_processor_impl.h +++ b/lib/cu_cp/du_processor/du_processor_impl.h @@ -55,9 +55,9 @@ class du_processor_impl : public du_processor_impl_interface, public du_setup_ha size_t get_nof_ues() const override { return ue_manager.get_nof_du_ues(context.du_index); }; // du_processor_f1ap_interface - du_setup_result handle_du_setup_request(const du_setup_request& req) override; - ue_index_t get_new_ue_index() override; - ue_creation_complete_message handle_ue_creation_request(const cu_cp_ue_creation_message& msg) override; + du_setup_result handle_du_setup_request(const du_setup_request& req) override; + ue_index_t get_new_ue_index() override; + cu_cp_ue_creation_response handle_ue_creation_request(const cu_cp_ue_creation_request& msg) override; void handle_du_initiated_ue_context_release_request(const f1ap_ue_context_release_request& request) override; ue_update_complete_message handle_ue_update_request(const ue_update_message& msg) override; diff --git a/lib/cu_cp/du_processor/du_processor_impl_interface.h b/lib/cu_cp/du_processor/du_processor_impl_interface.h index 40d47d06e9..5d76c96efb 100644 --- a/lib/cu_cp/du_processor/du_processor_impl_interface.h +++ b/lib/cu_cp/du_processor/du_processor_impl_interface.h @@ -46,7 +46,7 @@ class du_processor_f1ap_interface /// \brief Create a new UE context. /// \param[in] msg The UE creation message. /// \return Returns a UE creation complete message containing the index of the created UE and its SRB notifiers. - virtual ue_creation_complete_message handle_ue_creation_request(const cu_cp_ue_creation_message& msg) = 0; + virtual cu_cp_ue_creation_response handle_ue_creation_request(const cu_cp_ue_creation_request& msg) = 0; /// \brief Update existing UE object. virtual ue_update_complete_message handle_ue_update_request(const ue_update_message& msg) = 0; diff --git a/lib/f1ap/cu_cp/f1ap_cu_impl.cpp b/lib/f1ap/cu_cp/f1ap_cu_impl.cpp index 40029cf779..3e6bdae1c3 100644 --- a/lib/f1ap/cu_cp/f1ap_cu_impl.cpp +++ b/lib/f1ap/cu_cp/f1ap_cu_impl.cpp @@ -35,7 +35,6 @@ f1ap_cu_impl::f1ap_cu_impl(f1ap_message_notifier& f1ap_pdu_notifier_, pdu_notifier(f1ap_pdu_notifier_), du_processor_notifier(f1ap_du_processor_notifier_), du_management_notifier(f1ap_du_management_notifier_), - cu_cp_notifier(f1ap_cu_cp_notifier_), ctrl_exec(ctrl_exec_) { } @@ -224,48 +223,41 @@ void f1ap_cu_impl::handle_f1_setup_request(const f1_setup_request_s& request) void f1ap_cu_impl::handle_initial_ul_rrc_message(const init_ul_rrc_msg_transfer_s& msg) { + const gnb_du_ue_f1ap_id_t du_ue_id = int_to_gnb_du_ue_f1ap_id(msg->gnb_du_ue_f1ap_id); + nr_cell_global_id_t cgi = cgi_from_asn1(msg->nr_cgi); - if (not srsran::config_helpers::is_valid(cgi)) { - logger.warning("du_ue_f1ap_id={}: Dropping InitialUlRrcMessageTransfer. Invalid CGI", msg->gnb_du_ue_f1ap_id); + if (not config_helpers::is_valid(cgi)) { + logger.warning("du_ue_f1ap_id={}: Dropping InitialULRRCMessageTransfer. Invalid CGI", du_ue_id); return; } rnti_t crnti = to_rnti(msg->c_rnti); if (crnti == rnti_t::INVALID_RNTI) { - logger.warning("du_ue_f1ap_id={}: Dropping InitialUlRrcMessageTransfer. Invalid RNTI", msg->gnb_du_ue_f1ap_id); + logger.warning("du_ue_f1ap_id={}: Dropping InitialULRRCMessageTransfer. Cause: Invalid C-RNTI", du_ue_id); return; } - logger.debug("du_ue_f1ap_id={} nci={} crnti={} plmn={}: Received InitialUlRrcMessageTransfer", - msg->gnb_du_ue_f1ap_id, + logger.debug("du_ue_f1ap_id={} nci={} crnti={} plmn={}: Received InitialULRRCMessageTransfer", + du_ue_id, cgi.nci, crnti, cgi.plmn); if (msg->sul_access_ind_present) { - logger.debug("du_ue_f1ap_id={}: Ignoring SUL access indicator", msg->gnb_du_ue_f1ap_id); + logger.debug("du_ue_f1ap_id={}: Ignoring SUL access indicator", du_ue_id); } - gnb_cu_ue_f1ap_id_t cu_ue_f1ap_id = ue_ctxt_list.next_gnb_cu_ue_f1ap_id(); + const gnb_cu_ue_f1ap_id_t cu_ue_f1ap_id = ue_ctxt_list.next_gnb_cu_ue_f1ap_id(); if (cu_ue_f1ap_id == gnb_cu_ue_f1ap_id_t::invalid) { - logger.warning("du_ue_f1ap_id={}: Dropping InitialUlRrcMessageTransfer. No CU UE F1AP ID available", - msg->gnb_du_ue_f1ap_id); - return; - } - - // Request UE index allocation - ue_index_t ue_index = du_processor_notifier.on_new_ue_index_required(); - if (ue_index == ue_index_t::invalid) { - logger.warning("du_ue_f1ap_id={}: Dropping InitialUlRrcMessageTransfer. No UE Index available", - msg->gnb_du_ue_f1ap_id); + logger.warning("du_ue_f1ap_id={}: Dropping InitialULRRCMessageTransfer. Cause: Failed to allocate CU-UE-F1AP-ID", + du_ue_id); return; } - // Request UE creation - cu_cp_ue_creation_message ue_creation_msg = {}; - ue_creation_msg.ue_index = ue_index; + // Request UE context creation to CU-CP. + cu_cp_ue_creation_request ue_creation_msg = {}; + ue_creation_msg.cgi = cgi; ue_creation_msg.c_rnti = crnti; - ue_creation_msg.cgi = cgi_from_asn1(msg->nr_cgi); if (msg->du_to_cu_rrc_container_present) { ue_creation_msg.du_to_cu_rrc_container = byte_buffer(msg->du_to_cu_rrc_container); } else { @@ -273,26 +265,26 @@ void f1ap_cu_impl::handle_initial_ul_rrc_message(const init_ul_rrc_msg_transfer_ // We will forward an empty container to the RRC UE, that will trigger an RRC Reject logger.debug("du_ue_f1ap_id={}: Forwarding InitialUlRrcMessageTransfer to RRC to reject the UE. Cause: Missing DU " "to CU container", - msg->gnb_du_ue_f1ap_id); + du_ue_id); ue_creation_msg.du_to_cu_rrc_container = byte_buffer{}; } - ue_creation_complete_message ue_creation_complete_msg = du_processor_notifier.on_create_ue(ue_creation_msg); + // Request the creation of a UE context in the CU-CP. + const cu_cp_ue_creation_response cu_cp_resp = du_processor_notifier.on_ue_creation_request(ue_creation_msg); // Remove the UE if the creation was not successful - if (ue_creation_complete_msg.ue_index == ue_index_t::invalid) { + if (cu_cp_resp.ue_index == ue_index_t::invalid) { logger.warning("du_ue_f1ap_id={}: Removing the UE. UE creation failed", msg->gnb_du_ue_f1ap_id); - cu_cp_notifier.on_ue_removal_required(ue_index); return; } // Create UE context and store it - ue_ctxt_list.add_ue(ue_index, cu_ue_f1ap_id); - ue_ctxt_list.add_du_ue_f1ap_id(cu_ue_f1ap_id, int_to_gnb_du_ue_f1ap_id(msg->gnb_du_ue_f1ap_id)); - ue_ctxt_list.add_rrc_notifier(ue_creation_complete_msg.ue_index, ue_creation_complete_msg.f1ap_rrc_notifier); + ue_ctxt_list.add_ue(cu_cp_resp.ue_index, cu_ue_f1ap_id); + ue_ctxt_list.add_du_ue_f1ap_id(cu_ue_f1ap_id, du_ue_id); + ue_ctxt_list.add_rrc_notifier(cu_cp_resp.ue_index, cu_cp_resp.f1ap_rrc_notifier); f1ap_ue_context& ue_ctxt = ue_ctxt_list[cu_ue_f1ap_id]; - ue_ctxt.logger.log_debug("Added UE context"); + ue_ctxt.logger.log_info("Added UE context"); // Forward RRC container if (msg->rrc_container_rrc_setup_complete_present) { @@ -302,7 +294,7 @@ void f1ap_cu_impl::handle_initial_ul_rrc_message(const init_ul_rrc_msg_transfer_ return; } - // Pass container to RRC + // Pass RRC container to RRC ue_ctxt_list[cu_ue_f1ap_id].rrc_notifier->on_ul_ccch_pdu(msg->rrc_container.copy()); } diff --git a/lib/f1ap/cu_cp/f1ap_cu_impl.h b/lib/f1ap/cu_cp/f1ap_cu_impl.h index 319ef7b108..b579e59638 100644 --- a/lib/f1ap/cu_cp/f1ap_cu_impl.h +++ b/lib/f1ap/cu_cp/f1ap_cu_impl.h @@ -114,7 +114,6 @@ class f1ap_cu_impl final : public f1ap_cu f1ap_message_notifier& pdu_notifier; f1ap_du_processor_notifier& du_processor_notifier; f1ap_du_management_notifier& du_management_notifier; - f1ap_ue_removal_notifier& cu_cp_notifier; task_executor& ctrl_exec; unsigned current_transaction_id = 0; // store current F1AP transaction id diff --git a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp index 2b907ab82c..158fb9aafb 100644 --- a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp +++ b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp @@ -102,14 +102,14 @@ bool ue_context_setup_procedure::create_ue_context(const f1ap_ue_context_setup_r { // Request UE creation in target cell. - cu_cp_ue_creation_message ue_creation_msg; + cu_cp_ue_creation_request ue_creation_msg; ue_creation_msg.ue_index = ue_ctxt_setup_resp.ue_index; ue_creation_msg.c_rnti = ue_ctxt_setup_resp.c_rnti.value(); ue_creation_msg.cgi = request.sp_cell_id; ue_creation_msg.du_to_cu_rrc_container = ue_ctxt_setup_resp.du_to_cu_rrc_info.cell_group_cfg.copy(); ue_creation_msg.rrc_context = std::move(rrc_context); - ue_creation_complete_message ue_creation_complete_msg = du_processor_notifier.on_create_ue(ue_creation_msg); + cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_notifier.on_ue_creation_request(ue_creation_msg); if (ue_creation_complete_msg.ue_index == ue_index_t::invalid) { logger.warning("Couldn't create UE in target cell"); return false; diff --git a/tests/unittests/cu_cp/du_processor/du_processor_test.cpp b/tests/unittests/cu_cp/du_processor/du_processor_test.cpp index b368be38d1..93ad503d78 100644 --- a/tests/unittests/cu_cp/du_processor/du_processor_test.cpp +++ b/tests/unittests/cu_cp/du_processor/du_processor_test.cpp @@ -96,10 +96,10 @@ TEST_F(du_processor_test, when_ue_creation_msg_valid_then_ue_added) // Generate ue_creation message ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); - cu_cp_ue_creation_message ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); + cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); // Pass message to DU processor - ue_creation_complete_message ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); + cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); ASSERT_NE(ue_creation_complete_msg.ue_index, ue_index_t::invalid); ASSERT_EQ(du_processor_obj->get_nof_ues(), 1); @@ -113,10 +113,10 @@ TEST_F(du_processor_test, when_cell_id_invalid_then_ue_creation_fails) // Generate ue_creation message ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); - cu_cp_ue_creation_message ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 1); + cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 1); // Pass message to DU processor - ue_creation_complete_message ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); + cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); ASSERT_EQ(ue_creation_complete_msg.ue_index, ue_index_t::invalid); } @@ -132,10 +132,10 @@ TEST_F(du_processor_test, when_ue_exists_then_ue_not_added) // Generate ue_creation message ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); - cu_cp_ue_creation_message ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); + cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); // Pass message to DU processor - ue_creation_complete_message ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); + cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); ASSERT_NE(ue_creation_complete_msg.ue_index, ue_index_t::invalid); ASSERT_EQ(du_processor_obj->get_nof_ues(), 1); @@ -163,11 +163,10 @@ TEST_F(du_processor_test, when_max_nof_ues_exceeded_then_ue_not_added) // Generate ue_creation message rnti_t c_rnti = to_rnti(it + 1); // 0 is not a valid RNTI ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); - cu_cp_ue_creation_message ue_creation_msg = generate_ue_creation_message(ue_index, c_rnti, 6576); + cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, c_rnti, 6576); // Pass message to DU processor - ue_creation_complete_message ue_creation_complete_msg = - du_processor_obj->handle_ue_creation_request(ue_creation_msg); + cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); ASSERT_NE(ue_creation_complete_msg.ue_index, ue_index_t::invalid); } @@ -196,10 +195,10 @@ TEST_F(du_processor_test, when_ue_context_release_command_received_then_ue_delet // Generate ue_creation message ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); - cu_cp_ue_creation_message ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); + cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); // Pass message to DU processor - ue_creation_complete_message ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); + cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); ASSERT_EQ(ue_creation_complete_msg.ue_index, ue_index); ASSERT_EQ(du_processor_obj->get_nof_ues(), 1); @@ -236,11 +235,10 @@ TEST_F(du_processor_test, when_valid_ue_creation_request_received_after_ue_was_r // Generate ue_creation message rnti_t c_rnti = to_rnti(it + 1); // 0 is not a valid RNTI ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); - cu_cp_ue_creation_message ue_creation_msg = generate_ue_creation_message(ue_index, c_rnti, 6576); + cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, c_rnti, 6576); // Pass message to DU processor - ue_creation_complete_message ue_creation_complete_msg = - du_processor_obj->handle_ue_creation_request(ue_creation_msg); + cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); ASSERT_NE(ue_creation_complete_msg.ue_index, ue_index_t::invalid); // create SRB1 @@ -276,10 +274,10 @@ TEST_F(du_processor_test, when_valid_ue_creation_request_received_after_ue_was_r // Generate ue_creation message rnti_t c_rnti = to_rnti(MAX_NOF_UES_PER_DU + 1); ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); - cu_cp_ue_creation_message ue_creation_msg = generate_ue_creation_message(ue_index, c_rnti, 6576); + cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, c_rnti, 6576); // Pass message to DU processor - ue_creation_complete_message ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); + cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); ASSERT_NE(ue_creation_complete_msg.ue_index, ue_index_t::invalid); ASSERT_EQ(du_processor_obj->get_nof_ues(), MAX_NOF_UES_PER_DU); diff --git a/tests/unittests/cu_cp/du_processor/du_processor_test_helpers.cpp b/tests/unittests/cu_cp/du_processor/du_processor_test_helpers.cpp index 6251e4e152..d7313613ab 100644 --- a/tests/unittests/cu_cp/du_processor/du_processor_test_helpers.cpp +++ b/tests/unittests/cu_cp/du_processor/du_processor_test_helpers.cpp @@ -63,7 +63,7 @@ void du_processor_test::attach_ue() // Generate ue_creation message ue_index_t ue_index = ue_index_t::min; - cu_cp_ue_creation_message ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); + cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); // Pass message to DU processor du_processor_obj->handle_ue_creation_request(ue_creation_msg); } diff --git a/tests/unittests/cu_cp/du_processor_test_messages.cpp b/tests/unittests/cu_cp/du_processor_test_messages.cpp index 8836b7839e..f1616eea1b 100644 --- a/tests/unittests/cu_cp/du_processor_test_messages.cpp +++ b/tests/unittests/cu_cp/du_processor_test_messages.cpp @@ -73,10 +73,10 @@ void srsran::srs_cu_cp::generate_f1_setup_request_with_too_many_cells(du_setup_r setup_request = create_du_setup_request(f1setup_msg.pdu.init_msg().value.f1_setup_request()); } -cu_cp_ue_creation_message +cu_cp_ue_creation_request srsran::srs_cu_cp::generate_ue_creation_message(ue_index_t ue_index, rnti_t c_rnti, unsigned nrcell_id) { - cu_cp_ue_creation_message ue_creation_msg = {}; + cu_cp_ue_creation_request ue_creation_msg = {}; ue_creation_msg.ue_index = ue_index; ue_creation_msg.c_rnti = c_rnti; asn1::f1ap::nr_cgi_s asn1_cgi; diff --git a/tests/unittests/cu_cp/du_processor_test_messages.h b/tests/unittests/cu_cp/du_processor_test_messages.h index 1cf92a93fd..5fbbb069a0 100644 --- a/tests/unittests/cu_cp/du_processor_test_messages.h +++ b/tests/unittests/cu_cp/du_processor_test_messages.h @@ -36,7 +36,7 @@ void generate_f1_setup_request_with_too_many_cells(du_setup_request& set /// \param[in] c_rnti The C-RNTI to use. /// \param[in] nrcell_id The NR Cell Id to use. /// \return The dummy UE Creation Message. -cu_cp_ue_creation_message generate_ue_creation_message(ue_index_t ue_index, rnti_t c_rnti, unsigned nrcell_id); +cu_cp_ue_creation_request generate_ue_creation_message(ue_index_t ue_index, rnti_t c_rnti, unsigned nrcell_id); /// \brief Generate a dummy UE Context Release Command. /// \param[in] ue_index The UE Index to use. diff --git a/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h b/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h index bc840b44e6..c5dbebeb19 100644 --- a/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h +++ b/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h @@ -135,13 +135,7 @@ class dummy_f1ap_du_processor_notifier : public srs_cu_cp::f1ap_du_processor_not return next_du_setup_resp; } - ue_index_t on_new_ue_index_required() override - { - logger.info("Requested to allocate a new ue index."); - return allocate_ue_index(); - } - - srs_cu_cp::ue_creation_complete_message on_create_ue(const srs_cu_cp::cu_cp_ue_creation_message& msg) override + srs_cu_cp::cu_cp_ue_creation_response on_ue_creation_request(const cu_cp_ue_creation_request& msg) override { logger.info("Received UeCreationRequest"); last_ue_creation_msg.ue_index = msg.ue_index; @@ -150,9 +144,9 @@ class dummy_f1ap_du_processor_notifier : public srs_cu_cp::f1ap_du_processor_not last_ue_creation_msg.du_to_cu_rrc_container = msg.du_to_cu_rrc_container.copy(); last_ue_creation_msg.c_rnti = msg.c_rnti; - srs_cu_cp::ue_creation_complete_message ret = {}; - ret.ue_index = msg.ue_index; - ret.f1ap_rrc_notifier = f1ap_rrc_notifier.get(); + srs_cu_cp::cu_cp_ue_creation_response ret = {}; + ret.ue_index = msg.ue_index == ue_index_t::invalid ? allocate_ue_index() : msg.ue_index; + ret.f1ap_rrc_notifier = f1ap_rrc_notifier.get(); return ret; } @@ -180,7 +174,7 @@ class dummy_f1ap_du_processor_notifier : public srs_cu_cp::f1ap_du_processor_not srs_cu_cp::du_setup_request last_f1_setup_request_msg; srs_cu_cp::du_setup_result next_du_setup_resp; - srs_cu_cp::cu_cp_ue_creation_message last_ue_creation_msg; + srs_cu_cp::cu_cp_ue_creation_request last_ue_creation_msg; optional last_created_ue_index; std::unique_ptr f1ap_rrc_notifier = std::make_unique(); From 0b6627b1ae93be337908515b59adc60948194c8a Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Wed, 14 Feb 2024 18:38:14 +0100 Subject: [PATCH 58/78] cu-cp: remove unused method --- include/srsran/ngap/ngap.h | 3 --- lib/cu_cp/adapters/ngap_adapters.h | 6 ----- lib/cu_cp/du_processor/du_processor_impl.cpp | 4 ++-- lib/cu_cp/du_processor/du_processor_impl.h | 2 +- .../du_processor_impl_interface.h | 4 ++-- .../du_processor/du_processor_repository.cpp | 2 +- .../cu_cp/du_processor/du_processor_test.cpp | 22 +++++++++---------- tests/unittests/ngap/test_helpers.h | 6 ----- 8 files changed, 17 insertions(+), 32 deletions(-) diff --git a/include/srsran/ngap/ngap.h b/include/srsran/ngap/ngap.h index afbfbafd91..54f61bc039 100644 --- a/include/srsran/ngap/ngap.h +++ b/include/srsran/ngap/ngap.h @@ -178,9 +178,6 @@ class ngap_du_processor_control_notifier public: virtual ~ngap_du_processor_control_notifier() = default; - /// \brief Request allocation of a new UE index. - virtual ue_index_t on_new_ue_index_required() = 0; - /// \brief Notify about the reception of a new PDU Session Resource Setup Request. virtual async_task on_new_pdu_session_resource_setup_request(cu_cp_pdu_session_resource_setup_request& request) = 0; diff --git a/lib/cu_cp/adapters/ngap_adapters.h b/lib/cu_cp/adapters/ngap_adapters.h index cff7997175..7d94b92993 100644 --- a/lib/cu_cp/adapters/ngap_adapters.h +++ b/lib/cu_cp/adapters/ngap_adapters.h @@ -157,12 +157,6 @@ class ngap_du_processor_adapter : public ngap_du_processor_control_notifier du_processor_ngap_handler = du_processor_ngap_handler_; } - ue_index_t on_new_ue_index_required() override - { - srsran_assert(du_processor_ngap_handler != nullptr, "DU Processor handler must not be nullptr"); - return du_processor_ngap_handler->get_new_ue_index(); - } - async_task on_new_pdu_session_resource_setup_request(cu_cp_pdu_session_resource_setup_request& request) override { diff --git a/lib/cu_cp/du_processor/du_processor_impl.cpp b/lib/cu_cp/du_processor/du_processor_impl.cpp index 8e24fbd458..79ba4a3320 100644 --- a/lib/cu_cp/du_processor/du_processor_impl.cpp +++ b/lib/cu_cp/du_processor/du_processor_impl.cpp @@ -172,7 +172,7 @@ du_setup_result du_processor_impl::handle_du_setup_request(const du_setup_reques return res; } -ue_index_t du_processor_impl::get_new_ue_index() +ue_index_t du_processor_impl::allocate_new_ue_index() { return ue_manager.allocate_new_ue_index(context.du_index); } @@ -262,7 +262,7 @@ cu_cp_ue_creation_response du_processor_impl::handle_ue_creation_request(const c ue_index_t ue_index = msg.ue_index; if (ue_index == ue_index_t::invalid) { // It's a new UE. Allocate new UE index. - ue_index = get_new_ue_index(); + ue_index = allocate_new_ue_index(); if (ue_index == ue_index_t::invalid) { logger.warning("ue={}: Could not create UE context", ue_index); return {}; diff --git a/lib/cu_cp/du_processor/du_processor_impl.h b/lib/cu_cp/du_processor/du_processor_impl.h index ad582898cb..c6a5abb7eb 100644 --- a/lib/cu_cp/du_processor/du_processor_impl.h +++ b/lib/cu_cp/du_processor/du_processor_impl.h @@ -56,7 +56,7 @@ class du_processor_impl : public du_processor_impl_interface, public du_setup_ha // du_processor_f1ap_interface du_setup_result handle_du_setup_request(const du_setup_request& req) override; - ue_index_t get_new_ue_index() override; + ue_index_t allocate_new_ue_index() override; cu_cp_ue_creation_response handle_ue_creation_request(const cu_cp_ue_creation_request& msg) override; void handle_du_initiated_ue_context_release_request(const f1ap_ue_context_release_request& request) override; ue_update_complete_message handle_ue_update_request(const ue_update_message& msg) override; diff --git a/lib/cu_cp/du_processor/du_processor_impl_interface.h b/lib/cu_cp/du_processor/du_processor_impl_interface.h index 5d76c96efb..58f2bb6aa8 100644 --- a/lib/cu_cp/du_processor/du_processor_impl_interface.h +++ b/lib/cu_cp/du_processor/du_processor_impl_interface.h @@ -41,7 +41,7 @@ class du_processor_f1ap_interface virtual du_index_t get_du_index() = 0; /// \brief Allocate a new UE index. - virtual ue_index_t get_new_ue_index() = 0; + virtual ue_index_t allocate_new_ue_index() = 0; /// \brief Create a new UE context. /// \param[in] msg The UE creation message. @@ -261,7 +261,7 @@ class du_processor_ngap_interface : public du_processor_ue_context_notifier virtual ~du_processor_ngap_interface() = default; /// \brief Allocate a new UE index. - virtual ue_index_t get_new_ue_index() = 0; + virtual ue_index_t allocate_new_ue_index() = 0; /// \brief Handle the reception of a new PDU Session Resource Setup Request. virtual async_task diff --git a/lib/cu_cp/du_processor/du_processor_repository.cpp b/lib/cu_cp/du_processor/du_processor_repository.cpp index 66f390a970..4033074e42 100644 --- a/lib/cu_cp/du_processor/du_processor_repository.cpp +++ b/lib/cu_cp/du_processor/du_processor_repository.cpp @@ -224,7 +224,7 @@ ue_index_t du_processor_repository::handle_ue_index_allocation_request(const nr_ { for (auto& du : du_db) { if (du.second.du_processor->has_cell(cgi)) { - return du.second.du_processor->get_du_processor_ngap_interface().get_new_ue_index(); + return du.second.du_processor->get_du_processor_ngap_interface().allocate_new_ue_index(); } } logger.debug("No DU with plmn={} and cell_id={} found.", cgi.plmn, cgi.nci); diff --git a/tests/unittests/cu_cp/du_processor/du_processor_test.cpp b/tests/unittests/cu_cp/du_processor/du_processor_test.cpp index 93ad503d78..604a03f6d0 100644 --- a/tests/unittests/cu_cp/du_processor/du_processor_test.cpp +++ b/tests/unittests/cu_cp/du_processor/du_processor_test.cpp @@ -95,7 +95,7 @@ TEST_F(du_processor_test, when_ue_creation_msg_valid_then_ue_added) generate_f1_setup_request()); // Generate ue_creation message - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); // Pass message to DU processor @@ -112,7 +112,7 @@ TEST_F(du_processor_test, when_cell_id_invalid_then_ue_creation_fails) generate_f1_setup_request()); // Generate ue_creation message - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 1); // Pass message to DU processor @@ -131,7 +131,7 @@ TEST_F(du_processor_test, when_ue_exists_then_ue_not_added) generate_f1_setup_request()); // Generate ue_creation message - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); // Pass message to DU processor @@ -161,8 +161,8 @@ TEST_F(du_processor_test, when_max_nof_ues_exceeded_then_ue_not_added) // Add the maximum number of UEs for (unsigned it = 0; it < MAX_NOF_UES_PER_DU; it++) { // Generate ue_creation message - rnti_t c_rnti = to_rnti(it + 1); // 0 is not a valid RNTI - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); + rnti_t c_rnti = to_rnti(it + 1); // 0 is not a valid RNTI + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, c_rnti, 6576); // Pass message to DU processor @@ -178,7 +178,7 @@ TEST_F(du_processor_test, when_max_nof_ues_exceeded_then_ue_not_added) ASSERT_EQ(du_processor_obj->get_nof_ues(), MAX_NOF_UES_PER_DU); // Try to allocate additional UE index - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); ASSERT_EQ(ue_index, ue_index_t::invalid); ASSERT_EQ(du_processor_obj->get_nof_ues(), MAX_NOF_UES_PER_DU); @@ -194,7 +194,7 @@ TEST_F(du_processor_test, when_ue_context_release_command_received_then_ue_delet generate_f1_setup_request()); // Generate ue_creation message - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); // Pass message to DU processor @@ -233,8 +233,8 @@ TEST_F(du_processor_test, when_valid_ue_creation_request_received_after_ue_was_r // Add the maximum number of UEs for (unsigned it = 0; it < MAX_NOF_UES_PER_DU; it++) { // Generate ue_creation message - rnti_t c_rnti = to_rnti(it + 1); // 0 is not a valid RNTI - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); + rnti_t c_rnti = to_rnti(it + 1); // 0 is not a valid RNTI + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, c_rnti, 6576); // Pass message to DU processor @@ -272,8 +272,8 @@ TEST_F(du_processor_test, when_valid_ue_creation_request_received_after_ue_was_r // Add one more UE to DU processor // Generate ue_creation message - rnti_t c_rnti = to_rnti(MAX_NOF_UES_PER_DU + 1); - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().get_new_ue_index(); + rnti_t c_rnti = to_rnti(MAX_NOF_UES_PER_DU + 1); + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, c_rnti, 6576); // Pass message to DU processor diff --git a/tests/unittests/ngap/test_helpers.h b/tests/unittests/ngap/test_helpers.h index d4b62f5485..493699d9d7 100644 --- a/tests/unittests/ngap/test_helpers.h +++ b/tests/unittests/ngap/test_helpers.h @@ -183,12 +183,6 @@ class dummy_ngap_du_processor_notifier : public ngap_du_processor_control_notifi dummy_ngap_du_processor_notifier(ngap_ue_context_removal_handler& ngap_handler_) : logger(srslog::fetch_basic_logger("TEST")), ngap_handler(ngap_handler_){}; - ue_index_t on_new_ue_index_required() override - { - logger.info("Requested to allocate a new ue index."); - return allocate_ue_index(); - } - async_task on_new_pdu_session_resource_setup_request(cu_cp_pdu_session_resource_setup_request& request) override { From 3a782e09fcec4aa0c953ddf725a3737c5b890675 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Wed, 14 Feb 2024 19:31:09 +0100 Subject: [PATCH 59/78] cu-cp: rename cu-cp ue manager allocate_new_ue_index and add_ue methods for clarity --- include/srsran/cu_cp/ue_manager.h | 16 ++--- lib/cu_cp/cu_cp_impl.cpp | 8 +-- lib/cu_cp/du_processor/du_processor_impl.cpp | 4 +- .../mobility/inter_du_handover_routine.cpp | 2 +- lib/cu_cp/ue_manager/ue_manager_impl.cpp | 18 ++--- lib/cu_cp/ue_manager/ue_manager_impl.h | 16 +++-- .../ue_context_release_routine_test.cpp | 4 +- .../handover_reconfiguration_routine_test.cpp | 8 +-- .../cu_cp/ue_manager/ue_manager_test.cpp | 65 ++++++++++--------- .../ue_manager/ue_manager_test_helpers.cpp | 4 +- tests/unittests/ngap/ngap_test_helpers.cpp | 8 +-- tests/unittests/ngap/test_helpers.h | 8 +-- 12 files changed, 84 insertions(+), 77 deletions(-) diff --git a/include/srsran/cu_cp/ue_manager.h b/include/srsran/cu_cp/ue_manager.h index 69adc6574f..6b10ca5c66 100644 --- a/include/srsran/cu_cp/ue_manager.h +++ b/include/srsran/cu_cp/ue_manager.h @@ -106,6 +106,9 @@ class common_ue_manager /// \param[in] c_rnti The RNTI of the UE. virtual ue_index_t get_ue_index(pci_t pci, rnti_t c_rnti) = 0; + /// \brief Allocate and return the UE index of a new UE. + virtual ue_index_t add_ue(du_index_t du_index) = 0; + /// \brief Remove the UE context with the given UE index. /// \param[in] ue_index Index of the UE to be removed. virtual void remove_ue(ue_index_t ue_index) = 0; @@ -121,9 +124,6 @@ class du_processor_ue_manager : public common_ue_manager public: virtual ~du_processor_ue_manager() = default; - /// \brief Allocate and return the UE index of a new UE. - virtual ue_index_t allocate_new_ue_index(du_index_t du_index) = 0; - /// \brief Find the UE with the given UE index. Note that this will not check if a DU context exists. /// \param[in] ue_index Index of the UE to be found. /// \return Pointer to the UE if found, nullptr otherwise. @@ -136,7 +136,7 @@ class du_processor_ue_manager : public common_ue_manager /// \param[in] pci PCI of the cell that the UE is connected to. /// \param[in] rnti RNTI of the UE to be added. /// \return Pointer to the newly added DU UE if successful, nullptr otherwise. - virtual du_ue* add_ue(ue_index_t ue_index, gnb_du_id_t du_id, pci_t pci, rnti_t rnti) = 0; + virtual du_ue* set_ue_du_context(ue_index_t ue_index, gnb_du_id_t du_id, pci_t pci, rnti_t rnti) = 0; /// \brief Find the DU UE with the given UE index. /// \param[in] ue_index Index of the UE to be found. @@ -177,10 +177,10 @@ class ngap_ue_manager : public common_ue_manager /// \param[in] rrc_ue_ctrl_notifier RRC UE control notifier for the UE. /// \param[in] du_processor_ctrl_notifier DU processor control notifier for the UE. /// \return Pointer to the NGAP UE if found, nullptr otherwise. - virtual ngap_ue* add_ue(ue_index_t ue_index, - ngap_rrc_ue_pdu_notifier& rrc_ue_pdu_notifier, - ngap_rrc_ue_control_notifier& rrc_ue_ctrl_notifier, - ngap_du_processor_control_notifier& du_processor_ctrl_notifier) = 0; + virtual ngap_ue* set_ue_ng_context(ue_index_t ue_index, + ngap_rrc_ue_pdu_notifier& rrc_ue_pdu_notifier, + ngap_rrc_ue_control_notifier& rrc_ue_ctrl_notifier, + ngap_du_processor_control_notifier& du_processor_ctrl_notifier) = 0; /// \brief Find the NGAP UE with the given UE index. /// \param[in] ue_index Index of the UE to be found. diff --git a/lib/cu_cp/cu_cp_impl.cpp b/lib/cu_cp/cu_cp_impl.cpp index ffabf4b47c..66d6b371ff 100644 --- a/lib/cu_cp/cu_cp_impl.cpp +++ b/lib/cu_cp/cu_cp_impl.cpp @@ -340,10 +340,10 @@ bool cu_cp_impl::handle_new_ngap_ue(ue_index_t ue_index) return false; } - return ue_mng.add_ue(ue_index, - ue_mng.get_ngap_rrc_ue_adapter(ue_index), - ue_mng.get_ngap_rrc_ue_adapter(ue_index), - ngap_du_processor_ctrl_notifiers.at(get_du_index_from_ue_index(ue_index))); + return ue_mng.set_ue_ng_context(ue_index, + ue_mng.get_ngap_rrc_ue_adapter(ue_index), + ue_mng.get_ngap_rrc_ue_adapter(ue_index), + ngap_du_processor_ctrl_notifiers.at(get_du_index_from_ue_index(ue_index))); } void cu_cp_impl::on_statistics_report_timer_expired() diff --git a/lib/cu_cp/du_processor/du_processor_impl.cpp b/lib/cu_cp/du_processor/du_processor_impl.cpp index 79ba4a3320..ca8fe9c462 100644 --- a/lib/cu_cp/du_processor/du_processor_impl.cpp +++ b/lib/cu_cp/du_processor/du_processor_impl.cpp @@ -174,7 +174,7 @@ du_setup_result du_processor_impl::handle_du_setup_request(const du_setup_reques ue_index_t du_processor_impl::allocate_new_ue_index() { - return ue_manager.allocate_new_ue_index(context.du_index); + return ue_manager.add_ue(context.du_index); } du_cell_index_t du_processor_impl::find_cell(uint64_t packed_nr_cell_id) @@ -270,7 +270,7 @@ cu_cp_ue_creation_response du_processor_impl::handle_ue_creation_request(const c } // Create new UE context - du_ue* ue = ue_manager.add_ue(ue_index, context.id, pci, msg.c_rnti); + du_ue* ue = ue_manager.set_ue_du_context(ue_index, context.id, pci, msg.c_rnti); if (ue == nullptr) { logger.warning("ue={}: Could not create UE context", ue_index); return {}; diff --git a/lib/cu_cp/routines/mobility/inter_du_handover_routine.cpp b/lib/cu_cp/routines/mobility/inter_du_handover_routine.cpp index 99539ab309..1c852cd0e5 100644 --- a/lib/cu_cp/routines/mobility/inter_du_handover_routine.cpp +++ b/lib/cu_cp/routines/mobility/inter_du_handover_routine.cpp @@ -86,7 +86,7 @@ void inter_du_handover_routine::operator()(coro_contextset_pcell_index(du_cell_index_t::min); ue->set_rrc_ue_notifier(rrc_ue_ctrl_notifier); diff --git a/tests/unittests/cu_cp/mobility/handover_reconfiguration_routine_test.cpp b/tests/unittests/cu_cp/mobility/handover_reconfiguration_routine_test.cpp index 88410909bd..87ce895f13 100644 --- a/tests/unittests/cu_cp/mobility/handover_reconfiguration_routine_test.cpp +++ b/tests/unittests/cu_cp/mobility/handover_reconfiguration_routine_test.cpp @@ -25,14 +25,14 @@ class handover_reconfiguration_routine_test : public mobility_test void create_ues(bool procedure_outcome, unsigned transaction_id_) { - ue_index_t source_ue_index = get_ue_manager()->allocate_new_ue_index(source_du_index); - source_ue = get_ue_manager()->add_ue(source_ue_index, int_to_gnb_du_id(0), source_pci, source_rnti); + ue_index_t source_ue_index = get_ue_manager()->add_ue(source_du_index); + source_ue = get_ue_manager()->set_ue_du_context(source_ue_index, int_to_gnb_du_id(0), source_pci, source_rnti); ASSERT_NE(source_ue, nullptr); source_rrc_ue_notifier.set_transaction_id(transaction_id_); source_ue->set_rrc_ue_notifier(source_rrc_ue_notifier); - ue_index_t target_ue_index = get_ue_manager()->allocate_new_ue_index(target_du_index); - target_ue = get_ue_manager()->add_ue(target_ue_index, int_to_gnb_du_id(0), target_pci, target_rnti); + ue_index_t target_ue_index = get_ue_manager()->add_ue(target_du_index); + target_ue = get_ue_manager()->set_ue_du_context(target_ue_index, int_to_gnb_du_id(0), target_pci, target_rnti); ASSERT_NE(target_ue, nullptr); target_rrc_ue_notifier.set_rrc_reconfiguration_outcome(procedure_outcome); target_ue->set_rrc_ue_notifier(target_rrc_ue_notifier); diff --git a/tests/unittests/cu_cp/ue_manager/ue_manager_test.cpp b/tests/unittests/cu_cp/ue_manager/ue_manager_test.cpp index 10e91a97a5..7782b17b0a 100644 --- a/tests/unittests/cu_cp/ue_manager/ue_manager_test.cpp +++ b/tests/unittests/cu_cp/ue_manager/ue_manager_test.cpp @@ -30,7 +30,7 @@ TEST_F(ue_manager_test, when_multiple_ue_indexes_allocated_then_ue_indexes_valid for (unsigned it = 0; it < MAX_NOF_UES_PER_DU; it++) { // Check that the ue index is valid - ASSERT_NE(ue_mng.allocate_new_ue_index(du_index), ue_index_t::invalid); + ASSERT_NE(ue_mng.add_ue(du_index), ue_index_t::invalid); } } @@ -45,7 +45,7 @@ TEST_F(ue_manager_test, when_more_than_max_ue_indexes_allocated_then_ue_index_in for (unsigned it = 0; it < MAX_NOF_UES_PER_DU; it++) { // Check that the ue index is valid - ASSERT_NE(ue_mng.allocate_new_ue_index(du_index), ue_index_t::invalid); + ASSERT_NE(ue_mng.add_ue(du_index), ue_index_t::invalid); } // reset log level @@ -53,17 +53,17 @@ TEST_F(ue_manager_test, when_more_than_max_ue_indexes_allocated_then_ue_index_in test_logger.set_level(srslog::basic_levels::debug); // Allocate additional ue index - ASSERT_EQ(ue_mng.allocate_new_ue_index(du_index), ue_index_t::invalid); + ASSERT_EQ(ue_mng.add_ue(du_index), ue_index_t::invalid); } /// Test successful creation of a DU UE TEST_F(ue_manager_test, when_rnti_valid_then_ue_added) { du_index_t du_index = uint_to_du_index(0); - ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); + ue_index_t ue_index = ue_mng.add_ue(du_index); rnti_t rnti = to_rnti(0x4601); - auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); + auto* ue = ue_mng.set_ue_du_context(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // check that the UE has been created ASSERT_NE(ue, nullptr); @@ -89,10 +89,10 @@ TEST_F(ue_manager_test, when_rnti_valid_then_ue_added) TEST_F(ue_manager_test, when_ue_index_invalid_then_ue_not_found) { du_index_t du_index = uint_to_du_index(0); - ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); + ue_index_t ue_index = ue_mng.add_ue(du_index); rnti_t rnti = to_rnti(0x4601); - auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); + auto* ue = ue_mng.set_ue_du_context(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // check that the UE has been created ASSERT_NE(ue, nullptr); @@ -105,15 +105,15 @@ TEST_F(ue_manager_test, when_ue_index_invalid_then_ue_not_found) TEST_F(ue_manager_test, when_rnti_already_exits_then_ue_not_added) { du_index_t du_index = uint_to_du_index(0); - ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); + ue_index_t ue_index = ue_mng.add_ue(du_index); rnti_t rnti = to_rnti(0x4601); - ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); + ue_mng.set_ue_du_context(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // check that the number of DU UEs is 1 ASSERT_EQ(ue_mng.get_nof_du_ues(du_index), 1U); - auto* ue2 = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); + auto* ue2 = ue_mng.set_ue_du_context(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // check that the UE has not been added ASSERT_EQ(ue2, nullptr); @@ -124,10 +124,10 @@ TEST_F(ue_manager_test, when_rnti_already_exits_then_ue_not_added) TEST_F(ue_manager_test, when_ue_exists_then_removal_successful) { du_index_t du_index = uint_to_du_index(0); - ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); + ue_index_t ue_index = ue_mng.add_ue(du_index); rnti_t rnti = to_rnti(0x4601); - auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); + auto* ue = ue_mng.set_ue_du_context(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); ue_mng.remove_ue(ue->get_ue_index()); @@ -142,14 +142,14 @@ TEST_F(ue_manager_test, when_ue_exists_then_removal_successful) TEST_F(ue_manager_test, when_ngap_ue_context_exists_then_du_ue_removal_successful) { du_index_t du_index = uint_to_du_index(0); - ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); + ue_index_t ue_index = ue_mng.add_ue(du_index); rnti_t rnti = to_rnti(0x4601); - auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); + auto* ue = ue_mng.set_ue_du_context(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // add a NGAP context - auto* ue_ngap = - ue_mng.add_ue(ue->get_ue_index(), rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); + auto* ue_ngap = ue_mng.set_ue_ng_context( + ue->get_ue_index(), rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); // check that the UE has been created ASSERT_NE(ue_ngap, nullptr); @@ -171,8 +171,8 @@ TEST_F(ue_manager_test, when_multiple_ues_added_then_ues_exist) for (unsigned it = to_value(rnti_t::MIN_CRNTI); it < unsigned(to_value(rnti_t::MIN_CRNTI) + MAX_NOF_UES_PER_DU); it++) { rnti_t rnti = to_rnti(it); - ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); - auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); + ue_index_t ue_index = ue_mng.add_ue(du_index); + auto* ue = ue_mng.set_ue_du_context(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // check that the UE has been created ASSERT_NE(ue, nullptr); @@ -213,8 +213,8 @@ TEST_F(ue_manager_test, when_more_than_max_ues_added_then_ue_not_created) for (unsigned it = to_value(rnti_t::MIN_CRNTI); it < unsigned(to_value(rnti_t::MIN_CRNTI) + MAX_NOF_UES_PER_DU); it++) { rnti_t rnti = to_rnti(it); - ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); - auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); + ue_index_t ue_index = ue_mng.add_ue(du_index); + auto* ue = ue_mng.set_ue_du_context(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); // check that the UE has been created ASSERT_NE(ue, nullptr); @@ -243,7 +243,7 @@ TEST_F(ue_manager_test, when_more_than_max_ues_added_then_ue_not_created) // check that the maximum number of DU UEs has been reached ASSERT_EQ(ue_mng.get_nof_du_ues(du_index), MAX_NOF_UES_PER_DU); - ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); + ue_index_t ue_index = ue_mng.add_ue(du_index); ASSERT_EQ(ue_index, ue_index_t::invalid); // check that the UE has not been added @@ -257,7 +257,8 @@ TEST_F(ue_manager_test, when_more_than_max_ues_added_then_ue_not_created) /// Test creation of NGAP UE before creation of a DU UE TEST_F(ue_manager_test, when_ue_not_created_then_ngap_ue_not_added) { - auto* ue = ue_mng.add_ue(uint_to_ue_index(0), rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); + auto* ue = ue_mng.set_ue_ng_context( + uint_to_ue_index(0), rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); // check that the UE has not been added ASSERT_EQ(ue, nullptr); @@ -269,7 +270,7 @@ TEST_F(ue_manager_test, when_ue_created_then_then_ngap_ue_added) { ue_index_t ue_index = create_ue(uint_to_du_index(0), int_to_gnb_du_id(0), MIN_PCI, to_rnti(0x4601)); - auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); + auto* ue = ue_mng.set_ue_ng_context(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); // check that the NGAP UE has been added ASSERT_NE(ue, nullptr); @@ -287,7 +288,7 @@ TEST_F(ue_manager_test, when_ue_index_invalid_then_ngap_ue_not_found) { ue_index_t ue_index = create_ue(uint_to_du_index(0), int_to_gnb_du_id(0), MIN_PCI, to_rnti(0x4601)); - auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); + auto* ue = ue_mng.set_ue_ng_context(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); // check that the NGAP UE has been created ASSERT_NE(ue, nullptr); @@ -301,7 +302,7 @@ TEST_F(ue_manager_test, when_ngap_context_already_exits_then_ue_not_added) { ue_index_t ue_index = create_ue(uint_to_du_index(0), int_to_gnb_du_id(0), MIN_PCI, to_rnti(0x4601)); - auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); + auto* ue = ue_mng.set_ue_ng_context(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); // check that the NGAP UE has been created ASSERT_NE(ue, nullptr); @@ -309,7 +310,7 @@ TEST_F(ue_manager_test, when_ngap_context_already_exits_then_ue_not_added) // check that the number of NGAP UEs is 1 ASSERT_EQ(ue_mng.get_nof_ngap_ues(), 1U); - auto* ue2 = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); + auto* ue2 = ue_mng.set_ue_ng_context(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); // check that the UE has not been added ASSERT_EQ(ue2, nullptr); @@ -322,7 +323,7 @@ TEST_F(ue_manager_test, when_du_ue_context_exists_then_ngap_ue_removal_successfu du_index_t du_index = uint_to_du_index(0); ue_index_t ue_index = create_ue(du_index, int_to_gnb_du_id(0), MIN_PCI, to_rnti(0x4601)); - auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); + auto* ue = ue_mng.set_ue_ng_context(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); ue_mng.remove_ue(ue->get_ue_index()); @@ -337,7 +338,7 @@ TEST_F(ue_manager_test, when_ngap_ue_exists_then_removal_successful) ue_index_t ue_index = create_ue(du_index, int_to_gnb_du_id(0), MIN_PCI, to_rnti(0x4601)); - auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); + auto* ue = ue_mng.set_ue_ng_context(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); ue_mng.remove_ue(ue->get_ue_index()); @@ -361,7 +362,8 @@ TEST_F(ue_manager_test, when_multiple_ngap_ues_added_then_ues_exist) for (unsigned it = to_value(rnti_t::MIN_CRNTI); it < unsigned(to_value(rnti_t::MIN_CRNTI) + MAX_NOF_UES_PER_DU); it++) { ue_index_t ue_index = create_ue(uint_to_du_index(du_idx), int_to_gnb_du_id(0), MIN_PCI, to_rnti(du_offset + it)); - auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); + auto* ue = + ue_mng.set_ue_ng_context(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); // check that the UE has been created ASSERT_NE(ue, nullptr); @@ -396,7 +398,8 @@ TEST_F(ue_manager_test, when_more_than_max_ues_added_then_ngap_ue_not_created) for (unsigned it = to_value(rnti_t::MIN_CRNTI); it < unsigned(to_value(rnti_t::MIN_CRNTI) + MAX_NOF_UES_PER_DU); it++) { ue_index_t ue_index = create_ue(uint_to_du_index(du_idx), int_to_gnb_du_id(0), MIN_PCI, to_rnti(du_offset + it)); - auto* ue = ue_mng.add_ue(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); + auto* ue = + ue_mng.set_ue_ng_context(ue_index, rrc_ue_pdu_notifier, rrc_ue_pdu_notifier, *du_processor_ctrl_notifier); // check that the UE has been created ASSERT_NE(ue, nullptr); @@ -418,7 +421,7 @@ TEST_F(ue_manager_test, when_more_than_max_ues_added_then_ngap_ue_not_created) ASSERT_EQ(ue_mng.get_nof_ngap_ues(), ue_config.max_nof_supported_ues); // Try allocating an additional UE index - ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index_t::max); + ue_index_t ue_index = ue_mng.add_ue(du_index_t::max); ASSERT_EQ(ue_index, ue_index_t::invalid); // check that the UE has not been added diff --git a/tests/unittests/cu_cp/ue_manager/ue_manager_test_helpers.cpp b/tests/unittests/cu_cp/ue_manager/ue_manager_test_helpers.cpp index 79a68aeb3d..e0232a84ac 100644 --- a/tests/unittests/cu_cp/ue_manager/ue_manager_test_helpers.cpp +++ b/tests/unittests/cu_cp/ue_manager/ue_manager_test_helpers.cpp @@ -32,8 +32,8 @@ ue_manager_test::~ue_manager_test() ue_index_t ue_manager_test::create_ue(du_index_t du_index, gnb_du_id_t du_id, pci_t pci, rnti_t rnti) { - ue_index_t ue_index = ue_mng.allocate_new_ue_index(du_index); - auto* ue = ue_mng.add_ue(ue_index, du_id, pci, rnti); + ue_index_t ue_index = ue_mng.add_ue(du_index); + auto* ue = ue_mng.set_ue_du_context(ue_index, du_id, pci, rnti); if (ue == nullptr) { test_logger.error("Failed to create UE with pci={} and rnti={}", pci, rnti); return ue_index_t::invalid; diff --git a/tests/unittests/ngap/ngap_test_helpers.cpp b/tests/unittests/ngap/ngap_test_helpers.cpp index e95321cca5..507eb68580 100644 --- a/tests/unittests/ngap/ngap_test_helpers.cpp +++ b/tests/unittests/ngap/ngap_test_helpers.cpp @@ -52,8 +52,8 @@ ngap_test::~ngap_test() ue_index_t ngap_test::create_ue(rnti_t rnti) { // Create UE in UE manager - ue_index_t ue_index = ue_mng.allocate_new_ue_index(uint_to_du_index(0)); - auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); + ue_index_t ue_index = ue_mng.add_ue(uint_to_du_index(0)); + auto* ue = ue_mng.set_ue_du_context(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); if (ue == nullptr) { test_logger.error("Failed to create UE with pci={} and rnti={}", MIN_PCI, rnti_t::MIN_CRNTI); return ue_index_t::invalid; @@ -80,8 +80,8 @@ ue_index_t ngap_test::create_ue(rnti_t rnti) ue_index_t ngap_test::create_ue_without_init_ue_message(rnti_t rnti) { // Create UE in UE manager - ue_index_t ue_index = ue_mng.allocate_new_ue_index(uint_to_du_index(0)); - auto* ue = ue_mng.add_ue(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); + ue_index_t ue_index = ue_mng.add_ue(uint_to_du_index(0)); + auto* ue = ue_mng.set_ue_du_context(ue_index, int_to_gnb_du_id(0), MIN_PCI, rnti); if (ue == nullptr) { test_logger.error("Failed to create UE with pci={} and rnti={}", MIN_PCI, rnti_t::MIN_CRNTI); return ue_index_t::invalid; diff --git a/tests/unittests/ngap/test_helpers.h b/tests/unittests/ngap/test_helpers.h index 493699d9d7..5bff4ea249 100644 --- a/tests/unittests/ngap/test_helpers.h +++ b/tests/unittests/ngap/test_helpers.h @@ -345,10 +345,10 @@ class dummy_ngap_cu_cp_ue_creation_notifier : public ngap_cu_cp_ue_creation_noti last_ue = ue_index; // Add NGAP UE to UE manager - ngap_ue* ue = ue_manager.add_ue(ue_index, - *ue_notifier.rrc_ue_pdu_notifier, - *ue_notifier.rrc_ue_ctrl_notifier, - *ue_notifier.du_processor_ctrl_notifier); + ngap_ue* ue = ue_manager.set_ue_ng_context(ue_index, + *ue_notifier.rrc_ue_pdu_notifier, + *ue_notifier.rrc_ue_ctrl_notifier, + *ue_notifier.du_processor_ctrl_notifier); if (ue == nullptr) { logger.error("ue={}: Failed to create UE", ue_index); From 47916e43d9e3389771d05201a027a97d001d8099 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Wed, 14 Feb 2024 23:41:50 +0100 Subject: [PATCH 60/78] cu-cp: refactor ue rrc context update in the CU-CP --- include/srsran/cu_cp/cu_cp_ue_messages.h | 12 ---- include/srsran/f1ap/cu_cp/f1ap_cu.h | 28 ++++++-- lib/cu_cp/adapters/f1ap_adapters.h | 11 ++- lib/cu_cp/du_processor/du_processor_impl.cpp | 52 ++++++-------- lib/cu_cp/du_processor/du_processor_impl.h | 7 +- .../du_processor_impl_interface.h | 11 +-- lib/f1ap/cu_cp/f1ap_cu_impl.cpp | 36 ++++++---- .../procedures/ue_context_setup_procedure.cpp | 43 +++++++----- .../procedures/ue_context_setup_procedure.h | 2 +- .../cu_cp/du_processor/du_processor_test.cpp | 68 +++++++++---------- .../du_processor_test_helpers.cpp | 6 +- .../cu_cp/du_processor_test_messages.cpp | 16 ++--- .../cu_cp/du_processor_test_messages.h | 3 +- .../f1ap/cu_cp/f1ap_cu_test_helpers.h | 15 ++-- 14 files changed, 165 insertions(+), 145 deletions(-) diff --git a/include/srsran/cu_cp/cu_cp_ue_messages.h b/include/srsran/cu_cp/cu_cp_ue_messages.h index d0d34d0960..eb67a5d593 100644 --- a/include/srsran/cu_cp/cu_cp_ue_messages.h +++ b/include/srsran/cu_cp/cu_cp_ue_messages.h @@ -31,17 +31,5 @@ struct rrc_ue_transfer_context { bool is_inter_cu_handover = false; }; -/// \brief The UE creation is triggered from the F1AP. -/// It carries an RRC container and the C-RNTI if the DU sent an Initial UL RRC transfer. If the user is created -/// during handover the RNTI is only allocated after the Random Access. -struct cu_cp_ue_creation_request { - ue_index_t ue_index = ue_index_t::invalid; - nr_cell_global_id_t cgi; - uint32_t tac; - byte_buffer du_to_cu_rrc_container; - rnti_t c_rnti; - optional rrc_context; -}; - } // namespace srs_cu_cp } // namespace srsran diff --git a/include/srsran/f1ap/cu_cp/f1ap_cu.h b/include/srsran/f1ap/cu_cp/f1ap_cu.h index bc86dfc3b5..d2a370af98 100644 --- a/include/srsran/f1ap/cu_cp/f1ap_cu.h +++ b/include/srsran/f1ap/cu_cp/f1ap_cu.h @@ -99,9 +99,21 @@ class f1ap_rrc_message_notifier virtual void on_ul_dcch_pdu(const srb_id_t srb_id, byte_buffer pdu) = 0; }; -/// Response provided by the CU-CP to the F1AP-CU when a UE context creation in the CU-CP is requested. -struct cu_cp_ue_creation_response { - ue_index_t ue_index = ue_index_t::invalid; +/// \brief Request made by the F1AP-CU to create a RRC context for an existing UE context in the CU-CP. +/// +/// This request should be made once the C-RNTI and cell of the UE is known. That generally corresponds to the moment +/// a Initial UL RRC Message or a F1AP UE Context Setup Response are received. +struct ue_rrc_context_creation_request { + ue_index_t ue_index; + rnti_t c_rnti; + nr_cell_global_id_t cgi; + byte_buffer du_to_cu_rrc_container; + optional prev_context; +}; + +/// \brief Response by CU-CP to F1AP-CU request to create UE RRC context. +struct ue_rrc_context_creation_response { + /// Notifier to be used by the F1AP to push new RRC PDUs to the UE RRC layer. f1ap_rrc_message_notifier* f1ap_rrc_notifier = nullptr; }; @@ -125,10 +137,12 @@ class f1ap_du_processor_notifier : public du_setup_notifier public: virtual ~f1ap_du_processor_notifier() = default; - /// \brief Notifies the DU processor to create a UE. - /// \param[in] msg The ue creation message. - /// \return Returns a UE creation complete message containing the index of the created UE and its SRB notifiers. - virtual cu_cp_ue_creation_response on_ue_creation_request(const cu_cp_ue_creation_request& msg) = 0; + /// \brief Notifies the CU-CP to create a new UE instance. + virtual ue_index_t on_new_cu_cp_ue_required() = 0; + + /// \brief Notifies the CU-CP that an RRC context has been created for an existing CU-CP UE. + virtual ue_rrc_context_creation_response + on_ue_rrc_context_creation_request(const ue_rrc_context_creation_request& req) = 0; /// \brief Indicates the reception of a UE Context Release Request (gNB-DU initiated) as per TS 38.473 /// section 8.3.2. diff --git a/lib/cu_cp/adapters/f1ap_adapters.h b/lib/cu_cp/adapters/f1ap_adapters.h index 3fc8d9e250..019e49422a 100644 --- a/lib/cu_cp/adapters/f1ap_adapters.h +++ b/lib/cu_cp/adapters/f1ap_adapters.h @@ -69,10 +69,17 @@ class f1ap_du_processor_adapter : public f1ap_du_processor_notifier du_index_t get_du_index() override { return du_f1ap_handler->get_du_index(); } - cu_cp_ue_creation_response on_ue_creation_request(const cu_cp_ue_creation_request& msg) override + ue_index_t on_new_cu_cp_ue_required() override { srsran_assert(du_f1ap_handler != nullptr, "F1AP handler must not be nullptr"); - return du_f1ap_handler->handle_ue_creation_request(msg); + return du_f1ap_handler->allocate_new_ue_index(); + } + + ue_rrc_context_creation_response + on_ue_rrc_context_creation_request(const ue_rrc_context_creation_request& req) override + { + srsran_assert(du_f1ap_handler != nullptr, "F1AP handler must not be nullptr"); + return du_f1ap_handler->handle_ue_rrc_context_creation_request(req); } void on_du_initiated_ue_context_release_request(const f1ap_ue_context_release_request& req) override diff --git a/lib/cu_cp/du_processor/du_processor_impl.cpp b/lib/cu_cp/du_processor/du_processor_impl.cpp index ca8fe9c462..e954d9b328 100644 --- a/lib/cu_cp/du_processor/du_processor_impl.cpp +++ b/lib/cu_cp/du_processor/du_processor_impl.cpp @@ -245,57 +245,45 @@ bool du_processor_impl::create_rrc_ue(du_ue& ue, return true; } -cu_cp_ue_creation_response du_processor_impl::handle_ue_creation_request(const cu_cp_ue_creation_request& msg) +ue_rrc_context_creation_response +du_processor_impl::handle_ue_rrc_context_creation_request(const ue_rrc_context_creation_request& req) { - srsran_assert(config_helpers::is_valid(msg.cgi), "ue={}: Invalid CGI", msg.ue_index); - srsran_assert(msg.c_rnti != rnti_t::INVALID_RNTI, "ue={}: Invalid C-RNTI", msg.ue_index); + srsran_assert(req.ue_index != ue_index_t::invalid, "Invalid UE index"); + srsran_assert(req.c_rnti != rnti_t::INVALID_RNTI, "ue={}: Invalid C-RNTI", req.ue_index); + srsran_assert(config_helpers::is_valid(req.cgi), "ue={}: Invalid CGI", req.ue_index); // Check that creation message is valid - du_cell_index_t pcell_index = find_cell(msg.cgi.nci); + du_cell_index_t pcell_index = find_cell(req.cgi.nci); if (pcell_index == du_cell_index_t::invalid) { - logger.warning("ue={}: Could not find cell with cell_id={}", msg.ue_index, msg.cgi.nci); + logger.warning("ue={}: Could not find cell with NCI={}", req.ue_index, req.cgi.nci); + cu_cp_notifier.on_ue_removal_required(req.ue_index); return {}; } const pci_t pci = cell_db.at(pcell_index).pci; - // Allocate new UE index. - ue_index_t ue_index = msg.ue_index; - if (ue_index == ue_index_t::invalid) { - // It's a new UE. Allocate new UE index. - ue_index = allocate_new_ue_index(); - if (ue_index == ue_index_t::invalid) { - logger.warning("ue={}: Could not create UE context", ue_index); - return {}; - } - } - - // Create new UE context - du_ue* ue = ue_manager.set_ue_du_context(ue_index, context.id, pci, msg.c_rnti); + // Create new UE RRC context + du_ue* ue = ue_manager.set_ue_du_context(req.ue_index, context.id, pci, req.c_rnti); if (ue == nullptr) { - logger.warning("ue={}: Could not create UE context", ue_index); + logger.warning("ue={}: Could not create UE context", req.ue_index); return {}; } - - // Set parameters from creation message ue->set_pcell_index(pcell_index); // Create RRC UE. If the DU-to-CU-RRC-Container is empty, the UE will be rejected. - if (not create_rrc_ue(*ue, msg.c_rnti, msg.cgi, msg.du_to_cu_rrc_container.copy(), std::move(msg.rrc_context))) { - logger.warning("ue={}: Could not create RRC UE object", ue_index); - ue_manager.remove_ue(ue_index); + if (not create_rrc_ue(*ue, req.c_rnti, req.cgi, req.du_to_cu_rrc_container.copy(), std::move(req.prev_context))) { + logger.warning("ue={}: Could not create RRC UE object", req.ue_index); return {}; } - rrc_ue_interface* rrc_ue = rrc->find_ue(ue_index); - f1ap_rrc_ue_adapters[ue_index] = {}; - f1ap_rrc_ue_adapters.at(ue_index).connect_rrc_ue(rrc_ue->get_ul_ccch_pdu_handler(), - rrc_ue->get_ul_dcch_pdu_handler()); + rrc_ue_interface* rrc_ue = rrc->find_ue(req.ue_index); + f1ap_rrc_ue_adapters[req.ue_index] = {}; + f1ap_rrc_ue_adapters.at(req.ue_index) + .connect_rrc_ue(rrc_ue->get_ul_ccch_pdu_handler(), rrc_ue->get_ul_dcch_pdu_handler()); // Signal back to F1AP that the UE was successfully created. - cu_cp_ue_creation_response response; - response.ue_index = ue_index; - response.f1ap_rrc_notifier = &f1ap_rrc_ue_adapters.at(ue_index); + ue_rrc_context_creation_response response; + response.f1ap_rrc_notifier = &f1ap_rrc_ue_adapters.at(req.ue_index); - logger.info("ue={} c-rnti={}: UE created", ue->get_ue_index(), msg.c_rnti); + logger.info("ue={} c-rnti={}: UE created", ue->get_ue_index(), req.c_rnti); return response; } diff --git a/lib/cu_cp/du_processor/du_processor_impl.h b/lib/cu_cp/du_processor/du_processor_impl.h index c6a5abb7eb..7c650537ec 100644 --- a/lib/cu_cp/du_processor/du_processor_impl.h +++ b/lib/cu_cp/du_processor/du_processor_impl.h @@ -55,9 +55,10 @@ class du_processor_impl : public du_processor_impl_interface, public du_setup_ha size_t get_nof_ues() const override { return ue_manager.get_nof_du_ues(context.du_index); }; // du_processor_f1ap_interface - du_setup_result handle_du_setup_request(const du_setup_request& req) override; - ue_index_t allocate_new_ue_index() override; - cu_cp_ue_creation_response handle_ue_creation_request(const cu_cp_ue_creation_request& msg) override; + du_setup_result handle_du_setup_request(const du_setup_request& req) override; + ue_index_t allocate_new_ue_index() override; + ue_rrc_context_creation_response + handle_ue_rrc_context_creation_request(const ue_rrc_context_creation_request& req) override; void handle_du_initiated_ue_context_release_request(const f1ap_ue_context_release_request& request) override; ue_update_complete_message handle_ue_update_request(const ue_update_message& msg) override; diff --git a/lib/cu_cp/du_processor/du_processor_impl_interface.h b/lib/cu_cp/du_processor/du_processor_impl_interface.h index 58f2bb6aa8..48ef38c81a 100644 --- a/lib/cu_cp/du_processor/du_processor_impl_interface.h +++ b/lib/cu_cp/du_processor/du_processor_impl_interface.h @@ -43,10 +43,13 @@ class du_processor_f1ap_interface /// \brief Allocate a new UE index. virtual ue_index_t allocate_new_ue_index() = 0; - /// \brief Create a new UE context. - /// \param[in] msg The UE creation message. - /// \return Returns a UE creation complete message containing the index of the created UE and its SRB notifiers. - virtual cu_cp_ue_creation_response handle_ue_creation_request(const cu_cp_ue_creation_request& msg) = 0; + /// \brief Request to create a new UE RRC context. + /// + /// This method should be called when a C-RNTI and PCell are assigned to a UE. + /// \param req + /// \return + virtual ue_rrc_context_creation_response + handle_ue_rrc_context_creation_request(const ue_rrc_context_creation_request& req) = 0; /// \brief Update existing UE object. virtual ue_update_complete_message handle_ue_update_request(const ue_update_message& msg) = 0; diff --git a/lib/f1ap/cu_cp/f1ap_cu_impl.cpp b/lib/f1ap/cu_cp/f1ap_cu_impl.cpp index 3e6bdae1c3..c944a7507f 100644 --- a/lib/f1ap/cu_cp/f1ap_cu_impl.cpp +++ b/lib/f1ap/cu_cp/f1ap_cu_impl.cpp @@ -254,34 +254,42 @@ void f1ap_cu_impl::handle_initial_ul_rrc_message(const init_ul_rrc_msg_transfer_ return; } - // Request UE context creation to CU-CP. - cu_cp_ue_creation_request ue_creation_msg = {}; - ue_creation_msg.cgi = cgi; - ue_creation_msg.c_rnti = crnti; + // Create CU-CP UE instance. + const ue_index_t ue_index = du_processor_notifier.on_new_cu_cp_ue_required(); + if (ue_index == ue_index_t::invalid) { + logger.warning("du_ue_f1ap_id={}: Dropping InitialULRRCMessageTransfer. Cause: CU-CP UE creation failed", + msg->gnb_du_ue_f1ap_id); + return; + } + + // Update the UE RRC context (e.g. C-RNTI, PCell) in the CU-CP. + ue_rrc_context_creation_request req; + req.ue_index = ue_index; + req.c_rnti = crnti; + req.cgi = cgi; if (msg->du_to_cu_rrc_container_present) { - ue_creation_msg.du_to_cu_rrc_container = byte_buffer(msg->du_to_cu_rrc_container); + req.du_to_cu_rrc_container = byte_buffer(msg->du_to_cu_rrc_container); } else { // Assume the DU can't serve the UE, so the CU-CP should reject the UE, see TS 38.473 section 8.4.1.2. // We will forward an empty container to the RRC UE, that will trigger an RRC Reject - logger.debug("du_ue_f1ap_id={}: Forwarding InitialUlRrcMessageTransfer to RRC to reject the UE. Cause: Missing DU " + logger.debug("du_ue_f1ap_id={}: Forwarding InitialULRRCMessageTransfer to RRC to reject the UE. Cause: Missing DU " "to CU container", du_ue_id); - ue_creation_msg.du_to_cu_rrc_container = byte_buffer{}; + req.du_to_cu_rrc_container = byte_buffer{}; } - - // Request the creation of a UE context in the CU-CP. - const cu_cp_ue_creation_response cu_cp_resp = du_processor_notifier.on_ue_creation_request(ue_creation_msg); + const ue_rrc_context_creation_response resp = du_processor_notifier.on_ue_rrc_context_creation_request(req); // Remove the UE if the creation was not successful - if (cu_cp_resp.ue_index == ue_index_t::invalid) { - logger.warning("du_ue_f1ap_id={}: Removing the UE. UE creation failed", msg->gnb_du_ue_f1ap_id); + if (resp.f1ap_rrc_notifier == nullptr) { + logger.warning("du_ue_f1ap_id={}: Dropping InitialULRRCMessageTransfer. Cause: UE RRC context creation failed", + msg->gnb_du_ue_f1ap_id); return; } // Create UE context and store it - ue_ctxt_list.add_ue(cu_cp_resp.ue_index, cu_ue_f1ap_id); + ue_ctxt_list.add_ue(ue_index, cu_ue_f1ap_id); ue_ctxt_list.add_du_ue_f1ap_id(cu_ue_f1ap_id, du_ue_id); - ue_ctxt_list.add_rrc_notifier(cu_cp_resp.ue_index, cu_cp_resp.f1ap_rrc_notifier); + ue_ctxt_list.add_rrc_notifier(ue_index, resp.f1ap_rrc_notifier); f1ap_ue_context& ue_ctxt = ue_ctxt_list[cu_ue_f1ap_id]; ue_ctxt.logger.log_info("Added UE context"); diff --git a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp index 158fb9aafb..1a154ef732 100644 --- a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp +++ b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp @@ -98,27 +98,34 @@ bool ue_context_setup_procedure::allocate_cu_ue_id() return true; } -bool ue_context_setup_procedure::create_ue_context(const f1ap_ue_context_setup_response& ue_ctxt_setup_resp) +bool ue_context_setup_procedure::create_ue_rrc_context(const f1ap_ue_context_setup_response& ue_ctxt_setup_resp) { - // Request UE creation in target cell. - - cu_cp_ue_creation_request ue_creation_msg; - ue_creation_msg.ue_index = ue_ctxt_setup_resp.ue_index; - ue_creation_msg.c_rnti = ue_ctxt_setup_resp.c_rnti.value(); - ue_creation_msg.cgi = request.sp_cell_id; - ue_creation_msg.du_to_cu_rrc_container = ue_ctxt_setup_resp.du_to_cu_rrc_info.cell_group_cfg.copy(); - ue_creation_msg.rrc_context = std::move(rrc_context); - - cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_notifier.on_ue_creation_request(ue_creation_msg); - if (ue_creation_complete_msg.ue_index == ue_index_t::invalid) { + if (not ue_ctxt_setup_resp.success or ue_ctxt_setup_resp.ue_index == ue_index_t::invalid) { logger.warning("Couldn't create UE in target cell"); return false; } - // Add F1AP to RRC UE notifier to UE context. - ue_ctxt_list.add_rrc_notifier(ue_creation_complete_msg.ue_index, ue_creation_complete_msg.f1ap_rrc_notifier); + if (ue_ctxt_setup_resp.c_rnti.has_value()) { + // An C-RNTI has been allocated by the DU. In such case, we need to create a new UE RRC context in the CU-CP. + + ue_rrc_context_creation_request req; + req.ue_index = ue_ctxt_setup_resp.ue_index; + req.c_rnti = ue_ctxt_setup_resp.c_rnti.value(); + req.cgi = request.sp_cell_id; + req.du_to_cu_rrc_container = ue_ctxt_setup_resp.du_to_cu_rrc_info.cell_group_cfg.copy(); + req.prev_context = std::move(rrc_context); + + ue_rrc_context_creation_response resp = du_processor_notifier.on_ue_rrc_context_creation_request(req); + if (resp.f1ap_rrc_notifier == nullptr) { + logger.warning("Couldn't create UE RRC context in target cell"); + return false; + } - logger.debug("ue={} Added RRC UE notifier", ue_creation_complete_msg.ue_index); + // Add RRC notifier to F1AP UE context. + ue_ctxt_list.add_rrc_notifier(req.ue_index, resp.f1ap_rrc_notifier); + + logger.debug("ue={} Added RRC UE notifier", req.ue_index); + } return true; } @@ -167,8 +174,12 @@ void ue_context_setup_procedure::create_ue_context_setup_result() ue_ctxt.ue_ids.cu_ue_f1ap_id, ue_ctxt.ue_ids.du_ue_f1ap_id); + // Prepare procedure response. fill_f1ap_ue_context_setup_response(response, new_ue_index, transaction_sink.response()); - response.success = create_ue_context(response); + + // Create UE RRC context in CU-CP, if required. + response.success = create_ue_rrc_context(response); + } else if (transaction_sink.failed()) { logger.debug("Received UeContextSetupFailure cause={}", get_cause_str(transaction_sink.failure()->cause)); fill_f1ap_ue_context_setup_response(response, transaction_sink.failure()); diff --git a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.h b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.h index e386e1cc1d..0c6912ac01 100644 --- a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.h +++ b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.h @@ -38,7 +38,7 @@ class ue_context_setup_procedure /// Allocate F1AP CU UE ID. bool allocate_cu_ue_id(); - bool create_ue_context(const f1ap_ue_context_setup_response& ue_ctxt_setup_resp); + bool create_ue_rrc_context(const f1ap_ue_context_setup_response& ue_ctxt_setup_resp); /// Send F1 UE Context Setup Request to DU. void send_ue_context_setup_request(); diff --git a/tests/unittests/cu_cp/du_processor/du_processor_test.cpp b/tests/unittests/cu_cp/du_processor/du_processor_test.cpp index 604a03f6d0..fe43a7aa2c 100644 --- a/tests/unittests/cu_cp/du_processor/du_processor_test.cpp +++ b/tests/unittests/cu_cp/du_processor/du_processor_test.cpp @@ -95,12 +95,12 @@ TEST_F(du_processor_test, when_ue_creation_msg_valid_then_ue_added) generate_f1_setup_request()); // Generate ue_creation message - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); - cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); + ue_rrc_context_creation_request req = generate_ue_rrc_context_creation_request(ue_index, rnti_t::MIN_CRNTI, 6576); // Pass message to DU processor - cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); - ASSERT_NE(ue_creation_complete_msg.ue_index, ue_index_t::invalid); + ue_rrc_context_creation_response resp = du_processor_obj->handle_ue_rrc_context_creation_request(req); + ASSERT_NE(resp.f1ap_rrc_notifier, nullptr); ASSERT_EQ(du_processor_obj->get_nof_ues(), 1); } @@ -112,15 +112,15 @@ TEST_F(du_processor_test, when_cell_id_invalid_then_ue_creation_fails) generate_f1_setup_request()); // Generate ue_creation message - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); - cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 1); + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); + ue_rrc_context_creation_request req = generate_ue_rrc_context_creation_request(ue_index, rnti_t::MIN_CRNTI, 1); // Pass message to DU processor - cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); - ASSERT_EQ(ue_creation_complete_msg.ue_index, ue_index_t::invalid); + ue_rrc_context_creation_response resp = du_processor_obj->handle_ue_rrc_context_creation_request(req); + ASSERT_EQ(resp.f1ap_rrc_notifier, nullptr); } -TEST_F(du_processor_test, when_ue_exists_then_ue_not_added) +TEST_F(du_processor_test, when_ue_rrc_context_exists_then_new_ue_rrc_context_not_added) { // Generate valid F1SetupRequest du_setup_request f1_setup_request; @@ -131,18 +131,18 @@ TEST_F(du_processor_test, when_ue_exists_then_ue_not_added) generate_f1_setup_request()); // Generate ue_creation message - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); - cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); + ue_rrc_context_creation_request req = generate_ue_rrc_context_creation_request(ue_index, rnti_t::MIN_CRNTI, 6576); // Pass message to DU processor - cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); - ASSERT_NE(ue_creation_complete_msg.ue_index, ue_index_t::invalid); + ue_rrc_context_creation_response resp = du_processor_obj->handle_ue_rrc_context_creation_request(req); + ASSERT_NE(resp.f1ap_rrc_notifier, nullptr); ASSERT_EQ(du_processor_obj->get_nof_ues(), 1); // Pass same message to DU processor again - ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); - ASSERT_EQ(ue_creation_complete_msg.ue_index, ue_index_t::invalid); + resp = du_processor_obj->handle_ue_rrc_context_creation_request(req); + ASSERT_EQ(resp.f1ap_rrc_notifier, nullptr); ASSERT_EQ(du_processor_obj->get_nof_ues(), 1); } @@ -161,13 +161,13 @@ TEST_F(du_processor_test, when_max_nof_ues_exceeded_then_ue_not_added) // Add the maximum number of UEs for (unsigned it = 0; it < MAX_NOF_UES_PER_DU; it++) { // Generate ue_creation message - rnti_t c_rnti = to_rnti(it + 1); // 0 is not a valid RNTI - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); - cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, c_rnti, 6576); + rnti_t c_rnti = to_rnti(it + 1); // 0 is not a valid RNTI + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); + ue_rrc_context_creation_request req = generate_ue_rrc_context_creation_request(ue_index, c_rnti, 6576); // Pass message to DU processor - cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); - ASSERT_NE(ue_creation_complete_msg.ue_index, ue_index_t::invalid); + ue_rrc_context_creation_response resp = du_processor_obj->handle_ue_rrc_context_creation_request(req); + ASSERT_NE(resp.f1ap_rrc_notifier, nullptr); } // Reset logger loglevel @@ -194,12 +194,12 @@ TEST_F(du_processor_test, when_ue_context_release_command_received_then_ue_delet generate_f1_setup_request()); // Generate ue_creation message - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); - cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); + ue_rrc_context_creation_request req = generate_ue_rrc_context_creation_request(ue_index, rnti_t::MIN_CRNTI, 6576); // Pass message to DU processor - cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); - ASSERT_EQ(ue_creation_complete_msg.ue_index, ue_index); + ue_rrc_context_creation_response resp = du_processor_obj->handle_ue_rrc_context_creation_request(req); + ASSERT_NE(resp.f1ap_rrc_notifier, nullptr); ASSERT_EQ(du_processor_obj->get_nof_ues(), 1); @@ -233,13 +233,13 @@ TEST_F(du_processor_test, when_valid_ue_creation_request_received_after_ue_was_r // Add the maximum number of UEs for (unsigned it = 0; it < MAX_NOF_UES_PER_DU; it++) { // Generate ue_creation message - rnti_t c_rnti = to_rnti(it + 1); // 0 is not a valid RNTI - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); - cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, c_rnti, 6576); + rnti_t c_rnti = to_rnti(it + 1); // 0 is not a valid RNTI + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); + ue_rrc_context_creation_request req = generate_ue_rrc_context_creation_request(ue_index, c_rnti, 6576); // Pass message to DU processor - cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); - ASSERT_NE(ue_creation_complete_msg.ue_index, ue_index_t::invalid); + ue_rrc_context_creation_response resp = du_processor_obj->handle_ue_rrc_context_creation_request(req); + ASSERT_NE(resp.f1ap_rrc_notifier, nullptr); // create SRB1 srb_creation_message srb1_msg{}; @@ -272,13 +272,13 @@ TEST_F(du_processor_test, when_valid_ue_creation_request_received_after_ue_was_r // Add one more UE to DU processor // Generate ue_creation message - rnti_t c_rnti = to_rnti(MAX_NOF_UES_PER_DU + 1); - ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); - cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, c_rnti, 6576); + rnti_t c_rnti = to_rnti(MAX_NOF_UES_PER_DU + 1); + ue_index_t ue_index = du_processor_obj->get_du_processor_f1ap_interface().allocate_new_ue_index(); + ue_rrc_context_creation_request req = generate_ue_rrc_context_creation_request(ue_index, c_rnti, 6576); // Pass message to DU processor - cu_cp_ue_creation_response ue_creation_complete_msg = du_processor_obj->handle_ue_creation_request(ue_creation_msg); - ASSERT_NE(ue_creation_complete_msg.ue_index, ue_index_t::invalid); + ue_rrc_context_creation_response resp = du_processor_obj->handle_ue_rrc_context_creation_request(req); + ASSERT_NE(resp.f1ap_rrc_notifier, nullptr); ASSERT_EQ(du_processor_obj->get_nof_ues(), MAX_NOF_UES_PER_DU); } diff --git a/tests/unittests/cu_cp/du_processor/du_processor_test_helpers.cpp b/tests/unittests/cu_cp/du_processor/du_processor_test_helpers.cpp index d7313613ab..629ef125b7 100644 --- a/tests/unittests/cu_cp/du_processor/du_processor_test_helpers.cpp +++ b/tests/unittests/cu_cp/du_processor/du_processor_test_helpers.cpp @@ -62,10 +62,10 @@ void du_processor_test::attach_ue() du_processor_obj->get_du_processor_f1ap_interface().get_f1ap_message_handler().handle_message(f1_setup_req); // Generate ue_creation message - ue_index_t ue_index = ue_index_t::min; - cu_cp_ue_creation_request ue_creation_msg = generate_ue_creation_message(ue_index, rnti_t::MIN_CRNTI, 6576); + ue_index_t ue_index = ue_index_t::min; + ue_rrc_context_creation_request req = generate_ue_rrc_context_creation_request(ue_index, rnti_t::MIN_CRNTI, 6576); // Pass message to DU processor - du_processor_obj->handle_ue_creation_request(ue_creation_msg); + du_processor_obj->handle_ue_rrc_context_creation_request(req); } void du_processor_test::receive_rrc_reconfig_complete() diff --git a/tests/unittests/cu_cp/du_processor_test_messages.cpp b/tests/unittests/cu_cp/du_processor_test_messages.cpp index f1616eea1b..880cbf2bc5 100644 --- a/tests/unittests/cu_cp/du_processor_test_messages.cpp +++ b/tests/unittests/cu_cp/du_processor_test_messages.cpp @@ -73,24 +73,24 @@ void srsran::srs_cu_cp::generate_f1_setup_request_with_too_many_cells(du_setup_r setup_request = create_du_setup_request(f1setup_msg.pdu.init_msg().value.f1_setup_request()); } -cu_cp_ue_creation_request -srsran::srs_cu_cp::generate_ue_creation_message(ue_index_t ue_index, rnti_t c_rnti, unsigned nrcell_id) +ue_rrc_context_creation_request +srsran::srs_cu_cp::generate_ue_rrc_context_creation_request(ue_index_t ue_index, rnti_t c_rnti, unsigned nrcell_id) { - cu_cp_ue_creation_request ue_creation_msg = {}; - ue_creation_msg.ue_index = ue_index; - ue_creation_msg.c_rnti = c_rnti; + ue_rrc_context_creation_request req = {}; + req.ue_index = ue_index; + req.c_rnti = c_rnti; asn1::f1ap::nr_cgi_s asn1_cgi; asn1_cgi.nr_cell_id.from_number(nrcell_id); asn1_cgi.plmn_id.from_string("02f899"); - ue_creation_msg.cgi = cgi_from_asn1(asn1_cgi); + req.cgi = cgi_from_asn1(asn1_cgi); asn1::unbounded_octstring tmp; tmp.from_string( "5c00b001117aec701061e0007c20408d07810020a2090480ca8000f800000000008370842000088165000048200002069a06aa49880002" "00204000400d008013b64b1814400e468acf120000096070820f177e060870000000e25038000040bde802000400000000028201950300" "c400"); - ue_creation_msg.du_to_cu_rrc_container = {tmp.begin(), tmp.end()}; + req.du_to_cu_rrc_container = {tmp.begin(), tmp.end()}; - return ue_creation_msg; + return req; } cu_cp_ue_context_release_command srsran::srs_cu_cp::generate_ue_context_release_command(ue_index_t ue_index) diff --git a/tests/unittests/cu_cp/du_processor_test_messages.h b/tests/unittests/cu_cp/du_processor_test_messages.h index 5fbbb069a0..aca6da7f9a 100644 --- a/tests/unittests/cu_cp/du_processor_test_messages.h +++ b/tests/unittests/cu_cp/du_processor_test_messages.h @@ -36,7 +36,8 @@ void generate_f1_setup_request_with_too_many_cells(du_setup_request& set /// \param[in] c_rnti The C-RNTI to use. /// \param[in] nrcell_id The NR Cell Id to use. /// \return The dummy UE Creation Message. -cu_cp_ue_creation_request generate_ue_creation_message(ue_index_t ue_index, rnti_t c_rnti, unsigned nrcell_id); +ue_rrc_context_creation_request +generate_ue_rrc_context_creation_request(ue_index_t ue_index, rnti_t c_rnti, unsigned nrcell_id); /// \brief Generate a dummy UE Context Release Command. /// \param[in] ue_index The UE Index to use. diff --git a/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h b/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h index c5dbebeb19..4451738895 100644 --- a/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h +++ b/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h @@ -135,23 +135,22 @@ class dummy_f1ap_du_processor_notifier : public srs_cu_cp::f1ap_du_processor_not return next_du_setup_resp; } - srs_cu_cp::cu_cp_ue_creation_response on_ue_creation_request(const cu_cp_ue_creation_request& msg) override + srs_cu_cp::ue_rrc_context_creation_response + on_ue_rrc_context_creation_request(const ue_rrc_context_creation_request& msg) override { - logger.info("Received UeCreationRequest"); + logger.info("Received {}", __FUNCTION__); last_ue_creation_msg.ue_index = msg.ue_index; last_ue_creation_msg.cgi = msg.cgi; - last_ue_creation_msg.tac = msg.tac; last_ue_creation_msg.du_to_cu_rrc_container = msg.du_to_cu_rrc_container.copy(); last_ue_creation_msg.c_rnti = msg.c_rnti; - srs_cu_cp::cu_cp_ue_creation_response ret = {}; - ret.ue_index = msg.ue_index == ue_index_t::invalid ? allocate_ue_index() : msg.ue_index; - ret.f1ap_rrc_notifier = f1ap_rrc_notifier.get(); + srs_cu_cp::ue_rrc_context_creation_response ret = {}; + ret.f1ap_rrc_notifier = f1ap_rrc_notifier.get(); return ret; } - ue_index_t allocate_ue_index() + ue_index_t on_new_cu_cp_ue_required() override { ue_index_t ue_index = srs_cu_cp::ue_index_t::invalid; if (ue_id < srs_cu_cp::MAX_NOF_UES_PER_DU) { @@ -174,7 +173,7 @@ class dummy_f1ap_du_processor_notifier : public srs_cu_cp::f1ap_du_processor_not srs_cu_cp::du_setup_request last_f1_setup_request_msg; srs_cu_cp::du_setup_result next_du_setup_resp; - srs_cu_cp::cu_cp_ue_creation_request last_ue_creation_msg; + srs_cu_cp::ue_rrc_context_creation_request last_ue_creation_msg; optional last_created_ue_index; std::unique_ptr f1ap_rrc_notifier = std::make_unique(); From 1e8234ea3afde74b0e641c272e8c861c7950ca91 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Thu, 15 Feb 2024 09:54:43 +0100 Subject: [PATCH 61/78] cu-cp: remove unused f1ap interfaces --- include/srsran/f1ap/cu_cp/f1ap_cu.h | 9 ------- lib/cu_cp/adapters/du_processor_adapters.h | 2 +- lib/cu_cp/adapters/f1ap_adapters.h | 2 +- lib/cu_cp/du_processor/du_processor_impl.cpp | 27 ------------------- lib/cu_cp/du_processor/du_processor_impl.h | 1 - .../du_processor_impl_interface.h | 14 +++++----- tests/unittests/cu_cp/test_helpers.h | 5 +--- .../f1ap/cu_cp/f1ap_cu_test_helpers.h | 16 ----------- 8 files changed, 9 insertions(+), 67 deletions(-) diff --git a/include/srsran/f1ap/cu_cp/f1ap_cu.h b/include/srsran/f1ap/cu_cp/f1ap_cu.h index d2a370af98..99e5b28504 100644 --- a/include/srsran/f1ap/cu_cp/f1ap_cu.h +++ b/include/srsran/f1ap/cu_cp/f1ap_cu.h @@ -153,15 +153,6 @@ class f1ap_du_processor_notifier : public du_setup_notifier virtual du_index_t get_du_index() = 0; }; -class f1ap_task_scheduler -{ -public: - virtual ~f1ap_task_scheduler() = default; - - /// \brief Schedule Async task for a given UE. - virtual void schedule_async_task(ue_index_t ue_index, async_task&& task) = 0; -}; - /// Methods used by F1AP to notify about DU specific events. class f1ap_du_management_notifier { diff --git a/lib/cu_cp/adapters/du_processor_adapters.h b/lib/cu_cp/adapters/du_processor_adapters.h index 44b2f8bc9c..3bc52fe028 100644 --- a/lib/cu_cp/adapters/du_processor_adapters.h +++ b/lib/cu_cp/adapters/du_processor_adapters.h @@ -31,7 +31,7 @@ class du_processor_to_cu_cp_task_scheduler : public du_processor_ue_task_schedul void connect_cu_cp(ue_task_scheduler_manager& cu_cp_task_sched_) { cu_cp_task_sched = &cu_cp_task_sched_; } - void schedule_async_task(ue_index_t ue_index, async_task&& task) override + void schedule_async_task(ue_index_t ue_index, async_task task) override { srsran_assert(cu_cp_task_sched != nullptr, "CU-CP task scheduler handler must not be nullptr"); cu_cp_task_sched->handle_ue_async_task(ue_index, std::move(task)); diff --git a/lib/cu_cp/adapters/f1ap_adapters.h b/lib/cu_cp/adapters/f1ap_adapters.h index 019e49422a..f48bbaebfa 100644 --- a/lib/cu_cp/adapters/f1ap_adapters.h +++ b/lib/cu_cp/adapters/f1ap_adapters.h @@ -43,7 +43,7 @@ class f1ap_du_repository_adapter : public f1ap_du_management_notifier public: void connect_du_repository(cu_cp_f1c_handler& du_handler_) { du_handler = &du_handler_; } - void on_du_remove_request_received(const du_index_t du_index) override + void on_du_remove_request_received(du_index_t du_index) override { srsran_assert(du_handler != nullptr, "DU handler must not be nullptr"); du_handler->handle_du_remove_request(du_index); diff --git a/lib/cu_cp/du_processor/du_processor_impl.cpp b/lib/cu_cp/du_processor/du_processor_impl.cpp index e954d9b328..9543ba24b7 100644 --- a/lib/cu_cp/du_processor/du_processor_impl.cpp +++ b/lib/cu_cp/du_processor/du_processor_impl.cpp @@ -288,33 +288,6 @@ du_processor_impl::handle_ue_rrc_context_creation_request(const ue_rrc_context_c return response; } -ue_update_complete_message du_processor_impl::handle_ue_update_request(const ue_update_message& msg) -{ - du_ue* ue = ue_manager.find_du_ue(msg.ue_index); - srsran_assert(ue != nullptr, "ue={}: Could not find DU UE", msg.ue_index); - - ue_update_complete_message ue_update_complete_msg = {}; - - // Create RRC object if it doesn't already exist. - if (rrc_ue_adapters.find(ue->get_ue_index()) != rrc_ue_adapters.end()) { - if (!msg.cell_group_cfg.empty() && msg.c_rnti != rnti_t::INVALID_RNTI) { - if (!create_rrc_ue(*ue, msg.c_rnti, msg.cgi, msg.cell_group_cfg.copy(), {} /* no previous context */)) { - logger.warning("ue={}: Could not create RRC UE object", msg.ue_index); - return ue_update_complete_msg; - } - - rrc_ue_interface* rrc_ue = rrc->find_ue(msg.ue_index); - f1ap_rrc_ue_adapters.at(msg.ue_index) - .connect_rrc_ue(rrc_ue->get_ul_ccch_pdu_handler(), rrc_ue->get_ul_dcch_pdu_handler()); - ue_update_complete_msg.f1ap_rrc_notifier = &f1ap_rrc_ue_adapters.at(msg.ue_index); - } - } - - ue_update_complete_msg.ue_index = ue->get_ue_index(); - - return ue_update_complete_msg; -} - void du_processor_impl::handle_du_initiated_ue_context_release_request(const f1ap_ue_context_release_request& request) { srsran_assert(request.ue_index != ue_index_t::invalid, "Invalid UE index", request.ue_index); diff --git a/lib/cu_cp/du_processor/du_processor_impl.h b/lib/cu_cp/du_processor/du_processor_impl.h index 7c650537ec..8873d90c8f 100644 --- a/lib/cu_cp/du_processor/du_processor_impl.h +++ b/lib/cu_cp/du_processor/du_processor_impl.h @@ -60,7 +60,6 @@ class du_processor_impl : public du_processor_impl_interface, public du_setup_ha ue_rrc_context_creation_response handle_ue_rrc_context_creation_request(const ue_rrc_context_creation_request& req) override; void handle_du_initiated_ue_context_release_request(const f1ap_ue_context_release_request& request) override; - ue_update_complete_message handle_ue_update_request(const ue_update_message& msg) override; // du_processor_ue_context_notifier async_task diff --git a/lib/cu_cp/du_processor/du_processor_impl_interface.h b/lib/cu_cp/du_processor/du_processor_impl_interface.h index 48ef38c81a..d57f519840 100644 --- a/lib/cu_cp/du_processor/du_processor_impl_interface.h +++ b/lib/cu_cp/du_processor/du_processor_impl_interface.h @@ -51,9 +51,6 @@ class du_processor_f1ap_interface virtual ue_rrc_context_creation_response handle_ue_rrc_context_creation_request(const ue_rrc_context_creation_request& req) = 0; - /// \brief Update existing UE object. - virtual ue_update_complete_message handle_ue_update_request(const ue_update_message& msg) = 0; - /// \brief Handle the reception of a F1AP UE Context Release Request and notify NGAP. /// \param[in] req The F1AP UE Context Release Request. virtual void handle_du_initiated_ue_context_release_request(const f1ap_ue_context_release_request& request) = 0; @@ -324,13 +321,14 @@ class du_processor_f1ap_control_notifier }; /// \brief Schedules asynchronous tasks associated with an UE. -class du_processor_ue_task_scheduler : public f1ap_task_scheduler +class du_processor_ue_task_scheduler { public: - virtual ~du_processor_ue_task_scheduler() = default; - virtual void clear_pending_tasks(ue_index_t ue_index) = 0; - virtual unique_timer make_unique_timer() = 0; - virtual timer_manager& get_timer_manager() = 0; + virtual ~du_processor_ue_task_scheduler() = default; + virtual void schedule_async_task(ue_index_t ue_index, async_task task) = 0; + virtual void clear_pending_tasks(ue_index_t ue_index) = 0; + virtual unique_timer make_unique_timer() = 0; + virtual timer_manager& get_timer_manager() = 0; }; /// \brief Handles incoming task scheduling requests associated with an UE. diff --git a/tests/unittests/cu_cp/test_helpers.h b/tests/unittests/cu_cp/test_helpers.h index 8625e5686c..3d224fe287 100644 --- a/tests/unittests/cu_cp/test_helpers.h +++ b/tests/unittests/cu_cp/test_helpers.h @@ -41,10 +41,7 @@ struct dummy_du_processor_ue_task_scheduler : public du_processor_ue_task_schedu public: dummy_du_processor_ue_task_scheduler(timer_manager& timers_, task_executor& exec_) : timer_db(timers_), exec(exec_) {} - void schedule_async_task(ue_index_t ue_index, async_task&& task) override - { - ctrl_loop.schedule(std::move(task)); - } + void schedule_async_task(ue_index_t ue_index, async_task task) override { ctrl_loop.schedule(std::move(task)); } void clear_pending_tasks(ue_index_t ue_index) override { ctrl_loop.clear_pending_tasks(); } diff --git a/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h b/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h index 4451738895..15a2187e7d 100644 --- a/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h +++ b/tests/unittests/f1ap/cu_cp/f1ap_cu_test_helpers.h @@ -209,21 +209,6 @@ class dummy_f1ap_du_management_notifier : public f1ap_du_management_notifier cu_cp_f1c_handler* handler = nullptr; }; -class dummy_f1ap_task_scheduler : public f1ap_task_scheduler -{ -public: - void schedule_async_task(ue_index_t ue_index, async_task&& task) override - { - if (task_loop.count(ue_index) == 0) { - task_loop.insert(std::make_pair(ue_index, std::make_unique(128))); - } - task_loop.at(ue_index)->schedule(std::move(task)); - } - -private: - std::unordered_map> task_loop; -}; - /// \brief Creates a dummy UE CONTEXT SETUP REQUEST. f1ap_ue_context_setup_request create_ue_context_setup_request(const std::initializer_list& drbs_to_add); @@ -256,7 +241,6 @@ class f1ap_cu_test : public ::testing::Test dummy_f1ap_du_management_notifier f1ap_du_mgmt_notifier; dummy_f1ap_ue_removal_notifier f1ap_cu_cp_notifier; timer_manager timers; - dummy_f1ap_task_scheduler task_sched; manual_task_worker ctrl_worker{128}; std::unique_ptr f1ap; }; From 21253be35eb8d18ba603103ddc5cfde1b191efe2 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Thu, 15 Feb 2024 11:10:55 +0100 Subject: [PATCH 62/78] cu-cp: refactor f1ap ue context setup procedure --- lib/f1ap/cu_cp/f1ap_asn1_helpers.h | 309 ------------- .../procedures/ue_context_setup_procedure.cpp | 427 +++++++++++++++--- .../procedures/ue_context_setup_procedure.h | 15 +- .../cu_cp/ue_context/f1ap_cu_ue_context.h | 11 + 4 files changed, 377 insertions(+), 385 deletions(-) diff --git a/lib/f1ap/cu_cp/f1ap_asn1_helpers.h b/lib/f1ap/cu_cp/f1ap_asn1_helpers.h index 86f55fca24..4bed4daf55 100644 --- a/lib/f1ap/cu_cp/f1ap_asn1_helpers.h +++ b/lib/f1ap/cu_cp/f1ap_asn1_helpers.h @@ -25,315 +25,6 @@ namespace srsran { namespace srs_cu_cp { -/// \brief Convert the UE Context Setup Request from common type to ASN.1. -/// \param[out] asn1_request The ASN.1 struct to store the result. -/// \param[in] request The common type UE Context Setup Request. -inline void fill_asn1_ue_context_setup_request(asn1::f1ap::ue_context_setup_request_s& asn1_request, - const f1ap_ue_context_setup_request& request) -{ - // sp cell id - asn1_request->sp_cell_id = nr_cgi_to_f1ap_asn1(request.sp_cell_id); - - // serv cell idx - asn1_request->serv_cell_idx = request.serv_cell_idx; - - // sp cell ul cfg - if (request.sp_cell_ul_cfg.has_value()) { - asn1_request->sp_cell_ul_cfg = cell_ul_cfg_to_asn1(request.sp_cell_ul_cfg.value()); - } - - // cu to du rrc info - cu_to_du_rrc_info_to_asn1(asn1_request->cu_to_du_rrc_info, request.cu_to_du_rrc_info); - - // candidate sp cell list - if (!request.candidate_sp_cell_list.empty()) { - asn1_request->candidate_sp_cell_list_present = true; - for (const auto& candidate_cell_item : request.candidate_sp_cell_list) { - asn1::protocol_ie_single_container_s asn1_candidate_cell_item_container; - asn1_candidate_cell_item_container.load_info_obj(ASN1_F1AP_ID_CANDIDATE_SP_CELL_ITEM); - - auto& asn1_candidate_cell_item = asn1_candidate_cell_item_container.value().candidate_sp_cell_item(); - asn1_candidate_cell_item.candidate_sp_cell_id = nr_cgi_to_f1ap_asn1(candidate_cell_item.candidate_sp_cell_id); - - asn1_request->candidate_sp_cell_list.push_back(asn1_candidate_cell_item_container); - } - } - - // drx cycle - if (request.drx_cycle.has_value()) { - asn1_request->drx_cycle_present = true; - // long drx cycle len - asn1::number_to_enum(asn1_request->drx_cycle.long_drx_cycle_len, request.drx_cycle.value().long_drx_cycle_len); - - // short drx cycle len - if (request.drx_cycle.value().short_drx_cycle_len.has_value()) { - asn1_request->drx_cycle.short_drx_cycle_len_present = true; - asn1::number_to_enum(asn1_request->drx_cycle.short_drx_cycle_len, - request.drx_cycle.value().short_drx_cycle_len.value()); - } - - // short drx cycle timer - if (request.drx_cycle.value().short_drx_cycle_timer.has_value()) { - asn1_request->drx_cycle.short_drx_cycle_timer_present = true; - asn1_request->drx_cycle.short_drx_cycle_timer = request.drx_cycle.value().short_drx_cycle_timer.value(); - } - } - - // res coordination transfer container - if (!request.res_coordination_transfer_container.empty()) { - asn1_request->res_coordination_transfer_container_present = true; - asn1_request->res_coordination_transfer_container = request.res_coordination_transfer_container.copy(); - } - - // scell to be setup list - if (!request.scell_to_be_setup_list.empty()) { - asn1_request->scell_to_be_setup_list_present = true; - - for (const auto& scell_to_be_setup_item : request.scell_to_be_setup_list) { - asn1::protocol_ie_single_container_s - asn1_scell_to_be_setup_item_container; - asn1_scell_to_be_setup_item_container.load_info_obj(ASN1_F1AP_ID_SCELL_TO_BE_SETUP_ITEM); - - auto& asn1_scell_to_be_setup_item = asn1_scell_to_be_setup_item_container.value().scell_to_be_setup_item(); - - f1ap_scell_to_be_setup_mod_item_to_asn1(asn1_scell_to_be_setup_item, scell_to_be_setup_item); - asn1_request->scell_to_be_setup_list.push_back(asn1_scell_to_be_setup_item_container); - } - } - - // srbs to be setup list - if (!request.srbs_to_be_setup_list.empty()) { - asn1_request->srbs_to_be_setup_list_present = true; - - for (const auto& srbs_to_be_setup_item : request.srbs_to_be_setup_list) { - asn1::protocol_ie_single_container_s - asn1_srbs_to_be_setup_item_container; - asn1_srbs_to_be_setup_item_container.set_item(ASN1_F1AP_ID_SRBS_TO_BE_SETUP_ITEM); - auto& asn1_srbs_to_be_setup_item = asn1_srbs_to_be_setup_item_container.value().srbs_to_be_setup_item(); - - f1ap_srbs_to_be_setup_mod_item_to_asn1(asn1_srbs_to_be_setup_item, srbs_to_be_setup_item); - - asn1_request->srbs_to_be_setup_list.push_back(asn1_srbs_to_be_setup_item_container); - } - } - - // drbs to be setup list - if (!request.drbs_to_be_setup_list.empty()) { - asn1_request->drbs_to_be_setup_list_present = true; - - for (const auto& drb_to_be_setup_item : request.drbs_to_be_setup_list) { - asn1::protocol_ie_single_container_s asn1_drb_to_be_setup_item_container; - asn1_drb_to_be_setup_item_container.load_info_obj(ASN1_F1AP_ID_DRBS_TO_BE_SETUP_ITEM); - - f1ap_drbs_to_be_setup_mod_item_to_asn1(asn1_drb_to_be_setup_item_container.value().drbs_to_be_setup_item(), - drb_to_be_setup_item); - - asn1_request->drbs_to_be_setup_list.push_back(asn1_drb_to_be_setup_item_container); - } - } - - // inactivity monitoring request - if (request.inactivity_monitoring_request.has_value()) { - asn1_request->inactivity_monitoring_request_present = true; - asn1::bool_to_enum(asn1_request->inactivity_monitoring_request, request.inactivity_monitoring_request.value()); - } - - // rat freq prio info - if (request.rat_freq_prio_info.has_value()) { - asn1_request->rat_freq_prio_info_present = true; - asn1_request->rat_freq_prio_info = f1ap_rat_freq_prio_info_to_asn1(request.rat_freq_prio_info.value()); - } - - // rrc container - if (!request.rrc_container.empty()) { - asn1_request->rrc_container_present = true; - asn1_request->rrc_container = request.rrc_container.copy(); - } - - // masked imeisv - if (request.masked_imeisv.has_value()) { - asn1_request->masked_imeisv_present = true; - asn1_request->masked_imeisv.from_number(request.masked_imeisv.value()); - } - - // serving plmn - if (request.serving_plmn.has_value()) { - asn1_request->serving_plmn_present = true; - asn1_request->serving_plmn.from_string(request.serving_plmn.value()); - } - - // gnb du ue ambr ul - if (request.gnb_du_ue_ambr_ul.has_value()) { - asn1_request->gnb_du_ue_ambr_ul_present = true; - asn1_request->gnb_du_ue_ambr_ul = request.gnb_du_ue_ambr_ul.value(); - } - - // rrc delivery status request - if (request.rrc_delivery_status_request.has_value()) { - asn1_request->rrc_delivery_status_request_present = true; - asn1::bool_to_enum(asn1_request->rrc_delivery_status_request, request.rrc_delivery_status_request.value()); - } - - // res coordination transfer info - if (request.res_coordination_transfer_info.has_value()) { - asn1_request->res_coordination_transfer_info_present = true; - asn1_request->res_coordination_transfer_info.res_coordination_eutra_cell_info_present = false; - asn1_request->res_coordination_transfer_info.m_enb_cell_id.from_number( - request.res_coordination_transfer_info.value().m_enb_cell_id); - } - - // serving cell mo - if (request.serving_cell_mo.has_value()) { - asn1_request->serving_cell_mo_present = true; - asn1_request->serving_cell_mo = request.serving_cell_mo.value(); - } - - // new gnb cu ue f1ap id - if (request.new_gnb_cu_ue_f1ap_id.has_value()) { - asn1_request->new_gnb_cu_ue_f1ap_id_present = true; - asn1_request->new_gnb_cu_ue_f1ap_id = gnb_cu_ue_f1ap_id_to_uint(request.new_gnb_cu_ue_f1ap_id.value()); - } - - // ran ue id - if (request.ran_ue_id.has_value()) { - asn1_request->ran_ue_id_present = true; - asn1_request->ran_ue_id.from_number(ran_ue_id_to_uint(request.ran_ue_id.value())); - } -} - -/// \brief Convert the UE Context Setup Response from ASN.1 to common type. -/// \param[out] response The common type struct to store the result. -/// \param[in] asn1_response The ASN.1 UE Context Setup Response. - -inline void fill_f1ap_ue_context_setup_response(f1ap_ue_context_setup_response& response, - ue_index_t ue_index, - const asn1::f1ap::ue_context_setup_resp_s& asn1_response) -{ - response.success = true; - response.ue_index = ue_index; - - // du to cu rrc info - response.du_to_cu_rrc_info.cell_group_cfg = asn1_response->du_to_cu_rrc_info.cell_group_cfg.copy(); - response.du_to_cu_rrc_info.meas_gap_cfg = asn1_response->du_to_cu_rrc_info.meas_gap_cfg.copy(); - response.du_to_cu_rrc_info.requested_p_max_fr1 = asn1_response->du_to_cu_rrc_info.requested_p_max_fr1.copy(); - - // c rnti - if (asn1_response->c_rnti_present) { - response.c_rnti = to_rnti(asn1_response->c_rnti); - } - - // res coordination transfer container - if (asn1_response->res_coordination_transfer_container_present) { - response.res_coordination_transfer_container = asn1_response->res_coordination_transfer_container.copy(); - } - - // full cfg - if (asn1_response->full_cfg_present) { - response.full_cfg = asn1::enum_to_bool(asn1_response->full_cfg); - } - - // drbs setup list - if (asn1_response->drbs_setup_list_present) { - for (auto asn1_drbs_setup_list_item : asn1_response->drbs_setup_list) { - auto& asn1_drb_mod_item = asn1_drbs_setup_list_item.value().drbs_setup_item(); - - f1ap_drbs_setup_mod_item drb_setup_item = asn1_to_f1ap_drbs_setup_mod_item(asn1_drb_mod_item); - - response.drbs_setup_list.emplace(drb_setup_item.drb_id, drb_setup_item); - } - } - - // srbs failed to be setup list - if (asn1_response->srbs_failed_to_be_setup_list_present) { - for (auto asn1_srbs_failed_setup_list_item : asn1_response->srbs_failed_to_be_setup_list) { - auto& asn1_srb_failed_item = asn1_srbs_failed_setup_list_item.value().srbs_failed_to_be_setup_item(); - - f1ap_srbs_failed_to_be_setup_mod_item srb_failed_item = - asn1_to_f1ap_srbs_failed_to_be_setup_mod_item(asn1_srb_failed_item); - - response.srbs_failed_to_be_setup_list.emplace(srb_failed_item.srb_id, srb_failed_item); - } - } - - // drbs failed to be setup list - if (asn1_response->drbs_failed_to_be_setup_list_present) { - for (auto asn1_drbs_failed_setup_list_item : asn1_response->drbs_failed_to_be_setup_list) { - auto& asn1_drb_failed_item = asn1_drbs_failed_setup_list_item.value().drbs_failed_to_be_setup_item(); - - f1ap_drbs_failed_to_be_setup_mod_item drb_failed_item = - asn1_to_f1ap_drbs_failed_to_be_setup_mod_item(asn1_drb_failed_item); - - response.drbs_failed_to_be_setup_list.emplace(drb_failed_item.drb_id, drb_failed_item); - } - } - - // scell failed to setup list - if (asn1_response->scell_failedto_setup_list_present) { - for (const auto& asn1_scell_failed_to_setup_item : asn1_response->scell_failedto_setup_list) { - f1ap_scell_failed_to_setup_mod_item scell_failed_to_setup_item; - - // scell id - scell_failed_to_setup_item.scell_id = - f1ap_asn1_to_nr_cgi(asn1_scell_failed_to_setup_item->scell_failedto_setup_item().scell_id); - - // cause - if (asn1_scell_failed_to_setup_item->scell_failedto_setup_item().cause_present) { - scell_failed_to_setup_item.cause = - f1ap_asn1_to_cause(asn1_scell_failed_to_setup_item->scell_failedto_setup_item().cause); - } - - response.scell_failed_to_setup_list.push_back(scell_failed_to_setup_item); - } - } - - // Add inactivity monitoring response - if (asn1_response->inactivity_monitoring_resp_present) { - bool inactivity_monitoring_resp = asn1::enum_to_bool(asn1_response->inactivity_monitoring_resp); - response.inactivity_monitoring_resp = inactivity_monitoring_resp; - } - - // srbs setup list - if (asn1_response->srbs_setup_list_present) { - for (auto asn1_srbs_setup_list_item : asn1_response->srbs_setup_list) { - auto& asn1_srbs_setup_item = asn1_srbs_setup_list_item.value().srbs_setup_item(); - - f1ap_srbs_setup_mod_item srbs_setup_item = asn1_to_f1ap_srbs_setup_mod_item(asn1_srbs_setup_item); - - response.srbs_setup_list.emplace(srbs_setup_item.srb_id, srbs_setup_item); - } - } -} - -/// \brief Convert the UE Context Setup Response from ASN.1 to common type. -/// \param[out] response The common type struct to store the result. -/// \param[in] asn1_failure The ASN.1 UE Context Setup Failure. - -inline void fill_f1ap_ue_context_setup_response(f1ap_ue_context_setup_response& response, - const asn1::f1ap::ue_context_setup_fail_s& asn1_failure) -{ - response.success = false; - - // cause - response.cause = f1ap_asn1_to_cause(asn1_failure->cause); - - // potential sp cell list - if (asn1_failure->potential_sp_cell_list_present) { - f1ap_potential_sp_cell_item potential_sp_cell_item; - - for (const auto& asn1_potential_sp_cell_item : asn1_failure->potential_sp_cell_list) { - potential_sp_cell_item.potential_sp_cell_id = - f1ap_asn1_to_nr_cgi(asn1_potential_sp_cell_item->potential_sp_cell_item().potential_sp_cell_id); - - response.potential_sp_cell_list.push_back(potential_sp_cell_item); - } - } - - // crit diagnostics - if (asn1_failure->crit_diagnostics_present) { - // TODO: Add crit diagnostics - } -} - /// \brief Convert the UE Context Modification Request from common type to ASN.1. /// \param[out] asn1_request The ASN.1 struct to store the result. /// \param[in] request The common type UE Context Modification Request. diff --git a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp index 1a154ef732..ef221d9c3c 100644 --- a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp +++ b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp @@ -9,14 +9,319 @@ */ #include "ue_context_setup_procedure.h" -#include "../f1ap_asn1_helpers.h" -#include "cu_cp/ue_context/f1ap_ue_logger.h" +#include "../f1ap_asn1_converters.h" #include "srsran/f1ap/common/f1ap_message.h" using namespace srsran; using namespace srsran::srs_cu_cp; using namespace asn1::f1ap; +/// \brief Convert the UE Context Setup Request from common type to ASN.1. +/// \param[out] asn1_request The ASN.1 struct to store the result. +/// \param[in] request The common type UE Context Setup Request. +static void fill_asn1_ue_context_setup_request(asn1::f1ap::ue_context_setup_request_s& asn1_request, + const f1ap_ue_context_setup_request& request, + const f1ap_ue_ids& ue_ids) +{ + asn1_request->gnb_cu_ue_f1ap_id = gnb_cu_ue_f1ap_id_to_uint(ue_ids.cu_ue_f1ap_id); + + asn1_request->gnb_du_ue_f1ap_id_present = ue_ids.du_ue_f1ap_id != gnb_du_ue_f1ap_id_t::invalid; + if (asn1_request->gnb_du_ue_f1ap_id_present) { + asn1_request->gnb_du_ue_f1ap_id = gnb_du_ue_f1ap_id_to_uint(ue_ids.du_ue_f1ap_id); + } + + asn1_request->sp_cell_id = nr_cgi_to_f1ap_asn1(request.sp_cell_id); + asn1_request->serv_cell_idx = request.serv_cell_idx; + + // sp cell ul cfg + if (request.sp_cell_ul_cfg.has_value()) { + asn1_request->sp_cell_ul_cfg = cell_ul_cfg_to_asn1(request.sp_cell_ul_cfg.value()); + } + + // cu to du rrc info + cu_to_du_rrc_info_to_asn1(asn1_request->cu_to_du_rrc_info, request.cu_to_du_rrc_info); + + // candidate sp cell list + if (!request.candidate_sp_cell_list.empty()) { + asn1_request->candidate_sp_cell_list_present = true; + for (const auto& candidate_cell_item : request.candidate_sp_cell_list) { + asn1::protocol_ie_single_container_s asn1_candidate_cell_item_container; + asn1_candidate_cell_item_container.load_info_obj(ASN1_F1AP_ID_CANDIDATE_SP_CELL_ITEM); + + auto& asn1_candidate_cell_item = asn1_candidate_cell_item_container.value().candidate_sp_cell_item(); + asn1_candidate_cell_item.candidate_sp_cell_id = nr_cgi_to_f1ap_asn1(candidate_cell_item.candidate_sp_cell_id); + + asn1_request->candidate_sp_cell_list.push_back(asn1_candidate_cell_item_container); + } + } + + // drx cycle + if (request.drx_cycle.has_value()) { + asn1_request->drx_cycle_present = true; + // long drx cycle len + asn1::number_to_enum(asn1_request->drx_cycle.long_drx_cycle_len, request.drx_cycle.value().long_drx_cycle_len); + + // short drx cycle len + if (request.drx_cycle.value().short_drx_cycle_len.has_value()) { + asn1_request->drx_cycle.short_drx_cycle_len_present = true; + asn1::number_to_enum(asn1_request->drx_cycle.short_drx_cycle_len, + request.drx_cycle.value().short_drx_cycle_len.value()); + } + + // short drx cycle timer + if (request.drx_cycle.value().short_drx_cycle_timer.has_value()) { + asn1_request->drx_cycle.short_drx_cycle_timer_present = true; + asn1_request->drx_cycle.short_drx_cycle_timer = request.drx_cycle.value().short_drx_cycle_timer.value(); + } + } + + // res coordination transfer container + if (!request.res_coordination_transfer_container.empty()) { + asn1_request->res_coordination_transfer_container_present = true; + asn1_request->res_coordination_transfer_container = request.res_coordination_transfer_container.copy(); + } + + // scell to be setup list + if (!request.scell_to_be_setup_list.empty()) { + asn1_request->scell_to_be_setup_list_present = true; + + for (const auto& scell_to_be_setup_item : request.scell_to_be_setup_list) { + asn1::protocol_ie_single_container_s + asn1_scell_to_be_setup_item_container; + asn1_scell_to_be_setup_item_container.load_info_obj(ASN1_F1AP_ID_SCELL_TO_BE_SETUP_ITEM); + + auto& asn1_scell_to_be_setup_item = asn1_scell_to_be_setup_item_container.value().scell_to_be_setup_item(); + + f1ap_scell_to_be_setup_mod_item_to_asn1(asn1_scell_to_be_setup_item, scell_to_be_setup_item); + asn1_request->scell_to_be_setup_list.push_back(asn1_scell_to_be_setup_item_container); + } + } + + // srbs to be setup list + if (!request.srbs_to_be_setup_list.empty()) { + asn1_request->srbs_to_be_setup_list_present = true; + + for (const auto& srbs_to_be_setup_item : request.srbs_to_be_setup_list) { + asn1::protocol_ie_single_container_s + asn1_srbs_to_be_setup_item_container; + asn1_srbs_to_be_setup_item_container.set_item(ASN1_F1AP_ID_SRBS_TO_BE_SETUP_ITEM); + auto& asn1_srbs_to_be_setup_item = asn1_srbs_to_be_setup_item_container.value().srbs_to_be_setup_item(); + + f1ap_srbs_to_be_setup_mod_item_to_asn1(asn1_srbs_to_be_setup_item, srbs_to_be_setup_item); + + asn1_request->srbs_to_be_setup_list.push_back(asn1_srbs_to_be_setup_item_container); + } + } + + // drbs to be setup list + if (!request.drbs_to_be_setup_list.empty()) { + asn1_request->drbs_to_be_setup_list_present = true; + + for (const auto& drb_to_be_setup_item : request.drbs_to_be_setup_list) { + asn1::protocol_ie_single_container_s asn1_drb_to_be_setup_item_container; + asn1_drb_to_be_setup_item_container.load_info_obj(ASN1_F1AP_ID_DRBS_TO_BE_SETUP_ITEM); + + f1ap_drbs_to_be_setup_mod_item_to_asn1(asn1_drb_to_be_setup_item_container.value().drbs_to_be_setup_item(), + drb_to_be_setup_item); + + asn1_request->drbs_to_be_setup_list.push_back(asn1_drb_to_be_setup_item_container); + } + } + + // inactivity monitoring request + if (request.inactivity_monitoring_request.has_value()) { + asn1_request->inactivity_monitoring_request_present = true; + asn1::bool_to_enum(asn1_request->inactivity_monitoring_request, request.inactivity_monitoring_request.value()); + } + + // rat freq prio info + if (request.rat_freq_prio_info.has_value()) { + asn1_request->rat_freq_prio_info_present = true; + asn1_request->rat_freq_prio_info = f1ap_rat_freq_prio_info_to_asn1(request.rat_freq_prio_info.value()); + } + + // rrc container + if (!request.rrc_container.empty()) { + asn1_request->rrc_container_present = true; + asn1_request->rrc_container = request.rrc_container.copy(); + } + + // masked imeisv + if (request.masked_imeisv.has_value()) { + asn1_request->masked_imeisv_present = true; + asn1_request->masked_imeisv.from_number(request.masked_imeisv.value()); + } + + // serving plmn + if (request.serving_plmn.has_value()) { + asn1_request->serving_plmn_present = true; + asn1_request->serving_plmn.from_string(request.serving_plmn.value()); + } + + // gnb du ue ambr ul + if (request.gnb_du_ue_ambr_ul.has_value()) { + asn1_request->gnb_du_ue_ambr_ul_present = true; + asn1_request->gnb_du_ue_ambr_ul = request.gnb_du_ue_ambr_ul.value(); + } + + // rrc delivery status request + if (request.rrc_delivery_status_request.has_value()) { + asn1_request->rrc_delivery_status_request_present = true; + asn1::bool_to_enum(asn1_request->rrc_delivery_status_request, request.rrc_delivery_status_request.value()); + } + + // res coordination transfer info + if (request.res_coordination_transfer_info.has_value()) { + asn1_request->res_coordination_transfer_info_present = true; + asn1_request->res_coordination_transfer_info.res_coordination_eutra_cell_info_present = false; + asn1_request->res_coordination_transfer_info.m_enb_cell_id.from_number( + request.res_coordination_transfer_info.value().m_enb_cell_id); + } + + // serving cell mo + if (request.serving_cell_mo.has_value()) { + asn1_request->serving_cell_mo_present = true; + asn1_request->serving_cell_mo = request.serving_cell_mo.value(); + } + + // new gnb cu ue f1ap id + if (request.new_gnb_cu_ue_f1ap_id.has_value()) { + asn1_request->new_gnb_cu_ue_f1ap_id_present = true; + asn1_request->new_gnb_cu_ue_f1ap_id = gnb_cu_ue_f1ap_id_to_uint(request.new_gnb_cu_ue_f1ap_id.value()); + } + + // ran ue id + if (request.ran_ue_id.has_value()) { + asn1_request->ran_ue_id_present = true; + asn1_request->ran_ue_id.from_number(ran_ue_id_to_uint(request.ran_ue_id.value())); + } +} + +static void fill_f1ap_ue_context_setup_response(f1ap_ue_context_setup_response& response, + ue_index_t ue_index, + const asn1::f1ap::ue_context_setup_fail_s& asn1_failure) +{ + response.success = false; + response.ue_index = ue_index; + + // cause + response.cause = f1ap_asn1_to_cause(asn1_failure->cause); + + // potential sp cell list + if (asn1_failure->potential_sp_cell_list_present) { + f1ap_potential_sp_cell_item potential_sp_cell_item; + + for (const auto& asn1_potential_sp_cell_item : asn1_failure->potential_sp_cell_list) { + potential_sp_cell_item.potential_sp_cell_id = + f1ap_asn1_to_nr_cgi(asn1_potential_sp_cell_item->potential_sp_cell_item().potential_sp_cell_id); + + response.potential_sp_cell_list.push_back(potential_sp_cell_item); + } + } +} + +/// \brief Convert the UE Context Setup Response from ASN.1 to common type. +/// \param[out] response The common type struct to store the result. +/// \param[in] asn1_response The ASN.1 UE Context Setup Response. +static void fill_f1ap_ue_context_setup_response(f1ap_ue_context_setup_response& response, + ue_index_t ue_index, + const asn1::f1ap::ue_context_setup_resp_s& asn1_response) +{ + response.success = true; + response.ue_index = ue_index; + + // du to cu rrc info + response.du_to_cu_rrc_info.cell_group_cfg = asn1_response->du_to_cu_rrc_info.cell_group_cfg.copy(); + response.du_to_cu_rrc_info.meas_gap_cfg = asn1_response->du_to_cu_rrc_info.meas_gap_cfg.copy(); + response.du_to_cu_rrc_info.requested_p_max_fr1 = asn1_response->du_to_cu_rrc_info.requested_p_max_fr1.copy(); + + // c rnti + if (asn1_response->c_rnti_present) { + response.c_rnti = to_rnti(asn1_response->c_rnti); + } + + // res coordination transfer container + if (asn1_response->res_coordination_transfer_container_present) { + response.res_coordination_transfer_container = asn1_response->res_coordination_transfer_container.copy(); + } + + // full cfg + if (asn1_response->full_cfg_present) { + response.full_cfg = asn1::enum_to_bool(asn1_response->full_cfg); + } + + // drbs setup list + if (asn1_response->drbs_setup_list_present) { + for (auto asn1_drbs_setup_list_item : asn1_response->drbs_setup_list) { + auto& asn1_drb_mod_item = asn1_drbs_setup_list_item.value().drbs_setup_item(); + + f1ap_drbs_setup_mod_item drb_setup_item = asn1_to_f1ap_drbs_setup_mod_item(asn1_drb_mod_item); + + response.drbs_setup_list.emplace(drb_setup_item.drb_id, drb_setup_item); + } + } + + // srbs failed to be setup list + if (asn1_response->srbs_failed_to_be_setup_list_present) { + for (auto asn1_srbs_failed_setup_list_item : asn1_response->srbs_failed_to_be_setup_list) { + auto& asn1_srb_failed_item = asn1_srbs_failed_setup_list_item.value().srbs_failed_to_be_setup_item(); + + f1ap_srbs_failed_to_be_setup_mod_item srb_failed_item = + asn1_to_f1ap_srbs_failed_to_be_setup_mod_item(asn1_srb_failed_item); + + response.srbs_failed_to_be_setup_list.emplace(srb_failed_item.srb_id, srb_failed_item); + } + } + + // drbs failed to be setup list + if (asn1_response->drbs_failed_to_be_setup_list_present) { + for (auto asn1_drbs_failed_setup_list_item : asn1_response->drbs_failed_to_be_setup_list) { + auto& asn1_drb_failed_item = asn1_drbs_failed_setup_list_item.value().drbs_failed_to_be_setup_item(); + + f1ap_drbs_failed_to_be_setup_mod_item drb_failed_item = + asn1_to_f1ap_drbs_failed_to_be_setup_mod_item(asn1_drb_failed_item); + + response.drbs_failed_to_be_setup_list.emplace(drb_failed_item.drb_id, drb_failed_item); + } + } + + // scell failed to setup list + if (asn1_response->scell_failedto_setup_list_present) { + for (const auto& asn1_scell_failed_to_setup_item : asn1_response->scell_failedto_setup_list) { + f1ap_scell_failed_to_setup_mod_item scell_failed_to_setup_item; + + // scell id + scell_failed_to_setup_item.scell_id = + f1ap_asn1_to_nr_cgi(asn1_scell_failed_to_setup_item->scell_failedto_setup_item().scell_id); + + // cause + if (asn1_scell_failed_to_setup_item->scell_failedto_setup_item().cause_present) { + scell_failed_to_setup_item.cause = + f1ap_asn1_to_cause(asn1_scell_failed_to_setup_item->scell_failedto_setup_item().cause); + } + + response.scell_failed_to_setup_list.push_back(scell_failed_to_setup_item); + } + } + + // Add inactivity monitoring response + if (asn1_response->inactivity_monitoring_resp_present) { + bool inactivity_monitoring_resp = asn1::enum_to_bool(asn1_response->inactivity_monitoring_resp); + response.inactivity_monitoring_resp = inactivity_monitoring_resp; + } + + // srbs setup list + if (asn1_response->srbs_setup_list_present) { + for (auto asn1_srbs_setup_list_item : asn1_response->srbs_setup_list) { + auto& asn1_srbs_setup_item = asn1_srbs_setup_list_item.value().srbs_setup_item(); + + f1ap_srbs_setup_mod_item srbs_setup_item = asn1_to_f1ap_srbs_setup_mod_item(asn1_srbs_setup_item); + + response.srbs_setup_list.emplace(srbs_setup_item.srb_id, srbs_setup_item); + } + } +} + ue_context_setup_procedure::ue_context_setup_procedure(const f1ap_ue_context_setup_request& request_, f1ap_ue_context_list& ue_ctxt_list_, f1ap_du_processor_notifier& du_processor_notifier_, @@ -37,20 +342,15 @@ void ue_context_setup_procedure::operator()(coro_contextev_mng.context_setup_outcome); // Send command to DU. send_ue_context_setup_request(); @@ -58,42 +358,30 @@ void ue_context_setup_procedure::operator()(coro_contextue_ids, name()}); + return true; } + // F1AP UE context does not yet exist. + // Allocate gNB-CU-UE-F1AP-ID. gnb_cu_ue_f1ap_id_t tmp_cu_ue_f1ap_id = ue_ctxt_list.next_gnb_cu_ue_f1ap_id(); if (tmp_cu_ue_f1ap_id == gnb_cu_ue_f1ap_id_t::invalid) { - logger.warning("No CU UE F1AP ID available"); + logger.warning("ue={} proc=\"{}\": No CU UE F1AP ID available", request.ue_index, name()); return false; } - // Create UE context and store it. - f1ap_ue_context& ue_ctxt = ue_ctxt_list.add_ue(request.ue_index, tmp_cu_ue_f1ap_id); - logger.debug("{}: UE successfully created.", f1ap_ue_log_prefix{ue_ctxt.ue_ids, name()}); - - // Store identifiers. - new_cu_ue_f1ap_id = tmp_cu_ue_f1ap_id; - new_ue_index = ue_ctxt.ue_ids.ue_index; + // Create F1AP UE context. + ue_ctxt = &ue_ctxt_list.add_ue(request.ue_index, tmp_cu_ue_f1ap_id); + logger.info("{}: UE successfully created.", f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}); return true; } @@ -139,9 +427,7 @@ void ue_context_setup_procedure::send_ue_context_setup_request() ue_context_setup_request_s& req = f1ap_ue_ctxt_setup_request_msg.pdu.init_msg().value.ue_context_setup_request(); // Convert common type to asn1 - fill_asn1_ue_context_setup_request(req, request); - - req->gnb_cu_ue_f1ap_id = gnb_cu_ue_f1ap_id_to_uint(new_cu_ue_f1ap_id); + fill_asn1_ue_context_setup_request(req, request, ue_ctxt->ue_ids); if (logger.debug.enabled()) { asn1::json_writer js; @@ -153,39 +439,50 @@ void ue_context_setup_procedure::send_ue_context_setup_request() f1ap_notifier.on_new_message(f1ap_ue_ctxt_setup_request_msg); } -void ue_context_setup_procedure::create_ue_context_setup_result() +f1ap_ue_context_setup_response ue_context_setup_procedure::handle_procedure_result() { - if (new_cu_ue_f1ap_id == gnb_cu_ue_f1ap_id_t::invalid || new_ue_index == ue_index_t::invalid) { - response.success = false; - logger.warning("\"{}\" failed", name()); - return; - } + f1ap_ue_context_setup_response resp; + resp.ue_index = request.ue_index; + resp.success = false; - srsran_assert(ue_ctxt_list.contains(new_cu_ue_f1ap_id), "UE context must exist at this point"); + if (ue_ctxt == nullptr) { + logger.warning("ue={} proc=\"{}\" failed", request.ue_index, name()); + return resp; + } if (transaction_sink.successful()) { - logger.debug("Received UeContextSetupResponse"); + const auto& asn1_resp = transaction_sink.response(); - // Set gNB DU F1AP ID. - f1ap_ue_context& ue_ctxt = ue_ctxt_list[new_cu_ue_f1ap_id]; - ue_ctxt.ue_ids.du_ue_f1ap_id = int_to_gnb_du_ue_f1ap_id(transaction_sink.response()->gnb_du_ue_f1ap_id); - logger.debug("ue={} cu_ue_f1ap_id={}, du_ue_f1ap_id={}: Updated UE context", - ue_ctxt.ue_ids.ue_index, - ue_ctxt.ue_ids.cu_ue_f1ap_id, - ue_ctxt.ue_ids.du_ue_f1ap_id); + // Update gNB DU F1AP ID in F1AP UE context. + ue_ctxt->ue_ids.du_ue_f1ap_id = int_to_gnb_du_ue_f1ap_id(asn1_resp->gnb_du_ue_f1ap_id); + logger.debug("{}: Updated UE gNB-DU-UE-ID", f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}); - // Prepare procedure response. - fill_f1ap_ue_context_setup_response(response, new_ue_index, transaction_sink.response()); + // Fill response to the UE context setup procedure. + fill_f1ap_ue_context_setup_response(resp, request.ue_index, transaction_sink.response()); // Create UE RRC context in CU-CP, if required. - response.success = create_ue_rrc_context(response); + resp.success = create_ue_rrc_context(resp); + + return resp; + } + + // Procedure failed. + + if (transaction_sink.failed()) { + logger.warning("{}: Procedure failed. Cause: {}", + f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}, + get_cause_str(transaction_sink.failure()->cause)); + + // Fill response to the UE context setup procedure. + fill_f1ap_ue_context_setup_response(resp, request.ue_index, transaction_sink.failure()); - } else if (transaction_sink.failed()) { - logger.debug("Received UeContextSetupFailure cause={}", get_cause_str(transaction_sink.failure()->cause)); - fill_f1ap_ue_context_setup_response(response, transaction_sink.failure()); - response.success = false; } else { - logger.warning("UeContextSetup timeout"); - response.success = false; + logger.warning("{}: Procedure failed. Cause: Timeout reached while waiting for DU response.", + f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}); } + + // Delete created F1AP UE context. + ue_ctxt_list.remove_ue(request.ue_index); + + return resp; } diff --git a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.h b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.h index 0c6912ac01..8900a32838 100644 --- a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.h +++ b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.h @@ -35,8 +35,7 @@ class ue_context_setup_procedure static const char* name() { return "UE Context Setup Procedure"; } private: - /// Allocate F1AP CU UE ID. - bool allocate_cu_ue_id(); + bool find_or_create_f1ap_ue_context(); bool create_ue_rrc_context(const f1ap_ue_context_setup_response& ue_ctxt_setup_resp); @@ -44,10 +43,7 @@ class ue_context_setup_procedure void send_ue_context_setup_request(); /// Creates procedure result to send back to procedure caller. - void create_ue_context_setup_result(); - - /// Deletes UE context in CU-CP and removes F1AP UE context. - void delete_ue_context(gnb_cu_ue_f1ap_id_t cu_ue_f1ap_id); + f1ap_ue_context_setup_response handle_procedure_result(); const f1ap_ue_context_setup_request request; f1ap_ue_context_list& ue_ctxt_list; @@ -56,11 +52,8 @@ class ue_context_setup_procedure srslog::basic_logger& logger; optional rrc_context; // Initialize new RRC with existing context. - // The CU-allocated identifiers of the new UE (only valid if the DU response is positive). - gnb_cu_ue_f1ap_id_t new_cu_ue_f1ap_id = gnb_cu_ue_f1ap_id_t::invalid; - ue_index_t new_ue_index = ue_index_t::invalid; - - f1ap_ue_context_setup_response response; + // Context of the created UE. + f1ap_ue_context* ue_ctxt = nullptr; protocol_transaction_outcome_observer transaction_sink; diff --git a/lib/f1ap/cu_cp/ue_context/f1ap_cu_ue_context.h b/lib/f1ap/cu_cp/ue_context/f1ap_cu_ue_context.h index 04678a39ba..10964f7f7b 100644 --- a/lib/f1ap/cu_cp/ue_context/f1ap_cu_ue_context.h +++ b/lib/f1ap/cu_cp/ue_context/f1ap_cu_ue_context.h @@ -80,6 +80,17 @@ class f1ap_ue_context_list return it != ues.end() ? &it->second : nullptr; } + const f1ap_ue_context* find(ue_index_t ue_idx) const + { + auto it = ue_index_to_ue_f1ap_id.find(ue_idx); + return it != ue_index_to_ue_f1ap_id.end() ? &ues.at(it->second) : nullptr; + } + f1ap_ue_context* find(ue_index_t ue_idx) + { + auto it = ue_index_to_ue_f1ap_id.find(ue_idx); + return it != ue_index_to_ue_f1ap_id.end() ? &ues.at(it->second) : nullptr; + } + f1ap_ue_context& add_ue(ue_index_t ue_index, gnb_cu_ue_f1ap_id_t cu_ue_id) { srsran_assert(ue_index != ue_index_t::invalid, "Invalid ue_index={}", ue_index); From 3546fa15694f8d2ad9f03cd2d2117976342584ac Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Thu, 15 Feb 2024 15:56:50 +0100 Subject: [PATCH 63/78] f1ap-cu: move functions to end of file --- .../du_processor_impl_interface.h | 4 +- .../procedures/ue_context_setup_procedure.cpp | 355 +++++++++--------- 2 files changed, 189 insertions(+), 170 deletions(-) diff --git a/lib/cu_cp/du_processor/du_processor_impl_interface.h b/lib/cu_cp/du_processor/du_processor_impl_interface.h index d57f519840..086a8a76ef 100644 --- a/lib/cu_cp/du_processor/du_processor_impl_interface.h +++ b/lib/cu_cp/du_processor/du_processor_impl_interface.h @@ -46,8 +46,8 @@ class du_processor_f1ap_interface /// \brief Request to create a new UE RRC context. /// /// This method should be called when a C-RNTI and PCell are assigned to a UE. - /// \param req - /// \return + /// \param req Request to setup a new UE RRC context. + /// \return Response to whether the request was successful or failed. virtual ue_rrc_context_creation_response handle_ue_rrc_context_creation_request(const ue_rrc_context_creation_request& req) = 0; diff --git a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp index ef221d9c3c..e326537f31 100644 --- a/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp +++ b/lib/f1ap/cu_cp/procedures/ue_context_setup_procedure.cpp @@ -19,6 +19,193 @@ using namespace asn1::f1ap; /// \brief Convert the UE Context Setup Request from common type to ASN.1. /// \param[out] asn1_request The ASN.1 struct to store the result. /// \param[in] request The common type UE Context Setup Request. +static void fill_asn1_ue_context_setup_request(asn1::f1ap::ue_context_setup_request_s& asn1_request, + const f1ap_ue_context_setup_request& request, + const f1ap_ue_ids& ue_ids); + +/// \brief Convert the UE Context Setup Failure from ASN.1 to common type. +/// \param[in] response The common type UE Context Setup Response. +/// \param[in] ue_index UE index. +/// \param[in] asn1_failure The ASN.1 struct to convert. +static void fill_f1ap_ue_context_setup_response(f1ap_ue_context_setup_response& response, + ue_index_t ue_index, + const asn1::f1ap::ue_context_setup_fail_s& asn1_failure); + +/// \brief Convert the UE Context Setup Response from ASN.1 to common type. +/// \param[out] response The common type struct to store the result. +/// \param[in] ue_index UE index. +/// \param[in] asn1_response The ASN.1 UE Context Setup Response. +static void fill_f1ap_ue_context_setup_response(f1ap_ue_context_setup_response& response, + ue_index_t ue_index, + const asn1::f1ap::ue_context_setup_resp_s& asn1_response); + +// ---- UE Context Setup Procedure ---- + +ue_context_setup_procedure::ue_context_setup_procedure(const f1ap_ue_context_setup_request& request_, + f1ap_ue_context_list& ue_ctxt_list_, + f1ap_du_processor_notifier& du_processor_notifier_, + f1ap_message_notifier& f1ap_notif_, + srslog::basic_logger& logger_, + optional rrc_context_) : + request(request_), + ue_ctxt_list(ue_ctxt_list_), + du_processor_notifier(du_processor_notifier_), + f1ap_notifier(f1ap_notif_), + logger(logger_), + rrc_context(rrc_context_) +{ + srsran_assert(request.ue_index != ue_index_t::invalid, "UE index of F1AP UeContextSetupRequest must not be invalid"); +} + +void ue_context_setup_procedure::operator()(coro_context>& ctx) +{ + CORO_BEGIN(ctx); + + logger.debug("ue={} proc=\"{}\": started...", request.ue_index, name()); + + // Create F1AP UE context if it doesn't exist. + if (not find_or_create_f1ap_ue_context()) { + CORO_EARLY_RETURN(handle_procedure_result()); + } + + // Subscribe to respective publisher to receive UE CONTEXT SETUP RESPONSE/FAILURE message. + transaction_sink.subscribe_to(ue_ctxt->ev_mng.context_setup_outcome); + + // Send command to DU. + send_ue_context_setup_request(); + + // Await CU response. + CORO_AWAIT(transaction_sink); + + // Handle result of the transaction. + CORO_RETURN(handle_procedure_result()); +} + +bool ue_context_setup_procedure::find_or_create_f1ap_ue_context() +{ + // Check if F1AP UE context exists first. + ue_ctxt = ue_ctxt_list.find(request.ue_index); + if (ue_ctxt != nullptr) { + logger.debug("{}: UE context found", f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}); + return true; + } + + // F1AP UE context does not yet exist. + // Allocate gNB-CU-UE-F1AP-ID. + gnb_cu_ue_f1ap_id_t tmp_cu_ue_f1ap_id = ue_ctxt_list.next_gnb_cu_ue_f1ap_id(); + if (tmp_cu_ue_f1ap_id == gnb_cu_ue_f1ap_id_t::invalid) { + logger.warning("ue={} proc=\"{}\": No CU UE F1AP ID available", request.ue_index, name()); + return false; + } + + // Create F1AP UE context. + ue_ctxt = &ue_ctxt_list.add_ue(request.ue_index, tmp_cu_ue_f1ap_id); + logger.info("{}: UE successfully created.", f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}); + + return true; +} + +bool ue_context_setup_procedure::create_ue_rrc_context(const f1ap_ue_context_setup_response& ue_ctxt_setup_resp) +{ + if (not ue_ctxt_setup_resp.success or ue_ctxt_setup_resp.ue_index == ue_index_t::invalid) { + logger.warning("Couldn't create UE in target cell"); + return false; + } + + if (ue_ctxt_setup_resp.c_rnti.has_value()) { + // An C-RNTI has been allocated by the DU. In such case, we need to create a new UE RRC context in the CU-CP. + + ue_rrc_context_creation_request req; + req.ue_index = ue_ctxt_setup_resp.ue_index; + req.c_rnti = ue_ctxt_setup_resp.c_rnti.value(); + req.cgi = request.sp_cell_id; + req.du_to_cu_rrc_container = ue_ctxt_setup_resp.du_to_cu_rrc_info.cell_group_cfg.copy(); + req.prev_context = std::move(rrc_context); + + ue_rrc_context_creation_response resp = du_processor_notifier.on_ue_rrc_context_creation_request(req); + if (resp.f1ap_rrc_notifier == nullptr) { + logger.warning("Couldn't create UE RRC context in target cell"); + return false; + } + + // Add RRC notifier to F1AP UE context. + ue_ctxt_list.add_rrc_notifier(req.ue_index, resp.f1ap_rrc_notifier); + + logger.debug("ue={} Added RRC UE notifier", req.ue_index); + } + + return true; +} + +void ue_context_setup_procedure::send_ue_context_setup_request() +{ + // Pack message into PDU + f1ap_message f1ap_ue_ctxt_setup_request_msg; + f1ap_ue_ctxt_setup_request_msg.pdu.set_init_msg(); + f1ap_ue_ctxt_setup_request_msg.pdu.init_msg().load_info_obj(ASN1_F1AP_ID_UE_CONTEXT_SETUP); + ue_context_setup_request_s& req = f1ap_ue_ctxt_setup_request_msg.pdu.init_msg().value.ue_context_setup_request(); + + // Convert common type to asn1 + fill_asn1_ue_context_setup_request(req, request, ue_ctxt->ue_ids); + + if (logger.debug.enabled()) { + asn1::json_writer js; + f1ap_ue_ctxt_setup_request_msg.pdu.to_json(js); + logger.debug("Containerized UeContextSetupRequest: {}", js.to_string()); + } + + // send UE context setup request message + f1ap_notifier.on_new_message(f1ap_ue_ctxt_setup_request_msg); +} + +f1ap_ue_context_setup_response ue_context_setup_procedure::handle_procedure_result() +{ + f1ap_ue_context_setup_response resp; + resp.ue_index = request.ue_index; + resp.success = false; + + if (ue_ctxt == nullptr) { + logger.warning("ue={} proc=\"{}\" failed", request.ue_index, name()); + return resp; + } + + if (transaction_sink.successful()) { + const auto& asn1_resp = transaction_sink.response(); + + // Update gNB DU F1AP ID in F1AP UE context. + ue_ctxt->ue_ids.du_ue_f1ap_id = int_to_gnb_du_ue_f1ap_id(asn1_resp->gnb_du_ue_f1ap_id); + logger.debug("{}: Updated UE gNB-DU-UE-ID", f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}); + + // Fill response to the UE context setup procedure. + fill_f1ap_ue_context_setup_response(resp, request.ue_index, transaction_sink.response()); + + // Create UE RRC context in CU-CP, if required. + resp.success = create_ue_rrc_context(resp); + + return resp; + } + + // Procedure failed. + + if (transaction_sink.failed()) { + logger.warning("{}: Procedure failed. Cause: {}", + f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}, + get_cause_str(transaction_sink.failure()->cause)); + + // Fill response to the UE context setup procedure. + fill_f1ap_ue_context_setup_response(resp, request.ue_index, transaction_sink.failure()); + + } else { + logger.warning("{}: Procedure failed. Cause: Timeout reached while waiting for DU response.", + f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}); + } + + // Delete created F1AP UE context. + ue_ctxt_list.remove_ue(request.ue_index); + + return resp; +} + static void fill_asn1_ue_context_setup_request(asn1::f1ap::ue_context_setup_request_s& asn1_request, const f1ap_ue_context_setup_request& request, const f1ap_ue_ids& ue_ids) @@ -220,9 +407,6 @@ static void fill_f1ap_ue_context_setup_response(f1ap_ue_context_setup_response& } } -/// \brief Convert the UE Context Setup Response from ASN.1 to common type. -/// \param[out] response The common type struct to store the result. -/// \param[in] asn1_response The ASN.1 UE Context Setup Response. static void fill_f1ap_ue_context_setup_response(f1ap_ue_context_setup_response& response, ue_index_t ue_index, const asn1::f1ap::ue_context_setup_resp_s& asn1_response) @@ -321,168 +505,3 @@ static void fill_f1ap_ue_context_setup_response(f1ap_ue_context_setup_response& } } } - -ue_context_setup_procedure::ue_context_setup_procedure(const f1ap_ue_context_setup_request& request_, - f1ap_ue_context_list& ue_ctxt_list_, - f1ap_du_processor_notifier& du_processor_notifier_, - f1ap_message_notifier& f1ap_notif_, - srslog::basic_logger& logger_, - optional rrc_context_) : - request(request_), - ue_ctxt_list(ue_ctxt_list_), - du_processor_notifier(du_processor_notifier_), - f1ap_notifier(f1ap_notif_), - logger(logger_), - rrc_context(rrc_context_) -{ - srsran_assert(request.ue_index != ue_index_t::invalid, "UE index of F1AP UeContextSetupRequest must not be invalid"); -} - -void ue_context_setup_procedure::operator()(coro_context>& ctx) -{ - CORO_BEGIN(ctx); - - logger.debug("ue={} proc=\"{}\": started...", request.ue_index, name()); - - // Create F1AP UE context if it doesn't exist. - if (not find_or_create_f1ap_ue_context()) { - CORO_EARLY_RETURN(handle_procedure_result()); - } - - // Subscribe to respective publisher to receive UE CONTEXT SETUP RESPONSE/FAILURE message. - transaction_sink.subscribe_to(ue_ctxt->ev_mng.context_setup_outcome); - - // Send command to DU. - send_ue_context_setup_request(); - - // Await CU response. - CORO_AWAIT(transaction_sink); - - // Handle result of the transaction. - CORO_RETURN(handle_procedure_result()); -} - -bool ue_context_setup_procedure::find_or_create_f1ap_ue_context() -{ - // Check if F1AP UE context exists first. - ue_ctxt = ue_ctxt_list.find(request.ue_index); - if (ue_ctxt != nullptr) { - logger.debug("{}: UE context found", f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}); - return true; - } - - // F1AP UE context does not yet exist. - // Allocate gNB-CU-UE-F1AP-ID. - gnb_cu_ue_f1ap_id_t tmp_cu_ue_f1ap_id = ue_ctxt_list.next_gnb_cu_ue_f1ap_id(); - if (tmp_cu_ue_f1ap_id == gnb_cu_ue_f1ap_id_t::invalid) { - logger.warning("ue={} proc=\"{}\": No CU UE F1AP ID available", request.ue_index, name()); - return false; - } - - // Create F1AP UE context. - ue_ctxt = &ue_ctxt_list.add_ue(request.ue_index, tmp_cu_ue_f1ap_id); - logger.info("{}: UE successfully created.", f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}); - - return true; -} - -bool ue_context_setup_procedure::create_ue_rrc_context(const f1ap_ue_context_setup_response& ue_ctxt_setup_resp) -{ - if (not ue_ctxt_setup_resp.success or ue_ctxt_setup_resp.ue_index == ue_index_t::invalid) { - logger.warning("Couldn't create UE in target cell"); - return false; - } - - if (ue_ctxt_setup_resp.c_rnti.has_value()) { - // An C-RNTI has been allocated by the DU. In such case, we need to create a new UE RRC context in the CU-CP. - - ue_rrc_context_creation_request req; - req.ue_index = ue_ctxt_setup_resp.ue_index; - req.c_rnti = ue_ctxt_setup_resp.c_rnti.value(); - req.cgi = request.sp_cell_id; - req.du_to_cu_rrc_container = ue_ctxt_setup_resp.du_to_cu_rrc_info.cell_group_cfg.copy(); - req.prev_context = std::move(rrc_context); - - ue_rrc_context_creation_response resp = du_processor_notifier.on_ue_rrc_context_creation_request(req); - if (resp.f1ap_rrc_notifier == nullptr) { - logger.warning("Couldn't create UE RRC context in target cell"); - return false; - } - - // Add RRC notifier to F1AP UE context. - ue_ctxt_list.add_rrc_notifier(req.ue_index, resp.f1ap_rrc_notifier); - - logger.debug("ue={} Added RRC UE notifier", req.ue_index); - } - - return true; -} - -void ue_context_setup_procedure::send_ue_context_setup_request() -{ - // Pack message into PDU - f1ap_message f1ap_ue_ctxt_setup_request_msg; - f1ap_ue_ctxt_setup_request_msg.pdu.set_init_msg(); - f1ap_ue_ctxt_setup_request_msg.pdu.init_msg().load_info_obj(ASN1_F1AP_ID_UE_CONTEXT_SETUP); - ue_context_setup_request_s& req = f1ap_ue_ctxt_setup_request_msg.pdu.init_msg().value.ue_context_setup_request(); - - // Convert common type to asn1 - fill_asn1_ue_context_setup_request(req, request, ue_ctxt->ue_ids); - - if (logger.debug.enabled()) { - asn1::json_writer js; - f1ap_ue_ctxt_setup_request_msg.pdu.to_json(js); - logger.debug("Containerized UeContextSetupRequest: {}", js.to_string()); - } - - // send UE context setup request message - f1ap_notifier.on_new_message(f1ap_ue_ctxt_setup_request_msg); -} - -f1ap_ue_context_setup_response ue_context_setup_procedure::handle_procedure_result() -{ - f1ap_ue_context_setup_response resp; - resp.ue_index = request.ue_index; - resp.success = false; - - if (ue_ctxt == nullptr) { - logger.warning("ue={} proc=\"{}\" failed", request.ue_index, name()); - return resp; - } - - if (transaction_sink.successful()) { - const auto& asn1_resp = transaction_sink.response(); - - // Update gNB DU F1AP ID in F1AP UE context. - ue_ctxt->ue_ids.du_ue_f1ap_id = int_to_gnb_du_ue_f1ap_id(asn1_resp->gnb_du_ue_f1ap_id); - logger.debug("{}: Updated UE gNB-DU-UE-ID", f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}); - - // Fill response to the UE context setup procedure. - fill_f1ap_ue_context_setup_response(resp, request.ue_index, transaction_sink.response()); - - // Create UE RRC context in CU-CP, if required. - resp.success = create_ue_rrc_context(resp); - - return resp; - } - - // Procedure failed. - - if (transaction_sink.failed()) { - logger.warning("{}: Procedure failed. Cause: {}", - f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}, - get_cause_str(transaction_sink.failure()->cause)); - - // Fill response to the UE context setup procedure. - fill_f1ap_ue_context_setup_response(resp, request.ue_index, transaction_sink.failure()); - - } else { - logger.warning("{}: Procedure failed. Cause: Timeout reached while waiting for DU response.", - f1ap_ue_log_prefix{ue_ctxt->ue_ids, name()}); - } - - // Delete created F1AP UE context. - ue_ctxt_list.remove_ue(request.ue_index); - - return resp; -} From 66c2388f28c0da830ff8a09fd5a79743ba3d3f85 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Thu, 15 Feb 2024 14:42:02 +0100 Subject: [PATCH 64/78] mac: remove RNTI manager duplicate from MAC --- .../mac_sched/srsran_scheduler_adapter.cpp | 2 +- lib/mac/mac_sched/srsran_scheduler_adapter.h | 5 +-- tests/unittests/mac/CMakeLists.txt | 1 + tests/unittests/mac/rnti_manager_test.cpp | 42 +++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 tests/unittests/mac/rnti_manager_test.cpp diff --git a/lib/mac/mac_sched/srsran_scheduler_adapter.cpp b/lib/mac/mac_sched/srsran_scheduler_adapter.cpp index 11f8da66d1..273c25210e 100644 --- a/lib/mac/mac_sched/srsran_scheduler_adapter.cpp +++ b/lib/mac/mac_sched/srsran_scheduler_adapter.cpp @@ -265,7 +265,7 @@ void srsran_scheduler_adapter::cell_handler::handle_rach_indication(const mac_ra sched_occasion.start_symbol = occasion.start_symbol; sched_occasion.frequency_index = occasion.frequency_index; for (const auto& preamble : occasion.preambles) { - rnti_t alloc_tc_rnti = parent->rnti_alloc.allocate(); + rnti_t alloc_tc_rnti = parent->rnti_mng.allocate(); if (alloc_tc_rnti == rnti_t::INVALID_RNTI) { parent->logger.warning( "cell={} preamble id={}: Ignoring PRACH. Cause: Failed to allocate TC-RNTI.", cell_idx, preamble.index); diff --git a/lib/mac/mac_sched/srsran_scheduler_adapter.h b/lib/mac/mac_sched/srsran_scheduler_adapter.h index e861b963af..417ec877b9 100644 --- a/lib/mac/mac_sched/srsran_scheduler_adapter.h +++ b/lib/mac/mac_sched/srsran_scheduler_adapter.h @@ -109,7 +109,9 @@ class srsran_scheduler_adapter final : public mac_scheduler_adapter srsran_scheduler_adapter& parent; }; + // Allocator for TC-RNTIs. rnti_manager& rnti_mng; + /// Detector of UE RLFs. rlf_detector rlf_handler; task_executor& ctrl_exec; @@ -121,9 +123,6 @@ class srsran_scheduler_adapter final : public mac_scheduler_adapter /// srsGNB scheduler. std::unique_ptr sched_impl; - /// Allocator of TC-RNTI values. - rnti_manager rnti_alloc; - /// List of event flags used by scheduler to notify that the configuration is complete. struct ue_notification_context { manual_event ue_config_ready; diff --git a/tests/unittests/mac/CMakeLists.txt b/tests/unittests/mac/CMakeLists.txt index 4c88eb3513..a484d52ce1 100644 --- a/tests/unittests/mac/CMakeLists.txt +++ b/tests/unittests/mac/CMakeLists.txt @@ -21,6 +21,7 @@ add_executable(mac_test mac_cell_processor_test.cpp dl_sch_pdu_assembler_test.cpp mac_rar_pdu_assembler_test.cpp + rnti_manager_test.cpp mac_dl_cfg_test.cpp) target_link_libraries(mac_test srsran_pcap diff --git a/tests/unittests/mac/rnti_manager_test.cpp b/tests/unittests/mac/rnti_manager_test.cpp new file mode 100644 index 0000000000..8fbcec92e2 --- /dev/null +++ b/tests/unittests/mac/rnti_manager_test.cpp @@ -0,0 +1,42 @@ +/* + * + * Copyright 2021-2024 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 "lib/mac/rnti_manager.h" +#include + +using namespace srsran; + +TEST(rnti_manager_test, when_allocate_rnti_called_multiple_times_then_rntis_are_unique) +{ + rnti_manager rnti_db; + + unsigned max_count = 100; + std::set prev_rntis; + for (unsigned count = 0; count != max_count; ++count) { + rnti_t rnti = rnti_db.allocate(); + ASSERT_EQ(prev_rntis.count(rnti), 0); + prev_rntis.insert(rnti); + } + + ASSERT_EQ(rnti_db.nof_ues(), 0) << "No UE should have been added"; +} + +TEST(rnti_manager_test, when_ue_added_then_allocate_rnti_does_not_repeat_rnti) +{ + rnti_manager rnti_db; + + rnti_t rnti1 = rnti_db.allocate(); + ASSERT_TRUE(rnti_db.add_ue(rnti1, to_du_ue_index(0))); + + rnti_t rnti2 = rnti_db.allocate(); + ASSERT_NE(rnti1, rnti2); + + ASSERT_EQ(rnti_db.nof_ues(), 1); +} \ No newline at end of file From ac5ea5156ca70dac0a8efa0cc2a25a143154c34a Mon Sep 17 00:00:00 2001 From: Pavel Harbanau Date: Thu, 15 Feb 2024 17:12:38 +0000 Subject: [PATCH 65/78] ofh: change logging of lates in the transmitter queue --- .../srsran/ofh/ethernet/ethernet_frame_pool.h | 101 ++++++++++++++---- .../ofh_downlink_handler_broadcast_impl.cpp | 2 +- .../transmitter/ofh_downlink_handler_impl.cpp | 2 +- .../ofh_message_transmitter_impl.cpp | 29 ----- .../ofh_message_transmitter_impl.h | 6 -- .../transmitter/ofh_transmitter_factories.cpp | 9 +- .../ofh_uplink_request_handler_impl.cpp | 9 +- .../ofh_uplink_request_handler_impl.h | 5 + .../ofh/ethernet/ethernet_frame_pool_test.cpp | 12 ++- .../ofh_uplink_request_handler_impl_test.cpp | 27 ++--- 10 files changed, 126 insertions(+), 76 deletions(-) diff --git a/include/srsran/ofh/ethernet/ethernet_frame_pool.h b/include/srsran/ofh/ethernet/ethernet_frame_pool.h index df63d4c132..044647a41e 100644 --- a/include/srsran/ofh/ethernet/ethernet_frame_pool.h +++ b/include/srsran/ofh/ethernet/ethernet_frame_pool.h @@ -108,6 +108,11 @@ class frame_buffer_array }; public: + struct used_buffer { + frame_buffer* buffer; + ofh::slot_symbol_point timestamp; + }; + // Constructor receives number of buffers stored/read at a time, reserves storage for all eAxCs. frame_buffer_array(unsigned nof_buffers_to_return, unsigned buffer_size, unsigned nof_antennas) : increment_quant(nof_buffers_to_return), @@ -140,14 +145,14 @@ class frame_buffer_array // Stores actually used buffers in a list of buffers ready for sending. // Unused buffers state is changed to 'free'. - void push_buffers(span prepared_buffers) + void push_buffers(span prepared_buffers, ofh::slot_symbol_point symbol_point) { for (auto& buffer : prepared_buffers) { if (buffer.empty()) { buffer.status = frame_buffer::frame_buffer_status::free; } else { buffer.status = frame_buffer::frame_buffer_status::used; - used_buffers.push_back(&buffer); + used_buffers.push_back({&buffer, symbol_point}); } } } @@ -176,14 +181,16 @@ class frame_buffer_array span find_buffers_ready_for_sending() { aux_array.clear(); - for (auto& buffer : used_buffers) { - buffer->status = frame_buffer::frame_buffer_status::marked_to_send; - aux_array.push_back(buffer); + for (auto& used_buf : used_buffers) { + used_buf.buffer->status = frame_buffer::frame_buffer_status::marked_to_send; + aux_array.push_back(used_buf.buffer); } used_buffers.clear(); return aux_array; } + span get_prepared_buffers() const { return used_buffers; } + private: // Number of buffers accessed at a time. unsigned increment_quant; @@ -192,7 +199,7 @@ class frame_buffer_array // Data buffers. storage_array_type buffers_array; // Used buffers are added to this list. - static_vector used_buffers; + static_vector used_buffers; // Auxiliary array used as a list of ready-to-send buffers returned to a reader. std::vector aux_array; // Keeps track of the current write position. @@ -202,8 +209,11 @@ class frame_buffer_array /// Pool of Ethernet frames pre-allocated for each slot symbol. class eth_frame_pool { + /// Number of slots the pool can accommodate. + static constexpr size_t NUM_SLOTS = 20L; + /// Maximum number of entries contained by the pool, one entry per OFDM symbol, sized to accommodate 20 slots. - static constexpr size_t NUM_ENTRIES = NOF_OFDM_SYM_PER_SLOT_NORMAL_CP * 20L; + static constexpr size_t NUM_ENTRIES = NOF_OFDM_SYM_PER_SLOT_NORMAL_CP * NUM_SLOTS; /// Number of symbols in an interval for which an auxiliary vector is pre-allocated to store buffer pointers. static constexpr size_t NUM_INTERVAL_SYMBOL = 14; @@ -259,10 +269,10 @@ class eth_frame_pool } /// Push span of ready buffers to the array associated with the given OFH type. - void push_buffers(const ofh_pool_message_type& context, span prepared_buffers) + void push_buffers(const frame_pool_context& context, span prepared_buffers) { - frame_buffer_array& entry_buf = get_ofh_type_buffers(context.type, context.direction); - entry_buf.push_buffers(prepared_buffers); + frame_buffer_array& entry_buf = get_ofh_type_buffers(context.type.type, context.type.direction); + entry_buf.push_buffers(prepared_buffers, context.symbol_point); } void clear_buffers(const ofh_pool_message_type& context) @@ -277,6 +287,12 @@ class eth_frame_pool entry_buf.reset_buffers(); } + span get_prepared_buffers(const ofh_pool_message_type& context) const + { + const frame_buffer_array& entry_buf = get_ofh_type_buffers(context.type, context.direction); + return entry_buf.get_prepared_buffers(); + } + /// Returns a view over a next stored frame buffer for a given OFH type. span read_buffers(const ofh_pool_message_type& context) { @@ -320,7 +336,7 @@ class eth_frame_pool pool_entry& p_entry = get_pool_entry(context.symbol_point.get_slot(), context.symbol_point.get_symbol_index()); // Lock and update the pool entry. std::lock_guard lock(mutex); - p_entry.push_buffers(context.type, prepared_buffers); + p_entry.push_buffers(context, prepared_buffers); } /// Returns data buffers from the pool to a reader thread given a specific symbol context. @@ -385,8 +401,8 @@ class eth_frame_pool } } - /// Clear stored buffers associated with the given slot. - void clear_slot(slot_point slot_point) + /// Clears stored buffers associated with the given slot and logs the messages that could not be sent. + void clear_downlink_slot(slot_point slot_point, srslog::basic_logger& logger) { // Lock before changing the pool entries. std::lock_guard lock(mutex); @@ -394,20 +410,67 @@ class eth_frame_pool pool_entry& cp_entry = get_pool_entry(slot_point, 0); // Clear buffers with DL Control-Plane messages. ofh_pool_message_type msg_type{ofh::message_type::control_plane, ofh::data_direction::downlink}; - cp_entry.reset_buffers(msg_type); - // Clear buffers with UL Control-Plane messages. - msg_type.direction = ofh::data_direction::uplink; - cp_entry.reset_buffers(msg_type); + + auto dl_cp_buffers = cp_entry.get_prepared_buffers(msg_type); + for (const auto& used_buf : dl_cp_buffers) { + if (used_buf.timestamp.get_slot() == slot_point) { + continue; + } + logger.warning("Detected '{}' late downlink C-Plane messages in the transmitter queue for slot '{}'", + dl_cp_buffers.size(), + used_buf.timestamp.get_slot()); + cp_entry.reset_buffers(msg_type); + break; + } // Clear buffers with User-Plane messages. msg_type.type = ofh::message_type::user_plane; msg_type.direction = ofh::data_direction::downlink; - for (unsigned symbol = 0; symbol != 14; ++symbol) { + for (unsigned symbol = 0; symbol != NOF_OFDM_SYM_PER_SLOT_NORMAL_CP; ++symbol) { pool_entry& up_entry = get_pool_entry(slot_point, symbol); - up_entry.reset_buffers(msg_type); + + auto dl_up_buffers = up_entry.get_prepared_buffers(msg_type); + for (const auto& used_buf : dl_up_buffers) { + if (used_buf.timestamp.get_slot() == slot_point) { + continue; + } + logger.warning( + "Detected '{}' late downlink U-Plane messages in the transmitter queue for slot '{}', symbol '{}'", + dl_up_buffers.size(), + used_buf.timestamp.get_slot(), + used_buf.timestamp.get_symbol_index()); + up_entry.reset_buffers(msg_type); + break; + } } } + /// Clears stored uplink C-Plane buffers associated with the given slot and logs the messages that could not be sent. + void clear_uplink_slot(slot_point slot_point, srslog::basic_logger& logger) + { + // Lock before changing the pool entries. + std::lock_guard lock(mutex); + + pool_entry& cp_entry = get_pool_entry(slot_point, 0); + // Clear buffers with UL Control-Plane messages. + ofh_pool_message_type msg_type{ofh::message_type::control_plane, ofh::data_direction::uplink}; + + auto ul_cp_buffers = cp_entry.get_prepared_buffers(msg_type); + for (const auto& used_buf : ul_cp_buffers) { + if (used_buf.timestamp.get_slot() == slot_point) { + continue; + } + logger.warning("Detected '{}' late uplink C-Plane messages in the transmitter queue for slot '{}'", + ul_cp_buffers.size(), + used_buf.timestamp.get_slot()); + cp_entry.reset_buffers(msg_type); + break; + } + } + + /// Returns number of slots the pool can accommodate. + size_t pool_size_in_slots() const { return NUM_SLOTS; } + private: /// Buffer pool. std::vector pool; diff --git a/lib/ofh/transmitter/ofh_downlink_handler_broadcast_impl.cpp b/lib/ofh/transmitter/ofh_downlink_handler_broadcast_impl.cpp index 8217317308..289b9f7d05 100644 --- a/lib/ofh/transmitter/ofh_downlink_handler_broadcast_impl.cpp +++ b/lib/ofh/transmitter/ofh_downlink_handler_broadcast_impl.cpp @@ -59,7 +59,7 @@ void downlink_handler_broadcast_impl::handle_dl_data(const resource_grid_context const resource_grid_reader& grid) { // Clear any stale buffers associated with the context slot. - frame_pool.clear_slot(context.slot); + frame_pool.clear_downlink_slot(context.slot, logger); if (window_checker.is_late(context.slot)) { err_notifier.get().on_late_downlink_message({context.slot, sector_id}); diff --git a/lib/ofh/transmitter/ofh_downlink_handler_impl.cpp b/lib/ofh/transmitter/ofh_downlink_handler_impl.cpp index 8584f177d9..03b22d3a28 100644 --- a/lib/ofh/transmitter/ofh_downlink_handler_impl.cpp +++ b/lib/ofh/transmitter/ofh_downlink_handler_impl.cpp @@ -62,7 +62,7 @@ void downlink_handler_impl::handle_dl_data(const resource_grid_context& context, grid.get_nof_ports()); // Clear any stale buffers associated with the context slot. - frame_pool.clear_slot(context.slot); + frame_pool.clear_downlink_slot(context.slot, logger); if (window_checker.is_late(context.slot)) { err_notifier.get().on_late_downlink_message({context.slot, sector_id}); diff --git a/lib/ofh/transmitter/ofh_message_transmitter_impl.cpp b/lib/ofh/transmitter/ofh_message_transmitter_impl.cpp index 7f18321043..ab85e7ca75 100644 --- a/lib/ofh/transmitter/ofh_message_transmitter_impl.cpp +++ b/lib/ofh/transmitter/ofh_message_transmitter_impl.cpp @@ -76,33 +76,4 @@ void message_transmitter_impl::on_new_symbol(slot_symbol_point symbol_point) interval.start = symbol_point + timing_params.sym_up_dl_end; interval.end = symbol_point + timing_params.sym_up_dl_start; transmit_enqueued_messages(interval); - - // Log the late messages when the transmission window closes. - log_late_messages_on_tx_window_close(symbol_point); -} - -void message_transmitter_impl::log_late_messages_on_tx_window_close(slot_symbol_point symbol_point) -{ - log_late_messages(symbol_point + timing_params.sym_cp_dl_end, message_type::control_plane, data_direction::downlink); - log_late_messages(symbol_point + timing_params.sym_cp_ul_end, message_type::control_plane, data_direction::uplink); - log_late_messages(symbol_point + timing_params.sym_up_dl_end, message_type::user_plane, data_direction::downlink); -} - -void message_transmitter_impl::log_late_messages(slot_symbol_point late_point, - message_type type, - data_direction direction) -{ - const ether::frame_pool_context context{{type, direction}, late_point}; - auto frame_buffers = pool.read_frame_buffers(context); - - if (!frame_buffers.empty()) { - logger.warning("Detected '{}' late Ethernet frames in the transmitter queue for slot '{}', symbol '{}', type '{}', " - "direction '{}'", - frame_buffers.size(), - late_point.get_slot(), - late_point.get_symbol_index(), - (type == message_type::control_plane) ? "control" : "user", - (direction == data_direction::downlink) ? "downlink" : "uplink"); - pool.clear_sent_frame_buffers(context); - } } diff --git a/lib/ofh/transmitter/ofh_message_transmitter_impl.h b/lib/ofh/transmitter/ofh_message_transmitter_impl.h index 66d38fad31..563273488d 100644 --- a/lib/ofh/transmitter/ofh_message_transmitter_impl.h +++ b/lib/ofh/transmitter/ofh_message_transmitter_impl.h @@ -79,12 +79,6 @@ class message_transmitter_impl : public ota_symbol_boundary_notifier private: /// Transmits enqueued messages for the given interval of slot symbol points. void transmit_enqueued_messages(const ether::frame_pool_interval& interval); - - /// Logs the messages that could not be sent due the transmission window closed. - void log_late_messages_on_tx_window_close(slot_symbol_point symbol_point); - - /// Logs the late messages for the given late slot symbol point, message type and direction. - void log_late_messages(slot_symbol_point late_point, message_type type, data_direction direction); }; } // namespace ofh diff --git a/lib/ofh/transmitter/ofh_transmitter_factories.cpp b/lib/ofh/transmitter/ofh_transmitter_factories.cpp index 56aa41fdb5..bfad56d33a 100644 --- a/lib/ofh/transmitter/ofh_transmitter_factories.cpp +++ b/lib/ofh/transmitter/ofh_transmitter_factories.cpp @@ -161,10 +161,11 @@ create_uplink_request_handler(const transmitter_config& config.cp = tx_config.cp; uplink_request_handler_impl_dependencies dependencies; - dependencies.logger = &logger; - dependencies.ul_slot_repo = ul_slot_context_repo; - dependencies.ul_prach_repo = prach_context_repo; - dependencies.data_flow = create_data_flow_cplane_sched(tx_config, logger, frame_pool, ul_cp_context_repo); + dependencies.logger = &logger; + dependencies.ul_slot_repo = ul_slot_context_repo; + dependencies.ul_prach_repo = prach_context_repo; + dependencies.frame_pool_ptr = frame_pool; + dependencies.data_flow = create_data_flow_cplane_sched(tx_config, logger, frame_pool, ul_cp_context_repo); return std::make_unique(config, std::move(dependencies)); } diff --git a/lib/ofh/transmitter/ofh_uplink_request_handler_impl.cpp b/lib/ofh/transmitter/ofh_uplink_request_handler_impl.cpp index 4c3724d2c8..ab75c240f7 100644 --- a/lib/ofh/transmitter/ofh_uplink_request_handler_impl.cpp +++ b/lib/ofh/transmitter/ofh_uplink_request_handler_impl.cpp @@ -48,17 +48,22 @@ uplink_request_handler_impl::uplink_request_handler_impl(const uplink_request_ha ul_prach_repo_ptr(dependencies.ul_prach_repo), ul_slot_repo(*ul_slot_repo_ptr), ul_prach_repo(*ul_prach_repo_ptr), - data_flow(std::move(dependencies.data_flow)) + data_flow(std::move(dependencies.data_flow)), + frame_pool_ptr(dependencies.frame_pool_ptr), + frame_pool(*frame_pool_ptr) { srsran_assert(ul_slot_repo_ptr, "Invalid uplink repository"); srsran_assert(ul_prach_repo_ptr, "Invalid PRACH repository"); srsran_assert(data_flow, "Invalid data flow"); + srsran_assert(frame_pool_ptr, "Invalid frame pool"); } void uplink_request_handler_impl::handle_prach_occasion(const prach_buffer_context& context, prach_buffer& buffer) { logger.debug("Registering PRACH context entry for slot '{}' and sector#{}", context.slot, context.sector); + frame_pool.clear_uplink_slot(context.slot, logger); + // Sampling rate defining the \f$T_s = 1/(\Delta f_{ref} \times N_{f,ref})\f$ parameter, see 3GPP TS38.211, // clause 4.1. // Open Fronthaul parameters timeOffset and cpLength are expressed in multiple of \f$T_s\f$ units. @@ -136,6 +141,8 @@ void uplink_request_handler_impl::handle_new_uplink_slot(const resource_grid_con { logger.debug("Registering UL context entry for slot '{}' and sector#{}", context.slot, context.sector); + frame_pool.clear_uplink_slot(context.slot, logger); + // Store the context in the repository. ul_slot_repo.add(context, grid); diff --git a/lib/ofh/transmitter/ofh_uplink_request_handler_impl.h b/lib/ofh/transmitter/ofh_uplink_request_handler_impl.h index c0fc655e8c..c23e926e7c 100644 --- a/lib/ofh/transmitter/ofh_uplink_request_handler_impl.h +++ b/lib/ofh/transmitter/ofh_uplink_request_handler_impl.h @@ -14,6 +14,7 @@ #include "../support/uplink_context_repository.h" #include "ofh_data_flow_cplane_scheduling_commands.h" #include "srsran/adt/optional.h" +#include "srsran/ofh/ethernet/ethernet_frame_pool.h" #include "srsran/ofh/transmitter/ofh_uplink_request_handler.h" #include "srsran/ran/tdd/tdd_ul_dl_config.h" @@ -42,6 +43,8 @@ struct uplink_request_handler_impl_dependencies { std::shared_ptr ul_slot_repo; /// Uplink PRACH context repository. std::shared_ptr ul_prach_repo; + /// Ethernet frame pool. + std::shared_ptr frame_pool_ptr; /// Data flow for Control-Plane scheduling commands. std::unique_ptr data_flow; }; @@ -71,6 +74,8 @@ class uplink_request_handler_impl : public uplink_request_handler uplink_context_repository& ul_slot_repo; prach_context_repository& ul_prach_repo; std::unique_ptr data_flow; + std::shared_ptr frame_pool_ptr; + ether::eth_frame_pool& frame_pool; }; } // namespace ofh diff --git a/tests/unittests/ofh/ethernet/ethernet_frame_pool_test.cpp b/tests/unittests/ofh/ethernet/ethernet_frame_pool_test.cpp index 143944b83d..356554f089 100644 --- a/tests/unittests/ofh/ethernet/ethernet_frame_pool_test.cpp +++ b/tests/unittests/ofh/ethernet/ethernet_frame_pool_test.cpp @@ -457,6 +457,11 @@ TEST_P(EthFramePoolFixture, pool_should_have_enough_space) TEST_P(EthFramePoolFixture, clearing_full_pool_should_allow_adding_more_data) { + srslog::basic_logger& logger = srslog::fetch_basic_logger("OFH_TEST", false); + logger.set_level(srslog::basic_levels::debug); + + size_t pool_size_slots = pool.pool_size_in_slots(); + slot_point slot(to_numerology_value(scs), 0); for (unsigned slot_count = 0; slot_count < TEST_NUM_SLOTS; ++slot_count) { for (unsigned symbol = 0; symbol < nof_symbols; ++symbol) { @@ -478,8 +483,9 @@ TEST_P(EthFramePoolFixture, clearing_full_pool_should_allow_adding_more_data) } pool.push_frame_buffers(ctx, frame_buffers); } - // Clear full slot in the pool and try to get buffers again. - pool.clear_slot(slot); + // Increase slot by pool size, clear stale buffers in the pool and try to get buffers again. + auto wrapped_slot = slot + pool_size_slots; + pool.clear_downlink_slot(wrapped_slot, logger); for (unsigned i = 0; i != nof_requested_buffers; ++i) { span frame_buffers = pool.get_frame_buffers(ctx); ASSERT_TRUE(!frame_buffers.empty()) << "Non-empty span of buffers expected"; @@ -506,7 +512,7 @@ TEST_P(EthFramePoolFixture, clearing_full_pool_should_allow_adding_more_data) pool.push_frame_buffers(ctx, frame_buffers); } // Clear full slot in the pool and try to get buffers again. - pool.clear_slot(slot); + pool.clear_uplink_slot(wrapped_slot, logger); for (unsigned i = 0; i != nof_requested_buffers; ++i) { span frame_buffers = pool.get_frame_buffers(ctx); ASSERT_TRUE(!frame_buffers.empty()) << "Non-empty span of buffers expected"; diff --git a/tests/unittests/ofh/transmitter/ofh_uplink_request_handler_impl_test.cpp b/tests/unittests/ofh/transmitter/ofh_uplink_request_handler_impl_test.cpp index a23142654a..e93fdb4382 100644 --- a/tests/unittests/ofh/transmitter/ofh_uplink_request_handler_impl_test.cpp +++ b/tests/unittests/ofh/transmitter/ofh_uplink_request_handler_impl_test.cpp @@ -24,6 +24,7 @@ using namespace srsran::ofh::testing; static const static_vector eaxc = {2}; static const static_vector prach_eaxc = {4}; static constexpr unsigned REPOSITORY_SIZE = 20U; +static constexpr units::bytes mtu_size{9000}; namespace { @@ -177,12 +178,13 @@ class ofh_uplink_request_handler_impl_fixture : public ::testing::Test uplink_request_handler_impl_dependencies get_dependencies_prach_cp_disabled() { uplink_request_handler_impl_dependencies dependencies; - dependencies.logger = &srslog::fetch_basic_logger("TEST"); - dependencies.ul_slot_repo = ul_slot_repo; - dependencies.ul_prach_repo = ul_prach_repo; - auto temp = std::make_unique(); - data_flow = temp.get(); - dependencies.data_flow = std::move(temp); + dependencies.logger = &srslog::fetch_basic_logger("TEST"); + dependencies.ul_slot_repo = ul_slot_repo; + dependencies.ul_prach_repo = ul_prach_repo; + dependencies.frame_pool_ptr = std::make_shared(mtu_size, 2); + auto temp = std::make_unique(); + data_flow = temp.get(); + dependencies.data_flow = std::move(temp); return dependencies; } @@ -190,12 +192,13 @@ class ofh_uplink_request_handler_impl_fixture : public ::testing::Test uplink_request_handler_impl_dependencies get_dependencies_prach_cp_enabled() { uplink_request_handler_impl_dependencies dependencies; - dependencies.logger = &srslog::fetch_basic_logger("TEST"); - dependencies.ul_slot_repo = ul_slot_repo; - dependencies.ul_prach_repo = ul_prach_repo; - auto temp = std::make_unique(); - data_flow_prach = temp.get(); - dependencies.data_flow = std::move(temp); + dependencies.logger = &srslog::fetch_basic_logger("TEST"); + dependencies.ul_slot_repo = ul_slot_repo; + dependencies.ul_prach_repo = ul_prach_repo; + dependencies.frame_pool_ptr = std::make_shared(mtu_size, 2); + auto temp = std::make_unique(); + data_flow_prach = temp.get(); + dependencies.data_flow = std::move(temp); return dependencies; } From 1697aef21bee9cf830ca2b7a614ce1a52c7e6b32 Mon Sep 17 00:00:00 2001 From: dvdgrgrtt Date: Thu, 15 Feb 2024 11:58:11 +0100 Subject: [PATCH 66/78] tests: update test vector --- .../ran/pusch/pusch_tpmi_select_test_data.h | 196 +++++++++--------- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/tests/unittests/ran/pusch/pusch_tpmi_select_test_data.h b/tests/unittests/ran/pusch/pusch_tpmi_select_test_data.h index 461f21ffa8..d3924120b2 100644 --- a/tests/unittests/ran/pusch/pusch_tpmi_select_test_data.h +++ b/tests/unittests/ran/pusch/pusch_tpmi_select_test_data.h @@ -1,6 +1,6 @@ /* * - * Copyright 2021-2023 Software Radio Systems Limited + * Copyright 2021-2024 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 @@ -10,7 +10,7 @@ #pragma once -// This file was generated using the following MATLAB class on 12-02-2024 (seed 0): +// This file was generated using the following MATLAB class on 15-02-2024 (seed 0): // + "srsTPMISelectUnittest.m" #include "srsran/ran/pusch/pusch_tpmi_select.h" @@ -26,102 +26,102 @@ struct test_case_t { static const std::vector pusch_tpmi_select_test_data = { // clang-format off -{srs_channel_matrix({cf_t(0.537667,-2.258847), cf_t(1.833885,0.862173)}, 1, 2), 1.9904, {{5, 6.721121},}}, -{srs_channel_matrix({cf_t(-1.307688,0.342624), cf_t(-0.433592,3.578397)}, 1, 2), 0.15523, {{4, 18.860710},}}, -{srs_channel_matrix({cf_t(-1.349887,0.725404), cf_t(3.034923,-0.063055)}, 1, 2), 0.96758, {{3, 10.110059},}}, -{srs_channel_matrix({cf_t(-0.204966,1.489698), cf_t(-0.124144,1.409034)}, 1, 2), 0.17958, {{2, 13.746798},}}, -{srs_channel_matrix({cf_t(0.671497,0.717239), cf_t(-1.207487,1.630235)}, 1, 2), 1.683, {{5, 4.272519},}}, -{srs_channel_matrix({cf_t(1.034693,-0.303441), cf_t(0.726885,0.293871)}, 1, 2), 7.6653, {{2, -6.937425},}}, -{srs_channel_matrix({cf_t(0.888396,-1.068870), cf_t(-1.147070,-0.809499)}, 1, 2), 10.1264, {{4, -4.147666},}}, -{srs_channel_matrix({cf_t(1.438380,-0.754928), cf_t(0.325191,1.370299)}, 1, 2), 14.6286, {{5, -5.093284},}}, -{srs_channel_matrix({cf_t(-0.102242,0.319207), cf_t(-0.241447,0.312859)}, 1, 2), 7.2845, {{2, -14.494137},}}, -{srs_channel_matrix({cf_t(-0.030051,0.627707), cf_t(-0.164879,1.093266)}, 1, 2), 1.2223, {{2, 0.888649},}}, -{srs_channel_matrix({cf_t(-0.863653,-1.214117), cf_t(0.077359,-1.113501)}, 1, 2), 3.0245, {{2, -0.009346},}}, -{srs_channel_matrix({cf_t(1.532630,0.371379), cf_t(-0.769666,-0.225584)}, 1, 2), 1.2421, {{3, 3.574097},}}, -{srs_channel_matrix({cf_t(-1.089064,0.552527), cf_t(0.032557,1.100610)}, 1, 2), 0.18049, {{4, 11.532158},}}, -{srs_channel_matrix({cf_t(0.085931,-0.742302), cf_t(-1.491590,-1.061582)}, 1, 2), 0.7535, {{4, 6.217135},}}, -{srs_channel_matrix({cf_t(-0.615602,-0.192419), cf_t(0.748077,0.888610)}, 1, 2), 4.5595, {{3, -4.787585},}}, -{srs_channel_matrix({cf_t(-1.402269,0.488194), cf_t(-1.422376,-0.177375)}, 1, 2), 4.5388, {{2, -0.508140},}}, -{srs_channel_matrix({cf_t(1.419310,-0.804466), cf_t(0.291584,0.696624), cf_t(0.197811,0.835088), cf_t(1.587699,-0.243715)}, 2, 2), 2.4579, {{5, 1.461981},{1, -1.769549},}}, -{srs_channel_matrix({cf_t(-1.165844,2.585491), cf_t(-1.147953,-0.666891), cf_t(0.104875,0.187331), cf_t(0.722254,-0.082494)}, 2, 2), 19.2438, {{3, -5.359049},{0, -8.704529},}}, -{srs_channel_matrix({cf_t(-0.438966,0.100093), cf_t(-1.794679,-0.544529), cf_t(0.840376,0.303521), cf_t(-0.888032,-0.600327)}, 2, 2), 1.8437, {{2, 3.793230},{1, -1.381617},}}, -{srs_channel_matrix({cf_t(0.739363,-0.839589), cf_t(1.711888,1.354594), cf_t(-0.194124,-1.072155), cf_t(-2.138355,0.960954)}, 2, 2), 2.6894, {{5, 5.675573},{1, -0.127439},}}, -{srs_channel_matrix({cf_t(1.436697,2.908008), cf_t(-1.960900,0.825219), cf_t(-0.197698,1.378972), cf_t(-1.207845,-1.058180)}, 2, 2), 3.9818, {{5, 5.877500},{0, -1.128085},}}, -{srs_channel_matrix({cf_t(-0.272469,-2.051816), cf_t(1.098425,-0.353850), cf_t(-0.277872,-0.823587), cf_t(0.701541,-1.577057)}, 2, 2), 0.60834, {{2, 11.062479}, {1, 4.810719},}}, -{srs_channel_matrix({cf_t(0.281984,0.350179), cf_t(0.033480,-0.299066), cf_t(-1.333678,0.022890), cf_t(1.127492,-0.261995)}, 2, 2), 11.1938, {{5, -6.496824},{0, -11.256090},}}, -{srs_channel_matrix({cf_t(-0.285651,-0.533557), cf_t(-0.831367,-2.002636), cf_t(-0.979206,0.964229), cf_t(-1.156402,0.520060)}, 2, 2), 3.0904, {{4, 4.036525},{0, -3.047601},}}, -{srs_channel_matrix({cf_t(-0.034771,-0.714530), cf_t(-0.798164,1.351386), cf_t(1.018685,-0.224771), cf_t(-0.133217,-0.589029)}, 2, 2), 3.9371, {{5, -0.388925},{0, -5.971891},}}, -{srs_channel_matrix({cf_t(-0.847926,0.307535), cf_t(-1.120128,-1.257118), cf_t(2.526000,-0.865468), cf_t(1.655498,-0.176534)}, 2, 2), 0.85554, {{3, 11.018067}, {1, 4.222248},}}, -{srs_channel_matrix({cf_t(-1.332004,0.391354), cf_t(-2.329867,0.451679), cf_t(-1.449097,-0.130285), cf_t(0.333511,0.183689)}, 2, 2), 5.2824, {{2, 0.622089},{0, -3.412172},}}, -{srs_channel_matrix({cf_t(0.862022,-0.334887), cf_t(-1.361694,0.552783), cf_t(0.455030,1.039091), cf_t(-0.848709,-1.117639)}, 2, 2), 0.31804, {{5, 12.881381},{1, -0.090114},}}, -{srs_channel_matrix({cf_t(0.660143,-0.303108), cf_t(-0.067866,0.023046), cf_t(-0.195221,0.051290), cf_t(-0.217606,0.826063)}, 2, 2), 0.99725, {{3, -1.167051},{0, -4.904117},}}, -{srs_channel_matrix({cf_t(0.466914,-1.029768), cf_t(-0.209713,0.949222), cf_t(0.625190,0.307062), cf_t(0.183227,0.135175)}, 2, 2), 2.0588, {{5, -0.202222},{0, -4.954878},}}, -{srs_channel_matrix({cf_t(0.261406,-0.532011), cf_t(-0.941486,1.682104), cf_t(-0.162338,-0.875729), cf_t(-0.146055,-0.483815)}, 2, 2), 7.6775, {{5, -4.163022},{0, -7.803920},}}, -{srs_channel_matrix({cf_t(-1.174212,-0.249025), cf_t(-0.192240,-1.064213), cf_t(-0.274070,1.603457), cf_t(1.530073,1.234679)}, 2, 2), 3.5766, {{3, 2.421687},{0, -2.226541},}}, -{srs_channel_matrix({cf_t(-1.506160,-0.947961), cf_t(-0.444628,-0.741106), cf_t(-0.155941,-0.507818), cf_t(0.276068,-0.320576), cf_t(-0.261164,0.012469), cf_t(0.443422,-3.029177), cf_t(0.391894,-0.457015), cf_t(-1.250679,1.242448)}, 4, 2), 15.3432, {{2, -1.647274},{0, -5.581959},}}, -{srs_channel_matrix({cf_t(0.933728,0.041374), cf_t(0.350321,-0.734169), cf_t(-0.029006,-0.030814), cf_t(0.182452,0.232347), cf_t(-1.565056,0.426388), cf_t(-0.084539,-0.372809), cf_t(1.603946,-0.236455), cf_t(0.098348,2.023691)}, 4, 2), 14.2321, {{3, -3.526674},{0, -7.109971},}}, -{srs_channel_matrix({cf_t(2.229446,0.471634), cf_t(0.337564,-1.212847), cf_t(1.000061,0.066190), cf_t(-1.664164,0.652356), cf_t(-0.590035,0.327060), cf_t(-0.278064,1.082634), cf_t(0.422716,1.006077), cf_t(-1.670201,-0.650908)}, 4, 2), 1.5568, {{5, 9.125793},{0, 3.495892},}}, -{srs_channel_matrix({cf_t(-0.944378,1.250251), cf_t(-1.321789,0.929789), cf_t(0.924826,0.239763), cf_t(0.000050,-0.690361), cf_t(-0.054919,-0.651554), cf_t(0.911127,1.192102), cf_t(0.594584,-1.611830), cf_t(0.350201,-0.024462)}, 4, 2), 7.7488, {{4, 0.762089},{1, -4.385994},}}, -{srs_channel_matrix({cf_t(1.020498,0.079934), cf_t(0.861716,-0.948481), cf_t(0.001162,0.411491), cf_t(-0.070837,0.676978), cf_t(-2.486284,0.857733), cf_t(0.581172,-0.691159), cf_t(-2.192435,0.449378), cf_t(-2.319280,0.100633)}, 4, 2), 0.11899, {{5, 20.774681},{0, 15.551061},}}, -{srs_channel_matrix({cf_t(0.536157,-0.382585), cf_t(0.897888,0.648679), cf_t(-0.131938,0.825727), cf_t(-0.147201,-1.014944), cf_t(1.007773,-0.471070), cf_t(-2.123655,0.137025), cf_t(-0.504586,-0.291863), cf_t(-1.270594,0.301819)}, 4, 2), 2.0206, {{3, 5.397915},{0, 1.208681},}}, -{srs_channel_matrix({cf_t(-0.929962,-0.020858), cf_t(-0.176830,-0.560665), cf_t(-2.132095,2.177779), cf_t(1.145362,1.138465), cf_t(-0.629091,-2.496887), cf_t(-1.203850,0.441327), cf_t(-0.253945,-1.398138), cf_t(-1.428647,-0.255055)}, 4, 2), 2.6132, {{5, 8.656211},{1, 2.963929},}}, -{srs_channel_matrix({cf_t(0.747734,0.323213), cf_t(-0.273047,-0.784146), cf_t(1.576300,-1.805373), cf_t(-0.480937,1.858593), cf_t(0.327512,-0.604530), cf_t(0.664734,0.103360), cf_t(0.085189,0.563167), cf_t(0.880953,0.113597)}, 4, 2), 7.2026, {{3, 0.300607},{0, -3.592447},}}, -{srs_channel_matrix({cf_t(-0.467715,-0.284141), cf_t(-0.124890,-0.086690), cf_t(1.478958,-1.469395), cf_t(-0.860816,0.192182), cf_t(0.784668,-0.822293), cf_t(0.308623,-0.094241), cf_t(-0.233860,0.336213), cf_t(-1.056973,-0.904654)}, 4, 2), 5.3694, {{5, 0.662797},{0, -4.016587},}}, -{srs_channel_matrix({cf_t(0.350063,1.877865), cf_t(-1.835859,0.940704), cf_t(1.035976,0.787346), cf_t(2.424461,-0.875874), cf_t(0.959401,0.319949), cf_t(-0.315772,-0.558294), cf_t(0.428623,-0.311429), cf_t(-1.035985,-0.570010)}, 4, 2), 7.9187, {{4, 2.151205},{0, -2.364794},}}, -{srs_channel_matrix({cf_t(-0.908746,-1.483121), cf_t(-0.209897,-1.020264), cf_t(-1.698864,-0.446995), cf_t(0.607601,0.109659), cf_t(-0.117798,1.128736), cf_t(0.699160,-0.289963), cf_t(0.269649,1.261551), cf_t(0.494287,0.475425)}, 4, 2), 0.13833, {{4, 17.622018},{1, 11.883528},}}, -{srs_channel_matrix({cf_t(0.126947,-1.096593), cf_t(-0.656816,-0.493010), cf_t(-1.481399,-0.180739), cf_t(0.155489,0.045841), cf_t(0.818551,-0.063783), cf_t(-0.292588,0.611335), cf_t(-0.540786,0.109318), cf_t(-0.308642,1.814015)}, 4, 2), 1.9538, {{2, 4.388034},{1, 0.568394},}}, -{srs_channel_matrix({cf_t(1.804494,-1.441014), cf_t(-0.723121,0.401844), cf_t(0.526547,1.470201), cf_t(-0.260251,-0.326814), cf_t(0.600143,0.812323), cf_t(0.593931,0.545540), cf_t(-2.186022,-1.051632), cf_t(-1.327043,0.397467)}, 4, 2), 4.1255, {{5, 4.941982},{1, -0.039744},}}, -{srs_channel_matrix({cf_t(1.516267,0.612511), cf_t(-0.032567,-0.054886), cf_t(1.636000,-1.118732), cf_t(-0.425058,-0.626379), cf_t(0.589433,0.249518), cf_t(-0.062791,-0.993019), cf_t(-2.021959,0.974950), cf_t(-0.982132,-0.640710)}, 4, 2), 0.3743, {{3, 14.256197}, {1, 9.925905},}}, -{srs_channel_matrix({cf_t(-1.079866,-0.373071), cf_t(0.199189,0.815489), cf_t(-1.521027,0.798887), cf_t(-0.723631,0.120205), cf_t(-0.593250,0.571248), cf_t(0.401336,0.412796), cf_t(0.942133,-0.986962), cf_t(0.300486,0.759568)}, 4, 2), 6.2666, {{3, -0.172373},{1, -4.533946},}}, -{srs_channel_matrix({cf_t(-0.603918,-0.238302), cf_t(0.176947,0.229597), cf_t(-0.307503,0.439998), cf_t(-0.131820,-0.616866), cf_t(0.595358,0.274837), cf_t(1.046833,0.601102), cf_t(-0.197959,0.092308), cf_t(0.327678,1.729841)}, 4, 2), 5.7712, {{3, -1.355727},{0, -5.813710},}}, -{srs_channel_matrix({cf_t(-0.737060,-0.079893), cf_t(-1.749879,0.898476), cf_t(0.910483,0.183703), cf_t(0.867083,0.290790)}, 1, 4), 2.6449, {{14, 2.380825},}}, -{srs_channel_matrix({cf_t(0.439952,-1.854299), cf_t(0.101662,-1.140681), cf_t(2.787335,-1.093343), cf_t(-1.166665,-0.433609)}, 1, 4), 3.4836, {{16, 4.487145},}}, -{srs_channel_matrix({cf_t(-0.218534,1.778256), cf_t(0.541334,1.223063), cf_t(0.389266,-1.283256), cf_t(0.751229,-2.328955)}, 1, 4), 1.5722, {{14, 8.488748},}}, -{srs_channel_matrix({cf_t(-1.835639,-0.069214), cf_t(0.066757,-0.507323), cf_t(0.035479,0.235810), cf_t(2.227168,0.245805)}, 1, 4), 2.8395, {{27, 2.225421},}}, -{srs_channel_matrix({cf_t(-0.608581,-1.032184), cf_t(-1.222593,1.331216), cf_t(0.316500,-0.418903), cf_t(-1.342869,-0.140322)}, 1, 4), 1.6254, {{19, 5.103215},}}, -{srs_channel_matrix({cf_t(-0.300111,0.629335), cf_t(1.029366,-0.213015), cf_t(-0.345066,-0.865697), cf_t(1.012802,-1.043108)}, 1, 4), 3.7232, {{24, -2.281627},}}, -{srs_channel_matrix({cf_t(-0.438141,1.143679), cf_t(-0.408674,-0.531620), cf_t(0.983545,0.972566), cf_t(-0.297697,-0.522250)}, 1, 4), 0.92312, {{20, 4.977579},}}, -{srs_channel_matrix({cf_t(0.970738,0.950993), cf_t(-0.413972,-0.432004), cf_t(-0.438271,0.648941), cf_t(2.003391,-0.360076)}, 1, 4), 0.79094, {{23, 8.085299},}}, -{srs_channel_matrix({cf_t(1.415849,0.047471), cf_t(-1.604516,1.746257), cf_t(1.028853,0.155388), cf_t(1.457968,-1.237120)}, 1, 4), 6.9927, {{25, -1.039307},}}, -{srs_channel_matrix({cf_t(-0.333407,-0.577086), cf_t(0.713543,0.144002), cf_t(0.317408,-1.638666), cf_t(0.413610,-0.760090)}, 1, 4), 8.6553, {{24, -4.758370},}}, -{srs_channel_matrix({cf_t(0.519729,-0.689811), cf_t(-0.014160,-0.666699), cf_t(-1.155529,0.864149), cf_t(-0.009525,0.113419)}, 1, 4), 0.317, {{18, 8.241568},}}, -{srs_channel_matrix({cf_t(0.883970,1.170609), cf_t(0.180258,0.475861), cf_t(0.550855,1.412233), cf_t(0.682964,0.022608)}, 1, 4), 3.1919, {{12, 0.634324},}}, -{srs_channel_matrix({cf_t(1.701335,0.149809), cf_t(-0.509712,1.404933), cf_t(-0.002855,1.034122), cf_t(0.919867,0.291570)}, 1, 4), 6.0777, {{22, -2.455675},}}, -{srs_channel_matrix({cf_t(0.566696,0.213042), cf_t(-1.382621,0.879677), cf_t(0.244475,2.038876), cf_t(0.808439,0.923932)}, 1, 4), 2.3549, {{13, 3.020281},}}, -{srs_channel_matrix({cf_t(0.641662,1.224688), cf_t(0.425485,-0.043584), cf_t(-1.314724,0.582423), cf_t(-0.416411,-1.006500)}, 1, 4), 2.5783, {{27, 0.760560},}}, -{srs_channel_matrix({cf_t(0.600292,-0.939535), cf_t(-1.361515,-0.037533), cf_t(0.347593,-1.896304), cf_t(-0.181843,-2.127977)}, 1, 4), 6.872, {{16, 0.213123},}}, -{srs_channel_matrix({cf_t(-0.990532,0.093109), cf_t(-1.173032,-0.378157), cf_t(-1.725428,-1.482676), cf_t(0.288228,-0.043819), cf_t(-1.594184,0.960825), cf_t(0.110219,1.738245), cf_t(0.787067,-0.430206), cf_t(-0.002227,-1.627323)}, 2, 4), 2.4797, {{24, 5.197610},{20, 0.186947},}}, -{srs_channel_matrix({cf_t(0.376266,0.317851), cf_t(-0.226950,0.138048), cf_t(-1.148912,-0.710735), cf_t(2.024333,0.777004), cf_t(-2.359524,0.622394), cf_t(-0.509972,0.647381), cf_t(-1.321626,-0.425632), cf_t(-0.636128,1.048581)}, 2, 4), 0.29465, {{27, 14.044752}, {10, 8.625050},}}, -{srs_channel_matrix({cf_t(2.508772,0.555139), cf_t(1.063460,-0.556778), cf_t(1.156922,-0.895113), cf_t(0.052979,-0.409328), cf_t(-1.288386,-0.160887), cf_t(-0.371221,0.409334), cf_t(-0.757792,-0.952636), cf_t(-0.563969,0.317317)}, 2, 4), 2.5256, {{14, 6.008590},{10, -0.503156},}}, -{srs_channel_matrix({cf_t(1.324385,-0.892661), cf_t(-0.213170,1.908512), cf_t(-0.134479,0.122231), cf_t(-1.171356,1.047033), cf_t(-1.385263,-0.226920), cf_t(0.310508,-0.162502), cf_t(-0.249489,0.690052), cf_t(0.503744,0.555757)}, 2, 4), 9.9904, {{13, -2.271692},{11, -6.442332},}}, -{srs_channel_matrix({cf_t(-1.532693,0.439411), cf_t(-1.097868,-0.089622), cf_t(-1.415773,1.021180), cf_t(0.059571,-0.873979), cf_t(-0.411251,0.414700), cf_t(-0.368011,0.348441), cf_t(-1.360963,0.349254), cf_t(0.779567,-0.729247)}, 2, 4), 2.2387, {{12, 5.167847},{12, -0.439300},}}, -{srs_channel_matrix({cf_t(-0.514882,-3.232038), cf_t(-0.896446,-1.086959), cf_t(-1.203268,-1.426436), cf_t(1.037816,-1.014451), cf_t(-0.845944,-0.213267), cf_t(-0.172914,-0.325348), cf_t(-1.208652,1.944398), cf_t(-0.297127,-0.571773)}, 2, 4), 5.2674, {{13, 4.869396},{15, -1.373769},}}, -{srs_channel_matrix({cf_t(-1.569315,1.460013), cf_t(-0.477383,2.050043), cf_t(-1.337977,0.120501), cf_t(0.030299,-0.989902), cf_t(0.853087,1.197771), cf_t(0.404253,-0.592656), cf_t(-0.700620,-0.469809), cf_t(-1.630543,0.886377)}, 2, 4), 19.8562, {{21, -3.125471},{13, -7.925554},}}, -{srs_channel_matrix({cf_t(-1.956754,0.809972), cf_t(0.420684,0.173247), cf_t(0.400738,-0.505543), cf_t(0.095142,-1.193306), cf_t(0.496684,0.646971), cf_t(1.082241,-0.353623), cf_t(0.970448,0.046435), cf_t(-0.568570,-0.792948)}, 2, 4), 8.9317, {{17, -1.874603},{12, -6.904876},}}, -{srs_channel_matrix({cf_t(0.171586,0.497981), cf_t(-0.062139,2.789081), cf_t(1.199028,0.727572), cf_t(0.801704,-0.773064), cf_t(1.053305,0.836634), cf_t(-0.748877,-1.128330), cf_t(-0.936326,-1.424470), cf_t(-1.269087,0.717442)}, 2, 4), 4.8305, {{18, 4.384766},{16, -1.026578},}}, -{srs_channel_matrix({cf_t(0.315986,-1.540877), cf_t(1.406535,-0.203143), cf_t(0.401125,-0.499965), cf_t(0.929660,0.383024), cf_t(-1.605802,0.412035), cf_t(0.661536,0.405493), cf_t(2.138502,-0.363781), cf_t(0.541139,-0.599272)}, 2, 4), 10.6215, {{21, -2.455953},{12, -6.737523},}}, -{srs_channel_matrix({cf_t(0.853541,0.161364), cf_t(-1.853008,-0.268183), cf_t(-0.207303,-0.409873), cf_t(0.270378,-0.711323), cf_t(-0.652771,0.061445), cf_t(0.477227,-1.846129), cf_t(-0.071320,-0.398333), cf_t(-0.938301,-0.543548)}, 2, 4), 9.4968, {{22, -3.176380}, {8, -6.338377},}}, -{srs_channel_matrix({cf_t(0.652699,0.540870), cf_t(-0.734271,-1.262565), cf_t(0.540633,1.110424), cf_t(0.975841,-0.989563), cf_t(-0.156870,-1.828836), cf_t(0.277799,1.384499), cf_t(0.639517,-0.062727), cf_t(-0.080978,0.448921)}, 2, 4), 4.023, {{25, 2.764149},{21, -2.556165},}}, -{srs_channel_matrix({cf_t(-1.020583,1.147328), cf_t(-3.072989,0.597865), cf_t(0.626279,-1.281281), cf_t(-0.286685,-2.203264), cf_t(-0.197343,-0.571246), cf_t(0.405605,0.213996), cf_t(-1.419348,0.942377), cf_t(-0.729445,0.093725)}, 2, 4), 9.633, {{25, 1.312246},{21, -4.520607},}}, -{srs_channel_matrix({cf_t(0.306158,-0.462422), cf_t(-1.172335,-0.409785), cf_t(-0.960967,-0.503539), cf_t(-0.653735,1.233297), cf_t(-1.229394,0.610305), cf_t(-0.270965,0.059072), cf_t(-0.899950,-1.466947), cf_t(-0.285686,-1.625803)}, 2, 4), 11.1156, {{22, -3.914039},{10, -7.170668},}}, -{srs_channel_matrix({cf_t(2.605196,-0.449397), cf_t(0.972375,-0.084292), cf_t(0.256981,-1.991997), cf_t(-0.974240,0.841246), cf_t(-1.146364,-0.414659), cf_t(0.547640,1.912181), cf_t(1.565084,-0.390899), cf_t(-1.693344,0.409182)}, 2, 4), 8.1144, {{23, 1.459961},{10, -3.440890},}}, -{srs_channel_matrix({cf_t(-0.624864,1.196251), cf_t(-1.168723,0.120283), cf_t(0.392575,-1.036843), cf_t(1.301840,-0.857103), cf_t(-0.593642,-0.169874), cf_t(0.436375,-0.191668), cf_t(-0.504362,-0.865815), cf_t(0.102108,0.180664)}, 2, 4), 1.2928, {{27, 4.767162},{21, -0.505018},}}, -{srs_channel_matrix({cf_t(-0.251169,0.540364), cf_t(-0.204570,-0.091539), cf_t(-2.201522,-0.760252), cf_t(-0.774513,-0.693595), cf_t(-1.393273,1.281458), cf_t(-0.386235,-0.809738), cf_t(0.525586,-1.236818), cf_t(1.523269,0.214686), cf_t(1.798494,2.010772), cf_t(-0.116884,0.025554), cf_t(-0.320196,0.308299), cf_t(0.817516,-0.938247), cf_t(0.490159,1.674216), cf_t(0.765251,0.124988), cf_t(0.778279,0.530101), cf_t(-1.480305,-0.952068)}, 4, 4), 0.91942, {{13, 12.328757}, {20, 7.065233}, {6, 4.488540}, {3, 0.803254},}}, -{srs_channel_matrix({cf_t(0.389146,-0.698654), cf_t(-1.156001,0.832771), cf_t(0.039740,-0.694605), cf_t(-0.450599,-0.461883), cf_t(0.109248,0.883617), cf_t(-0.250553,0.435944), cf_t(-0.189902,0.896747), cf_t(-1.032914,0.504732), cf_t(-0.323292,-0.400897), cf_t(0.766527,-0.513848), cf_t(1.744673,0.796368), cf_t(-1.160520,-0.671190), cf_t(2.377412,1.186659), cf_t(1.526078,0.790702), cf_t(0.168508,0.287721), cf_t(-0.301207,0.003226)}, 4, 4), 1.9677, {{13, 5.706799},{11, 2.835869},{2, -0.185431},{0, -1.776047},}}, -{srs_channel_matrix({cf_t(3.526678,1.768992), cf_t(-0.112437,1.510582), cf_t(-1.556594,0.164010), cf_t(1.915102,-0.282764), cf_t(0.609846,1.152166), cf_t(-0.647912,-1.146508), cf_t(2.617335,0.673699), cf_t(0.550950,-0.669113), cf_t(0.294204,-0.400323), cf_t(-0.777844,-0.671802), cf_t(-1.064930,0.575629), cf_t(-1.768414,-0.778094), cf_t(-0.422920,-1.063561), cf_t(-1.053102,0.552978), cf_t(0.647755,-0.423429), cf_t(-0.317628,0.361587)}, 4, 4), 4.1582, {{17, 5.955043},{11, 2.239470},{2, -0.289404},{0, -2.073018},}}, -{srs_channel_matrix({cf_t(0.269541,-1.323334), cf_t(-2.564449,0.128340), cf_t(0.465864,-1.442379), cf_t(1.853561,1.302508), cf_t(1.039289,1.409912), cf_t(0.910897,-1.662543), cf_t(-0.239731,1.943684), cf_t(0.180998,-1.084698), cf_t(0.244250,0.226819), cf_t(0.096393,1.098929), cf_t(-0.830468,0.147189), cf_t(-0.352252,2.295666), cf_t(-0.174775,2.752558), cf_t(-0.480653,0.138318), cf_t(0.836837,-1.907066), cf_t(2.538349,-0.364993)}, 4, 4), 7.3959, {{23, 4.624214},{19, 0.892043},{5, -2.032019},{3, -4.024456},}}, -{srs_channel_matrix({cf_t(-0.764753,0.067454), cf_t(-1.127695,-0.187121), cf_t(0.078189,0.291727), cf_t(2.106630,0.987695), cf_t(-0.715847,0.392935), cf_t(-0.280516,0.194551), cf_t(1.166475,0.279785), cf_t(1.212821,0.051220), cf_t(0.485541,-0.774466), cf_t(1.026016,0.786782), cf_t(0.870726,1.408907), cf_t(-0.381758,-0.534099), cf_t(0.428893,1.927758), cf_t(-0.299131,-0.176248), cf_t(-0.899869,-0.243750), cf_t(0.634745,-0.897601)}, 4, 4), 9.0082, {{26, 0.319062},{11, -3.932389}, {2, -6.367418}, {2, -8.503519},}}, -{srs_channel_matrix({cf_t(-0.952975,-1.633802), cf_t(0.353905,0.761200), cf_t(1.597026,1.193307), cf_t(0.527470,1.632057), cf_t(0.854202,-1.532190), cf_t(1.341847,-1.336852), cf_t(-2.499533,-1.473846), cf_t(-0.167559,-0.041663), cf_t(0.353015,-0.615507), cf_t(0.717254,1.314155), cf_t(-1.304852,-1.455067), cf_t(-1.005869,-1.742349), cf_t(0.790683,0.205305), cf_t(-0.116571,1.192930), cf_t(0.553090,-0.802823), cf_t(-0.960645,-1.265636)}, 4, 4), 4.6986, {{27, 6.537971},{10, 1.141677},{2, -1.575251},{2, -3.747263},}}, -{srs_channel_matrix({cf_t(-1.636447,0.490752), cf_t(0.017344,-0.586126), cf_t(0.828387,0.744900), cf_t(0.217738,-0.828155), cf_t(-1.909245,0.574521), cf_t(-0.536822,0.281841), cf_t(-0.302032,1.139306), cf_t(1.813582,-0.425868), cf_t(0.914852,0.636140), cf_t(-0.057081,0.793178), cf_t(1.309362,-0.898377), cf_t(-1.044736,0.156245), cf_t(-0.348267,1.597254), cf_t(1.412561,0.112440), cf_t(1.502383,-0.308625), cf_t(0.730376,0.456660)}, 4, 4), 4.4293, {{13, 5.887188},{15, 0.572613},{4, -2.557978},{2, -5.054490},}}, -{srs_channel_matrix({cf_t(0.443144,-0.870563), cf_t(-0.134765,-0.497688), cf_t(-0.018328,-0.106672), cf_t(0.460789,-0.687829), cf_t(1.362315,0.331881), cf_t(0.451875,2.365225), cf_t(1.648384,-0.482231), cf_t(-2.028362,0.647448), cf_t(-0.449257,-1.034425), cf_t(0.235993,1.339555), cf_t(-0.835173,-0.969140), cf_t(-1.275955,0.208716), cf_t(0.617035,-0.618593), cf_t(0.612702,0.512016), cf_t(0.289381,0.011354), cf_t(0.395316,-0.043989)}, 4, 4), 0.56976, {{17, 12.293614}, {12, 8.270981}, {1, 4.459924}, {0, 1.953526},}}, -{srs_channel_matrix({cf_t(-0.630046,-0.296348), cf_t(-0.046879,-1.496919), cf_t(2.683026,-0.904834), cf_t(-1.146691,-0.404182), cf_t(0.552999,-0.725798), cf_t(-1.076458,-0.866485), cf_t(1.030640,-0.421847), cf_t(0.327530,-0.942666), cf_t(0.652125,1.341884), cf_t(-0.278861,-0.988435), cf_t(0.245192,1.817943), cf_t(1.472513,-0.374437), cf_t(-2.275102,-1.451741), cf_t(-1.633291,-0.618682), cf_t(0.415469,0.934501), cf_t(-0.654769,1.055929)}, 4, 4), 2.6368, {{15, 7.441655}, {8, 3.113279}, {4, 0.890923},{0, -1.480045},}}, -{srs_channel_matrix({cf_t(0.287400,0.384707), cf_t(0.632906,0.696367), cf_t(-1.459042,-0.112716), cf_t(-0.581710,-0.038824), cf_t(-1.830149,0.088089), cf_t(-0.449103,-0.789656), cf_t(0.949275,1.422961), cf_t(0.717441,0.006332), cf_t(2.287829,0.686481), cf_t(0.166728,-0.854934), cf_t(-2.156491,-1.075235), cf_t(1.689399,-0.090967), cf_t(1.282281,-0.252772), cf_t(-0.582631,1.194824), cf_t(0.222614,0.606064), cf_t(0.779451,0.540514)}, 4, 4), 8.7451, {{19, 1.494477},{17, -2.830749}, {1, -5.088718}, {0, -6.925003},}}, -{srs_channel_matrix({cf_t(-0.967694,0.036223), cf_t(0.202051,-0.364631), cf_t(-0.347878,1.771020), cf_t(1.290088,0.221273), cf_t(1.341154,2.730378), cf_t(-0.580798,-0.296165), cf_t(0.875136,0.564296), cf_t(1.395450,1.582621), cf_t(0.320985,2.729230), cf_t(1.623382,0.303564), cf_t(1.062433,-0.790258), cf_t(0.214105,0.803380), cf_t(0.876803,-1.319903), cf_t(0.194407,-0.273846), cf_t(-0.414892,0.271867), cf_t(0.358459,1.489554)}, 4, 4), 0.91006, {{17, 13.281404}, {17, 8.476553}, {4, 4.225631}, {0, 1.656617},}}, -{srs_channel_matrix({cf_t(-0.027561,-0.473237), cf_t(0.923931,2.184241), cf_t(-0.321280,0.809881), cf_t(0.661125,0.716343), cf_t(1.915294,-1.005571), cf_t(0.156760,0.433987), cf_t(-0.300536,0.520144), cf_t(-0.500035,-1.092245), cf_t(0.716471,-0.225794), cf_t(1.337289,-0.404922), cf_t(2.125680,0.527859), cf_t(0.054046,-1.006963), cf_t(0.163036,1.089027), cf_t(-0.632707,1.784875), cf_t(1.611991,-0.303755), cf_t(-0.075449,-0.008697)}, 4, 4), 1.5814, {{12, 8.147412},{13, 5.225459}, {2, 2.002600}, {2, 0.145322},}}, -{srs_channel_matrix({cf_t(1.203252,-0.364963), cf_t(0.522018,0.117271), cf_t(0.397046,0.174340), cf_t(-0.482811,-0.215656), cf_t(-0.231497,-0.152611), cf_t(0.613385,0.033688), cf_t(1.682851,0.458282), cf_t(0.568394,1.281631), cf_t(-1.206029,0.620090), cf_t(0.433060,-0.286674), cf_t(-0.092121,0.598016), cf_t(-0.244055,-0.245533), cf_t(-0.219189,-1.780737), cf_t(-0.879767,-2.347239), cf_t(-0.320804,-1.713595), cf_t(-0.784415,-0.237127)}, 4, 4), 5.2039, {{26, 2.932870},{11, -1.400166}, {2, -4.287798}, {0, -5.979855},}}, -{srs_channel_matrix({cf_t(-0.720160,0.494233), cf_t(0.040657,0.991440), cf_t(-0.658981,1.077140), cf_t(-0.630515,0.776842), cf_t(0.609625,-2.259840), cf_t(0.782335,-0.564377), cf_t(2.436584,0.901491), cf_t(0.302407,0.394676), cf_t(0.058320,0.004854), cf_t(-0.574134,0.436919), cf_t(-0.195212,1.130073), cf_t(-0.050531,0.153771), cf_t(-1.755775,-0.758627), cf_t(-0.257358,-0.180163), cf_t(0.749542,-0.207790), cf_t(-0.570764,0.896745)}, 4, 4), 2.0757, {{21, 7.773821}, {7, 3.413658},{5, -1.082223},{2, -2.531567},}}, -{srs_channel_matrix({cf_t(0.547520,-0.291910), cf_t(0.147835,0.458445), cf_t(-0.362267,1.755289), cf_t(0.061141,0.931491), cf_t(0.216706,0.825264), cf_t(-1.398122,-0.814807), cf_t(0.178870,-0.534204), cf_t(0.927584,0.242552), cf_t(-0.110178,-0.100648), cf_t(1.572398,-1.625048), cf_t(0.560491,-1.514423), cf_t(-0.420345,1.026189), cf_t(-0.153945,-0.758127), cf_t(-0.275199,2.078345), cf_t(0.241120,-2.221987), cf_t(0.754686,0.448764)}, 4, 4), 3.0085, {{21, 6.119198},{11, 2.208475},{2, -0.886681},{0, -3.051977},}}, -{srs_channel_matrix({cf_t(-0.756239,-0.363569), cf_t(0.404325,0.149556), cf_t(-0.793853,-1.944518), cf_t(0.859783,1.523895), cf_t(0.066869,0.545810), cf_t(-1.639387,2.009927), cf_t(-2.424750,1.416671), cf_t(-0.283830,0.011481), cf_t(1.145806,-0.939049), cf_t(0.181169,-1.738908), cf_t(0.054250,0.016971), cf_t(0.687754,0.219159), cf_t(-1.393407,1.045821), cf_t(1.425366,-0.950983), cf_t(-0.893851,0.794797), cf_t(0.037765,0.071430)}, 4, 4), 7.6688, {{16, 2.329630},{18, -1.891056}, {6, -3.833947}, {0, -5.730489},}}, +{srs_channel_matrix({cf_t(0.537667, -2.258847), cf_t(1.833885, 0.862173)}, 1, 2), 1.9904, {{5, 6.721121},}}, +{srs_channel_matrix({cf_t(-1.307688, 0.342624), cf_t(-0.433592, 3.578397)}, 1, 2), 0.15523, {{4, 18.860710},}}, +{srs_channel_matrix({cf_t(-1.349887, 0.725404), cf_t(3.034923, -0.063055)}, 1, 2), 0.96758, {{3, 10.110059},}}, +{srs_channel_matrix({cf_t(-0.204966, 1.489698), cf_t(-0.124144, 1.409034)}, 1, 2), 0.17958, {{2, 13.746798},}}, +{srs_channel_matrix({cf_t(0.671497, 0.717239), cf_t(-1.207487, 1.630235)}, 1, 2), 1.683, {{5, 4.272519},}}, +{srs_channel_matrix({cf_t(1.034693, -0.303441), cf_t(0.726885, 0.293871)}, 1, 2), 7.6653, {{2, -6.937425},}}, +{srs_channel_matrix({cf_t(0.888396, -1.068870), cf_t(-1.147070, -0.809499)}, 1, 2), 10.1264, {{4, -4.147666},}}, +{srs_channel_matrix({cf_t(1.438380, -0.754928), cf_t(0.325191, 1.370299)}, 1, 2), 14.6286, {{5, -5.093284},}}, +{srs_channel_matrix({cf_t(-0.102242, 0.319207), cf_t(-0.241447, 0.312859)}, 1, 2), 7.2845, {{2, -14.494137},}}, +{srs_channel_matrix({cf_t(-0.030051, 0.627707), cf_t(-0.164879, 1.093266)}, 1, 2), 1.2223, {{2, 0.888649},}}, +{srs_channel_matrix({cf_t(-0.863653, -1.214117), cf_t(0.077359, -1.113501)}, 1, 2), 3.0245, {{2, -0.009346},}}, +{srs_channel_matrix({cf_t(1.532630, 0.371379), cf_t(-0.769666, -0.225584)}, 1, 2), 1.2421, {{3, 3.574097},}}, +{srs_channel_matrix({cf_t(-1.089064, 0.552527), cf_t(0.032557, 1.100610)}, 1, 2), 0.18049, {{4, 11.532158},}}, +{srs_channel_matrix({cf_t(0.085931, -0.742302), cf_t(-1.491590, -1.061582)}, 1, 2), 0.7535, {{4, 6.217135},}}, +{srs_channel_matrix({cf_t(-0.615602, -0.192419), cf_t(0.748077, 0.888610)}, 1, 2), 4.5595, {{3, -4.787585},}}, +{srs_channel_matrix({cf_t(-1.402269, 0.488194), cf_t(-1.422376, -0.177375)}, 1, 2), 4.5388, {{2, -0.508140},}}, +{srs_channel_matrix({cf_t(1.419310, -0.804466), cf_t(0.291584, 0.696624), cf_t(0.197811, 0.835088), cf_t(1.587699, -0.243715)}, 2, 2), 2.4579, {{5, 1.461981},{1, -1.769549},}}, +{srs_channel_matrix({cf_t(-1.165844, 2.585491), cf_t(-1.147953, -0.666891), cf_t(0.104875, 0.187331), cf_t(0.722254, -0.082494)}, 2, 2), 19.2438, {{3, -5.359049},{0, -8.704529},}}, +{srs_channel_matrix({cf_t(-0.438966, 0.100093), cf_t(-1.794679, -0.544529), cf_t(0.840376, 0.303521), cf_t(-0.888032, -0.600327)}, 2, 2), 1.8437, {{2, 3.793230},{1, -1.381617},}}, +{srs_channel_matrix({cf_t(0.739363, -0.839589), cf_t(1.711888, 1.354594), cf_t(-0.194124, -1.072155), cf_t(-2.138355, 0.960954)}, 2, 2), 2.6894, {{5, 5.675573},{1, -0.127439},}}, +{srs_channel_matrix({cf_t(1.436697, 2.908008), cf_t(-1.960900, 0.825219), cf_t(-0.197698, 1.378972), cf_t(-1.207845, -1.058180)}, 2, 2), 3.9818, {{5, 5.877500},{0, -1.128085},}}, +{srs_channel_matrix({cf_t(-0.272469, -2.051816), cf_t(1.098425, -0.353850), cf_t(-0.277872, -0.823587), cf_t(0.701541, -1.577057)}, 2, 2), 0.60834, {{2, 11.062479}, {1, 4.810719},}}, +{srs_channel_matrix({cf_t(0.281984, 0.350179), cf_t(0.033480, -0.299066), cf_t(-1.333678, 0.022890), cf_t(1.127492, -0.261995)}, 2, 2), 11.1938, {{5, -6.496824},{0, -11.256090},}}, +{srs_channel_matrix({cf_t(-0.285651, -0.533557), cf_t(-0.831367, -2.002636), cf_t(-0.979206, 0.964229), cf_t(-1.156402, 0.520060)}, 2, 2), 3.0904, {{4, 4.036525},{0, -3.047601},}}, +{srs_channel_matrix({cf_t(-0.034771, -0.714530), cf_t(-0.798164, 1.351386), cf_t(1.018685, -0.224771), cf_t(-0.133217, -0.589029)}, 2, 2), 3.9371, {{5, -0.388925},{0, -5.971891},}}, +{srs_channel_matrix({cf_t(-0.847926, 0.307535), cf_t(-1.120128, -1.257118), cf_t(2.526000, -0.865468), cf_t(1.655498, -0.176534)}, 2, 2), 0.85554, {{3, 11.018067}, {1, 4.222248},}}, +{srs_channel_matrix({cf_t(-1.332004, 0.391354), cf_t(-2.329867, 0.451679), cf_t(-1.449097, -0.130285), cf_t(0.333511, 0.183689)}, 2, 2), 5.2824, {{2, 0.622089},{0, -3.412172},}}, +{srs_channel_matrix({cf_t(0.862022, -0.334887), cf_t(-1.361694, 0.552783), cf_t(0.455030, 1.039091), cf_t(-0.848709, -1.117639)}, 2, 2), 0.31804, {{5, 12.881381},{1, -0.090114},}}, +{srs_channel_matrix({cf_t(0.660143, -0.303108), cf_t(-0.067866, 0.023046), cf_t(-0.195221, 0.051290), cf_t(-0.217606, 0.826063)}, 2, 2), 0.99725, {{3, -1.167051},{0, -4.904117},}}, +{srs_channel_matrix({cf_t(0.466914, -1.029768), cf_t(-0.209713, 0.949222), cf_t(0.625190, 0.307062), cf_t(0.183227, 0.135175)}, 2, 2), 2.0588, {{5, -0.202222},{0, -4.954878},}}, +{srs_channel_matrix({cf_t(0.261406, -0.532011), cf_t(-0.941486, 1.682104), cf_t(-0.162338, -0.875729), cf_t(-0.146055, -0.483815)}, 2, 2), 7.6775, {{5, -4.163022},{0, -7.803920},}}, +{srs_channel_matrix({cf_t(-1.174212, -0.249025), cf_t(-0.192240, -1.064213), cf_t(-0.274070, 1.603457), cf_t(1.530073, 1.234679)}, 2, 2), 3.5766, {{3, 2.421687},{0, -2.226541},}}, +{srs_channel_matrix({cf_t(-1.506160, -0.947961), cf_t(-0.444628, -0.741106), cf_t(-0.155941, -0.507818), cf_t(0.276068, -0.320576), cf_t(-0.261164, 0.012469), cf_t(0.443422, -3.029177), cf_t(0.391894, -0.457015), cf_t(-1.250679, 1.242448)}, 4, 2), 15.3432, {{2, -1.647274},{0, -5.581959},}}, +{srs_channel_matrix({cf_t(0.933728, 0.041374), cf_t(0.350321, -0.734169), cf_t(-0.029006, -0.030814), cf_t(0.182452, 0.232347), cf_t(-1.565056, 0.426388), cf_t(-0.084539, -0.372809), cf_t(1.603946, -0.236455), cf_t(0.098348, 2.023691)}, 4, 2), 14.2321, {{3, -3.526674},{0, -7.109971},}}, +{srs_channel_matrix({cf_t(2.229446, 0.471634), cf_t(0.337564, -1.212847), cf_t(1.000061, 0.066190), cf_t(-1.664164, 0.652356), cf_t(-0.590035, 0.327060), cf_t(-0.278064, 1.082634), cf_t(0.422716, 1.006077), cf_t(-1.670201, -0.650908)}, 4, 2), 1.5568, {{5, 9.125793},{0, 3.495892},}}, +{srs_channel_matrix({cf_t(-0.944378, 1.250251), cf_t(-1.321789, 0.929789), cf_t(0.924826, 0.239763), cf_t(0.000050, -0.690361), cf_t(-0.054919, -0.651554), cf_t(0.911127, 1.192102), cf_t(0.594584, -1.611830), cf_t(0.350201, -0.024462)}, 4, 2), 7.7488, {{4, 0.762089},{1, -4.385994},}}, +{srs_channel_matrix({cf_t(1.020498, 0.079934), cf_t(0.861716, -0.948481), cf_t(0.001162, 0.411491), cf_t(-0.070837, 0.676978), cf_t(-2.486284, 0.857733), cf_t(0.581172, -0.691159), cf_t(-2.192435, 0.449378), cf_t(-2.319280, 0.100633)}, 4, 2), 0.11899, {{5, 20.774681},{0, 15.551061},}}, +{srs_channel_matrix({cf_t(0.536157, -0.382585), cf_t(0.897888, 0.648679), cf_t(-0.131938, 0.825727), cf_t(-0.147201, -1.014944), cf_t(1.007773, -0.471070), cf_t(-2.123655, 0.137025), cf_t(-0.504586, -0.291863), cf_t(-1.270594, 0.301819)}, 4, 2), 2.0206, {{3, 5.397915},{0, 1.208681},}}, +{srs_channel_matrix({cf_t(-0.929962, -0.020858), cf_t(-0.176830, -0.560665), cf_t(-2.132095, 2.177779), cf_t(1.145362, 1.138465), cf_t(-0.629091, -2.496887), cf_t(-1.203850, 0.441327), cf_t(-0.253945, -1.398138), cf_t(-1.428647, -0.255055)}, 4, 2), 2.6132, {{5, 8.656211},{1, 2.963929},}}, +{srs_channel_matrix({cf_t(0.747734, 0.323213), cf_t(-0.273047, -0.784146), cf_t(1.576300, -1.805373), cf_t(-0.480937, 1.858593), cf_t(0.327512, -0.604530), cf_t(0.664734, 0.103360), cf_t(0.085189, 0.563167), cf_t(0.880953, 0.113597)}, 4, 2), 7.2026, {{3, 0.300607},{0, -3.592447},}}, +{srs_channel_matrix({cf_t(-0.467715, -0.284141), cf_t(-0.124890, -0.086690), cf_t(1.478958, -1.469395), cf_t(-0.860816, 0.192182), cf_t(0.784668, -0.822293), cf_t(0.308623, -0.094241), cf_t(-0.233860, 0.336213), cf_t(-1.056973, -0.904654)}, 4, 2), 5.3694, {{5, 0.662797},{0, -4.016587},}}, +{srs_channel_matrix({cf_t(0.350063, 1.877865), cf_t(-1.835859, 0.940704), cf_t(1.035976, 0.787346), cf_t(2.424461, -0.875874), cf_t(0.959401, 0.319949), cf_t(-0.315772, -0.558294), cf_t(0.428623, -0.311429), cf_t(-1.035985, -0.570010)}, 4, 2), 7.9187, {{4, 2.151205},{0, -2.364794},}}, +{srs_channel_matrix({cf_t(-0.908746, -1.483121), cf_t(-0.209897, -1.020264), cf_t(-1.698864, -0.446995), cf_t(0.607601, 0.109659), cf_t(-0.117798, 1.128736), cf_t(0.699160, -0.289963), cf_t(0.269649, 1.261551), cf_t(0.494287, 0.475425)}, 4, 2), 0.13833, {{4, 17.622018},{1, 11.883528},}}, +{srs_channel_matrix({cf_t(0.126947, -1.096593), cf_t(-0.656816, -0.493010), cf_t(-1.481399, -0.180739), cf_t(0.155489, 0.045841), cf_t(0.818551, -0.063783), cf_t(-0.292588, 0.611335), cf_t(-0.540786, 0.109318), cf_t(-0.308642, 1.814015)}, 4, 2), 1.9538, {{2, 4.388034},{1, 0.568394},}}, +{srs_channel_matrix({cf_t(1.804494, -1.441014), cf_t(-0.723121, 0.401844), cf_t(0.526547, 1.470201), cf_t(-0.260251, -0.326814), cf_t(0.600143, 0.812323), cf_t(0.593931, 0.545540), cf_t(-2.186022, -1.051632), cf_t(-1.327043, 0.397467)}, 4, 2), 4.1255, {{5, 4.941982},{1, -0.039744},}}, +{srs_channel_matrix({cf_t(1.516267, 0.612511), cf_t(-0.032567, -0.054886), cf_t(1.636000, -1.118732), cf_t(-0.425058, -0.626379), cf_t(0.589433, 0.249518), cf_t(-0.062791, -0.993019), cf_t(-2.021959, 0.974950), cf_t(-0.982132, -0.640710)}, 4, 2), 0.3743, {{3, 14.256197}, {1, 9.925905},}}, +{srs_channel_matrix({cf_t(-1.079866, -0.373071), cf_t(0.199189, 0.815489), cf_t(-1.521027, 0.798887), cf_t(-0.723631, 0.120205), cf_t(-0.593250, 0.571248), cf_t(0.401336, 0.412796), cf_t(0.942133, -0.986962), cf_t(0.300486, 0.759568)}, 4, 2), 6.2666, {{3, -0.172373},{1, -4.533946},}}, +{srs_channel_matrix({cf_t(-0.603918, -0.238302), cf_t(0.176947, 0.229597), cf_t(-0.307503, 0.439998), cf_t(-0.131820, -0.616866), cf_t(0.595358, 0.274837), cf_t(1.046833, 0.601102), cf_t(-0.197959, 0.092308), cf_t(0.327678, 1.729841)}, 4, 2), 5.7712, {{3, -1.355727},{0, -5.813710},}}, +{srs_channel_matrix({cf_t(-0.737060, -0.079893), cf_t(-1.749879, 0.898476), cf_t(0.910483, 0.183703), cf_t(0.867083, 0.290790)}, 1, 4), 2.6449, {{14, 2.380825},}}, +{srs_channel_matrix({cf_t(0.439952, -1.854299), cf_t(0.101662, -1.140681), cf_t(2.787335, -1.093343), cf_t(-1.166665, -0.433609)}, 1, 4), 3.4836, {{16, 4.487145},}}, +{srs_channel_matrix({cf_t(-0.218534, 1.778256), cf_t(0.541334, 1.223063), cf_t(0.389266, -1.283256), cf_t(0.751229, -2.328955)}, 1, 4), 1.5722, {{14, 8.488748},}}, +{srs_channel_matrix({cf_t(-1.835639, -0.069214), cf_t(0.066757, -0.507323), cf_t(0.035479, 0.235810), cf_t(2.227168, 0.245805)}, 1, 4), 2.8395, {{27, 2.225421},}}, +{srs_channel_matrix({cf_t(-0.608581, -1.032184), cf_t(-1.222593, 1.331216), cf_t(0.316500, -0.418903), cf_t(-1.342869, -0.140322)}, 1, 4), 1.6254, {{19, 5.103215},}}, +{srs_channel_matrix({cf_t(-0.300111, 0.629335), cf_t(1.029366, -0.213015), cf_t(-0.345066, -0.865697), cf_t(1.012802, -1.043108)}, 1, 4), 3.7232, {{24, -2.281627},}}, +{srs_channel_matrix({cf_t(-0.438141, 1.143679), cf_t(-0.408674, -0.531620), cf_t(0.983545, 0.972566), cf_t(-0.297697, -0.522250)}, 1, 4), 0.92312, {{20, 4.977579},}}, +{srs_channel_matrix({cf_t(0.970738, 0.950993), cf_t(-0.413972, -0.432004), cf_t(-0.438271, 0.648941), cf_t(2.003391, -0.360076)}, 1, 4), 0.79094, {{23, 8.085299},}}, +{srs_channel_matrix({cf_t(1.415849, 0.047471), cf_t(-1.604516, 1.746257), cf_t(1.028853, 0.155388), cf_t(1.457968, -1.237120)}, 1, 4), 6.9927, {{25, -1.039307},}}, +{srs_channel_matrix({cf_t(-0.333407, -0.577086), cf_t(0.713543, 0.144002), cf_t(0.317408, -1.638666), cf_t(0.413610, -0.760090)}, 1, 4), 8.6553, {{24, -4.758370},}}, +{srs_channel_matrix({cf_t(0.519729, -0.689811), cf_t(-0.014160, -0.666699), cf_t(-1.155529, 0.864149), cf_t(-0.009525, 0.113419)}, 1, 4), 0.317, {{18, 8.241568},}}, +{srs_channel_matrix({cf_t(0.883970, 1.170609), cf_t(0.180258, 0.475861), cf_t(0.550855, 1.412233), cf_t(0.682964, 0.022608)}, 1, 4), 3.1919, {{12, 0.634324},}}, +{srs_channel_matrix({cf_t(1.701335, 0.149809), cf_t(-0.509712, 1.404933), cf_t(-0.002855, 1.034122), cf_t(0.919867, 0.291570)}, 1, 4), 6.0777, {{22, -2.455675},}}, +{srs_channel_matrix({cf_t(0.566696, 0.213042), cf_t(-1.382621, 0.879677), cf_t(0.244475, 2.038876), cf_t(0.808439, 0.923932)}, 1, 4), 2.3549, {{13, 3.020281},}}, +{srs_channel_matrix({cf_t(0.641662, 1.224688), cf_t(0.425485, -0.043584), cf_t(-1.314724, 0.582423), cf_t(-0.416411, -1.006500)}, 1, 4), 2.5783, {{27, 0.760560},}}, +{srs_channel_matrix({cf_t(0.600292, -0.939535), cf_t(-1.361515, -0.037533), cf_t(0.347593, -1.896304), cf_t(-0.181843, -2.127977)}, 1, 4), 6.872, {{16, 0.213123},}}, +{srs_channel_matrix({cf_t(-0.990532, 0.093109), cf_t(-1.173032, -0.378157), cf_t(-1.725428, -1.482676), cf_t(0.288228, -0.043819), cf_t(-1.594184, 0.960825), cf_t(0.110219, 1.738245), cf_t(0.787067, -0.430206), cf_t(-0.002227, -1.627323)}, 2, 4), 2.4797, {{24, 5.197610},{20, 0.186947},}}, +{srs_channel_matrix({cf_t(0.376266, 0.317851), cf_t(-0.226950, 0.138048), cf_t(-1.148912, -0.710735), cf_t(2.024333, 0.777004), cf_t(-2.359524, 0.622394), cf_t(-0.509972, 0.647381), cf_t(-1.321626, -0.425632), cf_t(-0.636128, 1.048581)}, 2, 4), 0.29465, {{27, 14.044752}, {10, 8.625050},}}, +{srs_channel_matrix({cf_t(2.508772, 0.555139), cf_t(1.063460, -0.556778), cf_t(1.156922, -0.895113), cf_t(0.052979, -0.409328), cf_t(-1.288386, -0.160887), cf_t(-0.371221, 0.409334), cf_t(-0.757792, -0.952636), cf_t(-0.563969, 0.317317)}, 2, 4), 2.5256, {{14, 6.008590},{10, -0.503156},}}, +{srs_channel_matrix({cf_t(1.324385, -0.892661), cf_t(-0.213170, 1.908512), cf_t(-0.134479, 0.122231), cf_t(-1.171356, 1.047033), cf_t(-1.385263, -0.226920), cf_t(0.310508, -0.162502), cf_t(-0.249489, 0.690052), cf_t(0.503744, 0.555757)}, 2, 4), 9.9904, {{13, -2.271692},{11, -6.442332},}}, +{srs_channel_matrix({cf_t(-1.532693, 0.439411), cf_t(-1.097868, -0.089622), cf_t(-1.415773, 1.021180), cf_t(0.059571, -0.873979), cf_t(-0.411251, 0.414700), cf_t(-0.368011, 0.348441), cf_t(-1.360963, 0.349254), cf_t(0.779567, -0.729247)}, 2, 4), 2.2387, {{12, 5.167847},{12, -0.439300},}}, +{srs_channel_matrix({cf_t(-0.514882, -3.232038), cf_t(-0.896446, -1.086959), cf_t(-1.203268, -1.426436), cf_t(1.037816, -1.014451), cf_t(-0.845944, -0.213267), cf_t(-0.172914, -0.325348), cf_t(-1.208652, 1.944398), cf_t(-0.297127, -0.571773)}, 2, 4), 5.2674, {{13, 4.869396},{15, -1.373769},}}, +{srs_channel_matrix({cf_t(-1.569315, 1.460013), cf_t(-0.477383, 2.050043), cf_t(-1.337977, 0.120501), cf_t(0.030299, -0.989902), cf_t(0.853087, 1.197771), cf_t(0.404253, -0.592656), cf_t(-0.700620, -0.469809), cf_t(-1.630543, 0.886377)}, 2, 4), 19.8562, {{21, -3.125471},{13, -7.925554},}}, +{srs_channel_matrix({cf_t(-1.956754, 0.809972), cf_t(0.420684, 0.173247), cf_t(0.400738, -0.505543), cf_t(0.095142, -1.193306), cf_t(0.496684, 0.646971), cf_t(1.082241, -0.353623), cf_t(0.970448, 0.046435), cf_t(-0.568570, -0.792948)}, 2, 4), 8.9317, {{17, -1.874603},{12, -6.904876},}}, +{srs_channel_matrix({cf_t(0.171586, 0.497981), cf_t(-0.062139, 2.789081), cf_t(1.199028, 0.727572), cf_t(0.801704, -0.773064), cf_t(1.053305, 0.836634), cf_t(-0.748877, -1.128330), cf_t(-0.936326, -1.424470), cf_t(-1.269087, 0.717442)}, 2, 4), 4.8305, {{18, 4.384766},{16, -1.026578},}}, +{srs_channel_matrix({cf_t(0.315986, -1.540877), cf_t(1.406535, -0.203143), cf_t(0.401125, -0.499965), cf_t(0.929660, 0.383024), cf_t(-1.605802, 0.412035), cf_t(0.661536, 0.405493), cf_t(2.138502, -0.363781), cf_t(0.541139, -0.599272)}, 2, 4), 10.6215, {{21, -2.455953},{12, -6.737523},}}, +{srs_channel_matrix({cf_t(0.853541, 0.161364), cf_t(-1.853008, -0.268183), cf_t(-0.207303, -0.409873), cf_t(0.270378, -0.711323), cf_t(-0.652771, 0.061445), cf_t(0.477227, -1.846129), cf_t(-0.071320, -0.398333), cf_t(-0.938301, -0.543548)}, 2, 4), 9.4968, {{22, -3.176380}, {8, -6.338377},}}, +{srs_channel_matrix({cf_t(0.652699, 0.540870), cf_t(-0.734271, -1.262565), cf_t(0.540633, 1.110424), cf_t(0.975841, -0.989563), cf_t(-0.156870, -1.828836), cf_t(0.277799, 1.384499), cf_t(0.639517, -0.062727), cf_t(-0.080978, 0.448921)}, 2, 4), 4.023, {{25, 2.764149},{21, -2.556165},}}, +{srs_channel_matrix({cf_t(-1.020583, 1.147328), cf_t(-3.072989, 0.597865), cf_t(0.626279, -1.281281), cf_t(-0.286685, -2.203264), cf_t(-0.197343, -0.571246), cf_t(0.405605, 0.213996), cf_t(-1.419348, 0.942377), cf_t(-0.729445, 0.093725)}, 2, 4), 9.633, {{25, 1.312246},{21, -4.520607},}}, +{srs_channel_matrix({cf_t(0.306158, -0.462422), cf_t(-1.172335, -0.409785), cf_t(-0.960967, -0.503539), cf_t(-0.653735, 1.233297), cf_t(-1.229394, 0.610305), cf_t(-0.270965, 0.059072), cf_t(-0.899950, -1.466947), cf_t(-0.285686, -1.625803)}, 2, 4), 11.1156, {{22, -3.914039},{10, -7.170668},}}, +{srs_channel_matrix({cf_t(2.605196, -0.449397), cf_t(0.972375, -0.084292), cf_t(0.256981, -1.991997), cf_t(-0.974240, 0.841246), cf_t(-1.146364, -0.414659), cf_t(0.547640, 1.912181), cf_t(1.565084, -0.390899), cf_t(-1.693344, 0.409182)}, 2, 4), 8.1144, {{23, 1.459961},{10, -3.440890},}}, +{srs_channel_matrix({cf_t(-0.624864, 1.196251), cf_t(-1.168723, 0.120283), cf_t(0.392575, -1.036843), cf_t(1.301840, -0.857103), cf_t(-0.593642, -0.169874), cf_t(0.436375, -0.191668), cf_t(-0.504362, -0.865815), cf_t(0.102108, 0.180664)}, 2, 4), 1.2928, {{27, 4.767162},{21, -0.505018},}}, +{srs_channel_matrix({cf_t(-0.251169, 0.540364), cf_t(-0.204570, -0.091539), cf_t(-2.201522, -0.760252), cf_t(-0.774513, -0.693595), cf_t(-1.393273, 1.281458), cf_t(-0.386235, -0.809738), cf_t(0.525586, -1.236818), cf_t(1.523269, 0.214686), cf_t(1.798494, 2.010772), cf_t(-0.116884, 0.025554), cf_t(-0.320196, 0.308299), cf_t(0.817516, -0.938247), cf_t(0.490159, 1.674216), cf_t(0.765251, 0.124988), cf_t(0.778279, 0.530101), cf_t(-1.480305, -0.952068)}, 4, 4), 0.91942, {{13, 12.328757}, {20, 7.065233}, {6, 4.488540}, {3, 0.803254},}}, +{srs_channel_matrix({cf_t(0.389146, -0.698654), cf_t(-1.156001, 0.832771), cf_t(0.039740, -0.694605), cf_t(-0.450599, -0.461883), cf_t(0.109248, 0.883617), cf_t(-0.250553, 0.435944), cf_t(-0.189902, 0.896747), cf_t(-1.032914, 0.504732), cf_t(-0.323292, -0.400897), cf_t(0.766527, -0.513848), cf_t(1.744673, 0.796368), cf_t(-1.160520, -0.671190), cf_t(2.377412, 1.186659), cf_t(1.526078, 0.790702), cf_t(0.168508, 0.287721), cf_t(-0.301207, 0.003226)}, 4, 4), 1.9677, {{13, 5.706799},{11, 2.835869},{2, -0.185431},{0, -1.776047},}}, +{srs_channel_matrix({cf_t(3.526678, 1.768992), cf_t(-0.112437, 1.510582), cf_t(-1.556594, 0.164010), cf_t(1.915102, -0.282764), cf_t(0.609846, 1.152166), cf_t(-0.647912, -1.146508), cf_t(2.617335, 0.673699), cf_t(0.550950, -0.669113), cf_t(0.294204, -0.400323), cf_t(-0.777844, -0.671802), cf_t(-1.064930, 0.575629), cf_t(-1.768414, -0.778094), cf_t(-0.422920, -1.063561), cf_t(-1.053102, 0.552978), cf_t(0.647755, -0.423429), cf_t(-0.317628, 0.361587)}, 4, 4), 4.1582, {{17, 5.955043},{11, 2.239470},{2, -0.289404},{0, -2.073018},}}, +{srs_channel_matrix({cf_t(0.269541, -1.323334), cf_t(-2.564449, 0.128340), cf_t(0.465864, -1.442379), cf_t(1.853561, 1.302508), cf_t(1.039289, 1.409912), cf_t(0.910897, -1.662543), cf_t(-0.239731, 1.943684), cf_t(0.180998, -1.084698), cf_t(0.244250, 0.226819), cf_t(0.096393, 1.098929), cf_t(-0.830468, 0.147189), cf_t(-0.352252, 2.295666), cf_t(-0.174775, 2.752558), cf_t(-0.480653, 0.138318), cf_t(0.836837, -1.907066), cf_t(2.538349, -0.364993)}, 4, 4), 7.3959, {{23, 4.624214},{19, 0.892043},{5, -2.032019},{3, -4.024456},}}, +{srs_channel_matrix({cf_t(-0.764753, 0.067454), cf_t(-1.127695, -0.187121), cf_t(0.078189, 0.291727), cf_t(2.106630, 0.987695), cf_t(-0.715847, 0.392935), cf_t(-0.280516, 0.194551), cf_t(1.166475, 0.279785), cf_t(1.212821, 0.051220), cf_t(0.485541, -0.774466), cf_t(1.026016, 0.786782), cf_t(0.870726, 1.408907), cf_t(-0.381758, -0.534099), cf_t(0.428893, 1.927758), cf_t(-0.299131, -0.176248), cf_t(-0.899869, -0.243750), cf_t(0.634745, -0.897601)}, 4, 4), 9.0082, {{26, 0.319062},{11, -3.932389}, {2, -6.367418}, {2, -8.503519},}}, +{srs_channel_matrix({cf_t(-0.952975, -1.633802), cf_t(0.353905, 0.761200), cf_t(1.597026, 1.193307), cf_t(0.527470, 1.632057), cf_t(0.854202, -1.532190), cf_t(1.341847, -1.336852), cf_t(-2.499533, -1.473846), cf_t(-0.167559, -0.041663), cf_t(0.353015, -0.615507), cf_t(0.717254, 1.314155), cf_t(-1.304852, -1.455067), cf_t(-1.005869, -1.742349), cf_t(0.790683, 0.205305), cf_t(-0.116571, 1.192930), cf_t(0.553090, -0.802823), cf_t(-0.960645, -1.265636)}, 4, 4), 4.6986, {{27, 6.537971},{10, 1.141677},{2, -1.575251},{2, -3.747263},}}, +{srs_channel_matrix({cf_t(-1.636447, 0.490752), cf_t(0.017344, -0.586126), cf_t(0.828387, 0.744900), cf_t(0.217738, -0.828155), cf_t(-1.909245, 0.574521), cf_t(-0.536822, 0.281841), cf_t(-0.302032, 1.139306), cf_t(1.813582, -0.425868), cf_t(0.914852, 0.636140), cf_t(-0.057081, 0.793178), cf_t(1.309362, -0.898377), cf_t(-1.044736, 0.156245), cf_t(-0.348267, 1.597254), cf_t(1.412561, 0.112440), cf_t(1.502383, -0.308625), cf_t(0.730376, 0.456660)}, 4, 4), 4.4293, {{13, 5.887188},{15, 0.572613},{4, -2.557978},{2, -5.054490},}}, +{srs_channel_matrix({cf_t(0.443144, -0.870563), cf_t(-0.134765, -0.497688), cf_t(-0.018328, -0.106672), cf_t(0.460789, -0.687829), cf_t(1.362315, 0.331881), cf_t(0.451875, 2.365225), cf_t(1.648384, -0.482231), cf_t(-2.028362, 0.647448), cf_t(-0.449257, -1.034425), cf_t(0.235993, 1.339555), cf_t(-0.835173, -0.969140), cf_t(-1.275955, 0.208716), cf_t(0.617035, -0.618593), cf_t(0.612702, 0.512016), cf_t(0.289381, 0.011354), cf_t(0.395316, -0.043989)}, 4, 4), 0.56976, {{17, 12.293614}, {12, 8.270981}, {1, 4.459924}, {0, 1.953526},}}, +{srs_channel_matrix({cf_t(-0.630046, -0.296348), cf_t(-0.046879, -1.496919), cf_t(2.683026, -0.904834), cf_t(-1.146691, -0.404182), cf_t(0.552999, -0.725798), cf_t(-1.076458, -0.866485), cf_t(1.030640, -0.421847), cf_t(0.327530, -0.942666), cf_t(0.652125, 1.341884), cf_t(-0.278861, -0.988435), cf_t(0.245192, 1.817943), cf_t(1.472513, -0.374437), cf_t(-2.275102, -1.451741), cf_t(-1.633291, -0.618682), cf_t(0.415469, 0.934501), cf_t(-0.654769, 1.055929)}, 4, 4), 2.6368, {{15, 7.441655}, {8, 3.113279}, {4, 0.890923},{0, -1.480045},}}, +{srs_channel_matrix({cf_t(0.287400, 0.384707), cf_t(0.632906, 0.696367), cf_t(-1.459042, -0.112716), cf_t(-0.581710, -0.038824), cf_t(-1.830149, 0.088089), cf_t(-0.449103, -0.789656), cf_t(0.949275, 1.422961), cf_t(0.717441, 0.006332), cf_t(2.287829, 0.686481), cf_t(0.166728, -0.854934), cf_t(-2.156491, -1.075235), cf_t(1.689399, -0.090967), cf_t(1.282281, -0.252772), cf_t(-0.582631, 1.194824), cf_t(0.222614, 0.606064), cf_t(0.779451, 0.540514)}, 4, 4), 8.7451, {{19, 1.494477},{17, -2.830749}, {1, -5.088718}, {0, -6.925003},}}, +{srs_channel_matrix({cf_t(-0.967694, 0.036223), cf_t(0.202051, -0.364631), cf_t(-0.347878, 1.771020), cf_t(1.290088, 0.221273), cf_t(1.341154, 2.730378), cf_t(-0.580798, -0.296165), cf_t(0.875136, 0.564296), cf_t(1.395450, 1.582621), cf_t(0.320985, 2.729230), cf_t(1.623382, 0.303564), cf_t(1.062433, -0.790258), cf_t(0.214105, 0.803380), cf_t(0.876803, -1.319903), cf_t(0.194407, -0.273846), cf_t(-0.414892, 0.271867), cf_t(0.358459, 1.489554)}, 4, 4), 0.91006, {{17, 13.281404}, {17, 8.476553}, {4, 4.225631}, {0, 1.656617},}}, +{srs_channel_matrix({cf_t(-0.027561, -0.473237), cf_t(0.923931, 2.184241), cf_t(-0.321280, 0.809881), cf_t(0.661125, 0.716343), cf_t(1.915294, -1.005571), cf_t(0.156760, 0.433987), cf_t(-0.300536, 0.520144), cf_t(-0.500035, -1.092245), cf_t(0.716471, -0.225794), cf_t(1.337289, -0.404922), cf_t(2.125680, 0.527859), cf_t(0.054046, -1.006963), cf_t(0.163036, 1.089027), cf_t(-0.632707, 1.784875), cf_t(1.611991, -0.303755), cf_t(-0.075449, -0.008697)}, 4, 4), 1.5814, {{12, 8.147412},{13, 5.225459}, {2, 2.002600}, {2, 0.145322},}}, +{srs_channel_matrix({cf_t(1.203252, -0.364963), cf_t(0.522018, 0.117271), cf_t(0.397046, 0.174340), cf_t(-0.482811, -0.215656), cf_t(-0.231497, -0.152611), cf_t(0.613385, 0.033688), cf_t(1.682851, 0.458282), cf_t(0.568394, 1.281631), cf_t(-1.206029, 0.620090), cf_t(0.433060, -0.286674), cf_t(-0.092121, 0.598016), cf_t(-0.244055, -0.245533), cf_t(-0.219189, -1.780737), cf_t(-0.879767, -2.347239), cf_t(-0.320804, -1.713595), cf_t(-0.784415, -0.237127)}, 4, 4), 5.2039, {{26, 2.932870},{11, -1.400166}, {2, -4.287798}, {0, -5.979855},}}, +{srs_channel_matrix({cf_t(-0.720160, 0.494233), cf_t(0.040657, 0.991440), cf_t(-0.658981, 1.077140), cf_t(-0.630515, 0.776842), cf_t(0.609625, -2.259840), cf_t(0.782335, -0.564377), cf_t(2.436584, 0.901491), cf_t(0.302407, 0.394676), cf_t(0.058320, 0.004854), cf_t(-0.574134, 0.436919), cf_t(-0.195212, 1.130073), cf_t(-0.050531, 0.153771), cf_t(-1.755775, -0.758627), cf_t(-0.257358, -0.180163), cf_t(0.749542, -0.207790), cf_t(-0.570764, 0.896745)}, 4, 4), 2.0757, {{21, 7.773821}, {7, 3.413658},{5, -1.082223},{2, -2.531567},}}, +{srs_channel_matrix({cf_t(0.547520, -0.291910), cf_t(0.147835, 0.458445), cf_t(-0.362267, 1.755289), cf_t(0.061141, 0.931491), cf_t(0.216706, 0.825264), cf_t(-1.398122, -0.814807), cf_t(0.178870, -0.534204), cf_t(0.927584, 0.242552), cf_t(-0.110178, -0.100648), cf_t(1.572398, -1.625048), cf_t(0.560491, -1.514423), cf_t(-0.420345, 1.026189), cf_t(-0.153945, -0.758127), cf_t(-0.275199, 2.078345), cf_t(0.241120, -2.221987), cf_t(0.754686, 0.448764)}, 4, 4), 3.0085, {{21, 6.119198},{11, 2.208475},{2, -0.886681},{0, -3.051977},}}, +{srs_channel_matrix({cf_t(-0.756239, -0.363569), cf_t(0.404325, 0.149556), cf_t(-0.793853, -1.944518), cf_t(0.859783, 1.523895), cf_t(0.066869, 0.545810), cf_t(-1.639387, 2.009927), cf_t(-2.424750, 1.416671), cf_t(-0.283830, 0.011481), cf_t(1.145806, -0.939049), cf_t(0.181169, -1.738908), cf_t(0.054250, 0.016971), cf_t(0.687754, 0.219159), cf_t(-1.393407, 1.045821), cf_t(1.425366, -0.950983), cf_t(-0.893851, 0.794797), cf_t(0.037765, 0.071430)}, 4, 4), 7.6688, {{16, 2.329630},{18, -1.891056}, {6, -3.833947}, {0, -5.730489},}}, // clang-format on }; From a31d447a0a26d253c912ebf5d985c4051653f52e Mon Sep 17 00:00:00 2001 From: dvdgrgrtt Date: Thu, 15 Feb 2024 12:01:10 +0100 Subject: [PATCH 67/78] docs: fix typos --- include/srsran/phy/upper/channel_processors/pucch_processor.h | 4 ++-- lib/phy/upper/signal_processors/pucch/pucch_helper.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/srsran/phy/upper/channel_processors/pucch_processor.h b/include/srsran/phy/upper/channel_processors/pucch_processor.h index 51b444b724..0c99bcfcec 100644 --- a/include/srsran/phy/upper/channel_processors/pucch_processor.h +++ b/include/srsran/phy/upper/channel_processors/pucch_processor.h @@ -68,8 +68,8 @@ class pucch_processor optional second_hop_prb; /// \brief Parameter \f$n_{\textup{ID}}\f$ in TS38.211 Section 6.3.2.2.1 {0, ..., 1023}. /// - /// It must be set to the higher layer parameter \e hopingID given by TS38.331 Section 6.3.2, Information Element \e - /// PUCCH-ConfigCommon, if it is configured. Otherwise, it must be equal to the physical cell identifier + /// It must be set to the higher layer parameter \e hoppingID given by TS38.331 Section 6.3.2, Information Element + /// \e PUCCH-ConfigCommon, if it is configured. Otherwise, it must be equal to the physical cell identifier /// \f$N_{\textup{ID}}^{\textup{cell}}\f$. unsigned n_id; /// Number of expected HARQ-ACK bits {0, 1, 2} (see also \ref PUCCH_payload_size "here"). diff --git a/lib/phy/upper/signal_processors/pucch/pucch_helper.h b/lib/phy/upper/signal_processors/pucch/pucch_helper.h index ff0167167b..7291b38fcb 100644 --- a/lib/phy/upper/signal_processors/pucch/pucch_helper.h +++ b/lib/phy/upper/signal_processors/pucch/pucch_helper.h @@ -59,7 +59,7 @@ class pucch_helper /// /// \param slot[in] Current slot /// \param cp[in] Cyclic prefix type - /// \param n_id[in] Higher layer parameter hopingID if configured, physical cell id otherwise + /// \param n_id[in] Higher layer parameter hoppingID if configured, physical cell id otherwise /// \param symbol[in] OFDM symbol index in the slot /// \param m0[in] Initial cyclic shift /// \param m_cs[in] Cyclic shift From 72374463589b2425e0538f1f4a165cbc4dc6021b Mon Sep 17 00:00:00 2001 From: asaezper Date: Thu, 15 Feb 2024 14:49:42 +0100 Subject: [PATCH 68/78] ci,e2e: ping retry --- tests/e2e/tests/ping.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/e2e/tests/ping.py b/tests/e2e/tests/ping.py index 73984089d6..ebc3d45efc 100644 --- a/tests/e2e/tests/ping.py +++ b/tests/e2e/tests/ping.py @@ -140,6 +140,7 @@ def test_android_hp( ), ) @mark.zmq +@mark.flaky(reruns=2, only_rerun=["Some packages got lost"]) # pylint: disable=too-many-arguments def test_zmq( retina_manager: RetinaTestManager, From 732d8af644c92fd32aaa6bc347754ec49a55fd11 Mon Sep 17 00:00:00 2001 From: asaezper Date: Thu, 15 Feb 2024 14:49:56 +0100 Subject: [PATCH 69/78] ci: viavi build with minimal asserts --- .gitlab/ci/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index ea2c5cbb1c..29c44d7f9c 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -1775,6 +1775,7 @@ basic avx512 dpdk: DPDK_VERSION: "23.11" AUTO_DETECT_ISA: "True" ENABLE_AVX512: "True" + ASSERT_LEVEL: MINIMAL SAVE_ARTIFACTS: "True" KUBERNETES_CPU_REQUEST: 14 KUBERNETES_CPU_LIMIT: 14 From 5288ccd61fbff83c634950bb39dada1601509b80 Mon Sep 17 00:00:00 2001 From: asaezper Date: Thu, 15 Feb 2024 14:50:09 +0100 Subject: [PATCH 70/78] ci: small config change --- .gitlab/configuration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/configuration.json b/.gitlab/configuration.json index 2f8fb08d72..29892aadc2 100644 --- a/.gitlab/configuration.json +++ b/.gitlab/configuration.json @@ -37,7 +37,7 @@ "keep_n": 25, "older_than": "7d", "name_regex": ".*", - "name_regex_keep": "" + "name_regex_keep": null }, "container_registry_access_level": "enabled", "default_branch": "dev", From 6b805f73d5f3228aa4fcbd28e76552789f5bc16f Mon Sep 17 00:00:00 2001 From: asaezper Date: Thu, 15 Feb 2024 14:50:20 +0100 Subject: [PATCH 71/78] ci,builders: refactor debian to reduce layers --- .gitlab/ci/builders/debian/Dockerfile | 42 ++++++++++++--------------- .gitlab/ci/e2e/.env | 2 +- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/.gitlab/ci/builders/debian/Dockerfile b/.gitlab/ci/builders/debian/Dockerfile index cf290d3908..f3d7c6129f 100644 --- a/.gitlab/ci/builders/debian/Dockerfile +++ b/.gitlab/ci/builders/debian/Dockerfile @@ -10,29 +10,25 @@ ARG VERSION=22.04 ARG OS_NAME=ubuntu FROM $OS_NAME:$VERSION -ADD install_dependencies.sh /usr/local/bin -RUN chmod +x /usr/local/bin/install_dependencies.sh - -RUN TZ=Europe/Madrid && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN install_dependencies.sh && apt-get install -y --no-install-recommends \ - git git-lfs \ - clang llvm \ - ccache gcovr valgrind \ - python3-dev python3-venv \ - && apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* && git lfs install - -RUN (DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends libclang-rt-dev || true) \ - && apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* - -ADD builder.sh /usr/local/bin -RUN chmod +x /usr/local/bin/builder.sh - -RUN python3 -m venv /usr/local/builder_tools -RUN /usr/local/builder_tools/bin/pip install "pandas<3" "psutil" -ADD changed_tests.py /usr/local/bin -RUN chmod +x /usr/local/bin/changed_tests.py -ADD ram_reporter.py /usr/local/bin -RUN chmod +x /usr/local/bin/ram_reporter.py +RUN TZ=Europe/Madrid && \ + ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \ + echo $TZ > /etc/timezone && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + git git-lfs \ + clang llvm \ + ccache gcovr valgrind \ + python3-dev python3-venv && \ + (apt-get install -y --no-install-recommends libclang-rt-dev || true) && \ + apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* && \ + git lfs install + +ADD install_dependencies.sh builder.sh changed_tests.py ram_reporter.py /usr/local/bin/ +RUN chmod +x /usr/local/bin/install_dependencies.sh /usr/local/bin/builder.sh /usr/local/bin/changed_tests.py /usr/local/bin/ram_reporter.py && \ + /usr/local/bin/install_dependencies.sh && \ + apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* && \ + python3 -m venv /usr/local/builder_tools && \ + /usr/local/builder_tools/bin/pip install "pandas<3" "psutil" ADD uhd /opt/uhd ADD dpdk /opt/dpdk diff --git a/.gitlab/ci/e2e/.env b/.gitlab/ci/e2e/.env index 258dc00fe5..45b370974d 100644 --- a/.gitlab/ci/e2e/.env +++ b/.gitlab/ci/e2e/.env @@ -1,6 +1,6 @@ SRSGNB_REGISTRY_URI=registry.gitlab.com/softwareradiosystems/srsgnb RETINA_REGISTRY_PREFIX=registry.gitlab.com/softwareradiosystems/ci/retina -RETINA_VERSION=0.42.1 +RETINA_VERSION=0.42.2 AMARISOFT_VERSION=2023-03-17 SRSUE_VERSION=23.11 OPEN5GS_VERSION=2.6.1 From 43eb8362c20fd68e282a698dc95d98a3d5ca6a55 Mon Sep 17 00:00:00 2001 From: asaezper Date: Thu, 15 Feb 2024 15:19:40 +0100 Subject: [PATCH 72/78] ci: disable n300,x300 tests --- .gitlab/ci/e2e.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab/ci/e2e.yml b/.gitlab/ci/e2e.yml index 2649149aed..13f651d40b 100644 --- a/.gitlab/ci/e2e.yml +++ b/.gitlab/ci/e2e.yml @@ -323,6 +323,7 @@ test mode ue: test mode ue tsan: extends: test mode ue + allow_failure: true needs: - job: "basic tsan" artifacts: true @@ -331,6 +332,7 @@ test mode ue tsan: test mode ue asan: extends: test mode ue + allow_failure: true needs: - job: "basic asan" artifacts: true @@ -339,6 +341,7 @@ test mode ue asan: test mode ue memcheck: extends: test mode ue + allow_failure: true needs: - job: "basic memcheck" artifacts: true @@ -364,6 +367,7 @@ test mode ru tsan: extends: test mode ru variables: E2E_LOG_LEVEL: "warning" + allow_failure: true needs: - job: "basic tsan" artifacts: true @@ -374,6 +378,7 @@ test mode ru asan: extends: test mode ru variables: E2E_LOG_LEVEL: "warning" + allow_failure: true needs: - job: "basic asan" artifacts: true @@ -384,6 +389,7 @@ test mode ru memcheck: extends: test mode ru variables: E2E_LOG_LEVEL: "warning" + allow_failure: true needs: - job: "basic memcheck" artifacts: true @@ -448,6 +454,10 @@ android b200: android x300: stage: rf extends: .e2e-run + rules: + - if: $CI_DESCRIPTION =~ /Nightly E2E Tests/ + when: manual + allow_failure: true variables: GROUP: "rf" TESTBED: "android_x300" From 3b3c8d9c91676b27b157d275d9421f36f3e28a83 Mon Sep 17 00:00:00 2001 From: asaezper Date: Thu, 15 Feb 2024 18:14:24 +0100 Subject: [PATCH 73/78] ci,e2e: test mode jobs fixed --- .gitlab/ci/e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/e2e.yml b/.gitlab/ci/e2e.yml index 13f651d40b..374817a234 100644 --- a/.gitlab/ci/e2e.yml +++ b/.gitlab/ci/e2e.yml @@ -313,7 +313,7 @@ test mode ue: GROUP: "test_mode" TESTBED: "test_mode" MARKERS: "test_mode" - KEYWORD: "test_ue" + KEYWORDS: "test_ue" E2E_LOG_LEVEL: "warning" needs: - job: "basic relwithdeb" @@ -355,7 +355,7 @@ test mode ru: GROUP: "test_mode" TESTBED: "test_mode" MARKERS: "test_mode" - KEYWORD: "test_ru" + KEYWORDS: "test_ru" E2E_LOG_LEVEL: "info" needs: - job: "basic relwithdeb" From 16f0555c8a215eb9fa99b563088e2b6889a7fb44 Mon Sep 17 00:00:00 2001 From: Robert Falkenberg Date: Wed, 14 Feb 2024 21:39:52 +0100 Subject: [PATCH 74/78] rlc_tx_am: no ReTx of unsent bytes for NACK'ed SDU under segmentation This prevents the ReTx overtaking the actual transmission of an SDU under segmentation, as ReTx has priority. If such ReTx is ACK'ed by the peer, the original SDU under segmentation falls out of the tx_window. --- lib/rlc/rlc_tx_am_entity.cpp | 19 ++++++-- tests/unittests/rlc/rlc_tx_am_test.cpp | 60 ++++++++++++++++++++++++-- 2 files changed, 72 insertions(+), 7 deletions(-) diff --git a/lib/rlc/rlc_tx_am_entity.cpp b/lib/rlc/rlc_tx_am_entity.cpp index 36d1bd619f..9a936307e0 100644 --- a/lib/rlc/rlc_tx_am_entity.cpp +++ b/lib/rlc/rlc_tx_am_entity.cpp @@ -147,8 +147,8 @@ size_t rlc_tx_am_entity::pull_pdu(span rlc_pdu_buf) pcap.push_pdu(pcap_context, rlc_pdu_buf.subspan(0, pdu_len)); return pdu_len; } - sn_under_segmentation = INVALID_RLC_SN; logger.log_error("SDU under segmentation does not exist in tx_window. sn={}", sn_under_segmentation); + sn_under_segmentation = INVALID_RLC_SN; // attempt to send next SDU } @@ -745,16 +745,27 @@ bool rlc_tx_am_entity::handle_nack(rlc_am_status_nack nack) return false; } - uint32_t sdu_length = (*tx_window)[nack.nack_sn].sdu.length(); + const rlc_tx_am_sdu_info& sdu_info = (*tx_window)[nack.nack_sn]; + uint32_t sdu_length = sdu_info.sdu.length(); // Convert NACK for full SDUs into NACK with segment offset and length if (!nack.has_so) { nack.so_start = 0; nack.so_end = sdu_length - 1; } - // Replace "end"-mark with actual SDU length if (nack.so_end == rlc_am_status_nack::so_end_of_sdu) { - nack.so_end = sdu_length - 1; + if (nack.nack_sn != sn_under_segmentation) { + // Replace "end"-mark with actual SDU length + nack.so_end = sdu_length - 1; + } else { + // The SDU is still under segmentation; RETX only what was already sent; avoid RETX overtaking the original + if (sdu_info.next_so == 0) { + logger.log_error( + "Cannot RETX sn_under_segmentation={} with invalid next_so={}", sn_under_segmentation, sdu_info.next_so); + return false; + } + nack.so_end = sdu_info.next_so - 1; + } } // Sanity checks if (nack.so_start > nack.so_end) { diff --git a/tests/unittests/rlc/rlc_tx_am_test.cpp b/tests/unittests/rlc/rlc_tx_am_test.cpp index a8a3ec6dc2..1eeceee643 100644 --- a/tests/unittests/rlc/rlc_tx_am_test.cpp +++ b/tests/unittests/rlc/rlc_tx_am_test.cpp @@ -191,8 +191,12 @@ class rlc_tx_am_test : public ::testing::Test, public ::testing::WithParamInterf /// \param[in] pdu_size Maximum size of each PDU that is read from RLC AM entity /// \param[in] n_sdus Number of SDUs to push into RLC AM entity /// \param[in] sdu_size Size of each SDU that is pushed into RLC AM entity - void - tx_segmented_pdus(byte_buffer_chain* out_pdus, uint32_t n_pdus, uint32_t pdu_size, uint32_t n_sdus, uint32_t sdu_size) + void tx_segmented_pdus(byte_buffer_chain* out_pdus, + uint32_t n_pdus, + uint32_t pdu_size, + uint32_t n_sdus, + uint32_t sdu_size, + uint32_t expect_remaining_bytes = 0) { uint32_t header_min_size = sn_size == rlc_am_sn_size::size12bits ? 2 : 3; uint32_t header_so_size = 2; @@ -278,7 +282,7 @@ class rlc_tx_am_test : public ::testing::Test, public ::testing::WithParamInterf sdu_so += out_pdus[i].length() - header_size; } } - EXPECT_EQ(rlc->get_buffer_state(), 0); + EXPECT_EQ(rlc->get_buffer_state(), expect_remaining_bytes); EXPECT_EQ(tester->bsr, expect_buffer_state); // pull_pdu does not push BSR to lower layer EXPECT_EQ(tester->bsr_count, n_bsr); } @@ -947,6 +951,56 @@ TEST_P(rlc_tx_am_test, retx_pdu_last_segment_without_segmentation) EXPECT_EQ(tester->highest_delivered_pdcp_sn_list.front(), 2); } +TEST_P(rlc_tx_am_test, retx_sn_under_segmentation) +{ + const uint32_t n_sdus = 5; + const uint32_t sdu_size = 9; + + const uint32_t n_splits = 3; + + const uint32_t n_pdus = n_sdus * n_splits - 1; + const uint32_t header_size = (sn_size == rlc_am_sn_size::size12bits ? 2 : 3); + const uint32_t so_size = 2; + const uint32_t pdu_size = header_size + so_size + (sdu_size / n_splits); + byte_buffer_chain pdus[n_pdus]; + + const uint32_t unsent_sdu_bytes = sdu_size / n_splits - so_size; // subtract 2 extra bytes from 1st segment (no SO) + tx_segmented_pdus(pdus, n_pdus, pdu_size, n_sdus, sdu_size, unsent_sdu_bytes + header_size + so_size); + + // NACK SN=4 2:65535 => this SN is currently under segmentation; ReTx only the parts that haven't been sent yet. + rlc_am_status_nack nack = {}; + nack.nack_sn = 4; + nack.has_so = true; + nack.so_start = so_size + (sdu_size / n_splits); // assume 1st segment is received properly + nack.so_end = nack.so_end_of_sdu; // the rest is missing + { + rlc_am_status_pdu status_pdu(sn_size); + status_pdu.ack_sn = n_sdus; + status_pdu.push_nack(nack); + rlc->on_status_pdu(std::move(status_pdu)); + } + pcell_worker.run_pending_tasks(); + + const uint32_t retx_bytes = sdu_size - nack.so_start - unsent_sdu_bytes; + EXPECT_EQ(rlc->get_buffer_state(), unsent_sdu_bytes + header_size + so_size + header_size + so_size + retx_bytes); + + // read the ReTx segment which shall only include bytes that were already sent + std::vector pdu_buf; + size_t pdu_len; + pdu_buf.resize(header_size + so_size + retx_bytes); + pdu_len = rlc->pull_pdu(pdu_buf); + pdu_buf.resize(pdu_len); + EXPECT_EQ(pdu_len, header_size + so_size + retx_bytes); + + // read the rest of the SDU under segmentation that was not yet sent + EXPECT_EQ(rlc->get_buffer_state(), unsent_sdu_bytes + header_size + so_size); + pdu_buf.resize(unsent_sdu_bytes + header_size + so_size); + pdu_len = rlc->pull_pdu(pdu_buf); + pdu_buf.resize(pdu_len); + + EXPECT_EQ(rlc->get_buffer_state(), 0); +} + TEST_P(rlc_tx_am_test, retx_pdu_segment_invalid_so_start_and_so_end) { const uint32_t sdu_size = 3; From 5619ead007fa8e696a4003c26796d48f22dda4ee Mon Sep 17 00:00:00 2001 From: asaezper Date: Fri, 16 Feb 2024 09:53:40 +0100 Subject: [PATCH 75/78] ci: increase cppcheck resources --- .gitlab-ci.yml | 12 ++++++------ .gitlab/ci/builders.yml | 9 +++++++++ .gitlab/ci/builders/codechecker/Dockerfile | 2 +- .gitlab/ci/e2e.yml | 3 --- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fdff246081..d5001c184f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -144,10 +144,10 @@ full-code-format: ANALYZER: "" ANALYZER_ARGS: "" ARTIFACT_EXTRA_PATH: "" - KUBERNETES_CPU_REQUEST: "3.5" - KUBERNETES_CPU_LIMIT: "3.5" - KUBERNETES_MEMORY_REQUEST: 6Gi - KUBERNETES_MEMORY_LIMIT: 6Gi + KUBERNETES_CPU_REQUEST: 6 + KUBERNETES_CPU_LIMIT: 6 + KUBERNETES_MEMORY_REQUEST: 12Gi + KUBERNETES_MEMORY_LIMIT: 12Gi before_script: - | echo " @@ -169,7 +169,7 @@ full-code-format: cmake -DASSERT_LEVEL=PARANOID -DAUTO_DETECT_ISA=False -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_TESTS=False .. make srsran_build_info # needed to generate hashes.h script: - - static-analyzer.sh -i /tmp/codechecker_skip --analyzers ${ANALYZER} ${ANALYZER_ARGS} $CI_PROJECT_DIR + - static-analyzer.sh -i /tmp/codechecker_skip --jobs ${KUBERNETES_CPU_REQUEST} --analyzers ${ANALYZER} ${ANALYZER_ARGS} $CI_PROJECT_DIR after_script: - mv codechecker_html codechecker-${ANALYZER}-html artifacts: &codechecker_artifacts @@ -201,7 +201,7 @@ cppcheck: interruptible: false variables: ANALYZER: cppcheck - ANALYZER_ARGS: --cppcheck-max-template-recursion 10 + ANALYZER_ARGS: --cppcheck-max-template-recursion 5 artifacts: <<: *codechecker_artifacts expire_in: 1 day diff --git a/.gitlab/ci/builders.yml b/.gitlab/ci/builders.yml index 91cdbf1a22..114245fc7f 100644 --- a/.gitlab/ci/builders.yml +++ b/.gitlab/ci/builders.yml @@ -316,6 +316,15 @@ image-build-publish [codechecker]: cache: - !reference [.fetch_src_cache, cache] +alternative-tag [codechecker]: + extends: .docker copy + stage: alt registries + script: + - | + skopeo copy \ + docker://${CR_REGISTRY_URI}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/codechecker:${DOCKER_BUILDER_VERSION} \ + docker://${GITLAB_REGISTRY_URI}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/codechecker:${DOCKER_BUILDER_VERSION} + ################################################################################ # Ubuntu 20.04 ################################################################################ diff --git a/.gitlab/ci/builders/codechecker/Dockerfile b/.gitlab/ci/builders/codechecker/Dockerfile index dd6e841cd7..c30c3d1636 100644 --- a/.gitlab/ci/builders/codechecker/Dockerfile +++ b/.gitlab/ci/builders/codechecker/Dockerfile @@ -8,7 +8,7 @@ ARG CR_REGISTRY_URI ARG CI_TOOLS_REPO -ARG CODECHECKER_VERSION=1.0.0 +ARG CODECHECKER_VERSION=1.0.1 FROM ${CR_REGISTRY_URI}/${CI_TOOLS_REPO}/codechecker:${CODECHECKER_VERSION} diff --git a/.gitlab/ci/e2e.yml b/.gitlab/ci/e2e.yml index 374817a234..42631a0489 100644 --- a/.gitlab/ci/e2e.yml +++ b/.gitlab/ci/e2e.yml @@ -323,7 +323,6 @@ test mode ue: test mode ue tsan: extends: test mode ue - allow_failure: true needs: - job: "basic tsan" artifacts: true @@ -332,7 +331,6 @@ test mode ue tsan: test mode ue asan: extends: test mode ue - allow_failure: true needs: - job: "basic asan" artifacts: true @@ -341,7 +339,6 @@ test mode ue asan: test mode ue memcheck: extends: test mode ue - allow_failure: true needs: - job: "basic memcheck" artifacts: true From 42b9cd85dd58917d3348da40dbbaa3c9a1e8c955 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Fri, 16 Feb 2024 10:07:44 +0100 Subject: [PATCH 76/78] sched: shorten MAC DL PDU logging for long lists of SDUs --- lib/mac/mac_dl/dl_sch_pdu_assembler.cpp | 57 ++++++++++++++++++------- lib/mac/mac_dl/dl_sch_pdu_assembler.h | 11 +++-- 2 files changed, 49 insertions(+), 19 deletions(-) diff --git a/lib/mac/mac_dl/dl_sch_pdu_assembler.cpp b/lib/mac/mac_dl/dl_sch_pdu_assembler.cpp index 79d48fc403..751deb82a6 100644 --- a/lib/mac/mac_dl/dl_sch_pdu_assembler.cpp +++ b/lib/mac/mac_dl/dl_sch_pdu_assembler.cpp @@ -171,25 +171,40 @@ void dl_sch_pdu::encode_subheader(bool F_bit, lcid_dl_sch_t lcid, unsigned heade // ///////////////////////// -class dl_sch_pdu_assembler::dl_sch_pdu_logger +class dl_sch_pdu_assembler::pdu_log_builder { public: - explicit dl_sch_pdu_logger(du_ue_index_t ue_index_, rnti_t rnti_, units::bytes tbs_, srslog::basic_logger& logger_) : - ue_index(ue_index_), rnti(rnti_), tbs(tbs_), logger(logger_) + explicit pdu_log_builder(du_ue_index_t ue_index_, + rnti_t rnti_, + units::bytes tbs_, + fmt::memory_buffer& fmtbuf_, + srslog::basic_logger& logger_) : + ue_index(ue_index_), rnti(rnti_), tbs(tbs_), logger(logger_), fmtbuf(fmtbuf_), enabled(logger.info.enabled()) { + fmtbuf.clear(); } void add_sdu(lcid_t lcid, unsigned len) { - if (not logger.info.enabled()) { + if (not enabled) { return; } - fmt::format_to(fmtbuf, "{}SDU: lcid={} size={}", separator(), lcid, len); + if (lcid != current_sdu_lcid) { + if (current_sdu_lcid != lcid_t::INVALID_LCID) { + fmt::format_to(fmtbuf, "SDU: lcid={} nof_sdus={} total_size={}", current_sdu_lcid, nof_sdus, sum_bytes); + } + current_sdu_lcid = lcid; + nof_sdus = 1; + sum_bytes = units::bytes{len}; + } else { + nof_sdus++; + sum_bytes += units::bytes{len}; + } } void add_conres_id(const ue_con_res_id_t& conres) { - if (not logger.info.enabled()) { + if (not enabled) { return; } fmt::format_to(fmtbuf, "{}CON_RES: id={:x}", separator(), fmt::join(conres, "")); @@ -197,7 +212,7 @@ class dl_sch_pdu_assembler::dl_sch_pdu_logger void add_ta_cmd(const ta_cmd_ce_payload& ce_payload) { - if (not logger.info.enabled()) { + if (not enabled) { return; } fmt::format_to(fmtbuf, "{}TA_CMD: tag_id={}, ta_cmd={}", separator(), ce_payload.tag_id, ce_payload.ta_cmd); @@ -205,20 +220,32 @@ class dl_sch_pdu_assembler::dl_sch_pdu_logger void log() { - if (not logger.info.enabled()) { + if (not enabled) { return; } + + // Log pending LCID SDUs. + if (current_sdu_lcid != lcid_t::INVALID_LCID) { + fmt::format_to(fmtbuf, "SDU: lcid={} nof_sdus={} total_size={}", current_sdu_lcid, nof_sdus, sum_bytes); + } + logger.info("DL PDU: ue={} rnti={} size={}: {}", ue_index, rnti, tbs, to_c_str(fmtbuf)); } private: const char* separator() const { return fmtbuf.size() == 0 ? "" : ", "; } - du_ue_index_t ue_index; - rnti_t rnti; - units::bytes tbs; + du_ue_index_t ue_index; + rnti_t rnti; + units::bytes tbs; + srslog::basic_logger& logger; - fmt::memory_buffer fmtbuf; + fmt::memory_buffer& fmtbuf; + const bool enabled; + + lcid_t current_sdu_lcid = lcid_t::INVALID_LCID; + unsigned nof_sdus = 0; + units::bytes sum_bytes{0U}; }; // ///////////////////////// @@ -247,7 +274,7 @@ span dl_sch_pdu_assembler::assemble_newtx_pdu(rnti_t } dl_sch_pdu ue_pdu(buffer.first(tb_size_bytes)); - dl_sch_pdu_logger pdu_logger{ue_mng.get_ue_index(rnti), rnti, units::bytes{tb_size_bytes}, logger}; + pdu_log_builder pdu_logger{ue_mng.get_ue_index(rnti), rnti, units::bytes{tb_size_bytes}, fmtbuf, logger}; // Encode added subPDUs. for (const dl_msg_lc_info& sched_lch : tb_info.lc_chs_to_sched) { @@ -275,7 +302,7 @@ span dl_sch_pdu_assembler::assemble_newtx_pdu(rnti_t void dl_sch_pdu_assembler::assemble_sdus(dl_sch_pdu& ue_pdu, rnti_t rnti, const dl_msg_lc_info& lc_grant_info, - dl_sch_pdu_logger& pdu_logger) + pdu_log_builder& pdu_logger) { // Note: Do not attempt to build an SDU if there is not enough space for the MAC subheader, min payload size and // potential RLC header. @@ -354,7 +381,7 @@ void dl_sch_pdu_assembler::assemble_sdus(dl_sch_pdu& ue_pdu, void dl_sch_pdu_assembler::assemble_ce(dl_sch_pdu& ue_pdu, rnti_t rnti, const dl_msg_lc_info& subpdu, - dl_sch_pdu_logger& pdu_logger) + pdu_log_builder& pdu_logger) { switch (subpdu.lcid.value()) { case lcid_dl_sch_t::UE_CON_RES_ID: { diff --git a/lib/mac/mac_dl/dl_sch_pdu_assembler.h b/lib/mac/mac_dl/dl_sch_pdu_assembler.h index 45307ee277..dfe147f4cc 100644 --- a/lib/mac/mac_dl/dl_sch_pdu_assembler.h +++ b/lib/mac/mac_dl/dl_sch_pdu_assembler.h @@ -110,16 +110,19 @@ class dl_sch_pdu_assembler span assemble_retx_pdu(rnti_t rnti, harq_id_t harq_id, unsigned tb_idx, unsigned tbs_bytes); private: - class dl_sch_pdu_logger; + class pdu_log_builder; /// Assemble MAC SDUs for a given LCID. - void assemble_sdus(dl_sch_pdu& ue_pdu, rnti_t rnti, const dl_msg_lc_info& subpdu, dl_sch_pdu_logger& pdu_logger); + void assemble_sdus(dl_sch_pdu& ue_pdu, rnti_t rnti, const dl_msg_lc_info& subpdu, pdu_log_builder& pdu_logger); /// Assemble MAC subPDU with a CE. - void assemble_ce(dl_sch_pdu& ue_pdu, rnti_t rnti, const dl_msg_lc_info& subpdu, dl_sch_pdu_logger& pdu_logger); + void assemble_ce(dl_sch_pdu& ue_pdu, rnti_t rnti, const dl_msg_lc_info& subpdu, pdu_log_builder& pdu_logger); + + mac_dl_ue_manager& ue_mng; - mac_dl_ue_manager& ue_mng; srslog::basic_logger& logger; + // memory buffer to avoid allocations during formatting of pdus + fmt::memory_buffer fmtbuf; }; } // namespace srsran \ No newline at end of file From aa3ab3a17111d6ae5fa0f1e2446998c12c582001 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Fri, 16 Feb 2024 15:21:30 +0100 Subject: [PATCH 77/78] sched: add endline to file --- lib/mac/mac_dl/dl_sch_pdu_assembler.cpp | 2 +- lib/mac/mac_dl/dl_sch_pdu_assembler.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mac/mac_dl/dl_sch_pdu_assembler.cpp b/lib/mac/mac_dl/dl_sch_pdu_assembler.cpp index 751deb82a6..ff15772ecc 100644 --- a/lib/mac/mac_dl/dl_sch_pdu_assembler.cpp +++ b/lib/mac/mac_dl/dl_sch_pdu_assembler.cpp @@ -197,7 +197,7 @@ class dl_sch_pdu_assembler::pdu_log_builder nof_sdus = 1; sum_bytes = units::bytes{len}; } else { - nof_sdus++; + ++nof_sdus; sum_bytes += units::bytes{len}; } } diff --git a/lib/mac/mac_dl/dl_sch_pdu_assembler.h b/lib/mac/mac_dl/dl_sch_pdu_assembler.h index dfe147f4cc..2c0eaf68e3 100644 --- a/lib/mac/mac_dl/dl_sch_pdu_assembler.h +++ b/lib/mac/mac_dl/dl_sch_pdu_assembler.h @@ -125,4 +125,4 @@ class dl_sch_pdu_assembler fmt::memory_buffer fmtbuf; }; -} // namespace srsran \ No newline at end of file +} // namespace srsran From 4bc638e951baab7ad8901c452e9c802c73163306 Mon Sep 17 00:00:00 2001 From: qarlosalberto Date: Fri, 16 Feb 2024 11:13:39 +0100 Subject: [PATCH 78/78] ci: reest test --- .gitlab/ci/e2e.yml | 2 +- .gitlab/ci/e2e/.env | 2 +- tests/e2e/tests/ping_reestablishment.py | 126 ++++++++++++++++++++++++ tests/e2e/tests/steps/stub.py | 32 ++++++ 4 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 tests/e2e/tests/ping_reestablishment.py diff --git a/.gitlab/ci/e2e.yml b/.gitlab/ci/e2e.yml index 42631a0489..ba9a63d12a 100644 --- a/.gitlab/ci/e2e.yml +++ b/.gitlab/ci/e2e.yml @@ -266,7 +266,7 @@ amari 32UE: - *retina-needs parallel: matrix: - - KEYWORDS: ["attach_detach", "ping", "iperf and udp", "iperf and tcp"] + - KEYWORDS: ["attach_detach", "reestablishment", "ping", "iperf and udp", "iperf and tcp"] amari 32UE asan: extends: .zmq diff --git a/.gitlab/ci/e2e/.env b/.gitlab/ci/e2e/.env index 45b370974d..89417e320b 100644 --- a/.gitlab/ci/e2e/.env +++ b/.gitlab/ci/e2e/.env @@ -1,6 +1,6 @@ SRSGNB_REGISTRY_URI=registry.gitlab.com/softwareradiosystems/srsgnb RETINA_REGISTRY_PREFIX=registry.gitlab.com/softwareradiosystems/ci/retina -RETINA_VERSION=0.42.2 +RETINA_VERSION=0.42.3 AMARISOFT_VERSION=2023-03-17 SRSUE_VERSION=23.11 OPEN5GS_VERSION=2.6.1 diff --git a/tests/e2e/tests/ping_reestablishment.py b/tests/e2e/tests/ping_reestablishment.py new file mode 100644 index 0000000000..8bb87ee66c --- /dev/null +++ b/tests/e2e/tests/ping_reestablishment.py @@ -0,0 +1,126 @@ +# +# Copyright 2021-2024 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. +# + +""" +Ping / Reestablishment Tests +""" +import logging +import time +from typing import Optional, Sequence, Tuple, Union + +from pytest import mark +from retina.client.manager import RetinaTestManager +from retina.launcher.artifacts import RetinaTestData +from retina.launcher.utils import configure_artifacts, param +from retina.protocol.fivegc_pb2_grpc import FiveGCStub +from retina.protocol.gnb_pb2_grpc import GNBStub +from retina.protocol.ue_pb2_grpc import UEStub + +from .steps.configuration import configure_test_parameters +from .steps.stub import ping_start, ping_wait_until_finish, start_network, stop, ue_reestablishment, ue_start_and_attach + + +@mark.parametrize( + "band, common_scs, bandwidth, always_download_artifacts", + ( + param(3, 15, 50, True, id="band:%s-scs:%s-bandwidth:%s-artifacts:%s"), + param(41, 30, 50, False, id="band:%s-scs:%s-bandwidth:%s-artifacts:%s"), + ), +) +@mark.zmq +@mark.flaky(reruns=3, only_rerun=["failed to start"]) +# pylint: disable=too-many-arguments +def test_zmq_reestablishment( + retina_manager: RetinaTestManager, + retina_data: RetinaTestData, + ue_32: Tuple[UEStub, ...], + fivegc: FiveGCStub, + gnb: GNBStub, + band: int, + common_scs: int, + bandwidth: int, + always_download_artifacts: bool, +): + """ + ZMQ Attach / reestablishment + """ + + test_duration_sec = 15 * 60 + reestablishment_interval = 3 # seconds + reestablishment_count = int(test_duration_sec / reestablishment_interval) + + _ping_and_reestablishment_multi_ues( + retina_manager=retina_manager, + retina_data=retina_data, + ue_array=ue_32, + gnb=gnb, + fivegc=fivegc, + band=band, + common_scs=common_scs, + bandwidth=bandwidth, + sample_rate=None, # default from testbed + global_timing_advance=0, + time_alignment_calibration=0, + always_download_artifacts=always_download_artifacts, + reestablishment_count=reestablishment_count, + reestablishment_interval=reestablishment_interval, + ping_count=test_duration_sec, + warning_as_errors=True, + ) + + +# pylint: disable=too-many-arguments,too-many-locals +def _ping_and_reestablishment_multi_ues( + retina_manager: RetinaTestManager, + retina_data: RetinaTestData, + ue_array: Sequence[UEStub], + fivegc: FiveGCStub, + gnb: GNBStub, + band: int, + common_scs: int, + bandwidth: int, + sample_rate: Optional[int], + global_timing_advance: int, + time_alignment_calibration: Union[int, str], + always_download_artifacts: bool, + ping_count: int, + warning_as_errors: bool = True, + reestablishment_count: int = 1, + reestablishment_interval: int = 3, +): + logging.info("Reestablishment / Ping Test") + + configure_test_parameters( + retina_manager=retina_manager, + retina_data=retina_data, + band=band, + common_scs=common_scs, + bandwidth=bandwidth, + sample_rate=sample_rate, + global_timing_advance=global_timing_advance, + time_alignment_calibration=time_alignment_calibration, + pcap=False, + ) + + configure_artifacts( + retina_data=retina_data, + always_download_artifacts=always_download_artifacts, + ) + + start_network(ue_array, gnb, fivegc) + + ue_attach_info_dict = ue_start_and_attach(ue_array, gnb, fivegc) + ping_task_array = ping_start(ue_attach_info_dict, fivegc, ping_count) + + for _ in range(reestablishment_count): + ue_reestablishment(ue_array) + time.sleep(reestablishment_interval) + + ping_wait_until_finish(ping_task_array) + + stop(ue_array, gnb, fivegc, retina_data, warning_as_errors=warning_as_errors) diff --git a/tests/e2e/tests/steps/stub.py b/tests/e2e/tests/steps/stub.py index c63d702a71..721c21e1e8 100644 --- a/tests/e2e/tests/steps/stub.py +++ b/tests/e2e/tests/steps/stub.py @@ -226,6 +226,16 @@ def ping(ue_attach_info_dict: Dict[UEStub, UEAttachedInfo], fivegc: FiveGCStub, """ Ping command between an UE and a 5GC """ + ping_task_array = ping_start(ue_attach_info_dict, fivegc, ping_count, time_step) + ping_wait_until_finish(ping_task_array) + + +def ping_start( + ue_attach_info_dict: Dict[UEStub, UEAttachedInfo], fivegc: FiveGCStub, ping_count, time_step: int = 1 +) -> List[grpc.Future]: + """ + Ping command between an UE and a 5GC + """ # Launch ping (ue -> 5gc and 5gc -> ue) for each attached ue in parallel @@ -245,6 +255,13 @@ def ping(ue_attach_info_dict: Dict[UEStub, UEAttachedInfo], fivegc: FiveGCStub, ping_task_array.append(fivegc_to_ue) sleep(time_step) + return ping_task_array + + +def ping_wait_until_finish(ping_task_array: List[grpc.Future]) -> None: + """ + Wait until the requested ping has finished. + """ ping_success = True for ping_task in ping_task_array: ping_success &= ping_task.result().status @@ -254,6 +271,9 @@ def ping(ue_attach_info_dict: Dict[UEStub, UEAttachedInfo], fivegc: FiveGCStub, def _print_ping_result(msg: str, result: PingResponse): + """ + Print ping result + """ log_fn = logging.info if not result.status: log_fn = logging.error @@ -589,6 +609,18 @@ def _stop_stub( return error_msg +def ue_reestablishment( + ue_array: Sequence[UEStub], +): + """ + Reestablishment an array of UEs from already running gnb and 5gc + """ + for index, ue_stub in enumerate(ue_array): + name = f"UE_{index+1}" + logging.info("Reestablishment %s", name) + ue_stub.Reestablishment(Empty()) + + def _get_metrics(stub: RanStub, name: str, fail_if_kos: bool = False) -> str: error_msg = ""